|
|
|
@ -4,11 +4,13 @@ import cn.hutool.core.bean.BeanUtil;
|
|
|
|
|
import cn.hutool.core.bean.copier.CopyOptions;
|
|
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
|
import com.shxy.xymanager_common.bean.PermissionDetail;
|
|
|
|
|
import com.shxy.xymanager_common.bean.ServiceBody;
|
|
|
|
|
import com.shxy.xymanager_common.dto.TermChannelAndMapperDto;
|
|
|
|
|
import com.shxy.xymanager_common.entity.*;
|
|
|
|
|
import com.shxy.xymanager_common.enums.CommonStatus;
|
|
|
|
|
import com.shxy.xymanager_common.exception.Asserts;
|
|
|
|
|
import com.shxy.xymanager_common.model.DyLineTreeListModel;
|
|
|
|
|
import com.shxy.xymanager_common.model.LineAndGtAndChannelListModel;
|
|
|
|
|
import com.shxy.xymanager_common.page.PageUtils;
|
|
|
|
|
import com.shxy.xymanager_common.page.TableDataInfo;
|
|
|
|
@ -16,6 +18,7 @@ import com.shxy.xymanager_common.vo.*;
|
|
|
|
|
import com.shxy.xymanager_dao.dao.*;
|
|
|
|
|
import com.shxy.xymanager_service.service.CacheService;
|
|
|
|
|
import com.shxy.xymanager_service.service.LineService;
|
|
|
|
|
import com.shxy.xymanager_service.service.UserService;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
@ -53,6 +56,12 @@ public class LineServiceImpl implements LineService {
|
|
|
|
|
@Autowired
|
|
|
|
|
private CacheService cacheService;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private UserService userService;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private View_Dy_Line_Tower_TerminalsDao view_dy_line_tower_terminalsDao;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取线路
|
|
|
|
|
*
|
|
|
|
@ -77,11 +86,11 @@ public class LineServiceImpl implements LineService {
|
|
|
|
|
List<DyLevel> dyLevels = dyLevelDao.selectByExample(new DyLevelExample());
|
|
|
|
|
HashMap<Integer, DyLevel> map = new HashMap<>();
|
|
|
|
|
if (CollectionUtil.isNotEmpty(dyLevels)) {
|
|
|
|
|
for (DyLevel item:dyLevels) {
|
|
|
|
|
for (DyLevel item : dyLevels) {
|
|
|
|
|
map.put(item.getId(), item);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
for (Lines litem:lines) {
|
|
|
|
|
for (Lines litem : lines) {
|
|
|
|
|
Integer dyLevelId = litem.getDyLevelId();
|
|
|
|
|
if (BeanUtil.isNotEmpty(dyLevelId)) {
|
|
|
|
|
DyLevel dyLevel = map.get(dyLevelId);
|
|
|
|
@ -171,6 +180,38 @@ public class LineServiceImpl implements LineService {
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public ServiceBody<LineAndGtAndChannelListModel> getLineAndGt(LineAndGtAndChannelVo vo) {
|
|
|
|
|
// PermissionDetail permissionDetail = new PermissionDetail();
|
|
|
|
|
// try {
|
|
|
|
|
// permissionDetail = userService.getPermissionList();
|
|
|
|
|
// } catch (Exception e) {
|
|
|
|
|
// Asserts.fail("权限解析错误");
|
|
|
|
|
// e.printStackTrace();
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// List<Integer> dypList = permissionDetail.getDypList();
|
|
|
|
|
// List<Integer> linepList = permissionDetail.getLinepList();
|
|
|
|
|
// List<Integer> towerpList = permissionDetail.getTowerpList();
|
|
|
|
|
// List<Integer> termpList = permissionDetail.getTermpList();
|
|
|
|
|
// Integer aSuper = permissionDetail.getIsSuper();
|
|
|
|
|
// Integer uid = permissionDetail.getUid();
|
|
|
|
|
//
|
|
|
|
|
// View_Dy_Line_Tower_TerminalsExample example = new View_Dy_Line_Tower_TerminalsExample();
|
|
|
|
|
// View_Dy_Line_Tower_TerminalsExample.Criteria criteria = example.createCriteria();
|
|
|
|
|
// if (BeanUtil.isNotEmpty(dyid) && dyid.intValue() != -1) {
|
|
|
|
|
// criteria.andDyIdEqualTo(dyid);
|
|
|
|
|
// }
|
|
|
|
|
// if (BeanUtil.isNotEmpty(lineid) && lineid.intValue() != -1) {
|
|
|
|
|
// criteria.andLineIdEqualTo(lineid);
|
|
|
|
|
// }
|
|
|
|
|
// if (BeanUtil.isNotEmpty(tower) && tower.intValue() != -1) {
|
|
|
|
|
// criteria.andTowerIdEqualTo(tower);
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// List<View_Dy_Line_Tower_Terminals> list = view_dy_line_tower_terminalsDao.selectByExample(example);
|
|
|
|
|
// if ((CollectionUtil.isNotEmpty(dypList) || CollectionUtil.isNotEmpty(linepList) || CollectionUtil.isNotEmpty(towerpList) || CollectionUtil.isNotEmpty(termpList)) || CommonStatus.EFFECTIVE.value().equals(aSuper)) {
|
|
|
|
|
// List<DyLevel> list = dyLevelDao.selectTreeList(CommonStatus.EFFECTIVE.value(), dypList, linepList, towerpList, termpList, aSuper);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
LineAndGtAndChannelListModel model = new LineAndGtAndChannelListModel();
|
|
|
|
|
Integer id = vo.getId();
|
|
|
|
|
Integer type = vo.getType();
|
|
|
|
@ -180,7 +221,15 @@ public class LineServiceImpl implements LineService {
|
|
|
|
|
List<LineAndGtAndChannelListModel.Bean> beans = new ArrayList<>();
|
|
|
|
|
//查询所有
|
|
|
|
|
if (type == 1) {
|
|
|
|
|
List<DyLevel> list = dyLevelDao.selectByExample(new DyLevelExample());
|
|
|
|
|
DyLevelExample example = new DyLevelExample();
|
|
|
|
|
// if (CommonStatus.DELETE.value().equals(aSuper)) {
|
|
|
|
|
// if (CollectionUtil.isNotEmpty(dypList)) {
|
|
|
|
|
// example.createCriteria().andIdIn(dypList);
|
|
|
|
|
// } else {
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
List<DyLevel> list = dyLevelDao.selectByExample(example);
|
|
|
|
|
beans = BeanUtil.copyToList(list, LineAndGtAndChannelListModel.Bean.class);
|
|
|
|
|
} else if (type == 2) {
|
|
|
|
|
if (id != null) {
|
|
|
|
|