liusuyi
2025-10-17 8a36ef1cc5e1f051f17d4d99bc5a356020ae3f2e
增加获取盒子列表按服务器id查询
3 files modified
43 ■■■■■ changed files
ard-admin/src/main/java/com/ard/web/controller/work/UavBaseController.java 21 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ard/work/service/ITyService.java 9 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ard/work/service/impl/TyServiceImpl.java 13 ●●●●● patch | view | raw | blame | history
ard-admin/src/main/java/com/ard/web/controller/work/UavBaseController.java
@@ -43,16 +43,19 @@
        return AjaxResult.success(tyService.getAccessToken(serverId));
    }
    @ApiOperation("获取全部服务器盒子列表")
    @ApiOperation("获取盒子列表")
    @ApiOperationSupport(order = 2)
    @GetMapping("/getBoxList")
    public AjaxResult getBoxList() {
        List<BoxInfoReceiver> boxList = tyService.getBoxList();
        return AjaxResult.success(boxList);
    public AjaxResult getBoxList(@RequestParam(required = false) String serverId) {
        if (serverId == null) {
            return AjaxResult.success(tyService.getBoxList());
        } else {
            return AjaxResult.success(tyService.getBoxList(serverId));
        }
    }
    @ApiOperation("获取飞行历史")
    @ApiOperationSupport(order = 3)
    @ApiOperationSupport(order = 4)
    @PostMapping("/getBoxHistory")
    public AjaxResult getBoxHistory(@RequestBody BoxHistoryDTO boxHistoryDTO) {
        List<BoxHistoryReceiver> boxHistory = tyService.getBoxHistory(boxHistoryDTO);
@@ -60,7 +63,7 @@
    }
    @ApiOperation("获取任务照片")
    @ApiOperationSupport(order = 4)
    @ApiOperationSupport(order = 5)
    @PostMapping("/getBoxPhotos")
    public AjaxResult getBoxPhotos(@RequestBody BoxPhotosDTO boxPhotosDTO) {
        List<BoxPhotosReceiver> boxPhotos = tyService.getBoxPhotos(boxPhotosDTO);
@@ -68,7 +71,7 @@
    }
    @ApiOperation("获取直播地址")
    @ApiOperationSupport(order = 5)
    @ApiOperationSupport(order = 6)
    @GetMapping("/getBoxList/{boxSn}")
    public AjaxResult getBoxLiveUrl(@PathVariable("boxSn") String boxSn) {
        BoxStreamUrlReceiver boxLiveUrl = tyService.getBoxLiveUrl(boxSn);
@@ -76,7 +79,7 @@
    }
    @ApiOperation("修改云盒设置")
    @ApiOperationSupport(order = 6)
    @ApiOperationSupport(order = 7)
    @PostMapping("/updateBoxSettings")
    public AjaxResult updateBoxSettings(@RequestBody BoxSettingsDTO boxSettingsDTO) {
        Boolean state = tyService.updateBoxSettings(boxSettingsDTO);
@@ -84,7 +87,7 @@
    }
    @ApiOperation("根据[服务器id]获取六合盒子列表")
    @ApiOperationSupport(order = 7)
    @ApiOperationSupport(order = 8)
    @GetMapping("/getBoxSnToList/{id}")
    public TableDataInfo getBoxSnToList(@PathVariable("id") String id) {
        startPage();
ard-work/src/main/java/com/ard/work/service/ITyService.java
@@ -38,12 +38,19 @@
    /**
     * 获取云盒列表
     * 获取全部服务器云盒列表
     * @return
     */
    List<BoxInfoReceiver> getBoxList();
    /**
     * 获取指定服务器云盒列表
     *
     * @return List<BoxInfoReceiver>
     */
    List<BoxInfoReceiver> getBoxList(String serverId);
    /**
     * 获取直播地址
     * @return
     */
ard-work/src/main/java/com/ard/work/service/impl/TyServiceImpl.java
@@ -84,7 +84,7 @@
    }
    /**
     * 获取云盒列表
     * 获取全部云盒列表
     *
     * @return List<BoxInfoReceiver>
     */
@@ -93,7 +93,16 @@
        List<ArdServerInfo> ardServerInfos = ardServerService.selectArdServerInfoList(new ArdServerInfo());
        return getBoxList(ardServerInfos);
    }
    /**
     * 获取指定服务器云盒列表
     *
     * @return List<BoxInfoReceiver>
     */
    @Override
    public List<BoxInfoReceiver> getBoxList(String serverId) {
        TyHttpCommonReceiver<List<BoxInfoReceiver>> boxList = tyClient.getBoxList(serverId);
        return boxList.getContent();
    }
    /**
     * 获取直播地址
     *