|
@@ -20,19 +20,21 @@ public class SelfCarInterfaceImpl implements SelfCarInterface{
|
|
|
@Override
|
|
|
public RespR<CardBindQueryListToBResponse> cardBindQueryListToB(CardBindQueryListToBRequest cardBindQueryListToBRequest) {
|
|
|
String fileName = cardBindQueryListToBRequest.getFilename();
|
|
|
+ long startTime = System.currentTimeMillis();
|
|
|
+
|
|
|
try {
|
|
|
//(4)指定协议的响应模型(IssuerUploadResponse),调用upload 发送数据
|
|
|
log.info("SelfCarInterfaceImpl.cardBindQueryListToB请求参数:{}", cardBindQueryListToBRequest.toString());
|
|
|
CardBindQueryListToBResponse response=ETCCommHelper.upload(fileName, cardBindQueryListToBRequest, CardBindQueryListToBResponse.class);
|
|
|
- log.info("SelfCarInterfaceImpl.cardBindQueryListToB上游接口返回:{},请求参数:{}", response.toString(), cardBindQueryListToBRequest.toString());
|
|
|
+ log.info("SelfCarInterfaceImpl.cardBindQueryListToB上游接口返回:{},请求参数:{},cost={}ms", response.toString(), cardBindQueryListToBRequest.toString(),System.currentTimeMillis()-startTime);
|
|
|
|
|
|
return new RespR<>(response);
|
|
|
} catch (IOException e) {
|
|
|
- log.error(e.getMessage()+ " ,请求参数:"+cardBindQueryListToBRequest.toString());
|
|
|
+ log.error(e.getMessage()+ " ,请求参数:"+cardBindQueryListToBRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
e.printStackTrace();
|
|
|
return new RespR(false,"网络异常,请联系管理人员");
|
|
|
}catch (ApiRequestException apie) {
|
|
|
- log.error(apie.getMessage()+ " ,请求参数:"+cardBindQueryListToBRequest.toString());
|
|
|
+ log.error(apie.getMessage()+ " ,请求参数:"+cardBindQueryListToBRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
apie.printStackTrace();
|
|
|
return new RespR(false,apie.getMessage());
|
|
|
}
|
|
@@ -41,19 +43,21 @@ public class SelfCarInterfaceImpl implements SelfCarInterface{
|
|
|
@Override
|
|
|
public RespR<CardQueryCardToBResponse> cardQueryCardToB(CardQueryCardToBRequest cardQueryCardToBRequest) {
|
|
|
String fileName = cardQueryCardToBRequest.getFilename();
|
|
|
+ long startTime = System.currentTimeMillis();
|
|
|
+
|
|
|
try {
|
|
|
log.info("SelfCarInterfaceImpl.cardQueryCardToB请求参数:{}", cardQueryCardToBRequest.toString());
|
|
|
//(4)指定协议的响应模型(IssuerUploadResponse),调用upload 发送数据
|
|
|
CardQueryCardToBResponse response=ETCCommHelper.upload(fileName, cardQueryCardToBRequest, CardQueryCardToBResponse.class);
|
|
|
- log.info("SelfCarInterfaceImpl.cardQueryCardToB上游接口返回:{},请求参数:{}", response.toString(), cardQueryCardToBRequest.toString());
|
|
|
+ log.info("SelfCarInterfaceImpl.cardQueryCardToB上游接口返回:{},请求参数:{},cost={}ms", response.toString(), cardQueryCardToBRequest.toString(),System.currentTimeMillis()-startTime);
|
|
|
|
|
|
return new RespR<>(response);
|
|
|
} catch (IOException e) {
|
|
|
- log.error(e.getMessage()+ " ,请求参数:"+cardQueryCardToBRequest.toString());
|
|
|
+ log.error(e.getMessage()+ " ,请求参数:"+cardQueryCardToBRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
e.printStackTrace();
|
|
|
return new RespR(false,"网络异常,请联系管理人员");
|
|
|
}catch (ApiRequestException apie) {
|
|
|
- log.error(apie.getMessage()+ " ,请求参数:"+cardQueryCardToBRequest.toString());
|
|
|
+ log.error(apie.getMessage()+ " ,请求参数:"+cardQueryCardToBRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
apie.printStackTrace();
|
|
|
return new RespR(false,apie.getMessage());
|
|
|
}
|
|
@@ -62,20 +66,22 @@ public class SelfCarInterfaceImpl implements SelfCarInterface{
|
|
|
@Override
|
|
|
public RespR<CardBindingToBResponse> cardBindingToB(CardBindingToBRequest cardBindingToBRequest) {
|
|
|
String fileName = cardBindingToBRequest.getFilename();
|
|
|
+ long startTime = System.currentTimeMillis();
|
|
|
+
|
|
|
try {
|
|
|
//(4)指定协议的响应模型(IssuerUploadResponse),调用upload 发送数据
|
|
|
log.info("SelfCarInterfaceImpl.cardBindingToB上游请求参数:{}", cardBindingToBRequest.toString());
|
|
|
CardBindingToBResponse response=ETCCommHelper.upload(fileName, cardBindingToBRequest, CardBindingToBResponse.class);
|
|
|
- log.info("SelfCarInterfaceImpl.cardBindingToB上游接口返回:{},请求参数:{}", response.toString(), cardBindingToBRequest.toString());
|
|
|
+ log.info("SelfCarInterfaceImpl.cardBindingToB上游接口返回:{},请求参数:{},cost={}ms", response.toString(), cardBindingToBRequest.toString(),System.currentTimeMillis()-startTime);
|
|
|
|
|
|
|
|
|
return new RespR<>(response);
|
|
|
} catch (IOException e) {
|
|
|
- log.error(e.getMessage()+ " ,请求参数:"+cardBindingToBRequest.toString());
|
|
|
+ log.error(e.getMessage()+ " ,请求参数:"+cardBindingToBRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
e.printStackTrace();
|
|
|
return new RespR(false,"网络异常,请联系管理人员");
|
|
|
}catch (ApiRequestException apie) {
|
|
|
- log.error(apie.getMessage()+ " ,请求参数:"+cardBindingToBRequest.toString());
|
|
|
+ log.error(apie.getMessage()+ " ,请求参数:"+cardBindingToBRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
apie.printStackTrace();
|
|
|
return new RespR(false,apie.getMessage());
|
|
|
}
|
|
@@ -84,20 +90,22 @@ public class SelfCarInterfaceImpl implements SelfCarInterface{
|
|
|
@Override
|
|
|
public RespR<CardValidCodeToBResponse> cardValidCodeToB(CardValidCodeToBRequest cardValidCodeToBRequest) {
|
|
|
String fileName = cardValidCodeToBRequest.getFilename();
|
|
|
+ long startTime = System.currentTimeMillis();
|
|
|
+
|
|
|
try {
|
|
|
//(4)指定协议的响应模型(IssuerUploadResponse),调用upload 发送数据
|
|
|
log.info("SelfCarInterfaceImpl.cardValidCodeToB上游请求参数:{}", cardValidCodeToBRequest.toString());
|
|
|
CardValidCodeToBResponse response=ETCCommHelper.upload(fileName, cardValidCodeToBRequest, CardValidCodeToBResponse.class);
|
|
|
- log.info("SelfCarInterfaceImpl.cardValidCodeToB上游接口返回:{},请求参数:{}", response.toString(), cardValidCodeToBRequest.toString());
|
|
|
+ log.info("SelfCarInterfaceImpl.cardValidCodeToB上游接口返回:{},请求参数:{},cost={}ms", response.toString(), cardValidCodeToBRequest.toString(),System.currentTimeMillis()-startTime);
|
|
|
|
|
|
|
|
|
return new RespR<>(response);
|
|
|
} catch (IOException e) {
|
|
|
- log.error(e.getMessage()+ " ,请求参数:"+cardValidCodeToBRequest.toString());
|
|
|
+ log.error(e.getMessage()+ " ,请求参数:"+cardValidCodeToBRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
e.printStackTrace();
|
|
|
return new RespR(false,"网络异常,请联系管理人员");
|
|
|
}catch (ApiRequestException apie) {
|
|
|
- log.error(apie.getMessage()+ " ,请求参数:"+cardValidCodeToBRequest.toString());
|
|
|
+ log.error(apie.getMessage()+ " ,请求参数:"+cardValidCodeToBRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
apie.printStackTrace();
|
|
|
return new RespR(false,apie.getMessage());
|
|
|
}
|
|
@@ -106,20 +114,22 @@ public class SelfCarInterfaceImpl implements SelfCarInterface{
|
|
|
@Override
|
|
|
public RespR<CardUnbindToBResponse> cardUnbindToB(CardUnbindToBRequest cardUnbindToBRequest) {
|
|
|
String fileName = cardUnbindToBRequest.getFilename();
|
|
|
+ long startTime = System.currentTimeMillis();
|
|
|
+
|
|
|
try {
|
|
|
//(4)指定协议的响应模型(IssuerUploadResponse),调用upload 发送数据
|
|
|
log.info("SelfCarInterfaceImpl.cardUnbindToB上游请求参数:{}", cardUnbindToBRequest.toString());
|
|
|
CardUnbindToBResponse response=ETCCommHelper.upload(fileName, cardUnbindToBRequest, CardUnbindToBResponse.class);
|
|
|
- log.info("SelfCarInterfaceImpl.cardUnbindToB上游接口返回:{},请求参数:{}", response.toString(), cardUnbindToBRequest.toString());
|
|
|
+ log.info("SelfCarInterfaceImpl.cardUnbindToB上游接口返回:{},请求参数:{},cost={}ms", response.toString(), cardUnbindToBRequest.toString(),System.currentTimeMillis()-startTime);
|
|
|
|
|
|
|
|
|
return new RespR<>(response);
|
|
|
} catch (IOException e) {
|
|
|
- log.error(e.getMessage()+ " ,请求参数:"+cardUnbindToBRequest.toString());
|
|
|
+ log.error(e.getMessage()+ " ,请求参数:"+cardUnbindToBRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
e.printStackTrace();
|
|
|
return new RespR(false,"网络异常,请联系管理人员");
|
|
|
}catch (ApiRequestException apie) {
|
|
|
- log.error(apie.getMessage()+ " ,请求参数:"+cardUnbindToBRequest.toString());
|
|
|
+ log.error(apie.getMessage()+ " ,请求参数:"+cardUnbindToBRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
apie.printStackTrace();
|
|
|
return new RespR(false,apie.getMessage());
|
|
|
}
|
|
@@ -128,20 +138,22 @@ public class SelfCarInterfaceImpl implements SelfCarInterface{
|
|
|
@Override
|
|
|
public RespR<CardTradeResponse> cardTrade(CardTradeRequest cardTradeRequest) {
|
|
|
String fileName = cardTradeRequest.getFilename();
|
|
|
+ long startTime = System.currentTimeMillis();
|
|
|
+
|
|
|
try {
|
|
|
//(4)指定协议的响应模型(IssuerUploadResponse),调用upload 发送数据
|
|
|
log.info("SelfCarInterfaceImpl.cardTrade上游请求参数:{}", cardTradeRequest.toString());
|
|
|
CardTradeResponse response=ETCCommHelper.upload(fileName, cardTradeRequest, CardTradeResponse.class);
|
|
|
- log.info("SelfCarInterfaceImpl.cardTrade上游接口返回:{},请求参数:{}", response.toString(), cardTradeRequest.toString());
|
|
|
+ log.info("SelfCarInterfaceImpl.cardTrade上游接口返回:{},请求参数:{},cost={}ms", response.toString(), cardTradeRequest.toString(),System.currentTimeMillis()-startTime);
|
|
|
|
|
|
|
|
|
return new RespR<>(response);
|
|
|
} catch (IOException e) {
|
|
|
- log.error(e.getMessage()+ " ,请求参数:"+cardTradeRequest.toString());
|
|
|
+ log.error(e.getMessage()+ " ,请求参数:"+cardTradeRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
e.printStackTrace();
|
|
|
return new RespR(false,"网络异常,请稍后再试");
|
|
|
}catch (ApiRequestException apie) {
|
|
|
- log.error(apie.getMessage()+ " ,请求参数:"+cardTradeRequest.toString());
|
|
|
+ log.error(apie.getMessage()+ " ,请求参数:"+cardTradeRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
apie.printStackTrace();
|
|
|
return new RespR(false,apie.getMessage());
|
|
|
}
|
|
@@ -150,18 +162,20 @@ public class SelfCarInterfaceImpl implements SelfCarInterface{
|
|
|
@Override
|
|
|
public RespR<B2BInvoiceApplyResponse> b2BInvoiceApply(B2BInvoiceApplyRequest b2BInvoiceApplyRequest) {
|
|
|
String fileName = b2BInvoiceApplyRequest.getFilename();
|
|
|
+ long startTime = System.currentTimeMillis();
|
|
|
+
|
|
|
try {
|
|
|
//(4)指定协议的响应模型(IssuerUploadResponse),调用upload 发送数据
|
|
|
log.info("SelfCarInterfaceImpl.b2BInvoiceApply上游请求参数:{}", b2BInvoiceApplyRequest.toString());
|
|
|
B2BInvoiceApplyResponse response=ETCCommHelper.upload(fileName, b2BInvoiceApplyRequest, B2BInvoiceApplyResponse.class);
|
|
|
- log.info("SelfCarInterfaceImpl.b2BInvoiceApply上游接口返回:{},请求参数:{}", response.toString(), b2BInvoiceApplyRequest.toString());
|
|
|
+ log.info("SelfCarInterfaceImpl.b2BInvoiceApply上游接口返回:{},请求参数:{},cost={}ms", response.toString(), b2BInvoiceApplyRequest.toString(),System.currentTimeMillis()-startTime);
|
|
|
return new RespR<>(response);
|
|
|
} catch (IOException e) {
|
|
|
- log.error(e.getMessage()+ " ,请求参数:"+b2BInvoiceApplyRequest.toString());
|
|
|
+ log.error(e.getMessage()+ " ,请求参数:"+b2BInvoiceApplyRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
e.printStackTrace();
|
|
|
return new RespR(false,"网络异常,请联系管理人员");
|
|
|
}catch (ApiRequestException apie) {
|
|
|
- log.error(apie.getMessage()+ " ,请求参数:"+b2BInvoiceApplyRequest.toString());
|
|
|
+ log.error(apie.getMessage()+ " ,请求参数:"+b2BInvoiceApplyRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
apie.printStackTrace();
|
|
|
return new RespR(false,apie.getMessage());
|
|
|
}
|
|
@@ -170,20 +184,22 @@ public class SelfCarInterfaceImpl implements SelfCarInterface{
|
|
|
@Override
|
|
|
public RespR<B2BInvoiceQueryResponse> b2BInvoiceQuery(B2BInvoiceQueryRequest b2BInvoiceQueryRequest) {
|
|
|
String fileName = b2BInvoiceQueryRequest.getFilename();
|
|
|
+ long startTime = System.currentTimeMillis();
|
|
|
+
|
|
|
try {
|
|
|
log.info("SelfCarInterfaceImpl.b2BInvoiceQuery上游请求参数:{}", b2BInvoiceQueryRequest.toString());
|
|
|
//(4)指定协议的响应模型(IssuerUploadResponse),调用upload 发送数据
|
|
|
B2BInvoiceQueryResponse response=ETCCommHelper.upload(fileName, b2BInvoiceQueryRequest, B2BInvoiceQueryResponse.class);
|
|
|
- log.info("SelfCarInterfaceImpl.b2BInvoiceQuery上游接口返回:{},请求参数:{}", response.toString(), b2BInvoiceQueryRequest.toString());
|
|
|
+ log.info("SelfCarInterfaceImpl.b2BInvoiceQuery上游接口返回:{},请求参数:{},cost={}ms", response.toString(), b2BInvoiceQueryRequest.toString(),System.currentTimeMillis()-startTime);
|
|
|
|
|
|
|
|
|
return new RespR<>(response);
|
|
|
} catch (IOException e) {
|
|
|
- log.error(e.getMessage()+ " ,请求参数:"+b2BInvoiceQueryRequest.toString());
|
|
|
+ log.error(e.getMessage()+ " ,请求参数:"+b2BInvoiceQueryRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
e.printStackTrace();
|
|
|
return new RespR(false,"网络异常,请联系管理人员");
|
|
|
}catch (ApiRequestException apie) {
|
|
|
- log.error(apie.getMessage()+ " ,请求参数:"+b2BInvoiceQueryRequest.toString());
|
|
|
+ log.error(apie.getMessage()+ " ,请求参数:"+b2BInvoiceQueryRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
apie.printStackTrace();
|
|
|
return new RespR(false,apie.getMessage());
|
|
|
}
|
|
@@ -192,19 +208,21 @@ public class SelfCarInterfaceImpl implements SelfCarInterface{
|
|
|
@Override
|
|
|
public RespR<B2BInvoiceQueryByApplyResponse> b2bContractQuery(B2BInvoiceQueryByApplyRequest b2BInvoiceQueryByApplyRequest) {
|
|
|
String fileName = b2BInvoiceQueryByApplyRequest.getFilename();
|
|
|
+ long startTime = System.currentTimeMillis();
|
|
|
+
|
|
|
try {
|
|
|
//(4)指定协议的响应模型(IssuerUploadResponse),调用upload 发送数据
|
|
|
log.info("SelfCarInterfaceImpl.b2bContractQuery上游请求参数:{}",b2BInvoiceQueryByApplyRequest.toString());
|
|
|
B2BInvoiceQueryByApplyResponse response=ETCCommHelper.upload(fileName, b2BInvoiceQueryByApplyRequest, B2BInvoiceQueryByApplyResponse.class);
|
|
|
- log.info("SelfCarInterfaceImpl.b2bContractQuery上游接口返回:{},请求参数:{}", response.toString(), b2BInvoiceQueryByApplyRequest.toString());
|
|
|
+ log.info("SelfCarInterfaceImpl.b2bContractQuery上游接口返回:{},请求参数:{},cost={}ms", response.toString(), b2BInvoiceQueryByApplyRequest.toString(),System.currentTimeMillis()-startTime);
|
|
|
|
|
|
return new RespR<>(response);
|
|
|
} catch (IOException e) {
|
|
|
- log.error(e.getMessage()+ " ,请求参数:"+b2BInvoiceQueryByApplyRequest.toString());
|
|
|
+ log.error(e.getMessage()+ " ,请求参数:"+b2BInvoiceQueryByApplyRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
e.printStackTrace();
|
|
|
return new RespR(false,"网络异常,请联系管理人员");
|
|
|
}catch (ApiRequestException apie) {
|
|
|
- log.error(apie.getMessage()+ " ,请求参数:"+b2BInvoiceQueryByApplyRequest.toString());
|
|
|
+ log.error(apie.getMessage()+ " ,请求参数:"+b2BInvoiceQueryByApplyRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
apie.printStackTrace();
|
|
|
return new RespR(false,apie.getMessage());
|
|
|
}
|
|
@@ -213,19 +231,21 @@ public class SelfCarInterfaceImpl implements SelfCarInterface{
|
|
|
@Override
|
|
|
public RespR<B2bInvoicePackageResponse> b2bInvoicePackage(B2bInvoicePackageRequest b2bInvoicePackageRequest) {
|
|
|
String fileName = b2bInvoicePackageRequest.getFilename();
|
|
|
+ long startTime = System.currentTimeMillis();
|
|
|
+
|
|
|
try {
|
|
|
log.info("SelfCarInterfaceImpl.b2bInvoicePackage上游请求参数:{}", b2bInvoicePackageRequest.toString());
|
|
|
//(4)指定协议的响应模型(IssuerUploadResponse),调用upload 发送数据
|
|
|
B2bInvoicePackageResponse response=ETCCommHelper.upload(fileName, b2bInvoicePackageRequest, B2bInvoicePackageResponse.class);
|
|
|
- log.info("SelfCarInterfaceImpl.b2bInvoicePackage上游接口返回:{},请求参数:{}", response.toString(), b2bInvoicePackageRequest.toString());
|
|
|
+ log.info("SelfCarInterfaceImpl.b2bInvoicePackage上游接口返回:{},请求参数:{},cost={}ms", response.toString(), b2bInvoicePackageRequest.toString(),System.currentTimeMillis()-startTime);
|
|
|
|
|
|
return new RespR<>(response);
|
|
|
} catch (IOException e) {
|
|
|
- log.error(e.getMessage()+ " ,请求参数:"+b2bInvoicePackageRequest.toString());
|
|
|
+ log.error(e.getMessage()+ " ,请求参数:"+b2bInvoicePackageRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
e.printStackTrace();
|
|
|
return new RespR(false,"网络异常,请联系管理人员");
|
|
|
}catch (ApiRequestException apie) {
|
|
|
- log.error(apie.getMessage()+ " ,请求参数:"+b2bInvoicePackageRequest.toString());
|
|
|
+ log.error(apie.getMessage()+ " ,请求参数:"+b2bInvoicePackageRequest.toString()+" ,cost="+(System.currentTimeMillis()-startTime)+"ms");
|
|
|
apie.printStackTrace();
|
|
|
return new RespR(false,apie.getMessage());
|
|
|
}
|