From 870bbe6cb445bda71a16e019546d926dbd89cab1 Mon Sep 17 00:00:00 2001 From: Junjie <fallin.jie@qq.com> Date: 星期二, 25 七月 2023 10:40:58 +0800 Subject: [PATCH] 捡料 --- src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 28 +++++++++++++--------------- 1 files changed, 13 insertions(+), 15 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 9f8f167..cd12c60 100644 --- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java @@ -203,25 +203,15 @@ // 杩囨护鐩樼偣/鎷f枡/骞舵澘浠诲姟 WrkMast wrkMast1 = wrkMastMapper.selectPickStepByBarcode(barcode); if (null != wrkMast1) { - // plc 澶勭悊 - barcodeThread.setBarcode(""); - staProtocol.setWorkNo(wrkMast1.getWrkNo().shortValue()); - staProtocol.setStaNo(wrkMast1.getStaNo().shortValue()); - devpThread.setPakMk(staProtocol.getSiteId(), false); - - boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); - if (!result) { - throw new CoolException("鏇存柊plc绔欑偣淇℃伅澶辫触"); - } continue; } // 鍒ゆ柇閲嶅宸ヤ綔妗� -// WrkMast wrkMast = wrkMastMapper.selectPakInStep1(inSta.getStaNo(), barcode); -// if (wrkMast != null) { -// News.error("宸ヤ綔妗d腑宸插瓨鍦ㄨ绔欑姸鎬佷负锛� 2.璁惧涓婅蛋 锛夌殑鏁版嵁,宸ヤ綔鍙�={}", wrkMast.getWrkNo()); -// continue; -// } + WrkMast wrkMast2 = wrkMastMapper.selectPakInStep1(inSta.getStaNo(), barcode); + if (wrkMast2 != null) { + News.error("宸ヤ綔妗d腑宸插瓨鍦ㄨ绔欑姸鎬佷负锛� 2.璁惧涓婅蛋 锛夌殑鏁版嵁,宸ヤ綔鍙�={}", wrkMast2.getWrkNo()); + continue; + } try { LocTypeDto locTypeDto = new LocTypeDto(staProtocol); @@ -531,6 +521,14 @@ throw new CoolException(wrkMast.getWrkNo() + "鏇存柊宸ヤ綔妗f暟鎹姸鎬佸け璐�"); } + // 淇敼搴撲綅鐘舵�� Q.鎷f枡/鐩樼偣/骞舵澘鍐嶅叆搴� + LocMast locMast = locMastService.selectById(wrkMast.getLocNo()); + locMast.setLocSts("Q"); + locMast.setModiTime(new Date()); + if (!locMastService.updateById(locMast)) { + throw new CoolException("淇敼搴撲綅鐘舵�佸け璐�"); + } + // 鏇存柊绔欑偣淇℃伅 涓� 涓嬪彂plc鍛戒护 staProtocol.setWorkNo(wrkMast.getWrkNo().shortValue()); staProtocol.setStaNo(wrkMast.getStaNo().shortValue()); -- Gitblit v1.9.1