| | |
| | | private TOrderInvoiceService invoiceService; |
| | | @Resource |
| | | private UploadRealTimeMonitoringDataClient uploadRealTimeMonitoringDataClient; |
| | | @Resource |
| | | private PartnerClient partnerClient; |
| | | @Resource |
| | | private SysUserClient sysUserClient; |
| | | |
| | | |
| | | |
| | |
| | | data.setRecords(res1); |
| | | return R.ok(data); |
| | | } |
| | | public static List<PayOrderDto> testing5(long total, long current, long size, List<PayOrderDto> str){ |
| | | public static List<PayOrderDto> testing5(long total, long current, long size, List<PayOrderDto> str){ |
| | | List<PayOrderDto> result = new ArrayList<>(); |
| | | //获取初始化分页结构 |
| | | com.ruoyi.order.util.Page<PayOrderDto> page = new com.ruoyi.order.util.Page().getPage(total, size, current - 1); |
| | |
| | | } |
| | | |
| | | |
| | | // @PostMapping("/endChargeBillingCharge1") |
| | | // public void endChargeBillingCharge1(@RequestBody TransactionRecordMessageVO vo){ |
| | | // log.info("-------------------停止充电返回账单后计算费用及修改业务状态-------------------:" + vo); |
| | | // chargingOrderService.endChargeBillingCharge1(vo); |
| | | // } |
| | | |
| | | |
| | | |
| | | |
| | | @RequiresPermissions(value = {"/platformRevenueAnalysis"}, logical = Logical.OR) |
| | |
| | | return R.ok(map); |
| | | } |
| | | |
| | | @Resource |
| | | private PartnerClient partnerClient; |
| | | @Resource |
| | | private SysUserClient sysUserClient; |
| | | |
| | | @RequiresPermissions(value = {"/chargeOrderMonitoring"}, logical = Logical.OR) |
| | | @ResponseBody |
| | | @PostMapping(value = "/watch/chargingOrder") |
| | |
| | | } |
| | | List<Map<String,Object>> capMap = chargingOrderService.getchargingCapacity(siteIds,statisticsQueryDto); |
| | | List<TChargingPile> chargingPiles = chargingPileClient.getChargingPileBySiteIds(siteIds).getData(); |
| | | //获取chargingPiles的ratedPower的总和再乘以chargingPiles的数量再乘以24 |
| | | BigDecimal totalRatedPower = chargingPiles.stream().map(TChargingPile::getRatedPower).reduce(BigDecimal.ZERO, BigDecimal::add).multiply(new BigDecimal(chargingPiles.size())).multiply(new BigDecimal(24)); |
| | | |
| | | //将capMap的chargingCapacity除以totalRatedPower保留两位数 |
| | | |
| | | //每日利用率=当日充电度数/(总桩数量*桩总功率*24小时) |
| | | BigDecimal multiply1 = new BigDecimal(chargingPiles.size()).multiply(totalRatedPower).multiply(new BigDecimal(24)); |
| | | capMap.forEach(map -> { |
| | | BigDecimal chargingCapacity = (BigDecimal) map.get("chargingCapacity"); |
| | | BigDecimal result = chargingCapacity.divide(totalRatedPower, 4, RoundingMode.HALF_UP); |
| | | BigDecimal result = chargingCapacity.divide(multiply1, 4, RoundingMode.HALF_UP); |
| | | BigDecimal multiply = result.multiply(new BigDecimal(100)); |
| | | map.put("chargingCapacity", multiply); |
| | | }); |
| | | |
| | | |
| | | |
| | | // |
| | | // 解析 startTime 和 endTime 为 LocalDate |
| | | LocalDate startDate = statisticsQueryDto.getStartTime(); |
| | | LocalDate endDate = statisticsQueryDto.getEndTime(); |
| | |
| | | startDate = startDate.plusDays(1); |
| | | } |
| | | return R.ok(dateRangeStatistics); |
| | | |
| | | |
| | | } |
| | | |
| | | |