From 253672d6c5b7725b3ba8859cfd5768e2c95a887e Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 17 五月 2024 16:55:53 +0800
Subject: [PATCH] 提交一把
---
server/service/src/main/java/com/doumee/service/business/third/SignService.java | 58 ++++++++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 48 insertions(+), 10 deletions(-)
diff --git a/server/service/src/main/java/com/doumee/service/business/third/SignService.java b/server/service/src/main/java/com/doumee/service/business/third/SignService.java
index a5c52aa..3fb41f4 100644
--- a/server/service/src/main/java/com/doumee/service/business/third/SignService.java
+++ b/server/service/src/main/java/com/doumee/service/business/third/SignService.java
@@ -15,6 +15,7 @@
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.codec.digest.DigestUtils;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import javax.annotation.PostConstruct;
@@ -53,6 +54,8 @@
private static String SERVICE_URL="https://api.sandbox.junziqian.com";
private static String APP_KEY="dcb4bd535a09df3c";
private static String APP_SECRET="b87c346edcb4bd535a09df3ca8c45d9a";
+ @Value("${debug_model}")
+ private Boolean debugModel;
@Autowired
private SystemDictDataBiz systemDictDataBiz;
@@ -227,7 +230,7 @@
return null;
}
/**
- * 鏌ヨ浼佷笟绛剧害鐘舵�� 瀹℃壒鐘舵��,0姝e湪鐢宠1閫氳繃2椹冲洖
+ * 鏌ヨ浼佷笟绛剧害鐘舵�� 瀹℃牳鐘舵��,0姝e湪鐢宠1閫氳繃2椹冲洖
* @param email
* @return
*/
@@ -269,7 +272,8 @@
// params.put("file",file);
params.put("url",fileUrl);
params.put("dealType",5); //鎸囧畾鍚堝悓鏂囦欢绛剧讲鏂瑰紡 5 涓洪儴鍒嗚嚜鍔ㄧ
- params.put("positionType",2); //鎸囧畾閫氳繃琛ㄥ崟鍩熸柟寮忚缃瀛椾綅缃�
+// params.put("positionType",2); //鎸囧畾閫氳繃琛ㄥ崟鍩熸柟寮忚缃瀛椾綅缃�
+ params.put("positionType",0); //鎸囧畾鍏珷浣嶇疆绫诲瀷:0鎴杗ull浣跨敤绛惧瓧搴ф爣浣嶇疆鎴栦笉鎸囧畾绛惧瓧浣嶇疆;1琛ㄥ崟鍩熷畾浣�(琛ㄥ崟鍩熷鏋滀笂浼犱负pdf鏃�,闇�pdf鑷瀹氫箟濂借〃鍗曞煙,html鍙妘rl鍙妕mpl绛夐渶瀹氫箟濂絠nput鏍囩);2鍏抽敭瀛楀畾涔�
params.put("fileType",1);
params.put("needQifengSign",1);
params.put("notifyUrl",notifyUrl);
@@ -280,8 +284,8 @@
sReq.setIdentityCard(creditCoe);//钀ヤ笟鎵х収鍙�
sReq.setEmail(email); //鍦ㄥ悰瀛愮娉ㄥ唽璁よ瘉鐨勯偖绠�
// sReq.setChapteJson("[{\"page\":0,\"chaptes\":[{\"offsetX\":0.12,\"offsetY\":0.23}]},{\"page\":1,\"chaptes\":[{\"offsetX\":0.45,\"offsetY\":0.67}]}]");
-// sReq.setChapteJson(postionJson);
- sReq.setSearchKey(postionJson);
+// sReq.setChapteJson(postionJson);//琛ㄥ崟鍩熷畾浣� 瀵瑰簲positionType=1
+// sReq.setSearchKey(postionJson);//鍏抽敭瀛� 瀵瑰簲positionType=2
sReq.setSignId(singId);
sReq.setNoNeedVerify(1);
signatories.add(sReq);
@@ -295,7 +299,7 @@
return json.getString("data");
}
}catch (Exception e){
-
+ e.printStackTrace();
}
return null;
@@ -303,7 +307,6 @@
/**
* 鍙戣捣绛剧害
* @param name
- * @param fileUrl
* @param file
* @param creditCoe
* @param email
@@ -317,7 +320,7 @@
params.put("serverCa",1); //浣跨敤浜戣瘉涔�
params.put("file",new File(file));
params.put("dealType",5); //鎸囧畾鍚堝悓鏂囦欢绛剧讲鏂瑰紡 5 涓洪儴鍒嗚嚜鍔ㄧ
- params.put("positionType",1); //鎸囧畾閫氳繃琛ㄥ崟鍩熸柟寮忚缃瀛椾綅缃�
+ params.put("positionType",0); //鎸囧畾閫氳繃琛ㄥ崟鍩熸柟寮忚缃瀛椾綅缃�
params.put("fileType",0);
params.put("needQifengSign",1);
params.put("notifyUrl",notifyUrl);
@@ -329,9 +332,9 @@
sReq.setEmail(email); //鍦ㄥ悰瀛愮娉ㄥ唽璁よ瘉鐨勯偖绠�
// sReq.setChapteJson("[{\"page\":0,\"chaptes\":[{\"offsetX\":0.12,\"offsetY\":0.23}]},{\"page\":1,\"chaptes\":[{\"offsetX\":0.45,\"offsetY\":0.67}]}]");
// sReq.setChapteJson(postionJson);
- sReq.setSearchKey(postionJson);
+// sReq.setSearchKey(postionJson);
sReq.setSignId(singId);
- sReq.setSearchConvertExtend("{\"fixX\":10,\"fixY\":-50}");
+ sReq.setSearchConvertExtend("{\"fixX\":-80,\"fixY\":-80}");
sReq.setNoNeedVerify(1);
signatories.add(sReq);
params.put("signatories",signatories.toJSONString());
@@ -344,6 +347,7 @@
return json.getString("data");
}
}catch (Exception e){
+ e.printStackTrace();
}
return null;
@@ -358,7 +362,10 @@
* @param creditCode
*/
public String signLink(String applyNo,String name,String creditCode) {
- try { initParams();
+ try {
+ //寤惰繜2绉�
+// Thread.sleep(2*1000);
+ initParams();
Map<String, Object> params = bodyParams;
String url = SERVICE_URL + "/v2/sign/link";
params.put("applyNo",applyNo); //鍙戣捣鍚堝悓绛剧讲鎺ュ彛杩斿洖鐨凙PL缂栧彿
@@ -370,6 +377,37 @@
saveInterfaceLog(url,"銆愮數瀛愮銆戣幏鍙栫缃查摼鎺ュ湴鍧�",JSONObject.toJSONString(params),str);
JSONObject json = JSONObject.parseObject(str);
if(json!=null && json.getBoolean("success")){
+ String link =json.getString("data");
+ if(!debugModel){
+ link = link.replace("https://h5","https://h7");
+ }
+ return link;
+ }
+ }catch (Exception e){
+ e.printStackTrace();
+ }
+ return null;
+ }
+ /**
+ * 鑾峰彇绛剧讲閾炬帴鍦板潃(杩斿洖鏂囦欢鍦板潃锛岀缃插悗鎵嶆槸鏂囦欢鍦板潃锛屽惁鍒欒烦杞埌绛剧讲椤甸潰)
+ * @param applyNo
+ */
+ public String linkFileStatus(String applyNo) {
+
+ try { initParams();
+ Map<String, Object> params = bodyParams;
+ String url = SERVICE_URL + "/v2/sign/status";
+ //鏋勫缓璇锋眰鍙傛暟
+ params.put("applyNo",applyNo); //鍙戣捣鍚堝悓绛剧讲鎺ュ彛杩斿洖鐨凙PL缂栧彿
+// params.put("fullName",fullName); //绛剧害浜哄悕绉�
+// params.put("identityCard",identityCard); //绛剧害浜鸿瘉浠跺彿
+// params.put("identityType",12); //璇佷欢绫诲瀷 1韬唤璇�, 2鎶ょ収, 3鍙拌優璇�, 4娓境灞呮皯鏉ュ線鍐呭湴閫氳璇�, 11钀ヤ笟鎵х収, 12缁熶竴绀句細淇$敤浠g爜, 20瀛愯处鍙�, 99鍏朵粬
+ String str= HttpClientUtils.init().getPost(url,null,params,true);
+ System.out.println(str);
+ saveInterfaceLog(url,"銆愮數瀛愮銆戠绾︾姸鎬佹煡璇�",JSONObject.toJSONString(params),str);
+ JSONObject json = JSONObject.parseObject(str);
+ if(json!=null && json.getBoolean("success")){
+ //0 锛氭湭绛� 1 锛氬凡绛� 2锛氭嫆绛� 3锛氬凡淇濆叏
return json.getString("data");
}
}catch (Exception e){
--
Gitblit v1.9.3