20220829未做培训计划 新增按钮手动加入培训记录

This commit is contained in:
2022-08-29 19:58:10 +08:00
parent 03b773e8e4
commit 54590920e4
9 changed files with 162 additions and 28 deletions
@@ -1,4 +1,5 @@
using BLL;
using FineUIPro.Web.BoSheng;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
@@ -548,7 +549,7 @@ namespace FineUIPro.Web.HSSE.EduTrain
{
var getTrainRecordDetail = Funs.DB.EduTrain_TrainRecordDetail.Where(x => x.TrainingId == itemRecord.TrainingId);
if (itemRecord.TrainPersonNum > getTrainRecordDetail.Count())
{
{
var getTrainingTasks = from x in Funs.DB.Training_Task
where x.PlanId == itemRecord.PlanId
select x;
@@ -628,14 +629,36 @@ namespace FineUIPro.Web.HSSE.EduTrain
Alert.ShowInTop("刷新完成!", MessageBoxIcon.Success);
}
var getTestPlanStates = from x in Funs.DB.Training_TestPlan
join y in Funs.DB.Training_Plan on x.PlanId equals y.PlanId
where x.States == Const.State_3 && y.States == Const.State_2
select x;
foreach (var item in getTestPlanStates)
var getTestPlans = from x in Funs.DB.Training_TestPlan
where x.ProjectId == this.CurrUser.LoginProjectId && x.States == Const.State_3
select x;
var getTestPlanStates = from x in getTestPlans
join y in Funs.DB.Training_Plan on x.PlanId equals y.PlanId
where x.PlanId != null && y.States == Const.State_2
select x;
if (getTestPlanStates.Count() > 0)
{
////TODO 讲培训计划 考试记录 写入到培训记录
BLL. APITrainRecordService.InsertTrainRecord(item);
foreach (var item in getTestPlanStates)
{
////TODO 讲培训计划 考试记录 写入到培训记录
BLL.APITrainRecordService.InsertTrainRecord(item);
}
}
var getTestPlanS = from x in getTestPlans
join y in Funs.DB.EduTrain_TrainRecord on x.TestPlanId equals y.PlanId into jonPerson
from y in jonPerson.DefaultIfEmpty()
where x.PlanId == null && y.TrainingId == null
orderby y.TrainStartDate
select x;
if (getTestPlanS.Count() > 0)
{
foreach (var item in getTestPlanS)
{
//// 将相关未做培训 但考试考生内容 写培训记录归档
BLL.APITrainRecordService.InsertTrainRecordNoTrainingPlan(item);
}
}
}
}
+2 -2
View File
@@ -140,11 +140,11 @@
</div>
<div class="bi-flex-vertical-center-adapt-layout bi-flex-horizontal-layout v-middle h-left"
style="height: 100%; position: relative; float: right;">
<div
<%-- <div
class="bi-single bi-basic-button cursor-pointer bi-button button-common bi-label bi-flex-center-adapt-layout clear"
style="height: 16px; line-height: 16px; position: relative; flex-shrink: 0; color:#fff">
忘记密码?
</div>
</div>--%>
</div>
</div>
<div class="bi-horizon-auto-layout" style="position: relative;">