LG88888888 il y a 3 ans
Parent
commit
05afed992e

+ 24 - 0
pom.xml

@@ -45,6 +45,7 @@
         <servlet-version>3.1.0</servlet-version>
         <kaptcha-version>2.3.2</kaptcha-version>
         <jwt-version>0.9.0</jwt-version>
+        <oracle.driver.version>10.2.0.4.0</oracle.driver.version>
     </properties>
 
     <dependencies>
@@ -227,6 +228,29 @@
             <artifactId>jjwt</artifactId>
             <version>${jwt-version}</version>
         </dependency>
+
+        <dependency>
+                     <groupId>com.taobao.top</groupId>
+                     <artifactId>top-api-sdk-dev</artifactId>
+            <version>ding-open-mc-SNAPSHOT</version>
+                     <scope>system</scope>
+                     <systemPath>${pom.basedir}/doc/taobao-sdk-java-auto_1479188381469-20210817.jar</systemPath>
+                 </dependency>
+
+        <dependency>
+            <groupId>com.microsoft.sqlserver</groupId>
+            <artifactId>mssql-jdbc</artifactId>
+            <version>6.2.2.jre8</version>
+        </dependency>
+
+
+        <dependency>
+            <groupId>com.oracle</groupId>
+            <artifactId>ojdbc14</artifactId>
+            <version>${oracle.driver.version}</version>
+            <scope>system</scope>
+            <systemPath>${pom.basedir}/doc/ojdbc14-10.2.0.4.0.jar</systemPath>
+        </dependency>
     </dependencies>
 
 

+ 7 - 1
src/main/java/net/chenlin/dp/common/openapi4j/service/PurchaseOrderService.java

@@ -109,9 +109,15 @@ public class PurchaseOrderService extends BaseService {
     public JSONObject shenghe(String jsonBody, String to_account) throws OpenAPIException {
         JSONObject record;
         try {
+//            jsonBody="{\n" +
+//                    "\t\"purchaseorder\":{\n" +
+//                    "\t\t\"voucher_code\":\"CGDD210960002\",\n" +
+//                    "\t\t\"user_id\":\"demo\"\n" +
+//                    "\t}\n" +
+//                    "}";
             Map<String, String> paramMap = new HashMap();
             paramMap.put("to_account", to_account);
-            String url = this.createURL("purchaseorder/audit", paramMap);
+            String url = this.createURL("purchaseorder/verify", paramMap);
             logger.debug(url);
             String resultStr = HttpUtil.post(url, jsonBody);
             logger.debug(resultStr);

+ 30 - 1
src/main/java/net/chenlin/dp/common/openapi4j/service/SaleOrderService.java

@@ -64,9 +64,38 @@ public class SaleOrderService extends BaseService {
     public JSONObject shenghe(String jsonboy, String to_account) throws OpenAPIException {
         JSONObject record;
         try {
+//            jsonboy="{\n" +
+//                    "\t\"saleorder\":{\n" +
+//                    "\t\t\"voucher_code\":\"XSDD210910004\",\n" +
+//                    "\t\t\"user_id\":\"demo\",\n" +
+//                    "\t\t\"opinion\":\"同意\",\n" +
+//                    "\t\t\"agree\":\"1\"\n" +
+//                    "\t}\n" +
+//                    "}\n";
             Map<String, String> paramMap = new HashMap();
             paramMap.put("to_account", to_account);
-            String url = this.createURL("saleorder/audit", paramMap);
+            String url = this.createURL("saleorder/verify", paramMap);
+            logger.debug(url);
+            System.out.println(jsonboy);
+            String resultStr = HttpUtil.post(url, jsonboy);
+
+            logger.debug(resultStr);
+            JSONObject resultRecord = Record.parseObject(resultStr);
+            Thread.sleep(3000);
+            record = Record.parseObject(HttpUtil.get(resultRecord.getString("url")));
+        } catch (Exception e) {
+            throw new OpenAPIException(e.getMessage(), e);
+        }
+        return record;
+    }
+
+    //放弃审核
+    public JSONObject shengheQ(String jsonboy, String to_account) throws OpenAPIException {
+        JSONObject record;
+        try {
+            Map<String, String> paramMap = new HashMap();
+            paramMap.put("to_account", to_account);
+            String url = this.createURL("saleorder/unverify", paramMap);
             logger.debug(url);
             String resultStr = HttpUtil.post(url, jsonboy);
             logger.debug(resultStr);

+ 7 - 4
src/main/java/net/chenlin/dp/common/openapi4j/service/UserService.java

@@ -40,13 +40,16 @@ public class UserService extends BaseService {
 		JSONObject record;
 		try {
 			
-			String jsonBody = String.format("{{\"user\":{{\"user_id\":\"%s\",\"password\":\"%s\"}}}}"
-                    , userId
-                    , password);
+			String jsonBody ="{\n" +
+					"\t\"user\":{\n" +
+					"\t\t\"user_id\":\"demo\",\n" +
+					"\t\t\"password\":\"\"\n" +
+					"\t}\n" +
+					"}";
 			Map<String, String> paramMap = new HashMap();
 			paramMap.put("to_account", to_account);
 			
-			String url = this.createURL("user/login", paramMap);
+			String url = this.createURL("user/login_v2", paramMap);
 			logger.debug(url);
 			String resultStr = HttpUtil.post(url, jsonBody);
 			

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

@@ -3,6 +3,7 @@ package net.chenlin.dp.modules.api.controller;
 import com.taobao.api.ApiException;
 import net.chenlin.dp.common.openapi4j.exception.OpenAPIException;
 import net.chenlin.dp.modules.api.service.SaleOrderService;
+import net.chenlin.dp.modules.api.vo.SaleOrderRest;
 import net.chenlin.dp.modules.api.vo.YonyouSaleOrder;
 
 import java.util.HashMap;
@@ -34,15 +35,39 @@ public class SaleOrderController {
     }
 
 
-    public void saleOrderShenhe(){
+    /**
+     * 销售订单审批后返回u8
+     * @throws OpenAPIException
+     */
+    public void saleOrderShenhe() throws OpenAPIException {
         DingdingOpenInterface.getToken();
         List<String> orderIdList = dingdingOpenInterface.getOrderIdList("PROC-4B526252-017E-4531-91A0-4DEAC6883952");
         if (orderIdList!=null&&!orderIdList.equals("")){
           for (String id:orderIdList){
+              SaleOrderRest saleOrderRest=new SaleOrderRest();
               Map<String, Object> orderDetails = dingdingOpenInterface.getOrderDetails(id);
-              Object form_component_values = orderDetails.get("form_component_values");
+              Map<String, Object> map = DingdingOpenInterface.tableToMap(orderDetails);
+              saleOrderRest.setUser_id("");
+              Object code = map.get("单据编号");
+              saleOrderRest.setVoucher_code(code.toString());
+              Object result = orderDetails.get("result");
+              if (!result.equals("")&&result!=null){
+                  if (result.equals("agree")){
+                      saleOrderRest.setAgree("1");
+                  }if (result.equals("refuse")){
+                      saleOrderRest.setAgree("0");
+                  }
+                  service.yonyouShenheSaleOrder(saleOrderRest);
+              }
+
+              System.out.println(code+"-"+result);
           }
         }
     }
 
+    public static void main(String[] args) throws OpenAPIException, ApiException {
+        SaleOrderController saleOrderController=new SaleOrderController();
+       saleOrderController.dingSaleOrder();
+    }
+
 }

+ 13 - 6
src/main/java/net/chenlin/dp/modules/api/service/CustomerService.java

@@ -20,6 +20,13 @@ import java.util.Properties;
 public class CustomerService {
         private net.chenlin.dp.common.openapi4j.service.CustomerService customerService=new net.chenlin.dp.common.openapi4j.service.CustomerService();
 
+
+
+        public static String getToaccount;
+
+
+
+
     /**
      * 客户新增接口
      * @param customer
@@ -30,7 +37,7 @@ public class CustomerService {
             map.put("customer",customer);
             String s = JSONObject.toJSONString(map);
             try {
-                JSONObject add = customerService.add(s, getToaccount());
+                JSONObject add = customerService.add(s, getToaccount);
                 HashMap hashMap = JSONObject.parseObject(add.toString(), HashMap.class);
                 Object tradeid = hashMap.get("tradeid");
                 if (!tradeid.equals("")&&tradeid!=null){
@@ -52,7 +59,7 @@ public class CustomerService {
      */
     public Customer getCustomer(String id) throws OpenAPIException {
         try {
-            JSONObject jsonObject = customerService.get(id, getToaccount());
+            JSONObject jsonObject = customerService.get(id, getToaccount);
             HashMap hashMap = JSONObject.parseObject(jsonObject.toString(), HashMap.class);
             if (hashMap.get("errcode").equals("0")){
                 ObjectMapper objectMapper = new ObjectMapper();
@@ -74,7 +81,7 @@ public class CustomerService {
      * @throws OpenAPIException
      */
     public List<Customer>queryCustomer(Map<String,String>map) throws OpenAPIException {
-        map.put("to_account", getToaccount());
+        map.put("to_account", getToaccount);
         try {
             JSONObject jsonObject = customerService.batchGet(map);
             HashMap hashMap = JSONObject.parseObject(jsonObject.toString(), HashMap.class);
@@ -110,14 +117,14 @@ public class CustomerService {
     public void editCustomer(Map<String,Object>map) throws OpenAPIException {
         String s = JSONObject.toJSONString(map);
         try {
-            JSONObject edit = customerService.edit(s, getToaccount());
+            JSONObject edit = customerService.edit(s, getToaccount);
         }catch (Exception e){
             throw new OpenAPIException(e.getMessage(), e);
         }
     }
     //获取to_account
-    public String getToaccount(){
+    public void getToaccount(){
         Properties prop = PropUtil.getProperties("/config.properties");
-        return prop.getProperty("to_account");
+        getToaccount= prop.getProperty("to_account");
     }
 }

+ 29 - 7
src/main/java/net/chenlin/dp/modules/api/service/PayrequestService.java

@@ -14,6 +14,7 @@ import net.chenlin.dp.common.openapi4j.model.Record;
 import net.chenlin.dp.common.openapi4j.platform.TradeService;
 import net.chenlin.dp.common.openapi4j.service.BaseService;
 import net.chenlin.dp.common.openapi4j.service.CustomerService;
+import net.chenlin.dp.common.openapi4j.service.UserService;
 import net.chenlin.dp.common.openapi4j.util.HttpUtil;
 import net.chenlin.dp.common.openapi4j.util.PropUtil;
 import net.chenlin.dp.modules.api.controller.DingdingOpenInterface;
@@ -149,13 +150,21 @@ public class PayrequestService extends BaseService {
      * @return
      * @throws OpenAPIException
      */
-    public JSONObject shenghe(SaleOrderRest saleOrderRest) throws OpenAPIException {
+    public JSONObject shenghe() throws OpenAPIException {
         JSONObject record;
         try {
-            String s = JSONObject.toJSONString(saleOrderRest);
             Map<String, String> paramMap = new HashMap();
+            String s = "{\n" +
+                    "\t\"payrequest\":{\n" +
+                    "\t\t\"voucher_code\":\"0000000001\",\n" +
+                    "\t\t\"user_id\":\"00001\",\n" +
+                    "\t\t\"opinion\":\"同意\",\n" +
+                    "\t\t\"agree\":\"1\"\n" +
+                    "\t}\n" +
+                    "}";
+
             paramMap.put("to_account", getToaccount);
-            String url = this.createURL("payrequestlist/audit", paramMap);
+            String url = this.createURL("payrequest/audit", paramMap);
             logger.debug(url);
             String resultStr = HttpUtil.post(url, s);
             logger.debug(resultStr);
@@ -216,7 +225,7 @@ public class PayrequestService extends BaseService {
 
             OapiProcessinstanceCreateRequest.FormComponentValueVo fc3 = new OapiProcessinstanceCreateRequest.FormComponentValueVo();
             fc3.setName("结算方式");
-            if (so.getCssname()!=null&&!so.getCssname().equals("")){
+            if (so.getCssname()!=null&&!so.getCssname().equals("0E-10")){
                 fc3.setValue(so.getCssname());
             }else {
                 fc3.setValue("暂无");
@@ -261,7 +270,7 @@ public class PayrequestService extends BaseService {
 
                 OapiProcessinstanceCreateRequest.FormComponentValueVo fc8 = new OapiProcessinstanceCreateRequest.FormComponentValueVo();
                 fc8.setName("存货数量");
-                if (s.getIapplyamt_s()!=null&&!s.getIapplyamt_s().equals("")){
+                if (s.getIapplyamt_s()!=null&&!s.getIapplyamt_s().equals("0E-10")){
                     fc8.setValue(s.getIapplyamt_s());
                 }else {
                     fc8.setValue("0");
@@ -269,7 +278,7 @@ public class PayrequestService extends BaseService {
                 mingxilist.add(fc8);
                 OapiProcessinstanceCreateRequest.FormComponentValueVo fc9 = new OapiProcessinstanceCreateRequest.FormComponentValueVo();
                 fc9.setName("单价");
-                if (s.getInattaxprice()!=null&&!s.getInattaxprice().equals("")){
+                if (s.getInattaxprice()!=null&&!s.getInattaxprice().equals("0E-10")){
                     fc9.setValue(s.getInattaxprice());
                 }else {
                     fc9.setValue("0");
@@ -278,7 +287,7 @@ public class PayrequestService extends BaseService {
 
                 OapiProcessinstanceCreateRequest.FormComponentValueVo fc10= new OapiProcessinstanceCreateRequest.FormComponentValueVo();
                 fc10.setName("金额");
-                if (s.getIapplyamt()!=null&&!s.getIapplyamt().equals("")){
+                if (s.getIapplyamt()!=null&&!s.getIapplyamt().equals("0E-10")){
                     fc10.setValue(s.getIapplyamt());
                     BigDecimal b=new BigDecimal(s.getIapplyamt());
                     BigDecimal add = a.add(b);
@@ -315,4 +324,17 @@ public class PayrequestService extends BaseService {
         getToaccount= prop.getProperty("to_account");
 
     }
+
+
+    public static void main(String[] args) throws OpenAPIException {
+        PayrequestService payrequestService=new PayrequestService();
+        payrequestService.getToaccount();
+        SaleOrderRest saleOrderRest=new SaleOrderRest();
+        UserService userService=new UserService();
+        JSONObject login = userService.login("demo", "", PayrequestService.getToaccount);
+        saleOrderRest.setUser_id("demo");
+        saleOrderRest.setVoucher_code("0000000001");
+        saleOrderRest.setAgree("1");
+        payrequestService.shenghe();
+    }
 }

+ 19 - 8
src/main/java/net/chenlin/dp/modules/api/service/PurchaseOrderService.java

@@ -117,7 +117,7 @@ public class PurchaseOrderService {
      */
     public void yonyouShenhePurchaseOrder(SaleOrderRest saleOrderRest) throws OpenAPIException {
         Map<String,Object>map=new HashMap<>();
-        map.put("saleorder",saleOrderRest);
+        map.put("purchaseorder",saleOrderRest);
         try {
             String s = JSONObject.toJSONString(map);
             JSONObject shenghe = purchaseOrderService.shenghe(s, getToaccount);
@@ -239,7 +239,7 @@ public class PurchaseOrderService {
 
                 OapiProcessinstanceCreateRequest.FormComponentValueVo fo = new OapiProcessinstanceCreateRequest.FormComponentValueVo();
                 fo.setName("数量");
-                if (s.getQuantity()!=null&&!s.getQuantity().equals("")){
+                if (s.getQuantity()!=null&&!s.getQuantity().equals("0E-10")){
                     fo.setValue(s.getQuantity());
                 }else {
                     fo.setValue("0");
@@ -248,7 +248,7 @@ public class PurchaseOrderService {
 
                 OapiProcessinstanceCreateRequest.FormComponentValueVo fc7 = new OapiProcessinstanceCreateRequest.FormComponentValueVo();
                 fc7.setName("含税单价");
-                if (s.getTax()!=null&&!s.getTax().equals("")){
+                if (s.getTax()!=null&&!s.getTax().equals("0E-10")){
                     fc7.setValue(s.getTax());
                 }else {
                     fc7.setValue("0");
@@ -257,7 +257,7 @@ public class PurchaseOrderService {
 
                 OapiProcessinstanceCreateRequest.FormComponentValueVo fc8 = new OapiProcessinstanceCreateRequest.FormComponentValueVo();
                 fc8.setName("无税单价");
-                if (s.getPrice()!=null&&!s.getPrice().equals("")){
+                if (s.getPrice()!=null&&!s.getPrice().equals("0E-10")){
                     fc8.setValue(s.getPrice());
                 }else {
                     fc8.setValue("0");
@@ -266,7 +266,7 @@ public class PurchaseOrderService {
 
                 OapiProcessinstanceCreateRequest.FormComponentValueVo fc9 = new OapiProcessinstanceCreateRequest.FormComponentValueVo();
                 fc9.setName("税率");
-                if (s.getTaxrate()!=null&&!s.getTaxrate().equals("")){
+                if (s.getTaxrate()!=null&&!s.getTaxrate().equals("0E-10")){
                     fc9.setValue(s.getTaxrate());
                 }else {
                     fc9.setValue("暂无");
@@ -275,7 +275,7 @@ public class PurchaseOrderService {
 
                 OapiProcessinstanceCreateRequest.FormComponentValueVo fc10= new OapiProcessinstanceCreateRequest.FormComponentValueVo();
                 fc10.setName("无税金额");
-                if (s.getMoney()!=null&&!s.getMoney().equals("")){
+                if (s.getMoney()!=null&&!s.getMoney().equals("0E-10")){
                     fc10.setValue(s.getMoney());
                 }else {
                     fc10.setValue("0");
@@ -284,7 +284,7 @@ public class PurchaseOrderService {
 
                 OapiProcessinstanceCreateRequest.FormComponentValueVo fc11= new OapiProcessinstanceCreateRequest.FormComponentValueVo();
                 fc11.setName("税额");
-                if (s.getNattax()!=null&&!s.getNattax().equals("")){
+                if (s.getNattax()!=null&&!s.getNattax().equals("0E-10")){
                     fc11.setValue(s.getNattax());
                 }else {
                     fc11.setValue("0");
@@ -294,7 +294,7 @@ public class PurchaseOrderService {
 
                 OapiProcessinstanceCreateRequest.FormComponentValueVo fc12= new OapiProcessinstanceCreateRequest.FormComponentValueVo();
                 fc12.setName("价税合计");
-                if (s.getSum()!=null&&!s.getSum().equals("")){
+                if (s.getSum()!=null&&!s.getSum().equals("0E-10")){
                     fc12.setValue(s.getSum());
                 }else {
                     fc12.setValue("0");
@@ -322,4 +322,15 @@ public class PurchaseOrderService {
             System.out.println(rsp.getBody());
         }
     }
+
+
+    public static void main(String[] args) throws OpenAPIException {
+        PurchaseOrderService purchaseOrderService=new PurchaseOrderService();
+        net.chenlin.dp.common.openapi4j.service.PurchaseOrderService p=new net.chenlin.dp.common.openapi4j.service.PurchaseOrderService();
+      purchaseOrderService.getToaccount();
+      SaleOrderRest saleOrderRest=new SaleOrderRest();
+      saleOrderRest.setUser_id("demo");
+      saleOrderRest.setVoucher_code("CGDD210960002");
+      purchaseOrderService.yonyouShenhePurchaseOrder(saleOrderRest);
+    }
 }

+ 44 - 14
src/main/java/net/chenlin/dp/modules/api/service/SaleOrderService.java

@@ -10,12 +10,17 @@ import com.fasterxml.jackson.databind.ObjectMapper;
 import com.taobao.api.ApiException;
 import net.chenlin.dp.common.openapi4j.exception.OpenAPIException;
 import net.chenlin.dp.common.openapi4j.platform.ResultService;
+import net.chenlin.dp.common.openapi4j.service.UserService;
 import net.chenlin.dp.common.openapi4j.util.PropUtil;
+import net.chenlin.dp.common.support.orm.db.DynamicDataSource;
+import net.chenlin.dp.common.utils.JdbcUtils;
 import net.chenlin.dp.modules.api.controller.DingdingOpenInterface;
 import net.chenlin.dp.modules.api.vo.Payrequest;
 import net.chenlin.dp.modules.api.vo.SaleOrderRest;
 import net.chenlin.dp.modules.api.vo.YonyouMaterial;
 import net.chenlin.dp.modules.api.vo.YonyouSaleOrder;
+import net.chenlin.dp.modules.sys.service.SysUserService;
+import net.chenlin.dp.modules.sys.service.impl.SysUserServiceImpl;
 
 import java.util.*;
 
@@ -25,6 +30,7 @@ public class SaleOrderService {
     private DingdingOpenInterface dingdingOpenInterface=new DingdingOpenInterface();
 
 
+
     private  static  String getToaccount="";
 
     /**
@@ -129,6 +135,23 @@ public class SaleOrderService {
     }
 
 
+    /**
+     * 销售订单放弃审核
+     */
+    public void yonyouShenheQSaleOrder(SaleOrderRest saleOrderRest) throws OpenAPIException {
+        Map<String,Object>map=new HashMap<>();
+        map.put("saleorder",saleOrderRest);
+        try {
+            String s = JSONObject.toJSONString(map);
+            JSONObject shenghe = saleOrderService.shengheQ(s, getToaccount);
+            System.out.println(shenghe);
+        }catch (Exception e){
+            throw new OpenAPIException(e.getMessage(), e);
+        }
+
+    }
+
+
 
 
     /**
@@ -229,7 +252,7 @@ public class SaleOrderService {
 
                 OapiProcessinstanceCreateRequest.FormComponentValueVo fc7 = new OapiProcessinstanceCreateRequest.FormComponentValueVo();
                 fc7.setName("含税单价");
-                if(s.getTaxunitprice()!=null&&!s.getTaxunitprice().equals("")){
+                if(s.getTaxunitprice()!=null&&!s.getTaxunitprice().equals("0E-10")){
                     fc7.setValue(s.getTaxunitprice());
                 }else {
                     fc7.setValue("0");
@@ -238,7 +261,7 @@ public class SaleOrderService {
 
                 OapiProcessinstanceCreateRequest.FormComponentValueVo fc8 = new OapiProcessinstanceCreateRequest.FormComponentValueVo();
                 fc8.setName("无税单价");
-                if(s.getUnitprice()!=null&&!s.getUnitprice().equals("")){
+                if(s.getUnitprice()!=null&&!s.getUnitprice().equals("0E-10")){
                     fc8.setValue(s.getUnitprice());
                 }else {
                     fc8.setValue("0");
@@ -247,16 +270,16 @@ public class SaleOrderService {
 
                 OapiProcessinstanceCreateRequest.FormComponentValueVo fc9 = new OapiProcessinstanceCreateRequest.FormComponentValueVo();
                 fc9.setName("税率(%)");
-                if(s.getTaxrate()!=null&&!s.getTaxrate().equals("")){
+                if(s.getTaxrate()!=null&&!s.getTaxrate().equals("0E-10")){
                     fc9.setValue(s.getTaxrate());
                 }else {
-                    fc9.setValue("暂无");
+                    fc9.setValue("0");
                 }
                 mingxilist.add(fc9);
 
                 OapiProcessinstanceCreateRequest.FormComponentValueVo fc10= new OapiProcessinstanceCreateRequest.FormComponentValueVo();
                 fc10.setName("无税金额");
-                if(s.getMoney()!=null&&!s.getMoney().equals("")){
+                if(s.getMoney()!=null&&!s.getMoney().equals("0E-10")){
                     fc10.setValue(s.getMoney());
                 }else {
                     fc10.setValue("0");
@@ -265,7 +288,7 @@ public class SaleOrderService {
 
                 OapiProcessinstanceCreateRequest.FormComponentValueVo fc11= new OapiProcessinstanceCreateRequest.FormComponentValueVo();
                 fc11.setName("税额");
-                if (s.getTax()!=null&&!s.getTax().equals("")){
+                if (s.getTax()!=null&&!s.getTax().equals("0E-10")){
                     fc11.setValue(s.getTax());
                 }else {
                     fc11.setValue("0");
@@ -273,7 +296,7 @@ public class SaleOrderService {
                 mingxilist.add(fc11);
                 OapiProcessinstanceCreateRequest.FormComponentValueVo fc12= new OapiProcessinstanceCreateRequest.FormComponentValueVo();
                 fc12.setName("价税合计");
-                if(s.getSum()!=null&&!s.getSum().equals("")){
+                if(s.getSum()!=null&&!s.getSum().equals("0E-10")){
                     fc12.setValue(s.getSum());
                 }else {
                     fc12.setValue("0");
@@ -311,18 +334,25 @@ public class SaleOrderService {
     }
 
 
-//    public static void main(String[] args) throws OpenAPIException {
+    public static void main(String[] args) throws OpenAPIException {
 //        SaleOrderService service=new SaleOrderService();
+//        UserService userService=new UserService();
+//        net.chenlin.dp.common.openapi4j.service.SaleOrderService saleOrderService=new net.chenlin.dp.common.openapi4j.service.SaleOrderService();
 //        Map<String ,String>map=new HashMap<>();
 //        service.getToaccount();
-//        List<YonyouSaleOrder> list = service.yonyouQuerySaleOrder(map);
-//        YonyouSaleOrder yonyouSaleOrder = service.yonyouGetSaleOrder(list.get(0).getCode());
+//        JSONObject login = userService.login("", "", SaleOrderService.getToaccount);
+//        System.out.println(login);
 //        SaleOrderRest saleOrderRest=new SaleOrderRest();
 //		saleOrderRest.setUser_id("demo");
-//		saleOrderRest.setAgree("1");
 //		saleOrderRest.setVoucher_code("XSDD210910004");
-//		service.yonyouShenheSaleOrder(saleOrderRest);
-//        System.out.println(yonyouSaleOrder);
 //
-//    }
+//        DynamicDataSource.setDataSource("slaveDataSource");
+//		service.yonyouShenheSaleOrder(saleOrderRest);
+
+        //JdbcUtils jdbcUtils=new JdbcUtils("com.microsoft.sqlserver.jdbc.SQLServerDriver","jdbc:sqlserver://10.0.0.199:1433;DatabaseName=UFDATA_998_2021","sa","123@qaz");
+
+       // JdbcUtils jdbcUtils=new JdbcUtils("oracle.jdbc.driver.OracleDriver","jdbc:oracle:thin:@139.196.93.8:1521:gxhq","icappx","1");
+
+
+    }
 }