|
|
|
@ -1,5 +1,4 @@ |
|
|
|
|
using MongoDB.Driver.Linq; |
|
|
|
|
using System.Drawing.Drawing2D; |
|
|
|
|
using static Tiobon.Core.Model.Consts; |
|
|
|
|
|
|
|
|
|
namespace Tiobon.Core.Services; |
|
|
|
@ -458,7 +457,7 @@ public class Ghre_ExamServices : BaseServices<Ghre_Exam, Ghre_ExamDto, InsertGhr |
|
|
|
|
public async Task<ServicePageResult<Ghre_ExamDto>> QueryFilterPage1(QueryBody filter, string status = null, List<long> ids = null) |
|
|
|
|
{ |
|
|
|
|
RefAsync<int> totalCount = 0; |
|
|
|
|
string sql = @"SELECT *
|
|
|
|
|
string sql = @$"SELECT *
|
|
|
|
|
FROM (SELECT A.*, |
|
|
|
|
CASE |
|
|
|
|
WHEN A.LinkType = 'CourseId' THEN B.CourseName |
|
|
|
@ -473,7 +472,7 @@ public class Ghre_ExamServices : BaseServices<Ghre_Exam, Ghre_ExamDto, InsertGhr |
|
|
|
|
LEFT JOIN Ghre_Course B ON A.CourseId = B.Id |
|
|
|
|
LEFT JOIN Ghre_CourseScene D ON A.CourseSceneId = D.Id |
|
|
|
|
LEFT JOIN Ghre_ExamPaper E ON A.ExamPaperId = E.Id |
|
|
|
|
WHERE A.IsEnable = 1) A";
|
|
|
|
|
WHERE A.IsEnable = 1 AND dbo.FUserDataBelongPriv ({App.User.ID}, A.DataBelongID, NULL) = 1) A";
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(filter.orderBy)) |
|
|
|
|
filter.orderBy = "CreateTime1 DESC"; |
|
|
|
@ -998,6 +997,17 @@ public class Ghre_ExamServices : BaseServices<Ghre_Exam, Ghre_ExamDto, InsertGhr |
|
|
|
|
required = true, |
|
|
|
|
multipleSelect = false, |
|
|
|
|
editable = true |
|
|
|
|
}, |
|
|
|
|
new DefaultGhre_ExamColumn() |
|
|
|
|
{ |
|
|
|
|
label = "集团数据归属", |
|
|
|
|
field = "DataBelongID", |
|
|
|
|
elementType = "ApiSelect", |
|
|
|
|
required = false, |
|
|
|
|
multipleSelect = false, |
|
|
|
|
editable = true, |
|
|
|
|
dataSource = "CommonList_DataBelongAll", |
|
|
|
|
placeholder = "" |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
@ -1404,13 +1414,13 @@ public class Ghre_ExamServices : BaseServices<Ghre_Exam, Ghre_ExamDto, InsertGhr |
|
|
|
|
if (entity.LinkType == DIC_EXAM_LINK_TYPE_COURSE) |
|
|
|
|
{ |
|
|
|
|
var ids1 = await Db.Queryable<Ghre_Exam>() |
|
|
|
|
.Where(x => |
|
|
|
|
x.Source == null && |
|
|
|
|
x.Status == DIC_EXAM_STATUS.RELEASED && |
|
|
|
|
x.CourseId == entity.CourseId && |
|
|
|
|
.Where(x => |
|
|
|
|
x.Source == null && |
|
|
|
|
x.Status == DIC_EXAM_STATUS.RELEASED && |
|
|
|
|
x.CourseId == entity.CourseId && |
|
|
|
|
x.Id != id) |
|
|
|
|
.Select(x => x.Id).ToListAsync(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 校验同一个课程下 考试时间不允许重叠 |
|
|
|
|
var exams = await base.Query(x => ( |
|
|
|
|
x.Source == null && |
|
|
|
|