From dfaf0332889a83f9c8437befdfff32866cf29d5e Mon Sep 17 00:00:00 2001
From: yxFwq <1>
Date: 星期五, 13 六月 2025 15:16:12 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 327 ++++++++++++++++++++++++++++++++++++++----------------
1 files changed, 230 insertions(+), 97 deletions(-)
diff --git a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
index 908914e..0b18ec3 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -1953,13 +1953,15 @@
} else if (shallowLoc.getLocSts().equals("F") || shallowLoc.getLocSts().equals("D")) {
// 姝ゆ爣璁伴伩鍏嶅娆℃墽琛岀Щ搴撲换鍔�
if (Cools.isEmpty(wrkMast.getUpdMk()) || "N".equals(wrkMast.getUpdMk())) {
- wrkMast.setUpdMk("Y");
- wrkMast.setIoPri(14D);
- wrkMastMapper.updateById(wrkMast);
// 鐢熸垚宸ヤ綔妗�,灏嗘祬搴撲綅绉昏浆鍒版柊鐨勫簱浣嶄腑
- moveLocForDeepLoc(slave, shallowLoc);
+// boolean moveLocForDeepLoc = moveLocForDeepLoc(slave, shallowLoc);
// 鐢熸垚宸ヤ綔妗c�佹敼鍙樻祬搴撲綅鐨勬簮搴�/鐩爣搴� 搴撲綅鐘舵�併�佷笅鍙戝爢鍨涙満鍛戒护锛堢珛椹墽琛�)
// moveLocForDeepLocPakin(slave, shallowLoc, wrkMast);
+ if (moveLocForDeepLoc(slave, shallowLoc)){
+ wrkMast.setUpdMk("Y");
+ wrkMast.setIoPri(14D);
+ wrkMastMapper.updateById(wrkMast);
+ }
}
continue;
} else if (shallowLoc.getLocSts().equals("Q")) {
@@ -2125,11 +2127,16 @@
} else if (shallowLoc.getLocSts().equals("F") || shallowLoc.getLocSts().equals("D")) {
// 姝ゆ爣璁伴伩鍏嶅娆℃墽琛岀Щ搴撲换鍔�
if (Cools.isEmpty(wrkMast.getUpdMk()) || "N".equals(wrkMast.getUpdMk())) {
- wrkMast.setUpdMk("Y");
- wrkMast.setIoPri(14D);
- wrkMastMapper.updateById(wrkMast);
- // 鐢熸垚宸ヤ綔妗�,灏嗘祬搴撲綅绉昏浆鍒版柊鐨勫簱浣嶄腑
- moveLocForDeepLoc(slave, shallowLoc);
+ if (moveLocForDeepLoc(slave, shallowLoc)){
+ wrkMast.setUpdMk("Y");
+ wrkMast.setIoPri(14D);
+ wrkMastMapper.updateById(wrkMast);
+ }
+// wrkMast.setUpdMk("Y");
+// wrkMast.setIoPri(14D);
+// wrkMastMapper.updateById(wrkMast);
+// // 鐢熸垚宸ヤ綔妗�,灏嗘祬搴撲綅绉昏浆鍒版柊鐨勫簱浣嶄腑
+// moveLocForDeepLoc(slave, shallowLoc);
// 鐢熸垚宸ヤ綔妗c�佹敼鍙樻祬搴撲綅鐨勬簮搴�/鐩爣搴� 搴撲綅鐘舵�併�佷笅鍙戝爢鍨涙満鍛戒护锛堢珛椹墽琛�)
// moveLocForDeepLocPakin(slave, shallowLoc, wrkMast);
}
@@ -2577,11 +2584,16 @@
} else if (shallowLoc.getLocSts().equals("F") || shallowLoc.getLocSts().equals("D")) {
// 姝ゆ爣璁伴伩鍏嶅娆℃墽琛岀Щ搴撲换鍔�
if (Cools.isEmpty(wrkMast.getUpdMk()) || "N".equals(wrkMast.getUpdMk())) {
- wrkMast.setUpdMk("Y");
- wrkMast.setIoPri(14D);
- wrkMastMapper.updateById(wrkMast);
- // 鐢熸垚宸ヤ綔妗�,灏嗘祬搴撲綅绉昏浆鍒版柊鐨勫簱浣嶄腑
- moveLocForDeepLoc(slave, shallowLoc);
+ if (moveLocForDeepLoc(slave, shallowLoc)){
+ wrkMast.setUpdMk("Y");
+ wrkMast.setIoPri(14D);
+ wrkMastMapper.updateById(wrkMast);
+ }
+// wrkMast.setUpdMk("Y");
+// wrkMast.setIoPri(14D);
+// wrkMastMapper.updateById(wrkMast);
+// // 鐢熸垚宸ヤ綔妗�,灏嗘祬搴撲綅绉昏浆鍒版柊鐨勫簱浣嶄腑
+// moveLocForDeepLoc(slave, shallowLoc);
// 鐢熸垚宸ヤ綔妗c�佹敼鍙樻祬搴撲綅鐨勬簮搴�/鐩爣搴� 搴撲綅鐘舵�併�佷笅鍙戝爢鍨涙満鍛戒护锛堢珛椹墽琛�)
// moveLocForDeepLocPakin(slave, shallowLoc, wrkMast);
}
@@ -2708,10 +2720,15 @@
// if (Cools.isEmpty(wrkMast.getUpdMk()) || "N".equals(wrkMast.getUpdMk())
// || Cools.isEmpty(waitWrkMast)) {
if (Cools.isEmpty(waitWrkMast)) {
- wrkMast.setUpdMk("Y");
- wrkMastMapper.updateById(wrkMast);
- // 鐢熸垚宸ヤ綔妗�,灏嗘祬搴撲綅绉昏浆鍒版柊鐨勫簱浣嶄腑
- moveLocForDeepLoc(slave, shallowLoc);
+ if (moveLocForDeepLoc(slave, shallowLoc)){
+ wrkMast.setUpdMk("Y");
+// wrkMast.setIoPri(14D);
+ wrkMastMapper.updateById(wrkMast);
+ }
+// wrkMast.setUpdMk("Y");
+// wrkMastMapper.updateById(wrkMast);
+// // 鐢熸垚宸ヤ綔妗�,灏嗘祬搴撲綅绉昏浆鍒版柊鐨勫簱浣嶄腑
+// moveLocForDeepLoc(slave, shallowLoc);
}
log.error("{}浠诲姟鍑哄簱澶辫触锛屾祬搴撲綅鍫靛锛佹祬搴撲綅鍙�:{}", wrkMast.getWrkNo(), shallowLocNo);
continue;
@@ -2879,10 +2896,21 @@
// if (Cools.isEmpty(wrkMast.getUpdMk()) || "N".equals(wrkMast.getUpdMk())
// || Cools.isEmpty(waitWrkMast)) {
if (Cools.isEmpty(waitWrkMast)) {
- wrkMast.setUpdMk("Y");
- wrkMastMapper.updateById(wrkMast);
+// wrkMast.setUpdMk("Y");
+// wrkMastMapper.updateById(wrkMast);
// 鐢熸垚宸ヤ綔妗�,灏嗘祬搴撲綅绉昏浆鍒版柊鐨勫簱浣嶄腑
- moveLocForDeepLoc(slave, shallowLoc);
+ try{
+ if (moveLocForDeepLoc(slave, shallowLoc)){
+ wrkMast.setUpdMk("Y");
+// wrkMast.setIoPri(14D);
+ wrkMastMapper.updateById(wrkMast);
+ }
+// moveLocForDeepLoc(slave, shallowLoc);
+ } catch (Exception e){
+ log.error("{}浠诲姟鍑哄簱澶辫触锛屾祬搴撲綅鍫靛锛佸紓甯�", wrkMast.getWrkNo(), e);
+ log.error("{}浠诲姟鍑哄簱澶辫触锛屾祬搴撲綅鍫靛锛佹祬搴撲綅鍙�:{}", wrkMast.getWrkNo(), shallowLocNo);
+ continue;
+ }
}
log.error("{}浠诲姟鍑哄簱澶辫触锛屾祬搴撲綅鍫靛锛佹祬搴撲綅鍙�:{}", wrkMast.getWrkNo(), shallowLocNo);
continue;
@@ -3096,6 +3124,13 @@
}
Integer turnBigInt = 0;
+ if (wrkMast.booleanStaNoSign() && wrkMast.getIoPri()<99D){
+ Date now = new Date();
+ long differenceInSeconds = now.getTime() - wrkMast.getModiTime().getTime();
+ if (differenceInSeconds<=2000){
+ continue;
+ }
+ }
// if (wrkMast.booleanStaNoSign()){
// RgvOneSign rgvOneSign = rgvOneSignMapper.selectOneSign("LineUp"+wrkMast.getStaNo());
// if (Cools.isEmpty(rgvOneSign)){
@@ -3231,10 +3266,15 @@
// if (Cools.isEmpty(wrkMast.getUpdMk()) || "N".equals(wrkMast.getUpdMk())
// || Cools.isEmpty(waitWrkMast)) {
if (Cools.isEmpty(waitWrkMast)) {
- wrkMast.setUpdMk("Y");
- wrkMastMapper.updateById(wrkMast);
- // 鐢熸垚宸ヤ綔妗�,灏嗘祬搴撲綅绉昏浆鍒版柊鐨勫簱浣嶄腑
- moveLocForDeepLoc(slave, shallowLoc);
+ if (moveLocForDeepLoc(slave, shallowLoc)){
+ wrkMast.setUpdMk("Y");
+// wrkMast.setIoPri(14D);
+ wrkMastMapper.updateById(wrkMast);
+ }
+// wrkMast.setUpdMk("Y");
+// wrkMastMapper.updateById(wrkMast);
+// // 鐢熸垚宸ヤ綔妗�,灏嗘祬搴撲綅绉昏浆鍒版柊鐨勫簱浣嶄腑
+// moveLocForDeepLoc(slave, shallowLoc);
}
log.error("{}浠诲姟鍑哄簱澶辫触锛屾祬搴撲綅鍫靛锛佹祬搴撲綅鍙�:{}", wrkMast.getWrkNo(), shallowLocNo);
continue;
@@ -4632,8 +4672,9 @@
* 鍥犲弻娣卞簱浣嶉樆濉烇紝瀵规祬搴撲綅杩涜绉昏浆锛堢珛鍗虫墽琛岀増)
* tip锛氬悓姝�
*/
- private synchronized void moveLocForDeepLoc(CrnSlave crn, LocMast shallowLoc) {
+ private synchronized boolean moveLocForDeepLoc(CrnSlave crn, LocMast shallowLoc) {
try {
+ log.info("绉诲簱锛欳rnSlave锛歿}銆丩ocMast锛歿}",JSON.toJSON(crn),JSON.toJSON(shallowLoc));
List<Integer> rows = locMastService.queryDistinctRow(crn.getId());
LocMast loc = null;
for (Integer row : rows) {
@@ -4676,74 +4717,80 @@
if (null == loc) {
log.error("鍙屾繁搴撲綅 --- 娴呭簱浣嶉樆濉炲紓甯革紒 寰呯Щ杞祬搴撲綅锛�" + shallowLoc.getLocNo());
- throw new CoolException("鍙屾繁搴撲綅 --- 娴呭簱浣嶉樆濉炲紓甯革紒 寰呯Щ杞祬搴撲綅锛�" + shallowLoc.getLocNo());
- }
-
- // 鑾峰彇宸ヤ綔鍙�
- int workNo = commonService.getWorkNo(0);
- // 淇濆瓨宸ヤ綔妗�
- WrkMast wrkMast = new WrkMast();
- wrkMast.setWrkNo(workNo);
- wrkMast.setIoTime(new Date());
- wrkMast.setWrkSts(11L); // 宸ヤ綔鐘舵�侊細11.鐢熸垚鍑哄簱ID
- wrkMast.setIoType(11); // 鍏ュ嚭搴撶姸鎬侊細 11.搴撴牸绉昏浇
- wrkMast.setIoPri(13D);
- wrkMast.setCrnNo(crn.getId());
- wrkMast.setSourceLocNo(shallowLoc.getLocNo()); // 婧愬簱浣�
- wrkMast.setLocNo(loc.getLocNo()); // 鐩爣搴撲綅
- wrkMast.setFullPlt(shallowLoc.getFullPlt()); // 婊℃澘
- wrkMast.setPicking("N"); // 鎷f枡
- wrkMast.setExitMk("N"); // 閫�鍑�
- wrkMast.setEmptyMk(shallowLoc.getLocSts().equals("D") ? "Y" : "N"); // 绌烘澘
- wrkMast.setBarcode(shallowLoc.getBarcode()); // 鎵樼洏鐮�
- wrkMast.setLinkMis("N");
- wrkMast.setAppeTime(new Date());
- wrkMast.setModiTime(new Date());
- int res = wrkMastMapper.insert(wrkMast);
- if (res == 0) {
- throw new CoolException("淇濆瓨宸ヤ綔妗eけ璐�");
- }
- // 宸ヤ綔妗f槑缁嗕繚瀛�
- if (shallowLoc.getLocSts().equals("F")) {
- List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("loc_no", shallowLoc.getLocNo()));
- for (LocDetl locDetl : locDetls) {
- WrkDetl wrkDetl = new WrkDetl();
- wrkDetl.setWrkNo(workNo);
- wrkDetl.setIoTime(new Date());
- wrkDetl.setAnfme(locDetl.getAnfme());
- VersionUtils.setWrkDetl(wrkDetl, locDetl); // 鐗堟湰鎺у埗
- wrkDetl.setAppeTime(new Date());
- wrkDetl.setModiTime(new Date());
- if (!wrkDetlService.insert(wrkDetl)) {
- throw new CoolException("淇濆瓨宸ヤ綔妗f槑缁嗗け璐�");
+ return false;
+// throw new CoolException("鍙屾繁搴撲綅 --- 娴呭簱浣嶉樆濉炲紓甯革紒 寰呯Щ杞祬搴撲綅锛�" + shallowLoc.getLocNo());
+ } else {
+ try {
+ // 鑾峰彇宸ヤ綔鍙�
+ int workNo = commonService.getWorkNo(0);
+ // 淇濆瓨宸ヤ綔妗�
+ WrkMast wrkMast = new WrkMast();
+ wrkMast.setWrkNo(workNo);
+ wrkMast.setIoTime(new Date());
+ wrkMast.setWrkSts(11L); // 宸ヤ綔鐘舵�侊細11.鐢熸垚鍑哄簱ID
+ wrkMast.setIoType(11); // 鍏ュ嚭搴撶姸鎬侊細 11.搴撴牸绉昏浇
+ wrkMast.setIoPri(13D);
+ wrkMast.setCrnNo(crn.getId());
+ wrkMast.setSourceLocNo(shallowLoc.getLocNo()); // 婧愬簱浣�
+ wrkMast.setLocNo(loc.getLocNo()); // 鐩爣搴撲綅
+ wrkMast.setFullPlt(shallowLoc.getLocSts().equals("D") ? "N" : "Y"); // 婊℃澘
+ wrkMast.setPicking("N"); // 鎷f枡
+ wrkMast.setExitMk("N"); // 閫�鍑�
+ wrkMast.setEmptyMk(shallowLoc.getLocSts().equals("D") ? "Y" : "N"); // 绌烘澘
+ wrkMast.setBarcode(shallowLoc.getBarcode()); // 鎵樼洏鐮�
+ wrkMast.setLinkMis("N");
+ wrkMast.setAppeTime(new Date());
+ wrkMast.setModiTime(new Date());
+ int res = wrkMastMapper.insert(wrkMast);
+ if (res == 0) {
+ throw new CoolException("淇濆瓨宸ヤ綔妗eけ璐�");
}
+ // 宸ヤ綔妗f槑缁嗕繚瀛�
+ if (shallowLoc.getLocSts().equals("F")) {
+ List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("loc_no", shallowLoc.getLocNo()));
+ for (LocDetl locDetl : locDetls) {
+ WrkDetl wrkDetl = new WrkDetl();
+ wrkDetl.setWrkNo(workNo);
+ wrkDetl.setIoTime(new Date());
+ wrkDetl.setAnfme(locDetl.getAnfme());
+ VersionUtils.setWrkDetl(wrkDetl, locDetl); // 鐗堟湰鎺у埗
+ wrkDetl.setAppeTime(new Date());
+ wrkDetl.setModiTime(new Date());
+ if (!wrkDetlService.insert(wrkDetl)) {
+ throw new CoolException("淇濆瓨宸ヤ綔妗f槑缁嗗け璐�");
+ }
+ }
+ }
+ // 淇敼婧愬簱浣嶇姸鎬�
+ if (shallowLoc.getLocSts().equals("D") || shallowLoc.getLocSts().equals("F")) {
+ shallowLoc.setLocSts("R"); // R.鍑哄簱棰勭害
+ shallowLoc.setModiTime(new Date());
+ if (!locMastService.updateById(shallowLoc)) {
+ throw new CoolException("鏇存柊婧愬簱浣嶇姸鎬佸け璐�");
+ }
+ } else {
+ throw new CoolException("婧愬簱浣嶅嚭搴撳け璐�");
+ }
+ // 淇敼鐩爣搴撲綅鐘舵��
+ if (loc.getLocSts().equals("O")) {
+ loc.setLocSts("S"); // S.鍏ュ簱棰勭害
+ loc.setModiTime(new Date());
+ if (!locMastService.updateById(loc)) {
+ throw new CoolException("鏇存柊鐩爣搴撲綅鐘舵�佸け璐�");
+ }
+ } else {
+ throw new CoolException("绉昏浆澶辫触");
+ }
+ } catch (Exception e){
+ log.error("鍙屾繁搴撲綅闃诲锛屽娴呭簱浣嶈繘琛岀Щ杞け璐�", e);
}
- }
- // 淇敼婧愬簱浣嶇姸鎬�
- if (shallowLoc.getLocSts().equals("D") || shallowLoc.getLocSts().equals("F")) {
- shallowLoc.setLocSts("R"); // R.鍑哄簱棰勭害
- shallowLoc.setModiTime(new Date());
- if (!locMastService.updateById(shallowLoc)) {
- throw new CoolException("鏇存柊婧愬簱浣嶇姸鎬佸け璐�");
- }
- } else {
- throw new CoolException("婧愬簱浣嶅嚭搴撳け璐�");
- }
- // 淇敼鐩爣搴撲綅鐘舵��
- if (loc.getLocSts().equals("O")) {
- loc.setLocSts("S"); // S.鍏ュ簱棰勭害
- loc.setModiTime(new Date());
- if (!locMastService.updateById(loc)) {
- throw new CoolException("鏇存柊鐩爣搴撲綅鐘舵�佸け璐�");
- }
- } else {
- throw new CoolException("绉昏浆澶辫触");
}
} catch (Exception e) {
log.error("鍙屾繁搴撲綅闃诲锛屽娴呭簱浣嶈繘琛岀Щ杞け璐�", e);
- e.printStackTrace();
- TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+// e.printStackTrace();
+// TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
}
+ return true;
}
/**
@@ -5165,7 +5212,7 @@
break;
}
if (count>0){
- if (jarOtherProtocol.getJarTemperature()<jarTemperature){
+ if (jarOtherProtocol.getJarTemperature()<jarTemperature && jarOtherProtocol.modeType == JarModeType.AUTO){
break;
}
}
@@ -5176,7 +5223,7 @@
// if (jarOtherProtocol == null) {
// break;
// }
- if (jarOtherProtocol.getJarTemperature()>jarTemperature){
+ if (jarOtherProtocol.getJarTemperature()>jarTemperature || jarOtherProtocol.modeType != JarModeType.AUTO){
log.info("{}鍙风~鍖栫綈鏌ヨ璁惧娓╁害杩囬珮锛岀瓑寰呴檷娓�....鍏堟墽琛屽叆缃愪换鍔★紒锛侊紒",jarOtherProtocol.getJarNo());
} else {
if (basJarMastService.getJarMastByJarIdCount(jarSlave.getId())>0){
@@ -5892,16 +5939,65 @@
if (wrkMastExecuteService.getWrkMastExecuteByJarIdCount(jarSlave.getId())!=0){
return false;
}
- List<BasJarMast> basJarMastList1 = basJarMastService.getJarMastByJarIdAndStatusList(jarSlave.getJarOtherId(), new ArrayList<Integer>() {{
- add(0);add(1);add(2);add(3);
- }});
- if (!basJarMastList1.isEmpty()){
- return false;
+ BasJar basJarOther11 = basJarMapper.selectById(jarSlave.getJarOtherId());
+ if (!Cools.isEmpty(basJarOther11) && basJarOther11.getJarMode()==2){
+ List<BasJarMast> basJarMastList1 = basJarMastService.getJarMastByJarIdAndStatusList(jarSlave.getJarOtherId(), new ArrayList<Integer>() {{
+ add(0);add(1);add(2);add(3);
+ }});
+ if (!basJarMastList1.isEmpty()){
+ return false;
+ }
+
+ List<BasJarMast> basJarMastList2 = basJarMastService.getJarMastByJarIdAndStatusList(jarSlave.getJarOtherId(), new ArrayList<Integer>() {{
+ add(8);add(9);add(10);add(11);add(12);
+ }});
+ if (!basJarMastList2.isEmpty() && basJarMastList2.size()!=basJarOther11.getJarCount()){
+ return false;
+ }
+
}
+
+
List<BasJarMast> basJarMastList = basJarMastService.getJarMastByJarIdAndStatusList(jarSlave.getId(), new ArrayList<Integer>() {{
add(8);
}});
if (basJarMastList.isEmpty()){
+ return false;
+ }
+
+ StaProtocol staProtocolEnd = new StaProtocol();
+ staProtocolEnd.setAutoing(false);
+ for (DevpSlave devp : slaveProperties.getDevp()) {
+ if (devp.getId() == 1){
+ continue;
+ }
+ // 閬嶅巻鍏ュ簱鍙�
+ for (DevpSlave.Sta inSta : devp.getOutJarInSta()) {
+ if (jarSlave.getId() == 1 || jarSlave.getId() == 2){
+ if (inSta.getStaNo() == 627){
+ SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId());
+ StaProtocol staProtocol = devpThread.getStation().get(inSta.getStaNo());
+ if (staProtocol == null) {
+ break;
+ }
+ staProtocolEnd = staProtocol;
+ break;
+ }
+ } else if (jarSlave.getId() == 3 || jarSlave.getId() == 4){
+ if (inSta.getStaNo() == 628){
+ SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId());
+ StaProtocol staProtocol = devpThread.getStation().get(inSta.getStaNo());
+ if (staProtocol == null) {
+ break;
+ }
+ staProtocolEnd = staProtocol;
+ break;
+ }
+ }
+
+ }
+ }
+ if (!staProtocolEnd.isAutoing() || staProtocolEnd.isLoading()){
return false;
}
List<BasJarMast> basJarMastList10 = basJarMastService.getJarMastByJarIdAndStatusList(jarSlave.getId(), new ArrayList<Integer>() {{
@@ -8018,6 +8114,40 @@
}
break;
}
+ } else if (staProtocol.isAutoing()
+ && !staProtocol.isLoading()
+ && staProtocol.getWorkNo() == 0
+ && staProtocol.isPakMk()) {
+ for (DevpSlave.Jar jar : inSta.getJarList()) {
+ SteThread steThread = (SteThread) SlaveConnection.get(SlaveType.Ste, jar.getJarNo()<3? 1:2);
+ if (steThread == null) {
+ continue;
+ }
+ SteProtocol steProtocol = steThread.getSteProtocol();
+ if (steProtocol == null) {
+ continue;
+ }
+ if (!Cools.isEmpty(steProtocol.getLocaType()) && !steProtocol.getLocaType().equals(SteLocaType.NONE) && steProtocol.getStatusType().equals(SteStatusType.IDLE)) {
+ // 鍒ゆ柇閲嶅宸ヤ綔妗�
+ List<BasJarMast> basJarMastList = basJarMastService.getJarMastByJarIdAndStatusListB(jar.getBurial(), new ArrayList<Integer>() {{
+ add(9);
+ add(11);
+ }});
+ if (basJarMastList.isEmpty()){
+ continue;
+ }
+ BasJarMast jarMastByWrkNo = basJarMastList.get(0);
+ WrkMastExecute wrkMastExecute = wrkMastExecuteService.selectOne(new EntityWrapper<WrkMastExecute>().eq("wrk_no", jarMastByWrkNo.getWrkNo()));
+ if (Cools.isEmpty(wrkMastExecute)){
+ jarMastByWrkNo.setStatus(jarMastByWrkNo.getStatusComplete(6));
+ if (!basJarMastService.updateById(jarMastByWrkNo)){
+ log.error("纭寲鍖哄煙鍒嗘浠诲姟瀹屾垚寮傚父,BasJarMast={},寮傚父淇℃伅={}",JSON.toJSONString(jarMastByWrkNo),"鏇存柊basJarMast澶辫触");
+// throw new CoolException("鏇存柊basJarMast澶辫触");
+ }
+ }
+ break;
+ }
+ }
}
}
}
@@ -8279,7 +8409,7 @@
log.error("纭寲缃怞ar鍛戒护涓嬪彂澶辫触锛宩ar鍙�={},浠诲姟鏁版嵁={},纭寲缃愭暟鎹�={},sign={}",
execute.getJarId(), JSON.toJSON(execute), JSON.toJSON(jarProtocol),sign);
}
- return true;
+ continue;
}
for (WrkMastExecute wrkMastExecute : wrkMastExecuteList){
if (wrkMastExecute.getIoType() == 2 || wrkMastExecute.getIoType() == 4){
@@ -8294,7 +8424,7 @@
wrkMastExecute.getSteId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(jarProtocol),sign);
return false;
}
- return true;
+ continue;
}
}
}
@@ -8870,6 +9000,9 @@
public synchronized void stackingCompletionDriveTray2() {
SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, 2);
StaProtocol staProtocol = devpThread.getStation().get(518);
+ if (Cools.isEmpty(staProtocol)) {
+ return;
+ }
String barcode = staProtocol.getBarcode();
if (!Cools.isEmpty(barcode)) {
if ("NG".endsWith(barcode) || "NoRead".equals(barcode) || "00000000".equals(barcode) || !CodeDetectionUtil.barcodeDetection(barcode)) {
--
Gitblit v1.9.1