From 598e79ee3ad5781f3da0b66f053dae6da78d77cd Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Thu, 16 Oct 2025 14:36:02 +0800 Subject: [PATCH] 1 --- SGGL/BLL/API/HSSE/APITestPlanService.cs | 21 ++++++++++++++++++ .../Controllers/HSSE/TestPlanController.cs | 22 +++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/SGGL/BLL/API/HSSE/APITestPlanService.cs b/SGGL/BLL/API/HSSE/APITestPlanService.cs index cf824cb3..a53c892b 100644 --- a/SGGL/BLL/API/HSSE/APITestPlanService.cs +++ b/SGGL/BLL/API/HSSE/APITestPlanService.cs @@ -532,5 +532,26 @@ namespace BLL APITrainRecordService.InsertTrainRecord(getTestPlan); } } + + #region 获取考试试题类型列表 + /// + /// 获取考试试题类型列表 + /// + /// + public static List getTestTraining() + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + var getDataLists = (from x in db.Training_TestTraining + orderby x.TrainingCode + select new Model.TestPlanTrainingItem + { + TrainingTypeId = x.TrainingId, + TrainingTypeName = x.TrainingName, + }).ToList(); + return getDataLists; + } + } + #endregion } } diff --git a/SGGL/WebAPI/Controllers/HSSE/TestPlanController.cs b/SGGL/WebAPI/Controllers/HSSE/TestPlanController.cs index df098471..58c16176 100644 --- a/SGGL/WebAPI/Controllers/HSSE/TestPlanController.cs +++ b/SGGL/WebAPI/Controllers/HSSE/TestPlanController.cs @@ -244,5 +244,27 @@ namespace WebAPI.Controllers return responeData; } #endregion + + #region 获取考试试题类型列表 + /// + /// 获取考试试题类型列表 + /// + /// 考试计划ID + /// 试题类型 + public Model.ResponeData getTestTrainingList() + { + var responeData = new Model.ResponeData(); + try + { + responeData.data = APITestPlanService.getTestTraining(); + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + return responeData; + } + #endregion } }