未定义的启动错误
This commit is contained in:
parent
ea10b34005
commit
08cb4db090
@ -14,6 +14,7 @@ import org.springframework.context.annotation.Lazy;
|
|||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import static cn.hutool.core.date.DatePattern.NORM_DATETIME_FORMAT;
|
import static cn.hutool.core.date.DatePattern.NORM_DATETIME_FORMAT;
|
||||||
@ -25,7 +26,17 @@ import static com.xhpc.pp.tx.ServiceResult.HEX_01;
|
|||||||
public class RemoteStartReplyDataLogic implements ServiceLogic {
|
public class RemoteStartReplyDataLogic implements ServiceLogic {
|
||||||
|
|
||||||
private static Logger log = LoggerFactory.getLogger(RemoteStartReplyDataLogic.class);
|
private static Logger log = LoggerFactory.getLogger(RemoteStartReplyDataLogic.class);
|
||||||
private static String[] frs = {"无", "设备编号不匹配", "枪已在充电", "设备故障", "设备离线", "未插枪",};
|
private static Map<String, String> frs;
|
||||||
|
|
||||||
|
static {
|
||||||
|
frs = new HashMap<>();
|
||||||
|
frs.put("00", "无");
|
||||||
|
frs.put("01", "设备编号不匹配");
|
||||||
|
frs.put("02", "枪已在充电");
|
||||||
|
frs.put("03", "设备故障");
|
||||||
|
frs.put("04", "设备离线");
|
||||||
|
frs.put("05", "未插枪");
|
||||||
|
}
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private PileOrderService pileOrderService;
|
private PileOrderService pileOrderService;
|
||||||
@ -52,7 +63,8 @@ public class RemoteStartReplyDataLogic implements ServiceLogic {
|
|||||||
REDIS.setCacheMap(gunkey, cacheGun);
|
REDIS.setCacheMap(gunkey, cacheGun);
|
||||||
pileOrderService.pileStartup(orderNo, 1, "启动充电成功");
|
pileOrderService.pileStartup(orderNo, 1, "启动充电成功");
|
||||||
} else {
|
} else {
|
||||||
pileOrderService.pileStartup(orderNo, 2, frs[Integer.parseInt(remoteStartReplyData.getFailReason())]);
|
final String remark = frs.get(remoteStartReplyData.getFailReason());
|
||||||
|
pileOrderService.pileStartup(orderNo, 2, remark == null ? "未知错误" : remark);
|
||||||
}
|
}
|
||||||
return new ServiceResult(false);
|
return new ServiceResult(false);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user