Commit fc7c1e84 authored by 李灿灿's avatar 李灿灿

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

parent 3aeb588e
...@@ -3,7 +3,9 @@ package com.yifu.cloud.plus.v1.yifu.insurances.vo; ...@@ -3,7 +3,9 @@ package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity; import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import org.checkerframework.common.value.qual.IntVal;
import javax.validation.constraints.NotNull;
import java.io.Serializable; import java.io.Serializable;
import java.util.List; import java.util.List;
...@@ -21,6 +23,8 @@ public class InsuranceExportListParam extends BaseEntity implements Serializable ...@@ -21,6 +23,8 @@ public class InsuranceExportListParam extends BaseEntity implements Serializable
* 投保状态 1待投保 2投保中 3已投保 (4投保退回 5 已减员)不在此列表展示4,5 * 投保状态 1待投保 2投保中 3已投保 (4投保退回 5 已减员)不在此列表展示4,5
*/ */
@Schema(description = "投保状态 1待投保 2投保中 3已投保") @Schema(description = "投保状态 1待投保 2投保中 3已投保")
@NotNull(message = "投保状态不能为空")
@IntVal({1,2,3})
private Integer buyHandleStatus; private Integer buyHandleStatus;
/** /**
......
...@@ -3,7 +3,10 @@ package com.yifu.cloud.plus.v1.yifu.insurances.vo; ...@@ -3,7 +3,10 @@ package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity; import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import org.checkerframework.common.value.qual.IntVal;
import org.checkerframework.common.value.qual.StringVal;
import javax.validation.constraints.NotNull;
import java.io.Serializable; import java.io.Serializable;
import java.util.List; import java.util.List;
...@@ -17,6 +20,14 @@ import java.util.List; ...@@ -17,6 +20,14 @@ import java.util.List;
public class RefundExportListParam extends BaseEntity implements Serializable { public class RefundExportListParam extends BaseEntity implements Serializable {
private static final long serialVersionUID = 3623027153213352936L; private static final long serialVersionUID = 3623027153213352936L;
/**
* 减员状态 1待减员 2减员中 3减员退回 4减员成功
*/
@Schema(description = "减员状态 1待减员 2减员中 4减员成功")
@NotNull(message = "减员状态不能为空")
@IntVal({1,2,4})
private Integer reduceHandleStatus;
/** /**
* 员工姓名 * 员工姓名
*/ */
......
package com.yifu.cloud.plus.v1.yifu.insurances.vo; package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data; import lombok.Data;
...@@ -130,6 +131,13 @@ public class RefundExportListVo implements Serializable { ...@@ -130,6 +131,13 @@ public class RefundExportListVo implements Serializable {
@Schema(description = "保单结束时间") @Schema(description = "保单结束时间")
private LocalDate policyEnd; private LocalDate policyEnd;
/**
* 保单生效时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@JsonIgnore
private LocalDate policyEffect;
/** /**
* 保险公司名称(冗余字段) * 保险公司名称(冗余字段)
*/ */
...@@ -194,7 +202,7 @@ public class RefundExportListVo implements Serializable { ...@@ -194,7 +202,7 @@ public class RefundExportListVo implements Serializable {
* 购买天数 * 购买天数
*/ */
@Schema(description = "购买天数") @Schema(description = "购买天数")
private long buyDay; private Long buyDay;
/** /**
* 封面抬头 * 封面抬头
......
...@@ -3503,12 +3503,24 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3503,12 +3503,24 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
record.setBuyMonth(LocalDateUtil.betweenMonth(record.getPolicyStart().toString(),record.getPolicyEnd().toString())); record.setBuyMonth(LocalDateUtil.betweenMonth(record.getPolicyStart().toString(),record.getPolicyEnd().toString()));
//购买天数 //购买天数
record.setBuyDay(LocalDateUtil.betweenDay(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 (data != null) { if (data != null) {
ProjectSetInfoVo jsonObject = data.get(record.getDeptNo()); ProjectSetInfoVo jsonObject = data.get(record.getDeptNo());
if (null != jsonObject) { if (null != jsonObject) {
record.setInvoiceTitle(Optional.ofNullable(jsonObject.getInvoiceTitleInsurance()).orElse("")); record.setInvoiceTitle(Optional.ofNullable(jsonObject.getInvoiceTitleInsurance()).orElse(""));
} }
} }
//如果是待减员,需要处理相关逻辑,减员中、减员成功只是单纯的导出
if(param.getReduceHandleStatus() == CommonConstants.ONE_INT){
TInsuranceDetail detail = getById(record.getId()); TInsuranceDetail detail = getById(record.getId());
TInsuranceRefund refund = new TInsuranceRefund(); TInsuranceRefund refund = new TInsuranceRefund();
detail.setId(record.getId()); detail.setId(record.getId());
...@@ -3525,6 +3537,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3525,6 +3537,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
refundList.add(refund); refundList.add(refund);
} }
} }
}
//批量更新 //批量更新
if (CollectionUtils.isNotEmpty(detailList)){ if (CollectionUtils.isNotEmpty(detailList)){
for (TInsuranceDetail s : detailList) { for (TInsuranceDetail s : detailList) {
......
...@@ -925,7 +925,7 @@ ...@@ -925,7 +925,7 @@
t_insurance_refund refund t_insurance_refund refund
where where
a.REFUND_ID = refund.ID and a.REFUND_ID = refund.ID and
a.DELETE_FLAG = 0 and a.REDUCE_HANDLE_STATUS = 1 a.DELETE_FLAG = 0 and a.REDUCE_HANDLE_STATUS = #{param.reduceHandleStatus}
<if test="param.empName != null and param.empName.trim() != ''"> <if test="param.empName != null and param.empName.trim() != ''">
and a.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%') and a.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if> </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