Commit 4670c7a4 authored by 张云's avatar 张云 🎱

Merge branch 'feature/insurance-1.3.0' into 'develop'

Feature/insurance 1.3.0

See merge request !316
parents aa78ac12 55328c19
...@@ -22,5 +22,9 @@ public class TSettleDomainListVo { ...@@ -22,5 +22,9 @@ public class TSettleDomainListVo {
* 合同主体IDS * 合同主体IDS
*/ */
private List<String> deptIds; private List<String> deptIds;
/**
* 合同主体项目编码
*/
private List<String> deptNos;
} }
...@@ -156,6 +156,7 @@ public class TSettleDomainController { ...@@ -156,6 +156,7 @@ public class TSettleDomainController {
public TSettleDomainListVo getSettleDomainIdsByUserId(@RequestBody String userId) { public TSettleDomainListVo getSettleDomainIdsByUserId(@RequestBody String userId) {
TSettleDomainListVo vo = new TSettleDomainListVo(); TSettleDomainListVo vo = new TSettleDomainListVo();
vo.setDeptIds(tSettleDomainService.getSettleDomainIdsByUserId(userId)); vo.setDeptIds(tSettleDomainService.getSettleDomainIdsByUserId(userId));
vo.setDeptNos(tSettleDomainService.getSettleDomainNosByUserId(userId));
return vo; return vo;
} }
......
...@@ -76,6 +76,11 @@ public interface TSettleDomainService extends IService<TSettleDomain> { ...@@ -76,6 +76,11 @@ public interface TSettleDomainService extends IService<TSettleDomain> {
List<String> getSettleDomainIdsByUserId(String id); List<String> getSettleDomainIdsByUserId(String id);
/**
* 获取用户所拥有的项目编码
*/
List<String> getSettleDomainNosByUserId(String id);
SetInfoVo getSetInfoByCodes(List<String> codes); SetInfoVo getSetInfoByCodes(List<String> codes);
TSettleDomainListVo getSettleInfoByCodes(List<String> codes); TSettleDomainListVo getSettleInfoByCodes(List<String> codes);
......
...@@ -117,6 +117,28 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T ...@@ -117,6 +117,28 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
return domainIds; return domainIds;
} }
/**
* 获取用户所拥有的项目编码
*
* @param userId 用户id
*/
@Override
public List<String> getSettleDomainNosByUserId(String userId) {
List<String> domainNos = new ArrayList<>();
String userKey = CacheConstants.WXHR_SETTLE_DOMAIN_NOS_BY_USERID + "_" + userId;
Object settleDomainVoR = redisUtil.get(userKey);
if (settleDomainVoR != null) {
return (List<String>) settleDomainVoR;
} else {
List<TCutsomerDataPermisson> permissonList = permissonMapper.selectAllSettleDomainPermissionByUserId(userId);
if (Common.isNotNull(permissonList)) {
domainNos = permissonList.stream().map(TCutsomerDataPermisson::getSettleDomainNo).collect(Collectors.toList());
redisUtil.set(userKey, domainNos);
}
}
return domainNos;
}
/** /**
* @param settleDomainSelectVo * @param settleDomainSelectVo
* @Author: wangan * @Author: wangan
......
...@@ -131,5 +131,9 @@ public interface CacheConstants { ...@@ -131,5 +131,9 @@ public interface CacheConstants {
* 用户登录的项目vo缓存 * 用户登录的项目vo缓存
*/ */
public static final String WXHR_SETTLE_DOMAIN_VOS_BY_USERID = ServiceNameConstants.ARCHIVES_SERVICE + "_SettleDomainVosByUserId"; public static final String WXHR_SETTLE_DOMAIN_VOS_BY_USERID = ServiceNameConstants.ARCHIVES_SERVICE + "_SettleDomainVosByUserId";
/**
* 缓存用户所拥有的项目编码
*/
public static final String WXHR_SETTLE_DOMAIN_NOS_BY_USERID = ServiceNameConstants.ARCHIVES_SERVICE + "_SettleDomainNosByUserId";
} }
...@@ -26,5 +26,19 @@ public class EkpInsuranceProperties { ...@@ -26,5 +26,19 @@ public class EkpInsuranceProperties {
String insuranceLoginName; String insuranceLoginName;
String insuranceFocSubject; String insuranceDocSubject;
/**
* ekp修改接口描述
*/
String insuranceUpdateDocSubject;
/**
* ekp修改FdModelId
*/
String insuranceUpdateFdModelId;
/**
* ekp修改FdFlowId
*/
String insuranceUpdateFdFlowId;
} }
...@@ -3,8 +3,10 @@ package com.yifu.cloud.plus.v1.yifu.ekp.util; ...@@ -3,8 +3,10 @@ package com.yifu.cloud.plus.v1.yifu.ekp.util;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
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.ekp.config.EkpInsuranceProperties; import com.yifu.cloud.plus.v1.yifu.ekp.config.EkpInsuranceProperties;
import com.yifu.cloud.plus.v1.yifu.ekp.constant.EkpConstants;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EKPInsurancePushParam; import com.yifu.cloud.plus.v1.yifu.ekp.vo.EKPInsurancePushParam;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpInteractiveParam; import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpInteractiveParam;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpUpdateParam;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.TInsuranceSettlePushParam; import com.yifu.cloud.plus.v1.yifu.insurances.vo.TInsuranceSettlePushParam;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
...@@ -44,7 +46,7 @@ public class EkpInsuranceUtil { ...@@ -44,7 +46,7 @@ public class EkpInsuranceUtil {
//指向EKP的接口url //指向EKP的接口url
//把ModelingAppModelParameterAddForm转换成MultiValueMap //把ModelingAppModelParameterAddForm转换成MultiValueMap
MultiValueMap<String,Object> wholeForm = new LinkedMultiValueMap<>(); MultiValueMap<String,Object> wholeForm = new LinkedMultiValueMap<>();
wholeForm.add("docSubject",ekpInsuranceProperties.getInsuranceFocSubject()); wholeForm.add("docSubject",ekpInsuranceProperties.getInsuranceDocSubject());
wholeForm.add("docCreator", "{\"LoginName\":\"admin\"}"); wholeForm.add("docCreator", "{\"LoginName\":\"admin\"}");
wholeForm.add("docStatus", ekpInsuranceProperties.getInsuranceDocStatus()); wholeForm.add("docStatus", ekpInsuranceProperties.getInsuranceDocStatus());
wholeForm.add("fdModelId", ekpInsuranceProperties.getInsuranceFdModelId()); wholeForm.add("fdModelId", ekpInsuranceProperties.getInsuranceFdModelId());
...@@ -73,6 +75,50 @@ public class EkpInsuranceUtil { ...@@ -73,6 +75,50 @@ public class EkpInsuranceUtil {
} }
} }
/**
* 商险修改信息推送ekp
*
* @author licancan
* @param param
* @return {@link String}
*/
public String sendUpdateToEkp(EkpUpdateParam param){
log.info("推送EKP开始--商险修改");
RestTemplate yourRestTemplate = new RestTemplate();
try{
String formValues = new ObjectMapper().writeValueAsString(param);
//指向EKP的接口url
//把ModelingAppModelParameterAddForm转换成MultiValueMap
MultiValueMap<String,Object> wholeForm = new LinkedMultiValueMap<>();
wholeForm.add("docSubject",ekpInsuranceProperties.getInsuranceUpdateDocSubject());
wholeForm.add("docCreator", "{\"LoginName\":\"admin\"}");
wholeForm.add("docStatus", ekpInsuranceProperties.getInsuranceDocStatus());
wholeForm.add("fdModelId", ekpInsuranceProperties.getInsuranceUpdateFdModelId());
wholeForm.add("fdFlowId", ekpInsuranceProperties.getInsuranceUpdateFdFlowId());
wholeForm.add("formValues", formValues);
log.info("wholeForm:" + wholeForm);
HttpHeaders headers = new HttpHeaders();
//如果EKP对该接口启用了Basic认证,那么客户端需要加入
//addAuth(headers,"yourAccount"+":"+"yourPassword");是VO,则使用APPLICATION_JSON
headers.setContentType(MediaType.MULTIPART_FORM_DATA);
//必须设置上传类型,如果入参是字符串,使用MediaType.TEXT_PLAIN;如果
HttpEntity<MultiValueMap<String,Object>> entity = new HttpEntity<MultiValueMap<String,Object>>(wholeForm,headers);
//有返回值的情况 VO可以替换成具体的JavaBean
ResponseEntity<String> obj = yourRestTemplate.exchange(ekpInsuranceProperties.getInsuranceUrl(), HttpMethod.POST, entity, String.class);
String body = obj.getBody();
if (StringUtils.isBlank(body)){
log.error(EkpConstants.SEND_FAILED);
return null;
}else{
log.info(EkpConstants.SEND_SUCCESS + body);
return body;
}
}catch (Exception e){
log.error(EkpConstants.SEND_FAILED +":", e);
return null;
}
}
/** /**
* 将类转换成EKP要求的格式 * 将类转换成EKP要求的格式
* *
......
...@@ -4,6 +4,10 @@ insurance.insuranceFdModelId=181d73279372e5a55438a47d7436ab7e ...@@ -4,6 +4,10 @@ insurance.insuranceFdModelId=181d73279372e5a55438a47d7436ab7e
insurance.insuranceFdFlowId=18267f206233f29cbd3c5ee425c9408a insurance.insuranceFdFlowId=18267f206233f29cbd3c5ee425c9408a
insurance.insuranceDocStatus=20 insurance.insuranceDocStatus=20
insurance.insuranceLoginName=admin insurance.insuranceLoginName=admin
insurance.insuranceFocSubject=\u85AA\u8D44\u8BA2\u5355\u660E\u7EC6\u6570\u636E\u63A5\u53E3 insurance.insuranceDocSubject=\u5546\u9669\u63a8\u9001\u0065\u006b\u0070\u63a5\u53e3
insurance.insuranceUpdateDocSubject=\u5546\u9669\u63a8\u9001\u0065\u006b\u0070\u4fee\u6539\u63a5\u53e3
insurance.insuranceUpdateFdModelId=1850416f69cc813f128474e478b83794
insurance.insuranceUpdateFdFlowId=185041a4d264c3892a0543e43be925eb
...@@ -6,6 +6,7 @@ import com.alibaba.excel.annotation.write.style.HeadFontStyle; ...@@ -6,6 +6,7 @@ import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.FieldFill; import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField; 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 io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
...@@ -66,6 +67,7 @@ public class BaseEntity implements Serializable { ...@@ -66,6 +67,7 @@ public class BaseEntity implements Serializable {
@Schema(description = "更新时间") @Schema(description = "更新时间")
@TableField(fill = FieldFill.INSERT_UPDATE) @TableField(fill = FieldFill.INSERT_UPDATE)
@ExcelIgnore @ExcelIgnore
@JsonIgnore
private LocalDateTime updateTime; private LocalDateTime updateTime;
/** /**
...@@ -73,6 +75,7 @@ public class BaseEntity implements Serializable { ...@@ -73,6 +75,7 @@ public class BaseEntity implements Serializable {
*/ */
@TableField(exist = false) @TableField(exist = false)
@ExcelIgnore @ExcelIgnore
@JsonIgnore
private String mId; private String mId;
/** /**
...@@ -80,6 +83,7 @@ public class BaseEntity implements Serializable { ...@@ -80,6 +83,7 @@ public class BaseEntity implements Serializable {
*/ */
@TableField(exist = false) @TableField(exist = false)
@ExcelIgnore @ExcelIgnore
@JsonIgnore
private String menuInfo; private String menuInfo;
/** /**
...@@ -87,6 +91,7 @@ public class BaseEntity implements Serializable { ...@@ -87,6 +91,7 @@ public class BaseEntity implements Serializable {
*/ */
@TableField(exist = false) @TableField(exist = false)
@ExcelIgnore @ExcelIgnore
@JsonIgnore
private String authSql; private String authSql;
} }
...@@ -7,6 +7,10 @@ package com.yifu.cloud.plus.v1.yifu.insurances.constants; ...@@ -7,6 +7,10 @@ package com.yifu.cloud.plus.v1.yifu.insurances.constants;
*/ */
public class InsurancesConstants { public class InsurancesConstants {
/**
* 主键不能为空
*/
public static final String ID_IS_EMPTY = "主键不能为空";
/** /**
* 新增 * 新增
*/ */
...@@ -15,6 +19,10 @@ public class InsurancesConstants { ...@@ -15,6 +19,10 @@ public class InsurancesConstants {
* 替换导出新增 * 替换导出新增
*/ */
public static final String INSERT = "新增"; public static final String INSERT = "新增";
/**
* 批增
*/
public static final String BATCH_INSERT = "批增";
/** /**
* 离职 * 离职
*/ */
...@@ -59,6 +67,14 @@ public class InsurancesConstants { ...@@ -59,6 +67,14 @@ public class InsurancesConstants {
* 登记保单保费 * 登记保单保费
*/ */
public static final String REGISTERED = "登记保单保费"; public static final String REGISTERED = "登记保单保费";
/**
* 登记发票号
*/
public static final String REGISTERED_INVOICE = "登记发票号";
/**
* 已投保信息修改
*/
public static final String UPDATE_INSURED = "已投保信息修改";
/** /**
* 新增投保成功 * 新增投保成功
*/ */
...@@ -92,6 +108,22 @@ public class InsurancesConstants { ...@@ -92,6 +108,22 @@ public class InsurancesConstants {
* 投保记录不存在 * 投保记录不存在
*/ */
public static final String DATA_IS_NOT_EXIST = "投保记录不存在"; public static final String DATA_IS_NOT_EXIST = "投保记录不存在";
/**
* 未找到符合条件的参保记录
*/
public static final String NOT_FOUND_INSURANCE_RECORD = "未找到符合条件的参保记录";
/**
* 未找到符合条件的新增或批增投保数据
*/
public static final String NOT_FOUND_INSERT_OR_BATCH_RECORD = "未找到符合条件的新增或批增投保数据";
/**
* 当前投保状态无法变更投保记录
*/
public static final String CURRENT_STATUS_NOT_CHANGE_INSURANCE_RECORD = "当前投保状态无法变更投保记录";
/**
* 当前投保状态无法登记发票号
*/
public static final String CURRENT_STATUS_NOT_REGISTER_INVOICE_NO = "当前投保状态无法登记发票号";
/** /**
* 结算信息不存在 * 结算信息不存在
*/ */
...@@ -125,6 +157,10 @@ public class InsurancesConstants { ...@@ -125,6 +157,10 @@ public class InsurancesConstants {
* 替换员工投保记录已存在 * 替换员工投保记录已存在
*/ */
public static final String REPLACE_IS_EXIST = "替换员工投保记录已存在"; public static final String REPLACE_IS_EXIST = "替换员工投保记录已存在";
/**
* 替换投保不允许变更投保类型
*/
public static final String REPLACE_NOT_ALLOW = "替换投保不允许变更投保类型";
/** /**
* 当前记录是待投保,无法替换 * 当前记录是待投保,无法替换
*/ */
...@@ -253,6 +289,14 @@ public class InsurancesConstants { ...@@ -253,6 +289,14 @@ public class InsurancesConstants {
* 保单开始时间格式错误 * 保单开始时间格式错误
*/ */
public static final String POLICY_START_PARSE_ERROR = "保单开始时间格式错误"; public static final String POLICY_START_PARSE_ERROR = "保单开始时间格式错误";
/**
* 变更后保单开始时间格式错误
*/
public static final String POLICY_START_NEW_PARSE_ERROR = "变更后保单开始时间格式错误";
/**
* 变更后保单结束时间格式错误
*/
public static final String POLICY_END_NEW_PARSE_ERROR = "变更后保单结束时间格式错误";
/** /**
* 保单开始时间需要大于派单日期 * 保单开始时间需要大于派单日期
*/ */
...@@ -261,6 +305,10 @@ public class InsurancesConstants { ...@@ -261,6 +305,10 @@ public class InsurancesConstants {
* 保单结束时间需要大于保单开始时间 * 保单结束时间需要大于保单开始时间
*/ */
public static final String POLICY_START_SHOULD_LESS_THAN_POLICY_END = "保单结束时间需要大于保单开始时间"; public static final String POLICY_START_SHOULD_LESS_THAN_POLICY_END = "保单结束时间需要大于保单开始时间";
/**
* 变更后的保单开始时间需早于保单结束时间
*/
public static final String POLICY_START_NEW_SHOULD_LESS_THAN_POLICY_END_NEW = "变更后的保单开始时间需早于保单结束时间";
/** /**
* 保单起止时间不能超过365天 * 保单起止时间不能超过365天
*/ */
...@@ -273,10 +321,18 @@ public class InsurancesConstants { ...@@ -273,10 +321,18 @@ public class InsurancesConstants {
* 保单结束时间格式错误 * 保单结束时间格式错误
*/ */
public static final String POLICY_END_PARSE_ERROR = "保单结束时间格式错误"; public static final String POLICY_END_PARSE_ERROR = "保单结束时间格式错误";
/**
* 保单结束时间需要大于派单日期
*/
public static final String POLICY_END_SHOULD_IS_FUTURE = "保单结束时间需要大于派单日期";
/** /**
* 购买标准不能为空 * 购买标准不能为空
*/ */
public static final String BUY_STANDARD_NOT_EMPTY = "购买标准不能为空"; public static final String BUY_STANDARD_NOT_EMPTY = "购买标准不能为空";
/**
* 变更后保单开始时间、变更后保单结束时间、变更后投保类型三个字段至少填写一个
*/
public static final String CHOOSE_ONE_OF_THREE = "变更后保单开始时间、变更后保单结束时间、变更后投保类型三个字段至少填写一个";
/** /**
* 购买标准不存在 * 购买标准不存在
*/ */
...@@ -345,6 +401,18 @@ public class InsurancesConstants { ...@@ -345,6 +401,18 @@ public class InsurancesConstants {
* 保单号长度超过50字符限制 * 保单号长度超过50字符限制
*/ */
public static final String POLICY_NO_MORE_THAN_50 = "保单号长度超过50字符限制"; public static final String POLICY_NO_MORE_THAN_50 = "保单号长度超过50字符限制";
/**
* 发票号不能为空
*/
public static final String INVOICE_NO_EMPTY = "发票号不能为空";
/**
* 变更原因不能为空
*/
public static final String REASON_EMPTY = "变更原因不能为空";
/**
* 变更原因超过50字符限制
*/
public static final String REASON_MORE_THAN_50 = "变更原因超过50字符限制";
/** /**
* 发票号长度超过50字符限制 * 发票号长度超过50字符限制
*/ */
...@@ -361,6 +429,10 @@ public class InsurancesConstants { ...@@ -361,6 +429,10 @@ public class InsurancesConstants {
* 替换类型无法登记保单保费 * 替换类型无法登记保单保费
*/ */
public static final String BUY_TYPE_FOUR_NOT_REGISTERED= "替换类型无法登记保单保费"; public static final String BUY_TYPE_FOUR_NOT_REGISTERED= "替换类型无法登记保单保费";
/**
* 变更后投保类型只能填写新增、批增
*/
public static final String BUY_TYPE_ERROR_NEW = "变更后投保类型只能填写新增、批增";
/** /**
* 商险待投保,无法登记保单保费 * 商险待投保,无法登记保单保费
*/ */
...@@ -389,6 +461,10 @@ public class InsurancesConstants { ...@@ -389,6 +461,10 @@ public class InsurancesConstants {
* 保单号不存在或已过期 * 保单号不存在或已过期
*/ */
public static final String POLICY_NO_EXIST = "保单号不存在或已过期"; public static final String POLICY_NO_EXIST = "保单号不存在或已过期";
/**
* 保单已禁用
*/
public static final String POLICY_NO_FORBIDDEN = "保单已禁用";
/** /**
* 保单号不存在 * 保单号不存在
*/ */
...@@ -601,6 +677,31 @@ public class InsurancesConstants { ...@@ -601,6 +677,31 @@ public class InsurancesConstants {
public static final String DEPT_NO_CHANGE_OLD_IS_NOT_EXIST = "被替换的项目不存在"; public static final String DEPT_NO_CHANGE_OLD_IS_NOT_EXIST = "被替换的项目不存在";
/**
* 保险公司不能为空
*/
public static final String REFUND_INSURANCE_COMPANY_NOT_EMPTY = "保险公司不能为空";
/**
* 险种不能为空
*/
public static final String REFUND_INSURANCE_TYPE_NOT_EMPTY = "险种不能为空";
/**
* 保单开始日期不能为空
*/
public static final String REFUND_INSURANCE_START_DATE_NOT_EMPTY = "保单开始日期不能为空";
/**
* 保单结束日期不能为空
*/
public static final String REFUND_INSURANCE_END_DATE_NOT_EMPTY = "保单结束日期不能为空";
/**
* 购买标准不能为空
*/
public static final String REFUND_BUY_STANDARD_NOT_EMPTY = "购买标准不能为空";
/** /**
* 退费金额不能为空 * 退费金额不能为空
*/ */
...@@ -614,7 +715,7 @@ public class InsurancesConstants { ...@@ -614,7 +715,7 @@ public class InsurancesConstants {
/** /**
* 员工减员记录不存在 * 员工减员记录不存在
*/ */
public static final String REFUND_IS_NULL = "员工减员记录不存在"; public static final String REFUND_IS_NULL = "未找到“减员成功”的参保信息";
/** /**
* 已更新保单减员退费,不能再次更新 * 已更新保单减员退费,不能再次更新
...@@ -880,6 +981,10 @@ public class InsurancesConstants { ...@@ -880,6 +981,10 @@ public class InsurancesConstants {
* 当前为已投保状态,不可办理 * 当前为已投保状态,不可办理
*/ */
public static final String BUY_HANDLE_STATUS_THREE_HANDLE_ERROR = "当前为已投保状态,不可办理"; public static final String BUY_HANDLE_STATUS_THREE_HANDLE_ERROR = "当前为已投保状态,不可办理";
/**
* 当前不是已投保状态
*/
public static final String BUY_HANDLE_STATUS_NOT_THREE = "当前不是已投保状态";
/** /**
* 当前为投保退回状态,不可办理 * 当前为投保退回状态,不可办理
*/ */
...@@ -1100,6 +1205,13 @@ public class InsurancesConstants { ...@@ -1100,6 +1205,13 @@ public class InsurancesConstants {
*/ */
public static final String SETTLE_ID_ATYPISM = "结算id不一致"; public static final String SETTLE_ID_ATYPISM = "结算id不一致";
/**
* 登记退保费用
*/
public static final String REGISTERED_SURRENDER_EXPENSE = "登记退保费用";
/** /**
* 获取项目信息失败 * 获取项目信息失败
*/ */
...@@ -1162,5 +1274,14 @@ public class InsurancesConstants { ...@@ -1162,5 +1274,14 @@ public class InsurancesConstants {
*/ */
public static final String EKP_SEND_ERROR = "存在与ekp系统交互异常,请联系管理员处理后再操作"; public static final String EKP_SEND_ERROR = "存在与ekp系统交互异常,请联系管理员处理后再操作";
/**
* 当前登录人无任何商险办理地的操作权限
*/
public static final String NO_PERMISSION = "当前登录人无任何商险办理地的操作权限";
/**
* 该记录的商险办理地为空
*/
public static final String HANDLE_PROVINCE_IS_NULL = "该记录的商险办理地为空";
} }
package com.yifu.cloud.plus.v1.yifu.insurances.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
/**
* @author licancan
* @description 业务操作记录表 t_business_operate
* @date 2022-12-08 10:20:16
*/
@TableName(value ="t_business_operate")
@Data
@Schema(description = "业务操作记录表")
public class TBusinessOperate extends BaseEntity {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键")
private String id;
/**
* 业务表id
*/
@Schema(description = "业务表id")
private String businessId;
/**
* 原来的信息
*/
@Schema(description = "原来的信息")
private String oldInfo;
/**
* 新的信息
*/
@Schema(description = "新的信息")
private String newInfo;
/**
* 操作描述
*/
@Schema(description = "操作描述:差异的信息(属性名称,逗号隔开)")
private String differenceInfo;
/**
* 备注
*/
@Schema(description = "备注")
private String remark;
@TableField(exist = false)
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.yifu.cloud.plus.v1.yifu.insurances.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDate;
/**
* @author licancan
* @description 保单号对应起止时间表 t_insurance_policy
* @date 2022-12-07 16:40:16
*/
@Schema(description = "保单号对应起止时间表")
@Data
public class TInsurancePolicy extends BaseEntity {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键")
private String id;
/**
* 保单编号
*/
@Schema(description = "保单编号")
private String policyNo;
/**
* 保单开始时间
*/
@Schema(description = "保单开始时间")
private LocalDate policyStart;
/**
* 保单结束时间
*/
@Schema(description = "保单结束时间")
private LocalDate policyEnd;
/**
* 保险公司名称
*/
@Schema(description = "保险公司名称")
private String insuranceCompanyName;
/**
* 险种名称
*/
@Schema(description = "险种名称")
private String insuranceTypeName;
/**
* 是否启用标识 0启用 1未启用
*/
@Schema(description = "是否启用标识 0启用 1未启用")
private Integer enableFlag;
/**
* 是否删除 0未删除 1删除
*/
@Schema(description = "是否删除 0未删除 1删除")
private Integer deleteFlag;
/**
* 购买月数
*/
@TableField(exist = false)
@Schema(description = "购买月数")
private Long buyMonth;
@TableField(exist = false)
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import lombok.Data;
import java.io.Serializable;
/**
* @author licancan
* @description ekp更新请求参数
* @date 2022-12-12 14:09:35
*/
@Data
public class EkpUpdateParam implements Serializable {
private static final long serialVersionUID = 581367013151512283L;
/**
* 保单开始时间
**/
private String fd_3b5bf02d3b8fc4;
/**
* 保单结束时间
**/
private String fd_3b5bf02e1d47cc;
/**
* 投保类型
*/
private String fd_3b5bf02fa14596;
/**
* 发票号
*/
private String fd_3b5bf030ab1a56;
/**
* 购买标准
*/
private String fd_3b5bf031b52314;
/**
* 商险ID:商险id_结算id
*/
private String fd_3b5bf032d7a822;
/**
* 商险变更ID
*/
private String fd_3b5bf033da86b2;
/**
* 变更记录
*/
private String fd_3b5bf0b7b4c058;
}
...@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.insurances.vo; ...@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.baomidou.mybatisplus.annotation.FieldStrategy; import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TBusinessOperate;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
...@@ -10,6 +11,7 @@ import java.io.Serializable; ...@@ -10,6 +11,7 @@ import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.List;
/** /**
* @author licancan * @author licancan
...@@ -363,10 +365,16 @@ public class InsuranceDetailVO implements Serializable { ...@@ -363,10 +365,16 @@ public class InsuranceDetailVO implements Serializable {
private String replaceInvoiceTitle; private String replaceInvoiceTitle;
/** /**
* 退保金额 todo 数据库暂时没有 * 减员id
*/ */
@Schema(description = "退保金额 :预留字段,暂时都是空(减员类型专用)") @Schema(description = "减员id")
private String surrender; private String refundId;
/**
* 退保金额
*/
@Schema(description = "退保金额(减员类型专用)")
private BigDecimal surrender;
/** /**
* 退保结算状态 todo 数据库暂时没有 * 退保结算状态 todo 数据库暂时没有
...@@ -380,4 +388,10 @@ public class InsuranceDetailVO implements Serializable { ...@@ -380,4 +388,10 @@ public class InsuranceDetailVO implements Serializable {
@Schema(description = "默认结算信息id") @Schema(description = "默认结算信息id")
@TableField(updateStrategy = FieldStrategy.IGNORED) @TableField(updateStrategy = FieldStrategy.IGNORED)
private String defaultSettleId; private String defaultSettleId;
/**
* 操作记录列表
*/
@Schema(description = "操作记录列表")
List<TBusinessOperate> operateList;
} }
...@@ -21,7 +21,7 @@ public class InsuranceEnclosureVo implements Serializable { ...@@ -21,7 +21,7 @@ public class InsuranceEnclosureVo implements Serializable {
* *
*/ */
@Schema(description = "主键") @Schema(description = "主键")
private Integer id; private String id;
/** /**
* 附件名 * 附件名
......
...@@ -80,4 +80,16 @@ public class InsuranceExportListParam extends BaseEntity implements Serializable ...@@ -80,4 +80,16 @@ public class InsuranceExportListParam extends BaseEntity implements Serializable
*/ */
@Schema(description = "派单结束时间") @Schema(description = "派单结束时间")
private String endDate; private String endDate;
/**
* 购买标准开始
*/
@Schema(description = "购买标准开始")
private Integer buyStandardMin;
/**
* 购买标准结束
*/
@Schema(description = "购买标准结束")
private Integer buyStandardMax;
} }
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
/**
* @author licancan
* @description 商险已投保修改请求参数
* @date 2022-12-08 20:16:34
*/
@Data
@Schema(description = "商险已投保修改请求参数")
public class InsuranceInsuredDetailParam implements Serializable {
private static final long serialVersionUID = 1445608325251914773L;
/**
* 主键
*/
@Schema(description = "主键")
private String id;
/**
* 变更后保单开始时间
*/
@Schema(description = "变更后保单开始时间")
private String policyStart;
/**
* 变更后保单结束时间
*/
@Schema(description = "变更后保单结束时间")
private String policyEnd;
/**
* 变更后投保类型
*/
@Schema(description = "变更后投保类型 1新增 3批增")
private Integer buyType;
/**
* 变更原因
*/
@Schema(description = "变更原因")
private String reason;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
/**
* @author licancan
* @description 商险已投保修改请求参数
* @date 2022-12-08 18:32:11
*/
@Data
@Schema(description = "商险已投保修改请求参数")
public class InsuranceInsuredParam implements Serializable {
private static final long serialVersionUID = -6131541135370797891L;
/**
* 员工姓名
*/
@Schema(description = "员工姓名")
private String empName;
/**
* 员工身份证号
*/
@Schema(description = "员工身份证号")
private String empIdcardNo;
/**
* 保险公司名称
*/
@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 policyStartNew;
/**
* 变更后保单结束时间
*/
@Schema(description = "变更后保单结束时间")
private String policyEndNew;
/**
* 变更后投保类型
*/
@Schema(description = "变更后投保类型, 新增、批增")
private String buyTypeStr;
/**
* 变更后投保类型
*/
@JsonIgnore
private Integer buyType;
/**
* 变更原因
*/
@Schema(description = "变更原因")
private String reason;
/**
* 错误信息
*/
@Schema(description = "错误信息")
private String errorMessage;
/**
* 数据传递对象
*/
@JsonIgnore
private TInsuranceDetail detail;
}
...@@ -94,4 +94,16 @@ public class InsuranceListParam extends BaseEntity { ...@@ -94,4 +94,16 @@ public class InsuranceListParam extends BaseEntity {
@Schema(description = "减员状态 1待减员 2减员中3减员退回,4减员成功") @Schema(description = "减员状态 1待减员 2减员中3减员退回,4减员成功")
private Integer reduceHandleStatus; private Integer reduceHandleStatus;
/**
* 购买标准开始
*/
@Schema(description = "购买标准开始")
private Integer buyStandardMin;
/**
* 购买标准结束
*/
@Schema(description = "购买标准结束")
private Integer buyStandardMax;
} }
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.checkerframework.common.value.qual.IntVal;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDate;
/**
* @author licancan
* @description 保单对应起止保时间编辑入参
* @date 2022-12-07 17:39:45
*/
@Data
@Schema(description = "保单对应起止保时间编辑入参")
public class InsurancePolicyListEditParam implements Serializable {
private static final long serialVersionUID = 9200033608149413253L;
/**
* 主键
*/
@Schema(description = "主键")
@NotBlank(message = "主键不能为空")
private String id;
/**
* 保单编号
*/
@Schema(description = "保单编号")
@NotBlank(message = "保单编号不能为空")
private String policyNo;
/**
* 保单开始时间
*/
@Schema(description = "保单开始时间")
@NotNull(message = "保单开始时间不能为空")
private LocalDate policyStart;
/**
* 保单结束时间
*/
@Schema(description = "保单结束时间")
@NotNull(message = "保单结束时间不能为空")
private LocalDate policyEnd;
/**
* 保险公司名称
*/
@Schema(description = "保险公司名称")
@NotBlank(message = "保险公司名称不能为空")
private String insuranceCompanyName;
/**
* 险种名称
*/
@Schema(description = "险种名称")
@NotBlank(message = "险种名称不能为空")
private String insuranceTypeName;
/**
* 是否启用标识 0启用 1未启用
*/
@Schema(description = "是否启用标识 0启用 1未启用")
@NotNull(message = "启用标识不能为空")
@IntVal({0,1})
private Integer enableFlag;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
/**
* @author licancan
* @description 保单对应起止保时间列表入参
* @date 2022-12-07 17:12:27
*/
@Data
@Schema(description = "保单对应起止保时间列表入参")
public class InsurancePolicyListParam implements Serializable {
private static final long serialVersionUID = 1442112261102562729L;
/**
* 保单编号
*/
@Schema(description = "保单编号")
private String policyNo;
/**
* 保单开始时间
*/
@Schema(description = "保单开始时间")
private String policyStart;
/**
* 保单结束时间
*/
@Schema(description = "保单结束时间")
private String policyEnd;
/**
* 保险公司名称
*/
@Schema(description = "保险公司名称")
private String insuranceCompanyName;
/**
* 险种名称
*/
@Schema(description = "险种名称")
private String insuranceTypeName;
/**
* 是否启用标识 0启用 1未启用
*/
@Schema(description = "是否启用标识 0启用 1未启用")
private Integer enableFlag;
}
...@@ -108,5 +108,16 @@ public class InsuranceRefundHandlingParam extends BaseEntity implements Serializ ...@@ -108,5 +108,16 @@ public class InsuranceRefundHandlingParam extends BaseEntity implements Serializ
@Schema(description = "派单结束时间") @Schema(description = "派单结束时间")
private String endDate; private String endDate;
/**
* 购买标准区间最小值
*/
@Schema(description = "购买标准区间最小值")
private String buyStandardMin;
/**
* 购买标准区间最大值
*/
@Schema(description = "购买标准区间最大值")
private String buyStandardMax;
} }
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* @ClassName: InsuranceRefundVo
* @Description: 减员退费校验类
* @Author: Administrator
* @Date: 2022/12/15 9:38
*/
@Data
public class InsuranceRefundVo implements Serializable {
/**
* 主键id
*/
@Schema(description = "主键")
private String id;
/**
* 保单信息主键
*/
@Schema(description = "保单信息主键")
private String insDetailId;
/**
* 退费金额
*/
@Schema(description = "退费金额")
private BigDecimal refundMoney;
/**
* 商险办理城市code
*/
@Schema(description = "商险办理城市code")
private Integer insuranceHandleCity;
/**
* 商险办理省code
*/
@Schema(description = "商险办理省code")
private Integer insuranceHandleProvince;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
/**
* @author licancan
* @description 登记发票号入参
* @date 2022-12-08 16:33:57
*/
@Data
@Schema(description = "登记发票号入参")
public class InsuranceRegisterInvoiceNoParam implements Serializable {
private static final long serialVersionUID = 7450858109465027195L;
/**
* 员工姓名
*/
@Schema(description = "员工姓名")
private String empName;
/**
* 员工身份证号
*/
@Schema(description = "员工身份证号")
private String empIdcardNo;
/**
* 保险公司名称
*/
@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 invoiceNo;
/**
* 错误信息
*/
@Schema(description = "错误信息")
private String errorMessage;
/**
* 数据传递对象
*/
@JsonIgnore
private TInsuranceDetail detail;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo; package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
...@@ -80,4 +82,10 @@ public class InsuranceRegisterParam implements Serializable { ...@@ -80,4 +82,10 @@ public class InsuranceRegisterParam implements Serializable {
*/ */
@Schema(description = "错误信息") @Schema(description = "错误信息")
private String errorMessage; private String errorMessage;
/**
* 数据传递对象
*/
@JsonIgnore
private TInsuranceDetail detail;
} }
...@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.insurances.vo; ...@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.alibaba.excel.annotation.ExcelIgnore; import com.alibaba.excel.annotation.ExcelIgnore;
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnore;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
...@@ -100,6 +101,12 @@ public class InsuranceReplaceParam implements Serializable { ...@@ -100,6 +101,12 @@ public class InsuranceReplaceParam implements Serializable {
@Schema(description = "错误信息") @Schema(description = "错误信息")
private String errorMessage; private String errorMessage;
/**
* 数据传递对象
*/
@JsonIgnore
private TInsuranceDetail detail;
/***********************************以下字段由系统算出,前端不用传,是为了方便入库***********************************/ /***********************************以下字段由系统算出,前端不用传,是为了方便入库***********************************/
/** /**
* 结算类型 (1、单独结算 2、合并结算-和工资一起结算) * 结算类型 (1、单独结算 2、合并结算-和工资一起结算)
......
...@@ -4,7 +4,6 @@ import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity; ...@@ -4,7 +4,6 @@ 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;
import org.checkerframework.common.value.qual.IntVal; import org.checkerframework.common.value.qual.IntVal;
import org.checkerframework.common.value.qual.StringVal;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.io.Serializable; import java.io.Serializable;
...@@ -64,4 +63,16 @@ public class RefundExportListParam extends BaseEntity implements Serializable { ...@@ -64,4 +63,16 @@ public class RefundExportListParam extends BaseEntity implements Serializable {
@Schema(description = "商险id集合") @Schema(description = "商险id集合")
private List<String> idList; private List<String> idList;
/**
* 购买标准开始
*/
@Schema(description = "购买标准开始")
private String buyStandardMin;
/**
* 购买标准结束
*/
@Schema(description = "购买标准结束")
private String buyStandardMax;
} }
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.time.LocalDate;
/**
* @author zhangyun
* @description 退保成功列表
* @date 2022-12-09 09:00:00
*/
@Data
@Tag(name ="退保成功列表")
public class RefundListVo implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@Schema(description = "主键")
private String id;
/**
* 项目名称
*/
@Schema(description = "项目名称")
private String projectName;
/**
* 员工姓名
*/
@Schema(description = "员工姓名")
private String empName;
/**
* 员工身份证号
*/
@Schema(description = "员工身份证号")
private String empIdcardNo;
/**
* 投保类型, 1新增、3批增、4替换
*/
@Schema(description = " 投保类型, 1新增、3批增、4替换")
private Integer buyType;
/**
* 保单开始时间
*/
@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 refundMoney;
/**
* 退至项目名称
*/
@Schema(description = "退至项目名称")
private String returnProjectName;
/**
* 退至员工姓名
*/
@Schema(description = "退至员工姓名")
private String returnEmpName;
/**
* 退至员工身份证号
*/
@Schema(description = "退至员工身份证号")
private String returnEmpIdcardNo;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
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;
/**
* @author 张云
* @description 减员退费导入表
* @date 2022-12-09 10:06:31
*/
@Data
@Tag(name = "减员退费导入表")
public class RefundMoneyUpdateParam implements Serializable {
private static final long serialVersionUID = -2689686777914935788L;
/**
* 主键
*/
@JsonIgnore
private String id;
/**
* 商险id
*/
@JsonIgnore
private String insDetailId;
/**
* 员工姓名
*/
@Schema(description = "员工姓名")
private String empName;
/**
* 员工身份证号
*/
@Schema(description = "员工身份证号")
private String empIdcardNo;
/**
* 保单开始时间
*/
@Schema(description = "保单开始时间")
private String policyStart;
/**
* 保单结束时间
*/
@Schema(description = "保单结束时间")
private String policyEnd;
/**
* 保险公司名称(冗余字段)
*/
@Schema(description = "保险公司名称")
private String insuranceCompanyName;
/**
* 险种名称
*/
@Schema(description = "险种名称")
private String insuranceTypeName;
/**
* 购买标准
*/
@Schema(description = "购买标准")
private String buyStandard;
/**
* 退款金额(元)
*/
@Schema(description = "退款金额(元)")
private String refundMoney;
/**
* 错误原因
*/
@Schema(description = "错误原因")
private String errorMessage;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TBusinessOperate;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePolicy;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.util.List;
/**
* @author licancan
* @description 保单号对应起止时间详情vo
* @date 2022-12-08 11:11:35
*/
@Data
@Schema(description = "保单号对应起止时间详情vo")
public class TInsurancePolicyDetailVO extends TInsurancePolicy {
/**
* 操作记录列表
*/
@Schema(description = "操作记录列表")
List<TBusinessOperate> operateList;
}
...@@ -297,6 +297,48 @@ public class TInsuranceDetailController { ...@@ -297,6 +297,48 @@ public class TInsuranceDetailController {
public R<List<InsuranceRegisterParam>> registeredPolicyPremium(@RequestBody @Valid @Size(min = 1,message = "集合不能为空") List<InsuranceRegisterParam> paramList){ public R<List<InsuranceRegisterParam>> registeredPolicyPremium(@RequestBody @Valid @Size(min = 1,message = "集合不能为空") List<InsuranceRegisterParam> paramList){
return tInsuranceDetailService.registeredPolicyPremium(paramList); return tInsuranceDetailService.registeredPolicyPremium(paramList);
} }
/**
* 登记发票号
*
* @author licancan
* @param paramList
* @return {@link R< List<InsuranceRegisterInvoiceNoParam>>}
*/
@Operation(summary = "登记发票号", description = "登记发票号")
@PostMapping("/registeredInvoiceNo")
@PreAuthorize("@pms.hasPermission('handle_insure_invoice')")
public R<List<InsuranceRegisterInvoiceNoParam>> registeredInvoiceNo(@RequestBody @Valid @Size(min = 1,message = "集合不能为空") List<InsuranceRegisterInvoiceNoParam> paramList){
return tInsuranceDetailService.registeredInvoiceNo(paramList);
}
/**
* 已投保信息修改
*
* @author licancan
* @param paramList
* @return {@link R<List<InsuranceInsuredParam>>}
*/
@Operation(summary = "已投保信息修改", description = "已投保信息修改")
@PostMapping("/updateInsuranceInsured")
@PreAuthorize("@pms.hasPermission('handle_insured')")
public R<List<InsuranceInsuredParam>> updateInsuranceInsured(@RequestBody @Valid @Size(min = 1,message = "集合不能为空") List<InsuranceInsuredParam> paramList){
return tInsuranceDetailService.updateInsuranceInsured(paramList);
}
/**
* 已投保信息修改
*
* @author licancan
* @param param
* @return {@link R< String>}
*/
@PostMapping("/updateInsuranceInsuredById")
@Operation(summary = "已投保信息修改", description = "已投保信息修改")
@PreAuthorize("@pms.hasPermission('handle_insured_by_id')")
public R<String> updateInsuranceInsuredById(@RequestBody InsuranceInsuredDetailParam param) {
return tInsuranceDetailService.updateInsuranceInsuredById(param);
}
/***********************减员办理********************************/ /***********************减员办理********************************/
/** /**
* 导入减员校验 * 导入减员校验
...@@ -374,7 +416,7 @@ public class TInsuranceDetailController { ...@@ -374,7 +416,7 @@ public class TInsuranceDetailController {
* *
* @author zhaji * @author zhaji
* @param param 查询条件 * @param param 查询条件
* @return {@link R<IPage< InsuranceRefundListVo >>} * @return {@link R<IPage<InsuranceRefundListVo>>}
*/ */
@Operation(summary = "已减员列表分页查询", description = "已减员列表分页查询") @Operation(summary = "已减员列表分页查询", description = "已减员列表分页查询")
@PostMapping("/getInsuranceRefundPageList") @PostMapping("/getInsuranceRefundPageList")
...@@ -388,7 +430,7 @@ public class TInsuranceDetailController { ...@@ -388,7 +430,7 @@ public class TInsuranceDetailController {
* *
* @author zhaji * @author zhaji
* @param param 查询条件 * @param param 查询条件
* @return {@link R<List< InsuranceRefundListVo >>} * @return {@link R<List<InsuranceRefundListVo>>}
*/ */
@Operation(summary = "已减员列表导出", description = "已减员列表导出") @Operation(summary = "已减员列表导出", description = "已减员列表导出")
@PostMapping("/getInsuranceRefundList") @PostMapping("/getInsuranceRefundList")
...@@ -403,7 +445,7 @@ public class TInsuranceDetailController { ...@@ -403,7 +445,7 @@ public class TInsuranceDetailController {
* *
* @author zhaji * @author zhaji
* @param param 查询条件 * @param param 查询条件
* @return {@link R<IPage< RefundExportListVo >>} * @return {@link R<IPage<RefundExportListVo>>}
*/ */
@Operation(summary = "减员办理列表分页查询", description = "减员办理列表分页查询") @Operation(summary = "减员办理列表分页查询", description = "减员办理列表分页查询")
@GetMapping("/getInsuranceRefundHandlingPageList") @GetMapping("/getInsuranceRefundHandlingPageList")
...@@ -417,7 +459,7 @@ public class TInsuranceDetailController { ...@@ -417,7 +459,7 @@ public class TInsuranceDetailController {
* *
* @author zhaji * @author zhaji
* @param param 查询条件 * @param param 查询条件
* @return {@link R<List< RefundExportListVo >>} * @return {@link R<List<RefundExportListVo>>}
*/ */
@Operation(summary = "导出减员列表", description = "导出减员列表") @Operation(summary = "导出减员列表", description = "导出减员列表")
@PostMapping("/getInsuranceRefundHandlingList") @PostMapping("/getInsuranceRefundHandlingList")
...@@ -494,19 +536,6 @@ public class TInsuranceDetailController { ...@@ -494,19 +536,6 @@ public class TInsuranceDetailController {
return tInsuranceDetailService.updateIsUse(id); return tInsuranceDetailService.updateIsUse(id);
} }
/**
* 更新减员退费
*
* @author zhaji
* @param paramList 退费列表
* @return {@link R<List< RefundMoneyParam >>}
*/
@Operation(summary = "更新减员退费", description = "更新减员退费")
@PostMapping("/updateRefundMoney")
public R updateRefundMoney(@RequestBody @Valid @Size(min = 1,message = "更新减员退费不能为空") List<RefundMoneyParam> paramList) {
return R.failed("该功能暂未开放");
//return tInsuranceDetailService.updateRefundMoney(paramList);
}
/** /**
* 查询项目列表 * 查询项目列表
...@@ -545,6 +574,19 @@ public class TInsuranceDetailController { ...@@ -545,6 +574,19 @@ public class TInsuranceDetailController {
return tInsuranceDetailService.urgentUpdateIsUse(empIdcardNo); return tInsuranceDetailService.urgentUpdateIsUse(empIdcardNo);
} }
/**
* 紧急出险(20221128需求,ekp调用)
*
* @author licancan
* @param paramList 商险明细id集合
* @return {@link R}
*/
@Operation(summary = "紧急出险", description = "紧急出险")
@PostMapping("/urgentUpdateIsUseByIds")
public R urgentUpdateIsUseByIds(@RequestBody @Valid @Size(min = 1,message = "主键集合不能为空") List<String> paramList) {
return tInsuranceDetailService.urgentUpdateIsUseByIds(paramList);
}
/** /**
* 根据身份证查询所有的商险列表 * 根据身份证查询所有的商险列表
* *
......
package com.yifu.cloud.plus.v1.yifu.insurances.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePolicy;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsurancePolicyService;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsurancePolicyListEditParam;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsurancePolicyListParam;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.TInsurancePolicyDetailVO;
import io.swagger.v3.oas.annotations.Operation;
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.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.List;
/**
* @author licancan
* @description 保单维护 controller
* @date 2022-12-07 16:56:53
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/insurancePolicy")
@Tag(name = "保单维护相关")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class TInsurancePolicyController {
@Resource
private TInsurancePolicyService tInsurancePolicyService;
/**
* 保单号对应起止保时间分页查询
*
* @author licancan
* @param page 分页对象
* @param param 查询参数
* @return {@link R<IPage<TInsurancePolicy>>}
*/
@Operation(summary = "保单号对应起止保时间分页查询", description = "保单号对应起止保时间分页查询")
@GetMapping("/page" )
public R<IPage<TInsurancePolicy>> getInsurancePolicyPage(Page page, InsurancePolicyListParam param) {
return R.ok(tInsurancePolicyService.pageDiy(page, param));
}
/**
* 保单号对应起止保时间列表(不分页)
*
* @author licancan
* @param param
* @return {@link R<List<TInsurancePolicy>>}
*/
@Operation(summary = "保单号对应起止保时间列表(不分页)", description = "保单号对应起止保时间(不分页)")
@GetMapping("/list")
@PreAuthorize("@pms.hasPermission('insurancePolicy_list')")
public R<List<TInsurancePolicy>> getInsurancePolicyList(InsurancePolicyListParam param) {
return R.ok(tInsurancePolicyService.getInsurancePolicyList(param));
}
/**
* 通过id查询详情
*
* @author licancan
* @param id
* @return {@link R<TInsurancePolicyDetailVO>}
*/
@GetMapping("/{id}")
@Operation(summary = "通过id查询详情", description = "通过id查询详情")
@PreAuthorize("@pms.hasPermission('insurancePolicy_getById')")
public R<TInsurancePolicyDetailVO> getDetailById(@PathVariable("id" ) String id) {
return tInsurancePolicyService.getDetailById(id);
}
/**
* 修改保单号对应起止保时间
*
* @author licancan
* @param param 修改参数
* @return {@link R}
*/
@Operation(summary = "修改保单号对应起止保时间", description = "修改保单号对应起止保时间)")
@PostMapping("/update")
@PreAuthorize("@pms.hasPermission('insurancePolicy_update')")
public R update(@RequestBody @Valid InsurancePolicyListEditParam param) {
return tInsurancePolicyService.updateInsurancePolicy(param);
}
/**
* 删除保单号对应起止保时间
*
* @author licancan
* @param id 主键
* @return {@link R}
*/
@Operation(summary = "删除保单号对应起止保时间", description = "删除保单号对应起止保时间")
@DeleteMapping("/{id}" )
@PreAuthorize("@pms.hasPermission('insurancePolicy_delete')")
public R deleteById(@PathVariable("id") String id) {
return tInsurancePolicyService.deleteInsurancePolicy(id);
}
}
package com.yifu.cloud.plus.v1.yifu.insurances.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceDetailService;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.*;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.validation.Valid;
import javax.validation.constraints.Size;
import java.util.List;
/**
* @author zhangyun
* @description 减员退费控制器
* @date 2022-12-09 09:55:28
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/insuranceRefund")
@Tag(name = "商险减员退费相关")
@Validated
public class TInsuranceRefundController {
@Resource
private TInsuranceDetailService tInsuranceDetailService;
/**
* 减员退费分页列表
*
* @author zhangyun
* @param page 分页信息
* @param param 筛选条件
* @param mId 菜单Id
* @return {@link R}
*/
@Operation(summary = "减员退费分页列表", description = "减员退费分页列表")
@GetMapping("/getInsuranceRefundMoneyPageList")
public R getInsuranceRefundPageList(Page<RefundListVo> page,
InsuranceRefundHandlingParam param,
@RequestParam(required = false) String mId) {
return tInsuranceDetailService.getInsuranceRefundMoneyPageList(page,param,mId);
}
/**
* 减员退费不分页列表
*
* @author zhangyun
* @param param 筛选条件
* @return {@link R}
*/
@Operation(summary = "已减员列表导出", description = "已减员列表导出")
@GetMapping("/getInsuranceRefundMoneyList")
@PreAuthorize("@pms.hasPermission('insurance_custserve_reduction_export')")
public R getInsuranceRefundList(InsuranceRefundHandlingParam param) {
return tInsuranceDetailService.getInsuranceRefundMoneyList(param);
}
/**
* 更新减员退费
*
* @author zhangyun
* @param paramList 退费列表
* @return {@link R<List<RefundMoneyUpdateParam>>}
*/
@Operation(summary = "更新减员退费", description = "更新减员退费")
@PostMapping("/updateRefundMoney")
@PreAuthorize("@pms.hasPermission('insurance_custserve_reduction_money')")
public R updateRefundMoney(@RequestBody @Valid @Size(min = 1,message = "更新减员退费不能为空") List<RefundMoneyUpdateParam> paramList) {
return tInsuranceDetailService.updateRefundMoney(paramList);
}
}
package com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TBusinessOperate;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* @author licancan
* @description 针对表【t_business_operate(业务操作记录表)】的数据库操作Mapper
* @date 2022-12-08 10:20:16
*/
@Mapper
public interface TBusinessOperateMapper extends BaseMapper<TBusinessOperate> {
}
...@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -5,6 +5,7 @@ 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.archives.vo.TSettleDomainSelectVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
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.entity.TInsuranceRefund;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.*; import com.yifu.cloud.plus.v1.yifu.insurances.vo.*;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -130,7 +131,7 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> { ...@@ -130,7 +131,7 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
* @author zhaji * @author zhaji
* @param page 分页参数 * @param page 分页参数
* @param param 查询参数 * @param param 查询参数
* @return {@link IPage< InsuranceRefundListVo>} * @return {@link IPage<InsuranceRefundListVo>}
*/ */
IPage<InsuranceRefundListVo> getInsuranceRefundPageList(Page<InsuranceRefundParam> page, @Param("param")InsuranceRefundParam param); IPage<InsuranceRefundListVo> getInsuranceRefundPageList(Page<InsuranceRefundParam> page, @Param("param")InsuranceRefundParam param);
...@@ -139,10 +140,30 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> { ...@@ -139,10 +140,30 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
* *
* @author zhaji * @author zhaji
* @param param 查询参数 * @param param 查询参数
* @return {@link List< InsuranceRefundListVo>} * @return {@link List<InsuranceRefundListVo>}
*/ */
List<InsuranceRefundListVo> getInsuranceRefundList( @Param("param") InsuranceRefundParam param); List<InsuranceRefundListVo> getInsuranceRefundList( @Param("param") InsuranceRefundParam param);
/**
* 查询退费分页列表
*
* @author zhangyun
* @param page 分页参数
* @param param 查询参数
* @return {@link IPage<RefundListVo>}
*/
IPage<RefundListVo> getInsuranceRefundMoneyPageList(Page<RefundListVo> page, @Param("param")InsuranceRefundHandlingParam param);
/**
* 查询退费不分页列表
*
* @author zhangyun
* @param param 查询参数
* @return {@link List<RefundListVo>}
*/
List<RefundListVo> getInsuranceRefundMoneyList(@Param("param") InsuranceRefundHandlingParam param);
/** /**
* 减员办理列表分页查询 * 减员办理列表分页查询
* *
...@@ -174,11 +195,11 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> { ...@@ -174,11 +195,11 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
/** /**
* 查询保单减员退费信息 * 查询保单减员退费信息
* *
* @author zhaji * @author zhangyun
* @param refundDetail * @param param 查询参数
* @return {@link TInsuranceRefundDetail} * @return {@link String}
*/ */
TInsuranceRefundDetail selectRefundDetail(@Param("param") TInsuranceRefundDetail refundDetail); InsuranceRefundVo selectRefundDetailId(@Param("param") RefundMoneyUpdateParam param);
/** /**
* 根据ID导出减员办理列表 * 根据ID导出减员办理列表
......
package com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePolicy;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsurancePolicyListParam;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author licancan
* @description 针对表【t_insurance_policy(保单号对应起止时间表)】的数据库操作Mapper
* @date 2022-12-07 16:40:16
*/
@Mapper
public interface TInsurancePolicyMapper extends BaseMapper<TInsurancePolicy> {
/**
* 保单号对应起止保时间分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return {@link IPage <TInsurancePolicy>}
* @author licancan
*/
IPage<TInsurancePolicy> getInsurancePolicyListPage(Page page,@Param("param") InsurancePolicyListParam param);
/**
* 保单号对应起止保时间列表(不分页)
*
* @author licancan
* @param param
* @return {@link List< TInsurancePolicy>}
*/
List<TInsurancePolicy> getInsurancePolicyList(@Param("param") InsurancePolicyListParam param);
}
...@@ -25,5 +25,12 @@ public interface TInsuranceRefundMapper extends BaseMapper<TInsuranceRefund> { ...@@ -25,5 +25,12 @@ public interface TInsuranceRefundMapper extends BaseMapper<TInsuranceRefund> {
void updateByInsDetailId(@Param("param") TInsuranceRefund insuranceRefund); void updateByInsDetailId(@Param("param") TInsuranceRefund insuranceRefund);
int updateRefundMoney(TInsuranceRefund insuranceRefund); /**
* 更新退款信息
*
* @author zhangyun
* @param insuranceRefund 退款信息
* @return {@link int}
*/
int updateRefundMoney(@Param("param") TInsuranceRefund insuranceRefund);
} }
package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TBusinessOperate;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* @author licancan
* @description 针对表【t_business_operate(业务操作记录表)】的数据库操作Service
* @date 2022-12-08 10:20:16
*/
public interface TBusinessOperateService extends IService<TBusinessOperate> {
/**
* 保存修改记录
*
* @author licancan
* @param businessId 业务表主键
* @param oldInfo 老的实体类
* @param newInfo 新的实体类
* @param remark 备注
* @return {@link TBusinessOperate}
*/
<T> TBusinessOperate saveModificationRecord(String businessId, T oldInfo, T newInfo, String remark);
/**
* 根据业务主键获取操作记录
*
* @author licancan
* @param businessId
* @return {@link List<TBusinessOperate>}
*/
List<TBusinessOperate> getOperateListByBusinessId(String businessId);
}
...@@ -180,6 +180,33 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> { ...@@ -180,6 +180,33 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
*/ */
R<List<InsuranceRegisterParam>> registeredPolicyPremium(List<InsuranceRegisterParam> paramList); R<List<InsuranceRegisterParam>> registeredPolicyPremium(List<InsuranceRegisterParam> paramList);
/**
* 登记发票号
*
* @author licancan
* @param paramList
* @return {@link R< List<InsuranceRegisterInvoiceNoParam>>}
*/
R<List<InsuranceRegisterInvoiceNoParam>> registeredInvoiceNo(List<InsuranceRegisterInvoiceNoParam> paramList);
/**
* 已投保信息修改
*
* @author licancan
* @param paramList
* @return {@link R<List<InsuranceInsuredParam>>}
*/
R<List<InsuranceInsuredParam>> updateInsuranceInsured(List<InsuranceInsuredParam> paramList);
/**
* 已投保信息修改
*
* @author licancan
* @param param
* @return {@link R< String>}
*/
R<String> updateInsuranceInsuredById(InsuranceInsuredDetailParam param);
/***********************减员办理********************************/ /***********************减员办理********************************/
/** /**
...@@ -226,17 +253,38 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> { ...@@ -226,17 +253,38 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* *
* @author zhaji * @author zhaji
* @param param 查询参数 * @param param 查询参数
* @return {@link List< InsuranceRefundListVo >} * @return {@link List<InsuranceRefundListVo>}
*/ */
R getInsuranceRefundList(InsuranceRefundParam param); R getInsuranceRefundList(InsuranceRefundParam param);
/**
* 减员退费分页列表
*
* @author zhangyun
* @param page 分页信息
* @param param 筛选条件
* @param mId 菜单Id
* @return {@link R}
*/
R getInsuranceRefundMoneyPageList(Page<RefundListVo> page, InsuranceRefundHandlingParam param, String mId);
/**
* 减员退费不分页列表
*
* @author zhangyun
* @param param 筛选条件
* @return {@link R}
*/
R getInsuranceRefundMoneyList(InsuranceRefundHandlingParam param);
/** /**
* 减员办理列表分页查询 * 减员办理列表分页查询
* *
* @author zhaji * @author zhaji
* @param page 分页数据 * @param page 分页数据
* @param param 查询参数 * @param param 查询参数
* @return {@link IPage< RefundExportListVo >} * @param mId 菜单id
* @return {@link IPage<RefundExportListVo>}
*/ */
IPage<RefundExportListVo> getInsuranceRefundHandlingPageList(Page<InsuranceRefundHandlingParam> page, InsuranceRefundHandlingParam param, IPage<RefundExportListVo> getInsuranceRefundHandlingPageList(Page<InsuranceRefundHandlingParam> page, InsuranceRefundHandlingParam param,
String mId); String mId);
...@@ -317,11 +365,11 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> { ...@@ -317,11 +365,11 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
/** /**
* 更新减员退费 * 更新减员退费
* *
* @author zhaji * @author zhangyun
* @param paramList * @param paramList 减员退费参数
* @return {@link R} * @return {@link R}
*/ */
R updateRefundMoney(List<RefundMoneyParam> paramList); R updateRefundMoney(List<RefundMoneyUpdateParam> paramList);
/** /**
* 查询项目列表 * 查询项目列表
...@@ -350,6 +398,15 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> { ...@@ -350,6 +398,15 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
*/ */
R urgentUpdateIsUse(String empIdcardNo); R urgentUpdateIsUse(String empIdcardNo);
/**
* 紧急出险
*
* @author licancan
* @param paramList 商险明细id集合
* @return {@link R}
*/
R urgentUpdateIsUseByIds(List<String> paramList);
/** /**
* 根据身份证查询商险列表 * 根据身份证查询商险列表
* *
......
package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePolicy;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsurancePolicyListEditParam;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsurancePolicyListParam;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.TInsurancePolicyDetailVO;
import java.util.List;
/**
* @author licancan
* @description 针对表【t_insurance_policy(保单号对应起止时间表)】的数据库操作Service
* @date 2022-12-07 16:40:16
*/
public interface TInsurancePolicyService extends IService<TInsurancePolicy> {
/**
* 保单号对应起止保时间分页查询
*
* @author licancan
* @param page 分页对象
* @param param 查询参数
* @return {@link IPage<TInsurancePolicy>}
*/
IPage<TInsurancePolicy> pageDiy(Page page, InsurancePolicyListParam param);
/**
* 保单号对应起止保时间列表(不分页)
*
* @author licancan
* @param param
* @return {@link List<TInsurancePolicy>}
*/
List<TInsurancePolicy> getInsurancePolicyList(InsurancePolicyListParam param);
/**
* 通过id查询详情
*
* @author licancan
* @param id
* @return {@link R<TInsurancePolicyDetailVO>}
*/
R<TInsurancePolicyDetailVO> getDetailById(String id);
/**
* 新增
*
* @author licancan
* @param policy
* @return {@link R}
*/
R saveTInsurancePolicy(TInsurancePolicy policy);
/**
* 修改保单号对应起止保时间
*
* @author licancan
* @param param
* @return {@link R}
*/
R updateInsurancePolicy(InsurancePolicyListEditParam param);
/**
* 删除保单号对应起止保时间
*
* @author licancan
* @param id 主键
* @return {@link R}
*/
R deleteInsurancePolicy(String id);
}
...@@ -14,6 +14,13 @@ public interface TInsuranceRefundService extends IService<TInsuranceRefund> { ...@@ -14,6 +14,13 @@ public interface TInsuranceRefundService extends IService<TInsuranceRefund> {
void updateByInsDetailId(TInsuranceRefund insuranceRefund); void updateByInsDetailId(TInsuranceRefund insuranceRefund);
/**
* 更新退款信息
*
* @author zhangyun
* @param insuranceRefund 退款参数
* @return {@link int}
*/
int updateRefundMoney(TInsuranceRefund insuranceRefund); int updateRefundMoney(TInsuranceRefund insuranceRefund);
} }
package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.equator.HrEquator;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TBusinessOperate;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TBusinessOperateMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TBusinessOperateService;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.List;
import static com.alibaba.fastjson.serializer.SerializerFeature.*;
/**
* @author licancan
* @description 针对表【t_business_operate(业务操作记录表)】的数据库操作Service实现
* @date 2022-12-08 10:20:16
*/
@Service
public class TBusinessOperateServiceImpl extends ServiceImpl<TBusinessOperateMapper, TBusinessOperate> implements TBusinessOperateService {
/**
* 保存修改记录
*
* @param businessId 业务表主键
* @param oldInfo 老的实体类
* @param newInfo 新的实体类
* @param remark 备注
* @return {@link TBusinessOperate}
* @author licancan
*/
@Override
public <T> TBusinessOperate saveModificationRecord(String businessId, T oldInfo, T newInfo, String remark) {
try{
//比较记录不影响业务逻辑,用try套住
//比较差异
String differenceKey = HrEquator.comparisonValue(oldInfo, newInfo);
//如果有差异保存差异
if(!Common.isEmpty(differenceKey)){
TBusinessOperate operate = new TBusinessOperate();
operate.setBusinessId(businessId);
operate.setCreateTime(LocalDateTime.now());
operate.setOldInfo(JSON.toJSONString(oldInfo,features));
operate.setNewInfo(JSON.toJSONString(newInfo,features));
operate.setDifferenceInfo(differenceKey);
operate.setRemark(remark);
baseMapper.insert(operate);
return operate;
}
}catch (Exception e){
log.error(JSON.toJSON(oldInfo)+"插入修改记录报错>>>",e);
}
return null;
}
/**
* 根据业务主键获取操作记录
*
* @param businessId
* @return {@link List <TBusinessOperate>}
* @author licancan
*/
@Override
public List<TBusinessOperate> getOperateListByBusinessId(String businessId) {
List<TBusinessOperate> list = this.baseMapper.selectList(Wrappers.<TBusinessOperate>query().lambda()
.eq(TBusinessOperate::getBusinessId,businessId));
return list;
}
private SerializerFeature[] features = new SerializerFeature[] {
WriteMapNullValue, WriteNullNumberAsZero, WriteNullListAsEmpty,
WriteNullStringAsEmpty,WriteDateUseDateFormat
};
}
package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.impl;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TBusinessOperate;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePolicy;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsurancePolicyMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TBusinessOperateService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceDetailService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsurancePolicyService;
import com.yifu.cloud.plus.v1.yifu.insurances.util.BeanCopyUtils;
import com.yifu.cloud.plus.v1.yifu.insurances.util.LocalDateUtil;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsurancePolicyListEditParam;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsurancePolicyListParam;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.TInsurancePolicyDetailVO;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.List;
import java.util.Optional;
/**
* @author licancan
* @description 针对表【t_insurance_policy(保单号对应起止时间表)】的数据库操作Service实现
* @date 2022-12-07 16:40:16
*/
@Service
public class TInsurancePolicyServiceImpl extends ServiceImpl<TInsurancePolicyMapper, TInsurancePolicy> implements TInsurancePolicyService {
@Resource
private TBusinessOperateService tBusinessOperateService;
@Resource
@Lazy
private TInsuranceDetailService tInsuranceDetailService;
/**
* 保单号对应起止保时间分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return {@link IPage <TInsurancePolicy>}
* @author licancan
*/
@Override
public IPage<TInsurancePolicy> pageDiy(Page page, InsurancePolicyListParam param) {
IPage<TInsurancePolicy> list = this.baseMapper.getInsurancePolicyListPage(page, param);
// 购买月数
if (CollectionUtils.isNotEmpty(list.getRecords())){
list.getRecords().stream().forEach(e ->{
e.setBuyMonth(LocalDateUtil.betweenMonth(e.getPolicyStart().toString(),e.getPolicyEnd().toString()));
});
}
return list;
}
/**
* 保单号对应起止保时间列表(不分页)
*
* @param param
* @return {@link List<TInsurancePolicy>}
* @author licancan
*/
@Override
public List<TInsurancePolicy> getInsurancePolicyList(InsurancePolicyListParam param) {
List<TInsurancePolicy> list = this.baseMapper.getInsurancePolicyList(param);
return list;
}
/**
* 通过id查询详情
*
* @param id
* @return {@link R<TInsurancePolicyDetailVO>}
* @author licancan
*/
@Override
public R<TInsurancePolicyDetailVO> getDetailById(String id) {
if(Common.isEmpty(id)){
return R.failed("id不能为空");
}
TInsurancePolicy byId = getById(id);
if (!Optional.ofNullable(byId).isPresent()){
return R.failed("数据不存在");
}
TInsurancePolicyDetailVO vo = new TInsurancePolicyDetailVO();
BeanCopyUtils.copyProperties(byId,vo);
List<TBusinessOperate> list = tBusinessOperateService.getOperateListByBusinessId(id);
if (CollectionUtils.isNotEmpty(list)){
vo.setOperateList(list);
}
return R.ok(vo);
}
/**
* 新增,内部调用的,保证调用方把该传的字段都传了(保单号、起止保时间、保险公司、险种)
*
* @param policy
* @return {@link R}
* @author licancan
*/
@Override
public R saveTInsurancePolicy(TInsurancePolicy policy) {
if (StringUtils.isNotEmpty(policy.getPolicyNo())){
TInsurancePolicy one = this.getOne(Wrappers.<TInsurancePolicy>query().lambda()
.eq(TInsurancePolicy::getPolicyNo, policy.getPolicyNo())
.eq(TInsurancePolicy::getDeleteFlag,CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL));
if (!Optional.ofNullable(one).isPresent()){
this.save(policy);
//第一次新增插入变更记录表为insert,前端会将insert渲染为批量导入
TBusinessOperate operate = new TBusinessOperate();
operate.setBusinessId(policy.getId());
operate.setDifferenceInfo("insert");
tBusinessOperateService.save(operate);
}
}
return R.ok();
}
/**
* 修改保单号对应起止保时间
*
* @param param
* @return {@link R}
* @author licancan
*/
@Override
@Transactional(value = "insurancesTransactionManager" ,rollbackFor = {Exception.class})
public R updateInsurancePolicy(InsurancePolicyListEditParam param) {
TInsurancePolicy tInsurancePolicy = this.baseMapper.selectById(param.getId());
if (!Optional.ofNullable(tInsurancePolicy).isPresent()){
return R.failed("数据不存在");
}
if (!param.getPolicyNo().equals(tInsurancePolicy.getPolicyNo())){
return R.failed("保单号不能修改");
}
//操作日志
tBusinessOperateService.saveModificationRecord(param.getId(),tInsurancePolicy,param,null);
BeanCopyUtils.copyProperties(param,tInsurancePolicy);
updateById(tInsurancePolicy);
return R.ok();
}
/**
* 删除保单号对应起止保时间
*
* @param id 主键
* @return {@link R}
* @author licancan
*/
@Override
public R deleteInsurancePolicy(String id) {
if(Common.isEmpty(id)){
return R.failed("id不能为空");
}
TInsurancePolicy byId = getById(id);
if (!Optional.ofNullable(byId).isPresent()){
return R.failed("数据不存在");
}
//检验保单号是否被使用,被使用不能删除
TInsuranceDetail one = tInsuranceDetailService.getOne(Wrappers.<TInsuranceDetail>query().lambda()
.eq(TInsuranceDetail::getPolicyNo, byId.getPolicyNo())
.eq(TInsuranceDetail::getDeleteFlag,CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL));
if (Optional.ofNullable(one).isPresent()){
return R.failed("存在正常关联的承保信息,禁止删除!");
}
LambdaUpdateWrapper<TInsurancePolicy> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(TInsurancePolicy::getId,id)
.set(TInsurancePolicy::getDeleteFlag, CommonConstants.ONE_INT);
update(updateWrapper);
return R.ok();
}
}
<?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.insurances.TBusinessOperateMapper">
<resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.insurances.entity.TBusinessOperate">
<id property="id" column="ID" jdbcType="VARCHAR"/>
<result property="businessId" column="BUSINESS_ID" jdbcType="VARCHAR"/>
<result property="oldInfo" column="OLD_INFO" jdbcType="VARCHAR"/>
<result property="newInfo" column="NEW_INFO" jdbcType="VARCHAR"/>
<result property="differenceInfo" column="DIFFERENCE_INFO" jdbcType="VARCHAR"/>
<result property="remark" column="REMARK" jdbcType="VARCHAR"/>
<result property="createBy" column="CREATE_BY" jdbcType="VARCHAR"/>
<result property="createName" column="CREATE_NAME" jdbcType="VARCHAR"/>
<result property="createTime" column="CREATE_TIME" jdbcType="TIMESTAMP"/>
<result property="updateBy" column="UPDATE_BY" jdbcType="VARCHAR"/>
<result property="updateTime" column="UPDATE_TIME" jdbcType="TIMESTAMP"/>
</resultMap>
<sql id="Base_Column_List">
ID,BUSINESS_ID,OPERATE_DESC,
REMARK,CREATE_BY,CREATE_NAME,
CREATE_TIME,UPDATE_BY,
UPDATE_TIME
</sql>
</mapper>
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<mapper namespace="com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceEnclosureMapper"> <mapper namespace="com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceEnclosureMapper">
<resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceEnclosure"> <resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceEnclosure">
<id property="id" column="ID" jdbcType="INTEGER"/> <id property="id" column="ID" jdbcType="VARCHAR"/>
<result property="enclosureName" column="ENCLOSURE_NAME" jdbcType="VARCHAR"/> <result property="enclosureName" column="ENCLOSURE_NAME" jdbcType="VARCHAR"/>
<result property="remark" column="REMARK" jdbcType="VARCHAR"/> <result property="remark" column="REMARK" jdbcType="VARCHAR"/>
<result property="deleteFlag" column="DELETE_FLAG" jdbcType="VARCHAR"/> <result property="deleteFlag" column="DELETE_FLAG" jdbcType="VARCHAR"/>
......
<?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.insurances.TInsurancePolicyMapper">
<resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePolicy">
<id property="id" column="ID" jdbcType="VARCHAR"/>
<result property="policyNo" column="POLICY_NO" jdbcType="VARCHAR"/>
<result property="policyStart" column="POLICY_START" jdbcType="DATE"/>
<result property="policyEnd" column="POLICY_END" jdbcType="DATE"/>
<result property="insuranceCompanyName" column="INSURANCE_COMPANY_NAME" jdbcType="VARCHAR"/>
<result property="insuranceTypeName" column="INSURANCE_TYPE_NAME" jdbcType="VARCHAR"/>
<result property="enableFlag" column="ENABLE_FLAG" jdbcType="TINYINT"/>
<result property="deleteFlag" column="DELETE_FLAG" jdbcType="TINYINT"/>
<result property="createBy" column="CREATE_BY" jdbcType="VARCHAR"/>
<result property="createName" column="CREATE_NAME" jdbcType="VARCHAR"/>
<result property="createTime" column="CREATE_TIME" jdbcType="TIMESTAMP"/>
<result property="updateBy" column="UPDATE_BY" jdbcType="VARCHAR"/>
<result property="updateTime" column="UPDATE_TIME" jdbcType="TIMESTAMP"/>
</resultMap>
<sql id="Base_Column_List">
ID,POLICY_NO,POLICY_START,
POLICY_END,INSURANCE_COMPANY_NAME,INSURANCE_TYPE_NAME,
ENABLE_FLAG,DELETE_FLAG,CREATE_BY,
CREATE_NAME,CREATE_TIME,UPDATE_BY,
UPDATE_TIME
</sql>
<select id="getInsurancePolicyListPage" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"></include>
FROM t_insurance_policy
where DELETE_FLAG = 0
<if test="param.policyNo != null and param.policyNo.trim() != ''">
and POLICY_NO like concat('%',replace(replace(#{param.policyNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd == null">
AND DATE(POLICY_START) <![CDATA[ >= ]]> #{param.policyStart}
</if>
<if test="param.policyEnd != null and param.policyEnd.trim() != '' and param.policyStart == null">
AND DATE(POLICY_END) <![CDATA[ <= ]]> #{param.policyEnd}
</if>
<if test="param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd != null and param.policyEnd.trim() != ''">
and (
(DATE(POLICY_START) <![CDATA[ >= ]]> #{param.policyStart} and DATE(POLICY_START) <![CDATA[ <= ]]> #{param.policyEnd}) OR
(DATE(POLICY_END) <![CDATA[ >= ]]> #{param.policyStart} and DATE(POLICY_END) <![CDATA[ <= ]]> #{param.policyEnd})
)
</if>
<if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''">
and INSURANCE_COMPANY_NAME like concat('%',replace(replace(#{param.insuranceCompanyName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.insuranceTypeName != null and param.insuranceTypeName.trim() != ''">
and INSURANCE_TYPE_NAME like concat('%',replace(replace(#{param.insuranceTypeName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.enableFlag != null">
and ENABLE_FLAG = #{param.enableFlag}
</if>
ORDER BY CREATE_TIME DESC
</select>
<select id="getInsurancePolicyList" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"></include>
FROM t_insurance_policy
where DELETE_FLAG = 0
<if test="param.policyNo != null and param.policyNo.trim() != ''">
and POLICY_NO like concat('%',replace(replace(#{param.policyNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd == null">
AND DATE(POLICY_START) <![CDATA[ >= ]]> #{param.policyStart}
</if>
<if test="param.policyEnd != null and param.policyEnd.trim() != '' and param.policyStart == null">
AND DATE(POLICY_END) <![CDATA[ <= ]]> #{param.policyEnd}
</if>
<if test="param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd != null and param.policyEnd.trim() != ''">
and (
(DATE(POLICY_START) <![CDATA[ >= ]]> #{param.policyStart} and DATE(POLICY_START) <![CDATA[ <= ]]> #{param.policyEnd}) OR
(DATE(POLICY_END) <![CDATA[ >= ]]> #{param.policyStart} and DATE(POLICY_END) <![CDATA[ <= ]]> #{param.policyEnd})
)
</if>
<if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''">
and INSURANCE_COMPANY_NAME like concat('%',replace(replace(#{param.insuranceCompanyName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.insuranceTypeName != null and param.insuranceTypeName.trim() != ''">
and INSURANCE_TYPE_NAME like concat('%',replace(replace(#{param.insuranceTypeName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.enableFlag != null">
and ENABLE_FLAG = #{param.enableFlag}
</if>
ORDER BY CREATE_TIME DESC
</select>
</mapper>
...@@ -63,11 +63,11 @@ ...@@ -63,11 +63,11 @@
update update
t_insurance_refund t_insurance_refund
set set
REFUND_MONEY = #{refundMoney}, REFUND_MONEY = #{param.refundMoney},
UPDATE_BY = #{updateBy}, UPDATE_BY = #{param.updateBy},
UPDATE_TIME = #{updateTime} UPDATE_TIME = #{param.updateTime}
where where
INS_DETAIL_ID = #{insDetailId} ID = #{param.id}
</update> </update>
<select id="getByInsDetailId" resultType="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceRefund"> <select id="getByInsDetailId" resultType="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceRefund">
......
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