检查关联培训
This commit is contained in:
@@ -11,7 +11,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class TrainingPlanService
|
||||
{
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取培训计划
|
||||
@@ -172,6 +172,7 @@ namespace BLL
|
||||
var plan = GetPlanByCheckId(info.CheckId);
|
||||
var person = PersonService.GetPersonById(info.PersonId);
|
||||
var companyTrainingItem = CompanyTrainingItemService.GetCompanyTrainingItemById(info.CompanyTrainingItemId);
|
||||
//var teachHour = companyTrainingItem.LearningTime != null ? companyTrainingItem.LearningTime / 3600 : 0;
|
||||
var teachHour = companyTrainingItem.LearningTime / 3600;
|
||||
|
||||
string planId = string.Empty;
|
||||
@@ -189,7 +190,7 @@ namespace BLL
|
||||
TrainStartDate = plan.TrainStartDate,
|
||||
TrainEndDate = info.TrainEndDate,
|
||||
TeachMan = plan.TeachMan,
|
||||
TeachAddress = plan.TeachAddress,
|
||||
TeachAddress = !string.IsNullOrWhiteSpace(plan.TeachAddress) ? plan.TeachAddress : "小程序线上培训",
|
||||
TrainTypeId = Const.RetakeCourseTrainTypeId,
|
||||
TrainLevelId = Const.OtherTrainLevelId,
|
||||
States = "1",
|
||||
@@ -204,8 +205,8 @@ namespace BLL
|
||||
else
|
||||
{//生成培训计划
|
||||
planId = SQLHelper.GetNewID();
|
||||
string code = ProjectService.GetProjectByProjectId(info.CurrProjectId).ProjectCode + "-";
|
||||
string planCode = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.Training_Plan", "PlanCode", info.CurrProjectId, code);
|
||||
string code = $"{(!string.IsNullOrWhiteSpace(info.CurrProjectId) ? ProjectService.GetProjectByProjectId(info.CurrProjectId).ProjectCode : "HSE")}-";
|
||||
string planCode = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.Training_Plan", "PlanCode", (!string.IsNullOrWhiteSpace(info.CurrProjectId) ? info.CurrProjectId : "HSE"), code);
|
||||
|
||||
Model.Training_Plan planModel = new Model.Training_Plan
|
||||
{
|
||||
@@ -221,6 +222,7 @@ namespace BLL
|
||||
TeachHour = teachHour,
|
||||
//TeachMan = model.TeachMan,
|
||||
//TeachAddress = model.TeachAddress,
|
||||
TeachAddress = "小程序线上培训",
|
||||
TrainTypeId = Const.RetakeCourseTrainTypeId,
|
||||
TrainLevelId = Const.OtherTrainLevelId,
|
||||
UnitIds = person.UnitId,
|
||||
|
||||
Reference in New Issue
Block a user