diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/constant/OverallConstant.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/constant/OverallConstant.java index a1076729..5551be77 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/constant/OverallConstant.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/constant/OverallConstant.java @@ -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"); } /** diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/constant/ProfilesActiveConstant.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/constant/ProfilesActiveConstant.java index 14bb2d78..3f1070ea 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/constant/ProfilesActiveConstant.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/constant/ProfilesActiveConstant.java @@ -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'"; diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/outsourc/ConsignmachiningIn.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/outsourc/ConsignmachiningIn.java index eda13b83..35adf59b 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/outsourc/ConsignmachiningIn.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/outsourc/ConsignmachiningIn.java @@ -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(); diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/outsourc/ConsignmachiningIn.txt b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/outsourc/ConsignmachiningIn.txt index b4dca5b0..bf64a906 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/outsourc/ConsignmachiningIn.txt +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/outsourc/ConsignmachiningIn.txt @@ -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()); diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/outsourc/ConsignmachiningInOrderReturn.txt b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/outsourc/ConsignmachiningInOrderReturn.txt index 823d13b1..dc176162 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/outsourc/ConsignmachiningInOrderReturn.txt +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/outsourc/ConsignmachiningInOrderReturn.txt @@ -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()); diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/outsourc/ConsignmachiningInReturn.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/outsourc/ConsignmachiningInReturn.java index a639b7e6..1e6498fa 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/outsourc/ConsignmachiningInReturn.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/outsourc/ConsignmachiningInReturn.java @@ -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(); diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/purchase/ProxyPurchaseReturn.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/purchase/ProxyPurchaseReturn.java index a0bb1d77..6aec6920 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/purchase/ProxyPurchaseReturn.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/purchase/ProxyPurchaseReturn.java @@ -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(); diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/purchase/ProxyPurchaseWarehous.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/purchase/ProxyPurchaseWarehous.java index e317ec9f..dba12ce6 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/purchase/ProxyPurchaseWarehous.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/purchase/ProxyPurchaseWarehous.java @@ -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(); diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToB.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToB.java index 68e3bf25..941a9392 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToB.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToB.java @@ -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); diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToC.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToC.java index ae290e7e..3dc3fba0 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToC.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToC.java @@ -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());//销售组织 diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleReturnPluginInitializerToB.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleReturnPluginInitializerToB.java index 3d24ced4..a77c1bd2 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleReturnPluginInitializerToB.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleReturnPluginInitializerToB.java @@ -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 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); diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleReturnPluginInitializerToC.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleReturnPluginInitializerToC.java index 47b25acc..d67d0a05 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleReturnPluginInitializerToC.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleReturnPluginInitializerToC.java @@ -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(); diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/util/pushData/PushU8CByApiCode.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/util/pushData/PushU8CByApiCode.java index 37082550..a2d97bcd 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/util/pushData/PushU8CByApiCode.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/util/pushData/PushU8CByApiCode.java @@ -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();