From b1dfb711a89033765eccf16e536a90edbd4b8f1f Mon Sep 17 00:00:00 2001
From: pang.jiabao <pang_jiabao@163.com>
Date: 星期一, 02 二月 2026 08:42:31 +0800
Subject: [PATCH] 空桶入库最上面只放208
---
src/main/java/com/zy/core/thread/MelsecCrnThread.java | 23 ++++++++++++++++++-----
1 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/src/main/java/com/zy/core/thread/MelsecCrnThread.java b/src/main/java/com/zy/core/thread/MelsecCrnThread.java
index fb24a86..c02def3 100644
--- a/src/main/java/com/zy/core/thread/MelsecCrnThread.java
+++ b/src/main/java/com/zy/core/thread/MelsecCrnThread.java
@@ -7,11 +7,11 @@
import com.core.common.DateUtils;
import com.core.common.SpringUtils;
import com.core.exception.CoolException;
-import com.zy.asrs.entity.BasCrnOpt;
-import com.zy.asrs.entity.BasCrnp;
-import com.zy.asrs.service.BasCrnOptService;
-import com.zy.asrs.service.BasCrnpService;
-import com.zy.common.utils.News;
+import com.zy.entity.BasCrnOpt;
+import com.zy.entity.BasCrnp;
+import com.zy.service.BasCrnOptService;
+import com.zy.service.BasCrnpService;
+import com.zy.utils.News;
import com.zy.core.CrnThread;
import com.zy.core.ThreadHandler;
import com.zy.core.cache.MessageQueue;
@@ -132,6 +132,19 @@
crnProtocol.setyDistance((short)0);
crnProtocol.setxDuration((short)0);
crnProtocol.setyDuration((short)0);
+ try{
+ // 鏍规嵁瀹炴椂淇℃伅鏇存柊鏁版嵁搴�
+ BasCrnpService basCrnpService = SpringUtils.getBean(BasCrnpService.class);
+ BasCrnp basCrnp = new BasCrnp();
+ basCrnp.setCrnErr(crnProtocol.getAlarm()==null?0:crnProtocol.getAlarm().longValue());
+ basCrnp.setCrnNo(slave.getId());
+ basCrnp.setCrnSts((int)crnProtocol.getMode());
+ if (!basCrnpService.updateById(crnProtocol.toSqlModel(basCrnp))){
+ News.error("MelsecCrn"+" - 4"+" - 鍫嗗灈鏈簆lc鏁版嵁搴撴洿鏂板け璐� ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort());
+ }
+ } catch (Exception e){
+
+ }
}
@Override
--
Gitblit v1.9.1