|
|
@ -28,8 +28,12 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe |
|
|
|
//_ghre_ExamPaperServices = ghre_ExamPaperServices; |
|
|
|
//_ghre_ExamPaperServices = ghre_ExamPaperServices; |
|
|
|
_logger = logger; |
|
|
|
_logger = logger; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public override async Task<ServicePageResult<Ghre_ExamRecordDto>> QueryFilterPage(QueryBody filter, string condition, bool? IsEnable = true) |
|
|
|
public override async Task<ServicePageResult<Ghre_ExamRecordDto>> QueryFilterPage(QueryBody filter, string condition, bool? IsEnable = true) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return await QueryFilterPage1(filter, condition, IsEnable, false); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public async Task<ServicePageResult<Ghre_ExamRecordDto>> QueryFilterPage1(QueryBody filter, string condition, bool? IsEnable = true, bool? IsSingle = true) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (string.IsNullOrWhiteSpace(filter.orderBy)) |
|
|
|
if (string.IsNullOrWhiteSpace(filter.orderBy)) |
|
|
|
filter.orderBy = "CreateTime1 DESC"; |
|
|
|
filter.orderBy = "CreateTime1 DESC"; |
|
|
@ -42,7 +46,8 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe |
|
|
|
FROM Ghre_ExamRecord_V A";
|
|
|
|
FROM Ghre_ExamRecord_V A";
|
|
|
|
|
|
|
|
|
|
|
|
string conditions = " WHERE IsEnable = 1"; |
|
|
|
string conditions = " WHERE IsEnable = 1"; |
|
|
|
conditions += $" AND dbo.FUserDataBelongPriv ({App.User.ID}, A.DataBelongID, NULL) = 1"; |
|
|
|
if (IsSingle == false) |
|
|
|
|
|
|
|
conditions += $" AND dbo.FUserDataBelongPriv ({App.User.ID}, A.DataBelongID, NULL) = 1"; |
|
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(condition)) conditions += " AND " + condition; |
|
|
|
if (!string.IsNullOrEmpty(condition)) conditions += " AND " + condition; |
|
|
|
if (filter.jsonParam != null) |
|
|
|
if (filter.jsonParam != null) |
|
|
@ -151,7 +156,7 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe |
|
|
|
|
|
|
|
|
|
|
|
public async Task<ServicePageResult<Ghre_ExamRecordDto>> Query(string examId, QueryBody body) |
|
|
|
public async Task<ServicePageResult<Ghre_ExamRecordDto>> Query(string examId, QueryBody body) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return await QueryFilterPage(body, $"ExamId='{examId}'"); |
|
|
|
return await QueryFilterPage1(body, $"ExamId='{examId}'"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public async Task<ServiceResult> ModifyAdjustScore(string examRecordId, EditGhre_ExamRecordInput edit) |
|
|
|
public async Task<ServiceResult> ModifyAdjustScore(string examRecordId, EditGhre_ExamRecordInput edit) |
|
|
@ -427,7 +432,7 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe |
|
|
|
var body = new QueryBody(); |
|
|
|
var body = new QueryBody(); |
|
|
|
body.pageNum = 1; |
|
|
|
body.pageNum = 1; |
|
|
|
body.pageSize = 10000; |
|
|
|
body.pageSize = 10000; |
|
|
|
var records = await QueryFilterPage(body, $"ExamId='{record.ExamId}'"); |
|
|
|
var records = await QueryFilterPage1(body, $"ExamId='{record.ExamId}'"); |
|
|
|
var records1 = records.result.DT_TableDataT1; |
|
|
|
var records1 = records.result.DT_TableDataT1; |
|
|
|
int index = records1.FindIndex(x => x.Id == examRecordId); |
|
|
|
int index = records1.FindIndex(x => x.Id == examRecordId); |
|
|
|
|
|
|
|
|
|
|
@ -605,7 +610,7 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe |
|
|
|
|
|
|
|
|
|
|
|
if (examRecordId == 0) examRecordId = id; |
|
|
|
if (examRecordId == 0) examRecordId = id; |
|
|
|
|
|
|
|
|
|
|
|
var records = await QueryFilterPage(body, $"Id='{examRecordId}' AND StaffId='{staffId}'"); |
|
|
|
var records = await QueryFilterPage1(body, $"Id='{examRecordId}' AND StaffId='{staffId}'"); |
|
|
|
|
|
|
|
|
|
|
|
if (!records.result.DT_TableDataT1.Any()) |
|
|
|
if (!records.result.DT_TableDataT1.Any()) |
|
|
|
return ServiceResult<QueryExam>.OprateFailed("无效的考试链接!"); |
|
|
|
return ServiceResult<QueryExam>.OprateFailed("无效的考试链接!"); |
|
|
|