|
@@ -86,7 +86,7 @@ public class CentereventTDownloadsServiceImpl extends BaseService implements ICe
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<DaHuaMp4VO> downloadsCommon(Map<String, Object> params) {
|
|
|
+ public List<DaHuaMp4VO> downloadsCommon(Map<String, Object> params, boolean flag) {
|
|
|
//原定时任务视频下载逻辑
|
|
|
/*List<CentereventTEventcatalogue> eventcatalogues = centereventTDownloadsMapper.getbeforedateDownload(params);
|
|
|
List<Map<String, Object>> resultList = new ArrayList<>();
|
|
@@ -109,30 +109,30 @@ public class CentereventTDownloadsServiceImpl extends BaseService implements ICe
|
|
|
}
|
|
|
return resultList;*/
|
|
|
|
|
|
- List<CentereventTEventcatalogue> eventcatalogues = centereventTDownloadsMapper.getbeforedateDownload(params);
|
|
|
- List<DaHuaMp4VO> resultList = new ArrayList<>();
|
|
|
- for (CentereventTEventcatalogue eventcatalogue : eventcatalogues) {
|
|
|
- String uuid = IdUtils.simpleUUID();
|
|
|
- CentereventTDownloads centereventTDownloads = new CentereventTDownloads();
|
|
|
- centereventTDownloads.setId(uuid);
|
|
|
- centereventTDownloads.setEventCode(eventcatalogue.getEventCode());
|
|
|
- centereventTDownloads.setEventName(eventcatalogue.getEventName());
|
|
|
- centereventTDownloads.setLogId(eventcatalogue.getId());
|
|
|
- this.insertCentereventTDownloads(centereventTDownloads);
|
|
|
+ if(flag){
|
|
|
+ List<CentereventTEventcatalogue> eventcatalogues = centereventTDownloadsMapper.getbeforedateDownload(params);
|
|
|
|
|
|
- Map<String, Object> map = new HashMap<>();
|
|
|
- map.put("id", uuid);
|
|
|
- map.put("logId", eventcatalogue.getId());
|
|
|
- map.put("cameraId", eventcatalogue.getCreateBy());
|
|
|
- map.put("alarmCode", eventcatalogue.getAlarmCode());
|
|
|
- map.put("chnnaleCode", eventcatalogue.getChnnaleCode());
|
|
|
- ;
|
|
|
+ List<DaHuaMp4VO> resultList = new ArrayList<>();
|
|
|
+ for (CentereventTEventcatalogue eventcatalogue : eventcatalogues) {
|
|
|
|
|
|
+ String uuid = IdUtils.simpleUUID();
|
|
|
+ CentereventTDownloads centereventTDownloads = new CentereventTDownloads();
|
|
|
+ centereventTDownloads.setId(uuid);
|
|
|
+ centereventTDownloads.setEventCode(eventcatalogue.getEventCode());
|
|
|
+ centereventTDownloads.setEventName(eventcatalogue.getEventName());
|
|
|
+ centereventTDownloads.setLogId(eventcatalogue.getId());
|
|
|
+ this.insertCentereventTDownloads(centereventTDownloads);
|
|
|
+ resultList.add(new DaHuaMp4VO(uuid, eventcatalogue.getChnnaleCode(), eventcatalogue.getAlarmCode(), eventcatalogue.getId(), eventcatalogue.getEventCode()));
|
|
|
+ }
|
|
|
+ return resultList;
|
|
|
+ }else{
|
|
|
+ List<CentereventTEventcatalogue> eventcatalogues = centereventTDownloadsMapper.getInfoById(params);
|
|
|
|
|
|
-// map.put("startTime", DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, DateUtils.subtractTime(eventcatalogue.getReportTime(), -2)));
|
|
|
-// map.put("endTime", DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, DateUtils.subtractTime(eventcatalogue.getReportTime(), 1)));
|
|
|
- resultList.add(new DaHuaMp4VO(uuid, eventcatalogue.getChnnaleCode(), eventcatalogue.getAlarmCode(), eventcatalogue.getId(), eventcatalogue.getEventCode()));
|
|
|
+ List<DaHuaMp4VO> resultList = new ArrayList<>();
|
|
|
+ for (CentereventTEventcatalogue eventcatalogue : eventcatalogues) {
|
|
|
+ resultList.add(new DaHuaMp4VO(eventcatalogue.getDownloadId(), eventcatalogue.getChnnaleCode(), eventcatalogue.getAlarmCode(), eventcatalogue.getId(), eventcatalogue.getEventCode()));
|
|
|
+ }
|
|
|
+ return resultList;
|
|
|
}
|
|
|
- return resultList;
|
|
|
}
|
|
|
}
|