Commit 55c3ac8f authored by 李灿灿's avatar 李灿灿

【商险-投保-替换】替换进去的员工商险数据部分字段未更新 修复

parent a3517c99
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
......@@ -86,4 +87,11 @@ public class InsuranceReplaceParam implements Serializable {
@Schema(description = "错误信息")
private String errorMessage;
/***********************************以下字段由系统算出,前端不用传,是为了方便入库***********************************/
/**
* 结算类型 (1、单独结算 2、合并结算-和工资一起结算)
*/
@JsonIgnore
private Integer settleType;
}
......@@ -312,14 +312,20 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
newDetail.setEmpName(success.getReplaceEmpName());
newDetail.setEmpIdcardNo(success.getReplaceEmpIdcardNo());
newDetail.setDeptNo(success.getReplaceDeptNo());
//替换项目的结算方式
newDetail.setSettleType(success.getSettleType());
newDetail.setPost(success.getPost());
//其他状态置为空
newDetail.setIsOverdue(null);
newDetail.setIsUse(null);
newDetail.setIsEffect(null);
newDetail.setReduceHandleStatus(null);
//创建时间是新数据插入时间
newDetail.setCreateTime(LocalDateTime.now());
//替换不参与结算
newDetail.setDefaultSettleId(null);
newDetail.setActualPremium(null);
newDetail.setEstimatePremium(null);
Boolean insert = this.save(newDetail);
//替换记录
if (insert){
......@@ -1813,6 +1819,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
param.setErrorMessage(InsurancesConstants.DEPT_NO_IS_NOT_EXIST);
listResult.add(param);
continue;
}else {
//结算类型,根据项目编码获取,并冗余到明细记录中
String settleType = projectSetInfoVo.getInsuranceSettleType();
if (StringUtils.isEmpty(settleType)){
param.setErrorMessage(InsurancesConstants.PROJECT_NOT_FIND_SETTLE_TYPE);
listResult.add(param);
continue;
}else {
param.setSettleType(Integer.parseInt(settleType));
}
}
}
}
......
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