| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.config.DataSyncConfig; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | /** |
| | | * @author 江蹄蹄 |
| | | * @date 2023/11/30 15:33 |
| | |
| | | @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("无效操作"); |