Commit 18c9ffa8 authored by 5359's avatar 5359

正式环境参数修改

parent ce84e2ac
......@@ -231,8 +231,19 @@ public class SignHclcController extends BaseController {
BeanUtils.copyProperties(dto, signUserInfoHclcHis);
signUserInfoHclcHisService.insert(iRequest, signUserInfoHclcHis);
//重置结构用户信息为空
dto.setAccountId("");
dto.setAuthAccountId("");
dto.setOrgAuthId(null);
dto.setAuthFlag("N");
dto.setCreateCode("");
dto.setCreateMessage("");
dto.setManagerAuthFlag("N");
//注销经办人用户
map = signHclcService.deletePersonAccount(iRequest, dto);
SignUserInfoHclc agentSignInfo = new SignUserInfoHclc();
agentSignInfo.setOpenId(dto.getOpenId());
map = signHclcService.deletePersonAccount(iRequest, agentSignInfo);
if ("0".equalsIgnoreCase(map.get("code").toString()) || "40051667".equalsIgnoreCase(map.get("code").toString()) || "000003".equalsIgnoreCase(map.get("code").toString())) {
// if ("N".equalsIgnoreCase(dto.getIsManagerFlag())) {
// map = organSignHclcService.unBindOrgansAgent(dto);
......@@ -241,34 +252,37 @@ public class SignHclcController extends BaseController {
//复制用户信息到历史表
//初始化经办人人脸识别信息
SignUserInfoHclc agentSignInfo = new SignUserInfoHclc();
agentSignInfo.setOpenId(dto.getOpenId() + "personHclc");
agentSignInfo = signHclcService.selectByPrimaryKey(iRequest, agentSignInfo);
SignUserInfoHclc agentSignInfo2 = new SignUserInfoHclc();
agentSignInfo2.setOpenId(dto.getOpenId() + "personHclc");
agentSignInfo2 = signHclcService.selectByPrimaryKey(iRequest, agentSignInfo2);
SignUserInfoHclcHis agentUserInfoHclcHis = new SignUserInfoHclcHis();
BeanUtils.copyProperties(agentSignInfo, agentUserInfoHclcHis);
BeanUtils.copyProperties(agentSignInfo2, agentUserInfoHclcHis);
signUserInfoHclcHisService.insert(iRequest, agentUserInfoHclcHis);
signHclcService.deleteByPrimaryKey(agentSignInfo);
signHclcService.deleteByPrimaryKey(agentSignInfo2);
map.put("code", "0");
} else {
//重置结构用户信息为空
dto.setAccountId("");
dto.setAuthAccountId("");
dto.setOrgAuthId(null);
dto.setAuthFlag("N");
dto.setCreateCode("");
dto.setCreateMessage("");
dto.setManagerAuthFlag("N");
signHclcService.updateByPrimaryKey(iRequest, dto);
}
//机构已注销,accountaId为空的情况
} else if ("000012".equalsIgnoreCase(map.get("code").toString())) {
//注销经办人用户
map = signHclcService.deletePersonAccount(iRequest, dto);
if ("0".equalsIgnoreCase(map.get("code").toString()) || "40051667".equalsIgnoreCase(map.get("code").toString()) || "000003".equalsIgnoreCase(map.get("code").toString())) {
signHclcService.deleteByPrimaryKey(dto);
//复制用户信息到历史表
//初始化经办人人脸识别信息
SignUserInfoHclc agentSignInfo = new SignUserInfoHclc();
agentSignInfo.setOpenId(dto.getOpenId() + "personHclc");
agentSignInfo = signHclcService.selectByPrimaryKey(iRequest, agentSignInfo);
SignUserInfoHclcHis agentUserInfoHclcHis = new SignUserInfoHclcHis();
BeanUtils.copyProperties(agentSignInfo, agentUserInfoHclcHis);
signUserInfoHclcHisService.insert(iRequest, agentUserInfoHclcHis);
signHclcService.deleteByPrimaryKey(agentSignInfo);
map.put("code", "0");
}
}
......@@ -409,6 +423,25 @@ public class SignHclcController extends BaseController {
SignUserInfoHclc infoHclc = new SignUserInfoHclc();
infoHclc.setOpenId(dto.getOpenId());
infoHclc = signHclcService.selectByPrimaryKey(iRequest, infoHclc);
if (Objects.isNull(infoHclc.getName()) || Objects.isNull(infoHclc.getAgentIdNo())) {
map.put("code", "000004");
map.put("message", "被转移用户信息异常,org_name:" + infoHclc.getName() + "agentIdNo:" + infoHclc.getAgentIdNo() + "请先联系代理店处理!");
return map;
}
JSONObject param = new JSONObject();
param.put("org_name", infoHclc.getName());
param.put("agentIdNo", infoHclc.getAgentIdNo());
String isManager = organSignHclcService.getManagerStatus(param);
if (infoHclc.getAgentType().compareTo(1L) != 0 && "N".equalsIgnoreCase(isManager)) {
map.put("code", "000003");
map.put("message", "被转移用户未在代理店登记管理信息,请先联系代理店处理!");
return map;
}
if (Objects.nonNull(infoHclc) && !"Y".equalsIgnoreCase(infoHclc.getAuthFlag())) {
map.put("code", "000002");
map.put("message", "用户未完成认证,无法授权授权,请先认证!");
......@@ -553,31 +586,44 @@ public class SignHclcController extends BaseController {
JSONObject json = new JSONObject();
try {
//根据客户名称,证件号码获取对应的openId信息
String idNo = params.getString("idNo");
String name = params.getString("name");
String openId = null;
SignUserInfoHclc signInfoHclc = new SignUserInfoHclc();
List<SignUserInfoHclc> infoHclcs = new ArrayList<>();
signInfoHclc.setName(name);
signInfoHclc.setIdNo(idNo);
infoHclcs = signInfoHclcMapper.select(signInfoHclc);
if (infoHclcs.size() > 0) {
openId = infoHclcs.get(0).getOpenId();
} else {
//查询历史注册信息
SignUserInfoHclcHis signUserInfoHclcHis = new SignUserInfoHclcHis();
List<SignUserInfoHclcHis> userInfoHclcHisList = new ArrayList<>();
signUserInfoHclcHis.setName(name);
signUserInfoHclcHis.setIdNo(idNo);
userInfoHclcHisList = signUserInfoHclcHisMapper.select(signUserInfoHclcHis);
if (userInfoHclcHisList.size() > 0) {
openId = userInfoHclcHisList.get(0).getOpenId();
}
}
if (openId != null) {
params.put("openId", openId);
// String idNo = params.getString("idNo");
// String name = params.getString("name");
// String openId = null;
// SignUserInfoHclc signInfoHclc = new SignUserInfoHclc();
// List<SignUserInfoHclc> infoHclcs = new ArrayList<>();
// signInfoHclc.setName(name);
// signInfoHclc.setIdNo(idNo);
// infoHclcs = signInfoHclcMapper.select(signInfoHclc);
// if (infoHclcs.size() > 0) {
// openId = infoHclcs.get(0).getOpenId();
// } else {
// //查询历史注册信息
// SignUserInfoHclcHis signUserInfoHclcHis = new SignUserInfoHclcHis();
// List<SignUserInfoHclcHis> userInfoHclcHisList = new ArrayList<>();
// signUserInfoHclcHis.setName(name);
// signUserInfoHclcHis.setIdNo(idNo);
// userInfoHclcHisList = signUserInfoHclcHisMapper.select(signUserInfoHclcHis);
// if (userInfoHclcHisList.size() > 0) {
// openId = userInfoHclcHisList.get(0).getOpenId();
// }
// }
//
// if (openId != null) {
// params.put("openId", openId);
// }
String id = params.getString("openId");
if (id.contains("personHclc")) {
id = id.replace("personHclc", "");
}
params.put("openId", id);
params.put("templateId", "lyMDp1r6Jp5r7eSiho0otSby4tY0pXjZg1gbcA1poNI");
params.put("first", "您好,您申请的融资租赁合同已经通过审核,可以进行签约流程!");
params.put("keyword1", "承租人:测试");
params.put("keyword2", "合同号:测试a");
params.put("keyword3", "机号:测试123456");
params.put("keyword4", "签约时间:20200827");
params.put("remark", "请点击互动中心-融资租赁进行签约。谢谢!");
params.put("url", "");
json = signHclcService.sendWxTemplateMsg(params);
} catch (Exception e) {
......
package com.hand.app.esignHclc.service;
import com.alibaba.fastjson.JSONObject;
import com.hand.app.esignHclc.dto.SignUserInfoHclc;
import com.hand.hap.core.IRequest;
import com.hand.hap.core.ProxySelf;
......@@ -31,4 +32,6 @@ public interface IOrganSignInfoHclcService extends IBaseService<SignUserInfoHclc
Map<String, Object> unBindOrgansAgent(SignUserInfoHclc info);
void createOrgPersonInfo(String openId);
String getManagerStatus(JSONObject params);
}
......@@ -548,12 +548,13 @@ public class OrganSignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHc
//解析返回结果
JSONObject jsonResult = JSONObject.parseObject(stringResult);
if ("true".equalsIgnoreCase(jsonResult.getString("success"))) {
return jsonResult.getString("admin_flag");
return jsonResult.getJSONObject("result").getJSONObject("json").getString("admin_flag");
} else {
return "N";
}
} catch (Exception e) {
e.printStackTrace();
return "N";
}
......
......@@ -1216,6 +1216,10 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
signInfoHclc.setAgentIdNo(agentIdNo);
}
if ("HCLC".equalsIgnoreCase(role) || "AGENT".equalsIgnoreCase(role)) {
signInfoHclc.setIsManagerFlag("Y");
}
List<SignUserInfoHclc> signInfoHclcs = signInfoHclcMapper.queryUserInfo(signInfoHclc);
if (signInfoHclcs.size() == 0) {
logger.error("create sign flows failed, account:{} is not defined in wx", name + idNo);
......@@ -1230,7 +1234,7 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
//用户类型是个人时
if (signInfoHclc.getCtitype().compareTo(1L) == 0) {
json1.put("accountId", signInfoHclc.getAccountId());
json1.put("uniqueId", signInfoHclc.getOpenId());
json1.put("uniqueId", signInfoHclc.getOpenId().replace("personHclc",""));
//用户类型是机构时
} else {
json1.put("accountId", signInfoHclc.getAgentAccountId());
......@@ -1239,7 +1243,7 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
}
//获取需要发送微信通知的签署人
if (!"HCLC".equalsIgnoreCase(role) && !"AGENT".equalsIgnoreCase(role)) {
if (/*!"HCLC".equalsIgnoreCase(role) && !*/"TENANT".equalsIgnoreCase(role) && !wxOpenIds.contains(signInfoHclc.getOpenId())) {
wxOpenIds.add(signInfoHclc.getOpenId());
}
......@@ -1391,8 +1395,17 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
signInfoHclc.setOpenId(signUrl.getString("uniqueId"));
signInfoHclc = this.selectByPrimaryKey(requestContext, signInfoHclc);
signUrl.put("idNo", signInfoHclc.getIdNo());
signUrl.put("name", signInfoHclc.getName());
if (signInfoHclc.getCtitype().compareTo(2L) == 0 && !signUrl.getString("signUrl").contains("organizeId")) {
SignUserInfoHclc signInfoHclcP = new SignUserInfoHclc();
signInfoHclcP.setAccountId(signInfoHclc.getAgentAccountId());
signInfoHclcP = signInfoHclcMapper.select(signInfoHclcP).get(0);
signUrl.put("idNo", signInfoHclcP.getIdNo());
signUrl.put("name", signInfoHclcP.getName());
} else {
signUrl.put("idNo", signInfoHclc.getIdNo());
signUrl.put("name", signInfoHclc.getName());
}
// }
......@@ -1404,6 +1417,9 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
//发送微信通知
if (Objects.nonNull(wxOpenIds) && wxOpenIds.size() > 0) {
for (String id : wxOpenIds) {
if (id.contains("personHclc")) {
id = id.replace("personHclc", "");
}
wxParams.put("openId", id);
sendWxTemplateMsg(wxParams);
}
......@@ -1462,22 +1478,26 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
JSONObject accountInfo = params.getJSONObject("accountInfo");
SignUserInfoHclc signUserInfoHclc = new SignUserInfoHclc();
if(Objects.nonNull(accountInfo.getString("accountUid"))){
signUserInfoHclc.setOpenId(accountInfo.getString("accountUid"));
}
// if (Objects.nonNull(accountInfo.getString("accountUid"))) {
// signUserInfoHclc.setOpenId(accountInfo.getString("accountUid"));
// signUserInfoHclc = signInfoHclcMapper.selectByPrimaryKey(signUserInfoHclc);
// }
//企业经办人个人签署时根据openId获取不到用户信息
// if (Objects.isNull(signUserInfoHclc)) {
//判断是否机构用户
if (Objects.isNull(accountInfo.getString("authOrgId")) || "".equalsIgnoreCase(accountInfo.getString("authOrgId"))) {
signUserInfoHclc.setAccountId(accountInfo.getString("accountId"));
} else {
signUserInfoHclc.setAccountId(accountInfo.getString("authOrgId"));
if(Objects.nonNull(accountInfo.getString("accountId"))){
if (Objects.nonNull(accountInfo.getString("accountId"))) {
signUserInfoHclc.setAgentAccountId(accountInfo.getString("accountId"));
}
}
JSONObject accountInfoNew = new JSONObject();
//获取移动端用户信息
signUserInfoHclc = signInfoHclcMapper.selectOne(signUserInfoHclc);
// }
//承租人签署流程 建机自动签完获取下载地址并下载
// if ("1".equalsIgnoreCase(signUserInfoHclc.getOpenId())) {
......@@ -1489,6 +1509,7 @@ public class SignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHclc> i
// }
//设置hclc报文用户信息
JSONObject accountInfoNew = new JSONObject();
accountInfoNew.put("ctino", signUserInfoHclc.getIdNo());
accountInfoNew.put("name", signUserInfoHclc.getName());
params.put("accountInfo", accountInfoNew);
......
......@@ -97,7 +97,7 @@ public class SignHclcUtils {
} else if (APPLICATION_FORM_URLENCODED.equalsIgnoreCase(contentType)) {
List<NameValuePair> nameValuePairList = new ArrayList<NameValuePair>();
for (String key : params.keySet()) {
nameValuePairList.add(new BasicNameValuePair(key, params.get(key).toString()));
nameValuePairList.add(new BasicNameValuePair(key, Objects.nonNull(params.get(key)) ? params.get(key).toString() : ""));
}
UrlEncodedFormEntity formEntity = new UrlEncodedFormEntity(nameValuePairList, "utf-8");
formEntity.setContentType("application/x-www-form-urlencoded; charset=UTF-8");
......
......@@ -54,8 +54,11 @@
<if test="authFlag != null">
and nvl(auth_flag,'N') = #{authFlag,jdbcType=VARCHAR}
</if>
<if test="isManagerFlag != null">
and nvl(is_manager_flag,'Y') = #{isManagerFlag,jdbcType=VARCHAR}
</if>
</where>
order by account_id
order by nvl(is_manager_flag,'N') desc
</select>
<select id="queryAgentInfo" resultMap="BaseResultMap" parameterType="com.hand.app.esignHclc.dto.SignUserInfoHclc">
......
......@@ -111,27 +111,27 @@ thread.taskSize = 5
#esignHclc
tsign.project.id=1000029
tsign.project.secret=2e66a86bbc6fa9000d4a5f272cbc70e1
tsign.project.secret=a4859d3bea99b936826994fe2ac9ae04
#e签宝地址
tsign.api.url=http://tsign-test.hitachics.com
tsign.api.url=http://139.196.20.44:8035
#用户认证地址
tsign.face.api.url=https://smlopenapi.esign.cn
tsign.face.api.url=https://openapi.esign.cn
#用户认证用户
tsign.face.api.appId=4438798562
tsign.face.api.appId=5111596700
#用户认证密码
tsign.face.api.secret=4024c2b5e503a84da6d126fdc6f0da81
tsign.face.api.secret=f112f3acd3ed05263ba4a3fad6e901cd
#认证结果通知地址
tsign.api.notifyUrl=http://101.133.225.167/core/api/public/listen/auth/result
tsign.api.notifyUrl=http://lease.hitachics.com/core/api/public/listen/auth/result
#签署结果通知地址
tsign.api.listenSignUrl=http://101.133.225.167/core/api/public/listen/sign/flow
tsign.api.listenSignUrl=http://lease.hitachics.com/core/api/public/listen/sign/flow
#签署完成跳转地址
tsign.api.signRedirectUrl=http://sign.hitachics.com/www/#/ElectronicContract
tsign.api.signRedirectUrl=http://lease.hitachics.com/www/#/ElectronicContract
#微信公众号apiKey
wx.apiKey=handexinxi
#微信公众号接口地址
wx.apiHttpUrl=https://wxgzh.hitachics.com/hcs-public-server/internal/third/
#微信服务器图片保存中台路径
wx.image.path = D:\\app_dev\\apache-tomcat-app\\app_file
wx.image.path = D:\\app\\apache-tomcat-app\\app_file
......
......@@ -111,27 +111,27 @@ thread.taskSize = 5
#esignHclc
tsign.project.id=1000029
tsign.project.secret=2e66a86bbc6fa9000d4a5f272cbc70e1
tsign.project.secret=a4859d3bea99b936826994fe2ac9ae04
#e签宝地址
tsign.api.url=http://tsign-test.hitachics.com
tsign.api.url=http://139.196.20.44:8035
#用户认证地址
tsign.face.api.url=https://smlopenapi.esign.cn
tsign.face.api.url=https://openapi.esign.cn
#用户认证用户
tsign.face.api.appId=4438798562
tsign.face.api.appId=5111596700
#用户认证密码
tsign.face.api.secret=4024c2b5e503a84da6d126fdc6f0da81
tsign.face.api.secret=f112f3acd3ed05263ba4a3fad6e901cd
#认证结果通知地址
tsign.api.notifyUrl=http://101.133.225.167/core/api/public/listen/auth/result
tsign.api.notifyUrl=http://lease.hitachics.com/core/api/public/listen/auth/result
#签署结果通知地址
tsign.api.listenSignUrl=http://101.133.225.167/core/api/public/listen/sign/flow
tsign.api.listenSignUrl=http://lease.hitachics.com/core/api/public/listen/sign/flow
#签署完成跳转地址
tsign.api.signRedirectUrl=http://sign.hitachics.com/www/#/ElectronicContract
tsign.api.signRedirectUrl=http://lease.hitachics.com/www/#/ElectronicContract
#微信公众号apiKey
wx.apiKey=handexinxi
#微信公众号接口地址
wx.apiHttpUrl=https://wxgzh.hitachics.com/hcs-public-server/internal/third/
#微信服务器图片保存中台路径
wx.image.path = D:\\app_dev\\apache-tomcat-app\\app_file
wx.image.path = D:\\app\\apache-tomcat-app\\app_file
......
......@@ -111,27 +111,27 @@ thread.taskSize = 5
#esignHclc
tsign.project.id=1000029
tsign.project.secret=2e66a86bbc6fa9000d4a5f272cbc70e1
tsign.project.secret=a4859d3bea99b936826994fe2ac9ae04
#e签宝地址
tsign.api.url=http://tsign-test.hitachics.com
tsign.api.url=http://139.196.20.44:8035
#用户认证地址
tsign.face.api.url=https://smlopenapi.esign.cn
tsign.face.api.url=https://openapi.esign.cn
#用户认证用户
tsign.face.api.appId=4438798562
tsign.face.api.appId=5111596700
#用户认证密码
tsign.face.api.secret=4024c2b5e503a84da6d126fdc6f0da81
tsign.face.api.secret=f112f3acd3ed05263ba4a3fad6e901cd
#认证结果通知地址
tsign.api.notifyUrl=http://101.133.225.167/core/api/public/listen/auth/result
tsign.api.notifyUrl=http://lease.hitachics.com/core/api/public/listen/auth/result
#签署结果通知地址
tsign.api.listenSignUrl=http://101.133.225.167/core/api/public/listen/sign/flow
tsign.api.listenSignUrl=http://lease.hitachics.com/core/api/public/listen/sign/flow
#签署完成跳转地址
tsign.api.signRedirectUrl=http://sign.hitachics.com/www/#/ElectronicContract
tsign.api.signRedirectUrl=http://lease.hitachics.com/www/#/ElectronicContract
#微信公众号apiKey
wx.apiKey=handexinxi
#微信公众号接口地址
wx.apiHttpUrl=https://wxgzh.hitachics.com/hcs-public-server/internal/third/
#微信服务器图片保存中台路径
wx.image.path = D:\\app_dev\\apache-tomcat-app\\app_file
wx.image.path = D:\\app\\apache-tomcat-app\\app_file
......
......@@ -111,27 +111,27 @@ thread.taskSize = 5
#esignHclc
tsign.project.id=1000029
tsign.project.secret=2e66a86bbc6fa9000d4a5f272cbc70e1
tsign.project.secret=a4859d3bea99b936826994fe2ac9ae04
#e签宝地址
tsign.api.url=http://tsign-test.hitachics.com
tsign.api.url=http://139.196.20.44:8035
#用户认证地址
tsign.face.api.url=https://smlopenapi.esign.cn
tsign.face.api.url=https://openapi.esign.cn
#用户认证用户
tsign.face.api.appId=4438798562
tsign.face.api.appId=5111596700
#用户认证密码
tsign.face.api.secret=4024c2b5e503a84da6d126fdc6f0da81
tsign.face.api.secret=f112f3acd3ed05263ba4a3fad6e901cd
#认证结果通知地址
tsign.api.notifyUrl=http://101.133.225.167/core/api/public/listen/auth/result
tsign.api.notifyUrl=http://lease.hitachics.com/core/api/public/listen/auth/result
#签署结果通知地址
tsign.api.listenSignUrl=http://101.133.225.167/core/api/public/listen/sign/flow
tsign.api.listenSignUrl=http://lease.hitachics.com/core/api/public/listen/sign/flow
#签署完成跳转地址
tsign.api.signRedirectUrl=http://sign.hitachics.com/www/#/ElectronicContract
tsign.api.signRedirectUrl=http://lease.hitachics.com/www/#/ElectronicContract
#微信公众号apiKey
wx.apiKey=handexinxi
#微信公众号接口地址
wx.apiHttpUrl=https://wxgzh.hitachics.com/hcs-public-server/internal/third/
#微信服务器图片保存中台路径
wx.image.path = D:\\app_dev\\apache-tomcat-app\\app_file
wx.image.path = D:\\app\\apache-tomcat-app\\app_file
......
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