|
|
@ -66,15 +66,12 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
TerminalScheduleRuleService terminalScheduleRuleService;
|
|
|
|
TerminalScheduleRuleService terminalScheduleRuleService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
CacheService cacheService;
|
|
|
|
RequestResultsDao requestResultsDao;
|
|
|
|
|
|
|
|
|
|
|
|
@Value("${photo.address}")
|
|
|
|
|
|
|
|
private String photoaddress;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Value("${video.address}")
|
|
|
|
@Autowired
|
|
|
|
private String videoaddress;
|
|
|
|
CacheService cacheService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -117,13 +114,12 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
|
|
|
|
photoBean.setFileSize(item.getFileSize());
|
|
|
|
photoBean.setFileSize(item.getFileSize());
|
|
|
|
photoBean.setHeight(item.getHeight());
|
|
|
|
photoBean.setHeight(item.getHeight());
|
|
|
|
photoBean.setMediaType(item.getMediaType());
|
|
|
|
photoBean.setMediaType(item.getMediaType());
|
|
|
|
if (mediaType.intValue() == 0) {
|
|
|
|
String photoPath = TerminalUtils.getPhotoPath(mediaType, requestIp, item.getPath());
|
|
|
|
photoBean.setPath(requestIp + photoaddress + item.getPath());
|
|
|
|
photoBean.setPath(photoPath);
|
|
|
|
} else {
|
|
|
|
|
|
|
|
photoBean.setPath(requestIp + videoaddress + item.getPath());
|
|
|
|
String thumbPhotoPath = TerminalUtils.getThumbPhotoPath(mediaType, requestIp, item.getThumb());
|
|
|
|
if (StringUtils.isNotBlank(item.getThumb())) {
|
|
|
|
if (StringUtils.isNotBlank(thumbPhotoPath)) {
|
|
|
|
photoBean.setThumb(requestIp + videoaddress + item.getThumb());
|
|
|
|
photoBean.setThumb(thumbPhotoPath);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
photoBean.setChannelName(termchannelMap.get(channelId).getChannelName());
|
|
|
|
photoBean.setChannelName(termchannelMap.get(channelId).getChannelName());
|
|
|
|
if (termchannelMapMap != null) {
|
|
|
|
if (termchannelMapMap != null) {
|
|
|
@ -179,17 +175,17 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
|
|
|
|
ArrayList<Integer> channelidlist = new ArrayList<>();
|
|
|
|
ArrayList<Integer> channelidlist = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
|
|
List<DyAndLineAndTowerAndTermDto> dtos = new ArrayList<>();
|
|
|
|
List<DyAndLineAndTowerAndTermDto> dtos = new ArrayList<>();
|
|
|
|
if (dyid == null || dyid.intValue() == 0) {
|
|
|
|
if (dyid == null || dyid.intValue() == -1) {
|
|
|
|
PageUtils.SetPage(pageindex, pagesize);
|
|
|
|
PageUtils.SetPage(pageindex, pagesize);
|
|
|
|
list = terminalPhotoDao.selectPhotoListByTermList(termidlist, channelidlist, BigInteger.valueOf(start), BigInteger.valueOf(end));
|
|
|
|
list = terminalPhotoDao.selectPhotoListByTermList(termidlist, channelidlist, BigInteger.valueOf(start), BigInteger.valueOf(end));
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if (lineid == null || lineid.intValue() == 0) {
|
|
|
|
if (lineid == null || lineid.intValue() == -1) {
|
|
|
|
dtos = dyLevelDao.selectDyAndLineAndTowerAnTermList(dyid, null, null, null, CommonStatus.EFFECTIVE.value());
|
|
|
|
dtos = dyLevelDao.selectDyAndLineAndTowerAnTermList(dyid, null, null, null, CommonStatus.EFFECTIVE.value());
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if (towerid == null || towerid.intValue() == 0) {
|
|
|
|
if (towerid == null || towerid.intValue() == -1) {
|
|
|
|
dtos = dyLevelDao.selectDyAndLineAndTowerAnTermList(dyid, lineid, null, null, CommonStatus.EFFECTIVE.value());
|
|
|
|
dtos = dyLevelDao.selectDyAndLineAndTowerAnTermList(dyid, lineid, null, null, CommonStatus.EFFECTIVE.value());
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if (termid == null || termid.intValue() == 0) {
|
|
|
|
if (termid == null || termid.intValue() == -1) {
|
|
|
|
dtos = dyLevelDao.selectDyAndLineAndTowerAnTermList(dyid, lineid, towerid, null, CommonStatus.EFFECTIVE.value());
|
|
|
|
dtos = dyLevelDao.selectDyAndLineAndTowerAnTermList(dyid, lineid, towerid, null, CommonStatus.EFFECTIVE.value());
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
dtos = dyLevelDao.selectDyAndLineAndTowerAnTermList(dyid, lineid, towerid, termid, CommonStatus.EFFECTIVE.value());
|
|
|
|
dtos = dyLevelDao.selectDyAndLineAndTowerAnTermList(dyid, lineid, towerid, termid, CommonStatus.EFFECTIVE.value());
|
|
|
@ -205,7 +201,7 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (channelid == null || channelid.intValue() == 0) {
|
|
|
|
if (channelid == null || channelid.intValue() == -1) {
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
channelidlist.add(channelid);
|
|
|
|
channelidlist.add(channelid);
|
|
|
@ -243,11 +239,8 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
|
|
|
|
photoBean.setAlias(termchannelMapMap.get(item.getTermId() + "#" + item.getChannelId()).getAlias());
|
|
|
|
photoBean.setAlias(termchannelMapMap.get(item.getTermId() + "#" + item.getChannelId()).getAlias());
|
|
|
|
photoBean.setMediaType(item.getMediaType());
|
|
|
|
photoBean.setMediaType(item.getMediaType());
|
|
|
|
photoBean.setOrginalid(item.getOrginalId());
|
|
|
|
photoBean.setOrginalid(item.getOrginalId());
|
|
|
|
if (mediaType.intValue() == 0) {
|
|
|
|
String photoPath = TerminalUtils.getPhotoPath(mediaType, requestIp, item.getPath());
|
|
|
|
photoBean.setPath(requestIp + photoaddress + item.getPath());
|
|
|
|
photoBean.setPath(photoPath);
|
|
|
|
} else {
|
|
|
|
|
|
|
|
photoBean.setPath(requestIp + videoaddress + item.getPath());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
photoBean.setPresetId(item.getPresetId());
|
|
|
|
photoBean.setPresetId(item.getPresetId());
|
|
|
|
long phototime = MyDateUtils.TimeSecond2MillSecond(item.getPhotoTime().longValue());
|
|
|
|
long phototime = MyDateUtils.TimeSecond2MillSecond(item.getPhotoTime().longValue());
|
|
|
|
photoBean.setPhotoTime(MyDateUtils.date(phototime));
|
|
|
|
photoBean.setPhotoTime(MyDateUtils.date(phototime));
|
|
|
@ -328,13 +321,9 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
|
|
|
|
photoBean.setMediaType(item.getMediaType());
|
|
|
|
photoBean.setMediaType(item.getMediaType());
|
|
|
|
photoBean.setOrginalId(item.getOrginalId());
|
|
|
|
photoBean.setOrginalId(item.getOrginalId());
|
|
|
|
String path = item.getPath();
|
|
|
|
String path = item.getPath();
|
|
|
|
if (mediaType.intValue() == 0) {
|
|
|
|
String photoPath = TerminalUtils.getPhotoPath(mediaType, requestIp, item.getPath());
|
|
|
|
photoBean.setPath(requestIp + photoaddress + path);
|
|
|
|
photoBean.setPath(photoPath);
|
|
|
|
} else {
|
|
|
|
|
|
|
|
photoBean.setPath(requestIp + videoaddress + item.getPath());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (path != null) {
|
|
|
|
if (path != null) {
|
|
|
|
photoBean.setPath(requestIp + photoaddress + path);
|
|
|
|
|
|
|
|
String[] split = path.split("/");
|
|
|
|
String[] split = path.split("/");
|
|
|
|
int length = split.length;
|
|
|
|
int length = split.length;
|
|
|
|
String s = split[length - 1];
|
|
|
|
String s = split[length - 1];
|
|
|
@ -562,11 +551,8 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
|
|
|
|
long phototime = MyDateUtils.TimeSecond2MillSecond(terminalPhoto.getPhotoTime().longValue());
|
|
|
|
long phototime = MyDateUtils.TimeSecond2MillSecond(terminalPhoto.getPhotoTime().longValue());
|
|
|
|
photosBean.setPhotoTime(MyDateUtils.date(phototime));
|
|
|
|
photosBean.setPhotoTime(MyDateUtils.date(phototime));
|
|
|
|
photosBean.setMediatype(mediatype);
|
|
|
|
photosBean.setMediatype(mediatype);
|
|
|
|
if (mediatype.intValue() == 0) {
|
|
|
|
String photoPath = TerminalUtils.getPhotoPath(mediatype, requestIp, terminalPhoto.getPath());
|
|
|
|
photosBean.setPath(requestIp + photoaddress + terminalPhoto.getPath());
|
|
|
|
photosBean.setPath(photoPath);
|
|
|
|
} else {
|
|
|
|
|
|
|
|
photosBean.setPath(requestIp + videoaddress + terminalPhoto.getPath());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
photosBean.setOrginalid(terminalPhoto.getOrginalId());
|
|
|
|
photosBean.setOrginalid(terminalPhoto.getOrginalId());
|
|
|
|
photosBean.setPresetId(terminalPhoto.getPresetId());
|
|
|
|
photosBean.setPresetId(terminalPhoto.getPresetId());
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -616,7 +602,7 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public ServiceBody<TerminalPhotosParamsModel> getLastedPhotoQueryParam(ReturnedPhotoParamsVo vo) {
|
|
|
|
public ServiceBody<TerminalPhotosParamsModel> getLastedPhotoQueryParam(ReturnedPhotoParamsVo vo) {
|
|
|
|
String result = terminalPhotoDao.getRequestResult(vo.getRequestId());
|
|
|
|
String result = requestResultsDao.getRequestResult(vo.getRequestId());
|
|
|
|
TerminalPhotosParamsModel model = new TerminalPhotosParamsModel();
|
|
|
|
TerminalPhotosParamsModel model = new TerminalPhotosParamsModel();
|
|
|
|
if (StringUtils.isNotBlank(result)) {
|
|
|
|
if (StringUtils.isNotBlank(result)) {
|
|
|
|
model = JSONObject.parseObject(result, TerminalPhotosParamsModel.class);
|
|
|
|
model = JSONObject.parseObject(result, TerminalPhotosParamsModel.class);
|
|
|
@ -632,7 +618,7 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public ServiceBody<TerminalScheduleRuleTimeListModel> selectPhotoTime(TerminalReqPhotoTimeVo vo) {
|
|
|
|
public ServiceBody<TerminalScheduleRuleTimeListModel> selectPhotoTime(TerminalReqPhotoTimeVo vo) {
|
|
|
|
String result = terminalPhotoDao.getRequestResult(vo.getRequestId());//待修改
|
|
|
|
String result = requestResultsDao.getRequestResult(vo.getRequestId());//待修改
|
|
|
|
TerminalScheduleRuleTimeListModel model = new TerminalScheduleRuleTimeListModel();
|
|
|
|
TerminalScheduleRuleTimeListModel model = new TerminalScheduleRuleTimeListModel();
|
|
|
|
if (StringUtils.isNotBlank(result)) {
|
|
|
|
if (StringUtils.isNotBlank(result)) {
|
|
|
|
JSONObject resultObj = JSONObject.parseObject(result);
|
|
|
|
JSONObject resultObj = JSONObject.parseObject(result);
|
|
|
@ -715,11 +701,8 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
|
|
|
|
photoBean.setAlias(termchannelMapMap.get(item.getTermId() + "#" + item.getChannelId()).getAlias());
|
|
|
|
photoBean.setAlias(termchannelMapMap.get(item.getTermId() + "#" + item.getChannelId()).getAlias());
|
|
|
|
photoBean.setMediaType(item.getMediaType());
|
|
|
|
photoBean.setMediaType(item.getMediaType());
|
|
|
|
photoBean.setOrginalid(item.getOrginalId());
|
|
|
|
photoBean.setOrginalid(item.getOrginalId());
|
|
|
|
if (mediaType.intValue() == 0) {
|
|
|
|
String photoPath = TerminalUtils.getPhotoPath(mediaType, requestIp, item.getPath());
|
|
|
|
photoBean.setPath(requestIp + photoaddress + item.getPath());
|
|
|
|
photoBean.setPath(photoPath);
|
|
|
|
} else {
|
|
|
|
|
|
|
|
photoBean.setPath(requestIp + videoaddress + item.getPath());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
photoBean.setPresetId(item.getPresetId());
|
|
|
|
photoBean.setPresetId(item.getPresetId());
|
|
|
|
long phototime = MyDateUtils.TimeSecond2MillSecond(item.getPhotoTime().longValue());
|
|
|
|
long phototime = MyDateUtils.TimeSecond2MillSecond(item.getPhotoTime().longValue());
|
|
|
|
photoBean.setPhotoTime(MyDateUtils.date(phototime));
|
|
|
|
photoBean.setPhotoTime(MyDateUtils.date(phototime));
|
|
|
|