Commit 17d9d59a authored by huyuchen's avatar huyuchen

huych-含风险项目商险不购买申请提交

parent 765ab271
......@@ -163,8 +163,6 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
return R.failed("原因说明不能超过两百个字符");
}
try {
//申请编号
String applyNo = getCode();
//获取明细当日最大申请编号
String applyDetail = baseMapper.getMaxInusuranceDetailCode();
//暂存不做校验
......@@ -201,18 +199,21 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
}
return R.ok();
} else if (CommonConstants.TWO_STRING.equals(tInsuranceUnpurchaseApply.getSaveFlag())) {
//校验若该项目&该人员身份证号是否已经有过“已购买社保”的不购买商险明细,若有也会禁止重复提交!提示:姓名+身份证号、姓名+身份证号、已有申请记录,无需重复提交,可删除后再提交;
//校验该身份证&姓名组合的数据能否找到在途或在保的社保-工伤险数据,即是否为-“工伤”险正常参保的人员,不受项目限制,若“工伤”险皆正常在保或有在途“待审核、待办理”,则可正常提交,若未正常参保或无在途的参保数据,则提示“姓名+身份证号、姓名+身份证号无正常参保或派单中的数据,禁止提交!”
List<TInsuranceUnpurchasePersonAddVo> personList = addAndUpdCheck(tInsuranceUnpurchaseApply);
if (Common.isNotNull(personList) && !personList.isEmpty() &&
personList.stream().noneMatch(e -> CommonConstants.ONE_STRING.equals(e.getCode()))) {
//申请编号
String applyNo = getCode();
tInsuranceUnpurchaseApply.setUnbuyNum(String.valueOf(personList.size()));
//申请人是否属于子分公司和该项目是否有审批通过记录赋值
setValue(tInsuranceUnpurchaseApply,user,applyNo);
if (Common.isNotNull(tInsuranceUnpurchaseApply.getId())) {
if (Common.isEmpty(tInsuranceUnpurchaseApply.getApplyNo())) {
tInsuranceUnpurchaseApply.setApplyNo(applyNo);
}
//申请人是否属于子分公司和该项目是否有审批通过记录赋值
setValue(tInsuranceUnpurchaseApply,user,tInsuranceUnpurchaseApply.getApplyNo());
tInsuranceUnpurchaseApply.setCreateTimeZc(LocalDateTime.now());
baseMapper.updateById(tInsuranceUnpurchaseApply);
//更新附件
......@@ -233,6 +234,8 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
}
personService.saveBatch(personInfoList);
} else {
//申请人是否属于子分公司和该项目是否有审批通过记录赋值
setValue(tInsuranceUnpurchaseApply,user,applyNo);
tInsuranceUnpurchaseApply.setCreateTimeZc(LocalDateTime.now());
tInsuranceUnpurchaseApply.setCreateBy(user.getId());
tInsuranceUnpurchaseApply.setCreateName(user.getNickname());
......@@ -390,7 +393,6 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
}
private void initValue(TInsuranceUnpurchaseApply tInsuranceUnpurchaseApply,TInsuranceUnpurchasePerson person) {
person.setCreateTime(tInsuranceUnpurchaseApply.getCreateTimeZc());
person.setParnetId(tInsuranceUnpurchaseApply.getId());
person.setApplyNo(tInsuranceUnpurchaseApply.getApplyNo());
person.setDeptId(tInsuranceUnpurchaseApply.getDeptId());
......
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