| | |
| | | return ResponseUtil.success(playPlanNvService.pushSchedule(planId, playerIds)); |
| | | } |
| | | |
| | | |
| | | @PostMapping(value = "/pushProgram/{pid}", produces = "application/json;charset=UTF-8") |
| | | public ResponseVO<Object> pushProgram(@PathVariable Long pid, @RequestBody List<NovaPushResultVO> playerIds) { |
| | | if (!permissionConfig.check(MenuEnum.LED_N_PLAY_PLAN_PUSH.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | return ResponseUtil.success(playPlanNvService.pushProgram(pid, playerIds)); |
| | | } |
| | | |
| | | @PostMapping(value = "/pushWeather/{pid}", produces = "application/json;charset=UTF-8") |
| | | public ResponseVO<Object> pushWeather(@PathVariable Long pid, @RequestBody List<NovaPushResultVO> playerIds) { |
| | | if (!permissionConfig.check(MenuEnum.LED_N_PLAY_PLAN_PUSH.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | return ResponseUtil.success(playPlanNvService.pushProgram(pid, playerIds)); |
| | | } |
| | | |
| | | @PostMapping(value = "/pushWeatherPlan/{id}", produces = "application/json;charset=UTF-8") |
| | | public ResponseVO<Object> pushWeatherPlan(@PathVariable Long id, @RequestBody List<NovaPushResultVO> playerIds) { |
| | | if (!permissionConfig.check(MenuEnum.LED_N_PLAY_PLAN_PUSH.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | return ResponseUtil.success(playPlanNvService.pushWeatherToLed(id, playerIds)); |
| | | } |
| | | |
| | | @GetMapping("/listPlan") |
| | | public ResponseVO<Object> list(BaseConditionVO baseConditionVO, |
| | | @RequestParam(value = "order", required = false) Integer order, |
| | |
| | | //排序方式 |
| | | String orderBy = orderByResult + " " + orderBySeq; |
| | | |
| | | PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize(), orderBy); |
| | | if (baseConditionVO != null) { |
| | | PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize(), orderBy); |
| | | } |
| | | LambdaQueryWrapper<PlayPlanNv> wrapper = Wrappers.lambdaQuery(PlayPlanNv.class); |
| | | |
| | | if (SecurityUtils.getClientId() != null) { |
| | |
| | | } |
| | | List<PlayPlanNv> list = playPlanNvService.list(wrapper); |
| | | list.forEach(plan -> { |
| | | // plan.setPlan(JSON.parseObject(plan.getSchedule(), Map.class)); |
| | | plan.setPlan(JSON.parseObject(plan.getSchedules(), List.class)); |
| | | // plan.setPlan(JSON.parseArray(plan.getSchedule(), SchedulesDTO.class)); |
| | | }); |
| | | return ResponseUtil.successPage(list); |
| | | } |