|
|
|
|
@ -292,6 +292,11 @@ public class PlcEventTask { |
|
|
|
|
} else if (pointType.equals("retInOutSwit")) { |
|
|
|
|
retInOutSwit = plcProperty.getAddress(); |
|
|
|
|
retInOutSwitVt = plcProperty.getPointType(); |
|
|
|
|
} else if (pointType.equals("stk")) { |
|
|
|
|
stk = plcProperty.getAddress(); |
|
|
|
|
} else if (pointType.equals("retStk")) { |
|
|
|
|
retStk = plcProperty.getAddress(); |
|
|
|
|
retStkVt = plcProperty.getPointType(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
@ -432,9 +437,38 @@ public class PlcEventTask { |
|
|
|
|
log.info("出入库切换时,写入的命令返回结果:"+inOutSwitBoolean.toString()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//叠盘机
|
|
|
|
|
if (pointMap.containsKey(stk) && Boolean.valueOf(pointMap.get(stk).toString())) { |
|
|
|
|
WcsIncomingTaskRequestBody body = new WcsIncomingTaskRequestBody(); |
|
|
|
|
body.setStation("叠盘机点位"); |
|
|
|
|
body.setTaskType(TaskTypeEnum.In.getValue()); |
|
|
|
|
body.setBussinessType(BusinTaskTypeEnum.stockIn.getValue()); |
|
|
|
|
body.setCreateDt(new Date().toString()); |
|
|
|
|
//调用agv接口查询库区状态
|
|
|
|
|
Object[] areaStatus = {}; |
|
|
|
|
body.setAreaStatus(areaStatus); |
|
|
|
|
WcsResponseVo vo = wcsUtil.wcsIncomingTaskRequest(body); |
|
|
|
|
log.info("空托申请wz-wcs返回:" + vo.getHeader()); |
|
|
|
|
Map<String, Object> allMap = new HashMap<>(1); |
|
|
|
|
Map<String, Integer> reqMap = new HashMap<>(1); |
|
|
|
|
|
|
|
|
|
if (Result.isOk(vo.getHeader().getMsgCode())) { |
|
|
|
|
reqMap.put(retStkVt,1); |
|
|
|
|
} else { |
|
|
|
|
reqMap.put(retStkVt,0); |
|
|
|
|
} |
|
|
|
|
allMap.put(retStk, reqMap); |
|
|
|
|
String allMapJson = JsonUtil.toJSONString(allMap); |
|
|
|
|
log.info("叠盘机叠满上报时,给输送线写命令数据:{}",allMapJson); |
|
|
|
|
Boolean bCR01Boolean = plcReadAndWrite.execWrite(plcOperate, allMapJson); |
|
|
|
|
log.info("叠盘机叠满上报时,写入的命令返回结果:"+bCR01Boolean.toString()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.error("dpsRealTimeTask:" + e.getMessage()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|