|
|
@ -1337,7 +1337,7 @@ namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
//任务列表分组统计
|
|
|
|
//任务列表分组统计
|
|
|
|
var groupList = await tenantDb.Queryable<TaskBaseInfo>()
|
|
|
|
var groupList = await tenantDb.Queryable<TaskBaseInfo>()
|
|
|
|
.LeftJoin<TaskBaseAllocation>((t, a) => t.Id == a.TaskId)
|
|
|
|
.LeftJoin<TaskBaseAllocation>((t, a) => t.Id == a.TaskId)
|
|
|
|
.Where((t, a) => t.IS_PUBLIC == 1 || (t.IS_PUBLIC == 0 && (t.CreateBy == userId || a.UserId == userId)))
|
|
|
|
.Where((t, a) => t.IS_PUBLIC == 1 || (t.IS_PUBLIC == 0 && a.Status != null && (t.CreateBy == userId || a.UserId == userId)))
|
|
|
|
.GroupBy((t, a) => new { t.TASK_TYPE, t.STATUS, a.Status, t.IS_PUBLIC })
|
|
|
|
.GroupBy((t, a) => new { t.TASK_TYPE, t.STATUS, a.Status, t.IS_PUBLIC })
|
|
|
|
.Select((t, a) => new
|
|
|
|
.Select((t, a) => new
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1447,8 +1447,8 @@ namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
.Select(t => new { Key = t.Key, Total = t.ToList().Sum(p => p.Total) })
|
|
|
|
.Select(t => new { Key = t.Key, Total = t.ToList().Sum(p => p.Total) })
|
|
|
|
.ToList().ForEach(t =>
|
|
|
|
.ToList().ForEach(t =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TaskStatusEnum currEnum = (TaskStatusEnum)System.Enum.Parse(typeof(TaskStatusEnum), t.Key);
|
|
|
|
if (Enum.TryParse(t.Key, out TaskStatusEnum currEnum))
|
|
|
|
|
|
|
|
{
|
|
|
|
nextList.Add(new TaskUserStatItemNext
|
|
|
|
nextList.Add(new TaskUserStatItemNext
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TopKey = TaskStatLevelEnum.PERSON.ToString(),
|
|
|
|
TopKey = TaskStatLevelEnum.PERSON.ToString(),
|
|
|
@ -1456,9 +1456,9 @@ namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
Name = currEnum.EnumDescription(),
|
|
|
|
Name = currEnum.EnumDescription(),
|
|
|
|
Total = t.Total,
|
|
|
|
Total = t.Total,
|
|
|
|
SortNo = (int)currEnum,
|
|
|
|
SortNo = (int)currEnum,
|
|
|
|
ActionKey = $"{TaskStatLevelEnum.PERSON.ToString()}#{currEnum.ToString()}"
|
|
|
|
ActionKey = $"{TaskStatLevelEnum.PERSON}#{currEnum}"
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
if (nextList.Count > 0)
|
|
|
|
if (nextList.Count > 0)
|
|
|
@ -1468,9 +1468,8 @@ namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
.Select(t => new { Key = t.Key, Total = t.ToList().Sum(p => p.Total) })
|
|
|
|
.Select(t => new { Key = t.Key, Total = t.ToList().Sum(p => p.Total) })
|
|
|
|
.ToList().ForEach(t =>
|
|
|
|
.ToList().ForEach(t =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//TaskBusiTypeEnum currEnum = (TaskBusiTypeEnum)System.Enum.Parse(typeof(TaskBusiTypeEnum), t.Key.TaskType);
|
|
|
|
if (Enum.TryParse(t.Key.TaskType, out TaskBaseTypeEnum currEnum))
|
|
|
|
TaskBaseTypeEnum currEnum = (TaskBaseTypeEnum)System.Enum.Parse(typeof(TaskBaseTypeEnum), t.Key.TaskType);
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
resultInfo.LevelTree.Add(new TaskUserStatItemTree
|
|
|
|
resultInfo.LevelTree.Add(new TaskUserStatItemTree
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TopKey = TaskStatLevelEnum.PERSON.ToString(),
|
|
|
|
TopKey = TaskStatLevelEnum.PERSON.ToString(),
|
|
|
@ -1479,9 +1478,9 @@ namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
Name = currEnum.EnumDescription(),
|
|
|
|
Name = currEnum.EnumDescription(),
|
|
|
|
Total = t.Total,
|
|
|
|
Total = t.Total,
|
|
|
|
SortNo = (int)currEnum,
|
|
|
|
SortNo = (int)currEnum,
|
|
|
|
ActionKey = $"{TaskStatLevelEnum.PERSON.ToString()}#{t.Key.AStatus}#{currEnum.ToString()}"
|
|
|
|
ActionKey = $"{TaskStatLevelEnum.PERSON}#{t.Key.AStatus}#{currEnum}"
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
@ -1504,8 +1503,8 @@ namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
.Select(t => new { Key = t.Key, Total = t.ToList().Sum(p => p.Total) })
|
|
|
|
.Select(t => new { Key = t.Key, Total = t.ToList().Sum(p => p.Total) })
|
|
|
|
.ToList().ForEach(t =>
|
|
|
|
.ToList().ForEach(t =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TaskStatusEnum currEnum = (TaskStatusEnum)System.Enum.Parse(typeof(TaskStatusEnum), t.Key);
|
|
|
|
if (Enum.TryParse(t.Key, out TaskStatusEnum currEnum))
|
|
|
|
|
|
|
|
{
|
|
|
|
nextList.Add(new TaskUserStatItemNext
|
|
|
|
nextList.Add(new TaskUserStatItemNext
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TopKey = TaskStatLevelEnum.PUBLIC.ToString(),
|
|
|
|
TopKey = TaskStatLevelEnum.PUBLIC.ToString(),
|
|
|
@ -1513,9 +1512,9 @@ namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
Name = currEnum.EnumDescription(),
|
|
|
|
Name = currEnum.EnumDescription(),
|
|
|
|
Total = t.Total,
|
|
|
|
Total = t.Total,
|
|
|
|
SortNo = (int)currEnum,
|
|
|
|
SortNo = (int)currEnum,
|
|
|
|
ActionKey = $"{TaskStatLevelEnum.PUBLIC.ToString()}#{currEnum.ToString()}"
|
|
|
|
ActionKey = $"{TaskStatLevelEnum.PUBLIC}#{currEnum}"
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
if (nextList.Count > 0)
|
|
|
|
if (nextList.Count > 0)
|
|
|
@ -1525,9 +1524,8 @@ namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
.Select(t => new { Key = t.Key, Total = t.ToList().Sum(p => p.Total) })
|
|
|
|
.Select(t => new { Key = t.Key, Total = t.ToList().Sum(p => p.Total) })
|
|
|
|
.ToList().ForEach(t =>
|
|
|
|
.ToList().ForEach(t =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//TaskBusiTypeEnum currEnum = (TaskBusiTypeEnum)System.Enum.Parse(typeof(TaskBusiTypeEnum), t.Key.TaskType);
|
|
|
|
if (Enum.TryParse(t.Key.TaskType, out TaskBaseTypeEnum currEnum))
|
|
|
|
TaskBaseTypeEnum currEnum = (TaskBaseTypeEnum)System.Enum.Parse(typeof(TaskBaseTypeEnum), t.Key.TaskType);
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
resultInfo.LevelTree.Add(new TaskUserStatItemTree
|
|
|
|
resultInfo.LevelTree.Add(new TaskUserStatItemTree
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TopKey = TaskStatLevelEnum.PUBLIC.ToString(),
|
|
|
|
TopKey = TaskStatLevelEnum.PUBLIC.ToString(),
|
|
|
@ -1536,9 +1534,9 @@ namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
Name = currEnum.EnumDescription(),
|
|
|
|
Name = currEnum.EnumDescription(),
|
|
|
|
Total = t.Total,
|
|
|
|
Total = t.Total,
|
|
|
|
SortNo = (int)currEnum,
|
|
|
|
SortNo = (int)currEnum,
|
|
|
|
ActionKey = $"{TaskStatLevelEnum.PUBLIC.ToString()}#{t.Key.TStatus}#{currEnum.ToString()}"
|
|
|
|
ActionKey = $"{TaskStatLevelEnum.PUBLIC}#{t.Key.TStatus}#{currEnum}"
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|