From 5afddcf8723fba1c01b86d03361fc194f309bca3 Mon Sep 17 00:00:00 2001
From: zjj <3272660260@qq.com>
Date: 星期四, 22 八月 2024 10:20:11 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/common/service/CommonService.java | 35 ++++++++++++++++++++---------------
1 files changed, 20 insertions(+), 15 deletions(-)
diff --git a/src/main/java/com/zy/common/service/CommonService.java b/src/main/java/com/zy/common/service/CommonService.java
index ec9900c..4bc7fbd 100644
--- a/src/main/java/com/zy/common/service/CommonService.java
+++ b/src/main/java/com/zy/common/service/CommonService.java
@@ -119,7 +119,12 @@
*/
@Transactional
public StartupDto getLocNo(Integer whsType, Integer staDescId, Integer sourceStaNo, String matnr, String batch, String grade, LocTypeDto locTypeDto) {
- whsType = Utils.GetWhsType(sourceStaNo);
+ try{
+ whsType = Utils.GetWhsType(sourceStaNo);
+ }catch (Exception e){
+ log.error("绔欑偣={} 鏈煡璇㈠埌瀵瑰簲鐨勮鍒�",sourceStaNo);
+ return null;
+ }
return getLocNoRun(whsType,staDescId,sourceStaNo,matnr,batch,grade,0,locTypeDto,0);
}
@@ -137,7 +142,7 @@
if (Cools.isEmpty(matnr)) { //鐗╂枡鍙�
matnr = "";
}
- if (Cools.isEmpty(batch)) { //绠卞彿
+ if (Cools.isEmpty(batch)) { //鎵规
batch = "";
}
if (Cools.isEmpty(grade)) { //澶囩敤
@@ -199,7 +204,7 @@
boolean signRule2 = false;
- if (Utils.BooleanWhsTypeStaIoType(whsType)){
+ if (Utils.BooleanWhsTypeStaIoType(rowLastno)){
// 闈犺繎鎽嗘斁瑙勫垯 --- 鍚屽ぉ鍚岃鏍肩墿鏂� //鍒嗙鐗�
if (!Cools.isEmpty(matnr) && staDescId == 1){
signRule1 = true;
@@ -270,9 +275,9 @@
// }
// 闈犺繎鎽嗘斁瑙勫垯 --- 绌烘墭 //浜掗�氱増
- if (staDescId == 10 && Utils.BooleanWhsTypeStaIoType(whsType)) {
+ if (staDescId == 10 && Utils.BooleanWhsTypeStaIoType(rowLastno)) {
List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("loc_sts", "D").ge("row1", sRow).le("row1", eRow));
- if (locMasts.size() > 0) {
+ if (!locMasts.isEmpty()) {
for (LocMast loc : locMasts) {
if (Utils.isShallowLoc(slaveProperties, loc.getLocNo())) {
continue;
@@ -297,7 +302,7 @@
StaDesc staDesc = null;
BasDevp staNo = null;
- if (Utils.BooleanWhsTypeSta(whsType, staDescId)) {
+ if (Utils.BooleanWhsTypeSta(rowLastno, staDescId)) {
// 鑾峰彇鐩爣绔�
wrapper = new EntityWrapper<StaDesc>()
.eq("type_no", staDescId)
@@ -311,17 +316,17 @@
}else {
staNo = basDevpService.selectById(staDesc.getCrnStn());
if (!staNo.getAutoing().equals("Y")) {
+ log.error("鐩爣绔�"+staDesc.getCrnStn()+"涓嶅彲鐢�");
// throw new CoolException("鐩爣绔�"+staDesc.getCrnStn()+"涓嶅彲鐢�");
crnNo = 0;
}
startupDto.setStaNo(staNo.getDevNo());
}
- }
-
- // 鏇存柊搴撲綅鎺掑彿
- if (Utils.BooleanWhsTypeSta(whsType, staDescId) && Cools.isEmpty(locMast)) {
- rowLastno.setCurrentRow(curRow);
- rowLastnoService.updateById(rowLastno);
+ // 鏇存柊搴撲綅鎺掑彿
+ if (Cools.isEmpty(locMast)){
+ rowLastno.setCurrentRow(curRow);
+ rowLastnoService.updateById(rowLastno);
+ }
}
// 寮�濮嬫煡鎵惧簱浣� ==============================>>
@@ -336,7 +341,7 @@
if (!VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) {
continue;
}
- if (Utils.BooleanWhsTypeStaIoType(whsType)){
+ if (Utils.BooleanWhsTypeStaIoType(rowLastno)){
String shallowLoc = Utils.getDeepLoc(slaveProperties, locMast1.getLocNo());
LocMast locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>()
.eq("loc_no", shallowLoc).eq("loc_sts", "O"));
@@ -352,12 +357,12 @@
}
}
- if (Cools.isEmpty(locMast) && Utils.BooleanWhsTypeStaIoType(whsType)){
+ if (Cools.isEmpty(locMast) && Utils.BooleanWhsTypeStaIoType(rowLastno)){
for (LocMast locMast1 : locMasts) {
if (!VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) {
continue;
}
- if (Utils.BooleanWhsTypeStaIoType(whsType)){
+ if (Utils.BooleanWhsTypeStaIoType(rowLastno)){
String shallowLoc = Utils.getDeepLoc(slaveProperties, locMast1.getLocNo());
LocMast locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>()
.eq("loc_no", shallowLoc).eq("loc_sts", "O"));
--
Gitblit v1.9.1