Commit Graph

24 Commits (4f04fec9e0e21f808c1b70073d759ae7c63255d3)

Author SHA1 Message Date
haoliang 4f04fec9e0 feat(后端): 新增三模块重构所需DTO 1 month ago
haoliang 2153a1fed9 修复累计总数(totalPartCount)显示异常+模拟器time_freeze功能
- Machine entity新增LastTotalPartCount字段映射DB last_total_part_count列
- MachineStatusResponse DTO新增TotalPartCount属性
- MachineRepository SelectColumns新增last_total_part_count列映射
- MachineService.GetStatus填充TotalPartCount值
- 模拟器新增time_freeze/time_unfreeze事件支持(DeviceState/DeviceSimulator/FanucDataGenerator)
1 month ago
haoliang 689f0b1798 修复告警中心4个Bug:时间显示0001-01-01、统计卡片全0、新增告警类型无标签、机床下拉为空
1. AlertRepository SQL缺少列别名致Dapper无法映射created_at→CreatedAt
2. AlertStatisticsResponse返回嵌套unresolvedByType,前端期望扁平collectFail等
3. AlertPage缺少production_error/summary_error的中文标签映射
4. 机床下拉模板用m.id/m.name,API返回value/label格式不匹配
1 month ago
haoliang 711149199b 修复采集服务心跳service_id不匹配+机床在线判断简化为20秒+Ping 4次取平均延迟 2 months ago
haoliang 1600570b60 仪表盘优化:修复采集服务状态判断、去掉切削总时、数字保留两位小数、产量排行增加排序和TOP N 2 months ago
haoliang 0563da73e8 feat: 品牌字段映射增加启用/禁用开关(is_enabled);前端增加开关列和行样式;新增6个Repository测试+6个Service/Controller测试;迁移脚本幂等执行 2 months ago
haoliang c9cca32757 实现 D1-D2 数据回放:新增 ReplayService、ReplayController、ReplayDto,DI 注册,API 端点,预览与执行回放逻辑,基于现有 SQL 迁移。 2 months ago
haoliang e3f37d5433 feat: 实现采集分析引擎(AnalysisEngine)+ 后台管理API + 前端设计文档
- 新增 log_collect_analysis + log_collect_cycle 两张按月分区表DDL
- 完整实现 AnalysisEngine:9种分析类型检测、DB写入、异常告警联动
- 修改 CollectRecordWriter.WriteBatch 返回 rawLogId
- 集成 AnalysisEngine 到 CollectWorker 采集主流程
- 新增 CollectLogController 5个API端点(分析查询/详情/周期/原始日志)
- 新增 Entity/Enum/DTO/Repository/Service 全链路代码
- 修复子代理创建的文件:DTO命名空间、Repository方法名、SQL列映射、using引用
- 新增13-采集日志前端设计文档(索引+规范+页面)
- 全部5个主项目编译通过,0错误
2 months ago
haoliang 7354ae1641 修复仪表盘6个数据问题+补充测试规范图表维度
1. 最新告警:修复createdAt映射(snake_case→PascalCase),补齐alertType/machineName/title/isResolved字段
2. 机床状态分布:从原始group-by改为返回{online,offline,disabled}结构
3. 产量趋势:Controller包装为{items:[]}格式
4. 机床排行:补齐rank/program/status字段
5. 工人排行:补齐rank/machineCount/totalQuantity字段
6. 测试规范:新增维度3.1图表验证,扩展仪表盘速查表维度覆盖(1,2,3,3.1,5,6,9,12,17,20),新增反模式第14条
2 months ago
haoliang de5e636fdc 修复产量报表:下拉框字段映射、汇总卡片数值、表格运行时间/切削时间 2 months ago
haoliang 667e215322 修复产量报表字段映射:添加前端兼容字段(date/quantity/runTime/cuttingTime/dataStatus),产量列直接显示数值 2 months ago
haoliang ee0b5da1c1 产量报表改为混合查询:已汇总用daily_production,未汇总从segment实时计算;默认日期改为今天;参数名统一为startDate/endDate 2 months ago
haoliang b76f1acc55 新增三模块批量删除API+采集地址启用停用+安装测试脚本 2 months ago
haoliang 74b611d6e1 采集地址关联机床改为穿梭框:后端DTO加MachineIds+SetCollectAddress,前端el-transfer替换checkbox 2 months ago
haoliang f865de2a9a 修复员工机床绑定保存失败:DTO增加MachineIds字段,Service Create/Update增加绑定逻辑 2 months ago
haoliang 71f8e7fbc7 修复机床排行machineId缺失+清理gitignore(移除publish/tools/dll/测试报告) 2 months ago
haoliang 3e7c34c52f 修复设备详情关联名称为空(Bug6)+布尔字段类型(Bug7)+异常过滤器生产模式 2 months ago
haoliang 126cecfa09 补齐产量报表2个端点(adjustment-history/export占位)+修复前端API路径参数 + 新增DTO + Repository方法 2 months ago
haoliang 1168b3c4ac 补齐员工管理4个端点(machines/production-today/production-trend/available-machines)+修复前端详情页API路径参数 + 新增4个DTO 2 months ago
haoliang 6fb571f565 补齐采集地址3个详情子端点(machines/collect-records/raw-json)+修复前端详情页API路径参数 + 新增3个DTO + DI注册 2 months ago
haoliang dfc18fabb5 设备管理联调:修复brandId缺失、batchToggle改逐个toggle、详情页添加4个子API端点
- 前端:新增/编辑机床时传递brandId字段
- 前端:启停切换改为逐个调用PUT /admin/machine/{id}/toggle
- 前端:详情页API调用从query参数改为RESTful路径参数
- 后端:新增4个详情页API(status/production-today/production-trend/collect-records)
- 后端:新增3个DTO(MachineTodayProdItem/MachineTrendItem/MachineCollectRecordItem)
- 后端:更新MachineStatusResponse字段以匹配前端展示需求
2 months 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替换为强类型
2 months ago
haoliang 7686930525 feat(models): CncModels完整实现 - 10枚举+20实体+62DTO,编译通过0错误0警告
- Enum: AlertType/CollectStatus/DataStatus/CardType/DataType/MatchBy/SegmentCloseReason/CollectorServiceStatus/LogLevel/ValueType
- Entity: 20张表完整映射(Workshop/Brand/Machine/Worker/CollectRecord/DailyProduction/Alert/SysConfig/ScreenConfig等)
- DTO: 13模块请求响应类(Login/Dashboard/Machine/Brand/CollectAddress/Worker/Production/Alert/Settings/Log/ScreenConfig/Screen/Common)
- Constants: TableName(20张表名) + SensitiveConfigKey(3个敏感键) + ErrorCode(6个错误码)
- 基础类: ApiResponse/PagedResult/PagedQuery
2 months ago
haoliang 0ba5cede73 feat: 搭建VS2017解决方案骨架(8项目+前端文件夹),编译通过0错误
- CncDataSystem.sln: 4层源码项目 + 4测试项目 + frontend解决方案文件夹
- CncModels: ApiResponse/PagedResult/PagedQuery/ErrorCode 基础类
- CncRepository: BaseRepository 双库连接管理(BusinessRepository/LogRepository)
- CncService: BusinessException 业务异常基类
- CncWebApi: WebApiConfig路由配置/GlobalExceptionFilter/HealthController/Web.config
- 测试项目: xUnit + Moq + Microsoft.NET.Test.Sdk
- NuGet: Dapper + MySqlConnector + Newtonsoft.Json + log4net + JWT
- 编译: dotnet build 8项目全部通过
2 months ago