更新导入电桩接口的地址

This commit is contained in:
panshulin 2021-11-29 16:10:50 +08:00 committed by wen
parent afa483fdb3
commit 26911576aa
2 changed files with 7 additions and 4 deletions

View File

@ -112,7 +112,7 @@ public class XhpcChargingPileController extends BaseController {
* @return * @return
* @throws Exception * @throws Exception
*/ */
@PostMapping("/import") @PostMapping("/importData")
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception { public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception {
ExcelUtil<XhpcChargingPile> util = new ExcelUtil<XhpcChargingPile>(XhpcChargingPile.class); ExcelUtil<XhpcChargingPile> util = new ExcelUtil<XhpcChargingPile>(XhpcChargingPile.class);
List<XhpcChargingPile> pileList = util.importExcel(file.getInputStream()); List<XhpcChargingPile> pileList = util.importExcel(file.getInputStream());

View File

@ -1144,11 +1144,14 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
for (String st:terminal) { for (String st:terminal) {
Map<String, Object> cacheMap = redisService.getCacheMap("gun:" + st); Map<String, Object> cacheMap = redisService.getCacheMap("gun:" + st);
if(!cacheMap.isEmpty()){ if(!cacheMap.isEmpty()){
if ("离线".equals(cacheMap.get("status").toString())){ if (cacheMap.containsKey("status") &&
"离线".equals(cacheMap.get("status").toString())){
offLine++; offLine++;
}else if("故障".equals(cacheMap.get("status").toString())){ }else if(cacheMap.containsKey("status") &&
"故障".equals(cacheMap.get("status").toString())){
fault++; fault++;
}else if("空闲".equals(cacheMap.get("status").toString())){ }else if(cacheMap.containsKey("status") &&
"空闲".equals(cacheMap.get("status").toString())){
freeTime++; freeTime++;
}else{ }else{
charge++; charge++;