fix(energy): 待核对上线期初改为 2026-01-01,并统一前后端口径
待核对订单的起算日原先硬编码为 2026-05-01,散落在后端 SQL、看板诊断卡 和下钻提示三处,改一处就会与另两处口径不一致。 - 新增 shared/hydrogen-verify.ts 的 HYDROGEN_VERIFY_START_DATE 作为唯一来源 - repository 的 unverified 过滤条件改为引用该常量,起算日提前到 2026-01-01 - 看板桌面/移动诊断卡与待核对下钻提示同步显示新日期 - 契约测试锁定字面量,防止日期被无意改动 仅影响 verifyScope=unverified;all / verified 口径不变。
This commit is contained in:
@@ -21,6 +21,7 @@ import {
|
||||
Zap,
|
||||
} from 'lucide-react';
|
||||
import { exportAoaSheet } from '../../../../shared/xlsx';
|
||||
import { HYDROGEN_VERIFY_START_DATE } from '../../../../shared/hydrogen-verify';
|
||||
import { MobileListFullscreenButton } from '../common/MobileListFullscreenButton';
|
||||
import {
|
||||
SOURCE_LABEL,
|
||||
@@ -2136,7 +2137,7 @@ export const EnergyBiBoardApp: React.FC = () => {
|
||||
<button type="button" className="ehb-diagnosis__item is-action" onClick={() => setKpiDrillType('待核对订单')} title="查看待核对订单">
|
||||
<span>待核对订单</span>
|
||||
<strong className={risk.count > 0 ? 'is-warning' : ''}>{risk.count}笔 · ¥{unverifiedWan}万</strong>
|
||||
<small>核对上线期初:2026-05-01(含)· 查看待核对订单</small>
|
||||
<small>核对上线期初:{HYDROGEN_VERIFY_START_DATE}(含)· 查看待核对订单</small>
|
||||
</button>
|
||||
</section>
|
||||
</div>
|
||||
@@ -2155,7 +2156,7 @@ export const EnergyBiBoardApp: React.FC = () => {
|
||||
<div><span>月度环比</span><strong className={liveMonthComparison && liveMonthComparison.value < 0 ? 'is-warning' : 'is-positive'}>{liveMonthComparison ? `${liveMonthComparison.value >= 0 ? '+' : ''}${liveMonthComparison.value.toFixed(1)}%` : '—'}</strong><small>{liveMonthComparison?.label ?? '暂无可比月份'}</small></div>
|
||||
<div><span>单公斤毛利</span><strong>¥{unitProfitYuan}<small>/kg</small></strong><small>按累计加氢量计算</small></div>
|
||||
<button type="button" className="ehb-mobile-diagnosis-action" onClick={() => setKpiDrillType('加氢站加氢量排名')}><span>头部站点占比</span><strong>{top5SharePct}%</strong><small>前5站占总量</small></button>
|
||||
<button type="button" className="ehb-mobile-diagnosis-action" onClick={() => setKpiDrillType('待核对订单')}><span>待核对订单</span><strong className={risk.count > 0 ? 'is-warning' : ''}>{risk.count}笔</strong><small>¥{unverifiedWan}万 · 上线期初 2026-05-01(含)</small></button>
|
||||
<button type="button" className="ehb-mobile-diagnosis-action" onClick={() => setKpiDrillType('待核对订单')}><span>待核对订单</span><strong className={risk.count > 0 ? 'is-warning' : ''}>{risk.count}笔</strong><small>¥{unverifiedWan}万 · 上线期初 {HYDROGEN_VERIFY_START_DATE}(含)</small></button>
|
||||
</div>
|
||||
</details>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user