From 6b775219d4ac9604e2d9a3605f0a652fcc2ffba7 Mon Sep 17 00:00:00 2001 From: winter Date: Wed, 8 May 2024 01:16:36 +0800 Subject: [PATCH] fix --- .../controller/rent/WxBillAllController.java | 198 ++++++++++++++---- .../schedule/LatePayBillActionSchedule.java | 4 +- .../iformall/common/SysConfigConstant.java | 3 +- .../com/iformall/domain/po/WxBillDaily.java | 2 - .../com/iformall/domain/po/WxBillDeposit.java | 3 - .../com/iformall/domain/po/WxBillOther.java | 3 - .../domain/po/WxBillOtherDeposit.java | 3 - .../iformall/domain/po/WxBillProperty.java | 4 - .../domain/po/WxBillPropertyDeposit.java | 2 - .../com/iformall/domain/po/WxBillRent.java | 4 - .../iformall/domain/po/WxBillRentManage.java | 4 - .../com/iformall/domain/po/WxMerchant.java | 9 + .../domain/po/base/WxBillBaseEntity.java | 20 +- .../iformall/domain/vo/WxBillHotNotify.java | 2 - .../com/iformall/domain/vo/WxBillSum.java | 5 + .../iformall/enums/EnumBillDailyStatus.java | 41 ---- ...illRentStatus.java => EnumBillStatus.java} | 8 +- .../iformall/mapper/WxBillDailyMapper.java | 3 + .../iformall/mapper/WxBillDepositMapper.java | 3 + .../mapper/WxBillOtherDepositMapper.java | 3 + .../iformall/mapper/WxBillOtherMapper.java | 3 + .../mapper/WxBillPropertyDepositMapper.java | 3 + .../iformall/mapper/WxBillPropertyMapper.java | 5 +- .../mapper/WxBillRentManageMapper.java | 3 + .../com/iformall/mapper/WxBillRentMapper.java | 5 +- .../iformall/service/WxBillDailyService.java | 3 + .../service/WxBillDepositService.java | 3 + .../service/WxBillOtherDepositService.java | 3 + .../iformall/service/WxBillOtherService.java | 3 + .../service/WxBillPropertyDepositService.java | 3 + .../service/WxBillPropertyService.java | 3 + .../service/WxBillRentManageService.java | 3 + .../iformall/service/WxBillRentService.java | 3 + .../service/helper/WxBillAllHelper.java | 155 +++++++++++++- .../service/impl/DataTowerServiceImpl.java | 4 +- .../service/impl/WxBillAllServiceImpl.java | 76 +++---- .../service/impl/WxBillDailyServiceImpl.java | 45 ++-- .../impl/WxBillDepositServiceImpl.java | 29 ++- .../impl/WxBillOtherDepositServiceImpl.java | 39 ++-- .../service/impl/WxBillOtherServiceImpl.java | 35 ++-- .../WxBillPropertyDepositServiceImpl.java | 29 +-- .../impl/WxBillPropertyServiceImpl.java | 37 ++-- .../impl/WxBillRentManageServiceImpl.java | 37 ++-- .../service/impl/WxBillRentServiceImpl.java | 39 ++-- .../service/impl/WxBillSettleServiceImpl.java | 105 +++++----- .../service/impl/WxChartServiceImpl.java | 2 +- .../service/impl/WxFlowServiceImpl.java | 4 +- .../impl/WxPropertyContractServiceImpl.java | 22 +- .../impl/WxRentContractServiceImpl.java | 36 ++-- .../java/com/iformall/utils/Constant.java | 1 + .../contract-word-template/bill_near_one.docx | Bin 0 -> 17118 bytes .../resources/mapper/WxBillDailyMapper.xml | 31 ++- .../resources/mapper/WxBillDepositMapper.xml | 37 +++- .../mapper/WxBillOtherDepositMapper.xml | 32 ++- .../resources/mapper/WxBillOtherMapper.xml | 35 +++- .../mapper/WxBillPropertyDepositMapper.xml | 31 ++- .../resources/mapper/WxBillPropertyMapper.xml | 56 +++-- .../mapper/WxBillRentManageMapper.xml | 35 +++- .../resources/mapper/WxBillRentMapper.xml | 57 +++-- 59 files changed, 922 insertions(+), 454 deletions(-) delete mode 100644 mallinkService/src/main/java/com/iformall/enums/EnumBillDailyStatus.java rename mallinkService/src/main/java/com/iformall/enums/{EnumBillRentStatus.java => EnumBillStatus.java} (75%) create mode 100644 mallinkService/src/main/resources/contract-word-template/bill_near_one.docx diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/rent/WxBillAllController.java b/mallinkAdmin/src/main/java/com/iformall/controller/rent/WxBillAllController.java index 2da84c379..116e40683 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/rent/WxBillAllController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/rent/WxBillAllController.java @@ -6,7 +6,9 @@ import com.github.pagehelper.PageInfo; import com.iformall.annotation.SystemControllerLog; import com.iformall.common.Result; import com.iformall.common.ResultData; +import com.iformall.common.SysConfigConstant; import com.iformall.controller.base.BaseController; +import com.iformall.domain.po.SysConfig; import com.iformall.domain.po.WxBillDaily; import com.iformall.domain.po.WxBillDeposit; import com.iformall.domain.po.WxBillOther; @@ -23,6 +25,7 @@ import com.iformall.domain.po.base.WxBillBaseEntity; import com.iformall.domain.vo.WxBillAll; import com.iformall.domain.vo.WxBillAllVo; import com.iformall.domain.vo.WxBillExcelTemplate; +import com.iformall.domain.vo.WxBillHotNotify; import com.iformall.domain.vo.WxBillSum; import com.iformall.domain.vo.WxMerchantBillVo; import com.iformall.domain.vo.WxMerchantMicroPayVo; @@ -32,6 +35,7 @@ import com.iformall.enums.EnumBillType; import com.iformall.enums.EnumRentContractManageFeeType; import com.iformall.enums.EnumYesOrNo; import com.iformall.service.ExcelService; +import com.iformall.service.SysConfigService; import com.iformall.service.WxBillAllService; import com.iformall.service.WxBillDailyService; import com.iformall.service.WxBillDepositService; @@ -45,6 +49,7 @@ import com.iformall.service.WxMerchantService; import com.iformall.service.WxPayAccountBillService; import com.iformall.service.WxShopService; import com.iformall.service.helper.WxBillAllHelper; +import com.iformall.utils.Constant; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; @@ -89,6 +94,9 @@ public class WxBillAllController extends BaseController { @Autowired ExcelService excelService; + @Autowired + SysConfigService sysConfigService; + /** * 商户账单汇总计费列表 * @param wxMerchant @@ -116,6 +124,12 @@ public class WxBillAllController extends BaseController { wxMerchant.setStarttime(null); wxMerchant.setEndtime(null); if (null != wxMerchant.getOnlyOwe() && EnumYesOrNo.YES.getCode().intValue() == wxMerchant.getOnlyOwe().intValue()) { + SysConfig config = sysConfigService.getByKey(SysConfigConstant.bill_before_days, getTenantInfo()); + Integer oweBillBeforeDays = 0 ; + if (null != config) { + oweBillBeforeDays = Integer.parseInt(config.getConfigItemValue()); + } + wxMerchant.setOweBillBeforeDays(oweBillBeforeDays); List mids = billAllHelper.getOwdMerchantIds(wxMerchant, starttime, enttime); if (null != mids && mids.size() > 0 ) { wxMerchant.setIds(mids);; @@ -254,23 +268,39 @@ public class WxBillAllController extends BaseController { * @param pageSize * @return */ -// @GetMapping("oweBillHot") -// public ResultData oweBillHot() { -// wxMerchant.updateTenantInfo(getTenantInfo()); -// WxUserDataRule dataRule = this.getCurrentDataFloors(); -// if (null != dataRule) { -// wxMerchant.setFloorForRule(dataRule.getFloorIds()); -// wxMerchant.setBusinessForRule(dataRule.getBussinessIds()); -// } -// wxMerchant.setOnlyOwe(EnumYesOrNo.YES.getCode()); -// EnumBillAllType btype = EnumBillAllType.getEnum(billType); -// if (null == btype) { -// return new ResultData(Result.ERROR,"分类非法"); -// } -// Date starttime = wxMerchant.getStarttime(); -// Date enttime = wxMerchant.getEndtime(); -// return new ResultData(billAllHelper.getBillSum(btype, wxMerchant,starttime,enttime)); -// } + @GetMapping("oweBillHot") + public ResultData oweBillHot() { + return new ResultData(getHots(null)); + } + + //临期 + @GetMapping("nearBillHot") + public ResultData nearBillHot() { + SysConfig lqconfig = sysConfigService.getByKey(SysConfigConstant.bill_near_days, getTenantInfo()); + Integer nearBillBeforeDays = Constant.bill_near_default_days ; + if (null != lqconfig) { + nearBillBeforeDays = Integer.parseInt(lqconfig.getConfigItemValue()); + } + return new ResultData(getHots(nearBillBeforeDays)); + } + + private List getHots(Integer nearBillBeforeDays) { + WxMerchant wxMerchant = new WxMerchant(); + wxMerchant.updateTenantInfo(getTenantInfo()); + WxUserDataRule dataRule = this.getCurrentDataFloors(); + if (null != dataRule) { + wxMerchant.setFloorForRule(dataRule.getFloorIds()); + wxMerchant.setBusinessForRule(dataRule.getBussinessIds()); + } + SysConfig config = sysConfigService.getByKey(SysConfigConstant.bill_before_days, getTenantInfo()); + Integer oweBillBeforeDays = 0 ; + if (null != config) { + oweBillBeforeDays = Integer.parseInt(config.getConfigItemValue()); + } + wxMerchant.setOweBillBeforeDays(oweBillBeforeDays); + wxMerchant.setNearBillBeforeDays(nearBillBeforeDays); + return billAllHelper.getHotNotify(wxMerchant); + } /** * 欠缴账单统计 @@ -284,20 +314,48 @@ public class WxBillAllController extends BaseController { if (null == billType) { return new ResultData(Result.ERROR,"请选择分类"); } + EnumBillAllType btype = EnumBillAllType.getEnum(billType); + if (null == btype) { + return new ResultData(Result.ERROR,"分类非法"); + } + return new ResultData(getBillSum(wxMerchant, btype, null)); + } + + //临期账单金额 + @GetMapping("nearBillSum") + public ResultData nearBillSum(@ModelAttribute WxMerchant wxMerchant,Integer billType) { + if (null == billType) { + return new ResultData(Result.ERROR,"请选择分类"); + } + EnumBillAllType btype = EnumBillAllType.getEnum(billType); + if (null == btype) { + return new ResultData(Result.ERROR,"分类非法"); + } + SysConfig lqconfig = sysConfigService.getByKey(SysConfigConstant.bill_near_days, getTenantInfo()); + Integer nearBillBeforeDays = Constant.bill_near_default_days ; + if (null != lqconfig) { + nearBillBeforeDays = Integer.parseInt(lqconfig.getConfigItemValue()); + } + return new ResultData(getBillSum(wxMerchant, btype, nearBillBeforeDays)); + } + + private WxBillSum getBillSum(WxMerchant wxMerchant,EnumBillAllType btype,Integer nearBillBeforeDays) { wxMerchant.updateTenantInfo(getTenantInfo()); WxUserDataRule dataRule = this.getCurrentDataFloors(); if (null != dataRule) { wxMerchant.setFloorForRule(dataRule.getFloorIds()); wxMerchant.setBusinessForRule(dataRule.getBussinessIds()); } - wxMerchant.setOnlyOwe(EnumYesOrNo.YES.getCode()); - EnumBillAllType btype = EnumBillAllType.getEnum(billType); - if (null == btype) { - return new ResultData(Result.ERROR,"分类非法"); + SysConfig config = sysConfigService.getByKey(SysConfigConstant.bill_before_days, getTenantInfo()); + Integer oweBillBeforeDays = 0 ; + if (null != config) { + oweBillBeforeDays = Integer.parseInt(config.getConfigItemValue()); } + wxMerchant.setOweBillBeforeDays(oweBillBeforeDays); + wxMerchant.setNearBillBeforeDays(nearBillBeforeDays); Date starttime = wxMerchant.getStarttime(); Date enttime = wxMerchant.getEndtime(); - return new ResultData(billAllHelper.getBillSum(btype, wxMerchant,starttime,enttime)); + return billAllHelper.getBillSum(btype, wxMerchant,starttime,enttime); } /** @@ -315,18 +373,49 @@ public class WxBillAllController extends BaseController { if (null == billType) { return new ResultData(Result.ERROR,"请选择分类"); } + EnumBillAllType btype = EnumBillAllType.getEnum(billType); + if (null == btype) { + return new ResultData(Result.ERROR,"分类非法"); + } + return new ResultData(getBillList(wxMerchant, btype, null, pageNum, pageSize)); + } + + @GetMapping("nearBillList") + @ApiImplicitParams({ + @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), + @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) + public ResultData nearBillList(@ModelAttribute WxMerchant wxMerchant,Integer billType, Integer pageNum, Integer pageSize) { + if (null == billType) { + return new ResultData(Result.ERROR,"请选择分类"); + } + EnumBillAllType btype = EnumBillAllType.getEnum(billType); + if (null == btype) { + return new ResultData(Result.ERROR,"分类非法"); + } + SysConfig lqconfig = sysConfigService.getByKey(SysConfigConstant.bill_near_days, getTenantInfo()); + Integer nearBillBeforeDays = Constant.bill_near_default_days ; + if (null != lqconfig) { + nearBillBeforeDays = Integer.parseInt(lqconfig.getConfigItemValue()); + } + return new ResultData(getBillList(wxMerchant, btype, nearBillBeforeDays, pageNum, pageSize)); + } + + private PageInfo getBillList(WxMerchant wxMerchant,EnumBillAllType btype,Integer nearBillBeforeDays, Integer pageNum, Integer pageSize) { wxMerchant.updateTenantInfo(getTenantInfo()); WxUserDataRule dataRule = this.getCurrentDataFloors(); if (null != dataRule) { wxMerchant.setFloorForRule(dataRule.getFloorIds()); wxMerchant.setBusinessForRule(dataRule.getBussinessIds()); } - wxMerchant.setOnlyOwe(EnumYesOrNo.YES.getCode()); - EnumBillAllType btype = EnumBillAllType.getEnum(billType); - if (null == btype) { - return new ResultData(Result.ERROR,"分类非法"); + SysConfig config = sysConfigService.getByKey(SysConfigConstant.bill_before_days, getTenantInfo()); + Integer oweBillBeforeDays = 0 ; + if (null != config) { + oweBillBeforeDays = Integer.parseInt(config.getConfigItemValue()); } - return new ResultData(billAllHelper.getBillList(btype, wxMerchant,pageNum,pageSize)); + wxMerchant.setOweBillBeforeDays(oweBillBeforeDays); + wxMerchant.setNearBillBeforeDays(nearBillBeforeDays); + + return billAllHelper.getBillList(btype, wxMerchant,pageNum,pageSize); } /** @@ -341,19 +430,37 @@ public class WxBillAllController extends BaseController { if (null == billType) { return ; } - wxMerchant.updateTenantInfo(getTenantInfo()); - WxUserDataRule dataRule = this.getCurrentDataFloors(); - if (null != dataRule) { - wxMerchant.setFloorForRule(dataRule.getFloorIds()); - wxMerchant.setBusinessForRule(dataRule.getBussinessIds()); - } - wxMerchant.setOnlyOwe(EnumYesOrNo.YES.getCode()); EnumBillAllType btype = EnumBillAllType.getEnum(billType); if (null == btype) { return ; } - PageInfo page = billAllHelper.getBillList(btype, wxMerchant,1,10000); - excelService.exportExcel(page.getList(), null, "商户账单总览数据", WxBillBaseEntity.class, "商户欠缴账单_"+btype.getMessage()+".xlsx", response, false); + PageInfo page = getBillList(wxMerchant, btype, null, 1, 10000); + if (null == page) { + return; + } + excelService.exportExcel(page.getList(), null, "逾期账单列表", WxBillBaseEntity.class, "商户欠缴账单_"+btype.getMessage()+".xlsx", response, false); + } + + //临期 + @GetMapping("exportNearBillList") + public void exportNearBillList(@ModelAttribute WxMerchant wxMerchant,Integer billType, HttpServletRequest request, HttpServletResponse response) { + if (null == billType) { + return ; + } + EnumBillAllType btype = EnumBillAllType.getEnum(billType); + if (null == btype) { + return ; + } + SysConfig lqconfig = sysConfigService.getByKey(SysConfigConstant.bill_near_days, getTenantInfo()); + Integer nearBillBeforeDays = Constant.bill_near_default_days ; + if (null != lqconfig) { + nearBillBeforeDays = Integer.parseInt(lqconfig.getConfigItemValue()); + } + PageInfo page = getBillList(wxMerchant, btype, nearBillBeforeDays, 1, 10000); + if (null == page) { + return; + } + excelService.exportExcel(page.getList(), null, "临期账单列表", WxBillBaseEntity.class, "商户临期账单_"+btype.getMessage()+".xlsx", response, false); } /** @@ -376,7 +483,24 @@ public class WxBillAllController extends BaseController { if (null == bill) { return; } - billAllHelper.exportOneBillOweWord(bill, request, response); + billAllHelper.exportOneBillOweWord(true,bill, request, response); + } + + //临期 + @GetMapping("exportOneNearBill") + public void exportOneNearBill(Long id,Integer billType, HttpServletRequest request, HttpServletResponse response) { + if (null == billType) { + return ; + } + EnumBillAllType btype = EnumBillAllType.getEnum(billType); + if (null == btype) { + return ; + } + WxBillBaseEntity bill = billAllHelper.getOneBill(getTenantInfo(), btype, id); + if (null == bill) { + return; + } + billAllHelper.exportOneBillOweWord(false,bill, request, response); } //###################################### 老代码 ###################################### diff --git a/mallinkSchedule/src/main/java/com/iformall/schedule/LatePayBillActionSchedule.java b/mallinkSchedule/src/main/java/com/iformall/schedule/LatePayBillActionSchedule.java index 1eac36b92..a72bc2514 100644 --- a/mallinkSchedule/src/main/java/com/iformall/schedule/LatePayBillActionSchedule.java +++ b/mallinkSchedule/src/main/java/com/iformall/schedule/LatePayBillActionSchedule.java @@ -34,8 +34,8 @@ public class LatePayBillActionSchedule { wxBillPropertyMapper.autoAddLatePayPrice(); //修改欠缴 - wxBillRentMapper.updateOwe(); - wxBillPropertyMapper.updateOwe(); + //wxBillRentMapper.updateOwe(); + //wxBillPropertyMapper.updateOwe(); logger.info("账单滞纳金更新结束"); }catch (Exception e){ diff --git a/mallinkService/src/main/java/com/iformall/common/SysConfigConstant.java b/mallinkService/src/main/java/com/iformall/common/SysConfigConstant.java index 220c4e39a..aaf5c21ac 100644 --- a/mallinkService/src/main/java/com/iformall/common/SysConfigConstant.java +++ b/mallinkService/src/main/java/com/iformall/common/SysConfigConstant.java @@ -10,5 +10,6 @@ public class SysConfigConstant { public static final String member_seconds_key="memberSeconds"; public static final String merchant_credit_locked="merchantCreditLocked"; public static final String merchant_Login_CheckPhone = "merchantLoginCheckPhone"; - + public static final String bill_before_days = "billBeforeDays"; + public static final String bill_near_days = "billNearDays"; } diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxBillDaily.java b/mallinkService/src/main/java/com/iformall/domain/po/WxBillDaily.java index 30bbe0a0b..3a3b593db 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxBillDaily.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxBillDaily.java @@ -48,8 +48,6 @@ public class WxBillDaily extends WxBillBaseEntity { @io.swagger.annotations.ApiModelProperty(value="逾期天数",name="expiredDay") private Long expiredDay; - @io.swagger.annotations.ApiModelProperty(value = "账单状态1欠缴2待缴3已结清4未到期", name = "status") - private Integer status; @io.swagger.annotations.ApiModelProperty(value = "账单审核状态EnumBillRentApplyStatus", name = "applyStatus") private Integer applyStatus; @io.swagger.annotations.ApiModelProperty(value = "付款截图", name = "applyPayImg") diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxBillDeposit.java b/mallinkService/src/main/java/com/iformall/domain/po/WxBillDeposit.java index c655f4b2c..237b310c6 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxBillDeposit.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxBillDeposit.java @@ -34,9 +34,6 @@ public class WxBillDeposit extends WxBillBaseEntity { private Date createtime; @io.swagger.annotations.ApiModelProperty(value="逾期天数",name="expiredDay") private Long expiredDay; - - @io.swagger.annotations.ApiModelProperty(value = "账单状态1欠缴2待缴3已结清4未到期5已退还", name = "status") - private Integer status; @io.swagger.annotations.ApiModelProperty(value = "账单审核状态EnumBillRentApplyStatus", name = "applyStatus") private Integer applyStatus; @io.swagger.annotations.ApiModelProperty(value = "付款截图", name = "applyPayImg") diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxBillOther.java b/mallinkService/src/main/java/com/iformall/domain/po/WxBillOther.java index 39dd66a64..beca818a2 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxBillOther.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxBillOther.java @@ -52,9 +52,6 @@ public class WxBillOther extends WxBillBaseEntity { @io.swagger.annotations.ApiModelProperty(value="逾期天数",name="expiredDay") private Long expiredDay; - @Excel(name = "状态", replace = {"欠缴_1", "待缴_2", "已结清_3", "未到期_4", "已退还_5", "失效_6"}, width = 20, orderNum = "9") - @io.swagger.annotations.ApiModelProperty(value = "账单状态1欠缴2待缴3已结清4未到期", name = "status") - private Integer status; @io.swagger.annotations.ApiModelProperty(value = "账单审核状态EnumBillRentApplyStatus", name = "applyStatus") private Integer applyStatus; @io.swagger.annotations.ApiModelProperty(value = "付款截图", name = "applyPayImg") diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxBillOtherDeposit.java b/mallinkService/src/main/java/com/iformall/domain/po/WxBillOtherDeposit.java index b38dfdb19..9138190a9 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxBillOtherDeposit.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxBillOtherDeposit.java @@ -45,9 +45,6 @@ public class WxBillOtherDeposit extends WxBillBaseEntity { @io.swagger.annotations.ApiModelProperty(value = "逾期天数", name = "expiredDay") private Long expiredDay; - @Excel(name = "状态", replace = {"欠缴_1", "待缴_2", "已结清_3", "未到期_4", "已退还_5", "失效_6"}, width = 20, orderNum = "8") - @io.swagger.annotations.ApiModelProperty(value = "账单状态1欠缴2待缴3已结清4未到期5已退还", name = "status") - private Integer status; @io.swagger.annotations.ApiModelProperty(value = "账单审核状态EnumBillRentApplyStatus", name = "applyStatus") private Integer applyStatus; @io.swagger.annotations.ApiModelProperty(value = "付款截图", name = "applyPayImg") diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxBillProperty.java b/mallinkService/src/main/java/com/iformall/domain/po/WxBillProperty.java index 55420db31..61a1239fb 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxBillProperty.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxBillProperty.java @@ -48,10 +48,6 @@ public class WxBillProperty extends WxBillBaseEntity { @Excel(name = "逾期(天) ", width = 20, orderNum = "13") @io.swagger.annotations.ApiModelProperty(value="逾期天数",name="expiredDay") private Long expiredDay; - - @Excel(name = "状态", replace = {"欠缴_1", "待缴_2", "已结清_3", "未到期_4", "已退还_5", "失效_6"}, width = 20, orderNum = "8") - @io.swagger.annotations.ApiModelProperty(value = "账单状态1欠缴2待缴3已结清4未到期", name = "status") - private Integer status; @io.swagger.annotations.ApiModelProperty(value = "账单审核状态EnumBillRentApplyStatus", name = "applyStatus") private Integer applyStatus; @io.swagger.annotations.ApiModelProperty(value = "付款截图", name = "applyPayImg") diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxBillPropertyDeposit.java b/mallinkService/src/main/java/com/iformall/domain/po/WxBillPropertyDeposit.java index 0ed319078..1d555f78f 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxBillPropertyDeposit.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxBillPropertyDeposit.java @@ -34,8 +34,6 @@ public class WxBillPropertyDeposit extends WxBillBaseEntity { private Date createtime; @io.swagger.annotations.ApiModelProperty(value="逾期天数",name="expiredDay") private Long expiredDay; - @io.swagger.annotations.ApiModelProperty(value = "账单状态1欠缴2待缴3已结清4未到期5已退还", name = "status") - private Integer status; @io.swagger.annotations.ApiModelProperty(value = "账单审核状态EnumBillRentApplyStatus", name = "applyStatus") private Integer applyStatus; @io.swagger.annotations.ApiModelProperty(value = "付款截图", name = "applyPayImg") diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxBillRent.java b/mallinkService/src/main/java/com/iformall/domain/po/WxBillRent.java index 3aead2634..476b810d8 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxBillRent.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxBillRent.java @@ -48,10 +48,6 @@ public class WxBillRent extends WxBillBaseEntity { @io.swagger.annotations.ApiModelProperty(value="逾期天数",name="expiredDay") private Long expiredDay; - @Excel(name = "状态", replace = {"欠缴_1", "待缴_2", "已结清_3", "未到期_4", "已退还_5", "失效_6"}, width = 20, orderNum = "10") - @io.swagger.annotations.ApiModelProperty(value = "账单状态1欠缴2待缴3已结清4未到期EnumBillRentStatus", name = "status") - private Integer status; - @io.swagger.annotations.ApiModelProperty(value = "账单审核状态EnumBillRentApplyStatus", name = "applyStatus") private Integer applyStatus; @io.swagger.annotations.ApiModelProperty(value = "付款截图", name = "applyPayImg") diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxBillRentManage.java b/mallinkService/src/main/java/com/iformall/domain/po/WxBillRentManage.java index d63f2b853..e284f3f2f 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxBillRentManage.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxBillRentManage.java @@ -49,10 +49,6 @@ public class WxBillRentManage extends WxBillBaseEntity { @io.swagger.annotations.ApiModelProperty(value="逾期天数",name="expiredDay") private Long expiredDay; - @Excel(name = "状态", replace = {"欠缴_1", "待缴_2", "已结清_3", "未到期_4", "已退还_5", "失效_6"}, width = 20, orderNum = "10") - @io.swagger.annotations.ApiModelProperty(value = "账单状态1欠缴2待缴3已结清4未到期", name = "status") - private Integer status; - @io.swagger.annotations.ApiModelProperty(value = "账单审核状态EnumBillRentApplyStatus", name = "applyStatus") private Integer applyStatus; @io.swagger.annotations.ApiModelProperty(value = "付款截图", name = "applyPayImg") diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxMerchant.java b/mallinkService/src/main/java/com/iformall/domain/po/WxMerchant.java index 94a97394a..c79a96c06 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxMerchant.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxMerchant.java @@ -444,8 +444,17 @@ public class WxMerchant extends TenantEntity { @TableField(exist = false) private String initLog; + @TableField(exist = false) private Integer onlyOwe; + //账单逾期计算提前天数 + @TableField(exist = false) + private Integer oweBillBeforeDays; + + //临期计算提前天数 + @TableField(exist = false) + private Integer nearBillBeforeDays; + } diff --git a/mallinkService/src/main/java/com/iformall/domain/po/base/WxBillBaseEntity.java b/mallinkService/src/main/java/com/iformall/domain/po/base/WxBillBaseEntity.java index 17f5e26e9..5a4e39676 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/base/WxBillBaseEntity.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/base/WxBillBaseEntity.java @@ -57,8 +57,16 @@ public class WxBillBaseEntity extends TenantEntity { protected Date endtimeEnd; @Excel(name = "欠缴金额(元)", width = 20, orderNum = "11") - @io.swagger.annotations.ApiModelProperty(value="欠缴",name="owe") + @TableField(exist = false) protected String owe; + + public String getOwe() { + return new BigDecimal(receivePay).subtract(new BigDecimal(pay)).toPlainString(); + } + + @Excel(name = "状态", replace = {"欠缴_1", "待缴_2", "已结清_3", "未到期_4", "已退还_5", "失效_6"}, width = 20, orderNum = "10") + @io.swagger.annotations.ApiModelProperty(value = "账单状态EnumBillStatus", name = "status") + protected Integer status; //@Excel(name = "实际应收总金额(元)", width = 20, orderNum = "8") @io.swagger.annotations.ApiModelProperty(value="实际应收金额(加上了滞纳金服务费等费用)",name="realReceivePay") @@ -87,7 +95,15 @@ public class WxBillBaseEntity extends TenantEntity { @TableField(exist = false) protected String month; +// @TableField(exist = false) +// protected Integer onlyOwe; + + //账单逾期计算提前天数 + @TableField(exist = false) + private Integer oweBillBeforeDays; + + //临期计算提前天数 @TableField(exist = false) - protected Integer onlyOwe; + private Integer nearBillBeforeDays; } diff --git a/mallinkService/src/main/java/com/iformall/domain/vo/WxBillHotNotify.java b/mallinkService/src/main/java/com/iformall/domain/vo/WxBillHotNotify.java index 8f38c2fc6..e445dd3a9 100644 --- a/mallinkService/src/main/java/com/iformall/domain/vo/WxBillHotNotify.java +++ b/mallinkService/src/main/java/com/iformall/domain/vo/WxBillHotNotify.java @@ -13,8 +13,6 @@ public class WxBillHotNotify implements Serializable { private static final long serialVersionUID = 1L; - //EnumBillAllType; - private Integer billType; private String billTypeName; private Integer totalCount = 0; private String totalMoney = "0"; diff --git a/mallinkService/src/main/java/com/iformall/domain/vo/WxBillSum.java b/mallinkService/src/main/java/com/iformall/domain/vo/WxBillSum.java index 9c1f231c2..0b1f2beae 100644 --- a/mallinkService/src/main/java/com/iformall/domain/vo/WxBillSum.java +++ b/mallinkService/src/main/java/com/iformall/domain/vo/WxBillSum.java @@ -22,6 +22,7 @@ public class WxBillSum implements Serializable { @TableField(exist = false) private BigDecimal paidNumber; //欠款 + @TableField(exist = false) private String owe = "0"; @TableField(exist = false) private BigDecimal oweNumber; @@ -44,7 +45,11 @@ public class WxBillSum implements Serializable { return paidNumber; } + public String getOwe() { + return new BigDecimal(needPay).subtract(new BigDecimal(paid)).toPlainString(); + } public BigDecimal getOweNumber() { + this.owe = getOwe(); if (StringUtils.isNotBlank(owe)) { this.oweNumber = new BigDecimal(owe).setScale(2, RoundingMode.HALF_UP); }else { diff --git a/mallinkService/src/main/java/com/iformall/enums/EnumBillDailyStatus.java b/mallinkService/src/main/java/com/iformall/enums/EnumBillDailyStatus.java deleted file mode 100644 index c83a52f78..000000000 --- a/mallinkService/src/main/java/com/iformall/enums/EnumBillDailyStatus.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.iformall.enums; - - -/** - * @author gongbiao - */ - -public enum EnumBillDailyStatus { - - NOT_PAID(1, "欠缴"), - WAIT_PAY(2,"待缴"), - PAID(3, "已结清"), - NOT_EXPIRED(4,"未到期"), - RETURN(5, "退还"), - ; - - public static EnumBillDailyStatus getEnum(Integer code) { - for (EnumBillDailyStatus value : values()) { - if (value.getCode().equals(code)) { - return value; - } - } - return null; - } - - private Integer code; - private String message; - - EnumBillDailyStatus(Integer code, String message) { - this.code = code; - this.message = message; - } - - public Integer getCode() { - return code; - } - - public String getMessage() { - return message; - } -} diff --git a/mallinkService/src/main/java/com/iformall/enums/EnumBillRentStatus.java b/mallinkService/src/main/java/com/iformall/enums/EnumBillStatus.java similarity index 75% rename from mallinkService/src/main/java/com/iformall/enums/EnumBillRentStatus.java rename to mallinkService/src/main/java/com/iformall/enums/EnumBillStatus.java index a9c36a0ff..968da8d3a 100644 --- a/mallinkService/src/main/java/com/iformall/enums/EnumBillRentStatus.java +++ b/mallinkService/src/main/java/com/iformall/enums/EnumBillStatus.java @@ -5,7 +5,7 @@ package com.iformall.enums; * @author gongbiao */ -public enum EnumBillRentStatus { +public enum EnumBillStatus { NOT_PAID(1, "欠缴"), WAIT_PAY(2,"待缴"), PAID(3, "已结清"), @@ -14,8 +14,8 @@ public enum EnumBillRentStatus { INVALID(6, "失效"), ; - public static EnumBillRentStatus getEnum(Integer code) { - for (EnumBillRentStatus value : values()) { + public static EnumBillStatus getEnum(Integer code) { + for (EnumBillStatus value : values()) { if (value.getCode().equals(code)) { return value; } @@ -26,7 +26,7 @@ public enum EnumBillRentStatus { private Integer code; private String message; - EnumBillRentStatus(Integer code, String message) { + EnumBillStatus(Integer code, String message) { this.code = code; this.message = message; } diff --git a/mallinkService/src/main/java/com/iformall/mapper/WxBillDailyMapper.java b/mallinkService/src/main/java/com/iformall/mapper/WxBillDailyMapper.java index 26f3c7c6c..7ad0ad6c8 100644 --- a/mallinkService/src/main/java/com/iformall/mapper/WxBillDailyMapper.java +++ b/mallinkService/src/main/java/com/iformall/mapper/WxBillDailyMapper.java @@ -3,6 +3,7 @@ package com.iformall.mapper; import com.iformall.common.CommonMapper; import com.iformall.domain.po.WxBillDaily; import com.iformall.domain.po.WxBillRent; +import com.iformall.domain.vo.WxBillHotNotify; import com.iformall.domain.vo.WxBillSum; import java.util.List; @@ -24,5 +25,7 @@ public interface WxBillDailyMapper extends CommonMapper { WxBillSum getBillMonthSum(WxBillDaily record); List getMerchantIdList(WxBillDaily record); + + WxBillHotNotify getBillHotNotify(WxBillDaily record); } diff --git a/mallinkService/src/main/java/com/iformall/mapper/WxBillDepositMapper.java b/mallinkService/src/main/java/com/iformall/mapper/WxBillDepositMapper.java index 0575ceb62..4e167d4ae 100644 --- a/mallinkService/src/main/java/com/iformall/mapper/WxBillDepositMapper.java +++ b/mallinkService/src/main/java/com/iformall/mapper/WxBillDepositMapper.java @@ -5,6 +5,7 @@ import com.iformall.common.CommonMapper; import com.iformall.domain.po.WxBillDeposit; import com.iformall.domain.po.WxBillRent; import com.iformall.domain.po.WxRentContract; +import com.iformall.domain.vo.WxBillHotNotify; import com.iformall.domain.vo.WxBillSum; import java.util.List; @@ -36,4 +37,6 @@ public interface WxBillDepositMapper extends CommonMapper { List getMerchantIdList(WxBillDeposit wxBillDeposit); + WxBillHotNotify getBillHotNotify(WxBillDeposit wxBillDeposit); + } diff --git a/mallinkService/src/main/java/com/iformall/mapper/WxBillOtherDepositMapper.java b/mallinkService/src/main/java/com/iformall/mapper/WxBillOtherDepositMapper.java index 4ea60941e..0846bfea6 100644 --- a/mallinkService/src/main/java/com/iformall/mapper/WxBillOtherDepositMapper.java +++ b/mallinkService/src/main/java/com/iformall/mapper/WxBillOtherDepositMapper.java @@ -3,6 +3,7 @@ package com.iformall.mapper; import com.iformall.common.CommonMapper; import com.iformall.domain.po.WxBillOtherDeposit; import com.iformall.domain.po.WxBillRent; +import com.iformall.domain.vo.WxBillHotNotify; import com.iformall.domain.vo.WxBillSum; import java.util.List; @@ -24,5 +25,7 @@ public interface WxBillOtherDepositMapper extends CommonMapper getMerchantIdList(WxBillOtherDeposit record); + + WxBillHotNotify getBillHotNotify(WxBillOtherDeposit record); } diff --git a/mallinkService/src/main/java/com/iformall/mapper/WxBillOtherMapper.java b/mallinkService/src/main/java/com/iformall/mapper/WxBillOtherMapper.java index fcb53b5c6..75af43b6f 100644 --- a/mallinkService/src/main/java/com/iformall/mapper/WxBillOtherMapper.java +++ b/mallinkService/src/main/java/com/iformall/mapper/WxBillOtherMapper.java @@ -3,6 +3,7 @@ package com.iformall.mapper; import com.iformall.common.CommonMapper; import com.iformall.domain.po.WxBillOther; import com.iformall.domain.po.WxBillRent; +import com.iformall.domain.vo.WxBillHotNotify; import com.iformall.domain.vo.WxBillSum; import java.util.List; @@ -28,4 +29,6 @@ public interface WxBillOtherMapper extends CommonMapper { WxBillSum getBillMonthSum(WxBillOther record); List getMerchantIdList(WxBillOther record); + + WxBillHotNotify getBillHotNotify(WxBillOther record); } diff --git a/mallinkService/src/main/java/com/iformall/mapper/WxBillPropertyDepositMapper.java b/mallinkService/src/main/java/com/iformall/mapper/WxBillPropertyDepositMapper.java index 4f52b87d7..992cf9deb 100644 --- a/mallinkService/src/main/java/com/iformall/mapper/WxBillPropertyDepositMapper.java +++ b/mallinkService/src/main/java/com/iformall/mapper/WxBillPropertyDepositMapper.java @@ -4,6 +4,7 @@ import com.iformall.common.CommonMapper; import com.iformall.domain.po.WxBillPropertyDeposit; import com.iformall.domain.po.WxBillRent; import com.iformall.domain.po.WxPropertyContract; +import com.iformall.domain.vo.WxBillHotNotify; import com.iformall.domain.vo.WxBillSum; import java.util.List; @@ -31,4 +32,6 @@ public interface WxBillPropertyDepositMapper extends CommonMapper getMerchantIdList(WxBillPropertyDeposit wxBillPropertyDeposit); + + WxBillHotNotify getBillHotNotify(WxBillPropertyDeposit wxBillPropertyDeposit); } diff --git a/mallinkService/src/main/java/com/iformall/mapper/WxBillPropertyMapper.java b/mallinkService/src/main/java/com/iformall/mapper/WxBillPropertyMapper.java index 75524febf..285d61b83 100644 --- a/mallinkService/src/main/java/com/iformall/mapper/WxBillPropertyMapper.java +++ b/mallinkService/src/main/java/com/iformall/mapper/WxBillPropertyMapper.java @@ -6,6 +6,7 @@ import com.iformall.domain.po.WxBillRent; import com.iformall.domain.po.WxPayAccountBill; import com.iformall.domain.po.WxPropertyContract; import com.iformall.domain.po.WxRentContract; +import com.iformall.domain.vo.WxBillHotNotify; import com.iformall.domain.vo.WxBillSum; import java.util.List; @@ -62,11 +63,13 @@ public interface WxBillPropertyMapper extends CommonMapper void updateServiceCharge(WxPayAccountBill tenantId); - void updateOwe(); + //void updateOwe(); WxBillSum getBillMonthSum(WxBillProperty propertyQuery); List getMerchantIdList(WxBillProperty propertyQuery); + WxBillHotNotify getBillHotNotify(WxBillProperty propertyQuery); + } diff --git a/mallinkService/src/main/java/com/iformall/mapper/WxBillRentManageMapper.java b/mallinkService/src/main/java/com/iformall/mapper/WxBillRentManageMapper.java index 082167fbb..70c2799c6 100644 --- a/mallinkService/src/main/java/com/iformall/mapper/WxBillRentManageMapper.java +++ b/mallinkService/src/main/java/com/iformall/mapper/WxBillRentManageMapper.java @@ -3,6 +3,7 @@ package com.iformall.mapper; import com.iformall.common.CommonMapper; import com.iformall.domain.po.WxBillRent; import com.iformall.domain.po.WxBillRentManage; +import com.iformall.domain.vo.WxBillHotNotify; import com.iformall.domain.vo.WxBillSum; import org.apache.ibatis.annotations.Param; @@ -35,5 +36,7 @@ public interface WxBillRentManageMapper extends CommonMapper getMerchantIdList(WxBillRentManage wxBillRentManage); + + WxBillHotNotify getBillHotNotify(WxBillRentManage wxBillRentManage); } diff --git a/mallinkService/src/main/java/com/iformall/mapper/WxBillRentMapper.java b/mallinkService/src/main/java/com/iformall/mapper/WxBillRentMapper.java index 864e4e8bf..8fd920b64 100644 --- a/mallinkService/src/main/java/com/iformall/mapper/WxBillRentMapper.java +++ b/mallinkService/src/main/java/com/iformall/mapper/WxBillRentMapper.java @@ -4,6 +4,7 @@ import com.iformall.common.CommonMapper; import com.iformall.domain.po.WxBillRent; import com.iformall.domain.po.WxPayAccountBill; import com.iformall.domain.po.WxRentContract; +import com.iformall.domain.vo.WxBillHotNotify; import com.iformall.domain.vo.WxBillSum; import org.apache.ibatis.annotations.Param; @@ -59,10 +60,12 @@ public interface WxBillRentMapper extends CommonMapper { void updateServiceCharge(WxPayAccountBill record); - void updateOwe(); + //void updateOwe(); WxBillSum getBillMonthSum(WxBillRent wxBillRent); List getMerchantIdList(WxBillRent wxBillRent); + + WxBillHotNotify getBillHotNotify(WxBillRent wxBillRent); } diff --git a/mallinkService/src/main/java/com/iformall/service/WxBillDailyService.java b/mallinkService/src/main/java/com/iformall/service/WxBillDailyService.java index 394bf264f..460d7c826 100644 --- a/mallinkService/src/main/java/com/iformall/service/WxBillDailyService.java +++ b/mallinkService/src/main/java/com/iformall/service/WxBillDailyService.java @@ -7,6 +7,7 @@ import com.iformall.domain.po.WxBillDaily; import com.iformall.domain.po.WxBillRent; import com.iformall.domain.po.base.TenantEntity; import com.iformall.domain.vo.WxBillDailyVo; +import com.iformall.domain.vo.WxBillHotNotify; import com.iformall.domain.vo.WxBillSum; import java.util.List; @@ -66,5 +67,7 @@ public interface WxBillDailyService { WxBillSum getBillMonthSum(WxBillDaily wxBillDaily); List getMerchantIds(WxBillDaily wxBillDaily); + + WxBillHotNotify getBillHotNotify(WxBillDaily wxBillDaily); } diff --git a/mallinkService/src/main/java/com/iformall/service/WxBillDepositService.java b/mallinkService/src/main/java/com/iformall/service/WxBillDepositService.java index 2c31c006f..f8cc56de7 100644 --- a/mallinkService/src/main/java/com/iformall/service/WxBillDepositService.java +++ b/mallinkService/src/main/java/com/iformall/service/WxBillDepositService.java @@ -8,6 +8,7 @@ import com.iformall.domain.po.MallUserInfo; import com.iformall.domain.po.WxBillDeposit; import com.iformall.domain.po.WxBillRent; import com.iformall.domain.po.WxPayAccountBill; +import com.iformall.domain.vo.WxBillHotNotify; import com.iformall.domain.vo.WxBillSum; public interface WxBillDepositService { @@ -59,5 +60,7 @@ public interface WxBillDepositService { WxBillSum getBillMonthSum(WxBillDeposit wxBillDeposit); List getMerchantIds(WxBillDeposit wxBillDeposit); + + WxBillHotNotify getBillHotNotify(WxBillDeposit wxBillDeposit); } diff --git a/mallinkService/src/main/java/com/iformall/service/WxBillOtherDepositService.java b/mallinkService/src/main/java/com/iformall/service/WxBillOtherDepositService.java index 7df785003..486c70696 100644 --- a/mallinkService/src/main/java/com/iformall/service/WxBillOtherDepositService.java +++ b/mallinkService/src/main/java/com/iformall/service/WxBillOtherDepositService.java @@ -6,6 +6,7 @@ import com.iformall.domain.po.MallUserInfo; import com.iformall.domain.po.WxBillOtherDeposit; import com.iformall.domain.po.WxBillRent; import com.iformall.domain.po.base.TenantEntity; +import com.iformall.domain.vo.WxBillHotNotify; import com.iformall.domain.vo.WxBillSum; import java.util.List; @@ -65,5 +66,7 @@ public interface WxBillOtherDepositService { WxBillSum getBillMonthSum(WxBillOtherDeposit wxBillDeposit); List getMerchantIds(WxBillOtherDeposit wxBillDeposit); + + WxBillHotNotify getBillHotNotify(WxBillOtherDeposit wxBillDeposit); } diff --git a/mallinkService/src/main/java/com/iformall/service/WxBillOtherService.java b/mallinkService/src/main/java/com/iformall/service/WxBillOtherService.java index f666fa798..303cc52bb 100644 --- a/mallinkService/src/main/java/com/iformall/service/WxBillOtherService.java +++ b/mallinkService/src/main/java/com/iformall/service/WxBillOtherService.java @@ -6,6 +6,7 @@ import com.iformall.domain.po.MallUserInfo; import com.iformall.domain.po.WxBillOther; import com.iformall.domain.po.WxBillRent; import com.iformall.domain.po.base.TenantEntity; +import com.iformall.domain.vo.WxBillHotNotify; import com.iformall.domain.vo.WxBillSum; import java.util.List; @@ -61,5 +62,7 @@ public interface WxBillOtherService { WxBillSum getBillMonthSum(WxBillOther wxBillOther); List getMerchantIds(WxBillOther wxBillOther); + + WxBillHotNotify getBillHotNotify(WxBillOther wxBillOther); } diff --git a/mallinkService/src/main/java/com/iformall/service/WxBillPropertyDepositService.java b/mallinkService/src/main/java/com/iformall/service/WxBillPropertyDepositService.java index 5a31434a4..2a89e8992 100644 --- a/mallinkService/src/main/java/com/iformall/service/WxBillPropertyDepositService.java +++ b/mallinkService/src/main/java/com/iformall/service/WxBillPropertyDepositService.java @@ -8,6 +8,7 @@ import com.iformall.domain.po.MallUserInfo; import com.iformall.domain.po.WxBillPropertyDeposit; import com.iformall.domain.po.WxBillRent; import com.iformall.domain.po.WxPayAccountBill; +import com.iformall.domain.vo.WxBillHotNotify; import com.iformall.domain.vo.WxBillSum; /** @@ -62,4 +63,6 @@ public interface WxBillPropertyDepositService { WxBillSum getBillMonthSum(WxBillPropertyDeposit deposit); List getMerchantIds(WxBillPropertyDeposit deposit); + + WxBillHotNotify getBillHotNotify(WxBillPropertyDeposit deposit); } diff --git a/mallinkService/src/main/java/com/iformall/service/WxBillPropertyService.java b/mallinkService/src/main/java/com/iformall/service/WxBillPropertyService.java index de1e1a31a..a8d5c8b51 100644 --- a/mallinkService/src/main/java/com/iformall/service/WxBillPropertyService.java +++ b/mallinkService/src/main/java/com/iformall/service/WxBillPropertyService.java @@ -6,6 +6,7 @@ import com.iformall.domain.po.MallUserInfo; import com.iformall.domain.po.WxBillProperty; import com.iformall.domain.po.WxBillRent; import com.iformall.domain.po.base.TenantEntity; +import com.iformall.domain.vo.WxBillHotNotify; import com.iformall.domain.vo.WxBillSum; import java.util.List; @@ -76,4 +77,6 @@ public interface WxBillPropertyService { WxBillSum getBillMonthSum(WxBillProperty wxBillProperty); List getMerchantIds(WxBillProperty wxBillProperty); + + WxBillHotNotify getBillHotNotify(WxBillProperty wxBillProperty); } diff --git a/mallinkService/src/main/java/com/iformall/service/WxBillRentManageService.java b/mallinkService/src/main/java/com/iformall/service/WxBillRentManageService.java index 1b9916924..4d1501433 100644 --- a/mallinkService/src/main/java/com/iformall/service/WxBillRentManageService.java +++ b/mallinkService/src/main/java/com/iformall/service/WxBillRentManageService.java @@ -7,6 +7,7 @@ import com.iformall.domain.po.WxBillRent; import com.iformall.domain.po.WxBillRentManage; import com.iformall.domain.po.WxPayAccountBill; import com.iformall.domain.po.base.TenantEntity; +import com.iformall.domain.vo.WxBillHotNotify; import com.iformall.domain.vo.WxBillSum; import java.util.List; @@ -73,4 +74,6 @@ public interface WxBillRentManageService { WxBillSum getBillMonthSum(WxBillRentManage wxBillRentManage); List getMerchantIds(WxBillRentManage wxBillRentManage); + + WxBillHotNotify getBillHotNotify(WxBillRentManage wxBillRentManage); } diff --git a/mallinkService/src/main/java/com/iformall/service/WxBillRentService.java b/mallinkService/src/main/java/com/iformall/service/WxBillRentService.java index a59f6d609..99d0e59c4 100644 --- a/mallinkService/src/main/java/com/iformall/service/WxBillRentService.java +++ b/mallinkService/src/main/java/com/iformall/service/WxBillRentService.java @@ -5,6 +5,7 @@ import com.iformall.common.ResultData; import com.iformall.domain.po.MallUserInfo; import com.iformall.domain.po.WxBillRent; import com.iformall.domain.po.base.TenantEntity; +import com.iformall.domain.vo.WxBillHotNotify; import com.iformall.domain.vo.WxBillSum; import java.util.List; @@ -77,5 +78,7 @@ public interface WxBillRentService { List getMerchantIds(WxBillRent wxBillRent); + WxBillHotNotify getBillHotNotify(WxBillRent wxBillRent); + } diff --git a/mallinkService/src/main/java/com/iformall/service/helper/WxBillAllHelper.java b/mallinkService/src/main/java/com/iformall/service/helper/WxBillAllHelper.java index 58ab26edd..d08bdc8b0 100644 --- a/mallinkService/src/main/java/com/iformall/service/helper/WxBillAllHelper.java +++ b/mallinkService/src/main/java/com/iformall/service/helper/WxBillAllHelper.java @@ -101,10 +101,11 @@ public class WxBillAllHelper { bill.setFloor(wxMerchant.getFloor()); bill.setMerchantName(wxMerchant.getName()); bill.setMerchantId(wxMerchant.getId()); - bill.setOnlyOwe(wxMerchant.getOnlyOwe()); bill.setStarttime(starttime); bill.setEndtime(enttime); bill.setRentShopType(wxMerchant.getType()); + bill.setOweBillBeforeDays(wxMerchant.getOweBillBeforeDays()); + bill.setNearBillBeforeDays(wxMerchant.getNearBillBeforeDays()); } public WxBillSum getBillRentSum(WxMerchant wxMerchant,Date starttime, Date enttime) { @@ -124,10 +125,16 @@ public class WxBillAllHelper { return wxBillRentService.getMerchantIds(br); } -// public WxBillHotNotify getBillRentHotNotify(WxMerchant wxMerchant,Date starttime, Date enttime) { -// WxBillRent br = new WxBillRent(); -// updateQueryParm(wxMerchant, br,starttime,enttime); -// } + public WxBillHotNotify getBillRentHotNotify(WxMerchant wxMerchant,Date starttime, Date enttime) { + WxBillRent br = new WxBillRent(); + updateQueryParm(wxMerchant, br,starttime,enttime); + WxBillHotNotify notify = wxBillRentService.getBillHotNotify(br); + if (null == notify) { + notify = new WxBillHotNotify(); + } + notify.setBillTypeName(EnumBillAllType.RENT.getMessage()); + return notify; + } public WxBillSum getBillRentManageSum(WxMerchant wxMerchant,Date starttime, Date enttime,EnumRentContractManageFeeType manageFeeType) { WxBillRentManage brm = new WxBillRentManage(); @@ -156,6 +163,21 @@ public class WxBillAllHelper { return wxBillRentManageService.getMerchantIds(brm); } + public WxBillHotNotify getBillRentManageHotNotify(WxMerchant wxMerchant,Date starttime, Date enttime,EnumRentContractManageFeeType manageFeeType) { + WxBillRentManage brm = new WxBillRentManage(); + updateQueryParm(wxMerchant, brm,starttime,enttime); + WxBillHotNotify notify = wxBillRentManageService.getBillHotNotify(brm); + if (null == notify) { + notify = new WxBillHotNotify(); + } + if (null != manageFeeType) { + notify.setBillTypeName(manageFeeType.getMessage()); + }else { + notify.setBillTypeName("商业&运营管理费"); + } + return notify; + } + public WxBillSum getBillDepositSum(WxMerchant wxMerchant,Date starttime, Date enttime) { WxBillDeposit bd = new WxBillDeposit(); updateQueryParm(wxMerchant, bd,starttime,enttime); @@ -173,6 +195,17 @@ public class WxBillAllHelper { return wxBillRentDepositService.getMerchantIds(bd); } + public WxBillHotNotify getBillDepositHotNotify(WxMerchant wxMerchant,Date starttime, Date enttime) { + WxBillDeposit bd = new WxBillDeposit(); + updateQueryParm(wxMerchant, bd,starttime,enttime); + WxBillHotNotify notify = wxBillRentDepositService.getBillHotNotify(bd); + if (null == notify) { + notify = new WxBillHotNotify(); + } + notify.setBillTypeName(EnumBillAllType.RENT_DEPOSIT.getMessage()); + return notify; + } + public WxBillSum getBillPropertySum(WxMerchant wxMerchant,Date starttime, Date enttime) { WxBillProperty bp = new WxBillProperty(); updateQueryParm(wxMerchant, bp,starttime,enttime); @@ -190,6 +223,17 @@ public class WxBillAllHelper { return wxBillPropertyService.getMerchantIds(bp); } + public WxBillHotNotify getBillPropertyHotNotify(WxMerchant wxMerchant,Date starttime, Date enttime) { + WxBillProperty bp = new WxBillProperty(); + updateQueryParm(wxMerchant, bp,starttime,enttime); + WxBillHotNotify notify = wxBillPropertyService.getBillHotNotify(bp); + if (null == notify) { + notify = new WxBillHotNotify(); + } + notify.setBillTypeName(EnumBillAllType.PROPERTY.getMessage()); + return notify; + } + public WxBillSum getBillPropertyDepositSum(WxMerchant wxMerchant,Date starttime, Date enttime) { WxBillPropertyDeposit pd = new WxBillPropertyDeposit(); updateQueryParm(wxMerchant, pd,starttime,enttime); @@ -207,6 +251,17 @@ public class WxBillAllHelper { return wxBillPropertyDepositService.getMerchantIds(pd); } + public WxBillHotNotify getBillPropertyDepositHotNotify(WxMerchant wxMerchant,Date starttime, Date enttime) { + WxBillPropertyDeposit pd = new WxBillPropertyDeposit(); + updateQueryParm(wxMerchant, pd,starttime,enttime); + WxBillHotNotify notify = wxBillPropertyDepositService.getBillHotNotify(pd); + if (null == notify) { + notify = new WxBillHotNotify(); + } + notify.setBillTypeName(EnumBillAllType.PROPERTY_DEPOSIT.getMessage()); + return notify; + } + public WxBillSum getBillDailySum(WxMerchant wxMerchant,Date starttime, Date enttime,EnumBillDailyType dailyType) { WxBillDaily bdd = new WxBillDaily(); if (null != dailyType) { @@ -234,6 +289,17 @@ public class WxBillAllHelper { return wxBillDailyService.getMerchantIds(bdd); } + public WxBillHotNotify getBillDailyHotNotify(WxMerchant wxMerchant,Date starttime, Date enttime) { + WxBillDaily bdd = new WxBillDaily(); + updateQueryParm(wxMerchant, bdd,starttime,enttime); + WxBillHotNotify notify = wxBillDailyService.getBillHotNotify(bdd); + if (null == notify) { + notify = new WxBillHotNotify(); + } + notify.setBillTypeName(EnumBillAllType.DAILY.getMessage()); + return notify; + } + public WxBillSum getBillOtherSum(WxMerchant wxMerchant,Date starttime, Date enttime) { WxBillOther bo = new WxBillOther(); updateQueryParm(wxMerchant, bo,starttime,enttime); @@ -251,6 +317,17 @@ public class WxBillAllHelper { return wxBillOtherService.getMerchantIds(bo); } + public WxBillHotNotify getBillOtherHotNotify(WxMerchant wxMerchant,Date starttime, Date enttime) { + WxBillOther bo = new WxBillOther(); + updateQueryParm(wxMerchant, bo,starttime,enttime); + WxBillHotNotify notify = wxBillOtherService.getBillHotNotify(bo); + if (null == notify) { + notify = new WxBillHotNotify(); + } + notify.setBillTypeName(EnumBillAllType.OTHER.getMessage()); + return notify; + } + public WxBillSum getBillOtherDepositSum(WxMerchant wxMerchant,Date starttime, Date enttime) { WxBillOtherDeposit bod = new WxBillOtherDeposit(); updateQueryParm(wxMerchant, bod,starttime,enttime); @@ -268,6 +345,17 @@ public class WxBillAllHelper { return wxBillOtherDepositService.getMerchantIds(bod); } + public WxBillHotNotify getBillOtherDepositHotNotify(WxMerchant wxMerchant,Date starttime, Date enttime) { + WxBillOtherDeposit bod = new WxBillOtherDeposit(); + updateQueryParm(wxMerchant, bod,starttime,enttime); + WxBillHotNotify notify = wxBillOtherDepositService.getBillHotNotify(bod); + if (null == notify) { + notify = new WxBillHotNotify(); + } + notify.setBillTypeName(EnumBillAllType.OTHER_DEPOSIT.getMessage()); + return notify; + } + public String calcuteSum(String... money) { if (null != money) { BigDecimal total = new BigDecimal(0); @@ -412,8 +500,11 @@ public class WxBillAllHelper { return null; } - public void exportOneBillOweWord(WxBillBaseEntity bill,HttpServletRequest request, HttpServletResponse response) { + public void exportOneBillOweWord(boolean isOwe,WxBillBaseEntity bill,HttpServletRequest request, HttpServletResponse response) { String templatePath = "contract-word-template/bill_owe_one.docx"; + if (!isOwe) { + templatePath = "contract-word-template/bill_near_one.docx"; + } String filepath = fmUploadDir; String filename = UUID.randomUUID() + ".docx"; String exportFileName = "催缴单"; @@ -442,7 +533,53 @@ public class WxBillAllHelper { WordUtil.exportWord(templatePath, filepath, filename, exportFileName, result, request, response, null); } -// public WxBillHotNotify getHotNotify() { -// -// } + public List getHotNotify(WxMerchant wxMerchant) { + List retList = new ArrayList(); + WxBillHotNotify rentNotify = this.getBillRentHotNotify(wxMerchant, wxMerchant.getStarttime(), wxMerchant.getEndtime()); + if (null != rentNotify) { + retList.add(rentNotify); + } + + WxBillHotNotify rentBussinessManageNotify = this.getBillRentManageHotNotify(wxMerchant, wxMerchant.getStarttime(), wxMerchant.getEndtime(),EnumRentContractManageFeeType.RENT_BUSSINESS_MANAGE_FEE); + if (null != rentBussinessManageNotify) { + retList.add(rentBussinessManageNotify); + } + + WxBillHotNotify rentOperationManageNotify = this.getBillRentManageHotNotify(wxMerchant, wxMerchant.getStarttime(), wxMerchant.getEndtime(),EnumRentContractManageFeeType.RENT_OPERATING_MANAGE_FEE); + if (null != rentOperationManageNotify) { + retList.add(rentOperationManageNotify); + } + + WxBillHotNotify rentDepositNotify = this.getBillDepositHotNotify(wxMerchant, wxMerchant.getStarttime(), wxMerchant.getEndtime()); + if (null != rentDepositNotify) { + retList.add(rentDepositNotify); + } + + WxBillHotNotify propertyNotify = this.getBillPropertyHotNotify(wxMerchant, wxMerchant.getStarttime(), wxMerchant.getEndtime()); + if (null != propertyNotify) { + retList.add(propertyNotify); + } + + WxBillHotNotify propertyDepositNotify = this.getBillPropertyDepositHotNotify(wxMerchant, wxMerchant.getStarttime(), wxMerchant.getEndtime()); + if (null != propertyDepositNotify) { + retList.add(propertyDepositNotify); + } + + WxBillHotNotify dailyNotify = this.getBillDailyHotNotify(wxMerchant, wxMerchant.getStarttime(), wxMerchant.getEndtime()); + if (null != dailyNotify) { + retList.add(dailyNotify); + } + + WxBillHotNotify otherNotify = this.getBillOtherHotNotify(wxMerchant, wxMerchant.getStarttime(), wxMerchant.getEndtime()); + if (null != otherNotify) { + retList.add(otherNotify); + } + + WxBillHotNotify otherDepositNotify = this.getBillOtherDepositHotNotify(wxMerchant, wxMerchant.getStarttime(), wxMerchant.getEndtime()); + if (null != otherDepositNotify) { + retList.add(otherDepositNotify); + } + + return retList; + } } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/DataTowerServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/DataTowerServiceImpl.java index 04c96cf96..0d26c0662 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/DataTowerServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/DataTowerServiceImpl.java @@ -324,9 +324,9 @@ public class DataTowerServiceImpl implements DataTowerService { String enddate = DateUtils.getSystemTime("yyyy-MM-dd HH:mm:ss"); record.setStarttime(startdate); record.setEndtime(enddate); - record.setStatus(EnumBillRentStatus.NOT_PAID.getCode()); + record.setStatus(EnumBillStatus.NOT_PAID.getCode()); Map oweInfo = wxBillAllMapper.queryOweInfo(record); - record.setStatus(EnumBillRentStatus.PAID.getCode()); + record.setStatus(EnumBillStatus.PAID.getCode()); Map paidInfo = wxBillAllMapper.queryPaidInfo(record); billMap.putAll(oweInfo); diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java index dc2ecc078..ace8cebf1 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java @@ -277,8 +277,8 @@ public class WxBillAllServiceImpl implements WxBillAllService { Long realReceivePay = servicePay.longValue() + e.getLatePayPrice() + e.getReceivePay(); e.setRealReceivePay(realReceivePay); e.setServiceChargePay(servicePay.intValue()); - if (!e.getStatus().equals(EnumBillRentStatus.NOT_PAID.getCode()) && - !e.getStatus().equals(EnumBillRentStatus.WAIT_PAY.getCode())) { + if (!e.getStatus().equals(EnumBillStatus.NOT_PAID.getCode()) && + !e.getStatus().equals(EnumBillStatus.WAIT_PAY.getCode())) { e.setOwe(0L); } else { e.setOwe(realReceivePay - e.getPay()); @@ -421,55 +421,55 @@ public class WxBillAllServiceImpl implements WxBillAllService { if (billTypeValue == EnumBillTypeParam.RENT.getCode().intValue()) { logger.info("更新租金账单"); WxBillRent billRent = wxBillRentMapper.selectById((Long) bill.get("id")); - if (billRent != null && !billRent.getStatus().equals(EnumBillRentStatus.PAID.getCode())) { + if (billRent != null && !billRent.getStatus().equals(EnumBillStatus.PAID.getCode())) { updateBillRent(bill); } } else if (billTypeValue == EnumBillTypeParam.RENT_DEPOSIT.getCode().intValue()) { logger.info("更新租金押金账单"); WxBillDeposit billDeposit = wxBillDepositMapper.selectById((Long) bill.get("id")); - if (billDeposit != null && !billDeposit.getStatus().equals(EnumBillRentStatus.PAID.getCode())) { + if (billDeposit != null && !billDeposit.getStatus().equals(EnumBillStatus.PAID.getCode())) { updateBillRentDeposit(bill); } } else if (billTypeValue == EnumBillTypeParam.PROPERTY.getCode().intValue()) { logger.info("更新物业账单"); WxBillProperty property = wxBillPropertyMapper.selectById((Long) bill.get("id")); - if (property != null && !property.getStatus().equals(EnumBillRentStatus.PAID.getCode())) { + if (property != null && !property.getStatus().equals(EnumBillStatus.PAID.getCode())) { updateBillProperty(bill); } } else if (billTypeValue == EnumBillTypeParam.PROPERTY_DEPOSIT.getCode().intValue()) { logger.info("更新物业押金账单"); WxBillPropertyDeposit wxBillPropertyDeposit = wxBillPropertyDepositMapper.selectById((Long) bill.get("id")); - if (wxBillPropertyDeposit != null && !wxBillPropertyDeposit.getStatus().equals(EnumBillRentStatus.PAID.getCode())) { + if (wxBillPropertyDeposit != null && !wxBillPropertyDeposit.getStatus().equals(EnumBillStatus.PAID.getCode())) { updateBillPropertyDeposit(bill); } } else if (billTypeValue == EnumBillTypeParam.WATER.getCode().intValue()) { logger.info("更新水费账单"); WxBillDaily wxBillDaily = wxBillDailyMapper.selectById((Long) bill.get("id")); - if (wxBillDaily != null && !wxBillDaily.getStatus().equals(EnumBillRentStatus.PAID.getCode())) { + if (wxBillDaily != null && !wxBillDaily.getStatus().equals(EnumBillStatus.PAID.getCode())) { updateBillDaily(bill); } } else if (billTypeValue == EnumBillTypeParam.POWER.getCode().intValue()) { logger.info("更新电费账单"); WxBillDaily wxBillDaily = wxBillDailyMapper.selectById((Long) bill.get("id")); - if (wxBillDaily != null && !wxBillDaily.getStatus().equals(EnumBillRentStatus.PAID.getCode())) { + if (wxBillDaily != null && !wxBillDaily.getStatus().equals(EnumBillStatus.PAID.getCode())) { updateBillDaily(bill); } } else if (billTypeValue == EnumBillTypeParam.AIR_CONDITIONING.getCode().intValue()) { logger.info("更新空调费账单"); WxBillDaily wxBillDaily = wxBillDailyMapper.selectById((Long) bill.get("id")); - if (wxBillDaily != null && !wxBillDaily.getStatus().equals(EnumBillRentStatus.PAID.getCode())) { + if (wxBillDaily != null && !wxBillDaily.getStatus().equals(EnumBillStatus.PAID.getCode())) { updateBillDaily(bill); } } else if (billTypeValue == EnumBillTypeParam.ROUTINE.getCode().intValue()) { logger.info("更新其他账单"); WxBillOther wxBillOther = wxBillOtherMapper.selectById((Long) bill.get("id")); - if (wxBillOther != null && !wxBillOther.getStatus().equals(EnumBillRentStatus.PAID.getCode())) { + if (wxBillOther != null && !wxBillOther.getStatus().equals(EnumBillStatus.PAID.getCode())) { updateBillOther(bill); } } else if (billTypeValue == EnumBillTypeParam.ATHER_DEPOSIT.getCode().intValue()) { logger.info("更新其他押金账单"); WxBillOtherDeposit wxBillOtherDeposit = wxBillOtherDepositMapper.selectById((Long) bill.get("id")); - if (wxBillOtherDeposit != null && !wxBillOtherDeposit.getStatus().equals(EnumBillRentStatus.PAID.getCode())) { + if (wxBillOtherDeposit != null && !wxBillOtherDeposit.getStatus().equals(EnumBillStatus.PAID.getCode())) { updateBillOtherDeposit(bill); } } else if (billTypeValue == EnumBillTypeParam.SETTLE.getCode().intValue()) { @@ -532,7 +532,7 @@ public class WxBillAllServiceImpl implements WxBillAllService { wxBillAllVo.setRentEndTime(DateUtils.format(wxBillAllVo.getEndtime())); //status不是欠缴,都展示0,与前端保持一致 - if (!EnumBillRentStatus.NOT_PAID.getCode().equals(wxBillAllVo.getStatus())) { + if (!EnumBillStatus.NOT_PAID.getCode().equals(wxBillAllVo.getStatus())) { wxBillAllVo.setOwe(0L); wxBillAllVo.setOweStr("0"); } @@ -558,8 +558,8 @@ public class WxBillAllServiceImpl implements WxBillAllService { wxBillOtherDeposit.setPayDate(date); Long owe = (Long) bill.get("owe"); wxBillOtherDeposit.setPay(wxBillOtherDeposit.getPay() + owe); - wxBillOtherDeposit.setOwe("0"); - wxBillOtherDeposit.setStatus(EnumBillDailyStatus.PAID.getCode()); + //wxBillOtherDeposit.setOwe("0"); + wxBillOtherDeposit.setStatus(EnumBillStatus.PAID.getCode()); wxBillOtherDeposit.setPayDate(date); wxBillOtherDeposit.setUpdatetime(date); wxBillOtherDeposit.setPayWay(EnumBillPayWay.WECHAT_PAY.getCode()); @@ -602,8 +602,8 @@ public class WxBillAllServiceImpl implements WxBillAllService { wxBillOther.setPayDate(date); Long owe = (Long) bill.get("owe"); wxBillOther.setPay(wxBillOther.getPay() + owe); - wxBillOther.setOwe("0"); - wxBillOther.setStatus(EnumBillDailyStatus.PAID.getCode()); + //wxBillOther.setOwe("0"); + wxBillOther.setStatus(EnumBillStatus.PAID.getCode()); wxBillOther.setPayDate(date); wxBillOther.setUpdatetime(date); wxBillOther.setPayWay(EnumBillPayWay.WECHAT_PAY.getCode()); @@ -646,8 +646,8 @@ public class WxBillAllServiceImpl implements WxBillAllService { wxBillDaily.setPayDate(date); Long owe = (Long) bill.get("owe"); wxBillDaily.setPay(wxBillDaily.getPay() + owe); - wxBillDaily.setOwe("0"); - wxBillDaily.setStatus(EnumBillDailyStatus.PAID.getCode()); + //wxBillDaily.setOwe("0"); + wxBillDaily.setStatus(EnumBillStatus.PAID.getCode()); wxBillDaily.setPayDate(date); wxBillDaily.setUpdatetime(date); wxBillDaily.setPayWay(EnumBillPayWay.WECHAT_PAY.getCode()); @@ -691,8 +691,8 @@ public class WxBillAllServiceImpl implements WxBillAllService { wxBillPropertyDeposit.setPayDate(date); String owe = (String) bill.get("owe"); wxBillPropertyDeposit.setPay(new BigDecimal(wxBillPropertyDeposit.getPay()).add(new BigDecimal(owe)).toPlainString()); - wxBillPropertyDeposit.setOwe("0"); - wxBillPropertyDeposit.setStatus(EnumBillDailyStatus.PAID.getCode()); + //wxBillPropertyDeposit.setOwe("0"); + wxBillPropertyDeposit.setStatus(EnumBillStatus.PAID.getCode()); wxBillPropertyDeposit.setPayDate(date); wxBillPropertyDeposit.setUpdatetime(date); wxBillPropertyDeposit.setPayWay(EnumBillPayWay.WECHAT_PAY.getCode()); @@ -736,8 +736,8 @@ public class WxBillAllServiceImpl implements WxBillAllService { property.setPayDate(date); String owe = (String) bill.get("owe"); property.setPay(new BigDecimal(property.getPay()).add(new BigDecimal(owe)).toPlainString()); - property.setOwe("0"); - property.setStatus(EnumBillDailyStatus.PAID.getCode()); + //property.setOwe("0"); + property.setStatus(EnumBillStatus.PAID.getCode()); property.setPayDate(date); property.setUpdatetime(date); property.setPayWay(EnumBillPayWay.WECHAT_PAY.getCode()); @@ -781,8 +781,8 @@ public class WxBillAllServiceImpl implements WxBillAllService { wxBillDeposit.setPayDate(date); Long owe = (Long) bill.get("owe"); wxBillDeposit.setPay(wxBillDeposit.getPay() + owe); - wxBillDeposit.setOwe("0"); - wxBillDeposit.setStatus(EnumBillDailyStatus.PAID.getCode()); + //wxBillDeposit.setOwe("0"); + wxBillDeposit.setStatus(EnumBillStatus.PAID.getCode()); wxBillDeposit.setPayDate(date); wxBillDeposit.setUpdatetime(date); wxBillDeposit.setPayWay(EnumBillPayWay.WECHAT_PAY.getCode()); @@ -826,8 +826,8 @@ public class WxBillAllServiceImpl implements WxBillAllService { wxBillRent.setPayDate(date); Long owe = (Long) bill.get("owe"); wxBillRent.setPay(wxBillRent.getPay() + owe); - wxBillRent.setOwe("0"); - wxBillRent.setStatus(EnumBillDailyStatus.PAID.getCode()); + //wxBillRent.setOwe("0"); + wxBillRent.setStatus(EnumBillStatus.PAID.getCode()); wxBillRent.setPayDate(date); wxBillRent.setUpdatetime(date); wxBillRent.setPayWay(EnumBillPayWay.WECHAT_PAY.getCode()); @@ -930,9 +930,9 @@ public class WxBillAllServiceImpl implements WxBillAllService { Integer status = wxBillAll.getStatus(); if (status == null) { List statusList = new ArrayList<>(); - statusList.add(EnumBillRentStatus.NOT_PAID.getCode()); - statusList.add(EnumBillRentStatus.WAIT_PAY.getCode()); - statusList.add(EnumBillRentStatus.NOT_EXPIRED.getCode()); + statusList.add(EnumBillStatus.NOT_PAID.getCode()); + statusList.add(EnumBillStatus.WAIT_PAY.getCode()); + statusList.add(EnumBillStatus.NOT_EXPIRED.getCode()); wxBillAll.setStatusList(statusList); //账单时间段 result.put("starttime", wxBillAll.getStarttime()); @@ -1744,7 +1744,7 @@ public class WxBillAllServiceImpl implements WxBillAllService { WxBillRent rent = new WxBillRent(); rent.setExpiredDay(0L); if (owe <= pay) { - rent.setStatus(EnumBillRentStatus.PAID.getCode()); + rent.setStatus(EnumBillStatus.PAID.getCode()); int expiredDay = DateUtils.daysBetween(startDate, endDate); int timePeriod = 0; if (expiredDay > timePeriod) { @@ -1756,7 +1756,7 @@ public class WxBillAllServiceImpl implements WxBillAllService { int day = DateUtils.daysBetween(startDate, now); int timePeriod = 0; if (day > timePeriod) { - rent.setStatus(EnumBillRentStatus.NOT_PAID.getCode()); + rent.setStatus(EnumBillStatus.NOT_PAID.getCode()); rent.setExpiredDay((long) day); return rent; } @@ -1764,12 +1764,12 @@ public class WxBillAllServiceImpl implements WxBillAllService { timePeriod = 30; long expiredDay = Long.valueOf(Math.abs(day)); if (expiredDay > timePeriod) { - rent.setStatus(EnumBillRentStatus.NOT_EXPIRED.getCode()); + rent.setStatus(EnumBillStatus.NOT_EXPIRED.getCode()); } else { - rent.setStatus(EnumBillRentStatus.WAIT_PAY.getCode()); + rent.setStatus(EnumBillStatus.WAIT_PAY.getCode()); } } else { - rent.setStatus(EnumBillRentStatus.WAIT_PAY.getCode()); + rent.setStatus(EnumBillStatus.WAIT_PAY.getCode()); } return rent; } @@ -1856,14 +1856,14 @@ public class WxBillAllServiceImpl implements WxBillAllService { wxBillDaily.setId(businessId); if (forcePaid) { wxBillDaily.setReceivePay(dbBill.getPay()); - wxBillDaily.setStatus(EnumBillRentStatus.PAID.getCode()); - wxBillDaily.setOwe("0"); + wxBillDaily.setStatus(EnumBillStatus.PAID.getCode()); + //wxBillDaily.setOwe("0"); }else { wxBillDaily.setReceivePay(newPrice); //wxBillDaily.setOwe(new BigDecimal(newPrice).add(new BigDecimal(dbBill.getServiceChargePay())).subtract(new BigDecimal(dbBill.getPay())).toPlainString()); - wxBillDaily.setOwe(new BigDecimal(newPrice).subtract(new BigDecimal(dbBill.getPay())).toPlainString()); + //wxBillDaily.setOwe(new BigDecimal(newPrice).subtract(new BigDecimal(dbBill.getPay())).toPlainString()); if (newPrice.equals(dbBill.getPay())) { - wxBillDaily.setStatus(EnumBillRentStatus.PAID.getCode()); + wxBillDaily.setStatus(EnumBillStatus.PAID.getCode()); } } wxBillDaily.setUpdatetime(updateDate); diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxBillDailyServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxBillDailyServiceImpl.java index 7e63f1686..e4f72c7f3 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxBillDailyServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxBillDailyServiceImpl.java @@ -12,6 +12,7 @@ import com.iformall.domain.po.*; import com.iformall.domain.po.base.TenantEntity; import com.iformall.domain.vo.WxBillDailyExportVo; import com.iformall.domain.vo.WxBillDailyVo; +import com.iformall.domain.vo.WxBillHotNotify; import com.iformall.domain.vo.WxBillSum; import com.iformall.enums.*; import com.iformall.exception.MallinkException; @@ -150,11 +151,11 @@ public class WxBillDailyServiceImpl implements WxBillDailyService { BigDecimal realReceivePay = servicePay.add(new BigDecimal(e.getReceivePay())); e.setRealReceivePay(realReceivePay.toPlainString()); e.setServiceChargePay(servicePay.toPlainString()); - if (!e.getStatus().equals(EnumBillRentStatus.NOT_PAID.getCode())) { - e.setOwe("0"); + if (!e.getStatus().equals(EnumBillStatus.NOT_PAID.getCode())) { + //e.setOwe("0"); } else { //e.setOwe(realReceivePay.subtract(new BigDecimal(e.getPay())).toPlainString()); - e.setOwe(new BigDecimal(e.getReceivePay()).subtract(new BigDecimal(e.getPay())).toPlainString()); + //e.setOwe(new BigDecimal(e.getReceivePay()).subtract(new BigDecimal(e.getPay())).toPlainString()); } } } @@ -176,8 +177,8 @@ public class WxBillDailyServiceImpl implements WxBillDailyService { if (StringUtils.isNotBlank(record.getParentTenantId())) { params.put("parentTenantId", record.getParentTenantId()); } - params.put("waitPay", EnumBillDailyStatus.WAIT_PAY.getCode()); - params.put("paid", EnumBillRentStatus.PAID.getCode()); + params.put("waitPay", EnumBillStatus.WAIT_PAY.getCode()); + params.put("paid", EnumBillStatus.PAID.getCode()); try { wxBillDailyMapper.updateWaitPayStatus(params); } catch (Exception e) { @@ -194,8 +195,8 @@ public class WxBillDailyServiceImpl implements WxBillDailyService { if (StringUtils.isNotBlank(record.getParentTenantId())) { params.put("parentTenantId", record.getParentTenantId()); } - params.put("notPaid", EnumBillDailyStatus.NOT_PAID.getCode()); - params.put("paid", EnumBillRentStatus.PAID.getCode()); + params.put("notPaid", EnumBillStatus.NOT_PAID.getCode()); + params.put("paid", EnumBillStatus.PAID.getCode()); try { wxBillDailyMapper.updateNotPaidStatus(params); } catch (Exception e) { @@ -212,7 +213,7 @@ public class WxBillDailyServiceImpl implements WxBillDailyService { record.updateTenantInfo(tenantEntity); WxBillDaily wxBillDaily = getBillRentPropertyList(1, 1, record, wxPayAccountBill).getList().get(0); //wxBillDaily.setOwe(new BigDecimal(wxBillDaily.getRealReceivePay()).subtract(new BigDecimal(wxBillDaily.getPay())).toPlainString()); - wxBillDaily.setOwe(new BigDecimal(wxBillDaily.getReceivePay()).subtract(new BigDecimal(wxBillDaily.getPay())).toPlainString()); + //wxBillDaily.setOwe(new BigDecimal(wxBillDaily.getReceivePay()).subtract(new BigDecimal(wxBillDaily.getPay())).toPlainString()); wxBillDaily.setMerchant(wxMerchantMapper.selectById(wxBillDaily.getMerchantId())); // if (wxBillDaily.getShopId() != null) { // WxShop shop = new WxShop(); @@ -248,12 +249,12 @@ public class WxBillDailyServiceImpl implements WxBillDailyService { } final IdWorker idWorker = IdWorker.get(); record.setId(idWorker.nextId()); - record.setStatus(record.getReceiveDate().after(date)?EnumBillDailyStatus.WAIT_PAY.getCode():EnumBillDailyStatus.NOT_PAID.getCode()); + record.setStatus(record.getReceiveDate().after(date)?EnumBillStatus.WAIT_PAY.getCode():EnumBillStatus.NOT_PAID.getCode()); record.setCreatetime(date); record.setUpdatetime(date); record.setExpiredDay(0L); //record.setOwe(new BigDecimal(record.getRealReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); - record.setOwe(new BigDecimal(record.getReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); + //record.setOwe(new BigDecimal(record.getReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); record.setIsDel(EnumDelStatus.NOT_DEL.getCode()); try { wxBillDailyMapper.insert(record); @@ -275,16 +276,16 @@ public class WxBillDailyServiceImpl implements WxBillDailyService { wxBillDaily.setServiceChargePay(record.getServiceChargePayUpdate()); //wxBillDaily.setOwe(new BigDecimal(wxBillDaily.getReceivePay()).add(new BigDecimal(wxBillDaily.getServiceChargePay())) // .subtract(new BigDecimal(wxBillDaily.getPay())).toPlainString()); - wxBillDaily.setOwe(new BigDecimal(wxBillDaily.getReceivePay()).subtract(new BigDecimal(wxBillDaily.getPay())).toPlainString()); + //wxBillDaily.setOwe(new BigDecimal(wxBillDaily.getReceivePay()).subtract(new BigDecimal(wxBillDaily.getPay())).toPlainString()); }else{ String addpay = wxBillDaily.getPay(); wxBillDaily.setPayDate(record.getPayDate()); wxBillDaily.setPay(record.getPay()); wxBillDaily.setReceivePay(record.getReceivePay()); //wxBillDaily.setOwe(new BigDecimal(record.getRealReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); - wxBillDaily.setOwe(new BigDecimal(record.getReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); + //wxBillDaily.setOwe(new BigDecimal(record.getReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); if (record.getPay().equals(record.getRealReceivePay())) { - wxBillDaily.setStatus(EnumBillRentStatus.PAID.getCode()); + wxBillDaily.setStatus(EnumBillStatus.PAID.getCode()); Date payDate = record.getPayDate(); Date receiveDate = wxBillDaily.getReceiveDate(); wxBillDaily.setExpiredDay(0L); @@ -343,7 +344,7 @@ public class WxBillDailyServiceImpl implements WxBillDailyService { if(wxBillDaily==null){ return new ResultData(ErrorCode.BILL_ROUTINE_IS_NOT_FOUND); } - wxBillDaily.setStatus(EnumBillDailyStatus.PAID.getCode()); + wxBillDaily.setStatus(EnumBillStatus.PAID.getCode()); Date d =new Date(); wxBillDaily.setPayDate(d); wxBillDaily.setUpdatetime(d); @@ -393,7 +394,7 @@ public class WxBillDailyServiceImpl implements WxBillDailyService { wxBillDaily.setReceivePay(receivePay); String pay = billDaily.getPay(); wxBillDaily.setPay(pay); - wxBillDaily.setOwe(new BigDecimal(receivePay).subtract(new BigDecimal(pay)).toPlainString()); + //wxBillDaily.setOwe(new BigDecimal(receivePay).subtract(new BigDecimal(pay)).toPlainString()); wxBillDaily.setType(type); Date receiveDate = billDaily.getReceiveDate(); wxBillDaily.setReceiveDate(receiveDate); @@ -404,13 +405,13 @@ public class WxBillDailyServiceImpl implements WxBillDailyService { int expiredDay = DateUtils.daysBetween(receiveDate, date); wxBillDaily.setExpiredDay(0L); if (expiredDay > 0) { - wxBillDaily.setStatus(EnumBillRentStatus.NOT_PAID.getCode()); + wxBillDaily.setStatus(EnumBillStatus.NOT_PAID.getCode()); wxBillDaily.setExpiredDay((long) expiredDay); } else { - wxBillDaily.setStatus(EnumBillRentStatus.WAIT_PAY.getCode()); + wxBillDaily.setStatus(EnumBillStatus.WAIT_PAY.getCode()); } if (receivePay.equals(pay)) { - wxBillDaily.setStatus(EnumBillRentStatus.PAID.getCode()); + wxBillDaily.setStatus(EnumBillStatus.PAID.getCode()); } wxBillDaily.setUserId(user.getId()); @@ -451,7 +452,7 @@ public class WxBillDailyServiceImpl implements WxBillDailyService { wxBillDailyExportVo.setMerchantName(b.getMerchantName()); wxBillDailyExportVo.setReceivePay(b.getRealReceivePay()); wxBillDailyExportVo.setPay(b.getPay()); - wxBillDailyExportVo.setOwe(b.getOwe()); + //wxBillDailyExportVo.setOwe(b.getOwe()); wxBillDailyExportVo.setReceiveDate(b.getReceiveDate()); wxBillDailyExportVo.setPayDate(b.getPayDate()); wxBillDailyExportVo.setExpiredDay(b.getExpiredDay()); @@ -475,5 +476,11 @@ public class WxBillDailyServiceImpl implements WxBillDailyService { updateQueryParam(record); return wxBillDailyMapper.getMerchantIdList(record); } + + @Override + public WxBillHotNotify getBillHotNotify(WxBillDaily record) { + updateQueryParam(record); + return wxBillDailyMapper.getBillHotNotify(record); + } } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxBillDepositServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxBillDepositServiceImpl.java index 0f31acfb1..39f59ca74 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxBillDepositServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxBillDepositServiceImpl.java @@ -15,10 +15,11 @@ import com.iformall.domain.po.WxBillRent; import com.iformall.domain.po.WxMerchant; import com.iformall.domain.po.WxPayAccountBill; import com.iformall.domain.po.WxShop; +import com.iformall.domain.vo.WxBillHotNotify; import com.iformall.domain.vo.WxBillSum; import com.iformall.enums.EnumBillAction; import com.iformall.enums.EnumBillPayWay; -import com.iformall.enums.EnumBillRentStatus; +import com.iformall.enums.EnumBillStatus; import com.iformall.enums.EnumDelStatus; import com.iformall.exception.MallinkException; import com.iformall.mapper.WxBillDepositMapper; @@ -176,8 +177,8 @@ public class WxBillDepositServiceImpl implements WxBillDepositService { public void updateWaidPayStatus(WxBillDeposit record) { Map params = new HashMap<>(); params.put("tenantId", record.getTenantId()); - params.put("waitPay", EnumBillRentStatus.WAIT_PAY.getCode()); - params.put("paid", EnumBillRentStatus.PAID.getCode()); + params.put("waitPay", EnumBillStatus.WAIT_PAY.getCode()); + params.put("paid", EnumBillStatus.PAID.getCode()); try { wxBillDepositMapper.updateWaitPayStatus(params); @@ -192,8 +193,8 @@ public class WxBillDepositServiceImpl implements WxBillDepositService { public void updateNotPaidStatus(WxBillDeposit record) { Map params = new HashMap<>(); params.put("tenantId", record.getTenantId()); - params.put("notPaid", EnumBillRentStatus.NOT_PAID.getCode()); - params.put("paid", EnumBillRentStatus.PAID.getCode()); + params.put("notPaid", EnumBillStatus.NOT_PAID.getCode()); + params.put("paid", EnumBillStatus.PAID.getCode()); try { wxBillDepositMapper.updateNotPaidStatus(params); } catch (Exception e) { @@ -223,7 +224,7 @@ public class WxBillDepositServiceImpl implements WxBillDepositService { record.setId(idWorker.nextId()); record.setCreatetime(date); record.setUpdatetime(date); - record.setOwe(new BigDecimal(receivepay).subtract(new BigDecimal(pay)).toPlainString()); + //record.setOwe(new BigDecimal(receivepay).subtract(new BigDecimal(pay)).toPlainString()); record.setIsDel(EnumDelStatus.NOT_DEL.getCode()); try { wxBillDepositMapper.insert(record); @@ -241,9 +242,9 @@ public class WxBillDepositServiceImpl implements WxBillDepositService { String addpay = wxBillDeposit.getPay(); wxBillDeposit.setPay(record.getPay()); wxBillDeposit.setReceivePay(record.getReceivePay()); - wxBillDeposit.setOwe(new BigDecimal(receivepay).subtract(new BigDecimal(pay)).toPlainString()); + //wxBillDeposit.setOwe(new BigDecimal(receivepay).subtract(new BigDecimal(pay)).toPlainString()); if (record.getPay().equals(record.getReceivePay())) { - wxBillDeposit.setStatus(EnumBillRentStatus.PAID.getCode()); + wxBillDeposit.setStatus(EnumBillStatus.PAID.getCode()); Date receiveDate = wxBillDeposit.getReceiveDate(); wxBillDeposit.setExpiredDay(0L); if (date.after(receiveDate)) { @@ -294,7 +295,7 @@ public class WxBillDepositServiceImpl implements WxBillDepositService { if(wxBillDeposit==null){ return new ResultData(ErrorCode.BILL_RENT_DEPOSIT_IS_NOT_FOUND); } - wxBillDeposit.setStatus(EnumBillRentStatus.PAID.getCode()); + wxBillDeposit.setStatus(EnumBillStatus.PAID.getCode()); Date d =new Date(); wxBillDeposit.setPayDate(d); wxBillDeposit.setUpdatetime(d); @@ -317,7 +318,7 @@ public class WxBillDepositServiceImpl implements WxBillDepositService { } wxBillDeposit.setPayWay(record.getPayWay()); wxBillDeposit.setReturnPrice(record.getReturnPrice()); - wxBillDeposit.setStatus(EnumBillRentStatus.RETURN.getCode()); + wxBillDeposit.setStatus(EnumBillStatus.RETURN.getCode()); wxBillDeposit.setUpdatetime(new Date()); try { wxBillDepositMapper.updateById(wxBillDeposit); @@ -353,7 +354,7 @@ public class WxBillDepositServiceImpl implements WxBillDepositService { return new ResultData(ErrorCode.BILL_RENT_DEPOSIT_IS_NOT_FOUND); } wxBillDeposit.setReceivePay(record.getReceivePay()); - wxBillDeposit.setOwe(new BigDecimal(record.getReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); + //wxBillDeposit.setOwe(new BigDecimal(record.getReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); wxBillDeposit.setUpdatetime(new Date()); try { wxBillDepositMapper.updateById(wxBillDeposit); @@ -375,6 +376,12 @@ public class WxBillDepositServiceImpl implements WxBillDepositService { setQueryParam(wxBillDeposit); return wxBillDepositMapper.getMerchantIdList(wxBillDeposit); } + + @Override + public WxBillHotNotify getBillHotNotify(WxBillDeposit wxBillDeposit) { + setQueryParam(wxBillDeposit); + return wxBillDepositMapper.getBillHotNotify(wxBillDeposit); + } } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherDepositServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherDepositServiceImpl.java index e9e71951c..e95dbf4ea 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherDepositServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherDepositServiceImpl.java @@ -15,6 +15,7 @@ import com.iformall.domain.po.WxBillRent; import com.iformall.domain.po.WxMerchant; import com.iformall.domain.po.WxPayAccountBill; import com.iformall.domain.po.base.TenantEntity; +import com.iformall.domain.vo.WxBillHotNotify; import com.iformall.domain.vo.WxBillSum; import com.iformall.enums.*; import com.iformall.exception.MallinkException; @@ -153,11 +154,11 @@ public class WxBillOtherDepositServiceImpl implements WxBillOtherDepositService } e.setRealReceivePay(servicePay.add(new BigDecimal(e.getReceivePay())).toPlainString()); e.setServiceChargePay(servicePay.toPlainString()); - if (!e.getStatus().equals(EnumBillRentStatus.NOT_PAID.getCode())) { - e.setOwe("0"); + if (!e.getStatus().equals(EnumBillStatus.NOT_PAID.getCode())) { + //e.setOwe("0"); } else { //e.setOwe(servicePay.add(new BigDecimal(e.getReceivePay())).subtract(new BigDecimal(e.getPay())).toPlainString()); - e.setOwe(new BigDecimal(e.getReceivePay()).subtract(new BigDecimal(e.getPay())).toPlainString()); + //e.setOwe(new BigDecimal(e.getReceivePay()).subtract(new BigDecimal(e.getPay())).toPlainString()); } } } @@ -176,8 +177,8 @@ public class WxBillOtherDepositServiceImpl implements WxBillOtherDepositService public void updateWaidPayStatus(WxBillOtherDeposit record) { Map params = new HashMap<>(); params.put("tenantId", record.getTenantId()); - params.put("waitPay", EnumBillDailyStatus.WAIT_PAY.getCode()); - params.put("paid", EnumBillRentStatus.PAID.getCode()); + params.put("waitPay", EnumBillStatus.WAIT_PAY.getCode()); + params.put("paid", EnumBillStatus.PAID.getCode()); try { wxBillOtherDepositMapper.updateWaitPayStatus(params); } catch (Exception e) { @@ -191,8 +192,8 @@ public class WxBillOtherDepositServiceImpl implements WxBillOtherDepositService public void updateNotPaidStatus(WxBillOtherDeposit record) { Map params = new HashMap<>(); params.put("tenantId", record.getTenantId()); - params.put("notPaid", EnumBillDailyStatus.NOT_PAID.getCode()); - params.put("paid", EnumBillRentStatus.PAID.getCode()); + params.put("notPaid", EnumBillStatus.NOT_PAID.getCode()); + params.put("paid", EnumBillStatus.PAID.getCode()); try { wxBillOtherDepositMapper.updateNotPaidStatus(params); } catch (Exception e) { @@ -209,7 +210,7 @@ public class WxBillOtherDepositServiceImpl implements WxBillOtherDepositService record.updateTenantInfo(tenantEntity); WxBillOtherDeposit wxBillOther = getBillRentPropertyList(1, 10000, record, wxPayAccountBill).getList().get(0); //wxBillOther.setOwe(new BigDecimal(wxBillOther.getRealReceivePay()).subtract(new BigDecimal(wxBillOther.getPay())).toPlainString()); - wxBillOther.setOwe(new BigDecimal(wxBillOther.getReceivePay()).subtract(new BigDecimal(wxBillOther.getPay())).toPlainString()); + //wxBillOther.setOwe(new BigDecimal(wxBillOther.getReceivePay()).subtract(new BigDecimal(wxBillOther.getPay())).toPlainString()); wxBillOther.setMerchant(wxMerchantMapper.selectById(wxBillOther.getMerchantId())); // if (wxBillOther.getShopId() != null) { // WxShop shop = new WxShop(); @@ -252,12 +253,12 @@ public class WxBillOtherDepositServiceImpl implements WxBillOtherDepositService final IdWorker idWorker = IdWorker.get(); record.setId(idWorker.nextId()); - record.setStatus(EnumBillDailyStatus.WAIT_PAY.getCode()); + record.setStatus(EnumBillStatus.WAIT_PAY.getCode()); record.setCreatetime(date); record.setUpdatetime(date); record.setExpiredDay(0L); //record.setOwe(new BigDecimal(record.getRealReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); - record.setOwe(new BigDecimal(record.getReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); + //record.setOwe(new BigDecimal(record.getReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); record.setIsDel(EnumDelStatus.NOT_DEL.getCode()); try { wxBillOtherDepositMapper.insert(record); @@ -277,16 +278,16 @@ public class WxBillOtherDepositServiceImpl implements WxBillOtherDepositService if(record.getServiceChargePayUpdate() != null){ wxBillOtherDeposit.setServiceChargePay(record.getServiceChargePayUpdate()); //wxBillOtherDeposit.setOwe(new BigDecimal(wxBillOtherDeposit.getReceivePay()).add(new BigDecimal(wxBillOtherDeposit.getServiceChargePay())).subtract(new BigDecimal(wxBillOtherDeposit.getPay())).toPlainString()); - wxBillOtherDeposit.setOwe(new BigDecimal(wxBillOtherDeposit.getReceivePay()).subtract(new BigDecimal(wxBillOtherDeposit.getPay())).toPlainString()); + //wxBillOtherDeposit.setOwe(new BigDecimal(wxBillOtherDeposit.getReceivePay()).subtract(new BigDecimal(wxBillOtherDeposit.getPay())).toPlainString()); }else{ String addpay = wxBillOtherDeposit.getPay(); wxBillOtherDeposit.setPayDate(record.getPayDate()); wxBillOtherDeposit.setPay(record.getPay()); wxBillOtherDeposit.setReceivePay(record.getReceivePay()); //wxBillOtherDeposit.setOwe(new BigDecimal(record.getRealReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); - wxBillOtherDeposit.setOwe(new BigDecimal(record.getReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); + //wxBillOtherDeposit.setOwe(new BigDecimal(record.getReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); if (record.getPay().equals(record.getRealReceivePay())) { - wxBillOtherDeposit.setStatus(EnumBillRentStatus.PAID.getCode()); + wxBillOtherDeposit.setStatus(EnumBillStatus.PAID.getCode()); Date payDate = record.getPayDate(); Date receiveDate = wxBillOtherDeposit.getReceiveDate(); wxBillOtherDeposit.setExpiredDay(0L); @@ -347,7 +348,7 @@ public class WxBillOtherDepositServiceImpl implements WxBillOtherDepositService if (wxBillOtherDeposit == null) { return new ResultData(ErrorCode.BILL_ROUTINE_IS_NOT_FOUND); } - wxBillOtherDeposit.setStatus(EnumBillDailyStatus.PAID.getCode()); + wxBillOtherDeposit.setStatus(EnumBillStatus.PAID.getCode()); Date d = new Date(); wxBillOtherDeposit.setPayDate(d); wxBillOtherDeposit.setUpdatetime(d); @@ -368,7 +369,7 @@ public class WxBillOtherDepositServiceImpl implements WxBillOtherDepositService return new ResultData(ErrorCode.BILL_OTHER_DEPOSIT_IS_NOT_FOUND); } wxBillDeposit.setReturnPrice(record.getReturnPrice()); - wxBillDeposit.setStatus(EnumBillRentStatus.RETURN.getCode()); + wxBillDeposit.setStatus(EnumBillStatus.RETURN.getCode()); wxBillDeposit.setUpdatetime(new Date()); try { wxBillOtherDepositMapper.updateById(wxBillDeposit); @@ -406,7 +407,7 @@ public class WxBillOtherDepositServiceImpl implements WxBillOtherDepositService return new ResultData(ErrorCode.BILL_OTHER_DEPOSIT_IS_NOT_FOUND); } wxBillDeposit.setReceivePay(record.getReceivePay()); - wxBillDeposit.setOwe(new BigDecimal(record.getReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); + //wxBillDeposit.setOwe(new BigDecimal(record.getReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); wxBillDeposit.setUpdatetime(new Date()); try { wxBillOtherDepositMapper.updateById(wxBillDeposit); @@ -441,5 +442,11 @@ public class WxBillOtherDepositServiceImpl implements WxBillOtherDepositService updateQueryParam(wxBillDeposit); return wxBillOtherDepositMapper.getMerchantIdList(wxBillDeposit); } + + @Override + public WxBillHotNotify getBillHotNotify(WxBillOtherDeposit wxBillDeposit) { + updateQueryParam(wxBillDeposit); + return wxBillOtherDepositMapper.getBillHotNotify(wxBillDeposit); + } } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherServiceImpl.java index 6469103b6..fb9d6b363 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherServiceImpl.java @@ -15,6 +15,7 @@ import com.iformall.domain.po.WxBillRent; import com.iformall.domain.po.WxMerchant; import com.iformall.domain.po.WxPayAccountBill; import com.iformall.domain.po.base.TenantEntity; +import com.iformall.domain.vo.WxBillHotNotify; import com.iformall.domain.vo.WxBillSum; import com.iformall.enums.*; import com.iformall.exception.MallinkException; @@ -153,11 +154,11 @@ public class WxBillOtherServiceImpl implements WxBillOtherService { } e.setRealReceivePay(servicePay.add(new BigDecimal(e.getReceivePay())).toPlainString()); e.setServiceChargePay(servicePay.toPlainString()); - if (!e.getStatus().equals(EnumBillRentStatus.NOT_PAID.getCode())) { - e.setOwe("0"); + if (!e.getStatus().equals(EnumBillStatus.NOT_PAID.getCode())) { + //e.setOwe("0"); } else { //e.setOwe(servicePay.add(new BigDecimal(e.getReceivePay())).subtract(new BigDecimal(e.getPay())).toPlainString()); - e.setOwe(new BigDecimal(e.getReceivePay()).subtract(new BigDecimal(e.getPay())).toPlainString()); + //e.setOwe(new BigDecimal(e.getReceivePay()).subtract(new BigDecimal(e.getPay())).toPlainString()); } } } @@ -176,8 +177,8 @@ public class WxBillOtherServiceImpl implements WxBillOtherService { public void updateWaidPayStatus(WxBillOther record) { Map params = new HashMap<>(); params.put("tenantId", record.getTenantId()); - params.put("waitPay", EnumBillDailyStatus.WAIT_PAY.getCode()); - params.put("paid", EnumBillRentStatus.PAID.getCode()); + params.put("waitPay", EnumBillStatus.WAIT_PAY.getCode()); + params.put("paid", EnumBillStatus.PAID.getCode()); try { wxBillOtherMapper.updateWaitPayStatus(params); } catch (Exception e) { @@ -191,8 +192,8 @@ public class WxBillOtherServiceImpl implements WxBillOtherService { public void updateNotPaidStatus(WxBillOther record) { Map params = new HashMap<>(); params.put("tenantId", record.getTenantId()); - params.put("notPaid", EnumBillDailyStatus.NOT_PAID.getCode()); - params.put("paid", EnumBillRentStatus.PAID.getCode()); + params.put("notPaid", EnumBillStatus.NOT_PAID.getCode()); + params.put("paid", EnumBillStatus.PAID.getCode()); try { wxBillOtherMapper.updateNotPaidStatus(params); } catch (Exception e) { @@ -209,7 +210,7 @@ public class WxBillOtherServiceImpl implements WxBillOtherService { record.updateTenantInfo(tenantEntity); WxBillOther wxBillOther = getBillOtherPropertyList(1, 1, record, wxPayAccountBill).getList().get(0); //wxBillOther.setOwe(new BigDecimal(wxBillOther.getRealReceivePay()).subtract(new BigDecimal(wxBillOther.getPay())).toPlainString()); - wxBillOther.setOwe(new BigDecimal(wxBillOther.getReceivePay()).subtract(new BigDecimal(wxBillOther.getPay())).toPlainString()); + //wxBillOther.setOwe(new BigDecimal(wxBillOther.getReceivePay()).subtract(new BigDecimal(wxBillOther.getPay())).toPlainString()); wxBillOther.setMerchant(wxMerchantMapper.selectById(wxBillOther.getMerchantId())); // if (wxBillOther.getShopId() != null) { // WxShop shop = new WxShop(); @@ -251,12 +252,12 @@ public class WxBillOtherServiceImpl implements WxBillOtherService { } final IdWorker idWorker = IdWorker.get(); record.setId(idWorker.nextId()); - record.setStatus(record.getReceiveDate().after(date)?EnumBillDailyStatus.WAIT_PAY.getCode():EnumBillDailyStatus.NOT_PAID.getCode()); + record.setStatus(record.getReceiveDate().after(date)?EnumBillStatus.WAIT_PAY.getCode():EnumBillStatus.NOT_PAID.getCode()); record.setCreatetime(date); record.setUpdatetime(date); record.setExpiredDay(0L); //record.setOwe(new BigDecimal(record.getRealReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); - record.setOwe(new BigDecimal(record.getReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); + //record.setOwe(new BigDecimal(record.getReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); record.setIsDel(EnumDelStatus.NOT_DEL.getCode()); try { wxBillOtherMapper.insert(record); @@ -277,16 +278,16 @@ public class WxBillOtherServiceImpl implements WxBillOtherService { if(record.getServiceChargePayUpdate() != null){ wxBillOther.setServiceChargePay(record.getServiceChargePayUpdate()); //wxBillOther.setOwe(new BigDecimal(wxBillOther.getReceivePay()).add(new BigDecimal(wxBillOther.getServiceChargePay())).subtract(new BigDecimal(wxBillOther.getPay())).toPlainString()); - wxBillOther.setOwe(new BigDecimal(wxBillOther.getReceivePay()).subtract(new BigDecimal(wxBillOther.getPay())).toPlainString()); + //wxBillOther.setOwe(new BigDecimal(wxBillOther.getReceivePay()).subtract(new BigDecimal(wxBillOther.getPay())).toPlainString()); }else{ String addpay = wxBillOther.getPay(); wxBillOther.setPayDate(record.getPayDate()); wxBillOther.setPay(record.getPay()); wxBillOther.setReceivePay(record.getReceivePay()); //wxBillOther.setOwe(new BigDecimal(record.getRealReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); - wxBillOther.setOwe(new BigDecimal(record.getReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); + //wxBillOther.setOwe(new BigDecimal(record.getReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); if (record.getPay().equals(record.getRealReceivePay())) { - wxBillOther.setStatus(EnumBillRentStatus.PAID.getCode()); + wxBillOther.setStatus(EnumBillStatus.PAID.getCode()); Date payDate = record.getPayDate(); Date receiveDate = wxBillOther.getReceiveDate(); wxBillOther.setExpiredDay(0L); @@ -348,7 +349,7 @@ public class WxBillOtherServiceImpl implements WxBillOtherService { if(wxBillOther==null){ return new ResultData(ErrorCode.BILL_ROUTINE_IS_NOT_FOUND); } - wxBillOther.setStatus(EnumBillDailyStatus.PAID.getCode()); + wxBillOther.setStatus(EnumBillStatus.PAID.getCode()); Date d =new Date(); wxBillOther.setPayDate(d); wxBillOther.setUpdatetime(d); @@ -385,4 +386,10 @@ public class WxBillOtherServiceImpl implements WxBillOtherService { updateQueryParam(wxBillOther); return wxBillOtherMapper.getMerchantIdList(wxBillOther); } + + @Override + public WxBillHotNotify getBillHotNotify(WxBillOther wxBillOther) { + updateQueryParam(wxBillOther); + return wxBillOtherMapper.getBillHotNotify(wxBillOther); + } } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyDepositServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyDepositServiceImpl.java index 67d47d455..d65a27011 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyDepositServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyDepositServiceImpl.java @@ -15,10 +15,11 @@ import com.iformall.domain.po.WxBillRent; import com.iformall.domain.po.WxMerchant; import com.iformall.domain.po.WxPayAccountBill; import com.iformall.domain.po.WxShop; +import com.iformall.domain.vo.WxBillHotNotify; import com.iformall.domain.vo.WxBillSum; import com.iformall.enums.EnumBillAction; import com.iformall.enums.EnumBillPayWay; -import com.iformall.enums.EnumBillRentStatus; +import com.iformall.enums.EnumBillStatus; import com.iformall.enums.EnumDelStatus; import com.iformall.exception.MallinkException; import com.iformall.mapper.WxBillPropertyDepositMapper; @@ -174,8 +175,8 @@ public class WxBillPropertyDepositServiceImpl implements WxBillPropertyDepositSe public void updateWaidPayStatus(WxBillPropertyDeposit record) { Map params = new HashMap<>(); params.put("tenantId", record.getTenantId()); - params.put("waitPay", EnumBillRentStatus.WAIT_PAY.getCode()); - params.put("paid", EnumBillRentStatus.PAID.getCode()); + params.put("waitPay", EnumBillStatus.WAIT_PAY.getCode()); + params.put("paid", EnumBillStatus.PAID.getCode()); try { wxBillPropertyDepositMapper.updateWaitPayStatus(params); @@ -190,8 +191,8 @@ public class WxBillPropertyDepositServiceImpl implements WxBillPropertyDepositSe public void updateNotPaidStatus(WxBillPropertyDeposit record) { Map params = new HashMap<>(); params.put("tenantId", record.getTenantId()); - params.put("notPaid", EnumBillRentStatus.NOT_PAID.getCode()); - params.put("paid", EnumBillRentStatus.PAID.getCode()); + params.put("notPaid", EnumBillStatus.NOT_PAID.getCode()); + params.put("paid", EnumBillStatus.PAID.getCode()); try { wxBillPropertyDepositMapper.updateNotPaidStatus(params); } catch (Exception e) { @@ -221,7 +222,7 @@ public class WxBillPropertyDepositServiceImpl implements WxBillPropertyDepositSe record.setId(idWorker.nextId()); record.setCreatetime(date); record.setUpdatetime(date); - record.setOwe(new BigDecimal(receivepay).subtract(new BigDecimal(pay)).toPlainString()); + //record.setOwe(new BigDecimal(receivepay).subtract(new BigDecimal(pay)).toPlainString()); record.setIsDel(EnumDelStatus.NOT_DEL.getCode()); try { wxBillPropertyDepositMapper.insert(record); @@ -239,9 +240,9 @@ public class WxBillPropertyDepositServiceImpl implements WxBillPropertyDepositSe String addpay = wxBillDeposit.getPay(); wxBillDeposit.setPay(record.getPay()); wxBillDeposit.setReceivePay(record.getReceivePay()); - wxBillDeposit.setOwe(new BigDecimal(receivepay).subtract(new BigDecimal(pay)).toPlainString()); + //wxBillDeposit.setOwe(new BigDecimal(receivepay).subtract(new BigDecimal(pay)).toPlainString()); if (record.getPay().equals(record.getReceivePay())) { - wxBillDeposit.setStatus(EnumBillRentStatus.PAID.getCode()); + wxBillDeposit.setStatus(EnumBillStatus.PAID.getCode()); Date receiveDate = wxBillDeposit.getReceiveDate(); wxBillDeposit.setExpiredDay(0L); if (date.after(receiveDate)) { @@ -292,7 +293,7 @@ public class WxBillPropertyDepositServiceImpl implements WxBillPropertyDepositSe if(wxBillDeposit==null){ return new ResultData(ErrorCode.BILL_PROPERTY_DEPOSIT_IS_NOT_FOUND); } - wxBillDeposit.setStatus(EnumBillRentStatus.PAID.getCode()); + wxBillDeposit.setStatus(EnumBillStatus.PAID.getCode()); Date d =new Date(); wxBillDeposit.setPayDate(d); wxBillDeposit.setUpdatetime(d); @@ -314,7 +315,7 @@ public class WxBillPropertyDepositServiceImpl implements WxBillPropertyDepositSe } wxBillDeposit.setPayWay(record.getPayWay()); wxBillDeposit.setReturnPrice(record.getReturnPrice()); - wxBillDeposit.setStatus(EnumBillRentStatus.RETURN.getCode()); + wxBillDeposit.setStatus(EnumBillStatus.RETURN.getCode()); wxBillDeposit.setUpdatetime(new Date()); try { wxBillPropertyDepositMapper.updateById(wxBillDeposit); @@ -351,7 +352,7 @@ public class WxBillPropertyDepositServiceImpl implements WxBillPropertyDepositSe return new ResultData(ErrorCode.BILL_OTHER_DEPOSIT_IS_NOT_FOUND); } wxBillDeposit.setReceivePay(record.getReceivePay()); - wxBillDeposit.setOwe(new BigDecimal(record.getReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); + //wxBillDeposit.setOwe(new BigDecimal(record.getReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); wxBillDeposit.setUpdatetime(new Date()); try { wxBillPropertyDepositMapper.updateById(wxBillDeposit); @@ -374,5 +375,9 @@ public class WxBillPropertyDepositServiceImpl implements WxBillPropertyDepositSe return wxBillPropertyDepositMapper.getMerchantIdList(deposit); } - + @Override + public WxBillHotNotify getBillHotNotify(WxBillPropertyDeposit deposit) { + updateQueryParam(deposit); + return wxBillPropertyDepositMapper.getBillHotNotify(deposit); + } } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyServiceImpl.java index 407897e11..be1de85b3 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyServiceImpl.java @@ -10,6 +10,7 @@ import com.iformall.common.ResultData; import com.iformall.domain.po.*; import com.iformall.domain.po.base.BaseEntity; import com.iformall.domain.po.base.TenantEntity; +import com.iformall.domain.vo.WxBillHotNotify; import com.iformall.domain.vo.WxBillSum; import com.iformall.enums.*; import com.iformall.exception.MallinkException; @@ -221,11 +222,11 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService { BigDecimal realReceivePay = servicePay.add(new BigDecimal(e.getLatePayPrice())).add(new BigDecimal(e.getReceivePay())); e.setRealReceivePay(realReceivePay.toPlainString()); e.setServiceChargePay(servicePay.toPlainString()); - if (!e.getStatus().equals(EnumBillRentStatus.NOT_PAID.getCode())) { - e.setOwe("0"); + if (!e.getStatus().equals(EnumBillStatus.NOT_PAID.getCode())) { + //e.setOwe("0"); } else { //e.setOwe(realReceivePay.subtract(new BigDecimal(e.getPay())).toPlainString()); - e.setOwe(new BigDecimal(e.getReceivePay()).subtract(new BigDecimal(e.getPay())).toPlainString()); + //e.setOwe(new BigDecimal(e.getReceivePay()).subtract(new BigDecimal(e.getPay())).toPlainString()); } } } @@ -244,8 +245,8 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService { public void updateWaidPayStatus(WxBillProperty record) { Map params = new HashMap<>(); params.put("tenantId", record.getTenantId()); - params.put("waitPay", EnumBillRentStatus.WAIT_PAY.getCode()); - params.put("paid", EnumBillRentStatus.PAID.getCode()); + params.put("waitPay", EnumBillStatus.WAIT_PAY.getCode()); + params.put("paid", EnumBillStatus.PAID.getCode()); try { wxBillPropertyMapper.updateWaitPayStatus(params); @@ -260,8 +261,8 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService { public void updateNotPaidStatus(WxBillProperty record) { Map params = new HashMap<>(); params.put("tenantId", record.getTenantId()); - params.put("notPaid", EnumBillRentStatus.NOT_PAID.getCode()); - params.put("paid", EnumBillRentStatus.PAID.getCode()); + params.put("notPaid", EnumBillStatus.NOT_PAID.getCode()); + params.put("paid", EnumBillStatus.PAID.getCode()); try { wxBillPropertyMapper.updateNotPaidStatus(params); } catch (Exception e) { @@ -280,7 +281,7 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService { PageInfo page = getBillPropertyList(1, 10000, wxPayAccountBill, record); WxBillProperty property = page.getList().get(0); //property.setOwe(new BigDecimal(property.getRealReceivePay()).subtract(new BigDecimal(property.getPay())).toPlainString()); - property.setOwe(new BigDecimal(property.getReceivePay()).subtract(new BigDecimal(property.getPay())).toPlainString()); + //property.setOwe(new BigDecimal(property.getReceivePay()).subtract(new BigDecimal(property.getPay())).toPlainString()); return property; } @@ -300,7 +301,7 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService { record.setCreatetime(date); record.setUpdatetime(date); //record.setOwe(new BigDecimal(record.getRealReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); - record.setOwe(new BigDecimal(record.getReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); + //record.setOwe(new BigDecimal(record.getReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); record.setIsDel(EnumDelStatus.NOT_DEL.getCode()); try { wxBillPropertyMapper.insert(record); @@ -323,7 +324,7 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService { String latePayPrice = StringUtils.isBlank(property.getLatePayPrice()) ? "0" : property.getLatePayPrice(); //property.setOwe(new BigDecimal(property.getReceivePay()).add(new BigDecimal(latePayPrice)) // .add(new BigDecimal(property.getServiceChargePay())).subtract(new BigDecimal(property.getPay())).toPlainString()); - property.setOwe(new BigDecimal(property.getReceivePay()).subtract(new BigDecimal(property.getPay())).toPlainString()); + //property.setOwe(new BigDecimal(property.getReceivePay()).subtract(new BigDecimal(property.getPay())).toPlainString()); } else { String addpay = property.getPay(); property.setRevenue(record.getRevenue()); @@ -334,9 +335,9 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService { property.setPay(record.getPay()); property.setReceivePay(record.getReceivePay()); //property.setOwe(new BigDecimal(record.getRealReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); - property.setOwe(new BigDecimal(record.getReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); + //property.setOwe(new BigDecimal(record.getReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); if (record.getPay().equals(record.getRealReceivePay())) { - property.setStatus(EnumBillRentStatus.PAID.getCode()); + property.setStatus(EnumBillStatus.PAID.getCode()); Date payDate = record.getPayDate(); Date receiveDate = property.getReceiveDate(); property.setExpiredDay(0L); @@ -410,7 +411,7 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService { if (record == null) { return new ResultData(ErrorCode.BILL_PROPERTY_IS_NOT_FOUND); } - record.setStatus(EnumBillRentStatus.PAID.getCode()); + record.setStatus(EnumBillStatus.PAID.getCode()); Date d = new Date(); record.setPayDate(d); record.setUpdatetime(d); @@ -446,7 +447,7 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService { @Override public ResultData updateLatePayStatus(WxBillProperty record) { - record.setLatePayStatus(EnumBillDailyStatus.PAID.getCode()); + record.setLatePayStatus(EnumBillStatus.PAID.getCode()); record.setUpdatetime(new Date()); try { wxBillPropertyMapper.updateById(record); @@ -502,7 +503,7 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService { property.setLatePayPrice(record.getLatePayMoneyUpdate()); //property.setOwe(new BigDecimal(property.getReceivePay()).add(new BigDecimal(property.getLatePayPrice())) // .add(new BigDecimal(property.getServiceChargePay())).subtract(new BigDecimal(property.getPay())).toPlainString()); - property.setOwe(new BigDecimal(property.getReceivePay()).subtract(new BigDecimal(property.getPay())).toPlainString()); + //property.setOwe(new BigDecimal(property.getReceivePay()).subtract(new BigDecimal(property.getPay())).toPlainString()); final IdWorker idWorker = IdWorker.get(); WxBillAction billAction = new WxBillAction(); billAction.setId(idWorker.nextId()); @@ -529,4 +530,10 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService { updateQueryParam(wxBillProperty); return wxBillPropertyMapper.getMerchantIdList(wxBillProperty); } + + @Override + public WxBillHotNotify getBillHotNotify(WxBillProperty wxBillProperty) { + updateQueryParam(wxBillProperty); + return wxBillPropertyMapper.getBillHotNotify(wxBillProperty); + } } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxBillRentManageServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxBillRentManageServiceImpl.java index 2441347e8..2cae0e4cc 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxBillRentManageServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxBillRentManageServiceImpl.java @@ -16,6 +16,7 @@ import com.iformall.domain.po.WxMerchant; import com.iformall.domain.po.WxPayAccountBill; import com.iformall.domain.po.WxRentContract; import com.iformall.domain.po.base.TenantEntity; +import com.iformall.domain.vo.WxBillHotNotify; import com.iformall.domain.vo.WxBillSum; import com.iformall.enums.*; import com.iformall.exception.MallinkException; @@ -174,7 +175,7 @@ public class WxBillRentManageServiceImpl implements WxBillRentManageService { record.setId(idWorker.nextId()); record.setCreatetime(date); record.setUpdatetime(date); - record.setOwe(new BigDecimal(receivepay).subtract(new BigDecimal(pay)).toPlainString()); + //record.setOwe(new BigDecimal(receivepay).subtract(new BigDecimal(pay)).toPlainString()); record.setIsDel(EnumDelStatus.NOT_DEL.getCode()); try { wxBillRentManageMapper.insert(record); @@ -197,7 +198,7 @@ public class WxBillRentManageServiceImpl implements WxBillRentManageService { String latePayPrice = StringUtils.isBlank(wxBillRent.getLatePayPrice()) ? "0" : wxBillRent.getLatePayPrice(); //wxBillRent.setOwe(new BigDecimal(wxBillRent.getReceivePay()).add(new BigDecimal(latePayPrice)).add(new BigDecimal(wxBillRent.getServiceChargePay())) // .subtract(new BigDecimal(wxBillRent.getPay())).toPlainString()); - wxBillRent.setOwe(new BigDecimal(wxBillRent.getReceivePay()).subtract(new BigDecimal(wxBillRent.getPay())).toPlainString()); + //wxBillRent.setOwe(new BigDecimal(wxBillRent.getReceivePay()).subtract(new BigDecimal(wxBillRent.getPay())).toPlainString()); }else{ String addpay = wxBillRent.getPay(); wxBillRent.setLatePayRatio(record.getLatePayRatio()); @@ -205,9 +206,9 @@ public class WxBillRentManageServiceImpl implements WxBillRentManageService { wxBillRent.setLatePayStatus(record.getLatePayStatus()); wxBillRent.setPay(record.getPay()); wxBillRent.setReceivePay(record.getReceivePay()); - wxBillRent.setOwe(new BigDecimal(receivepay).subtract(new BigDecimal(pay)).toPlainString()); + //wxBillRent.setOwe(new BigDecimal(receivepay).subtract(new BigDecimal(pay)).toPlainString()); if (record.getPay().equals(record.getRealReceivePay())) { - wxBillRent.setStatus(EnumBillRentStatus.PAID.getCode()); + wxBillRent.setStatus(EnumBillStatus.PAID.getCode()); Date payDate = record.getPayDate(); Date receiveDate = wxBillRent.getReceiveDate(); wxBillRent.setExpiredDay(0L); @@ -263,7 +264,7 @@ public class WxBillRentManageServiceImpl implements WxBillRentManageService { PageInfo page = getBillRentManageList(1, 1, record, wxPayAccountBill); WxBillRentManage rentManage = page.getList().get(0); //rentManage.setOwe(new BigDecimal(rentManage.getRealReceivePay()).subtract(new BigDecimal(rentManage.getPay())).toPlainString()); - rentManage.setOwe(new BigDecimal(rentManage.getReceivePay()).subtract(new BigDecimal(rentManage.getPay())).toPlainString()); + //rentManage.setOwe(new BigDecimal(rentManage.getReceivePay()).subtract(new BigDecimal(rentManage.getPay())).toPlainString()); return rentManage; } @@ -288,11 +289,11 @@ public class WxBillRentManageServiceImpl implements WxBillRentManageService { BigDecimal realReceivePay = servicePay.add(new BigDecimal(rent.getLatePayPrice()).add(new BigDecimal(rent.getReceivePay()))); rent.setRealReceivePay(realReceivePay.toPlainString()); rent.setServiceChargePay(servicePay.toPlainString()); - if (!rent.getStatus().equals(EnumBillRentStatus.NOT_PAID.getCode())) { - rent.setOwe("0"); + if (!rent.getStatus().equals(EnumBillStatus.NOT_PAID.getCode())) { + //rent.setOwe("0"); } else { //rent.setOwe(realReceivePay.subtract(new BigDecimal(rent.getPay())).toPlainString()); - rent.setOwe(new BigDecimal(rent.getReceivePay()).subtract(new BigDecimal(rent.getPay())).toPlainString()); + //rent.setOwe(new BigDecimal(rent.getReceivePay()).subtract(new BigDecimal(rent.getPay())).toPlainString()); } } } @@ -303,7 +304,7 @@ public class WxBillRentManageServiceImpl implements WxBillRentManageService { if(record.getLatePayMoneyUpdate() != null) { rent.setLatePayPrice(record.getLatePayMoneyUpdate()); //rent.setOwe(new BigDecimal(rent.getReceivePay()).add(new BigDecimal(rent.getLatePayPrice())).add(new BigDecimal(rent.getServiceChargePay())).subtract(new BigDecimal(rent.getPay())).toPlainString()); - rent.setOwe(new BigDecimal(rent.getReceivePay()).subtract(new BigDecimal(rent.getPay())).toPlainString()); + //rent.setOwe(new BigDecimal(rent.getReceivePay()).subtract(new BigDecimal(rent.getPay())).toPlainString()); final IdWorker idWorker = IdWorker.get(); WxBillAction billAction = new WxBillAction(); billAction.setId(idWorker.nextId()); @@ -333,8 +334,8 @@ public class WxBillRentManageServiceImpl implements WxBillRentManageService { public void updateWaidPayStatus(WxBillRentManage record) { Map params = new HashMap<>(); params.put("tenantId", record.getTenantId()); - params.put("waitPay", EnumBillRentStatus.WAIT_PAY.getCode()); - params.put("paid", EnumBillRentStatus.PAID.getCode()); + params.put("waitPay", EnumBillStatus.WAIT_PAY.getCode()); + params.put("paid", EnumBillStatus.PAID.getCode()); try { wxBillRentManageMapper.updateWaitPayStatus(params); @@ -349,8 +350,8 @@ public class WxBillRentManageServiceImpl implements WxBillRentManageService { public void updateNotPaidStatus(WxBillRentManage record) { Map params = new HashMap<>(); params.put("tenantId", record.getTenantId()); - params.put("notPaid", EnumBillRentStatus.NOT_PAID.getCode()); - params.put("paid", EnumBillRentStatus.PAID.getCode()); + params.put("notPaid", EnumBillStatus.NOT_PAID.getCode()); + params.put("paid", EnumBillStatus.PAID.getCode()); try { wxBillRentManageMapper.updateNotPaidStatus(params); } catch (Exception e) { @@ -371,7 +372,7 @@ public class WxBillRentManageServiceImpl implements WxBillRentManageService { if(wxBillDeposit==null){ return new ResultData(ErrorCode.BILL_RENT_DEPOSIT_IS_NOT_FOUND); } - wxBillDeposit.setStatus(EnumBillRentStatus.PAID.getCode()); + wxBillDeposit.setStatus(EnumBillStatus.PAID.getCode()); Date d =new Date(); wxBillDeposit.setPayDate(d); wxBillDeposit.setUpdatetime(d); @@ -386,7 +387,7 @@ public class WxBillRentManageServiceImpl implements WxBillRentManageService { @Override public ResultData updateLatePayStatus(WxBillRentManage record) { - record.setLatePayStatus(EnumBillDailyStatus.PAID.getCode()); + record.setLatePayStatus(EnumBillStatus.PAID.getCode()); record.setUpdatetime(new Date()); try { wxBillRentManageMapper.updateById(record); @@ -444,5 +445,11 @@ public class WxBillRentManageServiceImpl implements WxBillRentManageService { updateQueryParam(wxBillRentManage); return wxBillRentManageMapper.getMerchantIdList(wxBillRentManage); } + + @Override + public WxBillHotNotify getBillHotNotify(WxBillRentManage wxBillRentManage) { + updateQueryParam(wxBillRentManage); + return wxBillRentManageMapper.getBillHotNotify(wxBillRentManage); + } } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxBillRentServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxBillRentServiceImpl.java index 0ec8abe2b..bd0dba75b 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxBillRentServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxBillRentServiceImpl.java @@ -10,6 +10,7 @@ import com.iformall.common.ResultData; import com.iformall.domain.po.*; import com.iformall.domain.po.base.TenantEntity; import com.iformall.domain.vo.RatioVo; +import com.iformall.domain.vo.WxBillHotNotify; import com.iformall.domain.vo.WxBillSum; import com.iformall.enums.*; import com.iformall.exception.MallinkException; @@ -91,11 +92,11 @@ public class WxBillRentServiceImpl implements WxBillRentService { BigDecimal realReceivePay = servicePay.add(new BigDecimal(rent.getLatePayPrice())).add(new BigDecimal(rent.getReceivePay())); rent.setRealReceivePay(realReceivePay.toPlainString()); rent.setServiceChargePay(servicePay.toPlainString()); - if (!rent.getStatus().equals(EnumBillRentStatus.NOT_PAID.getCode())) { - rent.setOwe("0"); + if (!rent.getStatus().equals(EnumBillStatus.NOT_PAID.getCode())) { + //rent.setOwe("0"); } else { //rent.setOwe(realReceivePay.subtract(new BigDecimal(rent.getPay())).toPlainString()); - rent.setOwe(new BigDecimal(rent.getReceivePay()).subtract(new BigDecimal(rent.getPay())).toPlainString()); + //rent.setOwe(new BigDecimal(rent.getReceivePay()).subtract(new BigDecimal(rent.getPay())).toPlainString()); } } } @@ -114,8 +115,8 @@ public class WxBillRentServiceImpl implements WxBillRentService { public void updateWaidPayStatus(WxBillRent record) { Map params = new HashMap<>(); params.put("tenantId", record.getTenantId()); - params.put("waitPay", EnumBillRentStatus.WAIT_PAY.getCode()); - params.put("paid", EnumBillRentStatus.PAID.getCode()); + params.put("waitPay", EnumBillStatus.WAIT_PAY.getCode()); + params.put("paid", EnumBillStatus.PAID.getCode()); try { wxBillRentMapper.updateWaitPayStatus(params); @@ -130,8 +131,8 @@ public class WxBillRentServiceImpl implements WxBillRentService { public void updateNotPaidStatus(WxBillRent record) { Map params = new HashMap<>(); params.put("tenantId", record.getTenantId()); - params.put("notPaid", EnumBillRentStatus.NOT_PAID.getCode()); - params.put("paid", EnumBillRentStatus.PAID.getCode()); + params.put("notPaid", EnumBillStatus.NOT_PAID.getCode()); + params.put("paid", EnumBillStatus.PAID.getCode()); try { wxBillRentMapper.updateNotPaidStatus(params); } catch (Exception e) { @@ -151,7 +152,7 @@ public class WxBillRentServiceImpl implements WxBillRentService { //手续费 = 合同应收+手续费+滞纳金 //computeTotalMoney(wxPayAccountBill, rent); //rent.setOwe(new BigDecimal(rent.getRealReceivePay()).subtract(new BigDecimal(rent.getPay())).toPlainString()); - rent.setOwe(new BigDecimal(rent.getReceivePay()).subtract(new BigDecimal(rent.getPay())).toPlainString()); + //rent.setOwe(new BigDecimal(rent.getReceivePay()).subtract(new BigDecimal(rent.getPay())).toPlainString()); return rent; } @@ -170,7 +171,7 @@ public class WxBillRentServiceImpl implements WxBillRentService { record.setId(idWorker.nextId()); record.setCreatetime(date); record.setUpdatetime(date); - record.setOwe(new BigDecimal(receivepay).subtract(new BigDecimal(pay)).toPlainString()); + //record.setOwe(new BigDecimal(receivepay).subtract(new BigDecimal(pay)).toPlainString()); record.setIsDel(EnumDelStatus.NOT_DEL.getCode()); try { wxBillRentMapper.insert(record); @@ -193,7 +194,7 @@ public class WxBillRentServiceImpl implements WxBillRentService { String latePayPrice = StringUtils.isBlank(wxBillRent.getLatePayPrice()) ? "0" : wxBillRent.getLatePayPrice(); //wxBillRent.setOwe(new BigDecimal(wxBillRent.getReceivePay()).add(new BigDecimal(latePayPrice)) // .add(new BigDecimal(wxBillRent.getServiceChargePay())).subtract(new BigDecimal(wxBillRent.getPay())).toPlainString()); - wxBillRent.setOwe(new BigDecimal(wxBillRent.getReceivePay()).subtract(new BigDecimal(wxBillRent.getPay())).toPlainString()); + //wxBillRent.setOwe(new BigDecimal(wxBillRent.getReceivePay()).subtract(new BigDecimal(wxBillRent.getPay())).toPlainString()); }else{ String addpay = wxBillRent.getPay(); wxBillRent.setRevenue(record.getRevenue()); @@ -203,9 +204,9 @@ public class WxBillRentServiceImpl implements WxBillRentService { wxBillRent.setPay(record.getPay()); wxBillRent.setReceivePay(record.getReceivePay()); //wxBillRent.setOwe(new BigDecimal(record.getRealReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); - wxBillRent.setOwe(new BigDecimal(record.getReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); + //wxBillRent.setOwe(new BigDecimal(record.getReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); if (record.getPay().equals(record.getRealReceivePay())) { - wxBillRent.setStatus(EnumBillRentStatus.PAID.getCode()); + wxBillRent.setStatus(EnumBillStatus.PAID.getCode()); Date payDate = record.getPayDate(); Date receiveDate = wxBillRent.getReceiveDate(); wxBillRent.setExpiredDay(0L); @@ -270,7 +271,7 @@ public class WxBillRentServiceImpl implements WxBillRentService { if(wxBillRent==null){ return new ResultData(ErrorCode.BILL_RENT_IS_NOT_FOUND); } - wxBillRent.setStatus(EnumBillRentStatus.PAID.getCode()); + wxBillRent.setStatus(EnumBillStatus.PAID.getCode()); Date d =new Date(); wxBillRent.setPayDate(d); wxBillRent.setUpdatetime(d); @@ -395,7 +396,7 @@ public class WxBillRentServiceImpl implements WxBillRentService { wxBillRent.setUpdatetime(new Date()); String latePayPrice = StringUtils.isBlank(wxBillRent.getLatePayPrice()) ? "0" : wxBillRent.getLatePayPrice(); //wxBillRent.setOwe(new BigDecimal(newPrice).add(new BigDecimal(wxBillRent.getServiceChargePay())).add(new BigDecimal(latePayPrice)).subtract(new BigDecimal(wxBillRent.getPay())).toPlainString()); - wxBillRent.setOwe(new BigDecimal(newPrice).subtract(new BigDecimal(wxBillRent.getPay())).toPlainString()); + //wxBillRent.setOwe(new BigDecimal(newPrice).subtract(new BigDecimal(wxBillRent.getPay())).toPlainString()); wxBillRentMapper.updateById(wxBillRent); if (!oldPrice.equals(newPrice)) { @@ -422,7 +423,7 @@ public class WxBillRentServiceImpl implements WxBillRentService { @Override public ResultData updateLatePayStatus(WxBillRent record) { - record.setLatePayStatus(EnumBillDailyStatus.PAID.getCode()); + record.setLatePayStatus(EnumBillStatus.PAID.getCode()); record.setUpdatetime(new Date()); try { wxBillRentMapper.updateById(record); @@ -588,7 +589,7 @@ public class WxBillRentServiceImpl implements WxBillRentService { if(record.getLatePayMoneyUpdate() != null) { rent.setLatePayPrice(record.getLatePayMoneyUpdate()); //rent.setOwe(new BigDecimal(rent.getReceivePay()).add(new BigDecimal(rent.getLatePayPrice())).add(new BigDecimal(rent.getServiceChargePay())).subtract(new BigDecimal(rent.getPay())).toPlainString()); - rent.setOwe(new BigDecimal(rent.getReceivePay()).subtract(new BigDecimal(rent.getPay())).toPlainString()); + //rent.setOwe(new BigDecimal(rent.getReceivePay()).subtract(new BigDecimal(rent.getPay())).toPlainString()); final IdWorker idWorker = IdWorker.get(); WxBillAction billAction = new WxBillAction(); billAction.setId(idWorker.nextId()); @@ -615,4 +616,10 @@ public class WxBillRentServiceImpl implements WxBillRentService { updateQueryParam(wxBillRent); return wxBillRentMapper.getMerchantIdList(wxBillRent); } + + @Override + public WxBillHotNotify getBillHotNotify(WxBillRent wxBillRent) { + updateQueryParam(wxBillRent); + return wxBillRentMapper.getBillHotNotify(wxBillRent); + } } 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 7d8b6810d..49b20454b 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxBillSettleServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxBillSettleServiceImpl.java @@ -181,15 +181,16 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { if(status != null){ wxBillRent.setStatus(status); } - if(EnumBillRentStatus.PAID.getCode().equals(status)){ + if(EnumBillStatus.PAID.getCode().equals(status)){ wxBillRent.setPayDate(new Date()); WxBillRent dbBill = wxBillRentMapper.selectById(wxBillRent.getId()); if(dbBill!=null) { if(StringUtils.isBlank(dbBill.getPay())) dbBill.setPay("0"); - if(StringUtils.isBlank(dbBill.getOwe())) dbBill.setOwe("0"); - wxBillRent.setPay(new BigDecimal(dbBill.getPay()).add(new BigDecimal(dbBill.getOwe())).toPlainString()); + //if(StringUtils.isBlank(dbBill.getOwe())) dbBill.setOwe("0"); + //wxBillRent.setPay(new BigDecimal(dbBill.getPay()).add(new BigDecimal(dbBill.getOwe())).toPlainString()); + wxBillRent.setPay(new BigDecimal(dbBill.getPay()).toPlainString()); wxBillRent.setPayDate(new Date()); - addBillAction(bill.getBillId(), dbBill.getOwe()); + //addBillAction(bill.getBillId(), dbBill.getOwe()); } } wxBillRentMapper.updateById(wxBillRent); @@ -207,7 +208,7 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { if(status != null){ wxBillRent.setStatus(status); } - if(EnumBillRentStatus.PAID.getCode().equals(status)){ + if(EnumBillStatus.PAID.getCode().equals(status)){ wxBillRent.setPayDate(new Date()); WxBillDeposit dbBill = wxBillDepositMapper.selectById(wxBillRent.getId()); if(dbBill!=null) { @@ -216,11 +217,11 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { wxBillRent.setPay(new BigDecimal(dbBill.getPay()).add(new BigDecimal(dbBill.getReceivePay())).toPlainString()); //押金是ReceivePay wxBillRent.setPayDate(new Date()); if(EnumSettleBillType.R.getCode().equals(bill.getType())){ - wxBillRent.setStatus(EnumBillRentStatus.PAID.getCode()); + wxBillRent.setStatus(EnumBillStatus.PAID.getCode()); }else{ - wxBillRent.setStatus(EnumBillRentStatus.RETURN.getCode()); + wxBillRent.setStatus(EnumBillStatus.RETURN.getCode()); } - addBillAction(bill.getBillId(), dbBill.getOwe()); + //addBillAction(bill.getBillId(), dbBill.getOwe()); } } wxBillDepositMapper.updateById(wxBillRent); @@ -238,7 +239,7 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { if(status != null){ wxBillOtherDeposit.setStatus(status); } - if(EnumBillRentStatus.PAID.getCode().equals(status)){ + if(EnumBillStatus.PAID.getCode().equals(status)){ wxBillOtherDeposit.setPayDate(new Date()); WxBillOtherDeposit dbBill = wxBillOtherDepositMapper.selectById(wxBillRent.getId()); if(dbBill!=null) { @@ -247,11 +248,11 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { wxBillOtherDeposit.setPay(dbBill.getPay()+ dbBill.getReceivePay()); wxBillOtherDeposit.setPayDate(new Date()); if(EnumSettleBillType.R.getCode().equals(bill.getType())){ - wxBillOtherDeposit.setStatus(EnumBillRentStatus.PAID.getCode()); + wxBillOtherDeposit.setStatus(EnumBillStatus.PAID.getCode()); }else{ - wxBillOtherDeposit.setStatus(EnumBillRentStatus.RETURN.getCode()); + wxBillOtherDeposit.setStatus(EnumBillStatus.RETURN.getCode()); } - addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); + //addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); } } wxBillOtherDepositMapper.updateById(wxBillOtherDeposit); @@ -269,7 +270,7 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { if(status != null){ propertyDeposit.setStatus(status); } - if(EnumBillRentStatus.PAID.getCode().equals(status)){ + if(EnumBillStatus.PAID.getCode().equals(status)){ propertyDeposit.setPayDate(new Date()); WxBillPropertyDeposit dbBill = wxBillPropertyDepositMapper.selectById(wxBillRent.getId()); if(dbBill!=null) { @@ -278,11 +279,11 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { propertyDeposit.setPay(new BigDecimal(dbBill.getPay()).add(new BigDecimal(dbBill.getReceivePay())).toPlainString()); propertyDeposit.setPayDate(new Date()); if(EnumSettleBillType.R.getCode().equals(bill.getType())){ - propertyDeposit.setStatus(EnumBillRentStatus.PAID.getCode()); + propertyDeposit.setStatus(EnumBillStatus.PAID.getCode()); }else{ - propertyDeposit.setStatus(EnumBillRentStatus.RETURN.getCode()); + propertyDeposit.setStatus(EnumBillStatus.RETURN.getCode()); } - addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); + //addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); } } wxBillPropertyDepositMapper.updateById(propertyDeposit); @@ -301,15 +302,16 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { if(status != null){ wxBillRent.setStatus(status); } - if(EnumBillRentStatus.PAID.getCode().equals(status)){ + if(EnumBillStatus.PAID.getCode().equals(status)){ wxBillRent.setPayDate(new Date()); WxBillProperty dbBill = wxBillPropertyMapper.selectById(wxBillRent.getId()); if(dbBill!=null) { if(StringUtils.isBlank(dbBill.getPay())) dbBill.setPay("0"); - if(StringUtils.isBlank(dbBill.getOwe())) dbBill.setOwe("0"); - wxBillRent.setPay(new BigDecimal(dbBill.getPay()).add(new BigDecimal(dbBill.getOwe())).toPlainString()); + //if(StringUtils.isBlank(dbBill.getOwe())) dbBill.setOwe("0"); + //wxBillRent.setPay(new BigDecimal(dbBill.getPay()).add(new BigDecimal(dbBill.getOwe())).toPlainString()); + wxBillRent.setPay(new BigDecimal(dbBill.getPay()).toPlainString()); wxBillRent.setPayDate(new Date()); - addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); + //addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); } } wxBillPropertyMapper.updateById(wxBillRent); @@ -327,7 +329,7 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { if(status != null){ propertyDeposit.setStatus(status); } - if(EnumBillRentStatus.PAID.getCode().equals(status)){ + if(EnumBillStatus.PAID.getCode().equals(status)){ propertyDeposit.setPayDate(new Date()); WxBillPropertyDeposit dbBill = wxBillPropertyDepositMapper.selectById(wxBillRent.getId()); if(dbBill!=null) { @@ -336,11 +338,11 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { propertyDeposit.setPay(new BigDecimal(dbBill.getPay()).add(new BigDecimal(dbBill.getReceivePay())).toPlainString()); propertyDeposit.setPayDate(new Date()); if(EnumSettleBillType.R.getCode().equals(bill.getType())){ - propertyDeposit.setStatus(EnumBillRentStatus.PAID.getCode()); + propertyDeposit.setStatus(EnumBillStatus.PAID.getCode()); }else{ - propertyDeposit.setStatus(EnumBillRentStatus.RETURN.getCode()); + propertyDeposit.setStatus(EnumBillStatus.RETURN.getCode()); } - addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); + //addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); } } wxBillPropertyDepositMapper.updateById(propertyDeposit); @@ -358,15 +360,16 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { if(status != null){ wxBillRent.setStatus(status); } - if(EnumBillRentStatus.PAID.getCode().equals(status)){ + if(EnumBillStatus.PAID.getCode().equals(status)){ wxBillRent.setPayDate(new Date()); WxBillOther dbBill = wxBillOtherMapper.selectById(wxBillRent.getId()); if(dbBill!=null) { if(StringUtils.isBlank(dbBill.getPay())) dbBill.setPay("0"); - if(StringUtils.isBlank(dbBill.getOwe())) dbBill.setOwe("0"); - wxBillRent.setPay(new BigDecimal(dbBill.getPay()).add(new BigDecimal(dbBill.getOwe())).toPlainString()); + //if(StringUtils.isBlank(dbBill.getOwe())) dbBill.setOwe("0"); + //wxBillRent.setPay(new BigDecimal(dbBill.getPay()).add(new BigDecimal(dbBill.getOwe())).toPlainString()); + wxBillRent.setPay(new BigDecimal(dbBill.getPay()).toPlainString()); wxBillRent.setPayDate(new Date()); - addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); + //addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); } } wxBillOtherMapper.updateById(wxBillRent); @@ -384,7 +387,7 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { if(status != null){ wxBillRent.setStatus(status); } - if(EnumBillRentStatus.PAID.getCode().equals(status)){ + if(EnumBillStatus.PAID.getCode().equals(status)){ wxBillRent.setPayDate(new Date()); WxBillOtherDeposit dbBill = wxBillOtherDepositMapper.selectById(wxBillRent.getId()); if(dbBill!=null) { @@ -393,11 +396,11 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { wxBillRent.setPay(new BigDecimal(dbBill.getPay()).add(new BigDecimal(dbBill.getReceivePay())).toPlainString()); wxBillRent.setPayDate(new Date()); if(EnumSettleBillType.R.getCode().equals(bill.getType())){ - wxBillRent.setStatus(EnumBillRentStatus.PAID.getCode()); + wxBillRent.setStatus(EnumBillStatus.PAID.getCode()); }else{ - wxBillRent.setStatus(EnumBillRentStatus.RETURN.getCode()); + wxBillRent.setStatus(EnumBillStatus.RETURN.getCode()); } - addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); + //addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); } } wxBillOtherDepositMapper.updateById(wxBillRent); @@ -423,7 +426,7 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { if(status != null){ wxBillRent.setStatus(status); } - if(EnumBillRentStatus.PAID.getCode().equals(status)){ + if(EnumBillStatus.PAID.getCode().equals(status)){ wxBillRent.setPayDate(new Date()); WxBillOtherDeposit dbBill = wxBillOtherDepositMapper.selectById(wxBillRent.getId()); if(dbBill!=null) { @@ -432,11 +435,11 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { wxBillRent.setPay(new BigDecimal(dbBill.getPay()).add(new BigDecimal(dbBill.getReceivePay())).toPlainString()); wxBillRent.setPayDate(new Date()); if(EnumSettleBillType.R.getCode().equals(bill.getType())){ - wxBillRent.setStatus(EnumBillRentStatus.PAID.getCode()); + wxBillRent.setStatus(EnumBillStatus.PAID.getCode()); }else{ - wxBillRent.setStatus(EnumBillRentStatus.RETURN.getCode()); + wxBillRent.setStatus(EnumBillStatus.RETURN.getCode()); } - addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); + //addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); } } wxBillOtherDepositMapper.updateById(wxBillRent); @@ -454,15 +457,16 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { if(status != null){ wxBillDaily.setStatus(status); } - if(EnumBillRentStatus.PAID.getCode().equals(status)){ + if(EnumBillStatus.PAID.getCode().equals(status)){ wxBillDaily.setPayDate(new Date()); WxBillDaily dbBill = wxBillDailyMapper.selectById(wxBillDaily.getId()); if(dbBill!=null) { if(StringUtils.isBlank(dbBill.getPay())) dbBill.setPay("0"); - if(StringUtils.isBlank(dbBill.getOwe())) dbBill.setOwe("0"); - wxBillDaily.setPay(new BigDecimal(dbBill.getPay()).add(new BigDecimal(dbBill.getOwe())).toPlainString()); + //if(StringUtils.isBlank(dbBill.getOwe())) dbBill.setOwe("0"); + //wxBillDaily.setPay(new BigDecimal(dbBill.getPay()).add(new BigDecimal(dbBill.getOwe())).toPlainString()); + wxBillDaily.setPay(new BigDecimal(dbBill.getPay()).toPlainString()); wxBillDaily.setPayDate(new Date()); - addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); + //addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); } } wxBillDailyMapper.updateById(wxBillDaily); @@ -480,15 +484,16 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { if(status != null){ wxBillRent.setStatus(status); } - if(EnumBillRentStatus.PAID.getCode().equals(status)){ + if(EnumBillStatus.PAID.getCode().equals(status)){ wxBillRent.setPayDate(new Date()); WxBillOther dbBill = wxBillOtherMapper.selectById(wxBillRent.getId()); if(dbBill!=null) { if(StringUtils.isBlank(dbBill.getPay())) dbBill.setPay("0"); - if(StringUtils.isBlank(dbBill.getOwe())) dbBill.setOwe("0"); - wxBillRent.setPay(new BigDecimal(dbBill.getPay()).add(new BigDecimal(dbBill.getOwe())).toPlainString()); + //if(StringUtils.isBlank(dbBill.getOwe())) dbBill.setOwe("0"); + //wxBillRent.setPay(new BigDecimal(dbBill.getPay()).add(new BigDecimal(dbBill.getOwe())).toPlainString()); + wxBillRent.setPay(new BigDecimal(dbBill.getPay()).toPlainString()); wxBillRent.setPayDate(new Date()); - addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); + //addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); } } wxBillOtherMapper.updateById(wxBillRent); @@ -506,18 +511,18 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { if(status != null){ propertyDeposit.setStatus(status); } - if(EnumBillRentStatus.PAID.getCode().equals(status)){ + if(EnumBillStatus.PAID.getCode().equals(status)){ propertyDeposit.setPayDate(new Date()); WxBillPropertyDeposit dbBill = wxBillPropertyDepositMapper.selectById(wxBillRent.getId()); if(dbBill!=null) { propertyDeposit.setPay(dbBill.getPay()+dbBill.getReceivePay()); propertyDeposit.setPayDate(new Date()); if(EnumSettleBillType.R.getCode().equals(bill.getType())){ - propertyDeposit.setStatus(EnumBillRentStatus.PAID.getCode()); + propertyDeposit.setStatus(EnumBillStatus.PAID.getCode()); }else{ - propertyDeposit.setStatus(EnumBillRentStatus.RETURN.getCode()); + propertyDeposit.setStatus(EnumBillStatus.RETURN.getCode()); } - addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); + //addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); } } wxBillPropertyDepositMapper.updateById(propertyDeposit); @@ -568,8 +573,8 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { if (record.getFlowParams() == null || record.getFlowParams().size() == 0) { record.setStatus(EnumSettleStatus.NOT_FINISH.getCode()); //选择的账单改为已结清 - updateFreezeOrStatus(record.getReceiveBillIds(), null,EnumBillRentStatus.PAID.getCode(),null); - updateFreezeOrStatus(record.getPayBillIds(), null,EnumBillRentStatus.PAID.getCode(),null); + updateFreezeOrStatus(record.getReceiveBillIds(), null,EnumBillStatus.PAID.getCode(),null); + updateFreezeOrStatus(record.getPayBillIds(), null,EnumBillStatus.PAID.getCode(),null); //刚好结清 if(record.getReceiveMoney().equals(record.getPayMoney())){ diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxChartServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxChartServiceImpl.java index eb284866a..79b9a4855 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxChartServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxChartServiceImpl.java @@ -3057,7 +3057,7 @@ public class WxChartServiceImpl implements WxChartDataService { WxBillAll wxBillAll = new WxBillAll(); wxBillAll.updateTenantInfo(tenantEntity); wxBillAll.setMonth(new SimpleDateFormat("yyyy-MM").format(startDate)); - wxBillAll.setStatus(EnumBillRentStatus.NOT_PAID.getCode()); + wxBillAll.setStatus(EnumBillStatus.NOT_PAID.getCode()); List billTypeList = new ArrayList<>(); billTypeList.add(EnumBillTypeStr.RENT.getCode()); wxBillAll.setBillTypeList(billTypeList); diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java index 0d5fc6df9..1bd9c4c43 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java @@ -454,8 +454,8 @@ public class WxFlowServiceImpl implements WxFlowService { WxBillSettle settle = wxBillSettleService.getById(Long.parseLong(businessId), EnumFilterSettle.NO.getCode()); if(EnumRentContractAppStatus.FINISH.getCode().intValue() == applyStatus.intValue()) { wxBillSettle.setStatus(EnumSettleStatus.NOT_FINISH.getCode()); - wxBillSettleService.updateFreezeOrStatus(settle.getReceiveBillIds(), EnumFreezeType.DEF.getCode(),EnumBillRentStatus.PAID.getCode(),null); - wxBillSettleService.updateFreezeOrStatus(settle.getPayBillIds(),EnumFreezeType.DEF.getCode(),EnumBillRentStatus.PAID.getCode(),null); + wxBillSettleService.updateFreezeOrStatus(settle.getReceiveBillIds(), EnumFreezeType.DEF.getCode(),EnumBillStatus.PAID.getCode(),null); + wxBillSettleService.updateFreezeOrStatus(settle.getPayBillIds(),EnumFreezeType.DEF.getCode(),EnumBillStatus.PAID.getCode(),null); //刚好结清 if(settle.getReceiveMoney().equals(settle.getPayMoney())){ diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java index e1d228665..9892ca948 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java @@ -255,7 +255,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService bill.setPropertyContractId(record.getId()); bill.setCreatetime(date); bill.updateTenantInfo(wxPayAccountBill); - bill.setOwe(bill.getReceivePay()); + //bill.setOwe(bill.getReceivePay()); bill.setNeedPay(bill.getNeedPay()); bill.setUpdatetime(date); bill.setRentShopType(record.getRentShopType()); @@ -269,14 +269,14 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService //bill.setShopId(record.getShopId()); bill.setExpiredDay(0L); setExpiredDay(bill,Calendar.MONTH,record.getReceivePeriod()); - if (bill.getReceivePay().equals(0L)) { - bill.setStatus(EnumBillRentStatus.PAID.getCode()); + if (bill.getReceivePay().equals("0")) { + bill.setStatus(EnumBillStatus.PAID.getCode()); bill.setPayDate(date); } BigDecimal servicePay = new BigDecimal(bill.getReceivePay()).multiply(new BigDecimal(wxPayAccountBill.getServiceChargeRate())).divide(new BigDecimal(100), record.getDecimalSize(), BigDecimal.ROUND_HALF_UP); bill.setServiceChargePay(servicePay.toPlainString()); //bill.setOwe(new BigDecimal(bill.getReceivePay()).add(new BigDecimal(bill.getServiceChargePay())).toPlainString()); - bill.setOwe(new BigDecimal(bill.getReceivePay()).toPlainString()); + //bill.setOwe(new BigDecimal(bill.getReceivePay()).toPlainString()); count++; } wxBillPropertyMapper.insertBills(record.getPreviewBillRentList()); @@ -499,7 +499,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService String needpay = wxPropertyContract.getDeposit(); wxBillDeposit.setNeedPay(needpay); wxBillDeposit.setReceivePay(needpay); - wxBillDeposit.setOwe(needpay); + //wxBillDeposit.setOwe(needpay); Date date = new Date(); Calendar instance = Calendar.getInstance(); instance.setTime(wxPropertyContract.getRentalStartDate()); @@ -516,7 +516,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService instance.setTime(wxBillDeposit.getReceiveDate()); instance.add(dayType, wxPropertyContract.getLease()); wxBillDeposit.setEndtime(instance.getTime()); - wxBillDeposit.setStatus(EnumBillRentStatus.WAIT_PAY.getCode()); + wxBillDeposit.setStatus(EnumBillStatus.WAIT_PAY.getCode()); wxBillDeposit.setExpiredDay(0L); wxBillDeposit.updateTenantInfo(wxPropertyContract); wxBillDeposit.setIsDel(0); @@ -710,7 +710,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService wxBillProperty.setReceiveDate(billTimeVo.getReceiveDate()); wxBillProperty.setNeedPay(needpay); - wxBillProperty.setOwe(needpay); + //wxBillProperty.setOwe(needpay); wxBillProperty.setReceivePay(needpay); //截止收租日在当前时间之前 @@ -735,7 +735,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService BigDecimal servicePay = new BigDecimal(wxBillProperty.getReceivePay()).multiply(new BigDecimal(wxPayAccountBill.getServiceChargeRate())).divide(new BigDecimal(100), wxPropertyContract.getDecimalSize(), BigDecimal.ROUND_HALF_UP); wxBillProperty.setServiceChargePay(servicePay.toPlainString()); //wxBillProperty.setOwe(new BigDecimal(wxBillProperty.getReceivePay()).add(new BigDecimal(wxBillProperty.getServiceChargePay())).toPlainString()); - wxBillProperty.setOwe(new BigDecimal(wxBillProperty.getReceivePay()).toPlainString()); + //wxBillProperty.setOwe(new BigDecimal(wxBillProperty.getReceivePay()).toPlainString()); resultList.add(wxBillProperty); } //批量生成预账单 @@ -819,7 +819,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService wxBillProperty.setExpiredDay(0L); if (wxBillProperty.getReceiveDate().before(date)) { long day = (date.getTime() - wxBillProperty.getReceiveDate().getTime()) / (24 * 60 * 60 * 1000); - wxBillProperty.setStatus(EnumBillRentStatus.NOT_PAID.getCode()); + wxBillProperty.setStatus(EnumBillStatus.NOT_PAID.getCode()); if (day > 0) { wxBillProperty.setExpiredDay(day); } @@ -829,9 +829,9 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService Date currenttime = now.getTime(); //当前日期加上周期后小于截止收租日就是没有到期,否则当前待缴 if (currenttime.before(wxBillProperty.getReceiveDate())) { - wxBillProperty.setStatus(EnumBillRentStatus.NOT_EXPIRED.getCode()); + wxBillProperty.setStatus(EnumBillStatus.NOT_EXPIRED.getCode()); } else { - wxBillProperty.setStatus(EnumBillRentStatus.WAIT_PAY.getCode()); + wxBillProperty.setStatus(EnumBillStatus.WAIT_PAY.getCode()); } } } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java index b5182e1f5..4085549dd 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java @@ -676,14 +676,14 @@ public class WxRentContractServiceImpl implements WxRentContractService { } setExpiredDay(bill,Calendar.MONTH,record.getReceivePeriod()); if (bill.getReceivePay().equals("0")) { - bill.setStatus(EnumBillRentStatus.PAID.getCode()); + bill.setStatus(EnumBillStatus.PAID.getCode()); bill.setPayDate(date); } //计算手续费 BigDecimal servicePay = new BigDecimal(bill.getReceivePay()).multiply(new BigDecimal(wxPayAccountBill.getServiceChargeRate())).divide(new BigDecimal(10000), record.getDecimalSize(), BigDecimal.ROUND_HALF_UP); bill.setServiceChargePay(servicePay.toPlainString()); //bill.setOwe(bill.getReceivePay() + bill.getServiceChargePay()); - bill.setOwe(bill.getReceivePay()); + //bill.setOwe(bill.getReceivePay()); count++; } wxBillRentMapper.insertBills(record.getPreviewBillRentList()); @@ -742,14 +742,14 @@ public class WxRentContractServiceImpl implements WxRentContractService { } setManageExpiredDay(bill,Calendar.MONTH,record.getReceivePeriod()); if (bill.getReceivePay().equals("0")) { - bill.setStatus(EnumBillRentStatus.PAID.getCode()); + bill.setStatus(EnumBillStatus.PAID.getCode()); bill.setPayDate(date); } //计算手续费 BigDecimal servicePay = new BigDecimal(bill.getReceivePay()).multiply(new BigDecimal(wxPayAccountBill.getServiceChargeRate())).divide(new BigDecimal(10000), record.getDecimalSize(), BigDecimal.ROUND_HALF_UP); bill.setServiceChargePay(servicePay.toPlainString()); //bill.setOwe(bill.getReceivePay() + bill.getServiceChargePay()); - bill.setOwe(bill.getReceivePay()); + //bill.setOwe(bill.getReceivePay()); count++; billList.add(bill); } @@ -906,7 +906,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { String needpay = wxRentContract.getDeposit(); wxBillDeposit.setReceivePay(needpay); wxBillDeposit.setNeedPay(needpay); - wxBillDeposit.setOwe(needpay); + //wxBillDeposit.setOwe(needpay); //找到计租方式 int dayType = wxRentContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_DAY.getCode()) ? Calendar.DAY_OF_MONTH : Calendar.MONTH; @@ -927,7 +927,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { instance.setTime(wxBillDeposit.getReceiveDate()); instance.add(dayType, wxRentContract.getLease()); wxBillDeposit.setEndtime(instance.getTime()); - wxBillDeposit.setStatus(EnumBillRentStatus.WAIT_PAY.getCode()); + wxBillDeposit.setStatus(EnumBillStatus.WAIT_PAY.getCode()); wxBillDeposit.setExpiredDay(0L); wxBillDeposit.setReceiveDate(time); wxBillDeposit.updateTenantInfo(wxRentContract); @@ -1579,7 +1579,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { wxBillRent.setContractNeedPay(needpay); wxBillRent.setRentPriceInfo(getRentPriceInfo(wxRentContract,new BigDecimal(needpay))); wxBillRent.setNeedPay(needpay); - wxBillRent.setOwe(needpay); + //wxBillRent.setOwe(needpay); wxBillRent.setReceivePay(needpay); //商业管理费 wxBillRent.setBussinessManageFeeNeedPay(bussinessManageFeeNeedpay); @@ -1608,7 +1608,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { .divide(new BigDecimal(10000), wxRentContract.getDecimalSize(), BigDecimal.ROUND_HALF_UP); wxBillRent.setServiceChargePay(servicePay.toPlainString()); //wxBillRent.setOwe(new BigDecimal(wxBillRent.getReceivePay()).add(new BigDecimal(wxBillRent.getServiceChargePay())).toPlainString()); - wxBillRent.setOwe(new BigDecimal(wxBillRent.getReceivePay()).toPlainString()); + //wxBillRent.setOwe(new BigDecimal(wxBillRent.getReceivePay()).toPlainString()); resultList.add(wxBillRent); @@ -1643,13 +1643,13 @@ public class WxRentContractServiceImpl implements WxRentContractService { manage.setManageFeeType(feeType.getCode()); manage.setNeedPay(needPay); manage.setReceivePay(needPay); - manage.setOwe(needPay); + //manage.setOwe(needPay); setManageExpiredDay(manage,dayType,receivePeriod); //计算手续费 BigDecimal servicePay = new BigDecimal(needPay).multiply(new BigDecimal(serviceChargeRate)).divide(new BigDecimal(10000), decimalSize, BigDecimal.ROUND_HALF_UP); manage.setServiceChargePay(servicePay.toPlainString()); //manage.setOwe(new BigDecimal(needPay).add(new BigDecimal(manage.getServiceChargePay())).toPlainString()); - manage.setOwe(new BigDecimal(needPay).toPlainString()); + //manage.setOwe(new BigDecimal(needPay).toPlainString()); return manage; } @@ -1659,7 +1659,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { wxBillRent.setExpiredDay(0L); if (wxBillRent.getReceiveDate().before(date)) { long day = (date.getTime() - wxBillRent.getReceiveDate().getTime()) / (24 * 60 * 60 * 1000); - wxBillRent.setStatus(EnumBillRentStatus.NOT_PAID.getCode()); + wxBillRent.setStatus(EnumBillStatus.NOT_PAID.getCode()); if (day > 0) { wxBillRent.setExpiredDay(day); } @@ -1669,9 +1669,9 @@ public class WxRentContractServiceImpl implements WxRentContractService { Date currenttime = now.getTime(); //当前日期加上周期后小于截止收租日就是没有到期,否则当前待缴 if (currenttime.before(wxBillRent.getReceiveDate())) { - wxBillRent.setStatus(EnumBillRentStatus.NOT_EXPIRED.getCode()); + wxBillRent.setStatus(EnumBillStatus.NOT_EXPIRED.getCode()); } else { - wxBillRent.setStatus(EnumBillRentStatus.WAIT_PAY.getCode()); + wxBillRent.setStatus(EnumBillStatus.WAIT_PAY.getCode()); } } } @@ -1682,7 +1682,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { wxBillRentManage.setExpiredDay(0L); if (wxBillRentManage.getReceiveDate().before(date)) { long day = (date.getTime() - wxBillRentManage.getReceiveDate().getTime()) / (24 * 60 * 60 * 1000); - wxBillRentManage.setStatus(EnumBillRentStatus.NOT_PAID.getCode()); + wxBillRentManage.setStatus(EnumBillStatus.NOT_PAID.getCode()); if (day > 0) { wxBillRentManage.setExpiredDay(day); } @@ -1692,9 +1692,9 @@ public class WxRentContractServiceImpl implements WxRentContractService { Date currenttime = now.getTime(); //当前日期加上周期后小于截止收租日就是没有到期,否则当前待缴 if (currenttime.before(wxBillRentManage.getReceiveDate())) { - wxBillRentManage.setStatus(EnumBillRentStatus.NOT_EXPIRED.getCode()); + wxBillRentManage.setStatus(EnumBillStatus.NOT_EXPIRED.getCode()); } else { - wxBillRentManage.setStatus(EnumBillRentStatus.WAIT_PAY.getCode()); + wxBillRentManage.setStatus(EnumBillStatus.WAIT_PAY.getCode()); } } } @@ -3307,13 +3307,13 @@ public class WxRentContractServiceImpl implements WxRentContractService { String oldNeedPay = br.getNeedPay(); if (needPay.compareTo(new BigDecimal(br.getNeedPay())) > 0) { br.setNeedPay(needPay.toPlainString()); - br.setOwe(needPay.toPlainString()); + //br.setOwe(needPay.toPlainString()); br.setReceivePay(needPay.toPlainString()); br.setUpdatetime(new Date()); BigDecimal servicePay = new BigDecimal(br.getReceivePay()).multiply(new BigDecimal(wxPayAccountBill.getServiceChargeRate())).divide(new BigDecimal(10000), wxRentContract.getDecimalSize(), BigDecimal.ROUND_HALF_UP); br.setServiceChargePay(servicePay.toPlainString()); //br.setOwe(new BigDecimal(br.getReceivePay()).add(new BigDecimal(br.getServiceChargePay())).toPlainString()); - br.setOwe(new BigDecimal(br.getReceivePay()).toPlainString()); + //br.setOwe(new BigDecimal(br.getReceivePay()).toPlainString()); br.setComments("原金额["+oldNeedPay+"(分)]小于解单金额["+needPay+"(分)],系统自动更新"); wxBillRentMapper.updateById(br); } diff --git a/mallinkService/src/main/java/com/iformall/utils/Constant.java b/mallinkService/src/main/java/com/iformall/utils/Constant.java index 2f3fcafa8..61f83fbc2 100644 --- a/mallinkService/src/main/java/com/iformall/utils/Constant.java +++ b/mallinkService/src/main/java/com/iformall/utils/Constant.java @@ -136,5 +136,6 @@ public class Constant { public static final String cache_aliyun_msg ="aliyunMsg:"; public static final Integer default_long_decimal_size = 10; + public static final Integer bill_near_default_days = 5; } diff --git a/mallinkService/src/main/resources/contract-word-template/bill_near_one.docx b/mallinkService/src/main/resources/contract-word-template/bill_near_one.docx new file mode 100644 index 0000000000000000000000000000000000000000..e7a735c4a6d7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Bte6 zo%@mL^@qOvvwYxp`0th1f5Vgit8RbSVgCvK->t#F6_0`VKfM1NEC2T^`g^qeZ?5Y9 c2L2s8m-`I*Yuof;%uoQvK8E(n^Xsqw2NmebkpKVy literal 0 HcmV?d00001 diff --git a/mallinkService/src/main/resources/mapper/WxBillDailyMapper.xml b/mallinkService/src/main/resources/mapper/WxBillDailyMapper.xml index adeaaea75..b209b7888 100644 --- a/mallinkService/src/main/resources/mapper/WxBillDailyMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillDailyMapper.xml @@ -11,7 +11,6 @@ - @@ -38,7 +37,7 @@ `id`,`receive_pay`,`pay`,`receive_date`,`pay_date`,`createtime`,`expired_day`,`apply_status`,`apply_pay_img`,`apply_update_time`, - `tenant_id`,`parent_tenant_id`,`owe`,`status`,`is_del`,`merchant_id`,`user_id`,`shop_id`,`shop_name`,`updatetime`,`type`, + `tenant_id`,`parent_tenant_id`,`status`,`is_del`,`merchant_id`,`user_id`,`shop_id`,`shop_name`,`updatetime`,`type`, `rent_shop_type`,`pay_way`,`price_detail`,`starttime`,`endtime`,freeze,build_way,service_charge_pay,`bill_remark`, case type when 1 then '水费' when 2 then '电费' when 3 then '空调费' else '日常费用' end bill_type_name @@ -58,7 +57,6 @@ and `parent_tenant_id` = #{parentTenantId} - and `owe` = #{owe} and `status` = #{status} and `apply_status` = #{applyStatus} and `is_del` = #{isDel} @@ -104,7 +102,17 @@ and date_format(br.starttime,'%Y-%m') <= #{month} and date_format(br.endtime,'%Y-%m') >= #{month} - and br.`owe` > 0 + + and (br.`starttime` >= DATE_SUB(NOW(),INTERVAL #{oweBillBeforeDays} DAY) + and br.`receive_pay` - br.`pay` > 0 and br.status not in (3,6) + ) + + + and (br.`starttime` >= DATE_SUB(NOW(),INTERVAL #{nearBillBeforeDays} DAY) + and br.`starttime` < DATE_SUB(NOW(),INTERVAL #{oweBillBeforeDays} DAY) + and br.status not in (3,6) + ) + and br.`build_way` = #{buildWay} and br.`merchant_id` in @@ -118,7 +126,7 @@ - select sum(br.receive_pay) receive_pay , sum(br.pay) paid, sum(br.owe) owe from wx_bill_daily br + select sum(br.receive_pay) receive_pay , sum(br.pay) paid from wx_bill_daily br @@ -143,6 +150,16 @@ + + + + + + + update wx_bill_daily set status=#{notPaid},expired_day=DATEDIFF(now(),receive_date) where status!=#{paid} diff --git a/mallinkService/src/main/resources/mapper/WxBillDepositMapper.xml b/mallinkService/src/main/resources/mapper/WxBillDepositMapper.xml index 65a6899cf..74c56f319 100644 --- a/mallinkService/src/main/resources/mapper/WxBillDepositMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillDepositMapper.xml @@ -12,7 +12,6 @@ - @@ -37,7 +36,7 @@ `id`,`tenant_id`,`parent_tenant_id`,`rent_contract_id`,`receive_pay`,`pay`,`receive_date`,`pay_date`,`createtime`, - `expired_day`,`owe`,`status`,`is_del`,`need_pay`,`merchant_id`,`user_id`,`shop_id`,`updatetime`,`apply_status`,`apply_pay_img`,`apply_update_time`, + `expired_day`,`status`,`is_del`,`need_pay`,`merchant_id`,`user_id`,`shop_id`,`updatetime`,`apply_status`,`apply_pay_img`,`apply_update_time`, `rent_shop_type`,`return_price`,`pay_way`,service_charge_pay,'租赁押金' bill_type_name,'' bill_remark @@ -57,7 +56,6 @@ and `pay_date` = #{payDate} and `createtime` = #{createtime} and `expired_day` = #{expiredDay} - and `owe` = #{owe} and `status` = #{status} and `apply_status` = #{applyStatus} and `is_del` = #{isDel} @@ -96,7 +94,7 @@ - select sum(br.receive_pay) receive_pay , sum(br.pay) paid, sum(br.owe) owe from wx_bill_rent_deposit br + select sum(br.receive_pay) receive_pay , sum(br.pay) paid from wx_bill_rent_deposit br @@ -150,6 +157,16 @@ select distinct merchant_id from wx_bill_rent_deposit br + + + + + + + select IFNULL(round(sum(res.owe)/100,2),0) owe,res.tenant_id from ( - select IFNULL(sum(owe),0) owe,tenant_id from wx_bill_rent_deposit + select IFNULL(sum(receive_pay - pay),0) owe,tenant_id from wx_bill_rent_deposit where status = 1 and `tenant_id` = #{tenantId} @@ -212,7 +229,7 @@ and receive_date between #{startdate} and #{enddate} union all - select IFNULL(sum(owe),0) owe,tenant_id from wx_bill_property_deposit + select IFNULL(sum(receive_pay - pay),0) owe,tenant_id from wx_bill_property_deposit where status = 1 and `tenant_id` = #{tenantId} @@ -222,7 +239,7 @@ and receive_date between #{startdate} and #{enddate} union all - select IFNULL(sum(owe),0) owe,tenant_id from wx_bill_other_deposit + select IFNULL(sum(receive_pay - pay),0) owe,tenant_id from wx_bill_other_deposit where status = 1 and `tenant_id` = #{tenantId} diff --git a/mallinkService/src/main/resources/mapper/WxBillOtherDepositMapper.xml b/mallinkService/src/main/resources/mapper/WxBillOtherDepositMapper.xml index f1436ac93..9f3cbd50b 100644 --- a/mallinkService/src/main/resources/mapper/WxBillOtherDepositMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillOtherDepositMapper.xml @@ -11,7 +11,6 @@ - @@ -40,7 +39,7 @@ `id`,`tenant_id`,`parent_tenant_id`,`receive_pay`,`pay`,`receive_date`,`pay_date`,`createtime`,`expired_day`, - `owe`,`status`,`is_del`,`merchant_id`,`user_id`,`shop_id`,`shop_name`,`updatetime`,`name`,`comments`,`apply_status`,`apply_pay_img`,`apply_update_time`, + `status`,`is_del`,`merchant_id`,`user_id`,`shop_id`,`shop_name`,`updatetime`,`name`,`comments`,`apply_status`,`apply_pay_img`,`apply_update_time`, `rent_shop_type`,`return_price`,`pay_way`,`starttime`,`endtime`,freeze,service_charge_pay,'其他押金' bill_type_name,CONCAT(`name`,',',`comments`) bill_remark @@ -59,7 +58,6 @@ and `pay_date` = #{payDate} and `createtime` = #{createtime} and `expired_day` = #{expiredDay} - and `owe` = #{owe} and `status` = #{status} and `apply_status` = #{applyStatus} and `is_del` = #{isDel} @@ -109,7 +107,17 @@ and date_format(br.starttime,'%Y-%m') <= #{month} and date_format(br.endtime,'%Y-%m') >= #{month} - and br.`owe` > 0 + + and (br.`starttime` >= DATE_SUB(NOW(),INTERVAL #{oweBillBeforeDays} DAY) + and br.`receive_pay` - br.`pay` > 0 and br.status not in (3,6) + ) + + + and (br.`starttime` >= DATE_SUB(NOW(),INTERVAL #{nearBillBeforeDays} DAY) + and br.`starttime` < DATE_SUB(NOW(),INTERVAL #{oweBillBeforeDays} DAY) + and br.status not in (3,6) + ) + and br.`merchant_id` in @@ -122,7 +130,7 @@ - select sum(br.receive_pay) receive_pay , sum(br.pay) paid, sum(br.owe) owe from wx_bill_other_deposit br + select sum(br.receive_pay) receive_pay , sum(br.pay) paid from wx_bill_other_deposit br @@ -145,6 +152,17 @@ + + + + + + + + update wx_bill_other_deposit set status=#{notPaid},expired_day=DATEDIFF(now(),receive_date) where status!=#{paid} diff --git a/mallinkService/src/main/resources/mapper/WxBillOtherMapper.xml b/mallinkService/src/main/resources/mapper/WxBillOtherMapper.xml index ced162dfa..737e1c8da 100644 --- a/mallinkService/src/main/resources/mapper/WxBillOtherMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillOtherMapper.xml @@ -11,7 +11,6 @@ - @@ -40,7 +39,7 @@ `id`,`tenant_id`,`parent_tenant_id`,`receive_pay`,`pay`,`receive_date`,`pay_date`,`createtime`,`expired_day`, - `owe`,`status`,`is_del`,`merchant_id`,`user_id`,`shop_id`,`shop_name`,`updatetime`,`name`,`comments`, + `status`,`is_del`,`merchant_id`,`user_id`,`shop_id`,`shop_name`,`updatetime`,`name`,`comments`, `rent_shop_type`,`pay_way`,`starttime`,`endtime`,endtime,service_charge_pay,`apply_status`,`apply_pay_img`,`apply_update_time`, '其他费用' bill_type_name, CONCAT(`name`,',',`comments`) bill_remark @@ -60,7 +59,6 @@ and `pay_date` = #{payDate} and `createtime` = #{createtime} and `expired_day` = #{expiredDay} - and `owe` = #{owe} and `status` = #{status} and `apply_status` = #{applyStatus} and `is_del` = #{isDel} @@ -105,7 +103,17 @@ and date_format(br.starttime,'%Y-%m') <= #{month} and date_format(br.endtime,'%Y-%m') >= #{month} - and br.`owe` > 0 + + and (br.`starttime` >= DATE_SUB(NOW(),INTERVAL #{oweBillBeforeDays} DAY) + and br.`receive_pay` - br.`pay` > 0 and br.status not in (3,6) + ) + + + and (br.`starttime` >= DATE_SUB(NOW(),INTERVAL #{nearBillBeforeDays} DAY) + and br.`starttime` < DATE_SUB(NOW(),INTERVAL #{oweBillBeforeDays} DAY) + and br.status not in (3,6) + ) + and br.`merchant_id` in @@ -118,7 +126,7 @@ - select sum(br.receive_pay) receive_pay , sum(br.pay) paid, sum(br.owe) owe from wx_bill_other br + select sum(br.receive_pay) receive_pay , sum(br.pay) paid from wx_bill_other br @@ -141,6 +148,16 @@ select distinct merchant_id from wx_bill_other br + + + + + + + update wx_bill_other set status=#{notPaid},expired_day=DATEDIFF(now(),receive_date) @@ -195,7 +212,7 @@ - select br.`id`,br.`receive_pay`,br.`pay`,br.`receive_date`,br.`pay_date`,br.`createtime`,br.`expired_day`,br.`owe`,br.`status`, + select br.`id`,br.`receive_pay`,br.`pay`,br.`receive_date`,br.`pay_date`,br.`createtime`,br.`expired_day`,br.`status`, br.`need_pay`,br.`updatetime`,br.`merchant_id`,br.`rent_shop_type`,br.`return_price`,br.`shop_info`,br.pay_way, br.freeze,br.service_charge_pay,br.`apply_status`,br.`apply_pay_img`,br.`apply_update_time`,'物业押金' bill_type_name,'' bill_remark from wx_bill_property_deposit br @@ -138,10 +146,9 @@ - @@ -150,6 +157,16 @@ + + + + + + + select br.`id`,br.`receive_pay`,br.`pay`,br.`receive_date`,br.`pay_date`,br.`createtime`,br.`expired_day`, - case when br.status=1 then br.owe else 0 end owe,br.`status`,br.`need_pay`,br.`updatetime`,br.`merchant_id`,br.`rent_shop_type`,br.`period`, + br.`status`,br.`need_pay`,br.`updatetime`,br.`merchant_id`,br.`rent_shop_type`,br.`period`, br.`revenue`,br.`late_pay_time`,br.`property_contract_id`,br.late_pay_price,br.`shop_info`,br.pay_way,br.late_pay_status, br.`comments`,br.starttime,br.endtime,br.`apply_status`,br.`apply_pay_img`,br.`apply_update_time`,br.freeze,br.service_charge_pay, br.`late_pay_ratio`,'物业费' bill_type_name,'' bill_remark @@ -179,10 +187,9 @@ - @@ -190,6 +197,16 @@ select distinct merchant_id from wx_bill_property br + + + + + + + - select IFNULL(sum(owe),0) owe,tenant_id from wx_bill_property + select IFNULL(sum(receive_pay - pay),0) owe,tenant_id from wx_bill_property where status = 1 and `tenant_id` = #{tenantId} @@ -279,7 +296,7 @@ update wx_bill_property set updatetime = now() - ,receive_pay = #{receivePay},owe=#{receivePay} + ,receive_pay = #{receivePay} ,comments = #{comments} ,receive_date = #{receiveDate} ,status = 3,pay_date=now() @@ -287,8 +304,7 @@ - update wx_bill_property set is_preview = #{isPreview},merchant_id = #{merchantId},need_pay = receive_pay, - owe=receive_pay + service_charge_pay + ifnull(late_pay_price,0) - pay + update wx_bill_property set is_preview = #{isPreview},merchant_id = #{merchantId},need_pay = receive_pay where property_contract_id = #{propertyContractId} @@ -301,7 +317,7 @@ INSERT INTO wx_bill_property (id,property_contract_id, receive_pay, pay, receive_date, pay_date, createtime, expired_day, - tenant_id, parent_tenant_id, owe, status, is_del, need_pay, merchant_id, user_id, shop_id, updatetime, starttime, + tenant_id, parent_tenant_id, status, is_del, need_pay, merchant_id, user_id, shop_id, updatetime, starttime, endtime, rent_shop_type, revenue, late_pay_ratio, late_pay_time, late_pay_price, period, is_preview, shop_info, pay_way, late_pay_status, comments,service_charge_pay) @@ -310,7 +326,7 @@ ( #{item.id},#{item.propertyContractId},#{item.receivePay},#{item.pay},#{item.receiveDate},#{item.payDate},#{item.createtime}, #{item.expiredDay},#{item.tenantId},#{item.parentTenantId}, - #{item.owe},#{item.status},#{item.isDel},#{item.needPay},#{item.merchantId}, + #{item.status},#{item.isDel},#{item.needPay},#{item.merchantId}, #{item.userId},#{item.shopId},#{item.updatetime},#{item.starttime},#{item.endtime},#{item.rentShopType},#{item.revenue}, #{item.latePayRatio},#{item.latePayTime},#{item.latePayPrice},#{item.period},#{item.isPreview},#{item.shopInfo}, #{item.payWay},#{item.latePayStatus},#{item.comments},#{item.serviceChargePay} @@ -346,11 +362,11 @@ CONCAT('系统计入', if(b.late_pay_price is null, round( - b.owe * c.late_pay_ratio * DATEDIFF(now(), date_add(b.receive_date,interval(c.late_pay_day) day)) /10000 + c.late_pay_ratio * DATEDIFF(now(), date_add(b.receive_date,interval(c.late_pay_day) day)) /10000 ,2) , round( - b.owe * (c.late_pay_ratio) /10000 + (c.late_pay_ratio) /10000 ,2) ) ,'元') details,b.tenant_id,b.parent_tenant_id @@ -364,13 +380,13 @@ update wx_bill_property b set b.late_pay_price = if(b.late_pay_price is null, round( - b.owe * (select late_pay_ratio from wx_property_contract where id = b.`property_contract_id`) + (select late_pay_ratio from wx_property_contract where id = b.`property_contract_id`) * DATEDIFF(now(), date_add(b.receive_date,interval(select late_pay_day from wx_property_contract where id = b.`property_contract_id`) day)) /100 ,2) , b.late_pay_price + round( - b.owe * (select late_pay_ratio from wx_property_contract where id = b.`property_contract_id`) /100 + (select late_pay_ratio from wx_property_contract where id = b.`property_contract_id`) /100 ,2) ) where b.status!=3 and b.status!=6 @@ -380,7 +396,7 @@ update wx_bill_property - set service_charge_pay=round(receive_pay*#{serviceChargeRate}/10000),owe=receive_pay + service_charge_pay + ifnull(late_pay_price,0) - pay + set service_charge_pay=round(receive_pay*#{serviceChargeRate}/10000) where service_charge_pay=0 and status in(1,2,4) and `tenant_id` = #{tenantId} @@ -390,11 +406,11 @@ - + diff --git a/mallinkService/src/main/resources/mapper/WxBillRentManageMapper.xml b/mallinkService/src/main/resources/mapper/WxBillRentManageMapper.xml index 38c8fd4ef..5a20a43d0 100644 --- a/mallinkService/src/main/resources/mapper/WxBillRentManageMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillRentManageMapper.xml @@ -12,7 +12,6 @@ - @@ -45,7 +44,7 @@ `id`,`tenant_id`,`parent_tenant_id`,`rent_contract_id`,`receive_pay`,`pay`,`receive_date`,`pay_date`, - `createtime`,`expired_day`,`owe`,`status`,`apply_status`,`apply_pay_img`,`apply_update_time`,`is_del`,`need_pay`, + `createtime`,`expired_day`,`status`,`apply_status`,`apply_pay_img`,`apply_update_time`,`is_del`,`need_pay`, `merchant_id`,`user_id`,`shop_id`,`updatetime`,`rent_shop_type`,`late_pay_ratio`,`late_pay_time`,`late_pay_price`, `period`,`shop_info`,`pay_way`,`late_pay_status`,starttime,endtime,freeze,service_charge_pay,manage_fee_type, case manage_fee_type when 1 then '商业管理费' when 2 then '运营管理费' else '管理费' end bill_type_name,'' bill_remark @@ -67,7 +66,6 @@ and `pay_date` = #{payDate} and `createtime` = #{createtime} and `expired_day` = #{expiredDay} - and `owe` = #{owe} and `status` = #{status} and `apply_status` = #{applyStatus} and `is_del` = #{isDel} @@ -124,7 +122,17 @@ and date_format(br.starttime,'%Y-%m') <= #{month} and date_format(br.endtime,'%Y-%m') >= #{month} - and br.`owe` > 0 + + and (br.`starttime` >= DATE_SUB(NOW(),INTERVAL #{oweBillBeforeDays} DAY) + and br.`receive_pay` - br.`pay` > 0 and br.status not in (3,6) + ) + + + and (br.`starttime` >= DATE_SUB(NOW(),INTERVAL #{nearBillBeforeDays} DAY) + and br.`starttime` < DATE_SUB(NOW(),INTERVAL #{oweBillBeforeDays} DAY) + and br.status not in (3,6) + ) + and br.`manage_fee_type` = #{manageFeeType} and br.`merchant_id` is not null @@ -139,7 +147,7 @@ - select sum(br.receive_pay) receive_pay , sum(br.pay) paid, sum(br.owe) owe from wx_bill_rent_manage br + select sum(br.receive_pay) receive_pay , sum(br.pay) paid from wx_bill_rent_manage br @@ -171,6 +178,16 @@ select distinct br.`rent_contract_id` from wx_bill_rent_manage br + + + + + + + select br.`id`,br.`receive_pay`,br.`pay`,br.`receive_date`,br.`pay_date`,br.`createtime`,br.`expired_day`, - case when br.status=1 then br.owe else 0 end owe,br.`status`,br.`contract_need_pay`,br.`rent_price_info`,br.`need_pay`,br.`bussiness_manage_fee_need_pay`,br.`operating_manage_fee_need_pay`, + br.`status`,br.`contract_need_pay`,br.`rent_price_info`,br.`need_pay`,br.`bussiness_manage_fee_need_pay`,br.`operating_manage_fee_need_pay`, br.`updatetime`,br.`merchant_id`,br.`rent_shop_type`,br.`apply_status`,br.`apply_pay_img`,br.`apply_update_time`,br.`revenue`,br.`late_pay_time`,br.`period`,br.`rent_contract_id`, br.late_pay_price,br.shop_info,br.pay_way,br.late_pay_status,br.`comments`,br.starttime,br.endtime,br.bus_discount_ratio,br.freeze,br.join_rent_price,br.service_charge_pay, '租金' bill_type_name,'' bill_remark @@ -179,10 +187,9 @@ - @@ -191,6 +198,16 @@ + + + + + + + - select IFNULL(sum(owe),0) owe,tenant_id from wx_bill_rent + select IFNULL(sum(receive_pay-pay),0) owe,tenant_id from wx_bill_rent where status = 1 and `tenant_id` = #{tenantId} @@ -289,8 +306,7 @@ - update wx_bill_rent set is_preview = #{isPreview},merchant_id = #{merchantId},need_pay = receive_pay, - owe=receive_pay + service_charge_pay + ifnull(late_pay_price,0) - pay + update wx_bill_rent set is_preview = #{isPreview},merchant_id = #{merchantId},need_pay = receive_pay where rent_contract_id = #{rentContractId} @@ -302,7 +318,7 @@ INSERT INTO wx_bill_rent (id,tenant_id,parent_tenant_id, rent_contract_id, receive_pay, pay, receive_date, pay_date, createtime, expired_day, - owe, status, is_del, contract_need_pay,rent_price_info,need_pay,bussiness_manage_fee_need_pay,operating_manage_fee_need_pay, merchant_id, user_id, shop_id, updatetime, starttime, endtime, + status, is_del, contract_need_pay,rent_price_info,need_pay,bussiness_manage_fee_need_pay,operating_manage_fee_need_pay, merchant_id, user_id, shop_id, updatetime, starttime, endtime, rent_shop_type, revenue, late_pay_ratio, late_pay_time, late_pay_price, period, is_preview, shop_info, pay_way, late_pay_status, comments,service_charge_pay) VALUES @@ -310,7 +326,7 @@ ( #{item.id},#{item.tenantId},#{item.parentTenantId}, #{item.rentContractId},#{item.receivePay},#{item.pay},#{item.receiveDate},#{item.payDate},#{item.createtime}, - #{item.expiredDay},#{item.owe},#{item.status},#{item.isDel},#{item.contractNeedPay},#{item.rentPriceInfo},#{item.needPay},#{item.bussinessManageFeeNeedPay},#{item.operatingManageFeeNeedPay},#{item.merchantId}, + #{item.expiredDay},#{item.status},#{item.isDel},#{item.contractNeedPay},#{item.rentPriceInfo},#{item.needPay},#{item.bussinessManageFeeNeedPay},#{item.operatingManageFeeNeedPay},#{item.merchantId}, #{item.userId},#{item.shopId},#{item.updatetime},#{item.starttime},#{item.endtime},#{item.rentShopType},#{item.revenue}, #{item.latePayRatio},#{item.latePayTime},#{item.latePayPrice},#{item.period},#{item.isPreview},#{item.shopInfo}, #{item.payWay},#{item.latePayStatus},#{item.comments},#{item.serviceChargePay} @@ -346,11 +362,11 @@ CONCAT('系统计入', if(b.late_pay_price is null, round( - b.owe * c.late_pay_ratio * DATEDIFF(now(), date_add(b.receive_date,interval(c.late_pay_day) day)) /10000 + c.late_pay_ratio * DATEDIFF(now(), date_add(b.receive_date,interval(c.late_pay_day) day)) /10000 ,2) , round( - b.owe * (c.late_pay_ratio) /10000 + (c.late_pay_ratio) /10000 ,2) ) ,'元') details,b.tenant_id,b.parent_tenant_id @@ -364,13 +380,13 @@ update wx_bill_rent b set b.late_pay_price = if(b.late_pay_price is null, round( - b.owe * (select late_pay_ratio from wx_rent_contract where id = b.`rent_contract_id`) + (select late_pay_ratio from wx_rent_contract where id = b.`rent_contract_id`) * DATEDIFF(now(), date_add(b.receive_date,interval(select late_pay_day from wx_rent_contract where id = b.`rent_contract_id`) day)) /100 ,2) , b.late_pay_price + round( - b.owe * (select late_pay_ratio from wx_rent_contract where id = b.`rent_contract_id`) /100 + (select late_pay_ratio from wx_rent_contract where id = b.`rent_contract_id`) /100 ,2) ) where b.status!=3 and b.status!=6 @@ -379,7 +395,7 @@ - update wx_bill_rent set service_charge_pay=round(receive_pay*#{serviceChargeRate}/10000),owe=receive_pay + service_charge_pay + ifnull(late_pay_price,0) - pay + update wx_bill_rent set service_charge_pay=round(receive_pay*#{serviceChargeRate}/10000) where service_charge_pay=0 and `tenant_id` = #{tenantId} @@ -390,10 +406,11 @@ and status in(1,2,4) - + + +