空运出单优先用 departureCharges 明细,避免 fee_lines 把单价当金额。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
linmianxun
2026-09-22 18:00:34 +08:00
co-authored by Cursor
parent 3a07dba2fb
commit e769eb9c1d
@@ -865,10 +865,11 @@ public class InquiryQuoteTemplateServiceImpl extends ServiceImpl<InquiryQuoteTem
if (rows.isEmpty()) { if (rows.isEmpty()) {
rows = QuoteTemplateExcelSupport.parseFeeRows(q.get("fee_rows")); rows = QuoteTemplateExcelSupport.parseFeeRows(q.get("fee_rows"));
} }
// 空运:已落库 quote 常只有一条 fee_lines,完整明细在 airOptions.departureCharges // 空运:已落库 quote 常只有一条 fee_lines,完整明细在 airOptions.departureCharges。
// 行数相同也优先 departureCharges(fee_lines 常把单价误当金额,缺单位)。
JSONArray fromAir = QuoteTemplateExcelSupport.parseAirDepartureChargeRows( JSONArray fromAir = QuoteTemplateExcelSupport.parseAirDepartureChargeRows(
q.get("airOptions"), q.get("air_options"), chargeable, currency); q.get("airOptions"), q.get("air_options"), chargeable, currency);
if (!fromAir.isEmpty() && (rows.isEmpty() || rows.size() < fromAir.size())) { if (!fromAir.isEmpty()) {
rows = fromAir; rows = fromAir;
} }
if (rows.isEmpty()) { if (rows.isEmpty()) {