From bcdf9207ddc69ca996a1d97d2c9e74d4482e9d85 Mon Sep 17 00:00:00 2001
From: yxFwq <1>
Date: 星期一, 21 十月 2024 08:36:39 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 26 ++++++++------------------
src/main/java/com/zy/core/thread/ScaleThread.java | 2 +-
src/main/java/com/zy/core/thread/SiemensDevpThread.java | 1 +
3 files changed, 10 insertions(+), 19 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 1b9768f..63c57cb 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -139,7 +139,7 @@
if (!Cools.isEmpty(barcode)) {
// log.info("{}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{}", inSta.getBarcode(), barcode);
- if ("NG".endsWith(barcode) || "NoRead".equals(barcode) || !CodeDetectionUtil.barcodeDetection(barcode)) {
+ if ("00000000".endsWith(barcode) || "NG".endsWith(barcode) || "NoRead".equals(barcode) || !CodeDetectionUtil.barcodeDetection(barcode)) {
continue;
}
} else {
@@ -323,7 +323,7 @@
if (!Cools.isEmpty(barcode)) {
// log.info("{}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{}", inSta.getBarcode(), barcode);
- if ("NG".endsWith(barcode) || "NoRead".equals(barcode) || !CodeDetectionUtil.barcodeDetection(barcode)) {
+ if ("00000000".endsWith(barcode) || "NG".endsWith(barcode) || "NoRead".equals(barcode) || !CodeDetectionUtil.barcodeDetection(barcode)) {
continue;
}
} else {
@@ -538,7 +538,7 @@
if (!Cools.isEmpty(barcode)) {
// log.info("{}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{}", inSta.getBarcode(), barcode);
- if ("NG".endsWith(barcode) || "NoRead".equals(barcode) || !CodeDetectionUtil.barcodeDetection(barcode)) {
+ if ("00000000".endsWith(barcode) || "NG".endsWith(barcode) || "NoRead".equals(barcode) || !CodeDetectionUtil.barcodeDetection(barcode)) {
continue;
}
} else {
@@ -738,19 +738,7 @@
if (!Cools.isEmpty(barcode)) {
// log.info("{}鍙锋潯鐮佹壂鎻忓櫒妫�娴嬫潯鐮佷俊鎭細{}", inSta.getBarcode(), barcode);
- if ("NG".endsWith(barcode) || "NoRead".equals(barcode) || !CodeDetectionUtil.barcodeDetection(barcode)) {
- continue;
- }
- if ("00000000".equals(barcode)){
- log.error(inSta+"绔欑偣锛屾壂鐮佸け璐ワ紝barcode锛�"+barcode);
- // led 寮傚父鏄剧ず
- LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, inSta.getLed());
- if (ledThread != null) {
- ErrMsg errMsg1 = new ErrMsg();
- errMsg1.setErrMsg(inSta+"绔欑偣锛屾壂鐮佸け璐ワ紝barcode锛�"+barcode);
- errMsg1.setArea("1");
- MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(5, errMsg1));
- }
+ if ("NG".endsWith(barcode) || "NoRead".equals(barcode) || "00000000".equals(barcode) || !CodeDetectionUtil.barcodeDetection(barcode)) {
continue;
}
} else {
@@ -853,6 +841,7 @@
staProtocol.setStaNo(wrkMast.getStaNo());
devpThread.setPakMk(staProtocol.getSiteId(), false);
+ log.info("閿佸畾鏍囪flase===銆婲===銆嬬珯鐐瑰彿锛歿}锛屽伐浣滃彿锛歿}锛屾潯鐮�:{}",staProtocol.getStaNo(),staProtocol.getWorkNo(),barcode);
boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
if (!result) {
if (ledThread != null) {
@@ -901,6 +890,7 @@
}
devpThread.setPakMk(staProtocol.getSiteId(), false);
+ log.info("閿佸畾鏍囪flase===銆婲===銆嬬珯鐐瑰彿锛歿}锛屽伐浣滃彿锛歿}锛屾潯鐮�:{}",staProtocol.getStaNo(),staProtocol.getWorkNo(),barcode);
boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
if (!result) {
throw new CoolException("鏇存柊plc绔欑偣淇℃伅澶辫触");
@@ -6039,7 +6029,7 @@
return false;
}
if (steProtocol.getMode() != (short)1) {
- log.error(steNo + "鍙峰皬杞︾绾匡紝鏃犳硶鎿嶄綔");
+// log.error(steNo + "鍙峰皬杞︾绾匡紝鏃犳硶鎿嶄綔");
return false;
}
if (steProtocol.getChargeStatus()!=0){
@@ -6094,7 +6084,7 @@
return false;
}
if (steProtocol.getMode() != (short)1) {
- log.error(steNo + "鍙峰皬杞︾绾匡紝鏃犳硶鎿嶄綔");
+// log.error(steNo + "鍙峰皬杞︾绾匡紝鏃犳硶鎿嶄綔");
return false;
}
if (steProtocol.getCharge()<31.0F && chargeSign){
diff --git a/src/main/java/com/zy/core/thread/ScaleThread.java b/src/main/java/com/zy/core/thread/ScaleThread.java
index 3c574e5..073d7e4 100644
--- a/src/main/java/com/zy/core/thread/ScaleThread.java
+++ b/src/main/java/com/zy/core/thread/ScaleThread.java
@@ -55,7 +55,7 @@
if (slave.getId()>3){
scale = scale - 50.8;
} else {
- scale = scale - 67.6;
+ scale = scale - 74.0;
}
//灏嗙О閲嶉噸閲忓啓鍏ヨ澶囧熀纭�鏁版嵁涓殑gross_wt瀛楁
diff --git a/src/main/java/com/zy/core/thread/SiemensDevpThread.java b/src/main/java/com/zy/core/thread/SiemensDevpThread.java
index d5299ac..f9ee3d8 100644
--- a/src/main/java/com/zy/core/thread/SiemensDevpThread.java
+++ b/src/main/java/com/zy/core/thread/SiemensDevpThread.java
@@ -1043,6 +1043,7 @@
public void setPakMk(Integer siteId, boolean pakMk) {
StaProtocol staProtocol = station.get(siteId);
if (null != staProtocol) {
+ log.info("閿佸畾鍏ュ簱鏍囪锛岀珯鐐瑰彿={};pakMk={};鏃堕棿={}",siteId,pakMk,new Date());
staProtocol.setPakMk(pakMk);
}
}
--
Gitblit v1.9.1