From fb13d79f33ee8dced242fabf2d66950ae8689400 Mon Sep 17 00:00:00 2001
From: zyh <zyh@123>
Date: 星期一, 30 三月 2026 14:12:03 +0800
Subject: [PATCH] 修改数字孪生接口,将不同库位状态的数量上报

---
 src/main/java/com/zy/asrs/service/impl/DigitalTwinServiceImpl.java |   52 +++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 51 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/zy/asrs/service/impl/DigitalTwinServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/DigitalTwinServiceImpl.java
index d0f8b22..88969a8 100644
--- a/src/main/java/com/zy/asrs/service/impl/DigitalTwinServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/DigitalTwinServiceImpl.java
@@ -2,7 +2,6 @@
 
 import com.baomidou.mybatisplus.mapper.EntityWrapper;
 import com.core.common.Cools;
-import com.core.common.R;
 import com.zy.asrs.entity.BasCrnp;
 import com.zy.asrs.entity.LocCount;
 import com.zy.asrs.entity.LocDetl;
@@ -374,5 +373,56 @@
 
         return result;
     }
+    public Map<String, Object> getLocInfo() {
+        List<LocMast> LocMasts = locMastMapper.selectList(new EntityWrapper<>());
+        Map<String, Object> result = new HashMap<>();
 
+        // 鍒濆鍖栬鏁板櫒
+        int emptyLocCount = 0;
+        int fullZpalletCount = 0;
+        int emptyZpalletCount = 0;
+        int pickOutCount = 0;
+        int pickInCount = 0;
+        int outboundCount = 0;
+        int inboundCount = 0;
+        int disableCount = 0;
+        int mergeCount = 0;
+
+        // 缁熻姣忕鐘舵�佺殑搴撲綅鏁伴噺
+        for (LocMast locMast : LocMasts) {
+            String locSts = locMast.getLocSts();
+            if (locSts.equals("O")) {
+                emptyLocCount++;
+            } else if (locSts.equals("F")) {
+                fullZpalletCount++;
+            } else if (locSts.equals("D")) {
+                emptyZpalletCount++;
+            } else if (locSts.equals("P")) {
+                pickOutCount++;
+            } else if (locSts.equals("Q")) {
+                pickInCount++;
+            } else if (locSts.equals("R")) {
+                outboundCount++;
+            } else if (locSts.equals("S")) {
+                inboundCount++;
+            } else if (locSts.equals("X")) {
+                disableCount++;
+            } else if (locSts.equals("Y")) {
+                mergeCount++;
+            }
+        }
+
+        // 灏嗙粺璁$粨鏋滄斁鍏ap涓�
+        result.put("EmptyLoc", emptyLocCount);
+        result.put("FullZpallet", fullZpalletCount);
+        result.put("EmptyZpallet", emptyZpalletCount);
+        result.put("PickOut", pickOutCount);
+        result.put("PickIn", pickInCount);
+        result.put("Outbound", outboundCount);
+        result.put("Inbound", inboundCount);
+        result.put("Disable", disableCount);
+        result.put("Merge", mergeCount);
+
+        return result;
+    }
 }

--
Gitblit v1.9.1