|
|
|
@ -408,4 +408,69 @@ public class Ghre_CourseServices : BaseServices<Ghre_Course, Ghre_CourseDto, Ins |
|
|
|
|
NPOIHelper.ExportExcel(dt, null, "sheet1", physicsPath + path); |
|
|
|
|
return ServiceResult<string>.OprateSuccess("导出成功", path); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#region 获取公开课查询条件 |
|
|
|
|
public async Task<ServiceResult<CoursePublicSearch>> QueryPublicSearchFields(QueryBody body) |
|
|
|
|
{ |
|
|
|
|
var entity = new CoursePublicSearch(); |
|
|
|
|
string sql = @"SELECT Langkey field,
|
|
|
|
|
CASE {2} |
|
|
|
|
WHEN 1 THEN isnull (Value01, LangValue) |
|
|
|
|
WHEN 2 THEN isnull (Value02, LangValue) |
|
|
|
|
WHEN 3 THEN isnull (Value03, LangValue) |
|
|
|
|
WHEN 4 THEN isnull (Value04, LangValue) |
|
|
|
|
WHEN 5 THEN isnull (Value05, LangValue) |
|
|
|
|
WHEN 6 THEN isnull (Value06, LangValue) |
|
|
|
|
WHEN 7 THEN isnull (Value07, LangValue) |
|
|
|
|
WHEN 8 THEN isnull (Value08, LangValue) |
|
|
|
|
WHEN 9 THEN isnull (Value09, LangValue) |
|
|
|
|
WHEN 10 THEN isnull (Value10, LangValue) |
|
|
|
|
END label |
|
|
|
|
FROM Ghrs_LangKey |
|
|
|
|
WHERE IsEnable = 1 |
|
|
|
|
AND (LangKey LIKE 'GHR_Page%' OR LangKey LIKE 'GHR_Common%')";
|
|
|
|
|
sql = string.Format(sql, body.menuName, App.User.ID, body.langId); |
|
|
|
|
entity.DT_PageMutiMsg = await Db.Ado.SqlQueryAsync<DT_PageMutiMsg>(sql); |
|
|
|
|
entity.SearchFields.Add(new CoursePublicSearchField() |
|
|
|
|
{ |
|
|
|
|
label = "课程编号/名称", |
|
|
|
|
field = "CourseNoOrName", |
|
|
|
|
elementType = "Input", |
|
|
|
|
editable = true, |
|
|
|
|
required = false, |
|
|
|
|
multipleSelect = false, |
|
|
|
|
}); |
|
|
|
|
entity.SearchFields.Add(new CoursePublicSearchField() |
|
|
|
|
{ |
|
|
|
|
label = "课程分类", |
|
|
|
|
field = "CourseClassId", |
|
|
|
|
elementType = "ApiSelect", |
|
|
|
|
dataSource = "CommonList_TrainingCourseClass", |
|
|
|
|
editable = true, |
|
|
|
|
required = false, |
|
|
|
|
multipleSelect = false, |
|
|
|
|
}); |
|
|
|
|
entity.SearchFields.Add(new CoursePublicSearchField() |
|
|
|
|
{ |
|
|
|
|
label = "'课程场景", |
|
|
|
|
field = "CourseSceneId", |
|
|
|
|
elementType = "ApiSelect", |
|
|
|
|
dataSource = "CommonList_TrainingCourseScene", |
|
|
|
|
editable = true, |
|
|
|
|
required = false, |
|
|
|
|
multipleSelect = false, |
|
|
|
|
}); |
|
|
|
|
entity.SearchFields.Add(new CoursePublicSearchField() |
|
|
|
|
{ |
|
|
|
|
label = "'是否学过", |
|
|
|
|
field = "HasStudy", |
|
|
|
|
elementType = "ApiSelect", |
|
|
|
|
dataSource = "TBParaDetail_Train_CourseIsOpen", |
|
|
|
|
editable = true, |
|
|
|
|
required = false, |
|
|
|
|
multipleSelect = false, |
|
|
|
|
}); |
|
|
|
|
return ServiceResult<CoursePublicSearch>.OprateSuccess("", entity); |
|
|
|
|
} |
|
|
|
|
#endregion |
|
|
|
|
} |