From dccf741494a83781a50654e6a7b67a0e48675ea6 Mon Sep 17 00:00:00 2001
From: linwei <872216696@qq.com>
Date: Wed, 04 Feb 2026 14:11:00 +0800
Subject: [PATCH] 工单权限优化

---
 drone-service/drone-gd/src/main/java/org/sxkj/gd/orderdata/service/impl/GdSupplyDemandServiceImpl.java |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/drone-service/drone-gd/src/main/java/org/sxkj/gd/orderdata/service/impl/GdSupplyDemandServiceImpl.java b/drone-service/drone-gd/src/main/java/org/sxkj/gd/orderdata/service/impl/GdSupplyDemandServiceImpl.java
index 3a84be0..3f64131 100644
--- a/drone-service/drone-gd/src/main/java/org/sxkj/gd/orderdata/service/impl/GdSupplyDemandServiceImpl.java
+++ b/drone-service/drone-gd/src/main/java/org/sxkj/gd/orderdata/service/impl/GdSupplyDemandServiceImpl.java
@@ -74,7 +74,11 @@
 
 	@Override
 	public IPage<GdSupplyDemandVO> selectGdSupplyDemandPage(IPage<GdSupplyDemandVO> page, GdSupplyDemandPageParam gdSupplyDemand) {
-		gdSupplyDemand.setDeptList(SysCache.getDeptChildIds(Long.valueOf(AuthUtil.getDeptId())));
+		List<Long> deptList = new ArrayList<>();
+		if (!AuthUtil.isAdministrator()) {
+			deptList = SysCache.getDeptChildIds(Long.valueOf(AuthUtil.getDeptId()));
+		}
+		gdSupplyDemand.setDeptList(deptList);
 		return page.setRecords(baseMapper.selectGdSupplyDemandPage(page, gdSupplyDemand));
 	}
 
@@ -88,7 +92,11 @@
 		if (Func.isEmpty(gdSupplyDemand)) {
 			throw new ServiceException("需求参数不能为空");
 		}
-		GdSupplyDemandEntity detail = baseMapper.selectGdSupplyDemandDetail(gdSupplyDemand, SysCache.getDeptChildIds(Long.valueOf(AuthUtil.getDeptId())));
+		List<Long> deptList = new ArrayList<>();
+		if (!AuthUtil.isAdministrator()) {
+			deptList = SysCache.getDeptChildIds(Long.valueOf(AuthUtil.getDeptId()));
+		}
+		GdSupplyDemandEntity detail = baseMapper.selectGdSupplyDemandDetail(gdSupplyDemand, deptList);
 		if (detail == null) {
 			throw new ServiceException("未查询到数据");
 		}

--
Gitblit v1.9.3