Merge branch 'beta' into xingze

beta-enc
kane 2 years ago
commit ed39cd0edb
  1. 79
      jianshui-admin/src/main/java/com/jianshui/api/controller/http/invoice/v1/InvoiceController.java
  2. 105
      jianshui-invoice/src/main/java/com/jianshui/invoice/constant/elephant/ElephantConstantsV6.java
  3. 3
      jianshui-invoice/src/main/java/com/jianshui/invoice/service/IInvoiceApiService.java
  4. 3
      jianshui-invoice/src/main/java/com/jianshui/invoice/service/impl/adapter/request/AisinoInvoiceRequestAdapterImpl.java
  5. 5
      jianshui-invoice/src/main/java/com/jianshui/invoice/service/impl/api/AisinoConsoleInvoiceApiServiceImpl.java
  6. 5
      jianshui-invoice/src/main/java/com/jianshui/invoice/service/impl/api/ElephantInvoiceApiServiceImpl.java
  7. 74
      jianshui-invoice/src/main/java/com/jianshui/invoice/service/impl/api/ElephantInvoiceApiV6ServiceImpl.java
  8. 5
      jianshui-invoice/src/main/java/com/jianshui/invoice/service/impl/api/JcskInvoiceApiServiceImpl.java

@ -415,7 +415,17 @@ public class InvoiceController {
IInvoiceRequestService invoiceRequestService = invoiceRequestFactory.getService(requestAdapterKey);
JSONObject decryptResult = invoiceRequestService.decrypt(request, companyservice, "deprecate");
HXResponse result = preHandleDecryptResult(decryptResult, "deprecate", companyservice);
// HXResponse result = preHandleDecryptResult(decryptResult, "deprecate", companyservice);
// 调用预处理
if (decryptResult == null) {
throw new JianshuiParamErrorException(ErrorCode.ERROR_PARAMS, companyservice, "invoice");
}
// 获得请求实例,并且进行扣费
String serviceKey = serviceManageService.getCompanyServiceSupplier("invoice", companyservice.getCompanyid());
serviceManageService.companyConsume("invoice", companyservice.getCompanyid());
IInvoiceApiService invoiceService = invoiceServiceFactory.getService(serviceKey);
decryptResult.put("service_supplier_key", serviceKey);
HXResponse result = invoiceService.deprecateInvoice(decryptResult, companyservice);
String responseAdapterKey = serviceManageService.getResponseAdapterKey("invoice", companyservice.getCompanyid());
IInvoiceResponseService invoiceResponseService = invoiceResponseFactory.getService(responseAdapterKey);
@ -445,7 +455,17 @@ public class InvoiceController {
IInvoiceRequestService invoiceRequestService = invoiceRequestFactory.getService(requestAdapterKey);
JSONObject decryptResult = invoiceRequestService.decrypt(request, companyservice, "deprecate_query");
HXResponse result = preHandleDecryptResult(decryptResult, "deprecate_query", companyservice);
// HXResponse result = preHandleDecryptResult(decryptResult, "deprecate_query", companyservice);
if (decryptResult == null) {
throw new JianshuiParamErrorException(ErrorCode.ERROR_PARAMS, companyservice, "invoice");
}
DeprecateQueryInvoiceDTO deprecateQueryInvoiceDTO = decryptResult.toJavaObject(DeprecateQueryInvoiceDTO.class);
// 获得请求实例,并且进行扣费
String serviceKey = serviceManageService.getCompanyServiceSupplier("invoice", companyservice.getCompanyid());
serviceManageService.companyConsume("invoice", companyservice.getCompanyid());
IInvoiceApiService invoiceService = invoiceServiceFactory.getService(serviceKey);
HXResponse result = invoiceService.deprecateQueryInvoice(deprecateQueryInvoiceDTO, companyservice);
String responseAdapterKey = serviceManageService.getResponseAdapterKey("invoice", companyservice.getCompanyid());
IInvoiceResponseService invoiceResponseService = invoiceResponseFactory.getService(responseAdapterKey);
@ -562,7 +582,21 @@ public class InvoiceController {
IInvoiceRequestService invoiceRequestService = invoiceRequestFactory.getService(requestAdapterKey);
JSONObject decryptResult = invoiceRequestService.decrypt(request, companyservice, "push");
HXResponse result = preHandleDecryptResult(decryptResult, "push", companyservice);
// HXResponse result = preHandleDecryptResult(decryptResult, "push", companyservice);
// 接口预处理
BillInfo billInfo = decryptResult.toJavaObject(BillInfo.class);
if (billInfo == null) {
throw new JianshuiParamErrorException(ErrorCode.ERROR_PARAMS, companyservice, "invoice");
}
billInfo.setSource("2");
// 获得请求实例,并且进行扣费
String serviceKey = serviceManageService.getCompanyServiceSupplier("invoice", companyservice.getCompanyid());
serviceManageService.companyConsume("invoice", companyservice.getCompanyid());
billInfo.setServiceSupplierKey(serviceKey);
IInvoiceApiService invoiceService = invoiceServiceFactory.getService(serviceKey);
HXResponse result = invoiceService.pushData(billInfo, companyservice);
String responseAdapterKey = serviceManageService.getResponseAdapterKey("invoice", companyservice.getCompanyid());
IInvoiceResponseService invoiceResponseService = invoiceResponseFactory.getService(responseAdapterKey);
@ -1416,5 +1450,44 @@ public class InvoiceController {
}
/** 大象数电V6 */
/** 生成动态二维码接口 */
@ApiImplicitParams({
@ApiImplicitParam(name = "identity", value = "身份认证", dataType = "java.lang.Void", example = "1130", required = true),
@ApiImplicitParam(name = "order", value = "请求体", dataType = "java.lang.Void", required = true)})
@PostMapping({"/api/invoice/v1/generateDynamicCode/{identity}", "/api/invoice/v1/generateDynamicCode"})
public Object generateDynamicCode(HttpServletRequest request, String identity) throws Exception {
if (StringUtils.isEmpty(identity)) {
return AjaxResult.error(ErrorCode.EMPTY_IDENTITY);
}
Companyservice companyservice = iCompanyserviceService.selectCompanyserviceByIdentity(identity);
if (companyservice == null) {
return AjaxResult.error(ErrorCode.COMPANY_NOT_FOUND);
}
// 获得入口报文适配器
String requestAdapterKey = serviceManageService.getRequestAdapterKey("invoice", companyservice.getCompanyid());
IInvoiceRequestService invoiceRequestService = invoiceRequestFactory.getService(requestAdapterKey);
JSONObject decryptResult = invoiceRequestService.decrypt(request, companyservice, "");
// 获得请求实例,并且进行扣费
String serviceKey = serviceManageService.getCompanyServiceSupplier("invoice", companyservice.getCompanyid());
serviceManageService.companyConsume("invoice", companyservice.getCompanyid());
IInvoiceApiService invoiceService = invoiceServiceFactory.getService(serviceKey);
HXResponse result = invoiceService.generateDynamicCode(decryptResult, companyservice);
String responseAdapterKey = serviceManageService.getResponseAdapterKey("invoice", companyservice.getCompanyid());
IInvoiceResponseService invoiceResponseService = invoiceResponseFactory.getService(responseAdapterKey);
return invoiceResponseService.response(result, companyservice, "");
}
}

@ -0,0 +1,105 @@
package com.jianshui.invoice.constant.elephant;
/**
* @Description 大象常量
* @Author 巩权林
* @Date 2022-03-24 11:33
**/
public class ElephantConstantsV6 {
// token redis key
public static String TOKEN_REDIS_KEY = "elephant_invoice_token";
// 测试的域名
public static String DEV_HOST = "https://sandbox.zncspt.com/api/";
public static String DEV_ELECLOUD_HOST = "https://sandbox.ele-cloud.com/api/";
public static String DEV_HOST_LOCAL = "http://140.143.226.17:8087/order-api";
public static String DEV_HOST_LOCAL_V6_JingDongYun = "https://js.ele12.com/order-api";
// 生产的域名
public static String PROD_HOST = "https://openapi.zncspt.com/api/";
public static String PROD_ELECLOUD_HOST = "https://openapi.ele-cloud.com/api/";
public static String PROD_HOST_LOCAL = "http://140.143.226.17:8087/order-api";
public static String PROD_HOST_LOCAL_V6_JingDongYun = "https://js.ele12.com/order-api";
// 测试的获取token的域名
public static String DEV_TOKEN_HOST = "https://sandbox.zncspt.com/api/authen/token";
// 生产的获取token的域名
public static String PROD_TOKEN_HOST = "https://openapi.zncspt.com/api/authen/token";
// 发票开具冲红
public static String ADD_INVOICE = "order-api/order-api/V6/AllocateInvoices";
public static String ADD_INVOICE_LOCALHOST = "/invoice/api/V6/AllocateInvoices";
public static String ADD_INVOICE_METHOD = "AllocateInvoices";
// 发票开票结果拉取
public static String ADD_INVOICE_RESULT = "order-api/order-api/V6/GetAllocatedInvoices";
public static String ADD_INVOICE_RESULT_LOCALHOST = "/invoice/api/V6/GetAllocatedInvoices";
public static String ADD_INVOICE_RESULT_METHOD = "GetAllocatedInvoices";
// 发票详情拉取
public static String QUERY_INVOICE = "order-api/order-api/V6/GetOrderInfoAndInvoiceInfo";
public static String QUERY_INVOICE_LOCALHOST = "/invoice/api/V6/GetOrderInfoAndInvoiceInfo";
public static String QUERY_INVOICE_METHOD = "GetOrderInfoAndInvoiceInfo";
// 红字信息表上传
public static String REDINFO_UPLOAD = "order-api/order-api/V6/AllocateRedInvoiceApplication";
public static String REDINFO_UPLOAD_LOCALHOST = "/invoice/api/V6/AllocateRedInvoiceApplication";
public static String REDINFO_UPLOAD_METHOD = "AllocateRedInvoiceApplication";
public static String REDINFO_DOWNLOAD = "order-api/order-api/V6/DownloadRedInvoiceApplicationResult";
public static String REDINFO_DOWNLOAD_LOCALHOST = "/invoice/api/V6/DownloadRedInvoiceApplicationResult";
public static String REDINFO_DOWNLOAD_METHOD = "DownloadRedInvoiceApplicationResult";
public static String REDINFO_FIND_LOCALHOST = "/invoice/api/v6/GetRedInvoiceApplication";
public static String REDINFO_FIND_METHOD = "GetRedInvoiceApplication";
// 生成动态二维码
public static String GEN_DYNAMIC_CODE_LOCALHOST = "/invoice/api/v6/GenerateDynamicCode";
public static String GEN_DYNAMIC_CODE_METHOD = "GenerateDynamicCode";
// 发票作废
public static String DEPRECATE_INVOICE = "order-api/order-api/V5/DeprecateInvoices";
public static String DEPRECATE_INVOICE_LOCALHOST = "/invoice/api/V5/DeprecateInvoices";
public static String DEPRECATE_INVOICE_METHOD = "DeprecateInvoices";
// 发票作废结果查询
public static String DEPRECATE_INVOICE_RESULT = "order-api/order-api/V6//QueryInvalidInvoice";
public static String DEPRECATE_INVOICE_RESULT_LOCALHOST = "/invoice/api/V6//QueryInvalidInvoice";
public static String DEPRECATE_INVOICE_RESULT_METHOD = "order-api/order-api/V6//QueryInvalidInvoice";
// 打印机查询
public static String QUERY_PRINTER = "";
public static String QUERY_PRINTER_LOCALHOST = "/invoice/api/V6/QueryPrinter";
public static String QUERY_PRINTER_METHOD = "QueryPrinter";
// 批量打印
public static String BATCH_PRINT = "";
public static String BATCH_PRINT_LOCALHOST = "/invoice/api/V6/PrintInvoice";
public static String BATCH_PRINT_METHOD = "PrintInvoice";
// 发票余量查询接口
public static String QUERY_INVOICE_STORE = "order-api/order-api/V6/QueryInvoiceStore";
/**
* 发票专用章生成
*/
public static String SIGN_CREATE = "eseal/v1/create";
/**
* 发票专用章导入注册
*/
public static String SIGN_REGISTER = "eseal/v1/register";
/**
* 发票签章
*/
public static String SIGN = "eseal/v1/sign";
}

@ -279,4 +279,7 @@ public interface IInvoiceApiService {
* @return : java.lang.Object
*/
EleNewMessage findRedInfo(FindRedInfo findRedInfo, Companyservice companyservice);
/** 生成动态二维码接口*/
HXResponse generateDynamicCode(JSONObject decryptResult, Companyservice companyservice);
}

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

@ -1024,4 +1024,9 @@ public class AisinoConsoleInvoiceApiServiceImpl implements IInvoiceApiService {
return null;
}
@Override
public HXResponse generateDynamicCode(JSONObject decryptResult, Companyservice companyservice) {
return null;
}
}

@ -812,6 +812,11 @@ public class ElephantInvoiceApiServiceImpl implements IInvoiceApiService {
}
@Override
public HXResponse generateDynamicCode(JSONObject decryptResult, Companyservice companyservice) {
return null;
}
/**
* 申请/上传 红字发票

@ -2,6 +2,7 @@ package com.jianshui.invoice.service.impl.api;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.codec.Base64;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
@ -9,6 +10,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dxhy.order.protocol.invoke.DxhyInterfaceResponse;
import com.google.gson.Gson;
import com.jianshui.common.constant.Constants;
import com.jianshui.common.constant.WebServiceConstant;
import com.jianshui.common.core.domain.AjaxResult;
import com.jianshui.common.core.domain.entity.Companyservice;
import com.jianshui.common.enums.ErrorCode;
@ -19,9 +21,10 @@ import com.jianshui.common.utils.DateUtils;
import com.jianshui.common.utils.StringUtils;
import com.jianshui.common.utils.TimeUtil;
import com.jianshui.common.utils.http.HttpHelper;
import com.jianshui.common.utils.jcsk.ApiHttp;
import com.jianshui.common.utils.uuid.IdUtils;
import com.jianshui.framework.manager.AsyncManager;
import com.jianshui.invoice.constant.elephant.ElephantConstants;
import com.jianshui.invoice.constant.elephant.ElephantConstantsV6;
import com.jianshui.invoice.domain.*;
import com.jianshui.invoice.domain.dto.*;
import com.jianshui.invoice.domain.dto.adapter.response.RedInfoDTO;
@ -43,6 +46,7 @@ import com.jianshui.queue.utils.RedisQueueUtil;
import com.jianshui.storage.domain.StorageUrlDTO;
import com.jianshui.storage.factory.StorageFactory;
import com.jianshui.storage.service.IStorageService;
import com.jianshui.system.domain.InvoiceAllApiLog;
import com.jianshui.system.mapper.CompanyserviceMapper;
import com.jianshui.system.service.ISysConfigService;
import lombok.extern.slf4j.Slf4j;
@ -189,12 +193,12 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService {
// JSONObject result = JSONObject.parseObject("{\"zipCode\":\"0\",\"entCode\":\"91370102MA3UD2FG21\",\"dataExchangeId\":\"20220328140706911955546286280593\",\"encryptCode\":\"0\",\"returnStateInfo\":{\"returnCode\":\"0000\",\"returnMessage\":\"5aSE55CG5oiQ5YqfIQ==\"},\"content\":\"eyJERFFRUENIIjoiODgyOWNmNWUtNDAyYS00NWZkLWFiYmEtMzlkMjlhOWMzMjMzIiwiWlRETSI6IjAwOTk5OSIsIlpUWFgiOiLkvIHkuJrmnKrphY3nva7nqI7mjqforr7lpIcifQ==\"}");
// if (!CommonUtils.isDevMode()) {
// result = ElephantUtils.sendRequest(ElephantConstants.ADD_INVOICE, (JSONObject) JSONObject.toJSON(elephantInvoiceAddDTO));
// result = ElephantUtils.sendRequest(ElephantConstantsV6.ADD_INVOICE, (JSONObject) JSONObject.toJSON(elephantInvoiceAddDTO));
// }
// AjaxResult queryResult = ElephantUtils.sendRequest(ElephantConstants.ADD_INVOICE, JSONUtil.parse(elephantInvoiceAddDTO));
// AjaxResult queryResult = ElephantUtils.sendRequest(ElephantConstantsV6.ADD_INVOICE, JSONUtil.parse(elephantInvoiceAddDTO));
AjaxResult queryResult = null;
try {
queryResult = ElephantUtils.sendRequestWithoutTokenV6New(ElephantConstants.ADD_INVOICE_LOCALHOST, ElephantConstants.ADD_INVOICE_METHOD, JSONUtil.parse(elephantInvoiceAddDTO), companyservice);
queryResult = ElephantUtils.sendRequestWithoutTokenV6New(ElephantConstantsV6.ADD_INVOICE_LOCALHOST, ElephantConstantsV6.ADD_INVOICE_METHOD, JSONUtil.parse(elephantInvoiceAddDTO), companyservice);
} catch (UnsupportedEncodingException | NoSuchAlgorithmException | InvalidKeyException e) {
log.error("【销项发票】【大象接口】【发票开具】发票请求异常,请求报文{},销方信息{}", JSONUtil.parse(elephantInvoiceAddDTO).toString(), JSONObject.toJSONString(companyservice));
e.printStackTrace();
@ -227,9 +231,9 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService {
queryBody.put("DDQQPCH", billInfo.getSystemOrderno());
queryBody.put("FPLXDM", fplxdm);
queryBody.put("SFFHSBSJ", "0");
// queryResult = ElephantUtils.sendRequest(ElephantConstants.ADD_INVOICE_RESULT, JSONUtil.parse(queryBody));
// queryResult = ElephantUtils.sendRequest(ElephantConstantsV6.ADD_INVOICE_RESULT, JSONUtil.parse(queryBody));
try {
queryResult = ElephantUtils.sendRequestWithoutToken(ElephantConstants.ADD_INVOICE_RESULT_LOCALHOST, ElephantConstants.ADD_INVOICE_RESULT_METHOD, JSONUtil.parse(queryBody), companyservice);
queryResult = ElephantUtils.sendRequestWithoutToken(ElephantConstantsV6.ADD_INVOICE_RESULT_LOCALHOST, ElephantConstantsV6.ADD_INVOICE_RESULT_METHOD, JSONUtil.parse(queryBody), companyservice);
} catch (UnsupportedEncodingException | InvalidKeyException | NoSuchAlgorithmException e) {
log.error("【销项发票】【大象接口】【发票开具】发票请求异常,请求报文{},销方信息{}", JSONUtil.parse(elephantInvoiceAddDTO).toString(), JSONObject.toJSONString(companyservice));
e.printStackTrace();
@ -350,11 +354,11 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService {
queryBody.put("BSWJ", "0");
debugLog("断点4", uuid, timestamp);
// AjaxResult queryResult = ElephantUtils.sendRequest(ElephantConstants.QUERY_INVOICE, JSONUtil.parse(queryBody));
// queryResult = ElephantUtils.sendRequest(ElephantConstants.ADD_INVOICE_RESULT, JSONUtil.parse(queryBody));
// AjaxResult queryResult = ElephantUtils.sendRequest(ElephantConstantsV6.QUERY_INVOICE, JSONUtil.parse(queryBody));
// queryResult = ElephantUtils.sendRequest(ElephantConstantsV6.ADD_INVOICE_RESULT, JSONUtil.parse(queryBody));
AjaxResult queryResult = null;
try {
queryResult = ElephantUtils.sendRequestWithoutToken(ElephantConstants.QUERY_INVOICE_LOCALHOST, ElephantConstants.QUERY_INVOICE_METHOD, JSONUtil.parse(queryBody), companyservice);
queryResult = ElephantUtils.sendRequestWithoutToken(ElephantConstantsV6.QUERY_INVOICE_LOCALHOST, ElephantConstantsV6.QUERY_INVOICE_METHOD, JSONUtil.parse(queryBody), companyservice);
} catch (UnsupportedEncodingException | InvalidKeyException | NoSuchAlgorithmException e) {
log.error("【销项发票】【大象接口】【发票开具】发票请求异常,请求报文{},销方信息{}", JSONUtil.parse(queryBody).toString(), JSONObject.toJSONString(companyservice));
e.printStackTrace();
@ -763,7 +767,7 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService {
}
DxhyInterfaceResponse dxhyInterfaceResponse = null;
try {
dxhyInterfaceResponse = ElephantUtils.sendRequestWithoutTokenV6(ElephantConstants.REDINFO_FIND_LOCALHOST, ElephantConstants.REDINFO_FIND_METHOD, JSONUtil.parse(findRedInfo), companyservice);
dxhyInterfaceResponse = ElephantUtils.sendRequestWithoutTokenV6(ElephantConstantsV6.REDINFO_FIND_LOCALHOST, ElephantConstantsV6.REDINFO_FIND_METHOD, JSONUtil.parse(findRedInfo), companyservice);
} catch (UnsupportedEncodingException | InvalidKeyException | NoSuchAlgorithmException e) {
log.error("【销项发票】【大象接口】【红字信息表查询】发票请求异常,请求报文{},销方信息{}", JSONUtil.parse(findRedInfo).toString(), JSONObject.toJSONString(companyservice));
e.printStackTrace();
@ -806,6 +810,30 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService {
}
/**
* 生成动态二维码接口
* @param decryptResult
* @param companyservice
* @return
*/
@Override
public HXResponse generateDynamicCode(JSONObject decryptResult, Companyservice companyservice) {
DxhyInterfaceResponse dxhyInterfaceResponse = null;
try {
dxhyInterfaceResponse = ElephantUtils.sendRequestWithoutTokenV6(ElephantConstantsV6.GEN_DYNAMIC_CODE_LOCALHOST, ElephantConstantsV6.GEN_DYNAMIC_CODE_METHOD, JSONUtil.parse(decryptResult), companyservice);
} catch (UnsupportedEncodingException | InvalidKeyException | NoSuchAlgorithmException e) {
log.error("【销项发票】【大象接口】【生成动态二维码】发票请求异常,请求报文{},销方信息{}", decryptResult, JSONObject.toJSONString(companyservice));
e.printStackTrace();
return new HXResponse("9999","系统异常!");
}
String data = dxhyInterfaceResponse.getData();
String code = dxhyInterfaceResponse.getCode();
return new HXResponse(code,data);
}
@ -914,10 +942,10 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService {
HZSQDSCZXXList.add(HZSQDSCZXX);
elephatRedInfoDTO.setHZSQDSCZXX(HZSQDSCZXXList);
// AjaxResult queryResult = ElephantUtils.sendRequest(ElephantConstants.REDINFO_UPLOAD, JSONUtil.parse(elephatRedInfoDTO));
// AjaxResult queryResult = ElephantUtils.sendRequest(ElephantConstantsV6.REDINFO_UPLOAD, JSONUtil.parse(elephatRedInfoDTO));
AjaxResult queryResult = null;
try {
queryResult = ElephantUtils.sendRequestWithoutToken(ElephantConstants.REDINFO_UPLOAD_LOCALHOST, ElephantConstants.REDINFO_UPLOAD_METHOD, JSONUtil.parse(elephatRedInfoDTO), companyservice);
queryResult = ElephantUtils.sendRequestWithoutToken(ElephantConstantsV6.REDINFO_UPLOAD_LOCALHOST, ElephantConstantsV6.REDINFO_UPLOAD_METHOD, JSONUtil.parse(elephatRedInfoDTO), companyservice);
} catch (UnsupportedEncodingException | InvalidKeyException | NoSuchAlgorithmException e) {
log.error("【销项发票】【大象接口】【红字信息表上传】发票请求异常,请求报文{},销方信息{}", JSONUtil.parse(elephatRedInfoDTO).toString(), JSONObject.toJSONString(companyservice));
e.printStackTrace();
@ -1100,11 +1128,11 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService {
for (; page < 11; page++) {
queryJson.put("YS", page); // 页数",
// AjaxResult queryResult = ElephantUtils.sendRequest(ElephantConstants.DEPRECATE_INVOICE, JSONUtil.parse(queryJson));
// AjaxResult queryResult = ElephantUtils.sendRequest(ElephantConstantsV6.DEPRECATE_INVOICE, JSONUtil.parse(queryJson));
AjaxResult queryResult = null;
try {
// System.out.println(JSONUtil.parse(queryJson));
queryResult = ElephantUtils.sendRequestWithoutToken(ElephantConstants.REDINFO_DOWNLOAD_LOCALHOST, ElephantConstants.REDINFO_DOWNLOAD_METHOD, JSONUtil.parse(queryJson), companyservice);
queryResult = ElephantUtils.sendRequestWithoutToken(ElephantConstantsV6.REDINFO_DOWNLOAD_LOCALHOST, ElephantConstantsV6.REDINFO_DOWNLOAD_METHOD, JSONUtil.parse(queryJson), companyservice);
} catch (UnsupportedEncodingException | InvalidKeyException | NoSuchAlgorithmException e) {
log.error("【销项发票】【大象接口】【红字信息表下载】发票请求异常,请求报文{},销方信息{}", JSONUtil.parse(queryJson).toString(), JSONObject.toJSONString(companyservice));
break;
@ -1332,10 +1360,10 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService {
queryBody.put("FPZH", invoice.getFphm());
queryBody.put("ZFLX", "1");
queryBody.put("ZFPCH", IdUtils.randomSystemOrderno());
// AjaxResult queryResult = ElephantUtils.sendRequest(ElephantConstants.DEPRECATE_INVOICE, JSONUtil.parse(queryBody));
// AjaxResult queryResult = ElephantUtils.sendRequest(ElephantConstantsV6.DEPRECATE_INVOICE, JSONUtil.parse(queryBody));
AjaxResult queryResult = null;
try {
queryResult = ElephantUtils.sendRequestWithoutToken(ElephantConstants.DEPRECATE_INVOICE_LOCALHOST, ElephantConstants.DEPRECATE_INVOICE_METHOD, JSONUtil.parse(queryBody), companyservice);
queryResult = ElephantUtils.sendRequestWithoutToken(ElephantConstantsV6.DEPRECATE_INVOICE_LOCALHOST, ElephantConstantsV6.DEPRECATE_INVOICE_METHOD, JSONUtil.parse(queryBody), companyservice);
} catch (UnsupportedEncodingException | InvalidKeyException | NoSuchAlgorithmException e) {
log.error("【销项发票】【大象接口】【发票作废】发票请求异常,请求报文{},销方信息{}", JSONUtil.parse(queryBody).toString(), JSONObject.toJSONString(companyservice));
e.printStackTrace();
@ -1360,9 +1388,9 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService {
// queryBody.put("XHFSBH", companyservice.getSellertax()); // 销货方纳税人识别号
// queryBody.put("FPDM", invoice.getFpdm());
// queryBody.put("FPHM", invoice.getFphm());
// // queryResult = ElephantUtils.sendRequest(ElephantConstants.DEPRECATE_INVOICE_RESULT, JSONUtil.parse(queryBody));
// // queryResult = ElephantUtils.sendRequest(ElephantConstantsV6.DEPRECATE_INVOICE_RESULT, JSONUtil.parse(queryBody));
// try {
// queryResult = ElephantUtils.sendRequestWithoutToken(ElephantConstants.DEPRECATE_INVOICE_RESULT_LOCALHOST, ElephantConstants.DEPRECATE_INVOICE_RESULT_METHOD, JSONUtil.parse(queryBody), companyservice);
// queryResult = ElephantUtils.sendRequestWithoutToken(ElephantConstantsV6.DEPRECATE_INVOICE_RESULT_LOCALHOST, ElephantConstantsV6.DEPRECATE_INVOICE_RESULT_METHOD, JSONUtil.parse(queryBody), companyservice);
// } catch (UnsupportedEncodingException | InvalidKeyException | NoSuchAlgorithmException e) {
// log.error("【销项发票】【大象接口】【发票开具】发票请求异常,请求报文{},销方信息{}", JSONUtil.parse(queryBody).toString(), JSONObject.toJSONString(companyservice));
// e.printStackTrace();
@ -1451,7 +1479,7 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService {
query.put("DYJMC", queryPrinterDTO.getPrinterName());
AjaxResult queryResult = null;
try {
queryResult = ElephantUtils.sendRequestWithoutToken(ElephantConstants.QUERY_PRINTER_LOCALHOST, ElephantConstants.QUERY_PRINTER, JSONUtil.parse(query), companyservice);
queryResult = ElephantUtils.sendRequestWithoutToken(ElephantConstantsV6.QUERY_PRINTER_LOCALHOST, ElephantConstantsV6.QUERY_PRINTER, JSONUtil.parse(query), companyservice);
} catch (UnsupportedEncodingException | NoSuchAlgorithmException | InvalidKeyException e) {
log.error("【销项发票】【大象接口】【打印机查询】发票请求异常,请求报文{},销方信息{}", JSONUtil.parse(query).toString(), JSONObject.toJSONString(companyservice));
e.printStackTrace();
@ -1536,7 +1564,7 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService {
AjaxResult queryResult = null;
try {
queryResult = ElephantUtils.sendRequestWithoutToken(ElephantConstants.BATCH_PRINT_LOCALHOST, ElephantConstants.BATCH_PRINT, JSONUtil.parse(query), companyservice);
queryResult = ElephantUtils.sendRequestWithoutToken(ElephantConstantsV6.BATCH_PRINT_LOCALHOST, ElephantConstantsV6.BATCH_PRINT, JSONUtil.parse(query), companyservice);
} catch (UnsupportedEncodingException | NoSuchAlgorithmException | InvalidKeyException e) {
log.error("【销项发票】【大象接口】【打印机查询】发票请求异常,请求报文{},销方信息{}", JSONUtil.parse(query).toString(), JSONObject.toJSONString(companyservice));
e.printStackTrace();
@ -1593,7 +1621,7 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService {
AjaxResult queryResult = null;
System.out.println(JSONUtil.parse(signESealDTO).toString());
try {
queryResult = ElephantUtils.sendRequest(ElephantConstants.SIGN
queryResult = ElephantUtils.sendRequest(ElephantConstantsV6.SIGN
, JSONUtil.parse(signESealDTO), companyservice, true);
} catch (Exception e) {
log.error("【销项发票】【大象接口】【发票签章】发票请求异常,请求报文{},销方信息{}", JSONUtil.parse(signESealDTO).toString()
@ -1626,7 +1654,7 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService {
AjaxResult queryResult = null;
try {
queryResult = ElephantUtils.sendRequest(ElephantConstants.SIGN_CREATE
queryResult = ElephantUtils.sendRequest(ElephantConstantsV6.SIGN_CREATE
, JSONUtil.parse(createESealDTO), companyservice, true);
} catch (Exception e) {
log.error("【销项发票】【大象接口】【发票专用章图片生成】发票请求异常,请求报文{},销方信息{}", JSONUtil.parse(createESealDTO).toString()
@ -1661,7 +1689,7 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService {
AjaxResult queryResult = null;
try {
queryResult = ElephantUtils.sendRequest(ElephantConstants.SIGN_REGISTER
queryResult = ElephantUtils.sendRequest(ElephantConstantsV6.SIGN_REGISTER
, JSONUtil.parse(createESealDTO), companyservice, true);
} catch (Exception e) {
log.error("【销项发票】【大象接口】【发票专用章导入】发票请求异常,请求报文{},销方信息{}", JSONUtil.parse(createESealDTO).toString()

@ -1573,6 +1573,11 @@ public class JcskInvoiceApiServiceImpl implements IInvoiceApiService {
return null;
}
@Override
public HXResponse generateDynamicCode(JSONObject decryptResult, Companyservice companyservice) {
return null;
}
/**
* 简税和金财数科 发票类型互换
*

Loading…
Cancel
Save