diff --git a/DataBase/版本日志/SGGLDB_V2022-04-24-001.sql b/DataBase/版本日志/SGGLDB_V2022-04-24-001.sql new file mode 100644 index 00000000..c8fa8f95 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2022-04-24-001.sql @@ -0,0 +1,29 @@ +/****** Object: Index [NonClusteredIndex-20220422-165000] Script Date: 2022/4/22 16:50:59 ******/ +CREATE NONCLUSTERED INDEX [NonClusteredIndex-20220422-165000] ON [dbo].[Training_TestPlan] +( + [TestPlanId] ASC, + [TestStartTime] ASC, + [States] ASC, + [TestEndTime] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +GO + +/****** Object: Index [NonClusteredIndex-20220422-165128] Script Date: 2022/4/22 16:52:09 ******/ +CREATE NONCLUSTERED INDEX [NonClusteredIndex-20220422-165128] ON [dbo].[Training_TestRecord] +( + [TestPlanId] ASC, + [TestManId] ASC, + [TestEndTime] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +GO + +/****** Object: Index [NonClusteredIndex-20220424-164842] Script Date: 2022/4/24 16:49:20 ******/ +CREATE NONCLUSTERED INDEX [NonClusteredIndex-20220424-164842] ON [dbo].[Training_TestRecordItem] +( + [TestRecordId] ASC, + [TestType] ASC, + [TrainingItemCode] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +GO + + diff --git a/DataBase/版本日志/SGGLDB_V2022-04-01-001.sql b/DataBase/版本日志/已更新脚本/SGGLDB_V2022-04-01-001.sql similarity index 100% rename from DataBase/版本日志/SGGLDB_V2022-04-01-001.sql rename to DataBase/版本日志/已更新脚本/SGGLDB_V2022-04-01-001.sql diff --git a/DataBase/版本日志/SGGLDB_V2022-04-14-001.sql b/DataBase/版本日志/已更新脚本/SGGLDB_V2022-04-14-001.sql similarity index 100% rename from DataBase/版本日志/SGGLDB_V2022-04-14-001.sql rename to DataBase/版本日志/已更新脚本/SGGLDB_V2022-04-14-001.sql diff --git a/SGGL/BLL/API/HSSE/APITestRecordService.cs b/SGGL/BLL/API/HSSE/APITestRecordService.cs index ca00cf91..bd510b52 100644 --- a/SGGL/BLL/API/HSSE/APITestRecordService.cs +++ b/SGGL/BLL/API/HSSE/APITestRecordService.cs @@ -99,14 +99,32 @@ namespace BLL if (item == null) { List getTestTrainingItemList = new List(); + //// 计划考试中单选、多选、判断题总数 + int sumTestType1Count =0; + int sumTestType2Count = 0; + int sumTestType3Count = 0; + var testPlanTrainings = from x in db.Training_TestPlanTraining where x.TestPlanId == getTestPlan.TestPlanId select x; - //// 计划考试中单选、多选、判断题总数 - int sumTestType1Count = testPlanTrainings.Sum(x => x.TestType1Count) ?? 0; - int sumTestType2Count = testPlanTrainings.Sum(x => x.TestType2Count) ?? 0; - int sumTestType3Count = testPlanTrainings.Sum(x => x.TestType3Count) ?? 0; - + if (testPlanTrainings.Count() > 0) + { + //// 计划考试中单选、多选、判断题总数 + sumTestType1Count = testPlanTrainings.Sum(x => x.TestType1Count) ?? 0; + sumTestType2Count = testPlanTrainings.Sum(x => x.TestType2Count) ?? 0; + sumTestType3Count = testPlanTrainings.Sum(x => x.TestType3Count) ?? 0; + } + else + { + var getTestRule = db.Sys_TestRule.FirstOrDefault(); + if (getTestRule != null) + { + sumTestType1Count = getTestRule.SCount; + sumTestType2Count = getTestRule.MCount; + sumTestType3Count = getTestRule.JCount; + } + } + ////获取类型下适合岗位试题集合 var getTestTrainingItemALLs = from x in db.Training_TestTrainingItem where x.TrainingId != null && (x.WorkPostIds == null || (x.WorkPostIds.Contains(person.WorkPostId) && person.WorkPostId != null)) @@ -331,38 +349,64 @@ namespace BLL #region 根据TestRecordId获取试卷题目列表 /// + /// 记录数 + /// + public static int geTestRecordItemCount + { + get; + set; + } + /// /// 根据TestRecordId获取试卷题目列表 /// /// /// 考试人员 - public static List geTestRecordItemListByTestRecordId(string testRecordId) + public static List geTestRecordItemListByTestRecordId(string testRecordId, int pageIndex) { using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { - var getDataLists = (from x in db.Training_TestRecordItem - where x.TestRecordId == testRecordId - orderby x.TestType, x.TrainingItemCode - select new Model.TestRecordItemItem - { - TestRecordItemId = x.TestRecordItemId, - TestRecordId = x.TestRecordId, - TrainingItemCode = x.TrainingItemCode, - TrainingItemName = x.TrainingItemName, - Abstracts = x.Abstracts, - AttachUrl = x.AttachUrl.Replace("\\", "/") ?? "", - TestType = x.TestType, - TestTypeName = x.TestType == "1" ? "单选题" : (x.TestType == "2" ? "多选题" : "判断题"), - AItem = x.AItem ?? "", - BItem = x.BItem ?? "", - CItem = x.CItem ?? "", - DItem = x.DItem ?? "", - EItem = x.EItem ?? "", - AnswerItems = x.AnswerItems ?? "", - Score = x.Score ?? 0, - SubjectScore = x.SubjectScore ?? 0, - SelectedItem = x.SelectedItem ?? "", - }).ToList(); - return getDataLists; + var getDatas= from x in db.Training_TestRecordItem + where x.TestRecordId == testRecordId + select x; + geTestRecordItemCount = getDatas.Count(); + if (geTestRecordItemCount == 0) + { + return null; + } + else + { + var getDataLists = from x in getDatas + orderby x.TestType, x.TrainingItemCode + select new Model.TestRecordItemItem + { + TestRecordItemId = x.TestRecordItemId, + TestRecordId = x.TestRecordId, + TrainingItemCode = x.TrainingItemCode, + TrainingItemName = x.TrainingItemName, + Abstracts = x.Abstracts, + AttachUrl = x.AttachUrl.Replace("\\", "/") ?? "", + TestType = x.TestType, + TestTypeName = x.TestType == "1" ? "单选题" : (x.TestType == "2" ? "多选题" : "判断题"), + AItem = x.AItem ?? "", + BItem = x.BItem ?? "", + CItem = x.CItem ?? "", + DItem = x.DItem ?? "", + EItem = x.EItem ?? "", + AnswerItems = x.AnswerItems ?? "", + Score = x.Score ?? 0, + SubjectScore = x.SubjectScore ?? 0, + SelectedItem = x.SelectedItem ?? "", + }; + + if (pageIndex > 0) + { + return getDataLists.Skip(Funs.PageSize * (pageIndex - 1)).Take(Funs.PageSize).ToList(); + } + else + { + return getDataLists.ToList(); + } + } } } #endregion diff --git a/SGGL/BLL/ZHGL/RealName/RealNameMonitorService.cs b/SGGL/BLL/ZHGL/RealName/RealNameMonitorService.cs index 714c5564..2e9acc12 100644 --- a/SGGL/BLL/ZHGL/RealName/RealNameMonitorService.cs +++ b/SGGL/BLL/ZHGL/RealName/RealNameMonitorService.cs @@ -176,5 +176,196 @@ namespace BLL } } #endregion + + #region 启动监视器 定时清理推送日志 + /// + /// 监视组件 + /// + private static Timer messageTimer1; + + /// + /// 定时清理推送日志 + /// + public static void StartMonitorDeletePushLog() + { + int adTimeJ = 60 * 12; + if (messageTimer1 != null) + { + messageTimer1.Stop(); + messageTimer1.Dispose(); + messageTimer1 = null; + } + if (adTimeJ > 0) + { + messageTimer1 = new Timer + { + AutoReset = true + }; + messageTimer1.Elapsed += new ElapsedEventHandler(DeletePushLog); + messageTimer1.Interval = 1000 * 60 * adTimeJ;// 60分钟 60000 * adTimeJ; + messageTimer1.Start(); + } + } + + /// + /// 流程确认 定时执行 系统启动5分钟 + /// + /// Timer组件 + /// 事件参数 + private static void DeletePushLog(object sender, ElapsedEventArgs e) + { + try + { + /// 3天推送实名制日志 + var getPushLogs = Funs.DB.RealName_PushLog.Where(x => x.PushTime.Value.AddDays(3) < DateTime.Now); + if (getPushLogs.Count() > 0) + { + Funs.DB.RealName_PushLog.DeleteAllOnSubmit(getPushLogs); + Funs.DB.SubmitChanges(); + } + /// 3个月操作日志 + var getSys_Logs = Funs.DB.Sys_Log.Where(x => x.OperationTime.Value.AddMonths(3) < DateTime.Now); + if (getSys_Logs.Count() > 0) + { + Funs.DB.Sys_Log.DeleteAllOnSubmit(getSys_Logs); + Funs.DB.SubmitChanges(); + } + /// 1个月推送消息日志 + var getSys_HttpLogs = Funs.DB.Sys_HttpLog.Where(x => x.LogTime.Value.AddMonths(1) < DateTime.Now); + if (getSys_HttpLogs.Count() > 0) + { + Funs.DB.Sys_HttpLog.DeleteAllOnSubmit(getSys_HttpLogs); + Funs.DB.SubmitChanges(); + } + } + catch (Exception ex) + { + } + } + #endregion + + #region 启动监视器 定时清理推送日志 + /// + /// 监视组件 + /// + private static Timer messageTimer2; + + /// + /// 定时清理推送日志 + /// + public static void StartMonitorCleanAttendance() + { + int adTimeJ = 60 * 12; + if (messageTimer2 != null) + { + messageTimer2.Stop(); + messageTimer2.Dispose(); + messageTimer2 = null; + } + if (adTimeJ > 0) + { + messageTimer2 = new Timer + { + AutoReset = true + }; + messageTimer2.Elapsed += new ElapsedEventHandler(CleanAttendance); + messageTimer2.Interval = 1000 * 60 * adTimeJ;// 60分钟 60000 * adTimeJ; + messageTimer2.Start(); + } + } + + /// + /// 流程确认 定时执行 系统启动5分钟 + /// + /// Timer组件 + /// 事件参数 + private static void CleanAttendance(object sender, ElapsedEventArgs e) + { + try + { + /// 清理出入记录 + var getRecords = from x in Funs.DB.T_d_facerecord where x.DateTimeRecord.Value.AddDays(1) < DateTime.Now select x; + if (getRecords.Count() > 0) + { + foreach (var item in getRecords) + { + if (item.InOrOut == "进门") + { + var getDelRecordsIn = from x in Funs.DB.T_d_facerecord + where x.ProjectId == item.ProjectId && x.EmployNO == item.EmployNO && x.InOrOut == item.InOrOut + && x.DateTimeRecord.Value.Year == item.DateTimeRecord.Value.Year + && x.DateTimeRecord.Value.Month == item.DateTimeRecord.Value.Month + && x.DateTimeRecord.Value.Day == item.DateTimeRecord.Value.Day + && x.DateTimeRecord > item.DateTimeRecord + select x; + if (getDelRecordsIn.Count() > 0) + { + Funs.DB.T_d_facerecord.DeleteAllOnSubmit(getDelRecordsIn); + Funs.DB.SubmitChanges(); + } + } + else + { + var getDelRecordsOut = from x in Funs.DB.T_d_facerecord + where x.ProjectId == item.ProjectId && x.EmployNO == item.EmployNO && x.InOrOut == item.InOrOut + && x.DateTimeRecord.Value.Year == item.DateTimeRecord.Value.Year + && x.DateTimeRecord.Value.Month == item.DateTimeRecord.Value.Month + && x.DateTimeRecord.Value.Day == item.DateTimeRecord.Value.Day + && x.DateTimeRecord < item.DateTimeRecord + select x; + if (getDelRecordsOut.Count() > 0) + { + Funs.DB.T_d_facerecord.DeleteAllOnSubmit(getDelRecordsOut); + Funs.DB.SubmitChanges(); + } + } + } + } + + var getVRecords = from x in Funs.DB.T_d_validcardevent + where x.RecordDateTime.Value.AddDays(1) < DateTime.Now + select x; + if (getVRecords.Count() > 0) + { + foreach (var item in getVRecords) + { + if (item.InOrOut == 1) + { + var getDelVRecordsIn = from x in Funs.DB.T_d_validcardevent + where x.ProjectId == item.ProjectId && x.IDCardNo == item.IDCardNo && x.InOrOut == item.InOrOut + && x.RecordDateTime.Value.Year == item.RecordDateTime.Value.Year + && x.RecordDateTime.Value.Month == item.RecordDateTime.Value.Month + && x.RecordDateTime.Value.Day == item.RecordDateTime.Value.Day + && x.RecordDateTime > item.RecordDateTime + select x; + if (getDelVRecordsIn.Count() > 0) + { + Funs.DB.T_d_validcardevent.DeleteAllOnSubmit(getDelVRecordsIn); + Funs.DB.SubmitChanges(); + } + } + else + { + var getDelVRecordsOut = from x in Funs.DB.T_d_validcardevent + where x.ProjectId == item.ProjectId && x.IDCardNo == item.IDCardNo && x.InOrOut == item.InOrOut + && x.RecordDateTime.Value.Year == item.RecordDateTime.Value.Year + && x.RecordDateTime.Value.Month == item.RecordDateTime.Value.Month + && x.RecordDateTime.Value.Day == item.RecordDateTime.Value.Day + && x.RecordDateTime < item.RecordDateTime + select x; + if (getDelVRecordsOut.Count() > 0) + { + Funs.DB.T_d_validcardevent.DeleteAllOnSubmit(getDelVRecordsOut); + Funs.DB.SubmitChanges(); + } + } + } + } + } + catch (Exception ex) + { + } + } + #endregion } } diff --git a/SGGL/FineUIPro.Web/FileUpload/QRCodeFile/20220702110716845.jpg b/SGGL/FineUIPro.Web/FileUpload/QRCodeFile/20220702110716845.jpg deleted file mode 100644 index 1c467220..00000000 Binary files a/SGGL/FineUIPro.Web/FileUpload/QRCodeFile/20220702110716845.jpg and /dev/null differ diff --git a/SGGL/FineUIPro.Web/FileUpload/QRCodeFile/20220702110726069.jpg b/SGGL/FineUIPro.Web/FileUpload/QRCodeFile/20220702110726069.jpg deleted file mode 100644 index 6361f67d..00000000 Binary files a/SGGL/FineUIPro.Web/FileUpload/QRCodeFile/20220702110726069.jpg and /dev/null differ diff --git a/SGGL/FineUIPro.Web/FileUpload/QRCodeFile/20220702110734021.jpg b/SGGL/FineUIPro.Web/FileUpload/QRCodeFile/20220702110734021.jpg deleted file mode 100644 index 37df5458..00000000 Binary files a/SGGL/FineUIPro.Web/FileUpload/QRCodeFile/20220702110734021.jpg and /dev/null differ diff --git a/SGGL/FineUIPro.Web/FileUpload/QRCodeFile/20221629111627216.jpg b/SGGL/FineUIPro.Web/FileUpload/QRCodeFile/20221629111627216.jpg deleted file mode 100644 index 37df5458..00000000 Binary files a/SGGL/FineUIPro.Web/FileUpload/QRCodeFile/20221629111627216.jpg and /dev/null differ diff --git a/SGGL/FineUIPro.Web/Global.asax.cs b/SGGL/FineUIPro.Web/Global.asax.cs index b5bc6f9c..08bac4dd 100644 --- a/SGGL/FineUIPro.Web/Global.asax.cs +++ b/SGGL/FineUIPro.Web/Global.asax.cs @@ -28,7 +28,6 @@ Funs.SGGLUrl = ConfigurationManager.AppSettings["SGGLUrl"]; Funs.RealNameApiUrl = ConfigurationManager.AppSettings["RealNameApiUrl"]; Funs.ControlApiUrl = ConfigurationManager.AppSettings["ControlApiUrl"]; - sysUser = UserService.GetUserByUserId(Const.sysglyId); } catch (Exception ex) @@ -64,16 +63,27 @@ { ErrLogInfo.WriteLog("通用定时器启动失败!", ex); } - ////员工考核定时器 - //try - //{ - // BLL.MonitorService.StartPersonQuarterCheck(); - // BLL.LogService.AddSys_Log(sysUser, string.Empty, string.Empty, string.Empty, "员工考核定时器启动成功!"); - //} - //catch (Exception ex) - //{ - // ErrLogInfo.WriteLog("员工考核定时器启动失败!", ex); - //} + ///实名制日志清理定时器 + try + { + BLL.RealNameMonitorService.StartMonitorDeletePushLog(); + BLL.LogService.AddSys_Log(sysUser, string.Empty, string.Empty, string.Empty, "实名制日志清理定时器启动成功!"); + } + catch (Exception ex) + { + ErrLogInfo.WriteLog("实名制日志清理定时器启动失败!", ex); + } + + ///考勤记录清理定时器 + try + { + BLL.RealNameMonitorService.StartMonitorCleanAttendance(); + BLL.LogService.AddSys_Log(sysUser, string.Empty, string.Empty, string.Empty, "考勤去重定时器启动成功!"); + } + catch (Exception ex) + { + ErrLogInfo.WriteLog("实名制日志清理定时器启动失败!", ex); + } ////从集团获取数据定时器 try { diff --git a/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx b/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx index 1c75b192..6f46a50f 100644 --- a/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx +++ b/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx @@ -30,20 +30,23 @@ - - - - - - - - + + + + + + + + + - + @@ -123,6 +126,10 @@ + diff --git a/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx.cs b/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx.cs index 7929db82..6cd92f81 100644 --- a/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx.cs +++ b/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx.cs @@ -38,6 +38,10 @@ namespace FineUIPro.Web.Personal { /// Tab1加载页面方法 this.Tab1LoadData(); + if (this.CurrUser.UserId == Const.hfnbdId) + { + this.btnCustomQuery.Hidden = false; + } } } @@ -143,5 +147,10 @@ namespace FineUIPro.Web.Personal Alert.ShowInParent("保存成功!", MessageBoxIcon.Success); PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); } + + protected void btnCustomQuery_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../SysManage/CustomQuery.aspx"), "查询")); + } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx.designer.cs b/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx.designer.cs index 677d3431..5e43b711 100644 --- a/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx.designer.cs @@ -75,6 +75,15 @@ namespace FineUIPro.Web.Personal { /// protected global::FineUIPro.Button btnSave; + /// + /// btnCustomQuery 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnCustomQuery; + /// /// SimpleForm1 控件。 /// @@ -290,5 +299,14 @@ namespace FineUIPro.Web.Personal { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm2; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; } } diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectUser.aspx.cs b/SGGL/FineUIPro.Web/ProjectData/ProjectUser.aspx.cs index 9b63156e..98297196 100644 --- a/SGGL/FineUIPro.Web/ProjectData/ProjectUser.aspx.cs +++ b/SGGL/FineUIPro.Web/ProjectData/ProjectUser.aspx.cs @@ -113,7 +113,7 @@ namespace FineUIPro.Web.ProjectData { foreach (int rowIndex in Grid1.SelectedRowIndexArray) { - BLL.LogService.AddSys_Log(this.CurrUser, "删除项目用户!", null, BLL.Const.ProjectUserMenuId, BLL.Const.BtnDelete); + var projectUser = BLL.ProjectUserService.GetProjectUserById(Grid1.DataKeys[rowIndex][0].ToString()); if (projectUser != null) { @@ -123,6 +123,7 @@ namespace FineUIPro.Web.ProjectData BLL.RoleItemService.DeleteRoleItem(roleItem.RoleItemId); } } + BLL.LogService.AddSys_Log(this.CurrUser, "删除项目用户!", projectUser.UserId, BLL.Const.ProjectUserMenuId, BLL.Const.BtnDelete); BLL.ProjectUserService.DeleteProjectUserById(Grid1.DataKeys[rowIndex][0].ToString()); } diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 7cffb416..616e748f 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -161831,6 +161831,8 @@ namespace Model private System.Nullable _DesignNum; + private System.Nullable _SortIndex; + private EntitySet _JDGL_QuantityCompletion; private EntityRef _Base_CNProfessional; @@ -161853,6 +161855,8 @@ namespace Model partial void OnUnitChanged(); partial void OnDesignNumChanging(System.Nullable value); partial void OnDesignNumChanged(); + partial void OnSortIndexChanging(System.Nullable value); + partial void OnSortIndexChanged(); #endregion public JDGL_QuantityList() @@ -161991,6 +161995,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SortIndex", DbType="Int")] + public System.Nullable SortIndex + { + get + { + return this._SortIndex; + } + set + { + if ((this._SortIndex != value)) + { + this.OnSortIndexChanging(value); + this.SendPropertyChanging(); + this._SortIndex = value; + this.SendPropertyChanged("SortIndex"); + this.OnSortIndexChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JDGL_QuantityCompletion_JDGL_QuantityList", Storage="_JDGL_QuantityCompletion", ThisKey="QuantityListId", OtherKey="QuantityListId", DeleteRule="NO ACTION")] public EntitySet JDGL_QuantityCompletion { @@ -253097,7 +253121,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Address", DbType="NVarChar(200)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Address", DbType="NVarChar(2000)")] public string Address { get @@ -253161,7 +253185,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaName", DbType="NVarChar(200)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaName", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] public string WorkAreaName { get @@ -327273,6 +327297,8 @@ namespace Model private string _Unit; + private System.Nullable _SortIndex; + private System.Nullable _TotalPlanNum; private System.Nullable _TotalRealNum; @@ -327499,6 +327525,22 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SortIndex", DbType="Int")] + public System.Nullable SortIndex + { + get + { + return this._SortIndex; + } + set + { + if ((this._SortIndex != value)) + { + this._SortIndex = value; + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalPlanNum", DbType="Float")] public System.Nullable TotalPlanNum { @@ -335030,7 +335072,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Address", DbType="NVarChar(200)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Address", DbType="NVarChar(2000)")] public string Address { get @@ -335046,7 +335088,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaName", DbType="NVarChar(200)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaName", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] public string WorkAreaName { get diff --git a/SGGL/WebAPI/Controllers/HSSE/TestPlanController.cs b/SGGL/WebAPI/Controllers/HSSE/TestPlanController.cs index f3b875f8..f5e5eded 100644 --- a/SGGL/WebAPI/Controllers/HSSE/TestPlanController.cs +++ b/SGGL/WebAPI/Controllers/HSSE/TestPlanController.cs @@ -192,7 +192,7 @@ namespace WebAPI.Controllers var responeData = new Model.ResponeData(); try { - var getTestPlan = new Model.SGGLDB(Funs.ConnString).Training_TestPlan.FirstOrDefault(e => e.TestPlanId == testPlanId && e.States != "3" && e.TestStartTime <= DateTime.Now && e.TestEndTime >= DateTime.Now); + var getTestPlan = Funs.DB.Training_TestPlan.FirstOrDefault(e => e.TestPlanId == testPlanId && e.States != "3" && e.TestStartTime <= DateTime.Now && e.TestEndTime >= DateTime.Now); if (getTestPlan != null) { var person = PersonService.GetPersonByUserId(personId, getTestPlan.ProjectId); @@ -201,7 +201,7 @@ namespace WebAPI.Controllers //2-考试中;生成考试试卷 if (getTestPlan.States == "2" ) { - var testRecord = new Model.SGGLDB(Funs.ConnString).Training_TestRecord.FirstOrDefault(x => x.TestPlanId == getTestPlan.TestPlanId && x.TestManId == person.PersonId && !x.TestEndTime.HasValue); + var testRecord = Funs.DB.Training_TestRecord.FirstOrDefault(x => x.TestPlanId == getTestPlan.TestPlanId && x.TestManId == person.PersonId && !x.TestEndTime.HasValue); if (testRecord != null) { string testRecordId = APITestRecordService.CreateTestRecordItem(getTestPlan, testRecord.TestRecordId, person); @@ -214,7 +214,7 @@ namespace WebAPI.Controllers if (string.IsNullOrEmpty(getTestPlan.PlanId) && getTestPlan.UnitIds.Contains(person.UnitId) && (getTestPlan.WorkPostIds == null || getTestPlan.WorkPostIds.Contains(person.WorkPostId))) { //0-待提交;1-已发布未考试 将人员添加进考试记录 - var testTRecord = new Model.SGGLDB(Funs.ConnString).Training_TestRecord.FirstOrDefault(x => x.TestPlanId == testPlanId && x.TestManId == personId); + var testTRecord = Funs.DB.Training_TestRecord.FirstOrDefault(x => x.TestPlanId == testPlanId && x.TestManId == personId); if ((getTestPlan.States == "0" || getTestPlan.States == "1") && testTRecord == null && !string.IsNullOrEmpty(personId)) { Model.Training_TestRecord newTestRecord = new Model.Training_TestRecord diff --git a/SGGL/WebAPI/Controllers/HSSE/TestRecordController.cs b/SGGL/WebAPI/Controllers/HSSE/TestRecordController.cs index ff533b41..4799f547 100644 --- a/SGGL/WebAPI/Controllers/HSSE/TestRecordController.cs +++ b/SGGL/WebAPI/Controllers/HSSE/TestRecordController.cs @@ -66,12 +66,8 @@ namespace WebAPI.Controllers var responeData = new Model.ResponeData(); try { - var getDataLists = APITestRecordService.geTestRecordItemListByTestRecordId(testRecordId); - int pageCount = getDataLists.Count; - if (pageCount > 0 && pageIndex > 0) - { - getDataLists = getDataLists.OrderBy(x => x.TestType).ThenBy(x => x.TrainingItemCode).Skip(Funs.PageSize * (pageIndex - 1)).Take(Funs.PageSize).ToList(); - } + var getDataLists = APITestRecordService.geTestRecordItemListByTestRecordId(testRecordId, pageIndex); + int pageCount = APITestRecordService.geTestRecordItemCount; responeData.data = new { pageCount, getDataLists }; } catch (Exception ex) diff --git a/开发需求/OA对接密钥.txt b/开发需求/OA对接密钥.txt deleted file mode 100644 index 10cc8999..00000000 --- a/开发需求/OA对接密钥.txt +++ /dev/null @@ -1,8 +0,0 @@ -publickey - -rnq6pYDFkcrpzVtMrLbf2dvDPs2FDo5yeDub6YCnl0hXov3MVEVMbVe3NCnC5Thl3dwm14yI9/vNIGdH5M4getAkMnkG8tNA60NPjtHUzyoZSpVYCUOmB30s5vx+4IBkPh8R4ynkJYyUxkl61/0h6y7A86qz4jNivxAKt2a0vQxk=AQAB - - -privatekey: - -1oowM965L1r9NM10IruHI+4v4cF8cMrZ1PMaG/D1oNOww8YGEYjKiQ2iAjAtJi4OQX6sxI7BHJad/CGNKeE12ywplO18J8vL/YvEq38DMen22ungNAjSmC6zmIngvBrIiyW2Cyws/9JQKxT02I1tZlEQ9q4ZxCc3PLFazTD0sIk=AQAB

2K+KCTgEGJAvPzB6pYcDmE2n/gIIy6dOiaNQtTWRUrttC+DaU8ZlORlYH6+lWcekYhGnf+dVjfuGE3w45JVKxw==

/Xb6T/4tizVbVpjLd47SN+c1yEcCubLhv7HHd/9E2K5olboWvOGxUbr53F4FOmTu9CWpybbCKLReJWPQxq5aLw==eA1Ztx3X9xv7cVEUwpz5OurbhnnuEZdShiN71comB+Zb1lbv37Zt4qLOFlAklodr5gHOAalT12Rhtm3+v3aPhQ==5VjUNK+1PEKijGAjs+I627TN2JRQpgFz/gX6jN0hycM/BURmMLEzxtWeI0W8C1OrWKX/1XMWishya/i+wBihpw==wE16uAx/ztTMObpArwC2eGhh+oCwXsnUPoFSQtLHeEbxx/Cf424wKr2ceV/Fe9YKQp5XLdOpJkCDDAF+2k4X1A==0rF/yVEQeQtY5ERpq7qTa5v99i448eSlrVbZ61rnP3zmej29s/atQY/b7V422OoeIgAv2BGCYXshyH2CzwBYDAtGkz+qvaZtPvWIYPadTvgU5W/QgX8r/ozqFBHu17APSSBmJWulShxj6r9kOmgxW4HzwVQ/iQgyQ5Z+qgpf50k=
\ No newline at end of file diff --git a/开发需求/五环修改需求8.16-1.docx b/开发需求/五环修改需求8.16-1.docx deleted file mode 100644 index 6efb3a22..00000000 --- a/开发需求/五环修改需求8.16-1.docx +++ /dev/null @@ -1,13 +0,0 @@ - -1、 - -2、另外,在手动考勤的下拉菜单中,已出场人员应该不自动显示 - -3、 - -4、 - - - -5、 - diff --git a/开发需求/五环公司在岗人员(1).xlsx b/开发需求/五环公司在岗人员(1).xlsx deleted file mode 100644 index 0785b7b7..00000000 Binary files a/开发需求/五环公司在岗人员(1).xlsx and /dev/null differ diff --git a/开发需求/智慧工地与五环OA集成说明文档(1).docx b/开发需求/智慧工地与五环OA集成说明文档(1).docx deleted file mode 100644 index e71dbdbf..00000000 --- a/开发需求/智慧工地与五环OA集成说明文档(1).docx +++ /dev/null @@ -1,38 +0,0 @@ - 单点登录的方式 - 五环系统点击链接:https://zhgd.cwcec.com/Login.html?data=****&basedata=**** - 免登录进入智慧工地的系统 - data参数说明 - data字符串是用户名和时间戳用RSA公钥加密后的字符串。例如: - userName=zhangsan×pan=1256015312用公钥加密后生成**** - basedata参数说明 - basedata字符串是用户名和时间戳用RSA公钥加密后再用Base64加密一次 - 生成的加密字符串。例如: - userName=zhangsan×pan=1256015312用公钥加密后再用Base64加密 - 为了解决有的解密过程中出现"+"或者"="这样的特殊字符。推荐截取basedata的 - 字符串解密。 - - 解密方式 - data或者basedata都是用公钥进行RSA加密,需要用我们提供的私钥对加密文件进行解密,判断用户名是否在系统中并且当前时间-时间戳<30秒钟,才能登录到系统中,否则需要输入账号密码 -三、.net解密的函数参考 -string userdata = context.Request["database"].ToString(); -string privatekey = ****(我们会提供) -string result = RSADecrypt(privatekey, userdata); //经过RSA解密后获得的域登录名+时间戳 - - -/// -/// -/// 用私钥对数据进行RSA解密 -/// -/// -/// -/// -public static string RSADecrypt(string privatekey, string content) -{ - -RSACryptoServiceProvider rsa = new RSACryptoServiceProvider(); -byte[] cipherbytes; -rsa.FromXmlString(privatekey); -//对参数content进行两次base64解密 -cipherbytes = rsa.Decrypt(Convert.FromBase64String(Encoding.UTF8.GetString(Convert.FromBase64String(content))), false); -return Encoding.UTF8.GetString(cipherbytes); -}