From 3b3358dc30f1573046934c9f95674d3d90f76ad2 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Wed, 11 Sep 2019 10:55:01 +0800 Subject: [PATCH 1/3] =?UTF-8?q?[BUG][=E4=BF=AE=E6=94=B9][=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E7=8E=AF=E5=A2=83=EF=BC=9A=E4=B8=9A=E6=80=81=E5=88=86?= =?UTF-8?q?=E6=9E=90=E8=AE=A1=E7=AE=97=E9=97=AE=E9=A2=98]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/WxBusinessMapper.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mallinkService/src/main/resources/mapper/WxBusinessMapper.xml b/mallinkService/src/main/resources/mapper/WxBusinessMapper.xml index e50cf0103..b2137e784 100644 --- a/mallinkService/src/main/resources/mapper/WxBusinessMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBusinessMapper.xml @@ -86,13 +86,13 @@ round( (select if(sum(mtd.trade_amt) is null,0,sum(mtd.trade_amt)) from wx_merchant m - left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and mtd.report_date between #{startdate} and #{enddate} and m.status = 1 and m.is_del = 0 ) + left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and STR_TO_DATE(mtd.report_date,'%Y-%m-%d') between #{startdate} and #{enddate} and m.status = 1 and m.is_del = 0 ) /100,2) volume, round( (select if(sum(mtd.trade_amt) is null,0,sum(mtd.trade_amt)) from wx_merchant m - left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and mtd.report_date between #{startdate} and #{enddate} and m.status = 1 and m.is_del = 0 ) + left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and STR_TO_DATE(mtd.report_date,'%Y-%m-%d') between #{startdate} and #{enddate} and m.status = 1 and m.is_del = 0 ) / (select if(sum(ws.operation_area) is null,0,sum(ws.operation_area)) from wx_merchant m @@ -105,15 +105,15 @@ from wx_merchant m left join wx_merchant_shop mtd on mtd.merchant_id = m.id left join wx_shop ws on(mtd.shop_id = ws.id) - where m.business_id = b.id and m.tenant_id=456 and m.status = 1 and m.is_del = 0 )area, + where m.business_id = b.id and m.tenant_id=#{tenantId} and m.status = 1 and m.is_del = 0 )area, round( (select if(sum(mtd.trade_amt) is null,0,sum(mtd.trade_amt)) from wx_merchant m - left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and mtd.report_date between #{startdate} and #{enddate} and m.status = 1 and m.is_del = 0 ) / + left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and STR_TO_DATE(mtd.report_date,'%Y-%m-%d') between #{startdate} and #{enddate} and m.status = 1 and m.is_del = 0 ) / (select sum(mtd.trade_count) from wx_merchant m - left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and mtd.report_date between #{startdate} and #{enddate} and m.status = 1 and m.is_del = 0 ) + left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and STR_TO_DATE(mtd.report_date,'%Y-%m-%d') between #{startdate} and #{enddate} and m.status = 1 and m.is_del = 0 ) /100,2) comPrice from wx_business b From 26f881bbe63ef2dcbc328bd4f32134673d79da32 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Wed, 11 Sep 2019 11:03:21 +0800 Subject: [PATCH 2/3] =?UTF-8?q?[BUG][=E4=BF=AE=E6=94=B9][=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E7=8E=AF=E5=A2=83=EF=BC=9A=E4=B8=9A=E6=80=81=E5=88=86?= =?UTF-8?q?=E6=9E=90=E8=AE=A1=E7=AE=97=E9=97=AE=E9=A2=98]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/iformall/service/impl/WxBusinessServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxBusinessServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxBusinessServiceImpl.java index da383b1e8..0fce5b60d 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxBusinessServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxBusinessServiceImpl.java @@ -132,7 +132,7 @@ public class WxBusinessServiceImpl implements WxBusinessService { e.put("rent",0); }else { BigDecimal area = new BigDecimal(e.get("area").toString()); - if (area.longValue() > 0) { + if (area.doubleValue() > 0) { BigDecimal areaRatio = businessSumMoney.divide(area, 2, BigDecimal.ROUND_HALF_UP).divide(new BigDecimal(100), 2, BigDecimal.ROUND_HALF_UP); e.put("rent", areaRatio.toBigInteger()); } From ae3b56bbe42914b3096eca4ad3335fda6c1b9340 Mon Sep 17 00:00:00 2001 From: luozukai Date: Wed, 11 Sep 2019 11:34:30 +0800 Subject: [PATCH 3/3] =?UTF-8?q?[=E4=BF=AE=E6=94=B9][=E7=BB=93=E7=AE=97?= =?UTF-8?q?=E5=8D=95][=E4=BF=AE=E6=94=B9=E8=B7=B3=E7=82=B9=E7=8E=87?= =?UTF-8?q?=E8=AE=A1=E7=AE=97]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rent/WxBillSettleController.java | 2 +- .../service/impl/WxBillSettleServiceImpl.java | 40 +++++++++---------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/rent/WxBillSettleController.java b/mallinkAdmin/src/main/java/com/iformall/controller/rent/WxBillSettleController.java index fb796aa26..11f93695c 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/rent/WxBillSettleController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/rent/WxBillSettleController.java @@ -60,7 +60,7 @@ public class WxBillSettleController extends BaseController { @SystemControllerLog(description = "账单管理-结算单-id查找") public ResultData findById(Long id) { logger.debug("[" + getIpAddr() + "] WxBillSettleController::findById"); - return new ResultData(Result.SUCCESS, "查询成功", wxBillSettleService.getById(id, EnumFilterSettle.NO.getCode())); + return new ResultData(Result.SUCCESS, "查询成功", wxBillSettleService.getById(id, EnumFilterSettle.YES.getCode())); } @PostMapping("addOrUpdate") diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxBillSettleServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxBillSettleServiceImpl.java index bc9d228e6..0c99f26b8 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxBillSettleServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxBillSettleServiceImpl.java @@ -170,9 +170,9 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { if(EnumBillRentStatus.PAID.getCode().equals(status)){ WxBillRent dbBill = wxBillRentMapper.selectByPrimaryKey(wxBillRent.getId()); if(dbBill!=null) { - wxBillRent.setPay(dbBill.getOwe()); + wxBillRent.setPay(dbBill.getReceivePay()); wxBillRent.setPayDate(new Date()); - addBillAction(bill.getBillId(), dbBill.getOwe()); + addBillAction(bill.getBillId(), dbBill.getReceivePay()); } } wxBillRentMapper.updateByPrimaryKeySelective(wxBillRent); @@ -187,9 +187,9 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { if(EnumBillRentStatus.PAID.getCode().equals(status)){ WxBillDeposit dbBill = wxBillDepositMapper.selectByPrimaryKey(wxBillRent.getId()); if(dbBill!=null) { - wxBillRent.setPay(dbBill.getOwe()); + wxBillRent.setPay(dbBill.getReceivePay()); wxBillRent.setPayDate(new Date()); - addBillAction(bill.getBillId(), dbBill.getOwe()); + addBillAction(bill.getBillId(), dbBill.getReceivePay()); } } wxBillDepositMapper.updateByPrimaryKeySelective(wxBillRent); @@ -204,9 +204,9 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { if(EnumBillRentStatus.PAID.getCode().equals(status)){ WxBillOtherDeposit dbBill = wxBillOtherDepositMapper.selectByPrimaryKey(wxBillRent.getId()); if(dbBill!=null) { - wxBillOtherDeposit.setPay(dbBill.getOwe()); + wxBillOtherDeposit.setPay(dbBill.getReceivePay()); wxBillRent.setPayDate(new Date()); - addBillAction(bill.getBillId(), dbBill.getOwe()); + addBillAction(bill.getBillId(), dbBill.getReceivePay()); } } wxBillOtherDepositMapper.updateByPrimaryKeySelective(wxBillOtherDeposit); @@ -221,9 +221,9 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { if(EnumBillRentStatus.PAID.getCode().equals(status)){ WxBillPropertyDeposit dbBill = wxBillPropertyDepositMapper.selectByPrimaryKey(wxBillRent.getId()); if(dbBill!=null) { - propertyDeposit.setPay(dbBill.getOwe()); + propertyDeposit.setPay(dbBill.getReceivePay()); wxBillRent.setPayDate(new Date()); - addBillAction(bill.getBillId(), dbBill.getOwe()); + addBillAction(bill.getBillId(), dbBill.getReceivePay()); } } wxBillPropertyDepositMapper.updateByPrimaryKeySelective(propertyDeposit); @@ -239,9 +239,9 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { if(EnumBillRentStatus.PAID.getCode().equals(status)){ WxBillProperty dbBill = wxBillPropertyMapper.selectByPrimaryKey(wxBillRent.getId()); if(dbBill!=null) { - wxBillRent.setPay(dbBill.getOwe()); + wxBillRent.setPay(dbBill.getReceivePay()); wxBillRent.setPayDate(new Date()); - addBillAction(bill.getBillId(), dbBill.getOwe()); + addBillAction(bill.getBillId(), dbBill.getReceivePay()); } } wxBillPropertyMapper.updateByPrimaryKeySelective(wxBillRent); @@ -256,9 +256,9 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { if(EnumBillRentStatus.PAID.getCode().equals(status)){ WxBillPropertyDeposit dbBill = wxBillPropertyDepositMapper.selectByPrimaryKey(wxBillRent.getId()); if(dbBill!=null) { - propertyDeposit.setPay(dbBill.getOwe()); + propertyDeposit.setPay(dbBill.getReceivePay()); wxBillRent.setPayDate(new Date()); - addBillAction(bill.getBillId(), dbBill.getOwe()); + addBillAction(bill.getBillId(), dbBill.getReceivePay()); } } wxBillPropertyDepositMapper.updateByPrimaryKeySelective(propertyDeposit); @@ -273,9 +273,9 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { if(EnumBillRentStatus.PAID.getCode().equals(status)){ WxBillOther dbBill = wxBillOtherMapper.selectByPrimaryKey(wxBillRent.getId()); if(dbBill!=null) { - wxBillRent.setPay(dbBill.getOwe()); + wxBillRent.setPay(dbBill.getReceivePay()); wxBillRent.setPayDate(new Date()); - addBillAction(bill.getBillId(), dbBill.getOwe()); + addBillAction(bill.getBillId(), dbBill.getReceivePay()); } } wxBillOtherMapper.updateByPrimaryKeySelective(wxBillRent); @@ -290,9 +290,9 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { if(EnumBillRentStatus.PAID.getCode().equals(status)){ WxBillOtherDeposit dbBill = wxBillOtherDepositMapper.selectByPrimaryKey(wxBillRent.getId()); if(dbBill!=null) { - wxBillRent.setPay(dbBill.getOwe()); + wxBillRent.setPay(dbBill.getReceivePay()); wxBillRent.setPayDate(new Date()); - addBillAction(bill.getBillId(), dbBill.getOwe()); + addBillAction(bill.getBillId(), dbBill.getReceivePay()); } } wxBillOtherDepositMapper.updateByPrimaryKeySelective(wxBillRent); @@ -315,9 +315,9 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { if(EnumBillRentStatus.PAID.getCode().equals(status)){ WxBillOtherDeposit dbBill = wxBillOtherDepositMapper.selectByPrimaryKey(wxBillRent.getId()); if(dbBill!=null) { - wxBillRent.setPay(dbBill.getOwe()); + wxBillRent.setPay(dbBill.getReceivePay()); wxBillRent.setPayDate(new Date()); - addBillAction(bill.getBillId(), dbBill.getOwe()); + addBillAction(bill.getBillId(), dbBill.getReceivePay()); } } wxBillOtherDepositMapper.updateByPrimaryKeySelective(wxBillRent); @@ -332,9 +332,9 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { if(EnumBillRentStatus.PAID.getCode().equals(status)){ WxBillDaily dbBill = wxBillDailyMapper.selectByPrimaryKey(wxBillRent.getId()); if(dbBill!=null) { - wxBillRent.setPay(dbBill.getOwe()); + wxBillRent.setPay(dbBill.getReceivePay()); wxBillRent.setPayDate(new Date()); - addBillAction(bill.getBillId(), dbBill.getOwe()); + addBillAction(bill.getBillId(), dbBill.getReceivePay()); } } wxBillDailyMapper.updateByPrimaryKeySelective(wxBillRent);