75 lines
2.1 KiB
Java
75 lines
2.1 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;
|
||
|
|
||
|
/**
|
||
|
* 定时任务获取纷享销客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数据");
|
||
|
// 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数据执行完毕");
|
||
|
// }
|
||
|
|
||
|
}
|