@ -1312,4 +1312,61 @@ public class FinUncollectedReceivablesDetailedService extends MybatisBaseService
}
return rb . success ( ) . setData ( vo ) ;
}
public List < CustomerBillSummaryExportVo > exportCustomerBillExcel ( CustomerBillSummaryQuery query ) {
QueryWrapper < FinUncollectedReceivablesDetailed > qw = new QueryWrapper < > ( ) ;
String orgPath = query . getOrgPath ( ) ;
//授权
if ( StringUtils . isNotBlank ( query . getMenuUrl ( ) ) ) {
PrivilegeQuery privilegeQuery = new PrivilegeQuery ( ) ;
privilegeQuery . setOrgPath ( query . getOrgPath ( ) ) ;
privilegeQuery . setMenuUrl ( query . getMenuUrl ( ) ) ;
privilegeQuery . setUserSid ( query . getUserSid ( ) ) ;
ResultBean < String > defaultIdReltBean = sysUserFeign . selectPrivilegeLevel ( privilegeQuery ) ;
if ( StringUtils . isNotBlank ( defaultIdReltBean . getData ( ) ) ) {
//数据权限ID(1集团、2事业部、3分公司、4部门、5个人)
orgPath = orgPath + "/" ;
int i1 = orgPath . indexOf ( "/" ) ;
int i2 = orgPath . indexOf ( "/" , i1 + 1 ) ;
int i3 = orgPath . indexOf ( "/" , i2 + 1 ) ;
int i4 = orgPath . indexOf ( "/" , i3 + 1 ) ;
String orgLevelKey = defaultIdReltBean . getData ( ) ;
if ( "1" . equals ( orgLevelKey ) ) {
orgPath = orgPath . substring ( 0 , i1 ) ;
qw . like ( "b.orgSidPath" , orgPath ) ;
} else if ( "2" . equals ( orgLevelKey ) ) {
orgPath = orgPath . substring ( 0 , i2 ) ;
qw . like ( "b.orgSidPath" , orgPath ) ;
} else if ( "3" . equals ( orgLevelKey ) ) {
orgPath = orgPath . substring ( 0 , i3 ) ;
qw . like ( "b.orgSidPath" , orgPath ) ;
} else if ( "4" . equals ( orgLevelKey ) ) {
orgPath = orgPath . substring ( 0 , i4 ) ;
qw . like ( "b.orgSidPath" , orgPath ) ;
} else if ( "5" . equals ( orgLevelKey ) ) {
orgPath = orgPath . substring ( 0 , i4 ) ;
qw . like ( "b.orgSidPath" , orgPath ) ;
} else {
return new ArrayList < > ( ) ;
}
} else {
return new ArrayList < > ( ) ;
}
}
if ( StringUtils . isNotBlank ( query . getNoSubscriptionMoneyStart ( ) ) ) {
qw . apply ( "( b.reveivableMoney - b.subscriptionMoney ) >=" + query . getNoSubscriptionMoneyStart ( ) ) ;
}
if ( StringUtils . isNotBlank ( query . getNoSubscriptionMoneyEnd ( ) ) ) {
qw . apply ( "( b.reveivableMoney - b.subscriptionMoney ) <=" + query . getNoSubscriptionMoneyEnd ( ) ) ;
}
if ( StringUtils . isNotBlank ( query . getContractNo ( ) ) ) {
qw . like ( "b.contractNo" , query . getContractNo ( ) ) ;
}
if ( StringUtils . isNotBlank ( query . getCustomerName ( ) ) ) {
qw . like ( "b.customerName" , query . getCustomerName ( ) ) ;
}
List < CustomerBillSummaryExportVo > list = baseMapper . exportCustomerBillExcel ( qw ) ;
return list ;
}
}