From 7635dc25bd2a4d565df496b2d96354639966768d Mon Sep 17 00:00:00 2001
From: Junjie <xjj@123>
Date: 星期四, 25 九月 2025 11:09:44 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/core/ServerBootstrap.java | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/src/main/java/com/zy/core/ServerBootstrap.java b/src/main/java/com/zy/core/ServerBootstrap.java
index 7e69029..096e4f1 100644
--- a/src/main/java/com/zy/core/ServerBootstrap.java
+++ b/src/main/java/com/zy/core/ServerBootstrap.java
@@ -1,12 +1,16 @@
package com.zy.core;
import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.core.exception.CoolException;
import com.zy.asrs.entity.BasLift;
import com.zy.asrs.entity.DeviceConfig;
+import com.zy.asrs.entity.LocMast;
import com.zy.asrs.service.BasLiftService;
import com.zy.asrs.service.DeviceConfigService;
+import com.zy.asrs.service.LocMastService;
+import com.zy.asrs.utils.Utils;
import com.zy.common.utils.RedisUtil;
import com.zy.core.action.ShuttleAction;
import com.zy.core.cache.MessageQueue;
@@ -52,6 +56,8 @@
private DeviceMsgUtils deviceMsgUtils;
@Autowired
private BasLiftService basLiftService;
+ @Autowired
+ private LocMastService locMastService;
@PostConstruct
@Async
@@ -141,7 +147,13 @@
new Thread(thread).start();
SlaveConnection.put(SlaveType.Lift, deviceConfig.getDeviceNo(), thread);
- deviceConfig.setOtherData(basLift.getPoint$());
+ String locNo = Utils.getLocNo(basLift.getPoint$().getRow(), basLift.getPoint$().getBay(), 1);
+ LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", locNo));
+ JSONObject point = JSON.parseObject(locMast.getQrCodeValue());
+ if (point == null) {
+ continue;
+ }
+ deviceConfig.setOtherData(point.getInteger("x") + "-" + point.getInteger("y"));
if (deviceConfig.getFake() == 1) {
fakeDevices.add(deviceConfig);
}else {
--
Gitblit v1.9.1