Commit 4577cd95 authored by huyuchen's avatar huyuchen

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

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