| | |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * OA数据同步定时任务(组合任务) |
| | |
| | | private List<OrderClassDTO> getDispatchOrdCode() { |
| | | return orderClassDataService.getDispatchOrderClass(); |
| | | } |
| | | |
| | | private List<Map<String,Object>> getAddressList() { |
| | | return departmentSyncDataService.getAddressList(); |
| | | } |
| | | /** |
| | | * 同步OA数据(部门+用户) |
| | | * 按顺序执行:1. 部门同步 2. 用户同步 |
| | |
| | | |
| | | // 第一步:同步部门 |
| | | log.info("【步骤1/2】开始同步部门数据..."); |
| | | AjaxResult deptResult = departmentSyncService.syncBranchDepartments(this.getDept(),this.getServiceOrdCode(),this.getDispatchOrdCode()); |
| | | AjaxResult deptResult = departmentSyncService.syncBranchDepartments(this.getDept(),this.getServiceOrdCode(),this.getDispatchOrdCode(),this.getAddressList()); |
| | | |
| | | if (deptResult.get("code").equals(200)) |
| | | { |
| | |
| | | try |
| | | { |
| | | log.info("==========开始执行部门同步任务=========="); |
| | | AjaxResult result = departmentSyncService.syncBranchDepartments(this.getDept(),this.getServiceOrdCode(),this.getDispatchOrdCode()); |
| | | AjaxResult result = departmentSyncService.syncBranchDepartments(this.getDept(),this.getServiceOrdCode(),this.getDispatchOrdCode(),this.getAddressList()); |
| | | |
| | | if (result.get("code").equals(200)) |
| | | { |