From 8ea4c0fa09a08ec40e5f453bcde0fc7397b15b0d Mon Sep 17 00:00:00 2001
From: zzgtfwq <zzgtfwq>
Date: 星期二, 09 十二月 2025 15:08:25 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/utils/Utils.java | 60 +++++++++++++++++++++++++++++
src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java | 18 +++++++-
src/main/java/com/zy/common/web/WcsController.java | 22 +++++++++-
src/main/java/com/zy/common/service/CommonService.java | 7 ++-
4 files changed, 97 insertions(+), 10 deletions(-)
diff --git a/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
index a25fd6d..d922141 100644
--- a/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
@@ -119,7 +119,12 @@
// List<String> matnrs = param.getList().stream().map(FullStoreParam.MatCodeStore::getMatnr).distinct().collect(Collectors.toList());
// List<String> batchs = param.getList().stream().map(FullStoreParam.MatCodeStore::getBatch).distinct().collect(Collectors.toList());
FindLocNoAttributeVo findLocNoAttributeVo = new FindLocNoAttributeVo(param.getList().get(0));
- StartupDto dto = commonService.getLocNo(1, param.getDevpNo(), findLocNoAttributeVo,locTypeDto);
+ StartupDto dto = null;
+ try{
+ dto = commonService.getLocNo(1, param.getDevpNo(), findLocNoAttributeVo,locTypeDto);
+ } catch (Exception e){
+ throw new CoolException("鏌ヨ搴撲綅澶辫触锛侊紒==銆�"+e.getMessage());
+ }
if (Cools.isEmpty(dto)){
throw new CoolException("鏌ヨ搴撲綅澶辫触锛侊紒==銆媠tartupFullPutStore ==銆� commonService.getLocNo");
}
@@ -658,8 +663,15 @@
// 妫�绱㈠簱浣�
LocTypeDto locTypeDto = new LocTypeDto(sourceStaNo);
FindLocNoAttributeVo findLocNoAttributeVo = new FindLocNoAttributeVo();
-
- StartupDto dto = commonService.getLocNo( 10, devpNo, findLocNoAttributeVo, locTypeDto);
+ StartupDto dto = null;
+ try{
+ dto = commonService.getLocNo( 10, devpNo, findLocNoAttributeVo, locTypeDto);
+ } catch (Exception e){
+ throw new CoolException("鏌ヨ搴撲綅澶辫触锛侊紒==銆�"+e.getMessage());
+ }
+ if (Cools.isEmpty(dto)){
+ throw new CoolException("鏌ヨ搴撲綅澶辫触锛侊紒==銆媠tartupFullPutStore ==銆� commonService.getLocNo");
+ }
int workNo = dto.getWorkNo();
Date now = new Date();
// 鐢熸垚宸ヤ綔妗�
diff --git a/src/main/java/com/zy/asrs/utils/Utils.java b/src/main/java/com/zy/asrs/utils/Utils.java
index 6039033..076be95 100644
--- a/src/main/java/com/zy/asrs/utils/Utils.java
+++ b/src/main/java/com/zy/asrs/utils/Utils.java
@@ -357,6 +357,13 @@
return false;
}
+ public static boolean BooleanWhsTypeSta(Integer whsType) {
+ if (whsType == 1 || whsType == 2 || whsType == 5 || whsType==3 || whsType==4 || whsType == 9) {
+ return true;
+ }
+ return false;
+ }
+
public static boolean BooleanWhsTypeSta(RowLastno rowLastno, Integer staDescId) {//绔欑偣璺緞鏇存柊
if (rowLastno.getPointSwitch().equals("Y") && staDescId != 11 && staDescId != 111) {
return true;
@@ -384,7 +391,8 @@
public static int[] LocNecessaryParameters(RowLastno rowLastno, Integer curRow, Integer crnNumber) {
switch (rowLastno.getTypeId()) {
case 1://缁忓吀鍙屼几搴撲綅
- return LocNecessaryParametersDoubleExtension(rowLastno, curRow, crnNumber); //宸插畬鍠�
+ return LocNecessaryParametersDoubleExtension9(rowLastno, curRow, crnNumber); //宸插畬鍠�
+// return LocNecessaryParametersDoubleExtension(rowLastno, curRow, crnNumber); //宸插畬鍠�
case 2://缁忓吀鍗曚几搴撲綅锛�2鎺掕揣鏋讹級
return LocNecessaryParametersDoubleExtension2(rowLastno, curRow, crnNumber); //宸插畬鍠�
case 3://缁忓吀鍗曞弻浼稿簱浣� 宸﹀崟鍙冲弻(灏忓崟澶у弻)
@@ -397,11 +405,61 @@
return LocNecessaryParametersDoubleExtension6(rowLastno, curRow, crnNumber); //宸插畬鍠�
case 7://骞冲簱 CTU搴�
return LocNecessaryParametersDoubleExtension7(rowLastno, curRow, crnNumber); //宸插畬鍠�
+ case 9://鍓嶅弻浼� 鍚庡乏鍗曞彸鍙�(灏忓崟澶у弻) 娓姇瀹氬埗
+ return LocNecessaryParametersDoubleExtension9(rowLastno, curRow, crnNumber); //宸插畬鍠�
default:
return LocNecessaryParametersMove(rowLastno, curRow, crnNumber);//moveCrnNo
}
}
+ public static int[] LocNecessaryParametersDoubleExtension9(RowLastno rowLastno, Integer curRow, Integer crnNumber) {
+ int[] necessaryParameters = new int[]{0, 0, 0, 0};
+
+ Integer sRow = rowLastno.getsRow();
+ Integer sCrnNo = rowLastno.getsCrnNo();
+ necessaryParameters[0] = crnNumber; // 杞娆℃暟
+ //婊℃澘姝e父鍏ュ簱
+ if (curRow.equals(14)) {
+ necessaryParameters[1] = 1; //curRow 鏈�娣卞簱浣嶆帓
+ necessaryParameters[2] = 1; //crnNo 鍫嗗灈鏈哄彿
+ necessaryParameters[3] = 2; //nearRow 鏈�娴呭簱浣嶆帓
+ } else if (curRow.equals(11)) {
+ necessaryParameters[1] = 4; //curRow 鏈�娣卞簱浣嶆帓
+ necessaryParameters[2] = 1; //crnNo 鍫嗗灈鏈哄彿
+ necessaryParameters[3] = 3; //nearRow 鏈�娴呭簱浣嶆帓
+ } else if (curRow.equals(10)) {
+ necessaryParameters[1] = 14; //curRow 鏈�娣卞簱浣嶆帓
+ necessaryParameters[2] = 4; //crnNo 鍫嗗灈鏈哄彿
+ necessaryParameters[3] = 13; //nearRow 鏈�娴呭簱浣嶆帓
+ } else if (curRow.equals(9)) {
+ necessaryParameters[1] = 11; //curRow 鏈�娣卞簱浣嶆帓
+ necessaryParameters[2] = 4; //crnNo 鍫嗗灈鏈哄彿
+ necessaryParameters[3] = 12; //nearRow 鏈�娴呭簱浣嶆帓
+ } else if (curRow.equals(8)) {
+ necessaryParameters[1] = 10; //curRow 鏈�娣卞簱浣嶆帓
+ necessaryParameters[2] = 3; //crnNo 鍫嗗灈鏈哄彿
+ necessaryParameters[3] = 10; //nearRow 鏈�娴呭簱浣嶆帓
+ } else if (curRow.equals(5)) {
+ necessaryParameters[1] = 9; //curRow 鏈�娣卞簱浣嶆帓
+ necessaryParameters[2] = 3; //crnNo 鍫嗗灈鏈哄彿
+ necessaryParameters[3] = 9; //nearRow 鏈�娴呭簱浣嶆帓
+ } else if (curRow.equals(4)) {
+ necessaryParameters[1] = 8; //curRow 鏈�娣卞簱浣嶆帓
+ necessaryParameters[2] = 2; //crnNo 鍫嗗灈鏈哄彿
+ necessaryParameters[3] = 7; //nearRow 鏈�娴呭簱浣嶆帓
+ } else if (curRow.equals(1)) {
+ necessaryParameters[1] = 5; //curRow 鏈�娣卞簱浣嶆帓
+ necessaryParameters[2] = 2; //crnNo 鍫嗗灈鏈哄彿
+ necessaryParameters[3] = 6; //nearRow 鏈�娴呭簱浣嶆帓
+ } else {
+ necessaryParameters[1] = 1; //curRow 鏈�娣卞簱浣嶆帓
+ necessaryParameters[2] = 1; //crnNo 鍫嗗灈鏈哄彿
+ necessaryParameters[3] = 2; //nearRow 鏈�娴呭簱浣嶆帓
+ }
+
+ return necessaryParameters;
+ }
+
//缁忓吀鍙屼几搴撲綅
public static int[] LocNecessaryParametersDoubleExtension(RowLastno rowLastno, Integer curRow, Integer crnNumber) {
int[] necessaryParameters = new int[]{0, 0, 0, 0};
diff --git a/src/main/java/com/zy/common/service/CommonService.java b/src/main/java/com/zy/common/service/CommonService.java
index 9db3ac8..1d119bf 100644
--- a/src/main/java/com/zy/common/service/CommonService.java
+++ b/src/main/java/com/zy/common/service/CommonService.java
@@ -152,7 +152,8 @@
}
} catch (Exception e) {
- log.error("绔欑偣={} 鏈煡璇㈠埌瀵瑰簲鐨勮鍒�", sourceStaNo);
+ log.error("绔欑偣={} 鏈煡璇㈠埌瀵瑰簲鐨勮鍒�"+e.getMessage(), sourceStaNo);
+ throw new CoolException(sourceStaNo+"绔欑偣, 鏈煡璇㈠埌瀵瑰簲鐨勮鍒�"+e.getMessage());
}
return null;
}
@@ -375,7 +376,7 @@
List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>()
.eq("row1", nearRow)
.eq("loc_sts", "O").eq("whs_type", rowLastnoType.getType().longValue())
- .orderBy("lev1", true).orderBy("bay1", false));
+ .orderBy("lev1", true).orderBy("bay1", true));
for (LocMast locMast1 : locMasts) {
if (!VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) {
continue;
@@ -440,7 +441,7 @@
List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>()
.eq("row1", nearRow)
.eq("loc_sts", "O").eq("whs_type", rowLastnoType.getType().longValue())
- .orderBy("lev1", true).orderBy("bay1", false));
+ .orderBy("lev1", true).orderBy("bay1", true));
for (LocMast locMast1 : locMasts) {
if (!VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) {
continue;
diff --git a/src/main/java/com/zy/common/web/WcsController.java b/src/main/java/com/zy/common/web/WcsController.java
index 5550701..9d5b424 100644
--- a/src/main/java/com/zy/common/web/WcsController.java
+++ b/src/main/java/com/zy/common/web/WcsController.java
@@ -398,7 +398,16 @@
List<String> batchs = waitPakins.stream().map(WaitPakin::getBatch).distinct().collect(Collectors.toList());
FindLocNoAttributeVo findLocNoAttributeVo = new FindLocNoAttributeVo(matnrs.get(0), batchs.get(0));
// FindLocNoAttributeVo findLocNoAttributeVo = new FindLocNoAttributeVo(waitPakins.get(0));
- StartupDto dto = commonService.getLocNo( 1, devpNo,findLocNoAttributeVo, locTypeDto);
+ StartupDto dto = null;
+ try{
+ dto = commonService.getLocNo( 1, devpNo,findLocNoAttributeVo, locTypeDto);
+ } catch (Exception e){
+ throw new CoolException("鏌ヨ搴撲綅澶辫触锛侊紒==銆�"+e.getMessage());
+ }
+ if (Cools.isEmpty(dto)){
+ throw new CoolException("鏌ヨ搴撲綅澶辫触锛侊紒==銆媠tartupFullPutStore ==銆� commonService.getLocNo");
+ }
+
int workNo = dto.getWorkNo();
Date now = new Date();
// 鐢熸垚宸ヤ綔妗�
@@ -474,8 +483,15 @@
BasDevp sourceStaNo = basDevpService.checkSiteStatus(devpNo, true);
// 妫�绱㈠簱浣�
FindLocNoAttributeVo findLocNoAttributeVo = new FindLocNoAttributeVo();
-
- StartupDto dto = commonService.getLocNo( 10, devpNo, findLocNoAttributeVo, locTypeDto);
+ StartupDto dto = null;
+ try{
+ dto = commonService.getLocNo( 10, devpNo, findLocNoAttributeVo, locTypeDto);
+ } catch (Exception e){
+ throw new CoolException("鏌ヨ搴撲綅澶辫触锛侊紒==銆�"+e.getMessage());
+ }
+ if (Cools.isEmpty(dto)){
+ throw new CoolException("鏌ヨ搴撲綅澶辫触锛侊紒==銆媠tartupFullPutStore ==銆� commonService.getLocNo");
+ }
int workNo = dto.getWorkNo();
// 鐢熸垚宸ヤ綔妗�
WrkMast wrkMast = new WrkMast();
--
Gitblit v1.9.1