Commit 0fec7a62 authored by huyuchen's avatar huyuchen

huych-社保自动化相关提交

parent 1d4f71a4
...@@ -795,6 +795,10 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -795,6 +795,10 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
return R.failed("流程中的社保待购买数据不可修改!"); return R.failed("流程中的社保待购买数据不可修改!");
} }
} }
//更新合同签署状态
if (null != employeeRegistrationPre.getDispatchInfoPreVo()) {
employeeRegistrationPre.getDispatchInfoPreVo().setContractStatus(flag ? CommonConstants.ZERO_STRING :CommonConstants.ONE_STRING);
}
} }
//操作记录中字典值的转化 //操作记录中字典值的转化
......
...@@ -602,13 +602,13 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -602,13 +602,13 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
} }
} }
//1.9.12合同自动化校验逻辑 //1.9.12合同自动化校验逻辑
TEmployeeAutoRegistCheckVo cardVo = new TEmployeeAutoRegistCheckVo();
cardVo.setEmpIdcard(registration.getEmpIdcard());
cardVo.setDeptNo(registration.getDeptNo());
R<Boolean> flag = archivesDaprUtil.selectExitEmpCopntract(cardVo);
if (preVo.getServerItem().contains("合同") && null != preVo.getEmployeeContractPreVos()) { if (preVo.getServerItem().contains("合同") && null != preVo.getEmployeeContractPreVos()) {
TEmployeeContractPreVo employeeContractPreVo = preVo.getEmployeeContractPreVos(); TEmployeeContractPreVo employeeContractPreVo = preVo.getEmployeeContractPreVos();
//根据身份证号码和项目编号查询合同 //根据身份证号码和项目编号查询合同
TEmployeeAutoRegistCheckVo cardVo = new TEmployeeAutoRegistCheckVo();
cardVo.setEmpIdcard(registration.getEmpIdcard());
cardVo.setDeptNo(registration.getDeptNo());
R<Boolean> flag = archivesDaprUtil.selectExitEmpCopntract(cardVo);
//是否已签署为是需要判断合同是否在用或者流程中 //是否已签署为是需要判断合同是否在用或者流程中
if (CommonConstants.ZERO_STRING.equals(employeeContractPreVo.getContractFlag()) && if (CommonConstants.ZERO_STRING.equals(employeeContractPreVo.getContractFlag()) &&
(Common.isEmpty(flag) || Boolean.TRUE.equals(!flag.getData()))) { (Common.isEmpty(flag) || Boolean.TRUE.equals(!flag.getData()))) {
...@@ -634,20 +634,26 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -634,20 +634,26 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
} }
} }
//合同签署状态赋值
if (null != preVo.getDispatchInfoPreVo()) {
if (Common.isNotNull(flag) && Boolean.TRUE.equals(flag.getData())) {
preVo.getDispatchInfoPreVo().setContractStatus(CommonConstants.ZERO_STRING);
} else {
preVo.getDispatchInfoPreVo().setContractStatus(CommonConstants.ONE_STRING);
}
}
//1.9.16社保自动化校验逻辑 //1.9.16社保自动化校验逻辑
if (preVo.getServerItem().contains("社保购买")) { if (preVo.getServerItem().contains("社保购买")) {
//根据身份证号码和项目编号查询合同 //根据身份证号码和项目编号查询合同
TEmployeeAutoRegistCheckVo cardVo = new TEmployeeAutoRegistCheckVo(); R<Boolean> socialFlag = socialDaprUtils.selectExitEmpSocial(cardVo);
cardVo.setEmpIdcard(registration.getEmpIdcard());
R<Boolean> flag = socialDaprUtils.selectExitEmpSocial(cardVo);
//是否已签署为是需要判断合同是否在用或者流程中 //是否已签署为是需要判断合同是否在用或者流程中
if (CommonConstants.ZERO_STRING.equals(preVo.getSocialIsBuy()) && if (CommonConstants.ZERO_STRING.equals(preVo.getSocialIsBuy()) &&
(Common.isEmpty(flag) || Boolean.TRUE.equals(!flag.getData()))) { (Common.isEmpty(socialFlag) || Boolean.TRUE.equals(!socialFlag.getData()))) {
return R.other(CommonConstants.TWO_INT,null,"未找到流程中或者在用的社保信息!"); return R.other(CommonConstants.TWO_INT,null,"未找到流程中或者在用的社保信息!");
} }
//是否已签署为否需要判断是否在用或者流程中的合同 //是否已签署为否需要判断是否在用或者流程中的合同
if (CommonConstants.ONE_STRING.equals(preVo.getSocialIsBuy()) && if (CommonConstants.ONE_STRING.equals(preVo.getSocialIsBuy()) &&
Common.isNotNull(flag) && Boolean.TRUE.equals(flag.getData())) { Common.isNotNull(socialFlag) && Boolean.TRUE.equals(socialFlag.getData())) {
return R.other(CommonConstants.TWO_INT,null,"该人员存在在途/有效的社保数据,请将“是否已参保”调整为“是”"); return R.other(CommonConstants.TWO_INT,null,"该人员存在在途/有效的社保数据,请将“是否已参保”调整为“是”");
} }
} }
...@@ -960,12 +966,12 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -960,12 +966,12 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
} }
} }
//1.9.12合同自动化校验逻辑 //1.9.12合同自动化校验逻辑
//根据身份证号码和项目编号查询合同
TEmployeeAutoRegistCheckVo cardVo = new TEmployeeAutoRegistCheckVo();
cardVo.setEmpIdcard(registration.getEmpIdcard());
cardVo.setDeptNo(registration.getDeptNo());
flag = archivesDaprUtil.selectExitEmpCopntract(cardVo);
if (preVo.getServerItem().contains("合同") && null != preVo.getEmployeeContractPreVos()) { if (preVo.getServerItem().contains("合同") && null != preVo.getEmployeeContractPreVos()) {
//根据身份证号码和项目编号查询合同
TEmployeeAutoRegistCheckVo cardVo = new TEmployeeAutoRegistCheckVo();
cardVo.setEmpIdcard(registration.getEmpIdcard());
cardVo.setDeptNo(registration.getDeptNo());
flag = archivesDaprUtil.selectExitEmpCopntract(cardVo);
//是否已签署为否需要判断是否在用或者流程中的合同 //是否已签署为否需要判断是否在用或者流程中的合同
if (Common.isNotNull(flag) && Boolean.TRUE.equals(flag.getData())) { if (Common.isNotNull(flag) && Boolean.TRUE.equals(flag.getData())) {
exitCheckVo.setType("合同"); exitCheckVo.setType("合同");
...@@ -974,12 +980,18 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -974,12 +980,18 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
continue; continue;
} }
} }
//合同签署状态赋值
if (null != preVo.getDispatchInfoPreVo()) {
if (Common.isNotNull(flag) && Boolean.TRUE.equals(flag.getData())) {
preVo.getDispatchInfoPreVo().setContractStatus(CommonConstants.ZERO_STRING);
} else {
preVo.getDispatchInfoPreVo().setContractStatus(CommonConstants.ONE_STRING);
}
}
//1.9.16社保自动化校验逻辑 //1.9.16社保自动化校验逻辑
if (preVo.getServerItem().contains("社保购买") && null != preVo.getDispatchInfoPreVo()) { if (preVo.getServerItem().contains("社保购买") && null != preVo.getDispatchInfoPreVo()) {
//根据身份证号码和项目编号查询合同 //根据身份证号码和项目编号查询合同
TEmployeeAutoRegistCheckVo cardVo = new TEmployeeAutoRegistCheckVo();
cardVo.setEmpIdcard(registration.getEmpIdcard());
flag = socialDaprUtils.selectExitEmpSocial(cardVo); flag = socialDaprUtils.selectExitEmpSocial(cardVo);
//是否已签署为否需要判断是否在用或者流程中的合同 //是否已签署为否需要判断是否在用或者流程中的合同
if (Common.isNotNull(flag) && Boolean.TRUE.equals(flag.getData())) { if (Common.isNotNull(flag) && Boolean.TRUE.equals(flag.getData())) {
...@@ -1035,7 +1047,9 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -1035,7 +1047,9 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
if (preVo.getServerItem().contains("社保购买") && (null != preVo.getExitSocialInfoList() if (preVo.getServerItem().contains("社保购买") && (null != preVo.getExitSocialInfoList()
|| null != preVo.getDispatchInfoPreVo())) { || null != preVo.getDispatchInfoPreVo())) {
//生成社保待购买或者已购买数据 //生成社保待购买或者已购买数据
initSocialPreInfo(registration, preVo.getDispatchInfoPreVo(), user, domainR.getData()); if (null != preVo.getDispatchInfoPreVo()) {
initSocialPreInfo(registration, preVo.getDispatchInfoPreVo(), user, domainR.getData());
}
socialDaprUtils.saveSocialPreInfo(preVo); socialDaprUtils.saveSocialPreInfo(preVo);
} }
} }
...@@ -1714,7 +1728,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -1714,7 +1728,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
vo.setRegistDate(preVo.getJoinLeaveDate()); vo.setRegistDate(preVo.getJoinLeaveDate());
Date date = this.addYearsMonths(vo); Date date = this.addYearsMonths(vo);
TEmployeeInsuranceWorkDayVo dayVo = new TEmployeeInsuranceWorkDayVo(); TEmployeeInsuranceWorkDayVo dayVo = new TEmployeeInsuranceWorkDayVo();
dayVo.setType(CommonConstants.TWO_STRING); dayVo.setType(CommonConstants.THREE_STRING);
dayVo.setRegistDate(date); dayVo.setRegistDate(date);
dayVo.setRegistType(0); dayVo.setRegistType(0);
R<TEmployeeInsuranceWorkDayVo> dataR = socialDaprUtils.getBeforeOrAfterWorkDay(dayVo); R<TEmployeeInsuranceWorkDayVo> dataR = socialDaprUtils.getBeforeOrAfterWorkDay(dayVo);
......
...@@ -212,7 +212,7 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap ...@@ -212,7 +212,7 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
vo.setRegistDate(preVo.getJoinLeaveDate()); vo.setRegistDate(preVo.getJoinLeaveDate());
Date date = this.addYearsMonths(vo); Date date = this.addYearsMonths(vo);
TEmployeeInsuranceWorkDayVo dayVo = new TEmployeeInsuranceWorkDayVo(); TEmployeeInsuranceWorkDayVo dayVo = new TEmployeeInsuranceWorkDayVo();
dayVo.setType(CommonConstants.TWO_STRING); dayVo.setType(CommonConstants.THREE_STRING);
dayVo.setRegistDate(date); dayVo.setRegistDate(date);
dayVo.setRegistType(0); dayVo.setRegistType(0);
TEmployeeInsuranceWorkDayVo dataR = tHolidayInfoService.getInitBeforeOrAfterWorkDay(dayVo); TEmployeeInsuranceWorkDayVo dataR = tHolidayInfoService.getInitBeforeOrAfterWorkDay(dayVo);
......
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