|
|
|
|
@ -177,7 +177,7 @@ public class PlcEventTask { |
|
|
|
|
doDevStatus(propertyList,pointMap); |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
log.error("无匹配的设备类型"); |
|
|
|
|
log.info("无匹配的设备类型"); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -316,16 +316,6 @@ public class PlcEventTask { |
|
|
|
|
//请求入库任务ID
|
|
|
|
|
String oneReqPutInTaskId = "",twoReqPutInTaskId = ""; |
|
|
|
|
|
|
|
|
|
//入库失败
|
|
|
|
|
String plcFailedWare = ""; |
|
|
|
|
String plcFailedWareVT = ""; |
|
|
|
|
//失败原因
|
|
|
|
|
String plcFailedReason = ""; |
|
|
|
|
String plcFailedReasonVT = ""; |
|
|
|
|
//入库失败任务号
|
|
|
|
|
String plcFailedTaskId = ""; |
|
|
|
|
String plcFailedTaskIdVT = ""; |
|
|
|
|
|
|
|
|
|
//货位高度
|
|
|
|
|
String oneHignType = "",twoHignType = ""; |
|
|
|
|
String oneHignTypeVT = "",twoHignTypeVT = ""; |
|
|
|
|
@ -461,7 +451,7 @@ public class PlcEventTask { |
|
|
|
|
iBusinOutInPlanService.updPlanStatus(taskId, PlanStatusEnum.DOING.getValue()); |
|
|
|
|
} |
|
|
|
|
//改为入库ID
|
|
|
|
|
redisTemplate.opsForValue().set(RedisConstant.redisContainer, taskId, 2, TimeUnit.SECONDS); |
|
|
|
|
redisTemplate.opsForValue().set(RedisConstant.redisContainer, taskId, 10, TimeUnit.SECONDS); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
@ -473,7 +463,6 @@ public class PlcEventTask { |
|
|
|
|
log.info("2楼入库分配请求时,有出库任务,不可分配,返回"); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
//TODO 需要判断1楼是否有入库任务
|
|
|
|
|
//读取托盘条码内容
|
|
|
|
|
String barcodeValue = pointMap.get(twoPalletAddress).toString(); |
|
|
|
|
//根据托盘条码返回正在执行的任务号
|
|
|
|
|
@ -524,7 +513,7 @@ public class PlcEventTask { |
|
|
|
|
iBusinOutInPlanService.updPlanStatus(taskId, PlanStatusEnum.DOING.getValue()); |
|
|
|
|
} |
|
|
|
|
//改为入库ID
|
|
|
|
|
redisTemplate.opsForValue().set(RedisConstant.redisContainer, taskId, 2, TimeUnit.SECONDS); |
|
|
|
|
redisTemplate.opsForValue().set(RedisConstant.redisContainer, taskId, 10, TimeUnit.SECONDS); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
@ -735,12 +724,12 @@ public class PlcEventTask { |
|
|
|
|
Object taskOutId = redisTemplate.opsForValue().get(RedisConstant.redisTaskOut); |
|
|
|
|
|
|
|
|
|
if (taskOutId !=null && String.valueOf(taskOutId).equals(taskId.toString())){ |
|
|
|
|
log.error("出库完成时,删除redis中的出库任务状态记录"); |
|
|
|
|
log.info("出库完成时,删除redis中的出库任务状态记录"); |
|
|
|
|
redisTemplate.delete(RedisConstant.redisTaskOut); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (taskInId != null && String.valueOf(taskInId).equals(taskId.toString())){ |
|
|
|
|
log.error("入库完成时,删除redis中的入库任务状态记录"); |
|
|
|
|
log.info("入库完成时,删除redis中的入库任务状态记录"); |
|
|
|
|
redisTemplate.delete(RedisConstant.redisTaskIn); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -773,8 +762,6 @@ public class PlcEventTask { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Object taskOutId = redisTemplate.opsForValue().get(RedisConstant.redisTaskOut); |
|
|
|
|
if (taskOutId !=null ){ |
|
|
|
|
log.info("有出库任务在执行,无法下发入库任务:"+taskOutId); |
|
|
|
|
@ -809,13 +796,6 @@ public class PlcEventTask { |
|
|
|
|
String plcToLayer = ""; |
|
|
|
|
String toLayerValueType=""; |
|
|
|
|
|
|
|
|
|
String plcFromRow = ""; |
|
|
|
|
String fromRowValueType=""; |
|
|
|
|
String plcFromColumn = ""; |
|
|
|
|
String fromColumnValueType = ""; |
|
|
|
|
String plcFromLayer = ""; |
|
|
|
|
String fromLayerValueType=""; |
|
|
|
|
|
|
|
|
|
String plcPlatform=""; |
|
|
|
|
String plcPlatformValueType=""; |
|
|
|
|
|
|
|
|
|
@ -836,18 +816,6 @@ public class PlcEventTask { |
|
|
|
|
if (stkProperty.getPointType().equals("101")) { |
|
|
|
|
plcTaskId = stkProperty.getAddress(); |
|
|
|
|
taskIdvalueType = stkProperty.getValueType(); |
|
|
|
|
} else if (stkProperty.getPointType().equals("104")) { |
|
|
|
|
plcFromRow = stkProperty.getAddress(); |
|
|
|
|
fromRowValueType = stkProperty.getValueType(); |
|
|
|
|
} else if (stkProperty.getPointType().equals("103")) { |
|
|
|
|
plcPlatform = stkProperty.getAddress(); |
|
|
|
|
plcPlatformValueType = stkProperty.getValueType(); |
|
|
|
|
} else if (stkProperty.getPointType().equals("105")) { |
|
|
|
|
plcFromColumn = stkProperty.getAddress(); |
|
|
|
|
fromColumnValueType=stkProperty.getValueType(); |
|
|
|
|
} else if (stkProperty.getPointType().equals("106")) { |
|
|
|
|
plcFromLayer = stkProperty.getAddress(); |
|
|
|
|
fromLayerValueType=stkProperty.getValueType(); |
|
|
|
|
} else if (stkProperty.getPointType().equals("108")) { |
|
|
|
|
plcToRow = stkProperty.getAddress(); |
|
|
|
|
toRowValueType = stkProperty.getValueType(); |
|
|
|
|
@ -939,15 +907,6 @@ public class PlcEventTask { |
|
|
|
|
Map<String, Object> plcOrderTypeMap = new HashMap<>(1); |
|
|
|
|
plcOrderTypeMap.put(plcOrderTypeValue, 1); |
|
|
|
|
allMap.put(plcOrderType, plcOrderTypeMap); |
|
|
|
|
/* Map<String, Object> plcFromRowMap = new HashMap<>(1); |
|
|
|
|
plcFromRowMap.put(fromRowValueType, fromRow); |
|
|
|
|
allMap.put(plcFromRow, plcFromRowMap); |
|
|
|
|
Map<String, Object> plcFromColumnMap = new HashMap<>(1); |
|
|
|
|
plcFromColumnMap.put(fromColumnValueType, fromColumn); |
|
|
|
|
allMap.put(plcFromColumn, plcFromColumnMap); |
|
|
|
|
Map<String, Object> plcFromLayerMap = new HashMap<>(1); |
|
|
|
|
plcFromLayerMap.put(fromLayerValueType, fromLayer); |
|
|
|
|
allMap.put(plcFromLayer, plcFromLayerMap);*/ |
|
|
|
|
|
|
|
|
|
//入库起始站台
|
|
|
|
|
Map<String, Object> plcPlatformMap = new HashMap<>(1); |
|
|
|
|
|