Showing
5 changed files
with
72 additions
and
0 deletions
| @@ -32,6 +32,7 @@ public class LiveMonitorRoomController { | @@ -32,6 +32,7 @@ public class LiveMonitorRoomController { | ||
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | 34 | ||
| 35 | + | ||
| 35 | /** | 36 | /** |
| 36 | * 审片间-列表页 | 37 | * 审片间-列表页 |
| 37 | * @param lmRoomDto | 38 | * @param lmRoomDto |
| @@ -44,6 +45,18 @@ public class LiveMonitorRoomController { | @@ -44,6 +45,18 @@ public class LiveMonitorRoomController { | ||
| 44 | 45 | ||
| 45 | 46 | ||
| 46 | /** | 47 | /** |
| 48 | + * 审片间维护-审片间任务 | ||
| 49 | + * @param lmRoomDto | ||
| 50 | + * @return | ||
| 51 | + */ | ||
| 52 | + @GetMapping("taskRoom") | ||
| 53 | + PageBean taskPage(LMRoomDto lmRoomDto){ | ||
| 54 | + return liveMonitorRoomService.taskPage(lmRoomDto); | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | + | ||
| 58 | + | ||
| 59 | + /** | ||
| 47 | * 新增审片间 | 60 | * 新增审片间 |
| 48 | * @param lmRoomParam | 61 | * @param lmRoomParam |
| 49 | * @return | 62 | * @return |
| @@ -18,6 +18,12 @@ public class CrpSetDate { | @@ -18,6 +18,12 @@ public class CrpSetDate { | ||
| 18 | */ | 18 | */ |
| 19 | private String outputDir; | 19 | private String outputDir; |
| 20 | 20 | ||
| 21 | + | ||
| 22 | + /** | ||
| 23 | + * 高码输出地址 | ||
| 24 | + */ | ||
| 25 | + private String outputHigh; | ||
| 26 | + | ||
| 21 | private String mixConfig; | 27 | private String mixConfig; |
| 22 | 28 | ||
| 23 | } | 29 | } |
| @@ -15,6 +15,8 @@ public interface LiveMonitorRoomService extends IService<LiveMonitorRoom> { | @@ -15,6 +15,8 @@ public interface LiveMonitorRoomService extends IService<LiveMonitorRoom> { | ||
| 15 | PageBean editPage(LMRoomDto lmRoomDto); | 15 | PageBean editPage(LMRoomDto lmRoomDto); |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | + PageBean taskPage(LMRoomDto lmRoomDto); | ||
| 19 | + | ||
| 18 | ResultBean create(LMRoomParam lmRoomParam); | 20 | ResultBean create(LMRoomParam lmRoomParam); |
| 19 | 21 | ||
| 20 | 22 |
| @@ -67,6 +67,41 @@ public class LiveMonitorRoomServiceImpl extends ServiceImpl<LiveMonitorRoomMappe | @@ -67,6 +67,41 @@ public class LiveMonitorRoomServiceImpl extends ServiceImpl<LiveMonitorRoomMappe | ||
| 67 | } | 67 | } |
| 68 | 68 | ||
| 69 | @Override | 69 | @Override |
| 70 | + public PageBean taskPage(LMRoomDto lmRoomDto) { | ||
| 71 | + Page<LMRoomListVo> page = new Page<>(lmRoomDto.getPage(), lmRoomDto.getSize()); | ||
| 72 | + | ||
| 73 | + | ||
| 74 | + IPage<LMRoomListVo> resultPage = liveMonitorRoomMapper.findPageList(page, lmRoomDto); | ||
| 75 | + | ||
| 76 | + List<LMRoomListVo> records = resultPage.getRecords(); | ||
| 77 | + List<Map<String, Object>> list = new ArrayList<>(); | ||
| 78 | + if(!CollectionUtils.isEmpty(records)){ | ||
| 79 | + | ||
| 80 | + list = records.stream().map(record -> { | ||
| 81 | + Map<String, Object> dataMap = JSON.parseObject(JSON.toJSONString(record), new TypeReference<Map<String, Object>>() { | ||
| 82 | + }); | ||
| 83 | + | ||
| 84 | + LambdaQueryWrapper<StreamTask> wrapper = new LambdaQueryWrapper<>(); | ||
| 85 | + wrapper.eq(StreamTask::getRoomId, record.getId()); | ||
| 86 | + wrapper.eq(StreamTask::getTaskType, "0"); | ||
| 87 | + wrapper.eq(StreamTask::getPlayType, "source"); | ||
| 88 | + String mixOutputUrl = record.getMixOutputUrl(); | ||
| 89 | + record.setMixOutputUrl(FileUtils.replacePUrl(mixOutputUrl, pIp, pProt)); | ||
| 90 | + | ||
| 91 | + List<StreamTask> taskList = monitorMarkService.list(wrapper); | ||
| 92 | + if (!CollectionUtils.isEmpty(taskList)) { | ||
| 93 | + dataMap.put("streamTask", taskList.get(0)); | ||
| 94 | + } | ||
| 95 | + return dataMap; | ||
| 96 | + }).toList(); | ||
| 97 | + | ||
| 98 | + } | ||
| 99 | + | ||
| 100 | + | ||
| 101 | + return new PageBean(Integer.parseInt(String.valueOf(resultPage.getPages())),resultPage.getTotal(),list); | ||
| 102 | + } | ||
| 103 | + | ||
| 104 | + @Override | ||
| 70 | public PageBean editPage(LMRoomDto lmRoomDto) { | 105 | public PageBean editPage(LMRoomDto lmRoomDto) { |
| 71 | Page<LMRoomListVo> page = new Page<>(lmRoomDto.getPage(), lmRoomDto.getSize()); | 106 | Page<LMRoomListVo> page = new Page<>(lmRoomDto.getPage(), lmRoomDto.getSize()); |
| 72 | 107 | ||
| @@ -238,6 +273,7 @@ public class LiveMonitorRoomServiceImpl extends ServiceImpl<LiveMonitorRoomMappe | @@ -238,6 +273,7 @@ public class LiveMonitorRoomServiceImpl extends ServiceImpl<LiveMonitorRoomMappe | ||
| 238 | streamTask.setUpdatedBy(admin.getUsername()); | 273 | streamTask.setUpdatedBy(admin.getUsername()); |
| 239 | streamTask.setOutputGroup(setVo.getOutputGroup()); | 274 | streamTask.setOutputGroup(setVo.getOutputGroup()); |
| 240 | streamTask.setOutputDir(setVo.getOutputDir()); | 275 | streamTask.setOutputDir(setVo.getOutputDir()); |
| 276 | + streamTask.setOutputHigh(setVo.getOutputHigh()); | ||
| 241 | streamTask.setMixConfig(setVo.getMixConfig()); | 277 | streamTask.setMixConfig(setVo.getMixConfig()); |
| 242 | monitorMarkService.updateById(streamTask); | 278 | monitorMarkService.updateById(streamTask); |
| 243 | }); | 279 | }); |
| @@ -269,6 +305,8 @@ public class LiveMonitorRoomServiceImpl extends ServiceImpl<LiveMonitorRoomMappe | @@ -269,6 +305,8 @@ public class LiveMonitorRoomServiceImpl extends ServiceImpl<LiveMonitorRoomMappe | ||
| 269 | for (StreamTask streamTask : taskList) { | 305 | for (StreamTask streamTask : taskList) { |
| 270 | String taskId = streamTask.getTaskId(); | 306 | String taskId = streamTask.getTaskId(); |
| 271 | String outputDirCheck = streamTask.getOutputDir(); | 307 | String outputDirCheck = streamTask.getOutputDir(); |
| 308 | + String outputHighCheck = streamTask.getOutputHigh(); | ||
| 309 | + | ||
| 272 | 310 | ||
| 273 | Map<String, Object> streamTaskMap = JSON.parseObject(JSON.toJSONString(streamTask), new TypeReference<Map<String, Object>>() { | 311 | Map<String, Object> streamTaskMap = JSON.parseObject(JSON.toJSONString(streamTask), new TypeReference<Map<String, Object>>() { |
| 274 | }); | 312 | }); |
| @@ -307,6 +345,14 @@ public class LiveMonitorRoomServiceImpl extends ServiceImpl<LiveMonitorRoomMappe | @@ -307,6 +345,14 @@ public class LiveMonitorRoomServiceImpl extends ServiceImpl<LiveMonitorRoomMappe | ||
| 307 | outputDirMap.put("checked", false); | 345 | outputDirMap.put("checked", false); |
| 308 | outputDirMap.put("outGroupNo", outGroupNo); | 346 | outputDirMap.put("outGroupNo", outGroupNo); |
| 309 | 347 | ||
| 348 | + outputDirMap.put("checkedHigh", false); | ||
| 349 | + | ||
| 350 | + if(StringUtils.isNotBlank(outputHighCheck)){ | ||
| 351 | + if(outputDir.equals(outputHighCheck)){ | ||
| 352 | + outputDirMap.put("checkedHigh", true); | ||
| 353 | + } | ||
| 354 | + } | ||
| 355 | + | ||
| 310 | if(outputDir.equals(outputDirCheck)){ | 356 | if(outputDir.equals(outputDirCheck)){ |
| 311 | outputDirMap.put("checked", true); | 357 | outputDirMap.put("checked", true); |
| 312 | } | 358 | } |
-
Please register or login to post a comment