From 1222c3c5ef13f244e8dff1fb1a14457b77140d6b Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@63.com> Date: 星期三, 26 十月 2022 10:31:50 +0800 Subject: [PATCH] # --- src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 40 +++++++++++++++++++--------------------- 1 files changed, 19 insertions(+), 21 deletions(-) diff --git a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java index 12e7d0a..ebb486a 100644 --- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java @@ -992,15 +992,13 @@ log.error("{}搴撲綅寮傚父锛屾湭妫�绱㈠埌鐩稿簲宸ヤ綔妗o紒", shallowLocNo); } else { if(waitWrkMast.getWrkSts() == 11) { - waitWrkMast.setIoPri(15D); + waitWrkMast.setIoPri(20D); waitWrkMast.setModiTime(new Date()); if (wrkMastMapper.updateById(waitWrkMast) == 0) { log.error("璋冩暣宸ヤ綔妗d紭鍏堢骇澶辫触锛佸伐浣滃彿={}", waitWrkMast.getWrkNo()); } - continue; - } else { - } + continue; } } else if (shallowLoc.getLocSts().equals("F") || shallowLoc.getLocSts().equals("D")) { // 姝ゆ爣璁伴伩鍏嶅娆℃墽琛岀Щ搴撲换鍔� @@ -1029,9 +1027,9 @@ crnCommand.setSourcePosX(sourceSta.getRow1().shortValue()); // 婧愬簱浣嶆帓 crnCommand.setSourcePosY(sourceSta.getBay1().shortValue()); // 婧愬簱浣嶅垪 crnCommand.setSourcePosZ(sourceSta.getLev1().shortValue()); // 婧愬簱浣嶅眰 -// crnCommand.setDestinationPosX(crnStn.getRow().shortValue()); // 鐩爣搴撲綅鎺� -// crnCommand.setDestinationPosY(crnStn.getBay().shortValue()); // 鐩爣搴撲綅鍒� -// crnCommand.setDestinationPosZ(crnStn.getLev().shortValue()); // 鐩爣搴撲綅灞� + crnCommand.setDestinationPosX(crnStn.getRow().shortValue()); // 鐩爣搴撲綅鎺� + crnCommand.setDestinationPosY(crnStn.getBay().shortValue()); // 鐩爣搴撲綅鍒� + crnCommand.setDestinationPosZ(crnStn.getLev().shortValue()); // 鐩爣搴撲綅灞� if (!MessageQueue.offer(SlaveType.Crn, wrkMast.getCrnNo(), new Task(2, crnCommand))) { log.error("鍫嗗灈鏈哄懡浠や笅鍙戝け璐ワ紝鍫嗗灈鏈哄彿={}锛屼换鍔℃暟鎹�={}", wrkMast.getCrnNo(), JSON.toJSON(crnCommand)); } else { @@ -1080,7 +1078,7 @@ } return true; } - // 涓嶆槸鏈�澶栧眰搴撲綅锛岄渶瑕佷娇鐢ㄧ┛姊溅鎼繍鍚庯紝鍐嶅爢鍨涙満鍑哄簱 + // 涓嶆槸鏈�澶栧眰搴撲綅锛岄渶瑕佷娇鐢ㄧ┛姊溅鎼繍鍚庯紝鍐嶅爢鍨涙満鍑哄簱 } else { // 褰撳墠缁勫簱浣嶆槸鍚︽湁绌挎杞� Integer steNo = this.hasCarOfIdle(wrkMast.getSourceLocNo()); @@ -1100,7 +1098,7 @@ steCommand.setTaskNo(wrkMast.getWrkNo()); // 宸ヤ綔鍙� steCommand.setTaskMode(SteTaskModeType.findOutByLoc(wrkMast.getSourceLocNo())); // 浠诲姟妯″紡: 鍘昏繎鐐� 绛夊緟鍫嗗灈鏈哄弶鍙� - steCommand.setRow(Utils.getGroupRow(steProtocol.getRow().intValue()).shortValue()); + steCommand.setRow(Utils.getGroupRow(steProtocol.getRow().intValue(), false).shortValue()); steCommand.setBay(steProtocol.getBay()); steCommand.setLev(steProtocol.getLev()); @@ -1131,7 +1129,7 @@ crnCommand.setTaskNo(wrkMast.getWrkNo().shortValue()); // 宸ヤ綔鍙� crnCommand.setAckFinish((short) 0); // 浠诲姟瀹屾垚纭浣� crnCommand.setTaskMode(CrnTaskModeType.LOC_MOVE); // 浠诲姟妯″紡: 搴撲綅绉昏浆 - crnCommand.setSourcePosX(Utils.getGroupRow(sourceSta.getRow1()).shortValue()); // 婧愬簱浣嶆帓 + crnCommand.setSourcePosX(Utils.getGroupRow(sourceSta.getRow1(), false).shortValue()); // 婧愬簱浣嶆帓 crnCommand.setSourcePosY(sourceSta.getBay1().shortValue()); // 婧愬簱浣嶅垪 crnCommand.setSourcePosZ(sourceSta.getLev1().shortValue()); // 婧愬簱浣嶅眰 crnCommand.setDestinationPosX(crnStn.getRow().shortValue()); // 鐩爣搴撲綅鎺� @@ -1152,7 +1150,7 @@ } } - // 娌℃湁灏忚溅 + // 娌℃湁灏忚溅 } else { if (wrkMast.getWrkSts() == 11L && wrkMast.getSteNo() == null) { // 瀵绘壘鏈�杩戠殑灏忚溅 @@ -1385,7 +1383,7 @@ steCommand.setTaskNo(wrkMast.getWrkNo()); // 宸ヤ綔鍙� steCommand.setTaskMode(SteTaskModeType.findOriginByLoc(steProtocol)); // 浠诲姟妯″紡: 鍘昏繎鐐� 绛夊緟鍫嗗灈鏈哄弶鍙� - steCommand.setRow(Utils.getGroupRow(steProtocol.getRow().intValue()).shortValue()); + steCommand.setRow(Utils.getGroupRow(steProtocol.getRow().intValue(), true).shortValue()); steCommand.setBay(steProtocol.getBay()); steCommand.setLev(steProtocol.getLev()); @@ -1457,17 +1455,17 @@ crnCommand.setTaskNo(wrkMast.getWrkNo().shortValue()); // 宸ヤ綔鍙� crnCommand.setAckFinish((short) 0); // 浠诲姟瀹屾垚纭浣� crnCommand.setTaskMode(CrnTaskModeType.STE_MOVE); // 浠诲姟妯″紡: 搴撲綅绉昏浆 - crnCommand.setSourcePosX(Utils.getGroupRow(steProtocol.getRow().intValue()).shortValue()); // 婧愬簱浣嶆帓 + crnCommand.setSourcePosX(Utils.getGroupRow(steProtocol.getRow().intValue(), true).shortValue()); // 婧愬簱浣嶆帓 crnCommand.setSourcePosY(steProtocol.getBay()); // 婧愬簱浣嶅垪 crnCommand.setSourcePosZ(steProtocol.getLev()); // 婧愬簱浣嶅眰 - crnCommand.setDestinationPosX(Utils.getGroupRow(locMast.getLocNo()).shortValue()); // 鐩爣搴撲綅鎺� + crnCommand.setDestinationPosX(Utils.getGroupRow(locMast.getLocNo(), true).shortValue()); // 鐩爣搴撲綅鎺� crnCommand.setDestinationPosY(locMast.getBay1().shortValue()); // 鐩爣搴撲綅鍒� crnCommand.setDestinationPosZ(locMast.getLev1().shortValue()); // 鐩爣搴撲綅灞� if (!MessageQueue.offer(SlaveType.Crn, wrkMast.getCrnNo(), new Task(2, crnCommand))) { log.error("鍫嗗灈鏈哄懡浠や笅鍙戝け璐ワ紝鍫嗗灈鏈哄彿={}锛屼换鍔℃暟鎹�={}", wrkMast.getCrnNo(), JSON.toJSON(crnCommand)); } else { // 淇敼绌挎杞﹁繍琛屼腑鎺掑垪灞� - steThread.modifyPos(Utils.getGroupRow(locMast.getLocNo()), locMast.getBay1(), locMast.getLev1()); + steThread.modifyPos(Utils.getGroupRow(locMast.getLocNo(), true), locMast.getBay1(), locMast.getLev1()); // 淇敼宸ヤ綔妗g姸鎬� 3.灏忚溅寰呮惉 => 4.杩佸叆灏忚溅 Date now = new Date(); wrkMast.setWrkSts(4L); @@ -1486,17 +1484,17 @@ crnCommand.setTaskNo(wrkMast.getWrkNo().shortValue()); // 宸ヤ綔鍙� crnCommand.setAckFinish((short) 0); // 浠诲姟瀹屾垚纭浣� crnCommand.setTaskMode(CrnTaskModeType.STE_MOVE); // 浠诲姟妯″紡: 搴撲綅绉昏浆 - crnCommand.setSourcePosX(Utils.getGroupRow(steProtocol.getRow().intValue()).shortValue()); // 婧愬簱浣嶆帓 + crnCommand.setSourcePosX(Utils.getGroupRow(steProtocol.getRow().intValue(), true).shortValue()); // 婧愬簱浣嶆帓 crnCommand.setSourcePosY(steProtocol.getBay()); // 婧愬簱浣嶅垪 crnCommand.setSourcePosZ(steProtocol.getLev()); // 婧愬簱浣嶅眰 - crnCommand.setDestinationPosX(Utils.getGroupRow(locMast.getLocNo()).shortValue()); // 鐩爣搴撲綅鎺� + crnCommand.setDestinationPosX(Utils.getGroupRow(locMast.getLocNo(), true).shortValue()); // 鐩爣搴撲綅鎺� crnCommand.setDestinationPosY(locMast.getBay1().shortValue()); // 鐩爣搴撲綅鍒� crnCommand.setDestinationPosZ(locMast.getLev1().shortValue()); // 鐩爣搴撲綅灞� if (!MessageQueue.offer(SlaveType.Crn, wrkMast.getCrnNo(), new Task(2, crnCommand))) { log.error("鍫嗗灈鏈哄懡浠や笅鍙戝け璐ワ紝鍫嗗灈鏈哄彿={}锛屼换鍔℃暟鎹�={}", wrkMast.getCrnNo(), JSON.toJSON(crnCommand)); } else { // 淇敼绌挎杞﹁繍琛屼腑鎺掑垪灞� - steThread.modifyPos(Utils.getGroupRow(locMast.getLocNo()), locMast.getBay1(), locMast.getLev1()); + steThread.modifyPos(Utils.getGroupRow(locMast.getLocNo(), true), locMast.getBay1(), locMast.getLev1()); // 淇敼宸ヤ綔妗g姸鎬� 12.灏忚溅寰呮惉 => 13.杩佸叆灏忚溅 Date now = new Date(); wrkMast.setWrkSts(13L); @@ -1538,17 +1536,17 @@ crnCommand.setTaskNo(wrkMast.getWrkNo().shortValue()); // 宸ヤ綔鍙� crnCommand.setAckFinish((short) 0); // 浠诲姟瀹屾垚纭浣� crnCommand.setTaskMode(CrnTaskModeType.STE_MOVE); // 浠诲姟妯″紡: 搴撲綅绉昏浆 - crnCommand.setSourcePosX(Utils.getGroupRow(steProtocol.getRow().intValue()).shortValue()); // 婧愬簱浣嶆帓 + crnCommand.setSourcePosX(Utils.getGroupRow(steProtocol.getRow().intValue(), true).shortValue()); // 婧愬簱浣嶆帓 crnCommand.setSourcePosY(steProtocol.getBay()); // 婧愬簱浣嶅垪 crnCommand.setSourcePosZ(steProtocol.getLev()); // 婧愬簱浣嶅眰 - crnCommand.setDestinationPosX(Utils.getGroupRow(idleLocNo).shortValue()); // 鐩爣搴撲綅鎺� + crnCommand.setDestinationPosX(Utils.getGroupRow(idleLocNo, true).shortValue()); // 鐩爣搴撲綅鎺� crnCommand.setDestinationPosY((short) Utils.getBay(idleLocNo)); // 鐩爣搴撲綅鍒� crnCommand.setDestinationPosZ((short) Utils.getLev(idleLocNo)); // 鐩爣搴撲綅灞� if (!MessageQueue.offer(SlaveType.Crn, wrkMast.getCrnNo(), new Task(2, crnCommand))) { log.error("鍫嗗灈鏈哄懡浠や笅鍙戝け璐ワ紝鍫嗗灈鏈哄彿={}锛屼换鍔℃暟鎹�={}", wrkMast.getCrnNo(), JSON.toJSON(crnCommand)); } else { // 淇敼绌挎杞﹁繍琛屼腑鎺掑垪灞� - steThread.modifyPos(Utils.getGroupRow(idleLocNo), Utils.getBay(idleLocNo), Utils.getLev(idleLocNo)); + steThread.modifyPos(Utils.getGroupRow(idleLocNo, true), Utils.getBay(idleLocNo), Utils.getLev(idleLocNo)); // 淇敼宸ヤ綔妗g姸鎬� 3.灏忚溅寰呮惉 => 5.杩佸嚭灏忚溅 Date now = new Date(); wrkMast.setWrkSts(5L); -- Gitblit v1.9.1