| @@ -596,6 +596,7 @@ public class WxBillAllController extends BillBaseController { | |||||
| return new ResultData(retMap); | return new ResultData(retMap); | ||||
| } | } | ||||
| //退回押金 | |||||
| @PostMapping("returnDeposit") | @PostMapping("returnDeposit") | ||||
| public ResultData returnDeposit(@RequestBody WxBillPayDTO dto) { | public ResultData returnDeposit(@RequestBody WxBillPayDTO dto) { | ||||
| dto.updateTenantInfo(getTenantInfo()); | dto.updateTenantInfo(getTenantInfo()); | ||||
| @@ -608,6 +609,19 @@ public class WxBillAllController extends BillBaseController { | |||||
| //return wxBillAllService.updateReceivePay(wxBillAll, getUser(),false); | //return wxBillAllService.updateReceivePay(wxBillAll, getUser(),false); | ||||
| } | } | ||||
| //坏账 | |||||
| @PostMapping("bad") | |||||
| public ResultData bad(@RequestBody WxBillPayDTO dto) { | |||||
| dto.updateTenantInfo(getTenantInfo()); | |||||
| //如果是管理费,默认一个商业管理费 | |||||
| if (dto.getBillTypeValue().intValue() == Constant.bill_all_type_manage_fee) { | |||||
| dto.setBillTypeValue(EnumBillAllType.RENT_BUSSINESS_MANAGE.getCode()); | |||||
| } | |||||
| billAllHelper.returnDeposit(dto, getUser()); | |||||
| return new ResultData(); | |||||
| //return wxBillAllService.updateReceivePay(wxBillAll, getUser(),false); | |||||
| } | |||||
| //###################################### 老代码 ###################################### | //###################################### 老代码 ###################################### | ||||
| // | // | ||||
| @@ -178,11 +178,11 @@ public class WxBillDailyController extends BillBaseController { | |||||
| return new ResultData(Result.SUCCESS, "查询成功", wxBillDailyService.getById(this.getTenantInfo(),id)); | return new ResultData(Result.SUCCESS, "查询成功", wxBillDailyService.getById(this.getTenantInfo(),id)); | ||||
| } | } | ||||
| @GetMapping("/updatePaid") | |||||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||||
| public ResultData updatePaid(Long id) { | |||||
| return wxBillDailyService.updatePaid(id); | |||||
| } | |||||
| // @GetMapping("/updatePaid") | |||||
| // @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||||
| // public ResultData updatePaid(Long id) { | |||||
| // return wxBillDailyService.updatePaid(id); | |||||
| // } | |||||
| @RequestMapping("/exportTemplate") | @RequestMapping("/exportTemplate") | ||||
| public void exportTemplate(HttpServletRequest request, HttpServletResponse response) { | public void exportTemplate(HttpServletRequest request, HttpServletResponse response) { | ||||
| @@ -141,26 +141,26 @@ public class WxBillDepositController extends BillBaseController { | |||||
| public ResultData detail(Long id) { | public ResultData detail(Long id) { | ||||
| return new ResultData(Result.SUCCESS, "查询成功", wxBillDepositService.detail(this.getTenantInfo(),id)); | return new ResultData(Result.SUCCESS, "查询成功", wxBillDepositService.detail(this.getTenantInfo(),id)); | ||||
| } | } | ||||
| @GetMapping("/updatePaid") | |||||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||||
| public ResultData updatePaid(Long id) { | |||||
| return wxBillDepositService.updatePaid(id); | |||||
| } | |||||
| @PostMapping("returnDeposit") | |||||
| public ResultData returnDeposit(@RequestBody WxBillDeposit wxBillDeposit) { | |||||
| wxBillDeposit.updateTenantInfo(getTenantInfo()); | |||||
| return wxBillDepositService.returnDeposit(wxBillDeposit, getUser()); | |||||
| } | |||||
| @PostMapping("adjustDeposit") | |||||
| public ResultData adjustDeposit(@RequestBody WxBillDeposit wxBillDeposit) { | |||||
| wxBillDeposit.updateTenantInfo(getTenantInfo()); | |||||
| return wxBillDepositService.adjustDeposit(wxBillDeposit); | |||||
| } | |||||
| // | |||||
| // @GetMapping("/updatePaid") | |||||
| // @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||||
| // public ResultData updatePaid(Long id) { | |||||
| // return wxBillDepositService.updatePaid(id); | |||||
| // } | |||||
| // | |||||
| // @PostMapping("returnDeposit") | |||||
| // public ResultData returnDeposit(@RequestBody WxBillDeposit wxBillDeposit) { | |||||
| // wxBillDeposit.updateTenantInfo(getTenantInfo()); | |||||
| // return wxBillDepositService.returnDeposit(wxBillDeposit, getUser()); | |||||
| // | |||||
| // } | |||||
| // | |||||
| // @PostMapping("adjustDeposit") | |||||
| // public ResultData adjustDeposit(@RequestBody WxBillDeposit wxBillDeposit) { | |||||
| // wxBillDeposit.updateTenantInfo(getTenantInfo()); | |||||
| // return wxBillDepositService.adjustDeposit(wxBillDeposit); | |||||
| // | |||||
| // } | |||||
| } | } | ||||
| @@ -146,10 +146,10 @@ public class WxBillOtherController extends BillBaseController { | |||||
| * @param id | * @param id | ||||
| * @return | * @return | ||||
| */ | */ | ||||
| @GetMapping("/updatePaid") | |||||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||||
| public ResultData updatePaid(Long id) { | |||||
| return wxBillOtherService.updatePaid(id); | |||||
| } | |||||
| // @GetMapping("/updatePaid") | |||||
| // @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||||
| // public ResultData updatePaid(Long id) { | |||||
| // return wxBillOtherService.updatePaid(id); | |||||
| // } | |||||
| } | } | ||||
| @@ -141,23 +141,23 @@ public class WxBillOtherDepositController extends BillBaseController { | |||||
| return new ResultData(Result.SUCCESS, "查询成功", wxBillOtherDepositService.getById(this.getTenantInfo(),id)); | return new ResultData(Result.SUCCESS, "查询成功", wxBillOtherDepositService.getById(this.getTenantInfo(),id)); | ||||
| } | } | ||||
| @GetMapping("/updatePaid") | |||||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||||
| public ResultData updatePaid(Long id) { | |||||
| return wxBillOtherDepositService.updatePaid(id); | |||||
| } | |||||
| @PostMapping("returnDeposit") | |||||
| public ResultData returnDeposit(@RequestBody WxBillOtherDeposit wxBillDeposit) { | |||||
| wxBillDeposit.updateTenantInfo(getTenantInfo()); | |||||
| return wxBillOtherDepositService.returnDeposit(wxBillDeposit, getUser()); | |||||
| } | |||||
| @PostMapping("adjustDeposit") | |||||
| public ResultData adjustDeposit(@RequestBody WxBillOtherDeposit wxBillDeposit) { | |||||
| wxBillDeposit.updateTenantInfo(getTenantInfo()); | |||||
| return wxBillOtherDepositService.adjustDeposit(wxBillDeposit); | |||||
| } | |||||
| // @GetMapping("/updatePaid") | |||||
| // @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||||
| // public ResultData updatePaid(Long id) { | |||||
| // return wxBillOtherDepositService.updatePaid(id); | |||||
| // } | |||||
| // | |||||
| // @PostMapping("returnDeposit") | |||||
| // public ResultData returnDeposit(@RequestBody WxBillOtherDeposit wxBillDeposit) { | |||||
| // wxBillDeposit.updateTenantInfo(getTenantInfo()); | |||||
| // return wxBillOtherDepositService.returnDeposit(wxBillDeposit, getUser()); | |||||
| // | |||||
| // } | |||||
| // | |||||
| // @PostMapping("adjustDeposit") | |||||
| // public ResultData adjustDeposit(@RequestBody WxBillOtherDeposit wxBillDeposit) { | |||||
| // wxBillDeposit.updateTenantInfo(getTenantInfo()); | |||||
| // return wxBillOtherDepositService.adjustDeposit(wxBillDeposit); | |||||
| // } | |||||
| } | } | ||||
| @@ -141,11 +141,11 @@ public class WxBillPropertyController extends BillBaseController { | |||||
| return new ResultData(Result.SUCCESS, "查询成功", wxBillPropertyService.getById(this.getTenantInfo(),id)); | return new ResultData(Result.SUCCESS, "查询成功", wxBillPropertyService.getById(this.getTenantInfo(),id)); | ||||
| } | } | ||||
| @GetMapping("/updatePaid") | |||||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||||
| public ResultData updatePaid(Long id) { | |||||
| return wxBillPropertyService.updatePaid(id); | |||||
| } | |||||
| // @GetMapping("/updatePaid") | |||||
| // @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||||
| // public ResultData updatePaid(Long id) { | |||||
| // return wxBillPropertyService.updatePaid(id); | |||||
| // } | |||||
| @GetMapping("/detail") | @GetMapping("/detail") | ||||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | ||||
| @@ -142,25 +142,25 @@ public class WxBillPropertyDepositController extends BillBaseController { | |||||
| return new ResultData(Result.SUCCESS, "查询成功", wxBillPropertyDepositService.detail(this.getTenantInfo() ,id)); | return new ResultData(Result.SUCCESS, "查询成功", wxBillPropertyDepositService.detail(this.getTenantInfo() ,id)); | ||||
| } | } | ||||
| @GetMapping("/updatePaid") | |||||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||||
| public ResultData updatePaid(Long id) { | |||||
| return wxBillPropertyDepositService.updatePaid(id); | |||||
| } | |||||
| @PostMapping("returnDeposit") | |||||
| public ResultData returnDeposit(@RequestBody WxBillPropertyDeposit wxBillPropertyDeposit) { | |||||
| wxBillPropertyDeposit.updateTenantInfo(getTenantInfo()); | |||||
| return wxBillPropertyDepositService.returnDeposit(wxBillPropertyDeposit, getUser()); | |||||
| } | |||||
| @PostMapping("adjustDeposit") | |||||
| public ResultData adjustDeposit(@RequestBody WxBillPropertyDeposit wxBillPropertyDeposit) { | |||||
| wxBillPropertyDeposit.updateTenantInfo(getTenantInfo()); | |||||
| return wxBillPropertyDepositService.adjustDeposit(wxBillPropertyDeposit); | |||||
| } | |||||
| // @GetMapping("/updatePaid") | |||||
| // @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||||
| // public ResultData updatePaid(Long id) { | |||||
| // return wxBillPropertyDepositService.updatePaid(id); | |||||
| // } | |||||
| // | |||||
| // @PostMapping("returnDeposit") | |||||
| // public ResultData returnDeposit(@RequestBody WxBillPropertyDeposit wxBillPropertyDeposit) { | |||||
| // wxBillPropertyDeposit.updateTenantInfo(getTenantInfo()); | |||||
| // return wxBillPropertyDepositService.returnDeposit(wxBillPropertyDeposit, getUser()); | |||||
| // | |||||
| // } | |||||
| // | |||||
| // @PostMapping("adjustDeposit") | |||||
| // public ResultData adjustDeposit(@RequestBody WxBillPropertyDeposit wxBillPropertyDeposit) { | |||||
| // wxBillPropertyDeposit.updateTenantInfo(getTenantInfo()); | |||||
| // return wxBillPropertyDepositService.adjustDeposit(wxBillPropertyDeposit); | |||||
| // | |||||
| // } | |||||
| } | } | ||||
| @@ -168,11 +168,11 @@ public class WxBillRentManageController extends BillBaseController { | |||||
| return new ResultData(Result.SUCCESS, "删除成功", null); | return new ResultData(Result.SUCCESS, "删除成功", null); | ||||
| } | } | ||||
| @GetMapping("/updatePaid") | |||||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||||
| public ResultData updatePaid(Long id) { | |||||
| return wxBillRentManageService.updatePaid(id); | |||||
| } | |||||
| // @GetMapping("/updatePaid") | |||||
| // @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||||
| // public ResultData updatePaid(Long id) { | |||||
| // return wxBillRentManageService.updatePaid(id); | |||||
| // } | |||||
| @PostMapping("updateLatePayStatus") | @PostMapping("updateLatePayStatus") | ||||
| @@ -68,7 +68,7 @@ public class WxBillBaseEntity extends TenantEntity { | |||||
| return "0"; | return "0"; | ||||
| } | } | ||||
| @Excel(name = "状态", replace = {"欠缴_1", "待缴_2", "已结清_3", "未到期_4", "已退还_5", "失效_6"}, width = 20, orderNum = "10") | |||||
| @Excel(name = "状态", replace = {"欠缴_1", "待缴_2", "已结清_3", "未到期_4", "已退还_5", "失效_6", "坏账_7"}, width = 20, orderNum = "10") | |||||
| @io.swagger.annotations.ApiModelProperty(value = "账单状态EnumBillStatus", name = "status") | @io.swagger.annotations.ApiModelProperty(value = "账单状态EnumBillStatus", name = "status") | ||||
| protected Integer status; | protected Integer status; | ||||
| @@ -10,8 +10,9 @@ public enum EnumBillStatus { | |||||
| WAIT_PAY(2,"待缴"), | WAIT_PAY(2,"待缴"), | ||||
| PAID(3, "已结清"), | PAID(3, "已结清"), | ||||
| NOT_EXPIRED(4,"未到期"), | NOT_EXPIRED(4,"未到期"), | ||||
| RETURN(5, "已退还"), | |||||
| //RETURN(5, "已退还"), | |||||
| INVALID(6, "失效"), | INVALID(6, "失效"), | ||||
| BAD(7, "坏账"), | |||||
| ; | ; | ||||
| public static EnumBillStatus getEnum(Integer code) { | public static EnumBillStatus getEnum(Integer code) { | ||||
| @@ -61,7 +61,7 @@ public interface WxBillDailyService { | |||||
| void deleteById(TenantEntity tenantEntity,Long id); | void deleteById(TenantEntity tenantEntity,Long id); | ||||
| ResultData updatePaid(Long id); | |||||
| //ResultData updatePaid(Long id); | |||||
| void exportTemplate(HttpServletRequest request, HttpServletResponse response, MallUserInfo user); | void exportTemplate(HttpServletRequest request, HttpServletResponse response, MallUserInfo user); | ||||
| @@ -60,12 +60,12 @@ public interface WxBillDepositService { | |||||
| */ | */ | ||||
| void deleteById(TenantEntity tenantEntity,Long id); | void deleteById(TenantEntity tenantEntity,Long id); | ||||
| ResultData updatePaid(Long id); | |||||
| //ResultData updatePaid(Long id); | |||||
| ResultData returnDeposit(WxBillDeposit wxBillDeposit, MallUserInfo user); | |||||
| //ResultData returnDeposit(WxBillDeposit wxBillDeposit, MallUserInfo user); | |||||
| ResultData adjustDeposit(WxBillDeposit wxBillDeposit); | |||||
| //ResultData adjustDeposit(WxBillDeposit wxBillDeposit); | |||||
| void computeTotalMoney(Integer decimalSize,WxPayAccountBill wxPayAccountBill, WxBillDeposit deposit); | void computeTotalMoney(Integer decimalSize,WxPayAccountBill wxPayAccountBill, WxBillDeposit deposit); | ||||
| @@ -60,11 +60,11 @@ public interface WxBillOtherDepositService { | |||||
| void deleteById(TenantEntity tenantEntity,Long id); | void deleteById(TenantEntity tenantEntity,Long id); | ||||
| ResultData updatePaid(Long id); | |||||
| //ResultData updatePaid(Long id); | |||||
| ResultData returnDeposit(WxBillOtherDeposit wxBillDeposit, MallUserInfo user); | |||||
| //ResultData returnDeposit(WxBillOtherDeposit wxBillDeposit, MallUserInfo user); | |||||
| ResultData adjustDeposit(WxBillOtherDeposit wxBillDeposit); | |||||
| //ResultData adjustDeposit(WxBillOtherDeposit wxBillDeposit); | |||||
| void exportBill(HttpServletRequest request, HttpServletResponse response, WxBillOtherDeposit wxBillDeposit); | void exportBill(HttpServletRequest request, HttpServletResponse response, WxBillOtherDeposit wxBillDeposit); | ||||
| @@ -60,7 +60,7 @@ public interface WxBillOtherService { | |||||
| void deleteById(TenantEntity tenantEntity,Long id); | void deleteById(TenantEntity tenantEntity,Long id); | ||||
| ResultData updatePaid(Long id); | |||||
| //ResultData updatePaid(Long id); | |||||
| void exportBill(HttpServletRequest request, HttpServletResponse response, WxBillOther wxBillOther); | void exportBill(HttpServletRequest request, HttpServletResponse response, WxBillOther wxBillOther); | ||||
| @@ -62,12 +62,12 @@ public interface WxBillPropertyDepositService { | |||||
| */ | */ | ||||
| void deleteById(TenantEntity tenantEntity ,Long id); | void deleteById(TenantEntity tenantEntity ,Long id); | ||||
| ResultData updatePaid(Long id); | |||||
| //ResultData updatePaid(Long id); | |||||
| ResultData returnDeposit(WxBillPropertyDeposit wxBillPropertyDeposit, MallUserInfo user); | |||||
| //ResultData returnDeposit(WxBillPropertyDeposit wxBillPropertyDeposit, MallUserInfo user); | |||||
| ResultData adjustDeposit(WxBillPropertyDeposit wxBillPropertyDeposit); | |||||
| //ResultData adjustDeposit(WxBillPropertyDeposit wxBillPropertyDeposit); | |||||
| void computeTotalMoney(Integer decimalSize,WxPayAccountBill wxPayAccountBill, WxBillPropertyDeposit deposit); | void computeTotalMoney(Integer decimalSize,WxPayAccountBill wxPayAccountBill, WxBillPropertyDeposit deposit); | ||||
| @@ -71,7 +71,7 @@ public interface WxBillPropertyService { | |||||
| PageInfo<WxBillProperty> findByPropertyContractId(Long id, TenantEntity tenantEntity, Integer pageIndex, Integer pageSize); | PageInfo<WxBillProperty> findByPropertyContractId(Long id, TenantEntity tenantEntity, Integer pageIndex, Integer pageSize); | ||||
| ResultData updatePaid(Long id); | |||||
| //ResultData updatePaid(Long id); | |||||
| Object detail(TenantEntity tenantEntity,Long id); | Object detail(TenantEntity tenantEntity,Long id); | ||||
| @@ -70,7 +70,7 @@ public interface WxBillRentManageService { | |||||
| */ | */ | ||||
| void deleteById(TenantEntity tenantEntity,Long id); | void deleteById(TenantEntity tenantEntity,Long id); | ||||
| ResultData updatePaid(Long id); | |||||
| //ResultData updatePaid(Long id); | |||||
| void computeTotalMoney(Integer decimalSize,WxPayAccountBill wxPayAccountBill, WxBillRentManage deposit); | void computeTotalMoney(Integer decimalSize,WxPayAccountBill wxPayAccountBill, WxBillRentManage deposit); | ||||
| @@ -69,7 +69,7 @@ public interface WxBillRentService { | |||||
| PageInfo<WxBillRent> findByRentContractId(WxBillRent record, Integer pageIndex, Integer pageSize); | PageInfo<WxBillRent> findByRentContractId(WxBillRent record, Integer pageIndex, Integer pageSize); | ||||
| ResultData updatePaid(Long id); | |||||
| //ResultData updatePaid(Long id); | |||||
| Object detail(TenantEntity tenantEntity,Long id); | Object detail(TenantEntity tenantEntity,Long id); | ||||
| @@ -308,9 +308,9 @@ public class WxBillDailyServiceImpl extends WxBillBaseService implements WxBillD | |||||
| wxBillDailyMapper.deleteById(id,tenantEntity.getTenantId()); | wxBillDailyMapper.deleteById(id,tenantEntity.getTenantId()); | ||||
| } | } | ||||
| @Transactional(rollbackFor = {Exception.class}) | |||||
| @Override | |||||
| public ResultData updatePaid(Long id) { | |||||
| // @Transactional(rollbackFor = {Exception.class}) | |||||
| // @Override | |||||
| // public ResultData updatePaid(Long id) { | |||||
| // WxBillDaily wxBillDaily = wxBillDailyMapper.selectById(id); | // WxBillDaily wxBillDaily = wxBillDailyMapper.selectById(id); | ||||
| // if(wxBillDaily==null){ | // if(wxBillDaily==null){ | ||||
| // return new ResultData(ErrorCode.BILL_ROUTINE_IS_NOT_FOUND); | // return new ResultData(ErrorCode.BILL_ROUTINE_IS_NOT_FOUND); | ||||
| @@ -325,8 +325,8 @@ public class WxBillDailyServiceImpl extends WxBillBaseService implements WxBillD | |||||
| // logger.error("日常账单结单失败,e:" + e.getMessage()); | // logger.error("日常账单结单失败,e:" + e.getMessage()); | ||||
| // throw new MallinkException(ErrorCode.DB_FAIL.getCode(),e.getMessage()); | // throw new MallinkException(ErrorCode.DB_FAIL.getCode(),e.getMessage()); | ||||
| // } | // } | ||||
| return new ResultData(Result.SUCCESS, "日常账单结单成功"); | |||||
| } | |||||
| // return new ResultData(Result.SUCCESS, "日常账单结单成功"); | |||||
| // } | |||||
| @Override | @Override | ||||
| public void exportTemplate(HttpServletRequest request, HttpServletResponse response, MallUserInfo user) { | public void exportTemplate(HttpServletRequest request, HttpServletResponse response, MallUserInfo user) { | ||||
| @@ -307,9 +307,9 @@ public class WxBillDepositServiceImpl extends WxBillBaseService implements WxBil | |||||
| wxBillDepositMapper.deleteById(id,tenantEntity.getTenantId()); | wxBillDepositMapper.deleteById(id,tenantEntity.getTenantId()); | ||||
| } | } | ||||
| @Transactional(rollbackFor = {Exception.class}) | |||||
| @Override | |||||
| public ResultData updatePaid(Long id) { | |||||
| // @Transactional(rollbackFor = {Exception.class}) | |||||
| // @Override | |||||
| // public ResultData updatePaid(Long id) { | |||||
| // WxBillDeposit wxBillDeposit = wxBillDepositMapper.selectById(id); | // WxBillDeposit wxBillDeposit = wxBillDepositMapper.selectById(id); | ||||
| // if(wxBillDeposit==null){ | // if(wxBillDeposit==null){ | ||||
| // return new ResultData(ErrorCode.BILL_RENT_DEPOSIT_IS_NOT_FOUND); | // return new ResultData(ErrorCode.BILL_RENT_DEPOSIT_IS_NOT_FOUND); | ||||
| @@ -324,65 +324,65 @@ public class WxBillDepositServiceImpl extends WxBillBaseService implements WxBil | |||||
| // 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, "租赁押金结单成功"); | |||||
| } | |||||
| @Transactional(rollbackFor = {Exception.class}) | |||||
| @Override | |||||
| public ResultData returnDeposit(WxBillDeposit record, MallUserInfo user) { | |||||
| logger.info("租赁押金退还"); | |||||
| WxBillDeposit wxBillDeposit = wxBillDepositMapper.selectById(record.getId(),record.getTenantId()); | |||||
| if (wxBillDeposit == null) { | |||||
| return new ResultData(ErrorCode.BILL_RENT_DEPOSIT_IS_NOT_FOUND); | |||||
| } | |||||
| wxBillDeposit.setPayWay(record.getPayWay()); | |||||
| wxBillDeposit.setReturnPrice(record.getReturnPrice()); | |||||
| wxBillDeposit.setStatus(EnumBillStatus.RETURN.getCode()); | |||||
| wxBillDeposit.setUpdatetime(new Date()); | |||||
| try { | |||||
| wxBillDepositMapper.updateById(wxBillDeposit); | |||||
| } catch (Exception e) { | |||||
| logger.error("租赁押金退还失败,e:" + e.getMessage()); | |||||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||||
| } | |||||
| //日志 | |||||
| WxBillAction wxBillAction = new WxBillAction(); | |||||
| wxBillAction.setBillId(wxBillDeposit.getId()); | |||||
| String message = EnumBillPayWay.getEnum(record.getPayWay()).getMessage(); | |||||
| String price = new BigDecimal(record.getReturnPrice()).divide(new BigDecimal(100)).toPlainString(); | |||||
| wxBillAction.setDetails(message + price + "元"); | |||||
| wxBillAction.setAction(EnumBillAction.DEPOSIT_RETURN.getCode()); | |||||
| wxBillAction.setUserId(user.getId()); | |||||
| wxBillAction.setUserName(user.getName()); | |||||
| wxBillAction.setPhone(user.getPhone()); | |||||
| wxBillAction.updateTenantInfo(wxBillDeposit); | |||||
| try { | |||||
| wxBillActionService.save(wxBillAction); | |||||
| } catch (Exception e) { | |||||
| logger.error("添加租赁押金账单行为日志,e:" + e.getMessage()); | |||||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||||
| } | |||||
| return new ResultData(Result.SUCCESS, "租赁押金退还成功", wxBillDeposit); | |||||
| } | |||||
| // return new ResultData(Result.SUCCESS, "租赁押金结单成功"); | |||||
| // } | |||||
| @Override | |||||
| public ResultData adjustDeposit(WxBillDeposit record) { | |||||
| logger.info("租赁押金调整"); | |||||
| WxBillDeposit wxBillDeposit = wxBillDepositMapper.selectById(record.getId(),record.getTenantId()); | |||||
| if (wxBillDeposit == null) { | |||||
| return new ResultData(ErrorCode.BILL_RENT_DEPOSIT_IS_NOT_FOUND); | |||||
| } | |||||
| wxBillDeposit.setReceivePay(record.getReceivePay()); | |||||
| //wxBillDeposit.setOwe(new BigDecimal(record.getReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); | |||||
| wxBillDeposit.setUpdatetime(new Date()); | |||||
| 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, "租赁押金调整成功", wxBillDeposit); | |||||
| } | |||||
| // @Transactional(rollbackFor = {Exception.class}) | |||||
| // @Override | |||||
| // public ResultData returnDeposit(WxBillDeposit record, MallUserInfo user) { | |||||
| // logger.info("租赁押金退还"); | |||||
| // WxBillDeposit wxBillDeposit = wxBillDepositMapper.selectById(record.getId(),record.getTenantId()); | |||||
| // if (wxBillDeposit == null) { | |||||
| // return new ResultData(ErrorCode.BILL_RENT_DEPOSIT_IS_NOT_FOUND); | |||||
| // } | |||||
| // wxBillDeposit.setPayWay(record.getPayWay()); | |||||
| // wxBillDeposit.setReturnPrice(record.getReturnPrice()); | |||||
| // wxBillDeposit.setStatus(EnumBillStatus.RETURN.getCode()); | |||||
| // wxBillDeposit.setUpdatetime(new Date()); | |||||
| // try { | |||||
| // wxBillDepositMapper.updateById(wxBillDeposit); | |||||
| // } catch (Exception e) { | |||||
| // logger.error("租赁押金退还失败,e:" + e.getMessage()); | |||||
| // throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||||
| // } | |||||
| // //日志 | |||||
| // WxBillAction wxBillAction = new WxBillAction(); | |||||
| // wxBillAction.setBillId(wxBillDeposit.getId()); | |||||
| // String message = EnumBillPayWay.getEnum(record.getPayWay()).getMessage(); | |||||
| // String price = new BigDecimal(record.getReturnPrice()).divide(new BigDecimal(100)).toPlainString(); | |||||
| // wxBillAction.setDetails(message + price + "元"); | |||||
| // wxBillAction.setAction(EnumBillAction.DEPOSIT_RETURN.getCode()); | |||||
| // wxBillAction.setUserId(user.getId()); | |||||
| // wxBillAction.setUserName(user.getName()); | |||||
| // wxBillAction.setPhone(user.getPhone()); | |||||
| // wxBillAction.updateTenantInfo(wxBillDeposit); | |||||
| // try { | |||||
| // wxBillActionService.save(wxBillAction); | |||||
| // } catch (Exception e) { | |||||
| // logger.error("添加租赁押金账单行为日志,e:" + e.getMessage()); | |||||
| // throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||||
| // } | |||||
| // return new ResultData(Result.SUCCESS, "租赁押金退还成功", wxBillDeposit); | |||||
| // } | |||||
| // | |||||
| // @Override | |||||
| // public ResultData adjustDeposit(WxBillDeposit record) { | |||||
| // logger.info("租赁押金调整"); | |||||
| // WxBillDeposit wxBillDeposit = wxBillDepositMapper.selectById(record.getId(),record.getTenantId()); | |||||
| // if (wxBillDeposit == null) { | |||||
| // return new ResultData(ErrorCode.BILL_RENT_DEPOSIT_IS_NOT_FOUND); | |||||
| // } | |||||
| // wxBillDeposit.setReceivePay(record.getReceivePay()); | |||||
| // //wxBillDeposit.setOwe(new BigDecimal(record.getReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); | |||||
| // wxBillDeposit.setUpdatetime(new Date()); | |||||
| // 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, "租赁押金调整成功", wxBillDeposit); | |||||
| // } | |||||
| @Override | @Override | ||||
| public WxBillSum getBillMonthSum(WxBillDeposit wxBillDeposit) { | public WxBillSum getBillMonthSum(WxBillDeposit wxBillDeposit) { | ||||
| @@ -312,9 +312,9 @@ public class WxBillOtherDepositServiceImpl extends WxBillBaseService implements | |||||
| wxBillOtherDepositMapper.deleteById(id,tenantEntity.getTenantId()); | wxBillOtherDepositMapper.deleteById(id,tenantEntity.getTenantId()); | ||||
| } | } | ||||
| @Transactional(rollbackFor = {Exception.class}) | |||||
| @Override | |||||
| public ResultData updatePaid(Long id) { | |||||
| // @Transactional(rollbackFor = {Exception.class}) | |||||
| // @Override | |||||
| // public ResultData updatePaid(Long id) { | |||||
| // WxBillOtherDeposit wxBillOtherDeposit = wxBillOtherDepositMapper.selectById(id); | // WxBillOtherDeposit wxBillOtherDeposit = wxBillOtherDepositMapper.selectById(id); | ||||
| // if (wxBillOtherDeposit == null) { | // if (wxBillOtherDeposit == null) { | ||||
| // return new ResultData(ErrorCode.BILL_ROUTINE_IS_NOT_FOUND); | // return new ResultData(ErrorCode.BILL_ROUTINE_IS_NOT_FOUND); | ||||
| @@ -329,66 +329,66 @@ public class WxBillOtherDepositServiceImpl extends WxBillBaseService implements | |||||
| // logger.error("其他押金账单结单失败,e:" + e.getMessage()); | // logger.error("其他押金账单结单失败,e:" + e.getMessage()); | ||||
| // throw new MallinkException(ErrorCode.DB_FAIL.getCode(), 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(),user.getTenantId()); | |||||
| if (wxBillDeposit == null) { | |||||
| return new ResultData(ErrorCode.BILL_OTHER_DEPOSIT_IS_NOT_FOUND); | |||||
| } | |||||
| wxBillDeposit.setReturnPrice(record.getReturnPrice()); | |||||
| wxBillDeposit.setStatus(EnumBillStatus.RETURN.getCode()); | |||||
| wxBillDeposit.setUpdatetime(new Date()); | |||||
| try { | |||||
| wxBillOtherDepositMapper.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, "其他押金账单结单成功"); | |||||
| // } | |||||
| //日志 | |||||
| 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 + "元"); | |||||
| wxBillAction.setAction(EnumBillAction.DEPOSIT_RETURN.getCode()); | |||||
| wxBillAction.setUserId(user.getId()); | |||||
| wxBillAction.setUserName(user.getName()); | |||||
| wxBillAction.setPhone(user.getPhone()); | |||||
| wxBillAction.updateTenantInfo(user); | |||||
| try { | |||||
| wxBillActionService.save(wxBillAction); | |||||
| } catch (Exception e) { | |||||
| logger.error("添加其他押金账单行为日志,e:" + e.getMessage()); | |||||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||||
| } | |||||
| return new ResultData(Result.SUCCESS, "押金退还成功", wxBillDeposit); | |||||
| } | |||||
| @Override | |||||
| public ResultData adjustDeposit(WxBillOtherDeposit record) { | |||||
| logger.info("其他押金调整"); | |||||
| WxBillOtherDeposit wxBillDeposit = wxBillOtherDepositMapper.selectById(record.getId(),record.getTenantId()); | |||||
| if (wxBillDeposit == null) { | |||||
| return new ResultData(ErrorCode.BILL_OTHER_DEPOSIT_IS_NOT_FOUND); | |||||
| } | |||||
| wxBillDeposit.setReceivePay(record.getReceivePay()); | |||||
| //wxBillDeposit.setOwe(new BigDecimal(record.getReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); | |||||
| wxBillDeposit.setUpdatetime(new Date()); | |||||
| try { | |||||
| wxBillOtherDepositMapper.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, "其他押金调整成功", wxBillDeposit); | |||||
| } | |||||
| // @Override | |||||
| // public ResultData returnDeposit(WxBillOtherDeposit record, MallUserInfo user) { | |||||
| // logger.info("其他押金退还"); | |||||
| // WxBillOtherDeposit wxBillDeposit = wxBillOtherDepositMapper.selectById(record.getId(),user.getTenantId()); | |||||
| // if (wxBillDeposit == null) { | |||||
| // return new ResultData(ErrorCode.BILL_OTHER_DEPOSIT_IS_NOT_FOUND); | |||||
| // } | |||||
| // wxBillDeposit.setReturnPrice(record.getReturnPrice()); | |||||
| // wxBillDeposit.setStatus(EnumBillStatus.RETURN.getCode()); | |||||
| // wxBillDeposit.setUpdatetime(new Date()); | |||||
| // try { | |||||
| // wxBillOtherDepositMapper.updateById(wxBillDeposit); | |||||
| // } catch (Exception e) { | |||||
| // logger.error("押金退还失败,e:" + e.getMessage()); | |||||
| // throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||||
| // } | |||||
| // | |||||
| // //日志 | |||||
| // 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 + "元"); | |||||
| // wxBillAction.setAction(EnumBillAction.DEPOSIT_RETURN.getCode()); | |||||
| // wxBillAction.setUserId(user.getId()); | |||||
| // wxBillAction.setUserName(user.getName()); | |||||
| // wxBillAction.setPhone(user.getPhone()); | |||||
| // wxBillAction.updateTenantInfo(user); | |||||
| // try { | |||||
| // wxBillActionService.save(wxBillAction); | |||||
| // } catch (Exception e) { | |||||
| // logger.error("添加其他押金账单行为日志,e:" + e.getMessage()); | |||||
| // throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||||
| // } | |||||
| // | |||||
| // return new ResultData(Result.SUCCESS, "押金退还成功", wxBillDeposit); | |||||
| // } | |||||
| // | |||||
| // @Override | |||||
| // public ResultData adjustDeposit(WxBillOtherDeposit record) { | |||||
| // logger.info("其他押金调整"); | |||||
| // WxBillOtherDeposit wxBillDeposit = wxBillOtherDepositMapper.selectById(record.getId(),record.getTenantId()); | |||||
| // if (wxBillDeposit == null) { | |||||
| // return new ResultData(ErrorCode.BILL_OTHER_DEPOSIT_IS_NOT_FOUND); | |||||
| // } | |||||
| // wxBillDeposit.setReceivePay(record.getReceivePay()); | |||||
| // //wxBillDeposit.setOwe(new BigDecimal(record.getReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); | |||||
| // wxBillDeposit.setUpdatetime(new Date()); | |||||
| // try { | |||||
| // wxBillOtherDepositMapper.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, "其他押金调整成功", wxBillDeposit); | |||||
| // } | |||||
| @Override | @Override | ||||
| public void exportBill(HttpServletRequest request, HttpServletResponse response, WxBillOtherDeposit wxBillDeposit) { | public void exportBill(HttpServletRequest request, HttpServletResponse response, WxBillOtherDeposit wxBillDeposit) { | ||||
| @@ -312,9 +312,9 @@ public class WxBillOtherServiceImpl extends WxBillBaseService implements WxBillO | |||||
| wxBillOtherMapper.deleteById(id,tenantEntity.getTenantId()); | wxBillOtherMapper.deleteById(id,tenantEntity.getTenantId()); | ||||
| } | } | ||||
| @Transactional(rollbackFor = {Exception.class}) | |||||
| @Override | |||||
| public ResultData updatePaid(Long id) { | |||||
| // @Transactional(rollbackFor = {Exception.class}) | |||||
| // @Override | |||||
| // public ResultData updatePaid(Long id) { | |||||
| // WxBillOther wxBillOther = wxBillOtherMapper.selectById(id); | // WxBillOther wxBillOther = wxBillOtherMapper.selectById(id); | ||||
| // if(wxBillOther==null){ | // if(wxBillOther==null){ | ||||
| // return new ResultData(ErrorCode.BILL_ROUTINE_IS_NOT_FOUND); | // return new ResultData(ErrorCode.BILL_ROUTINE_IS_NOT_FOUND); | ||||
| @@ -329,8 +329,8 @@ public class WxBillOtherServiceImpl extends WxBillBaseService implements WxBillO | |||||
| // logger.error("其他账单结单失败,e:" + e.getMessage()); | // logger.error("其他账单结单失败,e:" + e.getMessage()); | ||||
| // throw new MallinkException(ErrorCode.DB_FAIL.getCode(),e.getMessage()); | // throw new MallinkException(ErrorCode.DB_FAIL.getCode(),e.getMessage()); | ||||
| // } | // } | ||||
| return new ResultData(Result.SUCCESS, "其他账单结单成功"); | |||||
| } | |||||
| // return new ResultData(Result.SUCCESS, "其他账单结单成功"); | |||||
| // } | |||||
| @Override | @Override | ||||
| public void exportBill(HttpServletRequest request, HttpServletResponse response, WxBillOther wxBillOther) { | public void exportBill(HttpServletRequest request, HttpServletResponse response, WxBillOther wxBillOther) { | ||||
| @@ -285,9 +285,9 @@ public class WxBillPropertyDepositServiceImpl extends WxBillBaseService implemen | |||||
| wxBillPropertyDepositMapper.deleteById(id,tenantEntity.getTenantId()); | wxBillPropertyDepositMapper.deleteById(id,tenantEntity.getTenantId()); | ||||
| } | } | ||||
| @Transactional(rollbackFor = {Exception.class}) | |||||
| @Override | |||||
| public ResultData updatePaid(Long id) { | |||||
| // @Transactional(rollbackFor = {Exception.class}) | |||||
| // @Override | |||||
| // public ResultData updatePaid(Long id) { | |||||
| // WxBillPropertyDeposit wxBillDeposit = wxBillPropertyDepositMapper.selectById(id); | // WxBillPropertyDeposit wxBillDeposit = wxBillPropertyDepositMapper.selectById(id); | ||||
| // if(wxBillDeposit==null){ | // if(wxBillDeposit==null){ | ||||
| // return new ResultData(ErrorCode.BILL_PROPERTY_DEPOSIT_IS_NOT_FOUND); | // return new ResultData(ErrorCode.BILL_PROPERTY_DEPOSIT_IS_NOT_FOUND); | ||||
| @@ -302,66 +302,66 @@ public class WxBillPropertyDepositServiceImpl extends WxBillBaseService implemen | |||||
| // 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, "物业押金结单成功"); | |||||
| } | |||||
| @Override | |||||
| public ResultData returnDeposit(WxBillPropertyDeposit record, MallUserInfo user) { | |||||
| logger.info("物业押金退还"); | |||||
| WxBillPropertyDeposit wxBillDeposit = wxBillPropertyDepositMapper.selectById(record.getId(),user.getTenantId()); | |||||
| if (wxBillDeposit == null) { | |||||
| return new ResultData(ErrorCode.BILL_PROPERTY_DEPOSIT_IS_NOT_FOUND); | |||||
| } | |||||
| wxBillDeposit.setPayWay(record.getPayWay()); | |||||
| wxBillDeposit.setReturnPrice(record.getReturnPrice()); | |||||
| wxBillDeposit.setStatus(EnumBillStatus.RETURN.getCode()); | |||||
| wxBillDeposit.setUpdatetime(new Date()); | |||||
| try { | |||||
| wxBillPropertyDepositMapper.updateById(wxBillDeposit); | |||||
| } catch (Exception e) { | |||||
| logger.error("物业押金退还失败,e:" + e.getMessage()); | |||||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||||
| } | |||||
| //日志 | |||||
| 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(); | |||||
| wxBillAction.setDetails(message + price + "元"); | |||||
| wxBillAction.setAction(EnumBillAction.DEPOSIT_RETURN.getCode()); | |||||
| wxBillAction.setUserId(user.getId()); | |||||
| wxBillAction.setUserName(user.getName()); | |||||
| wxBillAction.setPhone(user.getPhone()); | |||||
| wxBillAction.updateTenantInfo(user); | |||||
| try { | |||||
| wxBillActionService.save(wxBillAction); | |||||
| } catch (Exception e) { | |||||
| logger.error("添加物业押金账单行为日志,e:" + e.getMessage()); | |||||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||||
| } | |||||
| return new ResultData(Result.SUCCESS, "物业押金退还成功", wxBillDeposit); | |||||
| } | |||||
| // return new ResultData(Result.SUCCESS, "物业押金结单成功"); | |||||
| // } | |||||
| @Override | |||||
| public ResultData adjustDeposit(WxBillPropertyDeposit record) { | |||||
| logger.info("物业押金调整"); | |||||
| WxBillPropertyDeposit wxBillDeposit = wxBillPropertyDepositMapper.selectById(record.getId(),record.getTenantId()); | |||||
| if (wxBillDeposit == null) { | |||||
| return new ResultData(ErrorCode.BILL_OTHER_DEPOSIT_IS_NOT_FOUND); | |||||
| } | |||||
| wxBillDeposit.setReceivePay(record.getReceivePay()); | |||||
| //wxBillDeposit.setOwe(new BigDecimal(record.getReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); | |||||
| wxBillDeposit.setUpdatetime(new Date()); | |||||
| 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, "物业押金调整成功", wxBillDeposit); | |||||
| } | |||||
| // @Override | |||||
| // public ResultData returnDeposit(WxBillPropertyDeposit record, MallUserInfo user) { | |||||
| // logger.info("物业押金退还"); | |||||
| // WxBillPropertyDeposit wxBillDeposit = wxBillPropertyDepositMapper.selectById(record.getId(),user.getTenantId()); | |||||
| // if (wxBillDeposit == null) { | |||||
| // return new ResultData(ErrorCode.BILL_PROPERTY_DEPOSIT_IS_NOT_FOUND); | |||||
| // } | |||||
| // wxBillDeposit.setPayWay(record.getPayWay()); | |||||
| // wxBillDeposit.setReturnPrice(record.getReturnPrice()); | |||||
| // wxBillDeposit.setStatus(EnumBillStatus.RETURN.getCode()); | |||||
| // wxBillDeposit.setUpdatetime(new Date()); | |||||
| // try { | |||||
| // wxBillPropertyDepositMapper.updateById(wxBillDeposit); | |||||
| // } catch (Exception e) { | |||||
| // logger.error("物业押金退还失败,e:" + e.getMessage()); | |||||
| // throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||||
| // } | |||||
| // //日志 | |||||
| // 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(); | |||||
| // wxBillAction.setDetails(message + price + "元"); | |||||
| // wxBillAction.setAction(EnumBillAction.DEPOSIT_RETURN.getCode()); | |||||
| // wxBillAction.setUserId(user.getId()); | |||||
| // wxBillAction.setUserName(user.getName()); | |||||
| // wxBillAction.setPhone(user.getPhone()); | |||||
| // wxBillAction.updateTenantInfo(user); | |||||
| // try { | |||||
| // wxBillActionService.save(wxBillAction); | |||||
| // } catch (Exception e) { | |||||
| // logger.error("添加物业押金账单行为日志,e:" + e.getMessage()); | |||||
| // throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||||
| // } | |||||
| // return new ResultData(Result.SUCCESS, "物业押金退还成功", wxBillDeposit); | |||||
| // } | |||||
| // | |||||
| // | |||||
| // @Override | |||||
| // public ResultData adjustDeposit(WxBillPropertyDeposit record) { | |||||
| // logger.info("物业押金调整"); | |||||
| // WxBillPropertyDeposit wxBillDeposit = wxBillPropertyDepositMapper.selectById(record.getId(),record.getTenantId()); | |||||
| // if (wxBillDeposit == null) { | |||||
| // return new ResultData(ErrorCode.BILL_OTHER_DEPOSIT_IS_NOT_FOUND); | |||||
| // } | |||||
| // wxBillDeposit.setReceivePay(record.getReceivePay()); | |||||
| // //wxBillDeposit.setOwe(new BigDecimal(record.getReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); | |||||
| // wxBillDeposit.setUpdatetime(new Date()); | |||||
| // 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, "物业押金调整成功", wxBillDeposit); | |||||
| // } | |||||
| @Override | @Override | ||||
| public WxBillSum getBillMonthSum(WxBillPropertyDeposit deposit) { | public WxBillSum getBillMonthSum(WxBillPropertyDeposit deposit) { | ||||
| @@ -345,9 +345,9 @@ public class WxBillPropertyServiceImpl extends WxBillBaseService implements WxBi | |||||
| } | } | ||||
| @Transactional(rollbackFor = {Exception.class}) | |||||
| @Override | |||||
| public ResultData updatePaid(Long id) { | |||||
| // @Transactional(rollbackFor = {Exception.class}) | |||||
| // @Override | |||||
| // public ResultData updatePaid(Long id) { | |||||
| // WxBillProperty record = wxBillPropertyMapper.selectById(id); | // WxBillProperty record = wxBillPropertyMapper.selectById(id); | ||||
| // if (record == null) { | // if (record == null) { | ||||
| // return new ResultData(ErrorCode.BILL_PROPERTY_IS_NOT_FOUND); | // return new ResultData(ErrorCode.BILL_PROPERTY_IS_NOT_FOUND); | ||||
| @@ -362,8 +362,8 @@ public class WxBillPropertyServiceImpl extends WxBillBaseService implements WxBi | |||||
| // 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, "结单成功"); | |||||
| // } | |||||
| @Override | @Override | ||||
| public Object detail(TenantEntity tenantEntity,Long id) { | public Object detail(TenantEntity tenantEntity,Long id) { | ||||
| @@ -323,9 +323,9 @@ public class WxBillRentManageServiceImpl extends WxBillBaseService implements W | |||||
| wxBillRentManageMapper.deleteById(id,tenantEntity.getTenantId()); | wxBillRentManageMapper.deleteById(id,tenantEntity.getTenantId()); | ||||
| } | } | ||||
| @Transactional(rollbackFor = {Exception.class}) | |||||
| @Override | |||||
| public ResultData updatePaid(Long id) { | |||||
| // @Transactional(rollbackFor = {Exception.class}) | |||||
| // @Override | |||||
| // public ResultData updatePaid(Long id) { | |||||
| // WxBillRentManage wxBillDeposit = wxBillRentManageMapper.selectById(id); | // WxBillRentManage wxBillDeposit = wxBillRentManageMapper.selectById(id); | ||||
| // if(wxBillDeposit==null){ | // if(wxBillDeposit==null){ | ||||
| // return new ResultData(ErrorCode.BILL_RENT_DEPOSIT_IS_NOT_FOUND); | // return new ResultData(ErrorCode.BILL_RENT_DEPOSIT_IS_NOT_FOUND); | ||||
| @@ -340,8 +340,8 @@ public class WxBillRentManageServiceImpl extends WxBillBaseService implements W | |||||
| // 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, "租赁押金结单成功"); | |||||
| // } | |||||
| @Override | @Override | ||||
| public ResultData updateLatePayStatus(WxBillRentManage record) { | public ResultData updateLatePayStatus(WxBillRentManage record) { | ||||
| @@ -206,9 +206,9 @@ public class WxBillRentServiceImpl extends WxBillBaseService implements WxBillRe | |||||
| return getBillRentPropertyList(pageIndex,pageSize,record,wxPayAccountBill); | return getBillRentPropertyList(pageIndex,pageSize,record,wxPayAccountBill); | ||||
| } | } | ||||
| @Transactional(rollbackFor = {Exception.class}) | |||||
| @Override | |||||
| public ResultData updatePaid(Long id) { | |||||
| // @Transactional(rollbackFor = {Exception.class}) | |||||
| // @Override | |||||
| // public ResultData updatePaid(Long id) { | |||||
| // WxBillRent wxBillRent = wxBillRentMapper.selectById(id); | // WxBillRent wxBillRent = wxBillRentMapper.selectById(id); | ||||
| // if(wxBillRent==null){ | // if(wxBillRent==null){ | ||||
| // return new ResultData(ErrorCode.BILL_RENT_IS_NOT_FOUND); | // return new ResultData(ErrorCode.BILL_RENT_IS_NOT_FOUND); | ||||
| @@ -223,8 +223,8 @@ public class WxBillRentServiceImpl extends WxBillBaseService implements WxBillRe | |||||
| // 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, "租赁账单结单成功"); | |||||
| // } | |||||
| @Override | @Override | ||||
| public Object detail(TenantEntity tenantEntity,Long id) { | public Object detail(TenantEntity tenantEntity,Long id) { | ||||