📝 toInvoicePoolVO 字段映射补充备注
This commit is contained in:
+12
@@ -1437,20 +1437,32 @@ public class FormalSettlementServiceImpl extends BaseServiceImpl<FormalSettlemen
|
||||
return page;
|
||||
}
|
||||
|
||||
/**
|
||||
* A801-1 全票池发票 -> 正式结算单认领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<String, Object> attachment = new LinkedHashMap<>();
|
||||
attachment.put("source", "piaozone");
|
||||
attachment.put("path", poolInvoice.getDownloadUrl());
|
||||
|
||||
Reference in New Issue
Block a user