Commit c9a297af authored by zhaji's avatar zhaji

"feature-zhaJi:新增结算信息和封面抬头"

parent a4dab651
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
......@@ -179,10 +181,16 @@ public class InsuranceDetailVO implements Serializable {
private Integer reduceHandleStatus;
/**
* 结算办理状态 1待结算 2结算中 3已结算
* 预估结算办理状态 1待结算 2结算中 3已结算
*/
@Schema(description = "结算办理状态 1待结算 2结算中 3已结算")
private Integer settleHandleStatus;
@Schema(description = "预估结算办理状态 1待结算 2结算中 3已结算")
private String estimateSettleStatus;
/**
* 实缴结算办理状态 1待结算 2结算中 3已结算
*/
@Schema(description = "实缴结算办理状态 1待结算 2结算中 3已结算")
private String actualSettleStatus;
/**
* 是否出险 0未出险 1已出险
......@@ -342,4 +350,11 @@ public class InsuranceDetailVO implements Serializable {
*/
@Schema(description = "退保结算状态 :预留字段,暂时都是空(减员类型专用)")
private String surrenderSettleStatus;
/**
* 默认结算信息id
*/
@Schema(description = "默认结算信息id")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String defaultSettleId;
}
......@@ -763,6 +763,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (null != insuranceDetailVO){
long day = LocalDateUtil.betweenDay(insuranceDetailVO.getPolicyStart().toString(),insuranceDetailVO.getPolicyEnd().toString());
long month = LocalDateUtil.betweenMonth(insuranceDetailVO.getPolicyStart().toString(),insuranceDetailVO.getPolicyEnd().toString());
String defaultSettleId = insuranceDetailVO.getDefaultSettleId();
if(StringUtils.isNotBlank(defaultSettleId)){
SettleVo settleVo = getInsuranceDetailSettleStatus(id, defaultSettleId);
if(!Common.isEmpty(settleVo)){
insuranceDetailVO.setEstimateSettleStatus(settleVo.getEstimateStatus());
insuranceDetailVO.setActualSettleStatus(settleVo.getActualStatus());
}
}
//购买周期
String buyCycle = month + "个月/" + day + "天";
insuranceDetailVO.setBuyCycle(buyCycle);
......@@ -878,6 +886,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
ProjectSetInfoVo jsonObject = data.get(record.getDeptNo());
if (null != jsonObject){
record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse(""));
record.setInvoiceTitle(Optional.ofNullable(jsonObject.getInvoiceTitle()).orElse(""));
}
//购买月数
record.setBuyMonth(LocalDateUtil.betweenMonth(record.getPolicyStart().toString(),record.getPolicyEnd().toString()));
......@@ -1468,10 +1477,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
//如果当前保单为单独结算
if(settleType == CommonConstants.ZERO_INT){
if(settleType == CommonConstants.ONE_INT){
//推送过实缴信息且金额与本次不一致,则推送更新
if(StringUtils.isNotBlank(defaultSettleId)
&& (new BigDecimal(success.getActualPremium()).compareTo(detail.getActualPremium()) != 0)){
if(StringUtils.isNotBlank(defaultSettleId) && (new BigDecimal(success.getActualPremium()).compareTo(detail.getActualPremium()) != 0)){
//推送保费更新
TInsuranceSettle settle = tInsuranceSettleService.getById(detail.getDefaultSettleId());
settle.setActualPremium(new BigDecimal(success.getActualPremium()));
......@@ -3575,6 +3583,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TInsuranceDetail byId = getById(ekpInteractiveParam.getDetailId());
BeanCopyUtils.copyProperties(byId,ekpInteractiveParam);
ekpInteractiveParam.setInteractiveType(InsurancesConstants.UPDATE_SETTLE_BILL);
if (byId.getSettleType() == CommonConstants.ZERO_INT){
ekpInteractiveParam.setEstimateStatus(EkpConstants.HAVE);
}else{
ekpInteractiveParam.setEstimateStatus(EkpConstants.NOTHING);
}
String body = eKPInsuranceUtil.sendToEkp(ekpInteractiveParam);
if (!StringUtils.isBlank(body)){
TInsuranceOperate insuranceOperate = new TInsuranceOperate();
......
......@@ -285,7 +285,6 @@
detail.SETTLE_MONTH as settleMonth,
detail.BUY_HANDLE_STATUS as buyHandleStatus,
detail.REDUCE_HANDLE_STATUS as reduceHandleStatus,
tis.SETTLE_HANDLE_STATUS as settleHandleStatus,
detail.IS_USE as isUse,
detail.IS_EFFECT as isEffect,
detail.IS_OVERDUE as isOverdue,
......@@ -301,7 +300,8 @@
detail.CREATE_TIME as createTime,
detail.REMARK as remark,
detail.BILLING_TYPE as billingType,
detail.RATE as rate
detail.DEFAULT_SETTLE_ID as defaultSettleId,
detail.RATE as rate
from t_insurance_detail detail
left join t_insurance_settle tis on detail.DEFAULT_SETTLE_ID = tis.ID
where detail.ID = #{id}
......
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