Commit ec3e9b30 authored by zhaji's avatar zhaji

"feature-zhaJi:优化减员退回bug"

parent 84dba00e
...@@ -243,6 +243,8 @@ public interface CommonConstants { ...@@ -243,6 +243,8 @@ public interface CommonConstants {
int FIVE_INT = 5; int FIVE_INT = 5;
String TEN_STRING = "10"; String TEN_STRING = "10";
int SEVEN_INT = 7;
public static final String SPOT = "."; public static final String SPOT = ".";
int FIFTY_INT = 50; int FIFTY_INT = 50;
......
package com.yifu.cloud.plus.v1.yifu.insurances.entity; package com.yifu.cloud.plus.v1.yifu.insurances.entity;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date; import java.util.Date;
/** /**
...@@ -136,12 +138,18 @@ public class TInsuranceEkp implements Serializable { ...@@ -136,12 +138,18 @@ public class TInsuranceEkp implements Serializable {
/** /**
* 创建时间 * 创建时间
*/ */
private Date createTime; private LocalDateTime createTime;
/** /**
* 发送时间 * 发送时间
*/ */
private Date pushTime; private LocalDateTime pushTime;
/**
* EKP推送类型
*/
@Schema(description = "1推送预估费用,2推送实缴费用,3变更结算月,4推送作废信息,5推送红冲信息,6投保退回红冲,7变更保单保费")
private Integer pushType;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
......
...@@ -85,7 +85,7 @@ public class EKPUtil { ...@@ -85,7 +85,7 @@ public class EKPUtil {
public static String sendToEKP(EKPInteractiveParam param){ public static String sendToEKP(EKPInteractiveParam param){
log.info("推送EKP开始"); log.info("推送EKP开始");
RestTemplate yourRestTemplate = new RestTemplate(); RestTemplate yourRestTemplate = new RestTemplate();
TInsuranceSettlePushParam pushParam = InsuranceDetail2PushParam(param); TInsuranceSettlePushParam pushParam = insuranceDetail2PushParam(param);
try{ try{
String formValues = new ObjectMapper().writeValueAsString(pushParam); String formValues = new ObjectMapper().writeValueAsString(pushParam);
//指向EKP的接口url //指向EKP的接口url
...@@ -134,7 +134,7 @@ public class EKPUtil { ...@@ -134,7 +134,7 @@ public class EKPUtil {
* @param param 转换类 * @param param 转换类
* @return {@link TInsuranceSettlePushParam} * @return {@link TInsuranceSettlePushParam}
*/ */
public static TInsuranceSettlePushParam InsuranceDetail2PushParam(EKPInteractiveParam param){ public static TInsuranceSettlePushParam insuranceDetail2PushParam(EKPInteractiveParam param){
String format = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); String format = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
TInsuranceSettlePushParam pushParam = new TInsuranceSettlePushParam(); TInsuranceSettlePushParam pushParam = new TInsuranceSettlePushParam();
param.setHappenDate(format); param.setHappenDate(format);
......
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
/**
* @author zhaji
* @description TODO
* @date 2022-08-08 17:59:20
*/
@Data
public class EKP {
@Value("${ekp.url}")
private String url;
@Value("${ekp.fdModelId}")
private String fdModelId;
@Value("${ekp.fdFlowId}")
private String fdFlowId;
@Value("${ekp.docStatus}")
private String docStatus;
@Value("${ekp.docSubject}")
private String docSubject;
}
...@@ -165,4 +165,10 @@ public class EKPInteractiveParam implements Serializable { ...@@ -165,4 +165,10 @@ public class EKPInteractiveParam implements Serializable {
@Schema(description = "状态:1新增结算单,2更新结算单信息,3作废结算单信息") @Schema(description = "状态:1新增结算单,2更新结算单信息,3作废结算单信息")
private Integer interactiveType; private Integer interactiveType;
/**
* EKP推送类型
*/
@Schema(description = "1推送预估费用,2推送实缴费用,3变更结算月,4推送作废信息,5推送红冲信息,6投保退回红冲,7变更保单保费")
private Integer pushType;
} }
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;
/**
* @author zhaji
* @description EKP结算信息表
* @date 2022-08-24 17:37:21
*/
@Data
@Tag(name = "EKP结算信息表")
public class SettleVo implements Serializable {
/**
* 结算id
*/
@Schema(description = "结算id")
private String fd_3b05ba46bb042e;
/**
* 预估单结算状态
*/
@Schema(description = "预估单结算状态:未结算、已结算、结算中、无需结算")
private String fd_3b05ba4808a3ca;
/**
* 实缴单结算状态
*/
@Schema(description = "实缴单结算状态:未结算、已结算、结算中、无需结算")
private String fd_3b05bd5ed0b976;
}
...@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceEkp; import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceEkp;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/** /**
* @author Administrator * @author Administrator
* @description 针对表【t_insurance_ekp(ekp交互失败存储表)】的数据库操作Mapper * @description 针对表【t_insurance_ekp(ekp交互失败存储表)】的数据库操作Mapper
...@@ -13,5 +15,13 @@ import org.apache.ibatis.annotations.Mapper; ...@@ -13,5 +15,13 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper @Mapper
public interface TInsuranceEkpMapper extends BaseMapper<TInsuranceEkp> { public interface TInsuranceEkpMapper extends BaseMapper<TInsuranceEkp> {
/**
* 获取所有待发送的ekp
*
* @author zhaji
* @param
* @return {@link List< TInsuranceEkp>}
*/
List<TInsuranceEkp> getEkpRefundList();
} }
...@@ -24,13 +24,9 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T ...@@ -24,13 +24,9 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
@Override @Override
public R resend() { public R resend() {
LambdaQueryWrapper<TInsuranceEkp> queryWrapper = new LambdaQueryWrapper<>(); List<TInsuranceEkp> ekpRefundList = this.baseMapper.getEkpRefundList();
queryWrapper.eq(TInsuranceEkp :: getResendFlag , CommonConstants.ZERO_INT); if (CollectionUtils.isNotEmpty(ekpRefundList)){
queryWrapper.orderByDesc(TInsuranceEkp::getDetailId); for (TInsuranceEkp tInsuranceEkp : ekpRefundList) {
queryWrapper.orderByAsc(TInsuranceEkp::getCreateTime);
List<TInsuranceEkp> list = list(queryWrapper);
if (CollectionUtils.isNotEmpty(list)){
for (TInsuranceEkp tInsuranceEkp : list) {
EKPInteractiveParam ekpParam = new EKPInteractiveParam(); EKPInteractiveParam ekpParam = new EKPInteractiveParam();
BeanCopyUtils.copyProperties(tInsuranceEkp,ekpParam); BeanCopyUtils.copyProperties(tInsuranceEkp,ekpParam);
String detailId = ekpParam.getDetailId(); String detailId = ekpParam.getDetailId();
......
...@@ -31,6 +31,8 @@ ...@@ -31,6 +31,8 @@
<result property="resendFlag" column="RESEND_FLAG" jdbcType="VARCHAR"/> <result property="resendFlag" column="RESEND_FLAG" jdbcType="VARCHAR"/>
<result property="createTime" column="CREATE_TIME" jdbcType="TIMESTAMP"/> <result property="createTime" column="CREATE_TIME" jdbcType="TIMESTAMP"/>
<result property="pushTime" column="PUSH_TIME" jdbcType="TIMESTAMP"/> <result property="pushTime" column="PUSH_TIME" jdbcType="TIMESTAMP"/>
<result property="pushType" column="PUSH_TYPE" jdbcType="TINYINT"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
...@@ -42,8 +44,17 @@ ...@@ -42,8 +44,17 @@
POLICY_END,BUY_STANDARD,MEDICAL_QUOTA, POLICY_END,BUY_STANDARD,MEDICAL_QUOTA,
DIE_DISABLE_QUOTA,ACTUAL_PREMIUM,ESTIMATE_PREMIUM, DIE_DISABLE_QUOTA,ACTUAL_PREMIUM,ESTIMATE_PREMIUM,
SETTLE_MONTH,INTERACTIVE_TYPE,RESEND_FLAG, SETTLE_MONTH,INTERACTIVE_TYPE,RESEND_FLAG,
CREATE_TIME,PUSH_TIME CREATE_TIME,PUSH_TIME,PUSH_TYPE
</sql> </sql>
<select id="getEkpRefundList" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"></include>
from
t_insurance_ekp
where
RESEND_FLAG = 0
</select>
</mapper> </mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment