Commit 8e4a12ac authored by chenyuxi's avatar chenyuxi

feat: 校验是否有流水的账户

parent f507b2e9
...@@ -223,57 +223,62 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -223,57 +223,62 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
} }
// 重新过滤已存入【入账记录】的流水信息 // 重新过滤已存入【入账记录】的流水信息
for (String account : accountRecordListMap.keySet()) { if(accountRecordListMap.keySet().size()>0){
// 获取当前账号下的流水 for (String account : accountRecordListMap.keySet()) {
List<MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1> flowRecordList = accountRecordListMap.get(account); // 获取当前账号下的流水
List<MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1> flowRecordList = accountRecordListMap.get(account);
// 获取成功后根据流水号去重和根据借贷标志02筛选出所有数据
if (!flowRecordList.isEmpty()) { // 获取成功后根据流水号去重和根据借贷标志02筛选出所有数据
if (!flowRecordList.isEmpty()) {
// 获取当前账户下的入账记录:账号为key,账户下入账记录列表作为value
List<String> serioListByAccount = serioMapByAccount.get(account); // 获取当前账户下的入账记录:账号为key,账户下入账记录列表作为value
if(serioListByAccount == null || serioListByAccount.isEmpty()){ List<String> serioListByAccount = serioMapByAccount.get(account);
serioListByAccount = new ArrayList<>(); if(serioListByAccount == null || serioListByAccount.isEmpty()){
} serioListByAccount = new ArrayList<>();
}
// 过滤出需要新增流水的数据 // 过滤出需要新增流水的数据
List<MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1> insertList = new ArrayList<>(); List<MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1> insertList = new ArrayList<>();
for (MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1 flowRecord : flowRecordList) { for (MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1 flowRecord : flowRecordList) {
if("2".equals(flowRecord.getDrcrf()) && !serioListByAccount.contains(flowRecord.getOnlySequence())){ if("2".equals(flowRecord.getDrcrf()) && !serioListByAccount.contains(flowRecord.getOnlySequence())){
insertList.add(flowRecord); insertList.add(flowRecord);
}
} }
}
// 重新存入账号流水Map里 // 重新存入账号流水Map里
accountRecordListMap.put(account, insertList); accountRecordListMap.put(account, insertList);
}
} }
}
// 存入过滤后的流水信息到【入账记录】 // 存入过滤后的流水信息到【入账记录】
for (String account : accountRecordListMap.keySet()) { for (String account : accountRecordListMap.keySet()) {
List<MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1> saveList = accountRecordListMap.get(account); List<MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1> saveList = accountRecordListMap.get(account);
// 封装数据 // 封装数据
if (saveList != null && !saveList.isEmpty()) { if (saveList != null && !saveList.isEmpty()) {
String bankName = accountInfoMap.get(account); String bankName = accountInfoMap.get(account);
log.info("需要存的流水到账--银行名称:" + bankName); log.info("需要存的流水到账--银行名称:" + bankName);
log.info("需要存的流水到账--明细条数:" + saveList.size()); log.info("需要存的流水到账--明细条数:" + saveList.size());
try { try {
for (MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1 entry : saveList) { for (MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1 entry : saveList) {
EKPEntryPushParam pushParam = new EKPEntryPushParam(); EKPEntryPushParam pushParam = new EKPEntryPushParam();
initValue(entry, pushParam, bankName, account); initValue(entry, pushParam, bankName, account);
String body = sendToEkp(pushParam); String body = sendToEkp(pushParam);
// 重试一次 // 重试一次
if (StringUtils.isBlank(body)) { if (StringUtils.isBlank(body)) {
sendToEkp(pushParam); sendToEkp(pushParam);
}
} }
}catch (Exception e) {
log.error("到账明细数据推送失败",e);
} }
}catch (Exception e) {
log.error("到账明细数据推送失败",e);
} }
} }
} }
return R.ok(); return R.ok();
} }
......
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