|
|
|
@ -15,6 +15,7 @@ using Tiobon.Core.Common.Helper; |
|
|
|
|
using Microsoft.AspNetCore.Http; |
|
|
|
|
using Tiobon.Core.Common.UserManager; |
|
|
|
|
using MathNet.Numerics.Distributions; |
|
|
|
|
using System.Drawing.Drawing2D; |
|
|
|
|
|
|
|
|
|
namespace Tiobon.Core.Services; |
|
|
|
|
|
|
|
|
@ -323,6 +324,12 @@ public class Ghre_ExamServices : BaseServices<Ghre_Exam, Ghre_ExamDto, InsertGhr |
|
|
|
|
x.canEdit = 0; |
|
|
|
|
x.canDelete = 0; |
|
|
|
|
} |
|
|
|
|
if (x.Status == "Released") |
|
|
|
|
{ |
|
|
|
|
x.showLink = 0; |
|
|
|
|
x.showResult = 0; |
|
|
|
|
x.canClose = 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (x.Status == "Disabled") |
|
|
|
|
{ |
|
|
|
@ -791,4 +798,21 @@ public class Ghre_ExamServices : BaseServices<Ghre_Exam, Ghre_ExamDto, InsertGhr |
|
|
|
|
} |
|
|
|
|
catch (Exception) { throw; } |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public async Task<ServiceResult> Copy(long id) |
|
|
|
|
{ |
|
|
|
|
var exam = await base.QueryById(id); |
|
|
|
|
var staffs = await _ghre_ExamStaffServices.Query(x => x.ExamId == id); |
|
|
|
|
exam.Status = "Draft"; |
|
|
|
|
|
|
|
|
|
var insert = Mapper.Map(exam).ToANew<InsertGhre_ExamInput>(); |
|
|
|
|
var insertStaffs = Mapper.Map(exam).ToANew<List<InsertGhre_ExamStaffInput>>(); |
|
|
|
|
id = await base.Add(insert); |
|
|
|
|
insertStaffs.ForEach(x => x.ExamId = id); |
|
|
|
|
await _ghre_ExamStaffServices.Add(insertStaffs); |
|
|
|
|
|
|
|
|
|
return ServiceResult.OprateSuccess("复制成功!"); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |