From 933f9ffdb9a099d933360926d43178e706254001 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B3=89=E4=BD=B3?= <1107186916@qq.com> Date: Sun, 20 Sep 2026 21:27:31 +0800 Subject: [PATCH] =?UTF-8?q?:memo:=20toInvoicePoolVO=20=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E6=98=A0=E5=B0=84=E8=A1=A5=E5=85=85=E5=A4=87=E6=B3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/FormalSettlementServiceImpl.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/blade-service/blade-transport/src/main/java/org/springblade/transport/service/impl/FormalSettlementServiceImpl.java b/blade-service/blade-transport/src/main/java/org/springblade/transport/service/impl/FormalSettlementServiceImpl.java index 164f7ac2..ab0fe530 100644 --- a/blade-service/blade-transport/src/main/java/org/springblade/transport/service/impl/FormalSettlementServiceImpl.java +++ b/blade-service/blade-transport/src/main/java/org/springblade/transport/service/impl/FormalSettlementServiceImpl.java @@ -1437,20 +1437,32 @@ public class FormalSettlementServiceImpl extends BaseServiceImpl 正式结算单认领VO 字段映射 + */ private FormalSettlementInvoicePoolVO toInvoicePoolVO(BfiInvoicePoolVO poolInvoice) { FormalSettlementInvoicePoolVO vo = new FormalSettlementInvoicePoolVO(); + // 发票号码 vo.setInvoiceNo(poolInvoice.getInvoiceNo()); + // 发票流水号,票池发票唯一标识 vo.setSerialNo(poolInvoice.getSerialNo()); + // 开票日期 yyyy-MM-dd vo.setInvoiceDate(poolInvoice.getInvoiceDate()); + // 发票类型编码转名称,未知编码原样返回 vo.setInvoiceTypeName(BfiConstant.INVOICE_TYPE_NAMES.getOrDefault(poolInvoice.getInvoiceType(), poolInvoice.getInvoiceType())); + // 税率:顶层优先、回退首条明细,小数转百分数(0.13 -> 13) vo.setTaxRate(resolveTaxRate(poolInvoice)); + // 价税合计作为发票金额,可匹配金额、默认认领金额与发票金额同源 BigDecimal totalAmount = parseAmount(poolInvoice.getTotalAmount()); vo.setInvoiceAmount(totalAmount); vo.setAvailableInvoiceAmount(totalAmount); vo.setMatchedAmount(totalAmount); + // 开票单位(销方名称) vo.setSalerName(poolInvoice.getSalerName()); + // 受票单位(购方名称) vo.setBuyerName(poolInvoice.getBuyerName()); + // 附件信息JSON:path 供 A801-2 进项发票下载,文件名以发票号码命名 Map attachment = new LinkedHashMap<>(); attachment.put("source", "piaozone"); attachment.put("path", poolInvoice.getDownloadUrl());