Commit e0e49f95 authored by hongguangwu's avatar hongguangwu

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

parents 59739efc c1d421ae
......@@ -19,10 +19,22 @@ public class InsurancesConstants {
* 替换成功
*/
public static final String REPLACE_SUCCESS = "替换成功";
/**
* 操作成功
*/
public static final String OPERATE_SUCCESS = "操作成功";
/**
* 非投保退回状态,无法删除
*/
public static final String DELETE_ERROR = "非投保退回状态,无法删除";
/**
* 投保信息已存在
*/
public static final String DATA_IS_EXIST = "投保信息已存在";
/**
* 投保信息不存在
*/
public static final String DATA_IS_NOT_EXIST = "投保信息不存在";
/**
* 被替换信息不存在
*/
......
......@@ -30,12 +30,6 @@ public class TInsuranceDetail extends BaseEntity {
@Schema(description = "主键")
private String id;
/**
* 员工档案id
*/
@Schema(description = "员工档案id")
private String empId;
/**
* 员工姓名
*/
......@@ -229,10 +223,10 @@ public class TInsuranceDetail extends BaseEntity {
private Integer buyHandleStatus;
/**
* 结算办理状态 1待结算 2结算中 3已结算
* 默认结算信息id
*/
@Schema(description = "结算办理状态 1待结算 2结算中 3已结算")
private Integer settleHandleStatus;
@Schema(description = "默认结算信息id")
private Integer defaultSettleId;
/**
* 减员状态 1待减员 2减员中3减员退回
......
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 io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
/**
* @author licancan
* @description 投保详情VO
* @date 2022-07-20 19:23:17
*/
@Data
@Tag(name = "投保详情VO")
public class InsuranceDetailVO implements Serializable {
private static final long serialVersionUID = 628032758008497542L;
/**
* 员工姓名
*/
@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 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;
/**
* 保单生效日期
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@Schema(description = "保单生效日期")
private LocalDate policyEffect;
/**
* 保单编号
*/
@Schema(description = "保单编号")
private String policyNo;
/**
* 险种名称
*/
@Schema(description = "险种名称")
private String insuranceTypeName;
/**
* 购买标准
*/
@Schema(description = "购买标准")
private String buyStandard;
/**
* 医疗额度
*/
@Schema(description = "医疗额度")
private String medicalQuota;
/**
* 身故或残疾额度
*/
@Schema(description = "身故或残疾额度")
private String dieDisableQuota;
/**
* 保险公司名称
*/
@Schema(description = "保险公司名称")
private String insuranceCompanyName;
/**
* 费用类型
*/
@Schema(description = "费用类型 0、预估 1、实缴")
private Integer premiumType;
/**
* 预估保费
*/
@Schema(description = "预估保费")
private BigDecimal estimatePremium;
/**
* 实际保费
*/
@Schema(description = "实际保费")
private BigDecimal actualPremium;
/**
* 发票号
*/
@Schema(description = "发票号")
private String invoiceNo;
/**
* 结算类型 (0、与薪资结算 1、单独结算)
*/
@Schema(description = "结算类型 (0、与薪资结算 1、单独结算)")
private Integer settleType;
/**
* 结算月
*/
@Schema(description = "结算月")
private String settleMonth;
/**
* 投保办理状态 1待投保 2投保中 3已投保 4投保退回 5 已减员
*/
@Schema(description = "投保办理状态 1待投保 2投保中 3已投保 4投保退回 5 已减员")
private Integer buyHandleStatus;
/**
* 减员状态 1待减员 2减员中3减员退回
*/
@Schema(description = "减员状态 1待减员 2减员中3减员退回")
private Integer reduceHandleStatus;
/**
* 结算办理状态 1待结算 2结算中 3已结算
*/
@Schema(description = "结算办理状态 1待结算 2结算中 3已结算")
private Integer settleHandleStatus;
/**
* 是否出险 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;
/**
* 商险购买地省
*/
@Schema(description = "商险购买地省")
private String insuranceProvinceName;
/**
* 商险购买地市
*/
@Schema(description = "商险购买地市")
private String insuranceCityName;
/**
* 商险办理省
*/
@Schema(description = "商险办理省")
private String insuranceHandleProvinceName;
/**
* 商险办理城市
*/
@Schema(description = "商险办理城市")
private String insuranceHandleCityName;
/**
* 创建人姓名
*/
@Schema(description = "创建人(派单人)")
private String createName;
/**
* 创建时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@Schema(description = "创建时间")
private LocalDateTime createTime;
}
......@@ -11,11 +11,9 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpHeaders;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.validation.Valid;
......@@ -104,6 +102,33 @@ public class TInsuranceDetailController {
return tInsuranceDetailService.replaceInsurance(paramList);
}
/**
* 通过id删除
*
* @author licancan
* @param id
* @return {@link R<String>}
*/
@GetMapping("/deleteInsurance")
@Operation(summary = "通过id删除", description = "通过id删除")
//@PreAuthorize("@pms.hasPermission('temployeeinfo_del')")
public R<String> deleteInsurance(@RequestParam String id) {
return tInsuranceDetailService.deleteInsurance(id);
}
/**
* 通过id查询
*
* @author licancan
* @param id
* @return {@link R<InsuranceDetailVO>}
*/
@Operation(summary = "通过id查询", description = "通过id查询")
@GetMapping("/{id}")
public R<InsuranceDetailVO> getInsuranceDetailById(@PathVariable("id") String id) {
return R.ok(tInsuranceDetailService.getInsuranceDetailById(id));
}
/***********************减员办理********************************/
/**
* 导入减员校验
......
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceDetailVO;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListParam;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO;
import org.apache.ibatis.annotations.Mapper;
......@@ -38,5 +39,14 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
*/
List<InsuranceListVO> getInsuranceList(@Param("param") InsuranceListParam param);
/**
* 通过id查询
*
* @author licancan
* @param id
* @return {@link InsuranceDetailVO}
*/
InsuranceDetailVO getInsuranceDetailById(@Param("id") String id);
/***********************减员办理********************************/
}
......@@ -64,6 +64,24 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
*/
R<List<InsuranceReplaceParam>> replaceInsurance(List<InsuranceReplaceParam> paramList);
/**
* 通过id删除
*
* @author licancan
* @param id
* @return {@link R<String>}
*/
R<String> deleteInsurance(String id);
/**
* 通过id查询
*
* @author licancan
* @param id
* @return {@link InsuranceDetailVO}
*/
InsuranceDetailVO getInsuranceDetailById(String id);
/***********************减员办理********************************/
/**
* 减员导入校验
......@@ -73,4 +91,5 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* @return {@link R}
*/
R checkInsuranceRefundList(List<InsuranceRefundCheck> insuranceRefundCheckList);
}
......@@ -275,6 +275,40 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return R.ok(listResult,InsurancesConstants.REPLACE_SUCCESS);
}
/**
* 通过id删除
*
* @param id
* @return {@link R<String>}
* @author licancan
*/
@Override
public R<String> deleteInsurance(String id) {
TInsuranceDetail byId = this.getById(id);
if (null == byId){
return R.failed(InsurancesConstants.DATA_IS_NOT_EXIST);
}
if (byId.getBuyHandleStatus() != CommonConstants.FOUR_INT){
return R.failed(InsurancesConstants.DELETE_ERROR);
}
byId.setDeleteFlag(CommonConstants.ONE_INT);
this.updateById(byId);
return R.ok(InsurancesConstants.OPERATE_SUCCESS);
}
/**
* 通过id查询
*
* @param id
* @return {@link InsuranceDetailVO}
* @author licancan
*/
@Override
public InsuranceDetailVO getInsuranceDetailById(String id) {
InsuranceDetailVO insuranceDetailVO = this.baseMapper.getInsuranceDetailById(id);
return insuranceDetailVO;
}
/**
* 商险新增校验
*
......
......@@ -6,7 +6,6 @@
<resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail">
<id property="id" column="ID" jdbcType="VARCHAR"/>
<result property="empId" column="EMP_ID" jdbcType="VARCHAR"/>
<result property="empName" column="EMP_NAME" jdbcType="VARCHAR"/>
<result property="empIdcardNo" column="EMP_IDCARD_NO" jdbcType="VARCHAR"/>
<result property="orderNo" column="ORDER_NO" jdbcType="VARCHAR"/>
......@@ -39,7 +38,7 @@
<result property="estimatePremium" column="ESTIMATE_PREMIUM" jdbcType="DECIMAL"/>
<result property="settleBalance" column="SETTLE_BALANCE" jdbcType="DECIMAL"/>
<result property="buyHandleStatus" column="BUY_HANDLE_STATUS" jdbcType="TINYINT"/>
<result property="settleHandleStatus" column="SETTLE_HANDLE_STATUS" jdbcType="TINYINT"/>
<result property="defaultSettleId" column="DEFAULT_SETTLE_ID" jdbcType="VARCHAR"/>
<result property="reduceHandleStatus" column="REDUCE_HANDLE_STATUS" jdbcType="TINYINT"/>
<result property="isUse" column="IS_USE" jdbcType="TINYINT"/>
<result property="isEffect" column="IS_EFFECT" jdbcType="TINYINT"/>
......@@ -54,7 +53,7 @@
</resultMap>
<sql id="Base_Column_List">
ID,EMP_ID,EMP_NAME,
ID,EMP_NAME,
EMP_IDCARD_NO,ORDER_NO,DEPT_NO,POST,INSURANCE_COMPANY_NAME,INSURANCE_TYPE_NAME,
INSURANCE_TYPE_ID,BUY_STANDARD,MEDICAL_QUOTA,DIE_DISABLE_QUOTA,POLICY_NO,
POLICY_START,POLICY_END,POLICY_EFFECT,
......@@ -62,7 +61,7 @@
BUY_TYPE,INSURANCE_PROVINCE,INSURANCE_PROVINCE_NAME,INSURANCE_CITY,INSURANCE_CITY_NAME,
INSURANCE_HANDLE_PROVINCE,INSURANCE_HANDLE_PROVINCE_NAME,INSURANCE_HANDLE_CITY,INSURANCE_HANDLE_CITY_NAME,SETTLE_TYPE,
ACTUAL_PREMIUM,ESTIMATE_PREMIUM,SETTLE_BALANCE,
BUY_HANDLE_STATUS,SETTLE_HANDLE_STATUS,REDUCE_HANDLE_STATUS,
BUY_HANDLE_STATUS,DEFAULT_SETTLE_ID,REDUCE_HANDLE_STATUS,
IS_USE,IS_EFFECT,IS_OVERDUE,REMARK,
CREATE_BY,CREATE_NAME,CREATE_TIME,
UPDATE_BY,UPDATE_TIME,DELETE_FLAG
......@@ -140,4 +139,43 @@
</if>
ORDER BY detail.CREATE_TIME DESC
</select>
<select id="getInsuranceDetailById" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceDetailVO">
select
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.POLICY_NO as policyNo,
detail.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.BUY_STANDARD as buyStandard,
detail.MEDICAL_QUOTA as medicalQuota,
detail.DIE_DISABLE_QUOTA as dieDisableQuota,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.SETTLE_TYPE as premiumType,
detail.ESTIMATE_PREMIUM as estimatePremium,
detail.ACTUAL_PREMIUM as actualPremium,
detail.INVOICE_NO as invoiceNo,
detail.SETTLE_TYPE as settleType,
detail.SETTLE_MONTH as settleMonth,
detail.BUY_HANDLE_STATUS as buyHandleStatus,
detail.REDUCE_HANDLE_STATUS as reduceHandleStatus,
tis.SETTLE_HANDLE_STATUS as settleHandleStatus,
detail.IS_USE as isUse,
detail.IS_EFFECT as isEffect,
detail.IS_OVERDUE as isOverdue,
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.CREATE_NAME as createName,
detail.CREATE_TIME as createTime
from t_insurance_detail detail
left join t_insurance_settle tis on detail.DEFAULT_SETTLE_ID = tis.ID
where detail.ID = #{id}
</select>
</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