wuzeyu
2024-01-18 9281643d18bc2e0aaffed3c5f216d1df12d68424
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/controller/ControllerCtrl.java
@@ -1,5 +1,6 @@
package com.dy.pipIrrProject.controller;
import com.alibaba.fastjson2.JSONArray;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.support.ExcelTypeEnum;
import com.dy.common.aop.SsoAop;
@@ -179,6 +180,34 @@
    }
    /**
     * 获取未绑控制器的取水口列表
     * @return
     */
    @Operation(summary = "获得未绑控制器的取水口记录", description = "返回未绑控制器的取水口数据")
    @ApiResponses(value = {
            @ApiResponse(
                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
                    description = "返回控制器数据(BaseResponse.content:QueryResultVo[{}])",
                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
                            schema = @Schema(implementation = BaClient.class))}
            )
    })
    @GetMapping(path = "nobinding_intakes")
    @SsoAop()
    public BaseResponse<JSONArray> getNoBindingIntakes(){
        try {
            JSONArray array = controllerSv.getNoBindingIntakes();
            if(array.size() <= 0) {
                return BaseResponseUtils.buildFail(ProjectResultCode.NO_BINDING_INTAKE.getMessage());
            }
            return BaseResponseUtils.buildSuccess(array);
        } catch (Exception e) {
            log.error("查询控制器异常", e);
            return BaseResponseUtils.buildException(e.getMessage()) ;
        }
    }
    /**
     * 导出控制器列表
     * @param response
     * @param vo