Commit 757ab2bb authored by 李灿灿's avatar 李灿灿

Merge branch 'feature-licancan' into 'develop'

Feature licancan

See merge request fangxinjiang/yifu!16
parents 57f9fff6 a1ec12fc
...@@ -19,10 +19,22 @@ public class InsurancesConstants { ...@@ -19,10 +19,22 @@ public class InsurancesConstants {
* 替换成功 * 替换成功
*/ */
public static final String REPLACE_SUCCESS = "替换成功"; 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_EXIST = "投保信息已存在";
/**
* 投保信息不存在
*/
public static final String DATA_IS_NOT_EXIST = "投保信息不存在";
/** /**
* 被替换信息不存在 * 被替换信息不存在
*/ */
......
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; ...@@ -11,11 +11,9 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpHeaders; import org.springframework.http.HttpHeaders;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.validation.Valid; import javax.validation.Valid;
...@@ -104,6 +102,33 @@ public class TInsuranceDetailController { ...@@ -104,6 +102,33 @@ public class TInsuranceDetailController {
return tInsuranceDetailService.replaceInsurance(paramList); 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; ...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 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.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.InsuranceListParam;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO; import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
...@@ -38,5 +39,14 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> { ...@@ -38,5 +39,14 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
*/ */
List<InsuranceListVO> getInsuranceList(@Param("param") InsuranceListParam param); 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> { ...@@ -64,6 +64,24 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
*/ */
R<List<InsuranceReplaceParam>> replaceInsurance(List<InsuranceReplaceParam> paramList); 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> { ...@@ -73,4 +91,5 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* @return {@link R} * @return {@link R}
*/ */
R checkInsuranceRefundList(List<InsuranceRefundCheck> insuranceRefundCheckList); R checkInsuranceRefundList(List<InsuranceRefundCheck> insuranceRefundCheckList);
} }
...@@ -275,6 +275,40 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -275,6 +275,40 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return R.ok(listResult,InsurancesConstants.REPLACE_SUCCESS); 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;
}
/** /**
* 商险新增校验 * 商险新增校验
* *
......
...@@ -140,4 +140,42 @@ ...@@ -140,4 +140,42 @@
</if> </if>
ORDER BY detail.CREATE_TIME DESC ORDER BY detail.CREATE_TIME DESC
</select> </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,
detail.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
where detail.ID = #{id}
</select>
</mapper> </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