Commit Graph

66 Commits

Author SHA1 Message Date
kkfluous
cab26a207a fix: 部门统计未分配部门改为显示"公务车",排序放最后
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 19:51:21 +08:00
kkfluous
93a6c7df1c fix: 对齐原型UI差异、修复所有下钻维度、统一弹窗详情表格
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
- 部门Tab:移除多余section header,标签改为总运营车辆/出勤/闲置,
  表格移除日均里程列,按业务负责人改为按业务员,所有行加点击下钻
- 部门下钻增加department维度,后端/list接口新增department过滤参数
- 区域Tab:总资产下钻移除错误的category:Operating,库存改为Inventory,
  补全source:region和title,图表高度h-72改h-64
- 客户Tab:4.5T/冷链点击增加isColdChain区分,移动端合计badge加下钻,
  所有点击补全title
- 筛选面板:移除区域和客户的"完成筛选"按钮
- 所有manager下钻补全title字段
- 弹窗统一使用14列完整详情表格(月/部门/负责人/品牌/车型/归属/客户/
  车牌/状态/提车时间/到期时间/区域/离到期/签约公司),移除source条件
- 表格加whitespace-nowrap和w-max,移动端水平滚动不换行

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 19:33:44 +08:00
kkfluous
f6a4884ad1 fix: category=Inventory包含Abnormal状态,与统计口径一致
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 18:49:06 +08:00
kkfluous
e7ef773bc8 fix: 新增下钻支持、移动端库存区域下钻加category:Inventory
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 18:46:57 +08:00
kkfluous
dd01671d9e fix: 区域运营移动端数据、下钻支持城市/车型、网页标题
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
- 移动端区域运营改用regionData真实数据(去掉Math.floor模拟)
- 区域/城市/车型行数字全部支持点击下钻
- 后端/list支持按车型大类过滤(如4.5T含普货+冷链)
- 网页标题改为"羚牛氢能车辆资产"

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 18:28:46 +08:00
kkfluous
2ba25427de feat: tab导航、recharts图表、库存统计、出勤率里程、区域城市下钻、数据一致性修复
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
- 新增tab导航(总览/按部门/按区域/按客户)+ 移动端底部导航
- 新增recharts柱状图(区域分布)和饼图(客户分布)
- 新增库存统计模块(按区域/按车型,筛选面板)
- 对接ln_vehicle_day_mileage表实现出勤率和日均里程
- 区域运营支持区域→城市→车型三级下钻
- 修复ownership取字段错误(改用truck_rent_status)
- 修复部门统计闲置定义(当日无行驶里程)
- 修复区域图表"其他"重复问题(后端Top N合并)
- 修复城市名空值降级(resolveCity取province)
- 修复下钻数据不一致(统一category/vehicleType参数)
- 扩展/list端点支持大区过滤和未分配匹配
- 所有筛选改为searchable datalist

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 18:09:18 +08:00
kkfluous
629451c13d feat: add inventory statistics section, adapt to latest prototype
- Add GET /api/vehicles/inventory-stats endpoint that groups inventory vehicles by macro-region, city, brand, type, model, and batch
- Add RegionalInventoryStats type and fetchInventoryStats API function
- Add full inventory statistics section with region/model tabs, filters, desktop table, and mobile views
- Add modal filters (plate number, model, brand, location search) to vehicle detail modal
- Update modal header to support title field for contextual naming

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 16:24:39 +08:00
kkfluous
d6ac1044fe fix: replace modal with prototype version, extend /list API fields
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 15:28:12 +08:00
kkfluous
73d5afde5c feat: add dept/region/customer stats APIs and extend /list filters
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 18:13:44 +08:00
kkfluous
9a7382101b feat: 库存弹窗展示车牌号及省市信息
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 15:39:10 +08:00
kkfluous
e4ffd027be fix: 库存总数包含异动车辆,总计行改为累加计算
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
- getStats 的 inventory 统计包含 Inventory + Abnormal
- 总计行所有列改为从各车型数据累加,不再使用 SUMMARY

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 15:11:12 +08:00
kkfluous
363399faed fix: 修正总库存计算,区分在库/待交车/异动状态
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
- 总库存 = 在库 + 异动(不含待交车)
- 待交车独立展示
- 库 = 纯在库数量
- 异 = 异动数量
- 验证: 运营 + 库存 + 待交 = 总资产

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 15:03:44 +08:00
kkfluous
0b2e2f23b5 fix: 修复bigint精度丢失导致交还替换数据膨胀
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
truck ID 为 MySQL bigint,JavaScript Number 精度不够导致
不同 ID 被截断为相同值造成误匹配。改用 CAST AS CHAR +
字符串 Set 比较。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 14:50:22 +08:00
kkfluous
23fa3e1531 feat: 资产汇总表按品牌型号展示交车/还车/替换/待交车数据
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 14:47:06 +08:00
kkfluous
2d2c684d8a fix: 简化周统计SQL去掉子查询,添加debug接口
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 14:42:34 +08:00
kkfluous
0cc5024132 feat: 羚牛 BI 报表服务初始版本
All checks were successful
ci/woodpecker/manual/woodpecker Pipeline was successful
- Hono + TypeScript 后端,连接 MySQL 数据库
- React + Vite + Tailwind 前端
- 车辆资产实时汇总(按车型/品牌型号分组)
- 本周交车/还车/替换统计(关联业务单据)
- 车牌号详情弹窗
- Dockerfile + Woodpecker CI 流水线

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 14:02:49 +08:00