From 6b014bbfa38a67d9b7337d626fdb537f95ee4f2f Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期一, 26 四月 2021 10:16:42 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/common/service/CommonService.java | 24 +++++++++++++++++++-----
1 files changed, 19 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 3488d53..da0aba3 100644
--- a/src/main/java/com/zy/common/service/CommonService.java
+++ b/src/main/java/com/zy/common/service/CommonService.java
@@ -89,6 +89,11 @@
return workNo;
}
+ public StartupDto getLocNo(Integer whsType, Integer staDescId, Integer sourceStaNo, boolean emptyMk, List<String> matNos, LocTypeDto locTypeDto, int times) {
+ LocTypeDto oldLocType = locTypeDto.clone();
+ return getLocNo(whsType, staDescId, sourceStaNo, emptyMk, matNos, locTypeDto, oldLocType, times);
+ }
+
/**
* 妫�绱㈠簱浣嶅彿
* @param whsType 绫诲瀷 1:鍙屾繁寮忚揣鏋�
@@ -97,7 +102,7 @@
* @param matNos 鐗╂枡鍙烽泦鍚�
* @return locNo 妫�绱㈠埌鐨勫簱浣嶅彿
*/
- public StartupDto getLocNo(Integer whsType, Integer staDescId, Integer sourceStaNo, boolean emptyMk, List<String> matNos, LocTypeDto locTypeDto, int times) {
+ public StartupDto getLocNo(Integer whsType, Integer staDescId, Integer sourceStaNo, boolean emptyMk, List<String> matNos, LocTypeDto locTypeDto, LocTypeDto oldLocType, int times) {
StartupDto startupDto = new StartupDto();
// 鐢熸垚宸ヤ綔鍙�
int workNo = getWorkNo(0);
@@ -257,24 +262,33 @@
// 褰撳墠宸烽亾鏃犵┖搴撲綅鏃讹紝閫掑綊璋冩暣鑷充笅涓�宸烽亾锛屾绱㈠叏閮ㄥ贩閬撴棤鏋滃悗锛岃烦鍑洪�掑綊
if (times < rowCount) {
times = times + 1;
- return getLocNo(1, staDescId, sourceStaNo, emptyMk, matNos, locTypeDto, times);
+ return getLocNo(1, staDescId, sourceStaNo, emptyMk, matNos, locTypeDto, oldLocType, times);
} else {
times = 0;
}
// 璐х墿妫�绱綆搴撲綅浠撳け璐ワ紝鍏煎楂樺簱浣嶄粨鍚庣户缁墽琛�
if (locTypeDto.getLocType1() == 1) {
locTypeDto.setLocType1((short) 2);
- return getLocNo(null, staDescId, sourceStaNo, emptyMk, matNos, locTypeDto, times);
+ return getLocNo(null, staDescId, sourceStaNo, emptyMk, matNos, locTypeDto, oldLocType, times);
}
// 璐х墿妫�绱㈢獎搴撲綅浠撳け璐ワ紝鍏煎瀹藉簱浣嶄粨鍚庣户缁墽琛�
if (locTypeDto.getLocType2() == 1) {
locTypeDto.setLocType2((short) 2);
- return getLocNo(null, staDescId, sourceStaNo, emptyMk, matNos, locTypeDto, times);
+ if (oldLocType.getLocType1() == 1) {
+ locTypeDto.setLocType1((short) 1);
+ }
+ return getLocNo(null, staDescId, sourceStaNo, emptyMk, matNos, locTypeDto, oldLocType, times);
}
// 璐х墿妫�绱㈣交搴撲綅浠撳け璐ワ紝鍏煎閲嶅簱浣嶄粨鍚庣户缁墽琛�
if (locTypeDto.getLocType3() == 1) {
locTypeDto.setLocType3((short) 2);
- return getLocNo(null, staDescId, sourceStaNo, emptyMk, matNos, locTypeDto, times);
+ if (oldLocType.getLocType1() == 1) {
+ locTypeDto.setLocType1((short) 1);
+ }
+ if (oldLocType.getLocType2() == 1) {
+ locTypeDto.setLocType2((short) 1);
+ }
+ return getLocNo(null, staDescId, sourceStaNo, emptyMk, matNos, locTypeDto, oldLocType, times);
}
log.error("绯荤粺娌℃湁绌哄簱浣嶏紒锛侊紒 灏哄瑙勬牸锛� {}锛� 杞娆℃暟锛歿}", JSON.toJSONString(locTypeDto), times);
throw new CoolException("娌℃湁绌哄簱浣�");
--
Gitblit v1.9.1