From 484eb44488e14ad6a8e6df607e38c94dc93fd6eb Mon Sep 17 00:00:00 2001 From: "shiqian.wang" Date: Fri, 22 Nov 2024 11:55:09 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=84=E6=BA=90=E7=94=98=E7=89=B9=E5=9B=BE?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=BA=90=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Business/Service/IcsTasks/IcsTasksAppService.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/aspnet-core/ICS.Application/Business/Service/IcsTasks/IcsTasksAppService.cs b/src/aspnet-core/ICS.Application/Business/Service/IcsTasks/IcsTasksAppService.cs index 529aedc8..83cd903b 100644 --- a/src/aspnet-core/ICS.Application/Business/Service/IcsTasks/IcsTasksAppService.cs +++ b/src/aspnet-core/ICS.Application/Business/Service/IcsTasks/IcsTasksAppService.cs @@ -490,7 +490,7 @@ namespace ICS.Application.Business.Service { var sslist = !string.IsNullOrEmpty(input) ? input.Split(",") : new string[0]; var query = new List(); - var req = from a in _resourcesRepository.GetAll()//.WhereIf(sslist.Any(), q => sslist.Contains(q.SsCode)) + var req = from a in _resourcesRepository.GetAll().WhereIf(sslist.Any(), q => sslist.Contains(q.SsCode)) join b in _repository.GetAll() on a.Id.ToString() equals b.ResourceId join c in _OP2ResRepository.GetAll() on b.OPCode equals c.OpCode into cc from c in cc.DefaultIfEmpty() @@ -529,9 +529,9 @@ namespace ICS.Application.Business.Service foreach (var segItem in workshopList) { i++; - var ssList = req.Where(q => q.SegId == segItem.Id).ToList(); - var SegStart = ssList.OrderBy(q => q.StartTime).FirstOrDefault(); - var SegEnd = ssList.OrderByDescending(q => q.EndTime).FirstOrDefault(); + var segList = req.Where(q => q.SegId == segItem.Id).ToList(); + var SegStart = segList.OrderBy(q => q.StartTime).FirstOrDefault(); + var SegEnd = segList.OrderByDescending(q => q.EndTime).FirstOrDefault(); query.Add(new TaskResGanttList { Id = i, @@ -542,7 +542,7 @@ namespace ICS.Application.Business.Service EndTime = SegEnd.EndTime, }); var SegId = i; - foreach (var ssItem in ssList) + foreach (var ssItem in segList) { i++; ssItem.Id = i;