From 08ddfad4530a014094c06fe68b8c2d9a0753403a Mon Sep 17 00:00:00 2001
From: linwei <872216696@qq.com>
Date: Wed, 05 Aug 2026 14:09:29 +0800
Subject: [PATCH] fix(gd): 修复线索事件查询中的SQL语法错误

---
 drone-service/drone-gd/src/main/java/org/sxkj/gd/orderdata/service/impl/GdSupplyDemandServiceImpl.java |   13 +++++++++++--
 1 files changed, 11 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 496e671..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,12 @@
 
 	@Override
 	public IPage<GdSupplyDemandVO> selectGdSupplyDemandPage(IPage<GdSupplyDemandVO> page, GdSupplyDemandPageParam gdSupplyDemand) {
-		return page.setRecords(baseMapper.selectGdSupplyDemandPage(page, gdSupplyDemand, 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));
 	}
 
 	@Override
@@ -87,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