!8 付款特批+履约计划履约记录(付款+开票+收票+收款)+金蝶编码取A901-1供应商接口返回的number
Merge pull request !8 from mindless/feature/20261027-hcs-bif-all
This commit is contained in:
+28
@@ -27,14 +27,20 @@ package org.springblade.thirdparty.bfi.config;
|
||||
|
||||
import feign.Request;
|
||||
import feign.RequestInterceptor;
|
||||
import feign.codec.Decoder;
|
||||
import feign.codec.Encoder;
|
||||
import feign.form.spring.SpringFormEncoder;
|
||||
import org.springblade.thirdparty.bfi.interceptor.BfiRequestInterceptor;
|
||||
import org.springframework.beans.factory.ObjectFactory;
|
||||
import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
|
||||
import org.springframework.cloud.openfeign.support.SpringDecoder;
|
||||
import org.springframework.cloud.openfeign.support.SpringEncoder;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
@@ -71,4 +77,26 @@ public class BfiFeignClientConfig {
|
||||
public Encoder feignFormEncoder(ObjectFactory<HttpMessageConverters> messageConverters) {
|
||||
return new SpringFormEncoder(new SpringEncoder(messageConverters));
|
||||
}
|
||||
|
||||
/**
|
||||
* BFI 专用解码器:金蝶部分接口成功响应缺失 Content-Type 头(kong 网关 chunked 转发丢失,
|
||||
* 如 cas_paybill/query),默认解码器按 application/octet-stream 匹配不到 JSON 转换器导致
|
||||
* "no suitable HttpMessageConverter" 解码失败。缺失 Content-Type 时强制按 JSON 解码,
|
||||
* 其余响应保持默认解码逻辑(含二进制下载接口)
|
||||
*/
|
||||
@Bean
|
||||
public Decoder bfiDecoder(ObjectFactory<HttpMessageConverters> messageConverters) {
|
||||
SpringDecoder defaultDecoder = new SpringDecoder(messageConverters);
|
||||
MappingJackson2HttpMessageConverter jacksonConverter = new MappingJackson2HttpMessageConverter();
|
||||
jacksonConverter.setSupportedMediaTypes(List.of(MediaType.APPLICATION_JSON, MediaType.ALL));
|
||||
SpringDecoder forceJsonDecoder = new SpringDecoder(() -> new HttpMessageConverters(jacksonConverter));
|
||||
return (response, type) -> {
|
||||
boolean missingContentType = response.headers().keySet().stream()
|
||||
.noneMatch("content-type"::equalsIgnoreCase);
|
||||
if (missingContentType) {
|
||||
return forceJsonDecoder.decode(response, type);
|
||||
}
|
||||
return defaultDecoder.decode(response, type);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
+10
@@ -250,6 +250,16 @@ public class BfiConstant {
|
||||
*/
|
||||
public static final String BILL_STATUS_RETURNED = "G";
|
||||
|
||||
/**
|
||||
* 使用状态:可用
|
||||
*/
|
||||
public static final String ENABLE_ENABLED = "1";
|
||||
|
||||
/**
|
||||
* 使用状态:禁用
|
||||
*/
|
||||
public static final String ENABLE_DISABLED = "0";
|
||||
|
||||
/**
|
||||
* 结算状态:未结算
|
||||
*/
|
||||
|
||||
+42
@@ -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.BfiBankQueryDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiBillLockDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiBlacklistQueryDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiClaimPushBodyDTO;
|
||||
@@ -50,6 +51,7 @@ 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.BfiAttachmentUploadVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiBankVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiBillLockResultVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiBillSaveResultVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiBlacklistVO;
|
||||
@@ -65,6 +67,7 @@ import org.springblade.thirdparty.bfi.pojo.vo.BfiPayBillVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiRecBillVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiReceivedInvoiceVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiResultVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiSupplierVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiTokenVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiVerifyTokenVO;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
@@ -99,6 +102,8 @@ public interface IBfiClient {
|
||||
String PAY_BILL_QUERY_URL = "${thirdParty.bfi.payBillQueryUrl:/ierp/kapi/v2/awrp/cas/cas_paybill/query}";
|
||||
String CUSTOMER_QUERY_URL = "${thirdParty.bfi.customerQueryUrl:/ierp/kapi/v2/awrp/basedata/bd_customer/query}";
|
||||
String CUSTOMER_SAVE_URL = "${thirdParty.bfi.customerSaveUrl:/ierp/kapi/v2/awrp/basedata/bd_customer/save}";
|
||||
String SUPPLIER_QUERY_URL = "${thirdParty.bfi.supplierQueryUrl:/ierp/kapi/v2/awrp/basedata/bd_supplier/query}";
|
||||
String BEBANK_QUERY_URL = "${thirdParty.bfi.bebankQueryUrl:/ierp/kapi/v2/awrp/basedata/bd_bebank/query}";
|
||||
String AP_BILL_SAVE_URL = "${thirdParty.bfi.apBillSaveUrl:/ierp/kapi/v2/awrp/ap/ap/ap_finapbill/save}";
|
||||
String AP_BILL_QUERY_URL = "${thirdParty.bfi.apBillQueryUrl:/ierp/kapi/v2/awrp/ap/ap_finapbill/query}";
|
||||
String AR_BILL_SAVE_URL = "${thirdParty.bfi.arBillSaveUrl:/ierp/kapi/v2/awrp/ar/ar/ar_finarbill/save}";
|
||||
@@ -266,6 +271,43 @@ public interface IBfiClient {
|
||||
@PostMapping(CUSTOMER_SAVE_URL)
|
||||
BfiResultVO<BfiBillSaveResultVO> customerSave(@RequestHeader(BfiConstant.HEADER_ACCESS_TOKEN) String accessToken, @RequestBody BfiCustomerSaveBodyDTO param);
|
||||
|
||||
/**
|
||||
* A901-1 供应商查询
|
||||
*
|
||||
* @param accessToken 访问令牌,通过 getToken 获取
|
||||
* @param pageNo 页码,从1开始
|
||||
* @param pageSize 页数
|
||||
* @param enable 使用状态
|
||||
* @param status 数据状态
|
||||
* @param createorgNumber 创建组织.编码
|
||||
* @param societycreditcode 统一社会信用代码(个人填写身份证号或手机号)
|
||||
* @param idno 身份证号
|
||||
* @param modifytimeS 修改时间-开始
|
||||
* @param modifytimeE 修改时间-结束
|
||||
* @return 供应商分页数据
|
||||
*/
|
||||
@GetMapping(SUPPLIER_QUERY_URL)
|
||||
BfiResultVO<BfiPageVO<BfiSupplierVO>> supplierQuery(@RequestHeader(BfiConstant.HEADER_ACCESS_TOKEN) String accessToken,
|
||||
@RequestParam("pageNo") Integer pageNo,
|
||||
@RequestParam("pageSize") Integer pageSize,
|
||||
@RequestParam(value = "enable", required = false) String enable,
|
||||
@RequestParam(value = "status", required = false) String status,
|
||||
@RequestParam(value = "createorg_number", required = false) String createorgNumber,
|
||||
@RequestParam(value = "societycreditcode", required = false) List<String> societycreditcode,
|
||||
@RequestParam(value = "idno", required = false) List<String> idno,
|
||||
@RequestParam(value = "modifytimeS", required = false) String modifytimeS,
|
||||
@RequestParam(value = "modifytimeE", required = false) String modifytimeE);
|
||||
|
||||
/**
|
||||
* A905-3 行名行号查询
|
||||
*
|
||||
* @param accessToken 访问令牌,通过 getToken 获取
|
||||
* @param param 查询参数
|
||||
* @return 行名行号分页数据
|
||||
*/
|
||||
@GetMapping(BEBANK_QUERY_URL)
|
||||
BfiResultVO<BfiPageVO<BfiBankVO>> bebankQuery(@RequestHeader(BfiConstant.HEADER_ACCESS_TOKEN) String accessToken, @SpringQueryMap BfiBankQueryDTO param);
|
||||
|
||||
/**
|
||||
* A102-2 财务应付单保存
|
||||
*
|
||||
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
/**
|
||||
* 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;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 业财融合(BFI)A905-3 行名行号查询参数
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class BfiBankQueryDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 【必填】页码,从1开始
|
||||
*/
|
||||
private Integer pageNo;
|
||||
/**
|
||||
* 【必填】页数
|
||||
*/
|
||||
private Integer pageSize;
|
||||
/**
|
||||
* 数据状态[A:暂存, B:已提交, C:已审核]
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 使用状态[0:禁用, 1:可用]
|
||||
*/
|
||||
private String enable;
|
||||
/**
|
||||
* 名称(行名)
|
||||
*/
|
||||
private List<String> name;
|
||||
/**
|
||||
* 编码(行号)
|
||||
*/
|
||||
private List<String> number;
|
||||
/**
|
||||
* 修改时间-开始,格式:yyyy-MM-dd HH:mm:ss,限定时间范围不可超过6个月
|
||||
*/
|
||||
private String modifytimeS;
|
||||
/**
|
||||
* 修改时间-结束,格式:yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
private String modifytimeE;
|
||||
}
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
/**
|
||||
* 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 com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 业财融合(BFI)A901-1 供应商查询参数
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class BfiSupplierQueryDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 【必填】页码,从1开始
|
||||
*/
|
||||
private Integer pageNo;
|
||||
/**
|
||||
* 【必填】页数
|
||||
*/
|
||||
private Integer pageSize;
|
||||
/**
|
||||
* 使用状态[0:禁用, 1:可用]
|
||||
*/
|
||||
private String enable;
|
||||
/**
|
||||
* 数据状态[A:暂存, B:已提交, C:已审核]
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 创建组织.编码
|
||||
*/
|
||||
@JsonProperty("createorg_number")
|
||||
private String createorgNumber;
|
||||
/**
|
||||
* 修改时间-开始,格式:yyyy-MM-dd HH:mm:ss,限定时间范围不可超过6个月
|
||||
*/
|
||||
private String modifytimeS;
|
||||
/**
|
||||
* 修改时间-结束,格式:yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
private String modifytimeE;
|
||||
/**
|
||||
* 统一社会信用代码(个人填写身份证号或手机号)
|
||||
*/
|
||||
private List<String> societycreditcode;
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
private List<String> idno;
|
||||
}
|
||||
+109
@@ -0,0 +1,109 @@
|
||||
/**
|
||||
* 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.JsonAlias;
|
||||
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)A905-3 行名行号查询返回结果
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
public class BfiBankVO 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;
|
||||
/**
|
||||
* 使用状态[0:禁用, 1:可用]
|
||||
*/
|
||||
private String enable;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String createtime;
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private String modifytime;
|
||||
/**
|
||||
* 主数据内码
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long masterid;
|
||||
/**
|
||||
* 联行号
|
||||
*/
|
||||
@JsonAlias("union_number")
|
||||
private String unionNumber;
|
||||
/**
|
||||
* Swift Code
|
||||
*/
|
||||
@JsonAlias("swift_code")
|
||||
private String swiftCode;
|
||||
/**
|
||||
* 银行类别名称
|
||||
*/
|
||||
private String bankcatename;
|
||||
/**
|
||||
* 省份(银企)
|
||||
*/
|
||||
private String provincetxt;
|
||||
/**
|
||||
* 城市(银企)
|
||||
*/
|
||||
private String citytxt;
|
||||
/**
|
||||
* 分行代码
|
||||
*/
|
||||
private String branchcode;
|
||||
/**
|
||||
* 疑似过期[Y:是, N:否]
|
||||
*/
|
||||
private String isoverdue;
|
||||
}
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
/**
|
||||
* 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)A901-1 供应商查询 银行信息分录
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
public class BfiSupplierBankVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
/**
|
||||
* 分录行号
|
||||
*/
|
||||
private Integer seq;
|
||||
/**
|
||||
* 银行账号
|
||||
*/
|
||||
private String bankaccount;
|
||||
/**
|
||||
* 账户名称
|
||||
*/
|
||||
private String accountname;
|
||||
/**
|
||||
* 默认
|
||||
*/
|
||||
@JsonProperty("isdefault_bank")
|
||||
private Boolean isdefaultBank;
|
||||
/**
|
||||
* 银行账户类型
|
||||
*/
|
||||
private String bankaccounttype;
|
||||
/**
|
||||
* 账户性质[0:公司, 1:个人]
|
||||
*/
|
||||
@JsonProperty("account_property")
|
||||
private String accountProperty;
|
||||
/**
|
||||
* 默认手续费承担方[1:付款方, 2:收款方]
|
||||
*/
|
||||
private String commissionbearer;
|
||||
/**
|
||||
* 币种(货币代码)
|
||||
*/
|
||||
private Currency currency;
|
||||
/**
|
||||
* 开户银行(编码)
|
||||
*/
|
||||
private Bank bank;
|
||||
|
||||
/**
|
||||
* 币种引用
|
||||
*/
|
||||
@Data
|
||||
public static class Currency implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 货币代码
|
||||
*/
|
||||
private String number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 开户银行引用
|
||||
*/
|
||||
@Data
|
||||
public static class Bank implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 编码(行号)
|
||||
*/
|
||||
private String number;
|
||||
}
|
||||
}
|
||||
+181
@@ -0,0 +1,181 @@
|
||||
/**
|
||||
* 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;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 业财融合(BFI)A901-1 供应商查询返回结果
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
public class BfiSupplierVO 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;
|
||||
/**
|
||||
* 使用状态[0:禁用, 1:可用]
|
||||
*/
|
||||
private String enable;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String createtime;
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private String modifytime;
|
||||
/**
|
||||
* 控制策略[1:逐级分配, 2:自由分配, 5:全局共享, 6:管控范围内共享, 7:私有]
|
||||
*/
|
||||
private String ctrlstrategy;
|
||||
/**
|
||||
* 简称
|
||||
*/
|
||||
private String simplename;
|
||||
/**
|
||||
* 伙伴类型[1:法人企业, 2:非法人企业, 3:非企业单位, 4:个人, 5:个体户, 6:大陆以外的企业]
|
||||
*/
|
||||
private String type;
|
||||
/**
|
||||
* 统一社会信用代码(个人填写身份证号或手机号)
|
||||
*/
|
||||
private String societycreditcode;
|
||||
/**
|
||||
* 电子邮箱
|
||||
*/
|
||||
@JsonProperty("postal_code")
|
||||
private String postalCode;
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
private String idno;
|
||||
/**
|
||||
* 供应商分组.编码
|
||||
*/
|
||||
@JsonProperty("group_number")
|
||||
private String groupNumber;
|
||||
/**
|
||||
* 详细地址
|
||||
*/
|
||||
@JsonProperty("bizpartner_address")
|
||||
private String bizpartnerAddress;
|
||||
/**
|
||||
* 联系人
|
||||
*/
|
||||
private String linkman;
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
@JsonProperty("bizpartner_phone")
|
||||
private String bizpartnerPhone;
|
||||
/**
|
||||
* 传真
|
||||
*/
|
||||
@JsonProperty("bizpartner_fax")
|
||||
private String bizpartnerFax;
|
||||
/**
|
||||
* 纳税人识别号
|
||||
*/
|
||||
@JsonProperty("tx_register_no")
|
||||
private String txRegisterNo;
|
||||
/**
|
||||
* 法人代表
|
||||
*/
|
||||
private String artificialperson;
|
||||
/**
|
||||
* 注册资本
|
||||
*/
|
||||
private String regcapital;
|
||||
/**
|
||||
* 营业期限
|
||||
*/
|
||||
private String businessterm;
|
||||
/**
|
||||
* 成立日期
|
||||
*/
|
||||
private String establishdate;
|
||||
/**
|
||||
* 经营范围
|
||||
*/
|
||||
private String businessscope;
|
||||
/**
|
||||
* 业务职能[1:采购, 2:结算, 3:收款, 4:供货]
|
||||
*/
|
||||
private String bizfunction;
|
||||
/**
|
||||
* 简拼
|
||||
*/
|
||||
private String simplepinyin;
|
||||
/**
|
||||
* 税号
|
||||
*/
|
||||
private String taxno;
|
||||
/**
|
||||
* 是否为贸易客商[A:是, B:否]
|
||||
*/
|
||||
@JsonProperty("awrp_supfortrade")
|
||||
private String awrpSupfortrade;
|
||||
/**
|
||||
* 数据来源系统[XH:星瀚, WCY:物产云, JCZX:检测中心, NBERP:南北ERP, WCCK:城矿ERP, WY:维云(服务), CMS:合同系统, DTP:数据中台]
|
||||
*/
|
||||
@JsonProperty("awrp_datasourcesys")
|
||||
private String awrpDatasourcesys;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@JsonProperty("awrp_sppfbeizhu")
|
||||
private String awrpSppfbeizhu;
|
||||
/**
|
||||
* 银行信息分录
|
||||
*/
|
||||
@JsonProperty("entry_bank")
|
||||
private List<BfiSupplierBankVO> entryBank;
|
||||
}
|
||||
+20
@@ -30,6 +30,7 @@ import org.springblade.thirdparty.bfi.pojo.dto.BfiApBillQueryDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiApBillSaveDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiArBillQueryDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiArBillSaveDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiBankQueryDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiBillLockDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiClaimAnnounceQueryDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiClaimPushDTO;
|
||||
@@ -48,9 +49,11 @@ import org.springblade.thirdparty.bfi.pojo.dto.BfiPayBillQueryDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiReceivedInvoiceQueryDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiReceivedInvoiceSaveDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiRecBillQueryDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiSupplierQueryDTO;
|
||||
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.BfiBankVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiBillSaveResultVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiBlacklistVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiClaimAnnounceVO;
|
||||
@@ -65,6 +68,7 @@ import org.springblade.thirdparty.bfi.pojo.vo.BfiPayApplyVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiPayBillVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiReceivedInvoiceVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiRecBillVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiSupplierVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiTokenVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiVerifyTokenVO;
|
||||
|
||||
@@ -183,6 +187,22 @@ public interface IBfiService {
|
||||
*/
|
||||
BfiBillSaveResultVO saveCustomer(BfiCustomerSaveDTO param);
|
||||
|
||||
/**
|
||||
* A901-1 供应商查询
|
||||
*
|
||||
* @param param 查询参数,页码从1开始,修改时间范围不可超过6个月
|
||||
* @return 供应商分页数据
|
||||
*/
|
||||
BfiPageVO<BfiSupplierVO> querySupplier(BfiSupplierQueryDTO param);
|
||||
|
||||
/**
|
||||
* A905-3 行名行号查询
|
||||
*
|
||||
* @param param 查询参数,页码从1开始,修改时间范围不可超过6个月
|
||||
* @return 行名行号分页数据
|
||||
*/
|
||||
BfiPageVO<BfiBankVO> queryBank(BfiBankQueryDTO param);
|
||||
|
||||
/**
|
||||
* A102-2 财务应付单保存
|
||||
*
|
||||
|
||||
+27
-22
@@ -43,6 +43,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.BfiBankQueryDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiBillLockDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiBlacklistQueryDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiClaimAnnounceQueryDTO;
|
||||
@@ -72,12 +73,14 @@ import org.springblade.thirdparty.bfi.pojo.dto.BfiRecBillQueryDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiReceivedInvoiceQueryDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiReceivedInvoiceSaveBodyDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiReceivedInvoiceSaveDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiSupplierQueryDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiTokenDTO;
|
||||
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.BfiAttachmentUploadVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiBankVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiBillLockResultVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiBillSaveResultItemVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiBillSaveResultVO;
|
||||
@@ -95,6 +98,7 @@ import org.springblade.thirdparty.bfi.pojo.vo.BfiPayBillVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiRecBillVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiReceivedInvoiceVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiResultVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiSupplierVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiTokenVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiVerifyTokenVO;
|
||||
import org.springblade.thirdparty.bfi.service.IBfiService;
|
||||
@@ -332,6 +336,28 @@ public class BfiServiceImpl implements IBfiService {
|
||||
return result.getData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public BfiPageVO<BfiSupplierVO> querySupplier(BfiSupplierQueryDTO param) {
|
||||
if (param == null || param.getPageNo() == null || param.getPageSize() == null) {
|
||||
throw new BfiException("查询BFI供应商失败,分页参数不能为空");
|
||||
}
|
||||
String accessToken = getAccessToken();
|
||||
BfiResultVO<BfiPageVO<BfiSupplierVO>> result = commonCall("供应商查询", () -> client.supplierQuery(accessToken,
|
||||
param.getPageNo(), param.getPageSize(), param.getEnable(), param.getStatus(), param.getCreateorgNumber(),
|
||||
param.getSocietycreditcode(), param.getIdno(), param.getModifytimeS(), param.getModifytimeE()));
|
||||
return result.getData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public BfiPageVO<BfiBankVO> queryBank(BfiBankQueryDTO param) {
|
||||
if (param == null || param.getPageNo() == null || param.getPageSize() == null) {
|
||||
throw new BfiException("查询BFI行名行号失败,分页参数不能为空");
|
||||
}
|
||||
String accessToken = getAccessToken();
|
||||
BfiResultVO<BfiPageVO<BfiBankVO>> result = commonCall("行名行号查询", () -> client.bebankQuery(accessToken, param));
|
||||
return result.getData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public BfiBillSaveResultVO saveApBill(BfiApBillSaveDTO param) {
|
||||
if (param == null || StringUtil.isBlank(param.getAwrpSrcSys()) || StringUtil.isBlank(param.getAwrpSrcCode())) {
|
||||
@@ -460,10 +486,7 @@ public class BfiServiceImpl implements IBfiService {
|
||||
if (param == null || StringUtil.isBlank(param.getSerialNo()) || StringUtil.isBlank(param.getSellerTaxpayerId())) {
|
||||
throw new BfiException("查询BFI开票申请发票失败,单据编号与销方税号不能为空");
|
||||
}
|
||||
if (properties.isMockEnabled()) {
|
||||
log.info("【MOCK】查询BFI开票申请发票,serialNo={}", param.getSerialNo());
|
||||
return mockQueryInvoiceApplyInvoice();
|
||||
}
|
||||
// mock 模式由 BfiClientMock 读取桩文件 invoiceApplyOpenApi.json(有桩用桩、无桩透传真实接口),此处不再内置固定响应
|
||||
// data 原文需序列化为 JSON 后 Base64 编码
|
||||
String data = Base64.getEncoder().encodeToString(JSONUtil.toJsonStr(param).getBytes(StandardCharsets.UTF_8));
|
||||
BfiInvoiceApplyOpenApiBodyDTO body = new BfiInvoiceApplyOpenApiBodyDTO();
|
||||
@@ -753,22 +776,4 @@ public class BfiServiceImpl implements IBfiService {
|
||||
long expireMillis = tokenVO.getExpiresIn() - BfiConstant.TOKEN_EXPIRE_BUFFER_MILLIS;
|
||||
bladeRedis.getValueOps().setIfAbsent(BfiConstant.BFI_TOKEN_CACHE_KEY, tokenVO.getAccessToken(), Duration.ofMillis(expireMillis));
|
||||
}
|
||||
|
||||
/**
|
||||
* Mock 开票申请发票查询(开发调试用)
|
||||
*
|
||||
* @return mock 发票查询结果
|
||||
*/
|
||||
private BfiOpenApiResultVO<List<BfiInvoiceApplyOpenApiBillVO>> mockQueryInvoiceApplyInvoice() {
|
||||
String mockData = "W3siaW52b2ljZUxpc3QiOlt7ImFib2xpc2hSZWFzb24iOiIiLCJiaWxsTm8iOiJLUFNRLUpDWlgtMjAyNjAz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iIxIiwidGVybWluYWxObyI6IiIsInRvdGFsQW1vdW50IjozNjIyLjY0LCJ0b3RhbFRheEFtb3VudCI6MjE3LjM2fV0sImJpbGxObyI6IktQU1EtSkNaWC0yMDI2MDMtMDAwNTgwIn1d";
|
||||
BfiOpenApiResultVO<List<BfiInvoiceApplyOpenApiBillVO>> result = new BfiOpenApiResultVO<>();
|
||||
result.setErrorCode("0");
|
||||
result.setSuccess(true);
|
||||
String decodedJson = new String(Base64.getDecoder().decode(mockData), StandardCharsets.UTF_8);
|
||||
JSONObject decodedObj = JSONUtil.parseObj(decodedJson);
|
||||
result.setErrorCode(decodedObj.getStr("errorCode"));
|
||||
result.setSuccess(decodedObj.getBool("success"));
|
||||
result.setData(decodedObj.getBeanList("data", BfiInvoiceApplyOpenApiBillVO.class));
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
+19
@@ -65,6 +65,7 @@ import org.springblade.thirdparty.bfi.pojo.dto.BfiRecBillQueryDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiReceivedInvoiceQueryDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiReceivedInvoiceSaveDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiReceivedInvoiceSaveEntryDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiSupplierQueryDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.dto.BfiTokenDTO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiApBillVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiArBillVO;
|
||||
@@ -78,6 +79,7 @@ import org.springblade.thirdparty.bfi.pojo.vo.BfiPageVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiRecBillVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiReceivedInvoiceVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiResultVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiSupplierVO;
|
||||
import org.springblade.thirdparty.bfi.pojo.vo.BfiTokenVO;
|
||||
import org.springblade.thirdparty.bfi.service.impl.BfiServiceImpl;
|
||||
import org.springframework.data.redis.core.ValueOperations;
|
||||
@@ -212,6 +214,23 @@ class BfiServiceImplTest {
|
||||
assertThrows(BfiException.class, () -> service.queryCustomer(new BfiCustomerQueryDTO()));
|
||||
}
|
||||
|
||||
@Test
|
||||
void querySupplierShouldReturnPage() {
|
||||
mockAccessToken();
|
||||
BfiPageVO<BfiSupplierVO> page = new BfiPageVO<>();
|
||||
when(client.supplierQuery(eq("token-1"), eq(1), eq(10), any(), any(), any(), any(), any(), any(), any()))
|
||||
.thenReturn(success(page));
|
||||
BfiSupplierQueryDTO param = new BfiSupplierQueryDTO();
|
||||
param.setPageNo(1);
|
||||
param.setPageSize(10);
|
||||
assertEquals(page, service.querySupplier(param));
|
||||
}
|
||||
|
||||
@Test
|
||||
void querySupplierShouldThrowWhenPageEmpty() {
|
||||
assertThrows(BfiException.class, () -> service.querySupplier(new BfiSupplierQueryDTO()));
|
||||
}
|
||||
|
||||
@Test
|
||||
void saveCustomerShouldValidateRequiredFields() {
|
||||
BfiCustomerSaveDTO noName = new BfiCustomerSaveDTO();
|
||||
|
||||
+5
@@ -252,6 +252,11 @@ public class HcsProperties {
|
||||
* 付款提交前风险校验开关
|
||||
*/
|
||||
private boolean checkOnPayment = true;
|
||||
/**
|
||||
* 客商风险每日定时刷新开关(thirdParty.hcs.risk.refresh-enabled,默认关闭):
|
||||
* 刷新合同期限内生效合同关联客商的风险等级/黑名单状态并落库,支撑列表展示与筛选
|
||||
*/
|
||||
private boolean refreshEnabled = false;
|
||||
}
|
||||
|
||||
@Data
|
||||
|
||||
+7
-2
@@ -36,7 +36,8 @@ import java.math.BigDecimal;
|
||||
/**
|
||||
* 合同合规系统(HCS)C103-9(新) 履约规则同步 行级操作项(数据源 blade_contract_exe_stage,ADR-0002)
|
||||
* <p>
|
||||
* 新增行可不带 fdId;更新/删除行必须带 fdId(合规阶段ID,回填自首次同步返回)。
|
||||
* add 行必传 fdUniqueId(TMS 行唯一标识,HCS 回显存储);update/delete 行必传 fdId(首次 add 返回的阶段行ID,
|
||||
* 持久化于 hcs_stage_fd_id),实测无需 fdUniqueId。
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@@ -47,9 +48,13 @@ public class HcsExeplanStageDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 阶段项ID(行级 update/delete 必传,取 blade_contract_exe_stage.hcs_stage_fd_id)
|
||||
* 阶段行ID(HCS 返回的 fdId,持久化于 hcs_stage_fd_id;update/delete 行必传,add 行可不传)
|
||||
*/
|
||||
private String fdId;
|
||||
/**
|
||||
* 阶段唯一标识(仅 add 行必传,取 TMS 行ID,HCS 回显存储;update/delete 行以 fdId 定位,无需此值)
|
||||
*/
|
||||
private String fdUniqueId;
|
||||
/**
|
||||
* 行级操作:add / update / delete
|
||||
*/
|
||||
|
||||
+5
-1
@@ -49,7 +49,11 @@ public class HcsExeplanVO implements Serializable {
|
||||
*/
|
||||
private String fdExeplanId;
|
||||
/**
|
||||
* 本次变更的阶段列表(按行回填 hcs_stage_fd_id)
|
||||
* 本次新增的阶段列表(add 行返回,不含业务属性,按行回填 hcs_stage_fd_id)
|
||||
*/
|
||||
private List<HcsExeplanStageVO> fdAddStages;
|
||||
/**
|
||||
* 本次变更的阶段列表(update/delete 行返回,按行回填 hcs_stage_fd_id)
|
||||
*/
|
||||
private List<HcsExeplanStageVO> fdChangeStages;
|
||||
}
|
||||
|
||||
+5
-1
@@ -51,7 +51,7 @@ public class HcsLegalResultDTO implements Serializable {
|
||||
*/
|
||||
private String sourceSystem;
|
||||
/**
|
||||
* 定位单据ID(付款特批=TMS 付款申请ID;合同特批=合规合同ID,与 id 同值,按 blade_contract_manage.hcs_fd_id 匹配)
|
||||
* 定位单据ID(付款特批=合规特批流程ID(hcs_spec_fd_id,C106-3 回存值);合同特批=合规合同ID,与 id 同值,按 blade_contract_manage.hcs_fd_id 匹配)
|
||||
*/
|
||||
private String requestId;
|
||||
/**
|
||||
@@ -66,4 +66,8 @@ public class HcsLegalResultDTO implements Serializable {
|
||||
* 结果说明(驳回原因等,非必传)
|
||||
*/
|
||||
private String reason;
|
||||
/**
|
||||
* 特批结果附件(付款特批回传携带,值为合规附件ID,C103-5 下载入参,非必传)
|
||||
*/
|
||||
private String fileUrl;
|
||||
}
|
||||
|
||||
+4
@@ -54,6 +54,10 @@ public class HcsPerfRecordSaveDTO implements Serializable {
|
||||
* 履约记录表单数据
|
||||
*/
|
||||
private HcsPerfRecordFormDataDTO formData;
|
||||
/**
|
||||
* 是否校验权限(C108-1/2 接口要求固定传 false,跳过合规侧权限校验)
|
||||
*/
|
||||
private Boolean checkAuth = Boolean.FALSE;
|
||||
/**
|
||||
* 附件挂载
|
||||
*/
|
||||
|
||||
+10
@@ -55,6 +55,11 @@ public class HcsSpecPayPropsDTO implements Serializable {
|
||||
*/
|
||||
@JsonProperty("fd_contract_no")
|
||||
private String fdContractNo;
|
||||
/**
|
||||
* 外部系统编号
|
||||
*/
|
||||
@JsonProperty("fd_source_sys")
|
||||
private String fdSourceSys;
|
||||
/**
|
||||
* 收款账户名
|
||||
*/
|
||||
@@ -145,4 +150,9 @@ public class HcsSpecPayPropsDTO implements Serializable {
|
||||
*/
|
||||
@JsonProperty("fd_spc_approval_attach")
|
||||
private String fdSpcApprovalAttach;
|
||||
/**
|
||||
* 款项日期(传履约计划id,接口必填;无关联计划行不传,与 C108 履约记录口径一致)
|
||||
*/
|
||||
@JsonProperty("fd_contract_plan")
|
||||
private String fdContractPlan;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user