LG88888888 3 年之前
父节点
当前提交
2e488a2dfa

+ 87 - 3
src/main/java/net/chenlin/dp/modules/TaskDemo.java

@@ -3,9 +3,7 @@ package net.chenlin.dp.modules;
 import com.taobao.api.ApiException;
 import net.chenlin.dp.common.openapi4j.exception.OpenAPIException;
 import net.chenlin.dp.common.utils.DateUtils;
-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.controller.*;
 import net.chenlin.dp.modules.api.service.PettyCashService;
 import net.chenlin.dp.modules.api.service.ReimbursementService;
 import net.chenlin.dp.modules.sys.service.testU8Service;
@@ -19,6 +17,8 @@ public class TaskDemo {
     @Autowired
     private testU8Service testU8Mapper;
 
+    private  SaleOrderController controller=new SaleOrderController();
+
     /**
      * 定时任务 备用金 同步至 u8凭证
      */
@@ -146,6 +146,90 @@ public class TaskDemo {
         System.out.println("==================================");
     }
 
+    /**
+     * 定时任务 crm调用存储过程 同步客户档案
+     * @throws OpenAPIException
+     */
+    public void autoCallCustomer() throws OpenAPIException {
+        CustomerController customerController=new CustomerController();
+        customerController.addCustomer();
+        System.out.println("===========crm调用存储过程 同步客户档案 "+ DateUtils.getNowTime()+" ============" );
+        System.out.println("==================================");
+    }
+
+    /**
+     * 定时任务 crm调用存储过程 同步客诉单-退款
+     * @throws OpenAPIException
+     */
+    public void autoCallAcceptOrder() throws OpenAPIException {
+        AcceptOrderController acceptOrderController=new AcceptOrderController();
+        acceptOrderController.addAcceptOrder();
+        System.out.println("===========crm调用存储过程 同步客诉单-退款 "+ DateUtils.getNowTime()+" ============" );
+        System.out.println("==================================");
+    }
+
+
+    /**
+     * 定时任务 crm调用存储过程 同步销售订单
+     * @throws OpenAPIException
+     */
+    public void autoCallSaleOrder() throws OpenAPIException {
+        controller.SaleOrder();
+        System.out.println("===========crm调用存储过程 同步销售订单 "+ DateUtils.getNowTime()+" ============" );
+        System.out.println("==================================");
+    }
+
+
+    /**
+     * 定时任务 crm调用存储过程 同步销售报价订单
+     * @throws OpenAPIException
+     */
+    public void autoCallSaleOrderBJ() throws OpenAPIException {
+        controller.SaleOrderBJ();
+        System.out.println("===========crm调用存储过程 同步销售报价订单 "+ DateUtils.getNowTime()+" ============" );
+        System.out.println("==================================");
+    }
+
+    /**
+     * 定时任务 crm调用存储过程 同步打样单
+     * @throws OpenAPIException
+     */
+    public void autoCallDYD() throws OpenAPIException {
+        controller.DYDOrder();
+        System.out.println("===========crm调用存储过程 同步打样单 "+ DateUtils.getNowTime()+" ============" );
+        System.out.println("==================================");
+    }
+
+    /**
+     * 定时任务 crm调用存储过程 同步送样单
+     * @throws OpenAPIException
+     */
+    public void autoCallSYD() throws OpenAPIException {
+        controller.SYDOrder();
+        System.out.println("===========crm调用存储过程 同步送样单 "+ DateUtils.getNowTime()+" ============" );
+        System.out.println("==================================");
+    }
+
+    /**
+     * 定时任务 crm调用存储过程 同步客诉单-抵扣
+     * @throws OpenAPIException
+     */
+    public void autoCallKSDDK() throws OpenAPIException {
+        controller.KSDOrder();
+        System.out.println("===========crm调用存储过程 同步客诉单-抵扣 "+ DateUtils.getNowTime()+" ============" );
+        System.out.println("==================================");
+    }
+
+    /**
+     * 定时任务 crm调用存储过程 同步客诉单-退货
+     * @throws OpenAPIException
+     */
+    public void autoCallKSDTH() throws OpenAPIException {
+        controller.KSDTHOrder();
+        System.out.println("===========crm调用存储过程 同步客诉单-退货 "+ DateUtils.getNowTime()+" ============" );
+        System.out.println("==================================");
+    }
+
 
 
     public static void main(String[] args) throws OpenAPIException {

+ 2 - 4
src/main/java/net/chenlin/dp/modules/api/controller/SaleOrderController.java

@@ -111,16 +111,14 @@ public class SaleOrderController {
      * 客诉单-抵扣
      */
     public  void KSDOrder() throws OpenAPIException {
-        service.getToaccount();
-        service.IKSDDKOrder();
+        service.CrmKSDDK();
     }
 
     /**
      * 客诉单-退货
      */
     public void KSDTHOrder() throws OpenAPIException {
-        service.getToaccount();
-        service.IKDSOrderTH();
+       service.CrmKSDTH();
     }
 
     /**

+ 1 - 0
src/main/java/net/chenlin/dp/modules/api/service/SaleOrderService.java

@@ -981,6 +981,7 @@ public class SaleOrderService {
     public static void main(String[] args) throws OpenAPIException {
         SaleOrderService service=new SaleOrderService();
         UserService service1=new UserService();
+
        // service1.login("","","test_yuansh");
         List<YonyouSaleOrder>list=new ArrayList<>();
 //