|  |  | 
 |  |  | package com.doumee.cloud.admin; | 
 |  |  |  | 
 |  |  | import com.baomidou.mybatisplus.annotation.TableField; | 
 |  |  | import com.doumee.api.BaseController; | 
 |  |  | import com.doumee.config.DataSyncConfig; | 
 |  |  | import com.doumee.config.annotation.CloudRequiredPermission; | 
 |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private CompanyService companyService; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  | //    @Autowired | 
 |  |  |     private ERPSyncService erpSyncService; | 
 |  |  |     @Autowired | 
 |  |  |     private HkSyncOrgUserFromHKServiceImpl hkSyncOrgUserFHKService; | 
 |  |  | 
 |  |  |         return ApiResponse.success(companyService.create(company)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @PreventRepeat | 
 |  |  |     @ApiOperation("创建财务公司") | 
 |  |  |     @PostMapping("/createFinanceCompany") | 
 |  |  |     @CloudRequiredPermission("business:company:create") | 
 |  |  |     public ApiResponse<Integer> createFinanceCompany(@RequestBody Company company, @RequestHeader(Constants.HEADER_USER_TOKEN) String token){ | 
 |  |  |         company.setLoginUserInfo(this.getLoginUser(token)); | 
 |  |  |         return ApiResponse.success(companyService.createFinanceCompany(company)); | 
 |  |  |     } | 
 |  |  |     @PreventRepeat | 
 |  |  |     @ApiOperation("更新财务公司") | 
 |  |  |     @PostMapping("/updateFinanceCompany") | 
 |  |  |     @CloudRequiredPermission("business:company:update") | 
 |  |  |     public ApiResponse<Integer> updateFinanceCompany(@RequestBody Company company, @RequestHeader(Constants.HEADER_USER_TOKEN) String token){ | 
 |  |  |         company.setLoginUserInfo(this.getLoginUser(token)); | 
 |  |  |         return ApiResponse.success(companyService.updateFinanceCompany(company)); | 
 |  |  |     } | 
 |  |  |     @PreventRepeat | 
 |  |  |     @ApiOperation("创建劳务公司") | 
 |  |  |     @PostMapping("/createLaborServices") | 
 |  |  | 
 |  |  |     public ApiResponse<List<Company>> list (@RequestBody Company company,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ | 
 |  |  |         return ApiResponse.success(companyService.findList(company)); | 
 |  |  |     } | 
 |  |  |     @ApiOperation("新建合同所属公司筛选") | 
 |  |  |     @PostMapping("/listForConstract") | 
 |  |  |     @CloudRequiredPermission("business:company:query") | 
 |  |  |     public ApiResponse<List<Company>> listForConstract (@RequestBody Company company,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ | 
 |  |  |         return ApiResponse.success(companyService.listForConstract(company)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  | 
 |  |  |     @PostMapping("/updateStatusById") | 
 |  |  |     @CloudRequiredPermission("business:company:update") | 
 |  |  |     public ApiResponse updateStatusById(@RequestBody Company company,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ | 
 |  |  |         company.setLoginUserInfo(getLoginUser(token)); | 
 |  |  |         companyService.updateStatusById(company); | 
 |  |  |         return ApiResponse.success(null); | 
 |  |  |     } |