Commit 66a271f5 authored by huyuchen's avatar huyuchen

huych-档案更新优化

parent d94dbee8
...@@ -4,12 +4,11 @@ import io.swagger.v3.oas.annotations.media.Schema; ...@@ -4,12 +4,11 @@ import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDate;
/** /**
* @author licancan * @author huyc
* @description 商险办理批增入参 * @description 商险办理批增入参
* @date 2022-07-20 08:43:31 * @date 2025-04-3 08:43:31
*/ */
@Data @Data
@Schema(description = "商险办理单个/批量批增入参") @Schema(description = "商险办理单个/批量批增入参")
...@@ -146,4 +145,10 @@ public class InsuranceAutoParam implements Serializable { ...@@ -146,4 +145,10 @@ public class InsuranceAutoParam implements Serializable {
@Schema(description = "替换员工项目编码") @Schema(description = "替换员工项目编码")
private String replaceDeptNo; private String replaceDeptNo;
/**
* 商险待购买id
*/
@Schema(description = "商险待购买id")
private String insurancePreId;
} }
...@@ -282,28 +282,19 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur ...@@ -282,28 +282,19 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
.set(TEmployeeInsurancePre::getProcessStatus, CommonConstants.THREE_STRING); .set(TEmployeeInsurancePre::getProcessStatus, CommonConstants.THREE_STRING);
this.update(updateWrapper); this.update(updateWrapper);
} else { } else {
// 将 autoAddParamList 中的身份证和项目等信息提取出来,放入一个 Set 中 // 将 autoAddParamList 中的id等信息提取出来,放入一个 Set 中
Set<String> autoAddParamSet = autoAddParamList.stream() Set<String> autoAddParamSet = autoAddParamList.stream()
.map(param -> param.getEmpIdcardNo() + "-" + param.getDeptNo() .map(InsuranceAutoParam::getInsurancePreId)
+ "-" + param.getBuyStandard()+ "-" + param.getInsuranceTypeName()
+ "-" + param.getInsuranceCompanyName() + "-" + param.getPolicyStart()
+ "-" + param.getPolicyEnd())
.collect(Collectors.toSet()); .collect(Collectors.toSet());
// 找出 insurancePreList 中在 autoAddParamList 中存在的数据 // 找出 insurancePreList 中在 autoAddParamList 中存在的数据
List<TEmployeeInsurancePre> existingList = insurancePreList.stream() List<TEmployeeInsurancePre> existingList = insurancePreList.stream()
.filter(pre -> autoAddParamSet.contains(pre.getEmpIdcard() + "-" + pre.getDeptNo() .filter(pre -> autoAddParamSet.contains(pre.getId()))
+ "-" + pre.getBuyStandard()+ "-" + pre.getInsuranceTypeName()
+ "-" + pre.getInsuranceCompanyName() + "-" + DateUtil.dateToString(pre.getPolicyStart(),DateUtil.ISO_EXPANDED_DATE_FORMAT)
+ "-" + DateUtil.dateToString(pre.getPolicyEnd(),DateUtil.ISO_EXPANDED_DATE_FORMAT)))
.collect(Collectors.toList()); .collect(Collectors.toList());
// 找出 insurancePreList 中在 autoAddParamList 中不存在的数据 // 找出 insurancePreList 中在 autoAddParamList 中不存在的数据
List<TEmployeeInsurancePre> nonExistingList = insurancePreList.stream() List<TEmployeeInsurancePre> nonExistingList = insurancePreList.stream()
.filter(pre -> !autoAddParamSet.contains(pre.getEmpIdcard() + "-" + pre.getDeptNo() .filter(pre -> !autoAddParamSet.contains(pre.getId()))
+ "-" + pre.getBuyStandard()+ "-" + pre.getInsuranceTypeName()
+ "-" + pre.getInsuranceCompanyName() + "-" + DateUtil.dateToString(pre.getPolicyStart(),DateUtil.ISO_EXPANDED_DATE_FORMAT)
+ "-" + DateUtil.dateToString(pre.getPolicyEnd(),DateUtil.ISO_EXPANDED_DATE_FORMAT)))
.collect(Collectors.toList()); .collect(Collectors.toList());
//派单成功的更新状态为代投保,派单失败更新成派单失败 //派单成功的更新状态为代投保,派单失败更新成派单失败
if (!existingList.isEmpty()){ if (!existingList.isEmpty()){
...@@ -496,6 +487,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur ...@@ -496,6 +487,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
autoParam.setPost(addParam.getPost()); autoParam.setPost(addParam.getPost());
autoParam.setRemark(addParam.getRemark()); autoParam.setRemark(addParam.getRemark());
autoParam.setErrorMessage(addParam.getErrorMessage()); autoParam.setErrorMessage(addParam.getErrorMessage());
autoParam.setInsurancePreId(addParam.getInsurancePreId());
return autoParam; return autoParam;
} }
...@@ -515,6 +507,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur ...@@ -515,6 +507,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
autoParam.setPost(batchParam.getPost()); autoParam.setPost(batchParam.getPost());
autoParam.setRemark(batchParam.getRemark()); autoParam.setRemark(batchParam.getRemark());
autoParam.setErrorMessage(batchParam.getErrorMessage()); autoParam.setErrorMessage(batchParam.getErrorMessage());
autoParam.setInsurancePreId(batchParam.getInsurancePreId());
return autoParam; return autoParam;
} }
...@@ -534,6 +527,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur ...@@ -534,6 +527,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
autoParam.setReplaceDeptNo(replaceParam.getReplaceDeptNo()); autoParam.setReplaceDeptNo(replaceParam.getReplaceDeptNo());
autoParam.setReplaceEmpIdcardNo(replaceParam.getReplaceEmpIdcardNo()); autoParam.setReplaceEmpIdcardNo(replaceParam.getReplaceEmpIdcardNo());
autoParam.setErrorMessage(replaceParam.getErrorMessage()); autoParam.setErrorMessage(replaceParam.getErrorMessage());
autoParam.setInsurancePreId(replaceParam.getInsurancePreId());
return autoParam; return autoParam;
} }
......
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