erpjob获取erp定时任务

This commit is contained in:
liss
2025-10-20 15:52:10 +08:00
parent 9b00faeddb
commit 5b5ceca41b

View File

@@ -1,9 +1,58 @@
package com.zt.plat.module.erp.job;
import com.xxl.job.core.handler.annotation.XxlJob;
import com.zt.plat.framework.tenant.core.job.TenantJob;
import com.zt.plat.module.erp.service.erp.*;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@Component
@Slf4j
public class ErpJob {
public void execute() throws Exception {
// TODO Auto-generated method stub
@Resource
private ErpAssetService erpAssetService;
@Resource
private ErpBomService erpBomService;
@Resource
private ErpCompanyService erpCompanyService;
@Resource
private ErpCostcenterService erpCostcenterService;
@Resource
private ErpCustomerService erpCustomerService;
@Resource
private ErpFactoryService erpFactoryService;
@Resource
private ErpInternalOrderService erpInternalOrderService;
@Resource
private ErpMaterialService erpMaterialService;
@Resource
private ErpProcessService erpProcessService;
@Resource
private ErpProductiveVersionService erpProductiveVersionService;
@Resource
private ErpPurchaseOrganizationService erpPurchaseOrganizationService;
@Resource
private ErpSalesOrganizationService erpSalesOrganizationService;
@Resource
private ErpWarehouseService erpWarehouseService;
@XxlJob("callErpRfcInterface")
@TenantJob
public void execute() {
erpCompanyService.callErpRfcInterface();
erpFactoryService.callErpRfcInterface();
erpCustomerService.callErpRfcInterface();
erpAssetService.callErpRfcInterface();
erpBomService.callErpRfcInterface();
erpCostcenterService.callErpRfcInterface();
erpInternalOrderService.callErpRfcInterface();
erpMaterialService.callErpRfcInterface();
erpProcessService.callErpRfcInterface();
erpProductiveVersionService.callErpRfcInterface();
erpPurchaseOrganizationService.callErpRfcInterface();
erpSalesOrganizationService.callErpRfcInterface();
erpWarehouseService.callErpRfcInterface();
}
}