| | |
| | | package com.sandu.ximon.admin.controller; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.sandu.common.domain.CommonPage; |
| | |
| | | if (byId == null) { |
| | | throw new BusinessException("未选择LED屏"); |
| | | } |
| | | // QueryWrapper<PoleXixunPlayerEntity> queryWrapper = new QueryWrapper<>(); |
| | | // queryWrapper.eq("program_code", programPro.get_id()); |
| | | boolean insert = false; |
| | | if (xiXunPlayerService.removeById(programPro.getProgramId())) { |
| | | insert = xiXunPlayerService.insert(programPro); |
| | | |
| | | boolean update = xiXunPlayerService.update(programPro); |
| | | if (update) { |
| | | return ResponseUtil.success("编辑成功!"); |
| | | |
| | | } else { |
| | | return ResponseUtil.fail("编辑失败!"); |
| | | |
| | | } |
| | | ; |
| | | return ResponseUtil.success(insert); |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/list") |
| | | public ResponseVO<Object> list(BaseConditionVO baseConditionVO, @RequestParam(value = "keyword", required = false) String keyword) { |
| | | public ResponseVO<Object> list(BaseConditionVO baseConditionVO, |
| | | @RequestParam(value = "order", required = false) Integer order, |
| | | @RequestParam(value = "seq", required = false) Integer seq, |
| | | @RequestParam(value = "keyword", required = false) String keyword) { |
| | | if (!permissionConfig.check(MenuEnum.LED_PROGRAM_LIST.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | LambdaQueryWrapper<PoleXixunPlayerEntity> wrapper = xiXunPlayerService.XixunPlayerList(keyword); |
| | | PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize()); |
| | | |
| | | return ResponseUtil.success(xiXunPlayerService.list(wrapper)); |
| | | List<PoleXixunPlayerEntity> list = xiXunPlayerService.listProgram(baseConditionVO, order, seq, keyword); |
| | | return ResponseUtil.success(list); |
| | | } |
| | | |
| | | |
| | |
| | | if (!permissionConfig.check(MenuEnum.XIXUN_PROGRAM_PUSH.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | xiXunPlayerService.videoXixunPlayer(pid, lightemitIds); |
| | | return ResponseUtil.success("推送成功"); |
| | | |
| | | return ResponseUtil.success(xiXunPlayerService.videoXixunPlayer(pid, lightemitIds)); |
| | | } |
| | | |
| | | //执行中的节目 |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/listLed") |
| | | public ResponseVO<Object> listLed(BaseConditionVO baseConditionVO, @RequestParam(value = "keyword", required = false) String keyword, |
| | | public ResponseVO<Object> listLed(BaseConditionVO baseConditionVO, |
| | | @RequestParam(value = "order", required = false) Integer order, |
| | | @RequestParam(value = "seq", required = false) Integer seq, |
| | | @RequestParam(value = "keyword", required = false) String keyword, |
| | | @RequestParam(value = "isOnLine", required = false) boolean isOnLine) { |
| | | if (!permissionConfig.check(MenuEnum.LED_LIST.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | List<PoleLightemitEntity> poleLightemitEntityList = poleLightemitService.listLed(keyword, isOnLine); |
| | | List<PoleLightemitEntity> poleLightemitEntityList = poleLightemitService.listLed(keyword, order, seq, isOnLine); |
| | | poleLightemitEntityList.forEach(led -> { |
| | | led.setStreetlightId(led.getPoleId()); |
| | | led.setStreetlightName(led.getPoleName()); |
| | |
| | | |
| | | |
| | | @GetMapping("/listSchedule") |
| | | public ResponseVO<Object> listSchedule(BaseConditionVO baseConditionVO, @RequestParam(value = "keyword", required = false) String keyword) { |
| | | public ResponseVO<Object> listSchedule(BaseConditionVO baseConditionVO, |
| | | @RequestParam(value = "order", required = false) Integer order, |
| | | @RequestParam(value = "seq", required = false) Integer seq, |
| | | @RequestParam(value = "keyword", required = false) String keyword) { |
| | | if (!permissionConfig.check(MenuEnum.PLAYPLAN_LIST.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize()); |
| | | return ResponseUtil.success(scheduleService.listSchedule(baseConditionVO, keyword)); |
| | | return ResponseUtil.success(scheduleService.listSchedule(baseConditionVO, order, seq, keyword)); |
| | | } |
| | | |
| | | |