Commit ec08c706 authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/develop' into develop

# Conflicts:
#	yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/UpmsDaprUtils.java
parents eb0c5001 0170e2ac
...@@ -346,4 +346,20 @@ public class TEmployeeProject extends BaseEntity { ...@@ -346,4 +346,20 @@ public class TEmployeeProject extends BaseEntity {
@ExcelAttribute(name = "合同状态", isDataId = true,dataType = ExcelAttributeConstants.PERSONNEL_STATE) @ExcelAttribute(name = "合同状态", isDataId = true,dataType = ExcelAttributeConstants.PERSONNEL_STATE)
private Integer contractStatus; private Integer contractStatus;
@Schema(description = "社保状态多个")
@TableField(exist = false)
private String[] socialStatusArray;
@Schema(description = "公积金状态多个")
@TableField(exist = false)
private String[] fundStatusArray;
@Schema(description = "商险状态多个")
@TableField(exist = false)
private String[] insuranceStatusArray;
@Schema(description = "合同状态多个")
@TableField(exist = false)
private String[] contractStatusArray;
@Schema(description = "员工类型多个")
@TableField(exist = false)
private String[] empNatureArray;
} }
...@@ -383,6 +383,41 @@ ...@@ -383,6 +383,41 @@
<if test="tEmployeeProject.fileTown != null"> <if test="tEmployeeProject.fileTown != null">
AND a.SOCIAL_TOWN = #{tEmployeeProject.socialTown} AND a.SOCIAL_TOWN = #{tEmployeeProject.socialTown}
</if> </if>
<if test="tEmployeeProject.empNatureArray != null">
AND a.EMP_NATRUE in
<foreach item="idStr" index="index" collection="tEmployeeProject.empNatureArray" open="(" separator=","
close=")">
#{idStr}
</foreach>
</if>
<if test="tEmployeeProject.contractStatusArray != null">
AND a.CONTRACT_STATUS in
<foreach item="idStr" index="index" collection="tEmployeeProject.contractStatusArray" open="("
separator="," close=")">
#{idStr}
</foreach>
</if>
<if test="tEmployeeProject.insuranceStatusArray != null">
AND a.INSURANCE_STATUS in
<foreach item="idStr" index="index" collection="tEmployeeProject.insuranceStatusArray" open="("
separator="," close=")">
#{idStr}
</foreach>
</if>
<if test="tEmployeeProject.socialStatusArray != null">
AND a.SOCIAL_STATUS in
<foreach item="idStr" index="index" collection="tEmployeeProject.socialStatusArray" open="("
separator="," close=")">
#{idStr}
</foreach>
</if>
<if test="tEmployeeProject.fundStatusArray != null">
AND a.FUND_STATUS in
<foreach item="idStr" index="index" collection="tEmployeeProject.fundStatusArray" open="("
separator="," close=")">
#{idStr}
</foreach>
</if>
</if> </if>
</sql> </sql>
...@@ -505,6 +540,41 @@ ...@@ -505,6 +540,41 @@
#{idStr} #{idStr}
</foreach> </foreach>
</if> </if>
<if test="tEmployeeProject.empNatureArray != null">
AND a.EMP_NATRUE in
<foreach item="idStr" index="index" collection="tEmployeeProject.empNatureArray" open="(" separator=","
close=")">
#{idStr}
</foreach>
</if>
<if test="tEmployeeProject.contractStatusArray != null">
AND a.CONTRACT_STATUS in
<foreach item="idStr" index="index" collection="tEmployeeProject.contractStatusArray" open="("
separator="," close=")">
#{idStr}
</foreach>
</if>
<if test="tEmployeeProject.insuranceStatusArray != null">
AND a.INSURANCE_STATUS in
<foreach item="idStr" index="index" collection="tEmployeeProject.insuranceStatusArray" open="("
separator="," close=")">
#{idStr}
</foreach>
</if>
<if test="tEmployeeProject.socialStatusArray != null">
AND a.SOCIAL_STATUS in
<foreach item="idStr" index="index" collection="tEmployeeProject.socialStatusArray" open="("
separator="," close=")">
#{idStr}
</foreach>
</if>
<if test="tEmployeeProject.fundStatusArray != null">
AND a.FUND_STATUS in
<foreach item="idStr" index="index" collection="tEmployeeProject.fundStatusArray" open="("
separator="," close=")">
#{idStr}
</foreach>
</if>
</if> </if>
</sql> </sql>
......
...@@ -23,7 +23,7 @@ import java.util.List; ...@@ -23,7 +23,7 @@ import java.util.List;
public class UpmsDaprUtils { public class UpmsDaprUtils {
@Autowired @Autowired
private static DaprUpmsProperties daprUpmsProperties; private DaprUpmsProperties daprUpmsProperties;
/** /**
* 获取所有区域数据 * 获取所有区域数据
...@@ -31,8 +31,8 @@ public class UpmsDaprUtils { ...@@ -31,8 +31,8 @@ public class UpmsDaprUtils {
* @Date 2022-07-18 * @Date 2022-07-18
* @return * @return
**/ **/
public static R<List<SysArea>> getAreaListR() { public R<AreaVo> getAreaListR() {
R<List<SysArea>> areaListR = HttpDaprUtil.invokeMethodPost(daprUpmsProperties.getAppUrl(),daprUpmsProperties.getAppId(),"/area/inner/getSysAreaList","", List.class, SecurityConstants.FROM_IN); R<AreaVo> areaListR = HttpDaprUtil.invokeMethodPost(daprUpmsProperties.getAppUrl(),daprUpmsProperties.getAppId(),"/area/inner/getAreaVo","", AreaVo.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(areaListR)){ if (Common.isEmpty(areaListR)){
return R.failed("获取所有区域数据失败!"); return R.failed("获取所有区域数据失败!");
} }
......
...@@ -27,6 +27,7 @@ public class InsurancesConstants { ...@@ -27,6 +27,7 @@ public class InsurancesConstants {
* 非投保退回状态,无法删除 * 非投保退回状态,无法删除
*/ */
public static final String DELETE_ERROR = "非投保退回状态,无法删除"; public static final String DELETE_ERROR = "非投保退回状态,无法删除";
/** /**
* 不允许编辑 * 不允许编辑
*/ */
...@@ -184,4 +185,51 @@ public class InsurancesConstants { ...@@ -184,4 +185,51 @@ public class InsurancesConstants {
*/ */
public static final String POLICY_NO_EXIST= "保单号不存在"; public static final String POLICY_NO_EXIST= "保单号不存在";
/***********************减员办理错误码********************************/
/**
* 已被替换,不允许减员
*/
public static final String IS_EFFECT_ERROR = "已被替换,不允许减员";
/**
* 已超出保单截止日期,不允许减员
*/
public static final String IS_OVERDUE_ERROR = "已超出保单截止日期,不允许减员";
/**
* 已出险的,不允许减员
*/
public static final String IS_USE_ERROR = "已出险的,不允许减员";
/**
* 非已投保状态,无法减员
*/
public static final String REFUND_ERROR = "非已投保状态,无法减员";
/**
* 替换结算月份和原有结算月份相同
*/
public static final String SETTLE_MONTH_IDENTICAL = "替换结算月份和原有结算月份相同";
/**
* 当前保单已处于减员流程,无法变更结算月
*/
public static final String SETTLE_MONTH_CHANGE_REDUCE_HANDLE_STATUS_ERROR = "当前保单已处于减员流程,无法变更结算月";
/**
* 当前保单已结算,无法变更结算月
*/
public static final String SETTLE_MONTH_CHANGE_SETTLE_HANDLE_STATUS_ERROR = "前保单已结算,无法变更结算月";
/**
* 替换项目ID和原有项目ID相同
*/
public static final String DEPT_NO_IDENTICAL = "替换项目ID和原有项目ID相同";
/**
* 重复数据
*/
public static final String DUPLICATE_DATA_ERROR = "重复数据";
} }
...@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.insurances.entity; ...@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.insurances.entity;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
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;
...@@ -257,6 +258,13 @@ public class TInsuranceDetail extends BaseEntity { ...@@ -257,6 +258,13 @@ public class TInsuranceDetail extends BaseEntity {
@Schema(description = "备注") @Schema(description = "备注")
private String remark; private String remark;
/**
* 减员派单日期
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@Schema(description = "减员派单日期")
private LocalDate refundCreateTime;
/** /**
* 是否删除 0未删除/1删除 * 是否删除 0未删除/1删除
*/ */
......
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import java.io.Serializable;
/**
* @author zhaji
* @description 变更所属项目
* @date 2022-07-21 15:35:49
*/
@Data
@Tag(name = "变更所属项目")
public class DeptChangeCheckParam implements Serializable {
private static final long serialVersionUID = -2689686777914935788L;
//姓名+身份证号+原项目编码+保险公司+险种+保单开始时间+保单结束时间+保单结束时间+标准+有效+未减员 是否存在校验
/**
* 员工姓名
*/
@Schema(description = "员工姓名")
private String empName;
/**
* 员工身份证号码
*/
@Schema(description = "员工身份证号码")
private String empIdCardNo;
/**
* 原项目编码
*/
@Schema(description = "原项目编码")
private String oldDeptNo;
/**
* 新项目编码
*/
@Schema(description = "新项目编码")
private String newDeptNo;
/**
* 保险公司名称
*/
@Schema(description = "保险公司名称")
private String insuranceCompanyName;
/**
* 险种名称
*/
@Schema(description = "险种名称")
private String insuranceTypeName;
/**
* 保单开始日期
*/
@Schema(description = "保单开始日期")
private String policyStart;
/**
* 保单结束日期
*/
@Schema(description = "保单结束日期")
private String policyEnd;
/**
* 购买标准
*/
@Schema(description = "购买标准")
private String buyStandard;
/**
* 错误信息
*/
@Schema(description = "错误信息")
private String errorMessage;
/**
* 结算方式
*/
@Schema(description = "结算方式")
private Integer settleType;
}
...@@ -156,4 +156,5 @@ public class InsuranceExportListVO implements Serializable { ...@@ -156,4 +156,5 @@ public class InsuranceExportListVO implements Serializable {
@Schema(description = "备注") @Schema(description = "备注")
private String remark; private String remark;
} }
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 io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDate;
/** /**
* @author zhaji * @author zhaji
* @description 减员办理返回类 * @description 减员办理返回类
* @date 2022-07-21 11:47:16 * @date 2022-07-21 11:47:16
*/ */
@Data
@Tag(name ="减员办理返回类")
public class InsuranceRefundHandlingListVo implements Serializable { public class InsuranceRefundHandlingListVo implements Serializable {
private static final long serialVersionUID = -2689686777914935788L; private static final long serialVersionUID = -2689686777914935788L;
/**
* 主键
*/
private String id;
/**
* 订单编号
*/
@Schema(description = "订单编号")
private String orderNo;
/**
* 项目名称
*/
@Schema(description = "项目名称")
private String projectName;
/**
* 项目编码
*/
@Schema(description = "项目编码")
private String deptNo;
/**
* 员工姓名
*/
@Schema(description = "员工姓名")
private String empName;
/**
* 员工身份证号
*/
@Schema(description = "员工身份证号")
private String empIdcardNo;
/**
* 投保类型, 1新增、3批增、4替换
*/
@Schema(description = " 投保类型, 1新增、3批增、4替换")
private Integer buyType;
/**
* 投保岗位
*/
@Schema(description = "投保岗位")
private String post;
/**
* 商险购买地省code
*/
@Schema(description = "商险购买地省code")
private Integer insuranceProvince;
/**
* 商险购买地省
*/
@Schema(description = "商险购买地省")
private String insuranceProvinceName;
/**
* 商险购买地市code
*/
@Schema(description = "商险购买地市code")
private Integer insuranceCity;
/**
* 商险购买地市
*/
@Schema(description = "商险购买地市")
private String insuranceCityName;
/**
* 商险办理省code
*/
@Schema(description = "商险办理省code")
private Integer insuranceHandleProvince;
/**
* 商险办理省
*/
@Schema(description = "商险办理省")
private String insuranceHandleProvinceName;
/**
* 商险办理城市code
*/
@Schema(description = "商险办理城市code")
private Integer insuranceHandleCity;
/**
* 商险办理城市
*/
@Schema(description = "商险办理城市")
private String insuranceHandleCityName;
/**
* 保单开始时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@Schema(description = "保单开始时间")
private LocalDate policyStart;
/**
* 保单结束时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@Schema(description = "保单结束时间")
private LocalDate policyEnd;
/**
* 保险公司名称(冗余字段)
*/
@Schema(description = "保险公司名称")
private String insuranceCompanyName;
/**
* 险种名称
*/
@Schema(description = "险种名称")
private String insuranceTypeName;
/**
* 购买标准
*/
@Schema(description = "购买标准")
private String buyStandard;
/**
* 医疗额度
*/
@Schema(description = "医疗额度")
private String medicalQuota;
/**
* 身故或残疾额度
*/
@Schema(description = "身故或残疾额度")
private String dieDisableQuota;
/**
* 结算月
*/
@Schema(description = "结算月")
private String settleMonth;
/**
* 结算类型 (0、与薪资合并结算 1、单独结算)
*/
@Schema(description = "结算类型 (0、预估 1、实缴)")
private Integer settleType;
/**
* 创建人姓名
*/
@Schema(description = "创建人(派单人)")
private String createName;
/**
* 备注
*/
@Schema(description = "备注")
private String remark;
} }
...@@ -17,6 +17,18 @@ public class InsuranceRefundHandlingParam implements Serializable { ...@@ -17,6 +17,18 @@ public class InsuranceRefundHandlingParam implements Serializable {
private static final long serialVersionUID = -2689686777914935788L; private static final long serialVersionUID = -2689686777914935788L;
/**
* 项目编码
*/
@Schema(description = "项目编码")
private String deptNo;
/**
* 减员状态 1待减员 2减员中 3减员退回 4减员成功
*/
@Schema(description = "减员状态 1待减员 2减员中 3减员退回 4减员成功")
private Integer reduceHandleStatus;
/** /**
* 员工姓名 * 员工姓名
*/ */
...@@ -30,14 +42,40 @@ public class InsuranceRefundHandlingParam implements Serializable { ...@@ -30,14 +42,40 @@ public class InsuranceRefundHandlingParam implements Serializable {
private String empIdcardNo; private String empIdcardNo;
/** /**
* 项目编码 * 保险公司id
*/ */
@Schema(description = "项目编码") @Schema(description = "保险公司id")
private String deptNo; private String insuranceCompanyId;
/** /**
* 减员状态 1待减员 2减员中3减员退回 * 保险公司名称
*/ */
@Schema(description = "减员状态 1待减员 2减员中3减员退回") @Schema(description = "保险公司名称")
private Integer reduceHandleStatus; private String insuranceCompanyName;
/**
* 险种名称
*/
@Schema(description = "险种名称")
private String insuranceTypeName;
/**
* 是否出险 0未出险 1已出险
*/
@Schema(description = "是否出险 0未出险 1已出险")
private Integer isUse;
/**
* 是否有效 0有效 1无效
*/
@Schema(description = "是否有效 0有效 1无效")
private Integer isEffect;
/**
* 是否过期 0未过期 1已过期
*/
@Schema(description = "是否过期 0未过期 1已过期")
private Integer isOverdue;
} }
...@@ -7,6 +7,7 @@ import lombok.Data; ...@@ -7,6 +7,7 @@ import lombok.Data;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List; import java.util.List;
/** /**
...@@ -25,7 +26,16 @@ public class InsuranceRefundListParam implements Serializable { ...@@ -25,7 +26,16 @@ public class InsuranceRefundListParam implements Serializable {
@Schema(name = "办理列表") @Schema(name = "办理列表")
@NotBlank(message = "办理列表不能为空") @NotBlank(message = "办理列表不能为空")
private List<TInsuranceDetail> insuranceRefundList; private String [] idList;
@Schema(name = "办理人")
@NotBlank(message = "办理类型不能为空")
private String updateBy;
@Schema(name = "办理时间")
@NotBlank(message = "办理类型不能为空")
private LocalDateTime refundCreateTime;
} }
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 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;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDate;
/** /**
* @author zhaji * @author zhaji
...@@ -15,5 +18,152 @@ import java.io.Serializable; ...@@ -15,5 +18,152 @@ import java.io.Serializable;
public class InsuranceRefundListVo implements Serializable { public class InsuranceRefundListVo implements Serializable {
private static final long serialVersionUID = -2689686777914935788L; private static final long serialVersionUID = -2689686777914935788L;
/**
* 主键
*/
@Schema(description = "主键")
private String id;
/**
* 订单编号
*/
@Schema(description = "订单编号")
private String orderNo;
/**
* 项目名称
*/
@Schema(description = "项目名称")
private String projectName;
/**
* 项目编码
*/
@Schema(description = "项目编码")
private String deptNo;
/**
* 员工姓名
*/
@Schema(description = "员工姓名")
private String empName;
/**
* 员工身份证号
*/
@Schema(description = "员工身份证号")
private String empIdcardNo;
/**
* 投保类型, 1新增、3批增、4替换
*/
@Schema(description = " 投保类型, 1新增、3批增、4替换")
private Integer buyType;
/**
* 投保岗位
*/
@Schema(description = "投保岗位")
private String post;
/**
* 商险购买地省code
*/
@Schema(description = "商险购买地省code")
private Integer insuranceProvince;
/**
* 商险购买地省
*/
@Schema(description = "商险购买地省")
private String insuranceProvinceName;
/**
* 商险购买地市code
*/
@Schema(description = "商险购买地市code")
private Integer insuranceCity;
/**
* 商险购买地市
*/
@Schema(description = "商险购买地市")
private String insuranceCityName;
/**
* 商险办理省code
*/
@Schema(description = "商险办理省code")
private Integer insuranceHandleProvince;
/**
* 商险办理省
*/
@Schema(description = "商险办理省")
private String insuranceHandleProvinceName;
/**
* 商险办理城市code
*/
@Schema(description = "商险办理城市code")
private Integer insuranceHandleCity;
/**
* 商险办理城市
*/
@Schema(description = "商险办理城市")
private String insuranceHandleCityName;
/**
* 保单开始时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@Schema(description = "保单开始时间")
private LocalDate policyStart;
/**
* 保单结束时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@Schema(description = "保单结束时间")
private LocalDate policyEnd;
/**
* 保险公司名称
*/
@Schema(description = "保险公司名称")
private String insuranceCompanyName;
/**
* 险种名称
*/
@Schema(description = "险种名称")
private String insuranceTypeName;
/**
* 购买标准
*/
@Schema(description = "购买标准")
private String buyStandard;
/**
* 医疗额度
*/
@Schema(description = "医疗额度")
private String medicalQuota;
/**
* 身故或残疾额度
*/
@Schema(description = "身故或残疾额度")
private String dieDisableQuota;
/**
* 减员派单日期
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@Schema(description = "减员派单日期")
private LocalDate refundCreateTime;
} }
...@@ -34,17 +34,6 @@ public class InsuranceRefundParam implements Serializable { ...@@ -34,17 +34,6 @@ public class InsuranceRefundParam implements Serializable {
@Schema(description = "项目编码") @Schema(description = "项目编码")
private String deptNo; private String deptNo;
/**
* 保单号
*/
@Schema(description = "保单号")
private String policyNo;
/**
* 保险公司ID
*/
@Schema(description = "保险公司ID")
private String insuranceCompanyId;
/** /**
* 保险公司名称 * 保险公司名称
...@@ -52,6 +41,13 @@ public class InsuranceRefundParam implements Serializable { ...@@ -52,6 +41,13 @@ public class InsuranceRefundParam implements Serializable {
@Schema(description = "保险公司名称") @Schema(description = "保险公司名称")
private String insuranceCompanyName; private String insuranceCompanyName;
/**
* 保单号
*/
@Schema(description = "保单号")
private String policyNo;
/** /**
* 保单开始时间 * 保单开始时间
*/ */
......
package com.yifu.cloud.plus.v1.yifu.insurances.vo; package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
...@@ -7,7 +10,9 @@ import io.swagger.v3.oas.annotations.tags.Tag; ...@@ -7,7 +10,9 @@ import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.LocalDateTime;
/** /**
* @author zhaji * @author zhaji
...@@ -58,7 +63,7 @@ public class InsuredListVo implements Serializable { ...@@ -58,7 +63,7 @@ public class InsuredListVo implements Serializable {
/** /**
* 项目编码 * 项目编码
*/ */
@JsonIgnore @Schema(description = "项目编码")
private String deptNo; private String deptNo;
/** /**
...@@ -100,30 +105,126 @@ public class InsuredListVo implements Serializable { ...@@ -100,30 +105,126 @@ public class InsuredListVo implements Serializable {
private String buyStandard; private String buyStandard;
/** /**
* 创建人姓名 * 医疗额度
*/ */
@Schema(description = "创建人(派单人)") @Schema(description = "医疗额度")
private String createName; private String medicalQuota;
/**
* 身故或残疾额度
*/
@Schema(description = "身故或残疾额度")
private String dieDisableQuota;
/**
* 预估保费
*/
@Schema(description = "预估保费")
private BigDecimal estimatePremium;
/**
* 实际保费
*/
@Schema(description = "实际保费")
private BigDecimal actualPremium;
/**
* 保单号
*/
@Schema(description = "保单号")
private String policyNo;
/**
* 发票号
*/
@Schema(description = "发票号")
private String invoiceNo;
/**
* 保单生效日期
*/
@Schema(description = "保单生效日期")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
private LocalDate policyEffect;
/**
* 商险购买地省code
*/
@Schema(description = "商险购买地省code")
private Integer insuranceProvince;
/**
* 商险购买地省
*/
@Schema(description = "商险购买地省")
private String insuranceProvinceName;
/**
* 商险购买地市code
*/
@Schema(description = "商险购买地市code")
private Integer insuranceCity;
/**
* 商险购买地市
*/
@Schema(description = "商险购买地市")
private String insuranceCityName;
/**
* 商险办理省code
*/
@Schema(description = "商险办理省code")
private Integer insuranceHandleProvince;
/**
* 商险办理省
*/
@Schema(description = "商险办理省")
private String insuranceHandleProvinceName;
/** /**
* 投保状态 1待投保 2投保中 3已投保 4投保退回 5 已减员 * 商险办理城市code
*/ */
@Schema(description = "投保状态 1待投保 2投保中 3已投保 4投保退回 5 已减员") @Schema(description = "商险办理城市code")
private Integer buyHandleStatus; private Integer insuranceHandleCity;
/** /**
* 结算类型 (0、预估 1、实缴) * 商险办理城市
*/ */
@Schema(description = "结算类型 (0、预估 1、实缴)") @Schema(description = "商险办理城市")
private Integer settleType; private String insuranceHandleCityName;
/** /**
* 结算月 * 是否出险 0未出险 1已出险
*/ */
@Schema(description = "结算月") @Schema(description = "是否出险 0未出险 1已出险")
private String settleMonth; private Integer isUse;
/**
* 是否有效 0有效 1无效
*/
@Schema(description = "是否有效 0有效 1无效")
private Integer isEffect;
/**
* 是否过期 0未过期 1已过期
*/
@Schema(description = "是否过期 0未过期 1已过期")
private Integer isOverdue;
/**
* 派单日期
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@Schema(description = "派单日期")
private LocalDate createTime;
/**
* 派单人
*/
@Schema(description = "创建人(派单人)")
private String createName;
//订单编号、姓名、身份证号、投保类型、项目、岗位、保单开始日期、保单结束日期、保险公司、险种、购买标准、医保、身故或残疾、预估保费、实际保费、保单号、发票号、保单生效日期、商险购买地、商险办理地、是否出险、是否过期、是否失效、派单日期、派单人 //订单编号、姓名、身份证号、投保类型、项目、岗位、保单开始日期、保单结束日期、保险公司、险种、购买标准、医保、身故或残疾、预估保费、实际保费、保单号、发票号、保单生效日期、商险购买地、商险办理地、是否出险、是否过期、是否失效、派单日期、派单人
......
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import java.io.Serializable;
/**
* @author zhaji
* @description 结算月变更
* @date 2022-07-21 15:38:13
*/
@Data
@Tag(name = "结算月变更")
public class SettleMonthChangeCheckParam implements Serializable {
private static final long serialVersionUID = -2689686777914935788L;
//姓名+身份证号+原项目编码+保险公司+险种+保单开始时间+保单结束时间+保单结束时间+标准+有效+未减员 是否存在校验
/**
* 员工姓名
*/
@Schema(description = "员工姓名")
private String empName;
/**
* 员工身份证号码
*/
@Schema(description = "员工身份证号码")
private String empIdCardNo;
/**
* 项目编码
*/
@Schema(description = "项目编码")
private String deptNo;
/**
* 保险公司名称
*/
@Schema(description = "保险公司名称")
private String insuranceCompanyName;
/**
* 险种名称
*/
@Schema(description = "险种名称")
private String insuranceTypeName;
/**
* 保单开始日期
*/
@Schema(description = "保单开始日期")
private String policyStart;
/**
* 保单结束日期
*/
@Schema(description = "保单结束日期")
private String policyEnd;
/**
* 购买标准
*/
@Schema(description = "购买标准")
private String buyStandard;
/**
* 结算月
*/
@Schema(description = "结算月")
private String settleMonth;
/**
* 错误信息
*/
@Schema(description = "错误信息")
private String errorMessage;
}
...@@ -34,12 +34,12 @@ public class TInsuranceCompanyController { ...@@ -34,12 +34,12 @@ public class TInsuranceCompanyController {
private TInsuranceCompanyService insuranceCompanyService; private TInsuranceCompanyService insuranceCompanyService;
/** /**
* 分页查询 * 保险公司分页查询
* @param page 分页对象 * @param page 分页对象
* @param insuranceCompany 保险公司 * @param insuranceCompany 保险公司
* @return * @return
*/ */
//@Operation(summary = "分页查询", description = "分页查询") @Operation(summary = "保险公司分页查询", description = "保险公司分页查询")
@GetMapping("/page" ) @GetMapping("/page" )
public R<IPage<TInsuranceCompany>> getInsuranceCompanyPage(Page page, TInsuranceCompany insuranceCompany) { public R<IPage<TInsuranceCompany>> getInsuranceCompanyPage(Page page, TInsuranceCompany insuranceCompany) {
return R.ok(insuranceCompanyService.pageDiy(page, insuranceCompany)); return R.ok(insuranceCompanyService.pageDiy(page, insuranceCompany));
...@@ -51,6 +51,7 @@ public class TInsuranceCompanyController { ...@@ -51,6 +51,7 @@ public class TInsuranceCompanyController {
* @return R * @return R
*/ */
@GetMapping("/{id}" ) @GetMapping("/{id}" )
@Operation(summary = "通过id查询保险公司详情", description = "通过id查询保险公司详情")
public R<TInsuranceCompany> getById(@PathVariable("id" ) String id) { public R<TInsuranceCompany> getById(@PathVariable("id" ) String id) {
return R.ok(insuranceCompanyService.getById(id)); return R.ok(insuranceCompanyService.getById(id));
} }
...@@ -61,7 +62,7 @@ public class TInsuranceCompanyController { ...@@ -61,7 +62,7 @@ public class TInsuranceCompanyController {
* @param insuranceCompany 保险公司明细 * @param insuranceCompany 保险公司明细
* @return R * @return R
*/ */
//@Operation(summary = "新增保险公司", description = "新增保险公司:hasPermission('demo_insuranceCompany_add')") @Operation(summary = "新增保险公司", description = "新增保险公司:hasPermission('demo_insuranceCompany_add')")
@SysLog("新增保险公司" ) @SysLog("新增保险公司" )
@PostMapping("/save") @PostMapping("/save")
//@PreAuthorize("@pms.hasPermission('demo_insuranceCompany_add')" ) //@PreAuthorize("@pms.hasPermission('demo_insuranceCompany_add')" )
...@@ -74,7 +75,7 @@ public class TInsuranceCompanyController { ...@@ -74,7 +75,7 @@ public class TInsuranceCompanyController {
* @param insuranceCompany 修改实体类 * @param insuranceCompany 修改实体类
* @return R * @return R
*/ */
//@Operation(summary = "修改保险公司", description = "修改保险公司:hasPermission('demo_insuranceCompany_update')") @Operation(summary = "修改保险公司", description = "修改保险公司:hasPermission('demo_insuranceCompany_update')")
@SysLog("修改保险公司" ) @SysLog("修改保险公司" )
@PostMapping("/update") @PostMapping("/update")
//@PreAuthorize("@pms.hasPermission('demo_insuranceCompany_update')" ) //@PreAuthorize("@pms.hasPermission('demo_insuranceCompany_update')" )
...@@ -86,7 +87,7 @@ public class TInsuranceCompanyController { ...@@ -86,7 +87,7 @@ public class TInsuranceCompanyController {
* 查询保险公司列表(不分页) * 查询保险公司列表(不分页)
* @return * @return
*/ */
@Operation(summary = "分页查询", description = "分页查询") @Operation(summary = "查询保险公司列表(不分页)", description = "查询保险公司列表(不分页)")
@GetMapping("/list" ) @GetMapping("/list" )
public R<List<TInsuranceCompany>> getInsuranceCompanyList() { public R<List<TInsuranceCompany>> getInsuranceCompanyList() {
return R.ok(insuranceCompanyService.getInsuranceCompanyList()); return R.ok(insuranceCompanyService.getInsuranceCompanyList());
......
...@@ -200,12 +200,37 @@ public class TInsuranceDetailController { ...@@ -200,12 +200,37 @@ public class TInsuranceDetailController {
* @date 2022-07-19 * @date 2022-07-19
* @since v1.0 * @since v1.0
*/ */
@PostMapping("/checkPayRollList") @PostMapping("/checkInsuranceRefundList")
public R checkInsuranceRefundList(@RequestBody List<InsuranceRefundCheck> insuranceRefundCheckList){ public R checkInsuranceRefundList(@RequestBody List<InsuranceRefundCheck> insuranceRefundCheckList){
return tInsuranceDetailService.checkInsuranceRefundList(insuranceRefundCheckList); return tInsuranceDetailService.checkInsuranceRefundList(insuranceRefundCheckList);
} }
/**
* 变更结算月
* @param settleMonthCheckList 变更结算月
* @author zhaji
* @date 2022-07-21
* @since v1.0
*/
@PostMapping("/settleMonthChange")
@Operation(summary = "变更结算月", description = "变更结算月")
public R settleMonthChange(@RequestBody List<SettleMonthChangeCheckParam> settleMonthCheckList){
return tInsuranceDetailService.settleMonthChange(settleMonthCheckList);
}
/**
* 变更所属项目
* @param deptChangeCheckList 变更所属项目
* @author zhaji
* @date 2022-07-21
* @since v1.0
*/
@PostMapping("/deptChange")
@Operation(summary = "变更所属项目", description = "变更所属项目")
public R deptChange(@RequestBody List<DeptChangeCheckParam> deptChangeCheckList){
return tInsuranceDetailService.deptChange(deptChangeCheckList);
}
/** /**
* 已投保列表分页查询 * 已投保列表分页查询
* *
......
...@@ -84,4 +84,51 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> { ...@@ -84,4 +84,51 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
* @return {@link List<InsuredListVo>} * @return {@link List<InsuredListVo>}
*/ */
List<InsuredListVo> getInsuredList(@Param("param") InsuredParam param); List<InsuredListVo> getInsuredList(@Param("param") InsuredParam param);
/**
* 已减员列表分页查询
*
* @author zhaji
* @param page 分页参数
* @param param 查询参数
* @return {@link IPage< InsuranceRefundListVo>}
*/
IPage<InsuranceRefundListVo> getInsuranceRefundPageList(Page<InsuranceRefundParam> page, @Param("param")InsuranceRefundParam param);
/**
* 已减员列表不分页查询
*
* @author zhaji
* @param param 查询参数
* @return {@link List< InsuranceRefundListVo>}
*/
List<InsuranceRefundListVo> getInsuranceRefundList( @Param("param") InsuranceRefundParam param);
/**
* 减员列表分页查询
*
* @author zhaji
* @param page 分页参数
* @param param 查询参数
* @return {@link IPage< InsuranceRefundHandlingListVo>}
*/
IPage<InsuranceRefundHandlingListVo> getInsuranceRefundHandlingPageList(Page<InsuranceRefundHandlingParam> page, @Param("param") InsuranceRefundHandlingParam param);
/**
* 减员列表不分页查询
*
* @author zhaji
* @param param 查询参数
* @return {@link List< InsuranceRefundHandlingListVo>}
*/
List<InsuranceRefundHandlingListVo> getInsuranceRefundHandlingList(@Param("param")InsuranceRefundHandlingParam param);
/**
* 减员办理
*
* @author zhaji
* @param insuranceDetail
* @return {@link boolean}
*/
Integer updateInsuranceRefund(@Param("param") InsuranceRefundListParam insuranceDetail);
} }
...@@ -127,6 +127,7 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> { ...@@ -127,6 +127,7 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
R<List<InsuranceRegisterParam>> registeredPolicyPremium(List<InsuranceRegisterParam> paramList); R<List<InsuranceRegisterParam>> registeredPolicyPremium(List<InsuranceRegisterParam> paramList);
/***********************减员办理********************************/ /***********************减员办理********************************/
/** /**
* 减员导入校验 * 减员导入校验
* *
...@@ -201,4 +202,23 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> { ...@@ -201,4 +202,23 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* @return {@link R} * @return {@link R}
*/ */
R updateInsuranceRefund(InsuranceRefundListParam insuranceDetail); R updateInsuranceRefund(InsuranceRefundListParam insuranceDetail);
/**
* 变更结算月
*
* @author zhaji
* @param settleMonthCheckList 变更列表
* @return {@link R}
*/
R settleMonthChange(List<SettleMonthChangeCheckParam> settleMonthCheckList);
/**
* 变更所属项目
*
* @author zhaji
* @param deptChangeCheckList 变更列表
* @return {@link R}
*/
R deptChange(List<DeptChangeCheckParam> deptChangeCheckList);
} }
package com.yifu.cloud.plus.v1.yifu.insurances.service.impl; package com.yifu.cloud.plus.v1.yifu.insurances.service.impl;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...@@ -30,6 +32,7 @@ import org.springframework.stereotype.Service; ...@@ -30,6 +32,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.validation.constraints.NotBlank;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.*; import java.util.*;
...@@ -61,6 +64,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -61,6 +64,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Resource @Resource
private TInsuranceSettleService tInsuranceSettleService; private TInsuranceSettleService tInsuranceSettleService;
@Resource
private TInsuranceSettleService insuranceSettleService;
/***********************商险办理********************************/ /***********************商险办理********************************/
/** /**
* 投保办理分页查询 * 投保办理分页查询
...@@ -1243,41 +1250,141 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1243,41 +1250,141 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
/***********************减员办理********************************/ /***********************减员办理********************************/
/**
* 减员导入校验
*
* @author zhaji
* @param insuranceRefundCheckList 减员表
* @return {@link R}
*/
@Override @Override
public R checkInsuranceRefundList(List<InsuranceRefundCheck> insuranceRefundCheckList) { public R checkInsuranceRefundList(List<InsuranceRefundCheck> insuranceRefundCheckList) {
YifuUser user = SecurityUtils.getUser();
if(!Common.isNotEmpty(insuranceRefundCheckList)){ if(!Common.isNotEmpty(insuranceRefundCheckList)){
return R.failed("当前导入的减员信息为空"); return R.failed("当前导入的减员信息为空");
} }
List<InsuranceRefundCheck> refundErrorList = new ArrayList(128); List<InsuranceRefundCheck> errorList = new ArrayList(128);
for (InsuranceRefundCheck insuranceRefund : insuranceRefundCheckList) { List<TInsuranceDetail> successList = new ArrayList<>();
for (InsuranceRefundCheck param : insuranceRefundCheckList) {
boolean b = true; //员工姓名
String empName = param.getEmpName();
if(StringUtils.isBlank(empName)){
param.setErrorMessage(InsurancesConstants.EMP_NAME_NOT_EMPTY);
errorList.add(param);
continue;
}
String empName = insuranceRefund.getEmpName(); //员工身份证
String empIdCardNo = param.getEmpIdCardNo();
if(StringUtils.isBlank(empIdCardNo)){
param.setErrorMessage(InsurancesConstants.EMP_IDCARD_NO_NOT_EMPTY);
errorList.add(param);
continue;
}
String empIdCardNo = insuranceRefund.getEmpIdCardNo();
//保险公司名称 //保险公司名称
String insuranceCompanyName = insuranceRefund.getInsuranceCompanyName(); String insuranceCompanyName = param.getInsuranceCompanyName();
//险种名称 if(StringUtils.isBlank(insuranceCompanyName)){
String insuranceTypeName = insuranceRefund.getInsuranceTypeName(); param.setErrorMessage(InsurancesConstants.INSURANCE_COMPANY_NAME_NOT_EMPTY);
errorList.add(param);
String refundMoney = insuranceRefund.getRefundMoney(); continue;
}
String policyStart = insuranceRefund.getPolicyStart(); //险种名称
String insuranceTypeName = param.getInsuranceTypeName();
if(StringUtils.isBlank(insuranceTypeName)){
param.setErrorMessage(InsurancesConstants.INSURANCE_TYPE_NAME_NOT_EMPTY);
errorList.add(param);
continue;
}
String policyEnd = insuranceRefund.getPolicyEnd(); //保单开始日期
String policyStart = param.getPolicyStart();
if(StringUtils.isBlank(policyStart)){
param.setErrorMessage(InsurancesConstants.POLICY_START_NOT_EMPTY);
errorList.add(param);
continue;
}
String remark = insuranceRefund.getRemark(); //保单结束日期
String policyEnd = param.getPolicyEnd();
if(StringUtils.isBlank(policyEnd)){
param.setErrorMessage(InsurancesConstants.POLICY_END_NOT_EMPTY);
errorList.add(param);
continue;
}
if (!b){ // 身份证号位数校验(18 位合法)
refundErrorList.add(insuranceRefund); if (ValidityUtil.validateIDCard(param.getEmpIdCardNo())){
param.setErrorMessage(InsurancesConstants.EMP_IDCARD_NO_NOT_LEGITIMATE);
errorList.add(param);
continue;
} }
// 保单开始日期格式校验
if(!LocalDateUtil.isDate(policyStart,LocalDateUtil.NORM_DATE_PATTERN)){
param.setErrorMessage(InsurancesConstants.POLICY_START_PARSE_ERROR);
errorList.add(param);
continue;
}
// 保单结束日期格式校验
if(!LocalDateUtil.isDate(policyEnd,LocalDateUtil.NORM_DATE_PATTERN)){
param.setErrorMessage(InsurancesConstants.POLICY_END_PARSE_ERROR);
errorList.add(param);
continue;
}
LambdaQueryWrapper<TInsuranceDetail> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(TInsuranceDetail :: getDeleteFlag,CommonConstants.ZERO_INT).eq(TInsuranceDetail ::getEmpName,empName )
.eq(TInsuranceDetail ::getEmpIdcardNo,empIdCardNo ).eq(TInsuranceDetail :: getInsuranceTypeName,insuranceCompanyName )
.eq(TInsuranceDetail :: getPolicyStart,policyStart ).eq(TInsuranceDetail :: getPolicyEnd,policyEnd);
TInsuranceDetail one = getOne(queryWrapper);
if (Common.isEmpty(one)){
param.setErrorMessage(InsurancesConstants.DATA_IS_NOT_EXIST);
errorList.add(param);
continue;
}
Integer buyHandleStatus = one.getBuyHandleStatus();
if (CommonConstants.THREE_INT != buyHandleStatus){
param.setErrorMessage(InsurancesConstants.REFUND_ERROR);
errorList.add(param);
continue;
}
Integer reduceHandleStatus = one.getReduceHandleStatus();
//当前保单信息的减员状态不为空时不能进行导入
if(reduceHandleStatus != null && CommonConstants.THREE_INT != reduceHandleStatus ){
param.setErrorMessage(InsurancesConstants.REFUND_ERROR);
errorList.add(param);
continue;
}
//出险状态
if(CommonConstants.ZERO_INT != one.getIsUse()){
param.setErrorMessage(InsurancesConstants.IS_USE_ERROR);
errorList.add(param);
continue;
}
//有效状态
if(CommonConstants.ZERO_INT != one.getIsEffect()){
param.setErrorMessage(InsurancesConstants.IS_EFFECT_ERROR);
errorList.add(param);
continue;
}
//过期状态
if (CommonConstants.ZERO_INT != one.getIsOverdue()){
param.setErrorMessage(InsurancesConstants.IS_OVERDUE_ERROR);
errorList.add(param);
continue;
}
one.setReduceHandleStatus(CommonConstants.ONE_INT);
one.setUpdateTime(LocalDateTime.now());
one.setUpdateBy(user.getId());
successList.add(one);
} }
if (Common.isNotEmpty(refundErrorList)){ //批量更新减员状态
return null; if (CollectionUtils.isNotEmpty(successList)){
this.updateBatchById(successList);
} }
return null; return R.ok(errorList);
} }
/** /**
* 已投保列表分页查询 * 已投保列表分页查询
* *
...@@ -1288,8 +1395,22 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1288,8 +1395,22 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
*/ */
@Override @Override
public IPage<InsuredListVo> getInsuredListPage(Page<InsuredListVo> page, InsuredParam param) { public IPage<InsuredListVo> getInsuredListPage(Page<InsuredListVo> page, InsuredParam param) {
IPage<InsuredListVo> insuranceList = this.baseMapper.getInsuredListPage(page, param);
return null; if (CollectionUtils.isNotEmpty(insuranceList.getRecords())){
//根据项目编码获取项目名称
List<String> collect = insuranceList.getRecords().stream().map(e -> e.getDeptNo()).distinct().collect(Collectors.toList());
R<Map> setInfoByCodes = archivesDaprUtil.getSetInfoByCodes(collect);
if (null != setInfoByCodes && setInfoByCodes.getCode() != CommonConstants.SUCCESS && MapUtils.isNotEmpty(setInfoByCodes.getData())) {
Map data = setInfoByCodes.getData();
for (InsuredListVo record : insuranceList.getRecords()) {
JSONObject jsonObject = (JSONObject) data.get(record.getDeptNo());
if (null != jsonObject){
record.setProjectName(Optional.ofNullable(jsonObject.getString("departName")).orElse(""));
}
}
}
}
return insuranceList;
} }
/** /**
...@@ -1301,8 +1422,22 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1301,8 +1422,22 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
*/ */
@Override @Override
public List<InsuredListVo> getInsuredList(InsuredParam param) { public List<InsuredListVo> getInsuredList(InsuredParam param) {
List<InsuredListVo> insuredList = this.baseMapper.getInsuredList(param);
return null; if (CollectionUtils.isNotEmpty(insuredList)){
//根据项目编码获取项目名称
List<String> collect = insuredList.stream().map(e -> e.getDeptNo()).distinct().collect(Collectors.toList());
R<Map> setInfoByCodes = archivesDaprUtil.getSetInfoByCodes(collect);
if (null != setInfoByCodes && setInfoByCodes.getCode() != CommonConstants.SUCCESS && MapUtils.isNotEmpty(setInfoByCodes.getData())) {
Map data = setInfoByCodes.getData();
for (InsuredListVo record : insuredList) {
JSONObject jsonObject = (JSONObject) data.get(record.getDeptNo());
if (null != jsonObject){
record.setProjectName(Optional.ofNullable(jsonObject.getString("departName")).orElse(""));
}
}
}
}
return insuredList;
} }
/** /**
...@@ -1315,7 +1450,22 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1315,7 +1450,22 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
*/ */
@Override @Override
public IPage<InsuranceRefundListVo> getInsuranceRefundPageList(Page<InsuranceRefundParam> page, InsuranceRefundParam param) { public IPage<InsuranceRefundListVo> getInsuranceRefundPageList(Page<InsuranceRefundParam> page, InsuranceRefundParam param) {
return null; IPage<InsuranceRefundListVo> insuranceRefundPageList = this.baseMapper.getInsuranceRefundPageList(page, param);
if (CollectionUtils.isNotEmpty(insuranceRefundPageList.getRecords())){
//根据项目编码获取项目名称
List<String> collect = insuranceRefundPageList.getRecords().stream().map(e -> e.getDeptNo()).distinct().collect(Collectors.toList());
R<Map> setInfoByCodes = archivesDaprUtil.getSetInfoByCodes(collect);
if (null != setInfoByCodes && setInfoByCodes.getCode() != CommonConstants.SUCCESS && MapUtils.isNotEmpty(setInfoByCodes.getData())) {
Map data = setInfoByCodes.getData();
for (InsuranceRefundListVo record : insuranceRefundPageList.getRecords()) {
JSONObject jsonObject = (JSONObject) data.get(record.getDeptNo());
if (null != jsonObject){
record.setProjectName(Optional.ofNullable(jsonObject.getString("departName")).orElse(""));
}
}
}
}
return insuranceRefundPageList;
} }
/** /**
...@@ -1325,10 +1475,24 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1325,10 +1475,24 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @param param 查询参数 * @param param 查询参数
* @return {@link List< InsuranceRefundListVo >} * @return {@link List< InsuranceRefundListVo >}
*/ */
@Override @Override
public List<InsuranceRefundListVo> getInsuranceRefundList(InsuranceRefundParam param) { public List<InsuranceRefundListVo> getInsuranceRefundList(InsuranceRefundParam param) {
return null; List<InsuranceRefundListVo> insuranceRefundList = this.baseMapper.getInsuranceRefundList(param);
if (CollectionUtils.isNotEmpty(insuranceRefundList)){
//根据项目编码获取项目名称
List<String> collect = insuranceRefundList.stream().map(e -> e.getDeptNo()).distinct().collect(Collectors.toList());
R<Map> setInfoByCodes = archivesDaprUtil.getSetInfoByCodes(collect);
if (null != setInfoByCodes && setInfoByCodes.getCode() != CommonConstants.SUCCESS && MapUtils.isNotEmpty(setInfoByCodes.getData())) {
Map data = setInfoByCodes.getData();
for (InsuranceRefundListVo record : insuranceRefundList) {
JSONObject jsonObject = (JSONObject) data.get(record.getDeptNo());
if (null != jsonObject){
record.setProjectName(Optional.ofNullable(jsonObject.getString("departName")).orElse(""));
}
}
}
}
return insuranceRefundList;
} }
/** /**
...@@ -1341,7 +1505,24 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1341,7 +1505,24 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
*/ */
@Override @Override
public IPage<InsuranceRefundHandlingListVo> getInsuranceRefundHandlingPageList(Page<InsuranceRefundHandlingParam> page, InsuranceRefundHandlingParam param) { public IPage<InsuranceRefundHandlingListVo> getInsuranceRefundHandlingPageList(Page<InsuranceRefundHandlingParam> page, InsuranceRefundHandlingParam param) {
return null;
IPage<InsuranceRefundHandlingListVo> insuranceRefundHandlingPageList = this.baseMapper.getInsuranceRefundHandlingPageList(page, param);
if (CollectionUtils.isNotEmpty(insuranceRefundHandlingPageList.getRecords())){
//根据项目编码获取项目名称
List<String> collect = insuranceRefundHandlingPageList.getRecords().stream().map(e -> e.getDeptNo()).distinct().collect(Collectors.toList());
R<Map> setInfoByCodes = archivesDaprUtil.getSetInfoByCodes(collect);
if (null != setInfoByCodes && setInfoByCodes.getCode() != CommonConstants.SUCCESS && MapUtils.isNotEmpty(setInfoByCodes.getData())) {
Map data = setInfoByCodes.getData();
for (InsuranceRefundHandlingListVo record : insuranceRefundHandlingPageList.getRecords()) {
JSONObject jsonObject = (JSONObject) data.get(record.getDeptNo());
if (null != jsonObject){
record.setProjectName(Optional.ofNullable(jsonObject.getString("departName")).orElse(""));
}
}
}
}
return insuranceRefundHandlingPageList;
} }
/** /**
...@@ -1352,8 +1533,33 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1352,8 +1533,33 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link List< InsuranceRefundHandlingListVo>} * @return {@link List< InsuranceRefundHandlingListVo>}
*/ */
@Override @Override
@Transactional(rollbackFor = Exception.class)
public List<InsuranceRefundHandlingListVo> getInsuranceRefundHandlingList(InsuranceRefundHandlingParam param) { public List<InsuranceRefundHandlingListVo> getInsuranceRefundHandlingList(InsuranceRefundHandlingParam param) {
return null; YifuUser user = SecurityUtils.getUser();
List<InsuranceRefundHandlingListVo> insuranceRefundHandlingList = this.baseMapper.getInsuranceRefundHandlingList(param);
if (CollectionUtils.isNotEmpty(insuranceRefundHandlingList)){
//根据项目编码获取项目名称
List<String> collect = insuranceRefundHandlingList.stream().map(e -> e.getDeptNo()).distinct().collect(Collectors.toList());
R<Map> setInfoByCodes = archivesDaprUtil.getSetInfoByCodes(collect);
if (null != setInfoByCodes && setInfoByCodes.getCode() != CommonConstants.SUCCESS && MapUtils.isNotEmpty(setInfoByCodes.getData())) {
Map data = setInfoByCodes.getData();
for (InsuranceRefundHandlingListVo record : insuranceRefundHandlingList) {
JSONObject jsonObject = (JSONObject) data.get(record.getDeptNo());
if (null != jsonObject){
record.setProjectName(Optional.ofNullable(jsonObject.getString("departName")).orElse(""));
}
}
}
}
for (InsuranceRefundHandlingListVo insuranceRefund : insuranceRefundHandlingList) {
LambdaUpdateWrapper<TInsuranceDetail> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(TInsuranceDetail :: getId,insuranceRefund.getId())
.set(TInsuranceDetail :: getReduceHandleStatus,CommonConstants.TWO_INT)
.set(TInsuranceDetail ::getUpdateTime,LocalDateTime.now())
.set(TInsuranceDetail ::getUpdateBy,user.getId());
update(updateWrapper);
}
return insuranceRefundHandlingList;
} }
/** /**
...@@ -1364,7 +1570,405 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1364,7 +1570,405 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link R} * @return {@link R}
*/ */
@Override @Override
@Transactional(rollbackFor = Exception.class)
public R updateInsuranceRefund(InsuranceRefundListParam insuranceDetail) { public R updateInsuranceRefund(InsuranceRefundListParam insuranceDetail) {
return null; YifuUser user = SecurityUtils.getUser();
insuranceDetail.setUpdateBy(user.getId());
insuranceDetail.setRefundCreateTime(LocalDateTime.now());
String refundType = insuranceDetail.getRefundType();
return R.ok(this.baseMapper.updateInsuranceRefund(insuranceDetail));
}
/**
* 结算月份校验
*
* @author zhaji
* @param settleMonthCheckList 变更列表
* @return {@link R}
*/
private Map<String,List<SettleMonthChangeCheckParam>> settleMonthChangeCheck(List<SettleMonthChangeCheckParam> settleMonthCheckList) {
Map<String,List<SettleMonthChangeCheckParam>> map = new HashMap<>();
List<SettleMonthChangeCheckParam> errorList = new ArrayList();
List<SettleMonthChangeCheckParam> successList = new ArrayList<>();
for (SettleMonthChangeCheckParam param : settleMonthCheckList) {
//结算月
String settleMonth = param.getSettleMonth();
if(StringUtils.isBlank(settleMonth)){
param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_NOT_EMPTY);
errorList.add(param);
continue;
}
//员工姓名
String empName = param.getEmpName();
if(StringUtils.isBlank(empName)){
param.setErrorMessage(InsurancesConstants.EMP_NAME_NOT_EMPTY);
errorList.add(param);
continue;
}
//员工身份证
String empIdCardNo = param.getEmpIdCardNo();
if(StringUtils.isBlank(empIdCardNo)){
param.setErrorMessage(InsurancesConstants.EMP_IDCARD_NO_NOT_EMPTY);
errorList.add(param);
continue;
}
//保险公司名称
String insuranceCompanyName = param.getInsuranceCompanyName();
if(StringUtils.isBlank(insuranceCompanyName)){
param.setErrorMessage(InsurancesConstants.INSURANCE_COMPANY_NAME_NOT_EMPTY);
errorList.add(param);
continue;
}
//险种名称
String insuranceTypeName = param.getInsuranceTypeName();
if(StringUtils.isBlank(insuranceTypeName)){
param.setErrorMessage(InsurancesConstants.INSURANCE_TYPE_NAME_NOT_EMPTY);
errorList.add(param);
continue;
}
//保单开始日期
String policyStart = param.getPolicyStart();
if(StringUtils.isBlank(policyStart)){
param.setErrorMessage(InsurancesConstants.POLICY_START_NOT_EMPTY);
errorList.add(param);
continue;
}
//保单结束日期
String policyEnd = param.getPolicyEnd();
if(StringUtils.isBlank(policyEnd)){
param.setErrorMessage(InsurancesConstants.POLICY_END_NOT_EMPTY);
errorList.add(param);
continue;
}
//所属项目
String deptNo = param.getDeptNo();
if(StringUtils.isBlank(deptNo)){
param.setErrorMessage(InsurancesConstants.DEPT_NO_NOT_EMPTY);
errorList.add(param);
continue;
}
//购买标准
String buyStandard = param.getBuyStandard();
if(StringUtils.isBlank(buyStandard)){
param.setErrorMessage(InsurancesConstants.BUY_STANDARD_NOT_EMPTY);
errorList.add(param);
continue;
}
// 身份证号位数校验(18 位合法)
if (ValidityUtil.validateIDCard(param.getEmpIdCardNo())){
param.setErrorMessage(InsurancesConstants.EMP_IDCARD_NO_NOT_LEGITIMATE);
errorList.add(param);
continue;
}
// 保单开始日期格式校验
if(!LocalDateUtil.isDate(policyStart,LocalDateUtil.NORM_DATE_PATTERN)){
param.setErrorMessage(InsurancesConstants.POLICY_START_PARSE_ERROR);
errorList.add(param);
continue;
}
// 保单结束日期格式校验
if(!LocalDateUtil.isDate(policyEnd,LocalDateUtil.NORM_DATE_PATTERN)){
param.setErrorMessage(InsurancesConstants.POLICY_END_PARSE_ERROR);
errorList.add(param);
continue;
}
// 结算月份 >= 派单月份(结算月 < 派单月份的记录予以拦截,并提示)
if(!LocalDateUtil.isDate(param.getSettleMonth(),LocalDateUtil.NORM_MONTH_PATTERN)){
param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_PARSE_ERROR);
errorList.add(param);
continue;
}
if(!LocalDateUtil.isCurrentOrFutureMonth(param.getSettleMonth())){
param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_SHOULD_IS_FUTURE);
errorList.add(param);
continue;
}
//必填格式校通过后查询对应的保单信息
LambdaQueryWrapper<TInsuranceDetail> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(TInsuranceDetail :: getDeleteFlag,CommonConstants.ZERO_INT).eq(TInsuranceDetail ::getEmpName,empName )
.eq(TInsuranceDetail ::getEmpIdcardNo,empIdCardNo ).eq(TInsuranceDetail :: getInsuranceTypeName,insuranceCompanyName )
.eq(TInsuranceDetail :: getDeptNo,deptNo).eq(TInsuranceDetail :: getBuyStandard,buyStandard)
.eq(TInsuranceDetail :: getInsuranceCompanyName,insuranceCompanyName)
.eq(TInsuranceDetail :: getPolicyStart,policyStart ).eq(TInsuranceDetail :: getPolicyEnd,policyEnd);
TInsuranceDetail insuranceDetail = getOne(queryWrapper);
//如果保单信息为空
if (Common.isEmpty(insuranceDetail)){
param.setErrorMessage(InsurancesConstants.DATA_IS_NOT_EXIST);
errorList.add(param);
continue;
}
//如果结算月份相同
if (settleMonth.equals(insuranceDetail.getSettleMonth())){
param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_IDENTICAL);
errorList.add(param);
continue;
}
//非已办理状态
Integer buyHandleStatus = insuranceDetail.getBuyHandleStatus();
if (CommonConstants.THREE_INT != buyHandleStatus){
param.setErrorMessage(InsurancesConstants.REFUND_ERROR);
errorList.add(param);
continue;
}
//查询结算状态
LambdaQueryWrapper<TInsuranceSettle> insuranceSettleQuery = new LambdaQueryWrapper<>();
insuranceSettleQuery.eq(TInsuranceSettle :: getInsDetailId,insuranceDetail.getId());
TInsuranceSettle insuranceSettle = insuranceSettleService.getOne(insuranceSettleQuery);
//当前结算状态为已结算时,不能变更结算月
if (CommonConstants.FOUR_STRING.equals(insuranceSettle.getSettleHandleStatus())){
param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_CHANGE_SETTLE_HANDLE_STATUS_ERROR);
errorList.add(param);
continue;
}
Integer reduceHandleStatus = insuranceDetail.getReduceHandleStatus();
//当前保单信息的减员状态不为空时不能进行导入
if(reduceHandleStatus != null && CommonConstants.THREE_INT != reduceHandleStatus ){
param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_CHANGE_REDUCE_HANDLE_STATUS_ERROR);
errorList.add(param);
continue;
}
//有效状态
if(CommonConstants.ZERO_INT != insuranceDetail.getIsEffect()){
param.setErrorMessage(InsurancesConstants.IS_EFFECT_ERROR);
errorList.add(param);
continue;
}
//判断当前数据中是否存在重复数据
boolean b = successList.stream().anyMatch(u -> u.getEmpName().equals(param.getEmpName())
&& u.getEmpIdCardNo().equals(param.getEmpIdCardNo())&& u.getDeptNo().equals(param.getDeptNo())
&& u.getInsuranceCompanyName().equals(param.getInsuranceCompanyName())&& u.getInsuranceTypeName().equals(param.getInsuranceTypeName())
&& u.getPolicyStart().equals(param.getPolicyStart())&& u.getPolicyEnd().equals(param.getPolicyEnd())
&& u.getSettleMonth().equals(param.getSettleMonth())&& u.getBuyStandard().equals(param.getBuyStandard()));
if(!b){
successList.add(param);
}else{
param.setErrorMessage(InsurancesConstants.DUPLICATE_DATA_ERROR);
errorList.add(param);
}
}
map.put("errorList",errorList);
map.put("successList",successList);
return map;
}
/**
* 变更结算月份
*
* @author zhaji
* @param
* @return void
*/
@Transactional(rollbackFor = Exception.class)
@Override
public R settleMonthChange(List<SettleMonthChangeCheckParam> settleMonthCheckList) {
YifuUser user = SecurityUtils.getUser();
if(!Common.isNotEmpty(settleMonthCheckList)){
return R.failed("当前变更结算月列表为空");
}
Map<String, List<SettleMonthChangeCheckParam>> map = settleMonthChangeCheck(settleMonthCheckList);
//todo 生成EKP通知,通知ekp变更结算月份
List<SettleMonthChangeCheckParam> successList = map.get("successList");
for (SettleMonthChangeCheckParam success : successList) {
LambdaUpdateWrapper<TInsuranceDetail> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(TInsuranceDetail :: getDeleteFlag,CommonConstants.ZERO_INT).eq(TInsuranceDetail ::getEmpName,success.getEmpName())
.eq(TInsuranceDetail ::getEmpIdcardNo,success.getEmpIdCardNo()).eq(TInsuranceDetail :: getInsuranceTypeName,success.getInsuranceTypeName() )
.eq(TInsuranceDetail :: getDeptNo,success.getDeptNo()).eq(TInsuranceDetail :: getBuyStandard,success.getBuyStandard())
.eq(TInsuranceDetail :: getInsuranceCompanyName,success.getInsuranceCompanyName())
.eq(TInsuranceDetail :: getPolicyStart,success.getPolicyStart() ).eq(TInsuranceDetail :: getPolicyEnd,success.getPolicyEnd())
.set(TInsuranceDetail :: getSettleMonth,success.getSettleMonth())
.set(TInsuranceDetail :: getUpdateBy,user.getId())
.set(TInsuranceDetail :: getUpdateTime,LocalDateTime.now());
update(updateWrapper);
}
List<SettleMonthChangeCheckParam> errorList = map.get("errorList");
return R.ok(errorList);
}
/**
* 变更所属项目
*
* @author zhaji
* @param deptChangeCheckList 变更列表
* @return {@link R}
*/
@Override
@Transactional(rollbackFor = Exception.class)
public R deptChange(List<DeptChangeCheckParam> deptChangeCheckList) {
YifuUser user = SecurityUtils.getUser();
if(!Common.isNotEmpty(deptChangeCheckList)){
return R.failed("当前变更所属项目列表为空");
}
Map<String, List<DeptChangeCheckParam>> stringListMap = deptChangeCheck(deptChangeCheckList);
//todo 生成EKP通知,通知ekp变更结算所属项目
List<DeptChangeCheckParam> successList = stringListMap.get("successList");
for (DeptChangeCheckParam success : successList) {
LambdaUpdateWrapper<TInsuranceDetail> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(TInsuranceDetail :: getDeleteFlag,CommonConstants.ZERO_INT).eq(TInsuranceDetail ::getEmpName,success.getEmpName())
.eq(TInsuranceDetail ::getEmpIdcardNo,success.getEmpIdCardNo()).eq(TInsuranceDetail :: getInsuranceTypeName,success.getInsuranceTypeName() )
.eq(TInsuranceDetail :: getDeptNo,success.getOldDeptNo()).eq(TInsuranceDetail :: getBuyStandard,success.getBuyStandard())
.eq(TInsuranceDetail :: getInsuranceCompanyName,success.getInsuranceCompanyName())
.eq(TInsuranceDetail :: getPolicyStart,success.getPolicyStart() ).eq(TInsuranceDetail :: getPolicyEnd,success.getPolicyEnd())
.set(TInsuranceDetail :: getDeptNo,success.getNewDeptNo())
.set(TInsuranceDetail :: getSettleType,success.getSettleType())
.set(TInsuranceDetail :: getUpdateBy,user.getId())
.set(TInsuranceDetail :: getUpdateTime,LocalDateTime.now());
update(updateWrapper);
}
List<DeptChangeCheckParam> errorList = stringListMap.get("errorList");
return R.ok(errorList);
}
/**
* 校验所属项目
*
* @author zhaji
* @param deptChangeCheckList 变更列表
* @return {@link R}
*/
public Map<String,List<DeptChangeCheckParam>> deptChangeCheck(List<DeptChangeCheckParam> deptChangeCheckList) {
Map<String,List<DeptChangeCheckParam>> map = new HashMap<>();
List<DeptChangeCheckParam> errorList = new ArrayList();
List<DeptChangeCheckParam> successList = new ArrayList<>();
for (DeptChangeCheckParam param : deptChangeCheckList) {
String newDeptNo = param.getNewDeptNo();
if(StringUtils.isBlank(newDeptNo)){
param.setErrorMessage(InsurancesConstants.REPLACE_DEPT_NO_NOT_EMPTY);
errorList.add(param);
continue;
}
//员工姓名
String empName = param.getEmpName();
if(StringUtils.isBlank(empName)){
param.setErrorMessage(InsurancesConstants.EMP_NAME_NOT_EMPTY);
errorList.add(param);
continue;
}
//员工身份证
String empIdCardNo = param.getEmpIdCardNo();
if(StringUtils.isBlank(empIdCardNo)){
param.setErrorMessage(InsurancesConstants.EMP_IDCARD_NO_NOT_EMPTY);
errorList.add(param);
continue;
}
//保险公司名称
String insuranceCompanyName = param.getInsuranceCompanyName();
if(StringUtils.isBlank(insuranceCompanyName)){
param.setErrorMessage(InsurancesConstants.INSURANCE_COMPANY_NAME_NOT_EMPTY);
errorList.add(param);
continue;
}
//险种名称
String insuranceTypeName = param.getInsuranceTypeName();
if(StringUtils.isBlank(insuranceTypeName)){
param.setErrorMessage(InsurancesConstants.INSURANCE_TYPE_NAME_NOT_EMPTY);
errorList.add(param);
continue;
}
//保单开始日期
String policyStart = param.getPolicyStart();
if(StringUtils.isBlank(policyStart)){
param.setErrorMessage(InsurancesConstants.POLICY_START_NOT_EMPTY);
errorList.add(param);
continue;
}
//保单结束日期
String policyEnd = param.getPolicyEnd();
if(StringUtils.isBlank(policyEnd)){
param.setErrorMessage(InsurancesConstants.POLICY_END_NOT_EMPTY);
errorList.add(param);
continue;
}
//所属项目
String oldDeptNo = param.getOldDeptNo();
if(StringUtils.isBlank(oldDeptNo)){
param.setErrorMessage(InsurancesConstants.DEPT_NO_NOT_EMPTY);
errorList.add(param);
continue;
}
//新老项目id相同
if (oldDeptNo.equals(newDeptNo)){
param.setErrorMessage(InsurancesConstants.DEPT_NO_IDENTICAL);
errorList.add(param);
continue;
}
//购买标准
String buyStandard = param.getBuyStandard();
if(StringUtils.isBlank(buyStandard)){
param.setErrorMessage(InsurancesConstants.BUY_STANDARD_NOT_EMPTY);
errorList.add(param);
continue;
}
// 身份证号位数校验(18 位合法)
if (ValidityUtil.validateIDCard(param.getEmpIdCardNo())){
param.setErrorMessage(InsurancesConstants.EMP_IDCARD_NO_NOT_LEGITIMATE);
errorList.add(param);
continue;
}
// 保单开始日期格式校验
if(!LocalDateUtil.isDate(policyStart,LocalDateUtil.NORM_DATE_PATTERN)){
param.setErrorMessage(InsurancesConstants.POLICY_START_PARSE_ERROR);
errorList.add(param);
continue;
}
// 保单结束日期格式校验
if(!LocalDateUtil.isDate(policyEnd,LocalDateUtil.NORM_DATE_PATTERN)){
param.setErrorMessage(InsurancesConstants.POLICY_END_PARSE_ERROR);
errorList.add(param);
continue;
}
//根据项目编码查询项目是否存在
R<Map> setInfoByCodes = archivesDaprUtil.getSetInfoByCodes(Arrays.asList(newDeptNo));
if (null != setInfoByCodes && setInfoByCodes.getCode() != CommonConstants.SUCCESS) {
Map data = setInfoByCodes.getData();
if (MapUtils.isEmpty(data)){
param.setErrorMessage(InsurancesConstants.DEPT_NO_IS_NOT_EXIST);
errorList.add(param);
continue;
}else {
JSONObject jsonObject = (JSONObject) data.get(newDeptNo);
if (null == jsonObject){
param.setErrorMessage(InsurancesConstants.DEPT_NO_IS_NOT_EXIST);
errorList.add(param);
continue;
}else {
//结算类型,根据项目编码获取,并冗余到明细记录中
String settleType = jsonObject.getString("insuranceSettleType");
if (StringUtils.isEmpty(settleType)){
param.setErrorMessage(InsurancesConstants.PROJECT_NOT_FIND_SETTLE_TYPE);
errorList.add(param);
continue;
}else {
param.setSettleType(Integer.parseInt(settleType));
}
}
}
}
//判断当前数据中是否存在重复数据
boolean b = successList.stream().anyMatch(u -> u.getEmpName().equals(param.getEmpName())
&& u.getEmpIdCardNo().equals(param.getEmpIdCardNo())&& u.getOldDeptNo().equals(param.getOldDeptNo())
&& u.getInsuranceCompanyName().equals(param.getInsuranceCompanyName())&& u.getInsuranceTypeName().equals(param.getInsuranceTypeName())
&& u.getPolicyStart().equals(param.getPolicyStart())&& u.getPolicyEnd().equals(param.getPolicyEnd())
&& u.getNewDeptNo().equals(param.getNewDeptNo())&& u.getBuyStandard().equals(param.getBuyStandard()));
if(!b){
successList.add(param);
}else{
param.setErrorMessage(InsurancesConstants.DUPLICATE_DATA_ERROR);
errorList.add(param);
}
}
map.put("errorList",errorList);
map.put("successList",successList);
return map;
} }
} }
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
from t_insurance_detail detail from t_insurance_detail detail
where detail.DELETE_FLAG = 0 where detail.DELETE_FLAG = 0
<if test="param.deptNo != null and param.deptNo.trim() != ''"> <if test="param.deptNo != null and param.deptNo.trim() != ''">
and detail.DEPT_NO like concat('%',replace(replace(#{deptNo},'_','\_'),'%','\%'),'%') and detail.DEPT_NO like concat('%',replace(replace(#{param.deptNo},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.buyHandleStatus != null"> <if test="param.buyHandleStatus != null">
and detail.BUY_HANDLE_STATUS = #{param.buyHandleStatus} and detail.BUY_HANDLE_STATUS = #{param.buyHandleStatus}
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
from t_insurance_detail detail from t_insurance_detail detail
where detail.DELETE_FLAG = 0 where detail.DELETE_FLAG = 0
<if test="param.deptNo != null and param.deptNo.trim() != ''"> <if test="param.deptNo != null and param.deptNo.trim() != ''">
and detail.DEPT_NO like concat('%',replace(replace(#{deptNo},'_','\_'),'%','\%'),'%') and detail.DEPT_NO like concat('%',replace(replace(#{param.deptNo},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.buyHandleStatus != null"> <if test="param.buyHandleStatus != null">
and detail.BUY_HANDLE_STATUS = #{param.buyHandleStatus} and detail.BUY_HANDLE_STATUS = #{param.buyHandleStatus}
...@@ -246,7 +246,7 @@ ...@@ -246,7 +246,7 @@
and detail.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%') and detail.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.deptNo != null and param.deptNo.trim() != ''"> <if test="param.deptNo != null and param.deptNo.trim() != ''">
and detail.DEPT_NO like concat('%',replace(replace(#{deptNo},'_','\_'),'%','\%'),'%') and detail.DEPT_NO like concat('%',replace(replace(#{param.deptNo},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"> <if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''">
and detail.INSURANCE_COMPANY_NAME like concat('%',replace(replace(#{param.insuranceCompanyName},'_','\_'),'%','\%'),'%') and detail.INSURANCE_COMPANY_NAME like concat('%',replace(replace(#{param.insuranceCompanyName},'_','\_'),'%','\%'),'%')
...@@ -256,78 +256,335 @@ ...@@ -256,78 +256,335 @@
<!-- ***********************减员办理******************************** --> <!-- ***********************减员办理******************************** -->
<select id="getInsuredListPage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuredListVo"> <select id="getInsuredListPage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuredListVo">
select
detail.id as id,
detail.ORDER_NO as orderNo,
detail.REDUCE_HANDLE_STATUS as reduceHandleStatus,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
detail.BUY_TYPE as buyType,
detail.DEPT_NO as deptNo,
detail.POST as post,
detail.POLICY_START as policyStart,
detail.POLICY_END as policyEnd,
detail.POLICY_EFFECT as policyEffect,
detail.IS_USE as isUse,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.BUY_STANDARD as buyStandard
where
detail.DELETE_FLAG = 0
and
detail.BUY_HANDLE_STATUS = 3
<if test="param.empName != null and param.empName.trim() != ''">
and detail.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''">
and detail.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.deptNo != null and param.deptNo.trim() != ''">
and detail.DEPT_NO like concat('%',replace(replace(#{param.deptNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''">
and detail.INSURANCE_COMPANY_NAME like concat('%',replace(replace(#{param.insuranceCompanyName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.policyNo != null and param.policyNo.trim() != ''">
and detail.POLICY_NO like concat('%',replace(replace(#{param.policyNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.policyStart != null and param.policyStart.trim() != ''">
AND detail.POLICY_START >= concat(#{param.policyStart}, ' 00:00:00')
</if>
<if test="param.policyEnd != null and param.policyEnd.trim() != ''">
AND detail.POLICY_END <![CDATA[ <= ]]> concat(#{param.policyEnd}, ' 23:59:59')
</if>
<if test="param.invoiceNo != null and param.invoiceNo.trim() != ''">
and detail.INVOICE_NO like concat('%',replace(replace(#{param.invoiceNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.isUse != null">
and detail.IS_USE = #{param.isUse}
</if>
<if test="param.isOverdue != null and param.isOverdue.trim() != ''">
and detail.IS_OVERDUE = #{param.isOverdue}
</if>
<if test="param.createTime != null and param.createTime.trim() != ''">
AND detail.CREATE_TIME = concat(#{param.createTime}, ' 00:00:00')
</if>
ORDER BY detail.CREATE_TIME DESC
</select>
<select id="getInsuredList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuredListVo">
select
detail.id as id,
detail.ORDER_NO as orderNo,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
detail.BUY_TYPE as buyType,
detail.DEPT_NO as deptNo,
detail.POST as post,
detail.POLICY_START as policyStart,
detail.POLICY_END as policyEnd,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.BUY_STANDARD as buyStandard,
detail.MEDICAL_QUOTA as medicalQuota,
detail.DIE_DISABLE_QUOTA as dieDisableQuota,
detail.ESTIMATE_PREMIUM as estimatePremium,
detail.ACTUAL_PREMIUM as actualPremium,
detail.POLICY_NO as policyNo,
detail.INVOICE_NO as invoiceNo,
detail.POLICY_EFFECT as policyEffect,
detail.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
detail.INSURANCE_CITY_NAME as insuranceCityName,
detail.INSURANCE_HANDLE_PROVINCE_NAME as insuranceHandleProvinceName,
detail.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
detail.IS_USE as isUse,
detail.IS_EFFECT as isEffect,
detail.IS_OVERDUE as isOverdue,
detail.CREATE_TIME as createTime,
detail.CREATE_NAME as createName
from
t_insurance_detail detail
where
detail.DELETE_FLAG = 0
and
detail.BUY_HANDLE_STATUS = 3
<if test="param.empName != null and param.empName.trim() != ''">
and detail.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''">
and detail.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.deptNo != null and param.deptNo.trim() != ''">
and detail.DEPT_NO like concat('%',replace(replace(#{param.deptNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''">
and detail.INSURANCE_COMPANY_NAME like concat('%',replace(replace(#{param.insuranceCompanyName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.policyNo != null and param.policyNo.trim() != ''">
and detail.POLICY_NO like concat('%',replace(replace(#{param.policyNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.policyStart != null and param.policyStart.trim() != ''">
AND detail.POLICY_START >= concat(#{param.policyStart}, ' 00:00:00')
</if>
<if test="param.policyEnd != null and param.policyEnd.trim() != ''">
AND detail.POLICY_END <![CDATA[ <= ]]> concat(#{param.policyEnd}, ' 23:59:59')
</if>
<if test="param.invoiceNo != null and param.invoiceNo.trim() != ''">
and detail.INVOICE_NO like concat('%',replace(replace(#{param.invoiceNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.isUse != null">
and detail.IS_USE = #{param.isUse}
</if>
<if test="param.isOverdue != null and param.isOverdue.trim() != ''">
and detail.IS_OVERDUE = #{param.isOverdue}
</if>
<if test="param.createTime != null and param.createTime.trim() != ''">
AND detail.CREATE_TIME = concat(#{param.createTime}, ' 00:00:00')
</if>
ORDER BY detail.CREATE_TIME DESC
</select>
<select id="getInsuranceRefundPageList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceRefundListVo">
select
detail.id as id,
detail.ORDER_NO as orderNo,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
detail.POST as post,
detail.DEPT_NO as deptNo,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.POLICY_START as policyStart,
detail.POLICY_END as policyEnd,
detail.POLICY_NO as policyNo,
detail.REFUND_CREATE_TIME as refundCreateTime
from
t_insurance_detail detail
where
detail.DELETE_FLAG = 0
and
detail.REDUCE_HANDLE_STATUS = 4
<if test="param.empName != null and param.empName.trim() != ''">
and detail.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''">
and detail.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.deptNo != null and param.deptNo.trim() != ''">
and detail.DEPT_NO like concat('%',replace(replace(#{param.deptNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''">
and detail.INSURANCE_COMPANY_NAME like concat('%',replace(replace(#{param.insuranceCompanyName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.policyNo != null and param.policyNo.trim() != ''">
and detail.POLICY_NO like concat('%',replace(replace(#{param.policyNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.policyStart != null and param.policyStart.trim() != ''">
AND detail.POLICY_START >= concat(#{param.policyStart}, ' 00:00:00')
</if>
<if test="param.policyEnd != null and param.policyEnd.trim() != ''">
AND detail.POLICY_END <![CDATA[ <= ]]> concat(#{param.policyEnd}, ' 23:59:59')
</if>
ORDER BY detail.REFUND_CREATE_TIME DESC
</select>
<select id="getInsuranceRefundList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceRefundListVo">
select
detail.id as id,
detail.ORDER_NO as orderNo,
detail.DEPT_NO as deptNo,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
detail.BUY_TYPE as buyType,
detail.POST as post,
detail.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
detail.INSURANCE_CITY_NAME as insuranceCityName,
detail.INSURANCE_HANDLE_PROVINCE_NAME as insuranceHandleProvinceName,
detail.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
detail.POLICY_START as policyStart,
detail.POLICY_END as policyEnd,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.BUY_STANDARD as buyStandard,
detail.MEDICAL_QUOTA as medicalQuota,
detail.DIE_DISABLE_QUOTA as dieDisableQuota,
detail.REFUND_CREATE_TIME as refundCreateTime
from
t_insurance_detail detail
where
detail.DELETE_FLAG = 0
and
detail.REDUCE_HANDLE_STATUS = 4
<if test="param.empName != null and param.empName.trim() != ''">
and detail.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''">
and detail.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.deptNo != null and param.deptNo.trim() != ''">
and detail.DEPT_NO like concat('%',replace(replace(#{param.deptNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''">
and detail.INSURANCE_COMPANY_NAME like concat('%',replace(replace(#{param.insuranceCompanyName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.policyNo != null and param.policyNo.trim() != ''">
and detail.POLICY_NO like concat('%',replace(replace(#{param.policyNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.policyStart != null and param.policyStart.trim() != ''">
AND detail.POLICY_START >= concat(#{param.policyStart}, ' 00:00:00')
</if>
<if test="param.policyEnd != null and param.policyEnd.trim() != ''">
AND detail.POLICY_END <![CDATA[ <= ]]> concat(#{param.policyEnd}, ' 23:59:59')
</if>
ORDER BY detail.REFUND_CREATE_TIME DESC
</select>
<select id="getInsuranceRefundHandlingPageList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceRefundHandlingListVo">
select select
detail.id as id, detail.id as id,
detail.ORDER_NO as orderNo, detail.ORDER_NO as orderNo,
detail.EMP_NAME as empName, detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo, detail.EMP_IDCARD_NO as empIdcardNo,
detail.BUY_TYPE as buyType, detail.BUY_TYPE as buyType,
detail.POST as post,
detail.DEPT_NO as deptNo, detail.DEPT_NO as deptNo,
detail.POST as post,
detail.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
detail.INSURANCE_CITY_NAME as insuranceCityName,
detail.INSURANCE_HANDLE_PROVINCE_NAME as insuranceHandleProvinceName,
detail.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
detail.POLICY_START as policyStart, detail.POLICY_START as policyStart,
detail.POLICY_END as policyEnd, detail.POLICY_END as policyEnd,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName, detail.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.INSURANCE_TYPE_NAME as insuranceTypeName, detail.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.BUY_STANDARD as buyStandard, detail.BUY_STANDARD as buyStandard,
detail.MEDICAL_QUOTA as medicalQuota,
detail.DIE_DISABLE_QUOTA as dieDisableQuota,
detail.CREATE_NAME as createName, detail.CREATE_NAME as createName,
detail.BUY_HANDLE_STATUS as buyHandleStatus, detail.REDUCE_HANDLE_STATUS as reduceHandleStatus
detail.SETTLE_TYPE as settleType, from
detail.SETTLE_MONTH as settleMonth t_insurance_detail detail
from t_insurance_detail detail where
where detail.DELETE_FLAG = 0 detail.DELETE_FLAG = 0
<if test="param.deptNo != null and param.deptNo.trim() != ''"> and
and detail.DEPT_NO like concat('%',replace(replace(#{deptNo},'_','\_'),'%','\%'),'%') (detail.REDUCE_HANDLE_STATUS is not null and detail.REDUCE_HANDLE_STATUS != 3)
</if>
<if test="param.buyHandleStatus != null">
and detail.BUY_HANDLE_STATUS = #{param.buyHandleStatus}
</if>
<if test="param.empName != null and param.empName.trim() != ''"> <if test="param.empName != null and param.empName.trim() != ''">
and detail.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%') and detail.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''"> <if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''">
and detail.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%') and detail.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"> <if test="param.deptNo != null and param.deptNo.trim() != ''">
and detail.INSURANCE_COMPANY_NAME like concat('%',replace(replace(#{param.insuranceCompanyName},'_','\_'),'%','\%'),'%') and detail.DEPT_NO like concat('%',replace(replace(#{param.deptNo},'_','\_'),'%','\%'),'%')
</if> </if>
ORDER BY detail.CREATE_TIME DESC <if test="param.reduceHandleStatus != null and param.reduceHandleStatus.trim() != ''">
and detail.REDUCE_HANDLE_STATUS like concat('%',replace(replace(#{param.reduceHandleStatus},'_','\_'),'%','\%'),'%')
</if>
<if test="param.isOverdue != null and param.isOverdue.trim() != ''">
and detail.IS_OVERDUE like concat('%',replace(replace(#{param.isOverdue},'_','\_'),'%','\%'),'%')
</if>
<if test="param.isUse != null and param.isUse.trim() != ''">
and detail.IS_USE like concat('%',replace(replace(#{param.isUse},'_','\_'),'%','\%'),'%')
</if>
ORDER BY detail.REFUND_CREATE_TIME DESC
</select> </select>
<select id="getInsuranceRefundHandlingList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceRefundHandlingListVo">
<select id="getInsuredList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuredListVo"> select
select detail.id as id, detail.id as id,
detail.ORDER_NO as orderNo, detail.ORDER_NO as orderNo,
detail.DEPT_NO as deptNo,
detail.EMP_NAME as empName, detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo, detail.EMP_IDCARD_NO as empIdcardNo,
detail.BUY_TYPE as buyType, detail.BUY_TYPE as buyType,
detail.POST as post, detail.POST as post,
detail.DEPT_NO as deptNo, detail.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
detail.INSURANCE_CITY_NAME as insuranceCityName,
detail.INSURANCE_HANDLE_PROVINCE_NAME as insuranceHandleProvinceName,
detail.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
detail.POLICY_START as policyStart, detail.POLICY_START as policyStart,
detail.POLICY_END as policyEnd, detail.POLICY_END as policyEnd,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName, detail.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.INSURANCE_TYPE_NAME as insuranceTypeName, detail.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.BUY_STANDARD as buyStandard, detail.BUY_STANDARD as buyStandard,
detail.CREATE_NAME as createName, detail.MEDICAL_QUOTA as medicalQuota,
detail.BUY_HANDLE_STATUS as buyHandleStatus, detail.DIE_DISABLE_QUOTA as dieDisableQuota,
detail.SETTLE_TYPE as settleType, detail.SETTLE_TYPE as settleType,
detail.SETTLE_MONTH as settleMonth detail.SETTLE_MONTH as settleMonth,
from t_insurance_detail detail detail.CREATE_NAME as createName,
where detail.DELETE_FLAG = 0 detail.REMARK as remark
<if test="param.deptNo != null and param.deptNo.trim() != ''"> from
and detail.DEPT_NO like concat('%',replace(replace(#{deptNo},'_','\_'),'%','\%'),'%') t_insurance_detail detail
</if> where
<if test="param.buyHandleStatus != null"> detail.DELETE_FLAG = 0
and detail.BUY_HANDLE_STATUS = #{param.buyHandleStatus} and
</if> detail.REDUCE_HANDLE_STATUS = 1
<if test="param.empName != null and param.empName.trim() != ''"> <if test="param.empName != null and param.empName.trim() != ''">
and detail.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%') and detail.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''"> <if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''">
and detail.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%') and detail.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%')
</if> </if>
<if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"> <if test="param.deptNo != null and param.deptNo.trim() != ''">
and detail.INSURANCE_COMPANY_NAME like concat('%',replace(replace(#{param.insuranceCompanyName},'_','\_'),'%','\%'),'%') and detail.DEPT_NO like concat('%',replace(replace(#{param.deptNo},'_','\_'),'%','\%'),'%')
</if> </if>
ORDER BY detail.CREATE_TIME DESC <if test="param.reduceHandleStatus != null and param.reduceHandleStatus.trim() != ''">
and detail.REDUCE_HANDLE_STATUS like concat('%',replace(replace(#{param.reduceHandleStatus},'_','\_'),'%','\%'),'%')
</if>
<if test="param.isOverdue != null and param.isOverdue.trim() != ''">
and detail.IS_OVERDUE like concat('%',replace(replace(#{param.isOverdue},'_','\_'),'%','\%'),'%')
</if>
<if test="param.isUse != null and param.isUse.trim() != ''">
and detail.IS_USE like concat('%',replace(replace(#{param.isUse},'_','\_'),'%','\%'),'%')
</if>
ORDER BY detail.REFUND_CREATE_TIME DESC
</select> </select>
<update id="updateInsuranceRefund">
update
t_insurance_detail detail
set
UPDATE_BY = #{param.updateBy},
REDUCE_HANDLE_STATUS = #{param.refundType},
UPDATE_TIME = #{param.refundCreateTime}
where
detail.id in
<foreach collection="param.idList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</update>
</mapper> </mapper>
package com.yifu.cloud.plus.v1.yifu.admin.api.entity; package com.yifu.cloud.plus.v1.yifu.admin.api.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
...@@ -23,6 +24,7 @@ public class SysArea { ...@@ -23,6 +24,7 @@ public class SysArea {
private Integer parentId; private Integer parentId;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime updateDate; private LocalDateTime updateDate;
private Integer status; private Integer status;
......
/*
* Copyright (c) 2020 yifu4cloud Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yifu.cloud.plus.v1.yifu.admin.api.vo;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysArea;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.util.List;
/**
* @author lengleng
* @date 2020/2/10
*/
@Data
@Schema(description = "区域Vo")
public class AreaVo {
/**
* 角色id
*/
private List<SysArea> sysAreaList;
}
...@@ -18,12 +18,14 @@ package com.yifu.cloud.plus.v1.yifu.admin.controller; ...@@ -18,12 +18,14 @@ package com.yifu.cloud.plus.v1.yifu.admin.controller;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysArea; import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysArea;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.AreaVo;
import com.yifu.cloud.plus.v1.yifu.admin.service.SysAreaService; import com.yifu.cloud.plus.v1.yifu.admin.service.SysAreaService;
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.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner; import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.checkerframework.checker.units.qual.A;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -84,5 +86,20 @@ public class AreaController { ...@@ -84,5 +86,20 @@ public class AreaController {
return sysAreaService.list(Wrappers.<SysArea>query().lambda() return sysAreaService.list(Wrappers.<SysArea>query().lambda()
.eq(SysArea::getStatus, CommonConstants.ZERO_INT).orderByAsc(SysArea::getParentId)); .eq(SysArea::getStatus, CommonConstants.ZERO_INT).orderByAsc(SysArea::getParentId));
} }
/**
* @param
* @Description: 获取所有区域list
* @Author: hyc
* @Date: 2022-7-21 19:45:24
**/
@Inner
@PostMapping("/inner/getAreaVo")
public AreaVo getAreaVo() {
List<SysArea> aList = sysAreaService.list(Wrappers.<SysArea>query().lambda()
.eq(SysArea::getStatus, CommonConstants.ZERO_INT).orderByAsc(SysArea::getParentId));
AreaVo vo = new AreaVo();
vo.setSysAreaList(aList);
return vo;
}
} }
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