From 96c02a0f71f1f42db5f235bc380103bb667ba30a Mon Sep 17 00:00:00 2001 From: pang.jiabao <pang_jiabao@163.com> Date: 星期一, 09 十二月 2024 15:53:05 +0800 Subject: [PATCH] wcs调试修改 --- src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 38 ++++++++++++++++++++++++++++++-------- 1 files changed, 30 insertions(+), 8 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 5a82ad9..f2e9c42 100644 --- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java @@ -270,7 +270,7 @@ param.setLocType1(locTypeDto.getLocType1()); if (inSta.getStaNo() == 102) { param.setLocType2((short) 3); - } else if (inSta.getStaNo() == 211) { + } else if (inSta.getStaNo() == 211 || inSta.getStaNo() == 104) { param.setLocType1((short) 5); param.setLocType2((short) 4); } else if (inSta.getStaNo() == 201) { @@ -418,10 +418,20 @@ staProtocol = staProtocol.clone(); } - if (barcodeThread == null) { + String barcode = ""; + if (barcodeThread == null && staProtocol.getSiteId() != 104) { continue; + } else if (staProtocol.getSiteId() == 104) { + if (staProtocol.getWorkNo() == 9996) { + // 鑾峰彇鍒版嫞鏂欎换鍔$殑鎵樼洏鐮� + WrkMast wrkMast = wrkMastMapper.selectOne(new QueryWrapper<WrkMast>().eq("wrk_sts", 14).eq("io_type", 103).eq("source_sta_no", 104)); + if (wrkMast != null) { + barcode = wrkMast.getBarcode(); + } + } + } else { + barcode = barcodeThread.getBarcode(); } - String barcode = barcodeThread.getBarcode(); // 灏哄妫�娴嬪紓甯� boolean back = false; String errMsg = ""; @@ -910,6 +920,9 @@ crnCommand.setDestinationPosXTwo(locMast.getRow1().shortValue()); // 鐩爣搴撲綅鎺� crnCommand.setDestinationPosYTwo(locMast.getBay1().shortValue()); // 鐩爣搴撲綅鍒� crnCommand.setDestinationPosZTwo(locMast.getLev1().shortValue()); // 鐩爣搴撲綅灞� + if (crnStn.getStaNo() == 202) { + crnCommand.setSourcePosYTwo((short) 6); // 婧愬簱浣嶅垪 + } } else { if (workMode == 1) { crnCommand.setTaskMode(CrnTaskModeType.PAKIN); @@ -922,6 +935,9 @@ crnCommand.setDestinationPosX(locMast.getRow1().shortValue()); // 鐩爣搴撲綅鎺� crnCommand.setDestinationPosY(locMast.getBay1().shortValue()); // 鐩爣搴撲綅鍒� crnCommand.setDestinationPosZ(locMast.getLev1().shortValue()); // 鐩爣搴撲綅灞� + if (workMode == 1 && crnStn.getStaNo() == 202) { + crnCommand.setSourcePosY((short) 6); // 婧愬簱浣嶅垪 + } } // crnCommand.setAckFinish((short) 0); // 浠诲姟瀹屾垚纭浣� @@ -1088,6 +1104,9 @@ crnCommand.setDestinationPosXTwo(crnStn.getRow().shortValue()); // 鐩爣搴撲綅鎺� crnCommand.setDestinationPosYTwo(crnStn.getBay().shortValue()); // 鐩爣搴撲綅鍒� crnCommand.setDestinationPosZTwo(crnStn.getLev().shortValue()); // 鐩爣搴撲綅灞� + if (crnStn.getStaNo() == 202) { + crnCommand.setDestinationPosYTwo((short) 6); // 婧愬簱浣嶅垪 + } } else { if (workMode == 1) { crnCommand.setTaskMode(CrnTaskModeType.PAKIN); @@ -1100,6 +1119,9 @@ crnCommand.setDestinationPosX(crnStn.getRow().shortValue()); // 鐩爣搴撲綅鎺� crnCommand.setDestinationPosY(crnStn.getBay().shortValue()); // 鐩爣搴撲綅鍒� crnCommand.setDestinationPosZ(crnStn.getLev().shortValue()); // 鐩爣搴撲綅灞� + if (workMode == 1 && crnStn.getStaNo() == 202) { + crnCommand.setDestinationPosY((short) 6); // 婧愬簱浣嶅垪 + } } if (!MessageQueue.offer(SlaveType.Crn, wrkMast.getCrnNo(), new Task(2, crnCommand))) { @@ -1540,10 +1562,10 @@ staProtocol = staProtocol.clone(); } - if (barcodeThread == null) { - continue; - } - String barcode = barcodeThread.getBarcode(); +// if (barcodeThread == null) { +// continue; +// } +// String barcode = barcodeThread.getBarcode(); // 灏哄妫�娴嬪紓甯� boolean back = false; String errMsg = ""; @@ -1618,7 +1640,7 @@ param.setLocType1(locTypeDto.getLocType1()); if (emptyInSta.getStaNo() == 102) { param.setLocType2((short) 3); - } else if (emptyInSta.getStaNo() == 211) { + } else if (emptyInSta.getStaNo() == 211 || emptyInSta.getStaNo() == 104) { param.setLocType1((short) 5); param.setLocType2((short) 4); } else if (emptyInSta.getStaNo() == 201) { -- Gitblit v1.9.1