Commit e9bcddf2 authored by hongguangwu's avatar hongguangwu

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

parents 6cd31835 ffd29a44
......@@ -546,7 +546,7 @@ public class TEmployeeContractPreVo extends RowIndex implements Serializable {
private String workAddress;
@ExcelAttribute(name = "合同截止日期类型")
@Schema(description = "合同截止日期类型 0合同年限推算1同商务合同一致2已完成固定工作位期限")
@Schema(description = "合同截止日期类型 0合同年限推算1同商务合同一致2已完成固定工作位期限 3 指定日期")
@ExcelProperty("合同截止日期类型")
private String contractEndType;
......
......@@ -204,17 +204,19 @@ public class InsuranceDaprUtil {
/**
* @param paramVoList 查询参数列表(身份证 + 项目编码)
* @param operator 操作人员
* @param operateType 操作人ID
* @param operateType 操作类型
* @Description: 批量更新商险替换标签和说明(商险服务侧实现完整逻辑)
* @Author: fxj
* @Date: 2026-03-19
* @return: void
**/
public void batchUpdateInsuranceReplaceTagByParamList(List<BaseSearchVO> paramVoList, String operator, String operateType) {
public void batchUpdateInsuranceReplaceTagByParamList(List<BaseSearchVO> paramVoList, String operator,String operatorId, String operateType) {
// 构建请求参数
Map<String, Object> paramMap = new HashMap<>();
paramMap.put("paramVoList", paramVoList);
paramMap.put("operator", operator);
paramMap.put("operatorId", operatorId);
paramMap.put("operateType", operateType);
HttpDaprUtil.invokeMethodPost(daprInsurancesProperties.getAppUrl(),daprInsurancesProperties.getAppId()
......
......@@ -901,7 +901,7 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
insuranceDaprUtil.updateInsurancePreRenewToIsLeave(paramVo);
// 离职确认后,对该人员在该项目下的已投保未过期且有效的商险数据进行打标“可替换”
updateInsuranceReplaceTagBySingle(registrationOld.getEmpIdcard(), registrationOld.getDeptNo(), user.getNickname());
updateInsuranceReplaceTagBySingle(registrationOld.getEmpIdcard(), registrationOld.getDeptNo(), user.getNickname(),user.getId());
return R.ok();
} else {
return R.failed("状态不是待确认");
......@@ -1018,7 +1018,7 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
insuranceDaprUtil.updateInsurancePreRenewToIsLeaveList(baseSearchListVO);
// 离职确认后,对该人员在该项目下的已投保未过期且有效的商险数据进行打标“可替换”
updateInsuranceReplaceTagByBatch(paramVoList, user.getNickname());
updateInsuranceReplaceTagByBatch(paramVoList, user.getNickname(),user.getId());
}
return R.ok();
}
......@@ -1045,13 +1045,13 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
* @param operator: 操作人员
* @return: void
**/
private void updateInsuranceReplaceTagBySingle(String empIdcard, String deptNo, String operator) {
private void updateInsuranceReplaceTagBySingle(String empIdcard, String deptNo, String operator,String operatorId) {
List<BaseSearchVO> paramVoList = new ArrayList<>();
BaseSearchVO paramVo = new BaseSearchVO();
paramVo.setEmpIdCard(empIdcard);
paramVo.setDeptNo(deptNo);
paramVoList.add(paramVo);
updateInsuranceReplaceTagByBatch(paramVoList, operator);
updateInsuranceReplaceTagByBatch(paramVoList, operator,operatorId);
}
/**
......@@ -1062,7 +1062,7 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
* @param operator: 操作人员
* @return: void
**/
private void updateInsuranceReplaceTagByBatch(List<BaseSearchVO> paramVoList, String operator) {
private void updateInsuranceReplaceTagByBatch(List<BaseSearchVO> paramVoList, String operator,String operatorId) {
if (Common.isEmpty(paramVoList)) {
log.warn("批量更新商险替换标签失败,参数列表为空");
return;
......@@ -1070,7 +1070,7 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
try {
// 调用商险服务批量更新替换标签和说明
insuranceDaprUtil.batchUpdateInsuranceReplaceTagByParamList(paramVoList, operator, "离职确认操作");
insuranceDaprUtil.batchUpdateInsuranceReplaceTagByParamList(paramVoList, operator, operatorId, "离职确认操作");
} catch (Exception e) {
log.warn("批量更新商险替换标签异常,参数列表大小:{}", paramVoList.size(), e);
}
......
......@@ -1151,7 +1151,8 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
employeeContractPreVo.setContractDurationMonth(CommonConstants.ZERO_STRING);
}
}
if (CommonConstants.TWENTY_STRING.equals(employeeContractPreVo.getContractType())){
if (CommonConstants.TWENTY_STRING.equals(employeeContractPreVo.getContractType())
||"劳务派遣合同".equals(employeeContractPreVo.getContractType())){
if (Common.isNotNull(employeeContractPreVo.getDispatchPeriodYear()) && Common.isNotNull(employeeContractPreVo.getDispatchPeriodMonth())){
//校验劳务派遣的派遣年限必须为两年
......@@ -1407,6 +1408,26 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
receiveVoList.add(receiveVo);
continue;
}
TEmployeeContractPreVo employeeContractPreVo = new TEmployeeContractPreVo();
if (preVo.getServerItem().contains("合同") && Common.isNotNull(preVo.getEmployeeContractPreVos())) {
BeanUtils.copyProperties(preVo.getEmployeeContractPreVos(),employeeContractPreVo);
//生成合同待购买数据
String errorStr = null;
try {
errorStr = initContractPreInfo(registration, employeeContractPreVo, user);
} catch (ParseException e) {
exitCheckVo.setType("合同");
exitCheckVo.setErrorMsg("合同初始化异常:"+e.getMessage());
errorList.add(exitCheckVo);
continue;
}
if (null != errorStr){
exitCheckVo.setType("合同");
exitCheckVo.setErrorMsg(errorStr);
errorList.add(exitCheckVo);
continue;
}
}
registration.setProcessStatus(CommonConstants.ZERO_STRING);
baseMapper.updateById(registration);
logService.saveLog(registration.getId(), CommonConstants.ZERO_STRING, RegistConstants.CONFIRM_SUBMIT, LocalDateTime.now(),
......@@ -1422,17 +1443,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
initInsruancePreInfo(registration, insurancePreVo, user, domainR.getData());
insuranceDaprUtil.saveInsurancePreInfo(preVo);
}
TEmployeeContractPreVo employeeContractPreVo = new TEmployeeContractPreVo();
if (preVo.getServerItem().contains("合同") && Common.isNotNull(preVo.getEmployeeContractPreVos())) {
BeanUtils.copyProperties(preVo.getEmployeeContractPreVos(),employeeContractPreVo);
//生成合同待购买数据
String errorStr = initContractPreInfo(registration, employeeContractPreVo, user);
if (null != errorStr){
exitCheckVo.setType("合同");
exitCheckVo.setErrorMsg(errorStr);
errorList.add(exitCheckVo);
continue;
}
if (preVo.getServerItem().contains("合同") && Common.isNotNull(employeeContractPreVo)) {
employeeContractPreVo.setRegisterId(domainR.getData());
archivesDaprUtil.saveContractPreInfo(employeeContractPreVo);
}
......
......@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.insurances.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.alibaba.fastjson.JSON;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ResultConstants;
......@@ -448,11 +449,18 @@ public class TInsuranceDetailController {
@Inner
@PostMapping("/inner/batchUpdateInsuranceReplaceTagByParamList")
public void batchUpdateInsuranceReplaceTagByParamList(@RequestBody Map<String, Object> paramMap){
List<BaseSearchVO> paramVoList = (List<BaseSearchVO>) paramMap.get("paramVoList");
// 将 LinkedHashMap 转换为 BaseSearchVO 列表
Object paramVoListObj = paramMap.get("paramVoList");
List<BaseSearchVO> paramVoList = null;
if (paramVoListObj instanceof List) {
// 将 LinkedHashMap 列表转换为 BaseSearchVO 列表
String json = JSON.toJSONString(paramVoListObj);
paramVoList = JSON.parseArray(json, BaseSearchVO.class);
}
String operator = (String) paramMap.get("operator");
String operatorId = (String) paramMap.get("operatorId");
String operateType = (String) paramMap.get("operateType");
tInsuranceDetailService.batchUpdateInsuranceReplaceTagByParamList(paramVoList, operator, operateType);
tInsuranceDetailService.batchUpdateInsuranceReplaceTagByParamList(paramVoList, operator,operatorId, operateType);
}
/***********************减员办理********************************/
......
......@@ -234,7 +234,7 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* @Date: 2026-03-19
* @return: void
**/
void batchUpdateInsuranceReplaceTagByParamList(List<BaseSearchVO> paramVoList, String operator, String operateType);
void batchUpdateInsuranceReplaceTagByParamList(List<BaseSearchVO> paramVoList, String operator,String operatorId, String operateType);
/***********************减员办理********************************/
......
......@@ -5484,7 +5484,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return: void
**/
@Override
public void batchUpdateInsuranceReplaceTagByParamList(List<BaseSearchVO> paramVoList, String operator, String operateType) {
public void batchUpdateInsuranceReplaceTagByParamList(List<BaseSearchVO> paramVoList, String operator,String operatorId, String operateType) {
if (Common.isEmpty(paramVoList)) {
log.warn("批量更新商险替换标签失败,参数列表为空");
return;
......@@ -5524,7 +5524,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
LambdaUpdateWrapper<TInsuranceDetail> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.set(TInsuranceDetail::getReplaceTag, InsurancesConstants.INSURANCE_REPLACE_TAG_REPLACE)
.set(TInsuranceDetail::getReplaceRemark, replaceRemark)
.set(TInsuranceDetail::getUpdateBy, '1')
.set(TInsuranceDetail::getUpdateBy, operatorId)
.set(TInsuranceDetail::getUpdateTime, updateTime)
.eq(TInsuranceDetail::getId, detail.getId());
update(updateWrapper);
......
......@@ -750,7 +750,8 @@
a.UNIT_NAME as unitName,
a.UNIT_NO as unitNo,
a.IS_ADRESS as isAdress,
a.REPLACE_TAG as replaceTag
a.REPLACE_TAG as replaceTag,
a.REPLACE_REMARK as replaceRemark
from
t_insurance_detail a
where
......
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