From 3d3b15dd23f91545da5f7099676924caded08b08 Mon Sep 17 00:00:00 2001 From: lsh <lsh123456> Date: 星期五, 30 十二月 2022 08:06:52 +0800 Subject: [PATCH] # --- src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 49 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 46 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 85b2613..b609a62 100644 --- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java @@ -150,11 +150,31 @@ // 鍒ゆ柇閲嶅宸ヤ綔妗� WrkMast wrkMast = wrkMastMapper.selectPakInStep1(inSta.getStaNo(), barcode); + WrkMast wrkMast1 = wrkMastMapper.selectPakInStepBarcode(barcode); + if (wrkMast1 !=null){ + if (wrkMast1.getIoType()==103 || wrkMast1.getIoType()==107 || wrkMast1.getIoType()==104){ + continue; + } + } if (wrkMast != null) { log.error("宸ヤ綔妗d腑宸插瓨鍦ㄨ绔欑姸鎬佷负锛� 2.璁惧涓婅蛋 锛夌殑鏁版嵁,宸ヤ綔鍙�={}", wrkMast.getWrkNo()); - if (inSta.getStaNo()==100 || inSta.getStaNo()==108 || inSta.getStaNo()==116){ + if (inSta.getStaNo()==101 || inSta.getStaNo()==109 || inSta.getStaNo()==117){ staProtocol.setWorkNo((short)9999); staProtocol.setStaNo((short)100); + devpThread.setPakMk(staProtocol.getSiteId(), false); + boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); + if (!result) { + throw new CoolException("鏇存柊plc绔欑偣淇℃伅澶辫触"); + } + }else if (inSta.getStaNo()==201 || inSta.getStaNo()==207 || inSta.getStaNo()==213){ + staProtocol.setWorkNo((short)9999); + if (inSta.getStaNo()==201){ + staProtocol.setStaNo((short)200); + }else if (inSta.getStaNo()==207){ + staProtocol.setStaNo((short)206); + }else if (inSta.getStaNo()==213){ + staProtocol.setStaNo((short)212); + } devpThread.setPakMk(staProtocol.getSiteId(), false); boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); if (!result) { @@ -199,6 +219,29 @@ } } else { log.error("璇锋眰鎺ュ彛澶辫触锛侊紒锛乽rl锛歿}锛況equest锛歿}锛況esponse锛歿}", wmsUrl + "/rpc/pakin/loc/v1", JSON.toJSONString(param), response); + if (inSta.getStaNo()==101 || inSta.getStaNo()==109 || inSta.getStaNo()==117){ + staProtocol.setWorkNo((short)9999); + staProtocol.setStaNo((short)100); + devpThread.setPakMk(staProtocol.getSiteId(), false); + boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); + if (!result) { + throw new CoolException("鏇存柊plc绔欑偣淇℃伅澶辫触"); + } + }else if (inSta.getStaNo()==201 || inSta.getStaNo()==207 || inSta.getStaNo()==213){ + staProtocol.setWorkNo((short)9999); + if (inSta.getStaNo()==201){ + staProtocol.setStaNo((short)200); + }else if (inSta.getStaNo()==207){ + staProtocol.setStaNo((short)206); + }else if (inSta.getStaNo()==213){ + staProtocol.setStaNo((short)212); + } + devpThread.setPakMk(staProtocol.getSiteId(), false); + boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); + if (!result) { + throw new CoolException("鏇存柊plc绔欑偣淇℃伅澶辫触"); + } + } } @@ -366,8 +409,8 @@ // if (devpThread.ioMode != IoModeType.PAKIN_MODE) { continue; } if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.isInEnable() && staProtocol.isPakMk()) { -// WrkMast wrkMast = wrkMastMapper.selectPickStep(barcode); - WrkMast wrkMast = wrkMastMapper.selectPakInStep3(staProtocol.getWorkNo().intValue()); + WrkMast wrkMast = wrkMastMapper.selectPickStep(barcode); +// WrkMast wrkMast = wrkMastMapper.selectPakInStep3(staProtocol.getWorkNo().intValue()); if (wrkMast == null) { // 鏃犳嫞鏂欐暟鎹� continue; -- Gitblit v1.9.1