|
|
|
@ -452,7 +452,7 @@ public class Ghre_CourseServices : BaseServices<Ghre_Course, Ghre_CourseDto, Ins |
|
|
|
|
}); |
|
|
|
|
entity.SearchFields.Add(new CoursePublicSearchField() |
|
|
|
|
{ |
|
|
|
|
label = "'课程场景", |
|
|
|
|
label = "课程场景", |
|
|
|
|
field = "CourseSceneId", |
|
|
|
|
elementType = "ApiSelect", |
|
|
|
|
dataSource = "CommonList_TrainingCourseScene", |
|
|
|
@ -462,7 +462,7 @@ public class Ghre_CourseServices : BaseServices<Ghre_Course, Ghre_CourseDto, Ins |
|
|
|
|
}); |
|
|
|
|
entity.SearchFields.Add(new CoursePublicSearchField() |
|
|
|
|
{ |
|
|
|
|
label = "'是否学过", |
|
|
|
|
label = "是否学过", |
|
|
|
|
field = "HasStudy", |
|
|
|
|
elementType = "ApiSelect", |
|
|
|
|
dataSource = "TBParaDetail_Train_CourseIsOpen", |
|
|
|
@ -506,7 +506,7 @@ public class Ghre_CourseServices : BaseServices<Ghre_Course, Ghre_CourseDto, Ins |
|
|
|
|
if (string.IsNullOrWhiteSpace(filter.orderBy)) |
|
|
|
|
filter.orderBy = "CourseName ASC"; |
|
|
|
|
|
|
|
|
|
string conditions = "1=1"; |
|
|
|
|
string conditions = " AND 1=1"; |
|
|
|
|
if (filter.jsonParam != null) |
|
|
|
|
foreach (JProperty jProperty in filter.jsonParam.Properties()) |
|
|
|
|
{ |
|
|
|
@ -515,13 +515,20 @@ public class Ghre_CourseServices : BaseServices<Ghre_Course, Ghre_CourseDto, Ins |
|
|
|
|
if (name == "page" || name == "pageSize") |
|
|
|
|
continue; |
|
|
|
|
|
|
|
|
|
//if (name == "Indate") |
|
|
|
|
//{ |
|
|
|
|
// var jsonParam = JsonConvert.DeserializeObject<JsonParam1>(value); |
|
|
|
|
// conditions += $" AND (Indate BETWEEN '{jsonParam.columnValue[0]}' AND '{jsonParam.columnValue[1]}')"; |
|
|
|
|
if (name == "CourseNoOrName") |
|
|
|
|
{ |
|
|
|
|
var jsonParam = JsonConvert.DeserializeObject<JsonParam>(value); |
|
|
|
|
conditions += $" AND (CourseNo LIKE '%{jsonParam.columnValue}%' OR CourseName LIKE '%{jsonParam.columnValue}%')"; |
|
|
|
|
|
|
|
|
|
// continue; |
|
|
|
|
//} |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
if (name == "CourseClassId") |
|
|
|
|
{ |
|
|
|
|
var jsonParam = JsonConvert.DeserializeObject<JsonParam>(value); |
|
|
|
|
conditions += $" AND CourseClassId LIKE '%{jsonParam.columnValue}%' "; |
|
|
|
|
|
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
//if (name == "Date") |
|
|
|
|
//{ |
|
|
|
|
// var jsonParam = JsonConvert.DeserializeObject<JsonParam1>(value); |
|
|
|
@ -605,7 +612,7 @@ public class Ghre_CourseServices : BaseServices<Ghre_Course, Ghre_CourseDto, Ins |
|
|
|
|
//if (ids != null && ids.Any()) |
|
|
|
|
// conditions += $" AND Id IN({string.Join(",", ids)})"; |
|
|
|
|
|
|
|
|
|
sql = string.Format(sql, conditions); |
|
|
|
|
sql += conditions; |
|
|
|
|
if (filter.pageSize == 0) |
|
|
|
|
filter.pageSize = 10000; |
|
|
|
|
var data = await Db.SqlQueryable<CoursePublic>(sql) |
|
|
|
|