Commit 4577cd95 authored by huyuchen's avatar huyuchen

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

parent 08a3c6aa
......@@ -164,7 +164,9 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
}
try {
//获取明细当日最大申请编号
String applyDetail = baseMapper.getMaxInusuranceDetailCode();
String applyDetail;
synchronized (this) {
applyDetail = baseMapper.getMaxInusuranceDetailCode();
//暂存不做校验
if (CommonConstants.ONE_STRING.equals(tInsuranceUnpurchaseApply.getSaveFlag())) {
if (Common.isEmpty(tInsuranceUnpurchaseApply.getId())) {
......@@ -174,7 +176,7 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
tInsuranceUnpurchaseApply.setCreateUserDeptName(user.getDeptName());
tInsuranceUnpurchaseApply.setCreateUserDeptId(user.getDeptId().toString());
baseMapper.insert(tInsuranceUnpurchaseApply);
}else {
} else {
baseMapper.updateById(tInsuranceUnpurchaseApply);
}
//更新附件
......@@ -191,7 +193,7 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
person.setEmpIdcardNo(vo.getEmpIdcardNo());
person.setEmpName(vo.getEmpName());
person.setPost(vo.getPost());
person.setApplyNoDetail(getDetailCode(applyDetail,vo.getRowIndex()));
person.setApplyNoDetail(getDetailCode(applyDetail, vo.getRowIndex()));
initValue(tInsuranceUnpurchaseApply, person);
personList.add(person);
}
......@@ -213,7 +215,7 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
tInsuranceUnpurchaseApply.setApplyNo(applyNo);
}
//申请人是否属于子分公司和该项目是否有审批通过记录赋值
setValue(tInsuranceUnpurchaseApply,user,tInsuranceUnpurchaseApply.getApplyNo());
setValue(tInsuranceUnpurchaseApply, user, tInsuranceUnpurchaseApply.getApplyNo());
tInsuranceUnpurchaseApply.setCreateTimeZc(LocalDateTime.now());
baseMapper.updateById(tInsuranceUnpurchaseApply);
if (tInsuranceUnpurchaseApply.getAuditFlag().equals(CommonConstants.ZERO_STRING)) {
......@@ -262,7 +264,7 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
personService.saveBatch(personInfoList);
} else {
//申请人是否属于子分公司和该项目是否有审批通过记录赋值
setValue(tInsuranceUnpurchaseApply,user,applyNo);
setValue(tInsuranceUnpurchaseApply, user, applyNo);
tInsuranceUnpurchaseApply.setCreateTimeZc(LocalDateTime.now());
tInsuranceUnpurchaseApply.setCreateBy(user.getId());
tInsuranceUnpurchaseApply.setCreateName(user.getNickname());
......@@ -316,6 +318,7 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
return R.failed(personList);
}
}
}
} catch (Exception e) {
e.printStackTrace();
return R.failed("系统异常,保存、更新失败!");
......@@ -350,8 +353,7 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
public List<TInsuranceUnpurchasePersonAddVo> addAndUpdCheck(TInsuranceUnpurchaseApply tInsuranceUnpurchaseApply) {
Map<String,String> sameCheckMap = new HashMap<>();
TInsuranceUnpurchaseApply exitApply;
TInsuranceUnpurchasePerson exit;
List<TInsuranceUnpurchasePersonAddVo> personList = tInsuranceUnpurchaseApply.getPersonList();
if (Common.isNotNull(personList) && !personList.isEmpty()) {
R<Boolean> flagSocial;
......
......@@ -125,7 +125,7 @@
inner join t_insurance_unpurchase_person b
on a.id = b.PARNET_ID
where
1=1 and a.DELETE_FLAG = '0' and a.reason_type = '1' and a.status != '0'
1=1 and a.DELETE_FLAG = '0' and a.reason_type = '1' and a.status in ('2','3')
<if test="id != null ">
AND a.id != #{id}
</if>
......@@ -139,7 +139,7 @@
inner join t_insurance_unpurchase_person b
on a.id = b.PARNET_ID
where
1=1 and a.DELETE_FLAG = '0' and a.reason_type = '2' and a.status != '0' and b.SALARY_NUM = 0
1=1 and a.DELETE_FLAG = '0' and a.reason_type = '2' and a.status in ('2','3') and b.SALARY_NUM = 0
<if test="id != null ">
AND a.id != #{id}
</if>
......
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