ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TCardChargingOrderServiceImpl.java
@@ -296,8 +296,11 @@ result.put("siteId", order.getSiteId()); result.put("chargingPileId", order.getChargingPileId()); result.put("chargingGunId", order.getChargingGunId()); result.put("startTime", order.getStartTime()); result.put("endTime", order.getEndTime()); // Map 值不走实体字段上的 @JsonFormat,开始/结束时间显式格式化,避免前端展示 ISO 格式(含 T) result.put("startTime", order.getStartTime() == null ? null : order.getStartTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); result.put("endTime", order.getEndTime() == null ? null : order.getEndTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); result.put("chargingCapacity", order.getChargingCapacity()); result.put("paymentAmount", order.getPaymentAmount()); result.put("electrovalence", order.getElectrovalence()); @@ -328,10 +331,15 @@ if (monitoring == null) { monitoring = Collections.emptyList(); } SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); for (UploadRealTimeMonitoringData data : monitoring) { if (data.getOutput_current() != null && data.getOutput_voltage() != null) { data.setPower(data.getOutput_voltage().multiply(data.getOutput_current()).divide(new BigDecimal(1000), 2, BigDecimal.ROUND_HALF_UP)); } // 曲线 X 轴取 createTime:上报报文未携带该字段(入库恒空),按入库时间 create_time 补写 if (data.getCreate_time() != null) { data.setCreateTime(simpleDateFormat.format(data.getCreate_time())); } } result.put("list", monitoring); UploadRealTimeMonitoringData latest = monitoring.isEmpty() ? null : monitoring.get(monitoring.size() - 1); ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TVinChargingOrderServiceImpl.java
@@ -357,8 +357,11 @@ result.put("siteId", order.getSiteId()); result.put("chargingPileId", order.getChargingPileId()); result.put("chargingGunId", order.getChargingGunId()); result.put("startTime", order.getStartTime()); result.put("endTime", order.getEndTime()); // Map 值不走实体字段上的 @JsonFormat,开始/结束时间显式格式化,避免前端展示 ISO 格式(含 T) result.put("startTime", order.getStartTime() == null ? null : order.getStartTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); result.put("endTime", order.getEndTime() == null ? null : order.getEndTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); result.put("chargingCapacity", order.getChargingCapacity()); result.put("paymentAmount", order.getPaymentAmount()); result.put("electrovalence", order.getElectrovalence()); @@ -378,10 +381,15 @@ if (monitoring == null) { monitoring = Collections.emptyList(); } SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); for (UploadRealTimeMonitoringData data : monitoring) { if (data.getOutput_current() != null && data.getOutput_voltage() != null) { data.setPower(data.getOutput_voltage().multiply(data.getOutput_current()).divide(new BigDecimal(1000), 2, BigDecimal.ROUND_HALF_UP)); } // 曲线 X 轴取 createTime:上报报文未携带该字段(入库恒空),按入库时间 create_time 补写 if (data.getCreate_time() != null) { data.setCreateTime(simpleDateFormat.format(data.getCreate_time())); } } UploadRealTimeMonitoringData latestMonitoring = monitoring.isEmpty() ? null : monitoring.get(monitoring.size() - 1); result.put("cdElectronic", latestMonitoring == null ? null : latestMonitoring.getOutput_current());