liurunyu
3 天以前 4b99aedffe4e64425c059611dbb89d7d28b9ed06
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/controller/ControllerCtrl.java
@@ -12,6 +12,7 @@
import com.dy.pipIrrGlobal.pojoBa.BaClient;
import com.dy.pipIrrGlobal.pojoPr.PrController;
import com.dy.pipIrrGlobal.voPr.VoController;
import com.dy.pipIrrGlobal.voPr.VoControllerSimple;
import com.dy.pipIrrGlobal.voSe.VoActiveCard;
import com.dy.pipIrrProject.result.ProjectResultCode;
import io.swagger.v3.oas.annotations.Operation;
@@ -226,19 +227,12 @@
    @SneakyThrows(IOException.class)
    @RequestMapping(value = "/export", method = RequestMethod.GET)
    public void export(HttpServletResponse response, QueryVo vo) {
        //setExcelRespProp(response, "控制器列表");
        List<VoController> controllerList = controllerSv.export(vo);
        ExcelUtil.setExcelRespProp(response, "控制器列表" + LocalDate.now());
        EasyExcel.write(response.getOutputStream(), VoController.class)
                .registerWriteHandler(new CellWriteHandler("控制器列表"))
                .sheet("控制器")
                .doWrite(controllerList);
        //EasyExcel.write(response.getOutputStream())
        //        .head(VoController.class)
        //        .excelType(ExcelTypeEnum.XLSX)
        //        .sheet("控制器列表")
        //        .doWrite(memberList);
    }
    /**
@@ -251,5 +245,19 @@
        response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
    }
    /**
     * 不分页获取全部未删除的阀控器列表
     * @return
     */
    @GetMapping(path = "/getSimpleControllers")
    @SsoAop()
    public BaseResponse<List<VoControllerSimple>> getSimpleControllers() {
        try {
            List<VoControllerSimple> res = controllerSv.getSimpleControllers();
            return BaseResponseUtils.buildSuccess(res);
        } catch (Exception e) {
            log.error("获取未完的计划异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
    }
}