Commit ffd29a44 authored by fangxinjiang's avatar fangxinjiang

商险可替换标签相关调整-fxj

parent c1757c63
...@@ -546,7 +546,7 @@ public class TEmployeeContractPreVo extends RowIndex implements Serializable { ...@@ -546,7 +546,7 @@ public class TEmployeeContractPreVo extends RowIndex implements Serializable {
private String workAddress; private String workAddress;
@ExcelAttribute(name = "合同截止日期类型") @ExcelAttribute(name = "合同截止日期类型")
@Schema(description = "合同截止日期类型 0合同年限推算1同商务合同一致2已完成固定工作位期限") @Schema(description = "合同截止日期类型 0合同年限推算1同商务合同一致2已完成固定工作位期限 3 指定日期")
@ExcelProperty("合同截止日期类型") @ExcelProperty("合同截止日期类型")
private String contractEndType; private String contractEndType;
......
...@@ -204,17 +204,19 @@ public class InsuranceDaprUtil { ...@@ -204,17 +204,19 @@ public class InsuranceDaprUtil {
/** /**
* @param paramVoList 查询参数列表(身份证 + 项目编码) * @param paramVoList 查询参数列表(身份证 + 项目编码)
* @param operator 操作人员 * @param operator 操作人员
* @param operateType 操作人ID
* @param operateType 操作类型 * @param operateType 操作类型
* @Description: 批量更新商险替换标签和说明(商险服务侧实现完整逻辑) * @Description: 批量更新商险替换标签和说明(商险服务侧实现完整逻辑)
* @Author: fxj * @Author: fxj
* @Date: 2026-03-19 * @Date: 2026-03-19
* @return: void * @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<>(); Map<String, Object> paramMap = new HashMap<>();
paramMap.put("paramVoList", paramVoList); paramMap.put("paramVoList", paramVoList);
paramMap.put("operator", operator); paramMap.put("operator", operator);
paramMap.put("operatorId", operatorId);
paramMap.put("operateType", operateType); paramMap.put("operateType", operateType);
HttpDaprUtil.invokeMethodPost(daprInsurancesProperties.getAppUrl(),daprInsurancesProperties.getAppId() HttpDaprUtil.invokeMethodPost(daprInsurancesProperties.getAppUrl(),daprInsurancesProperties.getAppId()
......
...@@ -901,7 +901,7 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe ...@@ -901,7 +901,7 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
insuranceDaprUtil.updateInsurancePreRenewToIsLeave(paramVo); insuranceDaprUtil.updateInsurancePreRenewToIsLeave(paramVo);
// 离职确认后,对该人员在该项目下的已投保未过期且有效的商险数据进行打标“可替换” // 离职确认后,对该人员在该项目下的已投保未过期且有效的商险数据进行打标“可替换”
updateInsuranceReplaceTagBySingle(registrationOld.getEmpIdcard(), registrationOld.getDeptNo(), user.getNickname()); updateInsuranceReplaceTagBySingle(registrationOld.getEmpIdcard(), registrationOld.getDeptNo(), user.getNickname(),user.getId());
return R.ok(); return R.ok();
} else { } else {
return R.failed("状态不是待确认"); return R.failed("状态不是待确认");
...@@ -1018,7 +1018,7 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe ...@@ -1018,7 +1018,7 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
insuranceDaprUtil.updateInsurancePreRenewToIsLeaveList(baseSearchListVO); insuranceDaprUtil.updateInsurancePreRenewToIsLeaveList(baseSearchListVO);
// 离职确认后,对该人员在该项目下的已投保未过期且有效的商险数据进行打标“可替换” // 离职确认后,对该人员在该项目下的已投保未过期且有效的商险数据进行打标“可替换”
updateInsuranceReplaceTagByBatch(paramVoList, user.getNickname()); updateInsuranceReplaceTagByBatch(paramVoList, user.getNickname(),user.getId());
} }
return R.ok(); return R.ok();
} }
...@@ -1045,13 +1045,13 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe ...@@ -1045,13 +1045,13 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
* @param operator: 操作人员 * @param operator: 操作人员
* @return: void * @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<>(); List<BaseSearchVO> paramVoList = new ArrayList<>();
BaseSearchVO paramVo = new BaseSearchVO(); BaseSearchVO paramVo = new BaseSearchVO();
paramVo.setEmpIdCard(empIdcard); paramVo.setEmpIdCard(empIdcard);
paramVo.setDeptNo(deptNo); paramVo.setDeptNo(deptNo);
paramVoList.add(paramVo); paramVoList.add(paramVo);
updateInsuranceReplaceTagByBatch(paramVoList, operator); updateInsuranceReplaceTagByBatch(paramVoList, operator,operatorId);
} }
/** /**
...@@ -1062,7 +1062,7 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe ...@@ -1062,7 +1062,7 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
* @param operator: 操作人员 * @param operator: 操作人员
* @return: void * @return: void
**/ **/
private void updateInsuranceReplaceTagByBatch(List<BaseSearchVO> paramVoList, String operator) { private void updateInsuranceReplaceTagByBatch(List<BaseSearchVO> paramVoList, String operator,String operatorId) {
if (Common.isEmpty(paramVoList)) { if (Common.isEmpty(paramVoList)) {
log.warn("批量更新商险替换标签失败,参数列表为空"); log.warn("批量更新商险替换标签失败,参数列表为空");
return; return;
...@@ -1070,7 +1070,7 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe ...@@ -1070,7 +1070,7 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
try { try {
// 调用商险服务批量更新替换标签和说明 // 调用商险服务批量更新替换标签和说明
insuranceDaprUtil.batchUpdateInsuranceReplaceTagByParamList(paramVoList, operator, "离职确认操作"); insuranceDaprUtil.batchUpdateInsuranceReplaceTagByParamList(paramVoList, operator, operatorId, "离职确认操作");
} catch (Exception e) { } catch (Exception e) {
log.warn("批量更新商险替换标签异常,参数列表大小:{}", paramVoList.size(), e); log.warn("批量更新商险替换标签异常,参数列表大小:{}", paramVoList.size(), e);
} }
......
...@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.insurances.controller; ...@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.insurances.controller;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 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.CacheConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ResultConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ResultConstants;
...@@ -448,11 +449,18 @@ public class TInsuranceDetailController { ...@@ -448,11 +449,18 @@ public class TInsuranceDetailController {
@Inner @Inner
@PostMapping("/inner/batchUpdateInsuranceReplaceTagByParamList") @PostMapping("/inner/batchUpdateInsuranceReplaceTagByParamList")
public void batchUpdateInsuranceReplaceTagByParamList(@RequestBody Map<String, Object> paramMap){ public void batchUpdateInsuranceReplaceTagByParamList(@RequestBody Map<String, Object> paramMap){
// 将 LinkedHashMap 转换为 BaseSearchVO 列表
List<BaseSearchVO> paramVoList = (List<BaseSearchVO>) paramMap.get("paramVoList"); 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 operator = (String) paramMap.get("operator");
String operatorId = (String) paramMap.get("operatorId");
String operateType = (String) paramMap.get("operateType"); 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> { ...@@ -234,7 +234,7 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* @Date: 2026-03-19 * @Date: 2026-03-19
* @return: void * @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 ...@@ -5484,7 +5484,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return: void * @return: void
**/ **/
@Override @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)) { if (Common.isEmpty(paramVoList)) {
log.warn("批量更新商险替换标签失败,参数列表为空"); log.warn("批量更新商险替换标签失败,参数列表为空");
return; return;
...@@ -5524,7 +5524,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -5524,7 +5524,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
LambdaUpdateWrapper<TInsuranceDetail> updateWrapper = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<TInsuranceDetail> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.set(TInsuranceDetail::getReplaceTag, InsurancesConstants.INSURANCE_REPLACE_TAG_REPLACE) updateWrapper.set(TInsuranceDetail::getReplaceTag, InsurancesConstants.INSURANCE_REPLACE_TAG_REPLACE)
.set(TInsuranceDetail::getReplaceRemark, replaceRemark) .set(TInsuranceDetail::getReplaceRemark, replaceRemark)
.set(TInsuranceDetail::getUpdateBy, '1') .set(TInsuranceDetail::getUpdateBy, operatorId)
.set(TInsuranceDetail::getUpdateTime, updateTime) .set(TInsuranceDetail::getUpdateTime, updateTime)
.eq(TInsuranceDetail::getId, detail.getId()); .eq(TInsuranceDetail::getId, detail.getId());
update(updateWrapper); update(updateWrapper);
......
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