Commit Graph

5 Commits (be8d8c323e675987c830a6c8f12c019f268998fe)

Author SHA1 Message Date
haoliang be8d8c323e 产量报表后端:支持机床多选、程序名多值、跨页面联动MachineIds/ProgramNames字段 1 month ago
haoliang 56f00f4558 新增产量报表三维度API端点(机床/员工/程序各含summary+list),从cnc_production_segment实时计算 1 month 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()(批量更新)
2 months ago
haoliang 126cecfa09 补齐产量报表2个端点(adjustment-history/export占位)+修复前端API路径参数 + 新增DTO + Repository方法 2 months ago
haoliang 03aaeb11c2 feat(webapi): CncWebApi完整实现 - 13控制器+DI+JWT认证,编译通过
- Controllers: 13个API控制器(Auth/Dashboard/Machine/Brand/CollectAddress/Worker/Production/Alert/Settings/Log/ScreenConfig/Screen/Option)
- Infrastructure: ServiceResolver(手动DI)+JwtAuthFilter(HMACSHA256签名验证)
- 路由: 属性路由覆盖,管理后台/api/admin/**+大屏/api/screen/**
- 认证: JwtAuthFilter标记admin接口,ScreenController免认证
- DI: WebApiConfig注册ServiceResolver,手动解析Repository+Service依赖链
- WorkshopRepository: 从CncRepository.Impl移入CncRepository/Impl统一管理
2 months ago