Browse Source

fit:

1、维权督办:获取执法办案维权案件列表,列表做权限控制。
master
pengwei 2 months ago
parent
commit
77bb79ed88
  1. 2
      src/main/java/com/biutag/supervision/pojo/param/PoliceQueryParam.java
  2. 19
      src/main/java/com/biutag/supervision/service/RpcApplySuperviseService.java
  3. 22
      src/main/java/com/biutag/supervision/service/SupPoliceService.java

2
src/main/java/com/biutag/supervision/pojo/param/PoliceQueryParam.java

@ -23,4 +23,6 @@ public class PoliceQueryParam extends BasePage {
private String sortOrder; private String sortOrder;
private List<String> idCodes; private List<String> idCodes;
//启动or
private Boolean isOr;
} }

19
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.ArrayList;
import java.util.List; import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
@RequiredArgsConstructor @RequiredArgsConstructor
@Service @Service
@ -47,17 +49,20 @@ public class RpcApplySuperviseService extends ServiceImpl<RpcApplySuperviseMappe
System.out.println(queryParam.getDepartId()); System.out.println(queryParam.getDepartId());
UserAuth user = UserContextHolder.getCurrentUser(); UserAuth user = UserContextHolder.getCurrentUser();
QueryWrapper<RpcApplySupervise> queryWrapper = new QueryWrapper<>(); QueryWrapper<RpcApplySupervise> queryWrapper = new QueryWrapper<>();
if (!AppConstants.USER_TYPE_SUPER.equals(user.getUserType())) { if (!AppConstants.USER_TYPE_SUPER.equals(user.getUserType())) {
// Set<String> departIds = rightPeoples.stream().map(RpcRightPerson::getDepartId).collect(Collectors.toSet()); List<RpcRightPerson> rightPeoples = rpcRightPersonService.list(user.getUserName());
List<String> orgIds = new ArrayList<>(); if (rightPeoples.isEmpty()) {
if(StrUtil.isNotBlank(user.getDepartId())){ return new Page<RpcApplyVo>().setTotal(0).setRecords(new ArrayList<>());
orgIds.add(user.getDepartId());
} }
if(CollectionUtil.isNotEmpty(orgIds)){ // 是否是市局维权专干
log.info("'user-data--------'"+user.getDepartId()); if (rightPeoples.stream().noneMatch(item -> "1".equals(item.getCouncil()))) {
orgIds.addAll(departService.getAllNodeIds(user.getAuthDepartIds())); Set<String> departIds = rightPeoples.stream().map(RpcRightPerson::getDepartId).collect(Collectors.toSet());
List<String> childrenIds = departService.getAllNodeIds(departIds);
queryWrapper.in("a.handle_depart_id", childrenIds);
} }
} }
//待处理维权 //待处理维权
if("1".equals(queryParam.getActiveName())){ if("1".equals(queryParam.getActiveName())){
queryWrapper.eq("a.verified","0"); queryWrapper.eq("a.verified","0");

22
src/main/java/com/biutag/supervision/service/SupPoliceService.java

@ -42,12 +42,22 @@ public class SupPoliceService extends ServiceImpl<SupPoliceMapper, SupPolice> {
List<String> orgIds = departService.getAllNodeIds(user.getAuthDepartIds()); List<String> orgIds = departService.getAllNodeIds(user.getAuthDepartIds());
queryWrapper.in("p.org_id", orgIds); queryWrapper.in("p.org_id", orgIds);
} }
queryWrapper
.eq("p.del", AppConstants.UN_DEL) if( param.getIsOr()!= null && param.getIsOr()){
.like(StrUtil.isNotBlank(param.getName()), "p.name", StrUtil.trim(param.getName())); queryWrapper
queryWrapper.like(StrUtil.isNotBlank(param.getIdCode()), "p.id_code", StrUtil.trim(param.getIdCode())); .eq("p.del", AppConstants.UN_DEL)
queryWrapper.like(StrUtil.isNotBlank(param.getEmpNo()), "p.emp_no", StrUtil.trim(param.getEmpNo())); .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.getPhone()), "p.mobile", StrUtil.trim(param.getPhone())); 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())){ if(CollectionUtil.isNotEmpty(param.getIdCodes())){
queryWrapper.in("p.id_code",param.getIdCodes()); queryWrapper.in("p.id_code",param.getIdCodes());
} }

Loading…
Cancel
Save