Commit 90d5928e authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/MVP1.7.23' into MVP1.7.23

parents 23965156 c99516ba
...@@ -64,6 +64,12 @@ public class TAutoMainRelExportVo implements Serializable { ...@@ -64,6 +64,12 @@ public class TAutoMainRelExportVo implements Serializable {
@Schema(description = "项目编码") @Schema(description = "项目编码")
private String deptNo; private String deptNo;
// ==================== 自动化配置项显示字段 ====================
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("自动化配置项")
@Schema(description = "自动化配置项列表(记录配置了哪些服务项目)")
private String autoConfigItemsDisplay;
/** /**
* 服务状态:0正常 1停止服务 2冻结 (是否使用:0是 非0否) * 服务状态:0正常 1停止服务 2冻结 (是否使用:0是 非0否)
*/ */
...@@ -114,12 +120,6 @@ public class TAutoMainRelExportVo implements Serializable { ...@@ -114,12 +120,6 @@ public class TAutoMainRelExportVo implements Serializable {
@Schema(description = "限制项显示(拼接后的服务项目名称)") @Schema(description = "限制项显示(拼接后的服务项目名称)")
private String restrictItemsDisplay; private String restrictItemsDisplay;
// ==================== 自动化配置项显示字段 ====================
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("自动化配置项")
@Schema(description = "自动化配置项列表(记录配置了哪些服务项目)")
private String autoConfigItemsDisplay;
/** /**
* 创建时间 * 创建时间
*/ */
......
...@@ -29,7 +29,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -29,7 +29,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; 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.icbc.api.request.EiopCustomerGroupSaveRequestV1;
import com.yifu.cloud.plus.v1.yifu.archives.entity.*; import com.yifu.cloud.plus.v1.yifu.archives.entity.*;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.*; import com.yifu.cloud.plus.v1.yifu.archives.mapper.*;
import com.yifu.cloud.plus.v1.yifu.archives.service.TAutoMainRelService; import com.yifu.cloud.plus.v1.yifu.archives.service.TAutoMainRelService;
...@@ -138,6 +137,10 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu ...@@ -138,6 +137,10 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu
@Autowired @Autowired
private TAutoMainRelRefreshLogMapper refreshLogMapper; private TAutoMainRelRefreshLogMapper refreshLogMapper;
// 项目表Mapper,用于查询服务事项
@Autowired
private TSettleDomainMapper settleDomainMapper;
public static final String itemsLabel = "label,description,disable"; public static final String itemsLabel = "label,description,disable";
public static final String itemsLabelRepeat = "同一项目岗位名称不可重复"; public static final String itemsLabelRepeat = "同一项目岗位名称不可重复";
...@@ -424,20 +427,24 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu ...@@ -424,20 +427,24 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu
//校验公积金规则主表信息 //校验公积金规则主表信息
TAutoFundRuleInfo autoFundRuleInfo = entity.getFundRuleInfo(); TAutoFundRuleInfo autoFundRuleInfo = entity.getFundRuleInfo();
if (Common.isNotNull(autoFundRuleInfo)){ if (Common.isNotNull(autoFundRuleInfo)) {
ExcelUtil<TAutoFundRuleInfo> excelUtil = new ExcelUtil<>(TAutoFundRuleInfo.class); ExcelUtil<TAutoFundRuleInfo> excelUtil = new ExcelUtil<>(TAutoFundRuleInfo.class);
ErrorMessage errorMessage = excelUtil.checkEntity(autoFundRuleInfo,0); ErrorMessage errorMessage = excelUtil.checkEntity(autoFundRuleInfo, 0);
if (Common.isNotNull(errorMessage)){ if (Common.isNotNull(errorMessage)) {
return R.failed(errorMessage.getMessage()); return R.failed(errorMessage.getMessage());
} }
} }
//校验公积金规则明细表信息 //校验公积金规则明细表信息
List<TAutoFundRuleRel> fundRuleRels = entity.getFundRuleRels(); List<TAutoFundRuleRel> fundRuleRels = entity.getFundRuleRels();
PARAM_IS_NOT_ERROR = checkFundRuleRels(fundRuleRels); PARAM_IS_NOT_ERROR = checkFundRuleRels(fundRuleRels);
if (PARAM_IS_NOT_ERROR != null){ if (PARAM_IS_NOT_ERROR != null) {
return PARAM_IS_NOT_ERROR; return PARAM_IS_NOT_ERROR;
} }
// 根据服务事项设置默认限制项(仅新增时处理)
setDefaultRestrictItemsByServerItem(autoMainRel);
//自动计算自动化配置项(设置5个独立字段)- 根据TAutoMainRelAddVo中的属性设置 //自动计算自动化配置项(设置5个独立字段)- 根据TAutoMainRelAddVo中的属性设置
generateAutoConfigItems(entity, autoMainRel); generateAutoConfigItems(entity, autoMainRel);
...@@ -445,12 +452,12 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu ...@@ -445,12 +452,12 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu
autoMainRel.setRuleUpdatePerson(user.getNickname()); autoMainRel.setRuleUpdatePerson(user.getNickname());
autoMainRel.setRuleUpdateTime(DateUtil.getCurrentDateTime()); autoMainRel.setRuleUpdateTime(DateUtil.getCurrentDateTime());
int res = baseMapper.insert(autoMainRel); int res = baseMapper.insert(autoMainRel);
if (res <= CommonConstants.ZERO_INT){ if (res <= CommonConstants.ZERO_INT) {
return R.failed(CommonConstants.SAVE_FAILED); return R.failed(CommonConstants.SAVE_FAILED);
} }
// 新增字典项 // 新增字典项
if (Common.isNotNull(autoDictItems)) { if (Common.isNotNull(autoDictItems)) {
for (SysAutoDictItem sysAutoDictItem:autoDictItems){ for (SysAutoDictItem sysAutoDictItem : autoDictItems) {
//初始化字典信息 //初始化字典信息
initDictItem(sysAutoDictItem, user, autoDict, autoMainRel); initDictItem(sysAutoDictItem, user, autoDict, autoMainRel);
sysAutoDictItem.setCreateTime(LocalDateTime.now()); sysAutoDictItem.setCreateTime(LocalDateTime.now());
...@@ -460,22 +467,22 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu ...@@ -460,22 +467,22 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu
} }
} }
//新增档案规则 //新增档案规则
if (Common.isNotNull(autoEmpRuleInfo)){ if (Common.isNotNull(autoEmpRuleInfo)) {
autoEmpRuleInfo.setDeptNo(autoMainRel.getDeptNo()); autoEmpRuleInfo.setDeptNo(autoMainRel.getDeptNo());
autoEmpRuleInfo.setDeptId(autoMainRel.getDeptId()); autoEmpRuleInfo.setDeptId(autoMainRel.getDeptId());
autoEmpRuleInfo.setMainId(autoMainRel.getId()); autoEmpRuleInfo.setMainId(autoMainRel.getId());
autoEmpRuleInfoMapper.insert(autoEmpRuleInfo); autoEmpRuleInfoMapper.insert(autoEmpRuleInfo);
} }
//新增商险规则 //新增商险规则
if (Common.isNotNull(autoInsurRuleInfo)){ if (Common.isNotNull(autoInsurRuleInfo)) {
autoInsurRuleInfo.setDeptNo(autoMainRel.getDeptNo()); autoInsurRuleInfo.setDeptNo(autoMainRel.getDeptNo());
autoInsurRuleInfo.setDeptId(autoMainRel.getDeptId()); autoInsurRuleInfo.setDeptId(autoMainRel.getDeptId());
autoInsurRuleInfo.setMainId(autoMainRel.getId()); autoInsurRuleInfo.setMainId(autoMainRel.getId());
autoInsurRuleInfoMapper.insert(autoInsurRuleInfo); autoInsurRuleInfoMapper.insert(autoInsurRuleInfo);
} }
//新增商险购买标准 //新增商险购买标准
if (Common.isNotNull(insurStandards)){ if (Common.isNotNull(insurStandards)) {
for (TAutoInsurStandard standard:insurStandards){ for (TAutoInsurStandard standard : insurStandards) {
standard.setMainId(autoInsurRuleInfo.getId()); standard.setMainId(autoInsurRuleInfo.getId());
autoInsurStandardMapper.insert(standard); autoInsurStandardMapper.insert(standard);
//新增购买标准子表 //新增购买标准子表
...@@ -483,15 +490,15 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu ...@@ -483,15 +490,15 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu
} }
} }
//新增员工合同签订规则配置表 //新增员工合同签订规则配置表
if (Common.isNotNull(autoContractRuleInfo)){ if (Common.isNotNull(autoContractRuleInfo)) {
autoContractRuleInfo.setDeptNo(autoMainRel.getDeptNo()); autoContractRuleInfo.setDeptNo(autoMainRel.getDeptNo());
autoContractRuleInfo.setDeptId(autoMainRel.getDeptId()); autoContractRuleInfo.setDeptId(autoMainRel.getDeptId());
autoContractRuleInfo.setMainId(autoMainRel.getId()); autoContractRuleInfo.setMainId(autoMainRel.getId());
autoContractRuleInfoMapper.insert(autoContractRuleInfo); autoContractRuleInfoMapper.insert(autoContractRuleInfo);
} }
//新增员工合同签订规则配置方案子表 //新增员工合同签订规则配置方案子表
if (Common.isNotNull(contractSchemes)){ if (Common.isNotNull(contractSchemes)) {
for (TAutoContractScheme scheme:contractSchemes){ for (TAutoContractScheme scheme : contractSchemes) {
scheme.setMainId(autoContractRuleInfo.getId()); scheme.setMainId(autoContractRuleInfo.getId());
scheme.setDeptNo(autoMainRel.getDeptNo()); scheme.setDeptNo(autoMainRel.getDeptNo());
scheme.setDeptId(autoMainRel.getDeptId()); scheme.setDeptId(autoMainRel.getDeptId());
...@@ -499,7 +506,7 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu ...@@ -499,7 +506,7 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu
} }
} }
//新增社保规则主表 //新增社保规则主表
if (Common.isNotNull(autoSocialRuleInfo)){ if (Common.isNotNull(autoSocialRuleInfo)) {
autoSocialRuleInfo.setDeptNo(autoMainRel.getDeptNo()); autoSocialRuleInfo.setDeptNo(autoMainRel.getDeptNo());
autoSocialRuleInfo.setDeptId(autoMainRel.getDeptId()); autoSocialRuleInfo.setDeptId(autoMainRel.getDeptId());
autoSocialRuleInfo.setMainId(autoMainRel.getId()); autoSocialRuleInfo.setMainId(autoMainRel.getId());
...@@ -509,8 +516,8 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu ...@@ -509,8 +516,8 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu
autoSocialRuleInfoMapper.insert(autoSocialRuleInfo); autoSocialRuleInfoMapper.insert(autoSocialRuleInfo);
} }
//新增社保规则明细表 //新增社保规则明细表
if (Common.isNotNull(socialRuleRels)){ if (Common.isNotNull(socialRuleRels)) {
for (TAutoSocialRuleRel rel:socialRuleRels){ for (TAutoSocialRuleRel rel : socialRuleRels) {
rel.setMainId(autoSocialRuleInfo.getId()); rel.setMainId(autoSocialRuleInfo.getId());
rel.setDeptNo(autoMainRel.getDeptNo()); rel.setDeptNo(autoMainRel.getDeptNo());
rel.setDeptId(autoMainRel.getDeptId()); rel.setDeptId(autoMainRel.getDeptId());
...@@ -521,7 +528,7 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu ...@@ -521,7 +528,7 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu
} }
} }
//新增公积金规则主表 //新增公积金规则主表
if (Common.isNotNull(autoFundRuleInfo)){ if (Common.isNotNull(autoFundRuleInfo)) {
autoFundRuleInfo.setDeptNo(autoMainRel.getDeptNo()); autoFundRuleInfo.setDeptNo(autoMainRel.getDeptNo());
autoFundRuleInfo.setDeptId(autoMainRel.getDeptId()); autoFundRuleInfo.setDeptId(autoMainRel.getDeptId());
autoFundRuleInfo.setMainId(autoMainRel.getId()); autoFundRuleInfo.setMainId(autoMainRel.getId());
...@@ -531,8 +538,8 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu ...@@ -531,8 +538,8 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu
autoFundRuleInfoMapper.insert(autoFundRuleInfo); autoFundRuleInfoMapper.insert(autoFundRuleInfo);
} }
//新增公积金规则明细表 //新增公积金规则明细表
if (Common.isNotNull(fundRuleRels)){ if (Common.isNotNull(fundRuleRels)) {
for (TAutoFundRuleRel rel:fundRuleRels){ for (TAutoFundRuleRel rel : fundRuleRels) {
rel.setMainId(autoFundRuleInfo.getId()); rel.setMainId(autoFundRuleInfo.getId());
rel.setDeptNo(autoMainRel.getDeptNo()); rel.setDeptNo(autoMainRel.getDeptNo());
rel.setDeptId(autoMainRel.getDeptId()); rel.setDeptId(autoMainRel.getDeptId());
...@@ -543,7 +550,7 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu ...@@ -543,7 +550,7 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu
} }
} }
return R.ok(); return R.ok();
}catch (Exception e){ }catch(Exception e){
// 捕获异常并返回友好提示 // 捕获异常并返回友好提示
return R.failed("系统异常:" + e.getMessage()); return R.failed("系统异常:" + e.getMessage());
} }
...@@ -1689,7 +1696,7 @@ private R<Boolean> checkItemRepeat(List<SysAutoDictItem> autoDictItems, Map<Stri ...@@ -1689,7 +1696,7 @@ private R<Boolean> checkItemRepeat(List<SysAutoDictItem> autoDictItems, Map<Stri
} }
if (recordBase.compareTo(minLowerLimit) > 0) { if (recordBase.compareTo(minLowerLimit) > 0) {
return R.failed("备案基数需小于等于最低缴纳基数(" + minLowerLimit + ")"); return R.failed(configName+":备案基数需小于等于最低缴纳基数(" + minLowerLimit + ")");
} }
return null; // 校验通过 return null; // 校验通过
...@@ -1710,7 +1717,7 @@ private R<Boolean> checkItemRepeat(List<SysAutoDictItem> autoDictItems, Map<Stri ...@@ -1710,7 +1717,7 @@ private R<Boolean> checkItemRepeat(List<SysAutoDictItem> autoDictItems, Map<Stri
} }
if (recordBase.compareTo(maxUpperLimit) < 0) { if (recordBase.compareTo(maxUpperLimit) < 0) {
return R.failed("备案基数需大于等于最高缴纳基数(" + maxUpperLimit + ")"); return R.failed(configName+":备案基数需大于等于最高缴纳基数(" + maxUpperLimit + ")");
} }
return null; // 校验通过 return null; // 校验通过
...@@ -1739,7 +1746,7 @@ private R<Boolean> checkItemRepeat(List<SysAutoDictItem> autoDictItems, Map<Stri ...@@ -1739,7 +1746,7 @@ private R<Boolean> checkItemRepeat(List<SysAutoDictItem> autoDictItems, Map<Stri
// 如果有超出范围的险种,返回错误提示 // 如果有超出范围的险种,返回错误提示
if (!invalidRanges.isEmpty()) { if (!invalidRanges.isEmpty()) {
String message = "备案基数需在" + String.join("、", invalidRanges) + "范围之内(含最低/最高)"; String message = configName+":备案基数需在" + String.join("、", invalidRanges) + "范围之内(含最低/最高)";
return R.failed(message); return R.failed(message);
} }
...@@ -2516,4 +2523,77 @@ private R<Boolean> checkItemRepeat(List<SysAutoDictItem> autoDictItems, Map<Stri ...@@ -2516,4 +2523,77 @@ private R<Boolean> checkItemRepeat(List<SysAutoDictItem> autoDictItems, Map<Stri
refreshLogMapper.insert(log); refreshLogMapper.insert(log);
} }
/**
* 根据服务事项设置默认限制项(仅新增时调用)
* 规则:
* 1. restrictArchive 始终为 "0"(档案不限制)
* 2. 根据服务事项设置其他限制项:
* - 服务事项包含"社保"或"公积金" → restrictSocialFund = "1"
* - 服务事项包含"合同" → restrictContract = "1"
* - 服务事项包含"商险" → restrictInsurance = "1"
*
* @param entity 项目配置实体
*/
private void setDefaultRestrictItemsByServerItem(TAutoMainRel entity) {
if (Common.isEmpty(entity) || Common.isEmpty(entity.getDeptNo())) {
return;
}
// 1. 查询项目的服务事项
String serverItem = getServerItemByDeptNo(entity.getDeptNo());
// 2. 档案默认不限制
entity.setRestrictArchive(CommonConstants.ZERO_STRING);
// 3. 如果服务事项为空,所有限制项默认为不限制
if (Common.isEmpty(serverItem)) {
entity.setRestrictInsurance(CommonConstants.ZERO_STRING);
entity.setRestrictContract(CommonConstants.ZERO_STRING);
entity.setRestrictSocialFund(CommonConstants.ZERO_STRING);
return;
}
// 4. 根据服务事项设置限制项
// 判断是否包含社保或公积金
if (serverItem.contains("社保") || serverItem.contains("公积金")) {
entity.setRestrictSocialFund(CommonConstants.ONE_STRING);
} else {
entity.setRestrictSocialFund(CommonConstants.ZERO_STRING);
}
// 判断是否包含合同-- 合同默认配置为是
entity.setRestrictContract(CommonConstants.ONE_STRING);
// 判断是否包含商险
if (serverItem.contains("商险")) {
entity.setRestrictInsurance(CommonConstants.ONE_STRING);
} else {
entity.setRestrictInsurance(CommonConstants.ZERO_STRING);
}
}
/**
* 根据项目编码查询服务事项
*
* @param deptNo 项目编码
* @return 服务事项字符串,如"社保、公积金、合同、商险"
*/
private String getServerItemByDeptNo(String deptNo) {
if (Common.isEmpty(deptNo)) {
return null;
}
// 从 TSettleDomain 表查询 serverItem
LambdaQueryWrapper<TSettleDomain> wrapper = Wrappers.lambdaQuery();
wrapper.eq(TSettleDomain::getDepartNo, deptNo)
.eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING)
.last(CommonConstants.LAST_ONE_SQL);
TSettleDomain settleDomain = settleDomainMapper.selectOne(wrapper);
if (Common.isNotNull(settleDomain)) {
return settleDomain.getServerItem();
}
return null;
}
} }
\ No newline at end of file
...@@ -2152,23 +2152,26 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -2152,23 +2152,26 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
if (Common.isEmpty(checkRes) || checkRes.getCode() != CommonConstants.SUCCESS){ if (Common.isEmpty(checkRes) || checkRes.getCode() != CommonConstants.SUCCESS){
return checkRes.getMsg(); return checkRes.getMsg();
} }
EmployeeRegistration exit = baseMapper.selectOne(Wrappers.<EmployeeRegistration>query().lambda() // 查询该员工在该项目下最新的入职登记记录(不限状态)
EmployeeRegistration latestExit = baseMapper.selectOne(Wrappers.<EmployeeRegistration>query().lambda()
.eq(EmployeeRegistration::getEmpIdcard, registration.getEmpIdcard()) .eq(EmployeeRegistration::getEmpIdcard, registration.getEmpIdcard())
.eq(EmployeeRegistration::getDeptNo, registration.getDeptNo()) .eq(EmployeeRegistration::getDeptNo, registration.getDeptNo())
.eq(EmployeeRegistration::getFeedbackType, registration.getFeedbackType()) .eq(EmployeeRegistration::getFeedbackType, registration.getFeedbackType())
.orderByDesc(EmployeeRegistration::getCreateTime) .orderByDesc(EmployeeRegistration::getCreateTime)
.in(EmployeeRegistration::getProcessStatus, CommonConstants.processStatus)
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(exit)) {
// 如果存在历史记录,根据不同状态处理
if (Common.isNotNull(latestExit)) {
String processStatus = latestExit.getProcessStatus();
// 状态为待处理(0)或已接收(1) → 拦截重复登记
if (CommonConstants.processStatus.contains(processStatus)) {
return RegistConstants.REGIST_SAME_CHECK; return RegistConstants.REGIST_SAME_CHECK;
} }
//针对入职的判断
if (CommonConstants.ONE_STRING.equals(registration.getFeedbackType())) { // 状态为已处理(2) → 需要校验项目档案
int nowDay = Integer.parseInt(DateUtil.getThisDay()); if (CommonConstants.TWO_STRING.equals(processStatus)
if (Common.isNot16Age(registration.getEmpIdcard(), nowDay)) { && CommonConstants.ONE_STRING.equals(registration.getFeedbackType())) {
return CommonConstants.UNDER_16_ERROR;
}
//针对入职的判断是否存在在项项目档案
EmpProjectStatusVo vo = new EmpProjectStatusVo(); EmpProjectStatusVo vo = new EmpProjectStatusVo();
vo.setEmpIdcard(registration.getEmpIdcard()); vo.setEmpIdcard(registration.getEmpIdcard());
vo.setDeptNo(registration.getDeptNo()); vo.setDeptNo(registration.getDeptNo());
...@@ -2177,6 +2180,16 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -2177,6 +2180,16 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
return RegistConstants.EMP_PROJECT_IS_EXIT_CHECK; return RegistConstants.EMP_PROJECT_IS_EXIT_CHECK;
} }
} }
// 其他状态(如拒绝入职3、已离职等)→ 允许重新登记,不校验项目档案
}
//针对入职的其他判断
if (CommonConstants.ONE_STRING.equals(registration.getFeedbackType())) {
int nowDay = Integer.parseInt(DateUtil.getThisDay());
if (Common.isNot16Age(registration.getEmpIdcard(), nowDay)) {
return CommonConstants.UNDER_16_ERROR;
}
}
//针对离职的判断人员项目档案状态是否正常 //针对离职的判断人员项目档案状态是否正常
if (CommonConstants.TWO_STRING.equals(registration.getFeedbackType())) { if (CommonConstants.TWO_STRING.equals(registration.getFeedbackType())) {
EmpProjectStatusVo vo = new EmpProjectStatusVo(); EmpProjectStatusVo vo = new EmpProjectStatusVo();
...@@ -3199,15 +3212,20 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -3199,15 +3212,20 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
.eq(EmployeeRegistration::getEmpIdcard, insert.getEmpIdcard()) .eq(EmployeeRegistration::getEmpIdcard, insert.getEmpIdcard())
.eq(EmployeeRegistration::getDeptNo, insert.getDeptNo()) .eq(EmployeeRegistration::getDeptNo, insert.getDeptNo())
.eq(EmployeeRegistration::getFeedbackType, insert.getFeedbackType()) .eq(EmployeeRegistration::getFeedbackType, insert.getFeedbackType())
.in(EmployeeRegistration::getProcessStatus, CommonConstants.processStatus)
.orderByDesc(EmployeeRegistration::getCreateTime) .orderByDesc(EmployeeRegistration::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
// 如果存在历史记录,根据不同状态处理
if (Common.isNotNull(exit)) { if (Common.isNotNull(exit)) {
String processStatus = exit.getProcessStatus();
// 状态为待处理(0)或已接收(1) → 拦截重复登记
if (CommonConstants.processStatus.contains(processStatus)) {
errorList.add(RegistConstants.REGIST_SAME_CHECK); errorList.add(RegistConstants.REGIST_SAME_CHECK);
} }
// 状态为已处理(2) → 需要校验项目档案
//针对入职的判断是否存在在项项目档案 else if (CommonConstants.TWO_STRING.equals(processStatus)
if (CommonConstants.ONE_STRING.equals(insert.getFeedbackType())) { && CommonConstants.ONE_STRING.equals(exit.getFeedbackType())) {
EmpProjectStatusVo vo = new EmpProjectStatusVo(); EmpProjectStatusVo vo = new EmpProjectStatusVo();
vo.setEmpIdcard(insert.getEmpIdcard()); vo.setEmpIdcard(insert.getEmpIdcard());
vo.setDeptNo(insert.getDeptNo()); vo.setDeptNo(insert.getDeptNo());
...@@ -3216,6 +3234,8 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -3216,6 +3234,8 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
errorList.add(RegistConstants.EMP_PROJECT_IS_EXIT_CHECK); errorList.add(RegistConstants.EMP_PROJECT_IS_EXIT_CHECK);
} }
} }
// 其他状态(如拒绝入职3、已离职等)→ 允许重新登记,不校验项目档案
}
//针对离职的判断人员项目档案状态是否正常(前置条件:项目存在) //针对离职的判断人员项目档案状态是否正常(前置条件:项目存在)
if (CommonConstants.TWO_STRING.equals(insert.getFeedbackType()) && Common.isNotNull(selectVo)) { if (CommonConstants.TWO_STRING.equals(insert.getFeedbackType()) && Common.isNotNull(selectVo)) {
......
...@@ -10438,6 +10438,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -10438,6 +10438,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.set(TEmployeeInsurancePre::getErrorTime,null); .set(TEmployeeInsurancePre::getErrorTime,null);
employeeInsurancePreMapper.update(null, updateDiyInfoWrapper); employeeInsurancePreMapper.update(null, updateDiyInfoWrapper);
LambdaUpdateWrapper<TInsurancePreRenewDetail> updateReNewInfoWrapper = new LambdaUpdateWrapper<>();
updateReNewInfoWrapper.eq(TInsurancePreRenewDetail::getInsurancesId, ids)
.set(TInsurancePreRenewDetail::getProcessStatus,CommonConstants.THREE_STRING)
.set(TInsurancePreRenewDetail::getErrorTime,null)
.set(TInsurancePreRenewDetail::getErrorInfo,null);
tInsurancePreRenewDetailMapper.update(null, updateReNewInfoWrapper);
} }
} }
} }
......
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