java110
2020-12-30 769b8d3dbcf3d65dc94c7ac631fb65da56afefc4
service-fee/src/main/java/com/java110/fee/bmo/impl/QueryOweFeeImpl.java
@@ -15,6 +15,7 @@
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;
@@ -59,6 +60,14 @@
    @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) {
@@ -74,8 +83,7 @@
        }
        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);
@@ -143,7 +151,18 @@
            feeDto.setPayerObjName(ownerCarDto.getCarNum() + "(" + parkingSpaceDto.getAreaNum() + "停车场" + parkingSpaceDto.getNum() + "车位)");
            feeDto.setBuiltUpArea(parkingSpaceDto.getArea());
        }
        return ResultVo.createResponseEntity(feeDto);
        double feePrice = computeFeeSMOImpl.getFeePrice(feeDto);
        feeDto.setFeePrice(feePrice);
        //应收款取值
        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) {