wuxw
2022-07-17 ce64e667815b39efdc2f8bd52be0d43d49db8d84
java110-core/src/main/java/com/java110/core/smo/impl/ComputeFeeSMOImpl.java
@@ -434,15 +434,15 @@
                for (ContractRoomDto tmpContractRoomDto : contractRoomDtos) {
                    builtUpArea = builtUpArea.add(new BigDecimal(Double.parseDouble(tmpContractRoomDto.getRoomRent())));
                }
                feeReceiptDetailPo.setArea(builtUpArea.doubleValue() + "");
                feeReceiptDetailPo.setSquarePrice(feeDto.getSquarePrice() + "/" + feeDto.getAdditionalAmount());
                feeReceiptDetailPo.setArea("");
                feeReceiptDetailPo.setSquarePrice(builtUpArea.doubleValue() + "");
            } else if ("1102".equals(computingFormula)) { // 租金
                BigDecimal builtUpArea = new BigDecimal(0);
                for (ContractRoomDto tmpContractRoomDto : contractRoomDtos) {
                    builtUpArea = builtUpArea.add(new BigDecimal(Double.parseDouble(tmpContractRoomDto.getRoomRent())));
                }
                feeReceiptDetailPo.setArea(builtUpArea.doubleValue() + "");
                feeReceiptDetailPo.setSquarePrice(feeDto.getSquarePrice() + "/" + feeDto.getAdditionalAmount());
                feeReceiptDetailPo.setArea("");
                feeReceiptDetailPo.setSquarePrice(builtUpArea.doubleValue() + "");
            }else if ("4004".equals(computingFormula)) {
            } else if ("5005".equals(computingFormula)) {
                if (StringUtil.isEmpty(feeDto.getCurDegrees())) {
@@ -1518,7 +1518,9 @@
            //判断当前费用是不是导入费用
            oweMonth = 1.0;
        }else if(FeeDto.FEE_FLAG_CYCLE_ONCE.equals(feeDto.getFeeFlag())){
            maxEndTime = feeDto.getDeadlineTime();
            if(feeDto.getDeadlineTime() != null) {
                maxEndTime = feeDto.getDeadlineTime();
            }
            Date billEndTime = DateUtil.getCurrentDate();
            //建账时间
            Date startDate = feeDto.getStartTime();
@@ -1877,7 +1879,7 @@
        Date date = getTargetEndTime(cycle,endTime);
        feeDto.setDeadlineTime(date);
        dealRentRate(feeDto);
        feeDto.setFeeTotalPrice(Double.parseDouble(feeDto.getAmountOwed()));
    }
    /**
@@ -1887,10 +1889,6 @@
     */
    public void dealRentRate(FeeDto feeDto) {
        if (!FeeConfigDto.COMPUTING_FORMULA_RANT_RATE.equals(feeDto.getComputingFormula())) {
            return;
        }
        if (!FeeDto.STATE_DOING.equals(feeDto.getState())) {
            return;
        }
@@ -1917,11 +1915,16 @@
                    rateCycle = Integer.parseInt(tmpFeeAttrDto.getValue());
                }
                if (FeeAttrDto.SPEC_CD_RATE_START_TIME.equals(tmpFeeAttrDto.getSpecCd())) {
                    feeDto.setRateStartTime(tmpFeeAttrDto.getValue());
                    rateStartTime = DateUtil.getDateFromString(tmpFeeAttrDto.getValue(), DateUtil.DATE_FORMATE_STRING_B);
                }
            }
        } catch (Exception e) {
            logger.error("租金递增异常", e);
            return;
        }
        if (!FeeDto.STATE_DOING.equals(feeDto.getState())) {
            return;
        }
@@ -1968,6 +1971,7 @@
        firstAmount = firstAmount.add(oweAmountDec);
        feeDto.setAmountOwed(firstAmount.doubleValue() + "");
        feeDto.setFeeTotalPrice(firstAmount.doubleValue());
    }
}