| | |
| | | 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())) { |
| | |
| | | } |
| | | |
| | | private void computeFeePrice(List<FeeDto> feeDtos) { |
| | | |
| | | for (FeeDto feeDto : feeDtos) { |
| | | try { |
| | | // 轮数 * 周期 * 30 + 开始时间 = 目标 到期时间 |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | private void computeFeePriceByCar(FeeDto feeDto, double oweMonth) { |
| | | OwnerCarDto ownerCarDto = new OwnerCarDto(); |
| | |
| | | feeDto.setDeadlineTime(DateUtil.getCurrentDate()); |
| | | } |
| | | } |
| | | |
| | | } |