wlzboy
2025-11-05 37de2f4b0f732ca5c19582d4a340ad7c987925b5
ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/DepartmentSyncTask.java
@@ -1,7 +1,9 @@
package com.ruoyi.quartz.task;
import com.ruoyi.system.domain.DepartmentSyncDTO;
import com.ruoyi.system.domain.OrderClassDTO;
import com.ruoyi.system.service.IDepartmentSyncDataService;
import com.ruoyi.system.service.IOrderClassDataService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -35,7 +37,14 @@
    private List<DepartmentSyncDTO> getTransportDept(){
        return departmentSyncDataService.getTransportDepartments();
    }
    @Autowired
    private IOrderClassDataService orderClassDataService;
private List<OrderClassDTO> getServiceOrdCode() {
    return orderClassDataService.getServiceOrderClass();
}
private List<OrderClassDTO> getDispatchOrdCode() {
    return orderClassDataService.getDispatchOrderClass();
}
    /**
     * 同步分公司和部门数据
@@ -51,7 +60,7 @@
        {
            log.info("==========开始执行部门同步定时任务==========");
            
            AjaxResult result = departmentSyncService.syncBranchDepartments(this.getDepartment());
            AjaxResult result = departmentSyncService.syncBranchDepartments(this.getDepartment(), this.getServiceOrdCode(),this.getDispatchOrdCode());
            departmentSyncService.syncTransportDepartments(this.getTransportDept());