From f8d764bb9e12b1f3992913f71107cf9f1017a8ba Mon Sep 17 00:00:00 2001 From: winter Date: Sun, 28 Jul 2024 16:36:18 +0800 Subject: [PATCH] fix --- .../controller/market/WxFinanceController.java | 4 +++- .../com/iformall/domain/po/WxFinanceReceive.java | 10 ++++++++-- .../service/impl/WxFinanceServiceImpl.java | 2 +- .../main/resources/mapper/WxBillDailyMapper.xml | 14 +++++++------- .../resources/mapper/WxBillDepositMapper.xml | 16 ++++++++-------- .../mapper/WxBillOtherDepositMapper.xml | 12 ++++++------ .../main/resources/mapper/WxBillOtherMapper.xml | 12 ++++++------ .../mapper/WxBillPropertyDepositMapper.xml | 12 ++++++------ .../resources/mapper/WxBillPropertyMapper.xml | 12 ++++++------ .../resources/mapper/WxBillRentManageMapper.xml | 12 ++++++------ .../main/resources/mapper/WxBillRentMapper.xml | 12 ++++++------ .../resources/mapper/WxFinanceReceiveMapper.xml | 4 ++-- 12 files changed, 65 insertions(+), 57 deletions(-) diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/market/WxFinanceController.java b/mallinkAdmin/src/main/java/com/iformall/controller/market/WxFinanceController.java index 06251e910..0bc9ae858 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/market/WxFinanceController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/market/WxFinanceController.java @@ -11,6 +11,7 @@ import com.iformall.domain.po.WxEnergyFees; import com.iformall.domain.po.WxFinanceReceive; import com.iformall.domain.po.base.BaseEntity; import com.iformall.domain.po.base.WxBillBaseEntity; +import com.iformall.domain.vo.FinanceBillSetoffSum; import com.iformall.enums.EnumBillAllType; import com.iformall.enums.EnumFinanceReceiveStatus; import com.iformall.enums.EnumFinanceReceiveType; @@ -176,7 +177,8 @@ public class WxFinanceController extends BaseController { if (null == record.getMerchantId()) { return new ResultData(Result.ERROR,"请选择商户"); } - return new ResultData(wxFinanceService.getBillSetoffSum(record)); + FinanceBillSetoffSum sum = wxFinanceService.getBillSetoffSum(record); + return new ResultData(sum); } @ApiOperation("查询冲抵列表") diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxFinanceReceive.java b/mallinkService/src/main/java/com/iformall/domain/po/WxFinanceReceive.java index 9d838b373..92bbfc23b 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxFinanceReceive.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxFinanceReceive.java @@ -77,7 +77,10 @@ public class WxFinanceReceive extends TenantEntity { @TableField(exist = false) private String statusName; public String getStatusName() { - return EnumFinanceReceiveStatus.getEnum(status).getMessage(); + if (null != status) { + return EnumFinanceReceiveStatus.getEnum(status).getMessage(); + } + return null; } @io.swagger.annotations.ApiModelProperty(value = "类型EnumFinanceReceiveType", name = "type") @@ -85,7 +88,10 @@ public class WxFinanceReceive extends TenantEntity { @TableField(exist = false) private String typeName; public String getTypeName() { - return EnumFinanceReceiveType.getEnum(type).getMessage(); + if (null != type) { + return EnumFinanceReceiveType.getEnum(type).getMessage(); + } + return null; } @io.swagger.annotations.ApiModelProperty(value="createBy",name="createBy") diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxFinanceServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxFinanceServiceImpl.java index 6eb35daca..c521c5504 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxFinanceServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxFinanceServiceImpl.java @@ -198,7 +198,7 @@ public class WxFinanceServiceImpl implements WxFinanceService { if (null != wfat) { at.setFeesName(wfat.getName()); } - total.add(new BigDecimal(at.getRemain())); + total = total.add(new BigDecimal(at.getRemain())); } } } diff --git a/mallinkService/src/main/resources/mapper/WxBillDailyMapper.xml b/mallinkService/src/main/resources/mapper/WxBillDailyMapper.xml index e8055d7d2..4595df849 100644 --- a/mallinkService/src/main/resources/mapper/WxBillDailyMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillDailyMapper.xml @@ -80,7 +80,7 @@ and `build_way` = #{buildWay} and `energy_reading_calcuteId` = #{energyReadingCalcuteId} and `energy_reading_id` = #{energyReadingId} - and (`last_owe_call_time` is not null and `receive_pay` - `pay` - `set_off` > 0 and status not in (3,6,7) ) + and (`last_owe_call_time` is not null and `receive_pay` - `pay` - IFNULL(`set_off`,'0') > 0 and status not in (3,6,7) ) and status in @@ -138,18 +138,18 @@ and date_format(br.starttime,'%Y-%m') <= #{month} and date_format(br.endtime,'%Y-%m') >= #{month} - and (br.`starttime` <= #{oweBillLastTime} and br.`receive_pay` - br.`pay` - br.`set_off` > 0 and br.status not in (3,6,7)) + and (br.`starttime` <= #{oweBillLastTime} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') > 0 and br.status not in (3,6,7)) - and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.`receive_pay` - br.`pay` - br.`set_off` > 0 and br.status not in (3,6,7)) + and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') > 0 and br.status not in (3,6,7)) - and (br.`starttime` <= #{needPayStartDay} and br.`receive_pay` - br.`pay` - br.`set_off` > 0 and br.status not in (3,6,7)) + and (br.`starttime` <= #{needPayStartDay} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') > 0 and br.status not in (3,6,7)) and br.`build_way` = #{buildWay} and br.`energy_reading_calcuteId` = #{energyReadingCalcuteId} and br.`energy_reading_id` = #{energyReadingId} - and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` - br.`set_off` > 0 and br.status not in (3,6,7) ) + and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') > 0 and br.status not in (3,6,7) ) and br.`merchant_id` in @@ -216,7 +216,7 @@ @@ -280,7 +280,7 @@ - delete from wx_bill_daily where energy_reading_calcuteId = #{energyReadingCalcuteId} and tenant_id = #{tenantId} and status = 2 and pay <= 0 and set_off <= 0 + delete from wx_bill_daily where energy_reading_calcuteId = #{energyReadingCalcuteId} and tenant_id = #{tenantId} and status = 2 and pay <= 0 and IFNULL(`set_off`,'0') <= 0 diff --git a/mallinkService/src/main/resources/mapper/WxBillDepositMapper.xml b/mallinkService/src/main/resources/mapper/WxBillDepositMapper.xml index 340ad294d..0e1dbb2b7 100644 --- a/mallinkService/src/main/resources/mapper/WxBillDepositMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillDepositMapper.xml @@ -84,12 +84,12 @@ and date_format(starttime,'%Y-%m') <= #{month} and date_format(endtime,'%Y-%m') >= #{month} - and (`starttime` <= #{oweBillLastTime} and `receive_pay` - `pay` - `set_off` > 0 and status not in (3,6,7)) + and (`starttime` <= #{oweBillLastTime} and `receive_pay` - `pay` - IFNULL(`set_off`,'0') > 0 and status not in (3,6,7)) - and (`starttime` > #{oweBillLastTime} and `starttime` <= #{nearBillLastTime} and `receive_pay` - `pay` - `set_off` > 0 and status not in (3,6,7)) + and (`starttime` > #{oweBillLastTime} and `starttime` <= #{nearBillLastTime} and `receive_pay` - `pay` - IFNULL(`set_off`,'0') > 0 and status not in (3,6,7)) - and (`last_owe_call_time` is not null and `receive_pay` - `pay` - `set_off` > 0 and status not in (3,6,7) ) + and (`last_owe_call_time` is not null and `receive_pay` - `pay` - IFNULL(`set_off`,'0') > 0 and status not in (3,6,7) ) and `merchant_id` in @@ -168,15 +168,15 @@ and date_format(br.starttime,'%Y-%m') <= #{month} and date_format(br.endtime,'%Y-%m') >= #{month} - and (br.`starttime` <= #{oweBillLastTime} and br.`receive_pay` - br.`pay` - br.`set_off` > 0 and br.status not in (3,6,7)) + and (br.`starttime` <= #{oweBillLastTime} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') > 0 and br.status not in (3,6,7)) - and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.`receive_pay` - br.`pay` - br.`set_off` > 0 and br.status not in (3,6,7)) + and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') > 0 and br.status not in (3,6,7)) - and (br.`starttime` <= #{needPayStartDay} and br.`receive_pay` - br.`pay` - br.`set_off` > 0 and br.status not in (3,6,7)) + and (br.`starttime` <= #{needPayStartDay} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') > 0 and br.status not in (3,6,7)) - and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` - br.`set_off` > 0 and br.status not in (3,6,7) ) + and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') > 0 and br.status not in (3,6,7) ) and br.`merchant_id` in @@ -226,7 +226,7 @@ diff --git a/mallinkService/src/main/resources/mapper/WxBillOtherDepositMapper.xml b/mallinkService/src/main/resources/mapper/WxBillOtherDepositMapper.xml index b595df0b1..8b5de2c4b 100644 --- a/mallinkService/src/main/resources/mapper/WxBillOtherDepositMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillOtherDepositMapper.xml @@ -77,7 +77,7 @@ and `name` = #{name} and `rent_shop_type` = #{rentShopType} and `pay_way` = #{payWay} - and (`last_owe_call_time` is not null and `receive_pay` - `pay` - `set_off` > 0 and status not in (3,6,7) ) + and (`last_owe_call_time` is not null and `receive_pay` - `pay` - IFNULL(`set_off`,'0') > 0 and status not in (3,6,7) ) and id in @@ -137,15 +137,15 @@ and date_format(br.starttime,'%Y-%m') <= #{month} and date_format(br.endtime,'%Y-%m') >= #{month} - and (br.`starttime` <= #{oweBillLastTime} and br.`receive_pay` - br.`pay` - br.`set_off` > 0 and br.status not in (3,6,7)) + and (br.`starttime` <= #{oweBillLastTime} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') > 0 and br.status not in (3,6,7)) - and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.`receive_pay` - br.`pay` - br.`set_off` > 0 and br.status not in (3,6,7)) + and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') > 0 and br.status not in (3,6,7)) - and (br.`starttime` <= #{needPayStartDay} and br.`receive_pay` - br.`pay` - br.`set_off` > 0 and br.status not in (3,6,7)) + and (br.`starttime` <= #{needPayStartDay} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') > 0 and br.status not in (3,6,7)) - and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` - br.`set_off` > 0 and br.status not in (3,6,7) ) + and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') > 0 and br.status not in (3,6,7) ) and br.`merchant_id` in @@ -213,7 +213,7 @@ diff --git a/mallinkService/src/main/resources/mapper/WxBillOtherMapper.xml b/mallinkService/src/main/resources/mapper/WxBillOtherMapper.xml index 820b682e6..129460d0b 100644 --- a/mallinkService/src/main/resources/mapper/WxBillOtherMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillOtherMapper.xml @@ -75,7 +75,7 @@ and `name` = #{name} and `rent_shop_type` = #{rentShopType} and `pay_way` = #{payWay} - and (`last_owe_call_time` is not null and `receive_pay` - `pay` - `set_off` > 0 and status not in (3,6,7) ) + and (`last_owe_call_time` is not null and `receive_pay` - `pay` - IFNULL(`set_off`,'0') > 0 and status not in (3,6,7) ) and id in @@ -130,15 +130,15 @@ and date_format(br.starttime,'%Y-%m') <= #{month} and date_format(br.endtime,'%Y-%m') >= #{month} - and (br.`starttime` <= #{oweBillLastTime} and br.`receive_pay` - br.`pay` - br.`set_off` > 0 and br.status not in (3,6,7)) + and (br.`starttime` <= #{oweBillLastTime} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') > 0 and br.status not in (3,6,7)) - and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.`receive_pay` - br.`pay` - br.`set_off` > 0 and br.status not in (3,6,7)) + and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') > 0 and br.status not in (3,6,7)) - and (br.`starttime` <= #{needPayStartDay} and br.`receive_pay` - br.`pay` - br.`set_off` > 0 and br.status not in (3,6,7)) + and (br.`starttime` <= #{needPayStartDay} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') > 0 and br.status not in (3,6,7)) - and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` - br.`set_off` > 0 and br.status not in (3,6,7) ) + and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') > 0 and br.status not in (3,6,7) ) and br.`merchant_id` in @@ -206,7 +206,7 @@ diff --git a/mallinkService/src/main/resources/mapper/WxBillPropertyDepositMapper.xml b/mallinkService/src/main/resources/mapper/WxBillPropertyDepositMapper.xml index e57805071..2d3c4eb4f 100644 --- a/mallinkService/src/main/resources/mapper/WxBillPropertyDepositMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillPropertyDepositMapper.xml @@ -76,7 +76,7 @@ and `updatetime` = #{updatetime} and `rent_shop_type` = #{rentShopType} and `pay_way` = #{payWay} - and (`last_owe_call_time` is not null and `receive_pay` - `pay` - `set_off` > 0 and status not in (3,6,7) ) + and (`last_owe_call_time` is not null and `receive_pay` - `pay` - IFNULL(`set_off`,'0') > 0 and status not in (3,6,7) ) and property_contract_id in @@ -136,15 +136,15 @@ and date_format(br.starttime,'%Y-%m') <= #{month} and date_format(br.endtime,'%Y-%m') >= #{month} - and (br.`starttime` <= #{oweBillLastTime} and br.`receive_pay` - br.`pay` - br.`set_off` > 0 and br.status not in (3,6,7)) + and (br.`starttime` <= #{oweBillLastTime} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') > 0 and br.status not in (3,6,7)) - and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.`receive_pay` - br.`pay` - br.`set_off` > 0 and br.status not in (3,6,7)) + and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') > 0 and br.status not in (3,6,7)) - and (br.`starttime` <= #{needPayStartDay} and br.`receive_pay` - br.`pay` - br.`set_off` > 0 and br.status not in (3,6,7)) + and (br.`starttime` <= #{needPayStartDay} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') > 0 and br.status not in (3,6,7)) - and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` - br.`set_off` > 0 and br.status not in (3,6,7) ) + and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') > 0 and br.status not in (3,6,7) ) and br.`merchant_id` in @@ -202,7 +202,7 @@ diff --git a/mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml b/mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml index 718827aac..9a5710370 100644 --- a/mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml @@ -98,7 +98,7 @@ and `energy_fees_id` is not null and `energy_fees_id` is null - and (`last_owe_call_time` is not null and `receive_pay` - `pay` - `set_off` > 0 and status not in (3,6,7) ) + and (`last_owe_call_time` is not null and `receive_pay` - `pay` - IFNULL(`set_off`,'0') > 0 and status not in (3,6,7) ) and property_contract_id in @@ -162,13 +162,13 @@ and date_format(br.starttime,'%Y-%m') <= #{month} and date_format(br.endtime,'%Y-%m') >= #{month} - and (br.`starttime` <= #{oweBillLastTime} and br.`receive_pay` - br.`pay` - br.`set_off` > 0 and br.status not in (3,6,7)) + and (br.`starttime` <= #{oweBillLastTime} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') > 0 and br.status not in (3,6,7)) - and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.`receive_pay` - br.`pay` - br.`set_off` > 0 and br.status not in (3,6,7)) + and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') > 0 and br.status not in (3,6,7)) - and (br.`starttime` <= #{needPayStartDay} and br.`receive_pay` - br.`pay` - br.`set_off` > 0 and br.status not in (3,6,7)) + and (br.`starttime` <= #{needPayStartDay} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') > 0 and br.status not in (3,6,7)) and br.`rent_shop_type` = #{rentShopType} and br.`property_contract_id` = #{propertyContractId} @@ -180,7 +180,7 @@ and br.`energy_fees_id` is not null and br.`energy_fees_id` is null - and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` - br.`set_off` > 0 and br.status not in (3,6,7) ) + and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') > 0 and br.status not in (3,6,7) ) and br.property_contract_id in @@ -254,7 +254,7 @@ diff --git a/mallinkService/src/main/resources/mapper/WxBillRentManageMapper.xml b/mallinkService/src/main/resources/mapper/WxBillRentManageMapper.xml index 9cc5d46de..c3c63d7d6 100644 --- a/mallinkService/src/main/resources/mapper/WxBillRentManageMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillRentManageMapper.xml @@ -85,7 +85,7 @@ and `pay_way` = #{payWay} and `late_pay_status` = #{latePayStatus} and `manage_fee_type` = #{manageFeeType} - and (`last_owe_call_time` is not null and `receive_pay` - `pay` - `set_off` > 0 and status not in (3,6,7) ) + and (`last_owe_call_time` is not null and `receive_pay` - `pay` - IFNULL(`set_off`,'0') > 0 and status not in (3,6,7) ) and merchant_id in @@ -145,17 +145,17 @@ and date_format(br.starttime,'%Y-%m') <= #{month} and date_format(br.endtime,'%Y-%m') >= #{month} - and (br.`starttime` <= #{oweBillLastTime} and br.`receive_pay` - br.`pay` - br.`set_off` > 0 and br.status not in (3,6,7)) + and (br.`starttime` <= #{oweBillLastTime} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') > 0 and br.status not in (3,6,7)) - and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.`receive_pay` - br.`pay` - br.`set_off` > 0 and br.status not in (3,6,7)) + and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') > 0 and br.status not in (3,6,7)) - and (br.`starttime` <= #{needPayStartDay} and br.`receive_pay` - br.`pay` - br.`set_off` > 0 and br.status not in (3,6,7)) + and (br.`starttime` <= #{needPayStartDay} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') > 0 and br.status not in (3,6,7)) and br.`manage_fee_type` = #{manageFeeType} and br.`merchant_id` is not null - and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` - br.`set_off` > 0 and br.status not in (3,6,7) ) + and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') > 0 and br.status not in (3,6,7) ) and br.merchant_id in @@ -223,7 +223,7 @@ diff --git a/mallinkService/src/main/resources/mapper/WxBillRentMapper.xml b/mallinkService/src/main/resources/mapper/WxBillRentMapper.xml index eb44f644c..55465e186 100644 --- a/mallinkService/src/main/resources/mapper/WxBillRentMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillRentMapper.xml @@ -109,7 +109,7 @@ and endtime < #{endtimeEnd} - and (`last_owe_call_time` is not null and `receive_pay` - `pay` - `set_off` > 0 and status not in (3,6,7) ) + and (`last_owe_call_time` is not null and `receive_pay` - `pay` - IFNULL(`set_off`,'0') > 0 and status not in (3,6,7) ) and status in @@ -161,15 +161,15 @@ and date_format(br.starttime,'%Y-%m') <= #{month} and date_format(br.endtime,'%Y-%m') >= #{month} - and (br.`starttime` <= #{oweBillLastTime} and br.`receive_pay` - br.`pay` - br.`set_off` > 0 and br.status not in (3,6,7)) + and (br.`starttime` <= #{oweBillLastTime} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') > 0 and br.status not in (3,6,7)) - and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.`receive_pay` - br.`pay` - br.`set_off` > 0 and br.status not in (3,6,7)) + and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') > 0 and br.status not in (3,6,7)) - and (br.`starttime` <= #{needPayStartDay} and br.`receive_pay` - br.`pay` - br.`set_off` > 0 and br.status not in (3,6,7)) + and (br.`starttime` <= #{needPayStartDay} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') > 0 and br.status not in (3,6,7)) - and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay`- br.`set_off` > 0 and br.status not in (3,6,7) ) + and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay`- IFNULL(br.`set_off`,'0') > 0 and br.status not in (3,6,7) ) and br.`rent_contract_id` in @@ -243,7 +243,7 @@ diff --git a/mallinkService/src/main/resources/mapper/WxFinanceReceiveMapper.xml b/mallinkService/src/main/resources/mapper/WxFinanceReceiveMapper.xml index f74cd7ecd..b6c963d60 100644 --- a/mallinkService/src/main/resources/mapper/WxFinanceReceiveMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxFinanceReceiveMapper.xml @@ -83,10 +83,10 @@