From ae7c4266892b1017ac5cb8a1c937c78fc9a7a6cd Mon Sep 17 00:00:00 2001
From: sgj <1442489573@qq.com>
Date: 星期二, 20 一月 2026 17:50:31 +0800
Subject: [PATCH] ai事件,智能抓拍,根据登录用户获取公司和库区搜索数据

---
 fzzy-igdss-web/src/main/java/com/fzzy/common/manager/CommonManager.java |   45 +++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 41 insertions(+), 4 deletions(-)

diff --git a/fzzy-igdss-web/src/main/java/com/fzzy/common/manager/CommonManager.java b/fzzy-igdss-web/src/main/java/com/fzzy/common/manager/CommonManager.java
index ac2440c..02c08f7 100644
--- a/fzzy-igdss-web/src/main/java/com/fzzy/common/manager/CommonManager.java
+++ b/fzzy-igdss-web/src/main/java/com/fzzy/common/manager/CommonManager.java
@@ -9,7 +9,7 @@
 import com.fzzy.igds.service.*;
 import com.fzzy.igds.utils.ContextUtil;
 import com.fzzy.igds.utils.DateUtil;
-import com.fzzy.work.data.OrderStatus;
+import com.fzzy.work.data.WorkStatus;
 import com.fzzy.work.service.WorkOrderService;
 import com.ruoyi.common.core.domain.entity.SysDept;
 import com.ruoyi.common.core.domain.entity.SysDictData;
@@ -21,6 +21,7 @@
 import org.springframework.stereotype.Component;
 
 import javax.annotation.Resource;
+import java.util.ArrayList;
 import java.util.Date;
 import java.util.LinkedHashMap;
 import java.util.List;
@@ -58,6 +59,21 @@
     private EventInfoService eventInfoService;
     @Resource
     private SnapRecordService snapRecordService;
+    @Resource
+    private GatewaySerService gatewaySerService;
+
+    /**
+     * 鏍规嵁搴撳尯缂栫爜鑾峰彇搴撳尯缃戝叧淇℃伅
+     * @param deptId
+     * @return
+     */
+    public GatewaySer getGatewaySerByDeptId(String deptId) {
+        if(StringUtils.isBlank(deptId)){
+            deptId = ContextUtil.subDeptId(null);
+        }
+
+        return gatewaySerService.getCacheSerByDeptId(deptId);
+    }
 
     /**
      * 鏍规嵁搴撳尯缂栫爜鑾峰彇搴撳尯涓嬫墍鏈変粨搴撳垪琛�
@@ -126,6 +142,28 @@
     }
 
     /**
+     * 鏍规嵁浠撳簱绫诲瀷鑾峰彇搴撳尯涓嬩粨搴撳垪琛�
+     * @param deptId
+     * @param depotTypes  绫诲瀷澶氫釜锛岀敤閫楀彿闅斿紑
+     * @return
+     */
+    public List<Depot> listAllDepot(String deptId, String depotTypes) {
+
+        List<Depot> depots = this.listDepotByDeptId(deptId);
+        if(null == depots || depots.isEmpty()){
+            return null;
+        }
+
+        List<Depot> result = new ArrayList<>();
+        for (Depot depot : depots) {
+            if (depotTypes.contains(depot.getDepotType())) {
+                result.add(depot);
+            }
+        }
+        return result;
+    }
+
+    /**
      * @return
      */
     public List<SysDictData> getInoutType() {
@@ -177,8 +215,7 @@
      * @date 2025/12/17
      */
     public List<Company> listCompanyData() {
-        SysUser user = ContextUtil.getLoginUser();
-        return coreCompanyService.listCompany(null, null, user.getDeptId() + "");
+        return coreCompanyService.getCompanyByUserType();
     }
 
 
@@ -206,7 +243,7 @@
         MainData mainData = new MainData();
 
         //寰呭姙宸ュ崟鏁�
-        Integer orderNum = workOrderService.getNumByUser(OrderStatus.STATUS_30.getCode(), user.getLoginName());
+        Integer orderNum = workOrderService.getTodoNumByUser(user);
         mainData.setOrderNum(orderNum);
 
         //缁熻鍑哄叆搴撲俊鎭�

--
Gitblit v1.9.3