|
@@ -10,12 +10,17 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
|
import com.taobao.api.ApiException;
|
|
import com.taobao.api.ApiException;
|
|
import net.chenlin.dp.common.openapi4j.exception.OpenAPIException;
|
|
import net.chenlin.dp.common.openapi4j.exception.OpenAPIException;
|
|
import net.chenlin.dp.common.openapi4j.platform.ResultService;
|
|
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.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.controller.DingdingOpenInterface;
|
|
import net.chenlin.dp.modules.api.vo.Payrequest;
|
|
import net.chenlin.dp.modules.api.vo.Payrequest;
|
|
import net.chenlin.dp.modules.api.vo.SaleOrderRest;
|
|
import net.chenlin.dp.modules.api.vo.SaleOrderRest;
|
|
import net.chenlin.dp.modules.api.vo.YonyouMaterial;
|
|
import net.chenlin.dp.modules.api.vo.YonyouMaterial;
|
|
import net.chenlin.dp.modules.api.vo.YonyouSaleOrder;
|
|
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.*;
|
|
import java.util.*;
|
|
|
|
|
|
@@ -25,6 +30,7 @@ public class SaleOrderService {
|
|
private DingdingOpenInterface dingdingOpenInterface=new DingdingOpenInterface();
|
|
private DingdingOpenInterface dingdingOpenInterface=new DingdingOpenInterface();
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
private static String getToaccount="";
|
|
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();
|
|
OapiProcessinstanceCreateRequest.FormComponentValueVo fc7 = new OapiProcessinstanceCreateRequest.FormComponentValueVo();
|
|
fc7.setName("含税单价");
|
|
fc7.setName("含税单价");
|
|
- if(s.getTaxunitprice()!=null&&!s.getTaxunitprice().equals("")){
|
|
|
|
|
|
+ if(s.getTaxunitprice()!=null&&!s.getTaxunitprice().equals("0E-10")){
|
|
fc7.setValue(s.getTaxunitprice());
|
|
fc7.setValue(s.getTaxunitprice());
|
|
}else {
|
|
}else {
|
|
fc7.setValue("0");
|
|
fc7.setValue("0");
|
|
@@ -238,7 +261,7 @@ public class SaleOrderService {
|
|
|
|
|
|
OapiProcessinstanceCreateRequest.FormComponentValueVo fc8 = new OapiProcessinstanceCreateRequest.FormComponentValueVo();
|
|
OapiProcessinstanceCreateRequest.FormComponentValueVo fc8 = new OapiProcessinstanceCreateRequest.FormComponentValueVo();
|
|
fc8.setName("无税单价");
|
|
fc8.setName("无税单价");
|
|
- if(s.getUnitprice()!=null&&!s.getUnitprice().equals("")){
|
|
|
|
|
|
+ if(s.getUnitprice()!=null&&!s.getUnitprice().equals("0E-10")){
|
|
fc8.setValue(s.getUnitprice());
|
|
fc8.setValue(s.getUnitprice());
|
|
}else {
|
|
}else {
|
|
fc8.setValue("0");
|
|
fc8.setValue("0");
|
|
@@ -247,16 +270,16 @@ public class SaleOrderService {
|
|
|
|
|
|
OapiProcessinstanceCreateRequest.FormComponentValueVo fc9 = new OapiProcessinstanceCreateRequest.FormComponentValueVo();
|
|
OapiProcessinstanceCreateRequest.FormComponentValueVo fc9 = new OapiProcessinstanceCreateRequest.FormComponentValueVo();
|
|
fc9.setName("税率(%)");
|
|
fc9.setName("税率(%)");
|
|
- if(s.getTaxrate()!=null&&!s.getTaxrate().equals("")){
|
|
|
|
|
|
+ if(s.getTaxrate()!=null&&!s.getTaxrate().equals("0E-10")){
|
|
fc9.setValue(s.getTaxrate());
|
|
fc9.setValue(s.getTaxrate());
|
|
}else {
|
|
}else {
|
|
- fc9.setValue("暂无");
|
|
|
|
|
|
+ fc9.setValue("0");
|
|
}
|
|
}
|
|
mingxilist.add(fc9);
|
|
mingxilist.add(fc9);
|
|
|
|
|
|
OapiProcessinstanceCreateRequest.FormComponentValueVo fc10= new OapiProcessinstanceCreateRequest.FormComponentValueVo();
|
|
OapiProcessinstanceCreateRequest.FormComponentValueVo fc10= new OapiProcessinstanceCreateRequest.FormComponentValueVo();
|
|
fc10.setName("无税金额");
|
|
fc10.setName("无税金额");
|
|
- if(s.getMoney()!=null&&!s.getMoney().equals("")){
|
|
|
|
|
|
+ if(s.getMoney()!=null&&!s.getMoney().equals("0E-10")){
|
|
fc10.setValue(s.getMoney());
|
|
fc10.setValue(s.getMoney());
|
|
}else {
|
|
}else {
|
|
fc10.setValue("0");
|
|
fc10.setValue("0");
|
|
@@ -265,7 +288,7 @@ public class SaleOrderService {
|
|
|
|
|
|
OapiProcessinstanceCreateRequest.FormComponentValueVo fc11= new OapiProcessinstanceCreateRequest.FormComponentValueVo();
|
|
OapiProcessinstanceCreateRequest.FormComponentValueVo fc11= new OapiProcessinstanceCreateRequest.FormComponentValueVo();
|
|
fc11.setName("税额");
|
|
fc11.setName("税额");
|
|
- if (s.getTax()!=null&&!s.getTax().equals("")){
|
|
|
|
|
|
+ if (s.getTax()!=null&&!s.getTax().equals("0E-10")){
|
|
fc11.setValue(s.getTax());
|
|
fc11.setValue(s.getTax());
|
|
}else {
|
|
}else {
|
|
fc11.setValue("0");
|
|
fc11.setValue("0");
|
|
@@ -273,7 +296,7 @@ public class SaleOrderService {
|
|
mingxilist.add(fc11);
|
|
mingxilist.add(fc11);
|
|
OapiProcessinstanceCreateRequest.FormComponentValueVo fc12= new OapiProcessinstanceCreateRequest.FormComponentValueVo();
|
|
OapiProcessinstanceCreateRequest.FormComponentValueVo fc12= new OapiProcessinstanceCreateRequest.FormComponentValueVo();
|
|
fc12.setName("价税合计");
|
|
fc12.setName("价税合计");
|
|
- if(s.getSum()!=null&&!s.getSum().equals("")){
|
|
|
|
|
|
+ if(s.getSum()!=null&&!s.getSum().equals("0E-10")){
|
|
fc12.setValue(s.getSum());
|
|
fc12.setValue(s.getSum());
|
|
}else {
|
|
}else {
|
|
fc12.setValue("0");
|
|
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();
|
|
// 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<>();
|
|
// Map<String ,String>map=new HashMap<>();
|
|
// service.getToaccount();
|
|
// 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 saleOrderRest=new SaleOrderRest();
|
|
// saleOrderRest.setUser_id("demo");
|
|
// saleOrderRest.setUser_id("demo");
|
|
-// saleOrderRest.setAgree("1");
|
|
|
|
// saleOrderRest.setVoucher_code("XSDD210910004");
|
|
// 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");
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }
|
|
}
|
|
}
|