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 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.List;
import java.util.Set;
import java.util.stream.Collectors;
@RequiredArgsConstructor
@Service
@ -47,17 +49,20 @@ public class RpcApplySuperviseService extends ServiceImpl<RpcApplySuperviseMappe
System.out.println(queryParam.getDepartId());
UserAuth user = UserContextHolder.getCurrentUser();
QueryWrapper<RpcApplySupervise> queryWrapper = new QueryWrapper<>();
if (!AppConstants.USER_TYPE_SUPER.equals(user.getUserType())) {
// Set<String> departIds = rightPeoples.stream().map(RpcRightPerson::getDepartId).collect(Collectors.toSet());
List<String> orgIds = new ArrayList<>();
if(StrUtil.isNotBlank(user.getDepartId())){
orgIds.add(user.getDepartId());
List<RpcRightPerson> rightPeoples = rpcRightPersonService.list(user.getUserName());
if (rightPeoples.isEmpty()) {
return new Page<RpcApplyVo>().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<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())){
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());
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());
}

Loading…
Cancel
Save