From f5e8c627a7082b142c8f4b0fe5bbc17c68680361 Mon Sep 17 00:00:00 2001 From: 野心家 <1051256694@qq.com> Date: 星期一, 28 八月 2023 15:50:52 +0800 Subject: [PATCH] 消防报警移库改出库 --- src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java | 18 +++++++++++++++--- 1 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java b/src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java index 17691fb..5b242eb 100644 --- a/src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java +++ b/src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java @@ -365,6 +365,7 @@ testMast.setChannel(locMast.getChannel()); testMast.setLocNo(wrkMast.getLocNo()); testMast.setModiTime(new Date()); + testMast.setBarcode(locDetl.getMatnr()); if (!testMastService.update(testMast,new EntityWrapper<TestMast>() .eq("loc_no",sourceLoc.getLocNo()) .eq("user_id",locMast.getBarcode()) @@ -376,20 +377,20 @@ } }else { - //娴嬭瘯搴撲綅杞潤缃簱浣� + //娴嬭瘯搴撲綅杞潤缃簱浣嶅拰NG搴撲綅 if (locMast.getLocType1().equals((short)4)){ locMast.setPackStatus(4); //4:NG }else { locMast.setPackStatus(5); //5:闈欑疆涓� } sign=true; - if (locMast.getLocType1()==2 && sourceLoc.getLocType1()==1){ TestMast testMast = testMastService.selectOne(new EntityWrapper<TestMast>() .eq("loc_no",sourceLoc.getLocNo()) .eq("barcode",locDetl.getMatnr()) .eq("status",4) ); testMast.setStatus(5); + testMast.setLocNo(locMast.getLocNo()); testMast.setModiTime(new Date()); if (!testMastService.update(testMast,new EntityWrapper<TestMast>() .eq("loc_no",sourceLoc.getLocNo()) @@ -397,7 +398,7 @@ .eq("status",4))){ throw new CoolException("鏇存敼娴嬭瘯鐘舵�佸け璐�"); } - } + } if (!locMastService.updateById(locMast)) { // exceptionHandle("搴撲綅绉昏浆 ===>> 淇敼鐩爣搴撲綅鐘舵�佸け璐ワ紱[workNo={0}],[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo()); @@ -509,8 +510,19 @@ combParam.setPackSts(1);//OK combParam.setStepSts(7);//娴嬭瘯搴撳嚭搴撳畬鎴� }else if(wrkMast.getStaNo()==204){//NG 鍑哄簱 + //NG鍑哄簱淇敼娴嬭瘯妗g殑鐘舵�佷负5.宸茬Щ搴� + TestMast testMast=testMastService.selectOne(new EntityWrapper<TestMast>() + .eq("user_id",wrkMast.getBarcode()) + .eq("barcode",wrkDetls101.get(0).getMatnr())); combParam.setPackSts(2);//NG combParam.setStepSts(8);//NG鍑哄簱瀹屾垚 + testMast.setStatus(5); + if(!testMastService.update(testMast,new EntityWrapper<TestMast>() + .eq("user_id",wrkMast.getBarcode()) + .eq("barcode",wrkDetls101.get(0).getMatnr()))){ + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + return FAIL.setMsg("鍏ㄦ澘鍑哄簱 ===>> 淇敼娴嬭瘯琛ㄧ姸鎬佷负5澶辫触; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getSourceLocNo() + "]"); + } }else if(wrkMast.getStaNo()==103){//鐩爣绔�103鍑哄簱 combParam.setPackSts(1);//OK combParam.setStepSts(6);//闈欑疆搴撳嚭搴撳畬鎴� -- Gitblit v1.9.1