diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/controller/XhpcChargingPileController.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/controller/XhpcChargingPileController.java index 47eb5d4c..f8879ae8 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/controller/XhpcChargingPileController.java +++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/controller/XhpcChargingPileController.java @@ -112,7 +112,7 @@ public class XhpcChargingPileController extends BaseController { * @return * @throws Exception */ - @PostMapping("/import") + @PostMapping("/importData") public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception { ExcelUtil util = new ExcelUtil(XhpcChargingPile.class); List pileList = util.importExcel(file.getInputStream()); diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingStationServiceImpl.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingStationServiceImpl.java index 2453df16..d0674788 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingStationServiceImpl.java +++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingStationServiceImpl.java @@ -1144,11 +1144,14 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi for (String st:terminal) { Map cacheMap = redisService.getCacheMap("gun:" + st); if(!cacheMap.isEmpty()){ - if ("离线".equals(cacheMap.get("status").toString())){ + if (cacheMap.containsKey("status") && + "离线".equals(cacheMap.get("status").toString())){ offLine++; - }else if("故障".equals(cacheMap.get("status").toString())){ + }else if(cacheMap.containsKey("status") && + "故障".equals(cacheMap.get("status").toString())){ fault++; - }else if("空闲".equals(cacheMap.get("status").toString())){ + }else if(cacheMap.containsKey("status") && + "空闲".equals(cacheMap.get("status").toString())){ freeTime++; }else{ charge++;