From 410b27a45db057da230ce1c303c900fde31aa43c Mon Sep 17 00:00:00 2001 From: ljh <1192263352@qq.com> Date: Tue, 16 Jul 2024 23:23:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=AB=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PrintCodeDetail/Dto/PrintCodeDetailInput.cs | 6 ++++++ .../PrintCodeDetail/Dto/PrintCodeDetailOutput.cs | 8 ++++++-- .../Service/ReportTable/Dto/PrintCodeTreeData.cs | 5 +++++ .../Service/ReportTable/Dto/ReportTableOutput.cs | 1 + .../Service/ReportTable/ReportTableService.cs | 12 ++++++++++++ 5 files changed, 30 insertions(+), 2 deletions(-) diff --git a/Admin.NET/Admin.NET.Application/Service/PrintCodeDetail/Dto/PrintCodeDetailInput.cs b/Admin.NET/Admin.NET.Application/Service/PrintCodeDetail/Dto/PrintCodeDetailInput.cs index 27cd4e8..caa74b0 100644 --- a/Admin.NET/Admin.NET.Application/Service/PrintCodeDetail/Dto/PrintCodeDetailInput.cs +++ b/Admin.NET/Admin.NET.Application/Service/PrintCodeDetail/Dto/PrintCodeDetailInput.cs @@ -128,6 +128,12 @@ public class PrintCodeDetailBaseInput /// public virtual bool IsDelete { get; set; } + + /// + /// 状态 + /// + public int? State { get; set; } + } /// diff --git a/Admin.NET/Admin.NET.Application/Service/PrintCodeDetail/Dto/PrintCodeDetailOutput.cs b/Admin.NET/Admin.NET.Application/Service/PrintCodeDetail/Dto/PrintCodeDetailOutput.cs index 5f80f0f..6c2dfee 100644 --- a/Admin.NET/Admin.NET.Application/Service/PrintCodeDetail/Dto/PrintCodeDetailOutput.cs +++ b/Admin.NET/Admin.NET.Application/Service/PrintCodeDetail/Dto/PrintCodeDetailOutput.cs @@ -131,7 +131,11 @@ public class PrintCodeDetailOutput /// 软删除 /// public bool IsDelete { get; set; } - - } + + /// + /// 生产状态 + /// + public long? State { get; set; } +} diff --git a/Admin.NET/Admin.NET.Application/Service/ReportTable/Dto/PrintCodeTreeData.cs b/Admin.NET/Admin.NET.Application/Service/ReportTable/Dto/PrintCodeTreeData.cs index ceb0ef7..c05308e 100644 --- a/Admin.NET/Admin.NET.Application/Service/ReportTable/Dto/PrintCodeTreeData.cs +++ b/Admin.NET/Admin.NET.Application/Service/ReportTable/Dto/PrintCodeTreeData.cs @@ -62,4 +62,9 @@ public class PrintCodeTreeData public List Children { get; set; } public bool HasChildren { get; set; } = true; + + /// + /// 生产状态 + /// + public long? State { get; set; } } diff --git a/Admin.NET/Admin.NET.Application/Service/ReportTable/Dto/ReportTableOutput.cs b/Admin.NET/Admin.NET.Application/Service/ReportTable/Dto/ReportTableOutput.cs index d953a31..c2a6f59 100644 --- a/Admin.NET/Admin.NET.Application/Service/ReportTable/Dto/ReportTableOutput.cs +++ b/Admin.NET/Admin.NET.Application/Service/ReportTable/Dto/ReportTableOutput.cs @@ -130,6 +130,7 @@ public class ReportTableOutput /// public bool IsDelete { get; set; } + } diff --git a/Admin.NET/Admin.NET.Application/Service/ReportTable/ReportTableService.cs b/Admin.NET/Admin.NET.Application/Service/ReportTable/ReportTableService.cs index de75e46..98c8080 100644 --- a/Admin.NET/Admin.NET.Application/Service/ReportTable/ReportTableService.cs +++ b/Admin.NET/Admin.NET.Application/Service/ReportTable/ReportTableService.cs @@ -424,6 +424,18 @@ public class ReportTableService : IDynamicApiController, ITransient { var treeData4 = dt4.Adapt(); treeData3.Children.Add(treeData4); + + var list4 = printDetails.FindAll(a => a.FatherId == dt4.Id); + foreach (var dt5 in list4) + { + var treeData5 = dt5.Adapt(); + if (list4.Count > 0) + { + treeData4.Children = new List(); + treeData4.HasChildren = false; + } + treeData4.Children.Add(treeData5); + } } } treeData2.Children.Add(treeData3);