出库确认时,把PLC报警信息清除下

main
judy 8 months ago
parent e50983799d
commit 6653b0e8b3
  1. 2
      shkj-wms/src/main/java/com/shkj/wcs/third/stacker/StkCallUtil.java
  2. 15
      shkj-wms/src/main/java/com/shkj/wms/service/impl/BusinOutInPlanServiceImpl.java

@ -76,7 +76,7 @@ public class StkCallUtil {
Object oneTaskOutId = redisTemplate.opsForValue().get(RedisConstant.redisTaskOutOne);
if (oneTaskOutId !=null && layer==1){
log.info("1F有出库任务在执行,无法下发出库任务:"+oneTaskOutId);
log.info(stkMoveBo.getTaskId()+"1F有出库任务在执行,无法下发出库任务:"+oneTaskOutId);
return Result.err().msg("1F有出库任务在执行,无法下发出库任务");
}

@ -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,6 +673,8 @@ public class BusinOutInPlanServiceImpl extends ServiceImpl<BusinOutInPlanMapper,
twoWcsExitOutExit = plcProperty.getAddress();
twoWcsExitOutExitVt = plcProperty.getValueType();
}
}
Map<String, Object> allMap = new HashMap<>(1);
if (layer == 1) {
//出库拣货尚未拣货时写入异常给plc
@ -686,9 +688,9 @@ public class BusinOutInPlanServiceImpl extends ServiceImpl<BusinOutInPlanMapper,
Boolean errBoolean = plcReadAndWrite.execWrite(plcOperate_dps, JsonUtil.toJSONString(allMap));
if (errBoolean) {
log.info("1楼出库确认后消除报警信息,写入点位成功{}", allMap);
log.info(orderNo+"->1楼出库确认后消除报警信息,写入点位成功{}", allMap);
} else {
log.info("1楼出库确认后消除报警信息,写入点位失败{}", allMap);
log.info(orderNo+"->1楼出库确认后消除报警信息,写入点位失败{}", allMap);
}
} else if (layer == 2) {
//2楼出库尚未拣货时,写入异常给plc
@ -702,10 +704,9 @@ public class BusinOutInPlanServiceImpl extends ServiceImpl<BusinOutInPlanMapper,
Boolean errBoolean = plcReadAndWrite.execWrite(plcOperate_dps, JsonUtil.toJSONString(allMap));
if (errBoolean) {
log.info("2楼出库确认后消除报警信息,写入点位成功{}", allMap);
log.info(orderNo+"->2楼出库确认后消除报警信息,写入点位成功{}", allMap);
} else {
log.info("2楼出库确认后消除报警信息,写入点位失败{}", allMap);
}
log.info(orderNo+"->2楼出库确认后消除报警信息,写入点位失败{}", allMap);
}
}
}

Loading…
Cancel
Save