From 64d0a9bf9a677800018bf8d9952a2f3f8598b5a1 Mon Sep 17 00:00:00 2001 From: zhoukeda <1315948824@qq.com> Date: Tue, 28 Nov 2023 09:37:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E6=8A=A5=E8=AE=B0=E5=BD=95=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=B7=A5=E5=8D=95=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dto/PrdManage/ReportRecordListOutput.cs | 2 ++ .../Entity/PrdMoTaskDefectRecord.cs | 5 +++++ .../Tnb.ProductionMgr.Entities/Entity/PrdReportRecord.cs | 6 ++++++ ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs | 4 +++- .../Tnb.ProductionMgr/ProductionReportRecordService.cs | 1 + 5 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/ReportRecordListOutput.cs b/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/ReportRecordListOutput.cs index 09f3aeb3..fafb4e0d 100644 --- a/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/ReportRecordListOutput.cs +++ b/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/ReportRecordListOutput.cs @@ -15,6 +15,8 @@ namespace Tnb.ProductionMgr.Entities.Dto public string? plan_start_date { get; set; } = string.Empty; public int? reported_work_qty { get; set; } public string? status { get; set; } = string.Empty; + + public string mo_code { get; set; } public List? tablefield107 { get; set; } = new List(); diff --git a/ProductionMgr/Tnb.ProductionMgr.Entities/Entity/PrdMoTaskDefectRecord.cs b/ProductionMgr/Tnb.ProductionMgr.Entities/Entity/PrdMoTaskDefectRecord.cs index 6d06db85..b463b200 100644 --- a/ProductionMgr/Tnb.ProductionMgr.Entities/Entity/PrdMoTaskDefectRecord.cs +++ b/ProductionMgr/Tnb.ProductionMgr.Entities/Entity/PrdMoTaskDefectRecord.cs @@ -82,5 +82,10 @@ public partial class PrdMoTaskDefectRecord : BaseEntity /// 任务类型 /// public string mo_task_type { get; set; } + /// + /// 工单号 + /// + public string? mo_code { get; set; } + } diff --git a/ProductionMgr/Tnb.ProductionMgr.Entities/Entity/PrdReportRecord.cs b/ProductionMgr/Tnb.ProductionMgr.Entities/Entity/PrdReportRecord.cs index 7ed330d8..271f13fa 100644 --- a/ProductionMgr/Tnb.ProductionMgr.Entities/Entity/PrdReportRecord.cs +++ b/ProductionMgr/Tnb.ProductionMgr.Entities/Entity/PrdReportRecord.cs @@ -69,4 +69,10 @@ public partial class PrdReportRecord : BaseEntity /// 已报工数量 /// public int reported_work_qty { get; set; } + + /// + /// 工单号 + /// + public string? mo_code { get; set; } + } diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs index 7ec20099..6251fdc3 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs @@ -1287,6 +1287,7 @@ namespace Tnb.ProductionMgr record.mo_task_type = mo?.mo_type; record.status = taskInfo.mo_task_status; record.mo_task_id = taskInfo.id; + record.mo_code = mo?.mo_code ?? ""; //record.completed_qty = (await db.Queryable().Where(it => it.mo_task_code == taskInfo.mo_task_code).SumAsync(it => it.reported_work_qty)).Value; prdReportLogs.Add(record); @@ -1307,7 +1308,8 @@ namespace Tnb.ProductionMgr create_time = DateTime.Now, mo_task_id = taskInfo.id, mo_task_code = taskInfo.mo_task_code, - mo_task_type = mo?.mo_type + mo_task_type = mo?.mo_type, + mo_code = mo?.mo_code ?? "", }; sacipRecord.status = taskInfo.mo_task_status; prdTaskDefectLogs.Add(sacipRecord); diff --git a/ProductionMgr/Tnb.ProductionMgr/ProductionReportRecordService.cs b/ProductionMgr/Tnb.ProductionMgr/ProductionReportRecordService.cs index aef57906..5a81dfe0 100644 --- a/ProductionMgr/Tnb.ProductionMgr/ProductionReportRecordService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/ProductionReportRecordService.cs @@ -98,6 +98,7 @@ namespace Tnb.ProductionMgr { id = a.id, masterial_code = a.masterial_code, + mo_code = a.mo_code, masterial_name = a.masterial_name, mo_task_code = a.mo_task_code, mo_task_id = a.mo_task_code,