From e812c65e1a59f95bb7ee74e98a7db8ba5bca18c3 Mon Sep 17 00:00:00 2001 From: zhengfangyuan Date: Fri, 5 Aug 2022 21:22:06 +0800 Subject: [PATCH] fix bill bug --- .../com/iformall/controller/WxBillController.java | 7 ++++--- .../src/main/resources/mapper/WxBillAllMapper.xml | 14 +++++++------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/mallinkBApi/src/main/java/com/iformall/controller/WxBillController.java b/mallinkBApi/src/main/java/com/iformall/controller/WxBillController.java index 9fc5db7d1..19073d033 100644 --- a/mallinkBApi/src/main/java/com/iformall/controller/WxBillController.java +++ b/mallinkBApi/src/main/java/com/iformall/controller/WxBillController.java @@ -141,9 +141,10 @@ public class WxBillController extends BaseController { billUpdateTypeMap.put("value",EnumBillUpdateType.OTHER.getCode()); variablesList.add(billUpdateTypeMap); - Integer needPay = (Integer) billObject.get("needPay"); - if (null == needPay) { - needPay = 0; + Long needPayL = (Long) billObject.get("needPay"); + Integer needPay = 0; + if (null == needPayL) { + needPay = needPayL.intValue(); } Map oldPriceMap = new HashMap(); diff --git a/mallinkService/src/main/resources/mapper/WxBillAllMapper.xml b/mallinkService/src/main/resources/mapper/WxBillAllMapper.xml index e86e96d6b..bc3cbface 100644 --- a/mallinkService/src/main/resources/mapper/WxBillAllMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillAllMapper.xml @@ -385,7 +385,7 @@ - select '' settle_number,id,merchant_id merchantId,shop_id shopId,tenant_id tenantId,parent_tenant_id parentTenantId,'租金' name,1 billTypeValue,'租金' billType, need_pay needPay,receive_pay receivePay,pay,(receive_pay+service_charge_pay+ifnull(late_pay_price,0)-pay) owe, receive_date receiveDate,pay_date payDate,DATEDIFF(now(),receive_date) expiredDay,status,starttime,endtime,rent_shop_type rentShopType,'' priceDetail, @@ -394,7 +394,7 @@ where bill.id = #{id} - select '' settle_number,id,merchant_id merchant_id,shop_id shopId,tenant_id tenantId,parent_tenant_id parentTenantId,'租赁押金' name,2 billTypeValue,'租赁押金' billType, need_pay needPay,receive_pay receivePay,pay,(receive_pay-pay) owe,receive_date receiveDate,pay_date payDate,DATEDIFF(now(),receive_date) expiredDay, status,starttime,endtime,rent_shop_type rentShopType,'' priceDetail,freeze,0 latePayPrice,0 serviceChargePay,apply_status applyStatus,apply_pay_img applyPayImg,apply_update_time applyUpdateTime @@ -402,7 +402,7 @@ where bill.id = #{id} - select '' settle_number,id,merchant_id merchantId,shop_id shopId,tenant_id tenantId,parent_tenant_id parentTenantId,'物业费' name,3 billTypeValue,'物业费' billType, need_pay needPay,receive_pay receivePay,pay,(receive_pay+service_charge_pay+ifnull(late_pay_price,0)-pay) owe,receive_date receiveDate,pay_date payDate, DATEDIFF(now(),receive_date) expiredDay,status,starttime,endtime,rent_shop_type rentShopType,'' priceDetail,freeze,ifnull(late_pay_price,0) latePayPrice, @@ -411,7 +411,7 @@ where bill.id = #{id} - select '' settle_number,id,merchant_id merchantId,shop_id shopId,tenant_id tenantId,parent_tenant_id parentTenantId,'物业押金' name,4 billTypeValue,'物业押金' billType, need_pay needPay,receive_pay receivePay,pay,(receive_pay-pay) owe,receive_date receiveDate,pay_date payDate,DATEDIFF(now(),receive_date) expiredDay,status,starttime, endtime,rent_shop_type rentShopType,'' priceDetail,freeze,0 latePayPrice,0 serviceChargePay,apply_status applyStatus,apply_pay_img applyPayImg,apply_update_time applyUpdateTime @@ -419,7 +419,7 @@ where bill.id = #{id} - select '' settle_number,id,merchant_id merchantId,shop_id shopId,tenant_id tenantId,parent_tenant_id parentTenantId, case when type=1 then '水费' when type=2 then '电费' else '空调费' end name, case when type=1 then 5 when type=2 then 6 else 9 end billTypeValue, @@ -429,14 +429,14 @@ from wx_bill_daily bill where bill.id = #{id} - select '' settle_number,id,merchant_id merchantId,shop_id shopId,tenant_id tenantId,parent_tenant_id parentTenantId,name,7 billTypeValue,'其他费用' billType,0 as needPay, receive_pay receivePay,pay,(receive_pay+service_charge_pay-pay) owe,receive_date receiveDate,pay_date payDate,DATEDIFF(now(),receive_date) expiredDay,status,'' starttime,'' endtime, rent_shop_type rentShopType,'' priceDetail,freeze,0 latePayPrice,service_charge_pay serviceChargePay,apply_status applyStatus,apply_pay_img applyPayImg,apply_update_time applyUpdateTime from wx_bill_other bill where bill.id = #{id} - select '' settle_number,id,merchant_id merchantId,shop_id shopId,tenant_id tenantId,parent_tenant_id parentTenantId,comments as name,8 billTypeValue,'其他押金' billType, 0 as needPay,receive_pay receivePay,pay,(receive_pay+service_charge_pay-pay) owe,receive_date receiveDate,pay_date payDate,DATEDIFF(now(),receive_date) expiredDay,status, '' starttime,'' endtime,rent_shop_type rentShopType,'' priceDetail,freeze,0 latePayPrice,service_charge_pay serviceChargePay,apply_status applyStatus,apply_pay_img applyPayImg,apply_update_time applyUpdateTime