导入案件申请代理人修改
This commit is contained in:
+1
@@ -49,6 +49,7 @@ public class WeChatUserController extends BaseController {
|
|||||||
|| StrUtil.isEmpty(ientityAuthentication.getName())
|
|| StrUtil.isEmpty(ientityAuthentication.getName())
|
||||||
|| StrUtil.isEmpty(ientityAuthentication.getIdentityNo())
|
|| StrUtil.isEmpty(ientityAuthentication.getIdentityNo())
|
||||||
|| StrUtil.isEmpty(ientityAuthentication.getPhone())
|
|| StrUtil.isEmpty(ientityAuthentication.getPhone())
|
||||||
|
|| StrUtil.isEmpty(ientityAuthentication.getUserName())
|
||||||
|| StrUtil.isEmpty(ientityAuthentication.getEmail())
|
|| StrUtil.isEmpty(ientityAuthentication.getEmail())
|
||||||
|| StrUtil.isEmpty(ientityAuthentication.getVerifyCode())
|
|| StrUtil.isEmpty(ientityAuthentication.getVerifyCode())
|
||||||
){
|
){
|
||||||
|
|||||||
@@ -128,6 +128,7 @@ public class Constants
|
|||||||
* LDAPS 远程方法调用
|
* LDAPS 远程方法调用
|
||||||
*/
|
*/
|
||||||
public static final String LOOKUP_LDAPS = "ldaps:";
|
public static final String LOOKUP_LDAPS = "ldaps:";
|
||||||
|
public static final String DEFAULT_PASSWORD = "123456";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自动识别json对象白名单配置(仅允许解析的包名,范围越小越安全)
|
* 自动识别json对象白名单配置(仅允许解析的包名,范围越小越安全)
|
||||||
|
|||||||
@@ -23,6 +23,10 @@ public class CaseAffiliate extends BaseEntity {
|
|||||||
* 申请机构名称
|
* 申请机构名称
|
||||||
*/
|
*/
|
||||||
private String applicationOrganName;
|
private String applicationOrganName;
|
||||||
|
/**
|
||||||
|
* 代理人用户id
|
||||||
|
*/
|
||||||
|
private String applicantAgentUserId;
|
||||||
/** 身份证号 */
|
/** 身份证号 */
|
||||||
@Excel(name = "身份证号")
|
@Excel(name = "身份证号")
|
||||||
private String identityNum;
|
private String identityNum;
|
||||||
@@ -57,6 +61,14 @@ public class CaseAffiliate extends BaseEntity {
|
|||||||
/** 快递单号 */
|
/** 快递单号 */
|
||||||
private String trackNum;
|
private String trackNum;
|
||||||
|
|
||||||
|
public String getApplicantAgentUserId() {
|
||||||
|
return applicantAgentUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setApplicantAgentUserId(String applicantAgentUserId) {
|
||||||
|
this.applicantAgentUserId = applicantAgentUserId;
|
||||||
|
}
|
||||||
|
|
||||||
public String getApplicationOrganId() {
|
public String getApplicationOrganId() {
|
||||||
return applicationOrganId;
|
return applicationOrganId;
|
||||||
}
|
}
|
||||||
|
|||||||
+27
@@ -13,6 +13,7 @@ import com.google.gson.JsonArray;
|
|||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
import com.ruoyi.common.annotation.DataScope;
|
import com.ruoyi.common.annotation.DataScope;
|
||||||
import com.ruoyi.common.constant.CaseApplicationConstants;
|
import com.ruoyi.common.constant.CaseApplicationConstants;
|
||||||
|
import com.ruoyi.common.constant.Constants;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.domain.entity.*;
|
import com.ruoyi.common.core.domain.entity.*;
|
||||||
|
|
||||||
@@ -465,9 +466,35 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
if(caseAffiliates!=null&&caseAffiliates.size()>0){
|
if(caseAffiliates!=null&&caseAffiliates.size()>0){
|
||||||
for (CaseAffiliate caseAffiliate : caseAffiliates){
|
for (CaseAffiliate caseAffiliate : caseAffiliates){
|
||||||
caseAffiliate.setCaseAppliId(caseApplicationItera.getId());
|
caseAffiliate.setCaseAppliId(caseApplicationItera.getId());
|
||||||
|
// 组装申请机构代理人信息,用户表新增并且和部门关联
|
||||||
|
// 根据代理人身份证去用户表查询,有修改,么有新增
|
||||||
|
if(caseAffiliate.getIdentityType()==1) {
|
||||||
|
SysUser agentUser = sysUserMapper.selectUserByIdCard(caseAffiliate.getIdentityNumAgent());
|
||||||
|
if(agentUser==null){
|
||||||
|
agentUser = new SysUser();
|
||||||
|
agentUser.setIdCard(caseAffiliate.getIdentityNumAgent());
|
||||||
|
agentUser.setNickName(caseAffiliate.getNameAgent());
|
||||||
|
agentUser.setUserName(caseAffiliate.getIdentityNumAgent());
|
||||||
|
agentUser.setPhonenumber(caseAffiliate.getContactTelphoneAgent());
|
||||||
|
agentUser.setPassword(SecurityUtils.encryptPassword(Constants.DEFAULT_PASSWORD));
|
||||||
|
agentUser.setDeptId(Long.valueOf(caseAffiliate.getApplicationOrganId()));
|
||||||
|
int insertUserRow = sysUserMapper.insertUser(agentUser);
|
||||||
|
if(insertUserRow>0) {
|
||||||
|
caseAffiliate.setApplicantAgentUserId(String.valueOf(agentUser.getUserId()));
|
||||||
|
// 发送短信 todo
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
// 同步用户表和案件关联人表的手机号和名称
|
||||||
|
caseAffiliate.setContactTelphoneAgent(agentUser.getPhonenumber());
|
||||||
|
caseAffiliate.setNameAgent(agentUser.getNickName());
|
||||||
|
caseAffiliate.setApplicantAgentUserId(String.valueOf(agentUser.getUserId()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
caseAffiliateMapper.batchCaseAffiliate(caseAffiliates);
|
caseAffiliateMapper.batchCaseAffiliate(caseAffiliates);
|
||||||
}
|
}
|
||||||
|
|
||||||
successNum++;
|
successNum++;
|
||||||
successMsg.append("<br/>" + successNum + "、立案编号 " + caseApplicationItera.getCaseNum() + " 导入成功");
|
successMsg.append("<br/>" + successNum + "、立案编号 " + caseApplicationItera.getCaseNum() + " 导入成功");
|
||||||
}
|
}
|
||||||
|
|||||||
+11
-5
@@ -54,6 +54,7 @@ public class WeChatUserServiceImpl implements WeChatUserService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String sendCode(WeChatUserVO userVO) {
|
public String sendCode(WeChatUserVO userVO) {
|
||||||
|
|
||||||
Random random = new Random();
|
Random random = new Random();
|
||||||
String code = "";
|
String code = "";
|
||||||
for (int i = 0; i < 6; i++) {
|
for (int i = 0; i < 6; i++) {
|
||||||
@@ -61,16 +62,17 @@ public class WeChatUserServiceImpl implements WeChatUserService {
|
|||||||
code += random.nextInt(10);
|
code += random.nextInt(10);
|
||||||
}
|
}
|
||||||
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
|
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
|
||||||
request.setTemplateId("1952136");
|
request.setTemplateId("1955047");
|
||||||
// 1948332 普通短信 开庭审理房间号通知 尊敬的{1}用户,您的{2}仲裁案件,开庭审理房间号为{3},请知晓,如非本人操作,请忽略本短信。
|
// 1954926 普通短信 短信验证码 验证码:,为了保证您的账户安全,请勿想他人泄露验证码信息。如非本人操作,请忽略本短信。
|
||||||
request.setPhone(userVO.getPhone());
|
request.setPhone(userVO.getPhone());
|
||||||
request.setTemplateParamSet(new String[]{"王琼", "验证码", code});
|
request.setTemplateParamSet(new String[]{ code});
|
||||||
Boolean flag = SmsUtils.sendSms(request);
|
Boolean flag = SmsUtils.sendSms(request);
|
||||||
if(flag){
|
if(flag){
|
||||||
setCodeCache(userVO.getPhone(),code);
|
setCodeCache(userVO.getPhone(),code);
|
||||||
}
|
|
||||||
return "短信发送成功";
|
return "短信发送成功";
|
||||||
}
|
}
|
||||||
|
return "短信发送失败";
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 设置字典缓存
|
* 设置字典缓存
|
||||||
*
|
*
|
||||||
@@ -109,6 +111,10 @@ public class WeChatUserServiceImpl implements WeChatUserService {
|
|||||||
// if(StrUtil.isEmpty(getCodeCache(ientityAuthentication.getPhone()))){
|
// if(StrUtil.isEmpty(getCodeCache(ientityAuthentication.getPhone()))){
|
||||||
// return AjaxResult.success("验证码校验失败");
|
// return AjaxResult.success("验证码校验失败");
|
||||||
// }
|
// }
|
||||||
|
SysUser sysUserName=sysUserMapper.selectUserByUserName(ientityAuthentication.getUserName());
|
||||||
|
if(sysUserName!=null){
|
||||||
|
return AjaxResult.warn("用户名已存在");
|
||||||
|
}
|
||||||
// 根据身份证查询系统用户表中是否存在该用户,存在则同步已认证的信息,不存在则新增
|
// 根据身份证查询系统用户表中是否存在该用户,存在则同步已认证的信息,不存在则新增
|
||||||
SysUser sysUser=sysUserMapper.selectUserByIdCard(ientityAuthentication.getIdentityNo());
|
SysUser sysUser=sysUserMapper.selectUserByIdCard(ientityAuthentication.getIdentityNo());
|
||||||
|
|
||||||
@@ -134,7 +140,7 @@ public class WeChatUserServiceImpl implements WeChatUserService {
|
|||||||
sysUser.setPassword(SecurityUtils.encryptPassword(ientityAuthentication.getPassWord()));
|
sysUser.setPassword(SecurityUtils.encryptPassword(ientityAuthentication.getPassWord()));
|
||||||
int row = sysUserMapper.insertUser(sysUser);
|
int row = sysUserMapper.insertUser(sysUser);
|
||||||
if(row<1) {
|
if(row<1) {
|
||||||
return AjaxResult.success("注册失败");
|
return AjaxResult.error("注册失败");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -54,11 +54,11 @@
|
|||||||
<insert id="batchCaseAffiliate">
|
<insert id="batchCaseAffiliate">
|
||||||
insert into case_affiliate(case_appli_id, identity_type,application_organ_id,application_organ_name,name,identity_num,contact_telphone,
|
insert into case_affiliate(case_appli_id, identity_type,application_organ_id,application_organ_name,name,identity_num,contact_telphone,
|
||||||
contact_address,work_address,work_telphone ,name_agent,identity_num_agent,contact_telphone_agent,
|
contact_address,work_address,work_telphone ,name_agent,identity_num_agent,contact_telphone_agent,
|
||||||
contact_address_agent ) values
|
contact_address_agent,applicant_agent_user_id ) values
|
||||||
<foreach item="item" index="index" collection="list" separator=",">
|
<foreach item="item" index="index" collection="list" separator=",">
|
||||||
(#{item.caseAppliId},#{item.identityType},#{item.applicationOrganId},#{item.applicationOrganName},#{item.name},#{item.identityNum},#{item.contactTelphone},
|
(#{item.caseAppliId},#{item.identityType},#{item.applicationOrganId},#{item.applicationOrganName},#{item.name},#{item.identityNum},#{item.contactTelphone},
|
||||||
#{item.contactAddress},#{item.workAddress},#{item.workTelphone}, #{item.nameAgent},#{item.identityNumAgent},
|
#{item.contactAddress},#{item.workAddress},#{item.workTelphone}, #{item.nameAgent},#{item.identityNumAgent},
|
||||||
#{item.contactTelphoneAgent},#{item.contactAddressAgent})
|
#{item.contactTelphoneAgent},#{item.contactAddressAgent},#{item.applicantAgentUserId})
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user