wuxw
2021-04-23 fdf45f690fa4eca9191aa0fb6abf077e7b36ce06
service-api/src/main/java/com/java110/api/listener/fee/ListFeeListener.java
@@ -106,26 +106,18 @@
            computeFeePrice(feeDtos);
            fees = BeanConvertUtil.covertBeanList(feeDtos, ApiFeeDataVo.class);
            freshFeeAttrs(fees, feeDtos);
        } else {
            fees = new ArrayList<>();
        }
        ApiFeeVo apiFeeVo = new ApiFeeVo();
        apiFeeVo.setTotal(count);
        apiFeeVo.setRecords((int) Math.ceil((double) count / (double) reqJson.getInteger("row")));
        apiFeeVo.setFees(fees);
        ResponseEntity<String> responseEntity = new ResponseEntity<String>(JSONObject.toJSONString(apiFeeVo), HttpStatus.OK);
        context.setResponseEntity(responseEntity);
    }
    private void freshFeeAttrs(List<ApiFeeDataVo> fees, List<FeeDto> feeDtos) {
        for (ApiFeeDataVo apiFeeDataVo : fees) {
            for (FeeDto feeDto : feeDtos) {
                if (apiFeeDataVo.getFeeId().equals(feeDto.getFeeId())) {
@@ -136,7 +128,6 @@
    }
    private void computeFeePrice(List<FeeDto> feeDtos) {
        for (FeeDto feeDto : feeDtos) {
            try {
                // 轮数 * 周期 * 30 + 开始时间 = 目标 到期时间
@@ -155,7 +146,6 @@
            }
        }
    }
    private void computeFeePriceByCar(FeeDto feeDto, double oweMonth) {
        OwnerCarDto ownerCarDto = new OwnerCarDto();
@@ -205,5 +195,4 @@
            feeDto.setDeadlineTime(DateUtil.getCurrentDate());
        }
    }
}