From 48d6b46ef23a321cc70e20d36a2b3bf721d05206 Mon Sep 17 00:00:00 2001
From: zwl <1051256694@qq.com>
Date: 星期三, 29 四月 2026 15:45:57 +0800
Subject: [PATCH] 电视机显示屏曲线图改成7天

---
 src/main/java/com/zy/integration/iot/biz/impl/IotInstructionServiceImpl.java |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/src/main/java/com/zy/integration/iot/biz/impl/IotInstructionServiceImpl.java b/src/main/java/com/zy/integration/iot/biz/impl/IotInstructionServiceImpl.java
index 314d3f8..1e7f83c 100644
--- a/src/main/java/com/zy/integration/iot/biz/impl/IotInstructionServiceImpl.java
+++ b/src/main/java/com/zy/integration/iot/biz/impl/IotInstructionServiceImpl.java
@@ -18,6 +18,7 @@
 import com.zy.iot.entity.IotFeedbackMessage;
 import com.zy.iot.entity.IotInstructionMessage;
 import com.zy.iot.entity.IotPublishRecord;
+import com.zy.iot.service.IotDbConfigService;
 import com.zy.iot.service.IotPublishRecordService;
 import com.zy.iot.util.IotInstructionIdGenerator;
 import lombok.extern.slf4j.Slf4j;
@@ -45,6 +46,8 @@
     private IotPublishRecordService iotPublishRecordService;
     @Autowired
     private IotProperties iotProperties;
+    @Autowired
+    private IotDbConfigService iotDbConfigService;
     @Autowired
     private ExternalTaskFacadeService externalTaskFacadeService;
     @Autowired
@@ -120,7 +123,8 @@
         }
 
         String remoteDestination = extractFirstDestination(message.getDestinationLocationIds());
-        Integer stationId = Cools.isEmpty(remoteDestination) ? null : iotProperties.getPickStationMappings().get(remoteDestination);
+//        Integer stationId = Cools.isEmpty(remoteDestination) ? null : iotProperties.getPickStationMappings().get(remoteDestination);
+        Integer stationId =602;
         if (stationId == null) {
             return updateAsFailure(record, IotConstants.ERROR_CODE_STATION_MAPPING, "鏈壘鍒扮洰鏍囧嚭搴撳彛鏄犲皠");
         }
@@ -129,7 +133,8 @@
         param.setPalletId(message.getContainerId());
         param.setOrderId(resolveReferenceId(message));
         param.setStationId(String.valueOf(stationId));
-        param.setSeq(1);
+        param.setBatchSeq("amazon"+new Date().getTime());
+        param.setSeq(0);
         R result = externalTaskFacadeService.createOutboundTask(param, true);
         if (result == null || !Objects.equals(result.get("code"), 200)) {
             return updateAsFailure(record, null, resolveResultMessage(result, "鎺ユ敹鎷h揣鎸囦护澶辫触"));
@@ -181,7 +186,7 @@
     @Override
     @Transactional(rollbackFor = Exception.class)
     public void queueWorkCompletion(WrkMast wrkMast) {
-        if (!iotProperties.isEnabled() || wrkMast == null || wrkMast.getWrkNo() == null) {
+        if (!iotDbConfigService.isMqttEnabled() || wrkMast == null || wrkMast.getWrkNo() == null) {
             return;
         }
         IotPublishRecord existed = iotPublishRecordService.selectOne(new EntityWrapper<IotPublishRecord>()
@@ -276,7 +281,7 @@
         feedbackMessage.setCreationTime(System.currentTimeMillis());
 
         record.setFeedbackStatus(status);
-        record.setPublishTopic(iotProperties.getTopics().getIngressFeedback());
+        record.setPublishTopic(iotDbConfigService.getEffectiveTopics().getIngressFeedback());
         record.setPublishPayload(JSON.toJSONString(feedbackMessage));
         record.setPublishStatus(IotConstants.PUBLISH_STATUS_PENDING);
         record.setUpdateTime(now);
@@ -340,7 +345,7 @@
             payload.setReferenceId(wrkMast.getUserNo());
         }
         payload.setCreationTime(System.currentTimeMillis());
-        return initOutboundRecord(wrkMast, IotConstants.MESSAGE_TYPE_STOW, iotProperties.getTopics().getIngressStow(), payload);
+        return initOutboundRecord(wrkMast, IotConstants.MESSAGE_TYPE_STOW, iotDbConfigService.getEffectiveTopics().getIngressStow(), payload);
     }
 
     private IotPublishRecord buildPickOutboundRecord(WrkMast wrkMast, String containerId) {
@@ -353,7 +358,7 @@
             payload.setReferenceId(wrkMast.getUserNo());
         }
         payload.setCreationTime(System.currentTimeMillis());
-        return initOutboundRecord(wrkMast, IotConstants.MESSAGE_TYPE_PICK, iotProperties.getTopics().getIngressPick(), payload);
+        return initOutboundRecord(wrkMast, IotConstants.MESSAGE_TYPE_PICK, iotDbConfigService.getEffectiveTopics().getIngressPick(), payload);
     }
 
     private IotPublishRecord initOutboundRecord(WrkMast wrkMast, String messageType, String publishTopic, IotInstructionMessage payload) {

--
Gitblit v1.9.1