| | |
| | | import com.sandu.ximon.admin.param.NovaAStateInfoParam; |
| | | import com.sandu.ximon.admin.param.VnnoxParam; |
| | | import com.sandu.ximon.admin.security.PermissionConfig; |
| | | import com.sandu.ximon.admin.service.LedNovaGroupRelationService; |
| | | import com.sandu.ximon.admin.service.LedNovaGroupService; |
| | | import com.sandu.ximon.admin.service.LedPlayerEntityService; |
| | | import com.sandu.ximon.admin.service.VnnoxService; |
| | | import com.sandu.ximon.admin.utils.VnnoxAPIUtil; |
| | | import com.sandu.ximon.admin.vo.NovaAStateInfoVO; |
| | | import com.sandu.ximon.admin.vo.NovaPushResultVO; |
| | | import com.sandu.ximon.admin.vo.NovaResultParam; |
| | | import com.sandu.ximon.dao.domain.LedNovaGroup; |
| | | import com.sandu.ximon.dao.domain.LedPlayerEntity; |
| | | import com.sandu.ximon.dao.domain.LedV2RegisterResultEntity; |
| | | import com.sandu.ximon.dao.enums.MenuEnum; |
| | |
| | | private LedPlayerEntityService ledPlayerEntityService; |
| | | @Autowired |
| | | private VnnoxAPIUtil vnnoxAPIUtil; |
| | | @Autowired |
| | | private LedNovaGroupRelationService relationService; |
| | | @Autowired |
| | | private LedNovaGroupService groupService; |
| | | |
| | | |
| | | /** |
| | | * 截屏 |
| | |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | //同步状态 |
| | | vnnoxService.getAsyncStatus(param.getPlayerIdList(),param.getStateValue()); |
| | | vnnoxService.getAsyncStatus(param.getPlayerIdList(), param.getStateValue()); |
| | | //获取同步 |
| | | List<NovaAStateInfoVO> info = vnnoxService.getInfo(param.getStateValue(), param.getPlayerIdList()); |
| | | return ResponseUtil.success(info); |
| | | } |
| | | |
| | | /** |
| | | * 根据分组id获取组内的屏幕 |
| | | */ |
| | | @GetMapping("/getByGroupId") |
| | | public ResponseVO<Object> getByGroupId(@RequestParam(value = "groupId", required = true) Long groupId) { |
| | | if (!permissionConfig.check(MenuEnum.LED_N_GROUP_INFO.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | if (groupId == null) { |
| | | throw new BusinessException("groupId不能为空"); |
| | | } |
| | | LedNovaGroup byId = groupService.getById(groupId); |
| | | if (byId == null) { |
| | | throw new BusinessException("分组不存在"); |
| | | } |
| | | if (!permissionConfig.check(MenuEnum.LED_LIST.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | return ResponseUtil.success(ledPlayerEntityService.getListByGroupId(groupId)); |
| | | } |
| | | } |