Merge branch 'master' of https://gitee.com/frane-yang/SGGL_CWCEC
This commit is contained in:
commit
5e5ad08320
|
@ -1077,33 +1077,41 @@ 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)
|
||||
&& x.Performance_ChildGid1 == OneGid).ToList().Count();
|
||||
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给每周任务、工程量、资源需求计划、本周工作任务完成情况 ,每日工作计划、完成情况赋值
|
||||
//获取周数
|
||||
var NowDate = Convert.ToDateTime(drpCompileDateMonth.Text.Trim());
|
||||
|
@ -1129,12 +1137,13 @@ 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);
|
||||
}
|
||||
|
||||
//根据周数获取数据
|
||||
var Child2ListNew = db.CQMS_Performance_Child2.FirstOrDefault(x => x.PerformanceGid == listChild1[i].PerformanceGid
|
||||
&& x.Performance_ChildGid1 == chilGid && x.NowWeek == (y + 1) && x.SortIndex == (i + 1));
|
||||
|
||||
//将list中的周数数据插入
|
||||
if (Child2ListNew == null)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue