Commit 84b851f6 authored by 李灿灿's avatar 李灿灿

20221108 投保办理--导出办理 支持投保中、投保成功单纯导出

parent 47b7aa4b
......@@ -17,6 +17,12 @@ import java.util.List;
public class InsuranceExportListParam extends BaseEntity implements Serializable {
private static final long serialVersionUID = 3623027153213352936L;
/**
* 投保状态 1待投保 2投保中 3已投保 (4投保退回 5 已减员)不在此列表展示4,5
*/
@Schema(description = "投保状态 1待投保 2投保中 3已投保")
private Integer buyHandleStatus;
/**
* 员工姓名
*/
......
......@@ -115,6 +115,13 @@ public class InsuranceExportListVO implements Serializable {
@Schema(description = "保单结束时间")
private LocalDate policyEnd;
/**
* 保单生效时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@JsonIgnore
private LocalDate policyEffect;
/**
* 保险公司名称(冗余字段)
*/
......
......@@ -921,6 +921,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
record.setBuyMonth(LocalDateUtil.betweenMonth(record.getPolicyStart().toString(),record.getPolicyEnd().toString()));
//购买天数
record.setBuyDay(LocalDateUtil.betweenDay(record.getPolicyStart().toString(),record.getPolicyEnd().toString()));
//如果是批增需要重新处理购买周期,按生效日期和保单结束时间计算
if (CommonConstants.THREE_INT == record.getBuyType()){
if (Objects.isNull(record.getPolicyEffect())){
record.setBuyMonth(null);
record.setBuyDay(null);
}else {
record.setBuyMonth(LocalDateUtil.betweenMonth(record.getPolicyEffect().toString(),record.getPolicyEnd().toString()));
record.setBuyDay(LocalDateUtil.betweenDay(record.getPolicyEffect().toString(),record.getPolicyEnd().toString()));
}
}
//如果是待投保,需要处理相关逻辑,投保中、投保成功只是单纯的导出
if(param.getBuyHandleStatus() == CommonConstants.ONE_INT){
TInsuranceDetail detail = new TInsuranceDetail();
detail.setId(record.getId());
//update状态由「待投保」置为「投保中」
......@@ -943,6 +955,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detailList.add(detail);
}
}
}
//批量更新
if (CollectionUtils.isNotEmpty(detailList)){
this.saveOrUpdateBatch(detailList);
......@@ -971,6 +984,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
vo.setBuyMonth(LocalDateUtil.betweenMonth(vo.getPolicyStart().toString(),vo.getPolicyEnd().toString()));
//购买天数
vo.setBuyDay(LocalDateUtil.betweenDay(vo.getPolicyStart().toString(),vo.getPolicyEnd().toString()));
//如果是批增需要重新处理购买周期,按生效日期和保单结束时间计算
if (CommonConstants.THREE_INT == vo.getBuyType()){
if (Objects.isNull(vo.getPolicyEffect())){
vo.setBuyMonth(null);
vo.setBuyDay(null);
}else {
vo.setBuyMonth(LocalDateUtil.betweenMonth(vo.getPolicyEffect().toString(),vo.getPolicyEnd().toString()));
vo.setBuyDay(LocalDateUtil.betweenDay(vo.getPolicyEffect().toString(),vo.getPolicyEnd().toString()));
}
}
vo.setRemark(InsurancesConstants.QUIT);
vo.setBuyType(CommonConstants.FOUR_INT);
vo.setProjectName(byId.getDeptName());
......
......@@ -339,6 +339,7 @@
a.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
a.POLICY_START as policyStart,
a.POLICY_END as policyEnd,
a.POLICY_EFFECT as policyEffect,
a.INSURANCE_COMPANY_NAME as insuranceCompanyName,
a.INSURANCE_TYPE_NAME as insuranceTypeName,
a.BUY_STANDARD as buyStandard,
......@@ -371,6 +372,7 @@
a.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
a.POLICY_START as policyStart,
a.POLICY_END as policyEnd,
a.POLICY_EFFECT as policyEffect,
a.INSURANCE_COMPANY_NAME as insuranceCompanyName,
a.INSURANCE_TYPE_NAME as insuranceTypeName,
a.BUY_STANDARD as buyStandard,
......@@ -382,7 +384,7 @@
a.POLICY_NO as policyNo,
a.REMARK as remark
from t_insurance_detail a
where a.DELETE_FLAG = 0 and a.BUY_HANDLE_STATUS = 1
where a.DELETE_FLAG = 0 and a.BUY_HANDLE_STATUS = #{param.buyHandleStatus}
<if test="param.empName != null and param.empName.trim() != ''">
and a.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if>
......
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