Browse Source

自提授权

njs 2 years ago
parent
commit
5a497b5136

+ 1 - 1
suishenbang-wxportal/suishenbang-wxportal-api/src/main/java/com/dgtly/wxportal/controller/EsignController.java

@@ -194,7 +194,7 @@ public class EsignController extends ApiBaseController {
     public Object dealerSignDriver() {
 
         ParameterObject obj = getParameterObject();
-        obj.checkParameterNotNull("orderId,entrustName,phone,beentrustName,bId,carNumber,deliveryNumber,runTime,redirectUrl");
+        obj.checkParameterNotNull("orderId,userId,customerCode,entrustName,phone,beentrustName,bId,carNumber,deliveryNumber,runTime,redirectUrl");
         String orderIds = obj.getString("orderId");
         String orderId=StringUtils.strip(orderIds,"[]");
         orderId=orderId.replace("\"", "");

+ 21 - 8
suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/service/impl/EsignSignServiceImpl.java

@@ -369,21 +369,29 @@ public class EsignSignServiceImpl implements IEsignSignService {
         List<Attachment> attachments = new ArrayList<>();
 
         // 抄送人列表 这里模拟有一个抄送人
-        Copier copier = new Copier(signerAccountId, 0, null);
+        Copier copier = new Copier();
+        copier.setCopierAccountId(signerAccountId);
+        copier.setCopierIdentityAccountType(0);
         List<Copier> copiers = new ArrayList<>(); // Lists.newArrayList() 是guava 的写法
         copiers.add(copier);
 
         // 待签文件列表,这里模拟只有一个待签文件
-        Doc doc = new Doc(fileId, fileName);
-
+        Doc doc = new Doc();
+        doc.setFileId(fileId);
+        doc.setFileName(fileName);
         List<Doc> docs = new ArrayList<>();//Lists.newArrayList(doc);
         docs.add(doc);
 
         // 流程配置,可以不配置,使用默认配置
         String noticeDeveloperUrl = eSignConfig.getSignSuccessUrl();//回调通知URL
-        FlowConfigInfo flowConfigInfo = new FlowConfigInfo(noticeDeveloperUrl, "1,2", null, null);
-        FlowInfo flowInfo = new FlowInfo(true,true,businessScene,flowConfigInfo);
-
+        FlowConfigInfo flowConfigInfo = new FlowConfigInfo();
+        flowConfigInfo.setNoticeDeveloperUrl(noticeDeveloperUrl);
+        flowConfigInfo.setNoticeType("1,2");
+        FlowInfo flowInfo = new FlowInfo();
+        flowInfo.setAutoArchive(true);
+        flowInfo.setAutoInitiate(true);
+        flowInfo.setBusinessScene(businessScene);
+        flowInfo.setFlowConfigInfo(flowConfigInfo);
         // 签署方信息
         // 平台方
         PosBeanInfo posBean1 = new PosBeanInfo("1", posX, posY); // 签署位置
@@ -396,8 +404,13 @@ public class EsignSignServiceImpl implements IEsignSignService {
         signfields.add(signfield1);
         signfields.add(signfield2);
 //        SignerAccount signAccount = new SignerAccount(signerAccountId, signerAccountId);//签署方账号
-        SignerAccount signAccount = new SignerAccount(authorizedAccountId);//签署方账号
-        Signer signer1 = new Signer(false, 1, signAccount, signfields, null); // 签署方
+        SignerAccount signAccount = new SignerAccount();//签署方账号
+        signAccount.setSignerAccountId(authorizedAccountId);
+        Signer signer1 = new Signer(); // 签署方
+        signer1.setPlatformSign(false);
+        signer1.setSignOrder(1);
+        signer1.setSignerAccount(signAccount);
+        signer1.setSignfields(signfields);
         // 用户方
 //        PosBeanInfo posBean2 = new PosBeanInfo("1", 200F, 100F); // 签署位置
 //        SignfieldInfo signfield2 = new SignfieldInfo(false, null, fileId, null, null, null, posBean2, null); // 签署区