This commit is contained in:
parent
4fb7817f31
commit
f6fab4e448
|
@ -1,6 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Numerics;
|
||||||
|
|
||||||
namespace BLL
|
namespace BLL
|
||||||
{
|
{
|
||||||
|
@ -36,6 +37,7 @@ namespace BLL
|
||||||
TrainTypeName = db.Base_TrainType.FirstOrDefault(b => b.TrainTypeId == y.TrainTypeId).TrainTypeName,
|
TrainTypeName = db.Base_TrainType.FirstOrDefault(b => b.TrainTypeId == y.TrainTypeId).TrainTypeName,
|
||||||
TrainLevelName = db.Base_TrainLevel.FirstOrDefault(b => b.TrainLevelId == y.TrainLevelId).TrainLevelName,
|
TrainLevelName = db.Base_TrainLevel.FirstOrDefault(b => b.TrainLevelId == y.TrainLevelId).TrainLevelName,
|
||||||
PlanStatesName = y.States == "3" ? "已完成" : "培训中",
|
PlanStatesName = y.States == "3" ? "已完成" : "培训中",
|
||||||
|
TrainingItemCode = getTrainingItemCode(y.PlanId)
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
|
||||||
foreach(var item in getDataLists)
|
foreach(var item in getDataLists)
|
||||||
|
@ -55,6 +57,18 @@ namespace BLL
|
||||||
return getDataLists;
|
return getDataLists;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static string getTrainingItemCode(string PlanId)
|
||||||
|
{
|
||||||
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
|
{
|
||||||
|
var ids = db.Training_PlanItem.Where(xx => xx.PlanId == PlanId).Select(x => x.CompanyTrainingItemId).ToList();
|
||||||
|
var codes= db.Training_CompanyTrainingItem.Where(x => ids.Contains(x.CompanyTrainingItemId)).Select(x => x.CompanyTrainingItemCode);
|
||||||
|
string res = string.Join(",", codes);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 根据TaskId获取培训任务教材明细列表
|
#region 根据TaskId获取培训任务教材明细列表
|
||||||
|
@ -280,14 +294,19 @@ namespace BLL
|
||||||
//}
|
//}
|
||||||
if (!string.IsNullOrEmpty(VideoProgress))
|
if (!string.IsNullOrEmpty(VideoProgress))
|
||||||
{
|
{
|
||||||
if (!item.VideoProgress.HasValue)
|
//if (!item.VideoProgress.HasValue)
|
||||||
{
|
//{
|
||||||
item.VideoProgress = 0;
|
// item.VideoProgress = 0;
|
||||||
}
|
//}
|
||||||
item.VideoProgress = item.VideoProgress.Value + int.Parse(VideoProgress);
|
item.VideoProgress = int.Parse(VideoProgress);
|
||||||
}
|
}
|
||||||
var span = endTime.Subtract(startTime);
|
var span = endTime.Subtract(startTime);
|
||||||
//item.LearnTime = item.LearnTime.Value + (int)span.TotalMinutes;
|
if (!item.LearnTime.HasValue)
|
||||||
|
{
|
||||||
|
item.LearnTime = 0;
|
||||||
|
}
|
||||||
|
item.LearnTime = item.LearnTime.Value + (int)span.TotalMinutes;
|
||||||
|
|
||||||
item.EndTime = endTime;
|
item.EndTime = endTime;
|
||||||
|
|
||||||
db.SubmitChanges();
|
db.SubmitChanges();
|
||||||
|
|
|
@ -264,6 +264,20 @@ namespace FineUIPro.Web.ProjectData
|
||||||
this.InsertConstructionStandardListToProject(project.ProjectId); ////初始化项目标准规范清单
|
this.InsertConstructionStandardListToProject(project.ProjectId); ////初始化项目标准规范清单
|
||||||
this.InsertITPListProject(project.ProjectId); // 初始化ITP列表
|
this.InsertITPListProject(project.ProjectId); // 初始化ITP列表
|
||||||
this.InsertZT(project); //初始化总图
|
this.InsertZT(project); //初始化总图
|
||||||
|
if (project.ProjectState == "3")
|
||||||
|
{
|
||||||
|
var persons = Funs.DB.SitePerson_Person.Where(x => x.ProjectId == project.ProjectId);
|
||||||
|
foreach(var item in persons)
|
||||||
|
{if (!item.OutTime.HasValue)
|
||||||
|
{
|
||||||
|
item.OutTime = project.EndDate;
|
||||||
|
}
|
||||||
|
item.IsUsed = 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
Funs.DB.SubmitChanges();
|
||||||
|
}
|
||||||
|
|
||||||
ShowNotify("保存数据成功!", MessageBoxIcon.Success);
|
ShowNotify("保存数据成功!", MessageBoxIcon.Success);
|
||||||
// 2. 关闭本窗体,然后刷新父窗体
|
// 2. 关闭本窗体,然后刷新父窗体
|
||||||
// PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
// PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||||
|
|
|
@ -111,5 +111,12 @@ namespace Model
|
||||||
get;
|
get;
|
||||||
set;
|
set;
|
||||||
}
|
}
|
||||||
|
public string TrainingItemCode
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue