| | |
| | | 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; |
| | |
| | | @RequiresPermissions("business:company:create") |
| | | public ApiResponse create(@RequestBody Company company) { |
| | | companyService.create(company); |
| | | companyService.startSignAuth(company.getId()); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | |
| | | return ApiResponse.success(companyService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("查询当前企业进行集团申请可以申请的企业") |
| | | @PostMapping("/findAllCompanyList") |
| | | @RequiresPermissions("business:company:query") |
| | | public ApiResponse<List<Company>> findAllCompanyList () { |
| | | return ApiResponse.success(companyService.findAllCompanyList()); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @ApiOperation("导出Excel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:company:exportExcel") |
| | |
| | | |
| | | 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); |
| | | } |
| | | } |