From e67cb04af87e32a19c2b1e0756e6e8c6d0c7d1f8 Mon Sep 17 00:00:00 2001 From: lsh <lsh@163.com> Date: 星期日, 12 一月 2025 14:50:18 +0800 Subject: [PATCH] # --- src/main/java/com/zy/common/service/CommonService.java | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 51 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/zy/common/service/CommonService.java b/src/main/java/com/zy/common/service/CommonService.java index 14ea695..885c12e 100644 --- a/src/main/java/com/zy/common/service/CommonService.java +++ b/src/main/java/com/zy/common/service/CommonService.java @@ -160,7 +160,13 @@ throw new CoolException("鏁版嵁寮傚父锛岃鑱旂郴绠$悊鍛�"); } // ===============>>>> 寮�濮嬫墽琛� - curRow = rowLastno.getCurrentRow(); + if (sourceStaNo == 118 || sourceStaNo == 122){ + curRow = rowLastno.getCurrentRow1(); + } else if (sourceStaNo == 120 || sourceStaNo == 121 || sourceStaNo == 123 || sourceStaNo == 171){ + curRow = rowLastno.getCurrentRow2(); + } else { + curRow = rowLastno.getCurrentRow(); + } if (!Cools.isEmpty(moveCrnNo) && moveCrnNo!=0){ crnNumber = moveCrnNo; @@ -172,7 +178,7 @@ } //姝ょ▼搴忕敤浜庝紭鍖栧爢鍨涙満寮傚父鏃剁殑杩愯鏃堕棿 - for (int i = times; i < crnNumber; i++) { + for (int i = times; i < crnNumber*2; i++) { int[] locNecessaryParameters = Utils.LocNecessaryParameters(whsType, curRow, crnNumber); curRow = locNecessaryParameters[1]; crnNo = locNecessaryParameters[2]; @@ -181,6 +187,7 @@ nearRow = locNecessaryParameters[3]; List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", nearRow).eq("loc_sts", "O")); if (locMasts.size()<=10){ + nearRow = 0; times++; continue; } @@ -223,10 +230,20 @@ if (locMast2.getCrnNo()==1 || locMast2.getCrnNo()==6){ continue; } + if (sourceStaNo == 118 || sourceStaNo == 122){ + if (locMast2.getCrnNo()>3){ + continue; + } + } else if (sourceStaNo == 120 || sourceStaNo == 121 || sourceStaNo == 123 || sourceStaNo == 171){ + if (locMast2.getCrnNo()<4){ + continue; + } + } } LocDetl locDetl = locDetlService.selectOne(new EntityWrapper<LocDetl>().eq("loc_no", locMast2.getLocNo())); if (!Cools.isEmpty(locDetl) && matnr.equals(locDetl.getMatnr())) { locMast = locMast1; + crnNo = locMast.getCrnNo(); break; } } @@ -244,6 +261,15 @@ if (sourceStaNo<200){ if (shallowLoc.getCrnNo()==1 || shallowLoc.getCrnNo()==6){ continue; + } + if (sourceStaNo == 118 || sourceStaNo == 122){ + if (shallowLoc.getCrnNo()>3){ + continue; + } + } else if (sourceStaNo == 120 || sourceStaNo == 121 || sourceStaNo == 123 || sourceStaNo == 171){ + if (shallowLoc.getCrnNo()<4){ + continue; + } } } if (VersionUtils.locMoveCheckLocTypeComplete(shallowLoc, locTypeDto)) { @@ -329,7 +355,13 @@ // 鏇存柊搴撲綅鎺掑彿 if (Utils.BooleanWhsTypeSta(whsType, staDescId) && Cools.isEmpty(locMast)) { - rowLastno.setCurrentRow(curRow); + if (sourceStaNo == 118 || sourceStaNo == 122){ + rowLastno.setCurrentRow1(curRow); + } else if (sourceStaNo == 120 || sourceStaNo == 121 || sourceStaNo == 123 || sourceStaNo == 171){ + rowLastno.setCurrentRow2(curRow); + } else { + rowLastno.setCurrentRow(curRow); + } rowLastnoService.updateById(rowLastno); } @@ -426,7 +458,13 @@ throw new CoolException("鏁版嵁寮傚父锛岃鑱旂郴绠$悊鍛�"); } // ===============>>>> 寮�濮嬫墽琛� - curRow = rowLastno.getCurrentRow(); + if (sourceStaNo == 118 || sourceStaNo == 122){ + curRow = rowLastno.getCurrentRow1(); + } else if (sourceStaNo == 120 || sourceStaNo == 121 || sourceStaNo == 123 || sourceStaNo == 171){ + curRow = rowLastno.getCurrentRow2(); + } else { + curRow = rowLastno.getCurrentRow(); + } if (!Cools.isEmpty(moveCrnNo) && moveCrnNo!=0){ crnNumber = moveCrnNo; @@ -448,6 +486,7 @@ nearRow = locNecessaryParameters[3]; List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", nearRow).eq("loc_sts", "O")); if (locMasts.size()<=10){ + nearRow = 0; times++; continue; } @@ -461,6 +500,7 @@ nearRow = locNecessaryParameters[3]; List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", nearRow).eq("loc_sts", "O")); if (locMasts.size()<=10){ + nearRow = 0; times++; continue; } @@ -598,7 +638,13 @@ // 鏇存柊搴撲綅鎺掑彿 if (Utils.BooleanWhsTypeSta(whsType, staDescId) && Cools.isEmpty(locMast)) { - rowLastno.setCurrentRow(curRow); + if (sourceStaNo == 118 || sourceStaNo == 122){ + rowLastno.setCurrentRow1(curRow); + } else if (sourceStaNo == 120 || sourceStaNo == 121 || sourceStaNo == 123 || sourceStaNo == 171){ + rowLastno.setCurrentRow2(curRow); + } else { + rowLastno.setCurrentRow(curRow); + } rowLastnoService.updateById(rowLastno); } -- Gitblit v1.9.1