Commit f95ec0e0 authored by 5359's avatar 5359

正式环境参数修改

parent cb89ef30
Pipeline #6040 canceled with stages
...@@ -1121,53 +1121,66 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i ...@@ -1121,53 +1121,66 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
//解析签署人信息集合,替换用户信息为accountId //解析签署人信息集合,替换用户信息为accountId
JSONArray signers = params.getJSONArray("signers"); JSONArray signers = params.getJSONArray("signers");
JSONArray signersNew = new JSONArray(); JSONArray signersNew = new JSONArray();
// String initiatorAccountId = ""; String initiatorAccountId = "";
//获取发起人信息
SignUserInfoHclc signInfo = new SignUserInfoHclc();
signInfo.setOpenId("1");
signInfo = signInfoHclcMapper.selectByPrimaryKey(signInfo);
initiatorAccountId = signInfo.getAccountId();
for (int i = 0; i < signers.size(); i++) { for (int i = 0; i < signers.size(); i++) {
JSONObject json1 = signers.getJSONObject(i); JSONObject json1 = signers.getJSONObject(i);
String idNo = json1.getString("idNo"); String idNo = json1.getString("idNo");
String name = json1.getString("name"); String name = json1.getString("name");
String role = json1.getString("role"); String role = json1.getString("role");
if ("HCLC".equalsIgnoreCase(role)) { // if ("HCLC".equalsIgnoreCase(role)) {
//
// SignUserInfoHclc signInfoHclc = new SignUserInfoHclc();
// signInfoHclc.setOpenId("1");
// signInfoHclc = signInfoHclcMapper.selectByPrimaryKey(signInfoHclc);
//
// json1.put("accountId", signInfoHclc.getAgentAccountId());
// json1.put("authorizationOrganizeId", signInfoHclc.getAccountId());
// } else {
json1.put("accountId", "ab0cb1dc-8924-11ea-b71a-ec0d9ad45bf8"); SignUserInfoHclc signInfoHclc = new SignUserInfoHclc();
json1.put("authorizationOrganizeId", "cab73322-8924-11ea-b71a-ec0d9ad45bf8"); signInfoHclc.setAuthFlag("Y");
} else { signInfoHclc.setName(name);
SignUserInfoHclc signInfoHclc = new SignUserInfoHclc(); //代理店匹配用户名称
signInfoHclc.setAuthFlag("Y"); if (Objects.nonNull(idNo) && !"".equalsIgnoreCase(idNo)) {
signInfoHclc.setName(name); signInfoHclc.setIdNo(idNo);
}
//代理店匹配用户名称 List<SignUserInfoHclc> signInfoHclcs = signInfoHclcMapper.queryUserInfo(signInfoHclc);
if (Objects.nonNull(idNo)) { if (signInfoHclcs.size() == 0) {
signInfoHclc.setIdNo(idNo); logger.error("create sign flows failed, account:{} is not defined in wx", name + idNo);
jsonResult.put("errCode", "2");
jsonResult.put("msg", "创建签署流程失败,用户" + name + idNo + "在移动端未完成实名认证,请先认证!");
return jsonResult;
} else {
signInfoHclc = signInfoHclcs.get(0);
if (!"HCLC".equalsIgnoreCase(role)) {
json1.put("contactMobile", signInfoHclc.getMobile());
} }
//用户类型是个人时
List<SignUserInfoHclc> signInfoHclcs = signInfoHclcMapper.queryUserInfo(signInfoHclc); if (signInfoHclc.getCtitype().compareTo(1L) == 0) {
if (signInfoHclcs.size() == 0) { json1.put("accountId", signInfoHclc.getAccountId());
logger.error("create sign flows failed, account:{} is not defined in wx", name + idNo); json1.put("uniqueId", signInfoHclc.getOpenId());
jsonResult.put("errCode", "2"); //用户类型是机构时
jsonResult.put("msg", "创建签署流程失败,用户" + name + idNo + "在移动端未完成实名认证,请先认证!");
return jsonResult;
} else { } else {
signInfoHclc = signInfoHclcs.get(0); json1.put("accountId", signInfoHclc.getAgentAccountId());
json1.put("contactMobile", signInfoHclc.getMobile()); json1.put("authorizationOrganizeId", signInfoHclc.getAccountId());
//用户类型是个人时 json1.put("uniqueId", signInfoHclc.getOpenId());
if (signInfoHclc.getCtitype().compareTo(1L) == 0) { }
json1.put("accountId", signInfoHclc.getAccountId());
json1.put("uniqueId", signInfoHclc.getOpenId());
//用户类型是机构时
} else {
json1.put("accountId", signInfoHclc.getAgentAccountId());
json1.put("authorizationOrganizeId", signInfoHclc.getAccountId());
json1.put("uniqueId", signInfoHclc.getOpenId());
}
// //代理店设置发起人 // //代理店设置发起人
// if ("AGENT".equalsIgnoreCase(role)) { // if ("AGENT".equalsIgnoreCase(role)) {
// initiatorAccountId = signInfoHclc.getAccountId(); // initiatorAccountId = signInfoHclc.getAccountId();
// } // }
} }
// //判断文字签字印章自定义模板是否存在 // //判断文字签字印章自定义模板是否存在
// if (Objects.nonNull(signInfoHclc.getSealId()) && !"-1".equalsIgnoreCase(signInfoHclc.getSealId())) { // if (Objects.nonNull(signInfoHclc.getSealId()) && !"-1".equalsIgnoreCase(signInfoHclc.getSealId())) {
...@@ -1212,7 +1225,7 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i ...@@ -1212,7 +1225,7 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
// //
// } // }
} // }
json1.put("accountType", "2"); json1.put("accountType", "2");
...@@ -1236,7 +1249,7 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i ...@@ -1236,7 +1249,7 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
// //抄送人信息集合签署成功后通知抄送人 // //抄送人信息集合签署成功后通知抄送人
// result.put("copyViewers", params.get("copyViewers")); // result.put("copyViewers", params.get("copyViewers"));
//发起人用户id,默认hclc发起 //发起人用户id,默认hclc发起
result.put("initiatorAccountId", "cab73322-8924-11ea-b71a-ec0d9ad45bf8"); result.put("initiatorAccountId", initiatorAccountId);
//签署完成重定向地址 //签署完成重定向地址
result.put("redirectUrl", signRedirectUrl); result.put("redirectUrl", signRedirectUrl);
//流程文档信息集合 //流程文档信息集合
...@@ -1298,17 +1311,17 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i ...@@ -1298,17 +1311,17 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
JSONObject signUrl = signUrls.getJSONObject(i); JSONObject signUrl = signUrls.getJSONObject(i);
//建机自己 //建机自己
if ("ab0cb1dc-8924-11ea-b71a-ec0d9ad45bf8".equalsIgnoreCase(signUrl.getString("accountId"))) { // if ("ab0cb1dc-8924-11ea-b71a-ec0d9ad45bf8".equalsIgnoreCase(signUrl.getString("accountId"))) {
signUrl.put("name", "日立建机"); // signUrl.put("name", "日立建机");
} else { // } else {
//根据uniqueId获取用户信息 //根据uniqueId获取用户信息
SignUserInfoHclc signInfoHclc = new SignUserInfoHclc(); SignUserInfoHclc signInfoHclc = new SignUserInfoHclc();
signInfoHclc.setOpenId(signUrl.getString("uniqueId")); signInfoHclc.setOpenId(signUrl.getString("uniqueId"));
signInfoHclc = this.selectByPrimaryKey(requestContext, signInfoHclc); signInfoHclc = this.selectByPrimaryKey(requestContext, signInfoHclc);
signUrl.put("idNo", signInfoHclc.getIdNo()); signUrl.put("idNo", signInfoHclc.getIdNo());
signUrl.put("name", signInfoHclc.getName()); signUrl.put("name", signInfoHclc.getName());
} // }
signUrl.remove("accountId"); signUrl.remove("accountId");
...@@ -1365,16 +1378,16 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i ...@@ -1365,16 +1378,16 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
signUserInfoHclc.setAccountId(accountInfo.getString("authOrgId")); signUserInfoHclc.setAccountId(accountInfo.getString("authOrgId"));
} }
JSONObject accountInfoNew = new JSONObject(); JSONObject accountInfoNew = new JSONObject();
if ("cab73322-8924-11ea-b71a-ec0d9ad45bf8".equalsIgnoreCase(signUserInfoHclc.getAccountId())) { // if ("cab73322-8924-11ea-b71a-ec0d9ad45bf8".equalsIgnoreCase(signUserInfoHclc.getAccountId())) {
accountInfoNew.put("ctino", ""); // accountInfoNew.put("ctino", "");
accountInfoNew.put("name", "日立建机"); // accountInfoNew.put("name", "日立建机");
} else { // } else {
//获取移动端用户信息 //获取移动端用户信息
signUserInfoHclc = signInfoHclcMapper.selectOne(signUserInfoHclc); signUserInfoHclc = signInfoHclcMapper.selectOne(signUserInfoHclc);
accountInfoNew.put("ctino", signUserInfoHclc.getIdNo()); accountInfoNew.put("ctino", signUserInfoHclc.getIdNo());
accountInfoNew.put("name", signUserInfoHclc.getName()); accountInfoNew.put("name", signUserInfoHclc.getName());
} // }
params.remove("accountInfo"); params.remove("accountInfo");
params.put("accountInfo", accountInfoNew); params.put("accountInfo", accountInfoNew);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment