From 49379100e381557f383f601616b2f6835295786d Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期三, 20 九月 2023 13:39:44 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/core/thread/LiftThread.java | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/src/main/java/com/zy/core/thread/LiftThread.java b/src/main/java/com/zy/core/thread/LiftThread.java
index 816e9f4..0c92bb3 100644
--- a/src/main/java/com/zy/core/thread/LiftThread.java
+++ b/src/main/java/com/zy/core/thread/LiftThread.java
@@ -13,6 +13,7 @@
import com.zy.asrs.mapper.WrkMastMapper;
import com.zy.asrs.service.BasLiftOptService;
import com.zy.asrs.service.BasLiftService;
+import com.zy.asrs.utils.Utils;
import com.zy.common.utils.RedisUtil;
import com.zy.core.News;
import com.zy.core.ThreadHandler;
@@ -55,6 +56,9 @@
LiftStaProtocol liftStaProtocol = new LiftStaProtocol();
liftStaProtocol.setStaNo(sta.getStaNo());//绔欑偣鍙�
liftStaProtocol.setLev(sta.getLev());//绔欑偣妤煎眰
+ String locNo = Utils.getLocNo(this.slave.getStaRow(), this.slave.getStaBay(), sta.getLev());
+ liftStaProtocol.setLocNo(locNo);//绔欑偣搴撲綅鍙�
+ liftStaProtocol.setLiftNo(sta.getLiftNo());//鎻愬崌鏈哄彿
liftStaProtocols.add(liftStaProtocol);
}
@@ -128,7 +132,7 @@
//鎻愬崌鏈哄浜庢湭杩愯銆佸氨缁�佹爣璁皌rue銆佹湁浠诲姟鍙�
if (!liftProtocol.getBusy()
- && liftProtocol.getPakMk()
+ && !liftProtocol.getPakMk()
&& liftProtocol.getTaskNo() != 0) {
//杩樻湁鏈畬鎴愮殑鍛戒护
executeWork(liftProtocol.getTaskNo());
@@ -180,7 +184,13 @@
//宸插畬鎴愪换鍔″彿
liftProtocol.setCompleteTaskNo(siemensS7Net.getByteTransform().TransInt16(result1.Content, 6));
//褰撳墠妤煎眰
- liftProtocol.setLev(siemensS7Net.getByteTransform().TransInt16(result1.Content, 8));
+ short lev = siemensS7Net.getByteTransform().TransInt16(result1.Content, 8);
+ if (lev >=5 && lev <= 7) {
+ lev += 2;
+ } else if (lev >= 8 && lev <= 10) {
+ lev += 4;
+ }
+ liftProtocol.setLev(lev);
//灏嗘彁鍗囨満鐘舵�佷繚瀛樿嚦鏁版嵁搴�
BasLiftService liftService = SpringUtils.getBean(BasLiftService.class);
@@ -354,7 +364,7 @@
News.info("鎻愬崌鏈哄懡浠や笅鍙戞垚鍔燂紝鎻愬崌鏈哄彿={}锛屼换鍔℃暟鎹�={}", command.getLiftNo(), JSON.toJSON(command));
//灏嗘爣璁扮疆涓篺alse(闃叉閲嶅彂)
- liftProtocol.setPakMk(false);
+ liftProtocol.setPakMk(true);
//淇濆瓨鏁版嵁鍒版暟鎹簱鍋氭祦姘�
BasLiftOptService liftOptService = SpringUtils.getBean(BasLiftOptService.class);
--
Gitblit v1.9.1