|
@@ -6,6 +6,8 @@ import cn.com.taiji.sdk.model.comm.protocol.tts.card.server.*;
|
|
|
import cn.com.taiji.sdk.model.comm.protocol.tts.invoice.server.*;
|
|
|
import cn.com.taiji.sdk.model.comm.protocol.tts.trade.service.CardTradeRequest;
|
|
|
import cn.com.taiji.sdk.model.comm.protocol.tts.trade.service.CardTradeResponse;
|
|
|
+import cn.com.taiji.sdk.model.comm.protocol.tts.trade.service.TradeApplyQueryRequest;
|
|
|
+import cn.com.taiji.sdk.model.comm.protocol.tts.trade.service.TradeApplyQueryResponse;
|
|
|
import com.jkcredit.invoice.service.upService.SelfCarInterface;
|
|
|
import com.jkcredit.invoice.util.RespR;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -35,7 +37,7 @@ public class SelfCarInterfaceImpl implements SelfCarInterface{
|
|
|
e.printStackTrace();
|
|
|
return new RespR(false,"网络异常,请联系管理人员");
|
|
|
}catch (ApiRequestException apie) {
|
|
|
- log.error(apie.getMessage()+ " ,请求参数:"+cardBindQueryListToBRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
+ log.error(apie.getMessage().replaceAll("[\r\n]", "")+ " ,请求参数:"+cardBindQueryListToBRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
apie.printStackTrace();
|
|
|
return new RespR(false,apie.getMessage());
|
|
|
}
|
|
@@ -58,7 +60,7 @@ public class SelfCarInterfaceImpl implements SelfCarInterface{
|
|
|
e.printStackTrace();
|
|
|
return new RespR(false,"网络异常,请联系管理人员");
|
|
|
}catch (ApiRequestException apie) {
|
|
|
- log.error(apie.getMessage()+ " ,请求参数:"+cardQueryCardToBRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
+ log.error(apie.getMessage().replaceAll("[\r\n]", "")+ " ,请求参数:"+cardQueryCardToBRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
apie.printStackTrace();
|
|
|
return new RespR(false,apie.getMessage());
|
|
|
}
|
|
@@ -82,7 +84,7 @@ public class SelfCarInterfaceImpl implements SelfCarInterface{
|
|
|
e.printStackTrace();
|
|
|
return new RespR(false,"网络异常,请联系管理人员");
|
|
|
}catch (ApiRequestException apie) {
|
|
|
- log.error(apie.getMessage()+ " ,请求参数:"+cardBindingToBRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
+ log.error(apie.getMessage().replaceAll("[\r\n]", "")+ " ,请求参数:"+cardBindingToBRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
apie.printStackTrace();
|
|
|
return new RespR(false,apie.getMessage());
|
|
|
}
|
|
@@ -106,7 +108,7 @@ public class SelfCarInterfaceImpl implements SelfCarInterface{
|
|
|
e.printStackTrace();
|
|
|
return new RespR(false,"网络异常,请联系管理人员");
|
|
|
}catch (ApiRequestException apie) {
|
|
|
- log.error(apie.getMessage()+ " ,请求参数:"+cardValidCodeToBRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
+ log.error(apie.getMessage().replaceAll("[\r\n]", "")+ " ,请求参数:"+cardValidCodeToBRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
apie.printStackTrace();
|
|
|
return new RespR(false,apie.getMessage());
|
|
|
}
|
|
@@ -130,7 +132,7 @@ public class SelfCarInterfaceImpl implements SelfCarInterface{
|
|
|
e.printStackTrace();
|
|
|
return new RespR(false,"网络异常,请联系管理人员");
|
|
|
}catch (ApiRequestException apie) {
|
|
|
- log.error(apie.getMessage()+ " ,请求参数:"+cardUnbindToBRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
+ log.error(apie.getMessage().replaceAll("[\r\n]", "")+ " ,请求参数:"+cardUnbindToBRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
apie.printStackTrace();
|
|
|
return new RespR(false,apie.getMessage());
|
|
|
}
|
|
@@ -154,7 +156,7 @@ public class SelfCarInterfaceImpl implements SelfCarInterface{
|
|
|
e.printStackTrace();
|
|
|
return new RespR(false,"网络异常,请稍后再试");
|
|
|
}catch (ApiRequestException apie) {
|
|
|
- log.error(apie.getMessage()+ " ,请求参数:"+cardTradeRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
+ log.error(apie.getMessage().replaceAll("[\r\n]", "")+ " ,请求参数:"+cardTradeRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
apie.printStackTrace();
|
|
|
return new RespR(false,apie.getMessage());
|
|
|
}
|
|
@@ -176,7 +178,7 @@ public class SelfCarInterfaceImpl implements SelfCarInterface{
|
|
|
e.printStackTrace();
|
|
|
return new RespR(false,"网络异常,请联系管理人员");
|
|
|
}catch (ApiRequestException apie) {
|
|
|
- log.error(apie.getMessage()+ " ,请求参数:"+b2BInvoiceApplyRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
+ log.error(apie.getMessage().replaceAll("[\r\n]", "")+ " ,请求参数:"+b2BInvoiceApplyRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
apie.printStackTrace();
|
|
|
return new RespR(false,apie.getMessage());
|
|
|
}
|
|
@@ -200,7 +202,7 @@ public class SelfCarInterfaceImpl implements SelfCarInterface{
|
|
|
e.printStackTrace();
|
|
|
return new RespR(false,"网络异常,请联系管理人员");
|
|
|
}catch (ApiRequestException apie) {
|
|
|
- log.error(apie.getMessage()+ " ,请求参数:"+b2BInvoiceQueryRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
+ log.error(apie.getMessage().replaceAll("[\r\n]", "")+ " ,请求参数:"+b2BInvoiceQueryRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
apie.printStackTrace();
|
|
|
return new RespR(false,apie.getMessage());
|
|
|
}
|
|
@@ -223,7 +225,7 @@ public class SelfCarInterfaceImpl implements SelfCarInterface{
|
|
|
e.printStackTrace();
|
|
|
return new RespR(false,"网络异常,请联系管理人员");
|
|
|
}catch (ApiRequestException apie) {
|
|
|
- log.error(apie.getMessage()+ " ,请求参数:"+b2BInvoiceQueryByApplyRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
+ log.error(apie.getMessage().replaceAll("[\r\n]", "")+ " ,请求参数:"+b2BInvoiceQueryByApplyRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
apie.printStackTrace();
|
|
|
return new RespR(false,apie.getMessage());
|
|
|
}
|
|
@@ -246,7 +248,7 @@ public class SelfCarInterfaceImpl implements SelfCarInterface{
|
|
|
e.printStackTrace();
|
|
|
return new RespR(false,"网络异常,请联系管理人员");
|
|
|
}catch (ApiRequestException apie) {
|
|
|
- log.error(apie.getMessage()+ " ,请求参数:"+b2bInvoicePackageRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
+ log.error(apie.getMessage().replaceAll("[\r\n]", "")+ " ,请求参数:"+b2bInvoicePackageRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
apie.printStackTrace();
|
|
|
return new RespR(false,apie.getMessage());
|
|
|
}
|
|
@@ -269,7 +271,7 @@ public class SelfCarInterfaceImpl implements SelfCarInterface{
|
|
|
e.printStackTrace();
|
|
|
return new RespR(false,"网络异常,请联系管理人员");
|
|
|
}catch (ApiRequestException apie) {
|
|
|
- log.error(apie.getMessage()+ " ,请求参数:"+cardChangeTitleRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
+ log.error(apie.getMessage().replaceAll("[\r\n]", "")+ " ,请求参数:"+cardChangeTitleRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
apie.printStackTrace();
|
|
|
return new RespR(false,apie.getMessage());
|
|
|
}
|
|
@@ -292,9 +294,34 @@ public class SelfCarInterfaceImpl implements SelfCarInterface{
|
|
|
e.printStackTrace();
|
|
|
return new RespR(false,"网络异常,请联系管理人员");
|
|
|
}catch (ApiRequestException apie) {
|
|
|
- log.error(apie.getMessage()+ " ,请求参数:"+cardChangeQueryRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
+ log.error(apie.getMessage().replaceAll("[\r\n]", "")+ " ,请求参数:"+cardChangeQueryRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
apie.printStackTrace();
|
|
|
return new RespR(false,apie.getMessage());
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public RespR<TradeApplyQueryResponse> queryApplyQueryByTradeId(TradeApplyQueryRequest tradeApplyQueryRequest) {
|
|
|
+
|
|
|
+
|
|
|
+ String fileName = tradeApplyQueryRequest.getFilename();
|
|
|
+ long startTime = System.currentTimeMillis();
|
|
|
+
|
|
|
+ try {
|
|
|
+ log.info("SelfCarInterfaceImpl.queryApplyQueryByTradeId上游请求参数:{}", tradeApplyQueryRequest.toString());
|
|
|
+ //(4)指定协议的响应模型(IssuerUploadResponse),调用upload 发送数据
|
|
|
+ TradeApplyQueryResponse response=ETCCommHelper.upload(fileName, tradeApplyQueryRequest, TradeApplyQueryResponse.class);
|
|
|
+ log.info("SelfCarInterfaceImpl.queryApplyQueryByTradeId上游接口返回:{},请求参数:{},cost={}ms", response.toString(), tradeApplyQueryRequest.toString(),System.currentTimeMillis()-startTime);
|
|
|
+ return new RespR<>(response);
|
|
|
+ } catch (IOException e) {
|
|
|
+ log.error(e.getMessage()+ " ,请求参数:"+tradeApplyQueryRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
+ e.printStackTrace();
|
|
|
+ return new RespR(false,"网络异常,请联系管理人员");
|
|
|
+ }catch (ApiRequestException apie) {
|
|
|
+ log.error(apie.getMessage().replaceAll("[\r\n]", "")+ " ,请求参数:"+tradeApplyQueryRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
+ apie.printStackTrace();
|
|
|
+ return new RespR(false,apie.getMessage());
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
}
|