diff --git a/DataBase/版本日志/SGGLDB_CD_V2023-09-10-001.sql b/DataBase/版本日志/SGGLDB_CD_V2023-09-10-001.sql new file mode 100644 index 00000000..8122fc1b --- /dev/null +++ b/DataBase/版本日志/SGGLDB_CD_V2023-09-10-001.sql @@ -0,0 +1,5 @@ +alter TABLE [dbo].[Training_TrainingItem] add + [LearningTime] [int] NULL + + Alter TABLE [dbo].[Training_CompanyTrainingItem] add + [LearningTime] [int] NULL \ No newline at end of file diff --git a/DataBase/版本日志/SGGLDB_CD_V2023-09-16-001.sql b/DataBase/版本日志/SGGLDB_CD_V2023-09-16-001.sql new file mode 100644 index 00000000..152bd7fc --- /dev/null +++ b/DataBase/版本日志/SGGLDB_CD_V2023-09-16-001.sql @@ -0,0 +1,10 @@ +alter TABLE [dbo].[InApproveManager_GeneralEquipmentInItem] add + [SpecialEquipmentName] [nvarchar](50) NULL + + +delete from Sys_Menu + where MenuId='1B08048F-93ED-4E84-AE65-DB7917EA2DFB' + +delete from Sys_Menu + where MenuId='DFB56743-17BA-40BA-82EA-FCB9B0DBFAFF' + \ No newline at end of file diff --git a/SGGL/BLL/API/APIBaseInfoService.cs b/SGGL/BLL/API/APIBaseInfoService.cs index 70a68b70..69ea2ecf 100644 --- a/SGGL/BLL/API/APIBaseInfoService.cs +++ b/SGGL/BLL/API/APIBaseInfoService.cs @@ -491,12 +491,12 @@ namespace BLL var getDataLists = (from x in db.Base_WorkPost where strParam == null || x.WorkPostName.Contains(strParam) orderby x.WorkPostName - select new Model.BaseInfoItem { BaseInfoId = x.WorkPostId.ToUpper(), BaseInfoCode = x.WorkPostCode, BaseInfoName = x.WorkPostName }).ToList(); + select new Model.BaseInfoItem { BaseInfoId = x.WorkPostId , BaseInfoCode = x.WorkPostCode, BaseInfoName = x.WorkPostName }).ToList(); if (!string.IsNullOrEmpty(projectId)) { var user = from u in db.SitePerson_Person where u.ProjectId == projectId - select u.WorkPostId.ToUpper(); + select u.WorkPostId ; var postIds = user.Distinct(); foreach (var item in getDataLists) diff --git a/SGGL/BLL/API/HSSE/APITrainingTaskService.cs b/SGGL/BLL/API/HSSE/APITrainingTaskService.cs index 8d21e345..41709ef3 100644 --- a/SGGL/BLL/API/HSSE/APITrainingTaskService.cs +++ b/SGGL/BLL/API/HSSE/APITrainingTaskService.cs @@ -78,6 +78,10 @@ namespace BLL TaskItemId = x.TaskItemId, TaskId = x.TaskId, PlanId = x.PlanId, + StartTime = x.StartTime, + EndTime =x.EndTime, + LearnTime=x.LearnTime, + VideoProgress = x.VideoProgress, PersonId = x.PersonId, TrainingItemCode = x.TrainingItemCode, TrainingItemName = x.TrainingItemName, @@ -257,7 +261,7 @@ namespace BLL /// /// /// 培训计划人员 - public static Model.Training_TaskItem updateTaskItemLearnTime(string taskItemId,DateTime startTime,DateTime endTime) + public static Model.Training_TaskItem updateTaskItemLearnTime(string taskItemId,DateTime startTime,DateTime endTime,string VideoProgress) { using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { @@ -270,13 +274,16 @@ namespace BLL item.StartTime = startTime; } - if (!item.LearnTime.HasValue) + //if (!item.LearnTime.HasValue) + //{ + // item.LearnTime = 0; + //} + if (!string.IsNullOrEmpty(VideoProgress)) { - item.LearnTime = 0; + item.VideoProgress = int.Parse(VideoProgress); } - var span = endTime.Subtract(startTime); - item.LearnTime = item.LearnTime.Value + (int)span.TotalMinutes; + //item.LearnTime = item.LearnTime.Value + (int)span.TotalMinutes; item.EndTime = endTime; db.SubmitChanges(); return item; diff --git a/SGGL/BLL/Common/PrinterDocService.cs b/SGGL/BLL/Common/PrinterDocService.cs index 729b2b68..301be333 100644 --- a/SGGL/BLL/Common/PrinterDocService.cs +++ b/SGGL/BLL/Common/PrinterDocService.cs @@ -1500,8 +1500,13 @@ { str += "  D." + item.DItem; - } - sb.AppendFormat("{0} ", str); + } + if (!string.IsNullOrEmpty(item.EItem)) + { + str += "  E." + item.EItem; + + } + sb.AppendFormat("{0} ", str); sb.Append(""); //sb.Append(""); @@ -1544,8 +1549,12 @@ { str += "  D." + item.DItem; } + if (!string.IsNullOrEmpty(item.EItem)) + { + str += "  E." + item.EItem; + } - sb.AppendFormat("{0} ", str); + sb.AppendFormat("{0} ", str); sb.Append(""); //sb.Append(""); //sb.AppendFormat("正确答案:{0} ", item.AnswerItems); diff --git a/SGGL/BLL/HSSE/EduTrain/TrainingPlanService.cs b/SGGL/BLL/HSSE/EduTrain/TrainingPlanService.cs index bcdc4c42..21ca8f2c 100644 --- a/SGGL/BLL/HSSE/EduTrain/TrainingPlanService.cs +++ b/SGGL/BLL/HSSE/EduTrain/TrainingPlanService.cs @@ -1,7 +1,12 @@ -using System; +using FineUIPro; +using Model; +using NPOI.Util; +using System; using System.Collections.Generic; using System.Linq; using System.Text; +using System.Web.Caching; +using System.Web.UI.WebControls; namespace BLL { @@ -30,15 +35,28 @@ namespace BLL { Model.Training_Plan newPlan = new Model.Training_Plan { - PlanId = plan.PlanId, - PlanCode = plan.PlanCode, + PlanId = plan.PlanId, + ProjectId = plan.ProjectId, + PlanCode = plan.PlanCode, PlanName = plan.PlanName, DesignerId = plan.DesignerId, DesignerDate = plan.DesignerDate, - WorkPostId = plan.WorkPostId, - States = plan.States - }; - db.Training_Plan.InsertOnSubmit(newPlan); + WorkPostId = plan.WorkPostId, + TrainContent = plan.TrainContent, + TeachMan = plan.TeachMan, + TeachHour = plan.TeachHour, + TrainStartDate = plan.TrainStartDate, + TrainEndDate = plan.TrainEndDate, + TeachAddress = plan.TeachAddress, + UnitIds = plan.UnitIds, + TrainLevelId = plan.TrainLevelId, + TrainTypeId = plan.TrainTypeId, + Cycle = plan.Cycle, + States = plan.States + }; + + + db.Training_Plan.InsertOnSubmit(newPlan); db.SubmitChanges(); } @@ -57,8 +75,19 @@ namespace BLL newPlan.DesignerDate = plan.DesignerDate; newPlan.WorkPostId = plan.WorkPostId; newPlan.QRCodeUrl = plan.QRCodeUrl; - newPlan.States = plan.States; - Funs.DB.SubmitChanges(); + newPlan.TrainContent = plan.TrainContent; + newPlan.TeachMan = plan.TeachMan; + newPlan.TeachHour = plan.TeachHour; + newPlan.TrainStartDate = plan.TrainStartDate; + newPlan.TrainEndDate = plan.TrainEndDate; + newPlan.TeachAddress = plan.TeachAddress; + newPlan.UnitIds = plan.UnitIds; + newPlan.TrainLevelId = plan.TrainLevelId; + newPlan.TrainTypeId = plan.TrainTypeId; + newPlan.Cycle = plan.Cycle; + newPlan.States = plan.States; + + Funs.DB.SubmitChanges(); } } diff --git a/SGGL/BLL/HSSE/InApproveManager/GeneralEquipmentInItemService.cs b/SGGL/BLL/HSSE/InApproveManager/GeneralEquipmentInItemService.cs index 6a8f7aca..d68c6092 100644 --- a/SGGL/BLL/HSSE/InApproveManager/GeneralEquipmentInItemService.cs +++ b/SGGL/BLL/HSSE/InApproveManager/GeneralEquipmentInItemService.cs @@ -40,8 +40,9 @@ namespace BLL Model.InApproveManager_GeneralEquipmentInItem newEquipmentItem = new Model.InApproveManager_GeneralEquipmentInItem { GeneralEquipmentInItemId = generalEquipmentInItem.GeneralEquipmentInItemId, - GeneralEquipmentInId = generalEquipmentInItem.GeneralEquipmentInId, - SpecialEquipmentId = generalEquipmentInItem.SpecialEquipmentId, + GeneralEquipmentInId = generalEquipmentInItem.GeneralEquipmentInId, + SpecialEquipmentId = generalEquipmentInItem.SpecialEquipmentId, + SpecialEquipmentName = generalEquipmentInItem.SpecialEquipmentName, SizeModel = generalEquipmentInItem.SizeModel, OwnerCheck = generalEquipmentInItem.OwnerCheck, CertificateNum = generalEquipmentInItem.CertificateNum, @@ -63,8 +64,9 @@ namespace BLL { newGeneralEquipmentInItem.GeneralEquipmentInId = generalEquipmentInItem.GeneralEquipmentInId; newGeneralEquipmentInItem.SpecialEquipmentId = generalEquipmentInItem.SpecialEquipmentId; - newGeneralEquipmentInItem.SizeModel = generalEquipmentInItem.SizeModel; - newGeneralEquipmentInItem.OwnerCheck = generalEquipmentInItem.OwnerCheck; + newGeneralEquipmentInItem.SizeModel = generalEquipmentInItem.SizeModel; + newGeneralEquipmentInItem.SpecialEquipmentName = generalEquipmentInItem.SpecialEquipmentName; + newGeneralEquipmentInItem.OwnerCheck = generalEquipmentInItem.OwnerCheck; newGeneralEquipmentInItem.CertificateNum = generalEquipmentInItem.CertificateNum; newGeneralEquipmentInItem.IsUsed = generalEquipmentInItem.IsUsed; db.SubmitChanges(); diff --git a/SGGL/BLL/HSSE/SitePerson/PersonInOutService.cs b/SGGL/BLL/HSSE/SitePerson/PersonInOutService.cs index b1ba6b62..5f5ff0ff 100644 --- a/SGGL/BLL/HSSE/SitePerson/PersonInOutService.cs +++ b/SGGL/BLL/HSSE/SitePerson/PersonInOutService.cs @@ -128,7 +128,9 @@ namespace BLL { using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { - Model.SitePerson_PersonInOut newPersonInOut = new Model.SitePerson_PersonInOut + + + Model.SitePerson_PersonInOut newPersonInOut = new Model.SitePerson_PersonInOut { PersonInOutId = SQLHelper.GetNewID(), IsIn = personInOut.IsIn ?? true, @@ -141,7 +143,7 @@ namespace BLL Remark = personInOut.Remark, }; - Model.SitePerson_Person getPerson = new Model.SitePerson_Person(); + Model.SitePerson_Person getPerson = new Model.SitePerson_Person(); if (!string.IsNullOrEmpty(personInOut.PersonId)) { getPerson = PersonService.GetPersonById(personInOut.PersonId); @@ -151,9 +153,16 @@ namespace BLL getPerson = PersonService.GetPersonByIdentityCard(personInOut.ProjectId, personInOut.IdentityCard); } if (getPerson != null && !string.IsNullOrEmpty(getPerson.PersonId)) - { - newPersonInOut.ProjectId = getPerson.ProjectId; - newPersonInOut.PersonId = getPerson.PersonId; + { + newPersonInOut.PersonId = getPerson.PersonId; + newPersonInOut.ProjectId = getPerson.ProjectId; + var old = db.SitePerson_PersonInOut.Where(x => x.PersonId == newPersonInOut.PersonId && x.IsIn == newPersonInOut.IsIn && x.ProjectId == newPersonInOut.ProjectId && x.ChangeTime > newPersonInOut.ChangeTime.Value.AddMinutes(-2)).FirstOrDefault(); + if(old != null) + { + return; + } + + newPersonInOut.PersonName = getPerson.PersonName; newPersonInOut.IdentityCard = getPerson.IdentityCard; newPersonInOut.UnitId = getPerson.UnitId; diff --git a/SGGL/BLL/OpenService/GetDataService.cs b/SGGL/BLL/OpenService/GetDataService.cs index 82e5d169..f18016c6 100644 --- a/SGGL/BLL/OpenService/GetDataService.cs +++ b/SGGL/BLL/OpenService/GetDataService.cs @@ -39,6 +39,7 @@ namespace BLL PersonId = item.UserId, TrainingItemCode = dataItem.TrainingItemCode, TrainingItemName = dataItem.TrainingItemName, + LearnTime = dataItem.LearnTime, AttachUrl = dataItem.AttachUrl, }; diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 5cdfe601..8e0a5f02 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -1643,6 +1643,7 @@ + diff --git a/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecialRecord.aspx b/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecialRecord.aspx index 340c94d7..a3bf3668 100644 --- a/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecialRecord.aspx +++ b/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecialRecord.aspx @@ -69,8 +69,9 @@ -