fix:优化图片查询

dev
郭承 9 months ago
parent b9f46b87d0
commit 07bdeb0b5d

@ -439,15 +439,17 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
if (BeanUtil.isEmpty(dyid) || BeanUtil.isEmpty(lineid) || BeanUtil.isEmpty(towerid) || BeanUtil.isEmpty(channelid)) {
model.setList(beans);
} else {
List<Integer> termidlist = null;
List<Integer> termidlist = new ArrayList<>();
ArrayList<Integer> channelidlist = new ArrayList<>();
List<DyAndLineAndTowerAndTermDto> dtos = new ArrayList<>();
List<Integer> dypList = null;
List<Integer> linepList = null;
List<Integer> towerpList = null;
List<Integer> termpList = null;
boolean queryCon = false;
List<Integer> dypList = new ArrayList<>();
List<Integer> linepList = new ArrayList<>();
List<Integer> towerpList = new ArrayList<>();
List<Integer> termpList = new ArrayList<>();
PermissionDetail permissionList = userService.getPermissionList();
if (CommonStatus.DELETE.value().equals(permissionList.getIsSuper())) {
@ -462,15 +464,19 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
View_Dy_Line_Tower_TerminalsExample.Criteria criteria = example.createCriteria();
if (CollectionUtil.isNotEmpty(dypList)) {
criteria.andDyIdIn(dypList);
queryCon = true;
}
if (CollectionUtil.isNotEmpty(linepList)) {
criteria.andLineIdIn(linepList);
queryCon = true;
}
if (CollectionUtil.isNotEmpty(towerpList)) {
criteria.andTowerIdIn(towerpList);
queryCon = true;
}
if (CollectionUtil.isNotEmpty(termpList)) {
criteria.andIdIn(termpList);
queryCon = true;
}
if (StrUtil.isEmpty(search)) {
@ -483,24 +489,29 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
or.andLineNameLike(search);
or.andTowerNameLike(search);
or.andCmdidLike(search);
queryCon = true;
}
if (dyid != null && dyid.intValue() != -1) {
View_Dy_Line_Tower_TerminalsExample.Criteria or1 = example.or();
or1.andDyIdEqualTo(dyid);
queryCon = true;
}
if (lineid != null && lineid.intValue() != -1) {
View_Dy_Line_Tower_TerminalsExample.Criteria or2 = example.or();
or2.andLineIdEqualTo(lineid);
queryCon = true;
}
if (towerid != null && towerid.intValue() != -1) {
View_Dy_Line_Tower_TerminalsExample.Criteria or3 = example.or();
or3.andTowerIdEqualTo(towerid);
queryCon = true;
}
if (termid != null && termid.intValue() != -1) {
View_Dy_Line_Tower_TerminalsExample.Criteria or3 = example.or();
or3.andIdEqualTo(termid);
queryCon = true;
}
if ( example.getOredCriteria().size() > 1 ) {
if ( queryCon ) {
View_Dy_Line_Tower_TerminalsExample.Criteria or = example.or();
or.andIdIsNotNull();
List<View_Dy_Line_Tower_Terminals> lists = view_dy_line_tower_terminalsDao.selectByPermission(example);

Loading…
Cancel
Save