From 52516230c75988540b51e7160b1f5c03b96583ea Mon Sep 17 00:00:00 2001 From: wu <731351411@qq.com> Date: 星期四, 05 九月 2024 16:09:40 +0800 Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes --- hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/PlcStorageCageTask.java | 30 +++++++++++++++++++++++++----- 1 files changed, 25 insertions(+), 5 deletions(-) diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/PlcStorageCageTask.java b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/PlcStorageCageTask.java index ba4cbc5..2e6b87a 100644 --- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/PlcStorageCageTask.java +++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/PlcStorageCageTask.java @@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; import com.github.yulichang.toolkit.JoinWrappers; import com.github.yulichang.wrapper.MPJLambdaWrapper; @@ -152,6 +151,13 @@ public void plcToHomeEdgFreeCarTask() { Date startDate = new Date(); log.info("澶х悊鐗囩绌鸿溅杩涚墖浠诲姟寮�濮嬫墽琛屾椂闂达細{}", startDate); + PlcParameterObject plcMesObject = S7object.getinstance().PlcMesObject; + String mesD03Address = plcMesObject.getPlcParameter("MESToD03").getValue(); + String mesD05Address = plcMesObject.getPlcParameter("MESToD05").getValue(); + log.info("MESToD03:{},MESToD05:{}", mesD03Address, mesD05Address); + if ("2".equals(mesD03Address) || "2".equals(mesD05Address)) { + log.info("鏈夊惎鍔ㄤ俊鍙凤紝MESToD03:{},MESToD05:{}", mesD03Address, mesD05Address); + } PlcParameterObject plcParameterObject = S7object.getinstance().PlcMesObject; String e01Status = plcParameterObject.getPlcParameter("E01State").getValue(); String d03ToMES = plcParameterObject.getPlcParameter("D03ToMES").getValue(); @@ -594,7 +600,11 @@ if (glassCount < inCarMaxSize) { addFeedTask(glassId, line, Const.BIG_STORAGE_IN_WAIT, widthFirst, heightFirst); } else { - addFeedTask(glassId, line, Const.BIG_STORAGE_IN_RUN, widthFirst, heightFirst); + if (glassCount < inCarMaxSize + 1) { + addFeedTask(glassId, line, Const.BIG_STORAGE_IN_RUN, widthFirst, heightFirst); + } else { + return Boolean.FALSE; + } } } else { flag = Boolean.FALSE; @@ -605,12 +615,20 @@ if (remainWidth >= widthFirst) { if (remainWidth - widthFirst - glassGap >= widthSecond) { if (glassCount < inCarMaxSize) { - addFeedTask(glassId, line, Const.BIG_STORAGE_IN_WAIT, widthFirst, heightSecond); + addFeedTask(glassId, line, Const.BIG_STORAGE_IN_WAIT, widthFirst, heightFirst); } else { - addFeedTask(glassId, line, Const.BIG_STORAGE_IN_RUN, widthFirst, heightSecond); + if (glassCount < inCarMaxSize + 1) { + addFeedTask(glassId, line, Const.BIG_STORAGE_IN_RUN, widthFirst, heightFirst); + } else { + return Boolean.FALSE; + } } } else { - addFeedTask(glassId, line, Const.BIG_STORAGE_IN_RUN, widthFirst, heightSecond); + if (glassCount < inCarMaxSize + 1) { + addFeedTask(glassId, line, Const.BIG_STORAGE_IN_RUN, widthFirst, heightFirst); + } else { + return Boolean.FALSE; + } } } else { flag = Boolean.FALSE; @@ -644,6 +662,8 @@ bigStorageCageFeedTask.setWidth(width); bigStorageCageFeedTask.setHeight(height); bigStorageCageFeedTask.setCreateTime(new Date()); + //鍒犻櫎鐞嗙墖绗艰〃鎷胯蛋/鐮存崯鏁版嵁鏁版嵁 + damageService.deleteByGlassId(glassId); return bigStorageCageFeedTaskService.save(bigStorageCageFeedTask); } -- Gitblit v1.8.0