Commit aa0eb72d authored by 鲁鸿波's avatar 鲁鸿波

危险作业单位查询包含下级

parent d3d9c014
......@@ -1876,11 +1876,17 @@ public class THazardWorkPlanServiceImpl extends SuperServiceImpl<THazardWorkPlan
//查询下级机构id
queryWrapper.in(THazardWorkPlan.ORG_ID, idsChildrenById);*/
List<String> list = Arrays.stream(queryParam.getOrgId().split(","))
.filter(s -> !s.trim().isEmpty()) // 忽略空值
.collect(Collectors.toList());
List<String> idsChildrenById = new ArrayList<>();
for(String orgId:list){
idsChildrenById.addAll(newSysOrgService.getIdsChildrenById(orgId));
}
idsChildrenById.addAll(list);
//查询下级机构id
queryWrapper.in(THazardWorkPlan.ORG_ID, list);
queryWrapper.in(THazardWorkPlan.ORG_ID, idsChildrenById);
}
if (StringHelper.isNotEmpty(queryParam.getStatus())) {
queryWrapper.eq(THazardWorkPlan.STATUS, queryParam.getStatus());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment