Commit 8175fc15 authored by 李灿灿's avatar 李灿灿

Merge branch 'feature-licancan' into 'develop'

商险替换接口

See merge request fangxinjiang/yifu!13
parents 1770a94c 8137b7ef
......@@ -226,6 +226,8 @@ public interface CommonConstants {
char ADD_CHAR = '+';
//int 4
int FOUR_INT = 4;
//int 5
int FIVE_INT = 5;
String TEN_STRING = "10";
public static final String SPOT = ".";
......
......@@ -11,10 +11,30 @@ public class InsurancesConstants {
* 新增投保成功
*/
public static final String ADD_SUCCESS = "新增投保成功";
/**
* 批增投保成功
*/
public static final String BATCH_SUCCESS = "批增投保成功";
/**
* 替换成功
*/
public static final String REPLACE_SUCCESS = "替换成功";
/**
* 投保信息已存在
*/
public static final String DATA_IS_EXIST = "投保信息已存在";
/**
* 被替换信息不存在
*/
public static final String REPLACE_IS_NOT_EXIST = "被替换信息不存在";
/**
* 替换者信息已存在
*/
public static final String REPLACE_IS_EXIST = "替换者信息已存在";
/**
* 无效、已过期、已出险、已减员的 不能替换
*/
public static final String REPLACE_IS_NOT_ALLOW = "无效、已过期、已出险、已减员的 不能替换";
/**
* 订单编号不能为空
*/
......@@ -23,18 +43,34 @@ public class InsurancesConstants {
* 员工姓名不能为空
*/
public static final String EMP_NAME_NOT_EMPTY = "员工姓名不能为空";
/**
* 替换员工姓名不能为空
*/
public static final String REPLACE_EMP_NAME_NOT_EMPTY = "替换员工姓名不能为空";
/**
* 员工身份证号不能为空
*/
public static final String EMP_IDCARD_NO_NOT_EMPTY = "员工身份证号不能为空";
/**
* 替换员工身份证号不能为空
*/
public static final String REPLACE_EMP_IDCARD_NO_NOT_EMPTY = "替换员工身份证号不能为空";
/**
* 员工身份证号格式有误
*/
public static final String EMP_IDCARD_NO_NOT_LEGITIMATE = "员工身份证号格式有误";
/**
* 替换员工身份证号格式有误
*/
public static final String REPLACE_EMP_IDCARD_NO_NOT_LEGITIMATE = "替换员工身份证号格式有误";
/**
* 项目编码不能为空
*/
public static final String DEPT_NO_NOT_EMPTY = "项目编码不能为空";
/**
* 替换项目编码不能为空
*/
public static final String REPLACE_DEPT_NO_NOT_EMPTY = "替换项目编码不能为空";
/**
* 保险公司名称不能为空
*/
......
package com.yifu.cloud.plus.v1.yifu.insurances.entity;
import com.baomidou.mybatisplus.annotation.*;
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.time.LocalDateTime;
/**
* @author licancan
* @description 商险替换表 t_insurance_replace
* @date 2022-07-20 14:20:16
*/
@Data
@TableName("t_insurance_replace")
@Tag(name = "商险替换表")
public class TInsuranceReplace implements Serializable {
private static final long serialVersionUID = -8528017421473755436L;
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键")
private String id;
/**
* 被替换人明细id
*/
@Schema(description = "被替换人明细id")
private String fromInsuranceDetailId;
/**
* 替换人明细ID
*/
@Schema(description = "替换人明细ID")
private String toInsuranceDetailId;
/**
* 原始明细id
*/
@Schema(description = "原始明细id")
private String originInsuranceDetailId;
/**
* 0失败 1成功
*/
@Schema(description = "0失败 1成功")
private Integer replaceStatus;
/**
* 替换成功时间
*/
@Schema(description = "替换成功时间")
private LocalDateTime replaceTime;
/**
* 创建人
*/
@Schema(description = "创建人")
private String createBy;
/**
* 创建人姓名
*/
@Schema(description = "创建人-姓名")
private String createName;
/**
* 创建时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@Schema(description = "创建时间")
@TableField(fill = FieldFill.INSERT)
private LocalDateTime createTime;
}
\ No newline at end of file
......@@ -112,6 +112,7 @@ public class InsuranceAddParam implements Serializable {
/**
* 错误信息
*/
@Schema(description = "错误信息")
private String errorMessage;
/***********************************以下字段由系统算出,前端不用传,是为了方便入库***********************************/
......
......@@ -108,6 +108,7 @@ public class InsuranceBatchParam implements Serializable {
/**
* 错误信息
*/
@Schema(description = "错误信息")
private String errorMessage;
/***********************************以下字段由系统算出,前端不用传,是为了方便入库***********************************/
......
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;
import java.time.LocalDate;
/**
* @author licancan
* @description 商险办理替换入参
* @date 2022-07-20 08:43:31
*/
@Data
@Tag(name = "商险办理替换入参")
public class InsuranceReplaceParam 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 replaceEmpName;
/**
* 替换员工身份证号
*/
@Schema(description = "替换员工身份证号")
private String replaceEmpIdcardNo;
/**
* 替换员工项目编码
*/
@Schema(description = "替换员工项目编码")
private String replaceDeptNo;
/**
* 订单编号
*/
@Schema(description = "订单编号")
private String orderNo;
/**
* 岗位
*/
@Schema(description = "岗位")
private String post;
/**
* 错误信息
*/
@Schema(description = "错误信息")
private String errorMessage;
}
package com.yifu.cloud.plus.v1.yifu.insurances.controller;
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.insurances.entity.InsuranceRefundCheck;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceDetailService;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceAddParam;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceBatchParam;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceReplaceParam;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
......@@ -13,8 +13,6 @@ import org.springframework.http.HttpHeaders;
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.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
......@@ -22,7 +20,6 @@ import javax.annotation.Resource;
import javax.validation.Valid;
import javax.validation.constraints.Size;
import java.util.List;
import java.util.List;
/**
* @author licancan
......@@ -64,6 +61,18 @@ public class TInsuranceDetailController {
return tInsuranceDetailService.batchInsurance(paramList);
}
/**
* 商险替换
*
* @author licancan
* @param paramList
* @return {@link R<List<InsuranceReplaceParam>>}
*/
@PostMapping("/replaceInsurance")
public R<List<InsuranceReplaceParam>> replaceInsurance(@RequestBody @Valid @Size(min = 1,message = "集合不能为空") List<InsuranceReplaceParam> paramList){
return tInsuranceDetailService.replaceInsurance(paramList);
}
/***********************减员办理********************************/
/**
......
package com.yifu.cloud.plus.v1.yifu.insurances.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceReplace;
import org.apache.ibatis.annotations.Mapper;
/**
* @author licancan
* @description 针对表【t_insurance_replace(商险替换表)】的数据库操作Mapper
* @date 2022-07-20 14:20:16
*/
@Mapper
public interface TInsuranceReplaceMapper extends BaseMapper<TInsuranceReplace> {
}
......@@ -3,13 +3,11 @@ package com.yifu.cloud.plus.v1.yifu.insurances.service;
import com.baomidou.mybatisplus.extension.service.IService;
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.insurances.entity.InsuranceRefundCheck;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceAddParam;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceBatchParam;
import java.util.List;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceReplaceParam;
import java.util.List;
......@@ -38,6 +36,14 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* @return {@link R<List<InsuranceBatchParam>>}
*/
R<List<InsuranceBatchParam>> batchInsurance(List<InsuranceBatchParam> paramList);
/**
* 商险替换
*
* @author licancan
* @param paramList
* @return {@link R<List<InsuranceReplaceParam>>}
*/
R<List<InsuranceReplaceParam>> replaceInsurance(List<InsuranceReplaceParam> paramList);
/***********************减员办理********************************/
/**
......@@ -48,4 +54,5 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* @return {@link R}
*/
R checkInsuranceRefundList(List<InsuranceRefundCheck> insuranceRefundCheckList);
}
package com.yifu.cloud.plus.v1.yifu.insurances.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceReplace;
/**
* @author licancan
* @description 针对表【t_insurance_replace(商险替换表)】的数据库操作Service
* @date 2022-07-20 14:20:16
*/
public interface TInsuranceReplaceService extends IService<TInsuranceReplace> {
}
package com.yifu.cloud.plus.v1.yifu.insurances.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceReplace;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceReplaceMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceReplaceService;
import org.springframework.stereotype.Service;
/**
* @author licancan
* @description 针对表【t_insurance_replace(商险替换表)】的数据库操作Service实现
* @date 2022-07-20 14:20:16
*/
@Service
public class TInsuranceReplaceServiceImpl extends ServiceImpl<TInsuranceReplaceMapper, TInsuranceReplace> implements TInsuranceReplaceService {
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceReplaceMapper">
<resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceReplace">
<id property="id" column="ID" jdbcType="VARCHAR"/>
<result property="fromInsuranceDetailId" column="FROM_INSURANCE_DETAIL_ID" jdbcType="VARCHAR"/>
<result property="toInsuranceDetailId" column="TO_INSURANCE_DETAIL_ID" jdbcType="VARCHAR"/>
<result property="originInsuranceDetailId" column="ORIGIN_INSURANCE_DETAIL_ID" jdbcType="VARCHAR"/>
<result property="replaceStatus" column="REPLACE_STATUS" jdbcType="TINYINT"/>
<result property="replaceTime" column="REPLACE_TIME" jdbcType="TIMESTAMP"/>
<result property="createBy" column="CREATE_BY" jdbcType="VARCHAR"/>
<result property="createName" column="CREATE_NAME" jdbcType="VARCHAR"/>
<result property="createTime" column="CREATE_TIME" jdbcType="TIMESTAMP"/>
</resultMap>
<sql id="Base_Column_List">
ID,FROM_INSURANCE_DETAIL_ID,TO_INSURANCE_DETAIL_ID,
ORIGIN_INSURANCE_DETAIL_ID,REPLACE_STATUS,REPLACE_TIME,
CREATE_BY,CREATE_NAME,CREATE_TIME
</sql>
</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