From 5c2a3cdd8bce78f25bbaa4f13947760f2d0d9411 Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期二, 10 九月 2024 13:01:37 +0800 Subject: [PATCH] 代码提交 --- ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java | 98 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 92 insertions(+), 6 deletions(-) diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java index af8b9bf..052ff4a 100644 --- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java +++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java @@ -1125,32 +1125,32 @@ } @Override - public Map<String, BigDecimal> countAll(LocalDate sixBefore) { + public Map<String, Object> countAll(LocalDate sixBefore) { return this.baseMapper.countAll(sixBefore); } @Override - public List<Map<String, BigDecimal>> getSumByType(List<Long> chargingOrderIds) { + public List<Map<String, Object>> getSumByType(List<Long> chargingOrderIds) { return this.baseMapper.getSumByType(chargingOrderIds); } @Override - public List<Map<String, BigDecimal>> getDateData(List<Long> chargingOrderIds) { + public List<Map<String, Object>> getDateData(List<Long> chargingOrderIds) { return this.baseMapper.getDateData(chargingOrderIds); } @Override - public List<Map<String, BigDecimal>> getWeekData(List<Long> chargingOrderIds) { + public List<Map<String, Object>> getWeekData(List<Long> chargingOrderIds) { return this.baseMapper.getWeekData(chargingOrderIds); } @Override - public List<Map<String, BigDecimal>> getMonthData(List<Long> chargingOrderIds) { + public List<Map<String, Object>> getMonthData(List<Long> chargingOrderIds) { return this.baseMapper.getMonthData(chargingOrderIds); } @Override - public List<Map<String, BigDecimal>> getYearData(List<Long> chargingOrderIds) { + public List<Map<String, Object>> getYearData(List<Long> chargingOrderIds) { return this.baseMapper.getYearData(chargingOrderIds); } @Resource @@ -1245,6 +1245,7 @@ } // 不分页 List<ChargingOrderListVO> list1 = this.baseMapper.chargingList1(dto,startTime1,startTime2,endTime1,endTime2); + chargingOrderTimeVO.setExportList(list1); chargingOrderTimeVO.setOrderCount(list1.size()); // 计算充电总度数 BigDecimal electronic = new BigDecimal("0"); @@ -1341,6 +1342,22 @@ TChargingOrder chargingOrder= this.getById(uid); ChargingOrderListInfoVO chargingOrderListInfoVO = new ChargingOrderListInfoVO(); + chargingOrderListInfoVO.setElectrovalence(chargingOrder.getElectrovalence()); + chargingOrderListInfoVO.setServiceCharge(chargingOrder.getServiceCharge()); + if (chargingOrder.getElectrovalence()!=null && chargingOrder.getServiceCharge()!=null){ + chargingOrderListInfoVO.setTotal(chargingOrder.getElectrovalence().add(chargingOrder.getServiceCharge())); + }else{ + chargingOrderListInfoVO.setTotal(new BigDecimal("0")); + } + if (chargingOrderListInfoVO.getTotal().compareTo(new BigDecimal("0"))>0){ + if (chargingOrder.getCouponDiscountAmount()!=null&& chargingOrder.getVipDiscountAmount()!=null&& chargingOrder.getSharingAmount()!=null&& chargingOrder.getCommissionAmount()!=null){ + chargingOrderListInfoVO.setRealTotal(chargingOrderListInfoVO.getTotal().subtract(chargingOrder.getCouponDiscountAmount()).subtract(chargingOrder.getVipDiscountAmount()).subtract(chargingOrder.getSharingAmount()).subtract(chargingOrder.getCommissionAmount())); + }else{ + chargingOrderListInfoVO.setRealTotal(chargingOrderListInfoVO.getTotal()); + } + }else{ + chargingOrderListInfoVO.setRealTotal(new BigDecimal("0")); + } chargingOrderListInfoVO.setCode(chargingOrder.getCode()); List<Site> data = siteClient.getSiteByIds(Arrays.asList(chargingOrder.getSiteId())).getData(); if (!data.isEmpty()){ @@ -1555,6 +1572,75 @@ endCharge(orderCode, 0); } + @Override + public List<Map<String, Object>> getByDate(List<Long> chargingOrderIds) { + return this.baseMapper.getByDate(chargingOrderIds); + } + + @Override + public List<Map<String, Object>> queryPower(List<Integer> siteIds) { + return this.baseMapper.queryPower(siteIds); + } + + @Override + public Map<String, Object> qureryPowerLevel(List<Integer> siteIds, ChargingStatisticsQueryDto statisticsQueryDto) { + return this.baseMapper.queryPowerLevel(siteIds,statisticsQueryDto); + } + + @Override + public List<Map<String, Object>> queryOrderCountAndMoneyBySiteIdDate(List<Integer> siteIds) { + return this.baseMapper.queryOrderCountAndMoneyBySiteIdDate(siteIds); + } + + @Override + public List<Map<String, Object>> usersDay() { + return this.baseMapper.usersDay(); + } + + @Override + public List<Map<String, Object>> usersByQuery(ChargingStatisticsQueryDto statisticsQueryDto) { + return this.baseMapper.usersByQuery(statisticsQueryDto); + } + + @Override + public List<Map<String, Object>> getUserTagCount() { + return this.baseMapper.getUserTagCount(); + } + + @Override + public List<Map<String, Object>> getVipCount() { + return this.baseMapper.getVipCount(); + } + + @Override + public List<Map<String, Object>> unitConsumption(ChargingStatisticsQueryDto statisticsQueryDto) { + return this.baseMapper.unitConsumption(statisticsQueryDto); + } + + @Override + public List<Map<String, Object>> carUserMethod() { + return this.baseMapper.carUserMethod(); + } + + @Override + public List<Map<String, Object>> carUserBrand() { + return this.baseMapper.carUserBrand(); + } + + @Override + public Map<String, Object> countLocalCar() { + return this.baseMapper.countLocalCar(); + } + + @Override + public Long getAver(List<Integer> siteIds) { + return this.baseMapper.getAver(siteIds); + } + + @Override + public List<Map<String, Object>> getLevelEvaluate(List<Integer> siteIds) { + return this.baseMapper.getLevelEvaluate(siteIds); + } @Override -- Gitblit v1.7.1