Commit 8de79ad6 authored by 查济's avatar 查济

Merge branch 'feature-zhaji' into 'develop'

"feature-zhaJi:新增出险接口,修改已投保列表查询条件"

See merge request fangxinjiang/yifu!37
parents a721ff14 0a9db1e9
......@@ -268,7 +268,7 @@ public class InsurancesConstants {
/**
* 当前保单已结算,无法变更结算月
*/
public static final String SETTLE_MONTH_CHANGE_SETTLE_HANDLE_STATUS_ERROR = "前保单已结算,无法变更结算月";
public static final String SETTLE_MONTH_CHANGE_SETTLE_HANDLE_STATUS_ERROR = "前保单已结算,无法变更结算月";
/**
* 替换项目ID和原有项目ID相同
......@@ -293,6 +293,11 @@ public class InsurancesConstants {
/**
* 替换人员不允许变更所属项目
*/
public static final String DEPT_CHANGE_IS_EFFECT_ERROR ="替换人员不允许变更所属项目";
public static final String DEPT_NO_CHANGE_IS_EFFECT_ERROR ="替换人员不允许变更所属项目";
/**
* 当前保单已结算,无法变更所属项目
*/
public static final String DEPT_NO_CHANGE_SETTLE_HANDLE_STATUS_ERROR = "当前保单已结算,无法变更所属项目";
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
......@@ -18,24 +18,20 @@ import java.util.List;
@Data
@Tag(name = "减员办理类")
public class InsuranceRefundListParam implements Serializable {
private static final long serialVersionUID = -2689686777914935788L;
@Schema(name = "办理类型")
@NotBlank(message = "办理类型不能为空")
private String refundType;
@Schema(name = "减员办理类型")
@NotBlank(message = "减员办理类型不能为空")
private Integer refundType;
@Schema(name = "办理列表")
@NotBlank(message = "办理列表不能为空")
private String [] idList;
@Schema(description = "减员办理列表")
private List<String> insuranceDetailList;
@Schema(name = "办理人")
@NotBlank(message = "办理类型不能为空")
@Schema(name = "更新人")
private String updateBy;
@Schema(name = "办理时间")
@NotBlank(message = "办理类型不能为空")
private LocalDateTime refundCreateTime;
@Schema(name = "更新时间")
private LocalDateTime updateTime;
}
......@@ -10,11 +10,11 @@ import java.time.LocalDate;
/**
* @author zhaji
* @description 已投保列表
* @description 已减员列表
* @date 2022-07-21 11:31:30
*/
@Data
@Tag(name = "已投保列表")
@Tag(name = "已减员列表")
public class InsuranceRefundListVo implements Serializable {
private static final long serialVersionUID = -2689686777914935788L;
......
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;
/**
* @author zhaji
* @description 减员办理参数
* @date 2022-07-25 14:17:16
*/
@Data
@Schema(name = "减员办理参数")
public class InsuranceRefundOperationParam implements Serializable {
private static final long serialVersionUID = -2689686777914935788L;
@Schema(name = "办理类型")
@NotBlank(message = "办理类型不能为空")
private Integer operationType;
@Schema(name = "减员办理列表")
private List<InsuranceRefundHandlingListVo> insuranceRefundHandlingList;
@Schema(name = "办理参数")
private InsuranceRefundHandlingParam param;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
/**
* @author zhaji
* @description 减员办理返回类
* @date 2022-07-21 12:30:37
*/
@Schema(name = "减员办理返回类")
@Data
public class InsuranceRefundResultVo implements Serializable {
private static final long serialVersionUID = -2689686777914935788L;
/**
* 主键
*/
@Schema(description = "主键")
private String id;
/**
* 员工姓名
*/
@Schema(description = "员工姓名")
private String empName;
/**
* 员工身份证号
*/
@Schema(description = "员工身份证号")
private String empIdcardNo;
/**
* 项目名称
*/
@Schema(description = "项目名称")
private String projectName;
/**
* 项目编码
*/
@JsonIgnore
private String deptNo;
/**
* 投保岗位
*/
@Schema(description = "投保岗位")
private String post;
/**
* 保单开始时间
*/
@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 insuranceTypeName;
/**
* 保险公司名称
*/
@Schema(description = "保险公司名称")
private String insuranceCompanyName;
/**
* 减员状态 1待减员 2减员中3减员退回
*/
@Schema(description = "减员状态 1待减员 2减员中3减员退回")
private Integer reduceHandleStatus;
/**
* 错误原因
*/
@Schema(description = "减员状态 1待减员 2减员中3减员退回")
private String errorMessage;
}
......@@ -51,6 +51,12 @@ public class InsuredParam implements Serializable {
@Schema(description = "保险公司ID")
private String insuranceCompanyId;
/**
* 保险公司名称
*/
@Schema(description = "保险公司名称")
private String insuranceCompanyName;
/**
* 保单开始时间
*/
......
......@@ -243,7 +243,7 @@ public class TInsuranceDetailController {
@Operation(summary = "已投保列表分页查询", description = "已投保列表分页查询")
@PostMapping("/getInsuredListPage")
public R<IPage<InsuredListVo>> getInsuredListPage(Page<InsuredListVo> page, @RequestBody InsuredParam param) {
return R.ok(tInsuranceDetailService.getInsuredListPage(page, param));
return R.ok(tInsuranceDetailService.getInsuredListPage(page,param));
}
/**
......@@ -256,7 +256,7 @@ public class TInsuranceDetailController {
@Operation(summary = "已投保列表不分页查询", description = "已投保列表不分页查询")
@PostMapping("/getInsuredList")
public R<List<InsuredListVo>> getInsuredList(@RequestBody InsuredParam param) {
return R.ok(tInsuranceDetailService.getInsuredList(param));
return R.ok(tInsuranceDetailService.getInsuredList(param),"查询成功");
}
/**
......@@ -300,15 +300,15 @@ public class TInsuranceDetailController {
}
/**
* 减员办理列表不分页查询
* 导出减员列表
*
* @author zhaji
* @param param 查询条件
* @return {@link R<List< InsuranceRefundHandlingListVo >>}
*/
@Operation(summary = "减员办理列表不分页查询", description = "减员办理列表不分页查询")
@Operation(summary = "导出减员列表", description = "导出减员列表")
@PostMapping("/getInsuranceRefundHandlingList")
public R<List<InsuranceRefundHandlingListVo>> getInsuranceRefundHandlingList(@RequestBody InsuranceRefundHandlingParam param) {
public R<List<InsuranceRefundHandlingListVo>> getInsuranceRefundHandlingList(@RequestBody InsuranceRefundOperationParam param) {
return R.ok(tInsuranceDetailService.getInsuranceRefundHandlingList(param));
}
......@@ -351,4 +351,18 @@ public class TInsuranceDetailController {
return tInsuranceDetailService.selectByTypeId(id);
}
/**
* 出险
*
* @author zhaji
* @param id 险种id
* @return {@link R<List< InsuranceRefundHandlingListVo >>}
*/
@Operation(summary = "出险", description = "出险")
@GetMapping("/updateIsUse")
public R updateIsUse(String id) {
return tInsuranceDetailService.updateIsUse(id);
}
}
......@@ -105,7 +105,7 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
List<InsuranceRefundListVo> getInsuranceRefundList( @Param("param") InsuranceRefundParam param);
/**
* 减员列表分页查询
* 减员办理列表分页查询
*
* @author zhaji
* @param page 分页参数
......@@ -115,7 +115,7 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
IPage<InsuranceRefundHandlingListVo> getInsuranceRefundHandlingPageList(Page<InsuranceRefundHandlingParam> page, @Param("param") InsuranceRefundHandlingParam param);
/**
* 减员列表不分页查询
* 减员办理列表不分页查询
*
* @author zhaji
* @param param 查询参数
......@@ -131,4 +131,13 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
* @return {@link boolean}
*/
Integer updateInsuranceRefund(@Param("param") InsuranceRefundListParam insuranceDetail);
/**
* 查询保单列表
*
* @author zhaji
* @param idList idList
* @return {@link List< TInsuranceDetail>}
*/
List<TInsuranceDetail> selectDetailListByIds(@Param("idList") String [] idList);
}
......@@ -192,7 +192,7 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* @param param 查询参数
* @return {@link List< InsuranceRefundHandlingListVo>}
*/
List<InsuranceRefundHandlingListVo> getInsuranceRefundHandlingList(InsuranceRefundHandlingParam param);
List<InsuranceRefundHandlingListVo> getInsuranceRefundHandlingList(InsuranceRefundOperationParam param);
/**
* 减员办理
......@@ -238,4 +238,13 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* @return {@link R}
*/
R selectByTypeId(String id);
/**
* 出险
*
* @author zhaji
* @param id
* @return {@link R}
*/
R updateIsUse(String id);
}
......@@ -131,7 +131,7 @@ public class TInsuranceTypeServiceImpl extends ServiceImpl<TInsuranceTypeMapper,
return R.failed("当前险种信息不存在或已被删除");
}
if(byId.getName().equals(insuranceType.getName())){
return R.ok(this.updateById(insuranceType));
return R.ok(this.updateById(insuranceType),"修改险种信息成功");
}else{
LambdaQueryWrapper<TInsuranceType> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(TInsuranceType::getName,insuranceType.getName())
......@@ -139,7 +139,7 @@ public class TInsuranceTypeServiceImpl extends ServiceImpl<TInsuranceTypeMapper,
.eq(TInsuranceType::getDeleteFlag,CommonConstants.ZERO_INT);
TInsuranceType one = this.getOne(queryWrapper);
if (Common.isEmpty(one)){
return R.ok(this.updateById(insuranceType));
return R.ok(this.updateById(insuranceType),"修改险种信息成功");
}else{
return R.failed("当前险种名称已存在");
}
......
......@@ -266,7 +266,8 @@
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.BUY_STANDARD as buyStandard
from t_insurance_detail detail
from
t_insurance_detail detail
where
detail.DELETE_FLAG = 0
and
......@@ -388,11 +389,14 @@
detail.POLICY_START as policyStart,
detail.POLICY_END as policyEnd,
detail.POLICY_NO as policyNo,
detail.REFUND_CREATE_TIME as refundCreateTime
refund.CREATE_TIME as refundCreateTime
from
t_insurance_detail detail
t_insurance_detail detail,
t_insurance_refund refund
where
detail.DELETE_FLAG = 0
and
detail.ID = refund.INS_DETAIL_ID
and
detail.REDUCE_HANDLE_STATUS = 4
<if test="param.empName != null and param.empName.trim() != ''">
......@@ -416,7 +420,7 @@
<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
ORDER BY refund.CREATE_TIME DESC
</select>
<select id="getInsuranceRefundList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceRefundListVo">
select
......@@ -437,10 +441,13 @@
detail.BUY_STANDARD as buyStandard,
detail.MEDICAL_QUOTA as medicalQuota,
detail.DIE_DISABLE_QUOTA as dieDisableQuota,
detail.REFUND_CREATE_TIME as refundCreateTime
refund.CREATE_TIME as refundCreateTime
from
t_insurance_detail detail
t_insurance_detail detail,
t_insurance_refund refund
where
detail.ID = refund.INS_DETAIL_ID
and
detail.DELETE_FLAG = 0
and
detail.REDUCE_HANDLE_STATUS = 4
......@@ -465,7 +472,7 @@
<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
ORDER BY refund.CREATE_TIME DESC
</select>
<select id="getInsuranceRefundHandlingPageList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceRefundHandlingListVo">
select
......@@ -489,9 +496,10 @@
detail.CREATE_NAME as createName,
detail.REDUCE_HANDLE_STATUS as reduceHandleStatus
from
t_insurance_detail detail
t_insurance_detail detail,
t_insurance_refund refund
where
detail.DELETE_FLAG = 0
detail.ID = refund.INS_DETAIL_ID
and
(detail.REDUCE_HANDLE_STATUS is not null and detail.REDUCE_HANDLE_STATUS != 3)
<if test="param.empName != null and param.empName.trim() != ''">
......@@ -512,7 +520,7 @@
<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
ORDER BY refund.CREATE_TIME DESC
</select>
<select id="getInsuranceRefundHandlingList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceRefundHandlingListVo">
select
......@@ -564,6 +572,19 @@
ORDER BY detail.REFUND_CREATE_TIME DESC
</select>
<select id="selectDetailListByIds"
resultType="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail">
select
<include refid="Base_Column_List"></include>
from
t_insurance_detail
where
ID in
<foreach collection="param.idList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<update id="updateInsuranceRefund">
update
t_insurance_detail detail
......@@ -572,9 +593,11 @@
REDUCE_HANDLE_STATUS = #{param.refundType},
UPDATE_TIME = #{param.refundCreateTime}
where
detail.id in
detail.ID in
<foreach collection="param.idList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</update>
</mapper>
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