|
|
@ -8,6 +8,7 @@ using Newtonsoft.Json.Linq; |
|
|
|
using Tiobon.Core.Common; |
|
|
|
using Tiobon.Core.Common; |
|
|
|
using Tiobon.Core.Model; |
|
|
|
using Tiobon.Core.Model; |
|
|
|
using Newtonsoft.Json; |
|
|
|
using Newtonsoft.Json; |
|
|
|
|
|
|
|
using Tiobon.Core.Common.Helper; |
|
|
|
|
|
|
|
|
|
|
|
namespace Tiobon.Core.Services |
|
|
|
namespace Tiobon.Core.Services |
|
|
|
{ |
|
|
|
{ |
|
|
@ -113,6 +114,12 @@ namespace Tiobon.Core.Services |
|
|
|
|
|
|
|
|
|
|
|
var entitys = await Db.Ado.SqlQueryAsync<Ghre_StudyRecordDto>(sql); |
|
|
|
var entitys = await Db.Ado.SqlQueryAsync<Ghre_StudyRecordDto>(sql); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
entitys.ForEach(entity => |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(entity.Indate)) |
|
|
|
|
|
|
|
entity.Indate = DateTimeHelper.ConvertToDayString(entity.Indate); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
return new ServicePageResult<Ghre_StudyRecordDto>(filter.pageNum, total, filter.pageSize, entitys); |
|
|
|
return new ServicePageResult<Ghre_StudyRecordDto>(filter.pageNum, total, filter.pageSize, entitys); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
@ -161,7 +168,7 @@ namespace Tiobon.Core.Services |
|
|
|
}); |
|
|
|
}); |
|
|
|
entity.SearchFields.Add(new CoursePublicSearchField() |
|
|
|
entity.SearchFields.Add(new CoursePublicSearchField() |
|
|
|
{ |
|
|
|
{ |
|
|
|
label = "'课程场景", |
|
|
|
label = "课程场景", |
|
|
|
field = "CourseSceneId", |
|
|
|
field = "CourseSceneId", |
|
|
|
elementType = "ApiSelect", |
|
|
|
elementType = "ApiSelect", |
|
|
|
dataSource = "CommonList_TrainingCourseScene", |
|
|
|
dataSource = "CommonList_TrainingCourseScene", |
|
|
@ -171,7 +178,7 @@ namespace Tiobon.Core.Services |
|
|
|
}); |
|
|
|
}); |
|
|
|
entity.SearchFields.Add(new CoursePublicSearchField() |
|
|
|
entity.SearchFields.Add(new CoursePublicSearchField() |
|
|
|
{ |
|
|
|
{ |
|
|
|
label = "'课程状态", |
|
|
|
label = "课程状态", |
|
|
|
field = "CourseStatus", |
|
|
|
field = "CourseStatus", |
|
|
|
elementType = "ApiSelect", |
|
|
|
elementType = "ApiSelect", |
|
|
|
dataSource = "TBParaDetail_Train_CourseIsOpen", |
|
|
|
dataSource = "TBParaDetail_Train_CourseIsOpen", |
|
|
@ -181,7 +188,7 @@ namespace Tiobon.Core.Services |
|
|
|
}); |
|
|
|
}); |
|
|
|
entity.SearchFields.Add(new CoursePublicSearchField() |
|
|
|
entity.SearchFields.Add(new CoursePublicSearchField() |
|
|
|
{ |
|
|
|
{ |
|
|
|
label = "'学习状态", |
|
|
|
label = "学习状态", |
|
|
|
field = "StudyStatus", |
|
|
|
field = "StudyStatus", |
|
|
|
elementType = "ApiSelect", |
|
|
|
elementType = "ApiSelect", |
|
|
|
dataSource = "TBParaDetail_Train_CourseIsOpen", |
|
|
|
dataSource = "TBParaDetail_Train_CourseIsOpen", |
|
|
@ -249,13 +256,20 @@ namespace Tiobon.Core.Services |
|
|
|
var value = jProperty.Value.ToString(); |
|
|
|
var value = jProperty.Value.ToString(); |
|
|
|
if (name == "page" || name == "pageSize") |
|
|
|
if (name == "page" || name == "pageSize") |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
//if (name == "Date") |
|
|
|
if (name == "CourseNoOrName") |
|
|
|
//{ |
|
|
|
{ |
|
|
|
// var jsonParam = JsonConvert.DeserializeObject<JsonParam1>(value); |
|
|
|
var jsonParam = JsonConvert.DeserializeObject<JsonParam>(value); |
|
|
|
// conditions += $" AND (Date BETWEEN '{jsonParam.columnValue[0]}' AND '{jsonParam.columnValue[1]}')"; |
|
|
|
conditions += $" AND CourseName LIKE '%{jsonParam.columnValue}%'"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (name == "CourseClassId") |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
var jsonParam = JsonConvert.DeserializeObject<JsonParam>(value); |
|
|
|
|
|
|
|
conditions += $" AND CourseClassId LIKE '%{jsonParam.columnValue}%' "; |
|
|
|
|
|
|
|
|
|
|
|
// continue; |
|
|
|
continue; |
|
|
|
//} |
|
|
|
} |
|
|
|
if (!string.IsNullOrWhiteSpace(value)) |
|
|
|
if (!string.IsNullOrWhiteSpace(value)) |
|
|
|
{ |
|
|
|
{ |
|
|
|
var jsonParam = JsonConvert.DeserializeObject<JsonParam>(value); |
|
|
|
var jsonParam = JsonConvert.DeserializeObject<JsonParam>(value); |
|
|
|