提交代码
This commit is contained in:
@@ -1038,31 +1038,38 @@ namespace FineUIPro.Web.CQMS.Performance
|
||||
//根据gid获取CQMS_Performance_Child2 施工进度管理的子表数据,大于一条,就要多增加数据到List中
|
||||
var ChildSgjdCount = db.CQMS_Performance_Child2.Where(x => x.NowWeek == 1 && x.PerformanceGid == PerformanceGid
|
||||
&&x.Performance_ChildGid1== OneGid).ToList().Count();
|
||||
var addList = db.CQMS_Performance_Child1.Where(x => x.PerformanceGid == PerformanceGid && x.SortIndex==1)
|
||||
.Select(x => new GridModels
|
||||
{
|
||||
Performance_ChildGid1 = x.Performance_ChildGid1,
|
||||
PerformanceGid = x.PerformanceGid,
|
||||
PType = x.PType,
|
||||
EvaScore = x.EvaScore,
|
||||
Itemize = x.Itemize,
|
||||
WorkArea = x.WorkArea,
|
||||
MonthTarget = x.MonthTarget,
|
||||
SortIndex = x.SortIndex
|
||||
}).ToList();
|
||||
if (ChildSgjdCount == 2)
|
||||
|
||||
for (int i = 0; i < ChildSgjdCount-1; i++)
|
||||
{
|
||||
addList[0].Performance_ChildGid1 = addList[0].Performance_ChildGid1 + "one";
|
||||
listChild1.InsertRange(1, addList);
|
||||
}
|
||||
else if (ChildSgjdCount == 3)
|
||||
{
|
||||
var pgid = addList[0].Performance_ChildGid1;
|
||||
addList[0].Performance_ChildGid1 = pgid + "one";
|
||||
listChild1.InsertRange(1, addList);
|
||||
addList[0].Performance_ChildGid1 = pgid + "two";
|
||||
listChild1.InsertRange(2, addList);
|
||||
var addList = db.CQMS_Performance_Child1.Where(x => x.PerformanceGid == PerformanceGid && x.SortIndex == 1)
|
||||
.Select(x => new GridModels
|
||||
{
|
||||
Performance_ChildGid1 = x.Performance_ChildGid1,
|
||||
PerformanceGid = x.PerformanceGid,
|
||||
PType = x.PType,
|
||||
EvaScore = x.EvaScore,
|
||||
Itemize = x.Itemize,
|
||||
WorkArea = x.WorkArea,
|
||||
MonthTarget = x.MonthTarget,
|
||||
SortIndex = x.SortIndex
|
||||
}).ToList();
|
||||
|
||||
addList[0].Performance_ChildGid1 = addList[0].Performance_ChildGid1 + "one"+i.ToString();
|
||||
listChild1.InsertRange(i+1, addList);
|
||||
}
|
||||
//if (ChildSgjdCount == 2)
|
||||
//{
|
||||
// addList[0].Performance_ChildGid1 = addList[0].Performance_ChildGid1 + "one";
|
||||
// listChild1.InsertRange(1, addList);
|
||||
//}
|
||||
//else if (ChildSgjdCount == 3)
|
||||
//{
|
||||
// var pgid = addList[0].Performance_ChildGid1;
|
||||
// addList[0].Performance_ChildGid1 = pgid + "one";
|
||||
// listChild1.InsertRange(1, addList);
|
||||
// addList[0].Performance_ChildGid1 = pgid + "two";
|
||||
// listChild1.InsertRange(2, addList);
|
||||
//}
|
||||
|
||||
//循环list给每周任务、工程量、资源需求计划、本周工作任务完成情况 ,每日工作计划、完成情况赋值
|
||||
//获取周数
|
||||
@@ -1089,7 +1096,7 @@ namespace FineUIPro.Web.CQMS.Performance
|
||||
var chilGid = listChild1[i].Performance_ChildGid1;
|
||||
if (chilGid.IndexOf("one")>-1|| chilGid.IndexOf("two") > -1)
|
||||
{
|
||||
chilGid = chilGid.Substring(0, chilGid.Length - 3);
|
||||
chilGid = chilGid.Substring(0, chilGid.Length - 4);
|
||||
}
|
||||
|
||||
//根据周数获取数据
|
||||
|
||||
Reference in New Issue
Block a user