From bb3a7ee1496fe02d8a0eefd2281345ac00e3c8bd Mon Sep 17 00:00:00 2001
From: lsh <1>
Date: 星期四, 18 七月 2024 09:24:01 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/core/thread/ScaleThread.java | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/main/java/com/zy/core/thread/ScaleThread.java b/src/main/java/com/zy/core/thread/ScaleThread.java
index dc7bf98..6e9be47 100644
--- a/src/main/java/com/zy/core/thread/ScaleThread.java
+++ b/src/main/java/com/zy/core/thread/ScaleThread.java
@@ -54,8 +54,7 @@
//灏嗙О閲嶉噸閲忓啓鍏ヨ澶囧熀纭�鏁版嵁涓殑gross_wt瀛楁
if(scale > 20) {
BasDevpService basDevpService = SpringUtils.getBean(BasDevpService.class);
- Integer staNo = slave.getId() == 1 ? 101 : 201;
- BasDevp basDevp = basDevpService.selectById(staNo);
+ BasDevp basDevp = basDevpService.selectById(slave.getStaNo());
if(!Cools.isEmpty(basDevp)) {
basDevp.setGrossWt(scale);
if (null != basDevpService && !basDevpService.updateById(basDevp)) {
@@ -63,7 +62,7 @@
}
JSONObject jsonObject = new JSONObject();
jsonObject.put("time", DateUtils.convert(new Date(), DateUtils.yyyyMMddHHmmss_F));
- jsonObject.put("id", staNo);
+ jsonObject.put("id", slave.getStaNo());
jsonObject.put("scale", scale);
if (OutputQueue.SCALE.size() >= 32) {
OutputQueue.SCALE.poll();
--
Gitblit v1.9.1