diff --git a/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/logic/HBLogic.java b/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/logic/HBLogic.java index 6749006b..2c883a82 100644 --- a/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/logic/HBLogic.java +++ b/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/logic/HBLogic.java @@ -21,6 +21,8 @@ public class HBLogic implements ServiceLogic { private static Logger log = LoggerFactory.getLogger(HBLogic.class); + public static final String[] stable = {"空闲", "故障"}; + @Override public ServiceResult service(ServiceParameter sp) throws Exception { @@ -30,8 +32,8 @@ public class HBLogic implements ServiceLogic { String gunStatus = (String) req.get("gunStatus"); int gunStatusInt = Integer.parseInt(gunStatus); String gunkey = "gun:".concat(pileNo).concat(gunId); - Map cacheGun = REDIS.getCacheMap(gunkey); - cacheGun.put("status", gunStatusInt); + Map cacheGun = REDIS.getCacheMap(gunkey); + cacheGun.put("status", stable[gunStatusInt]); REDIS.setCacheMap(gunkey, cacheGun); String skey = gunkey.concat(".seqhex"); String seq = seqHex(skey);