无关风月
2024-11-06 740b27cadde1b1f96d475a0ade47d6bd70deab4b
ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TParkingRecordServiceImpl.java
@@ -68,6 +68,17 @@
        }
        List<TParkingRecordVO> list = this.baseMapper.pageList(query,pageInfo);
        for (TParkingRecordVO tParkingRecordVO : list) {
            if (tParkingRecordVO.getParkingDuration()==null){
                tParkingRecordVO.setFeeDuration(0);
            }else if(tParkingRecordVO.getFreeDuration()==null){
                tParkingRecordVO.setFeeDuration(tParkingRecordVO.getParkingDuration());
            }else{
                tParkingRecordVO.setFeeDuration(tParkingRecordVO.getParkingDuration()-tParkingRecordVO.getFreeDuration());
            }
            tParkingRecordVO.setOrderAmount(tParkingRecordVO.getOrderAmount().add(tParkingRecordVO.getTimeoutAmount()));
            tParkingRecordVO.setParkingFee(tParkingRecordVO.getOrderAmount());
        }
        pageInfo.setRecords(list);
        // 查询总数
        TParkingRecordPageInfoVO infoVO = this.baseMapper.getParkingRecordCount(query);