培训考试

This commit is contained in:
2026-04-21 16:55:59 +08:00
parent d16907d32b
commit caa62a9aeb
6 changed files with 195 additions and 16 deletions
@@ -115,12 +115,15 @@ namespace FineUIPro.Web.HSSE.EduTrain
return;
}
string strSql = @"SELECT TestRecord.TestRecordId,TestRecord.TestPlanId, TestRecord.TestManId,TestRecord.TestStartTime,TestRecord.TestEndTime, TestRecord.TestScores,
(CASE WHEN TestPlan.PlanName IS NULL THEN Training.TrainingName ELSE TestPlan.PlanName END) AS PlanName,
ISNULL(TestPlan.Duration,90) AS Duration,ISNULL(TestPlan.TotalScore,100) AS TotalScore,TestPlan.TestPalce,ISNULL(TestPlan.QuestionCount,95) AS QuestionCount,TestRecord.TemporaryUser,Person.PersonName AS TestManName
--(CASE WHEN TestPlan.PlanName IS NULL THEN Training.TrainingName ELSE TestPlan.PlanName END) AS PlanName,
TC.CompanyTrainingName +'——'+TCItem.CompanyTrainingItemName AS PlanName,
ISNULL(TestPlan.Duration,120) AS Duration,ISNULL(TestPlan.TotalScore,100) AS TotalScore,TestPlan.TestPalce,ISNULL(TestPlan.QuestionCount,95) AS QuestionCount,TestRecord.TemporaryUser,Person.PersonName AS TestManName
,Unit.UnitName"
+ @" FROM dbo.Training_TestRecord AS TestRecord"
+ @" LEFT JOIN dbo.Training_TestPlan AS TestPlan ON TestPlan.TestPlanId=TestRecord.TestPlanId"
+ @" LEFT JOIN dbo.Training_TestTraining AS Training ON Training.TrainingId = TestRecord.TestType"
//+ @" LEFT JOIN dbo.Training_TestTraining AS Training ON Training.TrainingId = TestRecord.TestType"
+ @" LEFT JOIN dbo.Training_CompanyTrainingItem AS TCItem ON TCItem.CompanyTrainingItemId = TestRecord.CompanyTrainingItemId"
+ @" LEFT JOIN dbo.Training_CompanyTraining AS TC ON TC.CompanyTrainingId = TCItem.CompanyTrainingId"
+ @" LEFT JOIN dbo.SitePerson_Person AS Person ON Person.PersonId = TestRecord.TestManId "
+ @" LEFT JOIN dbo.Base_Unit AS Unit ON Person.UnitId=Unit.UnitId"
+ @" WHERE TestRecord.TestStartTime is not null and (isFiled IS NULL OR isFiled = 0) ";