REQ-2960 还原代码
This commit is contained in:
parent
7446737eab
commit
75660ae017
@ -40,7 +40,7 @@ public class DingTalkUtil {
|
||||
OapiRobotSendResponse response = client.execute(req);
|
||||
log.info("发送钉钉消息结果:{}", response);
|
||||
} catch (Exception error) {
|
||||
log.info("发送钉钉消息失败:{}", error.getMessage());
|
||||
log.error("发送钉钉消息失败:{}", error.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ import cn.axzo.basics.profiles.dto.basic.PersonProfileDto;
|
||||
import cn.axzo.framework.domain.ServiceException;
|
||||
import cn.axzo.riven.client.common.enums.ThirdCodeEnum;
|
||||
import cn.axzo.riven.third.common.AesUtil;
|
||||
import cn.axzo.riven.third.common.DingTalkUtil;
|
||||
import cn.axzo.riven.third.common.enums.SyncTypeEnum;
|
||||
import cn.axzo.riven.third.dao.ThirdPersonDao;
|
||||
import cn.axzo.riven.third.dao.ThirdProjectDao;
|
||||
@ -363,7 +364,9 @@ public class TaiZhouServiceImpl implements TaiZhouService {
|
||||
|
||||
//合并账号前,验证用户信息确认泰州和安心筑实名账号是同一个人
|
||||
if (!comparePersonInfo(currentBindPerson, thirdPerson)) {
|
||||
log.error("泰州人员:{} 基本信息和安心筑信息不一致(姓名或者脱敏身份证不一致),不能合并账号", thirdPerson.getThirdPersonName());
|
||||
String errorLog = String.format("泰州人员:%s 基本信息和安心筑信息不一致(姓名或者脱敏身份证不一致),不修改安心筑手机号 ", thirdPerson.getThirdPersonName());
|
||||
DingTalkUtil.sendMessage(errorLog, taiZhouConfig.getDingTalkBotAccessToken(), taiZhouConfig.getDingTalkBotSecret());
|
||||
log.error(errorLog);
|
||||
return;
|
||||
}
|
||||
//合并账号
|
||||
@ -378,7 +381,9 @@ public class TaiZhouServiceImpl implements TaiZhouService {
|
||||
//修改绑定关系
|
||||
//合并账号前,验证用户信息确认泰州和安心筑实名账号是同一个人
|
||||
if (!comparePersonInfo(newPerson, thirdPerson)) {
|
||||
log.error("泰州人员:{} 基本信息和新手机号对应的实名安心筑信息不一致(姓名或者脱敏身份证不一致),不修改绑定关系", thirdPerson.getThirdPersonName());
|
||||
String errorLog = String.format("泰州人员:%s 基本信息和安心筑信息不一致(姓名或者脱敏身份证不一致),不修改绑定关系 ", thirdPerson.getThirdPersonName());
|
||||
DingTalkUtil.sendMessage(errorLog, taiZhouConfig.getDingTalkBotAccessToken(), taiZhouConfig.getDingTalkBotSecret());
|
||||
log.error(errorLog);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -394,7 +399,9 @@ public class TaiZhouServiceImpl implements TaiZhouService {
|
||||
//如果老的关联账号没有实名,新的账号实名了
|
||||
if (VerifyStatus.VERIFY_SUCCESS == currentBindPerson.getVerification().getVerifyStatus() &&
|
||||
VerifyStatus.VERIFY_SUCCESS == newPerson.getVerification().getVerifyStatus()) {
|
||||
log.error("泰州人员:{} 手机号变更,发现新老手机号对应的安心筑账号均实名,异常", thirdPerson.getThirdPersonName());
|
||||
String errorLog = String.format("泰州人员:%s 手机号变更(姓名或者脱敏身份证不一致),发现新老手机号对应的安心筑账号均实名,异常", thirdPerson.getThirdPersonName());
|
||||
DingTalkUtil.sendMessage(errorLog, taiZhouConfig.getDingTalkBotAccessToken(), taiZhouConfig.getDingTalkBotSecret());
|
||||
log.error(errorLog);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -405,6 +412,7 @@ public class TaiZhouServiceImpl implements TaiZhouService {
|
||||
/**
|
||||
* 将新手机关了的安心筑账号ID更新到中间表中
|
||||
* 新手机号必须有对应的工人角色(新手机号对应的安心筑账号是查询出来的,可能没有工人角色,需要补充)
|
||||
*
|
||||
* @param thirdPerson
|
||||
*/
|
||||
private void updateTaiZhouPersonRel(ThirdPerson thirdPerson) {
|
||||
@ -424,10 +432,11 @@ public class TaiZhouServiceImpl implements TaiZhouService {
|
||||
|
||||
/**
|
||||
* 更新安心筑手机号操作
|
||||
* 1:泰州新手机号必须在安心筑没有注册,方法进入前置判断
|
||||
* 2:泰州新手机号必须与当前泰州数据关联的安心筑手机号不一致,,如果一致,跳过处理
|
||||
* 3:如果已经绑定的安心筑信息未实名,直接修改安心筑信息的手机号为新手机号
|
||||
* 4:如果已经绑定的安心筑信息已经实名,则比对泰州和安心筑人员的几把呢信息,比对姓名,脱敏身份证,比对成功,则修改安心筑手机号,比对失败,告警
|
||||
* 1:泰州新手机号必须在安心筑没有注册,方法进入前置判断
|
||||
* 2:泰州新手机号必须与当前泰州数据关联的安心筑手机号不一致,,如果一致,跳过处理
|
||||
* 3:如果已经绑定的安心筑信息未实名,直接修改安心筑信息的手机号为新手机号
|
||||
* 4:如果已经绑定的安心筑信息已经实名,则比对泰州和安心筑人员的几把呢信息,比对姓名,脱敏身份证,比对成功,则修改安心筑手机号,比对失败,告警
|
||||
*
|
||||
* @param thirdPerson
|
||||
* @param oldThirdPerson
|
||||
* @param currentBindPerson
|
||||
@ -451,7 +460,9 @@ public class TaiZhouServiceImpl implements TaiZhouService {
|
||||
log.info("泰州人员:{} 同步数据,新手机号在安心筑账号为空,且历史绑定数据实名,且与泰州信息一致,需要覆盖安心筑手机号,安心筑personId:{}:originPhone:{},newPhone:{}", thirdPerson.getThirdPersonName(), currentBindPerson.getId(), currentBindPerson.getPhone(), thirdPerson.getThirdPersonPhone());
|
||||
userCenterRpc.updateUserPhone(oldThirdPerson.getPersonId(), thirdPerson.getThirdPersonPhone());
|
||||
} else {
|
||||
log.error("泰州人员:{} 基本信息和安心筑信息不一致(姓名或者脱敏身份证不一致),不修改安心筑手机号", thirdPerson.getThirdPersonName());
|
||||
String errorLog = String.format("泰州人员:%s 基本信息和安心筑信息不一致(姓名或者脱敏身份证不一致),不修改安心筑手机号 ", thirdPerson.getThirdPersonName());
|
||||
DingTalkUtil.sendMessage(errorLog, taiZhouConfig.getDingTalkBotAccessToken(), taiZhouConfig.getDingTalkBotSecret());
|
||||
log.error(errorLog);
|
||||
}
|
||||
}
|
||||
|
||||
@ -483,7 +494,9 @@ public class TaiZhouServiceImpl implements TaiZhouService {
|
||||
|
||||
//检查泰州手机号是否重复
|
||||
if (checkRepeatPhone(thirdPerson)) {
|
||||
throw new ServiceException("泰州人员:" + thirdPerson.getThirdPersonName() + " 与其他泰州人员手机号重复,手机号为:" + thirdPerson.getThirdPersonPhone());
|
||||
String errorLog = String.format("泰州人员:%s 与其他泰州人员手机号重复,手机号为: %s ", thirdPerson.getThirdPersonName(), thirdPerson.getThirdPersonPhone());
|
||||
DingTalkUtil.sendMessage(errorLog, taiZhouConfig.getDingTalkBotAccessToken(), taiZhouConfig.getDingTalkBotSecret());
|
||||
throw new ServiceException(errorLog);
|
||||
}
|
||||
//项目开关同步检查
|
||||
if (createAccountCheck(thirdPerson, taiZhouProject)) {
|
||||
@ -504,7 +517,9 @@ public class TaiZhouServiceImpl implements TaiZhouService {
|
||||
.list();
|
||||
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
throw new ServiceException("安心筑PersonID:" + personId + " 已经绑定了其他泰州信息,不能多次绑定:");
|
||||
String errorLog = String.format("安心筑PersonID:%s 已经绑定了其他泰州信息,不能多次绑定。 ", personId);
|
||||
DingTalkUtil.sendMessage(errorLog, taiZhouConfig.getDingTalkBotAccessToken(), taiZhouConfig.getDingTalkBotSecret());
|
||||
throw new ServiceException(errorLog);
|
||||
}
|
||||
}
|
||||
|
||||
@ -519,11 +534,15 @@ public class TaiZhouServiceImpl implements TaiZhouService {
|
||||
private void taiZhouSyncBasicPersonCheck(ThirdPerson thirdPerson, ThirdPerson db) {
|
||||
//姓名变更
|
||||
if (!db.getThirdPersonName().equals(thirdPerson.getThirdPersonName())) {
|
||||
throw new ServiceException("泰州PersonID:" + thirdPerson.getThirdUniquePersonId() + "姓名发生变化:" + db.getThirdPersonName() + "->" + thirdPerson.getThirdPersonName());
|
||||
String errorLog = String.format("泰州PersonID:%s 姓名发生变化:%s -> %s ", thirdPerson.getThirdUniquePersonId(), db.getThirdPersonName(), thirdPerson.getThirdPersonName());
|
||||
DingTalkUtil.sendMessage(errorLog, taiZhouConfig.getDingTalkBotAccessToken(), taiZhouConfig.getDingTalkBotSecret());
|
||||
throw new ServiceException(errorLog);
|
||||
}
|
||||
//身份证变更
|
||||
if (!db.getThirdIdNumber().equals(thirdPerson.getThirdIdNumber())) {
|
||||
throw new ServiceException("泰州PersonID:" + thirdPerson.getThirdUniquePersonId() + "身份证发生变化:" + db.getThirdIdNumber() + "->" + thirdPerson.getThirdIdNumber());
|
||||
String errorLog = String.format("泰州PersonID:%s 身份证发生变化:%s -> %s ", thirdPerson.getThirdUniquePersonId(), db.getThirdIdNumber(), thirdPerson.getThirdIdNumber());
|
||||
DingTalkUtil.sendMessage(errorLog, taiZhouConfig.getDingTalkBotAccessToken(), taiZhouConfig.getDingTalkBotSecret());
|
||||
throw new ServiceException(errorLog);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user