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
//解析签署人信息集合,替换用户信息为accountId
JSONArray signers = params.getJSONArray("signers");
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++) {
JSONObject json1 = signers.getJSONObject(i);
String idNo = json1.getString("idNo");
String name = json1.getString("name");
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");
json1.put("authorizationOrganizeId", "cab73322-8924-11ea-b71a-ec0d9ad45bf8");
} else {
SignUserInfoHclc signInfoHclc = new SignUserInfoHclc();
signInfoHclc.setAuthFlag("Y");
signInfoHclc.setName(name);
SignUserInfoHclc signInfoHclc = new SignUserInfoHclc();
signInfoHclc.setAuthFlag("Y");
signInfoHclc.setName(name);
//代理店匹配用户名称
if (Objects.nonNull(idNo) && !"".equalsIgnoreCase(idNo)) {
signInfoHclc.setIdNo(idNo);
}
//代理店匹配用户名称
if (Objects.nonNull(idNo)) {
signInfoHclc.setIdNo(idNo);
List<SignUserInfoHclc> signInfoHclcs = signInfoHclcMapper.queryUserInfo(signInfoHclc);
if (signInfoHclcs.size() == 0) {
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 (signInfoHclcs.size() == 0) {
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;
//用户类型是个人时
if (signInfoHclc.getCtitype().compareTo(1L) == 0) {
json1.put("accountId", signInfoHclc.getAccountId());
json1.put("uniqueId", signInfoHclc.getOpenId());
//用户类型是机构时
} else {
signInfoHclc = signInfoHclcs.get(0);
json1.put("contactMobile", signInfoHclc.getMobile());
//用户类型是个人时
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());
}
json1.put("accountId", signInfoHclc.getAgentAccountId());
json1.put("authorizationOrganizeId", signInfoHclc.getAccountId());
json1.put("uniqueId", signInfoHclc.getOpenId());
}
// //代理店设置发起人
// if ("AGENT".equalsIgnoreCase(role)) {
// initiatorAccountId = signInfoHclc.getAccountId();
// }
}
}
// //判断文字签字印章自定义模板是否存在
// if (Objects.nonNull(signInfoHclc.getSealId()) && !"-1".equalsIgnoreCase(signInfoHclc.getSealId())) {
......@@ -1212,7 +1225,7 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
//
// }
}
// }
json1.put("accountType", "2");
......@@ -1236,7 +1249,7 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
// //抄送人信息集合签署成功后通知抄送人
// result.put("copyViewers", params.get("copyViewers"));
//发起人用户id,默认hclc发起
result.put("initiatorAccountId", "cab73322-8924-11ea-b71a-ec0d9ad45bf8");
result.put("initiatorAccountId", initiatorAccountId);
//签署完成重定向地址
result.put("redirectUrl", signRedirectUrl);
//流程文档信息集合
......@@ -1298,17 +1311,17 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
JSONObject signUrl = signUrls.getJSONObject(i);
//建机自己
if ("ab0cb1dc-8924-11ea-b71a-ec0d9ad45bf8".equalsIgnoreCase(signUrl.getString("accountId"))) {
signUrl.put("name", "日立建机");
} else {
//根据uniqueId获取用户信息
SignUserInfoHclc signInfoHclc = new SignUserInfoHclc();
signInfoHclc.setOpenId(signUrl.getString("uniqueId"));
signInfoHclc = this.selectByPrimaryKey(requestContext, signInfoHclc);
// if ("ab0cb1dc-8924-11ea-b71a-ec0d9ad45bf8".equalsIgnoreCase(signUrl.getString("accountId"))) {
// signUrl.put("name", "日立建机");
// } else {
//根据uniqueId获取用户信息
SignUserInfoHclc signInfoHclc = new SignUserInfoHclc();
signInfoHclc.setOpenId(signUrl.getString("uniqueId"));
signInfoHclc = this.selectByPrimaryKey(requestContext, signInfoHclc);
signUrl.put("idNo", signInfoHclc.getIdNo());
signUrl.put("name", signInfoHclc.getName());
}
signUrl.put("idNo", signInfoHclc.getIdNo());
signUrl.put("name", signInfoHclc.getName());
// }
signUrl.remove("accountId");
......@@ -1365,16 +1378,16 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
signUserInfoHclc.setAccountId(accountInfo.getString("authOrgId"));
}
JSONObject accountInfoNew = new JSONObject();
if ("cab73322-8924-11ea-b71a-ec0d9ad45bf8".equalsIgnoreCase(signUserInfoHclc.getAccountId())) {
accountInfoNew.put("ctino", "");
accountInfoNew.put("name", "日立建机");
} else {
//获取移动端用户信息
signUserInfoHclc = signInfoHclcMapper.selectOne(signUserInfoHclc);
// if ("cab73322-8924-11ea-b71a-ec0d9ad45bf8".equalsIgnoreCase(signUserInfoHclc.getAccountId())) {
// accountInfoNew.put("ctino", "");
// accountInfoNew.put("name", "日立建机");
// } else {
//获取移动端用户信息
signUserInfoHclc = signInfoHclcMapper.selectOne(signUserInfoHclc);
accountInfoNew.put("ctino", signUserInfoHclc.getIdNo());
accountInfoNew.put("name", signUserInfoHclc.getName());
}
accountInfoNew.put("ctino", signUserInfoHclc.getIdNo());
accountInfoNew.put("name", signUserInfoHclc.getName());
// }
params.remove("accountInfo");
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