1009
This commit is contained in:
parent
aee661bdd1
commit
4abb69942e
|
@ -1,4 +1,5 @@
|
||||||
using Model;
|
using Microsoft.SqlServer.Dts.Runtime;
|
||||||
|
using Model;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using SgManager.AI;
|
using SgManager.AI;
|
||||||
|
@ -535,8 +536,29 @@ namespace BLL
|
||||||
|
|
||||||
if (getTrainType != null && (!getTrainType.IsRepeat.HasValue || getTrainType.IsRepeat == false))
|
if (getTrainType != null && (!getTrainType.IsRepeat.HasValue || getTrainType.IsRepeat == false))
|
||||||
{
|
{
|
||||||
|
int score = 80;
|
||||||
|
var sysTestRule = db.Sys_TestRule.FirstOrDefault();
|
||||||
|
if (sysTestRule != null)
|
||||||
|
{
|
||||||
|
if (sysTestRule.PassingScore > 0)
|
||||||
|
{
|
||||||
|
score = sysTestRule.PassingScore;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
foreach (var item in getPersons)
|
foreach (var item in getPersons)
|
||||||
{
|
{
|
||||||
|
var getTrainPersonIdList3 = (from x in db.Training_TestRecord
|
||||||
|
join y in db.Training_TestPlan on x.TestPlanId equals y.TestPlanId
|
||||||
|
where y.TrainTypeId == trainTypeId && y.States != "3" && x.TestManId == item.PersonId
|
||||||
|
where x.TestScores > score
|
||||||
|
select x).FirstOrDefault();
|
||||||
|
if (getTrainPersonIdList3 != null)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
var getTrainPersonIdList1 = (from x in db.EduTrain_TrainRecordDetail
|
var getTrainPersonIdList1 = (from x in db.EduTrain_TrainRecordDetail
|
||||||
join y in db.EduTrain_TrainRecord on x.TrainingId equals y.TrainingId
|
join y in db.EduTrain_TrainRecord on x.TrainingId equals y.TrainingId
|
||||||
where y.ProjectId == null && y.TrainTypeId == trainTypeId && x.CheckResult == true && x.PersonId == item.PersonId
|
where y.ProjectId == null && y.TrainTypeId == trainTypeId && x.CheckResult == true && x.PersonId == item.PersonId
|
||||||
|
@ -557,6 +579,9 @@ namespace BLL
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return getPersons.ToList();
|
return getPersons.ToList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -635,8 +660,26 @@ namespace BLL
|
||||||
var getTrainType = TrainTypeService.GetTrainTypeById(trainTypeId);
|
var getTrainType = TrainTypeService.GetTrainTypeById(trainTypeId);
|
||||||
if (getTrainType != null && (!getTrainType.IsRepeat.HasValue || getTrainType.IsRepeat == false))
|
if (getTrainType != null && (!getTrainType.IsRepeat.HasValue || getTrainType.IsRepeat == false))
|
||||||
{
|
{
|
||||||
|
int score = 80;
|
||||||
|
var sysTestRule = db.Sys_TestRule.FirstOrDefault();
|
||||||
|
if (sysTestRule != null)
|
||||||
|
{
|
||||||
|
if (sysTestRule.PassingScore > 0)
|
||||||
|
{
|
||||||
|
score = sysTestRule.PassingScore;
|
||||||
|
}
|
||||||
|
}
|
||||||
foreach (var item in getPersons)
|
foreach (var item in getPersons)
|
||||||
{
|
{
|
||||||
|
var getTrainPersonIdList3 = (from x in db.Training_TestRecord
|
||||||
|
join y in db.Training_TestPlan on x.TestPlanId equals y.TestPlanId
|
||||||
|
where y.ProjectId == projectId && y.TrainTypeId == trainTypeId && y.States != "3" && x.TestManId == item.PersonId
|
||||||
|
where x.TestScores > score
|
||||||
|
select x).FirstOrDefault();
|
||||||
|
if (getTrainPersonIdList3 != null)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
var getTrainPersonIdList1 = (from x in db.EduTrain_TrainRecordDetail
|
var getTrainPersonIdList1 = (from x in db.EduTrain_TrainRecordDetail
|
||||||
join y in db.EduTrain_TrainRecord on x.TrainingId equals y.TrainingId
|
join y in db.EduTrain_TrainRecord on x.TrainingId equals y.TrainingId
|
||||||
where y.ProjectId == projectId && y.TrainTypeId == trainTypeId && x.CheckResult == true && x.PersonId == item.PersonId
|
where y.ProjectId == projectId && y.TrainTypeId == trainTypeId && x.CheckResult == true && x.PersonId == item.PersonId
|
||||||
|
@ -646,6 +689,7 @@ namespace BLL
|
||||||
var getTrainPersonIdList2 = (from x in db.Training_Task
|
var getTrainPersonIdList2 = (from x in db.Training_Task
|
||||||
join y in db.Training_Plan on x.PlanId equals y.PlanId
|
join y in db.Training_Plan on x.PlanId equals y.PlanId
|
||||||
where y.ProjectId == projectId && y.TrainTypeId == trainTypeId && y.States != "3" && x.UserId == item.PersonId
|
where y.ProjectId == projectId && y.TrainTypeId == trainTypeId && y.States != "3" && x.UserId == item.PersonId
|
||||||
|
|
||||||
select x).FirstOrDefault();
|
select x).FirstOrDefault();
|
||||||
if (getTrainPersonIdList2 == null)
|
if (getTrainPersonIdList2 == null)
|
||||||
{
|
{
|
||||||
|
@ -681,6 +725,33 @@ namespace BLL
|
||||||
}
|
}
|
||||||
return getTrainPersonList;
|
return getTrainPersonList;
|
||||||
}
|
}
|
||||||
|
//else if (getTrainType != null && (!getTrainType.IsRepeat.HasValue || getTrainType.IsRepeat == false))//重复的 过滤人员
|
||||||
|
//{
|
||||||
|
// int score = 80;
|
||||||
|
// var sysTestRule = db.Sys_TestRule.FirstOrDefault();
|
||||||
|
// if (sysTestRule != null)
|
||||||
|
// {
|
||||||
|
// if (sysTestRule.PassingScore > 0)
|
||||||
|
// {
|
||||||
|
// score = sysTestRule.PassingScore;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// foreach (var item in getPersons)
|
||||||
|
// {
|
||||||
|
|
||||||
|
// var getTrainPersonIdList2 = (from x in db.Training_TestRecord
|
||||||
|
// join y in db.Training_TestPlan on x.TestPlanId equals y.TestPlanId
|
||||||
|
// where y.ProjectId == projectId && y.TrainTypeId == trainTypeId && y.States != "3" && x.TestManId == item.PersonId
|
||||||
|
// where x.TestScores > score
|
||||||
|
// select x).FirstOrDefault();
|
||||||
|
// if (getTrainPersonIdList2 != null)
|
||||||
|
// {
|
||||||
|
// continue;
|
||||||
|
// }
|
||||||
|
// getTrainPersonList.Add(item);
|
||||||
|
// }
|
||||||
|
// return getTrainPersonList;
|
||||||
|
//}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return getPersons.ToList();
|
return getPersons.ToList();
|
||||||
|
|
|
@ -199,7 +199,7 @@ namespace FineUIPro.Web.HSSE.Check
|
||||||
|
|
||||||
if (e.CommandName == "attchUrl")
|
if (e.CommandName == "attchUrl")
|
||||||
{
|
{
|
||||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/CheckSpecial&menuId={1}&edit=1", itemId, BLL.Const.ProjectCheckSpecialMenuId)));
|
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/CheckSpecial&menuId={1}&type=0", itemId, BLL.Const.ProjectCheckSpecialMenuId)));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,6 +38,12 @@
|
||||||
<%--<f:RenderField Width="350px" ColumnID="Summary" DataField="Summary" FieldType="String"
|
<%--<f:RenderField Width="350px" ColumnID="Summary" DataField="Summary" FieldType="String"
|
||||||
HeaderText="教材内容" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true">
|
HeaderText="教材内容" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true">
|
||||||
</f:RenderField>--%>
|
</f:RenderField>--%>
|
||||||
|
<f:RenderField Width="200px" ColumnID="LearnTime" DataField="LearnTime" FieldType="String"
|
||||||
|
HeaderText="教材时长(分钟)" HeaderTextAlign="Center" TextAlign="Left">
|
||||||
|
</f:RenderField>
|
||||||
|
<f:RenderField Width="200px" ColumnID="VideoProgress" DataField="VideoProgress" FieldType="String"
|
||||||
|
HeaderText="学习时长(分钟)" HeaderTextAlign="Center" TextAlign="Left">
|
||||||
|
</f:RenderField>
|
||||||
</Columns>
|
</Columns>
|
||||||
<Listeners>
|
<Listeners>
|
||||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||||
|
|
|
@ -97,7 +97,7 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||||
private void BindGrid()
|
private void BindGrid()
|
||||||
{
|
{
|
||||||
|
|
||||||
string strSql = @"select TrainingItemId,d.TrainingCode,c.TrainingId,d.TrainingName, b.[TrainingItemCode],b.[TrainingItemName],b.[AttachUrl], c.TrainingItemCode,c.TrainingItemName from
|
string strSql = @"select TrainingItemId,d.TrainingCode,c.TrainingId,d.TrainingName, b.[TrainingItemCode],b.[TrainingItemName],b.LearnTime,b.VideoProgress,b.[AttachUrl], c.TrainingItemCode,c.TrainingItemName from
|
||||||
[dbo].[Training_Task] a
|
[dbo].[Training_Task] a
|
||||||
left join [dbo].[Training_TaskItem] b on a.[TaskId]=b.[TaskId]
|
left join [dbo].[Training_TaskItem] b on a.[TaskId]=b.[TaskId]
|
||||||
left join Training_TrainingItem c on b.TrainingItemCode=c.TrainingItemCode
|
left join Training_TrainingItem c on b.TrainingItemCode=c.TrainingItemCode
|
||||||
|
|
Loading…
Reference in New Issue