78 lines
2.2 KiB
Java
78 lines
2.2 KiB
Java
package com.management.task;
|
|
|
|
import com.management.controller.*;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.context.annotation.Configuration;
|
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
|
/**
|
|
* 计划任务
|
|
*
|
|
* @return null
|
|
* @Author weiloong_zhang
|
|
*/
|
|
@Configuration
|
|
@EnableScheduling
|
|
public class CrmTask {
|
|
|
|
@Autowired
|
|
CRMTokenController crmTokenController;
|
|
@Autowired
|
|
PreContractController preContractController;
|
|
@Autowired
|
|
FrameContractController frameContractController;
|
|
@Autowired
|
|
XSHTController xshtController;
|
|
@Autowired
|
|
DesignController designController;
|
|
@Autowired
|
|
GoodsPlanController goodsPlanController;
|
|
@Autowired
|
|
InvoiceController invoiceController;
|
|
@Autowired
|
|
QualityBackController qualityBackController;
|
|
@Autowired
|
|
TenderingController tenderingController;
|
|
@Autowired
|
|
BankInfoController bankInfoController;
|
|
@Autowired
|
|
ReimbursementController reimbursementController;
|
|
|
|
/**
|
|
* 定时任务获取纷享销客token
|
|
*
|
|
* @return void
|
|
* @Author weiloong_zhang
|
|
*/
|
|
@Scheduled(cron = "0 0/60 * * * ?")
|
|
private void crmTokenTask() {
|
|
crmTokenController.getCRMToken();
|
|
}
|
|
|
|
/**
|
|
* 定时任务同步ERP数据
|
|
*
|
|
* @return void
|
|
* @Author weiloong_zhang
|
|
*/
|
|
// @Scheduled(cron = "0 0/1 * * * ?")
|
|
// private void configureTasks() throws Exception {
|
|
// System.out.println("开始同步ERP数据");
|
|
// crmTokenController.tokenReSync();
|
|
// preContractController.syncContract();
|
|
// frameContractController.syncFrameContract();
|
|
// xshtController.syncXSHT();
|
|
// xshtController.isComplete();
|
|
// designController.syncDesign();
|
|
// goodsPlanController.syncGoodsPlan();
|
|
// invoiceController.syncInvoice();
|
|
// invoiceController.syncRedInvoice();
|
|
// qualityBackController.qualityFeedBack();
|
|
// tenderingController.syncTendering();
|
|
// bankInfoController.syncBankInfo();
|
|
// System.out.println("ERP数据执行完毕");
|
|
// }
|
|
|
|
}
|