diff --git a/.vs/SGGL_CD/v17/.wsuo b/.vs/SGGL_CD/v17/.wsuo index d0ca065e..7f123c3c 100644 Binary files a/.vs/SGGL_CD/v17/.wsuo and b/.vs/SGGL_CD/v17/.wsuo differ diff --git a/DataBase/版本日志/SGGLDB_CD_V2024-04-02-001.sql b/DataBase/版本日志/SGGLDB_CD_V2024-04-02-001.sql new file mode 100644 index 00000000..8a7d30c5 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_CD_V2024-04-02-001.sql @@ -0,0 +1,81 @@ + + +alter table dbo.InApproveManager_EquipmentInItem + add InDate datetime +go + +exec sp_addextendedproperty 'MS_Description', N'进场时间', 'SCHEMA', 'dbo', 'TABLE', 'InApproveManager_EquipmentInItem', + 'COLUMN', 'InDate' +go + +alter table dbo.InApproveManager_EquipmentInItem + add EququalityExpireDate datetime +go + +exec sp_addextendedproperty 'MS_Description', N'设备资质有效期', 'SCHEMA', 'dbo', 'TABLE', + 'InApproveManager_EquipmentInItem', 'COLUMN', 'EququalityExpireDate' +go + +alter table dbo.InApproveManager_EquipmentInItem + add InsuredAmount decimal +go + +exec sp_addextendedproperty 'MS_Description', N'保额', 'SCHEMA', 'dbo', 'TABLE', 'InApproveManager_EquipmentInItem', + 'COLUMN', 'InsuredAmount' +go + +alter table dbo.InApproveManager_EquipmentInItem + add OperatorName nvarchar(50) +go + +exec sp_addextendedproperty 'MS_Description', N'操作人员姓名', 'SCHEMA', 'dbo', 'TABLE', + 'InApproveManager_EquipmentInItem', 'COLUMN', 'OperatorName' +go + +alter table dbo.InApproveManager_EquipmentInItem + add OperatorIdentityCard nvarchar(50) +go + +exec sp_addextendedproperty 'MS_Description', N'操作人员身份证号', 'SCHEMA', 'dbo', 'TABLE', + 'InApproveManager_EquipmentInItem', 'COLUMN', 'OperatorIdentityCard' +go + +alter table dbo.InApproveManager_EquipmentInItem + add OperatorQualityExpireDate datetime +go + +exec sp_addextendedproperty 'MS_Description', N'操作人员资质有效期', 'SCHEMA', 'dbo', 'TABLE', + 'InApproveManager_EquipmentInItem', 'COLUMN', 'OperatorQualityExpireDate' +go + +alter table dbo.InApproveManager_EquipmentInItem + add CertificationDepartment nvarchar(50) +go + +exec sp_addextendedproperty 'MS_Description', N'发证部门', 'SCHEMA', 'dbo', 'TABLE', 'InApproveManager_EquipmentInItem', + 'COLUMN', 'CertificationDepartment' +go + +alter table dbo.Administrative_CarManager + add DriverName nvarchar(50) +go +alter table dbo.Administrative_CarManager + add DriverCode nvarchar(50) +go + +alter table dbo.Administrative_CarManager + add DrivingDate datetime +go + + +exec sp_addextendedproperty 'MS_Description', N' 姓名', 'SCHEMA', 'dbo', 'TABLE', 'Administrative_CarManager', 'COLUMN', + 'DriverName' +go + +exec sp_addextendedproperty 'MS_Description', N'驾驶证号', 'SCHEMA', 'dbo', 'TABLE', 'Administrative_CarManager', + 'COLUMN', 'DriverCode' +go + +exec sp_addextendedproperty 'MS_Description', N'发证日期', 'SCHEMA', 'dbo', 'TABLE', 'Administrative_CarManager', + 'COLUMN', 'DrivingDate' +go \ No newline at end of file diff --git a/SGGL/BLL/API/HSSE/APITestRecordService.cs b/SGGL/BLL/API/HSSE/APITestRecordService.cs index 0bb7ffd0..029aa537 100644 --- a/SGGL/BLL/API/HSSE/APITestRecordService.cs +++ b/SGGL/BLL/API/HSSE/APITestRecordService.cs @@ -5,6 +5,7 @@ using System.Text; using System.Threading.Tasks; using EmitMapper; using EmitMapper.MappingConfiguration; +using Model; namespace BLL { @@ -253,7 +254,9 @@ namespace BLL }; db.Training_TestRecordItem.InsertAllOnSubmit(getItems); - db.SubmitChanges(); + db.SubmitChanges(); + BLL.RedisHelper redis = new BLL.RedisHelper(); + redis.SetObjString(testRecordId, getItems); } } } @@ -615,33 +618,40 @@ namespace BLL /// 考试人员 public static List geTestRecordItemListByTestRecordId(string testRecordId) { - using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + BLL.RedisHelper redis = new BLL.RedisHelper(); + var getDataLists= redis.GetObjString>(testRecordId); //先从redis取数据,不存在再从数据库取 + if (getDataLists.Count==0) { - 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; + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + 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; } #endregion diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj index 133a65d1..4522a72c 100644 --- a/SGGL/BLL/BLL.csproj +++ b/SGGL/BLL/BLL.csproj @@ -21,6 +21,8 @@ + + true @@ -55,11 +57,14 @@ False ..\FineUIPro\FineUIPro.dll - - ..\packages\Microsoft.Bcl.AsyncInterfaces.7.0.0\lib\netstandard2.0\Microsoft.Bcl.AsyncInterfaces.dll + + ..\packages\Fleck.1.2.0\lib\net45\Fleck.dll - - ..\packages\Microsoft.Extensions.Logging.Abstractions.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll + + ..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll + + + ..\packages\Microsoft.Extensions.Logging.Abstractions.6.0.0\lib\net461\Microsoft.Extensions.Logging.Abstractions.dll False @@ -83,12 +88,18 @@ ..\packages\NPOI.2.5.5\lib\net45\NPOI.OpenXmlFormats.dll + + ..\packages\Pipelines.Sockets.Unofficial.2.2.8\lib\net461\Pipelines.Sockets.Unofficial.dll + ..\packages\Quartz.3.7.0\lib\netstandard2.0\Quartz.dll ..\packages\RestSharp.106.15.0\lib\net452\RestSharp.dll + + ..\packages\StackExchange.Redis.2.7.33\lib\net461\StackExchange.Redis.dll + ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll @@ -105,6 +116,14 @@ + + ..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll + True + True + + + ..\packages\System.IO.Pipelines.5.0.1\lib\net461\System.IO.Pipelines.dll + ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll @@ -117,6 +136,11 @@ ..\packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + + ..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll + True + True + @@ -136,6 +160,9 @@ ..\packages\System.Text.Json.7.0.2\lib\netstandard2.0\System.Text.Json.dll + + ..\packages\System.Threading.Channels.5.0.0\lib\net461\System.Threading.Channels.dll + ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll @@ -255,6 +282,9 @@ + + + @@ -1044,7 +1074,15 @@ + + + + + 这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。 + + +