| | |
| | | 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()){ |
| | |
| | | return res; |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> countBySource(List<Integer> siteIds) { |
| | | return this.baseMapper.countBySource(siteIds); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> equipmentUserType1(List<Integer> siteIds, ChargingStatisticsQueryDto statisticsQueryDto) { |
| | | return this.baseMapper.equipmentUserType1(siteIds,statisticsQueryDto); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> equipmentUserType2(List<Integer> siteIds, ChargingStatisticsQueryDto statisticsQueryDto) { |
| | | return this.baseMapper.equipmentUserType2(siteIds,statisticsQueryDto); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> equipmentMapbroke1(List<Integer> siteIds, ChargingStatisticsQueryDto statisticsQueryDto) { |
| | | return this.baseMapper.equipmentMapbroke1(siteIds,statisticsQueryDto); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> equipmentMapbroke2(List<Integer> siteIds, ChargingStatisticsQueryDto statisticsQueryDto) { |
| | | return this.baseMapper.equipmentMapbroke2(siteIds,statisticsQueryDto); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> equipmentMapOut1(List<Integer> siteIds, ChargingStatisticsQueryDto statisticsQueryDto) { |
| | | return this.baseMapper.equipmentMapOut1(siteIds,statisticsQueryDto); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> equipmentMapOut2(List<Integer> siteIds, ChargingStatisticsQueryDto statisticsQueryDto) { |
| | | return this.baseMapper.equipmentMapOut2(siteIds,statisticsQueryDto); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> needElec(List<Integer> siteIds, ChargingStatisticsQueryDto statisticsQueryDto) { |
| | | return this.baseMapper.needElec(siteIds,statisticsQueryDto); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getHourType(List<Integer> siteIds, ChargingDetailQueryDto statisticsQueryDto) { |
| | | return this.baseMapper.getHourType(siteIds,statisticsQueryDto); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getDateType(List<Integer> siteIds, ChargingDetailQueryDto statisticsQueryDto) { |
| | | return this.baseMapper.getDateType(siteIds,statisticsQueryDto); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getMonthType(List<Integer> siteIds, ChargingDetailQueryDto statisticsQueryDto) { |
| | | return this.baseMapper.getMonthType(siteIds,statisticsQueryDto); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getchargingCapacity(List<Integer> siteIds, ChargingDetailQueryDto statisticsQueryDto) { |
| | | return this.baseMapper.getchargingCapacity(siteIds,statisticsQueryDto); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> countAllUserData() { |
| | | return this.baseMapper.countAllUserData(); |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | // String format = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy年MM月dd日HH:mm:ss")); |
| | | // String format1 = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy年MM月dd日HH:mm:ss")); |