配置更新和优化,以及操作员ID的参数化

更新了系统配置以优化性能并确保安全。操作员ID现通过OverallConstant类配置,并在包括ConsignmachiningIn、ConsignmachiningInReturn、ProxyPurchaseReturn、ProxyPurchaseWarehous和SoSaleOutPluginInitializerToB在内的多个模块中实现了参数化。
This commit is contained in:
liuy 2024-09-11 16:55:57 +08:00
parent 512fa7c888
commit e1fa2074c3
13 changed files with 139 additions and 106 deletions

View File

@ -26,7 +26,6 @@ public class OverallConstant {
}
private static void loadPublic() {
//存货分类
prodOverPublic.put("bdinvSaveCode", "8000370025");//存货分类新增
prodOverPublic.put("bdinvUpdateCode", "8000370026");//存货分类修改
@ -53,9 +52,6 @@ public class OverallConstant {
prodOverPublic.put("otherinqzCode", "8000370007");//库存其他入库保存即签字
prodOverPublic.put("otheroutqzCode", "8000370008");//库存其他出库保存即签字
prodOverPublic.put("custdocSaveCode", "8000370062");//客商档案新增
prodOverPublic.put("custdocSave", "/u8cloud/api/uapbd/custdoc/insert");//客商档案新增
prodOverPublic.put("custdocQuery", "/u8cloud/api/uapbd/custdoc/query");//客商档案查询
@ -68,7 +64,9 @@ public class OverallConstant {
prodOverPublic.put("bddefdoclistsaveCode", "8000370061");//自定义档案内容查询
prodOverPublic.put("bddefdoclistsave", "/u8cloud/api/uapbd/bddefdoc/insert");//自定义档案内容查询
prodOverPublic.put("appId", "800037");//数智中台
prodOverPublic.put("publicKey", "ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj");//数智中台
prodOverPublic.put("secretKey", "fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=");//数智中台
}
private static void loadDev() {
@ -88,13 +86,31 @@ public class OverallConstant {
devOverAll.put("u8cApiNeedStackTraceCode", "Y");
devOverAll.put("u8cApiZdrCode", "tbadmin");//单据制单人---测试环境tbadmin
//中台地址
devOverAll.put("u8c_url", "http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface");
}
private static void loadProd() {
devOverAll.put("u8cApiUrl", "http://192.168.10.118:9099");//测试U8C
//主键
devOverAll.put("u8cApiUsercodePK", "admin");
devOverAll.put("u8cApiPasswordPK", "83f1ad3e7fa3617f1aae62ae7413c810");
devOverAll.put("u8cApiTrantypePK", "pk");
devOverAll.put("u8cApiSystemPK", "lz");
devOverAll.put("u8cApiNeedStackTracePK", "N");
devOverAll.put("u8cApiZdrPK", "TB_NEW100000000004OP");//单据制单人---测试环境tbadmin
//编码
devOverAll.put("u8cApiUsercodeCode", "admin1");
devOverAll.put("u8cApiPasswordCode", "83f1ad3e7fa3617f1aae62ae7413c810");
devOverAll.put("u8cApiTrantypeCode", "code");
devOverAll.put("u8cApiSystemCode", "lz1");
devOverAll.put("u8cApiNeedStackTraceCode", "N");
devOverAll.put("u8cApiZdrCode", "tbadmin");//单据制单人---测试环境tbadmin
//中台地址
devOverAll.put("u8c_url", "http://127.0.0.1:8081/kangarooDataCenterV3/entranceController/externalCallInterface");
}
/**

View File

@ -25,9 +25,9 @@ public class ProfilesActiveConstant {
public static final String TYPE_OTHER = "other";
public static final String U8C_URL = "http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface";
//public static final String U8C_URL = "http://ufidahz.com.cn:9067/kangarooDataCenterV3/entranceController/externalCallInterface";
public static final String OFS_URL_TEST = "http://39.98.58.229/api/edi/ofs/in";
// public static final String U8C_URL = "http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface";
//public static final String U8C_URL = "http://ufidahz.com.cn:9067/kangarooDataCenterV3/entranceController/externalCallInterface";
// public static final String OFS_URL_TEST = "http://39.98.58.229/api/edi/ofs/in";
public static final String SUPPLIER = "'1','3'";

View File

@ -8,6 +8,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.beanutil.BeanUtil;
import com.hzya.frame.plugin.lets.constant.OverallConstant;
import com.hzya.frame.plugin.lets.constant.ProfilesActiveConstant;
import com.hzya.frame.plugin.lets.dao.*;
import com.hzya.frame.plugin.lets.entity.*;
@ -379,7 +380,7 @@ public class ConsignmachiningIn extends PluginBaseEntity {
ScorderHeadDto poOrderParentDto = new ScorderHeadDto();
poOrderParentDto.setPk_corp(bdCorpEntity.getPkCorp());
poOrderParentDto.setCbiztype(bdBusitypeEntity.getPkBusitype());
poOrderParentDto.setCoperator("0001A110000000000U3D");
poOrderParentDto.setCoperator(OverallConstant.getOverAllValue("u8cApiZdrPK"));
poOrderParentDto.setCpurorganization(bdPurorgEntity.getPkPurorg());
poOrderParentDto.setCgiveinvoicevendor(bdCumandocEntity.getPkCumandoc());
poOrderParentDto.setCvendormangid(bdCumandocEntity.getPkCumandoc());
@ -877,13 +878,14 @@ public class ConsignmachiningIn extends PluginBaseEntity {
*/
public ScOrderResultDto sendU8cScorder(String param) throws Exception {
long startLong = System.currentTimeMillis();
logger.info("U8C委外订单推送开始推送参数" + param + ",U8C_URL:" + ProfilesActiveConstant.U8C_URL);
String result = HttpRequest.post(ProfilesActiveConstant.U8C_URL).header("appId", "800037")//头信息多个头信息多次调用此方法即可
.header("usercode", "admin").header("password", "21232f297a57a5a743894a0e4a801fc3").header("system", "lz").header("trantype", "PK").header("apiCode", "8000370037")//头信息多个头信息多次调用此方法即可
.header("publicKey", "ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj")//头信息多个头信息多次调用此方法即可
.header("secretKey", "fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//头信息多个头信息多次调用此方法即可
logger.info("U8C委外订单推送开始推送参数" + param + ",U8C_URL:" + OverallConstant.getOverAllValue("u8c_url"));
String apiCode = "8000370037";
String result = HttpRequest.post(OverallConstant.getOverAllValue("u8c_url")).header("appId", OverallConstant.getOverAllValue("appId"))//头信息多个头信息多次调用此方法即可
.header("usercode", OverallConstant.getOverAllValue("u8cApiUsercodePK")).header("password", OverallConstant.getOverAllValue("u8cApiPasswordPK")).header("system", OverallConstant.getOverAllValue("u8cApiSystemPK")).header("trantype", OverallConstant.getOverAllValue("u8cApiTrantypePK")).header("apiCode", apiCode)//头信息多个头信息多次调用此方法即可
.header("publicKey", OverallConstant.getOverAllValue("publicKey"))//头信息多个头信息多次调用此方法即可
.header("secretKey", OverallConstant.getOverAllValue("secretKey"))//头信息多个头信息多次调用此方法即可
.body(param)//表单内容
.timeout(20000)//超时毫秒
.timeout(600000)//超时毫秒
.execute().body();
logger.info("U8C委外订单推送结束返回参数" + result);
long endLong = System.currentTimeMillis();

View File

@ -260,7 +260,7 @@ public class ConsignmachiningIn extends PluginBaseEntity {
//委外入库表头
ConsignmachiningInHeadDto poOrderParentDto = new ConsignmachiningInHeadDto();
poOrderParentDto.setPk_corp(bdCorpEntity.getPkCorp());
poOrderParentDto.setCoperatorid("0001A110000000000U3D");
poOrderParentDto.setCoperatorid(OverallConstant.getOverAllValue("u8cApiZdrPK"));
poOrderParentDto.setCwarehouseid(bdStordocEntity.getPkStordoc());
poOrderParentDto.setPk_calbody(bdCalbodyEntity.getPkCalbody());
poOrderParentDto.setCbiztype(bdBusitypeEntity.getPkBusitype());

View File

@ -256,7 +256,7 @@
// ScorderHeadDto scorderHeadDto = new ScorderHeadDto();
// scorderHeadDto.setPk_corp(bdCorpEntity.getPkCorp());
// scorderHeadDto.setCbiztype(bdBusitypeEntity1.getPkBusitype());
// scorderHeadDto.setCoperator("0001A110000000000U3D");
// scorderHeadDto.setCoperator(OverallConstant.getOverAllValue("u8cApiZdrPK"));
// scorderHeadDto.setCpurorganization(bdPurorgEntity.getPkPurorg());
// scorderHeadDto.setCvendormangid(bdCumandocEntity.getPkCumandoc());
// scorderHeadDto.setCwareid(bdCalbodyEntity.getPkCalbody());

View File

@ -8,6 +8,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.beanutil.BeanUtil;
import com.hzya.frame.plugin.lets.constant.OverallConstant;
import com.hzya.frame.plugin.lets.constant.ProfilesActiveConstant;
import com.hzya.frame.plugin.lets.dao.*;
import com.hzya.frame.plugin.lets.entity.*;
@ -368,7 +369,7 @@ public class ConsignmachiningInReturn extends PluginBaseEntity {
//委外入库表头
ConsignmachiningInHeadDto poOrderParentDto = new ConsignmachiningInHeadDto();
poOrderParentDto.setPk_corp(bdCorpEntity.getPkCorp());
poOrderParentDto.setCoperatorid("0001A110000000000U3D");
poOrderParentDto.setCoperatorid(OverallConstant.getOverAllValue("u8cApiZdrPK"));
poOrderParentDto.setCwarehouseid(bdStordocEntity.getPkStordoc());
poOrderParentDto.setPk_calbody(bdCalbodyEntity.getPkCalbody());
poOrderParentDto.setCbiztype(bdBusitypeEntity.getPkBusitype());
@ -745,13 +746,14 @@ public class ConsignmachiningInReturn extends PluginBaseEntity {
*/
public IcGeneralHResultDto sendU8cScorder(String param) throws Exception {
long startLong = System.currentTimeMillis();
logger.info("U8C委外订单推送开始推送参数" + param + ",U8C_URL:" + ProfilesActiveConstant.U8C_URL);
String result = HttpRequest.post(ProfilesActiveConstant.U8C_URL).header("appId", "800037")//头信息多个头信息多次调用此方法即可
.header("usercode", "admin").header("password", "21232f297a57a5a743894a0e4a801fc3").header("system", "lz").header("trantype", "PK").header("apiCode", "8000370037")//头信息多个头信息多次调用此方法即可
logger.info("U8C委外订单推送开始推送参数" + param + ",U8C_URL:" + OverallConstant.getOverAllValue("u8c_url"));
String apiCode = "8000370037";
String result = HttpRequest.post(OverallConstant.getOverAllValue("u8c_url")).header("appId", "800037")//头信息多个头信息多次调用此方法即可
.header("usercode", "admin").header("password", "21232f297a57a5a743894a0e4a801fc3").header("system", "lz").header("trantype", "PK").header("apiCode", apiCode)//头信息多个头信息多次调用此方法即可
.header("publicKey", "ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj")//头信息多个头信息多次调用此方法即可
.header("secretKey", "fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//头信息多个头信息多次调用此方法即可
.body(param)//表单内容
.timeout(20000)//超时毫秒
.timeout(600000)//超时毫秒
.execute().body();
logger.info("U8C委外订单推送结束返回参数" + result);
long endLong = System.currentTimeMillis();
@ -1053,13 +1055,14 @@ public class ConsignmachiningInReturn extends PluginBaseEntity {
*/
public IcGeneralHResultDto sendU8cConsignmachiningIn(String param) throws Exception {
long startLong = System.currentTimeMillis();
logger.info("U8C委外入库推送开始推送参数" + param + ",U8C_URL:" + ProfilesActiveConstant.U8C_URL);
String result = HttpRequest.post(ProfilesActiveConstant.U8C_URL).header("appId", "800037")//头信息多个头信息多次调用此方法即可
.header("usercode", "admin").header("password", "21232f297a57a5a743894a0e4a801fc3").header("system", "lz").header("trantype", "PK").header("apiCode", "8000370056")//头信息多个头信息多次调用此方法即可
.header("publicKey", "ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj")//头信息多个头信息多次调用此方法即可
.header("secretKey", "fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//头信息多个头信息多次调用此方法即可
logger.info("U8C委外入库推送开始推送参数" + param + ",U8C_URL:" + OverallConstant.getOverAllValue("u8c_url"));
String apiCode = "8000370056";
String result = HttpRequest.post(OverallConstant.getOverAllValue("u8c_url")).header("appId", OverallConstant.getOverAllValue("appId"))//头信息多个头信息多次调用此方法即可
.header("usercode", OverallConstant.getOverAllValue("u8cApiUsercodePK")).header("password", OverallConstant.getOverAllValue("u8cApiPasswordPK")).header("system", OverallConstant.getOverAllValue("u8cApiSystemPK")).header("trantype", OverallConstant.getOverAllValue("u8cApiTrantypePK")).header("apiCode", apiCode)//头信息多个头信息多次调用此方法即可
.header("publicKey", OverallConstant.getOverAllValue("publicKey"))//头信息多个头信息多次调用此方法即可
.header("secretKey", OverallConstant.getOverAllValue("secretKey"))//头信息多个头信息多次调用此方法即可
.body(param)//表单内容
.timeout(20000)//超时毫秒
.timeout(600000)//超时毫秒
.execute().body();
logger.info("U8C委外入库推送结束返回参数" + result);
long endLong = System.currentTimeMillis();

View File

@ -8,6 +8,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.beanutil.BeanUtil;
import com.hzya.frame.plugin.lets.constant.OverallConstant;
import com.hzya.frame.plugin.lets.constant.ProfilesActiveConstant;
import com.hzya.frame.plugin.lets.dao.*;
import com.hzya.frame.plugin.lets.entity.*;
@ -410,7 +411,7 @@ public class ProxyPurchaseReturn extends PluginBaseEntity {
poOrderParentDto.setBreturn(true);//确认退货
poOrderParentDto.setCbiztype(bdBusitypeEntity.getPkBusitype());//业务流程
poOrderParentDto.setCdeptid(bdDeptdocEntity.getPkDeptdoc());//采购部门
poOrderParentDto.setCoperator("0001A110000000000U3D");//制单人
poOrderParentDto.setCoperator(OverallConstant.getOverAllValue("u8cApiZdrPK"));//制单人
poOrderParentDto.setCpurorganization(bdPurorgEntity.getPkPurorg());//采购组织
poOrderParentDto.setPk_corp(bdCorpEntity.getPkCorp());//采购公司
poOrderParentDto.setCvendormangid(bdCumandocEntity.getPkCumandoc());//供应商管理档案
@ -465,7 +466,7 @@ public class ProxyPurchaseReturn extends PluginBaseEntity {
poOrderChildrenDto.setCwarehouseid(bdStordocEntity.getPkStordoc());//收货仓库
poOrderChildrenDto.setPk_reqcorp(bdCorpEntity.getPkCorp());//需求公司 *
// poOrderChildrenDto.setIisreplenish(false);//补货标识 *
poOrderChildrenDto.setCoperator("0001A110000000000U3D");//操作员id
poOrderChildrenDto.setCoperator(OverallConstant.getOverAllValue("u8cApiZdrPK"));//操作员id
// poOrderChildrenDto.setBreceiveplan(false);//存在到货计划
poOrderChildrenDtoList.add(poOrderChildrenDto);
@ -860,13 +861,14 @@ public class ProxyPurchaseReturn extends PluginBaseEntity {
*/
public PoOrderHeadBodyDto sendU8CPoOrder(String param) throws Exception {
long startLong = System.currentTimeMillis();
logger.info("代理品牌采购推送开始,推送参数:" + param + ",U8C_URL:" + ProfilesActiveConstant.U8C_URL);
String result = HttpRequest.post(ProfilesActiveConstant.U8C_URL).header("appId", "800037")//头信息多个头信息多次调用此方法即可
.header("usercode", "admin").header("password", "21232f297a57a5a743894a0e4a801fc3").header("system", "lz").header("trantype", "PK").header("apiCode", "8000370004")//头信息多个头信息多次调用此方法即可
.header("publicKey", "ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj")//头信息多个头信息多次调用此方法即可
.header("secretKey", "fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//头信息多个头信息多次调用此方法即可
logger.info("代理品牌采购推送开始,推送参数:" + param + ",U8C_URL:" + OverallConstant.getOverAllValue("u8c_url"));
String apiCode = "8000370004";
String result = HttpRequest.post(OverallConstant.getOverAllValue("u8c_url")).header("appId", OverallConstant.getOverAllValue("appId"))//头信息多个头信息多次调用此方法即可
.header("usercode", OverallConstant.getOverAllValue("u8cApiUsercodePK")).header("password", OverallConstant.getOverAllValue("u8cApiPasswordPK")).header("system", OverallConstant.getOverAllValue("u8cApiSystemPK")).header("trantype", OverallConstant.getOverAllValue("u8cApiTrantypePK")).header("apiCode", apiCode)//头信息多个头信息多次调用此方法即可
.header("publicKey", OverallConstant.getOverAllValue("publicKey"))//头信息多个头信息多次调用此方法即可
.header("secretKey", OverallConstant.getOverAllValue("secretKey"))//头信息多个头信息多次调用此方法即可
.body(param)//表单内容
.timeout(20000)//超时毫秒
.timeout(600000)//超时毫秒
.execute().body();
logger.info("代理品牌采购推送结束,返回参数:" + result);
long endLong = System.currentTimeMillis();

View File

@ -8,6 +8,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.beanutil.BeanUtil;
import com.hzya.frame.plugin.lets.constant.OverallConstant;
import com.hzya.frame.plugin.lets.constant.ProfilesActiveConstant;
import com.hzya.frame.plugin.lets.dao.*;
import com.hzya.frame.plugin.lets.entity.*;
@ -400,7 +401,7 @@ public class ProxyPurchaseWarehous extends PluginBaseEntity {
PoOrderParentDto poOrderParentDto = new PoOrderParentDto();
poOrderParentDto.setCbiztype(bdBusitypeEntity.getPkBusitype());//业务流程
poOrderParentDto.setCdeptid(bdDeptdocEntity.getPkDeptdoc());//采购部门
poOrderParentDto.setCoperator("0001A110000000000U3D");//制单人
poOrderParentDto.setCoperator(OverallConstant.getOverAllValue("u8cApiZdrPK"));//制单人
poOrderParentDto.setCpurorganization(bdPurorgEntity.getPkPurorg());//采购组织
poOrderParentDto.setPk_corp(bdCorpEntity.getPkCorp());//采购公司
poOrderParentDto.setCvendormangid(bdCumandocEntity.getPkCumandoc());//供应商管理档案
@ -455,7 +456,7 @@ public class ProxyPurchaseWarehous extends PluginBaseEntity {
poOrderChildrenDto.setCwarehouseid(bdStordocEntity.getPkStordoc());//收货仓库
poOrderChildrenDto.setPk_reqcorp(bdCorpEntity.getPkCorp());//需求公司 *
// poOrderChildrenDto.setIisreplenish(false);//补货标识 *
poOrderChildrenDto.setCoperator("0001A110000000000U3D");//操作员id
poOrderChildrenDto.setCoperator(OverallConstant.getOverAllValue("u8cApiZdrPK"));//操作员id
// poOrderChildrenDto.setBreceiveplan(false);//存在到货计划
poOrderChildrenDtoList.add(poOrderChildrenDto);
@ -820,13 +821,14 @@ public class ProxyPurchaseWarehous extends PluginBaseEntity {
*/
public PoOrderHeadBodyDto sendU8CPoOrder(String param) throws Exception {
long startLong = System.currentTimeMillis();
logger.info("代理品牌采购推送开始,推送参数:" + param + ",U8C_URL:" + ProfilesActiveConstant.U8C_URL);
String result = HttpRequest.post(ProfilesActiveConstant.U8C_URL).header("appId", "800037")//头信息多个头信息多次调用此方法即可
.header("usercode", "admin").header("password", "21232f297a57a5a743894a0e4a801fc3").header("system", "lz").header("trantype", "PK").header("apiCode", "8000370004")//头信息多个头信息多次调用此方法即可
.header("publicKey", "ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj")//头信息多个头信息多次调用此方法即可
.header("secretKey", "fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//头信息多个头信息多次调用此方法即可
logger.info("代理品牌采购推送开始,推送参数:" + param + ",U8C_URL:" + OverallConstant.getOverAllValue("u8c_url"));
String apiCode = "8000370004";
String result = HttpRequest.post(OverallConstant.getOverAllValue("u8c_url")).header("appId", OverallConstant.getOverAllValue("appId"))//头信息多个头信息多次调用此方法即可
.header("usercode", OverallConstant.getOverAllValue("u8cApiUsercodePK")).header("password", OverallConstant.getOverAllValue("u8cApiPasswordPK")).header("system", OverallConstant.getOverAllValue("u8cApiSystemPK")).header("trantype", OverallConstant.getOverAllValue("u8cApiTrantypePK")).header("apiCode", apiCode)//头信息多个头信息多次调用此方法即可
.header("publicKey", OverallConstant.getOverAllValue("publicKey"))//头信息多个头信息多次调用此方法即可
.header("secretKey", OverallConstant.getOverAllValue("secretKey"))//头信息多个头信息多次调用此方法即可
.body(param)//表单内容
.timeout(20000)//超时毫秒
.timeout(600000)//超时毫秒
.execute().body();
logger.info("代理品牌采购推送结束,返回参数:" + result);
long endLong = System.currentTimeMillis();

View File

@ -9,6 +9,7 @@ import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.beanutil.BeanUtil;
import com.hzya.frame.plugin.lets.constant.ExportConstant;
import com.hzya.frame.plugin.lets.constant.OverallConstant;
import com.hzya.frame.plugin.lets.constant.ProfilesActiveConstant;
import com.hzya.frame.plugin.lets.dao.*;
import com.hzya.frame.plugin.lets.entity.*;
@ -701,7 +702,7 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
saleorderRequestParentDto.setCcustomerid(bdCumandocEntity.getPkCumandoc());//客户=开票单位=收货单位=表体收货单位=收货单位
saleorderRequestParentDto.setCdeptid(bdDeptdocEntity.getPkDeptdoc());//部门
saleorderRequestParentDto.setCemployeeid(null);//业务员
saleorderRequestParentDto.setCoperatorid("0001A110000000000U3D");//制单人
saleorderRequestParentDto.setCoperatorid(OverallConstant.getOverAllValue("u8cApiZdrPK"));//制单人
saleorderRequestParentDto.setCreceiptcorpid(bdCumandocEntity.getPkCumandoc());//开票单位
saleorderRequestParentDto.setCreceiptcustomerid(bdCumandocEntity.getPkCumandoc());//收货单位
saleorderRequestParentDto.setCsalecorpid(bdSalestruEntity.getCsalestruid());//销售组织
@ -1258,13 +1259,14 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
*/
public SoSaleResultRootDto sendU8CTOCOrder(String param) {
long startLong = System.currentTimeMillis();
logger.info("TOB推送开始推送参数" + param + ",U8C_URL:" + ProfilesActiveConstant.U8C_URL);
String result = HttpRequest.post(ProfilesActiveConstant.U8C_URL).header("appId", "800037")//头信息多个头信息多次调用此方法即可
.header("usercode", "admin").header("password", "21232f297a57a5a743894a0e4a801fc3").header("system", "lz").header("trantype", "PK").header("apiCode", "8000370006")//头信息多个头信息多次调用此方法即可
.header("publicKey", "ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj")//头信息多个头信息多次调用此方法即可
.header("secretKey", "fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//头信息多个头信息多次调用此方法即可
logger.info("TOB推送开始推送参数" + param + ",U8C_URL:" + OverallConstant.getOverAllValue("u8c_url"));
String apiCode = "8000370006";
String result = HttpRequest.post(OverallConstant.getOverAllValue("u8c_url")).header("appId", OverallConstant.getOverAllValue("appId"))//头信息多个头信息多次调用此方法即可
.header("usercode", OverallConstant.getOverAllValue("u8cApiUsercodePK")).header("password", OverallConstant.getOverAllValue("u8cApiPasswordPK")).header("system", OverallConstant.getOverAllValue("u8cApiSystemPK")).header("trantype", OverallConstant.getOverAllValue("u8cApiTrantypePK")).header("apiCode", apiCode)//头信息多个头信息多次调用此方法即可
.header("publicKey", OverallConstant.getOverAllValue("publicKey"))//头信息多个头信息多次调用此方法即可
.header("secretKey", OverallConstant.getOverAllValue("secretKey"))//头信息多个头信息多次调用此方法即可
.body(param)//表单内容
.timeout(20000)//超时毫秒
.timeout(600000)//超时毫秒
.execute().body();
logger.info("TOB推送结束返回参数" + result);
long endLong = System.currentTimeMillis();
@ -1722,7 +1724,7 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
SalesInvoiceHeadDto salesInvoiceHeadDto = new SalesInvoiceHeadDto();
salesInvoiceHeadDto.setCbiztype(bdBusitypeEntity.getPkBusitype());
salesInvoiceHeadDto.setCcalbodyid(bdCalbodyEntity.getPkCalbody());
salesInvoiceHeadDto.setCoperatorid("0001A110000000000U3D");//制单人
salesInvoiceHeadDto.setCoperatorid(OverallConstant.getOverAllValue("u8cApiZdrPK"));//制单人
salesInvoiceHeadDto.setCreceiptcorpid(bdCumandocEntity.getPkCumandoc());
salesInvoiceHeadDto.setCsalecorpid(bdSalestruEntity.getCsalestruid());
salesInvoiceHeadDto.setPk_corp(bdCorpEntity.getPkCorp());
@ -1855,13 +1857,14 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
*/
public SaleinvoiceDto sendU8CTOCSoSaleinvoiceB(String param) throws Exception {
long startLong = System.currentTimeMillis();
logger.info("TOB销售发票推送开始推送参数" + param + ",U8C_URL:" + ProfilesActiveConstant.U8C_URL);
String result = HttpRequest.post(ProfilesActiveConstant.U8C_URL).header("appId", "800037")//头信息多个头信息多次调用此方法即可
.header("usercode", "admin").header("password", "21232f297a57a5a743894a0e4a801fc3").header("system", "lz").header("trantype", "PK").header("apiCode", "8000370057")//头信息多个头信息多次调用此方法即可
.header("publicKey", "ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj")//头信息多个头信息多次调用此方法即可
.header("secretKey", "fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//头信息多个头信息多次调用此方法即可
logger.info("TOB销售发票推送开始推送参数" + param + ",U8C_URL:" + OverallConstant.getOverAllValue("u8c_url"));
String apiCode = "8000370057";
String result = HttpRequest.post(OverallConstant.getOverAllValue("u8c_url")).header("appId", OverallConstant.getOverAllValue("appId"))//头信息多个头信息多次调用此方法即可
.header("usercode", OverallConstant.getOverAllValue("u8cApiUsercodePK")).header("password", OverallConstant.getOverAllValue("u8cApiPasswordPK")).header("system", OverallConstant.getOverAllValue("u8cApiSystemPK")).header("trantype", OverallConstant.getOverAllValue("u8cApiTrantypePK")).header("apiCode", apiCode)//头信息多个头信息多次调用此方法即可
.header("publicKey", OverallConstant.getOverAllValue("publicKey"))//头信息多个头信息多次调用此方法即可
.header("secretKey", OverallConstant.getOverAllValue("secretKey"))//头信息多个头信息多次调用此方法即可
.body(param)//表单内容
.timeout(20000)//超时毫秒
.timeout(600000)//超时毫秒
.execute().body();
//2024年8月29日 17:56:50 如果http请求超时则会抛给上层方法上层方法会完成异常的捕捉
logger.info("TOB销售发票推送结束返回参数" + result);

View File

@ -9,6 +9,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.beanutil.BeanUtil;
import com.hzya.frame.plugin.lets.constant.OverallConstant;
import com.hzya.frame.plugin.lets.constant.ProfilesActiveConstant;
import com.hzya.frame.plugin.lets.entity.*;
import com.hzya.frame.plugin.lets.ofs.dao.ITocofsSaleoutDao;
@ -762,7 +763,7 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
saleorderRequestParentDto.setCcustomerid(bdCumandocEntity.getPkCumandoc());//客户=开票单位=收货单位=表体收货单位=收货单位
saleorderRequestParentDto.setCdeptid(bdDeptdocEntity.getPkDeptdoc());//部门
saleorderRequestParentDto.setCemployeeid(null);//业务员
saleorderRequestParentDto.setCoperatorid("0001A110000000000U3D");//制单人
saleorderRequestParentDto.setCoperatorid(OverallConstant.getOverAllValue("u8cApiZdrPK"));//制单人
saleorderRequestParentDto.setCreceiptcorpid(bdCumandocEntity.getPkCumandoc());//开票单位
saleorderRequestParentDto.setCreceiptcustomerid(bdCumandocEntity.getPkCumandoc());//收货单位
saleorderRequestParentDto.setCsalecorpid(bdSalestruEntity.getCsalestruid());//销售组织
@ -1388,13 +1389,14 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
*/
public SoSaleResultRootDto sendU8CTOCOrder(String param) throws Exception {
long startLong = System.currentTimeMillis();
logger.info("TOC推送开始推送参数" + param + ",U8C_URL:" + ProfilesActiveConstant.U8C_URL);
String result = HttpRequest.post(ProfilesActiveConstant.U8C_URL).header("appId", "800037")//头信息多个头信息多次调用此方法即可
.header("usercode", "admin").header("password", "21232f297a57a5a743894a0e4a801fc3").header("system", "lz").header("trantype", "PK").header("apiCode", "8000370006")//头信息多个头信息多次调用此方法即可
.header("publicKey", "ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj")//头信息多个头信息多次调用此方法即可
.header("secretKey", "fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//头信息多个头信息多次调用此方法即可
logger.info("TOC推送开始推送参数" + param + ",U8C_URL:" + OverallConstant.getOverAllValue("u8c_url"));
String apiCode = "8000370006";
String result = HttpRequest.post(OverallConstant.getOverAllValue("u8c_url")).header("appId", OverallConstant.getOverAllValue("appId"))//头信息多个头信息多次调用此方法即可
.header("usercode", OverallConstant.getOverAllValue("u8cApiUsercodePK")).header("password", OverallConstant.getOverAllValue("u8cApiPasswordPK")).header("system", OverallConstant.getOverAllValue("u8cApiSystemPK")).header("trantype", OverallConstant.getOverAllValue("u8cApiTrantypePK")).header("apiCode", apiCode)//头信息多个头信息多次调用此方法即可
.header("publicKey", OverallConstant.getOverAllValue("publicKey"))//头信息多个头信息多次调用此方法即可
.header("secretKey", OverallConstant.getOverAllValue("secretKey"))//头信息多个头信息多次调用此方法即可
.body(param)//表单内容
.timeout(20000)//超时毫秒
.timeout(600000)//超时毫秒
.execute().body();
logger.info("TOC推送结束返回参数" + result);
long endLong = System.currentTimeMillis();
@ -1541,7 +1543,7 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
saleorderRequestParentDto.setCcustomerid(bdCumandocEntity.getPkCumandoc());//客户=开票单位=收货单位=表体收货单位=收货单位
saleorderRequestParentDto.setCdeptid(bdDeptdocEntity.getPkDeptdoc());//部门
saleorderRequestParentDto.setCemployeeid(null);//业务员
saleorderRequestParentDto.setCoperatorid("0001A110000000000U3D");//制单人
saleorderRequestParentDto.setCoperatorid(OverallConstant.getOverAllValue("u8cApiZdrPK"));//制单人
saleorderRequestParentDto.setCreceiptcorpid(bdCumandocEntity.getPkCumandoc());//开票单位
saleorderRequestParentDto.setCreceiptcustomerid(bdCumandocEntity.getPkCumandoc());//收货单位
saleorderRequestParentDto.setCsalecorpid(bdSalestruEntity.getCsalestruid());//销售组织
@ -1670,7 +1672,7 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
saleorderRequestParentDto.setCcustomerid(bdCumandocEntity.getPkCumandoc());//客户=开票单位=收货单位=表体收货单位=收货单位
saleorderRequestParentDto.setCdeptid(bdDeptdocEntity.getPkDeptdoc());//部门
saleorderRequestParentDto.setCemployeeid(null);//业务员
saleorderRequestParentDto.setCoperatorid("0001A110000000000U3D");//制单人
saleorderRequestParentDto.setCoperatorid(OverallConstant.getOverAllValue("u8cApiZdrPK"));//制单人
saleorderRequestParentDto.setCreceiptcorpid(bdCumandocEntity.getPkCumandoc());//开票单位
saleorderRequestParentDto.setCreceiptcustomerid(bdCumandocEntity.getPkCumandoc());//收货单位
saleorderRequestParentDto.setCsalecorpid(bdSalestruEntity.getCsalestruid());//销售组织

View File

@ -9,6 +9,7 @@ import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.beanutil.BeanUtil;
import com.hzya.frame.plugin.lets.constant.ExportConstant;
import com.hzya.frame.plugin.lets.constant.OverallConstant;
import com.hzya.frame.plugin.lets.constant.ProfilesActiveConstant;
import com.hzya.frame.plugin.lets.dao.*;
import com.hzya.frame.plugin.lets.entity.*;
@ -520,7 +521,7 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
saleorderRequestParentDto.setCcustomerid(bdCumandocEntity.getPkCumandoc());//客户=开票单位=收货单位=表体收货单位=收货单位
saleorderRequestParentDto.setCdeptid(bdDeptdocEntity.getPkDeptdoc());//部门
saleorderRequestParentDto.setCemployeeid(null);//业务员
saleorderRequestParentDto.setCoperatorid("0001A110000000000U3D");//制单人
saleorderRequestParentDto.setCoperatorid(OverallConstant.getOverAllValue("u8cApiZdrPK"));//制单人
saleorderRequestParentDto.setCreceiptcorpid(bdCumandocEntity.getPkCumandoc());//开票单位
saleorderRequestParentDto.setCreceiptcustomerid(bdCumandocEntity.getPkCumandoc());//收货单位
saleorderRequestParentDto.setCsalecorpid(bdSalestruEntity.getCsalestruid());//销售组织
@ -545,7 +546,7 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
//收发类别
saleorderRequestParentDto.setPk_defdoc3(bdRdclEntity.getPkRdcl());
saleorderRequestParentDto.setVdef3(bdRdclEntity.getRdname());
saleorderRequestDto.setParentvo(saleorderRequestParentDto);
List<SaleorderRequestChildrenDto> saleorderRequestChildrenDtoList = new ArrayList<>();
@ -1285,13 +1286,14 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
*/
public SoSaleResultRootDto sendU8CTOCOrder(String param) {
long startLong = System.currentTimeMillis();
logger.info("TOB推送开始推送参数" + param + ",U8C_URL:" + ProfilesActiveConstant.U8C_URL);
String result = HttpRequest.post(ProfilesActiveConstant.U8C_URL).header("appId", "800037")//头信息多个头信息多次调用此方法即可
.header("usercode", "admin").header("password", "21232f297a57a5a743894a0e4a801fc3").header("system", "lz").header("trantype", "PK").header("apiCode", "8000370006")//头信息多个头信息多次调用此方法即可
.header("publicKey", "ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj")//头信息多个头信息多次调用此方法即可
.header("secretKey", "fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//头信息多个头信息多次调用此方法即可
logger.info("TOB推送开始推送参数" + param + ",U8C_URL:" + OverallConstant.getOverAllValue("u8c_url"));
String apiCode = "8000370006";
String result = HttpRequest.post(OverallConstant.getOverAllValue("u8c_url")).header("appId", OverallConstant.getOverAllValue("appId"))//头信息多个头信息多次调用此方法即可
.header("usercode", OverallConstant.getOverAllValue("u8cApiUsercodePK")).header("password", OverallConstant.getOverAllValue("u8cApiPasswordPK")).header("system", OverallConstant.getOverAllValue("u8cApiSystemPK")).header("trantype", OverallConstant.getOverAllValue("u8cApiTrantypePK")).header("apiCode", apiCode)//头信息多个头信息多次调用此方法即可
.header("publicKey", OverallConstant.getOverAllValue("publicKey"))//头信息多个头信息多次调用此方法即可
.header("secretKey", OverallConstant.getOverAllValue("secretKey"))//头信息多个头信息多次调用此方法即可
.body(param)//表单内容
.timeout(20000)//超时毫秒
.timeout(600000)//超时毫秒
.execute().body();
logger.info("TOB推送结束返回参数" + result);
long endLong = System.currentTimeMillis();
@ -1438,7 +1440,7 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
SalesInvoiceHeadDto salesInvoiceHeadDto = new SalesInvoiceHeadDto();
salesInvoiceHeadDto.setCbiztype(bdBusitypeEntity.getPkBusitype());
salesInvoiceHeadDto.setCcalbodyid(bdCalbodyEntity.getPkCalbody());
salesInvoiceHeadDto.setCoperatorid("0001A110000000000U3D");//制单人
salesInvoiceHeadDto.setCoperatorid(OverallConstant.getOverAllValue("u8cApiZdrPK"));//制单人
salesInvoiceHeadDto.setCreceiptcorpid(bdCumandocEntity.getPkCumandoc());
salesInvoiceHeadDto.setCsalecorpid(bdSalestruEntity.getCsalestruid());
salesInvoiceHeadDto.setPk_corp(bdCorpEntity.getPkCorp());
@ -1573,13 +1575,14 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
*/
public SaleinvoiceDto sendU8CTOCSoSaleinvoiceB(String param) throws Exception {
long startLong = System.currentTimeMillis();
logger.info("TOB销售发票推送开始推送参数" + param + ",U8C_URL:" + ProfilesActiveConstant.U8C_URL);
String result = HttpRequest.post(ProfilesActiveConstant.U8C_URL).header("appId", "800037")//头信息多个头信息多次调用此方法即可
.header("usercode", "admin").header("password", "21232f297a57a5a743894a0e4a801fc3").header("system", "lz").header("trantype", "PK").header("apiCode", "8000370057")//头信息多个头信息多次调用此方法即可
.header("publicKey", "ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj")//头信息多个头信息多次调用此方法即可
.header("secretKey", "fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//头信息多个头信息多次调用此方法即可
logger.info("TOB销售发票推送开始推送参数" + param + ",U8C_URL:" + OverallConstant.getOverAllValue("u8c_url"));
String apiCode = "8000370057";
String result = HttpRequest.post(OverallConstant.getOverAllValue("u8c_url")).header("appId", OverallConstant.getOverAllValue("appId"))//头信息多个头信息多次调用此方法即可
.header("usercode", OverallConstant.getOverAllValue("u8cApiUsercodePK")).header("password", OverallConstant.getOverAllValue("u8cApiPasswordPK")).header("system", OverallConstant.getOverAllValue("u8cApiSystemPK")).header("trantype", OverallConstant.getOverAllValue("u8cApiTrantypePK")).header("apiCode", apiCode)//头信息多个头信息多次调用此方法即可
.header("publicKey", OverallConstant.getOverAllValue("publicKey"))//头信息多个头信息多次调用此方法即可
.header("secretKey", OverallConstant.getOverAllValue("secretKey"))//头信息多个头信息多次调用此方法即可
.body(param)//表单内容
.timeout(20000)//超时毫秒
.timeout(600000)//超时毫秒
.execute().body();
//2024年8月29日 17:56:50 如果http请求超时则会抛给上层方法上层方法会完成异常的捕捉
logger.info("TOB销售发票推送结束返回参数" + result);

View File

@ -8,6 +8,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.beanutil.BeanUtil;
import com.hzya.frame.plugin.lets.constant.OverallConstant;
import com.hzya.frame.plugin.lets.constant.ProfilesActiveConstant;
import com.hzya.frame.plugin.lets.entity.*;
import com.hzya.frame.plugin.lets.ofs.dao.ITocofsReturngoodsDao;
@ -413,7 +414,7 @@ public class SoSaleReturnPluginInitializerToC extends PluginBaseEntity {
saleorderRequestParentDto.setCcustomerid(bdCumandocEntity.getPkCumandoc());//客户=开票单位=收货单位=表体收货单位=收货单位
saleorderRequestParentDto.setCdeptid(bdDeptdocEntity.getPkDeptdoc());//部门
saleorderRequestParentDto.setCemployeeid(null);//业务员
saleorderRequestParentDto.setCoperatorid("0001A110000000000U3D");//制单人
saleorderRequestParentDto.setCoperatorid(OverallConstant.getOverAllValue("u8cApiZdrPK"));//制单人
saleorderRequestParentDto.setCreceiptcorpid(bdCumandocEntity.getPkCumandoc());//开票单位
saleorderRequestParentDto.setCreceiptcustomerid(bdCumandocEntity.getPkCumandoc());//收货单位
saleorderRequestParentDto.setCsalecorpid(bdSalestruEntity.getCsalestruid());//销售组织
@ -930,13 +931,14 @@ public class SoSaleReturnPluginInitializerToC extends PluginBaseEntity {
*/
public SoSaleResultRootDto sendU8CTOCOrder(String param) {
long startLong = System.currentTimeMillis();
logger.info("TOC推送开始推送参数" + param + ",U8C_URL:" + ProfilesActiveConstant.U8C_URL);
String result = HttpRequest.post(ProfilesActiveConstant.U8C_URL).header("appId", "800037")//头信息多个头信息多次调用此方法即可
.header("usercode", "admin").header("password", "21232f297a57a5a743894a0e4a801fc3").header("system", "lz").header("trantype", "PK").header("apiCode", "8000370006")//头信息多个头信息多次调用此方法即可
.header("publicKey", "ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj")//头信息多个头信息多次调用此方法即可
.header("secretKey", "fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//头信息多个头信息多次调用此方法即可
logger.info("TOC推送开始推送参数" + param + ",U8C_URL:" + OverallConstant.getOverAllValue("u8c_url"));
String apiCode = "8000370006";
String result = HttpRequest.post(OverallConstant.getOverAllValue("u8c_url")).header("appId", OverallConstant.getOverAllValue("appId"))//头信息多个头信息多次调用此方法即可
.header("usercode", OverallConstant.getOverAllValue("u8cApiUsercodePK")).header("password", OverallConstant.getOverAllValue("u8cApiPasswordPK")).header("system", OverallConstant.getOverAllValue("u8cApiSystemPK")).header("trantype", OverallConstant.getOverAllValue("u8cApiTrantypePK")).header("apiCode", apiCode)//头信息多个头信息多次调用此方法即可
.header("publicKey", OverallConstant.getOverAllValue("publicKey"))//头信息多个头信息多次调用此方法即可
.header("secretKey", OverallConstant.getOverAllValue("secretKey"))//头信息多个头信息多次调用此方法即可
.body(param)//表单内容
.timeout(20000)//超时毫秒
.timeout(600000)//超时毫秒
.execute().body();
logger.info("TOC推送结束返回参数" + result);
long endLong = System.currentTimeMillis();

View File

@ -24,9 +24,9 @@ import org.springframework.stereotype.Component;
@Component
public class PushU8CByApiCode {
private static String appId = "800037";
private static String publicKey = "ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj";//用安中台
private static String secretKey = "fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=";//用安中台
// private static String appId = "800037";
// private static String publicKey = "ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj";//用安中台
// private static String secretKey = "fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=";//用安中台
/**
* 发起post请求传递json类型
@ -40,7 +40,7 @@ public class PushU8CByApiCode {
Assert.notNull(data, "请求参数不能为空(需要JSON格式)");
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpPost httpPost = new HttpPost(OverallConstant.getOverAllValue("u8cApiUrl"));
HttpPost httpPost = new HttpPost(OverallConstant.getOverAllValue("u8c_url"));
httpPost.setHeader("Content-Type", "application/json");
//u8c
httpPost.setHeader("usercode", OverallConstant.getOverAllValue("u8cApiUsercodePK"));
@ -49,16 +49,15 @@ public class PushU8CByApiCode {
httpPost.setHeader("system", OverallConstant.getOverAllValue("u8cApiSystemPK"));
httpPost.setHeader("needStackTrace", OverallConstant.getOverAllValue("u8cApiNeedStackTracePK"));
//中台
httpPost.setHeader("publicKey", publicKey);
httpPost.setHeader("secretKey", secretKey);
httpPost.setHeader("publicKey", OverallConstant.getOverAllValue("publicKey"));
httpPost.setHeader("secretKey", OverallConstant.getOverAllValue("secretKey"));
//app
httpPost.setHeader("appId", appId);
httpPost.setHeader("appId", OverallConstant.getOverAllValue("appId"));
httpPost.setHeader("apicode", apicode);
//data
httpPost.setEntity(new StringEntity(data, "UTF-8"));
// 配置请求的超时设置
RequestConfig requestConfig = RequestConfig.custom()
.setConnectTimeout(600000) // 连接超时时间: 600秒
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(600000) // 连接超时时间: 600秒
.setConnectionRequestTimeout(600000) // 请求超时时间: 600秒
.setSocketTimeout(600000) // 数据读取超时时间: 600秒
.build();
@ -87,7 +86,7 @@ public class PushU8CByApiCode {
Assert.notNull(data, "请求参数不能为空(需要JSON格式)");
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpPost httpPost = new HttpPost(ProfilesActiveConstant.U8C_URL);
HttpPost httpPost = new HttpPost(OverallConstant.getOverAllValue("u8c_url"));
httpPost.setHeader("Content-Type", "application/json");
//u8c
httpPost.setHeader("usercode", OverallConstant.getOverAllValue("u8cApiUsercodeCode"));
@ -96,17 +95,16 @@ public class PushU8CByApiCode {
httpPost.setHeader("system", OverallConstant.getOverAllValue("u8cApiSystemCode"));
httpPost.setHeader("needStackTrace", OverallConstant.getOverAllValue("u8cApiNeedStackTraceCode"));
//中台
httpPost.setHeader("publicKey", publicKey);
httpPost.setHeader("secretKey", secretKey);
httpPost.setHeader("publicKey", OverallConstant.getOverAllValue("publicKey"));
httpPost.setHeader("secretKey", OverallConstant.getOverAllValue("secretKey"));
//app
httpPost.setHeader("appId", appId);
httpPost.setHeader("appId", OverallConstant.getOverAllValue("appId"));
httpPost.setHeader("apicode", apicode);
//data
httpPost.setEntity(new StringEntity(data, "UTF-8"));
// 配置请求的超时设置
RequestConfig requestConfig = RequestConfig.custom()
.setConnectTimeout(600000) // 连接超时时间: 600秒
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(600000) // 连接超时时间: 600秒
.setConnectionRequestTimeout(600000) // 请求超时时间: 600秒
.setSocketTimeout(600000) // 数据读取超时时间: 600秒
.build();