From 23ad0c6b7b98f612834f3a1256c0ce6e5d9ce08f Mon Sep 17 00:00:00 2001 From: wyw <571921741@qq.com> Date: Wed, 22 Apr 2026 14:01:17 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=98=E5=BA=93=E4=B8=8D=E8=B6=B3=20?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E8=AF=AD=20=E5=9F=B9=E8=AE=AD=E5=86=85?= =?UTF-8?q?=E5=AE=B9=20isdelete=20=E5=8A=A0=E5=85=A5=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- APT.MS.Services/Services/SC/SE/SENewUserService.cs | 8 ++++---- .../Api/SEController/5SETTrainNotifyController.cs | 12 +++++------- .../Api/SEController/6SETrainRecordController.cs | 6 ++---- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/APT.MS.Services/Services/SC/SE/SENewUserService.cs b/APT.MS.Services/Services/SC/SE/SENewUserService.cs index 5312f8b..e2e7d36 100644 --- a/APT.MS.Services/Services/SC/SE/SENewUserService.cs +++ b/APT.MS.Services/Services/SC/SE/SENewUserService.cs @@ -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); diff --git a/APT.MicroApi/APT.SC.WebApi/Controllers/Api/SEController/5SETTrainNotifyController.cs b/APT.MicroApi/APT.SC.WebApi/Controllers/Api/SEController/5SETTrainNotifyController.cs index 292cf94..d48272e 100644 --- a/APT.MicroApi/APT.SC.WebApi/Controllers/Api/SEController/5SETTrainNotifyController.cs +++ b/APT.MicroApi/APT.SC.WebApi/Controllers/Api/SEController/5SETTrainNotifyController.cs @@ -142,7 +142,7 @@ namespace APT.SC.WebApi.Controllers.Api.SE if (ListCour == null || ListCour.Count() < 1) { - + #region 题目数量判断 var config = GetEntity(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(); 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 } diff --git a/APT.MicroApi/APT.SC.WebApi/Controllers/Api/SEController/6SETrainRecordController.cs b/APT.MicroApi/APT.SC.WebApi/Controllers/Api/SEController/6SETrainRecordController.cs index 37a9a41..a475a95 100644 --- a/APT.MicroApi/APT.SC.WebApi/Controllers/Api/SEController/6SETrainRecordController.cs +++ b/APT.MicroApi/APT.SC.WebApi/Controllers/Api/SEController/6SETrainRecordController.cs @@ -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(); 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); } }