From 98c62cb5d06996054110c9fb93025279ca002829 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期五, 05 五月 2023 14:27:03 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 275 +-----------------------------------------------------
1 files changed, 6 insertions(+), 269 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 0bf23b6..f8918e9 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -102,58 +102,17 @@
for (DevpSlave.Sta inSta : devp.getInSta()) {
// 鑾峰彇鏉$爜鎵弿浠俊鎭�
BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, inSta.getBarcode());
- BarcodeThread barcodeThread1 = null;
- BarcodeThread barcodeThread2 = null;
if (barcodeThread == null) {
continue;
}
String barcode = barcodeThread.getBarcode();
- String barcode1 = "";
- String barcode2 = "";
- //101绔欐湁3涓壂鐮佸櫒锛屽綋0鎵爜鍣ㄦ病鏈夋暟鎹椂锛岃幏鍙�9銆�10涓や釜鎵爜鍣ㄦ暟鎹�
- if((inSta.getStaNo().equals(101) || inSta.getStaNo().equals(104))){
- barcodeThread1 = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, inSta.getBarcode1());
- if (barcodeThread1 != null) {
- barcode1 = barcodeThread1.getBarcode();
- }
-
- barcodeThread2 = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, inSta.getBarcode2());
- if (barcodeThread2 != null) {
- barcode2 = barcodeThread2.getBarcode();
-
- }
-
- Integer len1=0 , len2=0, len3=0;
- if(barcode != null) {
- String b[]=barcode.split(";");
- barcode=b[b.length-1];
- len1 = barcode.length();
- }
- if(barcode1 != null) {
- String b[]=barcode1.split(";");
- barcode1=b[b.length-1];
- len2 = barcode1.length();
- }
- if(barcode2 != null) {
- String b[]=barcode2.split(";");
- barcode2=b[b.length-1];
- len3 = barcode2.length();
- }
-
- if(len2 > len1 && len2 >= len3){
- barcode = barcode1;
- } else if (len3 > len1 && len3 >= len2){
- barcode = barcode2;
- }
-
- }
- //鍒ゆ柇101鍜�104鏄惁鏄嫞鏂欍�佸苟鏉裤�佺洏鐐瑰啀鍏ュ簱
- WrkMast wrkMast1=wrkMastMapper.selectpj(inSta.getStaNo(),barcode);
- if((inSta.getStaNo().equals(101) || inSta.getStaNo().equals(104)) &&!Cools.isEmpty(barcode)&&!Cools.isEmpty(wrkMast1)){
- log.error("101鎴�104鎷f枡銆佸苟鏉裤�佺洏鐐瑰啀鍏ュ簱", wrkMast1.getWrkNo());
- continue;
- }
+ ////鍒ゆ柇101鍜�104鏄惁鏄嫞鏂欍�佸苟鏉裤�佺洏鐐瑰啀鍏ュ簱
+ //WrkMast wrkMast1=wrkMastMapper.selectpj(inSta.getStaNo(),barcode);
+ //if((inSta.getStaNo().equals(101) || inSta.getStaNo().equals(104)) &&!Cools.isEmpty(barcode)&&!Cools.isEmpty(wrkMast1)){
+ // log.error("101鎴�104鎷f枡銆佸苟鏉裤�佺洏鐐瑰啀鍏ュ簱", wrkMast1.getWrkNo());
+ // continue;
+ //}
if (!Cools.isEmpty(barcode)) {
log.info("{}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{}", inSta.getBarcode(), barcode);
@@ -184,24 +143,6 @@
continue;
}
if (inSta.getStaNo() == 104 && devpThread.ioModeOf1F2 == IoModeType.PAKOUT_MODE) {
- continue;
- }
- if (inSta.getStaNo() == 111 && devpThread.ioModeOf1F3 == IoModeType.PAKOUT_MODE) {
- continue;
- }
- if (inSta.getStaNo() == 114 && devpThread.ioModeOf1F4 == IoModeType.PAKOUT_MODE) {
- continue;
- }
- if (inSta.getStaNo() == 201 && devpThread.ioModeOf2F1 == IoModeType.PAKOUT_MODE) {
- continue;
- }
- if (inSta.getStaNo() == 204 && devpThread.ioModeOf2F2 == IoModeType.PAKOUT_MODE) {
- continue;
- }
- if (inSta.getStaNo() == 301 && devpThread.ioModeOf3F1 == IoModeType.PAKOUT_MODE) {
- continue;
- }
- if (inSta.getStaNo() == 304 && devpThread.ioModeOf3F2 == IoModeType.PAKOUT_MODE) {
continue;
}
@@ -264,12 +205,6 @@
StartupDto dto = jsonObject.getObject("data", StartupDto.class);
barcodeThread.setBarcode("");
- if(barcodeThread1 !=null){
- barcodeThread1.setBarcode("");
- }
- if(barcodeThread2 !=null){
- barcodeThread2.setBarcode("");
- }
staProtocol.setWorkNo(dto.getWorkNo().shortValue());
staProtocol.setStaNo(dto.getStaNo().shortValue());
devpThread.setPakMk(staProtocol.getSiteId(), false);
@@ -411,24 +346,6 @@
if (inSta.getStaNo() == 101 && devpThread.ioModeOf1F2 != IoModeType.PAKOUT_MODE) {
continue;
}
- if (inSta.getStaNo() == 114 && devpThread.ioModeOf1F3 != IoModeType.PAKOUT_MODE) {
- continue;
- }
- if (inSta.getStaNo() == 111 && devpThread.ioModeOf1F4 != IoModeType.PAKOUT_MODE) {
- continue;
- }
- if (inSta.getStaNo() == 204 && devpThread.ioModeOf2F1 != IoModeType.PAKOUT_MODE) {
- continue;
- }
- if (inSta.getStaNo() == 201 && devpThread.ioModeOf2F2 != IoModeType.PAKOUT_MODE) {
- continue;
- }
- if (inSta.getStaNo() == 301 && devpThread.ioModeOf3F1 != IoModeType.PAKOUT_MODE) {
- continue;
- }
- if (inSta.getStaNo() == 304 && devpThread.ioModeOf3F2 != IoModeType.PAKOUT_MODE) {
- continue;
- }
// 鍒ゆ柇鏄惁婊¤冻鍏ュ簱鏉′欢
if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.isInEnable()
@@ -482,27 +399,9 @@
String barcode = barcodeThread.getBarcode();
- //101绔欐湁3涓壂鐮佸櫒锛屽綋0鎵爜鍣ㄦ病鏈夋暟鎹椂锛岃幏鍙�9銆�10涓や釜鎵爜鍣ㄦ暟鎹�
- if((pickSta.getStaNo().equals(101) || pickSta.getStaNo().equals(104)) && ( "NoRead".equals(barcode) || Cools.isEmpty(barcode) )){
- BarcodeThread barcodeThread1 = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, pickSta.getBarcode1());
- if (barcodeThread1 != null) {
- barcode = barcodeThread1.getBarcode();
- }
-
- if("NoRead".equals(barcode) || Cools.isEmpty(barcode)) {
- BarcodeThread barcodeThread2 = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, pickSta.getBarcode2());
- if (barcodeThread2 != null) {
- barcode = barcodeThread2.getBarcode();
-
- }
- }
- }
if (!Cools.isEmpty(barcode)) {
log.info("{}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{}", pickSta.getBarcode(), barcode);
-// if ("NG".endsWith(barcode) || "NoRead".equals(barcode)) {
-// continue;
-// }
} else {
continue;
}
@@ -575,24 +474,6 @@
break;
case 103:
sourceStaNo = 104;
- break;
- case 110:
- sourceStaNo = 111;
- break;
- case 113:
- sourceStaNo = 114;
- break;
- case 200:
- sourceStaNo = 201;
- break;
- case 203:
- sourceStaNo = 204;
- break;
- case 300:
- sourceStaNo = 301;
- break;
- case 303:
- sourceStaNo = 304;
break;
}
@@ -986,24 +867,6 @@
continue;
}
if (wrkMast.getStaNo() == 103 && devpThread.ioModeOf1F2 != IoModeType.PAKOUT_MODE) {
- continue;
- }
- if (wrkMast.getStaNo() == 110 && devpThread.ioModeOf1F3 != IoModeType.PAKOUT_MODE) {
- continue;
- }
- if (wrkMast.getStaNo() == 113 && devpThread.ioModeOf1F4 != IoModeType.PAKOUT_MODE) {
- continue;
- }
- if (wrkMast.getStaNo() == 200 && devpThread.ioModeOf2F1 != IoModeType.PAKOUT_MODE) {
- continue;
- }
- if (wrkMast.getStaNo() == 203 && devpThread.ioModeOf2F2 != IoModeType.PAKOUT_MODE) {
- continue;
- }
- if (wrkMast.getStaNo() == 300 && devpThread.ioModeOf3F1 != IoModeType.PAKOUT_MODE) {
- continue;
- }
- if (wrkMast.getStaNo() == 303 && devpThread.ioModeOf3F2 != IoModeType.PAKOUT_MODE) {
continue;
}
@@ -2178,24 +2041,6 @@
case 104:
staNo = 106;
break;
- case 111:
- staNo = 112;
- break;
- case 114:
- staNo = 116;
- break;
- case 201:
- staNo = 202;
- break;
- case 204:
- staNo = 205;
- break;
- case 301:
- staNo = 302;
- break;
- case 304:
- staNo = 305;
- break;
}
WrkMast pakout = wrkMastMapper.selectWorkingPakout(staNo);
switch (inSta.getStaNo()) {
@@ -2233,114 +2078,6 @@
} else {
// 鍏ュ簱妯″紡
devpThread.ioModeOf1F2 = IoModeType.PAKIN_MODE;
- }
- break;
- case 111: // 1F3
- if (pakout != null) {
- if (devpThread.ioModeOf1F3 != IoModeType.PAKOUT_MODE) {
- // 鍑哄簱鍒囨崲涓�
- devpThread.ioModeOf1F3 = IoModeType.PAKOUT_BOOTING;
- WrkMast pakin = wrkMastMapper.selectWorkingPakin(inSta.getStaNo());
- if (pakin == null && !devpThread.getStation().get(inSta.getStaNo()).isLoading()
- && !devpThread.getStation().get(inSta.getStaNo() - 1).isLoading()
- && devpThread.getStation().get(inSta.getStaNo() - 1).getWorkNo() == 0) {
- // 鍑哄簱妯″紡
- devpThread.ioModeOf1F3 = IoModeType.PAKOUT_MODE;
- }
- }
- } else {
- // 鍏ュ簱妯″紡
- devpThread.ioModeOf1F3 = IoModeType.PAKIN_MODE;
- }
- break;
- case 114: // 1F4
- if (pakout != null) {
- if (devpThread.ioModeOf1F4 != IoModeType.PAKOUT_MODE) {
- // 鍑哄簱鍒囨崲涓�
- devpThread.ioModeOf1F4 = IoModeType.PAKOUT_BOOTING;
- WrkMast pakin = wrkMastMapper.selectWorkingPakin(inSta.getStaNo());
- if (pakin == null && !devpThread.getStation().get(inSta.getStaNo()).isLoading()
- && !devpThread.getStation().get(inSta.getStaNo() - 1).isLoading()
- && devpThread.getStation().get(inSta.getStaNo() - 1).getWorkNo() == 0) {
- // 鍑哄簱妯″紡
- devpThread.ioModeOf1F4 = IoModeType.PAKOUT_MODE;
- }
- }
- } else {
- // 鍏ュ簱妯″紡
- devpThread.ioModeOf1F4 = IoModeType.PAKIN_MODE;
- }
- break;
- case 201: // 2F1
- if (pakout != null) {
- if (devpThread.ioModeOf2F1 != IoModeType.PAKOUT_MODE) {
- // 鍑哄簱鍒囨崲涓�
- devpThread.ioModeOf2F1 = IoModeType.PAKOUT_BOOTING;
- WrkMast pakin = wrkMastMapper.selectWorkingPakin(inSta.getStaNo());
- if (pakin == null && !devpThread.getStation().get(inSta.getStaNo()).isLoading()
- && !devpThread.getStation().get(inSta.getStaNo() - 1).isLoading()
- && devpThread.getStation().get(inSta.getStaNo() - 1).getWorkNo() == 0) {
- // 鍑哄簱妯″紡
- devpThread.ioModeOf2F1 = IoModeType.PAKOUT_MODE;
- }
- }
- } else {
- // 鍏ュ簱妯″紡
- devpThread.ioModeOf2F1 = IoModeType.PAKIN_MODE;
- }
- break;
- case 204: // 2F2
- if (pakout != null) {
- if (devpThread.ioModeOf2F2 != IoModeType.PAKOUT_MODE) {
- // 鍑哄簱鍒囨崲涓�
- devpThread.ioModeOf2F2 = IoModeType.PAKOUT_BOOTING;
- WrkMast pakin = wrkMastMapper.selectWorkingPakin(inSta.getStaNo());
- if (pakin == null && !devpThread.getStation().get(inSta.getStaNo()).isLoading()
- && !devpThread.getStation().get(inSta.getStaNo() - 1).isLoading()
- && devpThread.getStation().get(inSta.getStaNo() - 1).getWorkNo() == 0) {
- // 鍑哄簱妯″紡
- devpThread.ioModeOf2F2 = IoModeType.PAKOUT_MODE;
- }
- }
- } else {
- // 鍏ュ簱妯″紡
- devpThread.ioModeOf2F2 = IoModeType.PAKIN_MODE;
- }
- break;
- case 301: // 3F1
- if (pakout != null) {
- if (devpThread.ioModeOf3F1 != IoModeType.PAKOUT_MODE) {
- // 鍑哄簱鍒囨崲涓�
- devpThread.ioModeOf3F1 = IoModeType.PAKOUT_BOOTING;
- WrkMast pakin = wrkMastMapper.selectWorkingPakin(inSta.getStaNo());
- if (pakin == null && !devpThread.getStation().get(inSta.getStaNo()).isLoading()
- && !devpThread.getStation().get(inSta.getStaNo() - 1).isLoading()
- && devpThread.getStation().get(inSta.getStaNo() - 1).getWorkNo() == 0) {
- // 鍑哄簱妯″紡
- devpThread.ioModeOf3F1 = IoModeType.PAKOUT_MODE;
- }
- }
- } else {
- // 鍏ュ簱妯″紡
- devpThread.ioModeOf3F1 = IoModeType.PAKIN_MODE;
- }
- break;
- case 304: // 3F2
- if (pakout != null) {
- if (devpThread.ioModeOf3F2 != IoModeType.PAKOUT_MODE) {
- // 鍑哄簱鍒囨崲涓�
- devpThread.ioModeOf3F2 = IoModeType.PAKOUT_BOOTING;
- WrkMast pakin = wrkMastMapper.selectWorkingPakin(inSta.getStaNo());
- if (pakin == null && !devpThread.getStation().get(inSta.getStaNo()).isLoading()
- && !devpThread.getStation().get(inSta.getStaNo() - 1).isLoading()
- && devpThread.getStation().get(inSta.getStaNo() - 1).getWorkNo() == 0) {
- // 鍑哄簱妯″紡
- devpThread.ioModeOf3F2 = IoModeType.PAKOUT_MODE;
- }
- }
- } else {
- // 鍏ュ簱妯″紡
- devpThread.ioModeOf3F2 = IoModeType.PAKIN_MODE;
}
break;
}
--
Gitblit v1.9.1