feat: BFI 新增 A801-5 黑名单查询接口对接
- GET /ierp/kapi/v2/awrp/bdm/bdm_blacklist_config/blacklistquery,enable 使用状态参数,URL 经 thirdParty.bfi.blacklistQueryUrl 可配 - 返回字段保留金蝶原名(number 企业税号、awrp_combofield 失信类别 A 禁止交易类/B 风险警示类等) - 规格来源为接口文档 xlsx(apifox 无此接口,xlsx 示例为 A801-1 错拷不可信),契约形态按 GET+query param 实现,联调若为 rim 形态仅需调整 BfiServiceImpl 单方法
This commit is contained in:
+13
@@ -30,6 +30,7 @@ import org.springblade.thirdparty.bfi.config.BfiFeignClientConfig;
|
||||
import org.springblade.thirdparty.bfi.constant.BfiConstant;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiApBillSaveBodyDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiArBillSaveBodyDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiBlacklistQueryDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiClaimPushBodyDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiCustomerSaveBodyDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiInvoiceApplyOpenApiBodyDTO;
|
||||
@@ -48,6 +49,7 @@ import org.springblade.thirdparty.bfi.pojo.dto.BfiVerifyTokenDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiWithdrawTokenDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiApBillVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiArBillVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiBlacklistVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiAttachmentUploadVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiBillSaveResultVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiClaimAnnounceVO;
|
||||
@@ -111,6 +113,7 @@ public interface IBfiClient {
|
||||
String INVOICE_POOL_QUERY_URL = "${thirdParty.bfi.invoicePoolQueryUrl:/ierp/kapi/v2/awrp/rim/rim_invoice/query}";
|
||||
String INVOICE_DOWNLOAD_URL = "${thirdParty.bfi.invoiceDownloadUrl:/ierp/kapi/v2/awrp/bosext/attachment/download}";
|
||||
String ATTACHMENT_UPLOAD_URL = "${thirdParty.bfi.attachmentUploadUrl:/ierp/kapi/v2/frame/attachment/uploadFile}";
|
||||
String BLACKLIST_QUERY_URL = "${thirdParty.bfi.blacklistQueryUrl:/ierp/kapi/v2/awrp/bdm/bdm_blacklist_config/blacklistquery}";
|
||||
|
||||
/**
|
||||
* A100-1 获取令牌
|
||||
@@ -149,6 +152,16 @@ public interface IBfiClient {
|
||||
@GetMapping(FOREX_QUERY_URL)
|
||||
BfiResultVO<BfiPageVO<BfiExchangeRateVO>> forexQuery(@RequestHeader(BfiConstant.HEADER_ACCESS_TOKEN) String accessToken, @SpringQueryMap BfiExchangeRateQueryDTO param);
|
||||
|
||||
/**
|
||||
* A801-5 黑名单查询
|
||||
*
|
||||
* @param accessToken 访问令牌,通过 getToken 获取
|
||||
* @param param 请求参数
|
||||
* @return 黑名单列表
|
||||
*/
|
||||
@GetMapping(BLACKLIST_QUERY_URL)
|
||||
BfiResultVO<List<BfiBlacklistVO>> blacklistQuery(@RequestHeader(BfiConstant.HEADER_ACCESS_TOKEN) String accessToken, @SpringQueryMap BfiBlacklistQueryDTO param);
|
||||
|
||||
/**
|
||||
* A103-1 付款申请保存(根据星瀚应付下推付款申请)
|
||||
*
|
||||
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.thirdparty.bfi.pojo.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 业财融合(BFI)A801-5 黑名单查询参数
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class BfiBlacklistQueryDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 使用状态[1:可用, 0:禁用]
|
||||
*/
|
||||
private String enable;
|
||||
}
|
||||
+108
@@ -0,0 +1,108 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.thirdparty.bfi.pojo.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 业财融合(BFI)A801-5 黑名单查询返回结果
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
public class BfiBlacklistVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
/**
|
||||
* 企业税号
|
||||
*/
|
||||
private String number;
|
||||
/**
|
||||
* 企业名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 数据状态[A:暂存, B:已提交, C:已审核]
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 数据状态标题
|
||||
*/
|
||||
@JsonProperty("status_title")
|
||||
private String statusTitle;
|
||||
/**
|
||||
* 使用状态[0:禁用, 1:可用]
|
||||
*/
|
||||
private String enable;
|
||||
/**
|
||||
* 使用状态标题
|
||||
*/
|
||||
@JsonProperty("enable_title")
|
||||
private String enableTitle;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String createtime;
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private String modifytime;
|
||||
/**
|
||||
* 主数据内码
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long masterid;
|
||||
/**
|
||||
* 上报单位(部门)
|
||||
*/
|
||||
@JsonProperty("awrp_textfield1")
|
||||
private String awrpTextfield1;
|
||||
/**
|
||||
* 失信类别[A:禁止交易类, B:风险警示类]
|
||||
*/
|
||||
private String awrpCombofield;
|
||||
/**
|
||||
* 失信类别标题
|
||||
*/
|
||||
@JsonProperty("awrp_combofield_title")
|
||||
private String awrpCombofieldTitle;
|
||||
/**
|
||||
* 列入事由
|
||||
*/
|
||||
@JsonProperty("awrp_textareafield")
|
||||
private String awrpTextareafield;
|
||||
}
|
||||
+9
@@ -51,6 +51,7 @@ import org.springblade.thirdparty.bfi.pojo.vo.BfiApBillVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiArBillVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiAttachmentUploadVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiBillSaveResultVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiBlacklistVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiClaimAnnounceVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiCustomerVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiExchangeRateVO;
|
||||
@@ -124,6 +125,14 @@ public interface IBfiService {
|
||||
*/
|
||||
List<BfiExchangeRateVO> queryExchangeRate(LocalDate effectdate, LocalDate effectdateE);
|
||||
|
||||
/**
|
||||
* A801-5 黑名单查询
|
||||
*
|
||||
* @param enable 使用状态[1:可用, 0:禁用]
|
||||
* @return 黑名单列表
|
||||
*/
|
||||
List<BfiBlacklistVO> queryBlacklist(String enable);
|
||||
|
||||
/**
|
||||
* A103-1 付款申请保存(根据星瀚应付下推付款申请)
|
||||
*
|
||||
|
||||
+14
@@ -42,6 +42,7 @@ import org.springblade.thirdparty.bfi.pojo.dto.BfiApBillSaveDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiArBillQueryDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiArBillSaveBodyDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiArBillSaveDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiBlacklistQueryDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiClaimAnnounceQueryDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiClaimPushBodyDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiClaimPushDTO;
|
||||
@@ -76,6 +77,7 @@ import org.springblade.thirdparty.bfi.pojo.vo.BfiApBillVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiArBillVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiAttachmentUploadVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiBillSaveResultVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiBlacklistVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiClaimAnnounceVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiCustomerVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiExchangeRateVO;
|
||||
@@ -219,6 +221,18 @@ public class BfiServiceImpl implements IBfiService {
|
||||
return queryExchangeRate(effectdate.format(DATE_FORMATTER), effectdateE.format(DATE_FORMATTER));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BfiBlacklistVO> queryBlacklist(String enable) {
|
||||
if (StringUtil.isBlank(enable)) {
|
||||
throw new BfiException("查询BFI黑名单失败,使用状态不能为空");
|
||||
}
|
||||
BfiBlacklistQueryDTO param = new BfiBlacklistQueryDTO();
|
||||
param.setEnable(enable);
|
||||
String accessToken = getAccessToken();
|
||||
BfiResultVO<List<BfiBlacklistVO>> result = commonCall("黑名单查询", () -> client.blacklistQuery(accessToken, param));
|
||||
return result.getData() != null ? result.getData() : List.of();
|
||||
}
|
||||
|
||||
@Override
|
||||
public BfiBillSaveResultVO pushPayApply(BfiPayApplyPushDTO param) {
|
||||
if (param == null || StringUtil.isBlank(param.getAwrpSrcCode()) || StringUtil.isBlank(param.getAwrpSrcSys())) {
|
||||
|
||||
Reference in New Issue
Block a user