|
|
|
@ -9,7 +9,6 @@ using Tiobon.Core.Model; |
|
|
|
|
using Tiobon.Core.Common; |
|
|
|
|
using AgileObjects.AgileMapper; |
|
|
|
|
using Newtonsoft.Json; |
|
|
|
|
using System.Text.RegularExpressions; |
|
|
|
|
using Newtonsoft.Json.Linq; |
|
|
|
|
using SqlSugar; |
|
|
|
|
|
|
|
|
@ -269,4 +268,183 @@ public class Ghre_ExamServices : BaseServices<Ghre_Exam, Ghre_ExamDto, InsertGhr |
|
|
|
|
return new ServicePageResult<Ghre_Exam>(filter.pageNum, totalCount, filter.pageSize, list); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public async Task<ServiceResult<DefaultGhre_ExamInput>> QueryDefault(long Id) |
|
|
|
|
{ |
|
|
|
|
var input = new DefaultGhre_ExamInput(); |
|
|
|
|
|
|
|
|
|
#region baseColumns |
|
|
|
|
var baseColumns = new List<DefaultGhre_ExamColumn> |
|
|
|
|
{ |
|
|
|
|
new DefaultGhre_ExamColumn() |
|
|
|
|
{ |
|
|
|
|
label = "关联课程", |
|
|
|
|
field = "LinkType", |
|
|
|
|
elementType = "RadioBox", |
|
|
|
|
required = true, |
|
|
|
|
multipleSelect = false, |
|
|
|
|
editable = false, |
|
|
|
|
}, |
|
|
|
|
new DefaultGhre_ExamColumn() |
|
|
|
|
{ |
|
|
|
|
label = "课程名称", |
|
|
|
|
field = "CourseId", |
|
|
|
|
elementType = "ApiSelect", |
|
|
|
|
required = true, |
|
|
|
|
multipleSelect = false, |
|
|
|
|
editable = true, |
|
|
|
|
}, |
|
|
|
|
new DefaultGhre_ExamColumn() |
|
|
|
|
{ |
|
|
|
|
label = "选择试卷", |
|
|
|
|
field = "ExamPaperId", |
|
|
|
|
elementType = "ApiSelect", |
|
|
|
|
required = true, |
|
|
|
|
multipleSelect = false, |
|
|
|
|
editable = true, |
|
|
|
|
}, |
|
|
|
|
new DefaultGhre_ExamColumn() |
|
|
|
|
{ |
|
|
|
|
label = "考试编号", |
|
|
|
|
field = "ExamNo", |
|
|
|
|
elementType = "Input", |
|
|
|
|
required =false , |
|
|
|
|
multipleSelect = false, |
|
|
|
|
editable = false |
|
|
|
|
}, |
|
|
|
|
new DefaultGhre_ExamColumn() |
|
|
|
|
{ |
|
|
|
|
label = "考试名称", |
|
|
|
|
field = "ExamName", |
|
|
|
|
elementType = "Input", |
|
|
|
|
required = true, |
|
|
|
|
multipleSelect = false, |
|
|
|
|
editable = true, |
|
|
|
|
}, |
|
|
|
|
new DefaultGhre_ExamColumn() |
|
|
|
|
{ |
|
|
|
|
label = "考试日期", |
|
|
|
|
field = "DateType", |
|
|
|
|
elementType = "RadioBox", |
|
|
|
|
required = true, |
|
|
|
|
multipleSelect = false, |
|
|
|
|
editable = true, |
|
|
|
|
}, |
|
|
|
|
new DefaultGhre_ExamColumn() |
|
|
|
|
{ |
|
|
|
|
label = "考试区间", |
|
|
|
|
field = "ExamDate", |
|
|
|
|
elementType = "GRangePicker", |
|
|
|
|
required = true, |
|
|
|
|
multipleSelect = false, |
|
|
|
|
editable = true, |
|
|
|
|
}, |
|
|
|
|
new DefaultGhre_ExamColumn() |
|
|
|
|
{ |
|
|
|
|
label = "学完多久", |
|
|
|
|
field = "AfterHowLong", |
|
|
|
|
elementType = "RadioBox", |
|
|
|
|
required = false, |
|
|
|
|
multipleSelect = false, |
|
|
|
|
editable = true, |
|
|
|
|
}, |
|
|
|
|
new DefaultGhre_ExamColumn() |
|
|
|
|
{ |
|
|
|
|
label = "考试形式", |
|
|
|
|
field = "ExamMode", |
|
|
|
|
elementType = "RadioBox", |
|
|
|
|
required = false, |
|
|
|
|
multipleSelect = false, |
|
|
|
|
editable = true, |
|
|
|
|
}, |
|
|
|
|
new DefaultGhre_ExamColumn() |
|
|
|
|
{ |
|
|
|
|
label = "线下考试地点", |
|
|
|
|
field = "ExamPlace", |
|
|
|
|
elementType = "Input", |
|
|
|
|
required = true, |
|
|
|
|
multipleSelect = false, |
|
|
|
|
editable = true, |
|
|
|
|
}, |
|
|
|
|
new DefaultGhre_ExamColumn() |
|
|
|
|
{ |
|
|
|
|
label = "关联开班", |
|
|
|
|
field = "IsLinkOpenClass", |
|
|
|
|
elementType = "RadioBox", |
|
|
|
|
required = true, |
|
|
|
|
multipleSelect = false, |
|
|
|
|
editable = true |
|
|
|
|
}, |
|
|
|
|
new DefaultGhre_ExamColumn() |
|
|
|
|
{ |
|
|
|
|
label = "考试说明", |
|
|
|
|
field = "RemarkSz", |
|
|
|
|
elementType = "InputTextArea", |
|
|
|
|
required = true, |
|
|
|
|
multipleSelect = false, |
|
|
|
|
editable = true |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
#region staffTableColumns |
|
|
|
|
|
|
|
|
|
var staffTableColumns = new List<DefaultGhre_ExamColumn> |
|
|
|
|
{ |
|
|
|
|
new DefaultGhre_ExamColumn() |
|
|
|
|
{ |
|
|
|
|
label = "工号", |
|
|
|
|
field = "StaffNo", |
|
|
|
|
align = "center", |
|
|
|
|
}, |
|
|
|
|
new DefaultGhre_ExamColumn() |
|
|
|
|
{ |
|
|
|
|
label = "姓名", |
|
|
|
|
field = "StaffName", |
|
|
|
|
align = "center", |
|
|
|
|
}, new DefaultGhre_ExamColumn() |
|
|
|
|
{ |
|
|
|
|
label = "部门", |
|
|
|
|
field = "DeptName", |
|
|
|
|
align = "center", |
|
|
|
|
}, new DefaultGhre_ExamColumn() |
|
|
|
|
{ |
|
|
|
|
label = "岗位", |
|
|
|
|
field = "TitleName", |
|
|
|
|
align = "center", |
|
|
|
|
}, new DefaultGhre_ExamColumn() |
|
|
|
|
{ |
|
|
|
|
label = "入职日期", |
|
|
|
|
field = "InDate", |
|
|
|
|
align = "center", |
|
|
|
|
}, new DefaultGhre_ExamColumn() |
|
|
|
|
{ |
|
|
|
|
label = "邮箱", |
|
|
|
|
field = "Mail", |
|
|
|
|
align = "center", |
|
|
|
|
width=200 |
|
|
|
|
}, new DefaultGhre_ExamColumn() |
|
|
|
|
{ |
|
|
|
|
label = "数据来源", |
|
|
|
|
field = "DataSource", |
|
|
|
|
align = "center", |
|
|
|
|
width=200 |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region pageData |
|
|
|
|
if (Id != 0) |
|
|
|
|
{ |
|
|
|
|
var exam = await base.QueryById(Id); |
|
|
|
|
input.pageData = Mapper.Map(exam).ToANew<DefaultGhre_ExamPageData>(); |
|
|
|
|
} |
|
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
input.baseColumns = baseColumns; |
|
|
|
|
input.staffTableColumns = staffTableColumns; |
|
|
|
|
return ServiceResult<DefaultGhre_ExamInput>.OprateSuccess("查询成功!", input); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |