|  |  | 
 |  |  | import com.doumee.config.DataSyncConfig; | 
 |  |  | import com.doumee.core.annotation.excel.ExcelExporter; | 
 |  |  | import com.doumee.core.annotation.pr.PreventRepeat; | 
 |  |  | import com.doumee.core.model.ApiResponse; | 
 |  |  | import com.doumee.core.model.PageWrap; | 
 |  |  | import com.doumee.core.model.PageData; | 
 |  |  | import com.doumee.service.business.third.model.ApiResponse; | 
 |  |  | import com.doumee.service.business.third.model.PageWrap; | 
 |  |  | import com.doumee.service.business.third.model.PageData; | 
 |  |  | import com.doumee.core.utils.Constants; | 
 |  |  | import com.doumee.dao.admin.request.UpdateCompanySortDTO; | 
 |  |  | import com.doumee.dao.admin.response.CompanyDTO; | 
 |  |  | 
 |  |  |     @GetMapping("/delete/{id}") | 
 |  |  |     @RequiresPermissions("business:company:delete") | 
 |  |  |     public ApiResponse deleteById(@PathVariable Integer id) { | 
 |  |  |         companyService.deleteById(id); | 
 |  |  |         companyService.deleteById(id,this.getLoginUser(null)); | 
 |  |  |         return ApiResponse.success(null); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | 
 |  |  |         for (String id : idArray) { | 
 |  |  |             idList.add(Integer.valueOf(id)); | 
 |  |  |         } | 
 |  |  |         companyService.deleteByIdInBatch(idList); | 
 |  |  |         companyService.deleteByIdInBatch(idList,this.getLoginUser(null)); | 
 |  |  |         return ApiResponse.success(null); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | 
 |  |  |     @ApiOperation("组织树查询") | 
 |  |  |     @GetMapping("/tree") | 
 |  |  |     @ApiImplicitParams({ | 
 |  |  |             @ApiImplicitParam(name = "type", dataType = "Integer", value = "类型 0劳务公司 1内部组织", required = true), | 
 |  |  |             @ApiImplicitParam(name = "type", dataType = "Integer", value = "类型 0劳务公司 1内部组织", required = true) | 
 |  |  |     }) | 
 |  |  |     @RequiresPermissions("business:company:query") | 
 |  |  |     public ApiResponse<List<Company>> tree (@RequestParam Integer type) { | 
 |  |  | 
 |  |  |         if(Constants.formatIntegerNum(dataSyncConfig.getOrgUserDataOrigin()) == DataSyncConfig.origin.erp){ | 
 |  |  |             return ApiResponse.success( erpSyncService.syncCompany(null)); | 
 |  |  |         }else if(Constants.formatIntegerNum(dataSyncConfig.getOrgUserDataOrigin()) == DataSyncConfig.origin.hk){ | 
 |  |  |              hkSyncOrgUserFHKService.syncOrgData(); | 
 |  |  |              hkSyncOrgUserFHKService.syncOrgData(this.getLoginUser(null)); | 
 |  |  |             return ApiResponse.success("同步成功"); | 
 |  |  |         }else if(Constants.formatIntegerNum(dataSyncConfig.getOrgUserDataOrigin()) == DataSyncConfig.origin.self){ | 
 |  |  |             //如果是自建系統,同步安防平台初始化数据 | 
 |  |  |             hkSyncOrgUserFHKService.syncOrgData(this.getLoginUser(null)); | 
 |  |  |             return ApiResponse.success("同步成功"); | 
 |  |  |         } | 
 |  |  |         return ApiResponse.failed("无效操作"); |