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