feat:添加发票登记接口
parent
8e5b240125
commit
5e07ab5ebe
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
<artifactId>scfs-api-service-accountant</artifactId>
|
<artifactId>scfs-api-service-accountant</artifactId>
|
||||||
<version>2.0.4-snapshot</version>
|
<version>2.0.4-snapshot</version>
|
||||||
<name>scfs-api-service-cat:财务中心对外接口</name>
|
<name>scfs-api-service-accountant:财务中心对外接口</name>
|
||||||
<description>财务中心SDK</description>
|
<description>财务中心SDK</description>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,13 @@
|
||||||
package com.czcb.scfs.service.accountant.invoice;
|
package com.czcb.scfs.service.accountant.invoice;
|
||||||
|
|
||||||
import com.czcb.scfs.api.core.ApiClient;
|
import com.czcb.scfs.api.core.ApiClient;
|
||||||
|
import com.czcb.scfs.api.core.http.HttpHeaders;
|
||||||
|
import com.czcb.scfs.api.core.http.HttpResponse;
|
||||||
|
import com.czcb.scfs.service.accountant.invoice.model.InvoiceInfoSaveApiRequest;
|
||||||
|
import com.czcb.scfs.service.accountant.invoice.model.InvoiceInfoSaveApiResponse;
|
||||||
|
|
||||||
|
import static com.czcb.scfs.api.core.Constants.API_VERSION;
|
||||||
|
import static com.czcb.scfs.api.core.Constants.V_2;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发票功能
|
* 发票功能
|
||||||
|
|
@ -9,10 +16,22 @@ import com.czcb.scfs.api.core.ApiClient;
|
||||||
* @since 2024-07-22
|
* @since 2024-07-22
|
||||||
*/
|
*/
|
||||||
public class InvoiceService {
|
public class InvoiceService {
|
||||||
|
|
||||||
private final ApiClient apiClient;
|
private final ApiClient apiClient;
|
||||||
|
|
||||||
public InvoiceService(ApiClient apiClient) {
|
public InvoiceService(ApiClient apiClient) {
|
||||||
this.apiClient = apiClient;
|
this.apiClient = apiClient;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 231907-发票登记
|
||||||
|
*/
|
||||||
|
public InvoiceInfoSaveApiResponse add(InvoiceInfoSaveApiRequest request) {
|
||||||
|
String url = "/invoice/add";
|
||||||
|
HttpHeaders headers = new HttpHeaders();
|
||||||
|
headers.addHeader(API_VERSION, V_2);
|
||||||
|
HttpResponse<InvoiceInfoSaveApiResponse> httpResponse = apiClient.post(url, headers, request.toJsonRequest(), InvoiceInfoSaveApiResponse.class);
|
||||||
|
return httpResponse.getServiceResponse();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,93 @@
|
||||||
|
package com.czcb.scfs.service.accountant.invoice.model;
|
||||||
|
|
||||||
|
import com.czcb.scfs.api.core.ApiRequest;
|
||||||
|
import com.czcb.scfs.api.core.agrs.TransType;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 231907-发票登记
|
||||||
|
*
|
||||||
|
* @author H.T
|
||||||
|
* @since 2024-07-15
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TransType("231907")
|
||||||
|
public class InvoiceInfoSaveApiRequest implements ApiRequest {
|
||||||
|
/**
|
||||||
|
* 发票编号
|
||||||
|
*/
|
||||||
|
@SerializedName("invoice_no")
|
||||||
|
private String invoiceNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发票类型 1、通用发票 2、累计循环发票
|
||||||
|
*/
|
||||||
|
@SerializedName("invoice_type")
|
||||||
|
private String invoiceType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发票登记日期
|
||||||
|
*/
|
||||||
|
@SerializedName("invoice_register_date")
|
||||||
|
private String invoiceRegisterDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收款账户账号
|
||||||
|
*/
|
||||||
|
@SerializedName("account_no")
|
||||||
|
private String accountNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收款账户户名
|
||||||
|
*/
|
||||||
|
@SerializedName("account_name")
|
||||||
|
private String accountName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 付款账户账号
|
||||||
|
*/
|
||||||
|
@SerializedName("opp_account_no")
|
||||||
|
private String oppAccountNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 付款账户户名
|
||||||
|
*/
|
||||||
|
@SerializedName("opp_account_name")
|
||||||
|
private String oppAccountName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 归集账户账号(待清算账户/可控电商A2)
|
||||||
|
*/
|
||||||
|
@SerializedName("settle_account_no")
|
||||||
|
private String settleAccountNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 归集账户户名(待清算账户/可控电商A2)
|
||||||
|
*/
|
||||||
|
@SerializedName("settle_account_name")
|
||||||
|
private String settleAccountName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发票归属日期起
|
||||||
|
*/
|
||||||
|
@SerializedName("invoice_belong_start_date")
|
||||||
|
private String invoiceBelongStartDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发票归属日期止
|
||||||
|
*/
|
||||||
|
@SerializedName("invoice_belong_end_date")
|
||||||
|
private String invoiceBelongEndDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发票金额
|
||||||
|
*/
|
||||||
|
@SerializedName("invoice_amount")
|
||||||
|
private BigDecimal invoiceAmount;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
package com.czcb.scfs.service.accountant.invoice.model;
|
||||||
|
|
||||||
|
import com.czcb.scfs.api.core.ApiResponse;
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class InvoiceInfoSaveApiResponse implements ApiResponse {
|
||||||
|
/**
|
||||||
|
* 000000:表示成功
|
||||||
|
*/
|
||||||
|
@SerializedName("recode")
|
||||||
|
private String recode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结果信息
|
||||||
|
*/
|
||||||
|
@SerializedName("recode_info")
|
||||||
|
private String recodeInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统流水号
|
||||||
|
*/
|
||||||
|
@SerializedName("sys_serial_no")
|
||||||
|
private String sysSerialNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统日期(YYYY-MM-DD)
|
||||||
|
*/
|
||||||
|
@SerializedName("sys_date")
|
||||||
|
private String sysDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统时间(YYYY-MM-DD hh:mm:ss)
|
||||||
|
*/
|
||||||
|
@SerializedName("sys_time")
|
||||||
|
private String sysTime;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue