From b0b47e4c833d818543ef437be8d74942c71ef4bc Mon Sep 17 00:00:00 2001 From: 10191 <506754232@qq.com> Date: Wed, 22 May 2024 16:57:23 +0800 Subject: [PATCH] 111 --- SGGL/BLL/API/HSSE/APITestRecordService.cs | 6 +++--- SGGL/BLL/API/HSSE/APITrainingTaskService.cs | 6 +++++- SGGL/WebAPI/Controllers/HSSE/TestPlanController.cs | 2 -- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/SGGL/BLL/API/HSSE/APITestRecordService.cs b/SGGL/BLL/API/HSSE/APITestRecordService.cs index 18d43466..f6e9cd98 100644 --- a/SGGL/BLL/API/HSSE/APITestRecordService.cs +++ b/SGGL/BLL/API/HSSE/APITestRecordService.cs @@ -347,9 +347,9 @@ namespace BLL } } //// 获取得到的单选题、多选题、判断题 数量 - int getDiffTestType1Count = sumTestType1Count - getTestTrainingItemList.Where(x => x.TestType == "1").Count(); - int getDiffTestType2Count = sumTestType2Count - getTestTrainingItemList.Where(x => x.TestType == "2").Count(); - int getDiffTestType3Count = sumTestType3Count - getTestTrainingItemList.Where(x => x.TestType == "3").Count(); + int getDiffTestType1Count = sumTestType1Count;// - getTestTrainingItemList.Where(x => x.TestType == "1").Count(); + int getDiffTestType2Count = sumTestType2Count;// - getTestTrainingItemList.Where(x => x.TestType == "2").Count(); + int getDiffTestType3Count = sumTestType3Count;// - getTestTrainingItemList.Where(x => x.TestType == "3").Count(); if (getDiffTestType1Count > 0 || getDiffTestType2Count > 0 || getDiffTestType3Count > 0) { var getTestTrainingItemNulls = getTestTrainingItemALLs.Where(x => x.WorkPostIds == null).ToList(); diff --git a/SGGL/BLL/API/HSSE/APITrainingTaskService.cs b/SGGL/BLL/API/HSSE/APITrainingTaskService.cs index cfe67ac2..c313c0d4 100644 --- a/SGGL/BLL/API/HSSE/APITrainingTaskService.cs +++ b/SGGL/BLL/API/HSSE/APITrainingTaskService.cs @@ -280,7 +280,11 @@ namespace BLL //} if (!string.IsNullOrEmpty(VideoProgress)) { - item.VideoProgress = int.Parse(VideoProgress); + if (!item.VideoProgress.HasValue) + { + item.VideoProgress = 0; + } + item.VideoProgress = item.VideoProgress.Value + int.Parse(VideoProgress); } var span = endTime.Subtract(startTime); //item.LearnTime = item.LearnTime.Value + (int)span.TotalMinutes; diff --git a/SGGL/WebAPI/Controllers/HSSE/TestPlanController.cs b/SGGL/WebAPI/Controllers/HSSE/TestPlanController.cs index 44f81aab..885824da 100644 --- a/SGGL/WebAPI/Controllers/HSSE/TestPlanController.cs +++ b/SGGL/WebAPI/Controllers/HSSE/TestPlanController.cs @@ -310,8 +310,6 @@ namespace WebAPI.Controllers } #endregion - - public Model.ResponeData getTrainingPlanTestRecordItemByTestPlanIdPersonId( string companyTrainingItemCode, string personId,string projectId) { var responeData = new Model.ResponeData();