|  |  |  | 
|---|
|  |  |  | import com.doumee.core.model.PageWrap; | 
|---|
|  |  |  | import com.doumee.core.model.PageData; | 
|---|
|  |  |  | import com.doumee.core.utils.Constants; | 
|---|
|  |  |  | import com.doumee.dao.admin.response.CompanyDTO; | 
|---|
|  |  |  | import com.doumee.dao.business.model.Company; | 
|---|
|  |  |  | import com.doumee.service.business.CompanyService; | 
|---|
|  |  |  | import io.swagger.annotations.Api; | 
|---|
|  |  |  | 
|---|
|  |  |  | return ApiResponse.success(companyService.findPage(pageWrap)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("修改状态") | 
|---|
|  |  |  | @PostMapping("/updateStatusById") | 
|---|
|  |  |  | @RequiresPermissions("business:company:update") | 
|---|
|  |  |  | public ApiResponse updateStatusById(@RequestBody Company company) { | 
|---|
|  |  |  | companyService.updateStatusById(company); | 
|---|
|  |  |  | return ApiResponse.success(null); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("导出Excel") | 
|---|
|  |  |  | @PostMapping("/exportExcel") | 
|---|
|  |  |  | @RequiresPermissions("business:company:exportExcel") | 
|---|
|  |  |  | 
|---|
|  |  |  | company.setCategoryId(query.getCategoryId()); | 
|---|
|  |  |  | return ApiResponse.success(companyService.findList(company)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 查询部门及其子部门信息 | 
|---|
|  |  |  | * @param type 0 查询所有信息 1 查询内部信息 | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiOperation("根据类型查询组织信息") | 
|---|
|  |  |  | @GetMapping("/findCompanyTreePage") | 
|---|
|  |  |  | //    @RequiresPermissions("business:company:query") | 
|---|
|  |  |  | public ApiResponse<List<CompanyDTO>> findCompanyTreePage(Integer type){ | 
|---|
|  |  |  | return ApiResponse.success(companyService.findCompanyTreePage(type)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("部门信息同步") | 
|---|
|  |  |  | @PostMapping("/sync") | 
|---|
|  |  |  | //    @RequiresPermissions("business:company:sync") | 
|---|
|  |  |  | public ApiResponse sync(){ | 
|---|
|  |  |  | //TODO 手动同步 部门信息 | 
|---|
|  |  |  | return ApiResponse.success("同步成功"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|