From 55b866eab47211e11ad8801a42484af81ed0afab Mon Sep 17 00:00:00 2001 From: lixiaojun <1287241240@qq.com> Date: 星期一, 22 一月 2024 11:23:35 +0800 Subject: [PATCH] 引用升级 --- Yw.Application.Repair.Core/2-task-form/1-mgr/RepairTaskForm_Controller.cs | 25 +++++++++++++++++++++++-- 1 files changed, 23 insertions(+), 2 deletions(-) diff --git a/Yw.Application.Repair.Core/2-task-form/1-mgr/RepairTaskForm_Controller.cs b/Yw.Application.Repair.Core/2-task-form/1-mgr/RepairTaskForm_Controller.cs index aa041bc..3c31d38 100644 --- a/Yw.Application.Repair.Core/2-task-form/1-mgr/RepairTaskForm_Controller.cs +++ b/Yw.Application.Repair.Core/2-task-form/1-mgr/RepairTaskForm_Controller.cs @@ -377,7 +377,18 @@ int total = 0; var list = new Service.RepairTaskForm().GetProgressPageList (null, UserManager.UserID, null, null, input.StartTime, input.EndTime, input.PageIndex, input.PageSize, ref total); - var vmList = list?.Select(x => new MyRepairTaskFormProgressDto(x.Item1)).ToList(); + var vmList = new List<MyRepairTaskFormProgressDto>(); + if (list != null && list.Count > 0) + { + var service_equipment = new Yw.Service.Equipment(); + foreach (var item in list) + { + var equipment = service_equipment.GetByID(item.Item1.EquipmentID); + var vm = new MyRepairTaskFormProgressDto(item.Item1, equipment); + vmList.Add(vm); + } + } + return new PageListOutput<MyRepairTaskFormProgressDto>() { Total = total, List = vmList }; } @@ -391,7 +402,17 @@ int total = 0; var list = new Service.RepairTaskForm().GetHasFinishedPageList (null, UserManager.UserID, null, null, input.StartTime, input.EndTime, input.PageIndex, input.PageSize, ref total); - var vmList = list?.Select(x => new MyRepairTaskFormHasFinishedDto(x.Item1)).ToList(); + var vmList = new List<MyRepairTaskFormHasFinishedDto>(); + if (list != null && list.Count > 0) + { + var service_equipment = new Yw.Service.Equipment(); + foreach (var item in list) + { + var equipment = service_equipment.GetByID(item.Item1.EquipmentID); + var vm = new MyRepairTaskFormHasFinishedDto(item.Item1, equipment); + vmList.Add(vm); + } + } return new PageListOutput<MyRepairTaskFormHasFinishedDto>() { Total = total, List = vmList }; } -- Gitblit v1.9.3