From 9e8d09ec8c825872f732f98cad402cbc6a85959a Mon Sep 17 00:00:00 2001
From: czt <czt18638530771@163.com>
Date: 星期四, 25 十二月 2025 19:50:39 +0800
Subject: [PATCH] Gis大屏库区弹窗提交

---
 fzzy-igdss-web/src/main/java/com/fzzy/group/manager/GroupManager.java |   64 ++++++++++++++++++++++++++++++++
 1 files changed, 64 insertions(+), 0 deletions(-)

diff --git a/fzzy-igdss-web/src/main/java/com/fzzy/group/manager/GroupManager.java b/fzzy-igdss-web/src/main/java/com/fzzy/group/manager/GroupManager.java
index b985e36..f65256e 100644
--- a/fzzy-igdss-web/src/main/java/com/fzzy/group/manager/GroupManager.java
+++ b/fzzy-igdss-web/src/main/java/com/fzzy/group/manager/GroupManager.java
@@ -125,6 +125,70 @@
         return deptService.listDept(null, companyId, null);
     }
 
+    /**
+     * 鑾峰彇搴撳尯灏佽淇℃伅
+     * @param companyId
+     * @return
+     */
+    public List<GroupDeptData> getDeptData(String companyId) {
+
+        List<GroupDeptData> list = new ArrayList<>();
+        GroupDeptData deptData;
+        List<Dept> deptList = deptService.getDeptData();
+        if (null != deptList && !deptList.isEmpty()) {
+            List<Depot> depotList;
+            for (Dept dept : deptList) {
+                deptData = new GroupDeptData();
+                deptData.setDeptId(dept.getId());
+                deptData.setDeptName(dept.getKqmc());
+                deptData.setCode(dept.getXzqhdm());
+                deptData.setCounty(dept.getXzqhmc());
+                deptData.setJd(dept.getJd());
+                deptData.setWd(dept.getWd());
+
+                //缁熻浠撳簱鏁�
+                depotList = depotService.getCacheDepotList(dept.getCompanyId(), dept.getId());
+                if (null != depotList && !depotList.isEmpty()) {
+                    for (Depot depot : depotList) {
+                        deptData.setDepotNumber(deptData.getDepotNumber() + 1);
+
+                        if(StringUtils.isNotBlank(depot.getPledgeBank())){
+                            deptData.setDepotBankNumber(deptData.getDepotBankNumber() + 1);
+                        }
+
+                        if(null == depot.getStorageReal()){
+                            depot.setStorageReal(0.0);
+                        }
+                        deptData.setStorageNum(deptData.getStorageNum() + depot.getStorageReal()/1000);
+                    }
+                }
+
+                //缁熻鍑哄叆搴撴暟閲�
+                InoutParam inoutParam = new InoutParam();
+                inoutParam.setDeptId(dept.getId());
+                inoutParam.setCompanyId(companyId);
+                inoutParam.setStart(DateUtil.getCurZero(new Date()));
+                inoutParam.setEnd(DateUtil.getNextZero(new Date()));
+                List<InoutRecord> inoutRecords = inoutRecordService.listInout(inoutParam);
+                if (null != inoutRecords && !inoutRecords.isEmpty()) {
+                    for (InoutRecord inoutRecord : inoutRecords) {
+                        if (Constant.TYPE_IN.equals(inoutRecord.getType())) {
+                            deptData.setInNum(deptData.getInNum() + 1);
+                        }
+                        if (Constant.TYPE_OUT.equals(inoutRecord.getType())){
+                            deptData.setOutNum(deptData.getOutNum() + 1);
+
+                        }
+                    }
+                }
+
+                list.add(deptData);
+            }
+        }
+
+        return list;
+    }
+
 
     /**
      * 澶у睆棣栭〉缁熻淇℃伅锛氫紒涓氭暟銆佸簱鍖烘暟銆佷粨搴撴暟銆佽川鎶间粨鏁般�佹暎绮強鎴愬搧绮暟銆佸垎鍝佺搴撳瓨鏁�

--
Gitblit v1.9.3