开票检验
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
package com.zt.plat.module.erp.api;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.module.erp.api.dto.ErpInvoiceticketSubmitReqDTO;
|
||||
import com.zt.plat.module.erp.api.dto.ErpInvoiceticketSubmitRespDTO;
|
||||
import com.zt.plat.module.erp.api.dto.ErpSubmitReqDTO;
|
||||
import com.zt.plat.module.erp.api.dto.*;
|
||||
import com.zt.plat.module.erp.enums.ApiConstants;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
@@ -13,6 +11,7 @@ import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@FeignClient(name = ApiConstants.NAME)
|
||||
@Tag(name = "RPC 服务 - ERP")
|
||||
@@ -23,4 +22,13 @@ public interface InvoiceticketApi {
|
||||
@PostMapping(PREFIX + "/submit")
|
||||
@Operation(summary = "erp数据提交")
|
||||
CommonResult<ErpInvoiceticketSubmitRespDTO> submitDataToErp(@Valid @RequestBody ErpInvoiceticketSubmitReqDTO reqDTO);
|
||||
@PostMapping(PREFIX + "/submit098")
|
||||
@Operation(summary = "erp数据提交,参数需要billdoc和action,id")
|
||||
CommonResult<HashMap<String, String>> submitDataToErp098(@Valid @RequestBody Map<String,Object> reqDTO);
|
||||
@PostMapping(PREFIX + "/submit096")
|
||||
@Operation(summary = "erp数据提交,参数需要billdoc和action,id")
|
||||
CommonResult<HashMap<String, String>> submitDataToErp096(@Valid @RequestBody ErpElectronicInvoiceSubmitReqDTO reqDTO);
|
||||
@PostMapping(PREFIX + "/submit097")
|
||||
@Operation(summary = "erp数据提交")
|
||||
CommonResult<HashMap<String, String>> submitDataToErp097(@Valid @RequestBody ErpElectronicInvoiceReversalReqDTO reqDTO);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.zt.plat.module.erp.api.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Schema(description = "管理后台 - 电子发票冲销请求DTO")
|
||||
public class ErpElectronicInvoiceReversalReqDTO {
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String id;
|
||||
|
||||
@Schema(description = "要冲销的发票号;长度10位字符", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String billdoc;
|
||||
|
||||
@Schema(description = "冲销过账日期;格式为YYYYMMDD(如20251106)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String postingdate;
|
||||
|
||||
@Schema(description = "冲销原因描述;长度200位字符", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String reason;
|
||||
|
||||
@Schema(description = "不开具电子发票;X-不开票;长度1位字符")
|
||||
private String no_invoicing;
|
||||
|
||||
@Schema(description = "红冲原因枚举值;no_invoicing为空时必填;枚举值:开票有误、销货退回、服务终止、销售折让;长度20位字符", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String reversal_reason;
|
||||
|
||||
@Schema(description = "冲销相关附件列表", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private List<String> filedata;
|
||||
|
||||
// @Data
|
||||
// @Schema(description = "冲销附件信息")
|
||||
// public static class InvoiceReversalFileData {
|
||||
//
|
||||
// @Schema(description = "文件名;必须带文件后缀名;长度200位字符", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
// private String filename;
|
||||
//
|
||||
// @Schema(description = "文件内容;BASE64编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
// private String filect;
|
||||
// }
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.zt.plat.module.erp.api.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Schema(description = "管理后台 - 电子发票开具请求DTO")
|
||||
public class ErpElectronicInvoiceSubmitReqDTO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String id;
|
||||
|
||||
@Schema(description = "开票日期;格式为YYYYMMDD(如20251106)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String bill_date;
|
||||
|
||||
@Schema(description = "是否暂估开票;长度1位字符")
|
||||
private String provi_estimate;
|
||||
|
||||
@Schema(description = "发票抬头文本;长度25位字符")
|
||||
private String bill_text;
|
||||
|
||||
@Schema(description = "最晚收款日期;格式为YYYYMMDD(如20251106)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String bline_date;
|
||||
|
||||
@Schema(description = "不开具电子发票;X-不开票;长度1位字符")
|
||||
private String no_invoicing;
|
||||
|
||||
@Schema(description = "电子发票类型;no_invoicing为空时必填;05-普通发票,06-增值税专用发票;长度2位字符")
|
||||
private String invoice_type;
|
||||
|
||||
@Schema(description = "电子发票备注;会带入到电子发票上;长度200位字符")
|
||||
private String invoice_note;
|
||||
|
||||
@Schema(description = "红冲原因;no_invoicing为空且生成的是红字发票时必填;枚举值:开票有误、销货退回、服务终止、销售折让;长度20位字符")
|
||||
private String reversal_reason;
|
||||
|
||||
@Schema(description = "发票行项目列表", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private List<InvoiceItem> item;
|
||||
|
||||
@Schema(description = "发票条件明细列表", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private List<String> cond;
|
||||
|
||||
@Schema(description = "发票附件列表")
|
||||
private List<InvoiceFileData> filedata;
|
||||
|
||||
@Data
|
||||
@Schema(description = "发票行项目明细")
|
||||
public static class InvoiceItem {
|
||||
|
||||
@Schema(description = "发票行号;从1开始顺序编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Integer data_index;
|
||||
|
||||
@Schema(description = "参照类别;C-参照销售订单开票,J-根据交货单开票", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String ref_doc_ca;
|
||||
|
||||
@Schema(description = "参照单号;长度10位字符", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String ref_doc;
|
||||
|
||||
@Schema(description = "参照行号;长度6位数字", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String ref_item;
|
||||
|
||||
@Schema(description = "开票数量;保留3位小数", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private BigDecimal req_qty;
|
||||
|
||||
@Schema(description = "规格型号;会带入到电子发票上;长度100位字符")
|
||||
private String model_note;
|
||||
}
|
||||
|
||||
@Data
|
||||
@Schema(description = "发票条件明细")
|
||||
public static class InvoiceCond {
|
||||
|
||||
@Schema(description = "发票行号;与item-data_index关联", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Integer data_index;
|
||||
|
||||
@Schema(description = "条件类型;长度4位字符", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String cond_type;
|
||||
|
||||
@Schema(description = "条件金额;保留4位小数", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private BigDecimal cond_value;
|
||||
|
||||
@Schema(description = "货币码;长度5位字符", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String cond_curr;
|
||||
|
||||
@Schema(description = "条件单位;使用基本计量单位;长度3位字符", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String cond_d_unt;
|
||||
|
||||
@Schema(description = "条件定价单位;固定值1;长度5位数字", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private BigDecimal cond_p_unt;
|
||||
}
|
||||
|
||||
@Data
|
||||
@Schema(description = "发票附件信息")
|
||||
public static class InvoiceFileData {
|
||||
|
||||
@Schema(description = "文件名;必须带文件后缀名;长度200位字符", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String filename;
|
||||
|
||||
@Schema(description = "文件内容;BASE64编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String filect;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user