|
@@ -0,0 +1,365 @@
|
|
|
|
+package info.aspirecn.iov.sjjh.supplier10000039.service;
|
|
|
|
+
|
|
|
|
+import java.io.IOException;
|
|
|
|
+import java.text.DateFormat;
|
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
|
+import java.util.ArrayList;
|
|
|
|
+import java.util.List;
|
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
|
+
|
|
|
|
+import info.aspirecn.iov.sjjh.supplier10000039.util.Sm3Utils;
|
|
|
|
+import org.aiav.eid.clouddecode.apsdk.constants.PublicParam;
|
|
|
|
+import org.aiav.eid.clouddecode.apsdk.pojo.request.EidImageCompareParam;
|
|
|
|
+import org.aiav.eid.clouddecode.apsdk.pojo.result.CommonResult;
|
|
|
|
+import org.aiav.eid.clouddecode.apsdk.service.EidlinkService;
|
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
|
+import org.elasticsearch.index.query.BoolQueryBuilder;
|
|
|
|
+import org.elasticsearch.index.query.QueryBuilders;
|
|
|
|
+import org.elasticsearch.search.builder.SearchSourceBuilder;
|
|
|
|
+import org.elasticsearch.search.sort.SortOrder;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
|
+
|
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
|
+import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
|
+import com.google.gson.JsonArray;
|
|
|
|
+import com.google.gson.JsonObject;
|
|
|
|
+import info.aspirecn.iov.sjjh.commons.lang.ChannelTypeHandleResponseObject;
|
|
|
|
+import info.aspirecn.iov.sjjh.commons.lang.Constant;
|
|
|
|
+import info.aspirecn.iov.sjjh.supplier10000039.util.CheckUtils;
|
|
|
|
+import info.aspirecn.iov.sjjh.supplier10000039.util.DateUtil;
|
|
|
|
+import info.aspirecn.iov.sjjh.supplier10000039.vo.DriverVerificationRequestObject;
|
|
|
|
+import info.aspirecn.iov.sjjh.supplier10000039.vo.ResultBody;
|
|
|
|
+import info.aspirecn.iov.sjjh.supplier10000039.vo.UserLiveRequestObject;
|
|
|
|
+import info.aspirecn.iov.sjjh.supplier10000039.vo.UserLiveResponseObject;
|
|
|
|
+import info.aspirecn.iov.sjjh.supplier10000039.vo.VoucherLiveRequestObject;
|
|
|
|
+import info.aspirecn.iov.sjjh.supplier10000039.vo.VoucherLiveResponseObject;
|
|
|
|
+import info.aspirecn.rdc.aspirecloud.node.except.utils.ErrorUtils;
|
|
|
|
+import io.searchbox.client.JestClient;
|
|
|
|
+import io.searchbox.core.Search;
|
|
|
|
+import io.searchbox.core.SearchResult;
|
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ *
|
|
|
|
+ * @author bzh
|
|
|
|
+ *
|
|
|
|
+ */
|
|
|
|
+@Slf4j
|
|
|
|
+@Service
|
|
|
|
+public class Supplier10000039ServiceImpl implements Supplier10000039Service {
|
|
|
|
+
|
|
|
|
+ @Value("${supplier.eIdLinkIp}")
|
|
|
|
+ private String eIdLinkIp;
|
|
|
|
+ @Value("${supplier.eIdLinkPort}")
|
|
|
|
+ private int eIdLinkPort;
|
|
|
|
+ @Value("${supplier.appId}")
|
|
|
|
+ private String appId;
|
|
|
|
+ @Value("${supplier.appKey}")
|
|
|
|
+ private String appKey;
|
|
|
|
+ @Value("${firstIndex}")
|
|
|
|
+ private String firstIndex;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private JestClient jestClient;
|
|
|
|
+ @Autowired
|
|
|
|
+ private ObjectMapper objectMapper;
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public ChannelTypeHandleResponseObject queryUserlive(HttpServletRequest request, String customBody, int outTime) {
|
|
|
|
+ ChannelTypeHandleResponseObject res = new ChannelTypeHandleResponseObject();
|
|
|
|
+ String upstreamCode = Constant.LOG_UPSTREAM_DEFAULT_RESPONSE_CODE;
|
|
|
|
+ try {
|
|
|
|
+ UserLiveRequestObject jsonResolveObject = objectMapper.readValue(customBody,
|
|
|
|
+ UserLiveRequestObject.class);
|
|
|
|
+
|
|
|
|
+ if (CheckUtils.checkUserParam(jsonResolveObject)) {
|
|
|
|
+ res.setResultCode(Constant.INVALID_PARAMETER_CODE);
|
|
|
|
+ res.setResultBody(Constant.INVALID_PARAMETER);
|
|
|
|
+ res.setResultDesc(Constant.INVALID_PARAMETER);
|
|
|
|
+ return res;
|
|
|
|
+ }
|
|
|
|
+ res.setIsCharge(Constant.IS_NOT_CHARGE);
|
|
|
|
+ res.setCode(Constant.SUCCESS);
|
|
|
|
+ EidlinkService.initBasicInfo(eIdLinkIp, eIdLinkPort, appId, appKey);
|
|
|
|
+ //私有参数
|
|
|
|
+ PublicParam publicParam = new PublicParam();
|
|
|
|
+ EidImageCompareParam eidImageCompareParam = new EidImageCompareParam(publicParam, jsonResolveObject.getReqID());
|
|
|
|
+ CommonResult responseObject = EidlinkService.register(eidImageCompareParam);
|
|
|
|
+ String body = JSON.toJSONString(responseObject);
|
|
|
|
+ log.info("responseObject.body:{}",body);
|
|
|
|
+ if(responseObject ==null){
|
|
|
|
+ res.setResultCode(Constant.OTHER_ERROR_CODE);
|
|
|
|
+ res.setResultBody(Constant.OTHER_ERROR);
|
|
|
|
+ res.setResultDesc(Constant.OTHER_ERROR);
|
|
|
|
+ }else{
|
|
|
|
+ upstreamCode =responseObject.getResult();
|
|
|
|
+ if ("00".equals(responseObject.getResult())) {
|
|
|
|
+ UserLiveResponseObject userLiveResponseObject=new UserLiveResponseObject();
|
|
|
|
+ userLiveResponseObject.setReqId(responseObject.getReqID());
|
|
|
|
+ userLiveResponseObject.setAppeidcode(responseObject.getAppEidCode());
|
|
|
|
+ userLiveResponseObject.setEIDvoucher(responseObject.geteIDvoucher());
|
|
|
|
+ userLiveResponseObject.setH1(responseObject.getH1());
|
|
|
|
+ userLiveResponseObject.setSimilarity(responseObject.getSimilarity());
|
|
|
|
+ userLiveResponseObject.setResult_msg(responseObject.getResult_msg());
|
|
|
|
+ res.setResultCode(Constant.MATCH_CODE);
|
|
|
|
+ res.setResultBody(userLiveResponseObject);
|
|
|
|
+ res.setResultDesc("查询成功");
|
|
|
|
+ res.setIsCharge(Constant.IS_CHARGE);
|
|
|
|
+ }else {
|
|
|
|
+ res.setResultCode(Constant.OTHER_ERROR_CODE);
|
|
|
|
+ res.setResultBody(Constant.OTHER_ERROR);
|
|
|
|
+ res.setResultDesc(Constant.OTHER_ERROR);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ request.setAttribute(Constant.LOG_UPSTREAM_RESPONSE_CODE, upstreamCode);
|
|
|
|
+ return res;
|
|
|
|
+ } catch (IOException e) {
|
|
|
|
+ ErrorUtils.captureException(e);
|
|
|
|
+ log.error("IOException,message:{}", e);
|
|
|
|
+ res.setCode(Constant.FAIL);
|
|
|
|
+ return res;
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ ErrorUtils.captureException(e);
|
|
|
|
+ log.error("Exception,message:{}", e);
|
|
|
|
+ res.setCode(Constant.FAIL);
|
|
|
|
+ return res;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public ChannelTypeHandleResponseObject queryVoucherlive(HttpServletRequest request, String customBody, int outTime) {
|
|
|
|
+ ChannelTypeHandleResponseObject res = new ChannelTypeHandleResponseObject();
|
|
|
|
+ String upstreamCode = Constant.LOG_UPSTREAM_DEFAULT_RESPONSE_CODE;
|
|
|
|
+ try {
|
|
|
|
+ VoucherLiveRequestObject jsonResolveObject = objectMapper.readValue(customBody,
|
|
|
|
+ VoucherLiveRequestObject.class);
|
|
|
|
+ if (CheckUtils.checkVoucherParam(jsonResolveObject)) {
|
|
|
|
+ res.setResultCode(Constant.INVALID_PARAMETER_CODE);
|
|
|
|
+ res.setResultBody(Constant.INVALID_PARAMETER);
|
|
|
|
+ res.setResultDesc(Constant.INVALID_PARAMETER);
|
|
|
|
+ return res;
|
|
|
|
+ }
|
|
|
|
+ res.setIsCharge(Constant.IS_NOT_CHARGE);
|
|
|
|
+ res.setCode(Constant.SUCCESS);
|
|
|
|
+ String reqID = jsonResolveObject.getReqID();
|
|
|
|
+ String eIDvoucher = jsonResolveObject.getEidVoucher();
|
|
|
|
+ String appeidcode = jsonResolveObject.getAppeIdCode();
|
|
|
|
+ PublicParam publicParam = new PublicParam();
|
|
|
|
+ EidImageCompareParam eidImageCompareParam = new EidImageCompareParam(publicParam, reqID, eIDvoucher, appeidcode);
|
|
|
|
+ CommonResult responseObject = EidlinkService.eidImageCompare(eidImageCompareParam);
|
|
|
|
+ String body = JSON.toJSONString(responseObject);
|
|
|
|
+ log.info("responseObject.body:{}",body);
|
|
|
|
+ if(responseObject ==null){
|
|
|
|
+ res.setResultCode(Constant.OTHER_ERROR_CODE);
|
|
|
|
+ res.setResultBody(Constant.OTHER_ERROR);
|
|
|
|
+ res.setResultDesc(Constant.OTHER_ERROR);
|
|
|
|
+ }else{
|
|
|
|
+ upstreamCode =responseObject.getResult();
|
|
|
|
+ if ("00".equals(responseObject.getResult())) {
|
|
|
|
+ VoucherLiveResponseObject voucherLiveResponseObject=new VoucherLiveResponseObject();
|
|
|
|
+ voucherLiveResponseObject.setReqId(responseObject.getReqID());
|
|
|
|
+ voucherLiveResponseObject.setAppeidcode(responseObject.getAppEidCode());
|
|
|
|
+ voucherLiveResponseObject.setH1(responseObject.getH1());
|
|
|
|
+ voucherLiveResponseObject.setSimilarity(responseObject.getSimilarity());
|
|
|
|
+ voucherLiveResponseObject.setResult_msg(responseObject.getResult_msg());
|
|
|
|
+ res.setResultCode(Constant.MATCH_CODE);
|
|
|
|
+ res.setResultBody(voucherLiveResponseObject);
|
|
|
|
+ res.setResultDesc("查询成功");
|
|
|
|
+ res.setIsCharge(Constant.IS_CHARGE);
|
|
|
|
+ }else {
|
|
|
|
+ res.setResultCode(Constant.OTHER_ERROR_CODE);
|
|
|
|
+ res.setResultBody(Constant.OTHER_ERROR);
|
|
|
|
+ res.setResultDesc(Constant.OTHER_ERROR);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ request.setAttribute(Constant.LOG_UPSTREAM_RESPONSE_CODE, upstreamCode);
|
|
|
|
+ return res;
|
|
|
|
+ } catch (IOException e) {
|
|
|
|
+ ErrorUtils.captureException(e);
|
|
|
|
+ log.error("IOException,message:{}", e);
|
|
|
|
+ res.setCode(Constant.FAIL);
|
|
|
|
+ return res;
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ ErrorUtils.captureException(e);
|
|
|
|
+ log.error("Exception,message:{}", e);
|
|
|
|
+ res.setCode(Constant.FAIL);
|
|
|
|
+ return res;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public ChannelTypeHandleResponseObject driverVerification(HttpServletRequest request, String customBody, int outTime) {
|
|
|
|
+ ChannelTypeHandleResponseObject res = new ChannelTypeHandleResponseObject();
|
|
|
|
+ String upstreamCode = Constant.LOG_UPSTREAM_DEFAULT_RESPONSE_CODE;
|
|
|
|
+ try {
|
|
|
|
+ DriverVerificationRequestObject jsonResolveObject = objectMapper.readValue(customBody,
|
|
|
|
+ DriverVerificationRequestObject.class);
|
|
|
|
+ List<String> list=new ArrayList<String>();
|
|
|
|
+ if (StringUtils.isBlank(jsonResolveObject.getShippingNoteNumber())&&"".equals(jsonResolveObject.getShippingNoteNumber())) {
|
|
|
|
+ list.add("shippingNoteNumber");
|
|
|
|
+ }
|
|
|
|
+ if (jsonResolveObject.getDrivers()==null&&jsonResolveObject.getDrivers().size()==0) {
|
|
|
|
+ list.add("name");
|
|
|
|
+ list.add("idNumber");
|
|
|
|
+ }
|
|
|
|
+ if (StringUtils.isBlank(jsonResolveObject.getDespatchActualDateTime())&&"".equals(jsonResolveObject.getDespatchActualDateTime())) {
|
|
|
|
+ list.add("despatchActualDateTime");
|
|
|
|
+ }
|
|
|
|
+ if (list.size()>0) {
|
|
|
|
+ ResultBody resultBody = new ResultBody();
|
|
|
|
+ resultBody.setCode(3);
|
|
|
|
+ resultBody.setResultList(list);
|
|
|
|
+ res.setResultBody(resultBody);
|
|
|
|
+ res.setResultCode(Constant.INVALID_PARAMETER_CODE);
|
|
|
|
+ return res;
|
|
|
|
+ }
|
|
|
|
+ res.setIsCharge(Constant.IS_NOT_CHARGE);
|
|
|
|
+ res.setCode(Constant.SUCCESS);
|
|
|
|
+ // 创建 Bool 查询构建器
|
|
|
|
+ BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery();
|
|
|
|
+ // 构建查询条件
|
|
|
|
+ boolQueryBuilder.must(QueryBuilders.termsQuery("RequestInfo.ShippingNoteNumber.keyword",jsonResolveObject.getShippingNoteNumber()));
|
|
|
|
+ boolQueryBuilder.must(QueryBuilders.termsQuery("URI.keyword","/info_check/living.do"));
|
|
|
|
+ // 构建查询源构建器
|
|
|
|
+ SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
|
|
|
|
+ searchSourceBuilder.query(boolQueryBuilder);
|
|
|
|
+ searchSourceBuilder.sort("DateTime", SortOrder.DESC);
|
|
|
|
+ //设置源字段过虑,第一个参数结果集包括哪些字段,第二个参数表示结果集不包括哪些字段
|
|
|
|
+ searchSourceBuilder.fetchSource(new String[]{"RequestInfo","Check-Reuslt", "DateTime","MG-Consistent"}, null);
|
|
|
|
+ Search build = new Search.Builder(searchSourceBuilder.toString()).addIndex("access-yysj_gateway_first_log-cloud-yysj*").addType("doc").build();
|
|
|
|
+ SearchResult result = jestClient.execute(build);
|
|
|
|
+ //结果处理
|
|
|
|
+ ResultBody resultBody = new ResultBody();
|
|
|
|
+ String reqId = "";
|
|
|
|
+ if (result.isSucceeded()) {
|
|
|
|
+ JsonObject jsonObject = result.getJsonObject();
|
|
|
|
+ JsonObject hits = jsonObject.getAsJsonObject("hits");
|
|
|
|
+ JsonArray array = hits.get("hits").getAsJsonArray();
|
|
|
|
+ int size = array.size();
|
|
|
|
+ //校验订单号
|
|
|
|
+ if (size<=0) {
|
|
|
|
+ //数据源为空响应
|
|
|
|
+ list.add("shippingNoteNumber");
|
|
|
|
+ res.setResultCode(Constant.UN_MATCH_CODE);
|
|
|
|
+ resultBody.setCode(1);
|
|
|
|
+ resultBody.setResultList(list);
|
|
|
|
+ res.setResultBody(resultBody);
|
|
|
|
+ return res;
|
|
|
|
+ }
|
|
|
|
+ JsonObject hit = array.get(0).getAsJsonObject();
|
|
|
|
+ JsonObject source = hit.get("_source").getAsJsonObject();
|
|
|
|
+ log.info("活体数据查询:{}",source);
|
|
|
|
+ String dateTime = source.get("DateTime").getAsString();
|
|
|
|
+ String dealDateFormat = DateUtil.dealDateFormat(dateTime);
|
|
|
|
+ //发货时间前2小时
|
|
|
|
+ String starTime = DateUtil.starTime(jsonResolveObject.getDespatchActualDateTime());
|
|
|
|
+ //发货时间后2小时
|
|
|
|
+ String endTime = DateUtil.endTime(jsonResolveObject.getDespatchActualDateTime());
|
|
|
|
+ DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
+ boolean effectiveDate = DateUtil.isEffectiveDate(format.parse(dealDateFormat),format.parse(starTime),format.parse(endTime));
|
|
|
|
+ //校验发货时间是否是前后2小时
|
|
|
|
+ if (!effectiveDate) {
|
|
|
|
+ //数据不一致响应
|
|
|
|
+ list.add("DateTime");
|
|
|
|
+ res.setResultCode(Constant.UN_MATCH_CODE);
|
|
|
|
+ resultBody.setCode(2);
|
|
|
|
+ resultBody.setResultList(list);
|
|
|
|
+ res.setResultBody(resultBody);
|
|
|
|
+ return res;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ String consistent = source.get("MG-Consistent").getAsString();
|
|
|
|
+ //检验活体检测是否通过
|
|
|
|
+ if (!consistent.equals("1")) {
|
|
|
|
+ list.add("MG-Consistent");
|
|
|
|
+ res.setResultCode(Constant.UN_MATCH_CODE);
|
|
|
|
+ resultBody.setCode(2);
|
|
|
|
+ resultBody.setResultList(list);
|
|
|
|
+ res.setResultBody(resultBody);
|
|
|
|
+ return res;
|
|
|
|
+ }
|
|
|
|
+ reqId = source.get("RequestInfo").getAsJsonObject().get("ReqID").getAsString();
|
|
|
|
+ }
|
|
|
|
+ for (int i = 0; i < jsonResolveObject.getDrivers().size(); i++) {
|
|
|
|
+ //生成j1对比身份信息
|
|
|
|
+ String encrypt=jsonResolveObject.getDrivers().get(i).getName()+jsonResolveObject.getDrivers().get(i).getIdNumber()+"eID2015101";
|
|
|
|
+ String j1 = Sm3Utils.encrypt(encrypt);
|
|
|
|
+ BoolQueryBuilder reqBoolQueryBuilder = QueryBuilders.boolQuery();
|
|
|
|
+ reqBoolQueryBuilder.must(QueryBuilders.termsQuery("RequestInfo.ReqID.keyword",reqId));
|
|
|
|
+ reqBoolQueryBuilder.must(QueryBuilders.termsQuery("URI.keyword","/info_check/identity.do"));
|
|
|
|
+ SearchSourceBuilder reqSearchSourceBuilder = new SearchSourceBuilder();
|
|
|
|
+ reqSearchSourceBuilder.query(reqBoolQueryBuilder);
|
|
|
|
+ reqSearchSourceBuilder.sort("DateTime", SortOrder.DESC);
|
|
|
|
+ //设置源字段过虑,第一个参数结果集包括哪些字段,第二个参数表示结果集不包括哪些字段
|
|
|
|
+ reqSearchSourceBuilder.fetchSource(new String[]{"RequestInfo","Check-Reuslt", "DateTime","MG-Consistent"}, null);
|
|
|
|
+ Search reqBuild = new Search.Builder(reqSearchSourceBuilder.toString()).addIndex(firstIndex).addType("doc").build();
|
|
|
|
+ SearchResult reqResult = jestClient.execute(reqBuild);
|
|
|
|
+ JsonObject jsonObjectReq = reqResult.getJsonObject();
|
|
|
|
+ JsonObject hitsReq = jsonObjectReq.getAsJsonObject("hits");
|
|
|
|
+ JsonArray arrayReq = hitsReq.get("hits").getAsJsonArray();
|
|
|
|
+ JsonObject hitReq = arrayReq.get(0).getAsJsonObject();
|
|
|
|
+ JsonObject sourceReq = hitReq.get("_source").getAsJsonObject();
|
|
|
|
+ log.info("身份数据查询:{}",sourceReq);
|
|
|
|
+ JsonArray asJsonArray = sourceReq.get("Check-Reuslt").getAsJsonArray();
|
|
|
|
+ if (asJsonArray.size()>0) {
|
|
|
|
+ String resultData = asJsonArray.get(0).getAsJsonObject().get("result").getAsString();
|
|
|
|
+ String h1 = JSONObject.parseObject(resultData).get("H1").toString();
|
|
|
|
+ if (!h1.equals(j1)) {
|
|
|
|
+ list.add("H1");
|
|
|
|
+ res.setResultCode(Constant.UN_MATCH_CODE);
|
|
|
|
+ resultBody.setCode(2);
|
|
|
|
+ resultBody.setResultList(list);
|
|
|
|
+ res.setResultBody(resultBody);
|
|
|
|
+ return res;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ res.setResultCode(Constant.MATCH_CODE);
|
|
|
|
+ res.setResultBody("一致");
|
|
|
|
+ res.setIsCharge(Constant.IS_CHARGE);
|
|
|
|
+ request.setAttribute(Constant.LOG_UPSTREAM_RESPONSE_CODE, upstreamCode);
|
|
|
|
+ return res;
|
|
|
|
+ } catch (IOException e) {
|
|
|
|
+ ErrorUtils.captureException(e);
|
|
|
|
+ log.error("IOException,message:{}", e);
|
|
|
|
+ res.setCode(Constant.FAIL);
|
|
|
|
+ return res;
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ ErrorUtils.captureException(e);
|
|
|
|
+ log.error("Exception,message:{}", e);
|
|
|
|
+ res.setCode(Constant.FAIL);
|
|
|
|
+ return res;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ public static void main(String[] args) {
|
|
|
|
+ String eIdLinkIp = "118.244.229.17";
|
|
|
|
+ int eIdLinkPort = 8080;
|
|
|
|
+ String appId = "BEAXKTSV5igT0xrCDRId";
|
|
|
|
+ String appKey = "C197B6EC9DA768A1527B44956ADD60D3";
|
|
|
|
+ EidlinkService.initBasicInfo(eIdLinkIp, eIdLinkPort, appId, appKey);
|
|
|
|
+ //私有参数
|
|
|
|
+ String reqID = "865241a7865150031349498fa";
|
|
|
|
+ PublicParam publicParam = new PublicParam();
|
|
|
|
+ EidImageCompareParam eidImageCompareParam = new EidImageCompareParam(publicParam, reqID);
|
|
|
|
+ CommonResult result = EidlinkService.register(eidImageCompareParam);
|
|
|
|
+// String reqID ="865241a7865150031349498fa";
|
|
|
|
+// String eIDvoucher = "11";
|
|
|
|
+// String appeidcode ="11";
|
|
|
|
+// PublicParam publicParam1 = new PublicParam();
|
|
|
|
+// EidImageCompareParam eidImageCompareParam = new EidImageCompareParam(publicParam1, reqID, eIDvoucher, appeidcode);
|
|
|
|
+// CommonResult result = EidlinkService.eidImageCompare(eidImageCompareParam);
|
|
|
|
+ // 00:返回正确结果
|
|
|
|
+ if ("00".equals(result.getResult())) {
|
|
|
|
+ System.out.println("===== 证件解码活体比对返索引接口正常:" + JSONObject.toJSONString(result));
|
|
|
|
+ } else {
|
|
|
|
+ System.out.println("===== 证件解码活体比对返索引接口异常:" +JSONObject.toJSONString(result));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|