Commit fea7a90f authored by fangxinjiang's avatar fangxinjiang

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

parents f4010f89 b47ab982
......@@ -546,6 +546,11 @@ public class InsurancesConstants {
*/
public static final String USER_DATA_IS_NOT_EXIST = "员工投保信息不存在";
/**
* 存在多条在保记录
*/
public static final String MULTIPLE_RECORDS_UNDER_WARRANTY = "存在多条在保记录";
/***********************商险产品错误码********************************/
/**
......
package com.yifu.cloud.plus.v1.yifu.insurances.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.*;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
......@@ -219,6 +217,7 @@ public class TInsuranceDetail extends BaseEntity {
* 默认结算信息id
*/
@Schema(description = "默认结算信息id")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String defaultSettleId;
/**
......
......@@ -128,7 +128,7 @@ public class InsuranceBatchParam implements Serializable {
* 险种主键
*/
@JsonIgnore
private String insuranceTypeId;
private Long insuranceTypeId;
/**
* 商险购买地省code
......
......@@ -155,5 +155,5 @@ public class InsuranceEditParam implements Serializable {
* 险种主键
*/
@JsonIgnore
private String insuranceTypeId;
private Long insuranceTypeId;
}
......@@ -395,7 +395,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
// 这里计算好赋值,是为了方便入库
param.setMedicalQuota(typeStandard.getMedicalQuota());
param.setDieDisableQuota(typeStandard.getDieDisableQuota());
param.setInsuranceTypeId(typeStandard.getInsuranceTypeId());
param.setInsuranceTypeId(Long.parseLong(typeStandard.getInsuranceTypeId()));
}
}
}
......@@ -1421,7 +1421,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
// 这里计算好赋值,是为了方便入库
param.setMedicalQuota(typeStandard.getMedicalQuota());
param.setDieDisableQuota(typeStandard.getDieDisableQuota());
param.setInsuranceTypeId(typeStandard.getInsuranceTypeId());
param.setInsuranceTypeId(Long.parseLong(typeStandard.getInsuranceTypeId()));
}
}
}
......@@ -2334,6 +2334,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
tInsuranceDetail.setReduceHandleStatus(refundType);
if(CommonConstants.FOUR_INT == refundType){
tInsuranceDetail.setBuyHandleStatus(CommonConstants.FIVE_INT);
}else {
tInsuranceDetail.setBuyHandleStatus(CommonConstants.THREE_INT);
}
successList.add(tInsuranceDetail);
refund.setInsDetailId(tInsuranceDetail.getId());
......@@ -2625,9 +2627,17 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
LambdaQueryWrapper<TInsuranceDetail> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(TInsuranceDetail :: getDeleteFlag,CommonConstants.ZERO_INT).eq(TInsuranceDetail ::getEmpName,empName )
.eq(TInsuranceDetail ::getEmpIdcardNo,empIdCardNo ).eq(TInsuranceDetail :: getInsuranceCompanyName,insuranceCompanyName )
.eq(TInsuranceDetail :: getInsuranceTypeName,insuranceTypeName)
.eq(TInsuranceDetail :: getInsuranceTypeName,insuranceTypeName).eq(TInsuranceDetail :: getBuyHandleStatus,CommonConstants.THREE_INT)
.eq(TInsuranceDetail :: getPolicyStart,LocalDateUtil.parseLocalDate(policyStart))
.eq(TInsuranceDetail :: getPolicyEnd,LocalDateUtil.parseLocalDate(policyEnd));
//排除已减员的数据
queryWrapper.ne(TInsuranceDetail :: getBuyHandleStatus,CommonConstants.FIVE_INT);
List<TInsuranceDetail> list = list(queryWrapper);
if (list.size()>1){
param.setErrorMessage(InsurancesConstants.MULTIPLE_RECORDS_UNDER_WARRANTY);
errorList.add(param);
continue;
}
TInsuranceDetail one = getOne(queryWrapper);
if (Common.isEmpty(one)){
param.setErrorMessage(InsurancesConstants.USER_DATA_IS_NOT_EXIST);
......@@ -2860,6 +2870,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.eq(TInsuranceDetail :: getDeptNo,deptNo).eq(TInsuranceDetail :: getBuyStandard,buyStandard)
.eq(TInsuranceDetail :: getInsuranceTypeName,insuranceTypeName)
.eq(TInsuranceDetail :: getPolicyStart,LocalDateUtil.parseLocalDate(policyStart) ).eq(TInsuranceDetail :: getPolicyEnd,LocalDateUtil.parseLocalDate(policyEnd));
//排除已减员的数据
queryWrapper.ne(TInsuranceDetail :: getBuyHandleStatus,CommonConstants.FIVE_INT);
List<TInsuranceDetail> list = list(queryWrapper);
if (list.size()>1){
param.setErrorMessage(InsurancesConstants.MULTIPLE_RECORDS_UNDER_WARRANTY);
errorList.add(param);
continue;
}
TInsuranceDetail insuranceDetail = getOne(queryWrapper);
//如果保单信息为空
if (Common.isEmpty(insuranceDetail)){
......@@ -3032,28 +3050,22 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
//根据项目编码查询项目是否存在
R<SetInfoVo> setInfoByCodes = archivesDaprUtil.getSetInfoByCodes(Arrays.asList(newDeptNo));
if (null != setInfoByCodes && setInfoByCodes.getCode() != CommonConstants.SUCCESS) {
Map<String, ProjectSetInfoVo> data = setInfoByCodes.getData().getProjectSetInfoVoMap();
if (null != setInfoByCodes && setInfoByCodes.getCode() == CommonConstants.SUCCESS) {
Map<String, ProjectSetInfoVo> data = setInfoByCodes.getData().getProjectSetInfoVoMap();
if (MapUtils.isEmpty(data)){
param.setErrorMessage(InsurancesConstants.DEPT_NO_CHANGE_IS_NOT_EXIST);
param.setErrorMessage(InsurancesConstants.DEPT_NO_IS_NOT_EXIST);
errorList.add(param);
continue;
}else {
//结算类型,根据项目编码获取,并冗余到明细记录中
ProjectSetInfoVo jsonObject = data.get(newDeptNo);
if (null == jsonObject){
param.setErrorMessage(InsurancesConstants.DEPT_NO_CHANGE_IS_NOT_EXIST);
String settleType = jsonObject.getInsuranceSettleType();
if (StringUtils.isEmpty(settleType)){
param.setErrorMessage(InsurancesConstants.PROJECT_NOT_FIND_SETTLE_TYPE);
errorList.add(param);
continue;
}else {
//结算类型,根据项目编码获取,并冗余到明细记录中
String settleType = jsonObject.getInsuranceSettleType();
if (StringUtils.isEmpty(settleType)){
param.setErrorMessage(InsurancesConstants.PROJECT_NOT_FIND_SETTLE_TYPE);
errorList.add(param);
continue;
}else {
param.setNewSettleType(Integer.parseInt(settleType));
}
param.setNewSettleType(Integer.parseInt(settleType));
}
}
}
......@@ -3064,6 +3076,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.eq(TInsuranceDetail :: getBuyStandard,buyStandard).eq(TInsuranceDetail::getDeptNo,oldDeptNo)
.eq(TInsuranceDetail :: getInsuranceCompanyName,insuranceCompanyName)
.eq(TInsuranceDetail :: getPolicyStart,LocalDateUtil.parseLocalDate(policyStart)).eq(TInsuranceDetail :: getPolicyEnd,LocalDateUtil.parseLocalDate(policyEnd));
//排除已减员的数据
queryWrapper.ne(TInsuranceDetail :: getBuyHandleStatus,CommonConstants.FIVE_INT);
List<TInsuranceDetail> list = list(queryWrapper);
if (list.size()>1){
param.setErrorMessage(InsurancesConstants.MULTIPLE_RECORDS_UNDER_WARRANTY);
errorList.add(param);
continue;
}
TInsuranceDetail insuranceDetail = getOne(queryWrapper);
//如果保单信息为空
if (Common.isEmpty(insuranceDetail)){
......
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