Commit 40a2611b authored by zhaji's avatar zhaji

Merge remote-tracking branch 'origin/feature/insurance-1.3.0' into feature-1.3-zhaji

parents d940d281 f9fbce8d
...@@ -112,6 +112,10 @@ public class InsurancesConstants { ...@@ -112,6 +112,10 @@ public class InsurancesConstants {
* 未找到符合条件的参保记录 * 未找到符合条件的参保记录
*/ */
public static final String NOT_FOUND_INSURANCE_RECORD = "未找到符合条件的参保记录"; public static final String NOT_FOUND_INSURANCE_RECORD = "未找到符合条件的参保记录";
/**
* 当前投保状态无法变更投保记录
*/
public static final String CURRENT_STATUS_NOT_CHANGE_INSURANCE_RECORD = "当前投保状态无法变更投保记录";
/** /**
* 当前投保状态无法登记发票号 * 当前投保状态无法登记发票号
*/ */
...@@ -150,9 +154,9 @@ public class InsurancesConstants { ...@@ -150,9 +154,9 @@ public class InsurancesConstants {
*/ */
public static final String REPLACE_IS_EXIST = "替换员工投保记录已存在"; public static final String REPLACE_IS_EXIST = "替换员工投保记录已存在";
/** /**
* 替换类型不能修改 * 替换投保不允许变更投保类型
*/ */
public static final String REPLACE_NOT_ALLOW = "替换类型不能修改"; public static final String REPLACE_NOT_ALLOW = "替换投保不允许变更投保类型";
/** /**
* 当前记录是待投保,无法替换 * 当前记录是待投保,无法替换
*/ */
...@@ -298,9 +302,9 @@ public class InsurancesConstants { ...@@ -298,9 +302,9 @@ public class InsurancesConstants {
*/ */
public static final String POLICY_START_SHOULD_LESS_THAN_POLICY_END = "保单结束时间需要大于保单开始时间"; public static final String POLICY_START_SHOULD_LESS_THAN_POLICY_END = "保单结束时间需要大于保单开始时间";
/** /**
* 保单开始时间需早于保单结束时间 * 变更后的保单开始时间需早于保单结束时间
*/ */
public static final String POLICY_START_NEW_SHOULD_LESS_THAN_POLICY_END_NEW = "保单开始时间需早于保单结束时间"; public static final String POLICY_START_NEW_SHOULD_LESS_THAN_POLICY_END_NEW = "变更后的保单开始时间需早于保单结束时间";
/** /**
* 保单起止时间不能超过365天 * 保单起止时间不能超过365天
*/ */
...@@ -401,6 +405,10 @@ public class InsurancesConstants { ...@@ -401,6 +405,10 @@ public class InsurancesConstants {
* 变更原因不能为空 * 变更原因不能为空
*/ */
public static final String REASON_EMPTY = "变更原因不能为空"; public static final String REASON_EMPTY = "变更原因不能为空";
/**
* 变更原因超过50字符限制
*/
public static final String REASON_MORE_THAN_50 = "变更原因超过50字符限制";
/** /**
* 发票号长度超过50字符限制 * 发票号长度超过50字符限制
*/ */
...@@ -418,9 +426,9 @@ public class InsurancesConstants { ...@@ -418,9 +426,9 @@ public class InsurancesConstants {
*/ */
public static final String BUY_TYPE_FOUR_NOT_REGISTERED= "替换类型无法登记保单保费"; public static final String BUY_TYPE_FOUR_NOT_REGISTERED= "替换类型无法登记保单保费";
/** /**
* 变更后投保类型错误 * 变更后投保类型只能填写新增、批增
*/ */
public static final String BUY_TYPE_ERROR_NEW = "变更后投保类型错误"; public static final String BUY_TYPE_ERROR_NEW = "变更后投保类型只能填写新增、批增";
/** /**
* 商险待投保,无法登记保单保费 * 商险待投保,无法登记保单保费
*/ */
......
...@@ -10,7 +10,6 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; ...@@ -10,7 +10,6 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
import com.yifu.cloud.plus.v1.check.entity.TCheckIdCard;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain; import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.archives.vo.*; import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
...@@ -618,7 +617,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -618,7 +617,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return R.failed(InsurancesConstants.EMP_IDCARD_NO_NOT_LEGITIMATE); return R.failed(InsurancesConstants.EMP_IDCARD_NO_NOT_LEGITIMATE);
} }
//校验身份合法 //校验身份合法
TCheckIdCard checkIdCard = new TCheckIdCard(); /*TCheckIdCard checkIdCard = new TCheckIdCard();
checkIdCard.setName(param.getEmpName()); checkIdCard.setName(param.getEmpName());
checkIdCard.setIdCard(param.getEmpIdcardNo()); checkIdCard.setIdCard(param.getEmpIdcardNo());
R<TCheckIdCard> tCheckIdCardR = checkDaprUtil.checkIdCardSingle(checkIdCard); R<TCheckIdCard> tCheckIdCardR = checkDaprUtil.checkIdCardSingle(checkIdCard);
...@@ -627,7 +626,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -627,7 +626,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (CommonConstants.ONE_INT != data.getIsTrue()){ if (CommonConstants.ONE_INT != data.getIsTrue()){
return R.failed(InsurancesConstants.EMP_ID_CARD_NO_NOT_FIT); return R.failed(InsurancesConstants.EMP_ID_CARD_NO_NOT_FIT);
} }
} }*/
if(!LocalDateUtil.isDate(param.getPolicyStart(),LocalDateUtil.NORM_DATE_PATTERN)){ if(!LocalDateUtil.isDate(param.getPolicyStart(),LocalDateUtil.NORM_DATE_PATTERN)){
return R.failed(InsurancesConstants.POLICY_START_PARSE_ERROR); return R.failed(InsurancesConstants.POLICY_START_PARSE_ERROR);
...@@ -767,7 +766,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -767,7 +766,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return R.failed(InsurancesConstants.EMP_IDCARD_NO_NOT_LEGITIMATE); return R.failed(InsurancesConstants.EMP_IDCARD_NO_NOT_LEGITIMATE);
} }
//校验身份合法 //校验身份合法
TCheckIdCard checkIdCard = new TCheckIdCard(); /*TCheckIdCard checkIdCard = new TCheckIdCard();
checkIdCard.setName(param.getEmpName()); checkIdCard.setName(param.getEmpName());
checkIdCard.setIdCard(param.getEmpIdcardNo()); checkIdCard.setIdCard(param.getEmpIdcardNo());
R<TCheckIdCard> tCheckIdCardR = checkDaprUtil.checkIdCardSingle(checkIdCard); R<TCheckIdCard> tCheckIdCardR = checkDaprUtil.checkIdCardSingle(checkIdCard);
...@@ -776,7 +775,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -776,7 +775,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (CommonConstants.ONE_INT != data.getIsTrue()){ if (CommonConstants.ONE_INT != data.getIsTrue()){
return R.failed(InsurancesConstants.EMP_ID_CARD_NO_NOT_FIT); return R.failed(InsurancesConstants.EMP_ID_CARD_NO_NOT_FIT);
} }
} }*/
TInsuranceReplace one = tInsuranceReplaceService.getOne(Wrappers.<TInsuranceReplace>query().lambda() TInsuranceReplace one = tInsuranceReplaceService.getOne(Wrappers.<TInsuranceReplace>query().lambda()
.eq(TInsuranceReplace::getToInsuranceDetailId, byId.getId()) .eq(TInsuranceReplace::getToInsuranceDetailId, byId.getId())
...@@ -2050,6 +2049,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2050,6 +2049,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//设置发票号 //设置发票号
detail.setInvoiceNo(success.getInvoiceNo()); detail.setInvoiceNo(success.getInvoiceNo());
detailList.add(detail); detailList.add(detail);
try {
//推送修改信息 //推送修改信息
EkpUpdateParam ekpUpdateParam = new EkpUpdateParam(); EkpUpdateParam ekpUpdateParam = new EkpUpdateParam();
ekpUpdateParam.setFd_3b5bf02d3b8fc4(success.getPolicyStart()); ekpUpdateParam.setFd_3b5bf02d3b8fc4(success.getPolicyStart());
...@@ -2060,6 +2061,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2060,6 +2061,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
ekpUpdateParam.setFd_3b5bf032d7a822(detail.getId()); ekpUpdateParam.setFd_3b5bf032d7a822(detail.getId());
ekpUpdateParam.setFd_3b5bf0b7b4c058("操作人:"+user.getNickname() + ";操作时间:"+LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")) + ";变更前发票号:" + detail.getInvoiceNo() + ";变更后发票号:" + success.getInvoiceNo()); ekpUpdateParam.setFd_3b5bf0b7b4c058("操作人:"+user.getNickname() + ";操作时间:"+LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")) + ";变更前发票号:" + detail.getInvoiceNo() + ";变更后发票号:" + success.getInvoiceNo());
eKPInsuranceUtil.sendUpdateToEkp(ekpUpdateParam); eKPInsuranceUtil.sendUpdateToEkp(ekpUpdateParam);
}catch (Exception e){
log.error("pushEkp error registeredInvoiceNo:",e.getMessage());
}
} }
} }
} }
...@@ -2151,16 +2155,17 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2151,16 +2155,17 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//变更记录 //变更记录
tBusinessOperateService.saveModificationRecord(detail.getId(),oldDetail,detail,success.getReason()); tBusinessOperateService.saveModificationRecord(detail.getId(),oldDetail,detail,success.getReason());
try {
//推送修改信息 //推送修改信息
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("操作人:"+user.getNickname() + ";操作时间:"+LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); sb.append("操作人:" + user.getNickname() + ";操作时间:" + LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
if (!detail.getPolicyStart().toString().equals(success.getPolicyStart())){ if (!detail.getPolicyStart().toString().equals(success.getPolicyStart())) {
sb.append(";变更前保单开始时间:" + detail.getPolicyStart() + ";变更后保单开始时间:" + success.getPolicyStart()); sb.append(";变更前保单开始时间:" + detail.getPolicyStart() + ";变更后保单开始时间:" + success.getPolicyStart());
} }
if (!detail.getPolicyEnd().toString().equals(success.getPolicyEnd())){ if (!detail.getPolicyEnd().toString().equals(success.getPolicyEnd())) {
sb.append(";变更前保单结束时间:" + detail.getPolicyEnd() + ";变更后保单结束时间:" + success.getPolicyEnd()); sb.append(";变更前保单结束时间:" + detail.getPolicyEnd() + ";变更后保单结束时间:" + success.getPolicyEnd());
} }
if (!detail.getBuyType().equals(success.getBuyType())){ if (!detail.getBuyType().equals(success.getBuyType())) {
sb.append(";变更前投保类型:" + getBuyType(detail.getBuyType()) + ";变更后投保类型:" + getBuyType(success.getBuyType())); sb.append(";变更前投保类型:" + getBuyType(detail.getBuyType()) + ";变更后投保类型:" + getBuyType(success.getBuyType()));
} }
EkpUpdateParam ekpUpdateParam = new EkpUpdateParam(); EkpUpdateParam ekpUpdateParam = new EkpUpdateParam();
...@@ -2171,6 +2176,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2171,6 +2176,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
ekpUpdateParam.setFd_3b5bf032d7a822(detail.getId()); ekpUpdateParam.setFd_3b5bf032d7a822(detail.getId());
ekpUpdateParam.setFd_3b5bf0b7b4c058(sb.toString()); ekpUpdateParam.setFd_3b5bf0b7b4c058(sb.toString());
eKPInsuranceUtil.sendUpdateToEkp(ekpUpdateParam); eKPInsuranceUtil.sendUpdateToEkp(ekpUpdateParam);
}catch (Exception e){
log.error("pushEkp error updateInsuranceInsured:",e.getMessage());
}
} }
} }
...@@ -2223,15 +2231,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2223,15 +2231,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (StringUtils.isBlank(param.getReason())){ if (StringUtils.isBlank(param.getReason())){
R.failed(InsurancesConstants.REASON_EMPTY); R.failed(InsurancesConstants.REASON_EMPTY);
} }
if (StringUtils.isNotBlank(param.getReason()) && !ValidityUtil.validate50(param.getReason())){
R.failed(InsurancesConstants.REASON_MORE_THAN_50);
}
TInsuranceDetail byId = this.getById(param.getId()); TInsuranceDetail byId = this.getById(param.getId());
if (!Optional.ofNullable(byId).isPresent()){ if (!Optional.ofNullable(byId).isPresent()){
R.failed(InsurancesConstants.DATA_IS_NOT_EXIST); R.failed(InsurancesConstants.NOT_FOUND_INSURANCE_RECORD);
} }
if (byId.getBuyType() == CommonConstants.FOUR_INT){ if (byId.getBuyType() == CommonConstants.FOUR_INT){
R.failed(InsurancesConstants.REPLACE_NOT_ALLOW); R.failed(InsurancesConstants.REPLACE_NOT_ALLOW);
} }
if (byId.getBuyHandleStatus() != CommonConstants.THREE_INT){ if (byId.getBuyHandleStatus() != CommonConstants.THREE_INT && byId.getBuyHandleStatus() != CommonConstants.FIVE_INT){
R.failed(InsurancesConstants.BUY_HANDLE_STATUS_NOT_THREE); R.failed(InsurancesConstants.CURRENT_STATUS_NOT_CHANGE_INSURANCE_RECORD);
} }
TInsuranceDetail old = new TInsuranceDetail(); TInsuranceDetail old = new TInsuranceDetail();
BeanCopyUtils.copyProperties(byId,old); BeanCopyUtils.copyProperties(byId,old);
...@@ -2246,16 +2257,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2246,16 +2257,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
//变更记录 //变更记录
tBusinessOperateService.saveModificationRecord(byId.getId(),old,byId,param.getReason()); tBusinessOperateService.saveModificationRecord(byId.getId(),old,byId,param.getReason());
try {
//推送修改信息 //推送修改信息
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("操作人:"+user.getNickname() + ";操作时间:"+LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); sb.append("操作人:" + user.getNickname() + ";操作时间:" + LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
if (!byId.getPolicyStart().toString().equals(param.getPolicyStart())){ if (!byId.getPolicyStart().toString().equals(param.getPolicyStart())) {
sb.append(";变更前保单开始时间:" + byId.getPolicyStart() + ";变更后保单开始时间:" + param.getPolicyStart()); sb.append(";变更前保单开始时间:" + byId.getPolicyStart() + ";变更后保单开始时间:" + param.getPolicyStart());
} }
if (!byId.getPolicyEnd().toString().equals(param.getPolicyEnd())){ if (!byId.getPolicyEnd().toString().equals(param.getPolicyEnd())) {
sb.append(";变更前保单结束时间:" + byId.getPolicyEnd() + ";变更后保单结束时间:" + param.getPolicyEnd()); sb.append(";变更前保单结束时间:" + byId.getPolicyEnd() + ";变更后保单结束时间:" + param.getPolicyEnd());
} }
if (!byId.getBuyType().equals(param.getBuyType())){ if (!byId.getBuyType().equals(param.getBuyType())) {
sb.append(";变更前投保类型:" + getBuyType(byId.getBuyType()) + ";变更后投保类型:" + getBuyType(param.getBuyType())); sb.append(";变更前投保类型:" + getBuyType(byId.getBuyType()) + ";变更后投保类型:" + getBuyType(param.getBuyType()));
} }
EkpUpdateParam ekpUpdateParam = new EkpUpdateParam(); EkpUpdateParam ekpUpdateParam = new EkpUpdateParam();
...@@ -2266,6 +2279,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2266,6 +2279,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
ekpUpdateParam.setFd_3b5bf032d7a822(byId.getId()); ekpUpdateParam.setFd_3b5bf032d7a822(byId.getId());
ekpUpdateParam.setFd_3b5bf0b7b4c058(sb.toString()); ekpUpdateParam.setFd_3b5bf0b7b4c058(sb.toString());
eKPInsuranceUtil.sendUpdateToEkp(ekpUpdateParam); eKPInsuranceUtil.sendUpdateToEkp(ekpUpdateParam);
}catch (Exception e){
log.error("pushEkp error updateInsuranceInsuredById:",e.getMessage());
}
this.updateById(byId); this.updateById(byId);
return R.ok(InsurancesConstants.OPERATE_SUCCESS); return R.ok(InsurancesConstants.OPERATE_SUCCESS);
} }
...@@ -2427,7 +2443,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2427,7 +2443,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
//校验身份合法 //校验身份合法
TCheckIdCard checkIdCard = new TCheckIdCard(); /*TCheckIdCard checkIdCard = new TCheckIdCard();
checkIdCard.setName(param.getEmpName()); checkIdCard.setName(param.getEmpName());
checkIdCard.setIdCard(param.getEmpIdcardNo()); checkIdCard.setIdCard(param.getEmpIdcardNo());
R<TCheckIdCard> tCheckIdCardR = checkDaprUtil.checkIdCardSingle(checkIdCard); R<TCheckIdCard> tCheckIdCardR = checkDaprUtil.checkIdCardSingle(checkIdCard);
...@@ -2438,7 +2454,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2438,7 +2454,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param); listResult.add(param);
continue; continue;
} }
} }*/
//根据项目编码查询项目是否存在 //根据项目编码查询项目是否存在
try{ try{
...@@ -2747,7 +2763,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2747,7 +2763,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
//校验身份合法 //校验身份合法
TCheckIdCard checkIdCard = new TCheckIdCard(); /*TCheckIdCard checkIdCard = new TCheckIdCard();
checkIdCard.setName(param.getEmpName()); checkIdCard.setName(param.getEmpName());
checkIdCard.setIdCard(param.getEmpIdcardNo()); checkIdCard.setIdCard(param.getEmpIdcardNo());
R<TCheckIdCard> tCheckIdCardR = checkDaprUtil.checkIdCardSingle(checkIdCard); R<TCheckIdCard> tCheckIdCardR = checkDaprUtil.checkIdCardSingle(checkIdCard);
...@@ -2758,7 +2774,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2758,7 +2774,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param); listResult.add(param);
continue; continue;
} }
} }*/
//根据项目编码查询项目是否存在 //根据项目编码查询项目是否存在
try{ try{
...@@ -3129,7 +3145,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3129,7 +3145,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
//校验身份合法 //校验身份合法
TCheckIdCard checkIdCard = new TCheckIdCard(); /*TCheckIdCard checkIdCard = new TCheckIdCard();
checkIdCard.setName(param.getReplaceEmpName()); checkIdCard.setName(param.getReplaceEmpName());
checkIdCard.setIdCard(param.getReplaceEmpIdcardNo()); checkIdCard.setIdCard(param.getReplaceEmpIdcardNo());
R<TCheckIdCard> tCheckIdCardR = checkDaprUtil.checkIdCardSingle(checkIdCard); R<TCheckIdCard> tCheckIdCardR = checkDaprUtil.checkIdCardSingle(checkIdCard);
...@@ -3140,7 +3156,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3140,7 +3156,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param); listResult.add(param);
continue; continue;
} }
} }*/
if (param.getEmpName().equals(param.getReplaceEmpName()) && param.getEmpIdcardNo().equals(param.getReplaceEmpIdcardNo())){ if (param.getEmpName().equals(param.getReplaceEmpName()) && param.getEmpIdcardNo().equals(param.getReplaceEmpIdcardNo())){
param.setErrorMessage(InsurancesConstants.REPLACE_EMP_INFO_SAME); param.setErrorMessage(InsurancesConstants.REPLACE_EMP_INFO_SAME);
...@@ -3716,6 +3732,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3716,6 +3732,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
param.setErrorMessage(InsurancesConstants.REASON_EMPTY); param.setErrorMessage(InsurancesConstants.REASON_EMPTY);
continue; continue;
} }
if (StringUtils.isNotBlank(param.getReason()) && !ValidityUtil.validate50(param.getReason())){
param.setErrorMessage(InsurancesConstants.REASON_MORE_THAN_50);
continue;
}
//查数据是否存在:姓名 + 身份证号 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间 + 购买标准 //查数据是否存在:姓名 + 身份证号 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间 + 购买标准
TInsuranceDetail detail = this.baseMapper.selectOne(Wrappers.<TInsuranceDetail>query().lambda() TInsuranceDetail detail = this.baseMapper.selectOne(Wrappers.<TInsuranceDetail>query().lambda()
.eq(TInsuranceDetail::getEmpName, param.getEmpName()) .eq(TInsuranceDetail::getEmpName, param.getEmpName())
...@@ -3732,12 +3752,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3732,12 +3752,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.last(CommonConstants.LAST_ONE_SQL) .last(CommonConstants.LAST_ONE_SQL)
); );
if (!Optional.ofNullable(detail).isPresent()){ if (!Optional.ofNullable(detail).isPresent()){
param.setErrorMessage(InsurancesConstants.DATA_IS_NOT_EXIST); param.setErrorMessage(InsurancesConstants.NOT_FOUND_INSURANCE_RECORD);
continue; continue;
}else { }else {
//判断是否是已投保状态 //判断是否是已投保状态或已减员
if (detail.getBuyHandleStatus() != CommonConstants.THREE_INT){ if (detail.getBuyHandleStatus() != CommonConstants.THREE_INT && detail.getBuyHandleStatus() != CommonConstants.FIVE_INT){
param.setErrorMessage(InsurancesConstants.BUY_HANDLE_STATUS_NOT_THREE); param.setErrorMessage(InsurancesConstants.CURRENT_STATUS_NOT_CHANGE_INSURANCE_RECORD);
continue; continue;
} }
} }
......
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