From 0ab9dfd8f122195e4e9f09bd50c59e0a47450bec Mon Sep 17 00:00:00 2001 From: mitao <2763622819@qq.com> Date: 星期三, 19 三月 2025 15:50:03 +0800 Subject: [PATCH] fix: resolve merge conflicts in .gitignore --- ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TContractController.java | 21 +++++++++++++++------ 1 files changed, 15 insertions(+), 6 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TContractController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TContractController.java index 344fc69..8a363c6 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TContractController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TContractController.java @@ -92,12 +92,13 @@ @PostMapping(value = "/addContract") @PreAuthorize("@ss.hasPermi('contract:list:add')") public R<Boolean> addContract(@Validated @RequestBody TContractDTO dto) { + LocalDateTime changeTime = dto.getChangeTime(); long count = contractService.count(new LambdaQueryWrapper<TContract>().eq(TContract::getContractNumber, dto.getContractNumber())); if (count!=0){ return R.fail("合同编号不可重复"); } dto.setChangeRent(dto.getMonthRent()); - + dto.setChangeTime(null); contractService.save(dto); if (dto.getStatus().equals("2")){ //发起合同新增审批 @@ -135,7 +136,7 @@ tContractRentType.setIncreasingDecreasing(dto.getIncreasingDecreasing()); tContractRentType.setIncreasingDecreasingType(dto.getIncreasingDecreasingType()); tContractRentType.setNumericalValue(dto.getNumericalValue()); - tContractRentType.setChangeTime(dto.getChangeTime()); + tContractRentType.setChangeTime(changeTime); tContractRentType.setCycleTime(dto.getCycleTime()); contractRentTypeService.save(tContractRentType); } @@ -146,6 +147,7 @@ @PostMapping(value = "/updateContract") @PreAuthorize("@ss.hasPermi('contract:list:edit')") public R<Boolean> updateContract(@Validated @RequestBody TContractDTO dto) { + dto.setChangeTime(null); contractService.updateById(dto); contractRentTypeService.remove(new LambdaQueryWrapper<TContractRentType>() .eq(TContractRentType::getContractId,dto.getId())); @@ -223,14 +225,14 @@ res.setHouse(house); List<TBill> list = billService.lambdaQuery() .eq(TBill::getContractId, id) - .in(TBill::getPayFeesStatus, Arrays.asList("1,4")) + .ne(TBill::getPayFeesStatus, 3) .list(); BigDecimal payMoney = new BigDecimal("0"); for (TBill tBill : list) { - payMoney = payMoney.add(tBill.getPayFeesMoney()).add(tBill.getPayableFeesPenalty()); + payMoney = payMoney.add(tBill.getOutstandingMoney()).add(tBill.getPayableFeesPenalty()); } TCheckAcceptRecord tCheckAcceptRecord = checkAcceptRecordService.lambdaQuery().eq(TCheckAcceptRecord::getContractId, id).one(); - res.setCheckResult(Objects.nonNull(tCheckAcceptRecord)&&Objects.nonNull(tCheckAcceptRecord.getCheckResult())?tCheckAcceptRecord.getCheckResult():false); + res.setCheckResult(Objects.nonNull(tCheckAcceptRecord)&&Objects.nonNull(tCheckAcceptRecord.getCheckResult())?tCheckAcceptRecord.getCheckResult():null); res.setPayMoney(payMoney); return R.ok(res); @@ -257,7 +259,14 @@ TContract contract = contractService.getById(id); contract.setStatus("8"); contractService.updateById(contract); - return R.ok(); + // 将所有未缴费账单设置未已失效 + List<TBill> tBills = billService.list(new LambdaQueryWrapper<TBill>() + .ne(TBill::getPayFeesStatus, 3) + .eq(TBill::getContractId, contract.getId())); + for (TBill tBill : tBills) { + tBill.setPayFeesStatus("5"); + } + billService.updateBatchById(tBills); return R.ok(); } @ApiOperation(value = "终止合同剩余未缴费账单列表") @PostMapping(value = "/contractBillList") -- Gitblit v1.7.1