题库不足 提示语 培训内容 isdelete 加入判断
This commit is contained in:
parent
1194c83d60
commit
23ad0c6b7b
@ -130,23 +130,23 @@ namespace APT.BaseData.Services.DomainServices
|
||||
Msg = "";
|
||||
if (SCurrentCount < SCount)
|
||||
{
|
||||
Msg += "题库中题目数量不足!";
|
||||
//Msg += "题库中题目数量不足!";
|
||||
Msg += "单选题还需" + (SCount - SCurrentCount) + "题\n";
|
||||
}
|
||||
if (MCurrentCount < MCount)
|
||||
{
|
||||
Msg += "题库中题目数量不足!";
|
||||
//Msg += "题库中题目数量不足!";
|
||||
Msg += "多选题还需" + (MCount - MCurrentCount) + "题\n";
|
||||
}
|
||||
if (CCurrentCount < CCount)
|
||||
{
|
||||
Msg += "题库中题目数量不足!";
|
||||
//Msg += "题库中题目数量不足!";
|
||||
Msg += "是非题还需" + (CCount - CCurrentCount) + "题\n";
|
||||
}
|
||||
|
||||
if (Msg != "")
|
||||
{
|
||||
Msg = "知识点 " + Msg + " 没有题目!";
|
||||
Msg = "题库中题目数量不足!知识点 " + Msg + " 没有题目!";
|
||||
return false;
|
||||
}
|
||||
CreateTestList(allTests, testidlist, pointIDS, (int)SETestTypeEnum.是非题, CCount);
|
||||
|
||||
@ -142,7 +142,7 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
||||
|
||||
if (ListCour == null || ListCour.Count() < 1)
|
||||
{
|
||||
|
||||
|
||||
#region 题目数量判断
|
||||
|
||||
var config = GetEntity<T_SE_SECONFIG>(t => true);
|
||||
@ -175,7 +175,7 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
||||
}
|
||||
}
|
||||
}
|
||||
var pointIDS = Nav_TrainContentList.Select(t => t.POINT_ID).ToList();
|
||||
var pointIDS = Nav_TrainContentList.Where(e => !e.IS_DELETED).Select(t => t.POINT_ID).ToList();
|
||||
var testidlist = new List<Guid>();
|
||||
var testFilter = new BaseFilter(entity.ORG_ID);
|
||||
testFilter.Include = new string[] { "Nav_Points" };
|
||||
@ -207,24 +207,22 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
||||
errorMsg = "";
|
||||
if (SCurrentCount < SCount)
|
||||
{
|
||||
errorMsg += "题库中题目数量不足!";
|
||||
errorMsg += "单选题还需" + (SCount - SCurrentCount) + "题\n";
|
||||
}
|
||||
if (MCurrentCount < MCount)
|
||||
{
|
||||
errorMsg += "题库中题目数量不足!";
|
||||
errorMsg += "多选题还需" + (MCount - MCurrentCount) + "题\n";
|
||||
}
|
||||
if (CCurrentCount < CCount)
|
||||
{
|
||||
errorMsg += "题库中题目数量不足!";
|
||||
errorMsg += "是非题还需" + (CCount - CCurrentCount) + "题\n";
|
||||
}
|
||||
if (errorMsg != "")
|
||||
{
|
||||
errorMsg = "题库中题目数量不足!\n" + errorMsg;
|
||||
throw new Exception(errorMsg);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
@ -125,7 +125,7 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
||||
}
|
||||
}
|
||||
}
|
||||
var pointIDS = data.Nav_Notify.Nav_TrainContentList.Select(t => t.POINT_ID).ToList();
|
||||
var pointIDS = data.Nav_Notify.Nav_TrainContentList.Where(e => !e.IS_DELETED).Select(t => t.POINT_ID).ToList();
|
||||
var testidlist = new List<Guid>();
|
||||
var testFilter = new BaseFilter(entity.ORG_ID);
|
||||
testFilter.Include = new string[] { "Nav_Points" };
|
||||
@ -162,21 +162,19 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
||||
errorMsg = "";
|
||||
if (SCurrentCount < SCount)
|
||||
{
|
||||
errorMsg += "题库中题目数量不足!";
|
||||
errorMsg += "单选题还需" + (SCount - SCurrentCount) + "题\n";
|
||||
}
|
||||
if (MCurrentCount < MCount)
|
||||
{
|
||||
errorMsg += "题库中题目数量不足!";
|
||||
errorMsg += "多选题还需" + (MCount - MCurrentCount) + "题\n";
|
||||
}
|
||||
if (CCurrentCount < CCount)
|
||||
{
|
||||
errorMsg += "题库中题目数量不足!";
|
||||
errorMsg += "是非题还需" + (CCount - CCurrentCount) + "题\n";
|
||||
}
|
||||
if (errorMsg != "")
|
||||
{
|
||||
errorMsg = "题库中题目数量不足!\n" + errorMsg;
|
||||
throw new Exception(errorMsg);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user