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 |   22 ++++++++++++++++++----
 1 files changed, 18 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 97ca6be..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;
@@ -59,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);
+    }
 
     /**
      * 鏍规嵁搴撳尯缂栫爜鑾峰彇搴撳尯涓嬫墍鏈変粨搴撳垪琛�
@@ -200,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();
     }
 
 
@@ -229,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