Merge remote-tracking branch 'origin/feature/bfi-finance-interface-sync' into feature/payment-apply-bfi-sync

This commit is contained in:
刘泉佳
2026-09-16 22:17:26 +08:00
70 changed files with 10046 additions and 37 deletions
@@ -19,5 +19,20 @@
<groupId>org.springblade</groupId>
<artifactId>blade-starter-redis</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.5</version>
</plugin>
</plugins>
</build>
</project>
@@ -71,4 +71,304 @@ public class BfiConstant {
* token 提前失效缓冲时长(毫秒),防止刚好过期
*/
public static final long TOKEN_EXPIRE_BUFFER_MILLIS = 120_000L;
/**
* A303-5 开票申请发票查询 接口编码,固定值
*/
public static final String INVOICE_APPLY_OPEN_API_CODE = "BILL.INVOICE.QUERY";
// ==================== 单据类型 ====================
/**
* 财务应付单单据类型:标准采购应付
*/
public static final String AP_BILL_TYPE_PURCHASE = "ApFin_pur_BT_S";
/**
* 财务应付单单据类型:费用采购应付
*/
public static final String AP_BILL_TYPE_FEE = "ApFin_fee_BT_S";
/**
* 财务应付单单据类型:采购费用应付
*/
public static final String AP_BILL_TYPE_PUR_FEE = "ApFin_purfee_BT_S";
/**
* 财务应付单单据类型:资产采购应付
*/
public static final String AP_BILL_TYPE_ASSET = "ap_finapbill_asset_BT_S";
/**
* 财务应付单单据类型:服务采购应付
*/
public static final String AP_BILL_TYPE_SERVICE = "ApFin_service_BT_S";
/**
* 财务应付单单据类型:产品委外应付
*/
public static final String AP_BILL_TYPE_PRODUCT = "ApFin_product_BT_S";
/**
* 财务应付单单据类型:其他应付
*/
public static final String AP_BILL_TYPE_OTHER = "ApFin_other_BT_S";
/**
* 财务应付单单据类型:借贷项调整
*/
public static final String AP_BILL_TYPE_BORROW = "ApFin_borr_BT_S";
/**
* 财务应收单单据类型:标准销售应收
*/
public static final String AR_BILL_TYPE_STANDARD = "arfin_standard_BT_S";
/**
* 财务应收单单据类型:服务销售应收
*/
public static final String AR_BILL_TYPE_SERVICE = "arfin_sersal_BT_S";
/**
* 财务应收单单据类型:销售费用应收
*/
public static final String AR_BILL_TYPE_SALE_FEE = "arfin_salefee_BT_S";
/**
* 财务应收单单据类型:其他应收
*/
public static final String AR_BILL_TYPE_OTHER = "arfin_other_BT_S";
/**
* 财务应收单单据类型:借贷项调整
*/
public static final String AR_BILL_TYPE_BORROW = "arfin_borrowar_BT_S";
/**
* 付款申请单据类型:采购付款申请
*/
public static final String PAY_APPLY_TYPE_PURCHASE = "ap_payapply_BT_S";
/**
* 付款申请单据类型:其他付款申请
*/
public static final String PAY_APPLY_TYPE_OTHER = "ap_payapply_oth_BT_S";
// ==================== 往来与付款 ====================
/**
* 往来类型:供应商
*/
public static final String ASSTACT_TYPE_SUPPLIER = "bd_supplier";
/**
* 往来类型:人员
*/
public static final String ASSTACT_TYPE_USER = "bos_user";
/**
* 往来类型:客户
*/
public static final String ASSTACT_TYPE_CUSTOMER = "bd_customer";
/**
* 往来类型:公司
*/
public static final String ASSTACT_TYPE_ORG = "bos_org";
/**
* 往来类型:其他
*/
public static final String ASSTACT_TYPE_OTHER = "other";
/**
* 付款方式:现购/现销,系统自动100%推付款
*/
public static final String PAY_MODE_CASH = "CASH";
/**
* 付款方式:赊购/赊销,可自由调整后续付款金额
*/
public static final String PAY_MODE_CREDIT = "CREDIT";
/**
* 付款类型:正式付款(采购付款)
*/
public static final String PAYMENT_TYPE_FORMAL = "201";
/**
* 付款类型:预付款
*/
public static final String PAYMENT_TYPE_PREPAY = "202";
// ==================== 单据状态 ====================
/**
* 数据状态:暂存
*/
public static final String BILL_STATUS_DRAFT = "A";
/**
* 数据状态:已提交
*/
public static final String BILL_STATUS_SUBMITTED = "B";
/**
* 数据状态:已审核
*/
public static final String BILL_STATUS_AUDITED = "C";
/**
* 数据状态:已收款/已付款
*/
public static final String BILL_STATUS_RECEIVED = "D";
/**
* 数据状态:变更中
*/
public static final String BILL_STATUS_CHANGING = "E";
/**
* 数据状态:已退单
*/
public static final String BILL_STATUS_RETURNED = "G";
/**
* 结算状态:未结算
*/
public static final String SETTLE_STATUS_UNSETTLE = "unsettle";
/**
* 结算状态:部分结算
*/
public static final String SETTLE_STATUS_PART = "partsettle";
/**
* 结算状态:全部结算
*/
public static final String SETTLE_STATUS_SETTLED = "settled";
// ==================== 组织与基础资料 ====================
/**
* 数据来源系统:运输TMS
*/
public static final String DATA_SOURCE_WLTMS = "WLTMS";
/**
* 数据来源系统:星瀚
*/
public static final String DATA_SOURCE_XH = "XH";
/**
* 数据来源系统:城矿ERP
*/
public static final String DATA_SOURCE_WCCK = "WCCK";
/**
* 是否为贸易客商:是
*/
public static final String CUS_FOR_TRADE_YES = "A";
/**
* 是否为贸易客商:否
*/
public static final String CUS_FOR_TRADE_NO = "B";
/**
* 客户分类标准:基本分类标准
*/
public static final String GROUP_STANDARD_BASIC = "JBFLBZ";
/**
* 客户分类:外部客户
*/
public static final String CUSTOMER_GROUP_EXTERNAL = "1102";
/**
* 币种:人民币
*/
public static final String CURRENCY_CNY = "CNY";
/**
* 汇率表默认编码
*/
public static final String EXRATE_TABLE_DEFAULT = "01";
/**
* 税率编码:13%
*/
public static final String TAX_RATE_V13 = "V13";
/**
* 结算方式:银行转账
*/
public static final String SETTLE_TYPE_BANK = "02";
/**
* 款项性质:材料采购
*/
public static final String PAY_PROPERTY_MATERIAL = "2001";
/**
* 款项性质:一般销售
*/
public static final String PAY_PROPERTY_SALE = "1001";
/**
* 项目兜底编码:不涉及项目时传999
*/
public static final String PROJECT_NOT_APPLICABLE = "999";
/**
* 外部单据类型:各保存接口示例固定值
*/
public static final String AWRP_SRC_TYPE_EXTERNAL = "0KzXs";
// ==================== 票据 ====================
/**
* 收票业务类型:采购
*/
public static final String RECEIVED_BIZ_TYPE_PUR = "PUR";
/**
* 收票业务类型:费用
*/
public static final String RECEIVED_BIZ_TYPE_FEE = "FEE";
/**
* 收票发票类型:数电发票(普通发票)
*/
public static final String RECEIVED_INVOICE_TYPE_DIGITAL_GENERAL = "26";
/**
* 收票发票类型:数电发票(增值税专用发票)
*/
public static final String RECEIVED_INVOICE_TYPE_DIGITAL_SPECIAL = "27";
/**
* 发票种类:数电发票(普通发票)
*/
public static final String INVOICE_TYPE_DIGITAL_GENERAL = "10xdp";
/**
* 发票种类:数电发票(增值税专用发票)
*/
public static final String INVOICE_TYPE_DIGITAL_SPECIAL = "08xdp";
/**
* 开票申请数据来源:固定3
*/
public static final String INVOICE_BILL_SOURCE = "3";
/**
* 预付信息单据类型:付款处理
*/
public static final String PREPAY_BILL_TYPE_PAY_BILL = "cas_paybill";
/**
* 预付信息单据类型:期初预付单
*/
public static final String PREPAY_BILL_TYPE_INIT_PAID = "ap_paidbill";
}
@@ -25,20 +25,41 @@
*/
package org.springblade.thirdparty.bfi.feign;
import feign.Response;
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.BfiClaimPushBodyDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiCustomerSaveBodyDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiInvoiceApplyOpenApiBodyDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiInvoiceApplySaveBodyDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiInvoiceAssignBodyDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiInvoiceDownloadDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiInvoicePoolQueryDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiPayApplyPushBodyDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiPayApplyQueryDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiPayApplySaveBodyDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiExchangeRateQueryDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiReceivedInvoiceQueryDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiReceivedInvoiceSaveBodyDTO;
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.BfiBillSaveResultVO;
import org.springblade.thirdparty.bfi.pojo.vo.BfiClaimAnnounceVO;
import org.springblade.thirdparty.bfi.pojo.vo.BfiCustomerVO;
import org.springblade.thirdparty.bfi.pojo.vo.BfiExchangeRateVO;
import org.springblade.thirdparty.bfi.pojo.vo.BfiInvoiceApplyVO;
import org.springblade.thirdparty.bfi.pojo.vo.BfiInvoicePoolVO;
import org.springblade.thirdparty.bfi.pojo.vo.BfiOpenApiResultVO;
import org.springblade.thirdparty.bfi.pojo.vo.BfiPageVO;
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.BfiResultVO;
import org.springblade.thirdparty.bfi.pojo.vo.BfiTokenVO;
import org.springblade.thirdparty.bfi.pojo.vo.BfiVerifyTokenVO;
@@ -68,6 +89,23 @@ public interface IBfiClient {
String PAY_APPLY_QUERY_URL = "${thirdParty.bfi.payApplyQueryUrl:/ierp/kapi/v2/awrp/ap/ap_payapply/query}";
String PRE_PAY_APPLY_SAVE_URL = "${thirdParty.bfi.prePayApplySaveUrl:/ierp/kapi/v2/awrp/ap/ap/ap_payapply/save}";
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 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}";
String AR_BILL_QUERY_URL = "${thirdParty.bfi.arBillQueryUrl:/ierp/kapi/v2/awrp/ar/ar_finarbill/query}";
String INVOICE_ASSIGN_URL = "${thirdParty.bfi.invoiceAssignUrl:/ierp/kapi/v2/awrp/ap/ap/ap_invoice/assign}";
String INVOICE_APPLY_SAVE_URL = "${thirdParty.bfi.invoiceApplySaveUrl:/ierp/kapi/v2/awrp/sim/sim_original_bill/save}";
String INVOICE_APPLY_QUERY_URL = "${thirdParty.bfi.invoiceApplyQueryUrl:/ierp/kapi/v2/awrp/sim/sim_original_bill/query}";
String INVOICE_APPLY_OPEN_API_URL = "${thirdParty.bfi.invoiceApplyOpenApiUrl:/ierp/kapi/app/sim/openApi}";
String RECEIVED_INVOICE_SAVE_URL = "${thirdParty.bfi.receivedInvoiceSaveUrl:/ierp/kapi/v2/awrp/ap/ap_invoice/cusBatchSave}";
String RECEIVED_INVOICE_QUERY_URL = "${thirdParty.bfi.receivedInvoiceQueryUrl:/ierp/kapi/v2/awrp/ap/ap_invoice/apinvoicequery}";
String REC_BILL_QUERY_URL = "${thirdParty.bfi.recBillQueryUrl:/ierp/kapi/v2/awrp/cas/cas_recbill/queryRecBill}";
String CLAIM_ANNOUNCE_QUERY_URL = "${thirdParty.bfi.claimAnnounceQueryUrl:/ierp/kapi/v2/awrp/cas/cas_claimannounce/query}";
String CLAIM_BILL_PUSH_URL = "${thirdParty.bfi.claimBillPushUrl:/ierp/kapi/v2/awrp/cas/cas/cas_claimbill/claimbillPush}";
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}";
/**
* A100-1 获取令牌
@@ -167,4 +205,250 @@ public interface IBfiClient {
@RequestParam("end_bizdate") String endBizdate,
@RequestParam(value = "billno", required = false) List<String> billno,
@RequestParam("org_number") List<String> orgNumber);
/**
* A902-1 客户查询
*
* @param accessToken 访问令牌,通过 getToken 获取
* @param pageNo 页码,从1开始
* @param pageSize 页数
* @param enable 使用状态
* @param status 数据状态
* @param number 编码
* @param createorgNumber 创建组织.编码
* @param societycreditcode 统一社会信用代码
* @param idno 身份证号
* @param modifytimeS 修改时间-开始
* @param modifytimeE 修改时间-结束
* @return 客户分页数据
*/
@GetMapping(CUSTOMER_QUERY_URL)
BfiResultVO<BfiPageVO<BfiCustomerVO>> customerQuery(@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 = "number", required = false) List<String> number,
@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);
/**
* A902-2 客户保存
*
* @param accessToken 访问令牌,通过 getToken 获取
* @param param 请求参数
* @return 保存结果
*/
@PostMapping(CUSTOMER_SAVE_URL)
BfiResultVO<BfiBillSaveResultVO> customerSave(@RequestHeader(BfiConstant.HEADER_ACCESS_TOKEN) String accessToken, @RequestBody BfiCustomerSaveBodyDTO param);
/**
* A102-2 财务应付单保存
*
* @param accessToken 访问令牌,通过 getToken 获取
* @param param 请求参数
* @return 保存结果
*/
@PostMapping(AP_BILL_SAVE_URL)
BfiResultVO<BfiBillSaveResultVO> apBillSave(@RequestHeader(BfiConstant.HEADER_ACCESS_TOKEN) String accessToken, @RequestBody BfiApBillSaveBodyDTO param);
/**
* A102-4 财务应付单查询
*
* @param accessToken 访问令牌,通过 getToken 获取
* @param pageNo 页码,从1开始
* @param pageSize 页数
* @param awrpSrcCode 来源单据号
* @param awrpSrcSys 系统编号
* @param modifytimeS 修改时间-开始
* @param modifytimeE 修改时间-结束
* @param billstatus 单据状态
* @param settlestatus 结算状态
* @return 财务应付单分页数据
*/
@GetMapping(AP_BILL_QUERY_URL)
BfiResultVO<BfiPageVO<BfiApBillVO>> apBillQuery(@RequestHeader(BfiConstant.HEADER_ACCESS_TOKEN) String accessToken,
@RequestParam("pageNo") Integer pageNo,
@RequestParam("pageSize") Integer pageSize,
@RequestParam(value = "awrp_src_code", required = false) List<String> awrpSrcCode,
@RequestParam(value = "awrp_src_sys", required = false) String awrpSrcSys,
@RequestParam(value = "modifytimeS", required = false) String modifytimeS,
@RequestParam(value = "modifytimeE", required = false) String modifytimeE,
@RequestParam(value = "billstatus", required = false) List<String> billstatus,
@RequestParam(value = "settlestatus", required = false) List<String> settlestatus);
/**
* A302-2 财务应收单保存
*
* @param accessToken 访问令牌,通过 getToken 获取
* @param param 请求参数
* @return 保存结果
*/
@PostMapping(AR_BILL_SAVE_URL)
BfiResultVO<BfiBillSaveResultVO> arBillSave(@RequestHeader(BfiConstant.HEADER_ACCESS_TOKEN) String accessToken, @RequestBody BfiArBillSaveBodyDTO param);
/**
* A302-4 财务应收单查询
*
* @param accessToken 访问令牌,通过 getToken 获取
* @param pageNo 页码,从1开始
* @param pageSize 页数
* @param awrpSrcCode 来源单据号
* @param awrpSrcSys 系统编号
* @param modifytimeS 修改时间-开始
* @param modifytimeE 修改时间-结束
* @param billstatus 单据状态
* @param settlestatus 结算状态
* @return 财务应收单分页数据
*/
@GetMapping(AR_BILL_QUERY_URL)
BfiResultVO<BfiPageVO<BfiArBillVO>> arBillQuery(@RequestHeader(BfiConstant.HEADER_ACCESS_TOKEN) String accessToken,
@RequestParam("pageNo") Integer pageNo,
@RequestParam("pageSize") Integer pageSize,
@RequestParam(value = "awrp_src_code", required = false) List<String> awrpSrcCode,
@RequestParam(value = "awrp_src_sys", required = false) String awrpSrcSys,
@RequestParam(value = "modifytimeS", required = false) String modifytimeS,
@RequestParam(value = "modifytimeE", required = false) String modifytimeE,
@RequestParam(value = "billstatus", required = false) List<String> billstatus,
@RequestParam(value = "settlestatus", required = false) List<String> settlestatus);
/**
* A302-6 收票指定应付
*
* @param accessToken 访问令牌,通过 getToken 获取
* @param param 请求参数
* @return 指定结果
*/
@PostMapping(INVOICE_ASSIGN_URL)
BfiResultVO<BfiBillSaveResultVO> invoiceAssign(@RequestHeader(BfiConstant.HEADER_ACCESS_TOKEN) String accessToken, @RequestBody BfiInvoiceAssignBodyDTO param);
/**
* A303-1 开票申请单新增
*
* @param accessToken 访问令牌,通过 getToken 获取
* @param param 请求参数
* @return 保存结果
*/
@PostMapping(INVOICE_APPLY_SAVE_URL)
BfiResultVO<BfiBillSaveResultVO> invoiceApplySave(@RequestHeader(BfiConstant.HEADER_ACCESS_TOKEN) String accessToken, @RequestBody BfiInvoiceApplySaveBodyDTO param);
/**
* A303-4 开票申请单查询
*
* @param accessToken 访问令牌,通过 getToken 获取
* @param pageNo 页码,从1开始
* @param pageSize 页数
* @param billno 业务单据编号
* @param systemsource 数据来源系统
* @param billdateS 单据日期-开始
* @param billdateE 单据日期-结束
* @return 开票申请单分页数据
*/
@GetMapping(INVOICE_APPLY_QUERY_URL)
BfiResultVO<BfiPageVO<BfiInvoiceApplyVO>> invoiceApplyQuery(@RequestHeader(BfiConstant.HEADER_ACCESS_TOKEN) String accessToken,
@RequestParam("pageNo") Integer pageNo,
@RequestParam("pageSize") Integer pageSize,
@RequestParam(value = "billno", required = false) List<String> billno,
@RequestParam(value = "systemsource", required = false) String systemsource,
@RequestParam(value = "billdateS", required = false) String billdateS,
@RequestParam(value = "billdateE", required = false) String billdateE);
/**
* A303-5 开票申请发票查询
*
* @param accessToken 访问令牌,通过 getToken 获取
* @param param 请求参数,data 为原文 JSON 的 Base64 编码
* @return 发票查询结果
*/
@PostMapping(INVOICE_APPLY_OPEN_API_URL)
BfiOpenApiResultVO<List<Object>> invoiceApplyOpenApi(@RequestHeader(BfiConstant.HEADER_ACCESS_TOKEN) String accessToken, @RequestBody BfiInvoiceApplyOpenApiBodyDTO param);
/**
* A303-2 收票单新增(批量保存)
*
* @param accessToken 访问令牌,通过 getToken 获取
* @param param 请求参数
* @return 保存结果
*/
@PostMapping(RECEIVED_INVOICE_SAVE_URL)
BfiResultVO<BfiBillSaveResultVO> receivedInvoiceSave(@RequestHeader(BfiConstant.HEADER_ACCESS_TOKEN) String accessToken, @RequestBody BfiReceivedInvoiceSaveBodyDTO param);
/**
* A801-3 收票单查询
*
* @param accessToken 访问令牌,通过 getToken 获取
* @param param 查询参数
* @return 收票单分页数据
*/
@GetMapping(RECEIVED_INVOICE_QUERY_URL)
BfiResultVO<BfiPageVO<BfiReceivedInvoiceVO>> receivedInvoiceQuery(@RequestHeader(BfiConstant.HEADER_ACCESS_TOKEN) String accessToken, @SpringQueryMap BfiReceivedInvoiceQueryDTO param);
/**
* A301-1 收款单查询(收款处理查询)
*
* @param accessToken 访问令牌,通过 getToken 获取
* @param pageNo 页码,从1开始
* @param pageSize 页数
* @param beginBizdate 开始业务日期
* @param endBizdate 结束业务日期
* @param billno 单据编号
* @param orgNumber 收款人(公司).编码
* @return 收款处理分页数据
*/
@GetMapping(REC_BILL_QUERY_URL)
BfiResultVO<BfiPageVO<BfiRecBillVO>> recBillQuery(@RequestHeader(BfiConstant.HEADER_ACCESS_TOKEN) String accessToken,
@RequestParam("pageNo") Integer pageNo,
@RequestParam("pageSize") Integer pageSize,
@RequestParam("begin_bizdate") String beginBizdate,
@RequestParam("end_bizdate") String endBizdate,
@RequestParam(value = "billno", required = false) List<String> billno,
@RequestParam(value = "org_number", required = false) List<String> orgNumber);
/**
* A301-2 收款认领公告查询
*
* @param accessToken 访问令牌,通过 getToken 获取
* @param claimusers 参与认领用户名
* @param pageNo 页码,从1开始
* @param pageSize 页数
* @return 收款认领公告分页数据
*/
@GetMapping(CLAIM_ANNOUNCE_QUERY_URL)
BfiResultVO<BfiPageVO<BfiClaimAnnounceVO>> claimAnnounceQuery(@RequestHeader(BfiConstant.HEADER_ACCESS_TOKEN) String accessToken,
@RequestParam("claimusers") String claimusers,
@RequestParam("pageNo") Integer pageNo,
@RequestParam("pageSize") Integer pageSize);
/**
* A301-3 收款认领结果推送
*
* @param accessToken 访问令牌,通过 getToken 获取
* @param param 请求参数
* @return 推送结果
*/
@PostMapping(CLAIM_BILL_PUSH_URL)
BfiResultVO<BfiBillSaveResultVO> claimBillPush(@RequestHeader(BfiConstant.HEADER_ACCESS_TOKEN) String accessToken, @RequestBody BfiClaimPushBodyDTO param);
/**
* A801-1 查询全票池发票数据
*
* @param accessToken 访问令牌,通过 getToken 获取
* @param param 查询参数
* @return 票池发票数据列表
*/
@PostMapping(INVOICE_POOL_QUERY_URL)
BfiResultVO<List<BfiInvoicePoolVO>> invoicePoolQuery(@RequestHeader(BfiConstant.HEADER_ACCESS_TOKEN) String accessToken, @RequestBody BfiInvoicePoolQueryDTO param);
/**
* A801-2 进项发票下载(文件下载),返回文件流
*
* @param accessToken 访问令牌,通过 getToken 获取
* @param param 请求参数
* @return 文件流响应
*/
@PostMapping(INVOICE_DOWNLOAD_URL)
Response invoiceDownload(@RequestHeader(BfiConstant.HEADER_ACCESS_TOKEN) String accessToken, @RequestBody BfiInvoiceDownloadDTO param);
}
@@ -0,0 +1,80 @@
/**
* 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 lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.util.List;
/**
* 业财融合(BFI)A102-4 财务应付单查询参数
* <p>
* 请求示例:
* <pre>{@code
* GET /ierp/kapi/v2/awrp/ap/ap_finapbill/query?awrp_src_sys=YC&pageSize=10&pageNo=1
* }</pre>
*
* @author Chill
*/
@Data
public class BfiApBillQueryDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 【必填】页码,从1开始
*/
private Integer pageNo;
/**
* 【必填】页数
*/
private Integer pageSize;
/**
* 来源单据号,业务系统对应的单据号,高频查询需要推送该字段
*/
private List<String> awrpSrcCode;
/**
* 系统编号
*/
private String awrpSrcSys;
/**
* 修改时间-开始,格式:yyyy-MM-dd HH:mm:ss,限定时间范围不可超过1个月
*/
private String modifytimeS;
/**
* 修改时间-结束,格式:yyyy-MM-dd HH:mm:ss
*/
private String modifytimeE;
/**
* 单据状态[A:暂存, B:已提交, C:已审核](BfiConstant.BILL_STATUS_DRAFT / BILL_STATUS_SUBMITTED / BILL_STATUS_AUDITED)
*/
private List<String> billstatus;
/**
* 结算状态[unsettle:未结算, partsettle:部分结算, settled:全部结算](BfiConstant.SETTLE_STATUS_UNSETTLE / SETTLE_STATUS_PART / SETTLE_STATUS_SETTLED)
*/
private List<String> settlestatus;
}
@@ -0,0 +1,47 @@
/**
* 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 lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.util.List;
/**
* 业财融合(BFI)A102-2 财务应付单保存请求体,结构为 data 数组
*
* @author Chill
*/
@Data
public class BfiApBillSaveBodyDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 财务应付单数据
*/
private List<BfiApBillSaveDTO> data;
}
@@ -0,0 +1,317 @@
/**
* 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.JsonProperty;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
/**
* 业财融合(BFI)A102-2 财务应付单保存参数
* <p>
* 请求示例:
* <pre>{@code
* {
* "data": [
* {
* "billno": "test-0210-m1",
* "billtypeid_number": "ApFin_pur_BT_S",
* "org_number": "01.00",
* "bizdate": "2026-01-10 00:00:00",
* "asstacttype": "bd_supplier",
* "asstact_number": "G01.01.04.02-10-0017",
* "purmode": "CREDIT",
* "currency_number": "CNY",
* "payorg_number": "01.00",
* "payproperty_number": "2001",
* "settlementtype_number": "02",
* "isincludetax": true,
* "purorg_number": "01.00",
* "remark": "ceshi",
* "awrp_src_sys": "YC",
* "awrp_src_code": "test-0210-m1",
* "awrp_src_bt": "awrp_contract_info",
* "awrp_src_con_no": "1",
* "detailentry": [
* {
* "material_number": "BYWL02.0141",
* "measureunit_number": "GE",
* "quantity": 2.00,
* "pricetax": 5.0,
* "taxrateid_number": "V13",
* "e_remark": "test",
* "awrp_entry_code": "ee1",
* "awrp_src_con_eno": "e1",
* "project_number": "XDWL-ZSLXM-2026-0002"
* }
* ],
* "preentry": [
* {
* "y_billtype": "cas_paybill",
* "y_billid": "2350830337921133568",
* "y_settleamt": 2
* }
* ]
* }
* ]
* }
* }</pre>
*
* @author Chill
*/
@Data
public class BfiApBillSaveDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 单据编号,业务不传,由星瀚生成(如 AP-202601-001394)
*/
private String billno;
/**
* 【必填】单据类型.编码[ApFin_pur_BT_S:标准采购应付, ApFin_fee_BT_S:费用采购应付, ApFin_purfee_BT_S:采购费用应付, ap_finapbill_asset_BT_S:资产采购应付, ApFin_service_BT_S:服务采购应付, ApFin_product_BT_S:产品委外应付, ApFin_other_BT_S:其他应付, ApFin_borr_BT_S:借贷项调整],城矿常用 ApFin_pur_BT_S(BfiConstant.AP_BILL_TYPE_PURCHASE)
*/
@JsonProperty("billtypeid_number")
private String billtypeidNumber;
/**
* 【必填】结算组织.编码
*/
@JsonProperty("org_number")
private String orgNumber;
/**
* 【必填】单据日期,格式:yyyy-MM-dd HH:mm:ss,城矿传创建时间
*/
private String bizdate;
/**
* 到期日,格式:yyyy-MM-dd HH:mm:ss
*/
private String duedate;
/**
* 记账日期,格式:yyyy-MM-dd
*/
private String bookdate;
/**
* 【必填】往来类型[bd_supplier:供应商, bos_user:人员, bd_customer:客户],城矿传供应商(BfiConstant.ASSTACT_TYPE_SUPPLIER)
*/
private String asstacttype;
/**
* 【必填】往来户.编码
*/
@JsonProperty("asstact_number")
private String asstactNumber;
/**
* 【必填】付款方式[CASH:现购, CREDIT:赊购],现购代表系统自动100%推付款,赊购可自由调整后续付款金额(BfiConstant.PAY_MODE_CASH / PAY_MODE_CREDIT)
*/
private String purmode;
/**
* 【必填】结算币别.货币代码,如 CNY(BfiConstant.CURRENCY_CNY)
*/
@JsonProperty("currency_number")
private String currencyNumber;
/**
* 汇率
*/
private BigDecimal exchangerate;
/**
* 汇率表.编码,如 01(BfiConstant.EXRATE_TABLE_DEFAULT)
*/
@JsonProperty("exratetable_number")
private String exratetableNumber;
/**
* 【必填】付款组织.编码
*/
@JsonProperty("payorg_number")
private String payorgNumber;
/**
* 【必填】款项性质.编码,如 2001 材料采购(BfiConstant.PAY_PROPERTY_MATERIAL)
*/
@JsonProperty("payproperty_number")
private String paypropertyNumber;
/**
* 付款条件.编码
*/
@JsonProperty("paycond_number")
private String paycondNumber;
/**
* 结算方式.编码,02 银行转账(BfiConstant.SETTLE_TYPE_BANK)
*/
@JsonProperty("settlementtype_number")
private String settlementtypeNumber;
/**
* 是否期初
*/
private Boolean isperiod;
/**
* 录入含税价
*/
private Boolean isincludetax;
/**
* 部门.编码
*/
@JsonProperty("department_number")
private String departmentNumber;
/**
* 汇率日期,格式:yyyy-MM-dd HH:mm:ss
*/
private String exratedate;
/**
* 录入总价,为 true 后可不录入单价
*/
private Boolean ispricetotal;
/**
* 采购组织.编码
*/
@JsonProperty("purorg_number")
private String purorgNumber;
/**
* 采购组.编码
*/
@JsonProperty("purdept_number")
private String purdeptNumber;
/**
* 采购员.业务员编码
*/
@JsonProperty("purchaser_operatornumber")
private String purchaserOperatornumber;
/**
* 质保金
*/
private Boolean ispremium;
/**
* 质保金比例(%)
*/
private BigDecimal premiumrate;
/**
* 质保金金额
*/
private BigDecimal premiumamt;
/**
* 质保金到期日,格式:yyyy-MM-dd
*/
private String premduedate;
/**
* 往来单位名称
*/
private String asstactname;
/**
* 换算方式[0:直接汇率, 1:间接汇率]
*/
private String quotation;
/**
* 微调
*/
private Boolean isintertaxfx;
/**
* 税额不计入成本
*/
private Boolean istaxdeduction;
/**
* 按比例分配
*/
private Boolean allocatebyper;
/**
* 按应付金额分配
*/
private Boolean isintax;
/**
* 收款账号,城矿不传
*/
private String payeebanknum;
/**
* 收款银行.编码,城矿不传
*/
@JsonProperty("bebank_number")
private String bebankNumber;
/**
* 备注
*/
private String remark;
/**
* 微调金额
*/
private Boolean isfx;
/**
* 微调应付金额
*/
private Boolean isfxpricetaxtotal;
/**
* 源单id
*/
private Long sourcebillid;
/**
* 源单类型,如 ap_invoice
*/
private String sourcebilltype;
/**
* 源单编码
*/
private String sourcebillno;
/**
* 单据来源类型[0:手工新增, 1:导入生成, 2:后台生成, 3:从总账导入, 4:协同调差生成, fromeas:EAS集成, 21:跨租户同步]
*/
private String billsrctype;
/**
* 【必填】外部系统编号,候选键
*/
@JsonProperty("awrp_src_sys")
private String awrpSrcSys;
/**
* 【必填】外部系统来源单据号,候选键,建议拼接
*/
@JsonProperty("awrp_src_code")
private String awrpSrcCode;
/**
* 来源单据,有上游合同则传 awrp_contract_info
*/
@JsonProperty("awrp_src_bt")
private String awrpSrcBt;
/**
* 上游外部系统单据号,即上游合同号
*/
@JsonProperty("awrp_src_con_no")
private String awrpSrcConNo;
/**
* 【必填】外部单据类型
*/
@JsonProperty("awrp_src_type")
private String awrpSrcType;
/**
* 【必填】明细分录
*/
@JsonProperty("detailentry")
private List<BfiApBillSaveEntryDTO> detailentry;
/**
* 付款计划分录,不传则自动汇总生成
*/
private List<BfiApBillSavePlanDTO> planentity;
/**
* 预付信息分录
*/
private List<BfiApBillSavePreEntryDTO> preentry;
}
@@ -0,0 +1,133 @@
/**
* 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.JsonProperty;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 业财融合(BFI)A102-2 财务应付单保存 明细分录
*
* @author Chill
*/
@Data
public class BfiApBillSaveEntryDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 【必填】物料编码.编码,城矿对应物料(如 BYWL02.0141 废钢、WCY01.0001)
*/
@JsonProperty("material_number")
private String materialNumber;
/**
* 费用项目.编码
*/
@JsonProperty("expenseitem_number")
private String expenseitemNumber;
/**
* 【必填】项目.项目编码,项目字段必填、若不涉及项目传编码999(BfiConstant.PROJECT_NOT_APPLICABLE)
*/
@JsonProperty("project_number")
private String projectNumber;
/**
* 【必填】计量单位.编码,城矿传吨/千克
*/
@JsonProperty("measureunit_number")
private String measureunitNumber;
/**
* 【必填】数量,城矿传重量
*/
private BigDecimal quantity;
/**
* 单价,城矿对应付款单价
*/
private BigDecimal price;
/**
* 含税单价
*/
private BigDecimal pricetax;
/**
* 折扣方式[PERCENT:折扣率(%), PERUNIT:单位折扣额, NULL:无, TOTAL:固定折扣额],城矿默认无
*/
private String discountmode;
/**
* 单位折扣(率)
*/
private BigDecimal discountrate;
/**
* 赠品
*/
private Boolean ispresent;
/**
* 税率.编码,城矿传 V13(BfiConstant.TAX_RATE_V13)
*/
@JsonProperty("taxrateid_number")
private String taxrateidNumber;
/**
* 核心单据行号
*/
@JsonProperty("corebillentryseq")
private Integer corebillentryseq;
/**
* 核心单据类型[sctm_scpo:委外采购订单, pm_om_purorderbill:简单委外订单, conm_purcontract:采购合同, ec_paymentapply:付款单申请单, pm_purorderbill:采购订单]
*/
@JsonProperty("corebilltype")
private String corebilltype;
/**
* 备注
*/
@JsonProperty("e_remark")
private String eRemark;
/**
* 应付金额,城矿对应挂账金额
*/
@JsonProperty("e_pricetaxtotal")
private BigDecimal ePricetaxtotal;
/**
* 金额,城矿对应实付金额
*/
@JsonProperty("e_amount")
private BigDecimal eAmount;
/**
* 税额
*/
@JsonProperty("e_tax")
private BigDecimal eTax;
/**
* 【必填】外部系统来源分录标识,候选键,传明细行行ID或行编码
*/
@JsonProperty("awrp_entry_code")
private String awrpEntryCode;
/**
* 上游分录号,即上游合同分录号
*/
@JsonProperty("awrp_src_con_eno")
private String awrpSrcConEno;
}
@@ -0,0 +1,105 @@
/**
* 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.JsonProperty;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 业财融合(BFI)A102-2 财务应付单保存 付款计划分录
*
* @author Chill
*/
@Data
public class BfiApBillSavePlanDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 到期日,格式:yyyy-MM-dd
*/
private String planduedate;
/**
* 应付金额
*/
private BigDecimal planpricetax;
/**
* 备注
*/
private String planremark;
/**
* 合同
*/
private String plancontract;
/**
* 外部系统来源分录标识,候选键,不传自动取外部系统单据号
*/
@JsonProperty("awrp_entry_code_p")
private String awrpEntryCodeP;
/**
* 利润中心.编码
*/
@JsonProperty("planprofitcenter_number")
private String planprofitcenterNumber;
/**
* 对方利润中心.编码
*/
@JsonProperty("plancprofitcenter_number")
private String plancprofitcenterNumber;
/**
* 结算方式.编码
*/
@JsonProperty("plansettletype_number")
private String plansettletypeNumber;
/**
* 物料编码.编码
*/
@JsonProperty("planmaterial_number")
private String planmaterialNumber;
/**
* 费用项目.编码
*/
@JsonProperty("planexpenseitem_number")
private String planexpenseitemNumber;
/**
* 【必填】项目.项目编码,项目字段必填、若不涉及项目传编码999(BfiConstant.PROJECT_NOT_APPLICABLE)
*/
@JsonProperty("planproject_number")
private String planprojectNumber;
/**
* 成本中心.编码
*/
@JsonProperty("plancostcenter_number")
private String plancostcenterNumber;
/**
* 付款比例(%)
*/
@JsonProperty("p_payrate")
private BigDecimal pPayrate;
}
@@ -0,0 +1,59 @@
/**
* 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.JsonProperty;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 业财融合(BFI)A102-2 财务应付单保存 预付信息分录
*
* @author Chill
*/
@Data
public class BfiApBillSavePreEntryDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 【必填】单据类型[cas_paybill:付款处理, ap_paidbill:期初预付单](BfiConstant.PREPAY_BILL_TYPE_PAY_BILL / PREPAY_BILL_TYPE_INIT_PAID)
*/
@JsonProperty("y_billtype")
private String yBilltype;
/**
* 【必填】预付款单id,对应星瀚单据的id
*/
@JsonProperty("y_billid")
private String yBillid;
/**
* 本次结算金额
*/
@JsonProperty("y_settleamt")
private BigDecimal ySettleamt;
}
@@ -0,0 +1,80 @@
/**
* 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 lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.util.List;
/**
* 业财融合(BFI)A302-4 财务应收单查询参数
* <p>
* 请求示例:
* <pre>{@code
* GET /ierp/kapi/v2/awrp/ar/ar_finarbill/query?awrp_src_sys=YC&pageSize=10&pageNo=1
* }</pre>
*
* @author Chill
*/
@Data
public class BfiArBillQueryDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 【必填】页码,从1开始
*/
private Integer pageNo;
/**
* 【必填】页数
*/
private Integer pageSize;
/**
* 来源单据号,业务系统对应的单据号,高频查询需要推送该字段
*/
private List<String> awrpSrcCode;
/**
* 系统编号
*/
private String awrpSrcSys;
/**
* 修改时间-开始,格式:yyyy-MM-dd HH:mm:ss,限定时间范围不可超过1个月
*/
private String modifytimeS;
/**
* 修改时间-结束,格式:yyyy-MM-dd HH:mm:ss
*/
private String modifytimeE;
/**
* 单据状态[A:暂存, B:已提交, C:已审核](BfiConstant.BILL_STATUS_DRAFT / BILL_STATUS_SUBMITTED / BILL_STATUS_AUDITED)
*/
private List<String> billstatus;
/**
* 结算状态[unsettle:未结算, partsettle:部分结算, settled:全部结算](BfiConstant.SETTLE_STATUS_UNSETTLE / SETTLE_STATUS_PART / SETTLE_STATUS_SETTLED)
*/
private List<String> settlestatus;
}
@@ -0,0 +1,47 @@
/**
* 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 lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.util.List;
/**
* 业财融合(BFI)A302-2 财务应收单保存请求体,结构为 data 数组
*
* @author Chill
*/
@Data
public class BfiArBillSaveBodyDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 财务应收单数据
*/
private List<BfiArBillSaveDTO> data;
}
@@ -0,0 +1,284 @@
/**
* 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.JsonProperty;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
/**
* 业财融合(BFI)A302-2 财务应收单保存参数
* <p>
* 请求示例:
* <pre>{@code
* {
* "data": [
* {
* "billno": "AR-260113-008444",
* "billtype_number": "arfin_standard_BT_S",
* "org_number": "01.00",
* "bizdate": "2026-01-13 00:00:00",
* "asstacttype": "bd_customer",
* "asstact_number": "K01.02.11.00-20-0102",
* "paymode": "CREDIT",
* "payproperty_number": "1001",
* "currency_number": "CNY",
* "duedate": "2026-01-13 00:00:00",
* "paycond_number": "01",
* "settlementtype_number": "02",
* "isincludetax": true,
* "awrp_src_sys": "YC",
* "awrp_src_code": "1",
* "awrp_src_bt": "awrp_contract_info",
* "awrp_src_con_no": "11",
* "entry": [
* {
* "e_material_number": "BYWL02.0140",
* "e_measureunit_number": "GE",
* "e_quantity": 2.00,
* "e_taxunitprice": 5.0,
* "taxrateid_number": "V13",
* "e_remark": "分录备注",
* "awrp_src_con_eno": "e1",
* "awrp_entry_code": "ee1"
* }
* ],
* "planentity": [
* {
* "planduedate": "2026-01-13 00:00:00",
* "planpricetax": 10.00,
* "planremark": "",
* "plansettletype_number": "02",
* "awrp_entry_code_p": "OBHqh",
* "plancontract": "nVYpM"
* }
* ]
* }
* ]
* }
* }</pre>
*
* @author Chill
*/
@Data
public class BfiArBillSaveDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 单据编号,业务不传,由星瀚生成(如 AR-260113-008444)
*/
private String billno;
/**
* 【必填】单据类型.编码[arfin_standard_BT_S:标准销售应收, arfin_sersal_BT_S:服务销售应收, arfin_salefee_BT_S:销售费用应收, arfin_other_BT_S:其他应收, arfin_borrowar_BT_S:借贷项调整](BfiConstant.AR_BILL_TYPE_STANDARD)
*/
@JsonProperty("billtype_number")
private String billtypeNumber;
/**
* 【必填】结算组织.编码,城矿传 WCCK
*/
@JsonProperty("org_number")
private String orgNumber;
/**
* 【必填】单据日期,格式:yyyy-MM-dd HH:mm:ss,城矿传创建时间
*/
private String bizdate;
/**
* 到期日,格式:yyyy-MM-dd HH:mm:ss
*/
private String duedate;
/**
* 记账日期,格式:yyyy-MM-dd
*/
private String bookdate;
/**
* 【必填】往来类型[bd_supplier:供应商, bos_user:人员, bd_customer:客户],城矿传客户(BfiConstant.ASSTACT_TYPE_CUSTOMER)
*/
private String asstacttype;
/**
* 【必填】往来户.编码
*/
@JsonProperty("asstact_number")
private String asstactNumber;
/**
* 收款组织.编码
*/
@JsonProperty("recorg_number")
private String recorgNumber;
/**
* 【必填】付款方式[CASH:现销, CREDIT:赊销](BfiConstant.PAY_MODE_CASH / PAY_MODE_CREDIT)
*/
private String paymode;
/**
* 【必填】款项性质.编码,如 1001 一般销售(BfiConstant.PAY_PROPERTY_SALE)
*/
@JsonProperty("payproperty_number")
private String paypropertyNumber;
/**
* 【必填】结算币别.货币代码,如 CNY(BfiConstant.CURRENCY_CNY)
*/
@JsonProperty("currency_number")
private String currencyNumber;
/**
* 汇率表.编码,如 01(BfiConstant.EXRATE_TABLE_DEFAULT)
*/
@JsonProperty("exratetable_number")
private String exratetableNumber;
/**
* 汇率
*/
private BigDecimal exchangerate;
/**
* 汇率日期,格式:yyyy-MM-dd HH:mm:ss
*/
private String exratedate;
/**
* 收款条件.编码,如 01
*/
@JsonProperty("paycond_number")
private String paycondNumber;
/**
* 结算方式.编码,如 02(BfiConstant.SETTLE_TYPE_BANK)
*/
@JsonProperty("settlementtype_number")
private String settlementtypeNumber;
/**
* 部门.编码
*/
@JsonProperty("department_number")
private String departmentNumber;
/**
* 销售组织.编码
*/
@JsonProperty("salesorg_number")
private String salesorgNumber;
/**
* 销售组.编码
*/
@JsonProperty("salesgroup_number")
private String salesgroupNumber;
/**
* 销售员.业务员编码
*/
@JsonProperty("salesman_operatornumber")
private String salesmanOperatornumber;
/**
* 是否期初
*/
private Boolean isperiod;
/**
* 录入含税价,传 true 含税,传 false 系统会再算税
*/
private Boolean isincludetax;
/**
* 录入总价
*/
private Boolean ispricetotal;
/**
* 备注
*/
private String remark;
/**
* 微调金额
*/
private Boolean isfx;
/**
* 微调应收金额
*/
private Boolean isfxpricetaxtotal;
/**
* 业务唯一码
*/
private String bizfingerprint;
/**
* 质保金到期日,格式:yyyy-MM-dd HH:mm:ss
*/
private String premduedate;
/**
* 质保金比例(%)
*/
private BigDecimal premiumrate;
/**
* 质保金金额
*/
private BigDecimal premiumamt;
/**
* 质保金
*/
private Boolean ispremium;
/**
* 源单ID
*/
private String sourcebillid;
/**
* 源单类型,如 ar_invoice
*/
private String sourcebilltype;
/**
* 源单编码
*/
private String sourcebillno;
/**
* 单据来源类型[0:手工新增, 1:导入生成, 2:后台生成, 3:从总账导入, 4:协同调差生成, fromeas:EAS集成, 21:跨租户同步]
*/
private String billsrctype;
/**
* 【必填】外部系统编号,候选键
*/
@JsonProperty("awrp_src_sys")
private String awrpSrcSys;
/**
* 【必填】外部系统来源单据号,候选键
*/
@JsonProperty("awrp_src_code")
private String awrpSrcCode;
/**
* 来源单据,有上游合同则传 awrp_contract_info
*/
@JsonProperty("awrp_src_bt")
private String awrpSrcBt;
/**
* 上游外部系统单据号,即上游合同号
*/
@JsonProperty("awrp_src_con_no")
private String awrpSrcConNo;
/**
* 【必填】外部单据类型
*/
@JsonProperty("awrp_src_type")
private String awrpSrcType;
/**
* 【必填】明细分录
*/
private List<BfiArBillSaveEntryDTO> entry;
/**
* 收款计划分录,不传则自动汇总成一行
*/
private List<BfiArBillSavePlanDTO> planentity;
}
@@ -0,0 +1,144 @@
/**
* 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.JsonProperty;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 业财融合(BFI)A302-2 财务应收单保存 明细分录
*
* @author Chill
*/
@Data
public class BfiArBillSaveEntryDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 【必填】物料编码.编码
*/
@JsonProperty("e_material_number")
private String eMaterialNumber;
/**
* 费用项目.编码
*/
@JsonProperty("e_expenseitem_number")
private String eExpenseitemNumber;
/**
* 【必填】项目.项目编码,项目字段必填、若不涉及项目传编码999(BfiConstant.PROJECT_NOT_APPLICABLE)
*/
@JsonProperty("project_number")
private String projectNumber;
/**
* 【必填】计量单位.编码
*/
@JsonProperty("e_measureunit_number")
private String eMeasureunitNumber;
/**
* 【必填】数量
*/
@JsonProperty("e_quantity")
private BigDecimal eQuantity;
/**
* 单价
*/
@JsonProperty("e_unitprice")
private BigDecimal eUnitprice;
/**
* 含税单价
*/
@JsonProperty("e_taxunitprice")
private BigDecimal eTaxunitprice;
/**
* 折扣方式[PERCENT:折扣率(%), PERUNIT:单位折扣额, NULL:无, TOTAL:固定折扣额]
*/
@JsonProperty("e_discountmode")
private String eDiscountmode;
/**
* 单位折扣(率)
*/
@JsonProperty("e_discountrate")
private BigDecimal eDiscountrate;
/**
* 税率.编码,如 V13
*/
@JsonProperty("taxrateid_number")
private String taxrateidNumber;
/**
* 赠品
*/
@JsonProperty("e_ispresent")
private Boolean eIspresent;
/**
* 核心单据类型[ec_incomeapply:请款单, conm_salcontract:销售合同, sm_salorder:销售订单]
*/
@JsonProperty("e_corebilltype")
private String eCorebilltype;
/**
* 核心单据号
*/
@JsonProperty("e_corebillno")
private String eCorebillno;
/**
* 核心单据行号
*/
@JsonProperty("e_corebillentryseq")
private Integer eCorebillentryseq;
/**
* 备注
*/
@JsonProperty("e_remark")
private String eRemark;
/**
* 金额
*/
@JsonProperty("e_amount")
private BigDecimal eAmount;
/**
* 税额
*/
@JsonProperty("e_tax")
private BigDecimal eTax;
/**
* 应收金额
*/
@JsonProperty("e_recamount")
private BigDecimal eRecamount;
/**
* 上游分录号,即上游合同分录号
*/
@JsonProperty("awrp_src_con_eno")
private String awrpSrcConEno;
/**
* 【必填】外部系统来源分录标识,候选键
*/
@JsonProperty("awrp_entry_code")
private String awrpEntryCode;
}
@@ -0,0 +1,100 @@
/**
* 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.JsonProperty;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 业财融合(BFI)A302-2 财务应收单保存 收款计划分录
*
* @author Chill
*/
@Data
public class BfiArBillSavePlanDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 备注
*/
private String planremark;
/**
* 结算方式.编码,如 02
*/
@JsonProperty("plansettletype_number")
private String plansettletypeNumber;
/**
* 外部系统来源分录标识,候选键,不传自动取外部系统单据号
*/
@JsonProperty("awrp_entry_code_p")
private String awrpEntryCodeP;
/**
* 利润中心.编码
*/
@JsonProperty("planprofitcenter_number")
private String planprofitcenterNumber;
/**
* 物料编码.编码
*/
@JsonProperty("planmaterial_number")
private String planmaterialNumber;
/**
* 费用项目.编码
*/
@JsonProperty("planexpenseitem_number")
private String planexpenseitemNumber;
/**
* 【必填】项目.项目编码,项目字段必填、若不涉及项目传编码999(BfiConstant.PROJECT_NOT_APPLICABLE)
*/
@JsonProperty("planproject_number")
private String planprojectNumber;
/**
* 合同
*/
private String plancontract;
/**
* 对方利润中心.编码
*/
@JsonProperty("plancprofitcenter_number")
private String plancprofitcenterNumber;
/**
* 应收金额
*/
private BigDecimal planpricetax;
/**
* 收款比例(%)
*/
@JsonProperty("p_recrate")
private BigDecimal pRecrate;
/**
* 到期日,格式:yyyy-MM-dd HH:mm:ss
*/
private String planduedate;
}
@@ -0,0 +1,59 @@
/**
* 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 lombok.Data;
import java.io.Serial;
import java.io.Serializable;
/**
* 业财融合(BFI)A301-2 收款认领公告查询参数
* <p>
* 请求示例:
* <pre>{@code
* GET /ierp/kapi/v2/awrp/cas/cas_claimannounce/query?claimusers=苏浩晖&pageSize=10&pageNo=1
* }</pre>
*
* @author Chill
*/
@Data
public class BfiClaimAnnounceQueryDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 【必填】参与认领用户名
*/
private String claimusers;
/**
* 【必填】页码,从1开始
*/
private Integer pageNo;
/**
* 【必填】页数
*/
private Integer pageSize;
}
@@ -0,0 +1,47 @@
/**
* 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 lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.util.List;
/**
* 业财融合(BFI)A301-3 收款认领结果推送请求体,结构为 data 数组
*
* @author Chill
*/
@Data
public class BfiClaimPushBodyDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 认领结果数据
*/
private List<BfiClaimPushDTO> data;
}
@@ -0,0 +1,102 @@
/**
* 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.JsonProperty;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
/**
* 业财融合(BFI)A301-3 收款认领结果推送参数
* <p>
* 请求示例:
* <pre>{@code
* {
* "data": [
* {
* "awrp_src_sys": "WCCKTEST",
* "awrp_src_code": "RLCLTEST01",
* "billid": 2398805822369971200,
* "recpaytype_number": "101",
* "paymenttype": "bd_supplier",
* "recviewpayer": "柳州卓尔汽车服务有限公司",
* "recpayer": "1398800445421388800",
* "entryentity": [
* {
* "e_receivableamt": 10.0
* }
* ]
* }
* ]
* }
* }</pre>
*
* @author Chill
*/
@Data
public class BfiClaimPushDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 【必填】认领公告id
*/
private Long billid;
/**
* 【必填】来源系统编码
*/
@JsonProperty("awrp_src_sys")
private String awrpSrcSys;
/**
* 【必填】来源系统单据编码
*/
@JsonProperty("awrp_src_code")
private String awrpSrcCode;
/**
* 【必填】收款类型.编码,如 101
*/
@JsonProperty("recpaytype_number")
private String recpaytypeNumber;
/**
* 【必填】付款人类型,如 bd_supplier(BfiConstant.ASSTACT_TYPE_SUPPLIER)
*/
private String paymenttype;
/**
* 【必填】付款人名称
*/
private String recviewpayer;
/**
* 【必填】付款人id
*/
private String recpayer;
/**
* 【必填】单据体分录
*/
private List<BfiClaimPushEntryDTO> entryentity;
}
@@ -0,0 +1,68 @@
/**
* 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.JsonProperty;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 业财融合(BFI)A301-3 收款认领结果推送 单据体分录
*
* @author Chill
*/
@Data
public class BfiClaimPushEntryDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 【必填】应收金额
*/
@JsonProperty("e_receivableamt")
private BigDecimal eReceivableamt;
/**
* 核心单据类型[ar_finarbill:财务应收单, sm_salorder:销售订单, conm_salcontract:销售合同, fr_glreim_paybill:总账付款单, fr_glreim_recbill:总账收款单, mscon_performplanin:收入履约单, cas_agentpaybill:代发处理, cas_paybill:付款处理, cdm_drafttradebill:业务处理]
*/
@JsonProperty("e_corebilltype")
private String eCorebilltype;
/**
* 核心单据编号
*/
@JsonProperty("e_corebillno")
private String eCorebillno;
/**
* 分录行号
*/
private Integer seq;
/**
* 收款类型.编码
*/
@JsonProperty("e_receivingtype_number")
private String eReceivingtypeNumber;
}
@@ -0,0 +1,75 @@
/**
* 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.JsonProperty;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
/**
* 业财融合(BFI)A902-2 客户保存 银行信息分录
*
* @author Chill
*/
@Data
public class BfiCustomerBankEntryDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 【必填】银行账号,候选键,城矿对应 b_customer_info.bank_account
*/
private String bankaccount;
/**
* 【必填】账户名称,城矿对应 b_customer_info.bank_name
*/
private String accountname;
/**
* 默认
*/
@JsonProperty("isdefault_bank")
private Boolean isdefaultBank;
/**
* 账户性质[0:公司, 1:个人],城矿传 0
*/
@JsonProperty("account_property")
private String accountProperty;
/**
* 国际银行账户号码
*/
private String iban;
/**
* 【必填】币种.货币代码,候选键,城矿传 CNY(BfiConstant.CURRENCY_CNY)
*/
@JsonProperty("currency_number")
private String currencyNumber;
/**
* 【必填】开户银行.编码(行号),候选键
*/
@JsonProperty("bank_number")
private String bankNumber;
}
@@ -0,0 +1,55 @@
/**
* 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.JsonProperty;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
/**
* 业财融合(BFI)A902-2 客户保存 分类标准分录
* <p>
* 城矿固定传 standardid_number=JBFLBZ、groupid_number=1102(外部客户)
*
* @author Chill
*/
@Data
public class BfiCustomerGroupEntryDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 【必填】分类标准.编码,城矿固定 JBFLBZ(BfiConstant.GROUP_STANDARD_BASIC)
*/
@JsonProperty("standardid_number")
private String standardidNumber;
/**
* 【必填】分类.编码,城矿传 1102(外部客户)(BfiConstant.CUSTOMER_GROUP_EXTERNAL)
*/
@JsonProperty("groupid_number")
private String groupidNumber;
}
@@ -0,0 +1,64 @@
/**
* 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.JsonProperty;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
/**
* 业财融合(BFI)A902-2 客户保存 联系人信息分录
*
* @author Chill
*/
@Data
public class BfiCustomerLinkmanEntryDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 名称,候选键
*/
private String contactperson;
/**
* 职务
*/
private String contactpersonpost;
/**
* 部门
*/
private String dept;
/**
* 联系电话,候选键
*/
private String phone;
/**
* 默认
*/
@JsonProperty("isdefault_linkman")
private Boolean isdefaultLinkman;
}
@@ -0,0 +1,85 @@
/**
* 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.JsonProperty;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.util.List;
/**
* 业财融合(BFI)A902-1 客户查询参数
*
* @author Chill
*/
@Data
public class BfiCustomerQueryDTO 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;
/**
* 编码
*/
private List<String> number;
/**
* 创建组织.编码,城矿传 WCCK(BfiConstant.DATA_SOURCE_WCCK)
*/
@JsonProperty("createorg_number")
private String createorgNumber;
/**
* 统一社会信用代码(个人填写身份证号或手机号)
*/
private List<String> societycreditcode;
/**
* 身份证号
*/
private List<String> idno;
/**
* 修改时间-开始,格式:yyyy-MM-dd HH:mm:ss,限定时间范围不可超过6个月
*/
private String modifytimeS;
/**
* 修改时间-结束,格式:yyyy-MM-dd HH:mm:ss
*/
private String modifytimeE;
}
@@ -0,0 +1,47 @@
/**
* 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 lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.util.List;
/**
* 业财融合(BFI)A902-2 客户保存请求体,结构为 data 数组
*
* @author Chill
*/
@Data
public class BfiCustomerSaveBodyDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 客户数据
*/
private List<BfiCustomerSaveDTO> data;
}
@@ -0,0 +1,204 @@
/**
* 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.JsonProperty;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.util.List;
/**
* 业财融合(BFI)A902-2 客户保存参数
* <p>
* 请求示例:
* <pre>{@code
* {
* "data": [
* {
* "bizpartner_phone": "",
* "societycreditcode": "3253252",
* "awrp_cusfortrade": "A",
* "bankaccount": "test111114",
* "bizpartner_address": "test111114",
* "linkman": "",
* "bizfunction": "1,2,3,4",
* "artificialperson": "test111114",
* "accountname": "test111114",
* "fcusbeizhu": "",
* "name": "test111114",
* "postal_code": "",
* "type": "6",
* "entry_groupstandard": [
* {
* "standardid_number": "JBFLBZ",
* "groupid_number": "1102"
* }
* ]
* }
* ]
* }
* }</pre>
*
* @author Chill
*/
@Data
public class BfiCustomerSaveDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 编码,不传由星瀚生成(如 Cus-20251230-0001)
*/
private String number;
/**
* 【必填】名称,城矿对应 b_customer_info.customer_name
*/
private String name;
/**
* 数据状态[A:暂存, B:已提交, C:已审核],城矿传 B(BfiConstant.BILL_STATUS_SUBMITTED)
*/
private String status;
/**
* 【必填】伙伴类型[1:法人企业, 2:非法人企业, 3:非企业单位, 4:个人, 5:个体户, 6:民营企业, 7:非我区国有企业, 8:我区国有企业, 9:政府事业单位等, 10:农民专业合作社, 11:民政部门, 12:其他, 13:境外客商, 14:工会, 15:司法行政, 16:虚拟客商, 17:集体经济组织],需与财务确认,城矿常用 4/6/8/9/16
*/
private String type;
/**
* 详细地址,城矿对应 b_customer_info.registration_address
*/
@JsonProperty("bizpartner_address")
private String bizpartnerAddress;
/**
* 联系人,城矿对应 b_customer_info.contact_person
*/
private String linkman;
/**
* 联系电话,城矿对应 b_customer_info.contact_phone
*/
@JsonProperty("bizpartner_phone")
private String bizpartnerPhone;
/**
* 传真
*/
@JsonProperty("bizpartner_fax")
private String bizpartnerFax;
/**
* 【必填】统一社会信用代码(个人填写身份证号或手机号),候选键,城矿对应 b_customer_info.registration_code
*/
private String societycreditcode;
/**
* 纳税人识别号,统一社会信用代码存在时需推送
*/
@JsonProperty("tx_register_no")
private String txRegisterNo;
/**
* 法人代表,城矿对应 b_customer_info.legal_representative
*/
private String artificialperson;
/**
* 营业期限
*/
private String businessterm;
/**
* 经营范围
*/
private String businessscope;
/**
* 成立日期,格式:yyyy-MM-dd HH:mm:ss
*/
private String establishdate;
/**
* 业务职能,多选英文逗号隔开[1:销售, 2:结算, 3:付款, 4:收货],城矿全传 1,2,3,4
*/
private String bizfunction;
/**
* 电子邮箱,城矿对应 b_customer_info.email
*/
@JsonProperty("postal_code")
private String postalCode;
/**
* 身份证号,候选键
*/
private String idno;
/**
* 备注,城矿对应 b_customer_info.remarks
*/
private String fcusbeizhu;
/**
* 数据来源系统[XH:星瀚, WCY:物产云, JCZX:检测中心, NBERP:南北ERP, WCCK:城矿ERP, WY:维云(服务), CMS:合同系统, DTP:数据中台],城矿传 WCCK(BfiConstant.DATA_SOURCE_WCCK)
*/
@JsonProperty("awrp_datasourcesys")
private String awrpDatasourcesys;
/**
* 【必填】是否为贸易客商[A:是, B:否],城矿传 A(BfiConstant.CUS_FOR_TRADE_YES)
*/
@JsonProperty("awrp_cusfortrade")
private String awrpCusfortrade;
/**
* 供应商编码
*/
@JsonProperty("awrp_supplierno")
private String awrpSupplierno;
/**
* 新客户编码
*/
@JsonProperty("awrp_newnumber")
private String awrpNewnumber;
/**
* 客户分组.编码,如 1102
*/
@JsonProperty("group_number")
private String groupNumber;
/**
* 创建组织.编码,城矿传 WCCK
*/
@JsonProperty("createorg_number")
private String createorgNumber;
/**
* 内部客户
*/
private Boolean chkisinternalcompany;
/**
* 内部业务单元.编码
*/
@JsonProperty("internal_company_number")
private String internalCompanyNumber;
/**
* 【必填】分类标准分录,城矿固定传 standardid_number=JBFLBZ、groupid_number=1102(外部客户)(BfiConstant.GROUP_STANDARD_BASIC / CUSTOMER_GROUP_EXTERNAL)
*/
@JsonProperty("entry_groupstandard")
private List<BfiCustomerGroupEntryDTO> entryGroupstandard;
/**
* 银行信息分录,可不传
*/
@JsonProperty("entry_bank")
private List<BfiCustomerBankEntryDTO> entryBank;
/**
* 联系人信息分录,可不传
*/
@JsonProperty("entry_linkman")
private List<BfiCustomerLinkmanEntryDTO> entryLinkman;
}
@@ -0,0 +1,70 @@
/**
* 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.JsonProperty;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
/**
* 业财融合(BFI)A303-5 开票申请发票查询请求体
* <p>
* 请求示例(data 为原文 {"serialNo":"KPSQ-JCZX-202509-002270,KPSQ-JCZX-202509-002276","sellerTaxpayerId":"91450000MA5Q1G1M59"} Base64 编码后的字符串):
* <pre>{@code
* {
* "businessSystemCode": "XDWL02",
* "interfaceCode": "BILL.INVOICE.QUERY",
* "data": "ewogICAgICAgICJzZXJpYWxObyI6ICJLUFNRLUpDWlgtMjAyNTA5LTAwMjI3MCxLUFNRLUpDWlgtMjAyNTA5LTAwMjI3NiIsCiAgICAgICAgInNlbGxlclRheHBheWVySWQiOiAiOTE0NTAwMDBNQTVRMUcxTTU5IgogICAgfQ=="
* }
* }</pre>
*
* @author Chill
*/
@Data
public class BfiInvoiceApplyOpenApiBodyDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 请求id
*/
private String requestId;
/**
* 【必填】来源系统,城矿传 WCCK
*/
@JsonProperty("businessSystemCode")
private String businessSystemCode;
/**
* 【必填】接口编码,固定为 BILL.INVOICE.QUERY
*/
@JsonProperty("interfaceCode")
private String interfaceCode;
/**
* 【必填】请求 data,内容需加密成 base64 字符串
*/
private String data;
}
@@ -0,0 +1,51 @@
/**
* 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.JsonProperty;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
/**
* 业财融合(BFI)A303-5 开票申请发票查询 data 原文参数(需序列化为 JSON 后 Base64 编码放入请求体 data 字段)
*
* @author Chill
*/
@Data
public class BfiInvoiceApplyOpenApiQueryDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 【必填】单据编号,即开票申请单的 billno 字段,多个用英文逗号隔开,上限50个
*/
private String serialNo;
/**
* 【必填】销方税号,即开票申请单的 salertaxno 字段
*/
private String sellerTaxpayerId;
}
@@ -0,0 +1,72 @@
/**
* 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 lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.util.List;
/**
* 业财融合(BFI)A303-4 开票申请单查询参数
* <p>
* 请求示例:
* <pre>{@code
* GET /ierp/kapi/v2/awrp/sim/sim_original_bill/query?systemsource=WCCK&pageSize=10&pageNo=1
* }</pre>
*
* @author Chill
*/
@Data
public class BfiInvoiceApplyQueryDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 【必填】页码,从1开始
*/
private Integer pageNo;
/**
* 【必填】页数
*/
private Integer pageSize;
/**
* 业务单据编号,高频查询需要推送该字段
*/
private List<String> billno;
/**
* 数据来源系统,城矿传 WCCK
*/
private String systemsource;
/**
* 单据日期-开始,格式:yyyy-MM-dd HH:mm:ss,限定时间范围不可超过1个月
*/
private String billdateS;
/**
* 单据日期-结束,格式:yyyy-MM-dd HH:mm:ss
*/
private String billdateE;
}
@@ -0,0 +1,47 @@
/**
* 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 lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.util.List;
/**
* 业财融合(BFI)A303-1 开票申请单新增请求体,结构为 data 数组
*
* @author Chill
*/
@Data
public class BfiInvoiceApplySaveBodyDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 开票申请单数据
*/
private List<BfiInvoiceApplySaveDTO> data;
}
@@ -0,0 +1,308 @@
/**
* 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.JsonProperty;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
/**
* 业财融合(BFI)A303-1 开票申请单新增参数
* <p>
* 请求示例:
* <pre>{@code
* {
* "data": [
* {
* "orgid_number": "01.01.21.01",
* "awrp_orgfield_number": "YS.01.04.09",
* "billno": "test-0204-m1",
* "billdate": "2025-09-08 00:00:00",
* "billproperties": "1",
* "invoicetype": "08xdp",
* "taxationstyle": "0",
* "buyeremail": "11@qq.com",
* "buyerproperty": "0",
* "buyertaxno": "91450881MA7BFT2629",
* "buyername": "广西贵港建设集团有限公司桂平分公司",
* "salername": "广西壮族自治区建筑工程质量检测中心有限公司",
* "salertaxno": "91450000MA5Q1G1M59",
* "totalamount": 250.0,
* "systemsource": "WCCK",
* "customnameid_number": "K01.00-10-0037",
* "awrp_project_number": "XDWL-GC-2025-0070",
* "sim_original_bill_item": [
* {
* "awrp_src_con_eno": "0204-m1",
* "rowtype": "2",
* "taxratecodeid_number": "304060299",
* "unit": "项",
* "num": 1.0,
* "taxunitprice": 250.0,
* "taxamount": 250.0,
* "taxrate": "0.06",
* "goodsname": "检测费",
* "goodssimplename": "鉴证咨询服务",
* "benchmark": "0",
* "awrp_src_type": "0KzXs"
* }
* ]
* }
* ]
* }
* }</pre>
*
* @author Chill
*/
@Data
public class BfiInvoiceApplySaveDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 【必填】组织.编码,候选键,如 01.01.21.01
*/
@JsonProperty("orgid_number")
private String orgidNumber;
/**
* 【必填】业务单据编号,候选键,如 KPSQ-JCZX-202509-002283
*/
private String billno;
/**
* 【必填】单据日期,格式:yyyy-MM-dd HH:mm:ss
*/
private String billdate;
/**
* 【必填】单据性质[-1:负数, 1:正数]
*/
private String billproperties;
/**
* 【必填】发票种类[10xdp:数电发票(普通发票), 08xdp:数电发票(增值税专用发票)](BfiConstant.INVOICE_TYPE_DIGITAL_GENERAL / INVOICE_TYPE_DIGITAL_SPECIAL)
*/
private String invoicetype;
/**
* 【必填】征税方式[0:普通征税, 1:减按计征, 2:差额征税, 01:差额征税-全额开票, 02:差额征税-差额开票, 3:减按征税]
*/
private String taxationstyle;
/**
* 开票人,留空不传
*/
private String drawer;
/**
* 收款人
*/
private String payee;
/**
* 复核人
*/
private String reviewer;
/**
* 【必填】发票推送邮箱,邮箱必填
*/
private String buyeremail;
/**
* 发票备注,即发票上的备注信息
*/
private String invoiceremark;
/**
* 交付手机,手机非必填(按集团要求手机交付取消)
*/
private String buyerphone;
/**
* 【必填】购方企业类型[0:企业, 1:个人, 2:非企业单位]
*/
private String buyerproperty;
/**
* 【必填】购方纳税人识别号
*/
private String buyertaxno;
/**
* 展示买方地址电话
*/
private Boolean showbuyeraddresstel;
/**
* 购方地址及电话
*/
private String buyeraddr;
/**
* 展示买方银行
*/
private Boolean showbuyerbank;
/**
* 购方开户行及账号
*/
private String buyerbank;
/**
* 【必填】销方名称
*/
private String salername;
/**
* 【必填】销方纳税人识别号
*/
private String salertaxno;
/**
* 展示卖方地址电话
*/
private Boolean showsaleraddresstel;
/**
* 销方地址及电话
*/
private String saleraddr;
/**
* 展示卖方银行
*/
private Boolean showsalerbank;
/**
* 销方开户行及账号
*/
private String salerbank;
/**
* 【必填】申请价税合计
*/
private BigDecimal totalamount;
/**
* 申请金额
*/
private BigDecimal invoiceamount;
/**
* 申请税额
*/
private BigDecimal totaltax;
/**
* 特殊票种[00:非特殊票种, 02:收购, 06:抵扣通行费, 07:不抵扣通行费, 08:成品油, 11:卷烟, 18:机动车, E06:不动产租赁, E03:建筑服务, E05:不动产销售, E04:货物运输, E01:成品油(数电发票), E18:卷烟(数电发票), E12:自产农产品销售, E09:旅客运输, E14:机动车(数电发票), E07:代收车船税]
*/
private String specialtype;
/**
* 【必填】购方名称
*/
private String buyername;
/**
* 原始价税合计
*/
private BigDecimal oldtotalamount;
/**
* 剩余可开金额
*/
private BigDecimal surplusamount;
/**
* 剩余可开税额
*/
private BigDecimal surplustax;
/**
* 数据来源,固定3(BfiConstant.INVOICE_BILL_SOURCE)
*/
private String billsource;
/**
* 数据来源系统,城矿传 WCCK
*/
private String systemsource;
/**
* 单据完整[0:完整, 1:待补充]
*/
private String billcomplete;
/**
* 是否含税[0:不含税, 1:含税]
*/
private String hsbz;
/**
* 商品类型[1:开票项, 2:物料, 3:费用项目]
*/
private String producttype;
/**
* 税额微调
*/
private Boolean taxadjust;
/**
* 【必填】客户.编码
*/
@JsonProperty("customnameid_number")
private String customnameidNumber;
/**
* 合同日期,格式:yyyy-MM-dd
*/
private String contractdate;
/**
* 合同编号
*/
private String contractno;
/**
* 合同金额
*/
private BigDecimal contractamount;
/**
* 【必填】项目.项目编码
*/
@JsonProperty("awrp_project_number")
private String awrpProjectNumber;
/**
* 销售组织.编码
*/
@JsonProperty("salesorgbase_number")
private String salesorgbaseNumber;
/**
* 结算组织.编码
*/
@JsonProperty("settlementorgbase_number")
private String settlementorgbaseNumber;
/**
* 资金组织.编码
*/
@JsonProperty("capitalorgbase_number")
private String capitalorgbaseNumber;
/**
* 经办人.经办人编码
*/
@JsonProperty("operator_number")
private String operatorNumber;
/**
* 开票业务管控.编码
*/
@JsonProperty("bizcontroltype_number")
private String bizcontroltypeNumber;
/**
* 【必填】申请部门.编码
*/
@JsonProperty("awrp_orgfield_number")
private String awrpOrgfieldNumber;
/**
* 来源单据[ar_finarbill:财务应收单]
*/
@JsonProperty("awrp_src_bt")
private String awrpSrcBt;
/**
* 上游外部系统单据号
*/
@JsonProperty("awrp_src_con_no")
private String awrpSrcConNo;
/**
* 单据体分录
*/
@JsonProperty("sim_original_bill_item")
private List<BfiInvoiceApplySaveEntryDTO> simOriginalBillItem;
}
@@ -0,0 +1,163 @@
/**
* 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.JsonProperty;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 业财融合(BFI)A303-1 开票申请单新增 单据体分录
*
* @author Chill
*/
@Data
public class BfiInvoiceApplySaveEntryDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 费用项目.编码
*/
@JsonProperty("expenseitem_number")
private String expenseitemNumber;
/**
* 【必填】税收分类编码.编码,如 304060299
*/
@JsonProperty("taxratecodeid_number")
private String taxratecodeidNumber;
/**
* 规格型号
*/
private String specification;
/**
* 计量单位,如 项
*/
private String unit;
/**
* 数量,为折扣行时填0,其他按实际填写
*/
private BigDecimal num;
/**
* 单价(含税)
*/
private BigDecimal taxunitprice;
/**
* 金额(含税)
*/
private BigDecimal taxamount;
/**
* 税率[0:0%, 0.01:1%, 0.015:减按1.5%, 0.03:3%, 0.04:4%, 0.05:5%, 0.06:6%, 0.09:9%, 0.10:10%, 0.11:11%, 0.13:13%, 0.16:16%, 0.17:17%]
*/
private String taxrate;
/**
* 税额
*/
private BigDecimal tax;
/**
* 是否享受优惠[0:不享受, 1:享受]
*/
private String policylogo;
/**
* 金额(不含税)
*/
private BigDecimal amount;
/**
* 单价(不含税)
*/
private BigDecimal unitprice;
/**
* 税收分类合并编码
*/
private String goodscode;
/**
* 【必填】商品名称
*/
private String goodsname;
/**
* 【必填】简称,如 鉴证咨询服务
*/
private String goodssimplename;
/**
* 【必填】基准类型[0:数量基准, 1:金额基准]
*/
private String benchmark;
/**
* 优惠政策内容[免税, 不征税, 简易征收, 按3%简易征收, 按5%简易征收, 按5%简易征收减按1.5%计征, 稀土产品, 先征后退, 50%先征后退, 100%先征后退, 即征即退30%, 即征即退50%, 即征即退70%, 即征即退100%, 超税负3%即征即退, 超税负6%即征即退, 超税负8%即征即退, 超税负12%即征即退]
*/
private String policycontants;
/**
* 剩余可申请数量,为折扣行时填0,其他按实际填写
*/
private BigDecimal remainvalidnum;
/**
* 剩余可申请金额,根据单据含税标记(hsbz)赋值:含税时=含税金额,不含税时=不含税金额
*/
private BigDecimal remainvalidamount;
/**
* 剩余可申请税额
*/
private BigDecimal remainvalidtax;
/**
* 商品编码.商品编码,根据 producttype 字段判断是否填写
*/
@JsonProperty("goodsid_number")
private String goodsidNumber;
/**
* 物料编码.编码,根据 producttype 字段判断是否填写
*/
@JsonProperty("materielfield_number")
private String materielfieldNumber;
/**
* 【必填】行性质[1:折扣行, 2:商品行],折扣行需紧跟被折扣行后面
*/
private String rowtype;
/**
* 备注
*/
private String remark;
/**
* 明细扣除额
*/
private BigDecimal itemdeduction;
/**
* 上游分录号
*/
@JsonProperty("awrp_src_con_eno")
private String awrpSrcConEno;
/**
* 外部系统来源分录标识
*/
@JsonProperty("awrp_entry_code")
private String awrpEntryCode;
/**
* 【必填】外部单据类型,固定 0KzXs(BfiConstant.AWRP_SRC_TYPE_EXTERNAL)
*/
@JsonProperty("awrp_src_type")
private String awrpSrcType;
}
@@ -0,0 +1,69 @@
/**
* 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.JsonProperty;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.util.List;
/**
* 业财融合(BFI)A302-6 收票指定应付请求体
* <p>
* 请求示例:
* <pre>{@code
* {
* "data": [
* {
* "ap_invoice": [
* { "awrp_src_code": "test-m", "awrp_src_sys": "WCCK" }
* ],
* "ap_finapbill": [
* { "awrp_src_code": "test-ap-m", "awrp_src_sys": "WCCK" }
* ]
* }
* ],
* "op": "unassign"
* }
* }</pre>
*
* @author Chill
*/
@Data
public class BfiInvoiceAssignBodyDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 【必填】指定关系数据
*/
private List<BfiInvoiceAssignItemDTO> data;
/**
* 【必填】操作类型[assign:指定, unassign:取消指定]
*/
private String op;
}
@@ -0,0 +1,54 @@
/**
* 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.JsonProperty;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.util.List;
/**
* 业财融合(BFI)A302-6 收票指定应付 指定关系项
*
* @author Chill
*/
@Data
public class BfiInvoiceAssignItemDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 【必填】收票单(来源系统单号+来源系统编码)
*/
@JsonProperty("ap_invoice")
private List<BfiInvoiceAssignRefDTO> apInvoice;
/**
* 【必填】财务应付单(来源系统单号+来源系统编码),op 为 assign 时必录
*/
@JsonProperty("ap_finapbill")
private List<BfiInvoiceAssignRefDTO> apFinapbill;
}
@@ -0,0 +1,53 @@
/**
* 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.JsonProperty;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
/**
* 业财融合(BFI)A302-6 收票指定应付 单据引用(来源系统编码+单号)
*
* @author Chill
*/
@Data
public class BfiInvoiceAssignRefDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 【必填】来源系统单号
*/
@JsonProperty("awrp_src_code")
private String awrpSrcCode;
/**
* 【必填】来源系统编码
*/
@JsonProperty("awrp_src_sys")
private String awrpSrcSys;
}
@@ -0,0 +1,54 @@
/**
* 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.JsonProperty;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
/**
* 业财融合(BFI)A801-2 进项发票下载(文件下载)参数
* <p>
* 请求示例:
* <pre>{@code
* {
* "path": "234e244b2c803400"
* }
* }</pre>
*
* @author Chill
*/
@Data
public class BfiInvoiceDownloadDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 【必填】文件url,如票池发票的 downloadUrl/imageUrl
*/
private String path;
}
@@ -0,0 +1,57 @@
/**
* 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 lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.util.Map;
/**
* 业财融合(BFI)A801-1 查询全票池发票数据参数
* <p>
* 请求示例:
* <pre>{@code
* {
* "queryParam": {
* "invoiceNo": "25532000000044538098"
* }
* }
* }</pre>
* queryParam 字段明细参考票易通文档 https://open.piaozone.com/api-145421056
*
* @author Chill
*/
@Data
public class BfiInvoicePoolQueryDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 【必填】查询参数,键值对形式,如 invoiceNo(发票号码),字段明细参考 https://open.piaozone.com/api-145421056
*/
private Map<String, Object> queryParam;
}
@@ -42,17 +42,17 @@ public class BfiPayApplyPushDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 外部系统来源单据号,与 awrp_src_sys 组成候选键用于防重
* 【必填】外部系统来源单据号,与 awrp_src_sys 组成候选键用于防重,不能重复
*/
@JsonProperty("awrp_src_code")
private String awrpSrcCode;
/**
* 外部系统编号
* 【必填】外部系统编号
*/
@JsonProperty("awrp_src_sys")
private String awrpSrcSys;
/**
* 申请日期,格式:yyyy-MM-dd
* 【必填】申请日期,格式:yyyy-MM-dd
*/
private String applydate;
/**
@@ -103,11 +103,6 @@ public class BfiPayApplyPushDTO implements Serializable {
* 汇率日期,格式:yyyy-MM-dd,不传时根据应付单自动带出
*/
private String exratedate;
/**
* 外部单据类型
*/
@JsonProperty("awrp_src_type")
private String awrpSrcType;
/**
* 付款申请分录
*/
@@ -42,33 +42,33 @@ public class BfiPayApplyPushEntryDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 付款类型.编码,如 201 采购付款
* 【必填】付款类型.编码,如 201 采购付款(BfiConstant.PAYMENT_TYPE_FORMAL)
*/
@JsonProperty("e_paymenttype_number")
private String ePaymenttypeNumber;
/**
* 结算单分录id,传来源系统结算单分录id,用于关联星瀚对应的应付单行,
* 【必填】结算单分录id,传来源系统结算单分录id,用于关联星瀚对应的应付单行,
* 对应财务应付单传的 awrp_entry_code 字段
*/
@JsonProperty("awrp_finapbill_entryid")
private String awrpFinapbillEntryid;
/**
* 对方系统唯一行id,不能重复
* 【必填】对方系统唯一行id,不能重复
*/
@JsonProperty("awrp_entry_code")
private String awrpEntryCode;
/**
* 往来账户
* 【必填】往来账户
*/
@JsonProperty("e_assacct")
private String eAssacct;
/**
* 往来银行.编码
* 【必填】往来银行.编码
*/
@JsonProperty("e_bebank_number")
private String eBebankNumber;
/**
* 申请金额
* 【必填】申请金额
*/
@JsonProperty("e_applyamount")
private BigDecimal eApplyamount;
@@ -88,7 +88,7 @@ public class BfiPayApplyPushEntryDTO implements Serializable {
@JsonProperty("e_settlementtype_number")
private String eSettlementtypeNumber;
/**
* 项目.项目编码,必填,若不涉及项目传编码 999
* 【必填】项目.项目编码,必填,若不涉及项目传编码 999(BfiConstant.PROJECT_NOT_APPLICABLE)
*/
@JsonProperty("project_number")
private String projectNumber;
@@ -107,4 +107,9 @@ public class BfiPayApplyPushEntryDTO implements Serializable {
*/
@JsonProperty("awrp_splb_number")
private String awrpSplbNumber;
/**
* 【必填】外部单据类型,固定 0KzXs(BfiConstant.AWRP_SRC_TYPE_EXTERNAL)
*/
@JsonProperty("awrp_src_type")
private String awrpSrcType;
}
@@ -41,11 +41,11 @@ public class BfiPayApplyQueryDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 页码,从1开始
*【必填】 页码,从1开始
*/
private Integer pageNo;
/**
* 页数
*【必填】 页数
*/
private Integer pageSize;
/**
@@ -42,12 +42,12 @@ public class BfiPayApplySaveDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 外部系统来源单据号,与 awrp_src_sys 组成候选键用于防重
*【必填】 外部系统来源单据号,与 awrp_src_sys 组成候选键用于防重
*/
@JsonProperty("awrp_src_code")
private String awrpSrcCode;
/**
* 外部系统编号
*【必填】 外部系统编号
*/
@JsonProperty("awrp_src_sys")
private String awrpSrcSys;
@@ -57,26 +57,26 @@ public class BfiPayApplySaveDTO implements Serializable {
@JsonProperty("settleorg_number")
private String settleorgNumber;
/**
* 单据类型.编码:ap_payapply_BT_S 采购付款申请、ap_payapply_oth_BT_S 其他付款申请
*【必填】 单据类型.编码:ap_payapply_BT_S 采购付款申请、ap_payapply_oth_BT_S 其他付款申请(BfiConstant.PAY_APPLY_TYPE_PURCHASE / PAY_APPLY_TYPE_OTHER)
*/
@JsonProperty("billtype_number")
private String billtypeNumber;
/**
* 申请日期,格式:yyyy-MM-dd
*【必填】 申请日期,格式:yyyy-MM-dd
*/
private String applydate;
/**
* 申请组织.编码 传组织编码
*【必填】 申请组织.编码 传组织编码
*/
@JsonProperty("applyorg_number")
private String applyorgNumber;
/**
* 付款组织.编码 传组织编码
*【必填】 付款组织.编码 传组织编码
*/
@JsonProperty("payorg_number")
private String payorgNumber;
/**
* 采购组织.编码 传组织编码
*【必填】 采购组织.编码 传组织编码
*/
@JsonProperty("purorg_number")
private String purorgNumber;
@@ -95,27 +95,27 @@ public class BfiPayApplySaveDTO implements Serializable {
*/
private String applycause;
/**
* 付款币种.编码,如 CNY
*【必填】 付款币种.编码,如 CNY(BfiConstant.CURRENCY_CNY)
*/
@JsonProperty("paycurrency_number")
private String paycurrencyNumber;
/**
* 结算币.编码,如 CNY
*【必填】 结算币.编码,如 CNY(BfiConstant.CURRENCY_CNY)
*/
@JsonProperty("settlecurrency_number")
private String settlecurrencyNumber;
/**
* 外部单据类型 0KzXs
*【必填】 外部单据类型 0KzXs,固定 0KzXs(BfiConstant.AWRP_SRC_TYPE_EXTERNAL)
*/
@JsonProperty("awrp_src_type")
private String awrpSrcType;
/**
* 汇率表.编码,如 01
*【必填】 汇率表.编码,如 01(BfiConstant.EXRATE_TABLE_DEFAULT)
*/
@JsonProperty("exratetable_number")
private String exratetableNumber;
/**
* 汇率日期,格式:yyyy-MM-dd
*【必填】 汇率日期,格式:yyyy-MM-dd
*/
private String exratedate;
/**
@@ -42,27 +42,27 @@ public class BfiPayApplySaveEntryDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 付款类型.编码,预付款传 202
*【必填】 付款类型.编码,预付款传 202(BfiConstant.PAYMENT_TYPE_PREPAY)
*/
@JsonProperty("e_paymenttype_number")
private String ePaymenttypeNumber;
/**
* 往来类型:bd_supplier 供应商、bos_user 人员、bos_org 公司、bd_customer 客户
*【必填】 往来类型:bd_supplier 供应商、bos_user 人员、bos_org 公司、bd_customer 客户(BfiConstant.ASSTACT_TYPE_SUPPLIER)
*/
@JsonProperty("e_asstacttype")
private String eAsstacttype;
/**
* 往来户.编码,根据所选往来类型传对应编码
*【必填】 往来户.编码,根据所选往来类型传对应编码
*/
@JsonProperty("e_asstact_number")
private String eAsstactNumber;
/**
* 往来账户
*【必填】 往来账户
*/
@JsonProperty("e_assacct")
private String eAssacct;
/**
* 往来银行.编码
*【必填】 往来银行.编码
*/
@JsonProperty("e_bebank_number")
private String eBebankNumber;
@@ -72,7 +72,7 @@ public class BfiPayApplySaveEntryDTO implements Serializable {
@JsonProperty("e_payamount")
private BigDecimal ePayamount;
/**
* 申请金额
*【必填】 申请金额
*/
@JsonProperty("e_applyamount")
private BigDecimal eApplyamount;
@@ -87,7 +87,7 @@ public class BfiPayApplySaveEntryDTO implements Serializable {
@JsonProperty("e_duedate")
private String eDuedate;
/**
* 项目.项目编码,必填,若不涉及项目传编码 999
*【必填】 项目.项目编码,必填,若不涉及项目传编码 999
*/
@JsonProperty("project_number")
private String projectNumber;
@@ -107,7 +107,7 @@ public class BfiPayApplySaveEntryDTO implements Serializable {
@JsonProperty("awrp_src_con_eno")
private String awrpSrcConEno;
/**
* 对方系统唯一行id,不能重复
*【必填】 对方系统唯一行id,不能重复
*/
@JsonProperty("awrp_entry_code")
private String awrpEntryCode;
@@ -0,0 +1,76 @@
/**
* 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.JsonProperty;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.util.List;
/**
* 业财融合(BFI)A301-1 收款单查询(收款处理查询)参数
* <p>
* 请求示例:
* <pre>{@code
* GET /ierp/kapi/v2/awrp/cas/cas_recbill/queryRecBill?begin_bizdate=2021-09-08&end_bizdate=2026-09-08&org_number=01.01.20.02.04.01&pageSize=10&pageNo=1
* }</pre>
*
* @author Chill
*/
@Data
public class BfiRecBillQueryDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 【必填】页码,从1开始
*/
private Integer pageNo;
/**
* 【必填】页数
*/
private Integer pageSize;
/**
* 【必填】开始业务日期,格式:yyyy-MM-dd,限定时间范围不可超过1个月
*/
@JsonProperty("begin_bizdate")
private String beginBizdate;
/**
* 【必填】结束业务日期,格式:yyyy-MM-dd
*/
@JsonProperty("end_bizdate")
private String endBizdate;
/**
* 单据编号
*/
private List<String> billno;
/**
* 收款人(公司).编码
*/
@JsonProperty("org_number")
private List<String> orgNumber;
}
@@ -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 lombok.Data;
import java.io.Serial;
import java.io.Serializable;
/**
* 业财融合(BFI)A801-3 收票单查询参数
* <p>
* 请求示例:
* <pre>{@code
* GET /ierp/kapi/v2/awrp/ap/ap_invoice/apinvoicequery?billstatus=C&modifytime=2026-09-08 10:36:29&modifytimeE=2026-09-08 10:39:36&pageNo=1&pageSize=10
* }</pre>
*
* @author Chill
*/
@Data
public class BfiReceivedInvoiceQueryDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 页码,从1开始
*/
private Integer pageNo;
/**
* 页数
*/
private Integer pageSize;
/**
* 单据编号
*/
private String billno;
/**
* 单据状态[A:暂存, B:已提交, C:已审核]
*/
private String billstatus;
/**
* 【必填】修改时间-开始,格式:yyyy-MM-dd HH:mm:ss
*/
private String modifytime;
/**
* 【必填】修改时间-结束,格式:yyyy-MM-dd HH:mm:ss
*/
private String modifytimeE;
/**
* 创建时间,格式:yyyy-MM-dd HH:mm:ss
*/
private String createtime;
/**
* 销方名称
*/
private String asstactname;
/**
* 【必填】购方名称
*/
private String buyername;
}
@@ -0,0 +1,47 @@
/**
* 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 lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.util.List;
/**
* 业财融合(BFI)A303-2 收票单新增(批量保存)请求体,结构为 data 数组
*
* @author Chill
*/
@Data
public class BfiReceivedInvoiceSaveBodyDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 收票单数据
*/
private List<BfiReceivedInvoiceSaveDTO> data;
}
@@ -0,0 +1,245 @@
/**
* 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.JsonProperty;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
/**
* 业财融合(BFI)A303-2 收票单新增(批量保存)参数
* <p>
* 请求示例:
* <pre>{@code
* {
* "data": [
* {
* "awrp_src_sys": "YC",
* "awrp_src_code": "ar_1",
* "invoiceno": "NuSQA",
* "invoicecode": "hhma9",
* "receivedate": "2026-01-29 00:00:00",
* "issuedate": "2026-01-29 00:00:00",
* "biztype": "PUR",
* "invoicetypef7_number": "27",
* "paymenttype": "CREDIT",
* "asstacttype": "bd_supplier",
* "org_number": "01.00",
* "currency_number": "CNY",
* "receivablessupp_number": "G01.01.04.02-10-0012",
* "exratetable_number": "01",
* "exchangerate": 1.0,
* "buyername": "购方名称",
* "asstactname": "销方名称",
* "isincludetax": true,
* "entry": [
* {
* "e_pricetaxtotal": 100.0,
* "quantity": 1.0,
* "price": 88.4955752212,
* "material_number": "BYWL02.0139",
* "e_taxclass_number": "Di8b9",
* "taxrateid_number": "V13",
* "e_amount": 88.5,
* "e_tax": 11.5,
* "awrp_entry_code": "ar_e1"
* }
* ],
* "isfx": false
* }
* ]
* }
* }</pre>
*
* @author Chill
*/
@Data
public class BfiReceivedInvoiceSaveDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* id
*/
private Long id;
/**
* 单据编号,由金蝶系统流水号生成(如 AVT-202601-000039),业务不传
*/
private String billno;
/**
* 【必填】外部系统编号,候选键
*/
@JsonProperty("awrp_src_sys")
private String awrpSrcSys;
/**
* 【必填】外部系统来源单据号,候选键
*/
@JsonProperty("awrp_src_code")
private String awrpSrcCode;
/**
* 发票号码
*/
private String invoiceno;
/**
* 发票代码
*/
private String invoicecode;
/**
* 【必填】收票日期,格式:yyyy-MM-dd HH:mm:ss
*/
private String receivedate;
/**
* 【必填】开票日期,格式:yyyy-MM-dd HH:mm:ss
*/
private String issuedate;
/**
* 【必填】业务类型[PUR:采购, FEE:费用](BfiConstant.RECEIVED_BIZ_TYPE_PUR / RECEIVED_BIZ_TYPE_FEE)
*/
private String biztype;
/**
* 【必填】发票类型.编码[1:增值税电子普通发票, 2:增值税电子专用发票, 10:飞机票, 11:其他发票, 12:机动车销售统一发票, 13:二手车销售统一发票, 14:定额发票, 15:道路通行费电子普通发票, 16:汽车票, 17:过路(过桥)费发票, 19:税收完税证明, 20:轮船票, 21:海关缴款书, 23:通用机打电子发票, 24:火车票退票凭证, 25:财政电子票据, 26:数电发票(普通发票), 27:数电发票(增值税专用发票), 28:数电发票(航空运输电子客票行程单), 29:数电发票(铁路电子客票)],城矿数电票常用 26/27(BfiConstant.RECEIVED_INVOICE_TYPE_DIGITAL_GENERAL / RECEIVED_INVOICE_TYPE_DIGITAL_SPECIAL)
*/
@JsonProperty("invoicetypef7_number")
private String invoicetypef7Number;
/**
* 备注
*/
private String remark;
/**
* 【必填】付款方式[CASH:现购, CREDIT:赊购](BfiConstant.PAY_MODE_CASH / PAY_MODE_CREDIT)
*/
private String paymenttype;
/**
* 【必填】往来类型[bd_supplier:供应商, bos_user:人员, bd_customer:客户](BfiConstant.ASSTACT_TYPE_SUPPLIER)
*/
private String asstacttype;
/**
* 【必填】结算组织.编码
*/
@JsonProperty("org_number")
private String orgNumber;
/**
* 【必填】结算币别.货币代码,如 CNY(BfiConstant.CURRENCY_CNY)
*/
@JsonProperty("currency_number")
private String currencyNumber;
/**
* 【必填】往来户.编码
*/
@JsonProperty("receivablessupp_number")
private String receivablessuppNumber;
/**
* 【必填】汇率表.编码,如 01(BfiConstant.EXRATE_TABLE_DEFAULT)
*/
@JsonProperty("exratetable_number")
private String exratetableNumber;
/**
* 汇率
*/
private BigDecimal exchangerate;
/**
* 购方纳税人识别号
*/
private String buyertin;
/**
* 购方地址
*/
private String buyeraddr;
/**
* 购方电话
*/
private String buyertel;
/**
* 购方账号
*/
private String buyeracct;
/**
* 销方纳税人识别号
*/
private String sellertin;
/**
* 销方地址
*/
private String selleraddr;
/**
* 销方电话
*/
private String sellertel;
/**
* 销方开户行
*/
private String sellerbank;
/**
* 销方账号
*/
private String selleracct;
/**
* 【必填】销方名称
*/
private String asstactname;
/**
* 最迟付款日期,格式:yyyy-MM-dd HH:mm:ss
*/
private String lastpaydate;
/**
* 录入价税合计
*/
private Boolean isincludetax;
/**
* 销售方名称.编码
*/
@JsonProperty("asstact_number")
private String asstactNumber;
/**
* 购方开户行
*/
private String buyerbank;
/**
* 【必填】购方名称
*/
private String buyername;
/**
* 购买方名称.编码
*/
@JsonProperty("buyer_number")
private String buyerNumber;
/**
* 【必填】外部单据类型
*/
@JsonProperty("awrp_src_type")
private String awrpSrcType;
/**
* 【必填】明细分录
*/
private List<BfiReceivedInvoiceSaveEntryDTO> entry;
/**
* 微调
*/
private Boolean isfx;
}
@@ -0,0 +1,91 @@
/**
* 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.JsonProperty;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 业财融合(BFI)A303-2 收票单新增(批量保存)明细分录
*
* @author Chill
*/
@Data
public class BfiReceivedInvoiceSaveEntryDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* id
*/
private Long id;
/**
* 【必填】价税合计
*/
@JsonProperty("e_pricetaxtotal")
private BigDecimal ePricetaxtotal;
/**
* 【必填】数量
*/
private BigDecimal quantity;
/**
* 【必填】单价
*/
private BigDecimal price;
/**
* 【必填】物料编码.编码
*/
@JsonProperty("material_number")
private String materialNumber;
/**
* 【必填】税收分类.编码
*/
@JsonProperty("e_taxclass_number")
private String eTaxclassNumber;
/**
* 【必填】税率.编码,如 V13
*/
@JsonProperty("taxrateid_number")
private String taxrateidNumber;
/**
* 金额
*/
@JsonProperty("e_amount")
private BigDecimal eAmount;
/**
* 税额
*/
@JsonProperty("e_tax")
private BigDecimal eTax;
/**
* 【必填】外部系统来源分录标识,候选键
*/
@JsonProperty("awrp_entry_code")
private String awrpEntryCode;
}
@@ -0,0 +1,210 @@
/**
* 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.math.BigDecimal;
/**
* 业财融合(BFI)A102-4 财务应付单查询 明细分录
*
* @author Chill
*/
@Data
public class BfiApBillEntryVO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* id
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
/**
* 分录行号
*/
private Integer seq;
/**
* 应付金额
*/
@JsonProperty("e_pricetaxtotal")
private BigDecimal ePricetaxtotal;
/**
* 金额
*/
@JsonProperty("e_amount")
private BigDecimal eAmount;
/**
* 税额
*/
@JsonProperty("e_tax")
private BigDecimal eTax;
/**
* 税率(%)
*/
private BigDecimal taxrate;
/**
* 数量
*/
private BigDecimal quantity;
/**
* 单价
*/
private BigDecimal price;
/**
* 赠品
*/
private Boolean ispresent;
/**
* 折扣方式[PERCENT:折扣率(%), PERUNIT:单位折扣额, TOTAL:折扣额, NULL:无]
*/
private String discountmode;
/**
* 单位折扣(率)
*/
private BigDecimal discountrate;
/**
* 实际单价
*/
private BigDecimal actprice;
/**
* 已核销金额
*/
private BigDecimal verifyamount;
/**
* 未核销金额
*/
@JsonProperty("e_unverifyamount")
private BigDecimal eUnverifyamount;
/**
* 已锁定金额
*/
private BigDecimal lockedamt;
/**
* 未锁定金额
*/
private BigDecimal unlockamt;
/**
* 已结算金额
*/
private BigDecimal settledamt;
/**
* 未结算金额
*/
private BigDecimal unsettleamt;
/**
* 规格型号
*/
private String spectype;
/**
* 折扣额
*/
private BigDecimal discountamount;
/**
* 备注
*/
@JsonProperty("e_remark")
private String eRemark;
/**
* 含税单价
*/
private BigDecimal pricetax;
/**
* 基本数量
*/
@JsonProperty("e_baseunitqty")
private BigDecimal eBaseunitqty;
/**
* 合同
*/
@JsonProperty("e_contract")
private String eContract;
/**
* 外部系统来源分录标识
*/
@JsonProperty("awrp_entry_code")
private String awrpEntryCode;
/**
* 上游分录号
*/
@JsonProperty("awrp_src_con_eno")
private String awrpSrcConEno;
/**
* 费用项目.编码
*/
@JsonProperty("expenseitem_number")
private String expenseitemNumber;
/**
* 计量单位.编码
*/
@JsonProperty("measureunit_number")
private String measureunitNumber;
/**
* 物料编码.编码
*/
@JsonProperty("material_number")
private String materialNumber;
/**
* 核算组织.编码
*/
@JsonProperty("calorg_number")
private String calorgNumber;
/**
* 利润中心.编码
*/
@JsonProperty("profitcenter_number")
private String profitcenterNumber;
/**
* 对方利润中心.编码
*/
@JsonProperty("cprofitcenter_number")
private String cprofitcenterNumber;
/**
* 基本单位.编码
*/
@JsonProperty("e_baseunit_number")
private String eBaseunitNumber;
/**
* WBS号.WBS编码
*/
@JsonProperty("wbs_number")
private String wbsNumber;
/**
* 项目.项目编码
*/
@JsonProperty("project_number")
private String projectNumber;
/**
* 税率.编码
*/
@JsonProperty("taxrateid_number")
private String taxrateidNumber;
}
@@ -0,0 +1,179 @@
/**
* 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.math.BigDecimal;
/**
* 业财融合(BFI)A102-4 财务应付单查询 发票分录
*
* @author Chill
*/
@Data
public class BfiApBillInvoiceVO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* id
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
/**
* 分录行号
*/
private Integer seq;
/**
* 发票ID
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long invid;
/**
* 收票单
*/
@JsonProperty("i_billno")
private String iBillno;
/**
* 本次占用金额
*/
@JsonProperty("i_usedamt")
private BigDecimal iUsedamt;
/**
* 发票类型[ELE:普通发票(电子), SE:专用发票(电子), GE:普通发票(纸质), SP:专用发票(纸质), PAPER:普通纸质卷票, MACH:通用机打发票, TAXI:的士票发票, TRAIN:火车票发票, PLANE:飞机票发票, OTHERCLOUD:其他发票, MOTOR:机动车销售发票, USERCAR:二手车发票, QUOTA:定额发票, TOLL:通行费电子发票, PASSENGER:客运发票, BRIDGE:过路过桥费发票, CARBOAT:车船税发票(专票), PAID:完税证明发票, STEAMER:轮船票发票, OTHER:其他发票, NORMPE:通用机打电子发票, FINE:财政电子发票, NOELETIC:全电普票, MAELETIC:全电专票, PAYLETTER:海关进口增值税专用缴款书, OVERSEAS:形式发票]
*/
@JsonProperty("i_invoicetype")
private String iInvoicetype;
/**
* 发票类型_标题
*/
@JsonProperty("i_invoicetype_title")
private String iInvoicetypeTitle;
/**
* 发票代码
*/
@JsonProperty("i_invoicecode")
private String iInvoicecode;
/**
* 发票号码
*/
@JsonProperty("i_invoiceno")
private String iInvoiceno;
/**
* 开票日期
*/
@JsonProperty("i_invoicedate")
private String iInvoicedate;
/**
* 价税合计
*/
@JsonProperty("i_pricetaxtotal")
private BigDecimal iPricetaxtotal;
/**
* 税率(%)
*/
@JsonProperty("i_taxrate")
private BigDecimal iTaxrate;
/**
* 税额
*/
@JsonProperty("i_tax")
private BigDecimal iTax;
/**
* 金额
*/
@JsonProperty("i_amount")
private BigDecimal iAmount;
/**
* 销方名称
*/
@JsonProperty("i_asstactname")
private String iAsstactname;
/**
* 购方名称
*/
@JsonProperty("i_buyername")
private String iBuyername;
/**
* 税额不计入成本
*/
@JsonProperty("i_istaxdeduction")
private Boolean iIstaxdeduction;
/**
* 备注
*/
@JsonProperty("i_remark")
private String iRemark;
/**
* 行来源[1:发票采集, 2:发票下推, 3:应付指定发票, 4:发票指定应付, 5:发票匹配, 6:应收协同, 7:供应商协同]
*/
@JsonProperty("i_srctype")
private String iSrctype;
/**
* 行来源_标题
*/
@JsonProperty("i_srctype_title")
private String iSrctypeTitle;
/**
* 发票流水号
*/
@JsonProperty("i_serialno")
private String iSerialno;
/**
* 后补发票[0:否, 1:是]
*/
@JsonProperty("i_issupplement")
private String iIssupplement;
/**
* 后补发票_标题
*/
@JsonProperty("i_issupplement_title")
private String iIssupplementTitle;
/**
* 可占用金额
*/
@JsonProperty("i_canuseamt")
private BigDecimal iCanuseamt;
/**
* 预付款发票
*/
private Boolean isprepayinv;
/**
* 科目类型[1:进口增值税, 2:进口关税, 3:进口消费税]
*/
@JsonProperty("i_subject_type")
private String iSubjectType;
/**
* 科目类型_标题
*/
@JsonProperty("i_subject_type_title")
private String iSubjectTypeTitle;
}
@@ -0,0 +1,134 @@
/**
* 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.math.BigDecimal;
/**
* 业财融合(BFI)A102-4 财务应付单查询 付款计划分录
*
* @author Chill
*/
@Data
public class BfiApBillPlanVO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* id
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
/**
* 分录行号
*/
private Integer seq;
/**
* 到期日
*/
private String planduedate;
/**
* 应付金额
*/
private BigDecimal planpricetax;
/**
* 未结算金额
*/
private BigDecimal unplansettleamt;
/**
* 已结算金额
*/
private BigDecimal plansettledamt;
/**
* 备注
*/
private String planremark;
/**
* 冻结状态[unfreeze:未冻结, allfreeze:已冻结]
*/
@JsonProperty("e_freezestate")
private String eFreezestate;
/**
* 合同
*/
private String plancontract;
/**
* 拆分维度ID
*/
@JsonProperty("p_splitdimensionid")
private Integer pSplitdimensionid;
/**
* 付款比例(%)
*/
@JsonProperty("p_payrate")
private BigDecimal pPayrate;
/**
* 外部系统来源分录标识
*/
@JsonProperty("awrp_entry_code_p")
private String awrpEntryCodeP;
/**
* 利润中心.编码
*/
@JsonProperty("planprofitcenter_number")
private String planprofitcenterNumber;
/**
* 对方利润中心.编码
*/
@JsonProperty("plancprofitcenter_number")
private String plancprofitcenterNumber;
/**
* 结算方式.编码
*/
@JsonProperty("plansettletype_number")
private String plansettletypeNumber;
/**
* 物料编码.编码
*/
@JsonProperty("planmaterial_number")
private String planmaterialNumber;
/**
* 费用项目.编码
*/
@JsonProperty("planexpenseitem_number")
private String planexpenseitemNumber;
/**
* 项目.项目编码
*/
@JsonProperty("planproject_number")
private String planprojectNumber;
/**
* 成本中心.编码
*/
@JsonProperty("plancostcenter_number")
private String plancostcenterNumber;
}
@@ -0,0 +1,295 @@
/**
* 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.math.BigDecimal;
import java.util.List;
/**
* 业财融合(BFI)A102-4 财务应付单查询返回结果
* <p>
* 成功响应示例:
* <pre>{@code
* {
* "data": {
* "filter": "[awrp_src_sys = 'YC']", "lastPage": true, "pageNo": 1, "pageSize": 10,
* "rows": [
* {
* "id": "2393657068314697747", "billno": "AP-202601-001394", "billstatus": "C",
* "pricetaxtotal": 10.0, "amount": 8.85, "tax": 1.15, "asstacttype": "bd_supplier",
* "bizdate": "2026-01-10 00:00:00", "purmode": "CREDIT",
* "awrp_src_sys": "YC", "awrp_src_code": "1", "awrp_src_bt": "awrp_contract_info",
* "detailentry": [ ... ], "planentity": [ ... ], "inventry": [ ... ]
* }
* ]
* },
* "errorCode": "0", "message": null, "status": true
* }
* }</pre>
*
* @author Chill
*/
@Data
public class BfiApBillVO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* id
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
/**
* 单据编号
*/
private String billno;
/**
* 单据状态[A:暂存, B:已提交, C:已审核]
*/
private String billstatus;
/**
* 审核时间
*/
private String auditdate;
/**
* 创建时间
*/
private String createtime;
/**
* 应付金额
*/
private BigDecimal pricetaxtotal;
/**
* 金额
*/
private BigDecimal amount;
/**
* 税额
*/
private BigDecimal tax;
/**
* 备注
*/
private String remark;
/**
* 往来类型[bd_supplier:供应商, bos_user:人员, bd_customer:客户]
*/
private String asstacttype;
/**
* 单据日期
*/
private String bizdate;
/**
* 汇率
*/
private BigDecimal exchangerate;
/**
* 付款方式[CASH:现购, CREDIT:赊购]
*/
private String purmode;
/**
* 往来单位名称
*/
private String asstactname;
/**
* 期初
*/
private Boolean isperiod;
/**
* 汇率日期
*/
private String exratedate;
/**
* 换算方式[0:直接汇率, 1:间接汇率]
*/
private String quotation;
/**
* 到期日
*/
private String duedate;
/**
* 未核销金额
*/
private BigDecimal unverifyamount;
/**
* 未结算金额
*/
private BigDecimal unsettleamount;
/**
* 收款账号
*/
private String payeebanknum;
/**
* 冲销单据
*/
private Boolean iswrittenoff;
/**
* 已被冲销
*/
private Boolean hadwrittenoff;
/**
* 录入含税价
*/
private Boolean isincludetax;
/**
* 记账日期
*/
private String bookdate;
/**
* 外部系统编号
*/
@JsonProperty("awrp_src_sys")
private String awrpSrcSys;
/**
* 外部系统来源单据号
*/
@JsonProperty("awrp_src_code")
private String awrpSrcCode;
/**
* 来源单据,如 awrp_contract_info
*/
@JsonProperty("awrp_src_bt")
private String awrpSrcBt;
/**
* 上游外部系统单据号
*/
@JsonProperty("awrp_src_con_no")
private String awrpSrcConNo;
/**
* 结算组织.编码
*/
@JsonProperty("org_number")
private String orgNumber;
/**
* 结算币.货币代码
*/
@JsonProperty("currency_number")
private String currencyNumber;
/**
* 采购组织.编码
*/
@JsonProperty("purorg_number")
private String purorgNumber;
/**
* 往来户.编码
*/
@JsonProperty("asstact_number")
private String asstactNumber;
/**
* 采购组.编码
*/
@JsonProperty("purdept_number")
private String purdeptNumber;
/**
* 采购员.业务员名称
*/
@JsonProperty("purchaser_operatorname")
private String purchaserOperatorname;
/**
* 付款条件.编码
*/
@JsonProperty("paycond_number")
private String paycondNumber;
/**
* 本位币.货币代码
*/
@JsonProperty("basecurrency_number")
private String basecurrencyNumber;
/**
* 汇率表.编码
*/
@JsonProperty("exratetable_number")
private String exratetableNumber;
/**
* 结算方式.编码
*/
@JsonProperty("settlementtype_number")
private String settlementtypeNumber;
/**
* 付款组织.编码
*/
@JsonProperty("payorg_number")
private String payorgNumber;
/**
* 款项性质.编码
*/
@JsonProperty("payproperty_number")
private String paypropertyNumber;
/**
* 单据类型.编码
*/
@JsonProperty("billtypeid_number")
private String billtypeidNumber;
/**
* 收款银行.编码(行号)
*/
@JsonProperty("bebank_number")
private String bebankNumber;
/**
* 组织间结算.编码
*/
@JsonProperty("settlerelations_number")
private String settlerelationsNumber;
/**
* 付款币种.货币代码
*/
@JsonProperty("paymentcurrency_number")
private String paymentcurrencyNumber;
/**
* 部门.编码
*/
@JsonProperty("department_number")
private String departmentNumber;
/**
* 业务类型.编码
*/
@JsonProperty("biztype_number")
private String biztypeNumber;
/**
* 收款供应商.编码
*/
@JsonProperty("receivingsupplierid_number")
private String receivingsupplieridNumber;
/**
* 明细分录
*/
@JsonProperty("detailentry")
private List<BfiApBillEntryVO> detailentry;
/**
* 付款计划分录
*/
private List<BfiApBillPlanVO> planentity;
/**
* 发票分录
*/
private List<BfiApBillInvoiceVO> inventry;
}
@@ -0,0 +1,215 @@
/**
* 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.math.BigDecimal;
/**
* 业财融合(BFI)A302-4 财务应收单查询 明细分录
*
* @author Chill
*/
@Data
public class BfiArBillEntryVO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* id
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
/**
* 分录行号
*/
private Integer seq;
/**
* 数量
*/
@JsonProperty("e_quantity")
private BigDecimal eQuantity;
/**
* 赠品
*/
@JsonProperty("e_ispresent")
private Boolean eIspresent;
/**
* 单价
*/
@JsonProperty("e_unitprice")
private BigDecimal eUnitprice;
/**
* 金额
*/
@JsonProperty("e_amount")
private BigDecimal eAmount;
/**
* 税率(%)
*/
@JsonProperty("e_taxrate")
private BigDecimal eTaxrate;
/**
* 含税单价
*/
@JsonProperty("e_taxunitprice")
private BigDecimal eTaxunitprice;
/**
* 税额
*/
@JsonProperty("e_tax")
private BigDecimal eTax;
/**
* 折扣方式[NULL:无, PERCENT:折扣率(%), PERUNIT:单位折扣额, TOTAL:折扣额]
*/
@JsonProperty("e_discountmode")
private String eDiscountmode;
/**
* 单位折扣(率)
*/
@JsonProperty("e_discountrate")
private BigDecimal eDiscountrate;
/**
* 折扣额
*/
@JsonProperty("e_discountamount")
private BigDecimal eDiscountamount;
/**
* 实际单价
*/
@JsonProperty("e_actunitprice")
private BigDecimal eActunitprice;
/**
* 实际含税单价
*/
@JsonProperty("e_acttaxunitprice")
private BigDecimal eActtaxunitprice;
/**
* 应收金额
*/
@JsonProperty("e_recamount")
private BigDecimal eRecamount;
/**
* 备注
*/
@JsonProperty("e_remark")
private String eRemark;
/**
* 基本数量
*/
@JsonProperty("e_baseunitqty")
private BigDecimal eBaseunitqty;
/**
* 规格型号
*/
@JsonProperty("e_spectype")
private String eSpectype;
/**
* 合同
*/
@JsonProperty("e_contract")
private String eContract;
/**
* 发票号码
*/
@JsonProperty("e_invoiceno")
private String eInvoiceno;
/**
* 发票代码
*/
@JsonProperty("e_invoicecode")
private String eInvoicecode;
/**
* 上游分录号
*/
@JsonProperty("awrp_src_con_eno")
private String awrpSrcConEno;
/**
* 外部系统来源分录标识
*/
@JsonProperty("awrp_entry_code")
private String awrpEntryCode;
/**
* 物料编码.编码
*/
@JsonProperty("e_material_number")
private String eMaterialNumber;
/**
* 计量单位.编码
*/
@JsonProperty("e_measureunit_number")
private String eMeasureunitNumber;
/**
* 基本单位.编码
*/
@JsonProperty("e_baseunit_number")
private String eBaseunitNumber;
/**
* 费用项目.编码
*/
@JsonProperty("e_expenseitem_number")
private String eExpenseitemNumber;
/**
* 利润中心.编码
*/
@JsonProperty("profitcenter_number")
private String profitcenterNumber;
/**
* 对方利润中心.编码
*/
@JsonProperty("cprofitcenter_number")
private String cprofitcenterNumber;
/**
* WBS号.WBS编码
*/
@JsonProperty("wbs_number")
private String wbsNumber;
/**
* 税率.编码
*/
@JsonProperty("taxrateid_number")
private String taxrateidNumber;
/**
* 项目.项目编码
*/
@JsonProperty("project_number")
private String projectNumber;
/**
* 订货客户.编码
*/
@JsonProperty("e_invoicecustomerid_number")
private String eInvoicecustomeridNumber;
/**
* 收货客户.编码
*/
@JsonProperty("e_delivercustomerid_number")
private String eDelivercustomeridNumber;
}
@@ -0,0 +1,119 @@
/**
* 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.math.BigDecimal;
/**
* 业财融合(BFI)A302-4 财务应收单查询 收款计划分录
*
* @author Chill
*/
@Data
public class BfiArBillPlanVO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* id
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
/**
* 分录行号
*/
private Integer seq;
/**
* 到期日
*/
private String planduedate;
/**
* 应收金额
*/
private BigDecimal planpricetax;
/**
* 未结算金额
*/
private BigDecimal unplansettleamt;
/**
* 已结算金额
*/
private BigDecimal plansettledamt;
/**
* 备注
*/
private String planremark;
/**
* 合同
*/
private String plancontract;
/**
* 收款比例(%)
*/
@JsonProperty("p_recrate")
private BigDecimal pRecrate;
/**
* 外部系统来源分录标识
*/
@JsonProperty("awrp_entry_code_p")
private String awrpEntryCodeP;
/**
* 利润中心.编码
*/
@JsonProperty("planprofitcenter_number")
private String planprofitcenterNumber;
/**
* 对方利润中心.编码
*/
@JsonProperty("plancprofitcenter_number")
private String plancprofitcenterNumber;
/**
* 结算方式.编码
*/
@JsonProperty("plansettletype_number")
private String plansettletypeNumber;
/**
* 物料编码.编码
*/
@JsonProperty("planmaterial_number")
private String planmaterialNumber;
/**
* 费用项目.编码
*/
@JsonProperty("planexpenseitem_number")
private String planexpenseitemNumber;
/**
* 项目.项目编码
*/
@JsonProperty("planproject_number")
private String planprojectNumber;
}
@@ -0,0 +1,252 @@
/**
* 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.math.BigDecimal;
import java.util.List;
/**
* 业财融合(BFI)A302-4 财务应收单查询返回结果
* <p>
* 成功响应示例:
* <pre>{@code
* {
* "data": {
* "filter": "[awrp_src_sys = 'YC']", "lastPage": true, "pageNo": 1, "pageSize": 10,
* "rows": [
* {
* "id": "2397125584581820416", "billno": "AR-260121-008445", "billstatus": "C",
* "bizdate": "2026-01-21 00:00:00", "asstacttype": "bd_customer", "paymode": "CREDIT",
* "recamount": 13.0, "amount": 11.5, "tax": 1.5,
* "awrp_src_sys": "YC", "awrp_src_code": "111", "awrp_src_bt": "awrp_contract_info",
* "entry": [ ... ], "planentity": [ ... ]
* }
* ]
* },
* "errorCode": "0", "message": null, "status": true
* }
* }</pre>
*
* @author Chill
*/
@Data
public class BfiArBillVO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* id
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
/**
* 单据编号
*/
private String billno;
/**
* 单据状态[A:暂存, B:已提交, C:已审核]
*/
private String billstatus;
/**
* 审核时间
*/
private String auditdate;
/**
* 创建时间
*/
private String createtime;
/**
* 单据日期
*/
private String bizdate;
/**
* 到期日
*/
private String duedate;
/**
* 往来类型[bd_supplier:供应商, bos_user:人员, bd_customer:客户]
*/
private String asstacttype;
/**
* 付款方式[CASH:现销, CREDIT:赊销]
*/
private String paymode;
/**
* 备注
*/
private String remark;
/**
* 应收金额
*/
private BigDecimal recamount;
/**
* 汇率
*/
private BigDecimal exchangerate;
/**
* 金额
*/
private BigDecimal amount;
/**
* 税额
*/
private BigDecimal tax;
/**
* 汇率日期
*/
private String exratedate;
/**
* 换算方式[0:直接汇率, 1:间接汇率]
*/
private String quotation;
/**
* 冲销单据
*/
private Boolean iswrittenoff;
/**
* 已被冲销
*/
private Boolean hadwrittenoff;
/**
* 已结算金额
*/
private BigDecimal settleamount;
/**
* 记账日期
*/
private String bookdate;
/**
* 发票号码
*/
private String invoiceno;
/**
* 发票代码
*/
private String invoicecode;
/**
* 已开票应收金额
*/
private BigDecimal issueinvrecamt;
/**
* 外部系统编号
*/
@JsonProperty("awrp_src_sys")
private String awrpSrcSys;
/**
* 外部系统来源单据号
*/
@JsonProperty("awrp_src_code")
private String awrpSrcCode;
/**
* 来源单据,如 awrp_contract_info
*/
@JsonProperty("awrp_src_bt")
private String awrpSrcBt;
/**
* 上游外部系统单据号
*/
@JsonProperty("awrp_src_con_no")
private String awrpSrcConNo;
/**
* 结算组织.编码
*/
@JsonProperty("org_number")
private String orgNumber;
/**
* 往来户.编码
*/
@JsonProperty("asstact_number")
private String asstactNumber;
/**
* 收款条件.编码
*/
@JsonProperty("paycond_number")
private String paycondNumber;
/**
* 收款组织.编码
*/
@JsonProperty("recorg_number")
private String recorgNumber;
/**
* 结算币.货币代码
*/
@JsonProperty("currency_number")
private String currencyNumber;
/**
* 本位币.货币代码
*/
@JsonProperty("basecurrency_number")
private String basecurrencyNumber;
/**
* 销售组.编码
*/
@JsonProperty("salesgroup_number")
private String salesgroupNumber;
/**
* 销售员.业务员名称
*/
@JsonProperty("salesman_operatorname")
private String salesmanOperatorname;
/**
* 结算方式.编码
*/
@JsonProperty("settlementtype_number")
private String settlementtypeNumber;
/**
* 款项性质.编码
*/
@JsonProperty("payproperty_number")
private String paypropertyNumber;
/**
* 单据类型.编码
*/
@JsonProperty("billtype_number")
private String billtypeNumber;
/**
* 业务类型.编码
*/
@JsonProperty("biztype_number")
private String biztypeNumber;
/**
* 付款客户.编码
*/
@JsonProperty("paymentcustomerid_number")
private String paymentcustomeridNumber;
/**
* 明细分录
*/
private List<BfiArBillEntryVO> entry;
/**
* 收款计划分录
*/
private List<BfiArBillPlanVO> planentity;
}
@@ -0,0 +1,158 @@
/**
* 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.math.BigDecimal;
/**
* 业财融合(BFI)A301-2 收款认领公告查询返回结果
* <p>
* 成功响应示例:
* <pre>{@code
* {
* "data": {
* "filter": "[claimusers LIKE '%苏浩晖%']", "lastPage": true, "pageNo": 1, "pageSize": 10,
* "rows": [
* {
* "billno": "RLTZ-20251217-0002", "id": "2371903479531716608", "claimusers": "苏浩晖",
* "claimme": false, "bizdate": "2025-12-15 09:55:23", "reamount": 2735.32,
* "oppunit": "通联支付网络服务股份有限公司", "claimstatus": "0",
* "claimedamount": 0.0, "unclaimamount": 2735.32, "description": "TL20251212SGRXLF7.68"
* }
* ],
* "totalCount": 2
* },
* "errorCode": "0", "message": null, "status": true
* }
* }</pre>
*
* @author Chill
*/
@Data
public class BfiClaimAnnounceVO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 认领通知单
*/
private String billno;
/**
* id
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
/**
* 参与认领用户
*/
private String claimusers;
/**
* 我已认领
*/
private Boolean claimme;
/**
* 业务日期
*/
private String bizdate;
/**
* 付款人
*/
private String recpayer;
/**
* 手续费
*/
private BigDecimal fee;
/**
* 确认认领时间
*/
private String confirmdate;
/**
* 交易明细编号
*/
private String tradedetailno;
/**
* 收款金额
*/
private BigDecimal reamount;
/**
* 对方户名
*/
private String oppunit;
/**
* 对方账号
*/
private String oppbanknumber;
/**
* 对方开户行
*/
private String oppbank;
/**
* 交易时间
*/
private String tradetime;
/**
* 明细流水号
*/
private String detailid;
/**
* 认领通知单状态
*/
private String claimstatus;
/**
* 已认领金额
*/
private BigDecimal claimedamount;
/**
* 未认领金额
*/
private BigDecimal unclaimamount;
/**
* 摘要
*/
private String description;
/**
* 付款金额
*/
private BigDecimal payamount;
/**
* 收款人
*/
private String recpayee;
/**
* 银行流水号
*/
private String bankdetailno;
/**
* 收款人(展示名)
*/
private String recviewpayer;
}
@@ -0,0 +1,76 @@
/**
* 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)A902-1 客户查询 银行信息分录
*
* @author Chill
*/
@Data
public class BfiCustomerBankVO 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 iban;
/**
* 账户性质[0:公司, 1:个人]
*/
@JsonProperty("account_property")
private String accountProperty;
}
@@ -0,0 +1,200 @@
/**
* 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)A902-1 客户查询返回结果
* <p>
* 成功响应示例:
* <pre>{@code
* {
* "data": { "filter": "", "lastPage": false, "pageNo": 1, "pageSize": 2, "rows": [], "totalCount": 103 },
* "errorCode": "0",
* "message": null,
* "status": true
* }
* }</pre>
*
* @author Chill
*/
@Data
public class BfiCustomerVO 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;
/**
* 统一社会信用代码(个人填写身份证号或手机号)
*/
private String societycreditcode;
/**
* 控制策略[1:逐级分配, 2:自由分配, 5:全局共享, 6:管控范围内共享, 7:私有]
*/
private String ctrlstrategy;
/**
* 伙伴类型[1:法人企业, 2:非法人企业, 3:非企业单位, 4:个人, 5:个体户, 18:中央企业, 19:中央部委, 6:民营企业, 7:非我区国有企业, 8:我区国有企业, 13:境外客商, 9:政府事业单位等, 10:农民专业合作社, 11:民政部门, 14:工会, 15:司法行政, 12:其他, 16:虚拟客商, 17:集体经济组织]
*/
private String type;
/**
* 业务职能[1:销售, 2:结算, 3:付款, 4:收货]
*/
private String bizfunction;
/**
* 电子邮箱
*/
@JsonProperty("postal_code")
private String postalCode;
/**
* 简称
*/
private String simplename;
/**
* 详细地址
*/
@JsonProperty("bizpartner_address")
private String bizpartnerAddress;
/**
* 联系人
*/
private String linkman;
/**
* 传真
*/
@JsonProperty("bizpartner_fax")
private String bizpartnerFax;
/**
* 联系电话
*/
@JsonProperty("bizpartner_phone")
private String bizpartnerPhone;
/**
* 纳税人识别号
*/
@JsonProperty("tx_register_no")
private String txRegisterNo;
/**
* 法人代表
*/
private String artificialperson;
/**
* 注册资本
*/
private String regcapital;
/**
* 营业期限
*/
private String businessterm;
/**
* 经营范围
*/
private String businessscope;
/**
* 成立日期
*/
private String establishdate;
/**
* 身份证号
*/
private String idno;
/**
* 简拼
*/
private String simplepinyin;
/**
* 备注
*/
private String fcusbeizhu;
/**
* 数据来源系统[XH:星瀚, WCY:物产云, JCZX:检测中心, NBERP:南北ERP, WCCK:城矿ERP, WY:维云(服务), CMS:合同系统, DTP:数据中台]
*/
@JsonProperty("awrp_datasourcesys")
private String awrpDatasourcesys;
/**
* 是否为贸易客商[A:是, B:否]
*/
@JsonProperty("awrp_cusfortrade")
private String awrpCusfortrade;
/**
* 审核日期
*/
private String approvedate;
/**
* 商务伙伴.编码
*/
@JsonProperty("bizpartner_number")
private String bizpartnerNumber;
/**
* 结算方式.编码
*/
@JsonProperty("settlementtypeid_number")
private String settlementtypeidNumber;
/**
* 收款条件.编码
*/
@JsonProperty("receivingcondid_number")
private String receivingcondidNumber;
/**
* 银行信息分录
*/
@JsonProperty("entry_bank")
private List<BfiCustomerBankVO> entryBank;
}
@@ -0,0 +1,159 @@
/**
* 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.math.BigDecimal;
/**
* 业财融合(BFI)A303-4 开票申请单查询 单据体分录
*
* @author Chill
*/
@Data
public class BfiInvoiceApplyEntryVO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* id
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
/**
* 分录行号
*/
private Integer seq;
/**
* 行性质[1:折扣行, 2:商品行]
*/
private String rowtype;
/**
* 商品名称
*/
private String goodsname;
/**
* 简称
*/
private String goodssimplename;
/**
* 规格型号
*/
private String specification;
/**
* 计量单位
*/
private String unit;
/**
* 数量
*/
private BigDecimal num;
/**
* 单价(不含税)
*/
private BigDecimal unitprice;
/**
* 单价(含税)
*/
private BigDecimal taxunitprice;
/**
* 金额(不含税)
*/
private BigDecimal amount;
/**
* 金额(含税)
*/
private BigDecimal taxamount;
/**
* 税率[0:0%, 0.01:1%, 0.015:减按1.5%, 0.03:3%, 0.04:4%, 0.05:5%, 0.06:6%, 0.09:9%, 0.10:10%, 0.11:11%, 0.13:13%, 0.16:16%, 0.17:17%]
*/
private String taxrate;
/**
* 税额
*/
private BigDecimal tax;
/**
* 剩余可申请数量
*/
private BigDecimal remainvalidnum;
/**
* 剩余可申请金额
*/
private BigDecimal remainvalidamount;
/**
* 剩余可申请税额
*/
private BigDecimal remainvalidtax;
/**
* 已开金额
*/
private BigDecimal issuedamount;
/**
* 已开税额
*/
private BigDecimal issuedtax;
/**
* 已开价税合计
*/
private BigDecimal issuedtotaltaxamount;
/**
* 是否享受优惠[0:不享受, 1:享受]
*/
private String policylogo;
/**
* 税收分类合并编码
*/
private String goodscode;
/**
* 备注
*/
private String remark;
/**
* 原始商品名称
*/
private String origoodsname;
/**
* 折扣金额
*/
private BigDecimal discountamount;
/**
* 折扣率
*/
private BigDecimal discountrate;
/**
* 基准类型[0:数量基准, 1:金额基准]
*/
private String benchmark;
/**
* 是否赠品
*/
private Boolean gift;
}
@@ -0,0 +1,377 @@
/**
* 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.math.BigDecimal;
import java.util.List;
/**
* 业财融合(BFI)A303-4 开票申请单查询返回结果
* <p>
* 成功响应示例:
* <pre>{@code
* {
* "data": {
* "filter": "[systemsource = 'WCCK']", "lastPage": true, "pageNo": 1, "pageSize": 10,
* "rows": [
* {
* "id": "2400746134621404160", "hsbz": "1", "producttype": "1", "billcomplete": "0",
* "buyertaxno": "91450881MA7BFT2629", "salername": "广西壮族自治区建筑工程质量检测中心有限公司",
* "salertaxno": "91450000MA5Q1G1M59", "invoicetype": "08xdp", "totalamount": 245.0,
* "buyername": "广西贵港建设集团有限公司桂平分公司", "billno": "test", "billstatus": "C",
* "systemsource": "WCCK", "comprehensivestatus": "01",
* "sim_original_bill_item": [ ... ]
* }
* ]
* },
* "errorCode": "0", "message": null, "status": true
* }
* }</pre>
*
* @author Chill
*/
@Data
public class BfiInvoiceApplyVO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* id
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
/**
* 单据日期
*/
private String billdate;
/**
* 币别
*/
private String currency;
/**
* 申请方
*/
private String applicant;
/**
* 原购方名称
*/
private String oribuyername;
/**
* 原购方地址电话
*/
private String oribuyeraddr;
/**
* 原购方开户行
*/
private String oribuyerbank;
/**
* 是否含税[0:不含税, 1:含税]
*/
private String hsbz;
/**
* 商品类型[1:开票项, 2:物料, 3:费用项目]
*/
private String producttype;
/**
* 单据完整[0:完整, 1:待补充]
*/
private String billcomplete;
/**
* 关闭状态[0:未关闭, 1:关闭]
*/
private String closestatus;
/**
* 购方纳税人识别号
*/
private String buyertaxno;
/**
* 购方地址及电话
*/
private String buyeraddr;
/**
* 购方开户行及账号
*/
private String buyerbank;
/**
* 交付手机
*/
private String buyerphone;
/**
* 购方企业类型[0:企业, 1:个人, 2:非企业单位]
*/
private String buyerproperty;
/**
* 销方开户行及账号
*/
private String salerbank;
/**
* 收款人
*/
private String payee;
/**
* 复核人
*/
private String reviewer;
/**
* 销方名称
*/
private String salername;
/**
* 销方纳税人识别号
*/
private String salertaxno;
/**
* 销方地址及电话
*/
private String saleraddr;
/**
* 开票人
*/
private String drawer;
/**
* 发票推送邮箱
*/
private String buyeremail;
/**
* 征税方式[0:普通征税, 1:减按计征, 2:差额征税, 01:差额征税-全额开票, 02:差额征税-差额开票, 3:减按征税]
*/
private String taxationstyle;
/**
* 发票种类[10xdp:数电发票(普通发票), 08xdp:数电发票(增值税专用发票)]
*/
private String invoicetype;
/**
* 特殊票种[00:非特殊票种, 02:收购, 06:抵扣通行费, 07:不抵扣通行费, 08:成品油, 11:卷烟, 18:机动车, E06:不动产租赁, E03:建筑服务, E05:不动产销售, E04:货物运输, E01:成品油(数电发票), E18:卷烟(数电发票), E12:自产农产品销售, E09:旅客运输, E14:机动车(数电发票), E07:代收车船税]
*/
private String specialtype;
/**
* 汇率日期
*/
private String exchangedate;
/**
* 已申请金额
*/
private BigDecimal confirmamount;
/**
* 申请金额
*/
private BigDecimal invoiceamount;
/**
* 申请价税合计
*/
private BigDecimal totalamount;
/**
* 申请税额
*/
private BigDecimal totaltax;
/**
* 已开金额
*/
private BigDecimal mainissuedamount;
/**
* 已开税额
*/
private BigDecimal mainissuedtax;
/**
* 剩余可开金额
*/
private BigDecimal surplusamount;
/**
* 剩余可开税额
*/
private BigDecimal surplustax;
/**
* 换算方式[0:直接汇率, 1:间接汇率]
*/
private String quotation;
/**
* 原始价税合计
*/
private BigDecimal oldtotalamount;
/**
* 购方名称
*/
private String buyername;
/**
* 汇率
*/
private BigDecimal exrate;
/**
* 价税合计
*/
private BigDecimal invoicedtotalamount;
/**
* 开票日期
*/
private String issuetime;
/**
* 合同编号
*/
private String contractno;
/**
* 合同日期
*/
private String contractdate;
/**
* 合同金额
*/
private BigDecimal contractamount;
/**
* 开票说明
*/
private String billremark;
/**
* 创建日期
*/
private String createdate;
/**
* 单据类型[A:普通单, B:红冲单, C:作废单, D:重开单]
*/
private String billsourcetype;
/**
* 申请状态[0:未申请, 1:部分申请, 2:已申请]
*/
private String confirmstate;
/**
* 单据性质[-1:负数, 1:正数]
*/
private String billproperties;
/**
* 业务单据编号
*/
private String billno;
/**
* 单据审批状态[A:暂存, B:已提交, C:已审核, D:无需审批]
*/
private String billstatus;
/**
* 审核意见
*/
private String auditsuggestion;
/**
* 数据来源系统
*/
private String systemsource;
/**
* 单据状态[0:正常, 1:搁置, 2:开票结束]
*/
private String validstate;
/**
* 购销身份[0:我是销方, 1:我是购方]
*/
private String salerorbuyer;
/**
* 数据来源系统[XH:星瀚, WCY:物产云, JCZX:检测中心, NBERP:南北ERP, WCCK:城矿ERP, WY:维云(服务), CMS:合同系统, DTP:数据中台]
*/
@JsonProperty("awrp_datasourcesys")
private String awrpDatasourcesys;
/**
* 单据综合状态[00:单据作废, 01:待开票, 02:合并拆分确认完成, 08:部分发票已开具完成, 09:全部发票已开具完成, 11:待提交, 12:待审批, 21:开票后部分红冲/作废, 22:开票后全部红冲/作废, 23:开票后部分红冲/作废并重开, 24:开票后全部红冲/作废并重开, 31:负数单据蓝票匹配中, 32:负数单据蓝票部分匹配完成, 33:负数单据蓝票全部匹配完成, 34:负数单据蓝票零匹配, 35:负数单据红字确认单申请中, 36:负数单据红字确认单部分申请完成, 37:负数单据红字确认单全部申请完成, 38:负数单据红字确认单全部申请失败, 39:负数单据匹配蓝票部分开票, 40:负数单据匹配红字申请部分完成, 41:负数单据匹配红字申请全部完成, 42:负数单据匹配红字申请部分开票]
*/
private String comprehensivestatus;
/**
* 展示卖方地址电话
*/
private Boolean showsaleraddresstel;
/**
* 展示买方地址电话
*/
private Boolean showbuyeraddresstel;
/**
* 展示卖方银行
*/
private Boolean showsalerbank;
/**
* 展示买方银行
*/
private Boolean showbuyerbank;
/**
* 币别.货币代码
*/
@JsonProperty("fromcurr_number")
private String fromcurrNumber;
/**
* 本位币.货币代码
*/
@JsonProperty("tocurr_number")
private String tocurrNumber;
/**
* 汇率表.编码
*/
@JsonProperty("exratetable_number")
private String exratetableNumber;
/**
* 销售组织.编码
*/
@JsonProperty("salesorgbase_number")
private String salesorgbaseNumber;
/**
* 结算组织.编码
*/
@JsonProperty("settlementorgbase_number")
private String settlementorgbaseNumber;
/**
* 资金组织.编码
*/
@JsonProperty("capitalorgbase_number")
private String capitalorgbaseNumber;
/**
* 客户.编码
*/
@JsonProperty("customnameid_number")
private String customnameidNumber;
/**
* 组织.编码
*/
@JsonProperty("orgid_number")
private String orgidNumber;
/**
* 经办人.经办人编码
*/
@JsonProperty("operator_number")
private String operatorNumber;
/**
* 申请部门.编码
*/
@JsonProperty("awrp_orgfield_number")
private String awrpOrgfieldNumber;
/**
* 项目.项目编码
*/
@JsonProperty("awrp_project_number")
private String awrpProjectNumber;
/**
* 单据体分录
*/
@JsonProperty("sim_original_bill_item")
private List<BfiInvoiceApplyEntryVO> simOriginalBillItem;
}
@@ -0,0 +1,118 @@
/**
* 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 lombok.Data;
import java.io.Serial;
import java.io.Serializable;
/**
* 业财融合(BFI)A801-1 查询全票池发票数据 发票明细
*
* @author Chill
*/
@Data
public class BfiInvoicePoolItemVO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 分录行号
*/
@JsonProperty("seq")
private String seq;
/**
* 商品名称
*/
@JsonProperty("goodsName")
private String goodsName;
/**
* 规格型号
*/
@JsonProperty("specModel")
private String specModel;
/**
* 单位
*/
@JsonProperty("unit")
private String unit;
/**
* 数量
*/
@JsonProperty("num")
private String num;
/**
* 单价
*/
@JsonProperty("unitPrice")
private String unitPrice;
/**
* 金额
*/
@JsonProperty("detailAmount")
private String detailAmount;
/**
* 税率
*/
@JsonProperty("taxRate")
private String taxRate;
/**
* 税额
*/
@JsonProperty("taxAmount")
private String taxAmount;
/**
* 税收分类编码
*/
@JsonProperty("goodsCode")
private String goodsCode;
/**
* 折扣类型
*/
@JsonProperty("discountType")
private String discountType;
/**
* 优惠政策
*/
@JsonProperty("preferentialPolicy")
private String preferentialPolicy;
/**
* 增值税特殊事项
*/
@JsonProperty("vatException")
private String vatException;
/**
* 零税率标识
*/
@JsonProperty("zeroTaxRateFlag")
private String zeroTaxRateFlag;
/**
* 版本号
*/
@JsonProperty("versionNo")
private String versionNo;
}
@@ -0,0 +1,285 @@
/**
* 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 lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.util.List;
/**
* 业财融合(BFI)A801-1 查询全票池发票数据返回结果
* <p>
* 成功响应示例:
* <pre>{@code
* {
* "data": [
* {
* "downloadUrl": "234e244b2c803400", "invoiceAmount": "372.28", "invoiceType": "27",
* "invoiceNo": "25532000000044538098", "salerTaxNo": "91532503MADPDYU671",
* "buyerTaxNo": "91450100073757311R", "salerName": "红河熠龙酒店有限责任公司",
* "totalAmount": "376", "totalTaxAmount": "3.72", "serialNo": "d798b8d286bd4b23b2b0e971a8adc79d0",
* "imageUrl": "234e244b99803400", "checkStatus": "1",
* "items": [ { "goodsName": "*住宿服务*住宿费", "detailAmount": "372.28", "taxRate": "0.01", ... } ]
* }
* ],
* "errorCode": "0", "message": null, "status": true
* }
* }</pre>
* 字段明细参考票易通文档 https://open.piaozone.com/api-145421056
*
* @author Chill
*/
@Data
public class BfiInvoicePoolVO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 发票号码
*/
@JsonProperty("invoiceNo")
private String invoiceNo;
/**
* 发票类型[26:数电票(普票), 27:数电票(专票), 1:增值税电子普通发票, 2:增值税电子专用发票, 15:道路通行费电子普通发票, 25:财政电子票据, ...]
*/
@JsonProperty("invoiceType")
private String invoiceType;
/**
* 发票流水号
*/
@JsonProperty("serialNo")
private String serialNo;
/**
* 原发票代码
*/
@JsonProperty("originalInvoiceCode")
private String originalInvoiceCode;
/**
* 原发票号码
*/
@JsonProperty("originalInvoiceNo")
private String originalInvoiceNo;
/**
* 不含税金额
*/
@JsonProperty("invoiceAmount")
private String invoiceAmount;
/**
* 价税合计
*/
@JsonProperty("totalAmount")
private String totalAmount;
/**
* 税额
*/
@JsonProperty("taxAmount")
private String taxAmount;
/**
* 价税合计(含清单)
*/
@JsonProperty("totalTaxAmount")
private String totalTaxAmount;
/**
* 可用税额
*/
@JsonProperty("availableAmount")
private String availableAmount;
/**
* 购方税号
*/
@JsonProperty("buyerTaxNo")
private String buyerTaxNo;
/**
* 销方税号
*/
@JsonProperty("salerTaxNo")
private String salerTaxNo;
/**
* 销方名称
*/
@JsonProperty("salerName")
private String salerName;
/**
* 销方地址电话
*/
@JsonProperty("salerAddressPhone")
private String salerAddressPhone;
/**
* 开票人
*/
@JsonProperty("drawer")
private String drawer;
/**
* 收款人
*/
private String payee;
/**
* 复核人
*/
@JsonProperty("reviewer")
private String reviewer;
/**
* 备注
*/
private String remark;
/**
* 开票日期
*/
@JsonProperty("invoiceDate")
private String invoiceDate;
/**
* 是否作废删除[0:否, 1:是]
*/
@JsonProperty("delete")
private String delete;
/**
* 发票标签
*/
@JsonProperty("invoiceTag")
private String invoiceTag;
/**
* 特殊类型标记
*/
@JsonProperty("specialTypeMark")
private String specialTypeMark;
/**
* 是否电子信息[1:是]
*/
@JsonProperty("isElectricInvoice")
private String isElectricInvoice;
/**
* 查验状态[0:未查验, 1:通过, 2:不通过]
*/
@JsonProperty("checkStatus")
private String checkStatus;
/**
* 是否需要查验[1:是]
*/
@JsonProperty("needCheck")
private String needCheck;
/**
* 抵扣标志[1:可抵扣]
*/
@JsonProperty("deductionFlag")
private String deductionFlag;
/**
* 认证标志[2:已认证]
*/
@JsonProperty("authenticateFlag")
private String authenticateFlag;
/**
* 认证时间
*/
@JsonProperty("authenticateTime")
private String authenticateTime;
/**
* 勾选时间
*/
@JsonProperty("selectTime")
private String selectTime;
/**
* 入账时间
*/
@JsonProperty("recordedTime")
private String recordedTime;
/**
* 入账用途
*/
@JsonProperty("recordedPurpose")
private String recordedPurpose;
/**
* 入账状态
*/
@JsonProperty("recordedFlag")
private String recordedFlag;
/**
* 税属期,如 2026-01
*/
@JsonProperty("taxPeriod")
private String taxPeriod;
/**
* 所属组织id
*/
@JsonProperty("orgId")
private String orgId;
/**
* 所属组织编码
*/
@JsonProperty("orgNumber")
private String orgNumber;
/**
* 所属组织名称
*/
@JsonProperty("orgName")
private String orgName;
/**
* 文件下载地址(用于 A801-2 文件下载接口的 path 参数)
*/
@JsonProperty("downloadUrl")
private String downloadUrl;
/**
* 图片文件地址
*/
@JsonProperty("imageUrl")
private String imageUrl;
/**
* pdf 文件地址
*/
@JsonProperty("taxPdfUrl")
private String taxPdfUrl;
/**
* ofd 文件地址
*/
@JsonProperty("taxOfdUrl")
private String taxOfdUrl;
/**
* xml 文件地址
*/
@JsonProperty("xmlUrl")
private String xmlUrl;
/**
* 数据来源,如 电子税局下载
*/
@JsonProperty("resource")
private String resource;
/**
* 单据创建时间
*/
@JsonProperty("billCreateTime")
private String billCreateTime;
/**
* 额外参数:业务单据号
*/
@JsonProperty("expense_num")
private String expenseNum;
/**
* 发票明细
*/
@JsonProperty("items")
private List<BfiInvoicePoolItemVO> items;
}
@@ -0,0 +1,75 @@
/**
* 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 lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.util.List;
/**
* 业财融合(BFI)A303-5 开票申请发票查询统一返回结果
* <p>
* 成功响应示例:
* <pre>{@code
* {
* "data": [ { "billNo": "KPSQ-JCZX-202509-002276", "invoiceList": [ ... ] } ],
* "errorCode": "S0000",
* "success": true
* }
* }</pre>
* data 内容为发票明细,参考票易通文档 https://open.piaozone.com/api-146003729
*
* @param <T> data 数据类型
* @author Chill
*/
@Data
public class BfiOpenApiResultVO<T> implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 返回数据 data
*/
private T data;
/**
* 响应码
*/
private String errorCode;
/**
* 响应状态
*/
private Boolean success;
/**
* 是否调用成功
*
* @return true-成功
*/
public boolean isSuccess() {
return Boolean.TRUE.equals(success);
}
}
@@ -0,0 +1,89 @@
/**
* 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.math.BigDecimal;
/**
* 业财融合(BFI)A301-1 收款单查询 关联交易明细信息分录
*
* @author Chill
*/
@Data
public class BfiRecBillBankCheckVO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* id
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
/**
* 分录行号
*/
private Integer seq;
/**
* 对账标识码
*/
private String ebankcheckflag;
/**
* 交易日期
*/
private String ebizdate;
/**
* 付款金额
*/
private BigDecimal edebitamount;
/**
* 收款金额
*/
private BigDecimal ecreditamount;
/**
* 交易明细编号(等于银行流水号)
*/
private String edetailbillno;
/**
* 交易明细ID
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long edetailid;
/**
* 交易明细币种.货币代码
*/
@JsonProperty("ecurrency_number")
private String ecurrencyNumber;
/**
* 银行流水号
*/
private String bankdetailno;
}
@@ -0,0 +1,335 @@
/**
* 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.math.BigDecimal;
/**
* 业财融合(BFI)A301-1 收款单查询 收款明细分录
*
* @author Chill
*/
@Data
public class BfiRecBillEntryVO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* id
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
/**
* 分录行号
*/
private Integer seq;
/**
* 实收金额
*/
@JsonProperty("e_actamt")
private BigDecimal eActamt;
/**
* 集成原始数据分录id
*/
@JsonProperty("e_eassrcid")
private String eEassrcid;
/**
* 单据同步id
*/
@JsonProperty("e_transbillid")
private String eTransbillid;
/**
* 单据同步分录id
*/
@JsonProperty("e_transentryid")
private String eTransentryid;
/**
* 业务协同号
*/
private String bizcoopno;
/**
* 业务协同行ID
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long bizcoopentryid;
/**
* 成组号
*/
private String groupnumber;
/**
* 成组行号
*/
private String groupseq;
/**
* 实收折本币
*/
@JsonProperty("e_localamt")
private BigDecimal eLocalamt;
/**
* 备注
*/
@JsonProperty("e_remark")
private String eRemark;
/**
* 现金折扣
*/
@JsonProperty("e_discountamt")
private BigDecimal eDiscountamt;
/**
* 折扣折本币
*/
@JsonProperty("e_discountlocamt")
private BigDecimal eDiscountlocamt;
/**
* 应收金额
*/
@JsonProperty("e_receivableamt")
private BigDecimal eReceivableamt;
/**
* 应收折本币
*/
@JsonProperty("e_receivablelocamt")
private BigDecimal eReceivablelocamt;
/**
* 已锁定金额
*/
@JsonProperty("e_lockamt")
private BigDecimal eLockamt;
/**
* 未锁定金额
*/
@JsonProperty("e_unlockamt")
private BigDecimal eUnlockamt;
/**
* 已结算金额
*/
@JsonProperty("e_settledamt")
private BigDecimal eSettledamt;
/**
* 未结算金额
*/
@JsonProperty("e_unsettledamt")
private BigDecimal eUnsettledamt;
/**
* 核心单据类型
*/
@JsonProperty("e_corebilltype")
private String eCorebilltype;
/**
* 核心单据号
*/
@JsonProperty("e_corebillno")
private String eCorebillno;
/**
* 核心单据行号
*/
@JsonProperty("e_corebillentryseq")
private Integer eCorebillentryseq;
/**
* 核心单据行id
*/
@JsonProperty("e_corebillentryid")
@JsonSerialize(using = ToStringSerializer.class)
private Long eCorebillentryid;
/**
* 核心单据id
*/
@JsonProperty("e_corebillid")
private String eCorebillid;
/**
* 源单ID
*/
@JsonProperty("e_sourcebillid")
@JsonSerialize(using = ToStringSerializer.class)
private Long eSourcebillid;
/**
* 源单分录ID
*/
@JsonProperty("e_sourcebillentryid")
@JsonSerialize(using = ToStringSerializer.class)
private Long eSourcebillentryid;
/**
* 变更拆分分录ID
*/
@JsonProperty("e_sourcebillresentryid")
@JsonSerialize(using = ToStringSerializer.class)
private Long eSourcebillresentryid;
/**
* 合同号
*/
private String contractnumber;
/**
* 合同编号
*/
private String conbillnumber;
/**
* 合同行号
*/
private String conbillrownum;
/**
* 合同ID
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long conbillid;
/**
* 合同行ID
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long conbillentryid;
/**
* 合同实体.编码
*/
@JsonProperty("conbillentity_number")
private String conbillentityNumber;
/**
* conbillentity_id
*/
@JsonProperty("conbillentity_id")
private String conbillentityId;
/**
* 手续费
*/
@JsonProperty("e_fee")
private BigDecimal eFee;
/**
* 认领单编码
*/
@JsonProperty("e_claimbill")
private String eClaimbill;
/**
* 挂合同批次号
*/
@JsonProperty("e_contractbatch")
private String eContractbatch;
/**
* 组织间清分批次号
*/
@JsonProperty("e_orgsdividebatch")
private String eOrgsdividebatch;
/**
* 清分状态[normal:正常, waitdivide:待清分, yetdivide:已清分]
*/
@JsonProperty("e_dividestatus")
private String eDividestatus;
/**
* 业务日期
*/
private String entrybizdate;
/**
* 已结算金额折本币
*/
@JsonProperty("e_settledlocalamt")
private BigDecimal eSettledlocalamt;
/**
* 未结算金额折本位币
*/
@JsonProperty("e_unsettledlocalamt")
private BigDecimal eUnsettledlocalamt;
/**
* 已匹配核心单据标识
*/
@JsonProperty("e_matchselltag")
private Boolean eMatchselltag;
/**
* 认领维度[ar_finarbill_detaillayout:物料明细, ar_finarbill_planlayout:收款计划, ar_finarbill_layout:整单]
*/
private String claimdimension;
/**
* 启用认领预占控制
*/
private Boolean claimcomtrol;
/**
* 收款类型.编码
*/
@JsonProperty("e_receivingtype_number")
private String eReceivingtypeNumber;
/**
* 资金用途.编码
*/
@JsonProperty("e_fundflowitem_number")
private String eFundflowitemNumber;
/**
* 实际收款公司.编码
*/
@JsonProperty("realreccompany_number")
private String realreccompanyNumber;
/**
* 物料.编码
*/
@JsonProperty("e_material_number")
private String eMaterialNumber;
/**
* 费用项目.编码
*/
@JsonProperty("e_expenseitem_number")
private String eExpenseitemNumber;
/**
* 项目.项目编码
*/
@JsonProperty("project_number")
private String projectNumber;
/**
* 结算组织.编码
*/
@JsonProperty("e_settleorg_number")
private String eSettleorgNumber;
/**
* 收款组织(虚拟收款用).编码
*/
@JsonProperty("recorg_number")
private String recorgNumber;
/**
* 内部业务单元.编码
*/
@JsonProperty("bizunit_number")
private String bizunitNumber;
/**
* 成本中心.编码
*/
@JsonProperty("costcenter_number")
private String costcenterNumber;
/**
* 产品线.编码
*/
@JsonProperty("productline_number")
private String productlineNumber;
/**
* 利润中心.编码
*/
@JsonProperty("e_profitcenter_number")
private String eProfitcenterNumber;
/**
* 对方利润中心.编码
*/
@JsonProperty("e_cprofitcenter_number")
private String eCprofitcenterNumber;
}
@@ -0,0 +1,85 @@
/**
* 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 lombok.Data;
import java.io.Serial;
import java.io.Serializable;
/**
* 业财融合(BFI)A301-1 收款单查询 流水信息分录
*
* @author Chill
*/
@Data
public class BfiRecBillFlowVO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* id
*/
private String id;
/**
* 分录行号
*/
private String seq;
/**
* 交易明细编号
*/
@JsonProperty("bei_billno")
private String beiBillno;
/**
* 收款金额
*/
@JsonProperty("bei_creditamount")
private String beiCreditamount;
/**
* 明细流水号
*/
@JsonProperty("bei_detailid")
private String beiDetailid;
/**
* 银行流水号
*/
@JsonProperty("bei_bankdetailno")
private String beiBankdetailno;
/**
* 流水ID/票据ID
*/
private String infoid;
/**
* 票面金额
*/
@JsonProperty("cdm_amount")
private String cdmAmount;
/**
* 票据号码
*/
@JsonProperty("cdm_draftbillno")
private String cdmDraftbillno;
}
@@ -0,0 +1,498 @@
/**
* 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.math.BigDecimal;
import java.util.List;
/**
* 业财融合(BFI)A301-1 收款单查询(收款处理查询)返回结果
* <p>
* 成功响应示例:
* <pre>{@code
* {
* "data": {
* "filter": "[bizdate < '2026-09-09 00:00:00' AND billstatus = 'C' AND org.number IN ('01.01.20.02.04.01')]",
* "lastPage": true, "pageNo": 1, "pageSize": 10,
* "rows": [
* {
* "id": "2116801651917487104", "billno": "RV-202412-002371", "billstatus": "C",
* "bizdate": "2024-12-30 00:00:00", "payertype": "bd_customer",
* "actrecamt": 936.0, "payername": "广西新华弘文教育投资有限公司柳州柳城分公司",
* "sourcebillnumber": "AR-241120-002728", "sourcebilltype": "ar_finarbill",
* "bankcheckentity": [ ... ], "entry": [ ... ]
* }
* ]
* },
* "errorCode": "0", "message": null, "status": true
* }
* }</pre>
*
* @author Chill
*/
@Data
public class BfiRecBillVO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* id
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
/**
* 单据编号
*/
private String billno;
/**
* 单据状态[A:暂存, B:已提交, C:已审核, D:已收款, E:变更中, G:已退单]
*/
private String billstatus;
/**
* 审核时间
*/
private String auditdate;
/**
* 修改时间
*/
private String modifytime;
/**
* 创建时间
*/
private String createtime;
/**
* 数据集成来源
*/
private String integrationsrc;
/**
* 历史数据
*/
private Boolean ishistory;
/**
* 红字冲正虚拟结算
*/
private Boolean redvirtual;
/**
* 核销生成
*/
private Boolean isfromwriteoff;
/**
* 选择结算号标识
*/
private String selectdraftflag;
/**
* 记账日期
*/
private String bookdate;
/**
* 已有电子回单
*/
private Boolean isgetreceipt;
/**
* 退票流水ID
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long refunddetailid;
/**
* 业务日期
*/
private String bizdate;
/**
* 付款人类型[bd_customer:客户, bd_supplier:供应商, bos_org:公司, bos_user:职员, other:其他]
*/
private String payertype;
/**
* 摘要
*/
@JsonProperty("txt_description")
private String txtDescription;
/**
* 收款金额
*/
private BigDecimal actrecamt;
/**
* 汇率
*/
private BigDecimal exchangerate;
/**
* 折本位币
*/
private BigDecimal localamt;
/**
* 付款人名称
*/
private String payername;
/**
* 付款账户
*/
private String payeracctbanknum;
/**
* 结算号
*/
private String settletnumber;
/**
* 付款人ID
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long payer;
/**
* 付款人类型标识ID
*/
private String payerformid;
/**
* 付款账户类型标识ID
*/
private String payeraccformid;
/**
* 付款账户ID
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long payeracctbank;
/**
* 收款日期
*/
private String payeedate;
/**
* 源单ID
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long sourcebillid;
/**
* 付款银行
*/
private String payerbankname;
/**
* 代理收款
*/
private Boolean isagent;
/**
* 生成凭证
*/
private Boolean isvoucher;
/**
* 付款方式
*/
private String paymentmode;
/**
* 是否归档
*/
private Boolean isarchive;
/**
* 源单编码
*/
private String sourcebillnumber;
/**
* 源单类型[cas_recbill:收款单, er_repaymentbill:还款单, cas_betransdetail:交易明细, ar_finarbill:财务应收单, cas_paybill:付款单, fca_transdownbill:下拨单, sm_salorder:销售订单, cfm_loanbill:提款单, cdm_drafttradebill:业务处理, ec_incomeapply:建筑请款单, cas_claimcenterbill:认领通知单, bei_intelrec:收款入账中心, bei_transdetail:交易明细, cim_invest_repaybill:本金收回, cim_invest_interestbill:收息处理, fca_transupbill:上划单, cfm_feebill:费用明细单, lc_present:交单处理, lc_forfaiting:福费廷, tm_businessbill:生命周期操作, ifm_loanbill:贷款放款处理, cdm_receivablebill:收票登记, cfm_loanbill_bond:债券发行, tm_structdeposit:结构性存款, tm_rateswap:互换, tm_bond_fix:固定利率债券/零息债券, tm_bond_float:浮动利率债券, tm_forex_options:外汇期权, cim_release:定期存款解活处理, cim_noticerelease:通知存款解活处理, scf_finrecbill:供应链融资收款处理, cim_redeem:理财赎回, cim_revenue:理财收益, ifm_currentintbill:存款利息结息记账处理, cim_dptrevenue:存款收益处理, fbd_suretyreleasebill:保证金存出处理, fl_receiptbill:售后租回回款, pmct_incomeapply:项目合同请款单, cas_agentpaybill:代发处理, gm_receiveletter:收函登记, ifm_currentintbill_bank:活期存款结息记账处理, fbd_surety_settleint:保证金收益, occba_moneyincome:资金收入单]
*/
private String sourcebilltype;
/**
* 退款批次号
*/
private String refundbatchseqid;
/**
* 退款退票业务
*/
private Boolean isrefund;
/**
* 全额退款
*/
private Boolean isfullrefund;
/**
* 汇率日期
*/
private String exratedate;
/**
* 凭证号
*/
private String vouchernum;
/**
* 付款人类型[bos_org:公司, bd_supplier:供应商, bd_customer:客户, bos_user:职员]
*/
private String itempayertype;
/**
* 手续费
*/
private BigDecimal fee;
/**
* 影像编号
*/
private String imageno;
/**
* 退单原因
*/
private String reason;
/**
* 退单日期
*/
private String backdate;
/**
* 是否认款
*/
private Boolean confirmlogo;
/**
* 实际交易日期
*/
private String acttradedate;
/**
* 付款人编码
*/
private String payernumber;
/**
* 是否未认领入账
*/
private Boolean isunclaim;
/**
* 红冲标识
*/
private String hotaccount;
/**
* 对账标识码
*/
private String bankcheckflag;
/**
* 换算方式[0:直接汇率, 1:间接汇率]
*/
private String quotation;
/**
* 匹配标识
*/
private String matchflag;
/**
* 已匹配收款金额
*/
private BigDecimal matchamountrec;
/**
* 未匹配收款金额
*/
private BigDecimal unmatchamountrec;
/**
* 需关联对方流水
*/
private Boolean relateotherflow;
/**
* 已匹配付款金额
*/
private BigDecimal matchamountpay;
/**
* 未匹配付款金额
*/
private BigDecimal unmatchamountpay;
/**
* 匹配异常原因
*/
private String matchflagmsg;
/**
* 结算状态
*/
private String settlestatus;
/**
* 未结算金额
*/
private BigDecimal unsettleamount;
/**
* 未结算金额(本位币)
*/
private BigDecimal unsettleamountbase;
/**
* 已结算金额
*/
private BigDecimal settleamount;
/**
* 已结算金额(本位币)
*/
private BigDecimal settleamountbase;
/**
* 多收款类型
*/
private Boolean multireceivingtype;
/**
* 业务类型[wallettransfer:数币转账]
*/
private String businesstype;
/**
* 退款类型[refund:退款, renote:退票]
*/
private String refundtype;
/**
* 手工标记为无需匹配
*/
private Boolean handmarknomatch;
/**
* 来源系统
*/
private String sourcetype;
/**
* 业务唯一码
*/
private String bizfingerprint;
/**
* 是否虚拟收款单
*/
private Boolean isvirtual;
/**
* 单据类型[SalesRec:销售收款, OtherRec:其他收款]
*/
private String biztype;
/**
* 收款类型.编码
*/
@JsonProperty("receivingtype_number")
private String receivingtypeNumber;
/**
* 收款类型.名称
*/
@JsonProperty("receivingtype_name")
private String receivingtypeName;
/**
* 收款银行.编码(合作金融机构)
*/
@JsonProperty("payeebank_number")
private String payeebankNumber;
/**
* 收款银行.名称
*/
@JsonProperty("payeebank_name")
private String payeebankName;
/**
* 结算方式.编码
*/
@JsonProperty("settletype_number")
private String settletypeNumber;
/**
* 出纳.工号
*/
@JsonProperty("cashier_number")
private String cashierNumber;
/**
* 付款银行.编码(行号)
*/
@JsonProperty("f7_payerbank_number")
private String f7PayerbankNumber;
/**
* 现金账号.账户编码
*/
@JsonProperty("accountcash_number")
private String accountcashNumber;
/**
* 资金流量项目.编码
*/
@JsonProperty("fundflowitem_number")
private String fundflowitemNumber;
/**
* 会计.工号
*/
@JsonProperty("clerk_number")
private String clerkNumber;
/**
* 币种.货币代码
*/
@JsonProperty("currency_number")
private String currencyNumber;
/**
* 本位币.货币代码
*/
@JsonProperty("basecurrency_number")
private String basecurrencyNumber;
/**
* 核算组织.编码
*/
@JsonProperty("openorg_number")
private String openorgNumber;
/**
* 实际付款账户.编码
*/
@JsonProperty("actpayaccount_number")
private String actpayaccountNumber;
/**
* 汇率表.编码
*/
@JsonProperty("exratetable_number")
private String exratetableNumber;
/**
* 付款人.编码
*/
@JsonProperty("itempayer_number")
private String itempayerNumber;
/**
* 退单人.工号
*/
@JsonProperty("backuser_number")
private String backuserNumber;
/**
* 代收款核算组织.编码
*/
@JsonProperty("agentrecorg_number")
private String agentrecorgNumber;
/**
* 账号.编码
*/
@JsonProperty("inneraccount_number")
private String inneraccountNumber;
/**
* 对方利润中心.编码
*/
@JsonProperty("cprofitcenter_number")
private String cprofitcenterNumber;
/**
* 收款人(公司).编码
*/
@JsonProperty("org_number")
private String orgNumber;
/**
* 收款人(公司).名称
*/
@JsonProperty("org_name")
private String orgName;
/**
* 收款人银行账号.编码
*/
@JsonProperty("accountbank_number")
private String accountbankNumber;
/**
* 收款人银行账号.账户简称
*/
@JsonProperty("accountbank_name")
private String accountbankName;
/**
* 关联交易明细信息分录
*/
@JsonProperty("bankcheckentity")
private List<BfiRecBillBankCheckVO> bankcheckentity;
/**
* 收款明细分录
*/
private List<BfiRecBillEntryVO> entry;
/**
* 流水信息分录
*/
private List<BfiRecBillFlowVO> infoentry;
}
@@ -0,0 +1,281 @@
/**
* 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.math.BigDecimal;
/**
* 业财融合(BFI)A801-3 收票单查询 明细分录
*
* @author Chill
*/
@Data
public class BfiReceivedInvoiceEntryVO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* id
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
/**
* 分录行号
*/
private Integer seq;
/**
* 价税合计
*/
@JsonProperty("e_pricetaxtotal")
private BigDecimal ePricetaxtotal;
/**
* 金额
*/
@JsonProperty("e_amount")
private BigDecimal eAmount;
/**
* 税额
*/
@JsonProperty("e_tax")
private BigDecimal eTax;
/**
* 税率(%)
*/
private BigDecimal taxrate;
/**
* 核心单据号
*/
private String corebillno;
/**
* 核心单据行号
*/
private Integer corebillentryseq;
/**
* 核心单据类型[pm_purorderbill:采购订单, conm_purcontract:采购合同, pm_om_purorderbill:简单委外订单, sctm_scpo:委外采购订单]
*/
private String corebilltype;
/**
* 核心单据类型_标题
*/
@JsonProperty("corebilltype_title")
private String corebilltypeTitle;
/**
* 数量
*/
private BigDecimal quantity;
/**
* 单价
*/
private BigDecimal price;
/**
* 规格型号
*/
private String spectype;
/**
* 赠品
*/
private Boolean ispresent;
/**
* 折扣方式[PERCENT:折扣率(%), PERUNIT:单位折扣额, TOTAL:折扣额, NULL:无]
*/
private String discountmode;
/**
* 折扣方式_标题
*/
@JsonProperty("discountmode_title")
private String discountmodeTitle;
/**
* 单位折扣(率)
*/
private BigDecimal discountrate;
/**
* 实际单价
*/
private BigDecimal actprice;
/**
* 实际含税单价
*/
private BigDecimal actpricetax;
/**
* 折扣额
*/
private BigDecimal discountamt;
/**
* 折扣额(本位币)
*/
private BigDecimal discountlocalamt;
/**
* 源单ID
*/
@JsonProperty("e_sourcebillid")
private String eSourcebillid;
/**
* 源单分录ID
*/
@JsonProperty("e_sourcebillentryid")
private String eSourcebillentryid;
/**
* 价税合计(本位币)
*/
@JsonProperty("e_pricetaxtotalbase")
private BigDecimal ePricetaxtotalbase;
/**
* 金额(本位币)
*/
@JsonProperty("e_amountbase")
private BigDecimal eAmountbase;
/**
* 开票名称
*/
@JsonProperty("e_invname")
private String eInvname;
/**
* 票面规格型号
*/
@JsonProperty("e_invspectype")
private String eInvspectype;
/**
* 票面单位
*/
@JsonProperty("e_invunit")
private String eInvunit;
/**
* 未关联金额
*/
@JsonProperty("e_unrelatedamt")
private BigDecimal eUnrelatedamt;
/**
* 关联金额
*/
@JsonProperty("e_relatedamt")
private BigDecimal eRelatedamt;
/**
* 核心单据ID
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long corebillid;
/**
* 核心单据行ID
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long corebillentryid;
/**
* 未匹配价税合计
*/
@JsonProperty("e_unmatchamt")
private BigDecimal eUnmatchamt;
/**
* 未匹配数量
*/
@JsonProperty("e_unmatchqty")
private BigDecimal eUnmatchqty;
/**
* 匹配规则(废弃)[ORDER:匹配订单, REC:匹配接收, IN:匹配验收]
*/
@JsonProperty("e_matchrule")
private String eMatchrule;
/**
* 匹配规则(废弃)_标题
*/
@JsonProperty("e_matchrule_title")
private String eMatchruleTitle;
/**
* 创建时间
*/
@JsonProperty("e_createtime")
private String eCreatetime;
/**
* 修改时间
*/
@JsonProperty("e_modifytime")
private String eModifytime;
/**
* 合同行号
*/
@JsonProperty("e_conbillrownum")
private String eConbillrownum;
/**
* 合同编号
*/
@JsonProperty("e_conbillnumber")
private String eConbillnumber;
/**
* 合同ID
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long eConbillid;
/**
* 合同行ID
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long eConbillentryid;
/**
* 发票分录行号
*/
@JsonProperty("e_inventryseq")
private Integer eInventryseq;
/**
* 基本数量
*/
@JsonProperty("e_baseunitqty")
private BigDecimal eBaseunitqty;
/**
* 未匹配基本数量
*/
@JsonProperty("e_unmatchbaseqty")
private BigDecimal eUnmatchbaseqty;
/**
* 税额(本位币)
*/
@JsonProperty("e_taxlocalamt")
private BigDecimal eTaxlocalamt;
/**
* 来源系统单据ID
*/
@JsonProperty("e_srcsysbillid")
private String eSrcsysbillid;
/**
* 来源系统单据分录ID
*/
@JsonProperty("e_srcsysbillentryid")
private String eSrcsysbillentryid;
/**
* 外部系统来源分录标识
*/
@JsonProperty("awrp_entry_code")
private String awrpEntryCode;
/**
* 明细.e_conbillentity_id
*/
@JsonProperty("e_conbillentity_id")
private String eConbillentityId;
}
@@ -0,0 +1,50 @@
/**
* 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 lombok.Data;
import java.io.Serial;
import java.io.Serializable;
/**
* 业财融合(BFI)A801-3 收票单查询 发票类型
*
* @author Chill
*/
@Data
public class BfiReceivedInvoiceTypeVO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 发票类型.编码
*/
private String number;
/**
* 发票类型.名称
*/
private String name;
}
@@ -0,0 +1,413 @@
/**
* 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.math.BigDecimal;
import java.util.List;
/**
* 业财融合(BFI)A801-3 收票单查询返回结果
*
* @author Chill
*/
@Data
public class BfiReceivedInvoiceVO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* id
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
/**
* 单据编号
*/
private String billno;
/**
* 单据状态[A:暂存, B:已提交, C:已审核]
*/
private String billstatus;
/**
* 单据状态_标题
*/
@JsonProperty("billstatus_title")
private String billstatusTitle;
/**
* 审核时间
*/
private String auditdate;
/**
* 修改时间
*/
private String modifytime;
/**
* 创建时间
*/
private String createtime;
/**
* 价税合计
*/
private BigDecimal pricetaxtotal;
/**
* 金额
*/
private BigDecimal amount;
/**
* 税额
*/
private BigDecimal tax;
/**
* 备注
*/
private String remark;
/**
* 销方名称
*/
private String asstactname;
/**
* 发票号码
*/
private String invoiceno;
/**
* 开票日期
*/
private String issuedate;
/**
* 最迟付款日期
*/
private String lastpaydate;
/**
* 收款人
*/
private String payee;
/**
* 复核人
*/
private String checker;
/**
* 开票人
*/
private String drawer;
/**
* 纳税人识别号(买)
*/
private String buyertin;
/**
* 地址(买)
*/
private String buyeraddr;
/**
* 电话(买)
*/
private String buyertel;
/**
* 账号(买)
*/
private String buyeracct;
/**
* 纳税人识别号(卖)
*/
private String sellertin;
/**
* 地址(卖)
*/
private String selleraddr;
/**
* 电话(卖)
*/
private String sellertel;
/**
* 账号(卖)
*/
private String selleracct;
/**
* 密码
*/
private String password;
/**
* 往来类型[bd_supplier:供应商, bos_user:人员, bd_customer:客户]
*/
private String asstacttype;
/**
* 付款方式[CASH:现购, CREDIT:赊购]
*/
private String paymenttype;
/**
* 付款方式_标题
*/
@JsonProperty("paymenttype_title")
private String paymenttypeTitle;
/**
* 开户行(买)
*/
private String buyerbank;
/**
* 开户行(卖)
*/
private String sellerbank;
/**
* 汇率
*/
private BigDecimal exchangerate;
/**
* 录入价税合计
*/
private Boolean isincludetax;
/**
* 源单ID
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long sourcebillid;
/**
* 收款账号
*/
private String receivablesacct;
/**
* 金额(本位币)
*/
private BigDecimal amountbase;
/**
* 价税合计(本位币)
*/
private BigDecimal pricetaxtotalbase;
/**
* 业务类型[PUR:采购, FEE:费用]
*/
private String biztype;
/**
* 业务类型_标题
*/
@JsonProperty("biztype_title")
private String biztypeTitle;
/**
* 发票流水号
*/
private String serialno;
/**
* 购方名称
*/
private String buyername;
/**
* 发票代码
*/
private String invoicecode;
/**
* 归档
*/
private Boolean isarchive;
/**
* 源单类型[ap_invoice:发票, ap_busbill:暂估应付单, conm_purcontract:采购合同]
*/
private String sourcebilltype;
/**
* 源单类型_标题
*/
@JsonProperty("sourcebilltype_title")
private String sourcebilltypeTitle;
/**
* 源单编码
*/
private String sourcebillno;
/**
* 汇率日期
*/
private String exratedate;
/**
* 发票类型
*/
@JsonProperty("invoicetype_title")
private String invoicetypeTitle;
/**
* 发票状态[0:正常, 1:失控, 2:作废, 3:红冲, 4:异常, 5:非正常, 6:红字发票待确认, 7:部分红冲, 8:全部红冲]
*/
private String invoicestatus;
/**
* 发票状态_标题
*/
@JsonProperty("invoicestatus_title")
private String invoicestatusTitle;
/**
* 影像编号
*/
private String imageno;
/**
* 有源采集
*/
private Boolean isreffin;
/**
* 电子发票预览地址
*/
private String originalgraphurl;
/**
* 未关联金额
*/
private BigDecimal unrelatedamt;
/**
* 收票日期
*/
private String receivedate;
/**
* 查验状态[1:通过, 2:不通过, 3:未查验]
*/
private String checkstatus;
/**
* 查验状态_标题
*/
@JsonProperty("checkstatus_title")
private String checkstatusTitle;
/**
* 未匹配价税合计
*/
private BigDecimal unmatchamt;
/**
* 匹配规则(废弃)
*/
private String matchrule;
/**
* 匹配规则(废弃)_标题
*/
@JsonProperty("matchrule_title")
private String matchruleTitle;
/**
* 税额不计入成本
*/
private Boolean istaxdeduction;
/**
* 修改时间
*/
private String lastupdatetime;
/**
* 同步至发票云[notsynchro:无需同步, waitsynchro:待同步, hassynchro:已同步]
*/
private String synstatus;
/**
* 同步至发票云_标题
*/
@JsonProperty("synstatus_title")
private String synstatusTitle;
/**
* 同步发票云更改时间
*/
private String changesynstatustime;
/**
* 换算方式[0:直接汇率, 1:间接汇率]
*/
private String quotation;
/**
* 换算方式_标题
*/
@JsonProperty("quotation_title")
private String quotationTitle;
/**
* 已匹配
*/
private Boolean ismatched;
/**
* 业务来源[ap_finapbill:财务应付单, ap_payapply:付款申请单]
*/
private String businesssource;
/**
* 业务来源_标题
*/
@JsonProperty("businesssource_title")
private String businesssourceTitle;
/**
* 生成凭证
*/
private Boolean isvoucher;
/**
* 匹配状态[0:未匹配, 1:部分匹配, 2:全部匹配]
*/
private String matchstatus;
/**
* 匹配状态_标题
*/
@JsonProperty("matchstatus_title")
private String matchstatusTitle;
/**
* 税额(本位币)
*/
private BigDecimal taxbase;
/**
* 协同状态[A:无, B:进行中, C:成功, D:失败]
*/
private String coopstatus;
/**
* 协同状态_标题
*/
@JsonProperty("coopstatus_title")
private String coopstatusTitle;
/**
* 单据来源类型[0:手工新增, 1:导入生成, 2:后台生成, 3:从总账导入, 4:协同调差生成, fromeas:EAS集成, 21:跨租户同步]
*/
private String billsrctype;
/**
* 单据来源类型_标题
*/
@JsonProperty("billsrctype_title")
private String billsrctypeTitle;
/**
* 科目类型[1:进口增值税, 2:进口关税, 3:进口消费税]
*/
@JsonProperty("subject_type")
private String subjectType;
/**
* 科目类型_标题
*/
@JsonProperty("subject_type_title")
private String subjectTypeTitle;
/**
* 外部系统来源单据号
*/
@JsonProperty("awrp_src_code")
private String awrpSrcCode;
/**
* 外部系统编号
*/
@JsonProperty("awrp_src_sys")
private String awrpSrcSys;
/**
* 外部单据类型
*/
@JsonProperty("awrp_src_type")
private String awrpSrcType;
/**
* 明细分录
*/
private List<BfiReceivedInvoiceEntryVO> entry;
/**
* 发票类型
*/
@JsonProperty("invoicetypef7")
private BfiReceivedInvoiceTypeVO invoicetypef7;
}
@@ -25,15 +25,42 @@
*/
package org.springblade.thirdparty.bfi.service;
import feign.Response;
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.BfiClaimAnnounceQueryDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiClaimPushDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiCustomerQueryDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiCustomerSaveDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiInvoiceApplyOpenApiQueryDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiInvoiceApplyQueryDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiInvoiceApplySaveDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiInvoiceAssignItemDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiInvoiceDownloadDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiInvoicePoolQueryDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiPayApplyPushDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiPayApplyQueryDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiPayApplySaveDTO;
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.vo.BfiApBillVO;
import org.springblade.thirdparty.bfi.pojo.vo.BfiArBillVO;
import org.springblade.thirdparty.bfi.pojo.vo.BfiBillSaveResultVO;
import org.springblade.thirdparty.bfi.pojo.vo.BfiClaimAnnounceVO;
import org.springblade.thirdparty.bfi.pojo.vo.BfiCustomerVO;
import org.springblade.thirdparty.bfi.pojo.vo.BfiExchangeRateVO;
import org.springblade.thirdparty.bfi.pojo.vo.BfiInvoiceApplyVO;
import org.springblade.thirdparty.bfi.pojo.vo.BfiInvoicePoolVO;
import org.springblade.thirdparty.bfi.pojo.vo.BfiOpenApiResultVO;
import org.springblade.thirdparty.bfi.pojo.vo.BfiPageVO;
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.BfiTokenVO;
import org.springblade.thirdparty.bfi.pojo.vo.BfiVerifyTokenVO;
@@ -126,4 +153,143 @@ public interface IBfiService {
* @return 付款处理分页数据
*/
BfiPageVO<BfiPayBillVO> queryPayBill(BfiPayBillQueryDTO param);
/**
* A902-1 客户查询
*
* @param param 查询参数,页码从1开始,修改时间范围不可超过6个月
* @return 客户分页数据
*/
BfiPageVO<BfiCustomerVO> queryCustomer(BfiCustomerQueryDTO param);
/**
* A902-2 客户信息保存
*
* @param param 客户参数,分类标准固定传 JBFLBZ/1102(外部客户)
* @return 保存结果,含成功/失败数量与客户编码
*/
BfiBillSaveResultVO saveCustomer(BfiCustomerSaveDTO param);
/**
* A102-2 财务应付单保存
*
* @param param 应付单参数,分录须携带外部系统来源分录标识用于防重
* @return 保存结果,含成功/失败数量与单据编号
*/
BfiBillSaveResultVO saveApBill(BfiApBillSaveDTO param);
/**
* A102-4 财务应付单查询
*
* @param param 查询参数,页码从1开始,修改时间范围不可超过1个月
* @return 财务应付单分页数据
*/
BfiPageVO<BfiApBillVO> queryApBill(BfiApBillQueryDTO param);
/**
* A302-2 财务应收单新增
*
* @param param 应收单参数,分录须携带外部系统来源分录标识用于防重
* @return 保存结果,含成功/失败数量与单据编号
*/
BfiBillSaveResultVO saveArBill(BfiArBillSaveDTO param);
/**
* A302-4 财务应收单查询
*
* @param param 查询参数,页码从1开始,修改时间范围不可超过1个月
* @return 财务应收单分页数据
*/
BfiPageVO<BfiArBillVO> queryArBill(BfiArBillQueryDTO param);
/**
* A302-6 收票指定应付
*
* @param op 操作类型,assign 指定、unassign 取消指定
* @param data 指定关系数据(收票单与财务应付单的来源系统编码+单号)
* @return 指定结果,含成功/失败数量
*/
BfiBillSaveResultVO invoiceAssign(String op, List<BfiInvoiceAssignItemDTO> data);
/**
* A303-1 开票申请单新增
*
* @param param 开票申请单参数,业务单据编号与组织编码为候选键
* @return 保存结果,含成功/失败数量与单据编号
*/
BfiBillSaveResultVO saveInvoiceApply(BfiInvoiceApplySaveDTO param);
/**
* A303-4 开票申请单查询
*
* @param param 查询参数,页码从1开始,单据日期范围不可超过1个月
* @return 开票申请单分页数据
*/
BfiPageVO<BfiInvoiceApplyVO> queryInvoiceApply(BfiInvoiceApplyQueryDTO param);
/**
* A303-5 开票申请发票查询
*
* @param param 查询原文参数,单据编号多个用英文逗号隔开,上限50个
* @return 发票查询结果,data 内容参考票易通文档
*/
BfiOpenApiResultVO<List<Object>> queryInvoiceApplyInvoice(BfiInvoiceApplyOpenApiQueryDTO param);
/**
* A303-2 收票单新增(批量保存)
*
* @param param 收票单参数,来源系统编码与来源单据号为候选键
* @return 保存结果,含成功/失败数量与收票单编号
*/
BfiBillSaveResultVO saveReceivedInvoice(BfiReceivedInvoiceSaveDTO param);
/**
* A801-3 收票单查询
*
* @param param 查询参数,页码从1开始
* @return 收票单分页数据
*/
BfiPageVO<BfiReceivedInvoiceVO> queryReceivedInvoice(BfiReceivedInvoiceQueryDTO param);
/**
* A301-1 收款单查询(收款处理查询)
*
* @param param 查询参数,业务日期范围不可超过1个月
* @return 收款处理分页数据
*/
BfiPageVO<BfiRecBillVO> queryRecBill(BfiRecBillQueryDTO param);
/**
* A301-2 收款认领公告查询
*
* @param claimusers 参与认领用户名
* @param pageNo 页码,从1开始
* @param pageSize 页数
* @return 收款认领公告分页数据
*/
BfiPageVO<BfiClaimAnnounceVO> queryClaimAnnounce(String claimusers, Integer pageNo, Integer pageSize);
/**
* A301-3 收款认领结果推送
*
* @param param 认领结果参数,须携带认领公告id
* @return 推送结果,含成功/失败数量
*/
BfiBillSaveResultVO pushClaimResult(BfiClaimPushDTO param);
/**
* A801-1 查询全票池发票数据
*
* @param param 查询参数,queryParam 键值对参考票易通文档
* @return 票池发票数据列表
*/
List<BfiInvoicePoolVO> queryInvoicePool(BfiInvoicePoolQueryDTO param);
/**
* A801-2 进项发票下载(文件下载)
*
* @param path 文件url,如票池发票的 downloadUrl/imageUrl
* @return 文件流响应,调用方负责关闭
*/
Response downloadInvoice(String path);
}
@@ -26,6 +26,7 @@
package org.springblade.thirdparty.bfi.service.impl;
import cn.hutool.json.JSONUtil;
import feign.Response;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.redis.cache.BladeRedis;
@@ -34,21 +35,55 @@ import org.springblade.thirdparty.bfi.config.BfiProperties;
import org.springblade.thirdparty.bfi.constant.BfiConstant;
import org.springblade.thirdparty.bfi.exception.BfiException;
import org.springblade.thirdparty.bfi.feign.IBfiClient;
import org.springblade.thirdparty.bfi.pojo.dto.BfiApBillQueryDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiApBillSaveBodyDTO;
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.BfiClaimAnnounceQueryDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiClaimPushBodyDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiClaimPushDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiCustomerQueryDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiCustomerSaveBodyDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiCustomerSaveDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiExchangeRateQueryDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiInvoiceApplyOpenApiBodyDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiInvoiceApplyOpenApiQueryDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiInvoiceApplyQueryDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiInvoiceApplySaveBodyDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiInvoiceApplySaveDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiInvoiceAssignBodyDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiInvoiceAssignItemDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiInvoiceDownloadDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiInvoicePoolQueryDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiPayApplyPushBodyDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiPayApplyPushDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiPayApplyQueryDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiPayApplySaveBodyDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiPayApplySaveDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiPayBillQueryDTO;
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.BfiRecBillQueryDTO;
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.BfiBillSaveResultVO;
import org.springblade.thirdparty.bfi.pojo.vo.BfiClaimAnnounceVO;
import org.springblade.thirdparty.bfi.pojo.vo.BfiCustomerVO;
import org.springblade.thirdparty.bfi.pojo.vo.BfiExchangeRateVO;
import org.springblade.thirdparty.bfi.pojo.vo.BfiInvoiceApplyVO;
import org.springblade.thirdparty.bfi.pojo.vo.BfiInvoicePoolVO;
import org.springblade.thirdparty.bfi.pojo.vo.BfiOpenApiResultVO;
import org.springblade.thirdparty.bfi.pojo.vo.BfiPageVO;
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.BfiResultVO;
import org.springblade.thirdparty.bfi.pojo.vo.BfiTokenVO;
import org.springblade.thirdparty.bfi.pojo.vo.BfiVerifyTokenVO;
@@ -56,9 +91,11 @@ import org.springblade.thirdparty.bfi.service.IBfiService;
import org.springblade.thirdparty.bfi.util.BfiUtil;
import org.springframework.stereotype.Service;
import java.nio.charset.StandardCharsets;
import java.time.Duration;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.Base64;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
@@ -233,6 +270,251 @@ public class BfiServiceImpl implements IBfiService {
return result.getData();
}
@Override
public BfiPageVO<BfiCustomerVO> queryCustomer(BfiCustomerQueryDTO param) {
if (param == null || param.getPageNo() == null || param.getPageSize() == null) {
throw new BfiException("查询BFI客户失败,分页参数不能为空");
}
String accessToken = getAccessToken();
BfiResultVO<BfiPageVO<BfiCustomerVO>> result = commonCall("客户查询", () -> client.customerQuery(accessToken,
param.getPageNo(), param.getPageSize(), param.getEnable(), param.getStatus(), param.getNumber(), param.getCreateorgNumber(),
param.getSocietycreditcode(), param.getIdno(), param.getModifytimeS(), param.getModifytimeE()));
return result.getData();
}
@Override
public BfiBillSaveResultVO saveCustomer(BfiCustomerSaveDTO param) {
if (param == null || StringUtil.isBlank(param.getName())) {
throw new BfiException("保存BFI客户失败,客户名称不能为空");
}
if (StringUtil.isBlank(param.getSocietycreditcode()) && StringUtil.isBlank(param.getIdno())) {
throw new BfiException("保存BFI客户失败,统一社会信用代码与身份证号不能同时为空");
}
if (param.getEntryGroupstandard() == null || param.getEntryGroupstandard().isEmpty()) {
throw new BfiException("保存BFI客户失败,分类标准分录不能为空");
}
String accessToken = getAccessToken();
BfiCustomerSaveBodyDTO body = new BfiCustomerSaveBodyDTO();
body.setData(Collections.singletonList(param));
BfiResultVO<BfiBillSaveResultVO> result = commonCall("客户保存", () -> client.customerSave(accessToken, body));
return result.getData();
}
@Override
public BfiBillSaveResultVO saveApBill(BfiApBillSaveDTO param) {
if (param == null || StringUtil.isBlank(param.getAwrpSrcSys()) || StringUtil.isBlank(param.getAwrpSrcCode())) {
throw new BfiException("保存BFI财务应付单失败,外部系统编号与来源单据号不能为空");
}
if (param.getDetailentry() == null || param.getDetailentry().isEmpty()) {
throw new BfiException("保存BFI财务应付单失败,明细分录不能为空");
}
String accessToken = getAccessToken();
BfiApBillSaveBodyDTO body = new BfiApBillSaveBodyDTO();
body.setData(Collections.singletonList(param));
BfiResultVO<BfiBillSaveResultVO> result = commonCall("财务应付单保存", () -> client.apBillSave(accessToken, body));
return result.getData();
}
@Override
public BfiPageVO<BfiApBillVO> queryApBill(BfiApBillQueryDTO param) {
if (param == null || param.getPageNo() == null || param.getPageSize() == null) {
throw new BfiException("查询BFI财务应付单失败,分页参数不能为空");
}
String accessToken = getAccessToken();
BfiResultVO<BfiPageVO<BfiApBillVO>> result = commonCall("财务应付单查询", () -> client.apBillQuery(accessToken,
param.getPageNo(), param.getPageSize(), param.getAwrpSrcCode(), param.getAwrpSrcSys(),
param.getModifytimeS(), param.getModifytimeE(), param.getBillstatus(), param.getSettlestatus()));
return result.getData();
}
@Override
public BfiBillSaveResultVO saveArBill(BfiArBillSaveDTO param) {
if (param == null || StringUtil.isBlank(param.getAwrpSrcSys()) || StringUtil.isBlank(param.getAwrpSrcCode())) {
throw new BfiException("保存BFI财务应收单失败,外部系统编号与来源单据号不能为空");
}
if (param.getEntry() == null || param.getEntry().isEmpty()) {
throw new BfiException("保存BFI财务应收单失败,明细分录不能为空");
}
String accessToken = getAccessToken();
BfiArBillSaveBodyDTO body = new BfiArBillSaveBodyDTO();
body.setData(Collections.singletonList(param));
BfiResultVO<BfiBillSaveResultVO> result = commonCall("财务应收单保存", () -> client.arBillSave(accessToken, body));
return result.getData();
}
@Override
public BfiPageVO<BfiArBillVO> queryArBill(BfiArBillQueryDTO param) {
if (param == null || param.getPageNo() == null || param.getPageSize() == null) {
throw new BfiException("查询BFI财务应收单失败,分页参数不能为空");
}
String accessToken = getAccessToken();
BfiResultVO<BfiPageVO<BfiArBillVO>> result = commonCall("财务应收单查询", () -> client.arBillQuery(accessToken,
param.getPageNo(), param.getPageSize(), param.getAwrpSrcCode(), param.getAwrpSrcSys(),
param.getModifytimeS(), param.getModifytimeE(), param.getBillstatus(), param.getSettlestatus()));
return result.getData();
}
@Override
public BfiBillSaveResultVO invoiceAssign(String op, List<BfiInvoiceAssignItemDTO> data) {
if (StringUtil.isBlank(op)) {
throw new BfiException("BFI收票指定应付失败,操作类型不能为空");
}
if (data == null || data.isEmpty()) {
throw new BfiException("BFI收票指定应付失败,指定关系数据不能为空");
}
String accessToken = getAccessToken();
BfiInvoiceAssignBodyDTO body = new BfiInvoiceAssignBodyDTO();
body.setOp(op);
body.setData(data);
BfiResultVO<BfiBillSaveResultVO> result = commonCall("收票指定应付", () -> client.invoiceAssign(accessToken, body));
return result.getData();
}
@Override
public BfiBillSaveResultVO saveInvoiceApply(BfiInvoiceApplySaveDTO param) {
if (param == null || StringUtil.isBlank(param.getBillno()) || StringUtil.isBlank(param.getOrgidNumber())) {
throw new BfiException("保存BFI开票申请单失败,组织编码与业务单据编号不能为空");
}
if (param.getSimOriginalBillItem() == null || param.getSimOriginalBillItem().isEmpty()) {
throw new BfiException("保存BFI开票申请单失败,单据体分录不能为空");
}
String accessToken = getAccessToken();
BfiInvoiceApplySaveBodyDTO body = new BfiInvoiceApplySaveBodyDTO();
body.setData(Collections.singletonList(param));
BfiResultVO<BfiBillSaveResultVO> result = commonCall("开票申请单保存", () -> client.invoiceApplySave(accessToken, body));
return result.getData();
}
@Override
public BfiPageVO<BfiInvoiceApplyVO> queryInvoiceApply(BfiInvoiceApplyQueryDTO param) {
if (param == null || param.getPageNo() == null || param.getPageSize() == null) {
throw new BfiException("查询BFI开票申请单失败,分页参数不能为空");
}
String accessToken = getAccessToken();
BfiResultVO<BfiPageVO<BfiInvoiceApplyVO>> result = commonCall("开票申请单查询", () -> client.invoiceApplyQuery(accessToken,
param.getPageNo(), param.getPageSize(), param.getBillno(), param.getSystemsource(), param.getBilldateS(), param.getBilldateE()));
return result.getData();
}
@Override
public BfiOpenApiResultVO<List<Object>> queryInvoiceApplyInvoice(BfiInvoiceApplyOpenApiQueryDTO param) {
if (param == null || StringUtil.isBlank(param.getSerialNo()) || StringUtil.isBlank(param.getSellerTaxpayerId())) {
throw new BfiException("查询BFI开票申请发票失败,单据编号与销方税号不能为空");
}
// data 原文需序列化为 JSON 后 Base64 编码
String data = Base64.getEncoder().encodeToString(JSONUtil.toJsonStr(param).getBytes(StandardCharsets.UTF_8));
BfiInvoiceApplyOpenApiBodyDTO body = new BfiInvoiceApplyOpenApiBodyDTO();
body.setBusinessSystemCode(properties.getClientId());
body.setInterfaceCode(BfiConstant.INVOICE_APPLY_OPEN_API_CODE);
body.setData(data);
String accessToken = getAccessToken();
BfiOpenApiResultVO<List<Object>> result = commonOpenApiCall("开票申请发票查询", () -> client.invoiceApplyOpenApi(accessToken, body));
return result;
}
@Override
public BfiBillSaveResultVO saveReceivedInvoice(BfiReceivedInvoiceSaveDTO param) {
if (param == null || StringUtil.isBlank(param.getAwrpSrcSys()) || StringUtil.isBlank(param.getAwrpSrcCode())) {
throw new BfiException("保存BFI收票单失败,外部系统编号与来源单据号不能为空");
}
if (param.getEntry() == null || param.getEntry().isEmpty()) {
throw new BfiException("保存BFI收票单失败,明细分录不能为空");
}
String accessToken = getAccessToken();
BfiReceivedInvoiceSaveBodyDTO body = new BfiReceivedInvoiceSaveBodyDTO();
body.setData(Collections.singletonList(param));
BfiResultVO<BfiBillSaveResultVO> result = commonCall("收票单保存", () -> client.receivedInvoiceSave(accessToken, body));
return result.getData();
}
@Override
public BfiPageVO<BfiReceivedInvoiceVO> queryReceivedInvoice(BfiReceivedInvoiceQueryDTO param) {
if (param == null || StringUtil.isBlank(param.getModifytime()) || StringUtil.isBlank(param.getModifytimeE())) {
throw new BfiException("查询BFI收票单失败,修改时间范围不能为空");
}
String accessToken = getAccessToken();
BfiResultVO<BfiPageVO<BfiReceivedInvoiceVO>> result = commonCall("收票单查询", () -> client.receivedInvoiceQuery(accessToken, param));
return result.getData();
}
@Override
public BfiPageVO<BfiRecBillVO> queryRecBill(BfiRecBillQueryDTO param) {
if (param == null || param.getPageNo() == null || param.getPageSize() == null) {
throw new BfiException("查询BFI收款单失败,分页参数不能为空");
}
if (StringUtil.isBlank(param.getBeginBizdate()) || StringUtil.isBlank(param.getEndBizdate())) {
throw new BfiException("查询BFI收款单失败,业务日期范围不能为空");
}
String accessToken = getAccessToken();
BfiResultVO<BfiPageVO<BfiRecBillVO>> result = commonCall("收款单查询", () -> client.recBillQuery(accessToken,
param.getPageNo(), param.getPageSize(), param.getBeginBizdate(), param.getEndBizdate(), param.getBillno(), param.getOrgNumber()));
return result.getData();
}
@Override
public BfiPageVO<BfiClaimAnnounceVO> queryClaimAnnounce(String claimusers, Integer pageNo, Integer pageSize) {
if (StringUtil.isBlank(claimusers)) {
throw new BfiException("查询BFI收款认领公告失败,参与认领用户名不能为空");
}
if (pageNo == null || pageSize == null) {
throw new BfiException("查询BFI收款认领公告失败,分页参数不能为空");
}
String accessToken = getAccessToken();
BfiResultVO<BfiPageVO<BfiClaimAnnounceVO>> result = commonCall("收款认领公告查询", () -> client.claimAnnounceQuery(accessToken, claimusers, pageNo, pageSize));
return result.getData();
}
@Override
public BfiBillSaveResultVO pushClaimResult(BfiClaimPushDTO param) {
if (param == null || param.getBillid() == null) {
throw new BfiException("推送BFI收款认领结果失败,认领公告id不能为空");
}
if (StringUtil.isBlank(param.getAwrpSrcSys()) || StringUtil.isBlank(param.getAwrpSrcCode())) {
throw new BfiException("推送BFI收款认领结果失败,来源系统编码与来源单据编码不能为空");
}
if (param.getEntryentity() == null || param.getEntryentity().isEmpty()) {
throw new BfiException("推送BFI收款认领结果失败,单据体分录不能为空");
}
String accessToken = getAccessToken();
BfiClaimPushBodyDTO body = new BfiClaimPushBodyDTO();
body.setData(Collections.singletonList(param));
BfiResultVO<BfiBillSaveResultVO> result = commonCall("收款认领结果推送", () -> client.claimBillPush(accessToken, body));
return result.getData();
}
@Override
public List<BfiInvoicePoolVO> queryInvoicePool(BfiInvoicePoolQueryDTO param) {
if (param == null || param.getQueryParam() == null || param.getQueryParam().isEmpty()) {
throw new BfiException("查询BFI全票池发票失败,查询参数不能为空");
}
String accessToken = getAccessToken();
BfiResultVO<List<BfiInvoicePoolVO>> result = commonCall("全票池发票查询", () -> client.invoicePoolQuery(accessToken, param));
return result.getData() != null ? result.getData() : List.of();
}
@Override
public Response downloadInvoice(String path) {
if (StringUtil.isBlank(path)) {
throw new BfiException("下载BFI进项发票失败,文件url不能为空");
}
BfiInvoiceDownloadDTO param = new BfiInvoiceDownloadDTO();
param.setPath(path);
String accessToken = getAccessToken();
try {
Response response = client.invoiceDownload(accessToken, param);
if (response == null || response.status() != 200) {
log.error("调用BFI接口 进项发票下载异常响应状态:{}", response == null ? "无响应" : response.status());
throw new BfiException("调用BFI接口进项发票下载异常,响应状态:" + (response == null ? "无响应" : response.status()));
}
return response;
} catch (BfiException e) {
throw e;
} catch (Exception e) {
log.error("调用BFI接口 进项发票下载异常", e);
throw new BfiException("调用BFI接口进项发票下载异常", e);
}
}
/**
* 公共调用方法,统一校验响应结果
*
@@ -258,6 +540,31 @@ public class BfiServiceImpl implements IBfiService {
}
}
/**
* 开放平台公共调用方法,校验 success 标识
*
* @param type 调用类型描述
* @param supplier 实际调用
* @param <T> 响应数据类型
* @return 响应结果
*/
private <T> BfiOpenApiResultVO<T> commonOpenApiCall(String type, Supplier<BfiOpenApiResultVO<T>> supplier) {
try {
BfiOpenApiResultVO<T> result = supplier.get();
if (result != null && result.isSuccess()) {
return result;
}
log.error("调用BFI接口 {}异常响应参数:{}", type, JSONUtil.toJsonStr(result));
String errorCode = Optional.ofNullable(result).map(BfiOpenApiResultVO::getErrorCode).orElse("");
throw new BfiException("调用BFI接口" + type + "异常 " + errorCode);
} catch (BfiException e) {
throw e;
} catch (Exception e) {
log.error("调用BFI接口 {}异常", type, e);
throw new BfiException("调用BFI接口" + type + "异常", e);
}
}
/**
* 缓存令牌,按 expires_in 毫秒数设置提前失效时间
*
@@ -0,0 +1,592 @@
/*
* 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.service;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import feign.Request;
import feign.Response;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.ArgumentCaptor;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import org.springblade.core.redis.cache.BladeRedis;
import org.springblade.thirdparty.bfi.config.BfiProperties;
import org.springblade.thirdparty.bfi.exception.BfiException;
import org.springblade.thirdparty.bfi.feign.IBfiClient;
import org.springblade.thirdparty.bfi.pojo.dto.BfiApBillQueryDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiApBillSaveDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiApBillSaveEntryDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiArBillQueryDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiArBillSaveDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiArBillSaveEntryDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiClaimAnnounceQueryDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiClaimPushDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiClaimPushEntryDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiCustomerQueryDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiCustomerSaveDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiCustomerGroupEntryDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiInvoiceApplyOpenApiQueryDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiInvoiceApplyQueryDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiInvoiceApplySaveDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiInvoiceApplySaveEntryDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiInvoiceAssignBodyDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiInvoiceAssignItemDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiInvoiceAssignRefDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiInvoicePoolQueryDTO;
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.BfiRecBillQueryDTO;
import org.springblade.thirdparty.bfi.pojo.dto.BfiTokenDTO;
import org.springblade.thirdparty.bfi.pojo.vo.BfiApBillVO;
import org.springblade.thirdparty.bfi.pojo.vo.BfiArBillVO;
import org.springblade.thirdparty.bfi.pojo.vo.BfiBillSaveResultVO;
import org.springblade.thirdparty.bfi.pojo.vo.BfiClaimAnnounceVO;
import org.springblade.thirdparty.bfi.pojo.vo.BfiCustomerVO;
import org.springblade.thirdparty.bfi.pojo.vo.BfiInvoiceApplyVO;
import org.springblade.thirdparty.bfi.pojo.vo.BfiInvoicePoolVO;
import org.springblade.thirdparty.bfi.pojo.vo.BfiOpenApiResultVO;
import org.springblade.thirdparty.bfi.pojo.vo.BfiPageVO;
import org.springblade.thirdparty.bfi.pojo.vo.BfiReceivedInvoiceVO;
import org.springblade.thirdparty.bfi.pojo.vo.BfiRecBillVO;
import org.springblade.thirdparty.bfi.pojo.vo.BfiResultVO;
import org.springblade.thirdparty.bfi.pojo.vo.BfiTokenVO;
import org.springframework.data.redis.core.ValueOperations;
import org.springblade.thirdparty.bfi.service.impl.BfiServiceImpl;
import java.nio.charset.StandardCharsets;
import java.util.Base64;
import java.util.List;
import java.util.Map;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.lenient;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoInteractions;
import static org.mockito.Mockito.when;
/**
* 业财融合(BFI)服务实现单元测试
*
* @author Chill
*/
@ExtendWith(MockitoExtension.class)
class BfiServiceImplTest {
@Mock
private BfiProperties properties;
@Mock
private IBfiClient client;
@Mock
private BladeRedis bladeRedis;
@Mock
private ValueOperations<String, Object> valueOperations;
@InjectMocks
private BfiServiceImpl service;
@BeforeEach
void setUp() {
lenient().when(properties.getClientId()).thenReturn("test-client");
lenient().when(properties.getClientSecret()).thenReturn("test-secret");
lenient().when(properties.getUsername()).thenReturn("test-user");
lenient().when(properties.getAccountId()).thenReturn("test-account");
lenient().when(properties.getLanguage()).thenReturn("zh_CN");
lenient().when(bladeRedis.getValueOps()).thenReturn(valueOperations);
}
/**
* 构建成功响应
*/
private <T> BfiResultVO<T> success(T data) {
BfiResultVO<T> result = new BfiResultVO<>();
result.setStatus(true);
result.setErrorCode("0");
result.setData(data);
return result;
}
/**
* 构建保存结果
*/
private BfiBillSaveResultVO saveResult(int successCount) {
BfiBillSaveResultVO result = new BfiBillSaveResultVO();
result.setSuccessCount(String.valueOf(successCount));
result.setFailCount("0");
return result;
}
/**
* 构建令牌数据
*/
private BfiTokenVO tokenVO() {
BfiTokenVO tokenVO = new BfiTokenVO();
tokenVO.setAccessToken("token-1");
tokenVO.setExpiresIn(600_000L);
return tokenVO;
}
/**
* 模拟缓存未命中并通过 getToken 获取令牌
*/
private void mockAccessToken() {
when(bladeRedis.get("blade:third:bfi:token")).thenReturn(null);
when(client.getToken(any(BfiTokenDTO.class))).thenReturn(success(tokenVO()));
}
@Test
void getTokenShouldCacheAndReturnToken() {
when(client.getToken(any(BfiTokenDTO.class))).thenReturn(success(tokenVO()));
BfiTokenVO tokenVO = service.getToken();
assertEquals("token-1", tokenVO.getAccessToken());
ArgumentCaptor<BfiTokenDTO> captor = ArgumentCaptor.forClass(BfiTokenDTO.class);
verify(client).getToken(captor.capture());
assertEquals("test-client", captor.getValue().getClientId());
assertNotNull(captor.getValue().getNonce());
assertNotNull(captor.getValue().getTimestamp());
verify(valueOperations).setIfAbsent(eq("blade:third:bfi:token"), eq("token-1"), any());
}
@Test
void getTokenShouldThrowWhenDataEmpty() {
when(client.getToken(any(BfiTokenDTO.class))).thenReturn(success(new BfiTokenVO()));
assertThrows(BfiException.class, () -> service.getToken());
}
@Test
void getAccessTokenShouldReturnCachedValue() {
when(bladeRedis.get("blade:third:bfi:token")).thenReturn("cached-token");
assertEquals("cached-token", service.getAccessToken());
verifyNoInteractions(client);
}
@Test
void getAccessTokenShouldFetchWhenCacheMiss() {
mockAccessToken();
assertEquals("token-1", service.getAccessToken());
}
@Test
void queryCustomerShouldReturnPage() {
mockAccessToken();
BfiPageVO<BfiCustomerVO> page = new BfiPageVO<>();
when(client.customerQuery(eq("token-1"), eq(1), eq(10), any(), any(), any(), any(), any(), any(), any(), any()))
.thenReturn(success(page));
BfiCustomerQueryDTO param = new BfiCustomerQueryDTO();
param.setPageNo(1);
param.setPageSize(10);
assertEquals(page, service.queryCustomer(param));
}
@Test
void queryCustomerShouldThrowWhenPageEmpty() {
assertThrows(BfiException.class, () -> service.queryCustomer(new BfiCustomerQueryDTO()));
}
@Test
void saveCustomerShouldValidateRequiredFields() {
BfiCustomerSaveDTO noName = new BfiCustomerSaveDTO();
assertThrows(BfiException.class, () -> service.saveCustomer(noName));
BfiCustomerSaveDTO noCreditCode = new BfiCustomerSaveDTO();
noCreditCode.setName("客户A");
noCreditCode.setEntryGroupstandard(List.of(new BfiCustomerGroupEntryDTO()));
assertThrows(BfiException.class, () -> service.saveCustomer(noCreditCode));
BfiCustomerSaveDTO noGroup = new BfiCustomerSaveDTO();
noGroup.setName("客户A");
noGroup.setSocietycreditcode("91450000MA5Q1G1M59");
assertThrows(BfiException.class, () -> service.saveCustomer(noGroup));
verifyNoInteractions(client);
}
@Test
void saveCustomerShouldWrapData() {
mockAccessToken();
when(client.customerSave(anyString(), any())).thenReturn(success(saveResult(1)));
BfiCustomerSaveDTO param = new BfiCustomerSaveDTO();
param.setName("客户A");
param.setSocietycreditcode("91450000MA5Q1G1M59");
param.setEntryGroupstandard(List.of(new BfiCustomerGroupEntryDTO()));
BfiBillSaveResultVO result = service.saveCustomer(param);
assertEquals("1", result.getSuccessCount());
ArgumentCaptor<org.springblade.thirdparty.bfi.pojo.dto.BfiCustomerSaveBodyDTO> captor =
ArgumentCaptor.forClass(org.springblade.thirdparty.bfi.pojo.dto.BfiCustomerSaveBodyDTO.class);
verify(client).customerSave(eq("token-1"), captor.capture());
assertEquals(param, captor.getValue().getData().get(0));
}
@Test
void saveApBillShouldValidateRequiredFields() {
BfiApBillSaveDTO noSrc = new BfiApBillSaveDTO();
assertThrows(BfiException.class, () -> service.saveApBill(noSrc));
BfiApBillSaveDTO noEntry = new BfiApBillSaveDTO();
noEntry.setAwrpSrcSys("WCCK");
noEntry.setAwrpSrcCode("AP-1");
assertThrows(BfiException.class, () -> service.saveApBill(noEntry));
verifyNoInteractions(client);
}
@Test
void saveApBillShouldWrapData() {
mockAccessToken();
when(client.apBillSave(anyString(), any())).thenReturn(success(saveResult(1)));
BfiApBillSaveDTO param = new BfiApBillSaveDTO();
param.setAwrpSrcSys("WCCK");
param.setAwrpSrcCode("AP-1");
param.setDetailentry(List.of(new BfiApBillSaveEntryDTO()));
assertEquals("1", service.saveApBill(param).getSuccessCount());
}
@Test
void queryApBillShouldReturnPage() {
mockAccessToken();
BfiPageVO<BfiApBillVO> page = new BfiPageVO<>();
when(client.apBillQuery(eq("token-1"), eq(1), eq(10), any(), any(), any(), any(), any(), any()))
.thenReturn(success(page));
BfiApBillQueryDTO param = new BfiApBillQueryDTO();
param.setPageNo(1);
param.setPageSize(10);
assertEquals(page, service.queryApBill(param));
}
@Test
void saveArBillShouldValidateRequiredFields() {
BfiArBillSaveDTO noSrc = new BfiArBillSaveDTO();
assertThrows(BfiException.class, () -> service.saveArBill(noSrc));
BfiArBillSaveDTO noEntry = new BfiArBillSaveDTO();
noEntry.setAwrpSrcSys("WCCK");
noEntry.setAwrpSrcCode("AR-1");
assertThrows(BfiException.class, () -> service.saveArBill(noEntry));
verifyNoInteractions(client);
}
@Test
void saveArBillShouldWrapData() {
mockAccessToken();
when(client.arBillSave(anyString(), any())).thenReturn(success(saveResult(1)));
BfiArBillSaveDTO param = new BfiArBillSaveDTO();
param.setAwrpSrcSys("WCCK");
param.setAwrpSrcCode("AR-1");
param.setEntry(List.of(new BfiArBillSaveEntryDTO()));
assertEquals("1", service.saveArBill(param).getSuccessCount());
}
@Test
void queryArBillShouldReturnPage() {
mockAccessToken();
BfiPageVO<BfiArBillVO> page = new BfiPageVO<>();
when(client.arBillQuery(eq("token-1"), eq(1), eq(10), any(), any(), any(), any(), any(), any()))
.thenReturn(success(page));
BfiArBillQueryDTO param = new BfiArBillQueryDTO();
param.setPageNo(1);
param.setPageSize(10);
assertEquals(page, service.queryArBill(param));
}
@Test
void invoiceAssignShouldValidateAndWrapBody() {
assertThrows(BfiException.class, () -> service.invoiceAssign(null, List.of()));
assertThrows(BfiException.class, () -> service.invoiceAssign("assign", List.of()));
mockAccessToken();
when(client.invoiceAssign(anyString(), any())).thenReturn(success(saveResult(1)));
BfiInvoiceAssignRefDTO invoice = new BfiInvoiceAssignRefDTO();
invoice.setAwrpSrcCode("INV-1");
invoice.setAwrpSrcSys("WCCK");
BfiInvoiceAssignRefDTO apBill = new BfiInvoiceAssignRefDTO();
apBill.setAwrpSrcCode("AP-1");
apBill.setAwrpSrcSys("WCCK");
BfiInvoiceAssignItemDTO item = new BfiInvoiceAssignItemDTO();
item.setApInvoice(List.of(invoice));
item.setApFinapbill(List.of(apBill));
assertEquals("1", service.invoiceAssign("assign", List.of(item)).getSuccessCount());
ArgumentCaptor<BfiInvoiceAssignBodyDTO> captor = ArgumentCaptor.forClass(BfiInvoiceAssignBodyDTO.class);
verify(client).invoiceAssign(eq("token-1"), captor.capture());
assertEquals("assign", captor.getValue().getOp());
}
@Test
void saveInvoiceApplyShouldValidateRequiredFields() {
BfiInvoiceApplySaveDTO noBillNo = new BfiInvoiceApplySaveDTO();
assertThrows(BfiException.class, () -> service.saveInvoiceApply(noBillNo));
BfiInvoiceApplySaveDTO noItem = new BfiInvoiceApplySaveDTO();
noItem.setBillno("KPSQ-1");
noItem.setOrgidNumber("01.00");
assertThrows(BfiException.class, () -> service.saveInvoiceApply(noItem));
verifyNoInteractions(client);
}
@Test
void saveInvoiceApplyShouldWrapData() {
mockAccessToken();
when(client.invoiceApplySave(anyString(), any())).thenReturn(success(saveResult(1)));
BfiInvoiceApplySaveDTO param = new BfiInvoiceApplySaveDTO();
param.setBillno("KPSQ-1");
param.setOrgidNumber("01.00");
param.setSimOriginalBillItem(List.of(new BfiInvoiceApplySaveEntryDTO()));
assertEquals("1", service.saveInvoiceApply(param).getSuccessCount());
}
@Test
void queryInvoiceApplyShouldReturnPage() {
mockAccessToken();
BfiPageVO<BfiInvoiceApplyVO> page = new BfiPageVO<>();
when(client.invoiceApplyQuery(eq("token-1"), eq(1), eq(10), any(), any(), any(), any()))
.thenReturn(success(page));
BfiInvoiceApplyQueryDTO param = new BfiInvoiceApplyQueryDTO();
param.setPageNo(1);
param.setPageSize(10);
assertEquals(page, service.queryInvoiceApply(param));
}
@Test
void queryInvoiceApplyInvoiceShouldEncodeBase64Data() {
mockAccessToken();
BfiOpenApiResultVO<List<Object>> openApiResult = new BfiOpenApiResultVO<>();
openApiResult.setSuccess(true);
openApiResult.setErrorCode("S0000");
openApiResult.setData(List.of());
when(client.invoiceApplyOpenApi(anyString(), any())).thenReturn(openApiResult);
BfiInvoiceApplyOpenApiQueryDTO param = new BfiInvoiceApplyOpenApiQueryDTO();
param.setSerialNo("KPSQ-1,KPSQ-2");
param.setSellerTaxpayerId("91450000MA5Q1G1M59");
service.queryInvoiceApplyInvoice(param);
ArgumentCaptor<org.springblade.thirdparty.bfi.pojo.dto.BfiInvoiceApplyOpenApiBodyDTO> captor =
ArgumentCaptor.forClass(org.springblade.thirdparty.bfi.pojo.dto.BfiInvoiceApplyOpenApiBodyDTO.class);
verify(client).invoiceApplyOpenApi(eq("token-1"), captor.capture());
assertEquals("BILL.INVOICE.QUERY", captor.getValue().getInterfaceCode());
assertEquals("test-client", captor.getValue().getBusinessSystemCode());
String decoded = new String(Base64.getDecoder().decode(captor.getValue().getData()), StandardCharsets.UTF_8);
JSONObject json = JSONUtil.parseObj(decoded);
assertEquals("KPSQ-1,KPSQ-2", json.getStr("serialNo"));
assertEquals("91450000MA5Q1G1M59", json.getStr("sellerTaxpayerId"));
}
@Test
void queryInvoiceApplyInvoiceShouldThrowWhenParamsBlank() {
assertThrows(BfiException.class, () -> service.queryInvoiceApplyInvoice(new BfiInvoiceApplyOpenApiQueryDTO()));
verifyNoInteractions(client);
}
@Test
void saveReceivedInvoiceShouldValidateRequiredFields() {
BfiReceivedInvoiceSaveDTO noSrc = new BfiReceivedInvoiceSaveDTO();
assertThrows(BfiException.class, () -> service.saveReceivedInvoice(noSrc));
BfiReceivedInvoiceSaveDTO noEntry = new BfiReceivedInvoiceSaveDTO();
noEntry.setAwrpSrcSys("WCCK");
noEntry.setAwrpSrcCode("INV-1");
assertThrows(BfiException.class, () -> service.saveReceivedInvoice(noEntry));
verifyNoInteractions(client);
}
@Test
void saveReceivedInvoiceShouldWrapData() {
mockAccessToken();
when(client.receivedInvoiceSave(anyString(), any())).thenReturn(success(saveResult(1)));
BfiReceivedInvoiceSaveDTO param = new BfiReceivedInvoiceSaveDTO();
param.setAwrpSrcSys("WCCK");
param.setAwrpSrcCode("INV-1");
param.setEntry(List.of(new BfiReceivedInvoiceSaveEntryDTO()));
assertEquals("1", service.saveReceivedInvoice(param).getSuccessCount());
}
@Test
void queryReceivedInvoiceShouldValidateModifyTime() {
assertThrows(BfiException.class, () -> service.queryReceivedInvoice(new BfiReceivedInvoiceQueryDTO()));
verifyNoInteractions(client);
}
@Test
void queryReceivedInvoiceShouldReturnPage() {
mockAccessToken();
BfiPageVO<BfiReceivedInvoiceVO> page = new BfiPageVO<>();
when(client.receivedInvoiceQuery(anyString(), any(BfiReceivedInvoiceQueryDTO.class))).thenReturn(success(page));
BfiReceivedInvoiceQueryDTO param = new BfiReceivedInvoiceQueryDTO();
param.setModifytime("2026-09-08 10:36:29");
param.setModifytimeE("2026-09-08 10:39:36");
assertEquals(page, service.queryReceivedInvoice(param));
}
@Test
void queryRecBillShouldValidateRequiredFields() {
assertThrows(BfiException.class, () -> service.queryRecBill(new BfiRecBillQueryDTO()));
BfiRecBillQueryDTO noDate = new BfiRecBillQueryDTO();
noDate.setPageNo(1);
noDate.setPageSize(10);
assertThrows(BfiException.class, () -> service.queryRecBill(noDate));
verifyNoInteractions(client);
}
@Test
void queryRecBillShouldReturnPage() {
mockAccessToken();
BfiPageVO<BfiRecBillVO> page = new BfiPageVO<>();
when(client.recBillQuery(eq("token-1"), eq(1), eq(10), any(), any(), any(), any()))
.thenReturn(success(page));
BfiRecBillQueryDTO param = new BfiRecBillQueryDTO();
param.setPageNo(1);
param.setPageSize(10);
param.setBeginBizdate("2026-08-08");
param.setEndBizdate("2026-09-08");
assertEquals(page, service.queryRecBill(param));
}
@Test
void queryClaimAnnounceShouldValidateParams() {
assertThrows(BfiException.class, () -> service.queryClaimAnnounce(null, 1, 10));
assertThrows(BfiException.class, () -> service.queryClaimAnnounce("张三", null, 10));
}
@Test
void queryClaimAnnounceShouldReturnPage() {
mockAccessToken();
BfiPageVO<BfiClaimAnnounceVO> page = new BfiPageVO<>();
when(client.claimAnnounceQuery("token-1", "张三", 1, 10)).thenReturn(success(page));
assertEquals(page, service.queryClaimAnnounce("张三", 1, 10));
}
@Test
void pushClaimResultShouldValidateRequiredFields() {
assertThrows(BfiException.class, () -> service.pushClaimResult(null));
BfiClaimPushDTO noBillId = new BfiClaimPushDTO();
assertThrows(BfiException.class, () -> service.pushClaimResult(noBillId));
BfiClaimPushDTO noEntry = new BfiClaimPushDTO();
noEntry.setBillid(1L);
noEntry.setAwrpSrcSys("WCCK");
noEntry.setAwrpSrcCode("RL-1");
assertThrows(BfiException.class, () -> service.pushClaimResult(noEntry));
verifyNoInteractions(client);
}
@Test
void pushClaimResultShouldWrapData() {
mockAccessToken();
when(client.claimBillPush(anyString(), any())).thenReturn(success(saveResult(1)));
BfiClaimPushDTO param = new BfiClaimPushDTO();
param.setBillid(2398805822369971200L);
param.setAwrpSrcSys("WCCK");
param.setAwrpSrcCode("RL-1");
param.setEntryentity(List.of(new BfiClaimPushEntryDTO()));
assertEquals("1", service.pushClaimResult(param).getSuccessCount());
}
@Test
void queryInvoicePoolShouldValidateQueryParam() {
assertThrows(BfiException.class, () -> service.queryInvoicePool(new BfiInvoicePoolQueryDTO()));
verifyNoInteractions(client);
}
@Test
void queryInvoicePoolShouldReturnRows() {
mockAccessToken();
BfiInvoicePoolVO invoice = new BfiInvoicePoolVO();
when(client.invoicePoolQuery(anyString(), any(BfiInvoicePoolQueryDTO.class)))
.thenReturn(success(List.of(invoice)));
BfiInvoicePoolQueryDTO param = new BfiInvoicePoolQueryDTO();
param.setQueryParam(Map.of("invoiceNo", "25532000000044538098"));
List<BfiInvoicePoolVO> rows = service.queryInvoicePool(param);
assertEquals(1, rows.size());
}
@Test
void downloadInvoiceShouldValidatePath() {
assertThrows(BfiException.class, () -> service.downloadInvoice(null));
verifyNoInteractions(client);
}
@Test
void downloadInvoiceShouldThrowWhenStatusNotOk() {
mockAccessToken();
Response response = downloadResponse(500, "Internal Error");
when(client.invoiceDownload(anyString(), any())).thenReturn(response);
assertThrows(BfiException.class, () -> service.downloadInvoice("234e244b2c803400"));
response.close();
}
@Test
void downloadInvoiceShouldReturnResponse() {
mockAccessToken();
Response response = downloadResponse(200, "OK");
when(client.invoiceDownload(anyString(), any())).thenReturn(response);
assertEquals(response, service.downloadInvoice("234e244b2c803400"));
response.close();
}
/**
* 构建下载响应
*/
private Response downloadResponse(int status, String reason) {
Request request = Request.create(Request.HttpMethod.POST, "/ierp/kapi/v2/awrp/bosext/attachment/download",
Map.of(), null, StandardCharsets.UTF_8);
return Response.builder().status(status).reason(reason).request(request).build();
}
@Test
void commonCallShouldThrowWhenRemoteFailed() {
mockAccessToken();
BfiResultVO<BfiPageVO<BfiCustomerVO>> failed = new BfiResultVO<>();
failed.setStatus(false);
failed.setErrorCode("400");
failed.setMessage("操作失败");
when(client.customerQuery(any(), any(), any(), any(), any(), any(), any(), any(), any(), any(), any()))
.thenReturn(failed);
BfiCustomerQueryDTO param = new BfiCustomerQueryDTO();
param.setPageNo(1);
param.setPageSize(10);
BfiException exception = assertThrows(BfiException.class, () -> service.queryCustomer(param));
assertTrue(exception.getMessage().contains("操作失败"));
}
@Test
void getAccessTokenShouldNotCallRemoteWhenCached() {
when(bladeRedis.get("blade:third:bfi:token")).thenReturn("cached-token");
service.getAccessToken();
verify(client, never()).getToken(any());
}
}