满意v6查询

beta-enc
kane 2 years ago
parent ec0aa89453
commit e4823a970e
  1. 26
      jianshui-invoice/src/main/java/com/jianshui/invoice/utils/elephant/ElephantUtils.java

@ -346,17 +346,17 @@ public class ElephantUtils {
* @return
*/
public static AjaxResult sendRequestWithoutTokenV6(String uri, String methodName, JSON data, Companyservice companyservice) throws UnsupportedEncodingException, NoSuchAlgorithmException, InvalidKeyException {
ICompanyservicePropService companyserviceProp = SpringUtils.getBean(ICompanyservicePropService.class);
CompanyserviceProp secretIdProp = companyserviceProp.selectPropByKey(companyservice.getCompanyid(), "elephant_secret_id");
if (secretIdProp == null) {
throw new JianshuiServiceException("企业未配置属性,请联系管理员!");
}
String secretId = secretIdProp.getValue();
CompanyserviceProp sercretKeyProp = companyserviceProp.selectPropByKey(companyservice.getCompanyid(), "elephant_secret_key");
if (sercretKeyProp == null) {
throw new JianshuiServiceException("企业未配置属性,请联系管理员!");
}
String sercretKey = sercretKeyProp.getValue();
// ICompanyservicePropService companyserviceProp = SpringUtils.getBean(ICompanyservicePropService.class);
// CompanyserviceProp secretIdProp = companyserviceProp.selectPropByKey(companyservice.getCompanyid(), "elephant_secret_id");
// if (secretIdProp == null) {
// throw new JianshuiServiceException("企业未配置属性,请联系管理员!");
// }
// String secretId = secretIdProp.getValue();
// CompanyserviceProp sercretKeyProp = companyserviceProp.selectPropByKey(companyservice.getCompanyid(), "elephant_secret_key");
// if (sercretKeyProp == null) {
// throw new JianshuiServiceException("企业未配置属性,请联系管理员!");
// }
// String sercretKey = sercretKeyProp.getValue();
BASE64Encoder encoder = new BASE64Encoder();
byte[] contentByte = JSONUtil.toJsonStr(data).getBytes();
// byte[] contentByte = "{\"DDPCXX\":{\"DDQQPCH\":\"5767e3e0907c4e3c848c3f459b68394b\",\"NSRSBH\":\"110101MYJ2GPQQ4\",\"FPLXDM\":\"004\"},\"DDZXX\":[{\"DDTXX\":{\"DDQQLSH\":\"4767e3e0907c4e3c848c3f459b68394b\",\"NSRSBH\":\"110101MYJ2GPQQ4\",\"NSRMC\":\"测试 localhost\",\"KPLX\":\"0\",\"XHFSBH\":\"110101MYJ2GPQQ4\",\"XHFMC\":\"测试 localhost\",\"XHFDZ\":\"山东省济南市济微路141号中铁物流园1楼\",\"XHFDH\":\"1\",\"XHFYH\":\"齐鲁银行济南王官庄支行 1170 8140 0000 0016 252\",\"XHFZH\":\"1170814000000016252\",\"GMFSBH\":\"91320700774687205M\",\"GMFMC\":\"连云港天邦科技开发有限公司\",\"GMFDZ\":\"江苏省连云港市海州开发区新浦工业园振兴路\",\"GMFDH\":\"0518-85287867\",\"GMFYH\":\"江苏银行连云港浦中支行 \",\"GMFZH\":\"70300101314068535\",\"GMFLX\":\"01\",\"KPR\":\"test1\",\"QDBZ\":\"0\",\"JSHJ\":\"7475.76\",\"HJJE\":\"6615.72\",\"HJSE\":\"860.04\",\"DDH\":\"4767e3e0907c4e3c848c3f459b68394b\",\"DDSJ\":\"2022-05-17 10:09:33\"},\"DDMXXX\":[{\"XH\":\"1\",\"FPHXZ\":\"0\",\"SPBM\":\"108020799\",\"YHZCBS\":\"0\",\"XMMC\":\"圆钢\",\"GGXH\":\"60\",\"DW\":\"吨\",\"SPSL\":1.014,\"DJ\":\"4991.15\",\"JE\":\"5061.03\",\"HSBZ\":\"0\",\"SL\":\"0.13\",\"SE\":\"657.93\",\"BYZD1\":\"\",\"BYZD2\":\"\",\"BYZD3\":\"\"},{\"XH\":\"2\",\"FPHXZ\":\"0\",\"SPBM\":\"108020799\",\"YHZCBS\":\"0\",\"XMMC\":\"圆钢\",\"GGXH\":\"55\",\"DW\":\"吨\",\"SPSL\":0.23,\"DJ\":\"4902.65\",\"JE\":\"1127.61\",\"HSBZ\":\"0\",\"SL\":\"0.13\",\"SE\":\"146.59\",\"BYZD1\":\"\",\"BYZD2\":\"\",\"BYZD3\":\"\"},{\"XH\":\"3\",\"FPHXZ\":\"0\",\"SPBM\":\"108020799\",\"YHZCBS\":\"0\",\"XMMC\":\"圆钢\",\"GGXH\":\"10\",\"DW\":\"吨\",\"SPSL\":0.076,\"DJ\":\"5619.47\",\"JE\":\"427.08\",\"HSBZ\":\"0\",\"SL\":\"0.13\",\"SE\":\"55.52\",\"BYZD1\":\"\",\"BYZD2\":\"\",\"BYZD3\":\"\"}]}]}".getBytes();
@ -375,8 +375,8 @@ public class ElephantUtils {
dxhyInterfaceRequest.setRequestType("POST");
dxhyInterfaceRequest.setHttpTimeOut("100000");
dxhyInterfaceRequest.setDataExchangeId("1617954341800234234234552");
dxhyInterfaceRequest.setSecretId(secretId);
dxhyInterfaceRequest.setSecretKey(sercretKey);
dxhyInterfaceRequest.setSecretId("e1de400c3aba4ed4b50b8c55885caf19");
dxhyInterfaceRequest.setSecretKey("8877d2d2b7d240cdb103cfae0f49491e");
dxhyInterfaceRequest.setContent(byteContent);
DxhyInterfaceResponse dxhyInterfaceResponse = InvokeDxhyApi.dxhyInterfaceInvoke(dxhyInterfaceRequest);
log.info("请求成功,结果{}",JSONUtil.toJsonStr(dxhyInterfaceResponse));

Loading…
Cancel
Save