| | |
| | | import com.java110.intf.fee.IFeeInnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerCarInnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerInnerServiceSMO; |
| | | import com.java110.utils.cache.MappingCache; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | | import com.java110.utils.exception.ListenerExecuteException; |
| | | import com.java110.utils.util.Assert; |
| | |
| | | @Autowired |
| | | private IComputeFeeSMO computeFeeSMOImpl; |
| | | |
| | | //域 |
| | | public static final String DOMAIN_COMMON = "DOMAIN.COMMON"; |
| | | |
| | | //键 |
| | | public static final String TOTAL_FEE_PRICE = "TOTAL_FEE_PRICE"; |
| | | |
| | | //键 |
| | | public static final String RECEIVED_AMOUNT_SWITCH = "RECEIVED_AMOUNT_SWITCH"; |
| | | |
| | | @Override |
| | | public ResponseEntity<String> query(FeeDto feeDto) { |
| | |
| | | } |
| | | List<FeeDto> tmpFeeDtos = new ArrayList<>(); |
| | | for (FeeDto tmpFeeDto : feeDtos) { |
| | | computeFeeSMOImpl.computeOweFee(tmpFeeDto);//计算欠费金额 |
| | | |
| | | computeFeeSMOImpl.computeEveryOweFee(tmpFeeDto);//计算欠费金额 |
| | | //如果金额为0 就排除 |
| | | if (tmpFeeDto.getFeePrice() > 0 && tmpFeeDto.getEndTime().getTime() <= DateUtil.getCurrentDate().getTime()) { |
| | | tmpFeeDtos.add(tmpFeeDto); |
| | |
| | | } |
| | | double feePrice = computeFeeSMOImpl.getFeePrice(feeDto); |
| | | feeDto.setFeePrice(feePrice); |
| | | return ResultVo.createResponseEntity(feeDto); |
| | | //应收款取值 |
| | | String val = MappingCache.getValue(DOMAIN_COMMON, TOTAL_FEE_PRICE); |
| | | feeDto.setVal(val); |
| | | String received_amount_switch = MappingCache.getValue(DOMAIN_COMMON, RECEIVED_AMOUNT_SWITCH); |
| | | if(StringUtil.isEmpty(received_amount_switch)){ |
| | | feeDto.setReceivedAmountSwitch("1");//默认启用实收款输入框 |
| | | }else { |
| | | feeDto.setReceivedAmountSwitch(received_amount_switch); |
| | | } |
| | | return ResultVo.createResponseEntity(feeDto); |
| | | } |
| | | |
| | | private boolean freshFeeDtoParam(FeeDto feeDto) { |