吉安感知网项目-后端
linwei
2026-01-20 67961e8f4fdbcd83bf59f8c8bd3f8600618e3d61
drone-service/drone-gd/src/main/java/org/sxkj/gd/orderdata/service/impl/GdSupplyDemandServiceImpl.java
@@ -72,7 +72,7 @@
   @Override
   public IPage<GdSupplyDemandVO> selectGdSupplyDemandPage(IPage<GdSupplyDemandVO> page, GdSupplyDemandPageParam gdSupplyDemand) {
      return page.setRecords(baseMapper.selectGdSupplyDemandPage(page, gdSupplyDemand, buildDeptIdList()));
      return page.setRecords(baseMapper.selectGdSupplyDemandPage(page, gdSupplyDemand, SysCache.getDeptChildIds(Long.valueOf(AuthUtil.getDeptId()))));
   }
   @Override
@@ -85,7 +85,7 @@
      if (Func.isEmpty(gdSupplyDemand)) {
         throw new ServiceException("需求参数不能为空");
      }
      GdSupplyDemandEntity detail = baseMapper.selectGdSupplyDemandDetail(gdSupplyDemand, buildDeptIdList());
      GdSupplyDemandEntity detail = baseMapper.selectGdSupplyDemandDetail(gdSupplyDemand, SysCache.getDeptChildIds(Long.valueOf(AuthUtil.getDeptId())));
      if (detail == null) {
         throw new ServiceException("未查询到数据");
      }
@@ -222,27 +222,11 @@
      }
      GdSupplyDemandDTO query = new GdSupplyDemandDTO();
      query.setId(demandId);
      GdSupplyDemandEntity detail = baseMapper.selectGdSupplyDemandDetail(query, buildDeptIdList());
      GdSupplyDemandEntity detail = baseMapper.selectGdSupplyDemandDetail(query, SysCache.getDeptChildIds(Long.valueOf(AuthUtil.getDeptId())));
      if (detail == null) {
         throw new ServiceException("需求数据不存在");
      }
      return detail;
   }
   private List<Long> buildDeptIdList() {
      if (AuthUtil.isAdministrator()) {
         return null;
      }
      Long deptId = Long.valueOf(AuthUtil.getDeptId());
      List<Long> deptIdList = SysCache.getDeptChildIds(deptId);
      List<Long> result = new ArrayList<>();
      if (Func.isNotEmpty(deptIdList)) {
         result.addAll(deptIdList);
      }
      if (!result.contains(deptId)) {
         result.add(deptId);
      }
      return result;
   }
   @Override