异常类型添加,取消入库判断是否有预占库存

main
Comair 10 months ago
parent 4c9e28db4e
commit d9a9bf107d
  1. 9
      shkj-wms/src/main/java/com/shkj/wcs/plc/PlcEventTask.java
  2. 6
      shkj-wms/src/main/java/com/shkj/wms/service/impl/BusinOutInPlanServiceImpl.java

@ -208,7 +208,12 @@ public class PlcEventTask {
String devpName = property.getDevpName();
String address = property.getAddress();
businPlcException = new BusinPlcException();
if (pointType.equals("99")) {
if (pointType.equals("oneBoverlength")||pointType.equals("oneAoverlength")
||pointType.equals("oneLwide")||pointType.equals("oneRwide")
||pointType.equals("oneHigh")||pointType.equals("ontExit")
||pointType.equals("twoBoverlength")||pointType.equals("twoAoverlength")
||pointType.equals("twoLwide")||pointType.equals("twoRwide")
||pointType.equals("twoHigh")) {
if (pointMap.containsKey(address) && Boolean.valueOf((pointMap.get(address).toString()))) {
businPlcException.setPlcPoint(address);
businPlcException.setExecMsg(devpName);
@ -217,7 +222,7 @@ public class PlcEventTask {
execList.add(businPlcException);
}
}
// iBusinPlcExceptionService.saveBatch(execList);
// iBusinPlcExceptionService.saveBatch(execList);
}
redisTemplate.opsForValue().set(RedisConstant.redisPlcExecMsg + devType, execList);
} catch (Exception e) {

@ -943,8 +943,10 @@ public class BusinOutInPlanServiceImpl extends ServiceImpl<BusinOutInPlanMapper,
.eq(SysStockDetail::getLocationId,one.getLocationId())
.eq(SysStockDetail::getContainerId,one.getContainerId());
SysStockDetail sysStockDetail = sysStockDetailService.getOne(wrapper);
boolean b = sysStockDetailService.removeById(sysStockDetail.getId());
boolean b = true;
if(sysStockDetail != null){
b = sysStockDetailService.removeById(sysStockDetail.getId());
}
if (b){
log.info("入库取消,删除预占库存成功"+JsonUtil.toJSONString(sysStockDetail));
}else {

Loading…
Cancel
Save