|
@@ -1,9 +1,13 @@
|
|
|
package net.chenlin.dp.modules;
|
|
|
|
|
|
+import com.taobao.api.ApiException;
|
|
|
import net.chenlin.dp.common.openapi4j.exception.OpenAPIException;
|
|
|
import net.chenlin.dp.common.openapi4j.service.SaleOrderService;
|
|
|
import net.chenlin.dp.common.utils.DateUtils;
|
|
|
import net.chenlin.dp.modules.api.controller.DingdingOpenInterface;
|
|
|
+import net.chenlin.dp.modules.api.controller.PayrequestController;
|
|
|
+import net.chenlin.dp.modules.api.controller.PurchaseOrderController;
|
|
|
+import net.chenlin.dp.modules.api.controller.SaleOrderController;
|
|
|
import net.chenlin.dp.modules.api.service.PettyCashService;
|
|
|
import net.chenlin.dp.modules.api.service.ReimbursementService;
|
|
|
import org.springframework.stereotype.Component;
|
|
@@ -39,8 +43,10 @@ public class TaskDemo {
|
|
|
/**
|
|
|
* 定时任务 销售订单同步至 钉钉
|
|
|
*/
|
|
|
- public static void autoSaleToDingJob(){
|
|
|
+ public static void autoSaleToDingJob() throws OpenAPIException, ApiException {
|
|
|
System.out.println("==================================");
|
|
|
+ SaleOrderController saleOrderController=new SaleOrderController();
|
|
|
+ saleOrderController.dingSaleOrder();
|
|
|
System.out.println("===========销售订单同步至钉钉定时任务执行 "+ DateUtils.getNowTime()+" ============" );
|
|
|
System.out.println("==================================");
|
|
|
}
|
|
@@ -48,8 +54,10 @@ public class TaskDemo {
|
|
|
/**
|
|
|
* 定时任务 采购订单同步至 钉钉
|
|
|
*/
|
|
|
- public static void autoOrderToDingJob(){
|
|
|
+ public static void autoOrderToDingJob() throws OpenAPIException, ApiException {
|
|
|
System.out.println("==================================");
|
|
|
+ PurchaseOrderController purchaseOrderController=new PurchaseOrderController();
|
|
|
+ purchaseOrderController.dingPurchaseOrder();
|
|
|
System.out.println("===========采购订单同步至钉钉定时任务执行 "+ DateUtils.getNowTime()+" ============" );
|
|
|
System.out.println("==================================");
|
|
|
}
|
|
@@ -57,8 +65,10 @@ public class TaskDemo {
|
|
|
/**
|
|
|
* 定时任务 付款申请单同步至 钉钉
|
|
|
*/
|
|
|
- public static void autoFkdToDingJob(){
|
|
|
+ public static void autoFkdToDingJob() throws OpenAPIException, ApiException {
|
|
|
System.out.println("==================================");
|
|
|
+ PayrequestController payrequestController=new PayrequestController();
|
|
|
+ payrequestController.dingPayrequest();
|
|
|
System.out.println("===========付款申请单同步至钉钉定时任务执行 "+ DateUtils.getNowTime()+" ============" );
|
|
|
System.out.println("==================================");
|
|
|
}
|
|
@@ -66,24 +76,30 @@ public class TaskDemo {
|
|
|
/**
|
|
|
* 定时任务 钉钉销售订单审核回写至U8
|
|
|
*/
|
|
|
- public static void autoSaleToU8Job(){
|
|
|
+ public static void autoSaleToU8Job() throws OpenAPIException {
|
|
|
System.out.println("==================================");
|
|
|
+ SaleOrderController saleOrderController=new SaleOrderController();
|
|
|
+ saleOrderController.saleOrderShenhe();
|
|
|
System.out.println("===========钉钉销售订单回写至U8定时任务执行 "+ DateUtils.getNowTime()+" ============" );
|
|
|
System.out.println("==================================");
|
|
|
}
|
|
|
/**
|
|
|
* 定时任务 钉钉采购订单回写至U8
|
|
|
*/
|
|
|
- public static void autoOrderToU8Job(){
|
|
|
+ public static void autoOrderToU8Job() throws OpenAPIException {
|
|
|
System.out.println("==================================");
|
|
|
+ PurchaseOrderController purchaseOrderController=new PurchaseOrderController();
|
|
|
+ purchaseOrderController.purchaseOrderShenhe();
|
|
|
System.out.println("===========钉钉采购订单回写至U8定时任务执行 "+ DateUtils.getNowTime()+" ============" );
|
|
|
System.out.println("==================================");
|
|
|
}
|
|
|
/**
|
|
|
* 定时任务 钉钉付款申请单回写至U8
|
|
|
*/
|
|
|
- public static void autoFkdToU8Job(){
|
|
|
+ public static void autoFkdToU8Job() throws OpenAPIException {
|
|
|
System.out.println("==================================");
|
|
|
+ PayrequestController payrequestController=new PayrequestController();
|
|
|
+ payrequestController.PayrequestOrderShenhe();
|
|
|
System.out.println("===========钉钉付款申请单回写至U8定时任务执行 "+ DateUtils.getNowTime()+" ============" );
|
|
|
System.out.println("==================================");
|
|
|
}
|