|
|
|
|
@ -633,7 +633,7 @@ public class BusinOutInPlanServiceImpl extends ServiceImpl<BusinOutInPlanMapper, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//出库成功写入wcs异常点位为0
|
|
|
|
|
outEliminateAlarms(layer); |
|
|
|
|
outEliminateAlarms(layer,orderNo); |
|
|
|
|
Long containerId = updList.get(0).getContainerId(); |
|
|
|
|
redisTemplate.delete(RedisConstant.redisOutBound + containerId); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
@ -646,7 +646,7 @@ public class BusinOutInPlanServiceImpl extends ServiceImpl<BusinOutInPlanMapper, |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void outEliminateAlarms(Integer layer) { |
|
|
|
|
public void outEliminateAlarms(Integer layer,Long orderNo) { |
|
|
|
|
Long plcId = 51L; |
|
|
|
|
PlcOperate plcOperate_dps = plcInit.getPlcOperate_dps(); |
|
|
|
|
PLCReadAndWrite plcReadAndWrite = new PLCReadAndWrite(); |
|
|
|
|
@ -673,39 +673,40 @@ public class BusinOutInPlanServiceImpl extends ServiceImpl<BusinOutInPlanMapper, |
|
|
|
|
twoWcsExitOutExit = plcProperty.getAddress(); |
|
|
|
|
twoWcsExitOutExitVt = plcProperty.getValueType(); |
|
|
|
|
} |
|
|
|
|
Map<String, Object> allMap = new HashMap<>(1); |
|
|
|
|
if (layer == 1) { |
|
|
|
|
//出库拣货尚未拣货时写入异常给plc
|
|
|
|
|
Map<String, Integer> oneWcsErrExitMap = new HashMap<>(1); |
|
|
|
|
oneWcsErrExitMap.put(oneWcsErrExitVt, 0); |
|
|
|
|
allMap.put(oneWcsErrExit, oneWcsErrExitMap); |
|
|
|
|
|
|
|
|
|
Map<String, Integer> oneWcsExitOutExitMap = new HashMap<>(1); |
|
|
|
|
oneWcsExitOutExitMap.put(oneWcsExitOutExitVt, 0); |
|
|
|
|
allMap.put(oneWcsExitOutExit, oneWcsExitOutExitMap); |
|
|
|
|
|
|
|
|
|
Boolean errBoolean = plcReadAndWrite.execWrite(plcOperate_dps, JsonUtil.toJSONString(allMap)); |
|
|
|
|
if (errBoolean) { |
|
|
|
|
log.info("1楼出库确认后消除报警信息,写入点位成功{}", allMap); |
|
|
|
|
} else { |
|
|
|
|
log.info("1楼出库确认后消除报警信息,写入点位失败{}", allMap); |
|
|
|
|
} |
|
|
|
|
} else if (layer == 2) { |
|
|
|
|
//2楼出库尚未拣货时,写入异常给plc
|
|
|
|
|
Map<String, Integer> twoWcsErrExitMap = new HashMap<>(1); |
|
|
|
|
twoWcsErrExitMap.put(twoWcsErrExitVt, 0); |
|
|
|
|
allMap.put(twoWcsErrExit, twoWcsErrExitMap); |
|
|
|
|
|
|
|
|
|
Map<String, Integer> twoWcsErrExitOutMap = new HashMap<>(1); |
|
|
|
|
twoWcsErrExitOutMap.put(twoWcsExitOutExitVt, 0); |
|
|
|
|
allMap.put(twoWcsExitOutExit, twoWcsErrExitOutMap); |
|
|
|
|
|
|
|
|
|
Boolean errBoolean = plcReadAndWrite.execWrite(plcOperate_dps, JsonUtil.toJSONString(allMap)); |
|
|
|
|
if (errBoolean) { |
|
|
|
|
log.info("2楼出库确认后消除报警信息,写入点位成功{}", allMap); |
|
|
|
|
} else { |
|
|
|
|
log.info("2楼出库确认后消除报警信息,写入点位失败{}", allMap); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Map<String, Object> allMap = new HashMap<>(1); |
|
|
|
|
if (layer == 1) { |
|
|
|
|
//出库拣货尚未拣货时写入异常给plc
|
|
|
|
|
Map<String, Integer> oneWcsErrExitMap = new HashMap<>(1); |
|
|
|
|
oneWcsErrExitMap.put(oneWcsErrExitVt, 0); |
|
|
|
|
allMap.put(oneWcsErrExit, oneWcsErrExitMap); |
|
|
|
|
|
|
|
|
|
Map<String, Integer> oneWcsExitOutExitMap = new HashMap<>(1); |
|
|
|
|
oneWcsExitOutExitMap.put(oneWcsExitOutExitVt, 0); |
|
|
|
|
allMap.put(oneWcsExitOutExit, oneWcsExitOutExitMap); |
|
|
|
|
|
|
|
|
|
Boolean errBoolean = plcReadAndWrite.execWrite(plcOperate_dps, JsonUtil.toJSONString(allMap)); |
|
|
|
|
if (errBoolean) { |
|
|
|
|
log.info(orderNo+"->1楼出库确认后消除报警信息,写入点位成功{}", allMap); |
|
|
|
|
} else { |
|
|
|
|
log.info(orderNo+"->1楼出库确认后消除报警信息,写入点位失败{}", allMap); |
|
|
|
|
} |
|
|
|
|
} else if (layer == 2) { |
|
|
|
|
//2楼出库尚未拣货时,写入异常给plc
|
|
|
|
|
Map<String, Integer> twoWcsErrExitMap = new HashMap<>(1); |
|
|
|
|
twoWcsErrExitMap.put(twoWcsErrExitVt, 0); |
|
|
|
|
allMap.put(twoWcsErrExit, twoWcsErrExitMap); |
|
|
|
|
|
|
|
|
|
Map<String, Integer> twoWcsErrExitOutMap = new HashMap<>(1); |
|
|
|
|
twoWcsErrExitOutMap.put(twoWcsExitOutExitVt, 0); |
|
|
|
|
allMap.put(twoWcsExitOutExit, twoWcsErrExitOutMap); |
|
|
|
|
|
|
|
|
|
Boolean errBoolean = plcReadAndWrite.execWrite(plcOperate_dps, JsonUtil.toJSONString(allMap)); |
|
|
|
|
if (errBoolean) { |
|
|
|
|
log.info(orderNo+"->2楼出库确认后消除报警信息,写入点位成功{}", allMap); |
|
|
|
|
} else { |
|
|
|
|
log.info(orderNo+"->2楼出库确认后消除报警信息,写入点位失败{}", allMap); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|