|
@@ -2,7 +2,18 @@ package com.jkcredit.invoice.service.upservice.impl;
|
|
|
|
|
|
import cn.com.taiji.common.manager.net.http.binclient.ApiRequestException;
|
|
|
import cn.com.taiji.sdk.comm.ETCCommHelper;
|
|
|
-import cn.com.taiji.sdk.model.comm.protocol.eoms.company.*;
|
|
|
+import cn.com.taiji.sdk.model.comm.protocol.eoms.company.B2bContractAddRequest;
|
|
|
+import cn.com.taiji.sdk.model.comm.protocol.eoms.company.B2bContractAddResponse;
|
|
|
+import cn.com.taiji.sdk.model.comm.protocol.eoms.company.B2bContractQueryRequest;
|
|
|
+import cn.com.taiji.sdk.model.comm.protocol.eoms.company.B2bContractQueryResponse;
|
|
|
+import cn.com.taiji.sdk.model.comm.protocol.eoms.company.CompanyAddRequest;
|
|
|
+import cn.com.taiji.sdk.model.comm.protocol.eoms.company.CompanyAddResponse;
|
|
|
+import cn.com.taiji.sdk.model.comm.protocol.eoms.company.CompanyEditRequest;
|
|
|
+import cn.com.taiji.sdk.model.comm.protocol.eoms.company.CompanyEditResponse;
|
|
|
+import cn.com.taiji.sdk.model.comm.protocol.eoms.company.CompanyQueryRequest;
|
|
|
+import cn.com.taiji.sdk.model.comm.protocol.eoms.company.CompanyQueryResponse;
|
|
|
+import cn.com.taiji.sdk.model.comm.protocol.eoms.company.ConfirmContractAddRequest;
|
|
|
+import cn.com.taiji.sdk.model.comm.protocol.eoms.company.ConfirmContractAddResponse;
|
|
|
import com.jkcredit.invoice.service.upservice.CommInterFace;
|
|
|
import com.jkcredit.invoice.util.RespR;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -133,4 +144,26 @@ public class CommInterFaceImpl implements CommInterFace {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public RespR<CompanyEditResponse> editEmail(CompanyEditRequest companyEditRequest) {
|
|
|
+ String fileName = companyEditRequest.getFilename();
|
|
|
+ long startTime = System.currentTimeMillis();
|
|
|
+ try {
|
|
|
+ log.info("CommInterFaceImpl.editEmail上游请求参数:{}", companyEditRequest.toString());
|
|
|
+ //(4)指定协议的响应模型(IssuerUploadResponse),调用upload 发送数据
|
|
|
+ CompanyEditResponse response = ETCCommHelper.upload(fileName, companyEditRequest, CompanyEditResponse.class);
|
|
|
+ log.info("CommInterFaceImpl.editEmail上游接口返回:{},请求参数:{},cost={}ms", response.toString(), companyEditRequest.toString(), System.currentTimeMillis() - startTime);
|
|
|
+
|
|
|
+ return new RespR<>(response);
|
|
|
+ } catch (IOException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ log.error("CommInterFaceImpl.editEmail:{}", e.getMessage() + " ,请求参数:" + companyEditRequest.toString() + " ,cost=" + (System.currentTimeMillis() - startTime) + "ms");
|
|
|
+ return new RespR(false, "网络异常,请联系管理人员");
|
|
|
+ } catch (ApiRequestException apie) {
|
|
|
+ apie.printStackTrace();
|
|
|
+ log.error("CommInterFaceImpl.editEmail:{}", apie.getMessage().replaceAll("[\r\n]", "") + " ,请求参数:" + companyEditRequest.toString() + " ,cost=" + (System.currentTimeMillis() - startTime) + "ms");
|
|
|
+ return new RespR(false, apie.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|