jiangping
2024-11-27 bc87b51e20a0adf0badf2033ede93cafeb5fc147
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractServiceImpl.java
@@ -721,7 +721,7 @@
            bill.setEndDate(end);//账单结束
            Date planPayDate = DateUtil.addDaysToDate(bill.getStartDate(),Constants.formatIntegerNum(d.getAdvanceDays()) * -1);
            bill.setPlanPayDate(planPayDate.getTime()>System.currentTimeMillis()?planPayDate:new Date());
            BigDecimal totalFee =getTotalFeeByStartEnd(model,d,freeStart,freeEnd);
            BigDecimal totalFee =getTotalFeeByStartEnd(model,d,bill,freeStart,freeEnd);
            bill.setTotleFee(totalFee);
            bill.setReceivableFee(totalFee);
            bill.setBillType(Constants.ZERO);
@@ -733,9 +733,9 @@
    }
    private BigDecimal getTotalFeeByStartEnd(YwContract model, YwContractDetail d,Date freeStart,Date freeEnd) {
    private BigDecimal getTotalFeeByStartEnd(YwContract model, YwContractDetail d, YwContractBill bill,Date freeStart,Date freeEnd) {
        BigDecimal totalFee = new BigDecimal(0);
        DateCompare dateCompare =   DateCompare.dayCompare(d.getStartDate(),d.getEndDate(),freeStart,freeEnd);
        DateCompare dateCompare =   DateCompare.dayCompare(bill.getStartDate(),bill.getEndDate(),freeStart,freeEnd);
        if(Constants.equalsInteger(d.getCircleType(),Constants.ZERO)){
            //0=元每平米天
            int days = dateCompare.getDay();
@@ -805,7 +805,7 @@
            bill.setStartDate(d.getStartDate());//账单开始
            bill.setEndDate(d.getEndDate());//账单结束
            bill.setPlanPayDate(DateUtil.addDaysToDate(bill.getStartDate(),Constants.formatIntegerNum(d.getAdvanceDays()) * -1));
            bill.setTotleFee(getTotalFeeByStartEnd(model,d,freeStart,freeEnd));
            bill.setTotleFee(getTotalFeeByStartEnd(model,d,bill,freeStart,freeEnd));
            bill.setReceivableFee(bill.getTotleFee());
            bill.setBillType(Constants.ZERO);
            list.add(bill);