|  |  | 
 |  |  | import com.doumee.api.BaseController; | 
 |  |  | import com.doumee.core.annotation.excel.ExcelExporter; | 
 |  |  | import com.doumee.core.annotation.pr.PreventRepeat; | 
 |  |  | import com.doumee.core.constants.ResponseStatus; | 
 |  |  | import com.doumee.core.exception.BusinessException; | 
 |  |  | import com.doumee.core.model.ApiResponse; | 
 |  |  | import com.doumee.core.model.PageWrap; | 
 |  |  | import com.doumee.core.model.PageData; | 
 |  |  | 
 |  |  |     @ApiOperation("查询全部数据(账号分配企业使用)") | 
 |  |  |     @PostMapping("/pageAll") | 
 |  |  |     @RequiresPermissions("business:companypermission:create") | 
 |  |  |     public ApiResponse<PageData<Company>> findPageAll (@RequestBody PageWrap<Company> pageWrap) { | 
 |  |  |         pageWrap.getModel().setQueryFlag(Constants.ONE);//查询全部 | 
 |  |  |         return ApiResponse.success(companyService.findPage(pageWrap)); | 
 |  |  |     public ApiResponse<List<Company>> findPageAll (@RequestBody  Company pageWrap) { | 
 |  |  |         pageWrap.setQueryFlag(Constants.ONE);//查询全部 | 
 |  |  |         return ApiResponse.success(companyService.findList(pageWrap)); | 
 |  |  |     } | 
 |  |  |     @ApiOperation("查询全部数据") | 
 |  |  |     @PostMapping("/list") | 
 |  |  |     @RequiresPermissions("business:company:query") | 
 |  |  |     public ApiResponse<List<Company>> findList (@RequestBody  Company pageWrap) { | 
 |  |  |         pageWrap.setQueryFlag(Constants.ZERO);//查询全部权限范围内 | 
 |  |  |         return ApiResponse.success(companyService.findList(pageWrap)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @ApiOperation("导出Excel") | 
 |  |  | 
 |  |  |  | 
 |  |  |         return ApiResponse.success(companyService.findById(id)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @ApiOperation("企业证件下载") | 
 |  |  |     @PostMapping("/exportFiles") | 
 |  |  |     @RequiresPermissions("business:company:exportExcel") | 
 |  |  |     public void exportFiles(@RequestBody Company company,HttpServletResponse response) { | 
 |  |  |         if(company.getId() == null){ | 
 |  |  |             throw  new BusinessException(ResponseStatus.BAD_REQUEST); | 
 |  |  |         } | 
 |  |  |         companyService.exportFiles(company.getId(),response); | 
 |  |  |     } | 
 |  |  | } |