This commit is contained in:
parent
4fb7817f31
commit
f6fab4e448
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
|
@ -36,6 +37,7 @@ namespace BLL
|
|||
TrainTypeName = db.Base_TrainType.FirstOrDefault(b => b.TrainTypeId == y.TrainTypeId).TrainTypeName,
|
||||
TrainLevelName = db.Base_TrainLevel.FirstOrDefault(b => b.TrainLevelId == y.TrainLevelId).TrainLevelName,
|
||||
PlanStatesName = y.States == "3" ? "已完成" : "培训中",
|
||||
TrainingItemCode = getTrainingItemCode(y.PlanId)
|
||||
}).ToList();
|
||||
|
||||
foreach(var item in getDataLists)
|
||||
|
@ -55,6 +57,18 @@ namespace BLL
|
|||
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
|
||||
|
||||
#region 根据TaskId获取培训任务教材明细列表
|
||||
|
@ -280,15 +294,20 @@ namespace BLL
|
|||
//}
|
||||
if (!string.IsNullOrEmpty(VideoProgress))
|
||||
{
|
||||
if (!item.VideoProgress.HasValue)
|
||||
{
|
||||
item.VideoProgress = 0;
|
||||
}
|
||||
item.VideoProgress = item.VideoProgress.Value + int.Parse(VideoProgress);
|
||||
//if (!item.VideoProgress.HasValue)
|
||||
//{
|
||||
// item.VideoProgress = 0;
|
||||
//}
|
||||
item.VideoProgress = int.Parse(VideoProgress);
|
||||
}
|
||||
var span = endTime.Subtract(startTime);
|
||||
//item.LearnTime = item.LearnTime.Value + (int)span.TotalMinutes;
|
||||
item.EndTime = endTime;
|
||||
if (!item.LearnTime.HasValue)
|
||||
{
|
||||
item.LearnTime = 0;
|
||||
}
|
||||
item.LearnTime = item.LearnTime.Value + (int)span.TotalMinutes;
|
||||
|
||||
item.EndTime = endTime;
|
||||
|
||||
db.SubmitChanges();
|
||||
|
||||
|
|
|
@ -264,6 +264,20 @@ namespace FineUIPro.Web.ProjectData
|
|||
this.InsertConstructionStandardListToProject(project.ProjectId); ////初始化项目标准规范清单
|
||||
this.InsertITPListProject(project.ProjectId); // 初始化ITP列表
|
||||
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);
|
||||
// 2. 关闭本窗体,然后刷新父窗体
|
||||
// PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
|
|
|
@ -111,5 +111,12 @@ namespace Model
|
|||
get;
|
||||
set;
|
||||
}
|
||||
public string TrainingItemCode
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue