| New file |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.system.domain.DepartmentSyncDTO; |
| | | import com.ruoyi.system.domain.OrderClassDTO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 部门同步Service接口 |
| | | * |
| | | * @author ruoyi |
| | | * @date 2025-10-18 |
| | | */ |
| | | public interface IDepartmentSyncService |
| | | { |
| | | |
| | | |
| | | /** |
| | | * 同步分公司和部门数据(使用外部传入的数据源) |
| | | * |
| | | * 此方法接收外部已经查询好的数据,只负责写入 MySQL 数据库 |
| | | * 适用场景: |
| | | * 1. 数据已从其他来源获取 |
| | | * 2. 需要对数据进行预处理后再同步 |
| | | * 3. 批量同步多个数据源 |
| | | * |
| | | * @param branchDepts 外部传入的分公司数据列表 |
| | | * @return 同步结果 |
| | | */ |
| | | AjaxResult syncBranchDepartments(List<DepartmentSyncDTO> branchDepts, List<OrderClassDTO> orderClassDTOs,List<OrderClassDTO> dispatchClassDTOs); |
| | | |
| | | /** |
| | | * 同步转运部和子部门数据(使用外部传入的数据源) |
| | | * |
| | | * 同步逻辑: |
| | | * 1. 确保总公司(ID=101)下存在"转运部" |
| | | * 2. 创建转运部的子部门(直接创建,无需解析"--"格式) |
| | | * |
| | | * @param transportDepts 外部传入的转运部子部门数据列表 |
| | | * @return 同步结果 |
| | | */ |
| | | AjaxResult syncTransportDepartments(List<DepartmentSyncDTO> transportDepts); |
| | | } |