|
|
@ -5,6 +5,9 @@ import com.ruoyi.quartz.task.CJT.*;
|
|
|
|
import com.ruoyi.quartz.task.MailSyncTask;
|
|
|
|
import com.ruoyi.quartz.task.MailSyncTask;
|
|
|
|
import com.ruoyi.quartz.task.MonitorJobTask;
|
|
|
|
import com.ruoyi.quartz.task.MonitorJobTask;
|
|
|
|
import com.ruoyi.quartz.task.ScheduledRemindersTask;
|
|
|
|
import com.ruoyi.quartz.task.ScheduledRemindersTask;
|
|
|
|
|
|
|
|
import com.ruoyi.quartz.task.odoo.AccountMoveLineJob;
|
|
|
|
|
|
|
|
import com.ruoyi.quartz.task.odoo.ProductProductJob;
|
|
|
|
|
|
|
|
import com.ruoyi.quartz.task.odoo.StockQuantJob;
|
|
|
|
import lombok.SneakyThrows;
|
|
|
|
import lombok.SneakyThrows;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@ -36,8 +39,14 @@ public class MailInfoController extends BaseController {
|
|
|
|
private SaleDispatchSyncJob saleDispatchSyncJob;
|
|
|
|
private SaleDispatchSyncJob saleDispatchSyncJob;
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private SaleOrderSyncJob saleOrderSyncJob;
|
|
|
|
private SaleOrderSyncJob saleOrderSyncJob;
|
|
|
|
// @Autowired
|
|
|
|
@Autowired
|
|
|
|
// private ProductJob productJob;
|
|
|
|
private CJTCreateLarkTableJob cjtCreateLarkTableJob;
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
private ProductProductJob productProductJob;
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
private AccountMoveLineJob accountMoveLineJob;
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
private StockQuantJob stockQuantJob;
|
|
|
|
|
|
|
|
|
|
|
|
// @PostMapping("/syncEmail")
|
|
|
|
// @PostMapping("/syncEmail")
|
|
|
|
// public void syncEmail(Boolean readFlag) {
|
|
|
|
// public void syncEmail(Boolean readFlag) {
|
|
|
@ -46,33 +55,54 @@ public class MailInfoController extends BaseController {
|
|
|
|
|
|
|
|
|
|
|
|
@SneakyThrows
|
|
|
|
@SneakyThrows
|
|
|
|
@PostMapping("/scheduledReminders")
|
|
|
|
@PostMapping("/scheduledReminders")
|
|
|
|
public void scheduledReminders(Integer number) {
|
|
|
|
public void scheduledReminders(Integer number,String cjt) {
|
|
|
|
// System.out.println(number);
|
|
|
|
// odoo(number);
|
|
|
|
// Integer userId = productJob.getUserId();
|
|
|
|
// if (number > 10){
|
|
|
|
// System.out.println(userId);
|
|
|
|
// cjtCreateLarkTableJob.execute();
|
|
|
|
// productJob.testProduct();
|
|
|
|
// }else {
|
|
|
|
// switch (number){
|
|
|
|
cjt(number,cjt);
|
|
|
|
// case 1:
|
|
|
|
|
|
|
|
// manufactureOrderSyncJob.executeSync(null);
|
|
|
|
|
|
|
|
// break;
|
|
|
|
|
|
|
|
// case 2:
|
|
|
|
|
|
|
|
// purchaseArrivalOpenSyncJob.executeSync(null);
|
|
|
|
|
|
|
|
// break;
|
|
|
|
|
|
|
|
// case 3:
|
|
|
|
|
|
|
|
// purchaseOrderSyncJob.executeSync(null);
|
|
|
|
|
|
|
|
// break;
|
|
|
|
|
|
|
|
// case 4:
|
|
|
|
|
|
|
|
// saleDeliverySyncJob.executeSync(null);
|
|
|
|
|
|
|
|
// break;
|
|
|
|
|
|
|
|
// case 5:
|
|
|
|
|
|
|
|
// saleDispatchSyncJob.executeSync(null);
|
|
|
|
|
|
|
|
// break;
|
|
|
|
|
|
|
|
// case 6:
|
|
|
|
|
|
|
|
// saleOrderSyncJob.executeSync(null);
|
|
|
|
|
|
|
|
// break;
|
|
|
|
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// monitorJobTask.monitor();
|
|
|
|
}
|
|
|
|
// scheduledRemindersTask.scheduledReminders();
|
|
|
|
|
|
|
|
|
|
|
|
private void odoo(Integer number){
|
|
|
|
|
|
|
|
switch (number){
|
|
|
|
|
|
|
|
case 0:
|
|
|
|
|
|
|
|
accountMoveLineJob.execute(number);
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 1:
|
|
|
|
|
|
|
|
case 6:
|
|
|
|
|
|
|
|
case 8:
|
|
|
|
|
|
|
|
productProductJob.execute(number);
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void cjt(Integer number,String cjt){
|
|
|
|
|
|
|
|
switch (number){
|
|
|
|
|
|
|
|
case 1:
|
|
|
|
|
|
|
|
manufactureOrderSyncJob.executeSync(cjt,"2023-08-01 00:00:00","2023-08-08 23:00:00");
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 2:
|
|
|
|
|
|
|
|
purchaseArrivalOpenSyncJob.executeSync(cjt,"2023-08-01 00:00:00","2023-08-08 23:00:00");
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 3:
|
|
|
|
|
|
|
|
purchaseOrderSyncJob.executeSync(cjt,"2023-06-07 00:00:00","2023-06-07 23:00:00");
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 4:
|
|
|
|
|
|
|
|
saleDeliverySyncJob.executeSync(cjt,"2023-08-01 00:00:00","2023-08-08 23:00:00");
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 5:
|
|
|
|
|
|
|
|
saleDispatchSyncJob.executeSync(cjt,"2023-08-02 16:46:00","2023-08-02 16:47:00");
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 6:
|
|
|
|
|
|
|
|
saleOrderSyncJob.executeSync(cjt,"2023-08-01 00:00:00","2023-08-08 23:00:00");
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 7:
|
|
|
|
|
|
|
|
retryErrorSyncJob.execute();
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|