From a8296ef06369452e9151624b6ac4e7cb12a394e3 Mon Sep 17 00:00:00 2001
From: czt <czt18638530771@163.com>
Date: 星期三, 21 一月 2026 16:06:18 +0800
Subject: [PATCH] 导入数据模板下载
---
fzzy-igdss-web/src/main/java/com/fzzy/common/manager/CommonManager.java | 51 ++++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 44 insertions(+), 7 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 d3253f8..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() {
@@ -134,13 +172,13 @@
/**
- * 鑾峰彇鍒嗗簱鍒楄〃
+ * 鏍规嵁鍏徃ID鑾峰彇鍏徃涓嬬殑鍒嗗簱鍒楄〃
*
* @author sgj
* @date 2025/12/12
*/
- public List<Dept> listDeptData() {
- return coreDeptService.getDeptData();
+ public List<Dept> listDeptData(String parentId) {
+ return coreDeptService.getDeptByUserType(parentId);
}
/**
@@ -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