确认发票新增发票冗余附件名称字段、查询开票信息新增附件路径和名称

This commit is contained in:
gaoqr
2025-10-14 17:58:51 +08:00
parent 0a06f5408f
commit 480fa25afa
3 changed files with 16 additions and 1 deletions
@@ -33,4 +33,10 @@ public class InvoiceDetailsRespVO {
@Schema(description = "申请时间")
private LocalDateTime applyTime;
@Schema(description = "发票附件路径")
private String invoiceAttachmentPath;
@Schema(description = "发票附件名称")
private String invoiceAttachmentName;
}
@@ -81,6 +81,11 @@ public class InvoiceRecordsDO extends BaseDO {
*/
private String invoiceAttachmentPath;
/**
* 开票附件名称
*/
private String invoiceAttachmentName;
/**
* 开票人
@@ -300,6 +300,8 @@ public class InvoiceServiceImpl implements InvoiceService {
.applicant(invoiceRecordsDO.getCreator())
.orgName(invoiceRecordsDO.getOrganName())
.applyTime(invoiceRecordsDO.getCreateTime())
.invoiceAttachmentPath(invoiceRecordsDO.getInvoiceAttachmentPath())
.invoiceAttachmentName(invoiceRecordsDO.getInvoiceAttachmentName())
.build();
}
@@ -331,8 +333,10 @@ public class InvoiceServiceImpl implements InvoiceService {
if (ObjectUtil.isNull(file) || file.isEmpty()) {
throw new ServiceException(ORG_INVOICE_AGREE_FILE_NULL_ERROR);
}
String filePath = fileApi.createFile(IoUtil.readBytes(file.getInputStream()), file.getOriginalFilename());
String originalFilename = file.getOriginalFilename();
String filePath = fileApi.createFile(IoUtil.readBytes(file.getInputStream()), originalFilename);
invoiceRecordsDO.setInvoiceAttachmentPath(filePath);
invoiceRecordsDO.setInvoiceAttachmentName(originalFilename);
invoiceRecordsDO.setInvoiceNo(reqVO.getInvoiceNo());
} else {
// 拒绝开票