From 77bb79ed88174875c3b2a5fde62ff9f47f308296 Mon Sep 17 00:00:00 2001 From: pengwei Date: Sat, 11 Oct 2025 15:39:45 +0800 Subject: [PATCH] =?UTF-8?q?fit:=201=E3=80=81=E7=BB=B4=E6=9D=83=E7=9D=A3?= =?UTF-8?q?=E5=8A=9E=EF=BC=9A=E8=8E=B7=E5=8F=96=E6=89=A7=E6=B3=95=E5=8A=9E?= =?UTF-8?q?=E6=A1=88=E7=BB=B4=E6=9D=83=E6=A1=88=E4=BB=B6=E5=88=97=E8=A1=A8?= =?UTF-8?q?=EF=BC=8C=E5=88=97=E8=A1=A8=E5=81=9A=E6=9D=83=E9=99=90=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pojo/param/PoliceQueryParam.java | 2 ++ .../service/RpcApplySuperviseService.java | 19 ++++++++++------ .../supervision/service/SupPoliceService.java | 22 ++++++++++++++----- 3 files changed, 30 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/biutag/supervision/pojo/param/PoliceQueryParam.java b/src/main/java/com/biutag/supervision/pojo/param/PoliceQueryParam.java index 06471de..cccc0a2 100644 --- a/src/main/java/com/biutag/supervision/pojo/param/PoliceQueryParam.java +++ b/src/main/java/com/biutag/supervision/pojo/param/PoliceQueryParam.java @@ -23,4 +23,6 @@ public class PoliceQueryParam extends BasePage { private String sortOrder; private List idCodes; + //启动or + private Boolean isOr; } diff --git a/src/main/java/com/biutag/supervision/service/RpcApplySuperviseService.java b/src/main/java/com/biutag/supervision/service/RpcApplySuperviseService.java index 052b957..4d0e9cb 100644 --- a/src/main/java/com/biutag/supervision/service/RpcApplySuperviseService.java +++ b/src/main/java/com/biutag/supervision/service/RpcApplySuperviseService.java @@ -25,6 +25,8 @@ import org.springframework.transaction.annotation.Transactional; import java.util.ArrayList; import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; @RequiredArgsConstructor @Service @@ -47,17 +49,20 @@ public class RpcApplySuperviseService extends ServiceImpl queryWrapper = new QueryWrapper<>(); + if (!AppConstants.USER_TYPE_SUPER.equals(user.getUserType())) { -// Set departIds = rightPeoples.stream().map(RpcRightPerson::getDepartId).collect(Collectors.toSet()); - List orgIds = new ArrayList<>(); - if(StrUtil.isNotBlank(user.getDepartId())){ - orgIds.add(user.getDepartId()); + List rightPeoples = rpcRightPersonService.list(user.getUserName()); + if (rightPeoples.isEmpty()) { + return new Page().setTotal(0).setRecords(new ArrayList<>()); } - if(CollectionUtil.isNotEmpty(orgIds)){ - log.info("'user-data--------'"+user.getDepartId()); - orgIds.addAll(departService.getAllNodeIds(user.getAuthDepartIds())); + // 是否是市局维权专干 + if (rightPeoples.stream().noneMatch(item -> "1".equals(item.getCouncil()))) { + Set departIds = rightPeoples.stream().map(RpcRightPerson::getDepartId).collect(Collectors.toSet()); + List childrenIds = departService.getAllNodeIds(departIds); + queryWrapper.in("a.handle_depart_id", childrenIds); } } + //待处理维权 if("1".equals(queryParam.getActiveName())){ queryWrapper.eq("a.verified","0"); diff --git a/src/main/java/com/biutag/supervision/service/SupPoliceService.java b/src/main/java/com/biutag/supervision/service/SupPoliceService.java index 1d98d5a..4623a19 100644 --- a/src/main/java/com/biutag/supervision/service/SupPoliceService.java +++ b/src/main/java/com/biutag/supervision/service/SupPoliceService.java @@ -42,12 +42,22 @@ public class SupPoliceService extends ServiceImpl { List orgIds = departService.getAllNodeIds(user.getAuthDepartIds()); queryWrapper.in("p.org_id", orgIds); } - queryWrapper - .eq("p.del", AppConstants.UN_DEL) - .like(StrUtil.isNotBlank(param.getName()), "p.name", StrUtil.trim(param.getName())); - queryWrapper.like(StrUtil.isNotBlank(param.getIdCode()), "p.id_code", StrUtil.trim(param.getIdCode())); - queryWrapper.like(StrUtil.isNotBlank(param.getEmpNo()), "p.emp_no", StrUtil.trim(param.getEmpNo())); - queryWrapper.like(StrUtil.isNotBlank(param.getPhone()), "p.mobile", StrUtil.trim(param.getPhone())); + + if( param.getIsOr()!= null && param.getIsOr()){ + queryWrapper + .eq("p.del", AppConstants.UN_DEL) + .and(w->w.like(StrUtil.isNotBlank(param.getName()), "p.name", StrUtil.trim(param.getName())).or().like(StrUtil.isNotBlank(param.getEmpNo()), "p.emp_no", StrUtil.trim(param.getEmpNo()))); + queryWrapper.like(StrUtil.isNotBlank(param.getIdCode()), "p.id_code", StrUtil.trim(param.getIdCode())); + queryWrapper.like(StrUtil.isNotBlank(param.getPhone()), "p.mobile", StrUtil.trim(param.getPhone())); + }else{ + queryWrapper + .eq("p.del", AppConstants.UN_DEL) + .like(StrUtil.isNotBlank(param.getName()), "p.name", StrUtil.trim(param.getName())); + queryWrapper.like(StrUtil.isNotBlank(param.getIdCode()), "p.id_code", StrUtil.trim(param.getIdCode())); + queryWrapper.like(StrUtil.isNotBlank(param.getEmpNo()), "p.emp_no", StrUtil.trim(param.getEmpNo())); + queryWrapper.like(StrUtil.isNotBlank(param.getPhone()), "p.mobile", StrUtil.trim(param.getPhone())); + } + if(CollectionUtil.isNotEmpty(param.getIdCodes())){ queryWrapper.in("p.id_code",param.getIdCodes()); }