|
@@ -173,6 +173,9 @@ public class ChargerButtService {
|
|
|
return;
|
|
|
}
|
|
|
String taskNo = "";
|
|
|
+ // 充电机号
|
|
|
+ Integer chargerNo = chargingSite;
|
|
|
+ boolean xx = !(chargerNo == 1004);
|
|
|
// 从Redis拿到充电信息
|
|
|
Map<String, Object> agvInfoMap = redisCache.getCacheMap(KEY_PREFIX + agvNo);
|
|
|
if (agvInfoMap == null) {
|
|
@@ -181,6 +184,8 @@ public class ChargerButtService {
|
|
|
// 如果已经开始充电 不可重复请求
|
|
|
if (agvInfoMap.get(KEY_AGV_STS) != null
|
|
|
&& agvInfoMap.get(KEY_AGV_STS).toString().equals(AGV_CHARGING_STS.START.toString())) {
|
|
|
+ // 反馈TS正常充电
|
|
|
+ this.feedbackTSLog(taskNo, index, NORMAL, agvNo + "AGV开始充电!", xx);
|
|
|
log.error("充电机已经开始充电,不可重复请求!车号:{},充电机号:{}", agvNo, chargingSite);
|
|
|
return;
|
|
|
}
|
|
@@ -203,9 +208,6 @@ public class ChargerButtService {
|
|
|
// WcsTask
|
|
|
WcsTask wcsTask = wcsTaskService.selectWcsTaskByTaskNo(taskNo);
|
|
|
|
|
|
- // 充电机号
|
|
|
- Integer chargerNo = chargingSite;
|
|
|
- boolean xx = !(chargerNo == 1004);
|
|
|
// 从节点ID 充电机根据不同的ip地址区分,从节点地址默认都是1
|
|
|
Integer slaveId = CHARGING_SLAVEID_MAPPING.getSlaveIdByChargerNo(chargingSite);
|
|
|
// 确认是否故障
|
|
@@ -308,13 +310,13 @@ public class ChargerButtService {
|
|
|
this.feedbackTSLog(taskNo, index, FAULT, agvNo + ",确认信号:无压紧、无充电、归位,失败!", xx);
|
|
|
}
|
|
|
// 判断先前是否收到过4003消息的标识
|
|
|
- if (wcsTask != null) {
|
|
|
- boolean con = wcsTask.getExt4().equals("1") ? true : false;
|
|
|
- if (!con) {
|
|
|
+// if (wcsTask != null) {
|
|
|
+// boolean con = wcsTask.getExt4().equals("1") ? true : false;
|
|
|
+// if (!con) {
|
|
|
// 反馈TS结束充电
|
|
|
this.feedbackTSLog(taskNo, index, AGV_STOP, agvNo + ",AGV结束充电!", xx);
|
|
|
- }
|
|
|
- }
|
|
|
+// }
|
|
|
+// }
|
|
|
// 下发一个TS101的任务
|
|
|
feedbackTS.feedbackTS101(taskNo, index, agvNo);
|
|
|
|
|
@@ -349,11 +351,11 @@ public class ChargerButtService {
|
|
|
wcsTaskService.updateWcsTask(wcsTask);
|
|
|
}
|
|
|
// 设置Redis充电状态为停止
|
|
|
- Map<String, Object> agvInfoMapU = redisCache.getCacheMap(KEY_PREFIX + agvNo);
|
|
|
- if (agvInfoMapU != null) {
|
|
|
- agvInfoMapU.put(KEY_AGV_STS, AGV_CHARGING_STS.STOP.toString());
|
|
|
- redisCache.setCacheMap(KEY_PREFIX + agvNo, agvInfoMapU);
|
|
|
- }
|
|
|
+// Map<String, Object> agvInfoMapU = redisCache.getCacheMap(KEY_PREFIX + agvNo);
|
|
|
+// if (agvInfoMapU != null) {
|
|
|
+// agvInfoMapU.put(KEY_AGV_STS, AGV_CHARGING_STS.STOP.toString());
|
|
|
+// redisCache.setCacheMap(KEY_PREFIX + agvNo, agvInfoMapU);
|
|
|
+// }
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -571,12 +573,12 @@ public class ChargerButtService {
|
|
|
case IS_COMPACTING:
|
|
|
// 确认信号:压紧
|
|
|
con = confirmChargerStatusIsCompacting(xx);
|
|
|
- unit = DateUnit.MINUTE;
|
|
|
+ timeout = 20;
|
|
|
break;
|
|
|
case IS_END:
|
|
|
// 确认信号:无压紧、无充电、归位
|
|
|
con = confirmChargerStatusIsEnd(xx);
|
|
|
- unit = DateUnit.MINUTE;
|
|
|
+ timeout = 20;
|
|
|
break;
|
|
|
default:
|
|
|
break;
|