|
|
@@ -1,6 +1,10 @@
|
|
|
package com.ydtech.modules.order.components.pingan;
|
|
|
|
|
|
|
|
|
+import cn.hutool.core.util.HexUtil;
|
|
|
+import cn.hutool.crypto.SmUtil;
|
|
|
+import cn.hutool.crypto.asymmetric.SM2;
|
|
|
+import cn.hutool.crypto.symmetric.SM4;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.alibaba.fastjson.serializer.SerializerFeature;
|
|
|
@@ -14,6 +18,7 @@ import com.ydtech.modules.order.entity.api.pingan.constants.carConfirm.CarConfir
|
|
|
import com.ydtech.modules.order.entity.api.pingan.constants.dmvehicleInfo.DmvehicleInfoResponseCodeEnum;
|
|
|
import com.ydtech.modules.order.entity.api.pingan.constants.documentStatusList.DocumentStatusListResponseCodeEnum;
|
|
|
import com.ydtech.modules.order.entity.api.pingan.constants.index.IndexResposeCodeEnum;
|
|
|
+import com.ydtech.modules.order.entity.api.pingan.constants.notice.NoticeResponseCodeEnum;
|
|
|
import com.ydtech.modules.order.entity.api.pingan.constants.policyPdf.PolicyPdfResponseCodeEnum;
|
|
|
import com.ydtech.modules.order.entity.api.pingan.constants.quote.QuoteResponseCodeEnum;
|
|
|
import com.ydtech.modules.order.entity.api.pingan.constants.renewalConfirm.RenewalConfirmResponseCodeEnum;
|
|
|
@@ -25,12 +30,12 @@ import com.ydtech.modules.order.entity.api.pingan.constants.submitApply.SubmitAp
|
|
|
import com.ydtech.modules.order.entity.api.pingan.constants.unAutoProductDetail.UnAutoProductDetailResponseCodeEnum;
|
|
|
import com.ydtech.modules.order.entity.api.pingan.constants.unAutoProductList.UnAutoProductListResponseCodeEnum;
|
|
|
import com.ydtech.modules.order.entity.api.pingan.constants.uploadFiles.UploadFilesResponseCodeEnum;
|
|
|
+import com.ydtech.modules.order.entity.api.pingan.log.PinganApiLog;
|
|
|
import com.ydtech.modules.order.entity.api.pingan.request.*;
|
|
|
import com.ydtech.modules.order.entity.api.pingan.response.*;
|
|
|
-import com.ydtech.modules.order.entity.api.pingan.utils.PinAnEnumUtils;
|
|
|
-import com.ydtech.modules.order.entity.api.pingan.utils.RSAPINGANUtils;
|
|
|
import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.FieldEmptyException;
|
|
|
import com.ydtech.modules.order.entity.filter.CarModelsFilterUtils;
|
|
|
+import com.ydtech.modules.order.service.PinganApiLogService;
|
|
|
import com.ydtech.modules.order.utils.InsuranceLog;
|
|
|
import com.ydtech.utils.RequestIdUtils;
|
|
|
import com.ydtech.utils.StringUtils;
|
|
|
@@ -45,9 +50,6 @@ import org.springframework.stereotype.Component;
|
|
|
import org.springframework.web.client.RestTemplate;
|
|
|
|
|
|
import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
-import java.util.TreeMap;
|
|
|
-import java.util.TreeSet;
|
|
|
|
|
|
/**
|
|
|
* @author: hxl
|
|
|
@@ -102,20 +104,20 @@ public class PinganRequestApiComponents {
|
|
|
|
|
|
public static final Logger logger = LoggerFactory.getLogger(PinganRequestApiComponents.class);
|
|
|
|
|
|
+
|
|
|
+ private final PinganApiLogService pinganApiLogService;
|
|
|
/**
|
|
|
* @version
|
|
|
* @author: hxl
|
|
|
- * @Date: 2024/3/26 14:52
|
|
|
+ * @Date: 2024/3/26 14:52 1-1
|
|
|
* @Description: 通过客户端id和客户端密钥获取令牌
|
|
|
*/
|
|
|
- private String getToken(String url) throws Exception {
|
|
|
+ private String getToken(String url,PinganApiLog pinganApiLog) throws Exception {
|
|
|
HttpHeaders headers = new HttpHeaders();
|
|
|
HttpEntity<String> entity = new HttpEntity<>(headers);
|
|
|
RestTemplate restTemplate = new RestTemplate();
|
|
|
String clientId = properties.getClientId();
|
|
|
String clientSecret = properties.getClientSecret();
|
|
|
- logger.info("客户端id==========" + clientId);
|
|
|
- logger.info("客户端密钥==========" + clientSecret);
|
|
|
if(StringUtils.isEmpty(clientId)){
|
|
|
throw new SystemException("客户端id为空,请检查配置!!!");
|
|
|
}
|
|
|
@@ -127,6 +129,10 @@ public class PinganRequestApiComponents {
|
|
|
ResponseEntity<JSONObject> response = restTemplate.exchange(url, HttpMethod.GET, entity, JSONObject.class);
|
|
|
JSONObject body = response.getBody();
|
|
|
TokenResponse token = JSON.toJavaObject(body, TokenResponse.class);
|
|
|
+ String responseBody = JSON.toJSONString(token, SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty);
|
|
|
+ pinganApiLog.setRequestType("获取token");
|
|
|
+ pinganApiLog.setResponseBody(responseBody);
|
|
|
+ pinganApiLogService.save(pinganApiLog);
|
|
|
if (token != null) {
|
|
|
String expiresIn = token.getData().getExpires_in();
|
|
|
if (expiresIn != null && Integer.parseInt(expiresIn) > 0) {
|
|
|
@@ -135,13 +141,12 @@ public class PinganRequestApiComponents {
|
|
|
throw new SystemException("令牌已过期");
|
|
|
}
|
|
|
} else {
|
|
|
- throw new SystemException("返回值为空,请检查访问路径以及参数!!!");
|
|
|
+ throw new SystemException("获取token失败");
|
|
|
}
|
|
|
}catch (Exception e) {
|
|
|
throw new SystemException("接口请求异常,请检查请求路径以及参数");
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
/**
|
|
|
* 加密请求
|
|
|
*
|
|
|
@@ -152,38 +157,32 @@ public class PinganRequestApiComponents {
|
|
|
* @param <S> Response 响应体
|
|
|
* @return <S>
|
|
|
*/
|
|
|
- private <Q extends PingAnBaseRequest, S extends PingAnBaseResponse> S post(Q q, String url, Class<S> tClass, RequestUrl requestUrl) throws Exception {
|
|
|
+ private <Q extends PingAnBaseRequest, S extends PingAnBaseResponse> S post(Q q, String url, Class<S> tClass, RequestUrl requestUrl,PinganApiLog pinganApiLog) throws Exception {
|
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
|
//设置请求头类型
|
|
|
httpHeaders.add("Content-Type", "application/json;charset=utf-8");
|
|
|
httpHeaders.add("Accept", "application/json;charset=utf-8");
|
|
|
+ String token = getToken(properties.getAccessUrl(),pinganApiLog);
|
|
|
+ //拼接token和请求id
|
|
|
+ url = url + "/" + requestUrl.getUrl() + "?access_token=" + token + "&request_id=" + RequestIdUtils.createID(requestUrl.getCode());
|
|
|
String busReqString = JSON.toJSONString(q, SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty);
|
|
|
+ SM4 sm4 = SmUtil.sm4(HexUtil.decodeHex(properties.getPingAnPublicKey()));
|
|
|
//打印入参参数
|
|
|
InsuranceLog.infoLog(InsuranceEnum.PAIC.getPinyin(), "\n\t---------> {} \n\t---------> URl: {} \n\t---------> 请求参数:{}",
|
|
|
requestUrl.getCode() + "--" + requestUrl.getUrl() + "--" + requestUrl.getDesc(), url, busReqString);
|
|
|
-
|
|
|
- JSONObject jsonObject = (JSONObject) JSON.toJSON(q);
|
|
|
- String token = null;
|
|
|
- try{
|
|
|
- //获取令牌token
|
|
|
- token = getToken(properties.getAccessUrl());
|
|
|
- }catch (Exception e){
|
|
|
- throw new SystemException(e.getMessage());
|
|
|
- }
|
|
|
-
|
|
|
- if (token == null) {
|
|
|
- throw new SystemException("获取令牌接口失败");
|
|
|
- }
|
|
|
- //拼接token和请求id
|
|
|
- url = url + "/" + requestUrl.getUrl() + "?access_token=" + token + "&request_id=" + RequestIdUtils.createID(requestUrl.getCode());
|
|
|
- HttpEntity<String> httpEntity = new HttpEntity<>(jsonObject.toJSONString(), httpHeaders);
|
|
|
+ String jsonRequestParam = ((JSONObject) JSON.toJSON(q)).toJSONString();
|
|
|
+ //插入日志
|
|
|
+ pinganApiLog.setId(null);
|
|
|
+ pinganApiLog.setRequestUrl(url);
|
|
|
+ pinganApiLog.setRequestType(requestUrl.getDesc());
|
|
|
+ pinganApiLog.setRequestParam(busReqString);
|
|
|
+ HttpEntity<CommonRequest> httpEntity = new HttpEntity<>(getCommonRequest(jsonRequestParam,sm4), httpHeaders);
|
|
|
try{
|
|
|
+ //发送请求
|
|
|
ResponseEntity<String> response = restTemplate.postForEntity(url, httpEntity, String.class);
|
|
|
- String body = response.getBody();
|
|
|
- InsuranceLog.infoLog(InsuranceEnum.PAIC.getPinyin(), "\n\t---------> {} \n\t---------> 返回数据:{}", requestUrl.getCode() + "--" + requestUrl.getUrl() + "--" + requestUrl.getDesc(), body);
|
|
|
- return JSON.parseObject(body).toJavaObject(tClass);
|
|
|
+ return getCommonResponse(response.getBody(), requestUrl, sm4, tClass, url, pinganApiLog);
|
|
|
}catch (Exception e){
|
|
|
- throw new SystemException("接口请求异常,请检查请求路径以及参数");
|
|
|
+ throw new SystemException(e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -193,21 +192,8 @@ public class PinganRequestApiComponents {
|
|
|
* @Date: 2024/3/26 16:07
|
|
|
* @Description: 接口分装
|
|
|
*/
|
|
|
- public <Q extends PingAnBaseRequest, S extends PingAnBaseResponse> S verificationResponse(Q q, String url, Class<S> tClass,
|
|
|
- RequestUrl requestUrl) throws Exception {
|
|
|
- S response = post(q, url, tClass, requestUrl);
|
|
|
- if ("001".equals(requestUrl.getCode())) {
|
|
|
- //处理models[]数据会使用RSA公钥进行加密,合作伙伴使用RSA私钥进行解密
|
|
|
- SearchPAVehicleListResponse res = (SearchPAVehicleListResponse) response;
|
|
|
- String modelsStr = JSON.toJSONString(res, SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty);
|
|
|
- //解密
|
|
|
- logger.info("加密前的内容" + modelsStr);
|
|
|
- String modelsStrDec = RSAPINGANUtils.extracted(modelsStr, properties.getSelfPrivateKey());
|
|
|
- logger.info("解密后的内容" + modelsStrDec);
|
|
|
- SearchPAVehicleListResponse.ModelsDto models = JSON.parseObject(modelsStrDec).toJavaObject(SearchPAVehicleListResponse.ModelsDto.class);
|
|
|
- res.setModels((List<SearchPAVehicleListResponse.ModelsDto>) models);
|
|
|
- }
|
|
|
- //注意002 pdf的解密文件
|
|
|
+ public <Q extends PingAnBaseRequest, S extends PingAnBaseResponse> S verificationResponse(Q q, String url, Class<S> tClass, RequestUrl requestUrl,PinganApiLog pinganApiLog) throws Exception {
|
|
|
+ S response = post(q, url, tClass, requestUrl,pinganApiLog);
|
|
|
return response;
|
|
|
}
|
|
|
/**
|
|
|
@@ -228,41 +214,114 @@ public class PinganRequestApiComponents {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @Description 返回参数验证
|
|
|
- * @Author hxl
|
|
|
- * @Date 2024/4/1 9:37
|
|
|
- * @Param
|
|
|
- * @Return
|
|
|
- * @Exception
|
|
|
- *
|
|
|
- */
|
|
|
- private <Q extends PingAnBaseRequest, S extends PingAnBaseResponse> S getCheckResponseResult(Q q,Class<S> tClass,RequestUrl requestUrl,Class enumCodeClass) {
|
|
|
+ * @Description 返回参数验证
|
|
|
+ * @Author hxl
|
|
|
+ * @Date 2024/4/1 9:37
|
|
|
+ * @Param
|
|
|
+ * @Return
|
|
|
+ * @Exception
|
|
|
+ *
|
|
|
+ */
|
|
|
+ private <Q extends PingAnBaseRequest, S extends PingAnBaseResponse> S getCheckResponseResult(Q q,Class<S> tClass,RequestUrl requestUrl,Class enumCodeClass,PinganApiLog pinganApiLog) {
|
|
|
S response;
|
|
|
try {
|
|
|
- response = verificationResponse(q, properties.getUrl(), tClass, requestUrl);
|
|
|
- if(!"0".equals(response.getResultCode())){
|
|
|
- throw new SystemException(requestUrl.getCode()+"-"+requestUrl.getDesc()+"-"+requestUrl.getUrl()+"接口返回信息"+PinAnEnumUtils.getEnumValueByCode(enumCodeClass,response.getResultCode()));
|
|
|
- }
|
|
|
+ response = verificationResponse(q, properties.getUrl(), tClass, requestUrl,pinganApiLog);
|
|
|
} catch (Exception e) {
|
|
|
- throw new SystemException(requestUrl.getCode()+"-"+requestUrl.getDesc()+"-"+requestUrl.getUrl()+"接口报错:"+e.getMessage());
|
|
|
+ throw new SystemException(e.getMessage());
|
|
|
}
|
|
|
return response;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @version
|
|
|
+ * @author: hxl
|
|
|
+ * @Date: 2024/7/26 10:34
|
|
|
+ * @Description: 请求的验签+加密
|
|
|
+ */
|
|
|
+ public CommonRequest getCommonRequest(String jsonRequestParam, SM4 sm4){
|
|
|
+ SM2 sm2 = SmUtil.sm2(properties.getSelfPrivateKey(),properties.getSelfPublicKey());
|
|
|
+ String signStr = sm2.signHex(HexUtil.encodeHexStr(jsonRequestParam));
|
|
|
+ //验签
|
|
|
+ boolean verifyResult = sm2.verifyHex(HexUtil.encodeHexStr(jsonRequestParam),signStr);
|
|
|
+ String dataStr="";
|
|
|
+ if(verifyResult){
|
|
|
+ //加密
|
|
|
+ dataStr = sm4.encryptHex(jsonRequestParam);
|
|
|
+ }else{
|
|
|
+ throw new SystemException("验签失败!!!");
|
|
|
+ }
|
|
|
+ CommonRequest commonRequest =new CommonRequest();
|
|
|
+ commonRequest.setData(dataStr);
|
|
|
+ commonRequest.setSign(signStr);
|
|
|
+ return commonRequest;
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * @version
|
|
|
+ * @author: hxl
|
|
|
+ * @Date: 2024/7/26 10:41
|
|
|
+ * @Description: 解密获取返回的对象
|
|
|
+ */
|
|
|
+ public <Q extends PingAnBaseRequest, S extends PingAnBaseResponse> S getCommonResponse(String responseBody,RequestUrl requestUrl,SM4 sm4,Class<S> tClass,String url,PinganApiLog pinganApiLog){
|
|
|
+ //特殊处理
|
|
|
+ if("65".equals(requestUrl.getCode())){
|
|
|
+ DataResponse obj = JSON.parseObject(responseBody).toJavaObject(DataResponse.class);
|
|
|
+ String sm4DecodeResult = sm4.decryptStr(obj.getData());
|
|
|
+ InsuranceLog.infoLog(InsuranceEnum.PAIC.getPinyin(), "\n\t---------> {} \n\t---------> 返回数据:{}", requestUrl.getCode() + "--" + url + "--" + requestUrl.getDesc(), sm4DecodeResult);
|
|
|
+ return JSON.parseObject(sm4DecodeResult).toJavaObject(tClass);
|
|
|
+ }else{
|
|
|
+ CommonResponse obj = JSON.parseObject(responseBody).toJavaObject(CommonResponse.class);
|
|
|
+ pinganApiLog.setResponseType(obj.getRet());
|
|
|
+ if("0".equals(obj.getRet())){
|
|
|
+ //解密
|
|
|
+ CommonRequest data = obj.getData();
|
|
|
+ String sm4DecodeResult = sm4.decryptStr(data.getData());
|
|
|
+ InsuranceLog.infoLog(InsuranceEnum.PAIC.getPinyin(), "\n\t---------> {} \n\t---------> 返回数据:{}", requestUrl.getCode() + "--" + url + "--" + requestUrl.getDesc(), sm4DecodeResult);
|
|
|
+ pinganApiLog.setResponseBody(sm4DecodeResult);
|
|
|
+ //特殊处理
|
|
|
+ if ("42".equals(requestUrl.getCode())) {
|
|
|
+ JSONObject json = JSON.parseObject(sm4DecodeResult);
|
|
|
+ String bizQuoteBeginDate=json.getString("bizQuote.beginDate");
|
|
|
+ String bizQuoteSpecialCarDate=json.getString("bizQuote.specialCarDate");
|
|
|
+ String bizQuoteSpecialCarFlag=json.getString("bizQuote.specialCarFlag");
|
|
|
+ CarConfirmResponse resps =(CarConfirmResponse) JSON.parseObject(sm4DecodeResult).toJavaObject(tClass);
|
|
|
+ String forceQuoteBeginDate=json.getString("forceQuote.beginDate");
|
|
|
+ if("true".equals(bizQuoteSpecialCarFlag)){
|
|
|
+ bizQuoteSpecialCarFlag="1";
|
|
|
+ }else if("false".equals(bizQuoteSpecialCarFlag)){
|
|
|
+ bizQuoteSpecialCarFlag="0";
|
|
|
+ }
|
|
|
+ CarConfirmResponse.BizQuoteDTO bto=new CarConfirmResponse.BizQuoteDTO(bizQuoteBeginDate,bizQuoteSpecialCarDate,bizQuoteSpecialCarFlag);
|
|
|
+ CarConfirmResponse.ForceQuoteDTO forceDto = new CarConfirmResponse.ForceQuoteDTO(forceQuoteBeginDate);
|
|
|
+ resps.setBizQuote(bto);
|
|
|
+ resps.setForceQuote(forceDto);
|
|
|
+ return (S) resps;
|
|
|
+ }
|
|
|
+ pinganApiLogService.save(pinganApiLog);
|
|
|
+ return JSON.parseObject(sm4DecodeResult).toJavaObject(tClass);
|
|
|
+ }else{
|
|
|
+ pinganApiLog.setResponseBody(obj.getMsg());
|
|
|
+ pinganApiLogService.save(pinganApiLog);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* @version
|
|
|
* @author: hxl
|
|
|
* @Date: 2024/3/26 14:14
|
|
|
* @Description: 获取标的信息接口 3.1
|
|
|
*/
|
|
|
- public IndexResponse index(IndexRequest indexRequest) throws Exception {
|
|
|
+ public IndexResponse index(IndexRequest indexRequest,PinganApiLog pinganApiLog) throws Exception {
|
|
|
//验证入参数据
|
|
|
checkRequestParams(indexRequest);
|
|
|
//验证出参数据
|
|
|
IndexResponse indexResponse=null;
|
|
|
try {
|
|
|
- indexResponse = (IndexResponse)getCheckResponseResult(indexRequest,IndexResponse.class,RequestUrl.R_31,IndexResposeCodeEnum.class);
|
|
|
+ indexResponse = (IndexResponse)getCheckResponseResult(indexRequest,IndexResponse.class,RequestUrl.R_31,IndexResposeCodeEnum.class,pinganApiLog);
|
|
|
}catch (Exception e){
|
|
|
- throw new SystemException(e.getMessage());
|
|
|
+ throw new SystemException(e.getMessage());
|
|
|
}
|
|
|
return indexResponse;
|
|
|
}
|
|
|
@@ -278,23 +337,13 @@ public class PinganRequestApiComponents {
|
|
|
* 3.1的index接口返回1时调用
|
|
|
*
|
|
|
*/
|
|
|
- public RenewalConfirmResponse renewalConfirm(RenewalConfirmRequest renewalConfirmRequest) throws Exception {
|
|
|
- //签名加密
|
|
|
- Map<String, String> params = new TreeMap<>();
|
|
|
- params.put("flowid", renewalConfirmRequest.getFlowid());
|
|
|
- params.put("checkNo", renewalConfirmRequest.getCheckNo());
|
|
|
- params.put("userId", renewalConfirmRequest.getUserId());
|
|
|
- logger.info("加密前的内容" + params.toString());
|
|
|
- //添加加密内容
|
|
|
- String encryptContent = RSAPINGANUtils.getStringStringMap(params, properties.getSelfPrivateKey());
|
|
|
- logger.info("加密后的内容" + encryptContent);
|
|
|
- renewalConfirmRequest.setSignature(encryptContent);
|
|
|
+ public RenewalConfirmResponse renewalConfirm(RenewalConfirmRequest renewalConfirmRequest,PinganApiLog pinganApiLog) throws Exception {
|
|
|
//验证入参数据
|
|
|
checkRequestParams(renewalConfirmRequest);
|
|
|
//验证出参数据
|
|
|
RenewalConfirmResponse renewalConfirmResponse=null;
|
|
|
try {
|
|
|
- renewalConfirmResponse = (RenewalConfirmResponse)getCheckResponseResult(renewalConfirmRequest,RenewalConfirmResponse.class,RequestUrl.R_41, RenewalConfirmResponseCodeEnum.class);
|
|
|
+ renewalConfirmResponse = (RenewalConfirmResponse)getCheckResponseResult(renewalConfirmRequest,RenewalConfirmResponse.class,RequestUrl.R_41, RenewalConfirmResponseCodeEnum.class,pinganApiLog);
|
|
|
}catch (Exception e){
|
|
|
throw new SystemException(e.getMessage());
|
|
|
}
|
|
|
@@ -321,23 +370,13 @@ public class PinganRequestApiComponents {
|
|
|
* @param searchPAVehicleListRequest
|
|
|
* @return
|
|
|
*/
|
|
|
- public SearchPAVehicleListResponse searchPAVehicleList(SearchPAVehicleListRequest searchPAVehicleListRequest) throws Exception {
|
|
|
- //签名加密
|
|
|
- Map<String, String> params = new TreeMap<>();
|
|
|
- params.put("userId", searchPAVehicleListRequest.getUserId());
|
|
|
- params.put("keyword", searchPAVehicleListRequest.getKeyword());
|
|
|
- params.put("flowid", searchPAVehicleListRequest.getFlowid());
|
|
|
- logger.info("加密前的内容" + params.toString());
|
|
|
- //添加加密内容
|
|
|
- String encryptContent = RSAPINGANUtils.getStringStringMap(params, properties.getSelfPrivateKey());
|
|
|
- logger.info("加密后的内容" + encryptContent);
|
|
|
- searchPAVehicleListRequest.setSignature(encryptContent);
|
|
|
+ public SearchPAVehicleListResponse searchPAVehicleList(SearchPAVehicleListRequest searchPAVehicleListRequest,PinganApiLog pinganApiLog) throws Exception {
|
|
|
//验证入参数据
|
|
|
checkRequestParams(searchPAVehicleListRequest);
|
|
|
//验证出参数据
|
|
|
SearchPAVehicleListResponse searchPAVehicleListResponse=null;
|
|
|
try {
|
|
|
- searchPAVehicleListResponse = (SearchPAVehicleListResponse)getCheckResponseResult(searchPAVehicleListRequest,SearchPAVehicleListResponse.class, RequestUrl.R_001, SearchPAVehicleListResponseCodeEnum.class);
|
|
|
+ searchPAVehicleListResponse = (SearchPAVehicleListResponse)getCheckResponseResult(searchPAVehicleListRequest,SearchPAVehicleListResponse.class, RequestUrl.R_001, SearchPAVehicleListResponseCodeEnum.class,pinganApiLog);
|
|
|
}catch (Exception e){
|
|
|
throw new SystemException(e.getMessage());
|
|
|
}
|
|
|
@@ -350,25 +389,13 @@ public class PinganRequestApiComponents {
|
|
|
* @param policyPdfRequest
|
|
|
* @return
|
|
|
*/
|
|
|
- public PolicyPdfResponse getPolicyPdf(PolicyPdfRequest policyPdfRequest) throws Exception {
|
|
|
- //签名加密
|
|
|
- Map<String, String> params = new TreeMap<>();
|
|
|
- params.put("userId", policyPdfRequest.getUserId());
|
|
|
- params.put("documentNo", policyPdfRequest.getDocumentNo());
|
|
|
- params.put("checkNo", policyPdfRequest.getCheckNo());
|
|
|
- params.put("vehicle.licenseNo", policyPdfRequest.getVehicle() == null ? "" : policyPdfRequest.getVehicle().getLicenseNo());
|
|
|
- params.put("vehicle.frameNo", policyPdfRequest.getVehicle() == null ? "" : policyPdfRequest.getVehicle().getFrameNo());
|
|
|
- logger.info("加密前的内容" + params.toString());
|
|
|
- //添加加密内容
|
|
|
- String encryptContent = RSAPINGANUtils.getStringStringMap(params, properties.getSelfPrivateKey());
|
|
|
- logger.info("加密后的内容" + encryptContent);
|
|
|
- policyPdfRequest.setSignature(encryptContent);
|
|
|
+ public PolicyPdfResponse getPolicyPdf(PolicyPdfRequest policyPdfRequest,PinganApiLog pinganApiLog) throws Exception {
|
|
|
//验证入参数据
|
|
|
checkRequestParams(policyPdfRequest);
|
|
|
//验证出参数据
|
|
|
PolicyPdfResponse policyPdfResponse=null;
|
|
|
try {
|
|
|
- policyPdfResponse = (PolicyPdfResponse)getCheckResponseResult(policyPdfRequest,PolicyPdfResponse.class, RequestUrl.R_002,PolicyPdfResponseCodeEnum.class);
|
|
|
+ policyPdfResponse = (PolicyPdfResponse)getCheckResponseResult(policyPdfRequest,PolicyPdfResponse.class, RequestUrl.R_002,PolicyPdfResponseCodeEnum.class,pinganApiLog);
|
|
|
}catch (Exception e){
|
|
|
throw new SystemException(e.getMessage());
|
|
|
}
|
|
|
@@ -382,13 +409,13 @@ public class PinganRequestApiComponents {
|
|
|
* @param carConfirmRequest
|
|
|
* @return
|
|
|
*/
|
|
|
- public CarConfirmResponse carConfirm(CarConfirmRequest carConfirmRequest) throws Exception {
|
|
|
+ public CarConfirmResponse carConfirm(CarConfirmRequest carConfirmRequest,PinganApiLog pinganApiLog) throws Exception {
|
|
|
//验证入参数据
|
|
|
checkRequestParams(carConfirmRequest);
|
|
|
//验证出参数据
|
|
|
CarConfirmResponse carConfirmResponse=null;
|
|
|
try {
|
|
|
- carConfirmResponse = (CarConfirmResponse)getCheckResponseResult(carConfirmRequest,CarConfirmResponse.class, RequestUrl.R_42, CarConfirmResponseCodeEnum.class);
|
|
|
+ carConfirmResponse = (CarConfirmResponse)getCheckResponseResult(carConfirmRequest,CarConfirmResponse.class, RequestUrl.R_42, CarConfirmResponseCodeEnum.class,pinganApiLog);
|
|
|
}catch (Exception e){
|
|
|
throw new SystemException(e.getMessage());
|
|
|
}
|
|
|
@@ -401,13 +428,13 @@ public class PinganRequestApiComponents {
|
|
|
* @param dmvehicleInfoRequst
|
|
|
* @return
|
|
|
*/
|
|
|
- public DmvehicleInfoResponse getDmvehicleInfo(DmvehicleInfoRequst dmvehicleInfoRequst) throws Exception {
|
|
|
+ public DmvehicleInfoResponse getDmvehicleInfo(DmvehicleInfoRequst dmvehicleInfoRequst,PinganApiLog pinganApiLog) throws Exception {
|
|
|
//验证入参数据
|
|
|
checkRequestParams(dmvehicleInfoRequst);
|
|
|
//验证出参数据
|
|
|
DmvehicleInfoResponse dmvehicleInfoResponse=null;
|
|
|
try {
|
|
|
- dmvehicleInfoResponse = (DmvehicleInfoResponse)getCheckResponseResult(dmvehicleInfoRequst,DmvehicleInfoResponse.class, RequestUrl.R_43, DmvehicleInfoResponseCodeEnum.class);
|
|
|
+ dmvehicleInfoResponse = (DmvehicleInfoResponse)getCheckResponseResult(dmvehicleInfoRequst,DmvehicleInfoResponse.class, RequestUrl.R_43, DmvehicleInfoResponseCodeEnum.class,pinganApiLog);
|
|
|
}catch (Exception e){
|
|
|
throw new SystemException(e.getMessage());
|
|
|
}
|
|
|
@@ -420,13 +447,13 @@ public class PinganRequestApiComponents {
|
|
|
* @param unAutoProductListRequest
|
|
|
* @return
|
|
|
*/
|
|
|
- public UnAutoProductListResponse getUnAutoProductList(UnAutoProductListRequest unAutoProductListRequest) throws Exception {
|
|
|
+ public UnAutoProductListResponse getUnAutoProductList(UnAutoProductListRequest unAutoProductListRequest,PinganApiLog pinganApiLog) throws Exception {
|
|
|
//验证入参数据
|
|
|
- checkRequestParams(unAutoProductListRequest);
|
|
|
+ //checkRequestParams(unAutoProductListRequest);
|
|
|
//验证出参数据
|
|
|
UnAutoProductListResponse unAutoProductListResponse=null;
|
|
|
try {
|
|
|
- unAutoProductListResponse = (UnAutoProductListResponse)getCheckResponseResult(unAutoProductListRequest,UnAutoProductListResponse.class, RequestUrl.R_44, UnAutoProductListResponseCodeEnum.class);
|
|
|
+ unAutoProductListResponse = (UnAutoProductListResponse)getCheckResponseResult(unAutoProductListRequest,UnAutoProductListResponse.class, RequestUrl.R_44, UnAutoProductListResponseCodeEnum.class,pinganApiLog);
|
|
|
}catch (Exception e){
|
|
|
throw new SystemException(e.getMessage());
|
|
|
}
|
|
|
@@ -439,13 +466,13 @@ public class PinganRequestApiComponents {
|
|
|
* @param unAutoProductDetailRequest
|
|
|
* @return
|
|
|
*/
|
|
|
- public UnAutoProductDetailResponse getUnAutoProductDetail(UnAutoProductDetailRequest unAutoProductDetailRequest) throws Exception {
|
|
|
+ public UnAutoProductDetailResponse getUnAutoProductDetail(UnAutoProductDetailRequest unAutoProductDetailRequest,PinganApiLog pinganApiLog) throws Exception {
|
|
|
//验证入参数据
|
|
|
- checkRequestParams(unAutoProductDetailRequest);
|
|
|
+ // checkRequestParams(unAutoProductDetailRequest);
|
|
|
//验证出参数据
|
|
|
UnAutoProductDetailResponse unAutoProductDetailResponse=null;
|
|
|
try {
|
|
|
- unAutoProductDetailResponse = (UnAutoProductDetailResponse)getCheckResponseResult(unAutoProductDetailRequest,UnAutoProductDetailResponse.class, RequestUrl.R_45, UnAutoProductDetailResponseCodeEnum.class);
|
|
|
+ unAutoProductDetailResponse = (UnAutoProductDetailResponse)getCheckResponseResult(unAutoProductDetailRequest,UnAutoProductDetailResponse.class, RequestUrl.R_45, UnAutoProductDetailResponseCodeEnum.class,pinganApiLog);
|
|
|
}catch (Exception e){
|
|
|
throw new SystemException(e.getMessage());
|
|
|
}
|
|
|
@@ -458,13 +485,13 @@ public class PinganRequestApiComponents {
|
|
|
* @param quoteRequest
|
|
|
* @return
|
|
|
*/
|
|
|
- public QuoteResponse quote(QuoteRequest quoteRequest) throws Exception {
|
|
|
+ public QuoteResponse quote(QuoteRequest quoteRequest,PinganApiLog pinganApiLog) throws Exception {
|
|
|
//验证入参数据
|
|
|
checkRequestParams(quoteRequest);
|
|
|
//验证出参数据
|
|
|
QuoteResponse quoteResponse=null;
|
|
|
try {
|
|
|
- quoteResponse = (QuoteResponse)getCheckResponseResult(quoteRequest,QuoteResponse.class, RequestUrl.R_51, QuoteResponseCodeEnum.class);
|
|
|
+ quoteResponse = (QuoteResponse)getCheckResponseResult(quoteRequest,QuoteResponse.class, RequestUrl.R_51, QuoteResponseCodeEnum.class,pinganApiLog);
|
|
|
}catch (Exception e){
|
|
|
throw new SystemException(e.getMessage());
|
|
|
}
|
|
|
@@ -479,13 +506,13 @@ public class PinganRequestApiComponents {
|
|
|
* @param serviceContractRequest
|
|
|
* @return
|
|
|
*/
|
|
|
- public ServiceContractResponse queryServiceContract(ServiceContractRequest serviceContractRequest) throws Exception {
|
|
|
+ public ServiceContractResponse queryServiceContract(ServiceContractRequest serviceContractRequest,PinganApiLog pinganApiLog) throws Exception {
|
|
|
//验证入参数据
|
|
|
- checkRequestParams(serviceContractRequest);
|
|
|
+ //checkRequestParams(serviceContractRequest);
|
|
|
//验证出参数据
|
|
|
ServiceContractResponse serviceContractResponse=null;
|
|
|
try {
|
|
|
- serviceContractResponse = (ServiceContractResponse)getCheckResponseResult(serviceContractRequest,ServiceContractResponse.class, RequestUrl.R_52, ServiceContractResponseCodeEnum.class);
|
|
|
+ serviceContractResponse = (ServiceContractResponse)getCheckResponseResult(serviceContractRequest,ServiceContractResponse.class, RequestUrl.R_52, ServiceContractResponseCodeEnum.class,pinganApiLog);
|
|
|
}catch (Exception e){
|
|
|
throw new SystemException(e.getMessage());
|
|
|
}
|
|
|
@@ -502,13 +529,13 @@ public class PinganRequestApiComponents {
|
|
|
* @param submitApplyRequest
|
|
|
* @return
|
|
|
*/
|
|
|
- public SubmitApplyResponse submitApply(SubmitApplyRequest submitApplyRequest) throws Exception {
|
|
|
+ public SubmitApplyResponse submitApply(SubmitApplyRequest submitApplyRequest,PinganApiLog pinganApiLog) throws Exception {
|
|
|
//验证入参数据
|
|
|
checkRequestParams(submitApplyRequest);
|
|
|
//验证出参数据
|
|
|
SubmitApplyResponse submitApplyResponse=null;
|
|
|
try {
|
|
|
- submitApplyResponse = (SubmitApplyResponse)getCheckResponseResult(submitApplyRequest,SubmitApplyResponse.class,RequestUrl.R_61, SubmitApplyResponseCodeEnum.class);
|
|
|
+ submitApplyResponse = (SubmitApplyResponse)getCheckResponseResult(submitApplyRequest,SubmitApplyResponse.class,RequestUrl.R_61, SubmitApplyResponseCodeEnum.class,pinganApiLog);
|
|
|
}catch (Exception e){
|
|
|
throw new SystemException(e.getMessage());
|
|
|
}
|
|
|
@@ -523,13 +550,13 @@ public class PinganRequestApiComponents {
|
|
|
* @param scanCodeURLRequest
|
|
|
* @return
|
|
|
*/
|
|
|
- public ScanCodeURLResponse getScanCodeURL(ScanCodeURLRequest scanCodeURLRequest) throws Exception {
|
|
|
+ public ScanCodeURLResponse getScanCodeURL(ScanCodeURLRequest scanCodeURLRequest,PinganApiLog pinganApiLog) throws Exception {
|
|
|
//验证入参数据
|
|
|
checkRequestParams(scanCodeURLRequest);
|
|
|
//验证出参数据
|
|
|
ScanCodeURLResponse scanCodeURLResponse=null;
|
|
|
try {
|
|
|
- scanCodeURLResponse = (ScanCodeURLResponse)getCheckResponseResult(scanCodeURLRequest,ScanCodeURLResponse.class, RequestUrl.R_78, ScanCodeURLResponseCodeEnum.class);
|
|
|
+ scanCodeURLResponse = (ScanCodeURLResponse)getCheckResponseResult(scanCodeURLRequest,ScanCodeURLResponse.class, RequestUrl.R_78, ScanCodeURLResponseCodeEnum.class,pinganApiLog);
|
|
|
}catch (Exception e){
|
|
|
throw new SystemException(e.getMessage());
|
|
|
}
|
|
|
@@ -544,13 +571,13 @@ public class PinganRequestApiComponents {
|
|
|
* @param acceptRequest
|
|
|
* @return
|
|
|
*/
|
|
|
- public AcceptResponse accept(AcceptRequest acceptRequest) throws Exception {
|
|
|
+ public AcceptResponse accept(AcceptRequest acceptRequest,PinganApiLog pinganApiLog) throws Exception {
|
|
|
//验证入参数据
|
|
|
checkRequestParams(acceptRequest);
|
|
|
//验证出参数据
|
|
|
AcceptResponse acceptResponse=null;
|
|
|
try {
|
|
|
- acceptResponse = (AcceptResponse)getCheckResponseResult(acceptRequest,AcceptResponse.class, RequestUrl.R_82, AcceptResponseCodeEnum.class);
|
|
|
+ acceptResponse = (AcceptResponse)getCheckResponseResult(acceptRequest,AcceptResponse.class, RequestUrl.R_82, AcceptResponseCodeEnum.class,pinganApiLog);
|
|
|
}catch (Exception e){
|
|
|
throw new SystemException(e.getMessage());
|
|
|
}
|
|
|
@@ -570,33 +597,13 @@ public class PinganRequestApiComponents {
|
|
|
* @param documentStatusListRequest
|
|
|
* @return
|
|
|
*/
|
|
|
- public DocumentStatusListResponse getDocumentStatusList(DocumentStatusListRequest documentStatusListRequest) throws Exception {
|
|
|
- //签名加密
|
|
|
- Map<String, String> params = new TreeMap<>();
|
|
|
- params.put("userId", documentStatusListRequest.getUserId());
|
|
|
- //documentNoList排序加逗号拼接
|
|
|
- String[] documentNoList = documentStatusListRequest.getDocumentNoList();
|
|
|
- TreeSet<String> treeSet = new TreeSet<>();
|
|
|
- for (String documentNo : documentNoList) {
|
|
|
- treeSet.add(documentNo);
|
|
|
- }
|
|
|
- String documentNoListStr = "";
|
|
|
- for (String documentNoSort : treeSet) {
|
|
|
- documentNoListStr += ",";
|
|
|
- }
|
|
|
- params.put("documentNoList", documentNoListStr.substring(0, documentNoListStr.length() - 1));
|
|
|
- //添加加密内容
|
|
|
- logger.info("加密前的内容" + params.toString());
|
|
|
- //添加加密内容
|
|
|
- String encryptContent = RSAPINGANUtils.getStringStringMap(params, properties.getSelfPrivateKey());
|
|
|
- logger.info("加密后的内容" + encryptContent);
|
|
|
- documentStatusListRequest.setSignature(encryptContent);
|
|
|
+ public DocumentStatusListResponse getDocumentStatusList(DocumentStatusListRequest documentStatusListRequest,PinganApiLog pinganApiLog) throws Exception {
|
|
|
//验证入参数据
|
|
|
checkRequestParams(documentStatusListRequest);
|
|
|
//验证出参数据
|
|
|
DocumentStatusListResponse documentStatusListResponse=null;
|
|
|
try {
|
|
|
- documentStatusListResponse = (DocumentStatusListResponse)getCheckResponseResult(documentStatusListRequest,DocumentStatusListResponse.class, RequestUrl.R_91, DocumentStatusListResponseCodeEnum.class);
|
|
|
+ documentStatusListResponse = (DocumentStatusListResponse)getCheckResponseResult(documentStatusListRequest,DocumentStatusListResponse.class, RequestUrl.R_91, DocumentStatusListResponseCodeEnum.class,pinganApiLog);
|
|
|
}catch (Exception e){
|
|
|
throw new SystemException(e.getMessage());
|
|
|
}
|
|
|
@@ -610,13 +617,13 @@ public class PinganRequestApiComponents {
|
|
|
* @param repealDocumentRequest
|
|
|
* @return
|
|
|
*/
|
|
|
- public RepealDocumentResponse repealDocument(RepealDocumentRequest repealDocumentRequest) throws Exception {
|
|
|
+ public RepealDocumentResponse repealDocument(RepealDocumentRequest repealDocumentRequest,PinganApiLog pinganApiLog) throws Exception {
|
|
|
//验证入参数据
|
|
|
checkRequestParams(repealDocumentRequest);
|
|
|
//验证出参数据
|
|
|
RepealDocumentResponse repealDocumentResponse=null;
|
|
|
try {
|
|
|
- repealDocumentResponse = (RepealDocumentResponse)getCheckResponseResult(repealDocumentRequest,RepealDocumentResponse.class, RequestUrl.R_92, RepealDocumentResponseCodeEnum.class);
|
|
|
+ repealDocumentResponse = (RepealDocumentResponse)getCheckResponseResult(repealDocumentRequest,RepealDocumentResponse.class, RequestUrl.R_92, RepealDocumentResponseCodeEnum.class,pinganApiLog);
|
|
|
}catch (Exception e){
|
|
|
throw new SystemException(e.getMessage());
|
|
|
}
|
|
|
@@ -630,16 +637,280 @@ public class PinganRequestApiComponents {
|
|
|
* @param uploadFilesRequest
|
|
|
* @return
|
|
|
*/
|
|
|
- public UploadFilesResponse uploadFiles(UploadFilesRequest uploadFilesRequest) throws Exception {
|
|
|
+ public UploadFilesResponse uploadFiles(UploadFilesRequest uploadFilesRequest,PinganApiLog pinganApiLog) throws Exception {
|
|
|
//验证入参数据
|
|
|
checkRequestParams(uploadFilesRequest);
|
|
|
//验证出参数据
|
|
|
UploadFilesResponse uploadFilesResponse=null;
|
|
|
try {
|
|
|
- uploadFilesResponse = (UploadFilesResponse)getCheckResponseResult(uploadFilesRequest,UploadFilesResponse.class, RequestUrl.R_93, UploadFilesResponseCodeEnum.class);
|
|
|
+ uploadFilesResponse = (UploadFilesResponse)getCheckResponseResult(uploadFilesRequest,UploadFilesResponse.class, RequestUrl.R_93, UploadFilesResponseCodeEnum.class,pinganApiLog);
|
|
|
}catch (Exception e){
|
|
|
throw new SystemException(e.getMessage());
|
|
|
}
|
|
|
return uploadFilesResponse;
|
|
|
}
|
|
|
+ /**
|
|
|
+ * @version
|
|
|
+ * @author: hxl
|
|
|
+ * @Date: 2024/7/22 17:08
|
|
|
+ * @Description: 65 查看电子保单的H5页面
|
|
|
+ */
|
|
|
+ public SignEleApplyResponse signEleApply(SignEleApplyRequest signEleApplyRequest,PinganApiLog pinganApiLog) throws Exception {
|
|
|
+ //验证入参数据
|
|
|
+ checkRequestParams(signEleApplyRequest);
|
|
|
+ //验证出参数据
|
|
|
+ SignEleApplyResponse signEleApplyResponse=null;
|
|
|
+ try {
|
|
|
+ signEleApplyResponse = (SignEleApplyResponse)getCheckResponseResult(signEleApplyRequest,SignEleApplyResponse.class, RequestUrl.R_65, NoticeResponseCodeEnum.class,pinganApiLog);
|
|
|
+ }catch (Exception e){
|
|
|
+ throw new SystemException(e.getMessage());
|
|
|
+ }
|
|
|
+ return signEleApplyResponse;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @version
|
|
|
+ * @author: hxl
|
|
|
+ * @Date: 2024/7/22 17:08
|
|
|
+ * @Description: 63 短信验证
|
|
|
+ */
|
|
|
+ public ApplyVerifyCodeResponse getApplyVerifyCode(ApplyVerifyCodeRequest applyVerifyCodeRequest,PinganApiLog pinganApiLog) throws Exception {
|
|
|
+ //验证入参数据
|
|
|
+ checkRequestParams(applyVerifyCodeRequest);
|
|
|
+ //验证出参数据
|
|
|
+ ApplyVerifyCodeResponse applyVerifyCodeResponse=null;
|
|
|
+ try {
|
|
|
+ applyVerifyCodeResponse = (ApplyVerifyCodeResponse)getCheckResponseResult(applyVerifyCodeRequest,ApplyVerifyCodeResponse.class, RequestUrl.R_63, NoticeResponseCodeEnum.class,pinganApiLog);
|
|
|
+ }catch (Exception e){
|
|
|
+ throw new SystemException(e.getMessage());
|
|
|
+ }
|
|
|
+ return applyVerifyCodeResponse;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @version
|
|
|
+ * @author: hxl
|
|
|
+ * @Date: 2024/7/22 17:08
|
|
|
+ * @Description: 65 电子保单是否阅读
|
|
|
+ */
|
|
|
+ public RecoverApplyVerifyCodeResponse recoverApplyVerifyCode(RecoverApplyVerifyCodeRequest recoverApplyVerifyCodeRequest,PinganApiLog pinganApiLog) throws Exception {
|
|
|
+ //验证入参数据
|
|
|
+ checkRequestParams(recoverApplyVerifyCodeRequest);
|
|
|
+ //验证出参数据
|
|
|
+ RecoverApplyVerifyCodeResponse recoverApplyVerifyCodeResponse=null;
|
|
|
+ try {
|
|
|
+ recoverApplyVerifyCodeResponse = (RecoverApplyVerifyCodeResponse)getCheckResponseResult(recoverApplyVerifyCodeRequest,RecoverApplyVerifyCodeResponse.class, RequestUrl.R_64, NoticeResponseCodeEnum.class,pinganApiLog);
|
|
|
+ }catch (Exception e){
|
|
|
+ throw new SystemException(e.getMessage());
|
|
|
+ }
|
|
|
+ return recoverApplyVerifyCodeResponse;
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * @version
|
|
|
+ * @author: hxl
|
|
|
+ * @Date: 2024/7/22 15:40
|
|
|
+ * @Description: 生成通知单号
|
|
|
+ */
|
|
|
+ public NoticeDoResponse createNoticeNo(NoticeDoRequest noticeDoRequest,PinganApiLog pinganApiLog) throws Exception {
|
|
|
+ //验证入参数据
|
|
|
+ checkRequestParams(noticeDoRequest);
|
|
|
+ //验证出参数据
|
|
|
+ NoticeDoResponse noticeDoResponse=null;
|
|
|
+ try {
|
|
|
+ noticeDoResponse = (NoticeDoResponse)getCheckResponseResult(noticeDoRequest,NoticeDoResponse.class, RequestUrl.R_72, NoticeResponseCodeEnum.class,pinganApiLog);
|
|
|
+ }catch (Exception e){
|
|
|
+ throw new SystemException(e.getMessage());
|
|
|
+ }
|
|
|
+ return noticeDoResponse;
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * @version
|
|
|
+ * @author: hxl
|
|
|
+ * @Date: 2024/7/22 19:04
|
|
|
+ * @Description: 好车主支付
|
|
|
+ */
|
|
|
+ public ViewToPayResponse viewToPay(ViewToPayRequest viewToPayRequest,PinganApiLog pinganApiLog) {
|
|
|
+ //验证入参数据
|
|
|
+ checkRequestParams(viewToPayRequest);
|
|
|
+ //验证出参数据
|
|
|
+ ViewToPayResponse viewToPayResponse=null;
|
|
|
+ try {
|
|
|
+ viewToPayResponse = (ViewToPayResponse)getCheckResponseResult(viewToPayRequest,ViewToPayResponse.class, RequestUrl.R_71, NoticeResponseCodeEnum.class,pinganApiLog);
|
|
|
+ }catch (Exception e){
|
|
|
+ throw new SystemException(e.getMessage());
|
|
|
+ }
|
|
|
+ return viewToPayResponse;
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * @version
|
|
|
+ * @author: hxl
|
|
|
+ * @Date: 2024/7/23 10:56
|
|
|
+ * @Description: 获取平安门店柜面信息
|
|
|
+ */
|
|
|
+ public StorefrontResponse getStorefrontList(StorefrontRequest storefrontRequest,PinganApiLog pinganApiLog) {
|
|
|
+ //验证入参数据
|
|
|
+ checkRequestParams(storefrontRequest);
|
|
|
+ //验证出参数据
|
|
|
+ StorefrontResponse storefrontResponse=null;
|
|
|
+ try {
|
|
|
+ storefrontResponse = (StorefrontResponse)getCheckResponseResult(storefrontRequest,StorefrontResponse.class, RequestUrl.R_67, NoticeResponseCodeEnum.class,pinganApiLog);
|
|
|
+ }catch (Exception e){
|
|
|
+ throw new SystemException(e.getMessage());
|
|
|
+ }
|
|
|
+ return storefrontResponse;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @version
|
|
|
+ * @author: hxl
|
|
|
+ * @Date: 2024/7/23 10:56
|
|
|
+ * @Description: 查询事后未上传资料清单
|
|
|
+ */
|
|
|
+ public SupplementMaterialResponse querySupplementMaterial(SupplementMaterialRequest supplementMaterialRequest,PinganApiLog pinganApiLog) {
|
|
|
+ //验证入参数据
|
|
|
+ checkRequestParams(supplementMaterialRequest);
|
|
|
+ //验证出参数据
|
|
|
+ SupplementMaterialResponse supplementMaterialResponse=null;
|
|
|
+ try {
|
|
|
+ supplementMaterialResponse = (SupplementMaterialResponse)getCheckResponseResult(supplementMaterialRequest,SupplementMaterialResponse.class, RequestUrl.R_94, NoticeResponseCodeEnum.class,pinganApiLog);
|
|
|
+ }catch (Exception e){
|
|
|
+ throw new SystemException(e.getMessage());
|
|
|
+ }
|
|
|
+ return supplementMaterialResponse;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @version
|
|
|
+ * @author: hxl
|
|
|
+ * @Date: 2024/7/23 10:56
|
|
|
+ * @Description: 短信验证 全国
|
|
|
+ */
|
|
|
+ public SendApplyPolicyResponse sendApplyPolicy(SendApplyPolicyRequest sendApplyPolicyRequest,PinganApiLog pinganApiLog) {
|
|
|
+ //验证入参数据
|
|
|
+ checkRequestParams(sendApplyPolicyRequest);
|
|
|
+ //验证出参数据
|
|
|
+ SendApplyPolicyResponse sendApplyPolicyResponse=null;
|
|
|
+ try {
|
|
|
+ sendApplyPolicyResponse = (SendApplyPolicyResponse)getCheckResponseResult(sendApplyPolicyRequest,SendApplyPolicyResponse.class, RequestUrl.R_67, NoticeResponseCodeEnum.class,pinganApiLog);
|
|
|
+ }catch (Exception e){
|
|
|
+ throw new SystemException(e.getMessage());
|
|
|
+ }
|
|
|
+ return sendApplyPolicyResponse;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @version
|
|
|
+ * @author: hxl
|
|
|
+ * @Date: 2024/7/23 10:56
|
|
|
+ * @Description: 身份验证 67
|
|
|
+ */
|
|
|
+ public BeiJingIdAcquisitionResponse beiJingIdAcquisition(BeiJingIdAcquisitionRequest beiJingIdAcquisitionRequest,PinganApiLog pinganApiLog) {
|
|
|
+ //验证入参数据
|
|
|
+ checkRequestParams(beiJingIdAcquisitionRequest);
|
|
|
+ //验证出参数据
|
|
|
+ BeiJingIdAcquisitionResponse beiJingIdAcquisitionResponse=null;
|
|
|
+ try {
|
|
|
+ beiJingIdAcquisitionResponse = (BeiJingIdAcquisitionResponse)getCheckResponseResult(beiJingIdAcquisitionRequest,BeiJingIdAcquisitionResponse.class, RequestUrl.R_67, NoticeResponseCodeEnum.class,pinganApiLog);
|
|
|
+ }catch (Exception e){
|
|
|
+ throw new SystemException(e.getMessage());
|
|
|
+ }
|
|
|
+ return beiJingIdAcquisitionResponse;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @version
|
|
|
+ * @author: hxl
|
|
|
+ * @Date: 2024/7/23 10:56
|
|
|
+ * @Description: 平安新CPC收银台 7.10
|
|
|
+ */
|
|
|
+ public ChexianStandardPrePaymentResponse chexianStandardPrePayment(ChexianStandardPrePaymentRequest chexianStandardPrePaymentRequest,PinganApiLog pinganApiLog) {
|
|
|
+ //验证入参数据
|
|
|
+ checkRequestParams(chexianStandardPrePaymentRequest);
|
|
|
+ //验证出参数据
|
|
|
+ ChexianStandardPrePaymentResponse chexianStandardPrePaymentResponse=null;
|
|
|
+ try {
|
|
|
+ chexianStandardPrePaymentResponse = (ChexianStandardPrePaymentResponse)getCheckResponseResult(chexianStandardPrePaymentRequest,ChexianStandardPrePaymentResponse.class, RequestUrl.R_710, NoticeResponseCodeEnum.class,pinganApiLog);
|
|
|
+ }catch (Exception e){
|
|
|
+ throw new SystemException(e.getMessage());
|
|
|
+ }
|
|
|
+ return chexianStandardPrePaymentResponse;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @version
|
|
|
+ * @author: hxl
|
|
|
+ * @Date: 2024/7/23 10:56
|
|
|
+ * @Description: 支付实名认证建议在noticeDo接口进行 73
|
|
|
+ */
|
|
|
+ public NoticeAuthResponse noticeAuth(NoticeAuthRequest noticeAuthRequest,PinganApiLog pinganApiLog) {
|
|
|
+ //验证入参数据
|
|
|
+ checkRequestParams(noticeAuthRequest);
|
|
|
+ //验证出参数据
|
|
|
+ NoticeAuthResponse noticeAuthResponse=null;
|
|
|
+ try {
|
|
|
+ noticeAuthResponse = (NoticeAuthResponse)getCheckResponseResult(noticeAuthRequest,NoticeAuthResponse.class, RequestUrl.R_73, NoticeResponseCodeEnum.class,pinganApiLog);
|
|
|
+ }catch (Exception e){
|
|
|
+ throw new SystemException(e.getMessage());
|
|
|
+ }
|
|
|
+ return noticeAuthResponse;
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * @version
|
|
|
+ * @author: hxl
|
|
|
+ * @Date: 2024/7/23 10:56
|
|
|
+ * @Description: 支付之前查询通知单内容 74
|
|
|
+ */
|
|
|
+ public GetNoticeInfoResponse getNoticeInfo(GetNoticeInfoRequest getNoticeInfoRequest,PinganApiLog pinganApiLog) {
|
|
|
+ //验证入参数据
|
|
|
+ checkRequestParams(getNoticeInfoRequest);
|
|
|
+ //验证出参数据
|
|
|
+ GetNoticeInfoResponse getNoticeInfoResponse=null;
|
|
|
+ try {
|
|
|
+ getNoticeInfoResponse = (GetNoticeInfoResponse)getCheckResponseResult(getNoticeInfoRequest,GetNoticeInfoResponse.class, RequestUrl.R_74, NoticeResponseCodeEnum.class,pinganApiLog);
|
|
|
+ }catch (Exception e){
|
|
|
+ throw new SystemException(e.getMessage());
|
|
|
+ }
|
|
|
+ return getNoticeInfoResponse;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @version
|
|
|
+ * @author: hxl
|
|
|
+ * @Date: 2024/7/23 10:56
|
|
|
+ * @Description: 支付到账通知平安 75
|
|
|
+ */
|
|
|
+ public NoticeDoneResponse noticeDone(NoticeDoneRequest noticeDoneRequest,PinganApiLog pinganApiLog) {
|
|
|
+ //验证入参数据
|
|
|
+ checkRequestParams(noticeDoneRequest);
|
|
|
+ //验证出参数据
|
|
|
+ NoticeDoneResponse noticeDoneResponse=null;
|
|
|
+ try {
|
|
|
+ noticeDoneResponse = (NoticeDoneResponse)getCheckResponseResult(noticeDoneRequest,NoticeDoneResponse.class, RequestUrl.R_75, NoticeResponseCodeEnum.class,pinganApiLog);
|
|
|
+ }catch (Exception e){
|
|
|
+ throw new SystemException(e.getMessage());
|
|
|
+ }
|
|
|
+ return noticeDoneResponse;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @version
|
|
|
+ * @author: hxl
|
|
|
+ * @Date: 2024/7/23 10:56
|
|
|
+ * @Description: 获取微信缴费实名认证结果 79
|
|
|
+ */
|
|
|
+ public GetWechatAuthInfoResponse getWechatAuthInfo(GetWechatAuthInfoRequest getWechatAuthInfoRequest,PinganApiLog pinganApiLog) {
|
|
|
+ //验证入参数据
|
|
|
+ checkRequestParams(getWechatAuthInfoRequest);
|
|
|
+ //验证出参数据
|
|
|
+ GetWechatAuthInfoResponse getWechatAuthInfoResponse=null;
|
|
|
+ try {
|
|
|
+ getWechatAuthInfoResponse = (GetWechatAuthInfoResponse)getCheckResponseResult(getWechatAuthInfoRequest,GetWechatAuthInfoResponse.class, RequestUrl.R_79, NoticeResponseCodeEnum.class,pinganApiLog);
|
|
|
+ }catch (Exception e){
|
|
|
+ throw new SystemException(e.getMessage());
|
|
|
+ }
|
|
|
+ return getWechatAuthInfoResponse;
|
|
|
+ }
|
|
|
}
|