Commit 2b7c509c authored by 查济's avatar 查济

Merge branch 'feature-zhaji' into 'develop'

Feature zhaji

See merge request fangxinjiang/yifu!194
parents b5958210 0443938c
......@@ -243,6 +243,8 @@ public interface CommonConstants {
int FIVE_INT = 5;
String TEN_STRING = "10";
int SEVEN_INT = 7;
public static final String SPOT = ".";
int FIFTY_INT = 50;
......
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 lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
/**
......@@ -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;
......
......@@ -85,7 +85,7 @@ public class EKPUtil {
public static String sendToEKP(EKPInteractiveParam param){
log.info("推送EKP开始");
RestTemplate yourRestTemplate = new RestTemplate();
TInsuranceSettlePushParam pushParam = InsuranceDetail2PushParam(param);
TInsuranceSettlePushParam pushParam = insuranceDetail2PushParam(param);
try{
String formValues = new ObjectMapper().writeValueAsString(pushParam);
//指向EKP的接口url
......@@ -134,7 +134,7 @@ public class EKPUtil {
* @param param 转换类
* @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"));
TInsuranceSettlePushParam pushParam = new TInsuranceSettlePushParam();
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 {
@Schema(description = "状态:1新增结算单,2更新结算单信息,3作废结算单信息")
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;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceEkp;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* @author Administrator
* @description 针对表【t_insurance_ekp(ekp交互失败存储表)】的数据库操作Mapper
......@@ -13,5 +15,13 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
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
@Override
public R resend() {
LambdaQueryWrapper<TInsuranceEkp> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(TInsuranceEkp :: getResendFlag , CommonConstants.ZERO_INT);
queryWrapper.orderByDesc(TInsuranceEkp::getDetailId);
queryWrapper.orderByAsc(TInsuranceEkp::getCreateTime);
List<TInsuranceEkp> list = list(queryWrapper);
if (CollectionUtils.isNotEmpty(list)){
for (TInsuranceEkp tInsuranceEkp : list) {
List<TInsuranceEkp> ekpRefundList = this.baseMapper.getEkpRefundList();
if (CollectionUtils.isNotEmpty(ekpRefundList)){
for (TInsuranceEkp tInsuranceEkp : ekpRefundList) {
EKPInteractiveParam ekpParam = new EKPInteractiveParam();
BeanCopyUtils.copyProperties(tInsuranceEkp,ekpParam);
String detailId = ekpParam.getDetailId();
......
......@@ -31,6 +31,8 @@
<result property="resendFlag" column="RESEND_FLAG" jdbcType="VARCHAR"/>
<result property="createTime" column="CREATE_TIME" jdbcType="TIMESTAMP"/>
<result property="pushTime" column="PUSH_TIME" jdbcType="TIMESTAMP"/>
<result property="pushType" column="PUSH_TYPE" jdbcType="TINYINT"/>
</resultMap>
<sql id="Base_Column_List">
......@@ -42,8 +44,17 @@
POLICY_END,BUY_STANDARD,MEDICAL_QUOTA,
DIE_DISABLE_QUOTA,ACTUAL_PREMIUM,ESTIMATE_PREMIUM,
SETTLE_MONTH,INTERACTIVE_TYPE,RESEND_FLAG,
CREATE_TIME,PUSH_TIME
CREATE_TIME,PUSH_TIME,PUSH_TYPE
</sql>
<select id="getEkpRefundList" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"></include>
from
t_insurance_ekp
where
RESEND_FLAG = 0
</select>
</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