fix: 流域下拉优化
This commit is contained in:
parent
5f7179949a
commit
272b85b275
@ -118,14 +118,9 @@ public class SdRvcdDicServiceImpl extends ServiceImpl<SdRvcdDicMapper, SdRvcdDic
|
||||
|
||||
@Override
|
||||
public List<SdRvcdDic> selectForDropdown(String rvnm, String rvcd) {
|
||||
|
||||
LambdaQueryWrapper<SdRvcdDic> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.like(rvnm != null && !rvnm.isEmpty(), SdRvcdDic::getRvnm, rvnm)
|
||||
.eq(rvcd != null && !rvcd.isEmpty(), SdRvcdDic::getRvcd, rvcd)
|
||||
.eq(SdRvcdDic::getEnabled, 1)
|
||||
.orderByAsc(SdRvcdDic::getBaseid,SdRvcdDic::getOrderIndex);
|
||||
List<SdRvcdDic> dropdownList = this.baseMapper.selectRegDropdown(rvnm, rvcd);
|
||||
if("admin".equals(SecurityUtils.getCurrentUsername())){
|
||||
return this.list(wrapper);
|
||||
return dropdownList;
|
||||
}
|
||||
Set<String> authorizedStations = getUserAuthorizedStationCodes();
|
||||
if (authorizedStations != null && !authorizedStations.isEmpty()) {
|
||||
@ -141,8 +136,7 @@ public class SdRvcdDicServiceImpl extends ServiceImpl<SdRvcdDicMapper, SdRvcdDic
|
||||
.toList();
|
||||
|
||||
if (!rvcds.isEmpty()) {
|
||||
List<SdRvcdDic> list = this.list(wrapper);
|
||||
return list.stream()
|
||||
return dropdownList.stream()
|
||||
.filter(rvcdDic -> rvcds.contains(rvcdDic.getRvcd()))
|
||||
.collect(Collectors.toList());
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user