Commit Graph

8 Commits (724183997ba56a62538603a753d181080ea795fe)

Author SHA1 Message Date
haoliang 711149199b 修复采集服务心跳service_id不匹配+机床在线判断简化为20秒+Ping 4次取平均延迟 3 hours ago
haoliang ccdfec31bb feat: 在线状态改为基于last_ping_time实时判断,删除is_online列;新增online_timeout配置项(默认300秒);全链路修改Repository/Service/Collector/测试 10 hours ago
haoliang cb3a6071bd 修复管理后台4个Bug + 改进Ping逻辑
Bug1(告警中心分页不工作): AlertPage.vue添加watch监听page.page和page.pageSize变化触发loadData

Bug2(仪表盘按钮报错): DashboardPage.vue为刷新配置/停止采集/启动采集添加ElMessage成功提示,导入ElMessage

Bug3(设备详情页数据不对): MachineService四个方法从返回空数据改为查询实际数据
- GetStatus: 从Machine entity的last_*字段获取实时状态
- GetTodayProduction: 从cnc_daily_production或cnc_production_segment查今日产量
- GetProductionTrend: 从cnc_daily_production或segment查7天趋势
- GetCollectRecords: 从cnc_collect_record查最近20条采集记录
- IMachineRepository新增4个方法声明,MachineRepository实现SQL查询

Bug4(产量报表员工筛选不正确):
- DailyProductionRepository.GetList添加WorkerId过滤(通过cnc_worker_machine关联表)
- ProductionController.GetSummary扩展参数接受startDate/endDate/machineId/workerId
- IProductionService/ProductionService.GetSummary签名同步更新

Ping逻辑改进: CollectWorker从Ping采集URL主机改为Ping每台机床IP地址
- 新增PingAllMachines()并行Ping所有机床IP,逐台更新在线状态
- 新增PingHost()执行单次ICMP Ping(超时2秒)
- 移除旧的PingAddress()(Ping URL主机)和UpdateMachineOnlineStatus()(批量更新)
4 days ago
haoliang b76f1acc55 新增三模块批量删除API+采集地址启用停用+安装测试脚本 5 days ago
haoliang 74b611d6e1 采集地址关联机床改为穿梭框:后端DTO加MachineIds+SetCollectAddress,前端el-transfer替换checkbox 1 week ago
haoliang 3e7c34c52f 修复设备详情关联名称为空(Bug6)+布尔字段类型(Bug7)+异常过滤器生产模式 1 week ago
haoliang 3a1912f4a1 修复所有Repository SQL列名为snake_case,新增CncRepository.Tests(37个测试全部通过)
- 修复20个Repository文件中SQL列名从PascalCase改为snake_case匹配数据库
- 新增TestDb.cs测试辅助类(DELETE+重置自增+种子数据)
- 新增5个测试类(Alert/Brand/Machine/SysConfig/Workshop)共37个测试
- 添加[Collection(Database)]串行执行避免并行竞争
- 解决TRUNCATE外键约束问题改用DELETE FROM
1 week ago
haoliang fc7d350c3d feat(repository): CncRepository完整实现 - 20接口+16实现,编译通过
- Interface: 20个仓储接口(ISysConfig/IWorkshop/IBrand/IBrandFieldMapping/ICollectAddress/IMachine/IWorker/IWorkerMachine/IDailyProduction/IProductionSegment/IMachineDailyStatus/IWorkerDailySummary/IProductionAdjustment/IAlert/IScreenConfig/IScreenFilter/ICollectRaw/ISystemLog/ICollectorHeartbeat/IDashboard)
- Impl: 16个仓储实现(BusinessRepository子类+LogRepository子类)
- 包含: 基础CRUD/分页查询/多表JOIN/统计聚合/仪表盘查询
- 修复: AlertRepository继承修正(BusinessRepository)/dynamic替换为强类型
1 week ago