From 4f04fec9e0e21f808c1b70073d759ae7c63255d3 Mon Sep 17 00:00:00 2001 From: haoliang <821644@qq.com> Date: Wed, 13 May 2026 12:01:01 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E5=90=8E=E7=AB=AF):=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E4=B8=89=E6=A8=A1=E5=9D=97=E9=87=8D=E6=9E=84=E6=89=80=E9=9C=80?= =?UTF-8?q?DTO?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dto/Dashboard/ProgramDistributionItem.cs | 17 ++++++++++++++ .../Dto/Dashboard/ProgramRankItem.cs | 20 +++++++++++++++++ .../Dto/Machine/CollectRecordQueryRequest.cs | 22 +++++++++++++++++++ .../Dto/Machine/MachineLatestTagItem.cs | 22 +++++++++++++++++++ .../MachineProductionSummaryResponse.cs | 20 +++++++++++++++++ .../ProgramProductionSummaryResponse.cs | 20 +++++++++++++++++ .../WorkerProductionSummaryResponse.cs | 20 +++++++++++++++++ 7 files changed, 141 insertions(+) create mode 100644 src/CncModels/Dto/Dashboard/ProgramDistributionItem.cs create mode 100644 src/CncModels/Dto/Dashboard/ProgramRankItem.cs create mode 100644 src/CncModels/Dto/Machine/CollectRecordQueryRequest.cs create mode 100644 src/CncModels/Dto/Machine/MachineLatestTagItem.cs create mode 100644 src/CncModels/Dto/Production/MachineProductionSummaryResponse.cs create mode 100644 src/CncModels/Dto/Production/ProgramProductionSummaryResponse.cs create mode 100644 src/CncModels/Dto/Production/WorkerProductionSummaryResponse.cs diff --git a/src/CncModels/Dto/Dashboard/ProgramDistributionItem.cs b/src/CncModels/Dto/Dashboard/ProgramDistributionItem.cs new file mode 100644 index 0000000..825bbf7 --- /dev/null +++ b/src/CncModels/Dto/Dashboard/ProgramDistributionItem.cs @@ -0,0 +1,17 @@ +namespace CncModels.Dto.Dashboard +{ + /// + /// 程序产量分布项 + /// + public class ProgramDistributionItem + { + /// 程序名 + public string ProgramName { get; set; } + + /// 总产量 + public int TotalQuantity { get; set; } + + /// 产量占比(百分比) + public decimal Percentage { get; set; } + } +} diff --git a/src/CncModels/Dto/Dashboard/ProgramRankItem.cs b/src/CncModels/Dto/Dashboard/ProgramRankItem.cs new file mode 100644 index 0000000..8c5d065 --- /dev/null +++ b/src/CncModels/Dto/Dashboard/ProgramRankItem.cs @@ -0,0 +1,20 @@ +namespace CncModels.Dto.Dashboard +{ + /// + /// 程序排名项 + /// + public class ProgramRankItem + { + /// 排名 + public int Rank { get; set; } + + /// 程序名 + public string ProgramName { get; set; } + + /// 总产量 + public int TotalQuantity { get; set; } + + /// 涉及机床数 + public int MachineCount { get; set; } + } +} diff --git a/src/CncModels/Dto/Machine/CollectRecordQueryRequest.cs b/src/CncModels/Dto/Machine/CollectRecordQueryRequest.cs new file mode 100644 index 0000000..1721b66 --- /dev/null +++ b/src/CncModels/Dto/Machine/CollectRecordQueryRequest.cs @@ -0,0 +1,22 @@ +using System; + +namespace CncModels.Dto.Machine +{ + /// + /// 采集记录查询请求 + /// + public class CollectRecordQueryRequest + { + /// 机床ID + public int MachineId { get; set; } + + /// 筛选日期,默认今天 + public DateTime? Date { get; set; } + + /// 页码 + public int Page { get; set; } = 1; + + /// 每页数量 + public int PageSize { get; set; } = 20; + } +} diff --git a/src/CncModels/Dto/Machine/MachineLatestTagItem.cs b/src/CncModels/Dto/Machine/MachineLatestTagItem.cs new file mode 100644 index 0000000..a04a855 --- /dev/null +++ b/src/CncModels/Dto/Machine/MachineLatestTagItem.cs @@ -0,0 +1,22 @@ +using System; + +namespace CncModels.Dto.Machine +{ + /// + /// 机床最新Tag数据项 + /// + public class MachineLatestTagItem + { + /// Tag ID(如 _io_status, Tag5 等) + public string Id { get; set; } + + /// Tag 描述(如 设备状态、NC程序名) + public string Desc { get; set; } + + /// Tag 值 + public string Value { get; set; } + + /// 采集时间 + public DateTime? CollectTime { get; set; } + } +} diff --git a/src/CncModels/Dto/Production/MachineProductionSummaryResponse.cs b/src/CncModels/Dto/Production/MachineProductionSummaryResponse.cs new file mode 100644 index 0000000..94c3dfb --- /dev/null +++ b/src/CncModels/Dto/Production/MachineProductionSummaryResponse.cs @@ -0,0 +1,20 @@ +namespace CncModels.Dto.Production +{ + /// + /// 机床产量汇总响应 + /// + public class MachineProductionSummaryResponse + { + /// 总产量 + public int TotalQuantity { get; set; } + + /// 运行机床数 + public int RunningMachineCount { get; set; } + + /// 平均单机产量 + public decimal AvgPerMachine { get; set; } + + /// 最高单产机床 + public string TopMachineName { get; set; } + } +} diff --git a/src/CncModels/Dto/Production/ProgramProductionSummaryResponse.cs b/src/CncModels/Dto/Production/ProgramProductionSummaryResponse.cs new file mode 100644 index 0000000..3d10736 --- /dev/null +++ b/src/CncModels/Dto/Production/ProgramProductionSummaryResponse.cs @@ -0,0 +1,20 @@ +namespace CncModels.Dto.Production +{ + /// + /// 程序产量汇总响应 + /// + public class ProgramProductionSummaryResponse + { + /// 总产量 + public int TotalQuantity { get; set; } + + /// 运行程序数 + public int RunningProgramCount { get; set; } + + /// 平均单程序产量 + public decimal AvgPerProgram { get; set; } + + /// 最高产量程序 + public string TopProgramName { get; set; } + } +} diff --git a/src/CncModels/Dto/Production/WorkerProductionSummaryResponse.cs b/src/CncModels/Dto/Production/WorkerProductionSummaryResponse.cs new file mode 100644 index 0000000..3b3e390 --- /dev/null +++ b/src/CncModels/Dto/Production/WorkerProductionSummaryResponse.cs @@ -0,0 +1,20 @@ +namespace CncModels.Dto.Production +{ + /// + /// 员工产量汇总响应 + /// + public class WorkerProductionSummaryResponse + { + /// 总产量 + public int TotalQuantity { get; set; } + + /// 活跃员工数 + public int ActiveWorkerCount { get; set; } + + /// 人均产量 + public decimal AvgPerWorker { get; set; } + + /// 最高产量员工 + public string TopWorkerName { get; set; } + } +}