From b2141320243f2be393236a3c4f53376583179325 Mon Sep 17 00:00:00 2001
From: zwl <1051256694@qq.com>
Date: 星期一, 16 三月 2026 10:36:36 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/core/thread/impl/ZySiemensCrnThread.java | 65 --------------------------------
1 files changed, 0 insertions(+), 65 deletions(-)
diff --git a/src/main/java/com/zy/core/thread/impl/ZySiemensCrnThread.java b/src/main/java/com/zy/core/thread/impl/ZySiemensCrnThread.java
index 5e7f2b7..b7320d4 100644
--- a/src/main/java/com/zy/core/thread/impl/ZySiemensCrnThread.java
+++ b/src/main/java/com/zy/core/thread/impl/ZySiemensCrnThread.java
@@ -30,9 +30,6 @@
import java.text.MessageFormat;
import java.util.Date;
-import java.util.List;
-import java.util.ArrayList;
-import com.zy.core.utils.WmsOperateUtils;
import com.zy.asrs.entity.BasCrnpErrLog;
import com.zy.asrs.service.BasCrnpErrLogService;
@@ -48,7 +45,6 @@
private ZyCrnConnectDriver zyCrnConnectDriver;
private CrnProtocol crnProtocol;
private int deviceLogCollectTime = 200;
- private List<Integer> lastReportedIndices = new ArrayList<>();
public ZySiemensCrnThread(DeviceConfig deviceConfig, RedisUtil redisUtil) {
this.deviceConfig = deviceConfig;
@@ -85,14 +81,11 @@
if (step == 2) {
sendCommand((CrnCommand) task.getData());
- }else if (step == 3) {
- sendCommand1((CrnCommand) task.getData());
}else if (step == 4) {
sendCommand2((CrnCommand) task.getData());
}else if (step == 5) {
sendCommand3((CrnCommand) task.getData());
}
-
Thread.sleep(100);
} catch (Exception e) {
@@ -192,31 +185,6 @@
crnProtocol.setYDuration(crnStatus.getYDuration());
crnProtocol.setWeight(crnStatus.getWeight());
crnProtocol.setDb110Data(crnStatus.getDb110Data());
-
- // 涓婃姤鍫嗗灈鏈篋B110鐘舵�佹暟鎹�
- short[] db110Data = crnProtocol.getDb110Data();
- List<Integer> currentIndices = new ArrayList<>();
- if (db110Data != null) {
- for (int i = 0; i < db110Data.length; i++) {
- if (db110Data[i] == 1) {
- currentIndices.add(i);
- }
- }
- }
- //!currentIndices.equals(lastReportedIndices)
- boolean changed = true;
-
- if (changed) {
- try {
- WmsOperateUtils wmsOperateUtils = SpringUtils.getBean(WmsOperateUtils.class);
- if (wmsOperateUtils != null) {
- wmsOperateUtils.reportCrnDb110Status(crnProtocol.getCrnNo(), currentIndices);
- lastReportedIndices = new ArrayList<>(currentIndices);
- }
- } catch (Exception e) {
- log.error("Report Crn Db110 Status Fail", e);
- }
- }
OutputQueue.CRN.offer(MessageFormat.format("銆恵0}銆慬id:{1}] <<<<< 瀹炴椂鏁版嵁鏇存柊鎴愬姛",DateUtils.convert(new Date()), deviceConfig.getDeviceNo()));
@@ -344,39 +312,6 @@
CommandResponse response = null;
try {
response = zyCrnConnectDriver.sendCommand(command);
- return response;
- } finally {
- String sourceLocNo = Utils.getLocNo(command.getSourcePosX(), command.getSourcePosY(), command.getSourcePosZ());
- String targetLocNo = Utils.getLocNo(command.getDestinationPosX(), command.getDestinationPosY(), command.getDestinationPosZ());
- BasCrnpOptService bean = SpringUtils.getBean(BasCrnpOptService.class);
- ZyCrnStatusEntity statusEntity = zyCrnConnectDriver.getStatus();
- BasCrnpOpt basCrnpOpt = new BasCrnpOpt(
- command.getTaskNo().intValue(),
- command.getCrnNo(),
- new Date(),
- String.valueOf(command.getTaskMode()),
- sourceLocNo,
- targetLocNo,
- null,
- null,
- null,
- JSON.toJSONString(command),
- JSON.toJSONString(statusEntity),
- 1,
- JSON.toJSONString(response)
- );
- if (bean != null) {
- bean.insert(basCrnpOpt);
- }
- }
- }
-
- @Override
- public synchronized CommandResponse sendCommand1(CrnCommand command) {
- this.crnProtocol.setLastCommandTime(System.currentTimeMillis());
- CommandResponse response = null;
- try {
- response = zyCrnConnectDriver.sendCommand1(command);
return response;
} finally {
String sourceLocNo = Utils.getLocNo(command.getSourcePosX(), command.getSourcePosY(), command.getSourcePosZ());
--
Gitblit v1.9.1