feat(energy): 电能统计切到 bi_ele_charge_record,外部数据接通
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

- /api/energy/electric/overview & /electric/monthly 不再读 tab_energy_electricity_bill
- 改读 bi_ele_charge_record:kwh/fee/start_time
- 外部/我司用 vehicle_kind 区分(external/internal)
- 电能默认 customer 由 'external' 改 'lingniu',与导入页约定一致
- ElectricDaily 移除「数据对接中…」友好空状态(外部已有数据)

ele 导入页同步收紧:
- 命中系统车辆=internal,未命中(含车牌为空)一律 external
- 移除 unknown 分类、KPI 卡、批次列、过滤按钮、UploadResult 字段
- 历史 unknown 行已 UPDATE 为 external

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
kkfluous
2026-04-29 19:11:52 +08:00
parent 5217e19b25
commit d1d79f1c7c
4 changed files with 55 additions and 93 deletions

View File

@@ -1,5 +1,5 @@
import { useEffect, useState } from 'react';
import { ChevronRight, Plug } from 'lucide-react';
import { ChevronRight } from 'lucide-react';
import { motion, AnimatePresence } from 'motion/react';
import TrendBadge from './TrendBadge';
import { fetchElectricMonthly } from './api';
@@ -48,27 +48,7 @@ export default function ElectricDaily() {
))}
</div>
{/* 外部数据对接中 友好空状态 */}
{customer === 'external' && months !== null && months.length === 0 && (
<motion.div
initial={{ opacity: 0, y: 8 }}
animate={{ opacity: 1, y: 0 }}
className="bg-white rounded-2xl border border-slate-100 shadow-sm px-6 py-12 flex flex-col items-center text-center"
>
<div className="w-14 h-14 rounded-2xl bg-blue-50 flex items-center justify-center mb-3 relative">
<Plug size={22} className="text-blue-500" />
<span className="absolute -top-0.5 -right-0.5 w-3 h-3 rounded-full bg-blue-400 animate-ping" />
<span className="absolute -top-0.5 -right-0.5 w-3 h-3 rounded-full bg-blue-500" />
</div>
<div className="text-sm font-bold text-slate-700 mb-1"></div>
<div className="text-[11px] text-slate-400 max-w-[260px] leading-relaxed">
线
</div>
</motion.div>
)}
{/* 月份分组表 */}
{!(customer === 'external' && months !== null && months.length === 0) && (
<div className="bg-white rounded-2xl border border-slate-100 shadow-sm overflow-hidden">
<div className="grid grid-cols-[1fr_auto_auto_auto] md:grid-cols-[1fr_120px_140px_120px] gap-2 px-3 py-2 bg-slate-50 text-[11px] font-bold text-slate-500">
<span> / </span>
@@ -142,7 +122,6 @@ export default function ElectricDaily() {
);
})}
</div>
)}
</div>
);
}