From 2c99685a60ecc2da91364642b45a636d1af13b1f Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期五, 07 八月 2020 16:53:31 +0800 Subject: [PATCH] # --- src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 28 +++++++++++++++++++++++++--- 1 files changed, 25 insertions(+), 3 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 2aa80f7..d2dcedf 100644 --- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java @@ -60,7 +60,7 @@ // 鏍规嵁杈撻�佺嚎plc閬嶅巻 for (DevpSlave devp : slaveProperties.getDevp()) { // 閬嶅巻鍏ュ簱鍙� - for (DevpSlave.InSta inSta : devp.getInSta()) { + for (DevpSlave.Sta inSta : devp.getInSta()) { // 鑾峰彇鏉$爜 BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, inSta.getBarcode()); String barcode = barcodeThread.getBarcode(); @@ -127,7 +127,11 @@ } // 鏇存柊绔欑偣淇℃伅 涓� 涓嬪彂plc鍛戒护 - staProtocol + barcodeThread.setBarcode(""); + staProtocol.setWorkNO(workNo); + staProtocol.setStaNo(startupDto.getStaNo()); + staProtocol.setPakMk(false); + staProtocol.setInreq1(false); boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task<>(4, staProtocol)); if (!result) { throw new CoolException("鏇存柊plc绔欑偣淇℃伅澶辫触"); @@ -141,8 +145,26 @@ } - public static void main(String[] args) { + /** + * 鎷f枡銆佸苟鏉裤�佺洏鐐瑰啀鍏ュ簱 + */ + public void stnToCrnStnPick(){ + for (DevpSlave devp : slaveProperties.getDevp()) { + // 閬嶅巻鎷f枡鍏ュ簱鍙� + for (DevpSlave.Sta pickSta : devp.getPickSta()) { + // 鑾峰彇鎷f枡鍏ュ簱绔欎俊鎭� + DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId()); + StaProtocol staProtocol = devpThread.getStation().get(pickSta.getStaNo()); + + if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.isInreq1() + && staProtocol.getWorkNO() > 0){ + + } + + } + + } } } -- Gitblit v1.9.1