Browse Source

fix: 修复领导选不到的问题

master
wxc 4 months ago
parent
commit
c9a133e6e7
  1. 3
      src/main/java/com/biutag/supervision/service/SupPoliceService.java

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

@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.biutag.supervision.common.UserContextHolder; import com.biutag.supervision.common.UserContextHolder;
import com.biutag.supervision.constants.AppConstants; import com.biutag.supervision.constants.AppConstants;
import com.biutag.supervision.constants.enums.PersonTypeEnum;
import com.biutag.supervision.constants.enums.RoleCodeEnum; import com.biutag.supervision.constants.enums.RoleCodeEnum;
import com.biutag.supervision.mapper.SupPoliceMapper; import com.biutag.supervision.mapper.SupPoliceMapper;
import com.biutag.supervision.pojo.entity.SupPolice; import com.biutag.supervision.pojo.entity.SupPolice;
@ -140,7 +141,7 @@ public class SupPoliceService extends ServiceImpl<SupPoliceMapper, SupPolice> {
public List<SupPolice> listLeaderByDepartId(String departId) { public List<SupPolice> listLeaderByDepartId(String departId) {
List<String> departIds = departService.getAllNodeIds(List.of(departId)); List<String> departIds = departService.getAllNodeIds(List.of(departId));
return list(new LambdaQueryWrapper<SupPolice>().in(SupPolice::getOrgId, departIds).isNotNull(SupPolice::getPhone).orderByDesc(SupPolice::getPosition)); return list(new LambdaQueryWrapper<SupPolice>().in(SupPolice::getOrgId, departIds).eq(SupPolice::getPersonType, PersonTypeEnum.police.getValue()).orderByDesc(SupPolice::getPosition));
} }
public Boolean exists(String departId) { public Boolean exists(String departId) {

Loading…
Cancel
Save