|
|
@ -6,10 +6,7 @@ import cn.hutool.core.collection.CollectionUtil;
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
|
import com.shxy.xymanager_common.bean.ServiceBody;
|
|
|
|
import com.shxy.xymanager_common.bean.ServiceBody;
|
|
|
|
import com.shxy.xymanager_common.dto.DyLineAndTerminalAndChannelDto;
|
|
|
|
import com.shxy.xymanager_common.dto.*;
|
|
|
|
import com.shxy.xymanager_common.dto.LineAndDyNameDto;
|
|
|
|
|
|
|
|
import com.shxy.xymanager_common.dto.TermChannelAndMapperDto;
|
|
|
|
|
|
|
|
import com.shxy.xymanager_common.dto.TowerDto;
|
|
|
|
|
|
|
|
import com.shxy.xymanager_common.entity.TerminalChannels;
|
|
|
|
import com.shxy.xymanager_common.entity.TerminalChannels;
|
|
|
|
import com.shxy.xymanager_common.entity.TerminalStatus;
|
|
|
|
import com.shxy.xymanager_common.entity.TerminalStatus;
|
|
|
|
import com.shxy.xymanager_common.entity.Terminals;
|
|
|
|
import com.shxy.xymanager_common.entity.Terminals;
|
|
|
@ -21,6 +18,7 @@ import com.shxy.xymanager_common.model.TerminalChannelListModel;
|
|
|
|
import com.shxy.xymanager_common.model.TerminalChannelMapperListModel;
|
|
|
|
import com.shxy.xymanager_common.model.TerminalChannelMapperListModel;
|
|
|
|
import com.shxy.xymanager_common.page.PageUtils;
|
|
|
|
import com.shxy.xymanager_common.page.PageUtils;
|
|
|
|
import com.shxy.xymanager_common.vo.*;
|
|
|
|
import com.shxy.xymanager_common.vo.*;
|
|
|
|
|
|
|
|
import com.shxy.xymanager_dao.dao.DyLevelDao;
|
|
|
|
import com.shxy.xymanager_dao.dao.TerminalChannelsDao;
|
|
|
|
import com.shxy.xymanager_dao.dao.TerminalChannelsDao;
|
|
|
|
import com.shxy.xymanager_dao.dao.TerminalPhotoDao;
|
|
|
|
import com.shxy.xymanager_dao.dao.TerminalPhotoDao;
|
|
|
|
import com.shxy.xymanager_dao.dao.TerminalStatusDao;
|
|
|
|
import com.shxy.xymanager_dao.dao.TerminalStatusDao;
|
|
|
@ -51,6 +49,9 @@ public class TerminalChannelServiceImpl implements TerminalChannelService {
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
TerminalPhotoDao terminalPhotoDao;
|
|
|
|
TerminalPhotoDao terminalPhotoDao;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
DyLevelDao dyLevelDao;
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
CacheService cacheService;
|
|
|
|
CacheService cacheService;
|
|
|
|
|
|
|
|
|
|
|
@ -232,6 +233,7 @@ public class TerminalChannelServiceImpl implements TerminalChannelService {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public ServiceBody<DyLineTreeAndChannelListModel> getChannelTreeList(TerminalIdVo vo) {
|
|
|
|
public ServiceBody<DyLineTreeAndChannelListModel> getChannelTreeList(TerminalIdVo vo) {
|
|
|
|
|
|
|
|
Integer termId = vo.getTermid();
|
|
|
|
DyLineTreeAndChannelListModel model = new DyLineTreeAndChannelListModel();
|
|
|
|
DyLineTreeAndChannelListModel model = new DyLineTreeAndChannelListModel();
|
|
|
|
List<TerminalChannels> channellist = terminalChannelsDao.selectChannelList(CommonStatus.EFFECTIVE.value());
|
|
|
|
List<TerminalChannels> channellist = terminalChannelsDao.selectChannelList(CommonStatus.EFFECTIVE.value());
|
|
|
|
ArrayList<DyLineTreeAndChannelListModel.ChannelChooseBean> channels = new ArrayList<>();
|
|
|
|
ArrayList<DyLineTreeAndChannelListModel.ChannelChooseBean> channels = new ArrayList<>();
|
|
|
@ -244,6 +246,60 @@ public class TerminalChannelServiceImpl implements TerminalChannelService {
|
|
|
|
channels.add(channelChooseBean);
|
|
|
|
channels.add(channelChooseBean);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
model.setChannellist(channels);
|
|
|
|
model.setChannellist(channels);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Map<Integer, Terminals> terminalMap = cacheService.getTerminalMap();
|
|
|
|
|
|
|
|
// Map<Integer, TowerDto> towerMap = cacheService.getTowerMap();
|
|
|
|
|
|
|
|
// Map<Integer, LineAndDyNameDto> lineMap = cacheService.getLineMap();
|
|
|
|
|
|
|
|
// List<DyAndLineAndTowerAndTermDto> dtos = dyLevelDao.selectDyAndLineAndTowerAnTermList(null, null, null, termId, null, CommonStatus.EFFECTIVE.value());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ArrayList<DyLineTreeAndChannelListModel.DyListBean> dymodellist = new ArrayList<>();
|
|
|
|
|
|
|
|
// for (int i = 0; i < dtos.size(); i++) {
|
|
|
|
|
|
|
|
// DyAndLineAndTowerAndTermDto dyDto = dtos.get(i);
|
|
|
|
|
|
|
|
// List<LineAndTowerAndTermDto> linelist = dyDto.getList();
|
|
|
|
|
|
|
|
// DyLineTreeAndChannelListModel.DyListBean dyListBean = new DyLineTreeAndChannelListModel.DyListBean();
|
|
|
|
|
|
|
|
// dyListBean.setId(dyDto.getId());
|
|
|
|
|
|
|
|
// dyListBean.setName(dyDto.getName());
|
|
|
|
|
|
|
|
// dyListBean.setDyValue(dyDto.getDyValue());
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// ArrayList<DyLineTreeAndChannelListModel.LineBean> linemodellist = new ArrayList<>();
|
|
|
|
|
|
|
|
// if (CollectionUtil.isEmpty(linelist)) {
|
|
|
|
|
|
|
|
// continue;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// for (int j = 0; j < linelist.size(); j++) {
|
|
|
|
|
|
|
|
// LineAndTowerAndTermDto lineDto = linelist.get(j);
|
|
|
|
|
|
|
|
// List<TowerAndTermDto> termlist = lineDto.getList();
|
|
|
|
|
|
|
|
// DyLineTreeAndChannelListModel.LineBean linebean = new DyLineTreeAndChannelListModel.LineBean();
|
|
|
|
|
|
|
|
// linebean.setId(lineDto.getId());
|
|
|
|
|
|
|
|
// linebean.setName(lineDto.getName());
|
|
|
|
|
|
|
|
// linebean.setBsManufacturer(lineDto.getBsManufacturer());
|
|
|
|
|
|
|
|
// if (CollectionUtil.isEmpty(termlist)) {
|
|
|
|
|
|
|
|
// continue;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// for (int k = 0; k < termlist.size(); k++) {
|
|
|
|
|
|
|
|
// TowerAndTermDto towerAndTermDto = termlist.get(k);
|
|
|
|
|
|
|
|
// List<Terminals> list = towerAndTermDto.getList();
|
|
|
|
|
|
|
|
// for (int l = 0; l < list.size(); l++) {
|
|
|
|
|
|
|
|
// Terminals terminals = list.get(l);
|
|
|
|
|
|
|
|
// DyLineTreeAndChannelListModel.TerminalBean termBean = new DyLineTreeAndChannelListModel.TerminalBean();
|
|
|
|
|
|
|
|
// termBean.setId(terminals.getId());
|
|
|
|
|
|
|
|
// termBean.setCmdid(terminals.getCmdid());
|
|
|
|
|
|
|
|
// termBean.setName(terminals.getName());
|
|
|
|
|
|
|
|
// termBean.setTowerid(terminals.getTowerid());
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// linebean.setList();
|
|
|
|
|
|
|
|
// linemodellist.add(linebean);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// dyListBean.setList(linemodellist);
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// dymodellist.add(dyListBean);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// model.setList(dymodellist);
|
|
|
|
|
|
|
|
|
|
|
|
List<DyLineAndTerminalAndChannelDto> list = terminalChannelsDao.selectAllAndChannelByTermid(vo.getTermid(), CommonStatus.EFFECTIVE.value());
|
|
|
|
List<DyLineAndTerminalAndChannelDto> list = terminalChannelsDao.selectAllAndChannelByTermid(vo.getTermid(), CommonStatus.EFFECTIVE.value());
|
|
|
|
boolean empty = CollectionUtil.isEmpty(list);
|
|
|
|
boolean empty = CollectionUtil.isEmpty(list);
|
|
|
|
if (empty) {
|
|
|
|
if (empty) {
|
|
|
|