|
|
@ -490,7 +490,7 @@ namespace ICS.Application.Business.Service |
|
|
|
{ |
|
|
|
var sslist = !string.IsNullOrEmpty(input) ? input.Split(",") : new string[0]; |
|
|
|
var query = new List<TaskResGanttList>(); |
|
|
|
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; |
|
|
|