Commit ccaf93b9 authored by huyuchen's avatar huyuchen

huych-到账明细查询

parent 6ce81ef2
...@@ -2,6 +2,8 @@ package com.yifu.cloud.plus.v1.ekp.vo; ...@@ -2,6 +2,8 @@ package com.yifu.cloud.plus.v1.ekp.vo;
import lombok.Data; import lombok.Data;
import java.time.LocalDateTime;
/** /**
* @author huych * @author huych
* @description 入账明细推送 * @description 入账明细推送
...@@ -28,7 +30,7 @@ public class EKPEntryPushParam { ...@@ -28,7 +30,7 @@ public class EKPEntryPushParam {
/** /**
* 入账日期 * 入账日期
*/ */
private String fd_date; private LocalDateTime fd_date;
/** /**
* 到款单位 * 到款单位
...@@ -58,7 +60,7 @@ public class EKPEntryPushParam { ...@@ -58,7 +60,7 @@ public class EKPEntryPushParam {
/** /**
* 数据同步时间 * 数据同步时间
*/ */
private String fd_daTime; private LocalDateTime fd_daTime;
/** /**
* 系统交易流水号 * 系统交易流水号
......
...@@ -22,6 +22,7 @@ import com.yifu.cloud.plus.v1.ekp.mapper.EkpSocialInfoMapper; ...@@ -22,6 +22,7 @@ import com.yifu.cloud.plus.v1.ekp.mapper.EkpSocialInfoMapper;
import com.yifu.cloud.plus.v1.ekp.service.IcbcTransactionFlowQueryService; import com.yifu.cloud.plus.v1.ekp.service.IcbcTransactionFlowQueryService;
import com.yifu.cloud.plus.v1.ekp.vo.EKPEntryPushParam; import com.yifu.cloud.plus.v1.ekp.vo.EKPEntryPushParam;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil; import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.LocalDateTimeUtils;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import io.micrometer.core.instrument.util.StringUtils; import io.micrometer.core.instrument.util.StringUtils;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
...@@ -34,6 +35,7 @@ import org.springframework.util.LinkedMultiValueMap; ...@@ -34,6 +35,7 @@ import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap; import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
import java.text.ParseException;
import java.time.LocalTime; import java.time.LocalTime;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -155,14 +157,18 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -155,14 +157,18 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
//封装数据 //封装数据
if (!insertList.isEmpty()) { if (!insertList.isEmpty()) {
log.error("到账明细条数:" + insertList.size()); log.error("到账明细条数:" + insertList.size());
for (MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1 entry : insertList) { try {
EKPEntryPushParam pushParam = new EKPEntryPushParam(); for (MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1 entry : insertList) {
initValue(entry,pushParam,bankName,bankNo); EKPEntryPushParam pushParam = new EKPEntryPushParam();
String body = sendToEkp(pushParam); initValue(entry, pushParam, bankName, bankNo);
//重试 String body = sendToEkp(pushParam);
if (StringUtils.isBlank(body)){ //重试
sendToEkp(pushParam); if (StringUtils.isBlank(body)) {
sendToEkp(pushParam);
}
} }
}catch (Exception e) {
log.error("到账明细数据推送失败",e);
} }
} }
} }
...@@ -364,17 +370,19 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -364,17 +370,19 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
} }
public void initValue(MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1 entry, public void initValue(MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1 entry,
EKPEntryPushParam pushParam,String bankName,String bankNo) { EKPEntryPushParam pushParam,String bankName,String bankNo) throws ParseException {
pushParam.setFd_recipName(entry.getRecipName()); pushParam.setFd_recipName(entry.getRecipName());
pushParam.setFd_recipAccountNo(entry.getRecipAccountNo()); pushParam.setFd_recipAccountNo(entry.getRecipAccountNo());
pushParam.setFd_recipBkName(entry.getRecipBkName()); pushParam.setFd_recipBkName(entry.getRecipBkName());
pushParam.setFd_date(entry.getBusiDate() + " " + entry.getBusiTime()); pushParam.setFd_date(LocalDateTimeUtils.convertDateToLDT(DateUtil.parseDate(entry.getBusiDate() + " "
+ entry.getBusiTime(),DateUtil.DATETIME_PATTERN_MINUTE)));
pushParam.setFd_receiveBkName(bankName); pushParam.setFd_receiveBkName(bankName);
pushParam.setFd_receiveBkNo(bankNo); pushParam.setFd_receiveBkNo(bankNo);
pushParam.setFd_remark(entry.getSummary()); pushParam.setFd_remark(entry.getSummary());
pushParam.setFd_receiveMoney(String.valueOf(entry.getCreditAmount()/100.0)); pushParam.setFd_receiveMoney(String.valueOf(entry.getCreditAmount()/100.0));
pushParam.setFd_daReal(entry.getBusiDate() + " " + entry.getBusiTime()); pushParam.setFd_daReal(entry.getBusiDate() + " " + entry.getBusiTime());
pushParam.setFd_daTime(entry.getBusiDate() + " " + entry.getBusiTime()); pushParam.setFd_daTime(LocalDateTimeUtils.convertDateToLDT(DateUtil.parseDate(entry.getBusiDate() + " "
+ entry.getBusiTime(),DateUtil.DATETIME_PATTERN_MINUTE)));
pushParam.setFd_onlySequence(entry.getOnlySequence()); pushParam.setFd_onlySequence(entry.getOnlySequence());
} }
} }
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