| @@ -54,7 +54,7 @@ public class WxBillDepositServiceImpl implements WxBillDepositService { | |||||
| try { | try { | ||||
| wxBillDepositMapper.updateWaitPayStatus(params); | wxBillDepositMapper.updateWaitPayStatus(params); | ||||
| } catch (Exception e) { | } catch (Exception e) { | ||||
| logger.error("更新租赁待缴账单状态失败,e:" + e.getMessage()); | |||||
| logger.error("更新租赁押金待缴账单状态失败,e:" + e.getMessage()); | |||||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | ||||
| } | } | ||||
| } | } | ||||
| @@ -69,7 +69,7 @@ public class WxBillDepositServiceImpl implements WxBillDepositService { | |||||
| try { | try { | ||||
| wxBillDepositMapper.updateNotPaidStatus(params); | wxBillDepositMapper.updateNotPaidStatus(params); | ||||
| } catch (Exception e) { | } catch (Exception e) { | ||||
| logger.error("更新租赁欠缴账单状态失败,e:" + e.getMessage()); | |||||
| logger.error("更新租赁押金欠缴账单状态失败,e:" + e.getMessage()); | |||||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | ||||
| } | } | ||||
| } | } | ||||
| @@ -85,7 +85,7 @@ public class WxBillDepositServiceImpl implements WxBillDepositService { | |||||
| public ResultData saveOrUpdate(WxBillDeposit record) { | public ResultData saveOrUpdate(WxBillDeposit record) { | ||||
| if (record.getId() == null) { | if (record.getId() == null) { | ||||
| logger.info("新增押金账单"); | |||||
| logger.info("新增租赁押金账单"); | |||||
| final IdWorker idWorker = IdWorker.get(); | final IdWorker idWorker = IdWorker.get(); | ||||
| record.setId(idWorker.nextId()); | record.setId(idWorker.nextId()); | ||||
| Date date = new Date(); | Date date = new Date(); | ||||
| @@ -94,12 +94,12 @@ public class WxBillDepositServiceImpl implements WxBillDepositService { | |||||
| try { | try { | ||||
| wxBillDepositMapper.insertSelective(record); | wxBillDepositMapper.insertSelective(record); | ||||
| } catch (Exception e) { | } catch (Exception e) { | ||||
| logger.error("保存押金账单失败,e:" + e.getMessage()); | |||||
| logger.error("保存租赁押金账单失败,e:" + e.getMessage()); | |||||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | ||||
| } | } | ||||
| return new ResultData(Result.SUCCESS, "保存押金账单成功"); | |||||
| return new ResultData(Result.SUCCESS, "保存租赁押金账单成功"); | |||||
| } else { | } else { | ||||
| logger.info("更新押金账单"); | |||||
| logger.info("更新租赁押金账单"); | |||||
| WxBillDeposit wxBillDeposit = wxBillDepositMapper.selectByPrimaryKey(record.getId()); | WxBillDeposit wxBillDeposit = wxBillDepositMapper.selectByPrimaryKey(record.getId()); | ||||
| wxBillDeposit.setPayDate(record.getPayDate()); | wxBillDeposit.setPayDate(record.getPayDate()); | ||||
| wxBillDeposit.setPay(record.getPay()*100); | wxBillDeposit.setPay(record.getPay()*100); | ||||
| @@ -110,10 +110,10 @@ public class WxBillDepositServiceImpl implements WxBillDepositService { | |||||
| try { | try { | ||||
| wxBillDepositMapper.updateByPrimaryKeySelective(wxBillDeposit); | wxBillDepositMapper.updateByPrimaryKeySelective(wxBillDeposit); | ||||
| } catch (Exception e) { | } catch (Exception e) { | ||||
| logger.error("更新押金账单失败,e:" + e.getMessage()); | |||||
| logger.error("更新租赁押金账单失败,e:" + e.getMessage()); | |||||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | ||||
| } | } | ||||
| return new ResultData(Result.SUCCESS, "更新押金账单成功"); | |||||
| return new ResultData(Result.SUCCESS, "更新租赁押金账单成功"); | |||||
| } | } | ||||
| } | } | ||||
| @@ -127,13 +127,16 @@ public class WxBillDepositServiceImpl implements WxBillDepositService { | |||||
| public ResultData updatePaid(Long id) { | public ResultData updatePaid(Long id) { | ||||
| WxBillDeposit wxBillDeposit = wxBillDepositMapper.selectByPrimaryKey(id); | WxBillDeposit wxBillDeposit = wxBillDepositMapper.selectByPrimaryKey(id); | ||||
| wxBillDeposit.setStatus(EnumBillRentStatus.PAID.getCode()); | wxBillDeposit.setStatus(EnumBillRentStatus.PAID.getCode()); | ||||
| Date d =new Date(); | |||||
| wxBillDeposit.setPayDate(d); | |||||
| wxBillDeposit.setUpdatetime(d); | |||||
| try { | try { | ||||
| wxBillDepositMapper.updateByPrimaryKeySelective(wxBillDeposit); | wxBillDepositMapper.updateByPrimaryKeySelective(wxBillDeposit); | ||||
| } catch (Exception e) { | } catch (Exception e) { | ||||
| logger.error("押金结单失败,e:" + e.getMessage()); | |||||
| logger.error("租赁押金结单失败,e:" + e.getMessage()); | |||||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | ||||
| } | } | ||||
| return new ResultData(Result.SUCCESS, "押金结单成功"); | |||||
| return new ResultData(Result.SUCCESS, "租赁押金结单成功"); | |||||
| } | } | ||||
| @@ -126,6 +126,9 @@ public class WxBillPropertyDepositServiceImpl implements WxBillPropertyDepositSe | |||||
| public ResultData updatePaid(Long id) { | public ResultData updatePaid(Long id) { | ||||
| WxBillPropertyDeposit wxBillDeposit = wxBillPropertyDepositMapper.selectByPrimaryKey(id); | WxBillPropertyDeposit wxBillDeposit = wxBillPropertyDepositMapper.selectByPrimaryKey(id); | ||||
| wxBillDeposit.setStatus(EnumBillRentStatus.PAID.getCode()); | wxBillDeposit.setStatus(EnumBillRentStatus.PAID.getCode()); | ||||
| Date d =new Date(); | |||||
| wxBillDeposit.setPayDate(d); | |||||
| wxBillDeposit.setUpdatetime(d); | |||||
| try { | try { | ||||
| wxBillPropertyDepositMapper.updateByPrimaryKeySelective(wxBillDeposit); | wxBillPropertyDepositMapper.updateByPrimaryKeySelective(wxBillDeposit); | ||||
| } catch (Exception e) { | } catch (Exception e) { | ||||
| @@ -96,15 +96,15 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService { | |||||
| return new ResultData(Result.SUCCESS, "保存物业账单成功"); | return new ResultData(Result.SUCCESS, "保存物业账单成功"); | ||||
| } else { | } else { | ||||
| logger.info("更新物业账单"); | logger.info("更新物业账单"); | ||||
| WxBillProperty wxBillRent = wxBillPropertyMapper.selectByPrimaryKey(record.getId()); | |||||
| wxBillRent.setPayDate(record.getPayDate()); | |||||
| wxBillRent.setPay(record.getPay()*100); | |||||
| wxBillRent.setReceivePay(record.getReceivePay()*100); | |||||
| wxBillRent.setOwe(record.getOwe()*100); | |||||
| wxBillRent.setStatus(record.getPay().equals(record.getReceivePay())?EnumBillRentStatus.PAID.getCode():wxBillRent.getStatus()); | |||||
| wxBillRent.setUpdatetime(new Date()); | |||||
| WxBillProperty property = wxBillPropertyMapper.selectByPrimaryKey(record.getId()); | |||||
| property.setPayDate(record.getPayDate()); | |||||
| property.setPay(record.getPay()*100); | |||||
| property.setReceivePay(record.getReceivePay()*100); | |||||
| property.setOwe(record.getOwe()*100); | |||||
| property.setStatus(record.getPay().equals(record.getReceivePay())?EnumBillRentStatus.PAID.getCode():property.getStatus()); | |||||
| property.setUpdatetime(new Date()); | |||||
| try { | try { | ||||
| wxBillPropertyMapper.updateByPrimaryKeySelective(wxBillRent); | |||||
| wxBillPropertyMapper.updateByPrimaryKeySelective(record); | |||||
| } catch (Exception e) { | } catch (Exception e) { | ||||
| logger.error("更新物业账单失败,e:" + e.getMessage()); | logger.error("更新物业账单失败,e:" + e.getMessage()); | ||||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | ||||
| @@ -128,10 +128,13 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService { | |||||
| @Transactional(rollbackFor = {Exception.class}) | @Transactional(rollbackFor = {Exception.class}) | ||||
| @Override | @Override | ||||
| public ResultData updatePaid(Long id) { | public ResultData updatePaid(Long id) { | ||||
| WxBillProperty wxBillRent = wxBillPropertyMapper.selectByPrimaryKey(id); | |||||
| wxBillRent.setStatus(EnumBillRentStatus.PAID.getCode()); | |||||
| WxBillProperty record = wxBillPropertyMapper.selectByPrimaryKey(id); | |||||
| record.setStatus(EnumBillRentStatus.PAID.getCode()); | |||||
| Date d =new Date(); | |||||
| record.setPayDate(d); | |||||
| record.setUpdatetime(d); | |||||
| try { | try { | ||||
| wxBillPropertyMapper.updateByPrimaryKeySelective(wxBillRent); | |||||
| wxBillPropertyMapper.updateByPrimaryKeySelective(record); | |||||
| } catch (Exception e) { | } catch (Exception e) { | ||||
| logger.error("结单失败,e:" + e.getMessage()); | logger.error("结单失败,e:" + e.getMessage()); | ||||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | ||||
| @@ -43,7 +43,6 @@ public class WxBillRentServiceImpl implements WxBillRentService { | |||||
| List<Map<String, Object>> billRentList = wxBillRentMapper.queryBillRentList(record); | List<Map<String, Object>> billRentList = wxBillRentMapper.queryBillRentList(record); | ||||
| PageInfo<Map<String, Object>> pageInfo = new PageInfo<>(billRentList); | PageInfo<Map<String, Object>> pageInfo = new PageInfo<>(billRentList); | ||||
| return pageInfo; | return pageInfo; | ||||
| //return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxBillRentMapper.findList(record)); | |||||
| } | } | ||||
| @Transactional(rollbackFor = {Exception.class}) | @Transactional(rollbackFor = {Exception.class}) | ||||
| @@ -56,7 +55,7 @@ public class WxBillRentServiceImpl implements WxBillRentService { | |||||
| try { | try { | ||||
| wxBillRentMapper.updateWaitPayStatus(params); | wxBillRentMapper.updateWaitPayStatus(params); | ||||
| } catch (Exception e) { | } catch (Exception e) { | ||||
| logger.error("更新租赁待缴账单状态失败,e:" + e.getMessage()); | |||||
| logger.error("更新物业待缴账单状态失败,e:" + e.getMessage()); | |||||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | ||||
| } | } | ||||
| } | } | ||||
| @@ -71,7 +70,7 @@ public class WxBillRentServiceImpl implements WxBillRentService { | |||||
| try { | try { | ||||
| wxBillRentMapper.updateNotPaidStatus(params); | wxBillRentMapper.updateNotPaidStatus(params); | ||||
| } catch (Exception e) { | } catch (Exception e) { | ||||
| logger.error("更新租赁欠缴账单状态失败,e:" + e.getMessage()); | |||||
| logger.error("更新物业欠缴账单状态失败,e:" + e.getMessage()); | |||||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | ||||
| } | } | ||||
| } | } | ||||
| @@ -86,7 +85,7 @@ public class WxBillRentServiceImpl implements WxBillRentService { | |||||
| @Override | @Override | ||||
| public ResultData saveOrUpdate(WxBillRent record) { | public ResultData saveOrUpdate(WxBillRent record) { | ||||
| if (record.getId() == null) { | if (record.getId() == null) { | ||||
| logger.info("新增租赁账单"); | |||||
| logger.info("新增物业账单"); | |||||
| final IdWorker idWorker = IdWorker.get(); | final IdWorker idWorker = IdWorker.get(); | ||||
| record.setId(idWorker.nextId()); | record.setId(idWorker.nextId()); | ||||
| Date date = new Date(); | Date date = new Date(); | ||||
| @@ -95,12 +94,12 @@ public class WxBillRentServiceImpl implements WxBillRentService { | |||||
| try { | try { | ||||
| wxBillRentMapper.insertSelective(record); | wxBillRentMapper.insertSelective(record); | ||||
| } catch (Exception e) { | } catch (Exception e) { | ||||
| logger.error("保存租赁账单失败,e:" + e.getMessage()); | |||||
| logger.error("保存物业账单失败,e:" + e.getMessage()); | |||||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | ||||
| } | } | ||||
| return new ResultData(Result.SUCCESS, "保存租赁账单成功"); | |||||
| return new ResultData(Result.SUCCESS, "保存物业账单成功"); | |||||
| } else { | } else { | ||||
| logger.info("更新租赁账单"); | |||||
| logger.info("更新物业账单"); | |||||
| WxBillRent wxBillRent = wxBillRentMapper.selectByPrimaryKey(record.getId()); | WxBillRent wxBillRent = wxBillRentMapper.selectByPrimaryKey(record.getId()); | ||||
| wxBillRent.setPayDate(record.getPayDate()); | wxBillRent.setPayDate(record.getPayDate()); | ||||
| wxBillRent.setPay(record.getPay()*100); | wxBillRent.setPay(record.getPay()*100); | ||||
| @@ -111,10 +110,10 @@ public class WxBillRentServiceImpl implements WxBillRentService { | |||||
| try { | try { | ||||
| wxBillRentMapper.updateByPrimaryKeySelective(wxBillRent); | wxBillRentMapper.updateByPrimaryKeySelective(wxBillRent); | ||||
| } catch (Exception e) { | } catch (Exception e) { | ||||
| logger.error("更新租赁账单失败,e:" + e.getMessage()); | |||||
| logger.error("更新物业账单失败,e:" + e.getMessage()); | |||||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | ||||
| } | } | ||||
| return new ResultData(Result.SUCCESS, "更新租赁账单成功"); | |||||
| return new ResultData(Result.SUCCESS, "更新物业账单成功"); | |||||
| } | } | ||||
| } | } | ||||
| @@ -135,13 +134,16 @@ public class WxBillRentServiceImpl implements WxBillRentService { | |||||
| public ResultData updatePaid(Long id) { | public ResultData updatePaid(Long id) { | ||||
| WxBillRent wxBillRent = wxBillRentMapper.selectByPrimaryKey(id); | WxBillRent wxBillRent = wxBillRentMapper.selectByPrimaryKey(id); | ||||
| wxBillRent.setStatus(EnumBillRentStatus.PAID.getCode()); | wxBillRent.setStatus(EnumBillRentStatus.PAID.getCode()); | ||||
| Date d =new Date(); | |||||
| wxBillRent.setPayDate(d); | |||||
| wxBillRent.setUpdatetime(d); | |||||
| try { | try { | ||||
| wxBillRentMapper.updateByPrimaryKeySelective(wxBillRent); | wxBillRentMapper.updateByPrimaryKeySelective(wxBillRent); | ||||
| } catch (Exception e) { | } catch (Exception e) { | ||||
| logger.error("结单失败,e:" + e.getMessage()); | |||||
| logger.error("物业账单结单失败,e:" + e.getMessage()); | |||||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | ||||
| } | } | ||||
| return new ResultData(Result.SUCCESS, "结单成功"); | |||||
| return new ResultData(Result.SUCCESS, "物业账单结单成功"); | |||||
| } | } | ||||
| } | } | ||||