|
|
@ -6,7 +6,6 @@ import cn.hutool.core.date.DateField;
|
|
|
|
import cn.hutool.core.date.DateTime;
|
|
|
|
import cn.hutool.core.date.DateTime;
|
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
import cn.hutool.setting.SettingUtil;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
@ -20,18 +19,19 @@ import com.shxy.xymanager_common.exception.Asserts;
|
|
|
|
import com.shxy.xymanager_common.model.*;
|
|
|
|
import com.shxy.xymanager_common.model.*;
|
|
|
|
import com.shxy.xymanager_common.page.PageUtils;
|
|
|
|
import com.shxy.xymanager_common.page.PageUtils;
|
|
|
|
import com.shxy.xymanager_common.util.*;
|
|
|
|
import com.shxy.xymanager_common.util.*;
|
|
|
|
|
|
|
|
import com.shxy.xymanager_common.util.xinyin.ProcessExecUtils;
|
|
|
|
|
|
|
|
import com.shxy.xymanager_common.util.xinyin.TerminalUtils;
|
|
|
|
import com.shxy.xymanager_common.vo.*;
|
|
|
|
import com.shxy.xymanager_common.vo.*;
|
|
|
|
import com.shxy.xymanager_dao.dao.*;
|
|
|
|
import com.shxy.xymanager_dao.dao.*;
|
|
|
|
import com.shxy.xymanager_service.cache.XyCache;
|
|
|
|
|
|
|
|
import com.shxy.xymanager_service.service.CacheService;
|
|
|
|
import com.shxy.xymanager_service.service.CacheService;
|
|
|
|
import com.shxy.xymanager_service.service.TerminalPhotoService;
|
|
|
|
import com.shxy.xymanager_service.service.TerminalPhotoService;
|
|
|
|
import com.shxy.xymanager_service.service.TerminalScheduleRuleService;
|
|
|
|
import com.shxy.xymanager_service.service.TerminalScheduleRuleService;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.validation.constraints.NotNull;
|
|
|
|
import java.math.BigInteger;
|
|
|
|
import java.math.BigInteger;
|
|
|
|
import java.util.*;
|
|
|
|
import java.util.*;
|
|
|
|
|
|
|
|
|
|
|
@ -89,11 +89,12 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
|
|
|
|
DateTime enddateTime = MyDateUtils.endOfDay(time);
|
|
|
|
DateTime enddateTime = MyDateUtils.endOfDay(time);
|
|
|
|
long start = MyDateUtils.TimeMillSecond2Second(begindateTime);
|
|
|
|
long start = MyDateUtils.TimeMillSecond2Second(begindateTime);
|
|
|
|
long end = MyDateUtils.TimeMillSecond2Second(enddateTime);
|
|
|
|
long end = MyDateUtils.TimeMillSecond2Second(enddateTime);
|
|
|
|
boolean empty1 = CollectionUtil.isEmpty(vo.getChannelid());
|
|
|
|
Integer channelid = vo.getChannelid();
|
|
|
|
List<TerminalPhoto> list = new ArrayList<>();
|
|
|
|
if (channelid == -1) {
|
|
|
|
if (!empty1) {
|
|
|
|
channelid = null;
|
|
|
|
list = terminalPhotoDao.selectPhotoList(vo.getTerminalid(), vo.getChannelid(), BigInteger.valueOf(start), BigInteger.valueOf(end));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
List<TerminalPhoto> list = new ArrayList<>();
|
|
|
|
|
|
|
|
list = terminalPhotoDao.selectPhotoList(vo.getTerminalid(), channelid, BigInteger.valueOf(start), BigInteger.valueOf(end));
|
|
|
|
boolean empty = CollectionUtil.isEmpty(list);
|
|
|
|
boolean empty = CollectionUtil.isEmpty(list);
|
|
|
|
model.setTime(vo.getTime());
|
|
|
|
model.setTime(vo.getTime());
|
|
|
|
model.setNum(list.size());
|
|
|
|
model.setNum(list.size());
|
|
|
@ -222,34 +223,7 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
|
|
|
|
Map<Integer, LineAndDyNameDto> lineMap = cacheService.getLineMap();
|
|
|
|
Map<Integer, LineAndDyNameDto> lineMap = cacheService.getLineMap();
|
|
|
|
Map<Integer, TerminalChannels> termchannelMap = cacheService.getTermChannelMap();
|
|
|
|
Map<Integer, TerminalChannels> termchannelMap = cacheService.getTermChannelMap();
|
|
|
|
Map<String, TerminalChannelMapper> termchannelMapMap = cacheService.getTermChannelMapMap();
|
|
|
|
Map<String, TerminalChannelMapper> termchannelMapMap = cacheService.getTermChannelMapMap();
|
|
|
|
for (TerminalPhoto item : list) {
|
|
|
|
beans = TerminalUtils.fdsa(requestIp, list, terminalMap, lineMap, termchannelMap, termchannelMapMap);
|
|
|
|
TerminalPhotoSelectListModel.PhotoBean photoBean = new TerminalPhotoSelectListModel.PhotoBean();
|
|
|
|
|
|
|
|
photoBean.setTermid(item.getTermId());
|
|
|
|
|
|
|
|
Terminals terminals = terminalMap.get(item.getTermId());
|
|
|
|
|
|
|
|
if (!BeanUtil.isEmpty(terminals)) {
|
|
|
|
|
|
|
|
Integer mediaType = item.getMediaType();
|
|
|
|
|
|
|
|
if (mediaType != null && (mediaType.intValue() == 0 || mediaType.intValue() == 1)) {
|
|
|
|
|
|
|
|
photoBean.setDisplayname(terminals.getDisplayName());
|
|
|
|
|
|
|
|
photoBean.setLineid(terminals.getLineid());
|
|
|
|
|
|
|
|
photoBean.setLinename(lineMap.get(terminals.getLineid()).getName());
|
|
|
|
|
|
|
|
photoBean.setChannelid(item.getChannelId());
|
|
|
|
|
|
|
|
photoBean.setCmdid(terminals.getCmdid());
|
|
|
|
|
|
|
|
photoBean.setChannnelname(termchannelMap.get(item.getChannelId()).getChannelName());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
photoBean.setAlias(termchannelMapMap.get(item.getTermId() + "#" + item.getChannelId()).getAlias());
|
|
|
|
|
|
|
|
photoBean.setMediaType(item.getMediaType());
|
|
|
|
|
|
|
|
photoBean.setOrginalid(item.getOrginalId());
|
|
|
|
|
|
|
|
String photoPath = TerminalUtils.getPhotoPath(mediaType, requestIp, item.getPath());
|
|
|
|
|
|
|
|
photoBean.setPath(photoPath);
|
|
|
|
|
|
|
|
photoBean.setPresetId(item.getPresetId());
|
|
|
|
|
|
|
|
long phototime = MyDateUtils.TimeSecond2MillSecond(item.getPhotoTime().longValue());
|
|
|
|
|
|
|
|
photoBean.setPhotoTime(MyDateUtils.date(phototime));
|
|
|
|
|
|
|
|
long rectime = MyDateUtils.TimeSecond2MillSecond(item.getRecvTime().longValue());
|
|
|
|
|
|
|
|
photoBean.setRecvTime(MyDateUtils.date(rectime));
|
|
|
|
|
|
|
|
beans.add(photoBean);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
model.setList(beans);
|
|
|
|
model.setList(beans);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -266,6 +240,7 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
|
|
|
|
return Asserts.success(model);
|
|
|
|
return Asserts.success(model);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 根据装置和时间提供给第三方
|
|
|
|
* 根据装置和时间提供给第三方
|
|
|
|
*
|
|
|
|
*
|
|
|
@ -396,92 +371,6 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
|
|
|
|
* @param vo
|
|
|
|
* @param vo
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
// @Override
|
|
|
|
|
|
|
|
// public ServiceBody<TerminalPhotosModel> getPhotoBanner(String requestIp, PageVo vo) {
|
|
|
|
|
|
|
|
// TerminalPhotosModel model = new TerminalPhotosModel();
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// int pageindex = vo.getPageindex();
|
|
|
|
|
|
|
|
// int pagesize = vo.getPagesize();
|
|
|
|
|
|
|
|
// PageUtils.SetPage(pageindex, pagesize);
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// List<ChannelAndTermDto> list = terminalsDao.selectChannelAndTermList(CommonStatus.EFFECTIVE.value());
|
|
|
|
|
|
|
|
// List<TerminalPhotosModel.PhotosBean> beans = new ArrayList<>();
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// if (!CollectionUtil.isEmpty(list)) {
|
|
|
|
|
|
|
|
// Map<Integer, LineAndDyNameDto> lineMap = XyCache.lineMap;
|
|
|
|
|
|
|
|
// Map<String, TerminalChannelMapper> termchannelMapMap = XyCache.termchannelMapMap;
|
|
|
|
|
|
|
|
// List<Integer> termidlist = new ArrayList<>();
|
|
|
|
|
|
|
|
// for (ChannelAndTermDto item : list) {
|
|
|
|
|
|
|
|
// Integer termid = item.getTermid();
|
|
|
|
|
|
|
|
// termidlist.add(termid);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// List<TermAndChannelLatestPhotoMapperDto> list2 = terminalPhotoDao.selectTermAndChannelLatestPhotoList(termidlist);
|
|
|
|
|
|
|
|
// for (ChannelAndTermDto item : list) {
|
|
|
|
|
|
|
|
// TerminalPhotosModel.PhotosBean photosBean = new TerminalPhotosModel.PhotosBean();
|
|
|
|
|
|
|
|
// Integer termid = item.getTermid();
|
|
|
|
|
|
|
|
// Integer channelid = item.getChannelid();
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// photosBean.setTermid(termid);
|
|
|
|
|
|
|
|
// photosBean.setLineid(item.getLineid());
|
|
|
|
|
|
|
|
// photosBean.setChannnelname(item.getChannelname());
|
|
|
|
|
|
|
|
// if (termchannelMapMap != null) {
|
|
|
|
|
|
|
|
// TerminalChannelMapper terminalChannelMapper = termchannelMapMap.get(termid + "#" + channelid);
|
|
|
|
|
|
|
|
// if (terminalChannelMapper != null) {
|
|
|
|
|
|
|
|
// photosBean.setAlias(terminalChannelMapper.getAlias());
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// photosBean.setAlias("");
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// photosBean.setAlias("");
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// photosBean.setChannelid(channelid);
|
|
|
|
|
|
|
|
// photosBean.setDisplayname(item.getDisplayname());
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// LineAndDyNameDto lineAndDyNameDto = lineMap.get(item.getLineid());
|
|
|
|
|
|
|
|
// if (lineAndDyNameDto != null) {
|
|
|
|
|
|
|
|
// photosBean.setLinename(lineAndDyNameDto.getName());
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// photosBean.setLinename("");
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// for (int y = 0; y < list2.size(); y++) {
|
|
|
|
|
|
|
|
// TermAndChannelLatestPhotoMapperDto item2 = list2.get(y);
|
|
|
|
|
|
|
|
// if (termid.intValue() == item2.getTermid().intValue() && item.getChannelid().intValue() == item2.getChannelid().intValue()) {
|
|
|
|
|
|
|
|
// Integer mediatype = item2.getMediatype();
|
|
|
|
|
|
|
|
// if (mediatype != null && (mediatype.intValue() == 0 || mediatype.intValue() == 1)) {
|
|
|
|
|
|
|
|
// photosBean.setPath(item2.getPath());
|
|
|
|
|
|
|
|
// long recvtime = MyDateUtils.TimeSecond2MillSecond(item2.getRecvTime().longValue());
|
|
|
|
|
|
|
|
// photosBean.setRecvTime(MyDateUtils.date(recvtime));
|
|
|
|
|
|
|
|
// long phototime = MyDateUtils.TimeSecond2MillSecond(item2.getPhotoTime().longValue());
|
|
|
|
|
|
|
|
// photosBean.setPhotoTime(MyDateUtils.date(phototime));
|
|
|
|
|
|
|
|
// photosBean.setMediatype(mediatype);
|
|
|
|
|
|
|
|
// if (mediatype.intValue() == 0) {
|
|
|
|
|
|
|
|
// photosBean.setPath(requestIp + photoaddress + item2.getPath());
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// photosBean.setPath(requestIp + videoaddress + item2.getPath());
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// photosBean.setOrginalid(item2.getOrginalid());
|
|
|
|
|
|
|
|
// photosBean.setPresetId(item2.getPresetId());
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// break;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// beans.add(photosBean);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// model.setList(beans);
|
|
|
|
|
|
|
|
// PageInfo pageData = PageUtils.getPageData(list);
|
|
|
|
|
|
|
|
// int currentpage = pageData.getPageNum();
|
|
|
|
|
|
|
|
// model.setCurrentpage(currentpage);
|
|
|
|
|
|
|
|
// long total = pageData.getTotal();
|
|
|
|
|
|
|
|
// model.setTotal(total);
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// int pageSize = pageData.getPageSize();
|
|
|
|
|
|
|
|
// model.setPagesize(pageSize);
|
|
|
|
|
|
|
|
// int pages = pageData.getPages();
|
|
|
|
|
|
|
|
// model.setTotalpage(pages);
|
|
|
|
|
|
|
|
// return Asserts.success(model);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public ServiceBody<TerminalPhotosModel> getPhotoBanner(String requestIp, PageVo vo) {
|
|
|
|
public ServiceBody<TerminalPhotosModel> getPhotoBanner(String requestIp, PageVo vo) {
|
|
|
|
TerminalPhotosModel model = new TerminalPhotosModel();
|
|
|
|
TerminalPhotosModel model = new TerminalPhotosModel();
|
|
|
@ -506,68 +395,8 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
|
|
|
|
Map<Integer, TowerDto> towerMap = cacheService.getTowerMap();
|
|
|
|
Map<Integer, TowerDto> towerMap = cacheService.getTowerMap();
|
|
|
|
List<TerminalPhoto> photoList = terminalPhotoDao.selectPhotosByIdList(photolist);
|
|
|
|
List<TerminalPhoto> photoList = terminalPhotoDao.selectPhotosByIdList(photolist);
|
|
|
|
|
|
|
|
|
|
|
|
for (TerminalChannelMapper item : list) {
|
|
|
|
beans = TerminalUtils.setPhotoList(requestIp, list, lineMap, termchannelMapMap, terminalMap, termchannelMap, towerMap, photoList);
|
|
|
|
TerminalPhotosModel.PhotosBean photosBean = new TerminalPhotosModel.PhotosBean();
|
|
|
|
|
|
|
|
Integer termid = item.getTermId();
|
|
|
|
|
|
|
|
Integer channelid = item.getChannelId();
|
|
|
|
|
|
|
|
BigInteger photoId = item.getPhotoId();
|
|
|
|
|
|
|
|
Integer lineid = null;
|
|
|
|
|
|
|
|
photosBean.setTermid(termid);
|
|
|
|
|
|
|
|
Terminals terminals = terminalMap.get(termid);
|
|
|
|
|
|
|
|
if (terminals != null) {
|
|
|
|
|
|
|
|
lineid = terminals.getLineid();
|
|
|
|
|
|
|
|
photosBean.setLineid(lineid);
|
|
|
|
|
|
|
|
photosBean.setDisplayname(terminals.getDisplayName());
|
|
|
|
|
|
|
|
photosBean.setCmdid(terminals.getCmdid());
|
|
|
|
|
|
|
|
Integer towerid = terminals.getTowerid();
|
|
|
|
|
|
|
|
TowerDto towerDto = towerMap.get(towerid);
|
|
|
|
|
|
|
|
if (towerDto != null) {
|
|
|
|
|
|
|
|
photosBean.setTowername(towerDto.getName());
|
|
|
|
|
|
|
|
photosBean.setAddress(towerDto.getAddress());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
photosBean.setChannelid(channelid);
|
|
|
|
|
|
|
|
photosBean.setChannnelname(termchannelMap.get(channelid).getChannelName());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (termchannelMapMap != null) {
|
|
|
|
|
|
|
|
TerminalChannelMapper terminalChannelMapper = termchannelMapMap.get(termid + "#" + channelid);
|
|
|
|
|
|
|
|
if (terminalChannelMapper != null) {
|
|
|
|
|
|
|
|
photosBean.setAlias(terminalChannelMapper.getAlias());
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
photosBean.setAlias("");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
photosBean.setAlias("");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (lineid != null) {
|
|
|
|
|
|
|
|
LineAndDyNameDto lineAndDyNameDto = lineMap.get(lineid);
|
|
|
|
|
|
|
|
if (lineAndDyNameDto != null) {
|
|
|
|
|
|
|
|
photosBean.setLinename(lineAndDyNameDto.getName());
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
photosBean.setLinename("");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
for (int y = 0; y < photoList.size(); y++) {
|
|
|
|
|
|
|
|
TerminalPhoto terminalPhoto = photoList.get(y);
|
|
|
|
|
|
|
|
if (terminalPhoto.getId().longValue() == photoId.longValue()) {
|
|
|
|
|
|
|
|
Integer mediatype = terminalPhoto.getMediaType();
|
|
|
|
|
|
|
|
if (mediatype != null && (mediatype.intValue() == 0 || mediatype.intValue() == 1)) {
|
|
|
|
|
|
|
|
photosBean.setPath(terminalPhoto.getPath());
|
|
|
|
|
|
|
|
long recvtime = MyDateUtils.TimeSecond2MillSecond(terminalPhoto.getRecvTime().longValue());
|
|
|
|
|
|
|
|
photosBean.setRecvTime(MyDateUtils.date(recvtime));
|
|
|
|
|
|
|
|
long phototime = MyDateUtils.TimeSecond2MillSecond(terminalPhoto.getPhotoTime().longValue());
|
|
|
|
|
|
|
|
photosBean.setPhotoTime(MyDateUtils.date(phototime));
|
|
|
|
|
|
|
|
photosBean.setMediatype(mediatype);
|
|
|
|
|
|
|
|
String photoPath = TerminalUtils.getPhotoPath(mediatype, requestIp, terminalPhoto.getPath());
|
|
|
|
|
|
|
|
photosBean.setPath(photoPath);
|
|
|
|
|
|
|
|
photosBean.setOrginalid(terminalPhoto.getOrginalId());
|
|
|
|
|
|
|
|
photosBean.setPresetId(terminalPhoto.getPresetId());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
beans.add(photosBean);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
model.setList(beans);
|
|
|
|
model.setList(beans);
|
|
|
|
PageInfo pageData = PageUtils.getPageData(list);
|
|
|
|
PageInfo pageData = PageUtils.getPageData(list);
|
|
|
@ -694,34 +523,7 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
|
|
|
|
Map<Integer, LineAndDyNameDto> lineMap = cacheService.getLineMap();
|
|
|
|
Map<Integer, LineAndDyNameDto> lineMap = cacheService.getLineMap();
|
|
|
|
Map<Integer, TerminalChannels> termchannelMap = cacheService.getTermChannelMap();
|
|
|
|
Map<Integer, TerminalChannels> termchannelMap = cacheService.getTermChannelMap();
|
|
|
|
Map<String, TerminalChannelMapper> termchannelMapMap = cacheService.getTermChannelMapMap();
|
|
|
|
Map<String, TerminalChannelMapper> termchannelMapMap = cacheService.getTermChannelMapMap();
|
|
|
|
for (TerminalPhoto item : list) {
|
|
|
|
beans = TerminalUtils.fdsa(requestIp, list, terminalMap, lineMap, termchannelMap, termchannelMapMap);
|
|
|
|
TerminalPhotoSelectListModel.PhotoBean photoBean = new TerminalPhotoSelectListModel.PhotoBean();
|
|
|
|
|
|
|
|
photoBean.setTermid(item.getTermId());
|
|
|
|
|
|
|
|
Terminals terminals = terminalMap.get(item.getTermId());
|
|
|
|
|
|
|
|
if (!BeanUtil.isEmpty(terminals)) {
|
|
|
|
|
|
|
|
Integer mediaType = item.getMediaType();
|
|
|
|
|
|
|
|
if (mediaType != null && (mediaType.intValue() == 0 || mediaType.intValue() == 1)) {
|
|
|
|
|
|
|
|
photoBean.setDisplayname(terminals.getDisplayName());
|
|
|
|
|
|
|
|
photoBean.setLineid(terminals.getLineid());
|
|
|
|
|
|
|
|
photoBean.setLinename(lineMap.get(terminals.getLineid()).getName());
|
|
|
|
|
|
|
|
photoBean.setChannelid(item.getChannelId());
|
|
|
|
|
|
|
|
photoBean.setCmdid(terminals.getCmdid());
|
|
|
|
|
|
|
|
photoBean.setChannnelname(termchannelMap.get(item.getChannelId()).getChannelName());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
photoBean.setAlias(termchannelMapMap.get(item.getTermId() + "#" + item.getChannelId()).getAlias());
|
|
|
|
|
|
|
|
photoBean.setMediaType(item.getMediaType());
|
|
|
|
|
|
|
|
photoBean.setOrginalid(item.getOrginalId());
|
|
|
|
|
|
|
|
String photoPath = TerminalUtils.getPhotoPath(mediaType, requestIp, item.getPath());
|
|
|
|
|
|
|
|
photoBean.setPath(photoPath);
|
|
|
|
|
|
|
|
photoBean.setPresetId(item.getPresetId());
|
|
|
|
|
|
|
|
long phototime = MyDateUtils.TimeSecond2MillSecond(item.getPhotoTime().longValue());
|
|
|
|
|
|
|
|
photoBean.setPhotoTime(MyDateUtils.date(phototime));
|
|
|
|
|
|
|
|
long rectime = MyDateUtils.TimeSecond2MillSecond(item.getRecvTime().longValue());
|
|
|
|
|
|
|
|
photoBean.setRecvTime(MyDateUtils.date(rectime));
|
|
|
|
|
|
|
|
beans.add(photoBean);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
model.setList(beans);
|
|
|
|
model.setList(beans);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
PageInfo pageData = PageUtils.getPageData(list);
|
|
|
|
PageInfo pageData = PageUtils.getPageData(list);
|
|
|
|