| | |
| | | TContractRentType tContractRentType = contractRentTypes.stream().filter(e -> e.getContractId().equals(contract.getId())).findFirst().orElse(null); |
| | | // 生成第一笔账单 |
| | | // 第一次应缴费日期 |
| | | |
| | | LocalDateTime firstPayTime = contract.getStartTime().plusDays(10).withHour(0).withMinute(0).withSecond(0); |
| | | TBill rentBill = new TBill(); |
| | | rentBill.setContractId(contract.getId()); |
| | |
| | | BigDecimal originalMoney = new BigDecimal("0"); |
| | | // 不需要涨租金的时间段 |
| | | long originalDays = 0; |
| | | if (tBill.getStartTime().getDayOfMonth()==1&&(tBill.getStartTime().with(TemporalAdjusters.lastDayOfMonth()).toLocalDate().isAfter(tBill.getEndTime().toLocalDate())||tBill.getStartTime().with(TemporalAdjusters.lastDayOfMonth()).toLocalDate().equals(tBill.getEndTime().toLocalDate()))){ |
| | | if (tBill.getStartTime().getDayOfMonth()==1 |
| | | && |
| | | ( |
| | | tBill.getStartTime().with(TemporalAdjusters.lastDayOfMonth()).toLocalDate().isBefore(tBill.getEndTime().toLocalDate()) |
| | | ||tBill.getStartTime().with(TemporalAdjusters.lastDayOfMonth()).toLocalDate().equals(tBill.getEndTime().toLocalDate()) |
| | | ) |
| | | ){ |
| | | // 计算整月 |
| | | originalMoney = originalMoney.add(contract.getChangeRent()); |
| | | }else{ |
| | |
| | | } |
| | | case CATEGORY3: { |
| | | // 合同提前终止审批 |
| | | int submitStatus = status == 0 ? 4 : (status == 1 ? 7 : 5); |
| | | int submitStatus = status == 0 ? 4 : (status == 1 ? 7 : 4); |
| | | contractService.updateContractAuditStatus(processParameter.getString("projectId"), submitStatus); |
| | | // 生成验收记录 |
| | | TContract contract = contractService.getById(processParameter.getString("projectId")); |