From 465475865bf545f638f21f4a85f5986a47c552ab Mon Sep 17 00:00:00 2001 From: yxFwq <1> Date: 星期六, 13 七月 2024 09:22:22 +0800 Subject: [PATCH] # --- src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java | 46 ++++++++++++++++++++++++++++++---------------- 1 files changed, 30 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java index aeded4d..01ed37a 100644 --- a/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java @@ -1091,8 +1091,6 @@ throw new CoolException("鍙傛暟锛氱墿鏂欑紪鐮� matnr涓虹┖"); }else if (Cools.isEmpty(param.getWeight())){ throw new CoolException("鍙傛暟锛氱墿鏂欓噸閲� wright涓虹┖"); - }else if (Cools.isEmpty(param.getColor())){ - throw new CoolException("鍙傛暟锛氱墿鏂欓鑹� color涓虹┖"); } Mat mat = matService.selectByMatnr(param.getMatnr()); @@ -1126,7 +1124,7 @@ if (Cools.isEmpty(basDevp.getBarcode())){ throw new CoolException("鐮佸灈浣嶇紪鍙� palletizingNo="+param.getStaNo()+" 鎵�澶勭珯鐐规枡绠辩爜寮傚父鐘舵�侊紱鏂欑鐮�==銆嬩负绌�"+basDevp.getBarcode()); } - if (CodeDetectionUtil.barcodeDetection(basDevp.getBarcode(),8)){ + if (!CodeDetectionUtil.barcodeDetection(basDevp.getBarcode(),8)){ throw new CoolException("鐮佸灈浣嶇紪鍙� palletizingNo="+param.getStaNo()+" 鎵�澶勭珯鐐规枡绠辩爜寮傚父鐘舵�侊紱鏂欑鐮侊細"+basDevp.getBarcode()); } @@ -1142,7 +1140,7 @@ WaitPakin waitPakin = new WaitPakin(); waitPakin.sync(mat); -// waitPakin.setBatch(matList.getBatch()); //鏈ㄧ缂栫爜 //鎵规 鍞竴鍊� 绠卞彿 + waitPakin.setBatch(param.getBatch()); //鏈ㄧ缂栫爜 //鎵规 鍞竴鍊� 绠卞彿 // waitPakin.setModel(matList.getModel()); //鍗峰彿 鍞竴鍊� // waitPakin.setBrand(param.getBoxType()); //鏈ㄧ绫诲瀷 waitPakin.setZpallet(basDevp.getBarcode()); //鎵樼洏鐮� @@ -1180,22 +1178,30 @@ throw new CoolException("鍙傛暟锛氬搧鍙� matnr涓虹┖"); }else if (Cools.isEmpty(param.getWeight())){ throw new CoolException("鍙傛暟锛氱墿鏂欓噸閲� wright涓虹┖"); - }else if (Cools.isEmpty(param.getColor())){ - throw new CoolException("鍙傛暟锛氱墿鏂欓鑹� color涓虹┖"); } - List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("matnr", param.getMatnr()).eq("weight", param.getWeight()).eq("color", param.getColor())); + ArrayList<LocDetl> locDetlArrayList = new ArrayList<>(); + List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("matnr", param.getMatnr()).eq("weight", param.getWeight())); if (locDetls.isEmpty()){ locDetls = new ArrayList<LocDetl>(); } - if (locDetls.isEmpty()){ + for (LocDetl locDetl:locDetls){ + LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", locDetl.getLocNo())); + if (locMast.getLocSts().equals("F")){ + locDetlArrayList.add(locDetl); + break; + } + } + if (locDetlArrayList.isEmpty()){ throw new CoolException("鏈壘鍒扮鍚堟潯浠剁殑鐗╂枡鏄庣粏锛氬搧鍙�==銆媘atnr:"+param.getMatnr()+"锛涢噸閲�==銆媤right:"+param.getWeight()+"锛涢鑹�==銆媍olor:"+param.getColor()); } - for (LocDetl locDetl : locDetls){ + for (LocDetl locDetl : locDetlArrayList){ StockOutParam stockOutParam = new StockOutParam(param,locDetl); workService.startupFullTakeStore(stockOutParam, userId); + return; } } + public void smallContainersJar(SmallCompleteParam param) { Long userId = 7777L;//mes //鍒ゆ柇param鍙傛暟 @@ -1209,10 +1215,7 @@ throw new CoolException("鍙傛暟锛氱墿鏂欑紪鐮� matnr涓虹┖"); }else if (Cools.isEmpty(param.getWeight())){ throw new CoolException("鍙傛暟锛氱墿鏂欓噸閲� wright涓虹┖"); - }else if (Cools.isEmpty(param.getColor())){ - throw new CoolException("鍙傛暟锛氱墿鏂欓鑹� color涓虹┖"); } - Mat mat = matService.selectByMatnr(param.getMatnr()); if (Cools.isEmpty(mat)) { // mat = new Mat(); @@ -1244,7 +1247,7 @@ if (Cools.isEmpty(basDevp.getBarcode())){ throw new CoolException("鐮佸灈浣嶇紪鍙� palletizingNo="+param.getStaNo()+" 鎵�澶勭珯鐐规枡绠辩爜寮傚父鐘舵�侊紱鏂欑鐮�==銆嬩负绌�"+basDevp.getBarcode()); } - if (CodeDetectionUtil.barcodeDetection(basDevp.getBarcode(),8)){ + if (!CodeDetectionUtil.barcodeDetection(basDevp.getBarcode(),8)){ throw new CoolException("鐮佸灈浣嶇紪鍙� palletizingNo="+param.getStaNo()+" 鎵�澶勭珯鐐规枡绠辩爜寮傚父鐘舵�侊紱鏂欑鐮侊細"+basDevp.getBarcode()); } @@ -1297,8 +1300,6 @@ throw new CoolException("鍙傛暟锛氱墿鏂欑紪鐮� matnr涓虹┖"); }else if (Cools.isEmpty(param.getWeight())){ throw new CoolException("鍙傛暟锛氱墿鏂欓噸閲� wright涓虹┖"); - }else if (Cools.isEmpty(param.getColor())){ - throw new CoolException("鍙傛暟锛氱墿鏂欓鑹� color涓虹┖"); } Mat mat = matService.selectByMatnr(param.getMatnr()); @@ -1321,7 +1322,7 @@ if (Cools.isEmpty(basDevp.getBarcode())){ throw new CoolException("鐮佸灈浣嶇紪鍙� palletizingNo="+param.getStaNo()+" 鎵�澶勭珯鐐规枡绠辩爜寮傚父鐘舵�侊紱鏂欑鐮�==銆嬩负绌�"+basDevp.getBarcode()); } - if (CodeDetectionUtil.barcodeDetection(basDevp.getBarcode(),8)){ + if (!CodeDetectionUtil.barcodeDetection(basDevp.getBarcode(),8)){ throw new CoolException("鐮佸灈浣嶇紪鍙� palletizingNo="+param.getStaNo()+" 鎵�澶勭珯鐐规枡绠辩爜寮傚父鐘舵�侊紱鏂欑鐮侊細"+basDevp.getBarcode()); } @@ -1369,5 +1370,18 @@ } + public Integer getStaEnd(Integer staNo){ + switch (staNo){ + case 118: + case 119: + return 131; + case 120: + case 121: + return 135; + default: + return staNo; + } + } + /*...........................浜冲窞鐓滄槦..............浠ヤ笂.............浜冲窞鐓滄槦...........................*/ } -- Gitblit v1.9.1