feat: 照片查询增加活动参数,并使用通用装置查询

dev
huangfeng 2 months ago
parent 7c299692e1
commit fa8f8623ee

@ -51,4 +51,5 @@ public class TerminalPhotoSelectVo {
private int pagesize; private int pagesize;
private Integer presetId; private Integer presetId;
private Integer activityId;
} }

@ -82,6 +82,8 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
@Resource @Resource
NewCacheService newCacheService; NewCacheService newCacheService;
@Resource
TerminalExtService terminalExtService;
@Autowired @Autowired
RequestResultsDao requestResultsDao; RequestResultsDao requestResultsDao;
@ -445,81 +447,91 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
List<Integer> termidlist = new ArrayList<>(); List<Integer> termidlist = new ArrayList<>();
ArrayList<Integer> channelidlist = new ArrayList<>(); ArrayList<Integer> channelidlist = new ArrayList<>();
List<DyAndLineAndTowerAndTermDto> dtos = new ArrayList<>(); // List<DyAndLineAndTowerAndTermDto> dtos = new ArrayList<>();
//
boolean queryCon = false; // boolean queryCon = false;
//
List<Integer> dypList = new ArrayList<>(); // List<Integer> dypList = new ArrayList<>();
List<Integer> linepList = new ArrayList<>(); // List<Integer> linepList = new ArrayList<>();
List<Integer> towerpList = new ArrayList<>(); // List<Integer> towerpList = new ArrayList<>();
List<Integer> termpList = new ArrayList<>(); // List<Integer> termpList = new ArrayList<>();
PermissionDetail permissionList = userService.getPermissionList(); // PermissionDetail permissionList = userService.getPermissionList();
if (CommonStatus.DELETE.value().equals(permissionList.getIsSuper())) { // if (CommonStatus.DELETE.value().equals(permissionList.getIsSuper())) {
dypList = permissionList.getDypList(); // dypList = permissionList.getDypList();
linepList = permissionList.getLinepList(); // linepList = permissionList.getLinepList();
towerpList = permissionList.getTowerpList(); // towerpList = permissionList.getTowerpList();
termpList = permissionList.getTermpList(); // termpList = permissionList.getTermpList();
} // }
View_Dy_Line_Tower_TerminalsExample example = new View_Dy_Line_Tower_TerminalsExample(); // View_Dy_Line_Tower_TerminalsExample example = new View_Dy_Line_Tower_TerminalsExample();
example.setGroupByClause("id"); // example.setGroupByClause("id");
View_Dy_Line_Tower_TerminalsExample.Criteria criteria = example.createCriteria(); // View_Dy_Line_Tower_TerminalsExample.Criteria criteria = example.createCriteria();
if (CollectionUtil.isNotEmpty(dypList)) { // if (CollectionUtil.isNotEmpty(dypList)) {
criteria.andDyIdIn(dypList); // criteria.andDyIdIn(dypList);
queryCon = true; // queryCon = true;
} // }
if (CollectionUtil.isNotEmpty(linepList)) { // if (CollectionUtil.isNotEmpty(linepList)) {
criteria.andLineIdIn(linepList); // criteria.andLineIdIn(linepList);
queryCon = true; // queryCon = true;
} // }
if (CollectionUtil.isNotEmpty(towerpList)) { // if (CollectionUtil.isNotEmpty(towerpList)) {
criteria.andTowerIdIn(towerpList); // criteria.andTowerIdIn(towerpList);
queryCon = true; // queryCon = true;
} // }
if (CollectionUtil.isNotEmpty(termpList)) { // if (CollectionUtil.isNotEmpty(termpList)) {
criteria.andIdIn(termpList); // criteria.andIdIn(termpList);
queryCon = true; // queryCon = true;
} // }
//
if (StrUtil.isEmpty(search)) { // if (StrUtil.isEmpty(search)) {
search = null; // search = null;
} else { // } else {
search = "%" + search + "%"; // search = "%" + search + "%";
} // }
if (StrUtil.isNotBlank(search)) { // if (StrUtil.isNotBlank(search)) {
View_Dy_Line_Tower_TerminalsExample.Criteria or = example.or(); // View_Dy_Line_Tower_TerminalsExample.Criteria or = example.or();
or.andLineNameLike(search); // or.andLineNameLike(search);
or.andTowerNameLike(search); // or.andTowerNameLike(search);
or.andCmdidLike(search); // or.andCmdidLike(search);
queryCon = true; // queryCon = true;
} // }
if (dyid != null && dyid.intValue() != -1) { // if (dyid != null && dyid.intValue() != -1) {
View_Dy_Line_Tower_TerminalsExample.Criteria or1 = example.or(); // View_Dy_Line_Tower_TerminalsExample.Criteria or1 = example.or();
or1.andDyIdEqualTo(dyid); // or1.andDyIdEqualTo(dyid);
queryCon = true; // queryCon = true;
} // }
if (lineid != null && lineid.intValue() != -1) { // if (lineid != null && lineid.intValue() != -1) {
View_Dy_Line_Tower_TerminalsExample.Criteria or2 = example.or(); // View_Dy_Line_Tower_TerminalsExample.Criteria or2 = example.or();
or2.andLineIdEqualTo(lineid); // or2.andLineIdEqualTo(lineid);
queryCon = true; // queryCon = true;
} // }
if (towerid != null && towerid.intValue() != -1) { // if (towerid != null && towerid.intValue() != -1) {
View_Dy_Line_Tower_TerminalsExample.Criteria or3 = example.or(); // View_Dy_Line_Tower_TerminalsExample.Criteria or3 = example.or();
or3.andTowerIdEqualTo(towerid); // or3.andTowerIdEqualTo(towerid);
queryCon = true; // queryCon = true;
} // }
if (termid != null && termid.intValue() != -1) { // if (termid != null && termid.intValue() != -1) {
View_Dy_Line_Tower_TerminalsExample.Criteria or3 = example.or(); // View_Dy_Line_Tower_TerminalsExample.Criteria or3 = example.or();
or3.andIdEqualTo(termid); // or3.andIdEqualTo(termid);
queryCon = true; // queryCon = true;
} // }
if ( queryCon ) { // if ( queryCon ) {
View_Dy_Line_Tower_TerminalsExample.Criteria or = example.or(); // View_Dy_Line_Tower_TerminalsExample.Criteria or = example.or();
or.andIdIsNotNull(); // or.andIdIsNotNull();
List<View_Dy_Line_Tower_Terminals> lists = view_dy_line_tower_terminalsDao.selectByPermission(example); // List<View_Dy_Line_Tower_Terminals> lists = view_dy_line_tower_terminalsDao.selectByPermission(example);
for (View_Dy_Line_Tower_Terminals item : lists) { // for (View_Dy_Line_Tower_Terminals item : lists) {
termidlist.add(item.getId()); // termidlist.add(item.getId());
// }
// }
PageInfo<View_Dy_Line_Tower_Terminals> result = terminalExtService.getTerminalPage(dyid, lineid, towerid, termid,
search, null,
null, null, null, vo.getActivityId(),
1, 100000);
if (!CollectionUtils.isEmpty(result.getList())) {
for (View_Dy_Line_Tower_Terminals terminal : result.getList()) {
termidlist.add(terminal.getId());
} }
} }

Loading…
Cancel
Save