xiaochanghai 4 months ago
parent e892c1d126
commit fbf5447558
  1. 9
      Tiobon.Core.Services/Ghre/Ghre_ExamServices.cs

@ -1227,6 +1227,8 @@ public class Ghre_ExamServices : BaseServices<Ghre_Exam, Ghre_ExamDto, InsertGhr
{ {
#region 判断相关联课件是否存在 #region 判断相关联课件是否存在
if (entity.IsRequireStudy == true)
{
var sql = $@"SELECT count(0) var sql = $@"SELECT count(0)
FROM Ghre_CourseWare A FROM Ghre_CourseWare A
WHERE A.Id IN WHERE A.Id IN
@ -1239,6 +1241,7 @@ public class Ghre_ExamServices : BaseServices<Ghre_Exam, Ghre_ExamDto, InsertGhr
if (entity.LinkType == "CourseId") if (entity.LinkType == "CourseId")
return ServiceResult.OprateFailed("该考试关联的课程未维护课件,暂不可取消归档!"); return ServiceResult.OprateFailed("该考试关联的课程未维护课件,暂不可取消归档!");
} }
}
#endregion #endregion
if (entity.LinkType == "CourseId") if (entity.LinkType == "CourseId")
@ -1262,6 +1265,8 @@ public class Ghre_ExamServices : BaseServices<Ghre_Exam, Ghre_ExamDto, InsertGhr
{ {
#region 判断相关联课件是否存在 #region 判断相关联课件是否存在
if (entity.IsRequireStudy == true)
{
var sql = $@"SELECT count(0) var sql = $@"SELECT count(0)
FROM Ghre_CourseWare A FROM Ghre_CourseWare A
WHERE A.Id IN WHERE A.Id IN
@ -1272,9 +1277,11 @@ public class Ghre_ExamServices : BaseServices<Ghre_Exam, Ghre_ExamDto, InsertGhr
if (count == 0) if (count == 0)
{ {
if (entity.LinkType == "CourseId") if (entity.LinkType == "CourseId")
return ServiceResult.OprateFailed("该考试关联的课程未维护课件,暂不可发布!"); return ServiceResult.OprateFailed("该考试关联的课程未维护课件,暂不可取消归档!");
}
} }
#endregion #endregion
var ids1 = ids.Where(x => id != x).ToList(); var ids1 = ids.Where(x => id != x).ToList();
if (entity.LinkType == DIC_EXAM_LINK_TYPE_COURSE) if (entity.LinkType == DIC_EXAM_LINK_TYPE_COURSE)
{ {

Loading…
Cancel
Save