fix(energy): 氢能单价不再加权,混合价组显示「—」并修复 hydrogen_time 歧义
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
- pricePerKg 改为 CASE WHEN MIN=MAX THEN MIN ELSE NULL,
同价组返回原价(无小数误读),混合价组返回 null
- 类型 HydrogenStationRow.pricePerKg: number | null
- 前端 mobile/desktop 两处展示在 null 时显示「—」
- 修复 ER_NON_UNIQ_ERROR:tab_import_hydrogen_order 也有 hydrogen_time 字段,
把 SELECT/ORDER BY 中 ${HYDROGEN_LOCAL} 替换为显式 b.hydrogen_time 限定
- 实测:712 个站点-日组中 682 个同价直接显示原价,30 个混合显示「—」
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -197,9 +197,9 @@ export default function HydrogenDaily() {
|
||||
>
|
||||
<span className="text-[12px] text-slate-600 truncate">
|
||||
{s.name}
|
||||
<span className="md:hidden text-slate-400 text-[10px]"> · {s.pricePerKg}</span>
|
||||
<span className="md:hidden text-slate-400 text-[10px]"> · {s.pricePerKg == null ? '—' : s.pricePerKg}</span>
|
||||
</span>
|
||||
<span className="hidden md:block text-right text-[12px] text-slate-500 font-bold tabular-nums">{s.pricePerKg}</span>
|
||||
<span className="hidden md:block text-right text-[12px] text-slate-500 font-bold tabular-nums">{s.pricePerKg == null ? '—' : s.pricePerKg}</span>
|
||||
<span className="text-right text-[12px] text-slate-700 font-bold tabular-nums">
|
||||
{s.kg.toLocaleString('zh-CN', { maximumFractionDigits: 2 })}
|
||||
</span>
|
||||
|
||||
@@ -31,7 +31,7 @@ export interface HydrogenRegionShare {
|
||||
|
||||
export interface HydrogenStationRow {
|
||||
name: string;
|
||||
pricePerKg: number;
|
||||
pricePerKg: number | null;
|
||||
kg: number;
|
||||
chainPct: number;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user