From 0d6de6b34d78061c725be6523df69fc7cf44401b Mon Sep 17 00:00:00 2001
From: zhizhijie <zhizhijie@users.noreply.gitee.com>
Date: 星期二, 08 九月 2026 09:48:21 +0800
Subject: [PATCH] feat: 汇总大表数据驱动 M1-货运——新增 FreightCalc 计算服务(B1 口径)与 7 月回归测试报告
---
traffic-audit-server/src/main/java/com/trafficaudit/reportexport/calc/FreightCalc.java | 225 +++++++++++++++++++++++++++++++++++++++++++++
docs/功能测试报告/功能测试报告_M1-货运取数链路与7月回归_2026-09-08.md | 41 ++++++++
2 files changed, 266 insertions(+), 0 deletions(-)
diff --git "a/docs/\345\212\237\350\203\275\346\265\213\350\257\225\346\212\245\345\221\212/\345\212\237\350\203\275\346\265\213\350\257\225\346\212\245\345\221\212_M1-\350\264\247\350\277\220\345\217\226\346\225\260\351\223\276\350\267\257\344\270\2167\346\234\210\345\233\236\345\275\222_2026-09-08.md" "b/docs/\345\212\237\350\203\275\346\265\213\350\257\225\346\212\245\345\221\212/\345\212\237\350\203\275\346\265\213\350\257\225\346\212\245\345\221\212_M1-\350\264\247\350\277\220\345\217\226\346\225\260\351\223\276\350\267\257\344\270\2167\346\234\210\345\233\236\345\275\222_2026-09-08.md"
new file mode 100644
index 0000000..e4e4202
--- /dev/null
+++ "b/docs/\345\212\237\350\203\275\346\265\213\350\257\225\346\212\245\345\221\212/\345\212\237\350\203\275\346\265\213\350\257\225\346\212\245\345\221\212_M1-\350\264\247\350\277\220\345\217\226\346\225\260\351\223\276\350\267\257\344\270\2167\346\234\210\345\233\236\345\275\222_2026-09-08.md"
@@ -0,0 +1,41 @@
+# 鍔熻兘娴嬭瘯鎶ュ憡锛歁1-璐ц繍 鍙栨暟閾捐矾鏍稿涓� 7 鏈堝洖褰掞紙2026-09-08锛�
+
+## 涓�銆佸姛鑳借鏄�
+姹囨�诲ぇ琛ㄦ暟鎹┍鍔ㄦ敼閫� M1 绗竴鍧楋細鎶娾�滆揣杩愬彛寰勨�濓紙瑙勪笂/瑙勪笅/鍚堣 脳 璐ц繍閲�/鍛ㄨ浆閲� 脳 褰撴湀/绱锛夊浐鍖栦负鍙鐢ㄧ殑 Java 璁$畻鏈嶅姟 `FreightCalc`锛坄traffic-audit-server/.../reportexport/calc/FreightCalc.java`锛夛紝骞堕獙璇侊細**浠呭嚟鏁版嵁搴撳嵆鍙噸绠楀嚭 7 鏈堝凡淇姣嶇増涓揣杩愰噺鎺掑悕銆佽揣杩愬懆杞噺鎺掑悕涓ゅ紶鎴愬搧椤电殑鍏ㄩ儴瑙勪笂/瑙勪笅鏁板�硷紙閫愭牸 diff=0锛�**锛屼负鍚庣画 SummaryFiller 鍐欏洖姣嶇増鎻愪緵鍚屾簮鐭╅樀銆�
+
+## 浜屻�佹祴璇曠幆澧�
+- 搴擄細`traffic_audit`锛�127.0.0.1:3308锛夛紝鏁版嵁 = 2026-07 宸插鍏ョ幇鐘讹紱
+- 姣嶇増鍩虹嚎锛歚docs/鐢熸垚姹囨�诲ぇ琛�/2026骞�7鏈堥亾璺繍杈撻噺姹囨�昏〃.xlsx`锛�2026-07 宸蹭慨姝g増锛夛紱
+- 宸ュ叿锛歮ysql CLI 鍙栨暟 + Python 閲嶇畻姣斿锛涘悗绔� `mvn -q compile` 閫氳繃锛坋xit=0锛夈��
+
+## 涓夈�佸彇鏁板彛寰勶紙涓庢棦鏈� exportFreightRank/exportTurnoverRank 鍙婄‘璁ゅ洖鎵� B1 涓�鑷达級
+| 鎸囨爣 | 鏉ユ簮 |
+|---|---|
+| 瑙勪笂璐ц繍閲忥紙褰撴湀/绱锛屼竾鍚級 | `h2032_enterprise_monthly.freight_total`锛堝惃锛夋寜甯傚窞姹囨�� 梅10000 |
+| 鍚堣璐ц繍閲忥紙涓囧惃锛� | `freight_turnover_import.freight_mMM`锛堝綋鏈堬級/ `freight_m01..mMM`锛堢疮璁★級 |
+| 瑙勪笅璐ц繍閲� | 鍚堣 鈭� 瑙勪笂锛堟媶鍒嗚〃涓嶅瓨璐ц繍閲忓垪锛屼笉鍙洿鎺ュ彇锛� |
+| 瑙勪笂/鍚堣鍛ㄨ浆閲� | `scale_split_transport` MONTH / CUMULATIVE 鐨� `above_scale_turnover` / `total_turnover` |
+| 瑙勪笅鍛ㄨ浆閲� | 鍚堣 鈭� 瑙勪笂锛堜笌鎷嗗垎琛� below 鍒楁牳瀵逛竴鑷达級 |
+| 婀栧寳鐪佽 | 17 甯傚窞涔嬪拰锛堜笌姣嶇増鈥滃叏鐪佽=危鍩庡競琛屸�濆叕寮忎竴鑷达級 |
+
+## 鍥涖�佺敤渚嬭〃
+| # | 鐢ㄤ緥 | 杈撳叆 | 棰勬湡 | 瀹為檯 | 缁撹 |
+|---|---|---|---|---|---|
+| 1 | 璐ц繍閲忔帓鍚嵚风疮璁★紙1-7鏈堬級 | 搴� 2026-01~07 | 涓庢瘝鐗� B4:B21锛堣涓婏級銆丟4:G21锛堣涓嬶級閫愭牸涓�鑷� | diff=0 | 閫氳繃 |
+| 2 | 璐ц繍閲忔帓鍚嵚峰綋鏈堬紙7鏈堬級 | 搴� 2026-07 | 涓庢瘝鐗� B25:B42銆丟25:G42 閫愭牸涓�鑷� | diff=0 | 閫氳繃 |
+| 3 | 璐ц繍鍛ㄨ浆閲忔帓鍚嵚风疮璁� | scale_split CUMULATIVE | 涓庢瘝鐗� B5:B22銆丟5:G22 涓�鑷� | diff=0 | 閫氳繃 |
+| 4 | 璐ц繍鍛ㄨ浆閲忔帓鍚嵚峰綋鏈� | scale_split MONTH | 涓庢瘝鐗� B27:B44銆丟27:G44 涓�鑷� | diff=0 | 閫氳繃 |
+| 5 | 鍏ㄧ渷琛屼笌 危 鍩庡競涓�鑷存�� | 17 甯傚窞姹傚拰 | 鍏ㄧ渷瑙勪笂褰撴湀=3754.7823锛堟瘝鐗堬級 | 璁�=3754.7823 | 閫氳繃 |
+| 6 | Java 缂栬瘧 | `mvn -q -DskipTests compile` | 鏃犻敊璇� | exit=0 | 閫氳繃 |
+
+## 浜斻�佸彂鐜扮殑闂涓庡缃�
+1. H2032 鎸� `region_code` 姹囨�绘椂瀛樺湪鈥滀竴甯傚鍖哄幙浠g爜鈥濓紝鍒濈増鑴氭湰璇敤瑕嗙洊鑰岄潪绱姞 鈫� 宸叉敼绱姞锛�0 宸紓銆�
+2. 绱鍚堣棣栫増鍙姞鍒� 6 鏈堬紙婕� m07锛夆啋 宸叉敼 1..7 鍏ㄥ姞锛�0 宸紓銆�
+3. `freight_turnover_import.region_name` 瀛樺湪鈥滄灄鍖�/绁炲啘鏋舵灄鍖�/澶╅棬/澶╅棬甯傗�濈瓑鍒悕 鈫� 缁熶竴缁� RegionUtil 鍒悕褰掍竴鍚庢瘮瀵癸紝0 宸紓銆�
+4. 鍛ㄨ浆閲忎袱椤靛湪浠讳綍鐗堟湰姣斿涓潎 0 宸紓锛堟媶鍒嗚〃鍙e緞绋冲畾锛夈��
+锛堜笂杩板潎涓哄洖褰掕剼鏈棶棰橈紝闈炰笟鍔″彛寰勯棶棰橈紱宸插湪 Python 鍥炲綊涓� Java 瀹炵幇涓悓姝ヤ慨姝c�傦級
+
+## 鍏�佺粨璁轰笌涓嬩竴姝�
+- 缁撹锛氳揣杩愬彛寰勯摼璺彲浠庡簱瀹屾暣澶嶇畻 7 鏈堟瘝鐗堬紝鍙e緞閿佸畾锛沗FreightCalc` 宸插叆搴撳苟閫氳繃缂栬瘧銆�
+- 璇存槑锛氬悓姣旀湭鍦ㄦ湰鏈嶅姟璁$畻鈥斺�旀寜 Q1 鐢卞啓鍥炲眰浠ユ瘝鐗堢紦瀛� 2025 鍙傜収缁勪负鍩哄噯锛堝幓骞村悓鏈� DB 鍒椾负绌猴紝宸叉牳瀵癸級銆�
+- 涓嬩竴姝ワ細鈶� M1-PaxCalc锛堝叕浜�/鍑虹/杞ㄩ亾杞浮/缃戠害/鐝嚎鍖呰溅/鍩庡競瀹㈣繍鍙e緞锛岀敤鍩庡競瀹㈣繍涓夎〃 7 鏈堝洖褰掞級锛涒憽 M1-MidCalc锛涒憿 M2 SummaryFiller 鍐欏洖鍙拌处+鎴愬搧椤靛苟閫愭牸 diff锛涒懀 8 鏈堝疄寮广��
diff --git a/traffic-audit-server/src/main/java/com/trafficaudit/reportexport/calc/FreightCalc.java b/traffic-audit-server/src/main/java/com/trafficaudit/reportexport/calc/FreightCalc.java
new file mode 100644
index 0000000..267ccf6
--- /dev/null
+++ b/traffic-audit-server/src/main/java/com/trafficaudit/reportexport/calc/FreightCalc.java
@@ -0,0 +1,225 @@
+package com.trafficaudit.reportexport.calc;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.trafficaudit.common.util.RegionUtil;
+import com.trafficaudit.dataimport.entity.FreightTurnoverImport;
+import com.trafficaudit.dataimport.entity.H2032EnterpriseMonthly;
+import com.trafficaudit.dataimport.entity.ScaleSplitTransport;
+import com.trafficaudit.dataimport.mapper.FreightTurnoverImportMapper;
+import com.trafficaudit.dataimport.mapper.H2032EnterpriseMonthlyMapper;
+import com.trafficaudit.dataimport.mapper.ScaleSplitTransportMapper;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 璐ц繍鍙e緞璁$畻鏈嶅姟锛堟眹鎬诲ぇ琛ㄦ暟鎹┍鍔ㄦ敼閫� M1-璐ц繍锛�2026-09-08锛夈��
+ *
+ * 鍙e緞锛堝喅绛栧熀绾� docs/纭鍥炴墽姹囨�烩�2026-09-07.md B1锛�2026-07 涓庡凡淇姣嶇増涓ゅ紶鎴愬搧椤�
+ * 瑙勪笂/瑙勪笅 褰撴湀+绱 閫愭牸鍥炲綊 0 宸紓锛夛細
+ * 1. 瑙勪笂璐ц繍閲� = h2032_enterprise_monthly.freight_total锛堝惃锛夋寜 17 甯傚窞姹囨�� 梅10000锛堜竾鍚級銆�
+ * 2. 鍚堣璐ц繍閲� = freight_turnover_import.freight_mMM锛堝綋鏈堬級/ freight_m01..mMM锛堢疮璁★級銆�
+ * 3. 瑙勪笅璐ц繍閲� = 鍚堣 鈭� 瑙勪笂锛堟媶鍒嗚〃涓嶅瓨璐ц繍閲忓垪锛屼笉鑳界洿鎺ュ彇瑙勪笅锛夈��
+ * 4. 瑙勪笂/鍚堣鍛ㄨ浆閲� = scale_split_transport MONTH|CUMULATIVE 鐨� above_scale_turnover / total_turnover
+ * 锛堝悎璁′笌 freight_turnover_import.turnover_mMM 鍚屾簮锛屽凡鏍稿涓�鑷达級锛涜涓嬪懆杞� = 鍚堣 鈭� 瑙勪笂銆�
+ * 5. 鍚屾瘮锛堝幓骞村悓鍙e緞锛変笉鍦ㄦ湰鏈嶅姟璁$畻锛氭寜 Q1 浠ユ瘝鐗堢紦瀛� 2025 鍙傜収缁勪负鍩哄噯锛岀敱鍐欏洖灞傚~琛ㄦ椂璁$畻銆�
+ *
+ * 杈撳嚭 key = RegionUtil 瑙勮寖甯傚窞鍚嶏紙姝︽眽甯傗�︾鍐滄灦鏋楀尯锛�+ PROVINCE锛堟箹鍖楃渷锛屽叏鐪佽 = 17 甯傚窞涔嬪拰锛�
+ * 涓庢瘝鐗堚�滃叏鐪佽=危鍩庡競琛屸�濆叕寮忎竴鑷达級銆�
+ */
+@Service
+public class FreightCalc {
+
+ public static final String PROVINCE = "婀栧寳鐪�";
+
+ /** 鍗曚釜鏈熼棿锛堝綋鏈堟垨绱锛夌殑璐ц繍閲�/鍛ㄨ浆閲忎笁鍙e緞鎸囨爣锛涙棤鏁版嵁涓� null */
+ public static class FreightMetrics {
+ private final Double aboveFreight; // 瑙勪笂璐ц繍閲忥紙涓囧惃锛�
+ private final Double belowFreight; // 瑙勪笅璐ц繍閲忥紙涓囧惃锛�
+ private final Double totalFreight; // 瑙勪笂+瑙勪笅璐ц繍閲忥紙涓囧惃锛�
+ private final Double aboveTurnover; // 瑙勪笂璐х墿鍛ㄨ浆閲忥紙涓囧惃鍏噷锛�
+ private final Double belowTurnover; // 瑙勪笅璐х墿鍛ㄨ浆閲忥紙涓囧惃鍏噷锛�
+ private final Double totalTurnover; // 瑙勪笂+瑙勪笅璐х墿鍛ㄨ浆閲忥紙涓囧惃鍏噷锛�
+
+ public FreightMetrics(Double aboveFreight, Double belowFreight, Double totalFreight,
+ Double aboveTurnover, Double belowTurnover, Double totalTurnover) {
+ this.aboveFreight = aboveFreight;
+ this.belowFreight = belowFreight;
+ this.totalFreight = totalFreight;
+ this.aboveTurnover = aboveTurnover;
+ this.belowTurnover = belowTurnover;
+ this.totalTurnover = totalTurnover;
+ }
+
+ public Double getAboveFreight() { return aboveFreight; }
+ public Double getBelowFreight() { return belowFreight; }
+ public Double getTotalFreight() { return totalFreight; }
+ public Double getAboveTurnover() { return aboveTurnover; }
+ public Double getBelowTurnover() { return belowTurnover; }
+ public Double getTotalTurnover() { return totalTurnover; }
+ }
+
+ /** 鍏ㄩ噺璐ц繍鐭╅樀锛歮onth=褰撴湀锛宑umulative=鎴嚦 period 鏈堢疮璁� */
+ public static class FreightMatrix {
+ private final String period;
+ private final Map<String, FreightMetrics> month;
+ private final Map<String, FreightMetrics> cumulative;
+
+ public FreightMatrix(String period, Map<String, FreightMetrics> month, Map<String, FreightMetrics> cumulative) {
+ this.period = period;
+ this.month = month;
+ this.cumulative = cumulative;
+ }
+
+ public String getPeriod() { return period; }
+ public Map<String, FreightMetrics> getMonth() { return month; }
+ public Map<String, FreightMetrics> getCumulative() { return cumulative; }
+ }
+
+ @Resource
+ private H2032EnterpriseMonthlyMapper h2032Mapper;
+ @Resource
+ private FreightTurnoverImportMapper freightTurnoverMapper;
+ @Resource
+ private ScaleSplitTransportMapper scaleSplitMapper;
+
+ /** 璁$畻 period锛堝 2026-07锛夌殑褰撴湀涓庣疮璁¤揣杩愮煩闃� */
+ public FreightMatrix calc(String period) {
+ int year = Integer.parseInt(period.substring(0, 4));
+ int month = Integer.parseInt(period.substring(5, 7));
+
+ // H2032 瑙勪笂璐ц繍閲忥紙鍚級锛氬競宸� -> 鏈堟《
+ Map<String, Map<Integer, Double>> h2032TonByCityMonth = new HashMap<>();
+ List<H2032EnterpriseMonthly> h2032List = h2032Mapper.selectList(
+ new LambdaQueryWrapper<H2032EnterpriseMonthly>().likeRight(H2032EnterpriseMonthly::getReportPeriod, year));
+ for (H2032EnterpriseMonthly rec : h2032List) {
+ String rp = rec.getReportPeriod();
+ if (rp == null || rp.compareTo(period) > 0) continue;
+ String city = RegionUtil.cityByCode(rec.getRegionCode());
+ if (city == null) continue;
+ double freight = rec.getFreightTotal() == null ? 0.0 : rec.getFreightTotal();
+ h2032TonByCityMonth.computeIfAbsent(city, k -> new HashMap<>())
+ .merge(Integer.parseInt(rp.substring(5, 7)), freight, Double::sum);
+ }
+
+ // freight_turnover_import锛氬悎璁¤揣杩愰噺/鍛ㄨ浆閲忥紙浠呭瓨鍩庡競琛岋紱婀栧寳鐪佽鐢辨眰鍜屽緱鍑猴級
+ Map<String, FreightTurnoverImport> ftMap = new HashMap<>();
+ for (FreightTurnoverImport e : freightTurnoverMapper.selectList(
+ new LambdaQueryWrapper<FreightTurnoverImport>()
+ .eq(FreightTurnoverImport::getReportPeriod, period))) {
+ String city = RegionUtil.normalizeCityName(e.getRegionName());
+ if (city != null && !PROVINCE.equals(city)) ftMap.put(city, e);
+ }
+
+ // scale_split_transport锛氳涓�/鍚堣鍛ㄨ浆閲�
+ Map<String, ScaleSplitTransport> splitMonth = new HashMap<>();
+ Map<String, ScaleSplitTransport> splitCumulative = new HashMap<>();
+ for (ScaleSplitTransport rec : scaleSplitMapper.selectList(
+ new LambdaQueryWrapper<ScaleSplitTransport>()
+ .eq(ScaleSplitTransport::getReportPeriod, period))) {
+ String city = RegionUtil.normalizeCityName(rec.getRegionName());
+ if (city == null || PROVINCE.equals(city)) continue;
+ if ("MONTH".equals(rec.getPeriodType())) splitMonth.put(city, rec);
+ else if ("CUMULATIVE".equals(rec.getPeriodType())) splitCumulative.put(city, rec);
+ }
+
+ Map<String, FreightMetrics> monthMap = new LinkedHashMap<>();
+ Map<String, FreightMetrics> cumulativeMap = new LinkedHashMap<>();
+ for (String city : RegionUtil.cityList()) {
+ monthMap.put(city, buildMetrics(city, month, h2032TonByCityMonth, ftMap, splitMonth, false));
+ cumulativeMap.put(city, buildMetrics(city, month, h2032TonByCityMonth, ftMap, splitCumulative, true));
+ }
+ monthMap.put(PROVINCE, sumOf(monthMap));
+ cumulativeMap.put(PROVINCE, sumOf(cumulativeMap));
+ return new FreightMatrix(period, monthMap, cumulativeMap);
+ }
+
+ /** 鍗曞煄甯傛寚鏍囥�俢umulative=true 鏃� H2032 鍙� 1..month 鍏ㄦ《銆佸悎璁″彇 m01..mMM 涔嬪拰锛沠alse 鏃跺彧鍙栧綋鏈堛�� */
+ private FreightMetrics buildMetrics(String city, int month,
+ Map<String, Map<Integer, Double>> h2032TonByCityMonth,
+ Map<String, FreightTurnoverImport> ftMap,
+ Map<String, ScaleSplitTransport> splitMap,
+ boolean cumulative) {
+ Double aboveFreight = null;
+ Map<Integer, Double> h2032Buckets = h2032TonByCityMonth.get(city);
+ if (h2032Buckets != null) {
+ double ton;
+ if (cumulative) {
+ ton = 0.0;
+ for (int m = 1; m <= month; m++) ton += h2032Buckets.getOrDefault(m, 0.0);
+ } else {
+ ton = h2032Buckets.getOrDefault(month, 0.0);
+ }
+ aboveFreight = ton / 10000.0;
+ }
+
+ FreightTurnoverImport ft = ftMap.get(city);
+ Double totalFreight = null;
+ Double totalTurnoverFromFt = null;
+ if (ft != null) {
+ if (cumulative) {
+ double f = 0.0, t = 0.0;
+ for (int m = 1; m <= month; m++) {
+ f += monthField(ft, m, true);
+ t += monthField(ft, m, false);
+ }
+ totalFreight = f;
+ totalTurnoverFromFt = t;
+ } else {
+ totalFreight = monthField(ft, month, true);
+ totalTurnoverFromFt = monthField(ft, month, false);
+ }
+ }
+
+ ScaleSplitTransport split = splitMap.get(city);
+ Double aboveTurnover = split == null ? null : split.getAboveScaleTurnover();
+ Double totalTurnover = split != null && split.getTotalTurnover() != null
+ ? split.getTotalTurnover() : totalTurnoverFromFt;
+
+ Double belowFreight = totalFreight == null || aboveFreight == null ? null : totalFreight - aboveFreight;
+ Double belowTurnover = totalTurnover == null ? null
+ : totalTurnover - (aboveTurnover == null ? 0.0 : aboveTurnover);
+ return new FreightMetrics(aboveFreight, belowFreight, totalFreight,
+ aboveTurnover, belowTurnover, totalTurnover);
+ }
+
+ /** 婀栧寳鐪佽 = 17 甯傚窞涔嬪拰锛堜笌姣嶇増鍏ㄧ渷琛� 危 鍏紡涓�鑷达紱鍏ㄥ競宸炴棤鏁版嵁鏃惰緭鍑� 0锛� */
+ private FreightMetrics sumOf(Map<String, FreightMetrics> byCity) {
+ double af = 0.0, bf = 0.0, tf = 0.0, at = 0.0, bt = 0.0, tt = 0.0;
+ for (String city : RegionUtil.cityList()) {
+ FreightMetrics m = byCity.get(city);
+ if (m == null) continue;
+ af += nz(m.getAboveFreight());
+ bf += nz(m.getBelowFreight());
+ tf += nz(m.getTotalFreight());
+ at += nz(m.getAboveTurnover());
+ bt += nz(m.getBelowTurnover());
+ tt += nz(m.getTotalTurnover());
+ }
+ return new FreightMetrics(af, bf, tf, at, bt, tt);
+ }
+
+ private double monthField(FreightTurnoverImport e, int m, boolean freight) {
+ switch (m) {
+ case 1: return freight ? nz(e.getFreightM01()) : nz(e.getTurnoverM01());
+ case 2: return freight ? nz(e.getFreightM02()) : nz(e.getTurnoverM02());
+ case 3: return freight ? nz(e.getFreightM03()) : nz(e.getTurnoverM03());
+ case 4: return freight ? nz(e.getFreightM04()) : nz(e.getTurnoverM04());
+ case 5: return freight ? nz(e.getFreightM05()) : nz(e.getTurnoverM05());
+ case 6: return freight ? nz(e.getFreightM06()) : nz(e.getTurnoverM06());
+ case 7: return freight ? nz(e.getFreightM07()) : nz(e.getTurnoverM07());
+ case 8: return freight ? nz(e.getFreightM08()) : nz(e.getTurnoverM08());
+ case 9: return freight ? nz(e.getFreightM09()) : nz(e.getTurnoverM09());
+ case 10: return freight ? nz(e.getFreightM10()) : nz(e.getTurnoverM10());
+ case 11: return freight ? nz(e.getFreightM11()) : nz(e.getTurnoverM11());
+ case 12: return freight ? nz(e.getFreightM12()) : nz(e.getTurnoverM12());
+ default: return 0.0;
+ }
+ }
+
+ private double nz(Double v) { return v == null ? 0.0 : v; }
+}
--
Gitblit v1.9.1