From b913f49cd8168a75f474107f9e9294ab2089d74f Mon Sep 17 00:00:00 2001 From: Frane Date: Tue, 14 Jun 2022 09:40:17 +0800 Subject: [PATCH] =?UTF-8?q?20220614=20=E4=BF=AE=E5=A4=8D=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E4=BA=A4=E5=8D=B7=E6=9C=AA=E8=AE=A1=E7=AE=97=E6=9C=80=E5=90=8E?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E7=AD=94=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DataBase/版本日志/SGGLDB_V2022-06-14-001.sql | 7 +++++++ .../版本日志/SGGLDB_V2022-06-14-001修改明细.txt | 3 +++ SGGL/BLL/API/APIPersonService.cs | 3 ++- SGGL/WebAPI/Controllers/HSSE/TestRecordController.cs | 7 ++----- 4 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 DataBase/版本日志/SGGLDB_V2022-06-14-001.sql create mode 100644 DataBase/版本日志/SGGLDB_V2022-06-14-001修改明细.txt diff --git a/DataBase/版本日志/SGGLDB_V2022-06-14-001.sql b/DataBase/版本日志/SGGLDB_V2022-06-14-001.sql new file mode 100644 index 00000000..b298c7e5 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2022-06-14-001.sql @@ -0,0 +1,7 @@ +--޸Ծͳɼ +UPDATE Training_TestRecord SET Training_TestRecord.TestScores =item.SCore +from (SELECT SUM(SubjectScore) AS SCore,TestRecordId FROM Training_TestRecordItem +GROUP BY TestRecordId) item +where Training_TestRecord.TestRecordId=item.TestRecordId AND Training_TestRecord.TestEndTime IS NOT NULL +AND item.SCore != Training_TestRecord.TestScores AND item.SCore IS NOT NULL +GO \ No newline at end of file diff --git a/DataBase/版本日志/SGGLDB_V2022-06-14-001修改明细.txt b/DataBase/版本日志/SGGLDB_V2022-06-14-001修改明细.txt new file mode 100644 index 00000000..ecfde68c --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2022-06-14-001修改明细.txt @@ -0,0 +1,3 @@ +--ADD BY Yanghongwei 2022-06-14 +1、修复考试成绩与试卷分值不符情况 +--END \ No newline at end of file diff --git a/SGGL/BLL/API/APIPersonService.cs b/SGGL/BLL/API/APIPersonService.cs index 58c9aba8..c76a2f20 100644 --- a/SGGL/BLL/API/APIPersonService.cs +++ b/SGGL/BLL/API/APIPersonService.cs @@ -470,7 +470,8 @@ namespace BLL List unitIdList = Funs.GetStrListByStr(unitIds, ','); var getPersons = from x in db.View_SitePerson_Person where x.ProjectId == projectId && unitIdList.Contains(x.UnitId) && x.IsUsed == true - && x.InTime <= DateTime.Now && (!x.OutTime.HasValue || x.OutTime >= DateTime.Now) + //&& x.InTime <= DateTime.Now + && (!x.OutTime.HasValue || x.OutTime >= DateTime.Now) select new Model.PersonItem { PersonId = x.PersonId, diff --git a/SGGL/WebAPI/Controllers/HSSE/TestRecordController.cs b/SGGL/WebAPI/Controllers/HSSE/TestRecordController.cs index aa826890..f1b676c6 100644 --- a/SGGL/WebAPI/Controllers/HSSE/TestRecordController.cs +++ b/SGGL/WebAPI/Controllers/HSSE/TestRecordController.cs @@ -321,17 +321,14 @@ namespace WebAPI.Controllers var getItem = TestRecordItemService.GetTestRecordItemTestRecordItemId(testRecordItemId); if (getItem != null) { + APITestRecordService.getTestRecordItemAnswerBySelectedItem(getItem, selectedItem); //更新没有结束时间且超时的考试记录 int closeCount = TestRecordService.UpdateTestEndTimeNull(getItem.TestRecordId); if (closeCount > 0) { responeData.code = 2; responeData.message = "本次考试已结束,系统自动交卷!"; - } - else - { - APITestRecordService.getTestRecordItemAnswerBySelectedItem(getItem, selectedItem); - } + } } else {