| @@ -761,23 +761,23 @@ public class WxRentContractController extends WxContractBaseController { | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxMerchantService.getMerchantList(wxMerchant)); | |||
| } | |||
| @GetMapping("autolatePay") | |||
| @SystemControllerLog(description = "autolatePay") | |||
| public ResultData autolatePay(String startDate, String endDate) throws Exception{ | |||
| try { | |||
| logger.info("账单滞纳金更新开始"); | |||
| wxBillRentMapper.insertBillAction(); | |||
| wxBillPropertyMapper.insertBillAction(); | |||
| wxBillRentMapper.autoAddLatePayPrice(); | |||
| wxBillPropertyMapper.autoAddLatePayPrice(); | |||
| logger.info("账单滞纳金更新结束"); | |||
| }catch (Exception e){ | |||
| logger.error("LatePayBillActionSchedule error! message:{}",e.getMessage()); | |||
| logger.error("LatePayBillActionSchedule error!",e); | |||
| } | |||
| return new ResultData(); | |||
| } | |||
| // @GetMapping("autolatePay") | |||
| // @SystemControllerLog(description = "autolatePay") | |||
| // public ResultData autolatePay(String startDate, String endDate) throws Exception{ | |||
| // try { | |||
| // logger.info("账单滞纳金更新开始"); | |||
| // wxBillRentMapper.insertBillAction(); | |||
| // wxBillPropertyMapper.insertBillAction(); | |||
| // | |||
| // wxBillRentMapper.autoAddLatePayPrice(); | |||
| // wxBillPropertyMapper.autoAddLatePayPrice(); | |||
| // logger.info("账单滞纳金更新结束"); | |||
| // }catch (Exception e){ | |||
| // logger.error("LatePayBillActionSchedule error! message:{}",e.getMessage()); | |||
| // logger.error("LatePayBillActionSchedule error!",e); | |||
| // } | |||
| // return new ResultData(); | |||
| // } | |||
| /** | |||
| * 预览账单展示,编辑账期,后端生成账单金额 | |||
| @@ -67,9 +67,7 @@ public class WxBillDailyController extends BillBaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "日常账单-列表") | |||
| public ResultData list(@ModelAttribute WxBillDaily wxBillDaily, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillDailyController::list"); | |||
| if (null == wxBillDaily) { | |||
| wxBillDaily = new WxBillDaily(); | |||
| } | |||
| @@ -92,7 +90,6 @@ public class WxBillDailyController extends BillBaseController { | |||
| } | |||
| @GetMapping("exportBill") | |||
| @SystemControllerLog(description = "日常费用账单-导出") | |||
| public void exportBill(@ModelAttribute WxBillDaily wxBillDaily, HttpServletRequest request, HttpServletResponse response) { | |||
| wxBillDaily.updateTenantInfo(getTenantInfo()); | |||
| WxUserDataRule dataRule = this.getCurrentDataFloors(); | |||
| @@ -130,9 +127,7 @@ public class WxBillDailyController extends BillBaseController { | |||
| } | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "日常账单-新增") | |||
| public ResultData add(@RequestBody WxBillDaily wxBillDaily) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillDailyController::add"); | |||
| MallUserInfo user = getUser(); | |||
| wxBillDaily.updateTenantInfo(user); | |||
| wxBillDaily.setUserId(user.getId()); | |||
| @@ -142,7 +137,6 @@ public class WxBillDailyController extends BillBaseController { | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxBillDaily wxBillDaily) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillDailyController::update"); | |||
| MallUserInfo user = getUser(); | |||
| wxBillDaily.updateTenantInfo(user); | |||
| wxBillDaily.setUserId(user.getId()); | |||
| @@ -153,38 +147,30 @@ public class WxBillDailyController extends BillBaseController { | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "日常账单-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillDailyController::delete"); | |||
| wxBillDailyService.deleteById(id); | |||
| wxBillDailyService.deleteById(this.getTenantInfo(),id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillDailyController::findById"); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxBillDailyService.getById(this.getTenantInfo(),id)); | |||
| } | |||
| @GetMapping("/updatePaid") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "日常账单-支付更新") | |||
| public ResultData updatePaid(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillDailyController::updatePaid"); | |||
| return wxBillDailyService.updatePaid(id); | |||
| } | |||
| @RequestMapping("/exportTemplate") | |||
| @SystemControllerLog(description = "日常账单-导出模板") | |||
| public void exportTemplate(HttpServletRequest request, HttpServletResponse response) { | |||
| logger.debug("[" + getIpAddr() + "] wxBillDailyService::exportTemplate"); | |||
| wxBillDailyService.exportTemplate(request, response, getUser()); | |||
| } | |||
| @PostMapping(value = "/importTemplate", consumes = "multipart/*") | |||
| @SystemControllerLog(description = "日常账单-导入数据") | |||
| public ResultData importTemplate(@RequestParam("file") MultipartFile mFile) { | |||
| logger.debug("[" + getIpAddr() + "] wxBillDailyService::importTemplate"); | |||
| if (mFile.isEmpty()) { | |||
| throw new MallinkException(Result.ERROR, "上传文件不能为空"); | |||
| } | |||
| @@ -265,7 +251,6 @@ public class WxBillDailyController extends BillBaseController { | |||
| } | |||
| @GetMapping("/queryTemplateCount") | |||
| @SystemControllerLog(description = "日常费用账单-导入数据查询") | |||
| public ResultData queryTemplateCount() { | |||
| String importKey = Constant.importMemPrev + "bill_daily_" + getUser().getId(); | |||
| Map entries = stringRedisTemplate.opsForHash().entries(importKey); | |||
| @@ -45,7 +45,6 @@ public class WxBillDepositController extends BillBaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "租赁押金-列表") | |||
| public ResultData list(@ModelAttribute WxBillDeposit wxBillDeposit, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillDepositController::list"); | |||
| if (null == wxBillDeposit) { | |||
| @@ -109,18 +108,15 @@ public class WxBillDepositController extends BillBaseController { | |||
| } | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "租赁押金-新增") | |||
| public ResultData add(@RequestBody WxBillDeposit wxBillDeposit) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillDepositController::add"); | |||
| wxBillDeposit.updateTenantInfo(getTenantInfo()); | |||
| return wxBillDepositService.saveOrUpdate(wxBillDeposit, getUser()); | |||
| } | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "租赁押金-更新") | |||
| public ResultData update(@RequestBody WxBillDeposit wxBillDeposit) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillDepositController::update"); | |||
| wxBillDeposit.updateTenantInfo(getTenantInfo()); | |||
| return wxBillDepositService.saveOrUpdate(wxBillDeposit, getUser()); | |||
| } | |||
| @@ -129,17 +125,14 @@ public class WxBillDepositController extends BillBaseController { | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "租赁押金-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillDepositController::delete"); | |||
| wxBillDepositService.deleteById(id); | |||
| wxBillDepositService.deleteById(this.getTenantInfo(),id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "租赁押金-查找") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillDepositController::findById"); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxBillDepositService.getById(id)); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxBillDepositService.getById(this.getTenantInfo(),id)); | |||
| } | |||
| @GetMapping("/detail") | |||
| @@ -150,24 +143,20 @@ public class WxBillDepositController extends BillBaseController { | |||
| @GetMapping("/updatePaid") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "租赁押金-支付更新") | |||
| public ResultData updatePaid(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillDepositController::updatePaid"); | |||
| return wxBillDepositService.updatePaid(id); | |||
| } | |||
| @PostMapping("returnDeposit") | |||
| @SystemControllerLog(description = "租赁押金-退回押金") | |||
| public ResultData returnDeposit(@RequestBody WxBillDeposit wxBillDeposit) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillDepositController::returnDeposit"); | |||
| wxBillDeposit.updateTenantInfo(getTenantInfo()); | |||
| return wxBillDepositService.returnDeposit(wxBillDeposit, getUser()); | |||
| } | |||
| @PostMapping("adjustDeposit") | |||
| @SystemControllerLog(description = "租赁押金-调整押金") | |||
| public ResultData adjustDeposit(@RequestBody WxBillDeposit wxBillDeposit) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillDepositController::adjustDeposit"); | |||
| wxBillDeposit.updateTenantInfo(getTenantInfo()); | |||
| return wxBillDepositService.adjustDeposit(wxBillDeposit); | |||
| } | |||
| @@ -68,7 +68,6 @@ public class WxBillOtherController extends BillBaseController { | |||
| } | |||
| @GetMapping("exportBill") | |||
| @SystemControllerLog(description = "其它账单-导出") | |||
| public void exportBill(@ModelAttribute WxBillOther wxBillOther, HttpServletRequest request, HttpServletResponse response) { | |||
| wxBillOther.updateTenantInfo(getTenantInfo()); | |||
| WxUserDataRule dataRule = this.getCurrentDataFloors(); | |||
| @@ -106,9 +105,7 @@ public class WxBillOtherController extends BillBaseController { | |||
| } | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "其它账单-新增") | |||
| public ResultData add(@RequestBody WxBillOther wxBillOther) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillOtherController::add"); | |||
| MallUserInfo user = getUser(); | |||
| wxBillOther.updateTenantInfo(user); | |||
| wxBillOther.setUserId(user.getId()); | |||
| @@ -117,7 +114,6 @@ public class WxBillOtherController extends BillBaseController { | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxBillOther wxBillOther) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillOtherController::update"); | |||
| MallUserInfo user = getUser(); | |||
| wxBillOther.updateTenantInfo(user); | |||
| wxBillOther.setUserId(user.getId()); | |||
| @@ -128,16 +124,13 @@ public class WxBillOtherController extends BillBaseController { | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "其它账单-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillOtherController::delete"); | |||
| wxBillOtherService.deleteById(id); | |||
| wxBillOtherService.deleteById(this.getTenantInfo(),id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "其它账单-查询") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillOtherController::findById"); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxBillOtherService.getById(this.getTenantInfo(),id)); | |||
| } | |||
| @@ -148,9 +141,7 @@ public class WxBillOtherController extends BillBaseController { | |||
| */ | |||
| @GetMapping("/updatePaid") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "其它账单-支付更新") | |||
| public ResultData updatePaid(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillOtherController::updatePaid"); | |||
| return wxBillOtherService.updatePaid(id); | |||
| } | |||
| @@ -44,7 +44,6 @@ public class WxBillOtherDepositController extends BillBaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "其它押金账单-列表") | |||
| public ResultData list(@ModelAttribute WxBillOtherDeposit wxBillOtherDeposit, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillOtherDepositController::list"); | |||
| if (null == wxBillOtherDeposit) { | |||
| @@ -69,7 +68,6 @@ public class WxBillOtherDepositController extends BillBaseController { | |||
| } | |||
| @GetMapping("exportBill") | |||
| @SystemControllerLog(description = "其它押金账单-导出") | |||
| public void exportBill(@ModelAttribute WxBillOtherDeposit wxBillOtherDeposit, HttpServletRequest request, HttpServletResponse response) { | |||
| wxBillOtherDeposit.updateTenantInfo(getTenantInfo()); | |||
| WxUserDataRule dataRule = this.getCurrentDataFloors(); | |||
| @@ -107,9 +105,7 @@ public class WxBillOtherDepositController extends BillBaseController { | |||
| } | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "其它押金账单-新增") | |||
| public ResultData add(@RequestBody WxBillOtherDeposit wxBillOtherDeposit) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillOtherDepositController::add"); | |||
| MallUserInfo user = getUser(); | |||
| wxBillOtherDeposit.updateTenantInfo(user); | |||
| wxBillOtherDeposit.setUserId(user.getId()); | |||
| @@ -118,7 +114,6 @@ public class WxBillOtherDepositController extends BillBaseController { | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxBillOtherDeposit wxBillOtherDeposit) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillOtherDepositController::update"); | |||
| MallUserInfo user = getUser(); | |||
| wxBillOtherDeposit.updateTenantInfo(user); | |||
| wxBillOtherDeposit.setUserId(user.getId()); | |||
| @@ -129,39 +124,32 @@ public class WxBillOtherDepositController extends BillBaseController { | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "其它押金账单-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillOtherDepositController::delete"); | |||
| wxBillOtherDepositService.deleteById(id); | |||
| wxBillOtherDepositService.deleteById(this.getTenantInfo(),id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "其它押金账单-查询") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillOtherDepositController::findById"); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxBillOtherDepositService.getById(this.getTenantInfo(),id)); | |||
| } | |||
| @GetMapping("/updatePaid") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "其它押金账单-支付更新") | |||
| public ResultData updatePaid(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillOtherDepositController::updatePaid"); | |||
| return wxBillOtherDepositService.updatePaid(id); | |||
| } | |||
| @PostMapping("returnDeposit") | |||
| @SystemControllerLog(description = "其它押金账单-退回押金") | |||
| public ResultData returnDeposit(@RequestBody WxBillOtherDeposit wxBillDeposit) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillOtherDepositController::returnDeposit"); | |||
| wxBillDeposit.updateTenantInfo(getTenantInfo()); | |||
| return wxBillOtherDepositService.returnDeposit(wxBillDeposit, getUser()); | |||
| } | |||
| @PostMapping("adjustDeposit") | |||
| @SystemControllerLog(description = "其它押金账单-调整押金") | |||
| public ResultData adjustDeposit(@RequestBody WxBillOtherDeposit wxBillDeposit) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillOtherDepositController::adjustDeposit"); | |||
| wxBillDeposit.updateTenantInfo(getTenantInfo()); | |||
| return wxBillOtherDepositService.adjustDeposit(wxBillDeposit); | |||
| } | |||
| @@ -71,7 +71,6 @@ public class WxBillPropertyController extends BillBaseController { | |||
| } | |||
| @GetMapping("exportBill") | |||
| @SystemControllerLog(description = "物业账单-导出") | |||
| public void exportBill(@ModelAttribute WxBillProperty wxBillProperty, HttpServletRequest request, HttpServletResponse response) { | |||
| wxBillProperty.updateTenantInfo(getTenantInfo()); | |||
| WxUserDataRule dataRule = this.getCurrentDataFloors(); | |||
| @@ -109,26 +108,22 @@ public class WxBillPropertyController extends BillBaseController { | |||
| } | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "物业账单-新增") | |||
| public ResultData add(@RequestBody WxBillProperty wxBillProperty) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillPropertyController::add"); | |||
| wxBillProperty.updateTenantInfo(getTenantInfo()); | |||
| wxBillPropertyService.saveOrUpdate(wxBillProperty, getUser()); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "物业账单-更新") | |||
| public ResultData update(@RequestBody WxBillProperty wxBillProperty) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillPropertyController::update"); | |||
| wxBillProperty.updateTenantInfo(getTenantInfo()); | |||
| return wxBillPropertyService.saveOrUpdate(wxBillProperty, getUser()); | |||
| } | |||
| @ApiOperation("修改滞纳金") | |||
| @PostMapping("updateLatePayMoney") | |||
| @SystemControllerLog(description = "修改滞纳金") | |||
| public ResultData updateLatePayMoney(@RequestBody WxBillProperty wxBillProperty) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillRentController::updateLatePayMoney"); | |||
| wxBillProperty.updateTenantInfo(getTenantInfo()); | |||
| return wxBillPropertyService.updateLatePayMoney(wxBillProperty, getUser()); | |||
| } | |||
| @@ -136,8 +131,7 @@ public class WxBillPropertyController extends BillBaseController { | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "String", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "物业账单-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillPropertyController::delete"); | |||
| wxBillPropertyService.deleteById(id); | |||
| wxBillPropertyService.deleteById(this.getTenantInfo(),id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @@ -149,9 +143,7 @@ public class WxBillPropertyController extends BillBaseController { | |||
| @GetMapping("/updatePaid") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "物业账单-支付更新") | |||
| public ResultData updatePaid(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillPropertyController::updatePaid"); | |||
| return wxBillPropertyService.updatePaid(id); | |||
| } | |||
| @@ -167,15 +159,13 @@ public class WxBillPropertyController extends BillBaseController { | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| public ResultData findByPropertyContractId(Long propertyContractId, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillPropertyController::findByPropertyContractId"); | |||
| final PageInfo<WxBillProperty> page = wxBillPropertyService.findByPropertyContractId(propertyContractId, getTenantInfo(), pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @PostMapping("updateLatePayStatus") | |||
| @SystemControllerLog(description = "物业账单-滞纳金结单") | |||
| public ResultData updateLatePayStatus(@RequestBody WxBillProperty wxBillProperty) { | |||
| wxBillProperty.updateTenantInfo(getTenantInfo()); | |||
| return wxBillPropertyService.updateLatePayStatus(wxBillProperty); | |||
| } | |||
| @@ -46,7 +46,6 @@ public class WxBillPropertyDepositController extends BillBaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "物业押金账单-列表") | |||
| public ResultData list(@ModelAttribute WxBillPropertyDeposit wxBillPropertyDeposit, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillPropertyDepositController::list"); | |||
| if (null == wxBillPropertyDeposit) { | |||
| @@ -110,18 +109,15 @@ public class WxBillPropertyDepositController extends BillBaseController { | |||
| } | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "物业押金账单-新增") | |||
| public ResultData add(@RequestBody WxBillPropertyDeposit wxBillPropertyDeposit) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillPropertyDepositController::add"); | |||
| wxBillPropertyDeposit.updateTenantInfo(getTenantInfo()); | |||
| wxBillPropertyDepositService.saveOrUpdate(wxBillPropertyDeposit, getUser()); | |||
| return new ResultData(); | |||
| } | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "物业押金账单-更新") | |||
| public ResultData update(@RequestBody WxBillPropertyDeposit wxBillPropertyDeposit) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillPropertyDepositController::update"); | |||
| wxBillPropertyDeposit.updateTenantInfo(getTenantInfo()); | |||
| return wxBillPropertyDepositService.saveOrUpdate(wxBillPropertyDeposit, getUser()); | |||
| } | |||
| @@ -129,48 +125,38 @@ public class WxBillPropertyDepositController extends BillBaseController { | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "物业押金账单-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillPropertyDepositController::delete"); | |||
| wxBillPropertyDepositService.deleteById(id); | |||
| wxBillPropertyDepositService.deleteById(this.getTenantInfo() ,id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "物业押金账单-id查找") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillPropertyDepositController::findById"); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxBillPropertyDepositService.getById(id)); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxBillPropertyDepositService.getById(this.getTenantInfo() ,id)); | |||
| } | |||
| @GetMapping("/detail") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "物业押金账单-id查找") | |||
| public ResultData detail(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillPropertyDepositController::findById"); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxBillPropertyDepositService.detail(this.getTenantInfo() ,id)); | |||
| } | |||
| @GetMapping("/updatePaid") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "物业押金账单-支付更新") | |||
| public ResultData updatePaid(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillPropertyDepositController::updatePaid"); | |||
| return wxBillPropertyDepositService.updatePaid(id); | |||
| } | |||
| @PostMapping("returnDeposit") | |||
| @SystemControllerLog(description = "物业押金账单-退回押金") | |||
| public ResultData returnDeposit(@RequestBody WxBillPropertyDeposit wxBillPropertyDeposit) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillPropertyDepositController::returnDeposit"); | |||
| wxBillPropertyDeposit.updateTenantInfo(getTenantInfo()); | |||
| return wxBillPropertyDepositService.returnDeposit(wxBillPropertyDeposit, getUser()); | |||
| } | |||
| @PostMapping("adjustDeposit") | |||
| @SystemControllerLog(description = "物业押金账单-调整押金") | |||
| public ResultData adjustDeposit(@RequestBody WxBillPropertyDeposit wxBillPropertyDeposit) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillPropertyDepositController::adjustDeposit"); | |||
| wxBillPropertyDeposit.updateTenantInfo(getTenantInfo()); | |||
| return wxBillPropertyDepositService.adjustDeposit(wxBillPropertyDeposit); | |||
| } | |||
| @@ -45,7 +45,6 @@ public class WxBillRentController extends BillBaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "租赁押金账单-列表") | |||
| public ResultData list(@ModelAttribute WxBillRent wxBillRent, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillRentController::list"); | |||
| if (null == wxBillRent) { | |||
| @@ -72,7 +71,6 @@ public class WxBillRentController extends BillBaseController { | |||
| } | |||
| @GetMapping("exportBill") | |||
| @SystemControllerLog(description = "租赁押金账单-导出") | |||
| public void exportBill(@ModelAttribute WxBillRent wxBillRent, HttpServletRequest request, HttpServletResponse response) { | |||
| wxBillRent.updateTenantInfo(getTenantInfo()); | |||
| WxUserDataRule dataRule = this.getCurrentDataFloors(); | |||
| @@ -111,7 +109,6 @@ public class WxBillRentController extends BillBaseController { | |||
| } | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "租赁押金账单-新增") | |||
| public ResultData add(@RequestBody WxBillRent wxBillRent) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillRentController::add"); | |||
| wxBillRent.updateTenantInfo(getTenantInfo()); | |||
| @@ -119,17 +116,17 @@ public class WxBillRentController extends BillBaseController { | |||
| } | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "租赁押金账单-更新") | |||
| public ResultData update(@RequestBody WxBillRent wxBillRent) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillRentController::update"); | |||
| wxBillRent.updateTenantInfo(getTenantInfo()); | |||
| return wxBillRentService.saveOrUpdate(wxBillRent, getUser()); | |||
| } | |||
| @ApiOperation("修改滞纳金") | |||
| @PostMapping("updateLatePayMoney") | |||
| @SystemControllerLog(description = "修改滞纳金") | |||
| public ResultData updateLatePayMoney(@RequestBody WxBillRent wxBillRent) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillRentController::updateLatePayMoney"); | |||
| wxBillRent.updateTenantInfo(getTenantInfo()); | |||
| return wxBillRentService.updateLatePayMoney(wxBillRent, getUser()); | |||
| } | |||
| @@ -138,7 +135,7 @@ public class WxBillRentController extends BillBaseController { | |||
| @SystemControllerLog(description = "租赁押金账单-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillRentController::delete"); | |||
| wxBillRentService.deleteById(id); | |||
| wxBillRentService.deleteById(this.getTenantInfo(),id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @@ -153,9 +150,7 @@ public class WxBillRentController extends BillBaseController { | |||
| @ApiImplicitParam(name = "rentContractId", value = "merchantId", dataType = "Long", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "租赁押金账单-根据商户获取") | |||
| public ResultData findByRentContractId(Long rentContractId, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillRentController::findByRentContractId"); | |||
| WxBillRent record = new WxBillRent(); | |||
| record.setRentContractId(rentContractId); | |||
| record.updateTenantInfo(getTenantInfo()); | |||
| @@ -163,13 +158,13 @@ public class WxBillRentController extends BillBaseController { | |||
| return new ResultData(page); | |||
| } | |||
| @GetMapping("/updatePaid") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "租赁押金账单-支付更新") | |||
| public ResultData updatePaid(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillRentController::updatePaid"); | |||
| return wxBillRentService.updatePaid(id); | |||
| } | |||
| // @GetMapping("/updatePaid") | |||
| // @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| // @SystemControllerLog(description = "租赁押金账单-支付更新") | |||
| // public ResultData updatePaid(Long id) { | |||
| // logger.debug("[" + getIpAddr() + "] WxBillRentController::updatePaid"); | |||
| // return wxBillRentService.updatePaid(id); | |||
| // } | |||
| @GetMapping("/detail") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @@ -178,17 +173,15 @@ public class WxBillRentController extends BillBaseController { | |||
| } | |||
| @PostMapping("updateRevenue") | |||
| @SystemControllerLog(description = "租赁押金账单-更新营业额") | |||
| public ResultData updateRevenue(@RequestBody WxBillRent wxBillRent) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillRentController::updateRevenue"); | |||
| wxBillRent.updateTenantInfo(getTenantInfo()); | |||
| return wxBillRentService.updateRevenue(wxBillRent, getUser()); | |||
| } | |||
| @PostMapping("updateLatePayStatus") | |||
| @SystemControllerLog(description = "租赁押金账单-滞纳金结单") | |||
| public ResultData updateLatePayStatus(@RequestBody WxBillRent wxBillRent) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillRentController::updateLatePayStatus"); | |||
| wxBillRent.updateTenantInfo(getTenantInfo()); | |||
| return wxBillRentService.updateLatePayStatus(wxBillRent); | |||
| } | |||
| @@ -72,7 +72,6 @@ public class WxBillRentManageController extends BillBaseController { | |||
| } | |||
| @GetMapping("exportBill") | |||
| @SystemControllerLog(description = "租赁押金账单-导出") | |||
| public void exportBill(@ModelAttribute WxBillRentManage wxBillRentManage, HttpServletRequest request, HttpServletResponse response) { | |||
| wxBillRentManage.updateTenantInfo(getTenantInfo()); | |||
| WxUserDataRule dataRule = this.getCurrentDataFloors(); | |||
| @@ -117,7 +116,6 @@ public class WxBillRentManageController extends BillBaseController { | |||
| } | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "租赁押金账单-新增") | |||
| public ResultData add(@RequestBody WxBillRentManage wxBillRentManage) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillRentController::add"); | |||
| wxBillRentManage.updateTenantInfo(getTenantInfo()); | |||
| @@ -131,9 +129,9 @@ public class WxBillRentManageController extends BillBaseController { | |||
| } | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "租赁押金账单-更新") | |||
| public ResultData update(@RequestBody WxBillRentManage wxBillRentManage) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillRentController::update"); | |||
| wxBillRentManage.updateTenantInfo(getTenantInfo()); | |||
| return wxBillRentManageService.saveOrUpdate(wxBillRentManage, getUser()); | |||
| } | |||
| @@ -144,7 +142,6 @@ public class WxBillRentManageController extends BillBaseController { | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| public ResultData findByRentContractId(Long rentContractId, Integer manageFeeType,Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillRentController::findByRentContractId"); | |||
| WxBillRentManage record = new WxBillRentManage(); | |||
| record.setRentContractId(rentContractId); | |||
| record.updateTenantInfo(getTenantInfo()); | |||
| @@ -158,9 +155,8 @@ public class WxBillRentManageController extends BillBaseController { | |||
| @ApiOperation("修改滞纳金") | |||
| @PostMapping("updateLatePayMoney") | |||
| @SystemControllerLog(description = "修改滞纳金") | |||
| public ResultData updateLatePayMoney(@RequestBody WxBillRentManage wxBillRentManage) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillRentController::updateLatePayMoney"); | |||
| wxBillRentManage.updateTenantInfo(getTenantInfo()); | |||
| return wxBillRentManageService.updateLatePayMoney(wxBillRentManage, getUser()); | |||
| } | |||
| @@ -168,24 +164,20 @@ public class WxBillRentManageController extends BillBaseController { | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "租赁押金账单-删除") | |||
| public ResultData delete(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillRentController::delete"); | |||
| wxBillRentManageService.deleteById(id); | |||
| wxBillRentManageService.deleteById(this.getTenantInfo(),id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @GetMapping("/updatePaid") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "租赁押金账单-支付更新") | |||
| public ResultData updatePaid(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillRentController::updatePaid"); | |||
| return wxBillRentManageService.updatePaid(id); | |||
| } | |||
| @PostMapping("updateLatePayStatus") | |||
| @SystemControllerLog(description = "租赁押金账单-滞纳金结单") | |||
| public ResultData updateLatePayStatus(@RequestBody WxBillRentManage wxBillRent) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillRentController::updateLatePayStatus"); | |||
| wxBillRent.updateTenantInfo(getTenantInfo()); | |||
| return wxBillRentManageService.updateLatePayStatus(wxBillRent); | |||
| } | |||
| @@ -0,0 +1,927 @@ | |||
| create table wx_bill_rent_0 like wx_bill_rent; | |||
| create table wx_bill_rent_1 like wx_bill_rent; | |||
| create table wx_bill_rent_2 like wx_bill_rent; | |||
| create table wx_bill_rent_3 like wx_bill_rent; | |||
| create table wx_bill_rent_4 like wx_bill_rent; | |||
| create table wx_bill_rent_5 like wx_bill_rent; | |||
| create table wx_bill_rent_6 like wx_bill_rent; | |||
| create table wx_bill_rent_7 like wx_bill_rent; | |||
| create table wx_bill_rent_8 like wx_bill_rent; | |||
| create table wx_bill_rent_9 like wx_bill_rent; | |||
| create table wx_bill_rent_10 like wx_bill_rent; | |||
| create table wx_bill_rent_11 like wx_bill_rent; | |||
| create table wx_bill_rent_12 like wx_bill_rent; | |||
| create table wx_bill_rent_13 like wx_bill_rent; | |||
| create table wx_bill_rent_14 like wx_bill_rent; | |||
| create table wx_bill_rent_15 like wx_bill_rent; | |||
| create table wx_bill_rent_16 like wx_bill_rent; | |||
| create table wx_bill_rent_17 like wx_bill_rent; | |||
| create table wx_bill_rent_18 like wx_bill_rent; | |||
| create table wx_bill_rent_19 like wx_bill_rent; | |||
| create table wx_bill_rent_20 like wx_bill_rent; | |||
| create table wx_bill_rent_21 like wx_bill_rent; | |||
| create table wx_bill_rent_22 like wx_bill_rent; | |||
| create table wx_bill_rent_23 like wx_bill_rent; | |||
| create table wx_bill_rent_24 like wx_bill_rent; | |||
| create table wx_bill_rent_25 like wx_bill_rent; | |||
| create table wx_bill_rent_26 like wx_bill_rent; | |||
| create table wx_bill_rent_27 like wx_bill_rent; | |||
| create table wx_bill_rent_28 like wx_bill_rent; | |||
| create table wx_bill_rent_29 like wx_bill_rent; | |||
| create table wx_bill_rent_30 like wx_bill_rent; | |||
| create table wx_bill_rent_31 like wx_bill_rent; | |||
| create table wx_bill_rent_32 like wx_bill_rent; | |||
| create table wx_bill_rent_33 like wx_bill_rent; | |||
| create table wx_bill_rent_34 like wx_bill_rent; | |||
| create table wx_bill_rent_35 like wx_bill_rent; | |||
| create table wx_bill_rent_36 like wx_bill_rent; | |||
| create table wx_bill_rent_37 like wx_bill_rent; | |||
| create table wx_bill_rent_38 like wx_bill_rent; | |||
| create table wx_bill_rent_39 like wx_bill_rent; | |||
| create table wx_bill_rent_40 like wx_bill_rent; | |||
| create table wx_bill_rent_41 like wx_bill_rent; | |||
| create table wx_bill_rent_42 like wx_bill_rent; | |||
| create table wx_bill_rent_43 like wx_bill_rent; | |||
| create table wx_bill_rent_44 like wx_bill_rent; | |||
| create table wx_bill_rent_45 like wx_bill_rent; | |||
| create table wx_bill_rent_46 like wx_bill_rent; | |||
| create table wx_bill_rent_47 like wx_bill_rent; | |||
| create table wx_bill_rent_48 like wx_bill_rent; | |||
| create table wx_bill_rent_49 like wx_bill_rent; | |||
| create table wx_bill_rent_50 like wx_bill_rent; | |||
| create table wx_bill_rent_51 like wx_bill_rent; | |||
| create table wx_bill_rent_52 like wx_bill_rent; | |||
| create table wx_bill_rent_53 like wx_bill_rent; | |||
| create table wx_bill_rent_54 like wx_bill_rent; | |||
| create table wx_bill_rent_55 like wx_bill_rent; | |||
| create table wx_bill_rent_56 like wx_bill_rent; | |||
| create table wx_bill_rent_57 like wx_bill_rent; | |||
| create table wx_bill_rent_58 like wx_bill_rent; | |||
| create table wx_bill_rent_59 like wx_bill_rent; | |||
| create table wx_bill_rent_60 like wx_bill_rent; | |||
| create table wx_bill_rent_61 like wx_bill_rent; | |||
| create table wx_bill_rent_62 like wx_bill_rent; | |||
| create table wx_bill_rent_63 like wx_bill_rent; | |||
| create table wx_bill_rent_64 like wx_bill_rent; | |||
| create table wx_bill_rent_65 like wx_bill_rent; | |||
| create table wx_bill_rent_66 like wx_bill_rent; | |||
| create table wx_bill_rent_67 like wx_bill_rent; | |||
| create table wx_bill_rent_68 like wx_bill_rent; | |||
| create table wx_bill_rent_69 like wx_bill_rent; | |||
| create table wx_bill_rent_70 like wx_bill_rent; | |||
| create table wx_bill_rent_71 like wx_bill_rent; | |||
| create table wx_bill_rent_72 like wx_bill_rent; | |||
| create table wx_bill_rent_73 like wx_bill_rent; | |||
| create table wx_bill_rent_74 like wx_bill_rent; | |||
| create table wx_bill_rent_75 like wx_bill_rent; | |||
| create table wx_bill_rent_76 like wx_bill_rent; | |||
| create table wx_bill_rent_77 like wx_bill_rent; | |||
| create table wx_bill_rent_78 like wx_bill_rent; | |||
| create table wx_bill_rent_79 like wx_bill_rent; | |||
| create table wx_bill_rent_80 like wx_bill_rent; | |||
| create table wx_bill_rent_81 like wx_bill_rent; | |||
| create table wx_bill_rent_82 like wx_bill_rent; | |||
| create table wx_bill_rent_83 like wx_bill_rent; | |||
| create table wx_bill_rent_84 like wx_bill_rent; | |||
| create table wx_bill_rent_85 like wx_bill_rent; | |||
| create table wx_bill_rent_86 like wx_bill_rent; | |||
| create table wx_bill_rent_87 like wx_bill_rent; | |||
| create table wx_bill_rent_88 like wx_bill_rent; | |||
| create table wx_bill_rent_89 like wx_bill_rent; | |||
| create table wx_bill_rent_90 like wx_bill_rent; | |||
| create table wx_bill_rent_91 like wx_bill_rent; | |||
| create table wx_bill_rent_92 like wx_bill_rent; | |||
| create table wx_bill_rent_93 like wx_bill_rent; | |||
| create table wx_bill_rent_94 like wx_bill_rent; | |||
| create table wx_bill_rent_95 like wx_bill_rent; | |||
| create table wx_bill_rent_96 like wx_bill_rent; | |||
| create table wx_bill_rent_97 like wx_bill_rent; | |||
| create table wx_bill_rent_98 like wx_bill_rent; | |||
| create table wx_bill_rent_99 like wx_bill_rent; | |||
| drop table wx_bill_rent; | |||
| create table wx_bill_action_0 like wx_bill_action; | |||
| create table wx_bill_action_1 like wx_bill_action; | |||
| create table wx_bill_action_2 like wx_bill_action; | |||
| create table wx_bill_action_3 like wx_bill_action; | |||
| create table wx_bill_action_4 like wx_bill_action; | |||
| create table wx_bill_action_5 like wx_bill_action; | |||
| create table wx_bill_action_6 like wx_bill_action; | |||
| create table wx_bill_action_7 like wx_bill_action; | |||
| create table wx_bill_action_8 like wx_bill_action; | |||
| create table wx_bill_action_9 like wx_bill_action; | |||
| create table wx_bill_action_10 like wx_bill_action; | |||
| create table wx_bill_action_11 like wx_bill_action; | |||
| create table wx_bill_action_12 like wx_bill_action; | |||
| create table wx_bill_action_13 like wx_bill_action; | |||
| create table wx_bill_action_14 like wx_bill_action; | |||
| create table wx_bill_action_15 like wx_bill_action; | |||
| create table wx_bill_action_16 like wx_bill_action; | |||
| create table wx_bill_action_17 like wx_bill_action; | |||
| create table wx_bill_action_18 like wx_bill_action; | |||
| create table wx_bill_action_19 like wx_bill_action; | |||
| create table wx_bill_action_20 like wx_bill_action; | |||
| create table wx_bill_action_21 like wx_bill_action; | |||
| create table wx_bill_action_22 like wx_bill_action; | |||
| create table wx_bill_action_23 like wx_bill_action; | |||
| create table wx_bill_action_24 like wx_bill_action; | |||
| create table wx_bill_action_25 like wx_bill_action; | |||
| create table wx_bill_action_26 like wx_bill_action; | |||
| create table wx_bill_action_27 like wx_bill_action; | |||
| create table wx_bill_action_28 like wx_bill_action; | |||
| create table wx_bill_action_29 like wx_bill_action; | |||
| create table wx_bill_action_30 like wx_bill_action; | |||
| create table wx_bill_action_31 like wx_bill_action; | |||
| create table wx_bill_action_32 like wx_bill_action; | |||
| create table wx_bill_action_33 like wx_bill_action; | |||
| create table wx_bill_action_34 like wx_bill_action; | |||
| create table wx_bill_action_35 like wx_bill_action; | |||
| create table wx_bill_action_36 like wx_bill_action; | |||
| create table wx_bill_action_37 like wx_bill_action; | |||
| create table wx_bill_action_38 like wx_bill_action; | |||
| create table wx_bill_action_39 like wx_bill_action; | |||
| create table wx_bill_action_40 like wx_bill_action; | |||
| create table wx_bill_action_41 like wx_bill_action; | |||
| create table wx_bill_action_42 like wx_bill_action; | |||
| create table wx_bill_action_43 like wx_bill_action; | |||
| create table wx_bill_action_44 like wx_bill_action; | |||
| create table wx_bill_action_45 like wx_bill_action; | |||
| create table wx_bill_action_46 like wx_bill_action; | |||
| create table wx_bill_action_47 like wx_bill_action; | |||
| create table wx_bill_action_48 like wx_bill_action; | |||
| create table wx_bill_action_49 like wx_bill_action; | |||
| create table wx_bill_action_50 like wx_bill_action; | |||
| create table wx_bill_action_51 like wx_bill_action; | |||
| create table wx_bill_action_52 like wx_bill_action; | |||
| create table wx_bill_action_53 like wx_bill_action; | |||
| create table wx_bill_action_54 like wx_bill_action; | |||
| create table wx_bill_action_55 like wx_bill_action; | |||
| create table wx_bill_action_56 like wx_bill_action; | |||
| create table wx_bill_action_57 like wx_bill_action; | |||
| create table wx_bill_action_58 like wx_bill_action; | |||
| create table wx_bill_action_59 like wx_bill_action; | |||
| create table wx_bill_action_60 like wx_bill_action; | |||
| create table wx_bill_action_61 like wx_bill_action; | |||
| create table wx_bill_action_62 like wx_bill_action; | |||
| create table wx_bill_action_63 like wx_bill_action; | |||
| create table wx_bill_action_64 like wx_bill_action; | |||
| create table wx_bill_action_65 like wx_bill_action; | |||
| create table wx_bill_action_66 like wx_bill_action; | |||
| create table wx_bill_action_67 like wx_bill_action; | |||
| create table wx_bill_action_68 like wx_bill_action; | |||
| create table wx_bill_action_69 like wx_bill_action; | |||
| create table wx_bill_action_70 like wx_bill_action; | |||
| create table wx_bill_action_71 like wx_bill_action; | |||
| create table wx_bill_action_72 like wx_bill_action; | |||
| create table wx_bill_action_73 like wx_bill_action; | |||
| create table wx_bill_action_74 like wx_bill_action; | |||
| create table wx_bill_action_75 like wx_bill_action; | |||
| create table wx_bill_action_76 like wx_bill_action; | |||
| create table wx_bill_action_77 like wx_bill_action; | |||
| create table wx_bill_action_78 like wx_bill_action; | |||
| create table wx_bill_action_79 like wx_bill_action; | |||
| create table wx_bill_action_80 like wx_bill_action; | |||
| create table wx_bill_action_81 like wx_bill_action; | |||
| create table wx_bill_action_82 like wx_bill_action; | |||
| create table wx_bill_action_83 like wx_bill_action; | |||
| create table wx_bill_action_84 like wx_bill_action; | |||
| create table wx_bill_action_85 like wx_bill_action; | |||
| create table wx_bill_action_86 like wx_bill_action; | |||
| create table wx_bill_action_87 like wx_bill_action; | |||
| create table wx_bill_action_88 like wx_bill_action; | |||
| create table wx_bill_action_89 like wx_bill_action; | |||
| create table wx_bill_action_90 like wx_bill_action; | |||
| create table wx_bill_action_91 like wx_bill_action; | |||
| create table wx_bill_action_92 like wx_bill_action; | |||
| create table wx_bill_action_93 like wx_bill_action; | |||
| create table wx_bill_action_94 like wx_bill_action; | |||
| create table wx_bill_action_95 like wx_bill_action; | |||
| create table wx_bill_action_96 like wx_bill_action; | |||
| create table wx_bill_action_97 like wx_bill_action; | |||
| create table wx_bill_action_98 like wx_bill_action; | |||
| create table wx_bill_action_99 like wx_bill_action; | |||
| drop table wx_bill_action; | |||
| create table wx_bill_rent_manage_0 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_1 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_2 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_3 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_4 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_5 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_6 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_7 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_8 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_9 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_10 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_11 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_12 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_13 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_14 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_15 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_16 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_17 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_18 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_19 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_20 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_21 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_22 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_23 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_24 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_25 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_26 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_27 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_28 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_29 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_30 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_31 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_32 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_33 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_34 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_35 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_36 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_37 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_38 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_39 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_40 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_41 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_42 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_43 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_44 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_45 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_46 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_47 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_48 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_49 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_50 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_51 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_52 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_53 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_54 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_55 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_56 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_57 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_58 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_59 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_60 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_61 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_62 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_63 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_64 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_65 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_66 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_67 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_68 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_69 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_70 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_71 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_72 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_73 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_74 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_75 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_76 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_77 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_78 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_79 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_80 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_81 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_82 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_83 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_84 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_85 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_86 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_87 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_88 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_89 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_90 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_91 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_92 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_93 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_94 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_95 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_96 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_97 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_98 like wx_bill_rent_manage; | |||
| create table wx_bill_rent_manage_99 like wx_bill_rent_manage; | |||
| drop table wx_bill_rent_manage; | |||
| create table wx_bill_rent_deposit_0 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_1 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_2 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_3 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_4 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_5 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_6 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_7 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_8 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_9 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_10 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_11 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_12 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_13 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_14 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_15 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_16 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_17 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_18 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_19 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_20 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_21 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_22 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_23 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_24 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_25 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_26 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_27 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_28 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_29 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_30 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_31 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_32 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_33 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_34 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_35 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_36 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_37 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_38 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_39 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_40 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_41 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_42 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_43 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_44 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_45 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_46 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_47 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_48 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_49 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_50 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_51 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_52 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_53 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_54 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_55 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_56 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_57 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_58 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_59 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_60 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_61 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_62 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_63 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_64 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_65 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_66 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_67 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_68 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_69 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_70 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_71 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_72 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_73 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_74 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_75 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_76 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_77 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_78 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_79 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_80 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_81 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_82 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_83 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_84 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_85 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_86 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_87 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_88 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_89 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_90 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_91 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_92 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_93 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_94 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_95 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_96 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_97 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_98 like wx_bill_rent_deposit; | |||
| create table wx_bill_rent_deposit_99 like wx_bill_rent_deposit; | |||
| drop table wx_bill_rent_deposit; | |||
| create table wx_bill_property_0 like wx_bill_property; | |||
| create table wx_bill_property_1 like wx_bill_property; | |||
| create table wx_bill_property_2 like wx_bill_property; | |||
| create table wx_bill_property_3 like wx_bill_property; | |||
| create table wx_bill_property_4 like wx_bill_property; | |||
| create table wx_bill_property_5 like wx_bill_property; | |||
| create table wx_bill_property_6 like wx_bill_property; | |||
| create table wx_bill_property_7 like wx_bill_property; | |||
| create table wx_bill_property_8 like wx_bill_property; | |||
| create table wx_bill_property_9 like wx_bill_property; | |||
| create table wx_bill_property_10 like wx_bill_property; | |||
| create table wx_bill_property_11 like wx_bill_property; | |||
| create table wx_bill_property_12 like wx_bill_property; | |||
| create table wx_bill_property_13 like wx_bill_property; | |||
| create table wx_bill_property_14 like wx_bill_property; | |||
| create table wx_bill_property_15 like wx_bill_property; | |||
| create table wx_bill_property_16 like wx_bill_property; | |||
| create table wx_bill_property_17 like wx_bill_property; | |||
| create table wx_bill_property_18 like wx_bill_property; | |||
| create table wx_bill_property_19 like wx_bill_property; | |||
| create table wx_bill_property_20 like wx_bill_property; | |||
| create table wx_bill_property_21 like wx_bill_property; | |||
| create table wx_bill_property_22 like wx_bill_property; | |||
| create table wx_bill_property_23 like wx_bill_property; | |||
| create table wx_bill_property_24 like wx_bill_property; | |||
| create table wx_bill_property_25 like wx_bill_property; | |||
| create table wx_bill_property_26 like wx_bill_property; | |||
| create table wx_bill_property_27 like wx_bill_property; | |||
| create table wx_bill_property_28 like wx_bill_property; | |||
| create table wx_bill_property_29 like wx_bill_property; | |||
| create table wx_bill_property_30 like wx_bill_property; | |||
| create table wx_bill_property_31 like wx_bill_property; | |||
| create table wx_bill_property_32 like wx_bill_property; | |||
| create table wx_bill_property_33 like wx_bill_property; | |||
| create table wx_bill_property_34 like wx_bill_property; | |||
| create table wx_bill_property_35 like wx_bill_property; | |||
| create table wx_bill_property_36 like wx_bill_property; | |||
| create table wx_bill_property_37 like wx_bill_property; | |||
| create table wx_bill_property_38 like wx_bill_property; | |||
| create table wx_bill_property_39 like wx_bill_property; | |||
| create table wx_bill_property_40 like wx_bill_property; | |||
| create table wx_bill_property_41 like wx_bill_property; | |||
| create table wx_bill_property_42 like wx_bill_property; | |||
| create table wx_bill_property_43 like wx_bill_property; | |||
| create table wx_bill_property_44 like wx_bill_property; | |||
| create table wx_bill_property_45 like wx_bill_property; | |||
| create table wx_bill_property_46 like wx_bill_property; | |||
| create table wx_bill_property_47 like wx_bill_property; | |||
| create table wx_bill_property_48 like wx_bill_property; | |||
| create table wx_bill_property_49 like wx_bill_property; | |||
| create table wx_bill_property_50 like wx_bill_property; | |||
| create table wx_bill_property_51 like wx_bill_property; | |||
| create table wx_bill_property_52 like wx_bill_property; | |||
| create table wx_bill_property_53 like wx_bill_property; | |||
| create table wx_bill_property_54 like wx_bill_property; | |||
| create table wx_bill_property_55 like wx_bill_property; | |||
| create table wx_bill_property_56 like wx_bill_property; | |||
| create table wx_bill_property_57 like wx_bill_property; | |||
| create table wx_bill_property_58 like wx_bill_property; | |||
| create table wx_bill_property_59 like wx_bill_property; | |||
| create table wx_bill_property_60 like wx_bill_property; | |||
| create table wx_bill_property_61 like wx_bill_property; | |||
| create table wx_bill_property_62 like wx_bill_property; | |||
| create table wx_bill_property_63 like wx_bill_property; | |||
| create table wx_bill_property_64 like wx_bill_property; | |||
| create table wx_bill_property_65 like wx_bill_property; | |||
| create table wx_bill_property_66 like wx_bill_property; | |||
| create table wx_bill_property_67 like wx_bill_property; | |||
| create table wx_bill_property_68 like wx_bill_property; | |||
| create table wx_bill_property_69 like wx_bill_property; | |||
| create table wx_bill_property_70 like wx_bill_property; | |||
| create table wx_bill_property_71 like wx_bill_property; | |||
| create table wx_bill_property_72 like wx_bill_property; | |||
| create table wx_bill_property_73 like wx_bill_property; | |||
| create table wx_bill_property_74 like wx_bill_property; | |||
| create table wx_bill_property_75 like wx_bill_property; | |||
| create table wx_bill_property_76 like wx_bill_property; | |||
| create table wx_bill_property_77 like wx_bill_property; | |||
| create table wx_bill_property_78 like wx_bill_property; | |||
| create table wx_bill_property_79 like wx_bill_property; | |||
| create table wx_bill_property_80 like wx_bill_property; | |||
| create table wx_bill_property_81 like wx_bill_property; | |||
| create table wx_bill_property_82 like wx_bill_property; | |||
| create table wx_bill_property_83 like wx_bill_property; | |||
| create table wx_bill_property_84 like wx_bill_property; | |||
| create table wx_bill_property_85 like wx_bill_property; | |||
| create table wx_bill_property_86 like wx_bill_property; | |||
| create table wx_bill_property_87 like wx_bill_property; | |||
| create table wx_bill_property_88 like wx_bill_property; | |||
| create table wx_bill_property_89 like wx_bill_property; | |||
| create table wx_bill_property_90 like wx_bill_property; | |||
| create table wx_bill_property_91 like wx_bill_property; | |||
| create table wx_bill_property_92 like wx_bill_property; | |||
| create table wx_bill_property_93 like wx_bill_property; | |||
| create table wx_bill_property_94 like wx_bill_property; | |||
| create table wx_bill_property_95 like wx_bill_property; | |||
| create table wx_bill_property_96 like wx_bill_property; | |||
| create table wx_bill_property_97 like wx_bill_property; | |||
| create table wx_bill_property_98 like wx_bill_property; | |||
| create table wx_bill_property_99 like wx_bill_property; | |||
| drop table wx_bill_property; | |||
| create table wx_bill_property_deposit_0 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_1 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_2 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_3 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_4 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_5 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_6 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_7 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_8 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_9 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_10 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_11 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_12 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_13 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_14 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_15 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_16 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_17 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_18 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_19 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_20 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_21 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_22 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_23 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_24 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_25 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_26 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_27 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_28 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_29 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_30 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_31 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_32 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_33 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_34 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_35 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_36 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_37 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_38 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_39 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_40 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_41 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_42 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_43 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_44 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_45 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_46 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_47 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_48 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_49 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_50 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_51 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_52 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_53 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_54 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_55 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_56 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_57 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_58 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_59 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_60 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_61 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_62 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_63 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_64 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_65 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_66 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_67 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_68 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_69 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_70 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_71 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_72 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_73 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_74 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_75 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_76 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_77 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_78 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_79 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_80 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_81 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_82 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_83 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_84 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_85 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_86 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_87 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_88 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_89 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_90 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_91 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_92 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_93 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_94 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_95 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_96 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_97 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_98 like wx_bill_property_deposit; | |||
| create table wx_bill_property_deposit_99 like wx_bill_property_deposit; | |||
| drop table wx_bill_property_deposit; | |||
| create table wx_bill_daily_0 like wx_bill_daily; | |||
| create table wx_bill_daily_1 like wx_bill_daily; | |||
| create table wx_bill_daily_2 like wx_bill_daily; | |||
| create table wx_bill_daily_3 like wx_bill_daily; | |||
| create table wx_bill_daily_4 like wx_bill_daily; | |||
| create table wx_bill_daily_5 like wx_bill_daily; | |||
| create table wx_bill_daily_6 like wx_bill_daily; | |||
| create table wx_bill_daily_7 like wx_bill_daily; | |||
| create table wx_bill_daily_8 like wx_bill_daily; | |||
| create table wx_bill_daily_9 like wx_bill_daily; | |||
| create table wx_bill_daily_10 like wx_bill_daily; | |||
| create table wx_bill_daily_11 like wx_bill_daily; | |||
| create table wx_bill_daily_12 like wx_bill_daily; | |||
| create table wx_bill_daily_13 like wx_bill_daily; | |||
| create table wx_bill_daily_14 like wx_bill_daily; | |||
| create table wx_bill_daily_15 like wx_bill_daily; | |||
| create table wx_bill_daily_16 like wx_bill_daily; | |||
| create table wx_bill_daily_17 like wx_bill_daily; | |||
| create table wx_bill_daily_18 like wx_bill_daily; | |||
| create table wx_bill_daily_19 like wx_bill_daily; | |||
| create table wx_bill_daily_20 like wx_bill_daily; | |||
| create table wx_bill_daily_21 like wx_bill_daily; | |||
| create table wx_bill_daily_22 like wx_bill_daily; | |||
| create table wx_bill_daily_23 like wx_bill_daily; | |||
| create table wx_bill_daily_24 like wx_bill_daily; | |||
| create table wx_bill_daily_25 like wx_bill_daily; | |||
| create table wx_bill_daily_26 like wx_bill_daily; | |||
| create table wx_bill_daily_27 like wx_bill_daily; | |||
| create table wx_bill_daily_28 like wx_bill_daily; | |||
| create table wx_bill_daily_29 like wx_bill_daily; | |||
| create table wx_bill_daily_30 like wx_bill_daily; | |||
| create table wx_bill_daily_31 like wx_bill_daily; | |||
| create table wx_bill_daily_32 like wx_bill_daily; | |||
| create table wx_bill_daily_33 like wx_bill_daily; | |||
| create table wx_bill_daily_34 like wx_bill_daily; | |||
| create table wx_bill_daily_35 like wx_bill_daily; | |||
| create table wx_bill_daily_36 like wx_bill_daily; | |||
| create table wx_bill_daily_37 like wx_bill_daily; | |||
| create table wx_bill_daily_38 like wx_bill_daily; | |||
| create table wx_bill_daily_39 like wx_bill_daily; | |||
| create table wx_bill_daily_40 like wx_bill_daily; | |||
| create table wx_bill_daily_41 like wx_bill_daily; | |||
| create table wx_bill_daily_42 like wx_bill_daily; | |||
| create table wx_bill_daily_43 like wx_bill_daily; | |||
| create table wx_bill_daily_44 like wx_bill_daily; | |||
| create table wx_bill_daily_45 like wx_bill_daily; | |||
| create table wx_bill_daily_46 like wx_bill_daily; | |||
| create table wx_bill_daily_47 like wx_bill_daily; | |||
| create table wx_bill_daily_48 like wx_bill_daily; | |||
| create table wx_bill_daily_49 like wx_bill_daily; | |||
| create table wx_bill_daily_50 like wx_bill_daily; | |||
| create table wx_bill_daily_51 like wx_bill_daily; | |||
| create table wx_bill_daily_52 like wx_bill_daily; | |||
| create table wx_bill_daily_53 like wx_bill_daily; | |||
| create table wx_bill_daily_54 like wx_bill_daily; | |||
| create table wx_bill_daily_55 like wx_bill_daily; | |||
| create table wx_bill_daily_56 like wx_bill_daily; | |||
| create table wx_bill_daily_57 like wx_bill_daily; | |||
| create table wx_bill_daily_58 like wx_bill_daily; | |||
| create table wx_bill_daily_59 like wx_bill_daily; | |||
| create table wx_bill_daily_60 like wx_bill_daily; | |||
| create table wx_bill_daily_61 like wx_bill_daily; | |||
| create table wx_bill_daily_62 like wx_bill_daily; | |||
| create table wx_bill_daily_63 like wx_bill_daily; | |||
| create table wx_bill_daily_64 like wx_bill_daily; | |||
| create table wx_bill_daily_65 like wx_bill_daily; | |||
| create table wx_bill_daily_66 like wx_bill_daily; | |||
| create table wx_bill_daily_67 like wx_bill_daily; | |||
| create table wx_bill_daily_68 like wx_bill_daily; | |||
| create table wx_bill_daily_69 like wx_bill_daily; | |||
| create table wx_bill_daily_70 like wx_bill_daily; | |||
| create table wx_bill_daily_71 like wx_bill_daily; | |||
| create table wx_bill_daily_72 like wx_bill_daily; | |||
| create table wx_bill_daily_73 like wx_bill_daily; | |||
| create table wx_bill_daily_74 like wx_bill_daily; | |||
| create table wx_bill_daily_75 like wx_bill_daily; | |||
| create table wx_bill_daily_76 like wx_bill_daily; | |||
| create table wx_bill_daily_77 like wx_bill_daily; | |||
| create table wx_bill_daily_78 like wx_bill_daily; | |||
| create table wx_bill_daily_79 like wx_bill_daily; | |||
| create table wx_bill_daily_80 like wx_bill_daily; | |||
| create table wx_bill_daily_81 like wx_bill_daily; | |||
| create table wx_bill_daily_82 like wx_bill_daily; | |||
| create table wx_bill_daily_83 like wx_bill_daily; | |||
| create table wx_bill_daily_84 like wx_bill_daily; | |||
| create table wx_bill_daily_85 like wx_bill_daily; | |||
| create table wx_bill_daily_86 like wx_bill_daily; | |||
| create table wx_bill_daily_87 like wx_bill_daily; | |||
| create table wx_bill_daily_88 like wx_bill_daily; | |||
| create table wx_bill_daily_89 like wx_bill_daily; | |||
| create table wx_bill_daily_90 like wx_bill_daily; | |||
| create table wx_bill_daily_91 like wx_bill_daily; | |||
| create table wx_bill_daily_92 like wx_bill_daily; | |||
| create table wx_bill_daily_93 like wx_bill_daily; | |||
| create table wx_bill_daily_94 like wx_bill_daily; | |||
| create table wx_bill_daily_95 like wx_bill_daily; | |||
| create table wx_bill_daily_96 like wx_bill_daily; | |||
| create table wx_bill_daily_97 like wx_bill_daily; | |||
| create table wx_bill_daily_98 like wx_bill_daily; | |||
| create table wx_bill_daily_99 like wx_bill_daily; | |||
| drop table wx_bill_daily; | |||
| create table wx_bill_other_0 like wx_bill_other; | |||
| create table wx_bill_other_1 like wx_bill_other; | |||
| create table wx_bill_other_2 like wx_bill_other; | |||
| create table wx_bill_other_3 like wx_bill_other; | |||
| create table wx_bill_other_4 like wx_bill_other; | |||
| create table wx_bill_other_5 like wx_bill_other; | |||
| create table wx_bill_other_6 like wx_bill_other; | |||
| create table wx_bill_other_7 like wx_bill_other; | |||
| create table wx_bill_other_8 like wx_bill_other; | |||
| create table wx_bill_other_9 like wx_bill_other; | |||
| create table wx_bill_other_10 like wx_bill_other; | |||
| create table wx_bill_other_11 like wx_bill_other; | |||
| create table wx_bill_other_12 like wx_bill_other; | |||
| create table wx_bill_other_13 like wx_bill_other; | |||
| create table wx_bill_other_14 like wx_bill_other; | |||
| create table wx_bill_other_15 like wx_bill_other; | |||
| create table wx_bill_other_16 like wx_bill_other; | |||
| create table wx_bill_other_17 like wx_bill_other; | |||
| create table wx_bill_other_18 like wx_bill_other; | |||
| create table wx_bill_other_19 like wx_bill_other; | |||
| create table wx_bill_other_20 like wx_bill_other; | |||
| create table wx_bill_other_21 like wx_bill_other; | |||
| create table wx_bill_other_22 like wx_bill_other; | |||
| create table wx_bill_other_23 like wx_bill_other; | |||
| create table wx_bill_other_24 like wx_bill_other; | |||
| create table wx_bill_other_25 like wx_bill_other; | |||
| create table wx_bill_other_26 like wx_bill_other; | |||
| create table wx_bill_other_27 like wx_bill_other; | |||
| create table wx_bill_other_28 like wx_bill_other; | |||
| create table wx_bill_other_29 like wx_bill_other; | |||
| create table wx_bill_other_30 like wx_bill_other; | |||
| create table wx_bill_other_31 like wx_bill_other; | |||
| create table wx_bill_other_32 like wx_bill_other; | |||
| create table wx_bill_other_33 like wx_bill_other; | |||
| create table wx_bill_other_34 like wx_bill_other; | |||
| create table wx_bill_other_35 like wx_bill_other; | |||
| create table wx_bill_other_36 like wx_bill_other; | |||
| create table wx_bill_other_37 like wx_bill_other; | |||
| create table wx_bill_other_38 like wx_bill_other; | |||
| create table wx_bill_other_39 like wx_bill_other; | |||
| create table wx_bill_other_40 like wx_bill_other; | |||
| create table wx_bill_other_41 like wx_bill_other; | |||
| create table wx_bill_other_42 like wx_bill_other; | |||
| create table wx_bill_other_43 like wx_bill_other; | |||
| create table wx_bill_other_44 like wx_bill_other; | |||
| create table wx_bill_other_45 like wx_bill_other; | |||
| create table wx_bill_other_46 like wx_bill_other; | |||
| create table wx_bill_other_47 like wx_bill_other; | |||
| create table wx_bill_other_48 like wx_bill_other; | |||
| create table wx_bill_other_49 like wx_bill_other; | |||
| create table wx_bill_other_50 like wx_bill_other; | |||
| create table wx_bill_other_51 like wx_bill_other; | |||
| create table wx_bill_other_52 like wx_bill_other; | |||
| create table wx_bill_other_53 like wx_bill_other; | |||
| create table wx_bill_other_54 like wx_bill_other; | |||
| create table wx_bill_other_55 like wx_bill_other; | |||
| create table wx_bill_other_56 like wx_bill_other; | |||
| create table wx_bill_other_57 like wx_bill_other; | |||
| create table wx_bill_other_58 like wx_bill_other; | |||
| create table wx_bill_other_59 like wx_bill_other; | |||
| create table wx_bill_other_60 like wx_bill_other; | |||
| create table wx_bill_other_61 like wx_bill_other; | |||
| create table wx_bill_other_62 like wx_bill_other; | |||
| create table wx_bill_other_63 like wx_bill_other; | |||
| create table wx_bill_other_64 like wx_bill_other; | |||
| create table wx_bill_other_65 like wx_bill_other; | |||
| create table wx_bill_other_66 like wx_bill_other; | |||
| create table wx_bill_other_67 like wx_bill_other; | |||
| create table wx_bill_other_68 like wx_bill_other; | |||
| create table wx_bill_other_69 like wx_bill_other; | |||
| create table wx_bill_other_70 like wx_bill_other; | |||
| create table wx_bill_other_71 like wx_bill_other; | |||
| create table wx_bill_other_72 like wx_bill_other; | |||
| create table wx_bill_other_73 like wx_bill_other; | |||
| create table wx_bill_other_74 like wx_bill_other; | |||
| create table wx_bill_other_75 like wx_bill_other; | |||
| create table wx_bill_other_76 like wx_bill_other; | |||
| create table wx_bill_other_77 like wx_bill_other; | |||
| create table wx_bill_other_78 like wx_bill_other; | |||
| create table wx_bill_other_79 like wx_bill_other; | |||
| create table wx_bill_other_80 like wx_bill_other; | |||
| create table wx_bill_other_81 like wx_bill_other; | |||
| create table wx_bill_other_82 like wx_bill_other; | |||
| create table wx_bill_other_83 like wx_bill_other; | |||
| create table wx_bill_other_84 like wx_bill_other; | |||
| create table wx_bill_other_85 like wx_bill_other; | |||
| create table wx_bill_other_86 like wx_bill_other; | |||
| create table wx_bill_other_87 like wx_bill_other; | |||
| create table wx_bill_other_88 like wx_bill_other; | |||
| create table wx_bill_other_89 like wx_bill_other; | |||
| create table wx_bill_other_90 like wx_bill_other; | |||
| create table wx_bill_other_91 like wx_bill_other; | |||
| create table wx_bill_other_92 like wx_bill_other; | |||
| create table wx_bill_other_93 like wx_bill_other; | |||
| create table wx_bill_other_94 like wx_bill_other; | |||
| create table wx_bill_other_95 like wx_bill_other; | |||
| create table wx_bill_other_96 like wx_bill_other; | |||
| create table wx_bill_other_97 like wx_bill_other; | |||
| create table wx_bill_other_98 like wx_bill_other; | |||
| create table wx_bill_other_99 like wx_bill_other; | |||
| drop table wx_bill_other; | |||
| create table wx_bill_other_deposit_0 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_1 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_2 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_3 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_4 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_5 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_6 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_7 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_8 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_9 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_10 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_11 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_12 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_13 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_14 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_15 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_16 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_17 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_18 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_19 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_20 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_21 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_22 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_23 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_24 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_25 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_26 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_27 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_28 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_29 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_30 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_31 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_32 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_33 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_34 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_35 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_36 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_37 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_38 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_39 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_40 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_41 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_42 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_43 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_44 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_45 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_46 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_47 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_48 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_49 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_50 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_51 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_52 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_53 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_54 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_55 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_56 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_57 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_58 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_59 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_60 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_61 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_62 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_63 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_64 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_65 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_66 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_67 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_68 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_69 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_70 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_71 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_72 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_73 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_74 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_75 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_76 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_77 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_78 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_79 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_80 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_81 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_82 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_83 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_84 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_85 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_86 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_87 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_88 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_89 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_90 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_91 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_92 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_93 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_94 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_95 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_96 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_97 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_98 like wx_bill_other_deposit; | |||
| create table wx_bill_other_deposit_99 like wx_bill_other_deposit; | |||
| drop table wx_bill_other_deposit; | |||
| @@ -19,30 +19,30 @@ public class LatePayBillActionSchedule { | |||
| private WxBillRentMapper wxBillRentMapper; | |||
| @Autowired | |||
| private WxBillPropertyMapper wxBillPropertyMapper; | |||
| /** | |||
| * 每天凌晨1点执行 | |||
| */ | |||
| @Async | |||
| @Scheduled(cron = "0 0 1 * * ?") | |||
| public void updateBillStatus() { | |||
| try { | |||
| logger.info("账单滞纳金更新开始"); | |||
| wxBillRentMapper.insertBillAction(); | |||
| wxBillPropertyMapper.insertBillAction(); | |||
| wxBillRentMapper.autoAddLatePayPrice(); | |||
| wxBillPropertyMapper.autoAddLatePayPrice(); | |||
| //修改欠缴 | |||
| //wxBillRentMapper.updateOwe(); | |||
| //wxBillPropertyMapper.updateOwe(); | |||
| logger.info("账单滞纳金更新结束"); | |||
| }catch (Exception e){ | |||
| logger.error("LatePayBillActionSchedule error! message:{}",e.getMessage()); | |||
| logger.error("LatePayBillActionSchedule error!",e); | |||
| } | |||
| } | |||
| // /** | |||
| // * 每天凌晨1点执行 | |||
| // */ | |||
| // @Async | |||
| // @Scheduled(cron = "0 0 1 * * ?") | |||
| // public void updateBillStatus() { | |||
| // try { | |||
| // logger.info("账单滞纳金更新开始"); | |||
| // wxBillRentMapper.insertBillAction(); | |||
| // wxBillPropertyMapper.insertBillAction(); | |||
| // | |||
| // wxBillRentMapper.autoAddLatePayPrice(); | |||
| // wxBillPropertyMapper.autoAddLatePayPrice(); | |||
| // | |||
| // //修改欠缴 | |||
| // //wxBillRentMapper.updateOwe(); | |||
| // //wxBillPropertyMapper.updateOwe(); | |||
| // | |||
| // logger.info("账单滞纳金更新结束"); | |||
| // }catch (Exception e){ | |||
| // logger.error("LatePayBillActionSchedule error! message:{}",e.getMessage()); | |||
| // logger.error("LatePayBillActionSchedule error!",e); | |||
| // } | |||
| // } | |||
| } | |||
| @@ -365,6 +365,69 @@ public class BaseMyBatisConfiguration { | |||
| wxBusinessSharding.setRule(EnumShardingRule.HASH.getCode()); | |||
| shardingList.add(wxBusinessSharding); | |||
| ShardingSphere wxBillActionSharding = new ShardingSphere(); | |||
| wxBillActionSharding.setColumn("tenant_id"); | |||
| wxBillActionSharding.setTableName("wx_bill_action"); | |||
| wxBillActionSharding.setCount(100); | |||
| wxBillActionSharding.setRule(EnumShardingRule.HASH.getCode()); | |||
| shardingList.add(wxBillActionSharding); | |||
| ShardingSphere wxBillRentSharding = new ShardingSphere(); | |||
| wxBillRentSharding.setColumn("tenant_id"); | |||
| wxBillRentSharding.setTableName("wx_bill_rent"); | |||
| wxBillRentSharding.setCount(100); | |||
| wxBillRentSharding.setRule(EnumShardingRule.HASH.getCode()); | |||
| shardingList.add(wxBillRentSharding); | |||
| ShardingSphere wxBillRentManageSharding = new ShardingSphere(); | |||
| wxBillRentManageSharding.setColumn("tenant_id"); | |||
| wxBillRentManageSharding.setTableName("wx_bill_rent_manage"); | |||
| wxBillRentManageSharding.setCount(100); | |||
| wxBillRentManageSharding.setRule(EnumShardingRule.HASH.getCode()); | |||
| shardingList.add(wxBillRentManageSharding); | |||
| ShardingSphere wxBillRentDepositSharding = new ShardingSphere(); | |||
| wxBillRentDepositSharding.setColumn("tenant_id"); | |||
| wxBillRentDepositSharding.setTableName("wx_bill_rent_deposit"); | |||
| wxBillRentDepositSharding.setCount(100); | |||
| wxBillRentDepositSharding.setRule(EnumShardingRule.HASH.getCode()); | |||
| shardingList.add(wxBillRentDepositSharding); | |||
| ShardingSphere wxBillPropertySharding = new ShardingSphere(); | |||
| wxBillPropertySharding.setColumn("tenant_id"); | |||
| wxBillPropertySharding.setTableName("wx_bill_property"); | |||
| wxBillPropertySharding.setCount(100); | |||
| wxBillPropertySharding.setRule(EnumShardingRule.HASH.getCode()); | |||
| shardingList.add(wxBillPropertySharding); | |||
| ShardingSphere wxBillPropertyDepositSharding = new ShardingSphere(); | |||
| wxBillPropertyDepositSharding.setColumn("tenant_id"); | |||
| wxBillPropertyDepositSharding.setTableName("wx_bill_property_deposit"); | |||
| wxBillPropertyDepositSharding.setCount(100); | |||
| wxBillPropertyDepositSharding.setRule(EnumShardingRule.HASH.getCode()); | |||
| shardingList.add(wxBillPropertyDepositSharding); | |||
| ShardingSphere wxBillDailySharding = new ShardingSphere(); | |||
| wxBillDailySharding.setColumn("tenant_id"); | |||
| wxBillDailySharding.setTableName("wx_bill_daily"); | |||
| wxBillDailySharding.setCount(100); | |||
| wxBillDailySharding.setRule(EnumShardingRule.HASH.getCode()); | |||
| shardingList.add(wxBillDailySharding); | |||
| ShardingSphere wxBillOtherSharding = new ShardingSphere(); | |||
| wxBillOtherSharding.setColumn("tenant_id"); | |||
| wxBillOtherSharding.setTableName("wx_bill_other"); | |||
| wxBillOtherSharding.setCount(100); | |||
| wxBillOtherSharding.setRule(EnumShardingRule.HASH.getCode()); | |||
| shardingList.add(wxBillOtherSharding); | |||
| ShardingSphere wxBillOtherDepositSharding = new ShardingSphere(); | |||
| wxBillOtherDepositSharding.setColumn("tenant_id"); | |||
| wxBillOtherDepositSharding.setTableName("wx_bill_other_deposit"); | |||
| wxBillOtherDepositSharding.setCount(100); | |||
| wxBillOtherDepositSharding.setRule(EnumShardingRule.HASH.getCode()); | |||
| shardingList.add(wxBillOtherDepositSharding); | |||
| //初始化 | |||
| shardingSpherePlugin.setShardingSpheres(shardingList); | |||
| Properties properties = new Properties(); | |||
| @@ -9,6 +9,8 @@ import com.iformall.domain.vo.WxBillSum; | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| import org.apache.ibatis.annotations.Param; | |||
| /** | |||
| * @author gongbiao | |||
| */ | |||
| @@ -28,6 +30,8 @@ public interface WxBillDailyMapper extends CommonMapper<WxBillDaily, Long> { | |||
| WxBillHotNotify getBillHotNotify(WxBillDaily record); | |||
| WxBillDaily selectById(Long id); | |||
| WxBillDaily selectById(@Param("id")Long id,@Param("tenantId")String tenantId); | |||
| void deleteById(@Param("id")Long id,@Param("tenantId")String tenantId); | |||
| } | |||
| @@ -11,6 +11,8 @@ import com.iformall.domain.vo.WxBillSum; | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| import org.apache.ibatis.annotations.Param; | |||
| /** | |||
| * @author gongbiao | |||
| */ | |||
| @@ -39,6 +41,7 @@ public interface WxBillDepositMapper extends CommonMapper<WxBillDeposit, Long> { | |||
| WxBillHotNotify getBillHotNotify(WxBillDeposit wxBillDeposit); | |||
| WxBillDeposit selectById(Long id); | |||
| WxBillDeposit selectById(@Param("id")Long id,@Param("tenantId")String tenantId); | |||
| void deleteById(@Param("id")Long id,@Param("tenantId")String tenantId); | |||
| } | |||
| @@ -9,6 +9,8 @@ import com.iformall.domain.vo.WxBillSum; | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| import org.apache.ibatis.annotations.Param; | |||
| /** | |||
| * @author gongbiao | |||
| */ | |||
| @@ -28,6 +30,7 @@ public interface WxBillOtherDepositMapper extends CommonMapper<WxBillOtherDeposi | |||
| WxBillHotNotify getBillHotNotify(WxBillOtherDeposit record); | |||
| WxBillOtherDeposit selectById(Long id); | |||
| WxBillOtherDeposit selectById(@Param("id")Long id,@Param("tenantId")String tenantId); | |||
| void deleteById(@Param("id")Long id,@Param("tenantId")String tenantId); | |||
| } | |||
| @@ -9,6 +9,8 @@ import com.iformall.domain.vo.WxBillSum; | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| import org.apache.ibatis.annotations.Param; | |||
| /** | |||
| * @author gongbiao | |||
| */ | |||
| @@ -32,5 +34,7 @@ public interface WxBillOtherMapper extends CommonMapper<WxBillOther, Long> { | |||
| WxBillHotNotify getBillHotNotify(WxBillOther record); | |||
| WxBillOther selectById(Long id); | |||
| WxBillOther selectById(@Param("id")Long id,@Param("tenantId")String tenantId); | |||
| void deleteById(@Param("id")Long id,@Param("tenantId")String tenantId); | |||
| } | |||
| @@ -10,6 +10,8 @@ import com.iformall.domain.vo.WxBillSum; | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| import org.apache.ibatis.annotations.Param; | |||
| /** | |||
| * @author gongbiao | |||
| */ | |||
| @@ -35,5 +37,7 @@ public interface WxBillPropertyDepositMapper extends CommonMapper<WxBillProperty | |||
| WxBillHotNotify getBillHotNotify(WxBillPropertyDeposit wxBillPropertyDeposit); | |||
| WxBillPropertyDeposit selectById(Long id); | |||
| WxBillPropertyDeposit selectById(@Param("id")Long id,@Param("tenantId")String tenantId); | |||
| void deleteById(@Param("id")Long id,@Param("tenantId")String tenantId); | |||
| } | |||
| @@ -12,6 +12,8 @@ import com.iformall.domain.vo.WxBillSum; | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| import org.apache.ibatis.annotations.Param; | |||
| /** | |||
| * @author gongbiao | |||
| */ | |||
| @@ -54,14 +56,14 @@ public interface WxBillPropertyMapper extends CommonMapper<WxBillProperty, Long> | |||
| /** | |||
| * 累加每一天的滞纳金 | |||
| */ | |||
| void autoAddLatePayPrice(); | |||
| //void autoAddLatePayPrice(); | |||
| /** | |||
| * 保存billAction | |||
| */ | |||
| void insertBillAction(); | |||
| //void insertBillAction(); | |||
| void updateServiceCharge(WxPayAccountBill tenantId); | |||
| //void updateServiceCharge(WxPayAccountBill tenantId); | |||
| //void updateOwe(); | |||
| @@ -71,7 +73,7 @@ public interface WxBillPropertyMapper extends CommonMapper<WxBillProperty, Long> | |||
| WxBillHotNotify getBillHotNotify(WxBillProperty propertyQuery); | |||
| WxBillProperty selectById(Long id); | |||
| WxBillProperty selectById(@Param("id")Long id,@Param("tenantId")String tenantId); | |||
| void deleteById(@Param("id")Long id,@Param("tenantId")String tenantId); | |||
| } | |||
| @@ -39,6 +39,8 @@ public interface WxBillRentManageMapper extends CommonMapper<WxBillRentManage, L | |||
| WxBillHotNotify getBillHotNotify(WxBillRentManage wxBillRentManage); | |||
| WxBillRentManage selectById(Long id); | |||
| WxBillRentManage selectById(@Param("id")Long id,@Param("tenantId")String tenantId); | |||
| void deleteById(@Param("id")Long id,@Param("tenantId")String tenantId); | |||
| } | |||
| @@ -51,14 +51,14 @@ public interface WxBillRentMapper extends CommonMapper<WxBillRent, Long> { | |||
| /** | |||
| * 累加每一天的滞纳金 | |||
| */ | |||
| void autoAddLatePayPrice(); | |||
| //void autoAddLatePayPrice(); | |||
| /** | |||
| * 保存billAction | |||
| */ | |||
| void insertBillAction(); | |||
| //void insertBillAction(); | |||
| void updateServiceCharge(WxPayAccountBill record); | |||
| //void updateServiceCharge(WxPayAccountBill record); | |||
| //void updateOwe(); | |||
| @@ -68,6 +68,8 @@ public interface WxBillRentMapper extends CommonMapper<WxBillRent, Long> { | |||
| WxBillHotNotify getBillHotNotify(WxBillRent wxBillRent); | |||
| WxBillRent selectById(Long id); | |||
| WxBillRent selectById(@Param("id")Long id,@Param("tenantId")String tenantId); | |||
| void deleteById(@Param("id")Long id,@Param("tenantId")String tenantId); | |||
| } | |||
| @@ -56,7 +56,7 @@ public interface WxBillDailyService { | |||
| * | |||
| * @param id | |||
| */ | |||
| void deleteById(Long id); | |||
| void deleteById(TenantEntity tenantEntity,Long id); | |||
| ResultData updatePaid(Long id); | |||
| @@ -39,7 +39,7 @@ public interface WxBillDepositService { | |||
| * @param id | |||
| * @return | |||
| */ | |||
| WxBillDeposit getById(Long id); | |||
| WxBillDeposit getById(TenantEntity tenantEntity,Long id); | |||
| Map detail(TenantEntity tenantEntity,Long id); | |||
| @@ -56,7 +56,7 @@ public interface WxBillDepositService { | |||
| * | |||
| * @param id | |||
| */ | |||
| void deleteById(Long id); | |||
| void deleteById(TenantEntity tenantEntity,Long id); | |||
| ResultData updatePaid(Long id); | |||
| @@ -55,7 +55,7 @@ public interface WxBillOtherDepositService { | |||
| * | |||
| * @param id | |||
| */ | |||
| void deleteById(Long id); | |||
| void deleteById(TenantEntity tenantEntity,Long id); | |||
| ResultData updatePaid(Long id); | |||
| @@ -55,7 +55,7 @@ public interface WxBillOtherService { | |||
| * | |||
| * @param id | |||
| */ | |||
| void deleteById(Long id); | |||
| void deleteById(TenantEntity tenantEntity,Long id); | |||
| ResultData updatePaid(Long id); | |||
| @@ -42,7 +42,7 @@ public interface WxBillPropertyDepositService { | |||
| * @param id | |||
| * @return | |||
| */ | |||
| WxBillPropertyDeposit getById(Long id); | |||
| WxBillPropertyDeposit getById(TenantEntity tenantEntity ,Long id); | |||
| Map detail(TenantEntity tenantEntity ,Long id); | |||
| /** | |||
| @@ -58,7 +58,7 @@ public interface WxBillPropertyDepositService { | |||
| * | |||
| * @param id | |||
| */ | |||
| void deleteById(Long id); | |||
| void deleteById(TenantEntity tenantEntity ,Long id); | |||
| ResultData updatePaid(Long id); | |||
| @@ -64,7 +64,7 @@ public interface WxBillPropertyService { | |||
| * | |||
| * @param id | |||
| */ | |||
| void deleteById(Long id); | |||
| void deleteById(TenantEntity tenantEntity,Long id); | |||
| PageInfo<WxBillProperty> findByPropertyContractId(Long id, TenantEntity tenantEntity, Integer pageIndex, Integer pageSize); | |||
| @@ -66,7 +66,7 @@ public interface WxBillRentManageService { | |||
| * | |||
| * @param id | |||
| */ | |||
| void deleteById(Long id); | |||
| void deleteById(TenantEntity tenantEntity,Long id); | |||
| ResultData updatePaid(Long id); | |||
| @@ -62,7 +62,7 @@ public interface WxBillRentService { | |||
| * | |||
| * @param id | |||
| */ | |||
| void deleteById(Long id); | |||
| void deleteById(TenantEntity tenantEntity,Long id); | |||
| PageInfo<WxBillRent> findByRentContractId(WxBillRent record, Integer pageIndex, Integer pageSize); | |||
| @@ -71,7 +71,7 @@ public interface WxPropertyContractService { | |||
| void updatePropertyPreviewBill(WxPropertyContract record); | |||
| List<WxBillProperty> getWxBillPropertyPreview(Long id); | |||
| List<WxBillProperty> getWxBillPropertyPreview(TenantEntity tenantEntity,Long id); | |||
| //Map<String, Object> updateStatus(WxPropertyContract record); | |||
| @@ -528,11 +528,11 @@ public class WxBillAllHelper { | |||
| }else if (billType == EnumBillAllType.RENT_OPERATION_MANAGE) { | |||
| return wxBillRentManageService.getById(tenantEntity, id); | |||
| }else if (billType == EnumBillAllType.RENT_DEPOSIT) { | |||
| return wxBillRentDepositService.getById(id); | |||
| return wxBillRentDepositService.getById(tenantEntity,id); | |||
| }else if (billType == EnumBillAllType.PROPERTY) { | |||
| return wxBillPropertyService.getById(tenantEntity, id); | |||
| }else if (billType == EnumBillAllType.PROPERTY_DEPOSIT) { | |||
| return wxBillPropertyDepositService.getById(id); | |||
| return wxBillPropertyDepositService.getById(tenantEntity,id); | |||
| }else if (billType == EnumBillAllType.DAILY) { | |||
| return wxBillDailyService.getById(tenantEntity, id); | |||
| }else if (billType == EnumBillAllType.OTHER) { | |||
| @@ -416,92 +416,92 @@ public class WxBillAllServiceImpl implements WxBillAllService { | |||
| @Override | |||
| public void updateBill(Map<String, Object> bill) { | |||
| int billTypeValue = ((Long) bill.get("billTypeValue")).intValue(); | |||
| logger.info(">>>>>>>>>>>>>>>>>>>>账单回调修改数据:" + JSONObject.toJSONString(bill)); | |||
| if (billTypeValue == EnumBillTypeParam.RENT.getCode().intValue()) { | |||
| logger.info("更新租金账单"); | |||
| WxBillRent billRent = wxBillRentMapper.selectById((Long) bill.get("id")); | |||
| 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(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(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(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(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(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(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(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(EnumBillStatus.PAID.getCode())) { | |||
| updateBillOtherDeposit(bill); | |||
| } | |||
| } else if (billTypeValue == EnumBillTypeParam.SETTLE.getCode().intValue()) { | |||
| try { | |||
| logger.info("更新结算单id:{}", JsonUtil.obj2Json(bill)); | |||
| WxBillSettle wxBillSettle = wxBillSettleService.getById((Long) bill.get("id"), EnumFilterSettle.YES.getCode()); | |||
| WxBillSettleRecord settleRecord = new WxBillSettleRecord(); | |||
| settleRecord.setSettleId((Long) bill.get("id")); | |||
| settleRecord.setSettleMoney(wxBillSettle.getBalance()); | |||
| settleRecord.setSettleTime(new Date()); | |||
| settleRecord.setSettleWay(EnumSettleRecordWay.WEBCAT.getCode()); | |||
| settleRecord.updateTenantInfo(wxBillSettle); | |||
| BigDecimal money = new BigDecimal(settleRecord.getSettleMoney()).divide(new BigDecimal(100), 2, BigDecimal.ROUND_HALF_UP); | |||
| settleRecord.setDetail(EnumSettleRecordWay.getEnum(settleRecord.getSettleWay()).getMessage() + "收款" + money.toString() + "元"); | |||
| wxBillSettleRecordService.saveOrUpdate(settleRecord, null, (Long) bill.get("userId")); | |||
| wxBillSettle.setUpdatetime(new Date()); | |||
| wxBillSettle.setStatus(EnumSettleStatus.FINISH.getCode()); | |||
| wxBillSettleMapper.updateById(wxBillSettle); | |||
| logger.info("更新结算单success"); | |||
| } catch (Exception e) { | |||
| logger.error("结算单error", e); | |||
| e.printStackTrace(); | |||
| } | |||
| } else { | |||
| logger.info("账单类型不存在"); | |||
| } | |||
| // int billTypeValue = ((Long) bill.get("billTypeValue")).intValue(); | |||
| // logger.info(">>>>>>>>>>>>>>>>>>>>账单回调修改数据:" + JSONObject.toJSONString(bill)); | |||
| // if (billTypeValue == EnumBillTypeParam.RENT.getCode().intValue()) { | |||
| // logger.info("更新租金账单"); | |||
| // WxBillRent billRent = wxBillRentMapper.selectById((Long) bill.get("id")); | |||
| // 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(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(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(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(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(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(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(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(EnumBillStatus.PAID.getCode())) { | |||
| // updateBillOtherDeposit(bill); | |||
| // } | |||
| // } else if (billTypeValue == EnumBillTypeParam.SETTLE.getCode().intValue()) { | |||
| // try { | |||
| // logger.info("更新结算单id:{}", JsonUtil.obj2Json(bill)); | |||
| // | |||
| // WxBillSettle wxBillSettle = wxBillSettleService.getById((Long) bill.get("id"), EnumFilterSettle.YES.getCode()); | |||
| // | |||
| // WxBillSettleRecord settleRecord = new WxBillSettleRecord(); | |||
| // settleRecord.setSettleId((Long) bill.get("id")); | |||
| // settleRecord.setSettleMoney(wxBillSettle.getBalance()); | |||
| // settleRecord.setSettleTime(new Date()); | |||
| // settleRecord.setSettleWay(EnumSettleRecordWay.WEBCAT.getCode()); | |||
| // settleRecord.updateTenantInfo(wxBillSettle); | |||
| // | |||
| // BigDecimal money = new BigDecimal(settleRecord.getSettleMoney()).divide(new BigDecimal(100), 2, BigDecimal.ROUND_HALF_UP); | |||
| // settleRecord.setDetail(EnumSettleRecordWay.getEnum(settleRecord.getSettleWay()).getMessage() + "收款" + money.toString() + "元"); | |||
| // wxBillSettleRecordService.saveOrUpdate(settleRecord, null, (Long) bill.get("userId")); | |||
| // | |||
| // wxBillSettle.setUpdatetime(new Date()); | |||
| // wxBillSettle.setStatus(EnumSettleStatus.FINISH.getCode()); | |||
| // wxBillSettleMapper.updateById(wxBillSettle); | |||
| // | |||
| // logger.info("更新结算单success"); | |||
| // } catch (Exception e) { | |||
| // logger.error("结算单error", e); | |||
| // e.printStackTrace(); | |||
| // } | |||
| // | |||
| // } else { | |||
| // logger.info("账单类型不存在"); | |||
| // } | |||
| } | |||
| @Override | |||
| @@ -548,316 +548,323 @@ public class WxBillAllServiceImpl implements WxBillAllService { | |||
| } | |||
| private int updateBillOtherDeposit(Map<String, Object> bill) { | |||
| logger.info("updateBillOtherDeposit params:" + bill.toString()); | |||
| Object id = bill.get("id"); | |||
| WxBillOtherDeposit wxBillOtherDeposit = wxBillOtherDepositMapper.selectById((Long) id); | |||
| if (wxBillOtherDeposit == null) { | |||
| return 0; | |||
| } | |||
| Date date = new Date(); | |||
| wxBillOtherDeposit.setPayDate(date); | |||
| Long owe = (Long) bill.get("owe"); | |||
| wxBillOtherDeposit.setPay(wxBillOtherDeposit.getPay() + owe); | |||
| //wxBillOtherDeposit.setOwe("0"); | |||
| wxBillOtherDeposit.setStatus(EnumBillStatus.PAID.getCode()); | |||
| wxBillOtherDeposit.setPayDate(date); | |||
| wxBillOtherDeposit.setUpdatetime(date); | |||
| wxBillOtherDeposit.setPayWay(EnumBillPayWay.WECHAT_PAY.getCode()); | |||
| int count = 0; | |||
| try { | |||
| count = wxBillOtherDepositMapper.updateById(wxBillOtherDeposit); | |||
| } catch (Exception e) { | |||
| logger.error("更新其他押金账单失败,e:" + e.getMessage()); | |||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| } | |||
| //日志 | |||
| WxMerchantBUser wxMerchantBUser = wxMerchantBUserMapper.selectById((Long) bill.get("userId")); | |||
| WxBillAction wxBillAction = new WxBillAction(); | |||
| wxBillAction.setBillId(wxBillOtherDeposit.getId()); | |||
| String price = new BigDecimal(owe).divide(new BigDecimal(100)).toPlainString(); | |||
| wxBillAction.setDetails("线上缴费" + price + "元"); | |||
| wxBillAction.setAction(EnumBillAction.SELF_SERVICE_PAY.getCode()); | |||
| wxBillAction.setUserId(wxMerchantBUser.getId()); | |||
| wxBillAction.setUserName(wxMerchantBUser.getName()); | |||
| wxBillAction.setPhone(wxMerchantBUser.getPhone()); | |||
| wxBillAction.updateTenantInfo(wxMerchantBUser); | |||
| wxBillAction.setPayDate(date); | |||
| try { | |||
| wxBillActionService.save(wxBillAction); | |||
| } catch (Exception e) { | |||
| logger.error("添加其他押金账单行为日志,e:" + e.getMessage()); | |||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| } | |||
| return count; | |||
| // logger.info("updateBillOtherDeposit params:" + bill.toString()); | |||
| // Object id = bill.get("id"); | |||
| // WxBillOtherDeposit wxBillOtherDeposit = wxBillOtherDepositMapper.selectById((Long) id); | |||
| // if (wxBillOtherDeposit == null) { | |||
| // return 0; | |||
| // } | |||
| // Date date = new Date(); | |||
| // wxBillOtherDeposit.setPayDate(date); | |||
| // Long owe = (Long) bill.get("owe"); | |||
| // wxBillOtherDeposit.setPay(wxBillOtherDeposit.getPay() + owe); | |||
| // //wxBillOtherDeposit.setOwe("0"); | |||
| // wxBillOtherDeposit.setStatus(EnumBillStatus.PAID.getCode()); | |||
| // wxBillOtherDeposit.setPayDate(date); | |||
| // wxBillOtherDeposit.setUpdatetime(date); | |||
| // wxBillOtherDeposit.setPayWay(EnumBillPayWay.WECHAT_PAY.getCode()); | |||
| // int count = 0; | |||
| // try { | |||
| // count = wxBillOtherDepositMapper.updateById(wxBillOtherDeposit); | |||
| // } catch (Exception e) { | |||
| // logger.error("更新其他押金账单失败,e:" + e.getMessage()); | |||
| // throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| // } | |||
| // //日志 | |||
| // WxMerchantBUser wxMerchantBUser = wxMerchantBUserMapper.selectById((Long) bill.get("userId")); | |||
| // WxBillAction wxBillAction = new WxBillAction(); | |||
| // wxBillAction.setBillId(wxBillOtherDeposit.getId()); | |||
| // String price = new BigDecimal(owe).divide(new BigDecimal(100)).toPlainString(); | |||
| // wxBillAction.setDetails("线上缴费" + price + "元"); | |||
| // wxBillAction.setAction(EnumBillAction.SELF_SERVICE_PAY.getCode()); | |||
| // wxBillAction.setUserId(wxMerchantBUser.getId()); | |||
| // wxBillAction.setUserName(wxMerchantBUser.getName()); | |||
| // wxBillAction.setPhone(wxMerchantBUser.getPhone()); | |||
| // wxBillAction.updateTenantInfo(wxMerchantBUser); | |||
| // wxBillAction.setPayDate(date); | |||
| // try { | |||
| // wxBillActionService.save(wxBillAction); | |||
| // } catch (Exception e) { | |||
| // logger.error("添加其他押金账单行为日志,e:" + e.getMessage()); | |||
| // throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| // } | |||
| // return count; | |||
| return 0; | |||
| } | |||
| private int updateBillOther(Map<String, Object> bill) { | |||
| logger.info("updateBillOther params:" + bill.toString()); | |||
| Object id = bill.get("id"); | |||
| WxBillOther wxBillOther = wxBillOtherMapper.selectById((Long) id); | |||
| if (wxBillOther == null) { | |||
| return 0; | |||
| } | |||
| Date date = new Date(); | |||
| wxBillOther.setPayDate(date); | |||
| Long owe = (Long) bill.get("owe"); | |||
| wxBillOther.setPay(wxBillOther.getPay() + owe); | |||
| //wxBillOther.setOwe("0"); | |||
| wxBillOther.setStatus(EnumBillStatus.PAID.getCode()); | |||
| wxBillOther.setPayDate(date); | |||
| wxBillOther.setUpdatetime(date); | |||
| wxBillOther.setPayWay(EnumBillPayWay.WECHAT_PAY.getCode()); | |||
| int count = 0; | |||
| try { | |||
| count = wxBillOtherMapper.updateById(wxBillOther); | |||
| } catch (Exception e) { | |||
| logger.error("更新其他账单失败,e:" + e.getMessage()); | |||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| } | |||
| //日志 | |||
| WxMerchantBUser wxMerchantBUser = wxMerchantBUserMapper.selectById((Long) bill.get("userId")); | |||
| WxBillAction wxBillAction = new WxBillAction(); | |||
| wxBillAction.setBillId(wxBillOther.getId()); | |||
| String price = new BigDecimal(owe).divide(new BigDecimal(100)).toPlainString(); | |||
| wxBillAction.setDetails("线上缴费" + price + "元"); | |||
| wxBillAction.setAction(EnumBillAction.SELF_SERVICE_PAY.getCode()); | |||
| wxBillAction.setUserId(wxMerchantBUser.getId()); | |||
| wxBillAction.setUserName(wxMerchantBUser.getName()); | |||
| wxBillAction.setPhone(wxMerchantBUser.getPhone()); | |||
| wxBillAction.updateTenantInfo(wxMerchantBUser); | |||
| wxBillAction.setPayDate(date); | |||
| try { | |||
| wxBillActionService.save(wxBillAction); | |||
| } catch (Exception e) { | |||
| logger.error("添加其他账单行为日志,e:" + e.getMessage()); | |||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| } | |||
| return count; | |||
| // logger.info("updateBillOther params:" + bill.toString()); | |||
| // Object id = bill.get("id"); | |||
| // WxBillOther wxBillOther = wxBillOtherMapper.selectById((Long) id); | |||
| // if (wxBillOther == null) { | |||
| // return 0; | |||
| // } | |||
| // Date date = new Date(); | |||
| // wxBillOther.setPayDate(date); | |||
| // Long owe = (Long) bill.get("owe"); | |||
| // wxBillOther.setPay(wxBillOther.getPay() + owe); | |||
| // //wxBillOther.setOwe("0"); | |||
| // wxBillOther.setStatus(EnumBillStatus.PAID.getCode()); | |||
| // wxBillOther.setPayDate(date); | |||
| // wxBillOther.setUpdatetime(date); | |||
| // wxBillOther.setPayWay(EnumBillPayWay.WECHAT_PAY.getCode()); | |||
| // int count = 0; | |||
| // try { | |||
| // count = wxBillOtherMapper.updateById(wxBillOther); | |||
| // } catch (Exception e) { | |||
| // logger.error("更新其他账单失败,e:" + e.getMessage()); | |||
| // throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| // } | |||
| // //日志 | |||
| // WxMerchantBUser wxMerchantBUser = wxMerchantBUserMapper.selectById((Long) bill.get("userId")); | |||
| // WxBillAction wxBillAction = new WxBillAction(); | |||
| // wxBillAction.setBillId(wxBillOther.getId()); | |||
| // String price = new BigDecimal(owe).divide(new BigDecimal(100)).toPlainString(); | |||
| // wxBillAction.setDetails("线上缴费" + price + "元"); | |||
| // wxBillAction.setAction(EnumBillAction.SELF_SERVICE_PAY.getCode()); | |||
| // wxBillAction.setUserId(wxMerchantBUser.getId()); | |||
| // wxBillAction.setUserName(wxMerchantBUser.getName()); | |||
| // wxBillAction.setPhone(wxMerchantBUser.getPhone()); | |||
| // wxBillAction.updateTenantInfo(wxMerchantBUser); | |||
| // wxBillAction.setPayDate(date); | |||
| // try { | |||
| // wxBillActionService.save(wxBillAction); | |||
| // } catch (Exception e) { | |||
| // logger.error("添加其他账单行为日志,e:" + e.getMessage()); | |||
| // throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| // } | |||
| // return count; | |||
| return 0; | |||
| } | |||
| private int updateBillDaily(Map<String, Object> bill) { | |||
| logger.info("updateBillDaily params:" + bill.toString()); | |||
| Object id = bill.get("id"); | |||
| WxBillDaily wxBillDaily = wxBillDailyMapper.selectById((Long) id); | |||
| if (wxBillDaily == null) { | |||
| return 0; | |||
| } | |||
| Date date = new Date(); | |||
| wxBillDaily.setPayDate(date); | |||
| Long owe = (Long) bill.get("owe"); | |||
| wxBillDaily.setPay(wxBillDaily.getPay() + owe); | |||
| //wxBillDaily.setOwe("0"); | |||
| wxBillDaily.setStatus(EnumBillStatus.PAID.getCode()); | |||
| wxBillDaily.setPayDate(date); | |||
| wxBillDaily.setUpdatetime(date); | |||
| wxBillDaily.setPayWay(EnumBillPayWay.WECHAT_PAY.getCode()); | |||
| int count = 0; | |||
| try { | |||
| count = wxBillDailyMapper.updateById(wxBillDaily); | |||
| } catch (Exception e) { | |||
| logger.error("更新日常账单失败,e:" + e.getMessage()); | |||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| } | |||
| //日志 | |||
| WxMerchantBUser wxMerchantBUser = wxMerchantBUserMapper.selectById((Long) bill.get("userId")); | |||
| WxBillAction wxBillAction = new WxBillAction(); | |||
| wxBillAction.setBillId(wxBillDaily.getId()); | |||
| String price = new BigDecimal(owe).divide(new BigDecimal(100)).toPlainString(); | |||
| wxBillAction.setDetails("线上缴费" + price + "元"); | |||
| wxBillAction.setAction(EnumBillAction.SELF_SERVICE_PAY.getCode()); | |||
| wxBillAction.setUserId(wxMerchantBUser.getId()); | |||
| wxBillAction.setUserName(wxMerchantBUser.getName()); | |||
| wxBillAction.setPhone(wxMerchantBUser.getPhone()); | |||
| wxBillAction.updateTenantInfo(wxMerchantBUser); | |||
| wxBillAction.setPayDate(date); | |||
| try { | |||
| wxBillActionService.save(wxBillAction); | |||
| } catch (Exception e) { | |||
| logger.error("添加日常账单行为日志,e:" + e.getMessage()); | |||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| } | |||
| return count; | |||
| // logger.info("updateBillDaily params:" + bill.toString()); | |||
| // Object id = bill.get("id"); | |||
| // WxBillDaily wxBillDaily = wxBillDailyMapper.selectById((Long) id); | |||
| // if (wxBillDaily == null) { | |||
| // return 0; | |||
| // } | |||
| // Date date = new Date(); | |||
| // wxBillDaily.setPayDate(date); | |||
| // Long owe = (Long) bill.get("owe"); | |||
| // wxBillDaily.setPay(wxBillDaily.getPay() + owe); | |||
| // //wxBillDaily.setOwe("0"); | |||
| // wxBillDaily.setStatus(EnumBillStatus.PAID.getCode()); | |||
| // wxBillDaily.setPayDate(date); | |||
| // wxBillDaily.setUpdatetime(date); | |||
| // wxBillDaily.setPayWay(EnumBillPayWay.WECHAT_PAY.getCode()); | |||
| // | |||
| // int count = 0; | |||
| // try { | |||
| // count = wxBillDailyMapper.updateById(wxBillDaily); | |||
| // } catch (Exception e) { | |||
| // logger.error("更新日常账单失败,e:" + e.getMessage()); | |||
| // throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| // } | |||
| // //日志 | |||
| // WxMerchantBUser wxMerchantBUser = wxMerchantBUserMapper.selectById((Long) bill.get("userId")); | |||
| // WxBillAction wxBillAction = new WxBillAction(); | |||
| // wxBillAction.setBillId(wxBillDaily.getId()); | |||
| // String price = new BigDecimal(owe).divide(new BigDecimal(100)).toPlainString(); | |||
| // wxBillAction.setDetails("线上缴费" + price + "元"); | |||
| // wxBillAction.setAction(EnumBillAction.SELF_SERVICE_PAY.getCode()); | |||
| // wxBillAction.setUserId(wxMerchantBUser.getId()); | |||
| // wxBillAction.setUserName(wxMerchantBUser.getName()); | |||
| // wxBillAction.setPhone(wxMerchantBUser.getPhone()); | |||
| // wxBillAction.updateTenantInfo(wxMerchantBUser); | |||
| // wxBillAction.setPayDate(date); | |||
| // try { | |||
| // wxBillActionService.save(wxBillAction); | |||
| // } catch (Exception e) { | |||
| // logger.error("添加日常账单行为日志,e:" + e.getMessage()); | |||
| // throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| // } | |||
| // return count; | |||
| return 0; | |||
| } | |||
| private int updateBillPropertyDeposit(Map<String, Object> bill) { | |||
| logger.info("updateBillPropertyDeposit params:" + bill.toString()); | |||
| Object id = bill.get("id"); | |||
| WxBillPropertyDeposit wxBillPropertyDeposit = wxBillPropertyDepositMapper.selectById((Long) id); | |||
| if (wxBillPropertyDeposit == null) { | |||
| return 0; | |||
| } | |||
| Date date = new Date(); | |||
| 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(EnumBillStatus.PAID.getCode()); | |||
| wxBillPropertyDeposit.setPayDate(date); | |||
| wxBillPropertyDeposit.setUpdatetime(date); | |||
| wxBillPropertyDeposit.setPayWay(EnumBillPayWay.WECHAT_PAY.getCode()); | |||
| int count = 0; | |||
| try { | |||
| count = wxBillPropertyDepositMapper.updateById(wxBillPropertyDeposit); | |||
| } catch (Exception e) { | |||
| logger.error("更新物业押金账单失败,e:" + e.getMessage()); | |||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| } | |||
| //日志 | |||
| WxMerchantBUser wxMerchantBUser = wxMerchantBUserMapper.selectById((Long) bill.get("userId")); | |||
| WxBillAction wxBillAction = new WxBillAction(); | |||
| wxBillAction.setBillId(wxBillPropertyDeposit.getId()); | |||
| String price = new BigDecimal(owe).divide(new BigDecimal(100)).toPlainString(); | |||
| wxBillAction.setDetails("线上缴费" + price + "元"); | |||
| wxBillAction.setAction(EnumBillAction.SELF_SERVICE_PAY.getCode()); | |||
| wxBillAction.setUserId(wxMerchantBUser.getId()); | |||
| wxBillAction.setUserName(wxMerchantBUser.getName()); | |||
| wxBillAction.setPhone(wxMerchantBUser.getPhone()); | |||
| wxBillAction.updateTenantInfo(wxMerchantBUser); | |||
| wxBillAction.setPayDate(date); | |||
| try { | |||
| wxBillActionService.save(wxBillAction); | |||
| } catch (Exception e) { | |||
| logger.error("添加物业押金账单行为日志,e:" + e.getMessage()); | |||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| } | |||
| return count; | |||
| // logger.info("updateBillPropertyDeposit params:" + bill.toString()); | |||
| // Object id = bill.get("id"); | |||
| // WxBillPropertyDeposit wxBillPropertyDeposit = wxBillPropertyDepositMapper.selectById((Long) id); | |||
| // if (wxBillPropertyDeposit == null) { | |||
| // return 0; | |||
| // } | |||
| // Date date = new Date(); | |||
| // 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(EnumBillStatus.PAID.getCode()); | |||
| // wxBillPropertyDeposit.setPayDate(date); | |||
| // wxBillPropertyDeposit.setUpdatetime(date); | |||
| // wxBillPropertyDeposit.setPayWay(EnumBillPayWay.WECHAT_PAY.getCode()); | |||
| // | |||
| // int count = 0; | |||
| // try { | |||
| // count = wxBillPropertyDepositMapper.updateById(wxBillPropertyDeposit); | |||
| // } catch (Exception e) { | |||
| // logger.error("更新物业押金账单失败,e:" + e.getMessage()); | |||
| // throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| // } | |||
| // //日志 | |||
| // WxMerchantBUser wxMerchantBUser = wxMerchantBUserMapper.selectById((Long) bill.get("userId")); | |||
| // WxBillAction wxBillAction = new WxBillAction(); | |||
| // wxBillAction.setBillId(wxBillPropertyDeposit.getId()); | |||
| // String price = new BigDecimal(owe).divide(new BigDecimal(100)).toPlainString(); | |||
| // wxBillAction.setDetails("线上缴费" + price + "元"); | |||
| // wxBillAction.setAction(EnumBillAction.SELF_SERVICE_PAY.getCode()); | |||
| // wxBillAction.setUserId(wxMerchantBUser.getId()); | |||
| // wxBillAction.setUserName(wxMerchantBUser.getName()); | |||
| // wxBillAction.setPhone(wxMerchantBUser.getPhone()); | |||
| // wxBillAction.updateTenantInfo(wxMerchantBUser); | |||
| // wxBillAction.setPayDate(date); | |||
| // try { | |||
| // wxBillActionService.save(wxBillAction); | |||
| // } catch (Exception e) { | |||
| // logger.error("添加物业押金账单行为日志,e:" + e.getMessage()); | |||
| // throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| // } | |||
| // return count; | |||
| return 0; | |||
| } | |||
| private int updateBillProperty(Map<String, Object> bill) { | |||
| logger.info("updateBillProperty params:" + bill.toString()); | |||
| Object id = bill.get("id"); | |||
| WxBillProperty property = wxBillPropertyMapper.selectById((Long) id); | |||
| if (property == null) { | |||
| return 0; | |||
| } | |||
| Date date = new Date(); | |||
| 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(EnumBillStatus.PAID.getCode()); | |||
| property.setPayDate(date); | |||
| property.setUpdatetime(date); | |||
| property.setPayWay(EnumBillPayWay.WECHAT_PAY.getCode()); | |||
| int count = 0; | |||
| try { | |||
| count = wxBillPropertyMapper.updateById(property); | |||
| } catch (Exception e) { | |||
| logger.error("更新物业账单失败,e:" + e.getMessage()); | |||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| } | |||
| //日志 | |||
| WxMerchantBUser wxMerchantBUser = wxMerchantBUserMapper.selectById((Long) bill.get("userId")); | |||
| WxBillAction wxBillAction = new WxBillAction(); | |||
| wxBillAction.setBillId(property.getId()); | |||
| String price = new BigDecimal(owe).divide(new BigDecimal(100)).toPlainString(); | |||
| wxBillAction.setDetails("线上缴费" + price + "元"); | |||
| wxBillAction.setAction(EnumBillAction.SELF_SERVICE_PAY.getCode()); | |||
| wxBillAction.setUserId(wxMerchantBUser.getId()); | |||
| wxBillAction.setUserName(wxMerchantBUser.getName()); | |||
| wxBillAction.setPhone(wxMerchantBUser.getPhone()); | |||
| wxBillAction.updateTenantInfo(wxMerchantBUser); | |||
| wxBillAction.setPayDate(date); | |||
| try { | |||
| wxBillActionService.save(wxBillAction); | |||
| } catch (Exception e) { | |||
| logger.error("添加物业账单行为日志,e:" + e.getMessage()); | |||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| } | |||
| return count; | |||
| // logger.info("updateBillProperty params:" + bill.toString()); | |||
| // Object id = bill.get("id"); | |||
| // WxBillProperty property = wxBillPropertyMapper.selectById((Long) id); | |||
| // if (property == null) { | |||
| // return 0; | |||
| // } | |||
| // Date date = new Date(); | |||
| // 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(EnumBillStatus.PAID.getCode()); | |||
| // property.setPayDate(date); | |||
| // property.setUpdatetime(date); | |||
| // property.setPayWay(EnumBillPayWay.WECHAT_PAY.getCode()); | |||
| // | |||
| // int count = 0; | |||
| // try { | |||
| // count = wxBillPropertyMapper.updateById(property); | |||
| // } catch (Exception e) { | |||
| // logger.error("更新物业账单失败,e:" + e.getMessage()); | |||
| // throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| // } | |||
| // //日志 | |||
| // WxMerchantBUser wxMerchantBUser = wxMerchantBUserMapper.selectById((Long) bill.get("userId")); | |||
| // WxBillAction wxBillAction = new WxBillAction(); | |||
| // wxBillAction.setBillId(property.getId()); | |||
| // String price = new BigDecimal(owe).divide(new BigDecimal(100)).toPlainString(); | |||
| // wxBillAction.setDetails("线上缴费" + price + "元"); | |||
| // wxBillAction.setAction(EnumBillAction.SELF_SERVICE_PAY.getCode()); | |||
| // wxBillAction.setUserId(wxMerchantBUser.getId()); | |||
| // wxBillAction.setUserName(wxMerchantBUser.getName()); | |||
| // wxBillAction.setPhone(wxMerchantBUser.getPhone()); | |||
| // wxBillAction.updateTenantInfo(wxMerchantBUser); | |||
| // wxBillAction.setPayDate(date); | |||
| // try { | |||
| // wxBillActionService.save(wxBillAction); | |||
| // } catch (Exception e) { | |||
| // logger.error("添加物业账单行为日志,e:" + e.getMessage()); | |||
| // throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| // } | |||
| // return count; | |||
| return 0; | |||
| } | |||
| private int updateBillRentDeposit(Map<String, Object> bill) { | |||
| logger.info("updateBillRentDeposit params:" + bill.toString()); | |||
| Object id = bill.get("id"); | |||
| WxBillDeposit wxBillDeposit = wxBillDepositMapper.selectById((Long) id); | |||
| if (wxBillDeposit == null) { | |||
| return 0; | |||
| } | |||
| Date date = new Date(); | |||
| wxBillDeposit.setPayDate(date); | |||
| Long owe = (Long) bill.get("owe"); | |||
| wxBillDeposit.setPay(wxBillDeposit.getPay() + owe); | |||
| //wxBillDeposit.setOwe("0"); | |||
| wxBillDeposit.setStatus(EnumBillStatus.PAID.getCode()); | |||
| wxBillDeposit.setPayDate(date); | |||
| wxBillDeposit.setUpdatetime(date); | |||
| wxBillDeposit.setPayWay(EnumBillPayWay.WECHAT_PAY.getCode()); | |||
| int count = 0; | |||
| try { | |||
| count = wxBillDepositMapper.updateById(wxBillDeposit); | |||
| } catch (Exception e) { | |||
| logger.error("更新租赁押金账单失败,e:" + e.getMessage()); | |||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| } | |||
| //日志 | |||
| WxMerchantBUser wxMerchantBUser = wxMerchantBUserMapper.selectById((Long) bill.get("userId")); | |||
| WxBillAction wxBillAction = new WxBillAction(); | |||
| wxBillAction.setBillId(wxBillDeposit.getId()); | |||
| String price = new BigDecimal(owe).divide(new BigDecimal(100)).toPlainString(); | |||
| wxBillAction.setDetails("线上缴费" + price + "元"); | |||
| wxBillAction.setAction(EnumBillAction.SELF_SERVICE_PAY.getCode()); | |||
| wxBillAction.setUserId(wxMerchantBUser.getId()); | |||
| wxBillAction.setUserName(wxMerchantBUser.getName()); | |||
| wxBillAction.setPhone(wxMerchantBUser.getPhone()); | |||
| wxBillAction.updateTenantInfo(wxMerchantBUser); | |||
| wxBillAction.setPayDate(date); | |||
| try { | |||
| wxBillActionService.save(wxBillAction); | |||
| } catch (Exception e) { | |||
| logger.error("添加其他押金账单行为日志,e:" + e.getMessage()); | |||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| } | |||
| return count; | |||
| // logger.info("updateBillRentDeposit params:" + bill.toString()); | |||
| // Object id = bill.get("id"); | |||
| // WxBillDeposit wxBillDeposit = wxBillDepositMapper.selectById((Long) id); | |||
| // if (wxBillDeposit == null) { | |||
| // return 0; | |||
| // } | |||
| // Date date = new Date(); | |||
| // wxBillDeposit.setPayDate(date); | |||
| // Long owe = (Long) bill.get("owe"); | |||
| // wxBillDeposit.setPay(wxBillDeposit.getPay() + owe); | |||
| // //wxBillDeposit.setOwe("0"); | |||
| // wxBillDeposit.setStatus(EnumBillStatus.PAID.getCode()); | |||
| // wxBillDeposit.setPayDate(date); | |||
| // wxBillDeposit.setUpdatetime(date); | |||
| // wxBillDeposit.setPayWay(EnumBillPayWay.WECHAT_PAY.getCode()); | |||
| // | |||
| // int count = 0; | |||
| // try { | |||
| // count = wxBillDepositMapper.updateById(wxBillDeposit); | |||
| // } catch (Exception e) { | |||
| // logger.error("更新租赁押金账单失败,e:" + e.getMessage()); | |||
| // throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| // } | |||
| // //日志 | |||
| // WxMerchantBUser wxMerchantBUser = wxMerchantBUserMapper.selectById((Long) bill.get("userId")); | |||
| // WxBillAction wxBillAction = new WxBillAction(); | |||
| // wxBillAction.setBillId(wxBillDeposit.getId()); | |||
| // String price = new BigDecimal(owe).divide(new BigDecimal(100)).toPlainString(); | |||
| // wxBillAction.setDetails("线上缴费" + price + "元"); | |||
| // wxBillAction.setAction(EnumBillAction.SELF_SERVICE_PAY.getCode()); | |||
| // wxBillAction.setUserId(wxMerchantBUser.getId()); | |||
| // wxBillAction.setUserName(wxMerchantBUser.getName()); | |||
| // wxBillAction.setPhone(wxMerchantBUser.getPhone()); | |||
| // wxBillAction.updateTenantInfo(wxMerchantBUser); | |||
| // wxBillAction.setPayDate(date); | |||
| // try { | |||
| // wxBillActionService.save(wxBillAction); | |||
| // } catch (Exception e) { | |||
| // logger.error("添加其他押金账单行为日志,e:" + e.getMessage()); | |||
| // throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| // } | |||
| // return count; | |||
| return 0; | |||
| } | |||
| private int updateBillRent(Map<String, Object> bill) { | |||
| logger.info("updateBillRentDeposit params:" + bill.toString()); | |||
| Object id = bill.get("id"); | |||
| WxBillRent wxBillRent = wxBillRentMapper.selectById((Long) id); | |||
| if (wxBillRent == null) { | |||
| return 0; | |||
| } | |||
| Date date = new Date(); | |||
| wxBillRent.setPayDate(date); | |||
| Long owe = (Long) bill.get("owe"); | |||
| wxBillRent.setPay(wxBillRent.getPay() + owe); | |||
| //wxBillRent.setOwe("0"); | |||
| wxBillRent.setStatus(EnumBillStatus.PAID.getCode()); | |||
| wxBillRent.setPayDate(date); | |||
| wxBillRent.setUpdatetime(date); | |||
| wxBillRent.setPayWay(EnumBillPayWay.WECHAT_PAY.getCode()); | |||
| int count = 0; | |||
| try { | |||
| count = wxBillRentMapper.updateById(wxBillRent); | |||
| } catch (Exception e) { | |||
| logger.error("更新租金账单失败,e:" + e.getMessage()); | |||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| } | |||
| //日志 | |||
| WxMerchantBUser wxMerchantBUser = wxMerchantBUserMapper.selectById((Long) bill.get("userId")); | |||
| WxBillAction wxBillAction = new WxBillAction(); | |||
| wxBillAction.setBillId(wxBillRent.getId()); | |||
| String price = new BigDecimal(owe).divide(new BigDecimal(100)).toPlainString(); | |||
| wxBillAction.setDetails("线上缴费" + price + "元"); | |||
| wxBillAction.setAction(EnumBillAction.SELF_SERVICE_PAY.getCode()); | |||
| wxBillAction.setUserId(wxMerchantBUser.getId()); | |||
| wxBillAction.setUserName(wxMerchantBUser.getName()); | |||
| wxBillAction.setPhone(wxMerchantBUser.getPhone()); | |||
| wxBillAction.updateTenantInfo(wxMerchantBUser); | |||
| wxBillAction.setPayDate(date); | |||
| try { | |||
| wxBillActionService.save(wxBillAction); | |||
| } catch (Exception e) { | |||
| logger.error("添加其他押金账单行为日志,e:" + e.getMessage()); | |||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| } | |||
| return count; | |||
| // logger.info("updateBillRentDeposit params:" + bill.toString()); | |||
| // Object id = bill.get("id"); | |||
| // WxBillRent wxBillRent = wxBillRentMapper.selectById((Long) id); | |||
| // if (wxBillRent == null) { | |||
| // return 0; | |||
| // } | |||
| // Date date = new Date(); | |||
| // wxBillRent.setPayDate(date); | |||
| // Long owe = (Long) bill.get("owe"); | |||
| // wxBillRent.setPay(wxBillRent.getPay() + owe); | |||
| // //wxBillRent.setOwe("0"); | |||
| // wxBillRent.setStatus(EnumBillStatus.PAID.getCode()); | |||
| // wxBillRent.setPayDate(date); | |||
| // wxBillRent.setUpdatetime(date); | |||
| // wxBillRent.setPayWay(EnumBillPayWay.WECHAT_PAY.getCode()); | |||
| // | |||
| // int count = 0; | |||
| // try { | |||
| // count = wxBillRentMapper.updateById(wxBillRent); | |||
| // } catch (Exception e) { | |||
| // logger.error("更新租金账单失败,e:" + e.getMessage()); | |||
| // throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| // } | |||
| // //日志 | |||
| // WxMerchantBUser wxMerchantBUser = wxMerchantBUserMapper.selectById((Long) bill.get("userId")); | |||
| // WxBillAction wxBillAction = new WxBillAction(); | |||
| // wxBillAction.setBillId(wxBillRent.getId()); | |||
| // String price = new BigDecimal(owe).divide(new BigDecimal(100)).toPlainString(); | |||
| // wxBillAction.setDetails("线上缴费" + price + "元"); | |||
| // wxBillAction.setAction(EnumBillAction.SELF_SERVICE_PAY.getCode()); | |||
| // wxBillAction.setUserId(wxMerchantBUser.getId()); | |||
| // wxBillAction.setUserName(wxMerchantBUser.getName()); | |||
| // wxBillAction.setPhone(wxMerchantBUser.getPhone()); | |||
| // wxBillAction.updateTenantInfo(wxMerchantBUser); | |||
| // wxBillAction.setPayDate(date); | |||
| // try { | |||
| // wxBillActionService.save(wxBillAction); | |||
| // } catch (Exception e) { | |||
| // logger.error("添加其他押金账单行为日志,e:" + e.getMessage()); | |||
| // throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| // } | |||
| // return count; | |||
| return 0; | |||
| } | |||
| @Override | |||
| @@ -1851,23 +1858,23 @@ public class WxBillAllServiceImpl implements WxBillAllService { | |||
| } | |||
| public void updateDailyBill(Long businessId, String newPrice, Date updateDate,boolean forcePaid) { | |||
| WxBillDaily dbBill = wxBillDailyMapper.selectById(businessId); | |||
| WxBillDaily wxBillDaily = new WxBillDaily(); | |||
| wxBillDaily.setId(businessId); | |||
| if (forcePaid) { | |||
| wxBillDaily.setReceivePay(dbBill.getPay()); | |||
| 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()); | |||
| if (newPrice.equals(dbBill.getPay())) { | |||
| wxBillDaily.setStatus(EnumBillStatus.PAID.getCode()); | |||
| } | |||
| } | |||
| wxBillDaily.setUpdatetime(updateDate); | |||
| wxBillDailyMapper.updateById(wxBillDaily); | |||
| // WxBillDaily dbBill = wxBillDailyMapper.selectById(businessId); | |||
| // WxBillDaily wxBillDaily = new WxBillDaily(); | |||
| // wxBillDaily.setId(businessId); | |||
| // if (forcePaid) { | |||
| // wxBillDaily.setReceivePay(dbBill.getPay()); | |||
| // 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()); | |||
| // if (newPrice.equals(dbBill.getPay())) { | |||
| // wxBillDaily.setStatus(EnumBillStatus.PAID.getCode()); | |||
| // } | |||
| // } | |||
| // wxBillDaily.setUpdatetime(updateDate); | |||
| // wxBillDailyMapper.updateById(wxBillDaily); | |||
| } | |||
| // @Override | |||
| @@ -1895,11 +1902,11 @@ public class WxBillAllServiceImpl implements WxBillAllService { | |||
| @Override | |||
| public Long hasOweBill(Long contractId, Integer type) { | |||
| if (type.intValue() == 1) { | |||
| return wxBillRentMapper.oweBillCount(contractId); | |||
| } else if (type.intValue() == 2) { | |||
| return wxBillPropertyMapper.oweBillCount(contractId); | |||
| } | |||
| // if (type.intValue() == 1) { | |||
| // return wxBillRentMapper.oweBillCount(contractId); | |||
| // } else if (type.intValue() == 2) { | |||
| // return wxBillPropertyMapper.oweBillCount(contractId); | |||
| // } | |||
| return 0L; | |||
| } | |||
| @@ -25,6 +25,7 @@ public class WxBillBaseService{ | |||
| protected void addBillAction(EnumBillAction billAction, Integer billType,Long billId, String oldMoney, String newMoney,Date payDate,String remark, MallUserInfo mallUserInfo) { | |||
| WxBillAction wxBillAction = new WxBillAction(); | |||
| wxBillAction.updateTenantInfo(mallUserInfo); | |||
| wxBillAction.setBillId(billId); | |||
| wxBillAction.setBillType(billType); | |||
| wxBillAction.setOldMoney(oldMoney); | |||
| @@ -39,6 +40,7 @@ public class WxBillBaseService{ | |||
| protected void addBillAction(EnumBillAction billAction, Integer billType,Long billId, String oldMoney, String newMoney,Date payDate,String remark, WxMerchantBUser bUser) { | |||
| WxBillAction wxBillAction = new WxBillAction(); | |||
| wxBillAction.updateTenantInfo(bUser); | |||
| wxBillAction.setBillId(billId); | |||
| wxBillAction.setBillType(billType); | |||
| wxBillAction.setOldMoney(oldMoney); | |||
| @@ -245,9 +245,9 @@ public class WxBillDailyServiceImpl extends WxBillBaseService implements WxBillD | |||
| dailyQuery.setMerchantId(record.getMerchantId()); | |||
| dailyQuery.setReceiveDate(record.getReceiveDate()); | |||
| dailyQuery.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | |||
| WxBillDaily daily = wxBillDailyMapper.selectOne(new QueryWrapper<>(dailyQuery)); | |||
| if (daily != null) { | |||
| return new ResultData(ErrorCode.BILL_IS_FOUND); | |||
| List<WxBillDaily> dailyList = wxBillDailyMapper.findList(dailyQuery); | |||
| if (null != dailyList && dailyList.size() > 0 ) { | |||
| return new ResultData(ErrorCode.BILL_IS_FOUND); | |||
| } | |||
| final IdWorker idWorker = IdWorker.get(); | |||
| record.setId(idWorker.nextId()); | |||
| @@ -255,6 +255,7 @@ public class WxBillDailyServiceImpl extends WxBillBaseService implements WxBillD | |||
| record.setCreatetime(date); | |||
| record.setUpdatetime(date); | |||
| record.setExpiredDay(0L); | |||
| record.updateTenantInfo(user); | |||
| //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.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | |||
| @@ -266,7 +267,7 @@ public class WxBillDailyServiceImpl extends WxBillBaseService implements WxBillD | |||
| } | |||
| return new ResultData(Result.SUCCESS, "保存日常账单成功"); | |||
| } else { | |||
| WxBillDaily wxBillDaily = wxBillDailyMapper.selectById(record.getId()); | |||
| WxBillDaily wxBillDaily = wxBillDailyMapper.selectById(record.getId(),user.getTenantId()); | |||
| if(wxBillDaily==null){ | |||
| return new ResultData(ErrorCode.BILL_ROUTINE_IS_NOT_FOUND); | |||
| } | |||
| @@ -277,27 +278,27 @@ public class WxBillDailyServiceImpl extends WxBillBaseService implements WxBillD | |||
| } | |||
| @Override | |||
| public void deleteById(Long id) { | |||
| wxBillDailyMapper.deleteById(id); | |||
| public void deleteById(TenantEntity tenantEntity,Long id) { | |||
| wxBillDailyMapper.deleteById(id,tenantEntity.getTenantId()); | |||
| } | |||
| @Transactional(rollbackFor = {Exception.class}) | |||
| @Override | |||
| public ResultData updatePaid(Long id) { | |||
| WxBillDaily wxBillDaily = wxBillDailyMapper.selectById(id); | |||
| if(wxBillDaily==null){ | |||
| return new ResultData(ErrorCode.BILL_ROUTINE_IS_NOT_FOUND); | |||
| } | |||
| wxBillDaily.setStatus(EnumBillStatus.PAID.getCode()); | |||
| Date d =new Date(); | |||
| wxBillDaily.setPayDate(d); | |||
| wxBillDaily.setUpdatetime(d); | |||
| try { | |||
| wxBillDailyMapper.updateById(wxBillDaily); | |||
| } catch (Exception e) { | |||
| logger.error("日常账单结单失败,e:" + e.getMessage()); | |||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(),e.getMessage()); | |||
| } | |||
| // WxBillDaily wxBillDaily = wxBillDailyMapper.selectById(id); | |||
| // if(wxBillDaily==null){ | |||
| // return new ResultData(ErrorCode.BILL_ROUTINE_IS_NOT_FOUND); | |||
| // } | |||
| // wxBillDaily.setStatus(EnumBillStatus.PAID.getCode()); | |||
| // Date d =new Date(); | |||
| // wxBillDaily.setPayDate(d); | |||
| // wxBillDaily.setUpdatetime(d); | |||
| // try { | |||
| // wxBillDailyMapper.updateById(wxBillDaily); | |||
| // } catch (Exception e) { | |||
| // logger.error("日常账单结单失败,e:" + e.getMessage()); | |||
| // throw new MallinkException(ErrorCode.DB_FAIL.getCode(),e.getMessage()); | |||
| // } | |||
| return new ResultData(Result.SUCCESS, "日常账单结单成功"); | |||
| } | |||
| @@ -331,7 +332,6 @@ public class WxBillDailyServiceImpl extends WxBillBaseService implements WxBillD | |||
| @Override | |||
| public void insertData(WxBillDailyVo billDaily, String importKey, MallUserInfo user) { | |||
| Integer type = billDaily.getType(); | |||
| WxBillDaily wxBillDaily = new WxBillDaily(); | |||
| String receivePay = billDaily.getReceivePay(); | |||
| @@ -366,6 +366,7 @@ public class WxBillDailyServiceImpl extends WxBillBaseService implements WxBillD | |||
| wxBillDaily.setCreatetime(date); | |||
| wxBillDaily.setUpdatetime(date); | |||
| wxBillDaily.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | |||
| wxBillDaily.updateTenantInfo(user); | |||
| //商户 | |||
| WxMerchantShop merchantShop = new WxMerchantShop(); | |||
| merchantShop.setShopId(billDaily.getShopId()); | |||
| @@ -430,7 +431,7 @@ public class WxBillDailyServiceImpl extends WxBillBaseService implements WxBillD | |||
| @Override | |||
| public void updateReceivePay(WxBillReceiveUpdateDTO dto, MallUserInfo user, boolean forcePaid) { | |||
| WxBillDaily dbBill = wxBillDailyMapper.selectById(dto.getId()); | |||
| WxBillDaily dbBill = wxBillDailyMapper.selectById(dto.getId(),dto.getTenantId()); | |||
| WxBillDaily wxBillDaily = new WxBillDaily(); | |||
| wxBillDaily.setId(dto.getId()); | |||
| wxBillDaily.updateTenantInfo(dto); | |||
| @@ -475,7 +476,7 @@ public class WxBillDailyServiceImpl extends WxBillBaseService implements WxBillD | |||
| } | |||
| private WxBillDaily updateBillPay(WxBillPayDTO dto) { | |||
| WxBillDaily dbBill = wxBillDailyMapper.selectById(dto.getId()); | |||
| WxBillDaily dbBill = wxBillDailyMapper.selectById(dto.getId(),dto.getTenantId()); | |||
| WxBillDaily wxBillRent = new WxBillDaily(); | |||
| wxBillRent.setId(dto.getId()); | |||
| wxBillRent.updateTenantInfo(dto); | |||
| @@ -236,9 +236,10 @@ public class WxBillDepositServiceImpl extends WxBillBaseService implements WxBil | |||
| } | |||
| @Override | |||
| public WxBillDeposit getById(Long id) { | |||
| public WxBillDeposit getById(TenantEntity tenantEntity,Long id) { | |||
| WxBillDeposit record = new WxBillDeposit(); | |||
| record.setId(id); | |||
| record.updateTenantInfo(tenantEntity); | |||
| return wxBillDepositMapper.queryBillDepositList(record).get(0); | |||
| } | |||
| @@ -279,6 +280,7 @@ public class WxBillDepositServiceImpl extends WxBillBaseService implements WxBil | |||
| record.setId(idWorker.nextId()); | |||
| record.setCreatetime(date); | |||
| record.setUpdatetime(date); | |||
| record.updateTenantInfo(user); | |||
| //record.setOwe(new BigDecimal(receivepay).subtract(new BigDecimal(pay)).toPlainString()); | |||
| record.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | |||
| try { | |||
| @@ -294,27 +296,27 @@ public class WxBillDepositServiceImpl extends WxBillBaseService implements WxBil | |||
| } | |||
| @Override | |||
| public void deleteById(Long id) { | |||
| wxBillDepositMapper.deleteById(id); | |||
| public void deleteById(TenantEntity tenantEntity,Long id) { | |||
| wxBillDepositMapper.deleteById(id,tenantEntity.getTenantId()); | |||
| } | |||
| @Transactional(rollbackFor = {Exception.class}) | |||
| @Override | |||
| public ResultData updatePaid(Long id) { | |||
| WxBillDeposit wxBillDeposit = wxBillDepositMapper.selectById(id); | |||
| if(wxBillDeposit==null){ | |||
| return new ResultData(ErrorCode.BILL_RENT_DEPOSIT_IS_NOT_FOUND); | |||
| } | |||
| wxBillDeposit.setStatus(EnumBillStatus.PAID.getCode()); | |||
| Date d =new Date(); | |||
| wxBillDeposit.setPayDate(d); | |||
| wxBillDeposit.setUpdatetime(d); | |||
| try { | |||
| wxBillDepositMapper.updateById(wxBillDeposit); | |||
| } catch (Exception e) { | |||
| logger.error("租赁押金结单失败,e:" + e.getMessage()); | |||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| } | |||
| // WxBillDeposit wxBillDeposit = wxBillDepositMapper.selectById(id); | |||
| // if(wxBillDeposit==null){ | |||
| // return new ResultData(ErrorCode.BILL_RENT_DEPOSIT_IS_NOT_FOUND); | |||
| // } | |||
| // wxBillDeposit.setStatus(EnumBillStatus.PAID.getCode()); | |||
| // Date d =new Date(); | |||
| // wxBillDeposit.setPayDate(d); | |||
| // wxBillDeposit.setUpdatetime(d); | |||
| // try { | |||
| // wxBillDepositMapper.updateById(wxBillDeposit); | |||
| // } catch (Exception e) { | |||
| // logger.error("租赁押金结单失败,e:" + e.getMessage()); | |||
| // throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| // } | |||
| return new ResultData(Result.SUCCESS, "租赁押金结单成功"); | |||
| } | |||
| @@ -322,7 +324,7 @@ public class WxBillDepositServiceImpl extends WxBillBaseService implements WxBil | |||
| @Override | |||
| public ResultData returnDeposit(WxBillDeposit record, MallUserInfo user) { | |||
| logger.info("租赁押金退还"); | |||
| WxBillDeposit wxBillDeposit = wxBillDepositMapper.selectById(record.getId()); | |||
| WxBillDeposit wxBillDeposit = wxBillDepositMapper.selectById(record.getId(),record.getTenantId()); | |||
| if (wxBillDeposit == null) { | |||
| return new ResultData(ErrorCode.BILL_RENT_DEPOSIT_IS_NOT_FOUND); | |||
| } | |||
| @@ -359,7 +361,7 @@ public class WxBillDepositServiceImpl extends WxBillBaseService implements WxBil | |||
| @Override | |||
| public ResultData adjustDeposit(WxBillDeposit record) { | |||
| logger.info("租赁押金调整"); | |||
| WxBillDeposit wxBillDeposit = wxBillDepositMapper.selectById(record.getId()); | |||
| WxBillDeposit wxBillDeposit = wxBillDepositMapper.selectById(record.getId(),record.getTenantId()); | |||
| if (wxBillDeposit == null) { | |||
| return new ResultData(ErrorCode.BILL_RENT_DEPOSIT_IS_NOT_FOUND); | |||
| } | |||
| @@ -407,7 +409,7 @@ public class WxBillDepositServiceImpl extends WxBillBaseService implements WxBil | |||
| @Override | |||
| public void updateReceivePay(WxBillReceiveUpdateDTO dto, MallUserInfo user, boolean forcePaid) { | |||
| WxBillDeposit dbBill = wxBillDepositMapper.selectById(dto.getId()); | |||
| WxBillDeposit dbBill = wxBillDepositMapper.selectById(dto.getId(),dto.getTenantId()); | |||
| WxBillDeposit wxBillDeposit = new WxBillDeposit(); | |||
| wxBillDeposit.setId(dto.getId()); | |||
| wxBillDeposit.updateTenantInfo(dto); | |||
| @@ -450,7 +452,7 @@ public class WxBillDepositServiceImpl extends WxBillBaseService implements WxBil | |||
| } | |||
| private WxBillDeposit updateBillPay(WxBillPayDTO dto) { | |||
| WxBillDeposit dbBill = wxBillDepositMapper.selectById(dto.getId()); | |||
| WxBillDeposit dbBill = wxBillDepositMapper.selectById(dto.getId(),dto.getTenantId()); | |||
| WxBillDeposit wxBillRent = new WxBillDeposit(); | |||
| wxBillRent.setId(dto.getId()); | |||
| wxBillRent.updateTenantInfo(dto); | |||
| @@ -272,7 +272,7 @@ public class WxBillOtherDepositServiceImpl extends WxBillBaseService implements | |||
| return new ResultData(Result.SUCCESS, "保存其他账单成功"); | |||
| } else { | |||
| logger.info("更新其他押金账单"); | |||
| WxBillOtherDeposit wxBillOtherDeposit = wxBillOtherDepositMapper.selectById(record.getId()); | |||
| WxBillOtherDeposit wxBillOtherDeposit = wxBillOtherDepositMapper.selectById(record.getId(),user.getTenantId()); | |||
| if (wxBillOtherDeposit == null) { | |||
| return new ResultData(ErrorCode.BILL_ROUTINE_IS_NOT_FOUND); | |||
| } | |||
| @@ -284,34 +284,34 @@ public class WxBillOtherDepositServiceImpl extends WxBillBaseService implements | |||
| @Override | |||
| public void deleteById(Long id) { | |||
| wxBillOtherDepositMapper.deleteById(id); | |||
| public void deleteById(TenantEntity tenantEntity,Long id) { | |||
| wxBillOtherDepositMapper.deleteById(id,tenantEntity.getTenantId()); | |||
| } | |||
| @Transactional(rollbackFor = {Exception.class}) | |||
| @Override | |||
| public ResultData updatePaid(Long id) { | |||
| WxBillOtherDeposit wxBillOtherDeposit = wxBillOtherDepositMapper.selectById(id); | |||
| if (wxBillOtherDeposit == null) { | |||
| return new ResultData(ErrorCode.BILL_ROUTINE_IS_NOT_FOUND); | |||
| } | |||
| wxBillOtherDeposit.setStatus(EnumBillStatus.PAID.getCode()); | |||
| Date d = new Date(); | |||
| wxBillOtherDeposit.setPayDate(d); | |||
| wxBillOtherDeposit.setUpdatetime(d); | |||
| try { | |||
| wxBillOtherDepositMapper.updateById(wxBillOtherDeposit); | |||
| } catch (Exception e) { | |||
| logger.error("其他押金账单结单失败,e:" + e.getMessage()); | |||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), e.getMessage()); | |||
| } | |||
| // WxBillOtherDeposit wxBillOtherDeposit = wxBillOtherDepositMapper.selectById(id); | |||
| // if (wxBillOtherDeposit == null) { | |||
| // return new ResultData(ErrorCode.BILL_ROUTINE_IS_NOT_FOUND); | |||
| // } | |||
| // wxBillOtherDeposit.setStatus(EnumBillStatus.PAID.getCode()); | |||
| // Date d = new Date(); | |||
| // wxBillOtherDeposit.setPayDate(d); | |||
| // wxBillOtherDeposit.setUpdatetime(d); | |||
| // try { | |||
| // wxBillOtherDepositMapper.updateById(wxBillOtherDeposit); | |||
| // } catch (Exception e) { | |||
| // logger.error("其他押金账单结单失败,e:" + e.getMessage()); | |||
| // throw new MallinkException(ErrorCode.DB_FAIL.getCode(), e.getMessage()); | |||
| // } | |||
| return new ResultData(Result.SUCCESS, "其他押金账单结单成功"); | |||
| } | |||
| @Override | |||
| public ResultData returnDeposit(WxBillOtherDeposit record, MallUserInfo user) { | |||
| logger.info("其他押金退还"); | |||
| WxBillOtherDeposit wxBillDeposit = wxBillOtherDepositMapper.selectById(record.getId()); | |||
| WxBillOtherDeposit wxBillDeposit = wxBillOtherDepositMapper.selectById(record.getId(),user.getTenantId()); | |||
| if (wxBillDeposit == null) { | |||
| return new ResultData(ErrorCode.BILL_OTHER_DEPOSIT_IS_NOT_FOUND); | |||
| } | |||
| @@ -328,6 +328,7 @@ public class WxBillOtherDepositServiceImpl extends WxBillBaseService implements | |||
| //日志 | |||
| WxBillAction wxBillAction = new WxBillAction(); | |||
| wxBillAction.setBillId(wxBillDeposit.getId()); | |||
| wxBillAction.updateTenantInfo(user); | |||
| String message = EnumBillPayWay.getEnum(record.getPayWay()).getMessage(); | |||
| String price = new BigDecimal(record.getReturnPrice()).divide(new BigDecimal(100)).toPlainString(); | |||
| wxBillAction.setDetails(message + price + "元"); | |||
| @@ -349,7 +350,7 @@ public class WxBillOtherDepositServiceImpl extends WxBillBaseService implements | |||
| @Override | |||
| public ResultData adjustDeposit(WxBillOtherDeposit record) { | |||
| logger.info("其他押金调整"); | |||
| WxBillOtherDeposit wxBillDeposit = wxBillOtherDepositMapper.selectById(record.getId()); | |||
| WxBillOtherDeposit wxBillDeposit = wxBillOtherDepositMapper.selectById(record.getId(),record.getTenantId()); | |||
| if (wxBillDeposit == null) { | |||
| return new ResultData(ErrorCode.BILL_OTHER_DEPOSIT_IS_NOT_FOUND); | |||
| } | |||
| @@ -398,7 +399,7 @@ public class WxBillOtherDepositServiceImpl extends WxBillBaseService implements | |||
| @Override | |||
| public void updateReceivePay(WxBillReceiveUpdateDTO dto, MallUserInfo user, boolean forcePaid) { | |||
| WxBillOtherDeposit dbBill = wxBillOtherDepositMapper.selectById(dto.getId()); | |||
| WxBillOtherDeposit dbBill = wxBillOtherDepositMapper.selectById(dto.getId(),dto.getTenantId()); | |||
| WxBillOtherDeposit wxBillOtherDeposit = new WxBillOtherDeposit(); | |||
| wxBillOtherDeposit.setId(dto.getId()); | |||
| wxBillOtherDeposit.updateTenantInfo(dto); | |||
| @@ -437,7 +438,7 @@ public class WxBillOtherDepositServiceImpl extends WxBillBaseService implements | |||
| } | |||
| private WxBillOtherDeposit updateBillPay(WxBillPayDTO dto) { | |||
| WxBillOtherDeposit dbBill = wxBillOtherDepositMapper.selectById(dto.getId()); | |||
| WxBillOtherDeposit dbBill = wxBillOtherDepositMapper.selectById(dto.getId(),dto.getTenantId()); | |||
| WxBillOtherDeposit wxBillRent = new WxBillOtherDeposit(); | |||
| wxBillRent.setId(dto.getId()); | |||
| wxBillRent.updateTenantInfo(dto); | |||
| @@ -249,8 +249,8 @@ public class WxBillOtherServiceImpl extends WxBillBaseService implements WxBillO | |||
| otherQuery.setReceiveDate(record.getReceiveDate()); | |||
| otherQuery.setName(record.getName()); | |||
| otherQuery.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | |||
| WxBillOther other = wxBillOtherMapper.selectOne(new QueryWrapper(otherQuery)); | |||
| if (other != null) { | |||
| List<WxBillOther> other = wxBillOtherMapper.findList(otherQuery); | |||
| if (other != null && other.size() > 0) { | |||
| return new ResultData(ErrorCode.BILL_IS_FOUND); | |||
| } | |||
| final IdWorker idWorker = IdWorker.get(); | |||
| @@ -259,6 +259,7 @@ public class WxBillOtherServiceImpl extends WxBillBaseService implements WxBillO | |||
| record.setCreatetime(date); | |||
| record.setUpdatetime(date); | |||
| record.setExpiredDay(0L); | |||
| record.updateTenantInfo(user); | |||
| //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.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | |||
| @@ -271,7 +272,7 @@ public class WxBillOtherServiceImpl extends WxBillBaseService implements WxBillO | |||
| return new ResultData(Result.SUCCESS, "保存其他押金账单成功"); | |||
| } else { | |||
| logger.info("更新其他押金账单"); | |||
| WxBillOther wxBillOther = wxBillOtherMapper.selectById(record.getId()); | |||
| WxBillOther wxBillOther = wxBillOtherMapper.selectById(record.getId(),user.getTenantId()); | |||
| if(wxBillOther==null){ | |||
| return new ResultData(ErrorCode.BILL_ROUTINE_IS_NOT_FOUND); | |||
| } | |||
| @@ -283,27 +284,27 @@ public class WxBillOtherServiceImpl extends WxBillBaseService implements WxBillO | |||
| @Override | |||
| public void deleteById(Long id) { | |||
| wxBillOtherMapper.deleteById(id); | |||
| public void deleteById(TenantEntity tenantEntity,Long id) { | |||
| wxBillOtherMapper.deleteById(id,tenantEntity.getTenantId()); | |||
| } | |||
| @Transactional(rollbackFor = {Exception.class}) | |||
| @Override | |||
| public ResultData updatePaid(Long id) { | |||
| WxBillOther wxBillOther = wxBillOtherMapper.selectById(id); | |||
| if(wxBillOther==null){ | |||
| return new ResultData(ErrorCode.BILL_ROUTINE_IS_NOT_FOUND); | |||
| } | |||
| wxBillOther.setStatus(EnumBillStatus.PAID.getCode()); | |||
| Date d =new Date(); | |||
| wxBillOther.setPayDate(d); | |||
| wxBillOther.setUpdatetime(d); | |||
| try { | |||
| wxBillOtherMapper.updateById(wxBillOther); | |||
| } catch (Exception e) { | |||
| logger.error("其他账单结单失败,e:" + e.getMessage()); | |||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(),e.getMessage()); | |||
| } | |||
| // WxBillOther wxBillOther = wxBillOtherMapper.selectById(id); | |||
| // if(wxBillOther==null){ | |||
| // return new ResultData(ErrorCode.BILL_ROUTINE_IS_NOT_FOUND); | |||
| // } | |||
| // wxBillOther.setStatus(EnumBillStatus.PAID.getCode()); | |||
| // Date d =new Date(); | |||
| // wxBillOther.setPayDate(d); | |||
| // wxBillOther.setUpdatetime(d); | |||
| // try { | |||
| // wxBillOtherMapper.updateById(wxBillOther); | |||
| // } catch (Exception e) { | |||
| // logger.error("其他账单结单失败,e:" + e.getMessage()); | |||
| // throw new MallinkException(ErrorCode.DB_FAIL.getCode(),e.getMessage()); | |||
| // } | |||
| return new ResultData(Result.SUCCESS, "其他账单结单成功"); | |||
| } | |||
| @@ -340,7 +341,7 @@ public class WxBillOtherServiceImpl extends WxBillBaseService implements WxBillO | |||
| @Override | |||
| public void updateReceivePay(WxBillReceiveUpdateDTO dto, MallUserInfo user, boolean forcePaid) { | |||
| WxBillOther dbBill = wxBillOtherMapper.selectById(dto.getId()); | |||
| WxBillOther dbBill = wxBillOtherMapper.selectById(dto.getId(),dto.getTenantId()); | |||
| WxBillOther wxBillOther = new WxBillOther(); | |||
| wxBillOther.setId(dto.getId()); | |||
| wxBillOther.updateTenantInfo(dto); | |||
| @@ -381,7 +382,7 @@ public class WxBillOtherServiceImpl extends WxBillBaseService implements WxBillO | |||
| } | |||
| private WxBillOther updateBillPay(WxBillPayDTO dto) { | |||
| WxBillOther dbBill = wxBillOtherMapper.selectById(dto.getId()); | |||
| WxBillOther dbBill = wxBillOtherMapper.selectById(dto.getId(),dto.getTenantId()); | |||
| WxBillOther wxBillRent = new WxBillOther(); | |||
| wxBillRent.setId(dto.getId()); | |||
| wxBillRent.updateTenantInfo(dto); | |||
| @@ -219,9 +219,10 @@ public class WxBillPropertyDepositServiceImpl extends WxBillBaseService implemen | |||
| } | |||
| @Override | |||
| public WxBillPropertyDeposit getById(Long id) { | |||
| public WxBillPropertyDeposit getById(TenantEntity tenantEntity ,Long id) { | |||
| WxBillPropertyDeposit record = new WxBillPropertyDeposit(); | |||
| record.setId(id); | |||
| record.updateTenantInfo(tenantEntity); | |||
| return wxBillPropertyDepositMapper.queryBillDepositList(record).get(0); | |||
| } | |||
| @@ -257,6 +258,7 @@ public class WxBillPropertyDepositServiceImpl extends WxBillBaseService implemen | |||
| record.setId(idWorker.nextId()); | |||
| record.setCreatetime(date); | |||
| record.setUpdatetime(date); | |||
| record.updateTenantInfo(user); | |||
| //record.setOwe(new BigDecimal(receivepay).subtract(new BigDecimal(pay)).toPlainString()); | |||
| record.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | |||
| try { | |||
| @@ -272,34 +274,34 @@ public class WxBillPropertyDepositServiceImpl extends WxBillBaseService implemen | |||
| } | |||
| @Override | |||
| public void deleteById(Long id) { | |||
| wxBillPropertyDepositMapper.deleteById(id); | |||
| public void deleteById(TenantEntity tenantEntity ,Long id) { | |||
| wxBillPropertyDepositMapper.deleteById(id,tenantEntity.getTenantId()); | |||
| } | |||
| @Transactional(rollbackFor = {Exception.class}) | |||
| @Override | |||
| public ResultData updatePaid(Long id) { | |||
| WxBillPropertyDeposit wxBillDeposit = wxBillPropertyDepositMapper.selectById(id); | |||
| if(wxBillDeposit==null){ | |||
| return new ResultData(ErrorCode.BILL_PROPERTY_DEPOSIT_IS_NOT_FOUND); | |||
| } | |||
| wxBillDeposit.setStatus(EnumBillStatus.PAID.getCode()); | |||
| Date d =new Date(); | |||
| wxBillDeposit.setPayDate(d); | |||
| wxBillDeposit.setUpdatetime(d); | |||
| try { | |||
| wxBillPropertyDepositMapper.updateById(wxBillDeposit); | |||
| } catch (Exception e) { | |||
| logger.error("物业押金结单失败,e:" + e.getMessage()); | |||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| } | |||
| // WxBillPropertyDeposit wxBillDeposit = wxBillPropertyDepositMapper.selectById(id); | |||
| // if(wxBillDeposit==null){ | |||
| // return new ResultData(ErrorCode.BILL_PROPERTY_DEPOSIT_IS_NOT_FOUND); | |||
| // } | |||
| // wxBillDeposit.setStatus(EnumBillStatus.PAID.getCode()); | |||
| // Date d =new Date(); | |||
| // wxBillDeposit.setPayDate(d); | |||
| // wxBillDeposit.setUpdatetime(d); | |||
| // try { | |||
| // wxBillPropertyDepositMapper.updateById(wxBillDeposit); | |||
| // } catch (Exception e) { | |||
| // logger.error("物业押金结单失败,e:" + e.getMessage()); | |||
| // throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| // } | |||
| return new ResultData(Result.SUCCESS, "物业押金结单成功"); | |||
| } | |||
| @Override | |||
| public ResultData returnDeposit(WxBillPropertyDeposit record, MallUserInfo user) { | |||
| logger.info("物业押金退还"); | |||
| WxBillPropertyDeposit wxBillDeposit = wxBillPropertyDepositMapper.selectById(record.getId()); | |||
| WxBillPropertyDeposit wxBillDeposit = wxBillPropertyDepositMapper.selectById(record.getId(),user.getTenantId()); | |||
| if (wxBillDeposit == null) { | |||
| return new ResultData(ErrorCode.BILL_PROPERTY_DEPOSIT_IS_NOT_FOUND); | |||
| } | |||
| @@ -315,6 +317,7 @@ public class WxBillPropertyDepositServiceImpl extends WxBillBaseService implemen | |||
| } | |||
| //日志 | |||
| WxBillAction wxBillAction = new WxBillAction(); | |||
| wxBillAction.updateTenantInfo(user); | |||
| wxBillAction.setBillId(wxBillDeposit.getId()); | |||
| String message = EnumBillPayWay.getEnum(record.getPayWay()).getMessage(); | |||
| String price = new BigDecimal(record.getReturnPrice()).divide(new BigDecimal(100)).toPlainString(); | |||
| @@ -337,7 +340,7 @@ public class WxBillPropertyDepositServiceImpl extends WxBillBaseService implemen | |||
| @Override | |||
| public ResultData adjustDeposit(WxBillPropertyDeposit record) { | |||
| logger.info("物业押金调整"); | |||
| WxBillPropertyDeposit wxBillDeposit = wxBillPropertyDepositMapper.selectById(record.getId()); | |||
| WxBillPropertyDeposit wxBillDeposit = wxBillPropertyDepositMapper.selectById(record.getId(),record.getTenantId()); | |||
| if (wxBillDeposit == null) { | |||
| return new ResultData(ErrorCode.BILL_OTHER_DEPOSIT_IS_NOT_FOUND); | |||
| } | |||
| @@ -385,7 +388,7 @@ public class WxBillPropertyDepositServiceImpl extends WxBillBaseService implemen | |||
| @Override | |||
| public void updateReceivePay(WxBillReceiveUpdateDTO dto, MallUserInfo user, boolean forcePaid) { | |||
| WxBillPropertyDeposit dbBill = wxBillPropertyDepositMapper.selectById(dto.getId()); | |||
| WxBillPropertyDeposit dbBill = wxBillPropertyDepositMapper.selectById(dto.getId(),dto.getTenantId()); | |||
| WxBillPropertyDeposit wxBillPropertyDeposit = new WxBillPropertyDeposit(); | |||
| wxBillPropertyDeposit.setId(dto.getId()); | |||
| wxBillPropertyDeposit.updateTenantInfo(dto); | |||
| @@ -429,7 +432,7 @@ public class WxBillPropertyDepositServiceImpl extends WxBillBaseService implemen | |||
| } | |||
| private WxBillPropertyDeposit updateBillPay(WxBillPayDTO dto) { | |||
| WxBillPropertyDeposit dbBill = wxBillPropertyDepositMapper.selectById(dto.getId()); | |||
| WxBillPropertyDeposit dbBill = wxBillPropertyDepositMapper.selectById(dto.getId(),dto.getTenantId()); | |||
| WxBillPropertyDeposit wxBillRent = new WxBillPropertyDeposit(); | |||
| wxBillRent.setId(dto.getId()); | |||
| wxBillRent.updateTenantInfo(dto); | |||
| @@ -303,6 +303,7 @@ public class WxBillPropertyServiceImpl extends WxBillBaseService implements WxBi | |||
| record.setId(idWorker.nextId()); | |||
| record.setCreatetime(date); | |||
| record.setUpdatetime(date); | |||
| record.updateTenantInfo(user); | |||
| //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.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | |||
| @@ -319,8 +320,8 @@ public class WxBillPropertyServiceImpl extends WxBillBaseService implements WxBi | |||
| } | |||
| @Override | |||
| public void deleteById(Long id) { | |||
| wxBillPropertyMapper.deleteById(id); | |||
| public void deleteById(TenantEntity tenantEntity,Long id) { | |||
| wxBillPropertyMapper.deleteById(id,tenantEntity.getTenantId()); | |||
| } | |||
| @Override | |||
| @@ -340,20 +341,20 @@ public class WxBillPropertyServiceImpl extends WxBillBaseService implements WxBi | |||
| @Transactional(rollbackFor = {Exception.class}) | |||
| @Override | |||
| public ResultData updatePaid(Long id) { | |||
| WxBillProperty record = wxBillPropertyMapper.selectById(id); | |||
| if (record == null) { | |||
| return new ResultData(ErrorCode.BILL_PROPERTY_IS_NOT_FOUND); | |||
| } | |||
| record.setStatus(EnumBillStatus.PAID.getCode()); | |||
| Date d = new Date(); | |||
| record.setPayDate(d); | |||
| record.setUpdatetime(d); | |||
| try { | |||
| wxBillPropertyMapper.updateById(record); | |||
| } catch (Exception e) { | |||
| logger.error("结单失败,e:" + e.getMessage()); | |||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| } | |||
| // WxBillProperty record = wxBillPropertyMapper.selectById(id); | |||
| // if (record == null) { | |||
| // return new ResultData(ErrorCode.BILL_PROPERTY_IS_NOT_FOUND); | |||
| // } | |||
| // record.setStatus(EnumBillStatus.PAID.getCode()); | |||
| // Date d = new Date(); | |||
| // record.setPayDate(d); | |||
| // record.setUpdatetime(d); | |||
| // try { | |||
| // wxBillPropertyMapper.updateById(record); | |||
| // } catch (Exception e) { | |||
| // logger.error("结单失败,e:" + e.getMessage()); | |||
| // throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| // } | |||
| return new ResultData(Result.SUCCESS, "结单成功"); | |||
| } | |||
| @@ -433,7 +434,7 @@ public class WxBillPropertyServiceImpl extends WxBillBaseService implements WxBi | |||
| @Override | |||
| public ResultData updateLatePayMoney(WxBillProperty record, MallUserInfo user) { | |||
| WxBillProperty property = wxBillPropertyMapper.selectById(record.getId()); | |||
| WxBillProperty property = wxBillPropertyMapper.selectById(record.getId(),user.getTenantId()); | |||
| if (record.getLatePayMoneyUpdate() != null) { | |||
| property.setLatePayPrice(record.getLatePayMoneyUpdate()); | |||
| //property.setOwe(new BigDecimal(property.getReceivePay()).add(new BigDecimal(property.getLatePayPrice())) | |||
| @@ -441,6 +442,7 @@ public class WxBillPropertyServiceImpl extends WxBillBaseService implements WxBi | |||
| //property.setOwe(new BigDecimal(property.getReceivePay()).subtract(new BigDecimal(property.getPay())).toPlainString()); | |||
| final IdWorker idWorker = IdWorker.get(); | |||
| WxBillAction billAction = new WxBillAction(); | |||
| billAction.updateTenantInfo(user); | |||
| billAction.setId(idWorker.nextId()); | |||
| billAction.setCreatetime(new Date()); | |||
| billAction.setUserName("系统端"); | |||
| @@ -474,7 +476,7 @@ public class WxBillPropertyServiceImpl extends WxBillBaseService implements WxBi | |||
| @Override | |||
| public void updateReceivePay(WxBillReceiveUpdateDTO dto, MallUserInfo user, boolean forcePaid) { | |||
| WxBillProperty dbBill = wxBillPropertyMapper.selectById(dto.getId()); | |||
| WxBillProperty dbBill = wxBillPropertyMapper.selectById(dto.getId(),dto.getTenantId()); | |||
| WxBillProperty wxBillProperty = new WxBillProperty(); | |||
| wxBillProperty.setId(dto.getId()); | |||
| wxBillProperty.updateTenantInfo(dto); | |||
| @@ -519,7 +521,7 @@ public class WxBillPropertyServiceImpl extends WxBillBaseService implements WxBi | |||
| } | |||
| private WxBillProperty updateBillPay(WxBillPayDTO dto) { | |||
| WxBillProperty dbBill = wxBillPropertyMapper.selectById(dto.getId()); | |||
| WxBillProperty dbBill = wxBillPropertyMapper.selectById(dto.getId(),dto.getTenantId()); | |||
| WxBillProperty wxBillRent = new WxBillProperty(); | |||
| wxBillRent.setId(dto.getId()); | |||
| wxBillRent.updateTenantInfo(dto); | |||
| @@ -179,6 +179,7 @@ public class WxBillRentManageServiceImpl extends WxBillBaseService implements W | |||
| record.setId(idWorker.nextId()); | |||
| record.setCreatetime(date); | |||
| record.setUpdatetime(date); | |||
| record.updateTenantInfo(user); | |||
| //record.setOwe(new BigDecimal(receivepay).subtract(new BigDecimal(pay)).toPlainString()); | |||
| record.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | |||
| try { | |||
| @@ -249,13 +250,14 @@ public class WxBillRentManageServiceImpl extends WxBillBaseService implements W | |||
| @Override | |||
| public ResultData updateLatePayMoney(WxBillRentManage record, MallUserInfo user) { | |||
| WxBillRentManage rent = wxBillRentManageMapper.selectById(record.getId()); | |||
| WxBillRentManage rent = wxBillRentManageMapper.selectById(record.getId(),user.getTenantId()); | |||
| 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()); | |||
| final IdWorker idWorker = IdWorker.get(); | |||
| WxBillAction billAction = new WxBillAction(); | |||
| billAction.updateTenantInfo(user); | |||
| billAction.setId(idWorker.nextId()); | |||
| billAction.setCreatetime(new Date()); | |||
| billAction.setUserName("系统端"); | |||
| @@ -310,27 +312,27 @@ public class WxBillRentManageServiceImpl extends WxBillBaseService implements W | |||
| } | |||
| @Override | |||
| public void deleteById(Long id) { | |||
| wxBillRentManageMapper.deleteById(id); | |||
| public void deleteById(TenantEntity tenantEntity,Long id) { | |||
| wxBillRentManageMapper.deleteById(id,tenantEntity.getTenantId()); | |||
| } | |||
| @Transactional(rollbackFor = {Exception.class}) | |||
| @Override | |||
| public ResultData updatePaid(Long id) { | |||
| WxBillRentManage wxBillDeposit = wxBillRentManageMapper.selectById(id); | |||
| if(wxBillDeposit==null){ | |||
| return new ResultData(ErrorCode.BILL_RENT_DEPOSIT_IS_NOT_FOUND); | |||
| } | |||
| wxBillDeposit.setStatus(EnumBillStatus.PAID.getCode()); | |||
| Date d =new Date(); | |||
| wxBillDeposit.setPayDate(d); | |||
| wxBillDeposit.setUpdatetime(d); | |||
| try { | |||
| wxBillRentManageMapper.updateById(wxBillDeposit); | |||
| } catch (Exception e) { | |||
| logger.error("租赁押金结单失败,e:" + e.getMessage()); | |||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| } | |||
| // WxBillRentManage wxBillDeposit = wxBillRentManageMapper.selectById(id); | |||
| // if(wxBillDeposit==null){ | |||
| // return new ResultData(ErrorCode.BILL_RENT_DEPOSIT_IS_NOT_FOUND); | |||
| // } | |||
| // wxBillDeposit.setStatus(EnumBillStatus.PAID.getCode()); | |||
| // Date d =new Date(); | |||
| // wxBillDeposit.setPayDate(d); | |||
| // wxBillDeposit.setUpdatetime(d); | |||
| // try { | |||
| // wxBillRentManageMapper.updateById(wxBillDeposit); | |||
| // } catch (Exception e) { | |||
| // logger.error("租赁押金结单失败,e:" + e.getMessage()); | |||
| // throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| // } | |||
| return new ResultData(Result.SUCCESS, "租赁押金结单成功"); | |||
| } | |||
| @@ -403,7 +405,7 @@ public class WxBillRentManageServiceImpl extends WxBillBaseService implements W | |||
| @Override | |||
| public void updateReceivePay(WxBillReceiveUpdateDTO dto, MallUserInfo user, boolean forcePaid) { | |||
| WxBillRentManage dbBill = wxBillRentManageMapper.selectById(dto.getId()); | |||
| WxBillRentManage dbBill = wxBillRentManageMapper.selectById(dto.getId(),dto.getTenantId()); | |||
| WxBillRentManage wxBillRent = new WxBillRentManage(); | |||
| wxBillRent.setId(dto.getId()); | |||
| wxBillRent.updateTenantInfo(dto); | |||
| @@ -448,7 +450,7 @@ public class WxBillRentManageServiceImpl extends WxBillBaseService implements W | |||
| } | |||
| private WxBillRentManage updateBillPay(WxBillPayDTO dto) { | |||
| WxBillRentManage dbBill = wxBillRentManageMapper.selectById(dto.getId()); | |||
| WxBillRentManage dbBill = wxBillRentManageMapper.selectById(dto.getId(),dto.getTenantId()); | |||
| WxBillRentManage wxBillRent = new WxBillRentManage(); | |||
| wxBillRent.setId(dto.getId()); | |||
| wxBillRent.updateTenantInfo(dto); | |||
| @@ -173,6 +173,7 @@ public class WxBillRentServiceImpl extends WxBillBaseService implements WxBillRe | |||
| record.setId(idWorker.nextId()); | |||
| record.setCreatetime(date); | |||
| record.setUpdatetime(date); | |||
| record.updateTenantInfo(user); | |||
| //record.setOwe(new BigDecimal(receivepay).subtract(new BigDecimal(pay)).toPlainString()); | |||
| record.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | |||
| try { | |||
| @@ -188,7 +189,7 @@ public class WxBillRentServiceImpl extends WxBillBaseService implements WxBillRe | |||
| } | |||
| @Override | |||
| public void deleteById(Long id) { | |||
| public void deleteById(TenantEntity tenantEntity,Long id) { | |||
| wxBillRentMapper.deleteById(id); | |||
| } | |||
| @@ -201,20 +202,20 @@ public class WxBillRentServiceImpl extends WxBillBaseService implements WxBillRe | |||
| @Transactional(rollbackFor = {Exception.class}) | |||
| @Override | |||
| public ResultData updatePaid(Long id) { | |||
| WxBillRent wxBillRent = wxBillRentMapper.selectById(id); | |||
| if(wxBillRent==null){ | |||
| return new ResultData(ErrorCode.BILL_RENT_IS_NOT_FOUND); | |||
| } | |||
| wxBillRent.setStatus(EnumBillStatus.PAID.getCode()); | |||
| Date d =new Date(); | |||
| wxBillRent.setPayDate(d); | |||
| wxBillRent.setUpdatetime(d); | |||
| try { | |||
| wxBillRentMapper.updateById(wxBillRent); | |||
| } catch (Exception e) { | |||
| logger.error("租赁账单结单失败,e:" + e.getMessage()); | |||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| } | |||
| // WxBillRent wxBillRent = wxBillRentMapper.selectById(id); | |||
| // if(wxBillRent==null){ | |||
| // return new ResultData(ErrorCode.BILL_RENT_IS_NOT_FOUND); | |||
| // } | |||
| // wxBillRent.setStatus(EnumBillStatus.PAID.getCode()); | |||
| // Date d =new Date(); | |||
| // wxBillRent.setPayDate(d); | |||
| // wxBillRent.setUpdatetime(d); | |||
| // try { | |||
| // wxBillRentMapper.updateById(wxBillRent); | |||
| // } catch (Exception e) { | |||
| // logger.error("租赁账单结单失败,e:" + e.getMessage()); | |||
| // throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| // } | |||
| return new ResultData(Result.SUCCESS, "租赁账单结单成功"); | |||
| } | |||
| @@ -272,7 +273,7 @@ public class WxBillRentServiceImpl extends WxBillBaseService implements WxBillRe | |||
| @Override | |||
| @Transactional(rollbackFor = {Exception.class}) | |||
| public ResultData updateRevenue(WxBillRent record, MallUserInfo user) { | |||
| WxBillRent wxBillRent = wxBillRentMapper.selectById(record.getId()); | |||
| WxBillRent wxBillRent = wxBillRentMapper.selectById(record.getId(),user.getTenantId()); | |||
| WxRentContract wxRentContract = wxRentContractMapper.selectById(wxBillRent.getRentContractId()); | |||
| SimpleDateFormat sdD = new SimpleDateFormat("d"); | |||
| SimpleDateFormat sdM = new SimpleDateFormat("yyyy-MM"); | |||
| @@ -340,6 +341,7 @@ public class WxBillRentServiceImpl extends WxBillBaseService implements WxBillRe | |||
| if (!oldPrice.equals(newPrice)) { | |||
| //日志 | |||
| WxBillAction wxBillAction = new WxBillAction(); | |||
| wxBillAction.updateTenantInfo(user); | |||
| wxBillAction.setBillId(wxBillRent.getId()); | |||
| String oldPriceStr = new BigDecimal(oldPrice).divide(new BigDecimal(100)).toPlainString(); | |||
| String newPriceStr = new BigDecimal(newPrice).divide(new BigDecimal(100)).toPlainString(); | |||
| @@ -527,13 +529,14 @@ public class WxBillRentServiceImpl extends WxBillBaseService implements WxBillRe | |||
| @Override | |||
| public ResultData updateLatePayMoney(WxBillRent record, MallUserInfo user) { | |||
| WxBillRent rent = wxBillRentMapper.selectById(record.getId()); | |||
| WxBillRent rent = wxBillRentMapper.selectById(record.getId(),user.getTenantId()); | |||
| 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()); | |||
| final IdWorker idWorker = IdWorker.get(); | |||
| WxBillAction billAction = new WxBillAction(); | |||
| billAction.updateTenantInfo(user); | |||
| billAction.setId(idWorker.nextId()); | |||
| billAction.setCreatetime(new Date()); | |||
| billAction.setUserName("系统端"); | |||
| @@ -567,7 +570,7 @@ public class WxBillRentServiceImpl extends WxBillBaseService implements WxBillRe | |||
| @Override | |||
| public void updateReceivePay(WxBillReceiveUpdateDTO dto, MallUserInfo user, boolean forcePaid) { | |||
| WxBillRent dbBill = wxBillRentMapper.selectById(dto.getId()); | |||
| WxBillRent dbBill = wxBillRentMapper.selectById(dto.getId(),dto.getTenantId()); | |||
| WxBillRent wxBillRent = new WxBillRent(); | |||
| wxBillRent.setId(dto.getId()); | |||
| wxBillRent.updateTenantInfo(dto); | |||
| @@ -612,7 +615,7 @@ public class WxBillRentServiceImpl extends WxBillBaseService implements WxBillRe | |||
| } | |||
| private WxBillRent updateBillPay(WxBillPayDTO dto) { | |||
| WxBillRent dbBill = wxBillRentMapper.selectById(dto.getId()); | |||
| WxBillRent dbBill = wxBillRentMapper.selectById(dto.getId(),dto.getTenantId()); | |||
| WxBillRent wxBillRent = new WxBillRent(); | |||
| wxBillRent.setId(dto.getId()); | |||
| wxBillRent.updateTenantInfo(dto); | |||
| @@ -149,385 +149,385 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { | |||
| } | |||
| public void addBillAction(Long billId,String money){ | |||
| final IdWorker idWorker = IdWorker.get(); | |||
| WxBillAction billAction = new WxBillAction(); | |||
| billAction.setId(idWorker.nextId()); | |||
| billAction.setCreatetime(new Date()); | |||
| billAction.setUserName("系统端"); | |||
| billAction.setAction(EnumBillAction.UPDATE_SETTLE_MONEY.getCode()); | |||
| billAction.setBillId(billId); | |||
| BigDecimal newmoney = new BigDecimal(money).divide(new BigDecimal(100),2,BigDecimal.ROUND_HALF_UP); | |||
| billAction.setDetails("通过结算单清算"+newmoney.toString()+"元"); | |||
| billAction.setUpdatetime(new Date()); | |||
| billAction.setPayDate(new Date()); | |||
| wxBillActionMapper.insert(billAction); | |||
| // final IdWorker idWorker = IdWorker.get(); | |||
| // WxBillAction billAction = new WxBillAction(); | |||
| // billAction.setId(idWorker.nextId()); | |||
| // billAction.setCreatetime(new Date()); | |||
| // billAction.setUserName("系统端"); | |||
| // billAction.setAction(EnumBillAction.UPDATE_SETTLE_MONEY.getCode()); | |||
| // billAction.setBillId(billId); | |||
| // BigDecimal newmoney = new BigDecimal(money).divide(new BigDecimal(100),2,BigDecimal.ROUND_HALF_UP); | |||
| // billAction.setDetails("通过结算单清算"+newmoney.toString()+"元"); | |||
| // billAction.setUpdatetime(new Date()); | |||
| // billAction.setPayDate(new Date()); | |||
| // wxBillActionMapper.insert(billAction); | |||
| } | |||
| @Override | |||
| public void updateFreezeOrStatus(List<WxBillSettleBill> billList,Integer freezeStatus,Integer status,Integer applyStatus){ | |||
| //1租金2押金3物业4日常费用6其他8补贴 | |||
| for (WxBillSettleBill bill:billList) { | |||
| if(EnumBillQueryType.RENT.getCode().equals(bill.getBillType())) { | |||
| WxBillRent wxBillRent = new WxBillRent(); | |||
| wxBillRent.setId(bill.getBillId()); | |||
| if ( null != applyStatus) { | |||
| wxBillRent.setApplyStatus(applyStatus); | |||
| wxBillRent.setApplyUpdateTime(bill.getApplyUpdateTime()); | |||
| } | |||
| if (!StringUtils.isBlank(bill.getApplyPayImg())) { | |||
| wxBillRent.setApplyPayImg(bill.getApplyPayImg()); | |||
| } | |||
| if(freezeStatus != null) wxBillRent.setFreeze(freezeStatus); | |||
| if(status != null){ | |||
| wxBillRent.setStatus(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()); | |||
| wxBillRent.setPay(new BigDecimal(dbBill.getPay()).toPlainString()); | |||
| wxBillRent.setPayDate(new Date()); | |||
| //addBillAction(bill.getBillId(), dbBill.getOwe()); | |||
| } | |||
| } | |||
| wxBillRentMapper.updateById(wxBillRent); | |||
| }else if(EnumBillType.DEPOSIT.getCode().equals(bill.getBillType())) { | |||
| WxBillDeposit wxBillRent = new WxBillDeposit(); | |||
| wxBillRent.setId(bill.getBillId()); | |||
| if ( null != applyStatus) { | |||
| wxBillRent.setApplyStatus(applyStatus); | |||
| wxBillRent.setApplyUpdateTime(bill.getApplyUpdateTime()); | |||
| } | |||
| if (!StringUtils.isBlank(bill.getApplyPayImg())) { | |||
| wxBillRent.setApplyPayImg(bill.getApplyPayImg()); | |||
| } | |||
| if(freezeStatus != null) wxBillRent.setFreeze(freezeStatus); | |||
| if(status != null){ | |||
| wxBillRent.setStatus(status); | |||
| } | |||
| if(EnumBillStatus.PAID.getCode().equals(status)){ | |||
| wxBillRent.setPayDate(new Date()); | |||
| WxBillDeposit dbBill = wxBillDepositMapper.selectById(wxBillRent.getId()); | |||
| if(dbBill!=null) { | |||
| if(StringUtils.isBlank(dbBill.getPay())) dbBill.setPay("0"); | |||
| if(StringUtils.isBlank(dbBill.getReceivePay())) dbBill.setReceivePay("0"); | |||
| 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(EnumBillStatus.PAID.getCode()); | |||
| }else{ | |||
| wxBillRent.setStatus(EnumBillStatus.RETURN.getCode()); | |||
| } | |||
| //addBillAction(bill.getBillId(), dbBill.getOwe()); | |||
| } | |||
| } | |||
| wxBillDepositMapper.updateById(wxBillRent); | |||
| WxBillOtherDeposit wxBillOtherDeposit = new WxBillOtherDeposit(); | |||
| wxBillOtherDeposit.setId(bill.getBillId()); | |||
| if ( null != applyStatus) { | |||
| wxBillOtherDeposit.setApplyStatus(applyStatus); | |||
| wxBillOtherDeposit.setApplyUpdateTime(bill.getApplyUpdateTime()); | |||
| } | |||
| if (!StringUtils.isBlank(bill.getApplyPayImg())) { | |||
| wxBillOtherDeposit.setApplyPayImg(bill.getApplyPayImg()); | |||
| } | |||
| if(freezeStatus != null) wxBillOtherDeposit.setFreeze(freezeStatus); | |||
| if(status != null){ | |||
| wxBillOtherDeposit.setStatus(status); | |||
| } | |||
| if(EnumBillStatus.PAID.getCode().equals(status)){ | |||
| wxBillOtherDeposit.setPayDate(new Date()); | |||
| WxBillOtherDeposit dbBill = wxBillOtherDepositMapper.selectById(wxBillRent.getId()); | |||
| if(dbBill!=null) { | |||
| if(StringUtils.isBlank(dbBill.getPay())) dbBill.setPay("0"); | |||
| if(StringUtils.isBlank(dbBill.getReceivePay())) dbBill.setReceivePay("0"); | |||
| wxBillOtherDeposit.setPay(dbBill.getPay()+ dbBill.getReceivePay()); | |||
| wxBillOtherDeposit.setPayDate(new Date()); | |||
| if(EnumSettleBillType.R.getCode().equals(bill.getType())){ | |||
| wxBillOtherDeposit.setStatus(EnumBillStatus.PAID.getCode()); | |||
| }else{ | |||
| wxBillOtherDeposit.setStatus(EnumBillStatus.RETURN.getCode()); | |||
| } | |||
| //addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); | |||
| } | |||
| } | |||
| wxBillOtherDepositMapper.updateById(wxBillOtherDeposit); | |||
| WxBillPropertyDeposit propertyDeposit = new WxBillPropertyDeposit(); | |||
| propertyDeposit.setId(bill.getBillId()); | |||
| if ( null != applyStatus) { | |||
| propertyDeposit.setApplyStatus(applyStatus); | |||
| propertyDeposit.setApplyUpdateTime(bill.getApplyUpdateTime()); | |||
| } | |||
| if (!StringUtils.isBlank(bill.getApplyPayImg())) { | |||
| propertyDeposit.setApplyPayImg(bill.getApplyPayImg()); | |||
| } | |||
| if(freezeStatus != null) propertyDeposit.setFreeze(freezeStatus); | |||
| if(status != null){ | |||
| propertyDeposit.setStatus(status); | |||
| } | |||
| if(EnumBillStatus.PAID.getCode().equals(status)){ | |||
| propertyDeposit.setPayDate(new Date()); | |||
| WxBillPropertyDeposit dbBill = wxBillPropertyDepositMapper.selectById(wxBillRent.getId()); | |||
| if(dbBill!=null) { | |||
| if(StringUtils.isBlank(dbBill.getPay())) dbBill.setPay("0"); | |||
| if(StringUtils.isBlank(dbBill.getReceivePay())) dbBill.setReceivePay("0"); | |||
| 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(EnumBillStatus.PAID.getCode()); | |||
| }else{ | |||
| propertyDeposit.setStatus(EnumBillStatus.RETURN.getCode()); | |||
| } | |||
| //addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); | |||
| } | |||
| } | |||
| wxBillPropertyDepositMapper.updateById(propertyDeposit); | |||
| }else if(EnumBillType.PROPERTY.getCode().equals(bill.getBillType())) { | |||
| WxBillProperty wxBillRent = new WxBillProperty(); | |||
| wxBillRent.setId(bill.getBillId()); | |||
| if ( null != applyStatus) { | |||
| wxBillRent.setApplyStatus(applyStatus); | |||
| wxBillRent.setApplyUpdateTime(bill.getApplyUpdateTime()); | |||
| } | |||
| if (!StringUtils.isBlank(bill.getApplyPayImg())) { | |||
| wxBillRent.setApplyPayImg(bill.getApplyPayImg()); | |||
| } | |||
| if(freezeStatus != null) wxBillRent.setFreeze(freezeStatus); | |||
| if(status != null){ | |||
| wxBillRent.setStatus(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()); | |||
| wxBillRent.setPay(new BigDecimal(dbBill.getPay()).toPlainString()); | |||
| wxBillRent.setPayDate(new Date()); | |||
| //addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); | |||
| } | |||
| } | |||
| wxBillPropertyMapper.updateById(wxBillRent); | |||
| WxBillPropertyDeposit propertyDeposit = new WxBillPropertyDeposit(); | |||
| propertyDeposit.setId(bill.getBillId()); | |||
| if ( null != applyStatus) { | |||
| propertyDeposit.setApplyStatus(applyStatus); | |||
| propertyDeposit.setApplyUpdateTime(bill.getApplyUpdateTime()); | |||
| } | |||
| if (!StringUtils.isBlank(bill.getApplyPayImg())) { | |||
| propertyDeposit.setApplyPayImg(bill.getApplyPayImg()); | |||
| } | |||
| if(freezeStatus != null) propertyDeposit.setFreeze(freezeStatus); | |||
| if(status != null){ | |||
| propertyDeposit.setStatus(status); | |||
| } | |||
| if(EnumBillStatus.PAID.getCode().equals(status)){ | |||
| propertyDeposit.setPayDate(new Date()); | |||
| WxBillPropertyDeposit dbBill = wxBillPropertyDepositMapper.selectById(wxBillRent.getId()); | |||
| if(dbBill!=null) { | |||
| if(StringUtils.isBlank(dbBill.getPay())) dbBill.setPay("0"); | |||
| if(StringUtils.isBlank(dbBill.getReceivePay())) dbBill.setReceivePay("0"); | |||
| 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(EnumBillStatus.PAID.getCode()); | |||
| }else{ | |||
| propertyDeposit.setStatus(EnumBillStatus.RETURN.getCode()); | |||
| } | |||
| //addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); | |||
| } | |||
| } | |||
| wxBillPropertyDepositMapper.updateById(propertyDeposit); | |||
| }else if(EnumBillType.ROUTINE.getCode().equals(bill.getBillType())) { | |||
| WxBillOther wxBillRent = new WxBillOther(); | |||
| wxBillRent.setId(bill.getBillId()); | |||
| if ( null != applyStatus) { | |||
| wxBillRent.setApplyStatus(applyStatus); | |||
| wxBillRent.setApplyUpdateTime(bill.getApplyUpdateTime()); | |||
| } | |||
| if (!StringUtils.isBlank(bill.getApplyPayImg())) { | |||
| wxBillRent.setApplyPayImg(bill.getApplyPayImg()); | |||
| } | |||
| if(freezeStatus != null) wxBillRent.setFreeze(freezeStatus); | |||
| if(status != null){ | |||
| wxBillRent.setStatus(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()); | |||
| wxBillRent.setPay(new BigDecimal(dbBill.getPay()).toPlainString()); | |||
| wxBillRent.setPayDate(new Date()); | |||
| //addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); | |||
| } | |||
| } | |||
| wxBillOtherMapper.updateById(wxBillRent); | |||
| }else if(EnumBillType.OTHER_DEPOSIT.getCode().equals(bill.getBillType())) { | |||
| WxBillOtherDeposit wxBillRent = new WxBillOtherDeposit(); | |||
| wxBillRent.setId(bill.getBillId()); | |||
| if ( null != applyStatus) { | |||
| wxBillRent.setApplyStatus(applyStatus); | |||
| wxBillRent.setApplyUpdateTime(bill.getApplyUpdateTime()); | |||
| } | |||
| if (!StringUtils.isBlank(bill.getApplyPayImg())) { | |||
| wxBillRent.setApplyPayImg(bill.getApplyPayImg()); | |||
| } | |||
| if(freezeStatus != null) wxBillRent.setFreeze(freezeStatus); | |||
| if(status != null){ | |||
| wxBillRent.setStatus(status); | |||
| } | |||
| if(EnumBillStatus.PAID.getCode().equals(status)){ | |||
| wxBillRent.setPayDate(new Date()); | |||
| WxBillOtherDeposit dbBill = wxBillOtherDepositMapper.selectById(wxBillRent.getId()); | |||
| if(dbBill!=null) { | |||
| if(StringUtils.isBlank(dbBill.getPay())) dbBill.setPay("0"); | |||
| if(StringUtils.isBlank(dbBill.getReceivePay())) dbBill.setReceivePay("0"); | |||
| 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(EnumBillStatus.PAID.getCode()); | |||
| }else{ | |||
| wxBillRent.setStatus(EnumBillStatus.RETURN.getCode()); | |||
| } | |||
| //addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); | |||
| } | |||
| } | |||
| wxBillOtherDepositMapper.updateById(wxBillRent); | |||
| WxMerchantSubsidy wxMerchantSubsidy = new WxMerchantSubsidy(); | |||
| wxMerchantSubsidy.setId(bill.getBillId()); | |||
| if(freezeStatus != null) wxMerchantSubsidy.setFreeze(freezeStatus); | |||
| if(status != null){ | |||
| wxMerchantSubsidy.setStatus(EnumMerchantSubsidyStatus.MANUAL_SUBSIDIED.getCode()); | |||
| } | |||
| wxMerchantSubsidyMapper.updateById(wxMerchantSubsidy); | |||
| }else if(EnumBillType.OTHER_DEPOSIT.getCode().equals(bill.getBillType())) { | |||
| WxBillOtherDeposit wxBillRent = new WxBillOtherDeposit(); | |||
| wxBillRent.setId(bill.getBillId()); | |||
| if ( null != applyStatus) { | |||
| wxBillRent.setApplyStatus(applyStatus); | |||
| wxBillRent.setApplyUpdateTime(bill.getApplyUpdateTime()); | |||
| } | |||
| if (!StringUtils.isBlank(bill.getApplyPayImg())) { | |||
| wxBillRent.setApplyPayImg(bill.getApplyPayImg()); | |||
| } | |||
| if(freezeStatus != null) wxBillRent.setFreeze(freezeStatus); | |||
| if(status != null){ | |||
| wxBillRent.setStatus(status); | |||
| } | |||
| if(EnumBillStatus.PAID.getCode().equals(status)){ | |||
| wxBillRent.setPayDate(new Date()); | |||
| WxBillOtherDeposit dbBill = wxBillOtherDepositMapper.selectById(wxBillRent.getId()); | |||
| if(dbBill!=null) { | |||
| if(StringUtils.isBlank(dbBill.getPay())) dbBill.setPay("0"); | |||
| if(StringUtils.isBlank(dbBill.getReceivePay())) dbBill.setReceivePay("0"); | |||
| 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(EnumBillStatus.PAID.getCode()); | |||
| }else{ | |||
| wxBillRent.setStatus(EnumBillStatus.RETURN.getCode()); | |||
| } | |||
| //addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); | |||
| } | |||
| } | |||
| wxBillOtherDepositMapper.updateById(wxBillRent); | |||
| }else{ | |||
| WxBillDaily wxBillDaily = new WxBillDaily(); | |||
| wxBillDaily.setId(bill.getBillId()); | |||
| if ( null != applyStatus) { | |||
| wxBillDaily.setApplyStatus(applyStatus); | |||
| wxBillDaily.setApplyUpdateTime(bill.getApplyUpdateTime()); | |||
| } | |||
| if (!StringUtils.isBlank(bill.getApplyPayImg())) { | |||
| wxBillDaily.setApplyPayImg(bill.getApplyPayImg()); | |||
| } | |||
| if(freezeStatus != null) wxBillDaily.setFreeze(freezeStatus); | |||
| if(status != null){ | |||
| wxBillDaily.setStatus(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()); | |||
| wxBillDaily.setPay(new BigDecimal(dbBill.getPay()).toPlainString()); | |||
| wxBillDaily.setPayDate(new Date()); | |||
| //addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); | |||
| } | |||
| } | |||
| wxBillDailyMapper.updateById(wxBillDaily); | |||
| WxBillOther wxBillRent = new WxBillOther(); | |||
| wxBillRent.setId(bill.getBillId()); | |||
| if ( null != applyStatus) { | |||
| wxBillRent.setApplyStatus(applyStatus); | |||
| wxBillRent.setApplyUpdateTime(bill.getApplyUpdateTime()); | |||
| } | |||
| if (!StringUtils.isBlank(bill.getApplyPayImg())) { | |||
| wxBillRent.setApplyPayImg(bill.getApplyPayImg()); | |||
| } | |||
| if(freezeStatus != null) wxBillRent.setFreeze(freezeStatus); | |||
| if(status != null){ | |||
| wxBillRent.setStatus(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()); | |||
| wxBillRent.setPay(new BigDecimal(dbBill.getPay()).toPlainString()); | |||
| wxBillRent.setPayDate(new Date()); | |||
| //addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); | |||
| } | |||
| } | |||
| wxBillOtherMapper.updateById(wxBillRent); | |||
| WxBillPropertyDeposit propertyDeposit = new WxBillPropertyDeposit(); | |||
| propertyDeposit.setId(bill.getBillId()); | |||
| if ( null != applyStatus) { | |||
| propertyDeposit.setApplyStatus(applyStatus); | |||
| propertyDeposit.setApplyUpdateTime(bill.getApplyUpdateTime()); | |||
| } | |||
| if (!StringUtils.isBlank(bill.getApplyPayImg())) { | |||
| propertyDeposit.setApplyPayImg(bill.getApplyPayImg()); | |||
| } | |||
| if(freezeStatus != null) propertyDeposit.setFreeze(freezeStatus); | |||
| if(status != null){ | |||
| propertyDeposit.setStatus(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(EnumBillStatus.PAID.getCode()); | |||
| }else{ | |||
| propertyDeposit.setStatus(EnumBillStatus.RETURN.getCode()); | |||
| } | |||
| //addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); | |||
| } | |||
| } | |||
| wxBillPropertyDepositMapper.updateById(propertyDeposit); | |||
| } | |||
| } | |||
| // //1租金2押金3物业4日常费用6其他8补贴 | |||
| // for (WxBillSettleBill bill:billList) { | |||
| // if(EnumBillQueryType.RENT.getCode().equals(bill.getBillType())) { | |||
| // WxBillRent wxBillRent = new WxBillRent(); | |||
| // wxBillRent.setId(bill.getBillId()); | |||
| // if ( null != applyStatus) { | |||
| // wxBillRent.setApplyStatus(applyStatus); | |||
| // wxBillRent.setApplyUpdateTime(bill.getApplyUpdateTime()); | |||
| // } | |||
| // if (!StringUtils.isBlank(bill.getApplyPayImg())) { | |||
| // wxBillRent.setApplyPayImg(bill.getApplyPayImg()); | |||
| // } | |||
| // if(freezeStatus != null) wxBillRent.setFreeze(freezeStatus); | |||
| // if(status != null){ | |||
| // wxBillRent.setStatus(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()); | |||
| // wxBillRent.setPay(new BigDecimal(dbBill.getPay()).toPlainString()); | |||
| // wxBillRent.setPayDate(new Date()); | |||
| // //addBillAction(bill.getBillId(), dbBill.getOwe()); | |||
| // } | |||
| // } | |||
| // wxBillRentMapper.updateById(wxBillRent); | |||
| // }else if(EnumBillType.DEPOSIT.getCode().equals(bill.getBillType())) { | |||
| // WxBillDeposit wxBillRent = new WxBillDeposit(); | |||
| // wxBillRent.setId(bill.getBillId()); | |||
| // if ( null != applyStatus) { | |||
| // wxBillRent.setApplyStatus(applyStatus); | |||
| // wxBillRent.setApplyUpdateTime(bill.getApplyUpdateTime()); | |||
| // } | |||
| // if (!StringUtils.isBlank(bill.getApplyPayImg())) { | |||
| // wxBillRent.setApplyPayImg(bill.getApplyPayImg()); | |||
| // } | |||
| // if(freezeStatus != null) wxBillRent.setFreeze(freezeStatus); | |||
| // if(status != null){ | |||
| // wxBillRent.setStatus(status); | |||
| // } | |||
| // if(EnumBillStatus.PAID.getCode().equals(status)){ | |||
| // wxBillRent.setPayDate(new Date()); | |||
| // WxBillDeposit dbBill = wxBillDepositMapper.selectById(wxBillRent.getId()); | |||
| // if(dbBill!=null) { | |||
| // if(StringUtils.isBlank(dbBill.getPay())) dbBill.setPay("0"); | |||
| // if(StringUtils.isBlank(dbBill.getReceivePay())) dbBill.setReceivePay("0"); | |||
| // 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(EnumBillStatus.PAID.getCode()); | |||
| // }else{ | |||
| // wxBillRent.setStatus(EnumBillStatus.RETURN.getCode()); | |||
| // } | |||
| // //addBillAction(bill.getBillId(), dbBill.getOwe()); | |||
| // } | |||
| // } | |||
| // wxBillDepositMapper.updateById(wxBillRent); | |||
| // | |||
| // WxBillOtherDeposit wxBillOtherDeposit = new WxBillOtherDeposit(); | |||
| // wxBillOtherDeposit.setId(bill.getBillId()); | |||
| // if ( null != applyStatus) { | |||
| // wxBillOtherDeposit.setApplyStatus(applyStatus); | |||
| // wxBillOtherDeposit.setApplyUpdateTime(bill.getApplyUpdateTime()); | |||
| // } | |||
| // if (!StringUtils.isBlank(bill.getApplyPayImg())) { | |||
| // wxBillOtherDeposit.setApplyPayImg(bill.getApplyPayImg()); | |||
| // } | |||
| // if(freezeStatus != null) wxBillOtherDeposit.setFreeze(freezeStatus); | |||
| // if(status != null){ | |||
| // wxBillOtherDeposit.setStatus(status); | |||
| // } | |||
| // if(EnumBillStatus.PAID.getCode().equals(status)){ | |||
| // wxBillOtherDeposit.setPayDate(new Date()); | |||
| // WxBillOtherDeposit dbBill = wxBillOtherDepositMapper.selectById(wxBillRent.getId()); | |||
| // if(dbBill!=null) { | |||
| // if(StringUtils.isBlank(dbBill.getPay())) dbBill.setPay("0"); | |||
| // if(StringUtils.isBlank(dbBill.getReceivePay())) dbBill.setReceivePay("0"); | |||
| // wxBillOtherDeposit.setPay(dbBill.getPay()+ dbBill.getReceivePay()); | |||
| // wxBillOtherDeposit.setPayDate(new Date()); | |||
| // if(EnumSettleBillType.R.getCode().equals(bill.getType())){ | |||
| // wxBillOtherDeposit.setStatus(EnumBillStatus.PAID.getCode()); | |||
| // }else{ | |||
| // wxBillOtherDeposit.setStatus(EnumBillStatus.RETURN.getCode()); | |||
| // } | |||
| // //addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); | |||
| // } | |||
| // } | |||
| // wxBillOtherDepositMapper.updateById(wxBillOtherDeposit); | |||
| // | |||
| // WxBillPropertyDeposit propertyDeposit = new WxBillPropertyDeposit(); | |||
| // propertyDeposit.setId(bill.getBillId()); | |||
| // if ( null != applyStatus) { | |||
| // propertyDeposit.setApplyStatus(applyStatus); | |||
| // propertyDeposit.setApplyUpdateTime(bill.getApplyUpdateTime()); | |||
| // } | |||
| // if (!StringUtils.isBlank(bill.getApplyPayImg())) { | |||
| // propertyDeposit.setApplyPayImg(bill.getApplyPayImg()); | |||
| // } | |||
| // if(freezeStatus != null) propertyDeposit.setFreeze(freezeStatus); | |||
| // if(status != null){ | |||
| // propertyDeposit.setStatus(status); | |||
| // } | |||
| // if(EnumBillStatus.PAID.getCode().equals(status)){ | |||
| // propertyDeposit.setPayDate(new Date()); | |||
| // WxBillPropertyDeposit dbBill = wxBillPropertyDepositMapper.selectById(wxBillRent.getId()); | |||
| // if(dbBill!=null) { | |||
| // if(StringUtils.isBlank(dbBill.getPay())) dbBill.setPay("0"); | |||
| // if(StringUtils.isBlank(dbBill.getReceivePay())) dbBill.setReceivePay("0"); | |||
| // 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(EnumBillStatus.PAID.getCode()); | |||
| // }else{ | |||
| // propertyDeposit.setStatus(EnumBillStatus.RETURN.getCode()); | |||
| // } | |||
| // //addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); | |||
| // } | |||
| // } | |||
| // wxBillPropertyDepositMapper.updateById(propertyDeposit); | |||
| // | |||
| // }else if(EnumBillType.PROPERTY.getCode().equals(bill.getBillType())) { | |||
| // WxBillProperty wxBillRent = new WxBillProperty(); | |||
| // wxBillRent.setId(bill.getBillId()); | |||
| // if ( null != applyStatus) { | |||
| // wxBillRent.setApplyStatus(applyStatus); | |||
| // wxBillRent.setApplyUpdateTime(bill.getApplyUpdateTime()); | |||
| // } | |||
| // if (!StringUtils.isBlank(bill.getApplyPayImg())) { | |||
| // wxBillRent.setApplyPayImg(bill.getApplyPayImg()); | |||
| // } | |||
| // if(freezeStatus != null) wxBillRent.setFreeze(freezeStatus); | |||
| // if(status != null){ | |||
| // wxBillRent.setStatus(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()); | |||
| // wxBillRent.setPay(new BigDecimal(dbBill.getPay()).toPlainString()); | |||
| // wxBillRent.setPayDate(new Date()); | |||
| // //addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); | |||
| // } | |||
| // } | |||
| // wxBillPropertyMapper.updateById(wxBillRent); | |||
| // | |||
| // WxBillPropertyDeposit propertyDeposit = new WxBillPropertyDeposit(); | |||
| // propertyDeposit.setId(bill.getBillId()); | |||
| // if ( null != applyStatus) { | |||
| // propertyDeposit.setApplyStatus(applyStatus); | |||
| // propertyDeposit.setApplyUpdateTime(bill.getApplyUpdateTime()); | |||
| // } | |||
| // if (!StringUtils.isBlank(bill.getApplyPayImg())) { | |||
| // propertyDeposit.setApplyPayImg(bill.getApplyPayImg()); | |||
| // } | |||
| // if(freezeStatus != null) propertyDeposit.setFreeze(freezeStatus); | |||
| // if(status != null){ | |||
| // propertyDeposit.setStatus(status); | |||
| // } | |||
| // if(EnumBillStatus.PAID.getCode().equals(status)){ | |||
| // propertyDeposit.setPayDate(new Date()); | |||
| // WxBillPropertyDeposit dbBill = wxBillPropertyDepositMapper.selectById(wxBillRent.getId()); | |||
| // if(dbBill!=null) { | |||
| // if(StringUtils.isBlank(dbBill.getPay())) dbBill.setPay("0"); | |||
| // if(StringUtils.isBlank(dbBill.getReceivePay())) dbBill.setReceivePay("0"); | |||
| // 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(EnumBillStatus.PAID.getCode()); | |||
| // }else{ | |||
| // propertyDeposit.setStatus(EnumBillStatus.RETURN.getCode()); | |||
| // } | |||
| // //addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); | |||
| // } | |||
| // } | |||
| // wxBillPropertyDepositMapper.updateById(propertyDeposit); | |||
| // }else if(EnumBillType.ROUTINE.getCode().equals(bill.getBillType())) { | |||
| // WxBillOther wxBillRent = new WxBillOther(); | |||
| // wxBillRent.setId(bill.getBillId()); | |||
| // if ( null != applyStatus) { | |||
| // wxBillRent.setApplyStatus(applyStatus); | |||
| // wxBillRent.setApplyUpdateTime(bill.getApplyUpdateTime()); | |||
| // } | |||
| // if (!StringUtils.isBlank(bill.getApplyPayImg())) { | |||
| // wxBillRent.setApplyPayImg(bill.getApplyPayImg()); | |||
| // } | |||
| // if(freezeStatus != null) wxBillRent.setFreeze(freezeStatus); | |||
| // if(status != null){ | |||
| // wxBillRent.setStatus(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()); | |||
| // wxBillRent.setPay(new BigDecimal(dbBill.getPay()).toPlainString()); | |||
| // wxBillRent.setPayDate(new Date()); | |||
| // //addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); | |||
| // } | |||
| // } | |||
| // wxBillOtherMapper.updateById(wxBillRent); | |||
| // }else if(EnumBillType.OTHER_DEPOSIT.getCode().equals(bill.getBillType())) { | |||
| // WxBillOtherDeposit wxBillRent = new WxBillOtherDeposit(); | |||
| // wxBillRent.setId(bill.getBillId()); | |||
| // if ( null != applyStatus) { | |||
| // wxBillRent.setApplyStatus(applyStatus); | |||
| // wxBillRent.setApplyUpdateTime(bill.getApplyUpdateTime()); | |||
| // } | |||
| // if (!StringUtils.isBlank(bill.getApplyPayImg())) { | |||
| // wxBillRent.setApplyPayImg(bill.getApplyPayImg()); | |||
| // } | |||
| // if(freezeStatus != null) wxBillRent.setFreeze(freezeStatus); | |||
| // if(status != null){ | |||
| // wxBillRent.setStatus(status); | |||
| // } | |||
| // if(EnumBillStatus.PAID.getCode().equals(status)){ | |||
| // wxBillRent.setPayDate(new Date()); | |||
| // WxBillOtherDeposit dbBill = wxBillOtherDepositMapper.selectById(wxBillRent.getId()); | |||
| // if(dbBill!=null) { | |||
| // if(StringUtils.isBlank(dbBill.getPay())) dbBill.setPay("0"); | |||
| // if(StringUtils.isBlank(dbBill.getReceivePay())) dbBill.setReceivePay("0"); | |||
| // 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(EnumBillStatus.PAID.getCode()); | |||
| // }else{ | |||
| // wxBillRent.setStatus(EnumBillStatus.RETURN.getCode()); | |||
| // } | |||
| // //addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); | |||
| // } | |||
| // } | |||
| // wxBillOtherDepositMapper.updateById(wxBillRent); | |||
| // | |||
| // WxMerchantSubsidy wxMerchantSubsidy = new WxMerchantSubsidy(); | |||
| // wxMerchantSubsidy.setId(bill.getBillId()); | |||
| // if(freezeStatus != null) wxMerchantSubsidy.setFreeze(freezeStatus); | |||
| // if(status != null){ | |||
| // wxMerchantSubsidy.setStatus(EnumMerchantSubsidyStatus.MANUAL_SUBSIDIED.getCode()); | |||
| // } | |||
| // wxMerchantSubsidyMapper.updateById(wxMerchantSubsidy); | |||
| // }else if(EnumBillType.OTHER_DEPOSIT.getCode().equals(bill.getBillType())) { | |||
| // WxBillOtherDeposit wxBillRent = new WxBillOtherDeposit(); | |||
| // wxBillRent.setId(bill.getBillId()); | |||
| // if ( null != applyStatus) { | |||
| // wxBillRent.setApplyStatus(applyStatus); | |||
| // wxBillRent.setApplyUpdateTime(bill.getApplyUpdateTime()); | |||
| // } | |||
| // if (!StringUtils.isBlank(bill.getApplyPayImg())) { | |||
| // wxBillRent.setApplyPayImg(bill.getApplyPayImg()); | |||
| // } | |||
| // if(freezeStatus != null) wxBillRent.setFreeze(freezeStatus); | |||
| // if(status != null){ | |||
| // wxBillRent.setStatus(status); | |||
| // } | |||
| // if(EnumBillStatus.PAID.getCode().equals(status)){ | |||
| // wxBillRent.setPayDate(new Date()); | |||
| // WxBillOtherDeposit dbBill = wxBillOtherDepositMapper.selectById(wxBillRent.getId()); | |||
| // if(dbBill!=null) { | |||
| // if(StringUtils.isBlank(dbBill.getPay())) dbBill.setPay("0"); | |||
| // if(StringUtils.isBlank(dbBill.getReceivePay())) dbBill.setReceivePay("0"); | |||
| // 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(EnumBillStatus.PAID.getCode()); | |||
| // }else{ | |||
| // wxBillRent.setStatus(EnumBillStatus.RETURN.getCode()); | |||
| // } | |||
| // //addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); | |||
| // } | |||
| // } | |||
| // wxBillOtherDepositMapper.updateById(wxBillRent); | |||
| // }else{ | |||
| // WxBillDaily wxBillDaily = new WxBillDaily(); | |||
| // wxBillDaily.setId(bill.getBillId()); | |||
| // if ( null != applyStatus) { | |||
| // wxBillDaily.setApplyStatus(applyStatus); | |||
| // wxBillDaily.setApplyUpdateTime(bill.getApplyUpdateTime()); | |||
| // } | |||
| // if (!StringUtils.isBlank(bill.getApplyPayImg())) { | |||
| // wxBillDaily.setApplyPayImg(bill.getApplyPayImg()); | |||
| // } | |||
| // if(freezeStatus != null) wxBillDaily.setFreeze(freezeStatus); | |||
| // if(status != null){ | |||
| // wxBillDaily.setStatus(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()); | |||
| // wxBillDaily.setPay(new BigDecimal(dbBill.getPay()).toPlainString()); | |||
| // wxBillDaily.setPayDate(new Date()); | |||
| // //addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); | |||
| // } | |||
| // } | |||
| // wxBillDailyMapper.updateById(wxBillDaily); | |||
| // | |||
| // WxBillOther wxBillRent = new WxBillOther(); | |||
| // wxBillRent.setId(bill.getBillId()); | |||
| // if ( null != applyStatus) { | |||
| // wxBillRent.setApplyStatus(applyStatus); | |||
| // wxBillRent.setApplyUpdateTime(bill.getApplyUpdateTime()); | |||
| // } | |||
| // if (!StringUtils.isBlank(bill.getApplyPayImg())) { | |||
| // wxBillRent.setApplyPayImg(bill.getApplyPayImg()); | |||
| // } | |||
| // if(freezeStatus != null) wxBillRent.setFreeze(freezeStatus); | |||
| // if(status != null){ | |||
| // wxBillRent.setStatus(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()); | |||
| // wxBillRent.setPay(new BigDecimal(dbBill.getPay()).toPlainString()); | |||
| // wxBillRent.setPayDate(new Date()); | |||
| // //addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); | |||
| // } | |||
| // } | |||
| // wxBillOtherMapper.updateById(wxBillRent); | |||
| // | |||
| // WxBillPropertyDeposit propertyDeposit = new WxBillPropertyDeposit(); | |||
| // propertyDeposit.setId(bill.getBillId()); | |||
| // if ( null != applyStatus) { | |||
| // propertyDeposit.setApplyStatus(applyStatus); | |||
| // propertyDeposit.setApplyUpdateTime(bill.getApplyUpdateTime()); | |||
| // } | |||
| // if (!StringUtils.isBlank(bill.getApplyPayImg())) { | |||
| // propertyDeposit.setApplyPayImg(bill.getApplyPayImg()); | |||
| // } | |||
| // if(freezeStatus != null) propertyDeposit.setFreeze(freezeStatus); | |||
| // if(status != null){ | |||
| // propertyDeposit.setStatus(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(EnumBillStatus.PAID.getCode()); | |||
| // }else{ | |||
| // propertyDeposit.setStatus(EnumBillStatus.RETURN.getCode()); | |||
| // } | |||
| // //addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); | |||
| // } | |||
| // } | |||
| // wxBillPropertyDepositMapper.updateById(propertyDeposit); | |||
| // } | |||
| // } | |||
| } | |||
| public Integer getType(Long billId, WxBillSettle record){ | |||
| @@ -64,8 +64,8 @@ public class WxPayAccountBillServiceImpl implements WxPayAccountBillService { | |||
| } | |||
| //更新手续费 | |||
| wxBillRentMapper.updateServiceCharge(record); | |||
| wxBillPropertyMapper.updateServiceCharge(record); | |||
| //wxBillRentMapper.updateServiceCharge(record); | |||
| //wxBillPropertyMapper.updateServiceCharge(record); | |||
| } | |||
| @@ -188,12 +188,14 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService | |||
| //物业费用欠缴 | |||
| WxPropertyContract propertyContract = new WxPropertyContract(); | |||
| propertyContract.setId(id); | |||
| propertyContract.updateTenantInfo(wxPropertyContract); | |||
| result.put("propertyOweCount",wxPropertyContractMapper.queryOweCount(propertyContract)); | |||
| //押金欠缴 | |||
| result.put("depositOweCount",wxBillPropertyDepositMapper.queryOweCount(propertyContract)); | |||
| //押金状态 | |||
| WxBillPropertyDeposit wxBillPropertyDeposit = new WxBillPropertyDeposit(); | |||
| wxBillPropertyDeposit.setPropertyContractId(id); | |||
| wxBillPropertyDeposit.updateTenantInfo(wxPropertyContract); | |||
| List<WxBillPropertyDeposit> select = wxBillPropertyDepositMapper.findList(wxBillPropertyDeposit); | |||
| if (!select.isEmpty()) { | |||
| result.put("depositStatus", select.get(0).getStatus()); | |||
| @@ -218,23 +220,25 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService | |||
| WxFlowRecord wxFlowRecord = new WxFlowRecord(); | |||
| wxFlowRecord.setBusinessId(String.valueOf(id)); | |||
| wxFlowRecord.setStatus(EnumFlowRecordStatus.NEW.getCode()); | |||
| wxFlowRecord.updateTenantInfo(wxPropertyContract); | |||
| List<WxFlowRecord> flowRecordList = wxFlowRecordService.findList(wxFlowRecord); | |||
| if(!CollectionUtils.isEmpty(flowRecordList)){ | |||
| result.put("remark",flowRecordList.get(0).getRemark()); | |||
| } | |||
| //查询预账单用于展示 | |||
| List<WxBillProperty> resultList = getWxBillPropertyPreview(id); | |||
| List<WxBillProperty> resultList = getWxBillPropertyPreview(wxPropertyContract,id); | |||
| result.put("previewBillRentList", resultList); | |||
| return result; | |||
| } | |||
| @Override | |||
| public List<WxBillProperty> getWxBillPropertyPreview(Long id) { | |||
| public List<WxBillProperty> getWxBillPropertyPreview(TenantEntity tenantEntity,Long id) { | |||
| WxBillProperty wxBillRent = new WxBillProperty(); | |||
| wxBillRent.setPropertyContractId(id); | |||
| wxBillRent.setSortColumns(BaseEntity.SortField.Period_ASC); | |||
| wxBillRent.updateTenantInfo(tenantEntity); | |||
| return wxBillPropertyMapper.findList(wxBillRent); | |||
| } | |||
| @@ -379,7 +383,6 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService | |||
| logger.error("保存物业合同信息失败,e:" + e.getMessage()); | |||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| } | |||
| //生成预览账单 | |||
| wxBillPropertyMapper.deletePreviewBill(record); | |||
| //重新生成 | |||
| @@ -393,6 +396,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService | |||
| wxBillRent.setPropertyContractId(record.getId()); | |||
| wxBillRent.setSortColumns(BaseEntity.SortField.Period_ASC); | |||
| wxBillRent.setIsPreview(EnumIsPreview.YES.getCode()); | |||
| wxBillRent.updateTenantInfo(wxRentContract); | |||
| List<WxBillProperty> billList = wxBillPropertyMapper.findList(wxBillRent); | |||
| record.setPreviewBillRentList(billList); | |||
| @@ -478,6 +482,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService | |||
| billProperty.setPropertyContractId(record.getId()); | |||
| billProperty.setIsPreview(EnumIsPreview.NO.getCode()); | |||
| billProperty.setMerchantId(record.getMerchantId()); | |||
| billProperty.updateTenantInfo(record); | |||
| wxBillPropertyMapper.updatePreviewStatus(billProperty); | |||
| if(new BigDecimal(record.getDeposit()).compareTo(new BigDecimal(0)) > 0) { | |||
| buildDeposit(record); | |||
| @@ -253,10 +253,12 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||
| result.put("propertyOweCount",wxPropertyContractMapper.queryOweCount(propertyContract)); | |||
| result.put("protertyContract", wxPropertyContractMapper.findOneByRentId(wxRentContract)); | |||
| //押金欠缴 | |||
| ; | |||
| result.put("depositOweCount",wxBillDepositMapper.queryOweCount(wxRentContract)); | |||
| //押金状态 | |||
| WxBillDeposit wxBillDeposit = new WxBillDeposit(); | |||
| wxBillDeposit.setRentContractId(id); | |||
| wxBillDeposit.updateTenantInfo(wxRentContract); | |||
| List<WxBillDeposit> select = wxBillDepositMapper.findList(wxBillDeposit); | |||
| if (!select.isEmpty()) { | |||
| result.put("depositStatus", select.get(0).getStatus()); | |||
| @@ -274,6 +276,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||
| WxBillRent wxBillRent = new WxBillRent(); | |||
| wxBillRent.setRentContractId(id); | |||
| wxBillRent.setSortColumns(BaseEntity.SortField.Period_ASC); | |||
| wxBillRent.updateTenantInfo(wxRentContract); | |||
| List<WxBillRent> resultList = wxBillRentMapper.findList(wxBillRent); | |||
| result.put("previewBillRentList",resultList); | |||
| @@ -569,6 +572,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||
| wxBillRent.setRentContractId(record.getId()); | |||
| wxBillRent.setSortColumns(BaseEntity.SortField.Period_ASC); | |||
| wxBillRent.setIsPreview(EnumIsPreview.YES.getCode()); | |||
| wxBillRent.updateTenantInfo(record); | |||
| List<WxBillRent> resultList = wxBillRentMapper.findList(wxBillRent); | |||
| //更新 | |||
| @@ -587,6 +591,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||
| WxBillRentManage wxBillRentManage = new WxBillRentManage(); | |||
| wxBillRentManage.setRentContractId(record.getId()); | |||
| wxBillRentManage.setManageFeeType(EnumRentContractManageFeeType.RENT_BUSSINESS_MANAGE_FEE.getCode()); | |||
| wxBillRentManage.updateTenantInfo(record); | |||
| wxBillRentManageMapper.deletePreviewBill(wxBillRentManage); | |||
| //删除营业管理费账单 | |||
| wxBillRentManage.setManageFeeType(EnumRentContractManageFeeType.RENT_OPERATING_MANAGE_FEE.getCode()); | |||
| @@ -626,6 +631,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||
| wxBillRent.setRentContractId(record.getId()); | |||
| wxBillRent.setSortColumns(BaseEntity.SortField.Period_ASC); | |||
| wxBillRent.setIsPreview(EnumIsPreview.YES.getCode()); | |||
| wxBillRent.updateTenantInfo(record); | |||
| List<WxBillRent> resultList = wxBillRentMapper.findList(wxBillRent); | |||
| //更新 | |||
| @@ -699,6 +705,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||
| WxBillRentManage wxBillRentManage = new WxBillRentManage(); | |||
| wxBillRentManage.setRentContractId(record.getId()); | |||
| wxBillRentManage.setManageFeeType(feeType.getCode()); | |||
| wxBillRentManage.updateTenantInfo(record); | |||
| wxBillRentManageMapper.deletePreviewBill(wxBillRentManage); | |||
| WxPayAccountBill wxPayAccountBill = wxPayAccountBillService.getByTenantInfo(record); | |||
| final IdWorker idWorker = IdWorker.get(); | |||
| @@ -1798,6 +1805,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||
| //租赁账单失效 | |||
| WxBillRent wxBillRent = new WxBillRent(); | |||
| wxBillRent.setRentContractId(wxRentContract.getId()); | |||
| wxBillRent.updateTenantInfo(wxRentContract); | |||
| wxBillRentMapper.updateInvalidStatus(wxBillRent); | |||
| return new ResultData(Result.SUCCESS,"终止成功"); | |||
| //解绑商户和商铺关系 | |||
| @@ -1969,6 +1977,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||
| billRent.setRentContractId(id); | |||
| billRent.setIsPreview(EnumIsPreview.NO.getCode()); | |||
| billRent.setMerchantId(record.getMerchantId()); | |||
| billRent.updateTenantInfo(record); | |||
| wxBillRentMapper.updatePreviewStatus(billRent); | |||
| // WxMerchant wxMerchant = new WxMerchant(); | |||
| // wxMerchant.setId(record.getMerchantId()); | |||
| @@ -80,7 +80,7 @@ public class WxRentPropertyContractServiceImpl implements WxRentPropertyContract | |||
| if (null != propertyId) { | |||
| WxPropertyContract propertyContract = wxPropertyContractMapper.selectById(propertyId); | |||
| if (propertyContract != null) { | |||
| List<WxBillProperty> wxBillPropertyPreview = wxPropertyContractService.getWxBillPropertyPreview(propertyContract.getId()); | |||
| List<WxBillProperty> wxBillPropertyPreview = wxPropertyContractService.getWxBillPropertyPreview(propertyContract,propertyContract.getId()); | |||
| propertyContract.setPreviewBillRentList(wxBillPropertyPreview); | |||
| data.put("property", propertyContract); | |||
| } | |||
| @@ -82,9 +82,9 @@ | |||
| <include refid="dynamicWhereConditions" /> | |||
| </select> | |||
| <select id="selectById" parameterType="Long" resultMap="BaseResultMap"> | |||
| <select id="selectById" parameterType="HashMap" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_bill_daily | |||
| where id = #{id} | |||
| where id = #{id} and tenant_id = #{tenantId} | |||
| </select> | |||
| <sql id = "queryBillDailyListConditions" > | |||
| @@ -183,7 +183,9 @@ | |||
| and DATEDIFF(now(),receive_date) <=0 | |||
| </update> | |||
| <delete id = "deleteById" parameterType="HashMap"> | |||
| delete from wx_bill_daily where id = #{id} and tenant_id = #{tenantId} | |||
| </delete> | |||
| @@ -108,9 +108,9 @@ | |||
| <include refid="dynamicWhereConditions" /> | |||
| </select> | |||
| <select id="selectById" parameterType="Long" resultMap="BaseResultMap"> | |||
| <select id="selectById" parameterType="HashMap" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_bill_rent_deposit | |||
| where id = #{id} | |||
| where id = #{id} and tenant_id = #{tenantId} | |||
| </select> | |||
| <select id="findRentContractIds" parameterType="com.iformall.domain.po.WxBillDeposit" resultType="Long"> | |||
| @@ -306,6 +306,10 @@ | |||
| select count(*) c from wx_rent_contract r,wx_bill_rent_deposit b | |||
| where b.rent_contract_id = r.id and b.status = 1 and r.id = #{id} | |||
| </select> | |||
| <delete id = "deleteById" parameterType="HashMap"> | |||
| delete from wx_bill_rent_deposit where id = #{id} and tenant_id = #{tenantId} | |||
| </delete> | |||
| </mapper> | |||
| @@ -87,11 +87,11 @@ | |||
| <include refid="dynamicWhereConditions"/> | |||
| </select> | |||
| <select id="selectById" parameterType="Long" resultMap="BaseResultMap"> | |||
| <select id="selectById" parameterType="HashMap" resultMap="BaseResultMap"> | |||
| select | |||
| <include refid="allColumns"/> | |||
| from wx_bill_other_deposit | |||
| where id = #{id} | |||
| where id = #{id} and tenant_id = #{tenantId} | |||
| </select> | |||
| <sql id ="queryBillListConditions"> | |||
| @@ -189,6 +189,10 @@ | |||
| and status!=5 | |||
| and status!=#{paid} and DATEDIFF(now(),receive_date) <=0 | |||
| </update> | |||
| <delete id = "deleteById" parameterType="HashMap"> | |||
| delete from wx_bill_other_deposit where id = #{id} and tenant_id = #{tenantId} | |||
| </delete> | |||
| </mapper> | |||
| @@ -84,9 +84,9 @@ | |||
| <include refid="dynamicWhereConditions" /> | |||
| </select> | |||
| <select id="selectById" parameterType="Long" resultMap="BaseResultMap"> | |||
| <select id="selectById" parameterType="HashMap" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_bill_other | |||
| where id = #{id} | |||
| where id = #{id} and tenant_id = #{tenantId} | |||
| </select> | |||
| <sql id = "queryBillListConditions"> | |||
| @@ -233,6 +233,10 @@ | |||
| and receive_date between #{startdate} and #{enddate} | |||
| ) res | |||
| </select> | |||
| <delete id = "deleteById" parameterType="HashMap"> | |||
| delete from wx_bill_other where id = #{id} and tenant_id = #{tenantId} | |||
| </delete> | |||
| </mapper> | |||
| @@ -88,9 +88,9 @@ | |||
| <include refid="dynamicWhereConditions" /> | |||
| </select> | |||
| <select id="selectById" parameterType="Long" resultMap="BaseResultMap"> | |||
| <select id="selectById" parameterType="HashMap" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_bill_property_deposit | |||
| where id = #{id} | |||
| where id = #{id} and tenant_id = #{tenantId} | |||
| </select> | |||
| <select id="findPropertyContractIds" parameterType="com.iformall.domain.po.WxBillPropertyDeposit" resultMap="BaseResultMap"> | |||
| @@ -214,4 +214,8 @@ | |||
| <if test=" null != rentContractId ">and r.rent_contract_id = #{rentContractId}</if> | |||
| </select> | |||
| <delete id = "deleteById" parameterType="HashMap"> | |||
| delete from wx_bill_property_deposit where id = #{id} and tenant_id = #{tenantId} | |||
| </delete> | |||
| </mapper> | |||
| @@ -116,11 +116,11 @@ | |||
| <include refid="dynamicWhereConditions"/> | |||
| </select> | |||
| <select id="selectById" parameterType="Long" resultMap="BaseResultMap"> | |||
| <select id="selectById" parameterType="HashMap" resultMap="BaseResultMap"> | |||
| select | |||
| <include refid="allColumns"/> | |||
| from wx_bill_property | |||
| where id = #{id} | |||
| where id = #{id} and tenant_id = #{tenantId} | |||
| </select> | |||
| <sql id="queryBillPropertyListConditions"> | |||
| @@ -354,7 +354,12 @@ | |||
| AND rent_shop_type = #{rentShopType} AND is_preview = #{isPreview} | |||
| AND date_format(starttime,'%Y-%m-%d 00:00:00.0') = #{starttime} AND date_format(endtime,'%Y-%m-%d 00:00:00.0') = #{endtime} | |||
| </select> | |||
| <delete id = "deleteById" parameterType="HashMap"> | |||
| delete from wx_bill_property where id = #{id} and tenant_id = #{tenantId} | |||
| </delete> | |||
| <!-- | |||
| <update id="insertBillAction"> | |||
| insert into wx_bill_action(id,user_name,`action`,bill_id,details,tenant_id,parent_tenant_id) | |||
| select | |||
| @@ -406,7 +411,7 @@ | |||
| and `parent_tenant_id` = #{parentTenantId} | |||
| </if> | |||
| </update> | |||
| --> | |||
| <!-- <update id="updateOwe"> | |||
| update wx_bill_property | |||
| set owe = receive_pay + service_charge_pay + ifnull(late_pay_price,0) - pay | |||
| @@ -100,11 +100,11 @@ | |||
| <include refid="dynamicWhereConditions"/> | |||
| </select> | |||
| <select id="selectById" parameterType="Long" resultMap="BaseResultMap"> | |||
| <select id="selectById" parameterType="HashMap" resultMap="BaseResultMap"> | |||
| select | |||
| <include refid="allColumns"/> | |||
| from wx_bill_rent_manage | |||
| where id = #{id} | |||
| where id = #{id} and `tenant_id` = #{tenantId} | |||
| </select> | |||
| @@ -263,6 +263,10 @@ | |||
| ) | |||
| </foreach> | |||
| </insert> | |||
| <delete id = "deleteById" parameterType="HashMap"> | |||
| delete from wx_bill_rent_manage where id = #{id} and tenant_id = #{tenantId} | |||
| </delete> | |||
| </mapper> | |||
| @@ -118,10 +118,10 @@ | |||
| <include refid="dynamicWhereConditions"/> | |||
| </select> | |||
| <select id="selectById" parameterType="Long" resultMap="BaseResultMap"> | |||
| <select id="selectById" parameterType="HashMap" resultMap="BaseResultMap"> | |||
| select | |||
| <include refid="allColumns"/> | |||
| from wx_bill_rent where id = #{id} | |||
| from wx_bill_rent where id = #{id} and `tenant_id` = #{tenantId} | |||
| </select> | |||
| <sql id="queryBillRentListCondition"> | |||
| @@ -354,7 +354,12 @@ | |||
| AND rent_shop_type = #{rentShopType} AND is_preview = #{isPreview} | |||
| AND date_format(starttime,'%Y-%m-%d 00:00:00.0') = #{starttime} AND date_format(endtime,'%Y-%m-%d 00:00:00.0') = #{endtime} | |||
| </select> | |||
| <delete id = "deleteById" parameterType="HashMap"> | |||
| delete from wx_bill_rent where id = #{id} and tenant_id = #{tenantId} | |||
| </delete> | |||
| <!-- | |||
| <update id="insertBillAction"> | |||
| insert into wx_bill_action(id,user_name,`action`,bill_id,details,tenant_id,parent_tenant_id) | |||
| select | |||
| @@ -393,7 +398,7 @@ | |||
| where b.status!=3 and b.status!=6 | |||
| and (select late_pay_ratio from wx_rent_contract where id = b.`rent_contract_id`) > 0 | |||
| and DATEDIFF(now(), date_add(b.receive_date,interval(select late_pay_day from wx_rent_contract where id = b.`rent_contract_id`) day)) >0; | |||
| </update> | |||
| </update> | |||
| <update id="updateServiceCharge" parameterType="com.iformall.domain.po.WxPayAccountBill"> | |||
| update wx_bill_rent set service_charge_pay=round(receive_pay*#{serviceChargeRate}/10000) | |||
| @@ -405,7 +410,7 @@ | |||
| and `parent_tenant_id` = #{parentTenantId} | |||
| </if> | |||
| and status in(1,2,4) | |||
| </update> | |||
| </update>--> | |||
| <!-- <update id="updateOwe"> | |||
| update wx_bill_rent set owe = receive_pay + service_charge_pay + ifnull(late_pay_price,0) - pay where status in (1,2,4) | |||