feature: 签章服务调整

beta
kk 1 year ago
parent 1dee288f45
commit 011db55d8e
  1. 6
      jianshui-admin/src/main/resources/application-dev.yml
  2. 1
      jianshui-admin/src/main/resources/application-prod.yml
  3. 2
      jianshui-admin/src/main/resources/application.yml
  4. 2
      jianshui-invoice-all/src/main/java/com/jianshui/invoiceall/service/impl/adapter/request/AisinoIncomeRequestAdapterImpl.java
  5. 2
      jianshui-invoice/src/main/java/com/jianshui/invoice/service/impl/adapter/request/AisinoInvoiceRequestAdapterImpl.java
  6. 13
      jianshui-invoice/src/main/java/com/jianshui/invoice/utils/elephant/ElephantUtils.java

@ -94,11 +94,13 @@ elephant_invoice_file: http://127.0.0.1:8081/invoice/fileUrl/
# 德才定制 放到数据库
#elephant_invoice_file_dc: http://127.0.0.1:8088/sdFile/
# 大象V6数电对应平台地址
#ele_url_v6: https://js.ele12.com/order-api
ele_url_v6: http://192.168.3.60:18108/order-api
ele_url_v6: https://js.ele12.com/order-api
#ele_url_v6: http://192.168.3.60:18108/order-api
#ele_url_v6: http://127.0.0.1:18108/order-api
# 大象纸票服务对应平台地址
ele_url: http://140.143.226.17:8087/order-api
#签章获取token
ele_url_qz: https://openapi.zncspt.com/api/authen/token
#logstash:
# host: 43.138.58.64:14560
# indexname: jianshui-dev

@ -89,6 +89,7 @@ elephant_invoice_file: http://dev.goldentaxcloud.com:8081/invoice/fileUrl/
ele_url_v6: https://js.ele12.com/order-api
# 大象纸票服务对应平台地址
ele_url: http://140.143.226.17:8087/order-api
ele_url_qz: https://openapi.ele-cloud.com/api/
#logstash:
# host: 43.138.58.64:14560
# indexname: jianshui-prod

@ -46,7 +46,7 @@ spring:
# 国际化资源文件路径
basename: i18n/messages
profiles:
active: prod
active: dev
# 文件上传
servlet:
multipart:

@ -88,7 +88,7 @@ public class AisinoIncomeRequestAdapterImpl implements IInvoiceAllRequestService
// 平台解密
try {
// order = AisinoInvoiceDecryptUtil.decrypt(order, JKey);
order = AisinoInvoiceDecryptUtil.decrypt(order, JKey);
} catch (Exception e) {
e.printStackTrace();
throw new JianshuiParamErrorException(ErrorCode.DECRYPT_ERROR, companyservice, "invoiceall");

@ -105,7 +105,7 @@ public class AisinoInvoiceRequestAdapterImpl implements IInvoiceRequestService {
// 平台解密
try {
// TODO: 2023/9/20
// order = AisinoInvoiceDecryptUtil.decrypt(order, JKey);
order = AisinoInvoiceDecryptUtil.decrypt(order, JKey);
} catch (Exception e) {
e.printStackTrace();
throw new JianshuiParamErrorException(ErrorCode.DECRYPT_ERROR, companyservice, "invoice");

@ -64,11 +64,13 @@ public class ElephantUtils {
private static String ELE_URL_v6;
// 大象普通服务
private static String ELE_URL;
private static String ELE_URL_QZ;
static {
Environment environment = SpringUtils.getBean(Environment.class);
ELE_URL_v6 = environment.getProperty("ele_url_v6");
ELE_URL = environment.getProperty("ele_url");
ELE_URL_QZ = environment.getProperty("ele_url_qz");
}
@ -301,7 +303,9 @@ public class ElephantUtils {
url = ElephantConstants.DEV_HOST_LOCAL_V6_JingDongYun;
}*/
String url = ELE_URL;
// String url = ELE_URL;
log.info("所属签章服务,走配置文件地址,地址为{}",ELE_URL_QZ);
String url = ELE_URL_QZ;
JSONObject jsonObject = new JSONObject();
jsonObject.put("appKey", appkey);
@ -309,7 +313,7 @@ public class ElephantUtils {
Map<String, String> header = new HashMap<>();
header.put("Content-Type", "application/json");
String info = HttpUtils.sendJsonPost(url, jsonObject, header);
log.info("【销项】【大象接口】调用京东云,调用地址:{},入参:{},头信息:{},返回结果:{}",url,jsonObject,header,info);
log.info("【销项】【大象接口】签章调用京东云,调用地址:{},入参:{},头信息:{},返回结果:{}",url,jsonObject,header,info);
JSONObject obj = JSONObject.parseObject(info);
redisCache.setCacheObject(ElephantConstants.TOKEN_REDIS_KEY + "appkey:" + appkey, obj, (int) obj.get("expires_in") - 60, TimeUnit.SECONDS);
return (String) obj.get("access_token");
@ -473,6 +477,11 @@ public class ElephantUtils {
String host = ELE_URL;
/* if(ElephantConstants.SIGN.equals(uri) || ElephantConstants.SIGN_CREATE.equals(uri)|| ElephantConstants.SIGN_REGISTER.equals(uri)){
log.info("所属签章服务,走配置文件地址,地址为{}",ELE_URL_QZ);
uri = ELE_URL_QZ;
}*/
//kk TODO : 2023/9/5 大象接口迁京东云
//https://js.ele12.com/
// host = "https://js.ele12.com/order-api";

Loading…
Cancel
Save