diff --git a/DataBase/菜单初始化脚本/0-5综合管理(Menu_ZHGL).sql b/DataBase/菜单初始化脚本/0-5综合管理(Menu_ZHGL).sql
index 90b63f76..60deae17 100644
--- a/DataBase/菜单初始化脚本/0-5综合管理(Menu_ZHGL).sql
+++ b/DataBase/菜单初始化脚本/0-5综合管理(Menu_ZHGL).sql
@@ -204,6 +204,96 @@ GO
VALUES('EF4D5271-ECEF-4AF3-941C-02580696179E','B9ADD006-BA46-4191-BCD1-CCB56767C82B','保存',2)
GO
+
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('ABB667AF-2C50-40A6-9FC9-FC34A96582E3','文件柜','',40,'0','Menu_ZHGL',0,1,1)
GO
+
+--安全会议
+INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+VALUES('BFFBE172-7473-486E-9833-49F13B359C6C','安全会议','',50,'0','Menu_ZHGL',1,0,1)
+GO
+ INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+ VALUES('B911B4F8-DDFD-4F37-9EAC-EB104F753432','企业安委会','ZHGL/Meeting/CompanySafetyMeeting.aspx',10,'BFFBE172-7473-486E-9833-49F13B359C6C','Menu_ZHGL',1,1,1)
+ GO
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('27DD0084-A559-4723-90B9-5F68DF3B61C4','B911B4F8-DDFD-4F37-9EAC-EB104F753432','增加',1)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('1F841CFB-1AFC-4C9C-A56F-681E407B52F9','B911B4F8-DDFD-4F37-9EAC-EB104F753432','修改',2)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('60142F0A-3362-4264-876C-F27FFB533891','B911B4F8-DDFD-4F37-9EAC-EB104F753432','删除',3)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('05901FC0-D482-442D-9764-7DE5EA4ED991','B911B4F8-DDFD-4F37-9EAC-EB104F753432','保存',4)
+ GO
+
+ INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+ VALUES('2497EF13-C052-4228-B388-EBC5C18963BC','企业专题会','ZHGL/Meeting/CompanySpecialMeeting.aspx',20,'BFFBE172-7473-486E-9833-49F13B359C6C','Menu_ZHGL',1,1,1)
+ GO
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('58BC6E5C-E45F-47A2-A7FC-D02F91DEF058','2497EF13-C052-4228-B388-EBC5C18963BC','增加',1)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('92627BA3-A14A-4886-805E-038324E9747A','2497EF13-C052-4228-B388-EBC5C18963BC','修改',2)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('395E1B2B-AF35-4867-A8F0-E471FB10C25D','2497EF13-C052-4228-B388-EBC5C18963BC','删除',3)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('1DF4AADF-2207-4A9E-83D0-8899E21E91BA','2497EF13-C052-4228-B388-EBC5C18963BC','保存',4)
+ GO
+
+--企业安全大检查
+INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+VALUES('CD9FC4C8-4B02-4619-8B02-50DA6AE6146E','企业安全大检查','',60,'0','Menu_ZHGL',1,0,1)
+GO
+ INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+ VALUES('40387C48-95A0-435C-82FB-57AF0A81B9D4','安全监督检查报告','ZHGL/Supervise/SuperviseCheckReport.aspx',10,'CD9FC4C8-4B02-4619-8B02-50DA6AE6146E','Menu_ZHGL',1,1,1)
+ GO
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('D5465075-BB0C-447D-95EC-4030A25A98ED','40387C48-95A0-435C-82FB-57AF0A81B9D4','增加',1)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('126A4582-EB43-4A46-9E28-E0A780E425ED','40387C48-95A0-435C-82FB-57AF0A81B9D4','修改',2)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('ACA5D163-C3B4-403F-A1D0-13F343289DF4','40387C48-95A0-435C-82FB-57AF0A81B9D4','删除',3)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('CF9ED9A9-D40F-4501-A4D4-929E6FCCB97A','40387C48-95A0-435C-82FB-57AF0A81B9D4','保存',4)
+ GO
+
+ INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+ VALUES('A02E0365-383C-49A0-BF1A-B3E42052959B','安全监督检查整改','ZHGL/Supervise/SuperviseCheckRectify.aspx',20,'CD9FC4C8-4B02-4619-8B02-50DA6AE6146E','Menu_ZHGL',1,1,1)
+ GO
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('ECE3BCFB-4B56-4FDD-8557-D5128A3172DD','A02E0365-383C-49A0-BF1A-B3E42052959B','修改',2)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('7A4EE5DF-FC8C-418B-A130-88ECA4EFADDE','A02E0365-383C-49A0-BF1A-B3E42052959B','删除',3)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('C8656544-FF83-4D68-AE09-EFAB5DE7EF23','A02E0365-383C-49A0-BF1A-B3E42052959B','保存',4)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('C01A5167-2001-43E9-9DEE-EEA406FF1FF9','A02E0365-383C-49A0-BF1A-B3E42052959B','保存并上报',5)
+ GO
+
+INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+VALUES('3BBFCD70-D7A3-435C-9571-DD499D5ED7B8','应急信息','',70,'0','Menu_ZHGL',0,0,1)
+GO
+ INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+ VALUES('D12C2412-E12A-4F78-9AEF-1EE8AC84A561','应急预案管理清单','ZHGL/Emergency/EmergencyList.aspx',10,'3BBFCD70-D7A3-435C-9571-DD499D5ED7B8','Menu_ZHGL',0,1,1)
+ GO
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('4A638D22-1515-4967-B149-8362F81E3A95','D12C2412-E12A-4F78-9AEF-1EE8AC84A561','增加',1)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('11F44E2B-F3EB-4189-B324-69DB226CF39B','D12C2412-E12A-4F78-9AEF-1EE8AC84A561','修改',2)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('826C9DEB-7A48-4B70-9312-FC5D0D5D2555','D12C2412-E12A-4F78-9AEF-1EE8AC84A561','删除',3)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('C4A17D4C-25A7-4F37-B6CF-F07526AECBC2','D12C2412-E12A-4F78-9AEF-1EE8AC84A561','保存',4)
+ GO
+
+ INSERT INTO Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+ VALUES('172F25E0-F5E2-42E3-AD67-AC824D4E0FBB','应急演练开展情况','ZHGL/Emergency/DrillRecordList.aspx',20,'3BBFCD70-D7A3-435C-9571-DD499D5ED7B8','Menu_ZHGL',0,1,1)
+ GO
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('9F63FB64-5F34-4CD4-B266-59F6E8FF4FA5','172F25E0-F5E2-42E3-AD67-AC824D4E0FBB','增加',1)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('2193449B-4C40-49DA-9C23-82A94126AE05','172F25E0-F5E2-42E3-AD67-AC824D4E0FBB','修改',2)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('7C866795-2E56-47CD-B937-C468C46DB007','172F25E0-F5E2-42E3-AD67-AC824D4E0FBB','删除',3)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('27E0EE6E-D96F-4300-9574-423F378D79C4','172F25E0-F5E2-42E3-AD67-AC824D4E0FBB','保存',4)
+ GO
\ No newline at end of file
diff --git a/DataBase/菜单初始化脚本/1-3安全管理(Menu_HSSE).sql b/DataBase/菜单初始化脚本/1-3安全管理(Menu_HSSE).sql
index 062329ac..7fe02396 100644
--- a/DataBase/菜单初始化脚本/1-3安全管理(Menu_HSSE).sql
+++ b/DataBase/菜单初始化脚本/1-3安全管理(Menu_HSSE).sql
@@ -506,6 +506,20 @@ GO
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('6886FA5A-7217-4FB2-805A-BD56EB1DD3E5','C198EBA8-9E23-4654-92E1-09C61105C522','',4)
GO
+
+ INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+ VALUES('355265DE-901A-4110-B934-B4DA067C4334','쵼','HSSE/Check/ProjectLeaderCheck.aspx',35,'467A0CB9-737D-4451-965E-869EBC3A4BD6','Menu_HSSE',0,1,1)
+ GO
+ --쵼鰴ť
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('E0860211-E41A-4D51-B5B4-99A5D0676C73','355265DE-901A-4110-B934-B4DA067C4334','',1)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('87B6E85C-48DA-4BD3-8518-35968E564557','355265DE-901A-4110-B934-B4DA067C4334','',2)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('B07D2E39-60CE-4F59-895B-7D0763A65341','355265DE-901A-4110-B934-B4DA067C4334','ɾ',3)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('AAB617C6-A800-4D59-8761-AC134C7885D3','355265DE-901A-4110-B934-B4DA067C4334','',4)
+ GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('C3B6B222-44DC-46F3-B783-B1FC0F743C48','ĵ','HSSE/Check/RectifyNotices.aspx',40,'467A0CB9-737D-4451-965E-869EBC3A4BD6','Menu_HSSE',0,1,1)
@@ -612,6 +626,19 @@ GO
VALUES('CCDAF139-FA43-4C52-960C-CFB9588C9BBF','F8ADCDBC-AAAD-4884-9935-2B63562E4779','',4)
GO
+ INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+VALUES('DFB56743-17BA-40BA-82EA-FCB9B0DBFAFF','ȫ쵼С','HSSE/Meeting/SafetyLeaderGroupMeeting.aspx',60,'5309E7E0-395E-4F11-8F5E-D52E11526A2A','Menu_HSSE',0,1,1)
+GO
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('0A65A42F-2701-4DD3-9C72-7B39F1ECD560','DFB56743-17BA-40BA-82EA-FCB9B0DBFAFF','',1)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('DCAB0B09-EA07-443C-9B04-2E86D9E8C2DC','DFB56743-17BA-40BA-82EA-FCB9B0DBFAFF','',2)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('FE3476FB-1D5B-4E8E-801E-E4B9B4D287F0','DFB56743-17BA-40BA-82EA-FCB9B0DBFAFF','ɾ',3)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('739A0815-D4B3-4B9F-B001-5D04EB94B9EF','DFB56743-17BA-40BA-82EA-FCB9B0DBFAFF','',4)
+ GO
+
--HSSEɹ
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('473A87D2-1365-4A68-BD38-06F312F81BC2','ҵ','',120,'0','Menu_HSSE',0,0,1)
diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj
index 6f7c6a81..8d9c4c86 100644
--- a/SGGL/BLL/BLL.csproj
+++ b/SGGL/BLL/BLL.csproj
@@ -402,6 +402,7 @@
+
@@ -478,6 +479,7 @@
+
@@ -672,6 +674,8 @@
+
+
@@ -699,6 +703,8 @@
+
+
@@ -706,6 +712,12 @@
+
+
+
+
+
+
diff --git a/SGGL/BLL/BaseInfo/CertificateService.cs b/SGGL/BLL/BaseInfo/CertificateService.cs
index 9a0bbdfe..04f8b360 100644
--- a/SGGL/BLL/BaseInfo/CertificateService.cs
+++ b/SGGL/BLL/BaseInfo/CertificateService.cs
@@ -32,6 +32,8 @@ namespace BLL
CertificateId = certificate.CertificateId,
CertificateCode = certificate.CertificateCode,
CertificateName = certificate.CertificateName,
+ CertificateType = certificate.CertificateType,
+ IsRegisterHSSE = certificate.IsRegisterHSSE,
Remark = certificate.Remark
};
db.Base_Certificate.InsertOnSubmit(newCertificate);
@@ -50,6 +52,8 @@ namespace BLL
{
newCertificate.CertificateCode = certificate.CertificateCode;
newCertificate.CertificateName = certificate.CertificateName;
+ newCertificate.CertificateType = certificate.CertificateType;
+ newCertificate.IsRegisterHSSE = certificate.IsRegisterHSSE;
newCertificate.Remark = certificate.Remark;
db.SubmitChanges();
}
diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs
index 87ffe3aa..43a5c3c4 100644
--- a/SGGL/BLL/Common/Const.cs
+++ b/SGGL/BLL/Common/Const.cs
@@ -789,11 +789,18 @@
///
public const string CheckNoticeMenuId = "C502FC6D-DE43-4646-AE28-168D8C7BF4C0";
+ ///
+ /// 公司两级领导带班检查
+ ///
+ public const string ServerCheckTwolevelMenuId = "6CBF1000-5E3C-4FBD-A7EC-965765F6F52D";
+
+
///
/// 发起检查
///
public const string CheckInfoMenuId = "6090DD54-FE59-4011-92EE-9906C9BC69B6";
public const string Base_FactoryMenuId = "CD167198-1667-4552-9876-E768C2542C30";
+
///
/// 实业
///
@@ -907,6 +914,16 @@
///
public const string ProjectEnergyReportMenuId = "9DE996D9-A2CF-40C8-86D3-6A472AB30E5D";
+ ///
+ /// HSSE应急预案管理清单
+ ///
+ public const string UnitEmergencyListMenuId = "D12C2412-E12A-4F78-9AEF-1EE8AC84A561";
+
+ ///
+ /// 应急演练
+ ///
+ public const string UnitDrillRecordListMenuId = "172F25E0-F5E2-42E3-AD67-AC824D4E0FBB";
+
#region 系统设置
///
/// 单位设置
@@ -1686,6 +1703,18 @@
///
public const string ServerTestRankingMenuId = "19FB0C6D-E2CA-4352-B635-060347D45C4A";
#endregion
+
+ #region 公司安全会议
+ ///
+ /// 企业安委会
+ ///
+ public const string CompanySafetyMeetingMenuId = "B911B4F8-DDFD-4F37-9EAC-EB104F753432";
+
+ ///
+ /// 企业专题会
+ ///
+ public const string CompanySpecialMeetingMenuId = "2497EF13-C052-4228-B388-EBC5C18963BC";
+ #endregion
#endregion
#region 人员管理
@@ -1734,7 +1763,6 @@
#region 项目菜单
-
#region 安全体系
///
/// 安全组织机构
@@ -2123,6 +2151,10 @@
/// 联系单
///
public const string ProjectContactListMenuId = "F057C207-4549-48AE-B838-A1920E5709D8";
+ ///
+ /// 领导带班检查
+ ///
+ public const string ProjectLeaderCheckMenuId = "355265DE-901A-4110-B934-B4DA067C4334";
#endregion
#region APP检查管理
@@ -2209,6 +2241,10 @@
/// 班前会
///
public const string ProjectClassMeetingMenuId = "F8ADCDBC-AAAD-4884-9935-2B63562E4779";
+ ///
+ /// 安全领导小组会议
+ ///
+ public const string ProjectSafetyLeaderGroupMeetingMenuId = "DFB56743-17BA-40BA-82EA-FCB9B0DBFAFF";
#endregion
#region 出入场管理
diff --git a/SGGL/BLL/HSSE/Accident/AccidentPersonRecordService.cs b/SGGL/BLL/HSSE/Accident/AccidentPersonRecordService.cs
index 12d86ad4..9df35c8f 100644
--- a/SGGL/BLL/HSSE/Accident/AccidentPersonRecordService.cs
+++ b/SGGL/BLL/HSSE/Accident/AccidentPersonRecordService.cs
@@ -43,6 +43,7 @@ namespace BLL
FileContent = accidentPersonRecord.FileContent,
CompileMan = accidentPersonRecord.CompileMan,
CompileDate = accidentPersonRecord.CompileDate,
+ IsAttempt = accidentPersonRecord.IsAttempt,
States = accidentPersonRecord.States
};
db.Accident_AccidentPersonRecord.InsertOnSubmit(newAccidentPersonRecord);
@@ -73,6 +74,7 @@ namespace BLL
newAccidentPersonRecord.FileContent = accidentPersonRecord.FileContent;
newAccidentPersonRecord.CompileMan = accidentPersonRecord.CompileMan;
newAccidentPersonRecord.CompileDate = accidentPersonRecord.CompileDate;
+ newAccidentPersonRecord.IsAttempt = accidentPersonRecord.IsAttempt;
newAccidentPersonRecord.States = accidentPersonRecord.States;
db.SubmitChanges();
}
diff --git a/SGGL/BLL/HSSE/Check/Check_ProjectLeaderCheckService.cs b/SGGL/BLL/HSSE/Check/Check_ProjectLeaderCheckService.cs
new file mode 100644
index 00000000..00b98cce
--- /dev/null
+++ b/SGGL/BLL/HSSE/Check/Check_ProjectLeaderCheckService.cs
@@ -0,0 +1,214 @@
+using FineUIPro;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web.UI.WebControls;
+
+namespace BLL
+{
+ ///
+ /// 领导带班检查
+ ///
+ public static class Check_ProjectLeaderCheckService
+ {
+ public static Model.SGGLDB db = Funs.DB;
+
+ ///
+ /// 根据主键获取领导带班检查
+ ///
+ ///
+ ///
+ public static Model.Check_ProjectLeaderCheck GetProjectLeaderCheckById(string ProjectLeaderCheckId)
+ {
+ return Funs.DB.Check_ProjectLeaderCheck.FirstOrDefault(e => e.ProjectLeaderCheckId == ProjectLeaderCheckId);
+ }
+
+ #region 公司两级领导带班检查列表
+ ///
+ /// 记录数
+ ///
+ public static int count
+ {
+ get;
+ set;
+ }
+
+ ///
+ /// 定义变量
+ ///
+ private static IQueryable getDataLists = from x in db.Check_ProjectLeaderCheck
+ select x;
+
+ ///
+ /// 数据列表
+ ///
+ ///
+ ///
+ ///
+ public static IEnumerable getListData(string projectId, string startTime, string endTime, Grid Grid1)
+ {
+ IQueryable getDataList = getDataLists;
+ if (!string.IsNullOrEmpty(projectId))
+ {
+ getDataList = getDataList.Where(x => x.ProjectId == projectId);
+ }
+ if (!string.IsNullOrEmpty(startTime))
+ {
+ DateTime? startTimeD = Funs.GetNewDateTime(startTime);
+ if (startTimeD.HasValue)
+ {
+ getDataList = getDataList.Where(x => x.CheckDate >= startTimeD);
+ }
+ }
+ if (!string.IsNullOrEmpty(endTime))
+ {
+ DateTime? endTimeD = Funs.GetNewDateTime(endTime);
+ if (endTimeD.HasValue)
+ {
+ getDataList = getDataList.Where(x => x.CheckDate <= endTimeD);
+ }
+ }
+ count = getDataList.Count();
+ if (count == 0)
+ {
+ return null;
+ }
+ getDataList = SortConditionHelper.SortingAndPaging(getDataList, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
+ return from x in getDataList
+ join y in db.Base_Project on x.ProjectId equals y.ProjectId
+ into ps
+ from y in ps.DefaultIfEmpty()
+ select new
+ {
+ x.ProjectLeaderCheckId,
+ x.ProjectId,
+ db.Base_Project.First(u => u.ProjectId == x.ProjectId).ProjectName,
+ x.CheckCode,
+ x.UnitIds,
+ x.LeaderIds,
+ x.LeaderNames,
+ x.QuestionDef,
+ x.CheckDate,
+ x.IsHoldMeet,
+ IsHoldMeetName = x.IsHoldMeet == true ? "是" : "否",
+ x.Requirement,
+ };
+ }
+ #endregion
+
+ ///
+ /// 根据日期获取领导带班检查集合
+ ///
+ /// 开始时间
+ /// 结束时间
+ /// 项目号
+ /// 领导带班检查集合
+ public static List GetProjectLeaderCheckListsByDate(DateTime startTime, DateTime endTime, string projectId)
+ {
+ return (from x in Funs.DB.Check_ProjectLeaderCheck where x.CheckDate >= startTime && x.CheckDate <= endTime && x.ProjectId == projectId orderby x.CheckDate select x).ToList();
+ }
+
+ ///
+ /// 根据时间段获取HSE领导带班检查集合
+ ///
+ /// 开始时间
+ /// 结束时间
+ /// 项目Id
+ /// 时间段内的HSE领导带班检查集合
+ public static int GetCountByDate(DateTime startTime, DateTime endTime, string projectId)
+ {
+ return (from x in Funs.DB.Check_ProjectLeaderCheck where x.CheckDate >= startTime && x.CheckDate <= endTime && x.ProjectId == projectId select x).Count();
+ }
+
+ ///
+ /// 添加领导带班检查
+ ///
+ ///
+ public static void AddProjectLeaderCheck(Model.Check_ProjectLeaderCheck ProjectLeaderCheck)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.Check_ProjectLeaderCheck newProjectLeaderCheck = new Model.Check_ProjectLeaderCheck
+ {
+ ProjectLeaderCheckId = ProjectLeaderCheck.ProjectLeaderCheckId,
+ ProjectId = ProjectLeaderCheck.ProjectId,
+ UnitIds = ProjectLeaderCheck.UnitIds,
+ CheckCode = ProjectLeaderCheck.CheckCode,
+ LeaderIds = ProjectLeaderCheck.LeaderIds,
+ CheckDate = ProjectLeaderCheck.CheckDate,
+ QuestionDef = ProjectLeaderCheck.QuestionDef,
+ IsHoldMeet = ProjectLeaderCheck.IsHoldMeet,
+ Requirement = ProjectLeaderCheck.Requirement,
+ LeaderNames = ProjectLeaderCheck.LeaderNames,
+ CompileMan = ProjectLeaderCheck.CompileMan,
+ CompileDate = ProjectLeaderCheck.CompileDate,
+ };
+ db.Check_ProjectLeaderCheck.InsertOnSubmit(newProjectLeaderCheck);
+ db.SubmitChanges();
+ CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectLeaderCheckMenuId, ProjectLeaderCheck.ProjectId, null, ProjectLeaderCheck.ProjectLeaderCheckId, ProjectLeaderCheck.CheckDate);
+ }
+
+ ///
+ /// 修改领导带班检查
+ ///
+ ///
+ public static void UpdateProjectLeaderCheck(Model.Check_ProjectLeaderCheck ProjectLeaderCheck)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.Check_ProjectLeaderCheck newProjectLeaderCheck = db.Check_ProjectLeaderCheck.FirstOrDefault(e => e.ProjectLeaderCheckId == ProjectLeaderCheck.ProjectLeaderCheckId);
+ if (newProjectLeaderCheck != null)
+ {
+ newProjectLeaderCheck.UnitIds = ProjectLeaderCheck.UnitIds;
+ newProjectLeaderCheck.CheckCode = ProjectLeaderCheck.CheckCode;
+ newProjectLeaderCheck.LeaderIds = ProjectLeaderCheck.LeaderIds;
+ newProjectLeaderCheck.CheckDate = ProjectLeaderCheck.CheckDate;
+ newProjectLeaderCheck.QuestionDef = ProjectLeaderCheck.QuestionDef;
+ newProjectLeaderCheck.IsHoldMeet = ProjectLeaderCheck.IsHoldMeet;
+ newProjectLeaderCheck.Requirement = ProjectLeaderCheck.Requirement;
+ newProjectLeaderCheck.LeaderNames = ProjectLeaderCheck.LeaderNames;
+ newProjectLeaderCheck.CompileMan = ProjectLeaderCheck.CompileMan;
+ newProjectLeaderCheck.CompileDate = ProjectLeaderCheck.CompileDate;
+ db.SubmitChanges();
+ }
+ }
+
+ ///
+ /// 根据主键删除领导带班检查
+ ///
+ ///
+ public static void DeleteProjectLeaderCheckById(string ProjectLeaderCheckId)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.Check_ProjectLeaderCheck ProjectLeaderCheck = db.Check_ProjectLeaderCheck.FirstOrDefault(e => e.ProjectLeaderCheckId == ProjectLeaderCheckId);
+ if (ProjectLeaderCheck != null)
+ {
+ CodeRecordsService.DeleteCodeRecordsByDataId(ProjectLeaderCheckId);
+ ////删除附件表
+ BLL.CommonService.DeleteAttachFileById(ProjectLeaderCheckId);
+ db.Check_ProjectLeaderCheck.DeleteOnSubmit(ProjectLeaderCheck);
+ db.SubmitChanges();
+ }
+ }
+
+ public static string getLeaderName(object ProjectLeaderCheckId)
+ {
+ string name = string.Empty;
+ if (ProjectLeaderCheckId != null)
+ {
+ var getData = Check_ProjectLeaderCheckService.GetProjectLeaderCheckById(ProjectLeaderCheckId.ToString());
+ if (getData != null)
+ {
+ if (!string.IsNullOrEmpty(getData.LeaderIds))
+ {
+ name = Person_PersonsService.getPersonsNamesPersonIds(getData.LeaderIds);
+ }
+ if (!string.IsNullOrEmpty(getData.LeaderNames))
+ {
+ name += "," + getData.LeaderNames;
+ }
+ }
+ }
+ return name;
+ }
+ }
+}
diff --git a/SGGL/BLL/HSSE/Meeting/SafetyLeaderGroupMeetingService.cs b/SGGL/BLL/HSSE/Meeting/SafetyLeaderGroupMeetingService.cs
new file mode 100644
index 00000000..3f6e11c7
--- /dev/null
+++ b/SGGL/BLL/HSSE/Meeting/SafetyLeaderGroupMeetingService.cs
@@ -0,0 +1,152 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BLL
+{
+ ///
+ /// 安全领导小组会议
+ ///
+ public static class SafetyLeaderGroupMeetingService
+ {
+ public static Model.SGGLDB db = Funs.DB;
+
+ ///
+ /// 根据主键获取安全领导小组会议
+ ///
+ ///
+ ///
+ public static Model.Meeting_SafetyLeaderGroupMeeting GetSafetyLeaderGroupMeetingById(string SafetyLeaderGroupMeetingId)
+ {
+ return Funs.DB.Meeting_SafetyLeaderGroupMeeting.FirstOrDefault(e => e.SafetyLeaderGroupMeetingId == SafetyLeaderGroupMeetingId);
+ }
+
+ ///
+ /// 根据时间段获取安全领导小组会议集合
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static int GetCountByTime(DateTime startTime, DateTime endTime, string projectId)
+ {
+ return (from x in Funs.DB.Meeting_SafetyLeaderGroupMeeting where x.SafetyLeaderGroupMeetingDate >= startTime && x.SafetyLeaderGroupMeetingDate < endTime && x.ProjectId == projectId && x.States == BLL.Const.State_2 select x).Count();
+ }
+
+ ///
+ /// 根据时间段获取安全领导小组会议参会人数
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static int? GetSumAttentPersonNumByMeetingDate(DateTime startTime, DateTime endTime, string projectId)
+ {
+ int? sumAttentPersonNum = (from x in Funs.DB.Meeting_SafetyLeaderGroupMeeting where x.SafetyLeaderGroupMeetingDate >= startTime && x.SafetyLeaderGroupMeetingDate < endTime && x.ProjectId == projectId && x.States == BLL.Const.State_2 select x.AttentPersonNum).Sum();
+ if (sumAttentPersonNum == null)
+ {
+ return 0;
+ }
+ return sumAttentPersonNum;
+ }
+
+ ///
+ /// 根据日期和类型获取会议记录集合
+ ///
+ /// 开始时间
+ /// 结束时间
+ /// 项目号
+ /// 会议记录集合
+ public static List GetMeetingListsByDate(DateTime startTime, DateTime endTime, string projectId)
+ {
+ return (from x in Funs.DB.Meeting_SafetyLeaderGroupMeeting where x.SafetyLeaderGroupMeetingDate >= startTime && x.SafetyLeaderGroupMeetingDate <= endTime && x.ProjectId == projectId orderby x.SafetyLeaderGroupMeetingDate select x).ToList();
+ }
+
+ ///
+ /// 添加安全领导小组会议
+ ///
+ ///
+ public static void AddSafetyLeaderGroupMeeting(Model.Meeting_SafetyLeaderGroupMeeting SafetyLeaderGroupMeeting)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.Meeting_SafetyLeaderGroupMeeting newSafetyLeaderGroupMeeting = new Model.Meeting_SafetyLeaderGroupMeeting
+ {
+ SafetyLeaderGroupMeetingId = SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingId,
+ ProjectId = SafetyLeaderGroupMeeting.ProjectId,
+ UnitId = SafetyLeaderGroupMeeting.UnitId,
+ SafetyLeaderGroupMeetingCode = SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingCode,
+ SafetyLeaderGroupMeetingName = SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingName,
+ SafetyLeaderGroupMeetingDate = SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingDate,
+ CompileMan = SafetyLeaderGroupMeeting.CompileMan,
+ SafetyLeaderGroupMeetingContents = SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingContents,
+ CompileDate = SafetyLeaderGroupMeeting.CompileDate,
+ States = SafetyLeaderGroupMeeting.States,
+ AttentPersonNum = SafetyLeaderGroupMeeting.AttentPersonNum,
+ MeetingHours = SafetyLeaderGroupMeeting.MeetingHours,
+ MeetingHostMan = SafetyLeaderGroupMeeting.MeetingHostMan,
+ AttentPerson = SafetyLeaderGroupMeeting.AttentPerson,
+ MeetingPlace = SafetyLeaderGroupMeeting.MeetingPlace,
+ MeetingHostManId = SafetyLeaderGroupMeeting.MeetingHostManId,
+ AttentPersonIds = SafetyLeaderGroupMeeting.AttentPersonIds,
+ MeetingHostManOther = SafetyLeaderGroupMeeting.MeetingHostManOther
+ };
+ db.Meeting_SafetyLeaderGroupMeeting.InsertOnSubmit(newSafetyLeaderGroupMeeting);
+ db.SubmitChanges();
+ ////增加一条编码记录
+ BLL.CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(BLL.Const.ProjectSafetyLeaderGroupMeetingMenuId, SafetyLeaderGroupMeeting.ProjectId, null, SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingId, SafetyLeaderGroupMeeting.CompileDate);
+ }
+
+ ///
+ /// 修改安全领导小组会议
+ ///
+ ///
+ public static void UpdateSafetyLeaderGroupMeeting(Model.Meeting_SafetyLeaderGroupMeeting SafetyLeaderGroupMeeting)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.Meeting_SafetyLeaderGroupMeeting newSafetyLeaderGroupMeeting = db.Meeting_SafetyLeaderGroupMeeting.FirstOrDefault(e => e.SafetyLeaderGroupMeetingId == SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingId);
+ if (newSafetyLeaderGroupMeeting != null)
+ {
+ //newSafetyLeaderGroupMeeting.ProjectId = SafetyLeaderGroupMeeting.ProjectId;
+ newSafetyLeaderGroupMeeting.UnitId = SafetyLeaderGroupMeeting.UnitId;
+ newSafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingCode = SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingCode;
+ newSafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingName = SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingName;
+ newSafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingDate = SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingDate;
+ newSafetyLeaderGroupMeeting.CompileMan = SafetyLeaderGroupMeeting.CompileMan;
+ newSafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingContents = SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingContents;
+ newSafetyLeaderGroupMeeting.CompileDate = SafetyLeaderGroupMeeting.CompileDate;
+ newSafetyLeaderGroupMeeting.States = SafetyLeaderGroupMeeting.States;
+ newSafetyLeaderGroupMeeting.AttentPersonNum = SafetyLeaderGroupMeeting.AttentPersonNum;
+ newSafetyLeaderGroupMeeting.MeetingHours = SafetyLeaderGroupMeeting.MeetingHours;
+ newSafetyLeaderGroupMeeting.MeetingHostMan = SafetyLeaderGroupMeeting.MeetingHostMan;
+ newSafetyLeaderGroupMeeting.AttentPerson = SafetyLeaderGroupMeeting.AttentPerson;
+ newSafetyLeaderGroupMeeting.MeetingPlace = SafetyLeaderGroupMeeting.MeetingPlace;
+ newSafetyLeaderGroupMeeting.MeetingHostManId = SafetyLeaderGroupMeeting.MeetingHostManId;
+ newSafetyLeaderGroupMeeting.AttentPersonIds = SafetyLeaderGroupMeeting.AttentPersonIds;
+ newSafetyLeaderGroupMeeting.MeetingHostManOther = SafetyLeaderGroupMeeting.MeetingHostManOther;
+ db.SubmitChanges();
+ }
+ }
+
+ ///
+ /// 根据主键删除安全领导小组会议
+ ///
+ ///
+ public static void DeleteSafetyLeaderGroupMeetingById(string SafetyLeaderGroupMeetingId)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.Meeting_SafetyLeaderGroupMeeting SafetyLeaderGroupMeeting = db.Meeting_SafetyLeaderGroupMeeting.FirstOrDefault(e => e.SafetyLeaderGroupMeetingId == SafetyLeaderGroupMeetingId);
+ if (SafetyLeaderGroupMeeting != null)
+ {
+ ///删除编码表记录
+ BLL.CodeRecordsService.DeleteCodeRecordsByDataId(SafetyLeaderGroupMeetingId);
+ BLL.CommonService.DeleteAttachFileById(SafetyLeaderGroupMeetingId);
+ ////删除流程表
+ BLL.CommonService.DeleteFlowOperateByID(SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingId);
+ db.Meeting_SafetyLeaderGroupMeeting.DeleteOnSubmit(SafetyLeaderGroupMeeting);
+ db.SubmitChanges();
+ }
+ }
+ }
+}
diff --git a/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs b/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs
index 620aae67..356dfb93 100644
--- a/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs
+++ b/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs
@@ -45,7 +45,7 @@ namespace BLL
///
public static IEnumerable getListData(string projetcId, string unitId, string workPostId, string name, string idCard, string states, string personType, Grid Grid1)
{
- IQueryable getDataList = getDataLists.OrderBy(x => x.ProjectId).ThenBy(x => x.UnitId);
+ IQueryable getDataList = getDataLists;
if (!string.IsNullOrEmpty(projetcId) && projetcId != Const._Null)
{
getDataList = getDataList.Where(e => e.ProjectId == projetcId);
@@ -79,7 +79,7 @@ namespace BLL
{
return null;
}
- getDataList = SortConditionHelper.SortingAndPaging(getDataList, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
+ getDataList = SortConditionHelper.SortingAndPaging(getDataList.OrderBy(x => x.ProjectId).ThenBy(x => x.UnitId), Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
return from x in getDataList
select new
{
@@ -698,6 +698,7 @@ namespace BLL
InTime = person.InTime.HasValue ? person.InTime : DateTime.Now,
Isprint = "0",
States = person.States,
+ IsSafetyMonitoring=person.IsSafetyMonitoring,
};
////现场人员项目出入场记录
@@ -767,6 +768,7 @@ namespace BLL
newPerson.States = person.States;
setPersonItemInOut = true;
}
+ newPerson.IsSafetyMonitoring = person.IsSafetyMonitoring;
db.SubmitChanges();
if (!setPersonItemInOut)
diff --git a/SGGL/BLL/Person/Person_PersonsService.cs b/SGGL/BLL/Person/Person_PersonsService.cs
index 7b437e32..81ff991c 100644
--- a/SGGL/BLL/Person/Person_PersonsService.cs
+++ b/SGGL/BLL/Person/Person_PersonsService.cs
@@ -639,10 +639,16 @@ namespace BLL
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
List list = new List();
- list = (from x in db.Person_Persons
- where x.UnitId == unitId && x.DepartId == DepartId
- orderby x.PersonName
- select x).ToList();
+ var getPersons = from x in db.Person_Persons select x;
+ if (!string.IsNullOrEmpty(unitId))
+ {
+ getPersons = getPersons.Where(x => x.UnitId == unitId);
+ }
+ if (!string.IsNullOrEmpty(DepartId))
+ {
+ getPersons = getPersons.Where(x => x.DepartId == DepartId);
+ }
+ list = getPersons.OrderBy(x=>x.UnitId).OrderBy(x=>x.PersonName).ToList();
return list;
}
}
diff --git a/SGGL/BLL/SysManage/UnitService.cs b/SGGL/BLL/SysManage/UnitService.cs
index 15d73e67..b5cfae88 100644
--- a/SGGL/BLL/SysManage/UnitService.cs
+++ b/SGGL/BLL/SysManage/UnitService.cs
@@ -289,24 +289,37 @@ namespace BLL
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
List unitList = new List();
- if (unitType != Const.ProjectUnitType_2)
+ if (!string.IsNullOrEmpty(unitType))
{
- unitList = (from x in db.Base_Unit
- join y in db.Project_ProjectUnit
- on x.UnitId equals y.UnitId
- where y.ProjectId == projectId && y.UnitType == unitType
- orderby x.UnitCode
- select x).ToList();
+ if (unitType != Const.ProjectUnitType_2)
+ {
+ unitList = (from x in db.Base_Unit
+ join y in db.Project_ProjectUnit
+ on x.UnitId equals y.UnitId
+ where y.ProjectId == projectId && y.UnitType == unitType
+ orderby x.UnitCode
+ select x).ToList();
+ }
+ else
+ {
+ unitList = (from x in db.Base_Unit
+ join y in db.Project_ProjectUnit
+ on x.UnitId equals y.UnitId
+ where y.ProjectId == projectId && (y.UnitType == BLL.Const.ProjectUnitType_2 || y.UnitType == BLL.Const.ProjectUnitType_6)
+ orderby x.UnitCode
+ select x).ToList();
+ }
}
else
{
unitList = (from x in db.Base_Unit
join y in db.Project_ProjectUnit
on x.UnitId equals y.UnitId
- where y.ProjectId == projectId && (y.UnitType == BLL.Const.ProjectUnitType_2 || y.UnitType == BLL.Const.ProjectUnitType_6)
+ where y.ProjectId == projectId
orderby x.UnitCode
select x).ToList();
}
+
return unitList;
}
}
diff --git a/SGGL/BLL/ZHGL/Emergency/UnitDrillRecordListService.cs b/SGGL/BLL/ZHGL/Emergency/UnitDrillRecordListService.cs
new file mode 100644
index 00000000..47545cb0
--- /dev/null
+++ b/SGGL/BLL/ZHGL/Emergency/UnitDrillRecordListService.cs
@@ -0,0 +1,155 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace BLL
+{
+ ///
+ /// 应急演练
+ ///
+ public static class UnitDrillRecordListService
+ {
+ public static Model.SGGLDB db = Funs.DB;
+
+ ///
+ /// 根据主键获取应急演练
+ ///
+ ///
+ ///
+ public static Model.Emergency_DrillRecordList_Unit GetDrillRecordListById(string DrillRecordListId)
+ {
+ return Funs.DB.Emergency_DrillRecordList_Unit.FirstOrDefault(e => e.DrillRecordListId == DrillRecordListId);
+ }
+
+ ///
+ /// 根据时间获取应急演练信息
+ ///
+ /// 开始时间
+ /// 结束时间
+ /// 应急演练信息
+ public static List GetDrillRecordListsByDrillRecordDate(DateTime startTime, DateTime endTime, string projectId)
+ {
+ return (from x in Funs.DB.Emergency_DrillRecordList_Unit where x.DrillRecordDate >= startTime && x.DrillRecordDate < endTime && x.ProjectId == projectId && x.States == BLL.Const.State_2 select x).ToList();
+ }
+
+ ///
+ /// 根据时间段获取HSE应急演练
+ ///
+ /// 开始时间
+ /// 结束时间
+ /// 项目Id
+ /// 时间段内的HSE应急演练数量
+ public static int GetCountByDate(DateTime startTime, DateTime endTime, string projectId)
+ {
+ return (from x in Funs.DB.Emergency_DrillRecordList_Unit where x.DrillRecordDate >= startTime && x.DrillRecordDate <= endTime && x.ProjectId == projectId select x).Count();
+ }
+
+ ///
+ /// 根据时间段获取HSE应急演练
+ ///
+ /// 开始时间
+ /// 结束时间
+ /// 项目Id
+ /// 时间段内的HSE应急演练数量
+ public static int GetCountByDate2(DateTime startTime, DateTime endTime, string projectId)
+ {
+ return (from x in Funs.DB.Emergency_DrillRecordList_Unit where x.DrillRecordDate >= startTime && x.DrillRecordDate < endTime && x.ProjectId == projectId select x).Count();
+ }
+
+ ///
+ /// 获取HSE应急演练
+ ///
+ /// 开始时间
+ /// 结束时间
+ /// 项目Id
+ /// 时间段内的HSE应急演练数量
+ public static int GetCount(string projectId)
+ {
+ return (from x in Funs.DB.Emergency_DrillRecordList_Unit where x.ProjectId == projectId select x).Count();
+ }
+
+ ///
+ /// 添加应急演练
+ ///
+ ///
+ public static void AddDrillRecordList(Model.Emergency_DrillRecordList_Unit DrillRecordList)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.Emergency_DrillRecordList_Unit newDrillRecordList = new Model.Emergency_DrillRecordList_Unit
+ {
+ DrillRecordListId = DrillRecordList.DrillRecordListId,
+ ProjectId = DrillRecordList.ProjectId,
+ DrillRecordCode = DrillRecordList.DrillRecordCode,
+ DrillRecordName = DrillRecordList.DrillRecordName,
+ UnitIds = DrillRecordList.UnitIds,
+ UnitNames = DrillRecordList.UnitNames,
+ UserIds = DrillRecordList.UserIds,
+ UserNames = DrillRecordList.UserNames,
+ DrillRecordDate = DrillRecordList.DrillRecordDate,
+ DrillRecordContents = DrillRecordList.DrillRecordContents,
+ CompileMan = DrillRecordList.CompileMan,
+ CompileDate = System.DateTime.Now,
+ States = DrillRecordList.States,
+ AttachUrl = DrillRecordList.AttachUrl,
+ DrillRecordType = DrillRecordList.DrillRecordType,
+ JointPersonNum = DrillRecordList.JointPersonNum,
+ DrillCost = DrillRecordList.DrillCost
+ };
+ db.Emergency_DrillRecordList_Unit.InsertOnSubmit(newDrillRecordList);
+ db.SubmitChanges();
+ ////增加一条编码记录
+ BLL.CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(BLL.Const.ProjectDrillRecordListMenuId, DrillRecordList.ProjectId, null, DrillRecordList.DrillRecordListId, DrillRecordList.DrillRecordDate);
+ }
+
+ ///
+ /// 修改应急演练
+ ///
+ ///
+ public static void UpdateDrillRecordList(Model.Emergency_DrillRecordList_Unit DrillRecordList)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.Emergency_DrillRecordList_Unit newDrillRecordList = db.Emergency_DrillRecordList_Unit.FirstOrDefault(e => e.DrillRecordListId == DrillRecordList.DrillRecordListId);
+ if (newDrillRecordList != null)
+ {
+ newDrillRecordList.DrillRecordCode = DrillRecordList.DrillRecordCode;
+ newDrillRecordList.DrillRecordName = DrillRecordList.DrillRecordName;
+ newDrillRecordList.UnitIds = DrillRecordList.UnitIds;
+ newDrillRecordList.UnitNames = DrillRecordList.UnitNames;
+ newDrillRecordList.UserIds = DrillRecordList.UserIds;
+ newDrillRecordList.UserNames = DrillRecordList.UserNames;
+ newDrillRecordList.DrillRecordDate = DrillRecordList.DrillRecordDate;
+ newDrillRecordList.DrillRecordContents = DrillRecordList.DrillRecordContents;
+ newDrillRecordList.CompileMan = DrillRecordList.CompileMan;
+ //newDrillRecordList.CompileDate = DrillRecordList.CompileDate;
+ newDrillRecordList.States = DrillRecordList.States;
+ newDrillRecordList.AttachUrl = DrillRecordList.AttachUrl;
+ newDrillRecordList.DrillRecordType = DrillRecordList.DrillRecordType;
+ newDrillRecordList.JointPersonNum = DrillRecordList.JointPersonNum;
+ newDrillRecordList.DrillCost = DrillRecordList.DrillCost;
+ db.SubmitChanges();
+ }
+ }
+
+ ///
+ /// 根据主键删除应急演练
+ ///
+ ///
+ public static void DeleteDrillRecordListById(string DrillRecordListId)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.Emergency_DrillRecordList_Unit DrillRecordList = db.Emergency_DrillRecordList_Unit.FirstOrDefault(e => e.DrillRecordListId == DrillRecordListId);
+ if (DrillRecordList != null)
+ {
+ ///删除编码表记录
+ BLL.CodeRecordsService.DeleteCodeRecordsByDataId(DrillRecordList.DrillRecordListId);
+ ////删除附件表
+ BLL.CommonService.DeleteAttachFileById(DrillRecordList.DrillRecordListId);
+ ////删除流程表
+ BLL.CommonService.DeleteFlowOperateByID(DrillRecordList.DrillRecordListId);
+ db.Emergency_DrillRecordList_Unit.DeleteOnSubmit(DrillRecordList);
+ db.SubmitChanges();
+ }
+ }
+ }
+}
diff --git a/SGGL/BLL/ZHGL/Emergency/UnitEmergencyListService.cs b/SGGL/BLL/ZHGL/Emergency/UnitEmergencyListService.cs
new file mode 100644
index 00000000..955669a7
--- /dev/null
+++ b/SGGL/BLL/ZHGL/Emergency/UnitEmergencyListService.cs
@@ -0,0 +1,150 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace BLL
+{
+ ///
+ /// 应急预案管理
+ ///
+ public static class UnitEmergencyListService
+ {
+ public static Model.SGGLDB db = Funs.DB;
+
+ ///
+ /// 根据主键获取应急预案管理
+ ///
+ ///
+ ///
+ public static Model.Emergency_EmergencyList_Unit GetEmergencyListById(string EmergencyListId)
+ {
+ return Funs.DB.Emergency_EmergencyList_Unit.FirstOrDefault(e => e.EmergencyListId == EmergencyListId);
+ }
+
+ ///
+ /// 获取时间段文件、方案修编情况说明
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static List GetEmergencyListByDate(string projectId, DateTime startTime, DateTime endTime)
+ {
+ return (from x in Funs.DB.Emergency_EmergencyList_Unit where x.ProjectId == projectId && x.CompileDate >= startTime && x.CompileDate <= endTime select x).ToList();
+ }
+
+ ///
+ /// 根据应急预案类型获取应急预案信息集合
+ ///
+ /// 应急预案类型
+ /// 项目号
+ /// 应急预案实体集合
+ public static List GetEmergencyListsByEmergencyType(string emergencyType, string projectId, DateTime startTime, DateTime endTime)
+ {
+ using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
+ {
+ return (from x in db.Emergency_EmergencyList_Unit
+ join y in db.Base_EmergencyType
+ on x.EmergencyTypeId equals y.EmergencyTypeId
+ where y.EmergencyTypeName.Contains(emergencyType) && x.ProjectId == projectId && x.CompileDate >= startTime && x.CompileDate < endTime
+ select x).ToList();
+ }
+ }
+
+ ///
+ /// 根据应急预案类型获取其他应急预案信息集合
+ ///
+ /// 应急预案类型
+ /// 项目号
+ /// 其他应急预案实体集合
+ public static List GetOtherEmergencyListsByEmergencyType(string emergencyType, string projectId, DateTime startTime, DateTime endTime)
+ {
+ using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
+ {
+ return (from x in db.Emergency_EmergencyList_Unit
+ join y in db.Base_EmergencyType
+ on x.EmergencyTypeId equals y.EmergencyTypeId
+ where !y.EmergencyTypeName.Contains(emergencyType) && x.ProjectId == projectId && x.CompileDate >= startTime && x.CompileDate < endTime
+ select x).ToList();
+ }
+ }
+
+ ///
+ /// 添加应急预案管理
+ ///
+ ///
+ public static void AddEmergencyList(Model.Emergency_EmergencyList_Unit EmergencyList)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.Emergency_EmergencyList_Unit newEmergencyList = new Model.Emergency_EmergencyList_Unit
+ {
+ EmergencyListId = EmergencyList.EmergencyListId,
+ ProjectId = EmergencyList.ProjectId,
+ EmergencyCode = EmergencyList.EmergencyCode,
+ EmergencyName = EmergencyList.EmergencyName,
+ UnitId = EmergencyList.UnitId,
+ EmergencyTypeId = EmergencyList.EmergencyTypeId,
+ VersionCode = EmergencyList.VersionCode,
+ EmergencyContents = EmergencyList.EmergencyContents,
+ CompileMan = EmergencyList.CompileMan,
+ CompileDate = EmergencyList.CompileDate,
+ States = EmergencyList.States,
+ AttachUrl = EmergencyList.AttachUrl,
+ AuditMan = EmergencyList.AuditMan,
+ ApproveMan = EmergencyList.ApproveMan
+ };
+ db.Emergency_EmergencyList_Unit.InsertOnSubmit(newEmergencyList);
+ db.SubmitChanges();
+ ////增加一条编码记录
+ BLL.CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(BLL.Const.ProjectEmergencyListMenuId, EmergencyList.ProjectId, null, EmergencyList.EmergencyListId, EmergencyList.CompileDate);
+ }
+
+ ///
+ /// 修改应急预案管理
+ ///
+ ///
+ public static void UpdateEmergencyList(Model.Emergency_EmergencyList_Unit EmergencyList)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.Emergency_EmergencyList_Unit newEmergencyList = db.Emergency_EmergencyList_Unit.FirstOrDefault(e => e.EmergencyListId == EmergencyList.EmergencyListId);
+ if (newEmergencyList != null)
+ {
+ newEmergencyList.EmergencyCode = EmergencyList.EmergencyCode;
+ newEmergencyList.EmergencyName = EmergencyList.EmergencyName;
+ newEmergencyList.UnitId = EmergencyList.UnitId;
+ newEmergencyList.EmergencyTypeId = EmergencyList.EmergencyTypeId;
+ newEmergencyList.VersionCode = EmergencyList.VersionCode;
+ newEmergencyList.EmergencyContents = EmergencyList.EmergencyContents;
+ newEmergencyList.CompileMan = EmergencyList.CompileMan;
+ newEmergencyList.CompileDate = EmergencyList.CompileDate;
+ newEmergencyList.States = EmergencyList.States;
+ newEmergencyList.AttachUrl = EmergencyList.AttachUrl;
+ newEmergencyList.AuditMan = EmergencyList.AuditMan;
+ newEmergencyList.ApproveMan = EmergencyList.ApproveMan;
+ db.SubmitChanges();
+ }
+ }
+
+ ///
+ /// 根据主键删除应急预案管理
+ ///
+ ///
+ public static void DeleteEmergencyListById(string EmergencyListId)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.Emergency_EmergencyList_Unit EmergencyList = db.Emergency_EmergencyList_Unit.FirstOrDefault(e => e.EmergencyListId == EmergencyListId);
+ if (EmergencyList != null)
+ {
+ ///删除编码表记录
+ BLL.CodeRecordsService.DeleteCodeRecordsByDataId(EmergencyList.EmergencyListId);
+ ////删除附件表
+ BLL.CommonService.DeleteAttachFileById(EmergencyList.EmergencyListId);
+ ////删除流程表
+ BLL.CommonService.DeleteFlowOperateByID(EmergencyList.EmergencyListId);
+ db.Emergency_EmergencyList_Unit.DeleteOnSubmit(EmergencyList);
+ db.SubmitChanges();
+ }
+ }
+ }
+}
diff --git a/SGGL/BLL/ZHGL/Meeting/CompanySafetyMeetingService.cs b/SGGL/BLL/ZHGL/Meeting/CompanySafetyMeetingService.cs
new file mode 100644
index 00000000..002877c0
--- /dev/null
+++ b/SGGL/BLL/ZHGL/Meeting/CompanySafetyMeetingService.cs
@@ -0,0 +1,142 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace BLL
+{
+ ///
+ /// 企业安委会
+ ///
+ public static class CompanySafetyMeetingService
+ {
+ public static Model.SGGLDB db = Funs.DB;
+
+ ///
+ /// 根据主键获取企业安委会
+ ///
+ ///
+ ///
+ public static Model.Meeting_CompanySafetyMeeting GetCompanySafetyMeetingById(string CompanySafetyMeetingId)
+ {
+ return Funs.DB.Meeting_CompanySafetyMeeting.FirstOrDefault(e => e.CompanySafetyMeetingId == CompanySafetyMeetingId);
+ }
+
+ ///
+ /// 根据时间段获取月例会集合
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static int GetCountByTime(DateTime startTime, DateTime endTime)
+ {
+ return (from x in Funs.DB.Meeting_CompanySafetyMeeting where x.CompanySafetyMeetingDate >= startTime && x.CompanySafetyMeetingDate < endTime select x).Count();
+ }
+
+ ///
+ /// 根据时间段获取月例会参会人数
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static int? GetSumAttentPersonNumByMeetingDate(DateTime startTime, DateTime endTime)
+ {
+ int? sumAttentPersonNum = (from x in Funs.DB.Meeting_CompanySafetyMeeting where x.CompanySafetyMeetingDate >= startTime && x.CompanySafetyMeetingDate < endTime select x.AttentPersonNum).Sum();
+ if (sumAttentPersonNum == null)
+ {
+ return 0;
+ }
+ return sumAttentPersonNum;
+ }
+
+ ///
+ /// 根据日期和类型获取会议记录集合
+ ///
+ /// 开始时间
+ /// 结束时间
+ /// 项目号
+ /// 会议记录集合
+ public static List GetMeetingListsByDate(DateTime startTime, DateTime endTime)
+ {
+ return (from x in Funs.DB.Meeting_CompanySafetyMeeting where x.CompanySafetyMeetingDate >= startTime && x.CompanySafetyMeetingDate <= endTime orderby x.CompanySafetyMeetingDate select x).ToList();
+ }
+
+ ///
+ /// 添加企业安委会
+ ///
+ ///
+ public static void AddCompanySafetyMeeting(Model.Meeting_CompanySafetyMeeting CompanySafetyMeeting)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.Meeting_CompanySafetyMeeting newCompanySafetyMeeting = new Model.Meeting_CompanySafetyMeeting
+ {
+ CompanySafetyMeetingId = CompanySafetyMeeting.CompanySafetyMeetingId,
+ CompanySafetyMeetingCode = CompanySafetyMeeting.CompanySafetyMeetingCode,
+ CompanySafetyMeetingName = CompanySafetyMeeting.CompanySafetyMeetingName,
+ CompanySafetyMeetingDate = CompanySafetyMeeting.CompanySafetyMeetingDate,
+ CompileMan = CompanySafetyMeeting.CompileMan,
+ CompanySafetyMeetingContents = CompanySafetyMeeting.CompanySafetyMeetingContents,
+ CompileDate = CompanySafetyMeeting.CompileDate,
+ AttentPersonNum = CompanySafetyMeeting.AttentPersonNum,
+ MeetingHours = CompanySafetyMeeting.MeetingHours,
+ MeetingHostMan = CompanySafetyMeeting.MeetingHostMan,
+ AttentPerson = CompanySafetyMeeting.AttentPerson,
+ MeetingPlace = CompanySafetyMeeting.MeetingPlace,
+ MeetingHostManId = CompanySafetyMeeting.MeetingHostManId,
+ AttentPersonIds = CompanySafetyMeeting.AttentPersonIds,
+ MeetingHostManOther = CompanySafetyMeeting.MeetingHostManOther
+ };
+ db.Meeting_CompanySafetyMeeting.InsertOnSubmit(newCompanySafetyMeeting);
+ db.SubmitChanges();
+ ////增加一条编码记录
+ BLL.CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(BLL.Const.CompanySafetyMeetingMenuId, null, null, CompanySafetyMeeting.CompanySafetyMeetingId, CompanySafetyMeeting.CompileDate);
+ }
+
+ ///
+ /// 修改企业安委会
+ ///
+ ///
+ public static void UpdateCompanySafetyMeeting(Model.Meeting_CompanySafetyMeeting CompanySafetyMeeting)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.Meeting_CompanySafetyMeeting newCompanySafetyMeeting = db.Meeting_CompanySafetyMeeting.FirstOrDefault(e => e.CompanySafetyMeetingId == CompanySafetyMeeting.CompanySafetyMeetingId);
+ if (newCompanySafetyMeeting != null)
+ {
+ newCompanySafetyMeeting.CompanySafetyMeetingCode = CompanySafetyMeeting.CompanySafetyMeetingCode;
+ newCompanySafetyMeeting.CompanySafetyMeetingName = CompanySafetyMeeting.CompanySafetyMeetingName;
+ newCompanySafetyMeeting.CompanySafetyMeetingDate = CompanySafetyMeeting.CompanySafetyMeetingDate;
+ newCompanySafetyMeeting.CompileMan = CompanySafetyMeeting.CompileMan;
+ newCompanySafetyMeeting.CompanySafetyMeetingContents = CompanySafetyMeeting.CompanySafetyMeetingContents;
+ newCompanySafetyMeeting.CompileDate = CompanySafetyMeeting.CompileDate;
+ newCompanySafetyMeeting.AttentPersonNum = CompanySafetyMeeting.AttentPersonNum;
+ newCompanySafetyMeeting.MeetingHours = CompanySafetyMeeting.MeetingHours;
+ newCompanySafetyMeeting.MeetingHostMan = CompanySafetyMeeting.MeetingHostMan;
+ newCompanySafetyMeeting.AttentPerson = CompanySafetyMeeting.AttentPerson;
+ newCompanySafetyMeeting.MeetingPlace = CompanySafetyMeeting.MeetingPlace;
+ newCompanySafetyMeeting.MeetingHostManId = CompanySafetyMeeting.MeetingHostManId;
+ newCompanySafetyMeeting.AttentPersonIds = CompanySafetyMeeting.AttentPersonIds;
+ newCompanySafetyMeeting.MeetingHostManOther = CompanySafetyMeeting.MeetingHostManOther;
+ db.SubmitChanges();
+ }
+ }
+
+ ///
+ /// 根据主键删除企业安委会
+ ///
+ ///
+ public static void DeleteCompanySafetyMeetingById(string CompanySafetyMeetingId)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.Meeting_CompanySafetyMeeting CompanySafetyMeeting = db.Meeting_CompanySafetyMeeting.FirstOrDefault(e => e.CompanySafetyMeetingId == CompanySafetyMeetingId);
+ if (CompanySafetyMeeting != null)
+ {
+ ///删除编码表记录
+ BLL.CodeRecordsService.DeleteCodeRecordsByDataId(CompanySafetyMeetingId);
+ BLL.CommonService.DeleteAttachFileById(CompanySafetyMeetingId);
+ db.Meeting_CompanySafetyMeeting.DeleteOnSubmit(CompanySafetyMeeting);
+ db.SubmitChanges();
+ }
+ }
+ }
+}
diff --git a/SGGL/BLL/ZHGL/Meeting/CompanySpecialMeetingService.cs b/SGGL/BLL/ZHGL/Meeting/CompanySpecialMeetingService.cs
new file mode 100644
index 00000000..1e8886ee
--- /dev/null
+++ b/SGGL/BLL/ZHGL/Meeting/CompanySpecialMeetingService.cs
@@ -0,0 +1,142 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace BLL
+{
+ ///
+ /// 企业专题会
+ ///
+ public static class CompanySpecialMeetingService
+ {
+ public static Model.SGGLDB db = Funs.DB;
+
+ ///
+ /// 根据主键获取企业专题会
+ ///
+ ///
+ ///
+ public static Model.Meeting_CompanySpecialMeeting GetCompanySpecialMeetingById(string CompanySpecialMeetingId)
+ {
+ return Funs.DB.Meeting_CompanySpecialMeeting.FirstOrDefault(e => e.CompanySpecialMeetingId == CompanySpecialMeetingId);
+ }
+
+ ///
+ /// 根据时间段获取月例会集合
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static int GetCountByTime(DateTime startTime, DateTime endTime)
+ {
+ return (from x in Funs.DB.Meeting_CompanySpecialMeeting where x.CompanySpecialMeetingDate >= startTime && x.CompanySpecialMeetingDate < endTime select x).Count();
+ }
+
+ ///
+ /// 根据时间段获取月例会参会人数
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static int? GetSumAttentPersonNumByMeetingDate(DateTime startTime, DateTime endTime)
+ {
+ int? sumAttentPersonNum = (from x in Funs.DB.Meeting_CompanySpecialMeeting where x.CompanySpecialMeetingDate >= startTime && x.CompanySpecialMeetingDate < endTime select x.AttentPersonNum).Sum();
+ if (sumAttentPersonNum == null)
+ {
+ return 0;
+ }
+ return sumAttentPersonNum;
+ }
+
+ ///
+ /// 根据日期和类型获取会议记录集合
+ ///
+ /// 开始时间
+ /// 结束时间
+ /// 项目号
+ /// 会议记录集合
+ public static List GetMeetingListsByDate(DateTime startTime, DateTime endTime)
+ {
+ return (from x in Funs.DB.Meeting_CompanySpecialMeeting where x.CompanySpecialMeetingDate >= startTime && x.CompanySpecialMeetingDate <= endTime orderby x.CompanySpecialMeetingDate select x).ToList();
+ }
+
+ ///
+ /// 添加企业专题会
+ ///
+ ///
+ public static void AddCompanySpecialMeeting(Model.Meeting_CompanySpecialMeeting CompanySpecialMeeting)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.Meeting_CompanySpecialMeeting newCompanySpecialMeeting = new Model.Meeting_CompanySpecialMeeting
+ {
+ CompanySpecialMeetingId = CompanySpecialMeeting.CompanySpecialMeetingId,
+ CompanySpecialMeetingCode = CompanySpecialMeeting.CompanySpecialMeetingCode,
+ CompanySpecialMeetingName = CompanySpecialMeeting.CompanySpecialMeetingName,
+ CompanySpecialMeetingDate = CompanySpecialMeeting.CompanySpecialMeetingDate,
+ CompileMan = CompanySpecialMeeting.CompileMan,
+ CompanySpecialMeetingContents = CompanySpecialMeeting.CompanySpecialMeetingContents,
+ CompileDate = CompanySpecialMeeting.CompileDate,
+ AttentPersonNum = CompanySpecialMeeting.AttentPersonNum,
+ MeetingHours = CompanySpecialMeeting.MeetingHours,
+ MeetingHostMan = CompanySpecialMeeting.MeetingHostMan,
+ AttentPerson = CompanySpecialMeeting.AttentPerson,
+ MeetingPlace = CompanySpecialMeeting.MeetingPlace,
+ MeetingHostManId = CompanySpecialMeeting.MeetingHostManId,
+ AttentPersonIds = CompanySpecialMeeting.AttentPersonIds,
+ MeetingHostManOther = CompanySpecialMeeting.MeetingHostManOther
+ };
+ db.Meeting_CompanySpecialMeeting.InsertOnSubmit(newCompanySpecialMeeting);
+ db.SubmitChanges();
+ ////增加一条编码记录
+ BLL.CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(BLL.Const.CompanySpecialMeetingMenuId, null, null, CompanySpecialMeeting.CompanySpecialMeetingId, CompanySpecialMeeting.CompileDate);
+ }
+
+ ///
+ /// 修改企业专题会
+ ///
+ ///
+ public static void UpdateCompanySpecialMeeting(Model.Meeting_CompanySpecialMeeting CompanySpecialMeeting)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.Meeting_CompanySpecialMeeting newCompanySpecialMeeting = db.Meeting_CompanySpecialMeeting.FirstOrDefault(e => e.CompanySpecialMeetingId == CompanySpecialMeeting.CompanySpecialMeetingId);
+ if (newCompanySpecialMeeting != null)
+ {
+ newCompanySpecialMeeting.CompanySpecialMeetingCode = CompanySpecialMeeting.CompanySpecialMeetingCode;
+ newCompanySpecialMeeting.CompanySpecialMeetingName = CompanySpecialMeeting.CompanySpecialMeetingName;
+ newCompanySpecialMeeting.CompanySpecialMeetingDate = CompanySpecialMeeting.CompanySpecialMeetingDate;
+ newCompanySpecialMeeting.CompileMan = CompanySpecialMeeting.CompileMan;
+ newCompanySpecialMeeting.CompanySpecialMeetingContents = CompanySpecialMeeting.CompanySpecialMeetingContents;
+ newCompanySpecialMeeting.CompileDate = CompanySpecialMeeting.CompileDate;
+ newCompanySpecialMeeting.AttentPersonNum = CompanySpecialMeeting.AttentPersonNum;
+ newCompanySpecialMeeting.MeetingHours = CompanySpecialMeeting.MeetingHours;
+ newCompanySpecialMeeting.MeetingHostMan = CompanySpecialMeeting.MeetingHostMan;
+ newCompanySpecialMeeting.AttentPerson = CompanySpecialMeeting.AttentPerson;
+ newCompanySpecialMeeting.MeetingPlace = CompanySpecialMeeting.MeetingPlace;
+ newCompanySpecialMeeting.MeetingHostManId = CompanySpecialMeeting.MeetingHostManId;
+ newCompanySpecialMeeting.AttentPersonIds = CompanySpecialMeeting.AttentPersonIds;
+ newCompanySpecialMeeting.MeetingHostManOther = CompanySpecialMeeting.MeetingHostManOther;
+ db.SubmitChanges();
+ }
+ }
+
+ ///
+ /// 根据主键删除企业专题会
+ ///
+ ///
+ public static void DeleteCompanySpecialMeetingById(string CompanySpecialMeetingId)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.Meeting_CompanySpecialMeeting CompanySpecialMeeting = db.Meeting_CompanySpecialMeeting.FirstOrDefault(e => e.CompanySpecialMeetingId == CompanySpecialMeetingId);
+ if (CompanySpecialMeeting != null)
+ {
+ ///删除编码表记录
+ BLL.CodeRecordsService.DeleteCodeRecordsByDataId(CompanySpecialMeetingId);
+ BLL.CommonService.DeleteAttachFileById(CompanySpecialMeetingId);
+ db.Meeting_CompanySpecialMeeting.DeleteOnSubmit(CompanySpecialMeeting);
+ db.SubmitChanges();
+ }
+ }
+ }
+}
diff --git a/SGGL/BLL/ZHGL/Supervise/SubUnitCheckRectifyItemService.cs b/SGGL/BLL/ZHGL/Supervise/SubUnitCheckRectifyItemService.cs
new file mode 100644
index 00000000..11bde67b
--- /dev/null
+++ b/SGGL/BLL/ZHGL/Supervise/SubUnitCheckRectifyItemService.cs
@@ -0,0 +1,84 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BLL
+{
+ ///
+ /// 监督检查报告明细
+ ///
+ public static class SubUnitCheckRectifyItemService
+ {
+ ///
+ /// 根据评价报告主键获取所有明细信息
+ ///
+ ///
+ ///
+ public static List GetSubUnitCheckRectifyItemList(string subUnitCheckRectifyId)
+ {
+ return (from x in Funs.DB.Supervise_SubUnitCheckRectifyItem where x.SubUnitCheckRectifyId == subUnitCheckRectifyId orderby x.CheckDate descending select x).ToList();
+ }
+
+ ///
+ /// 添加监督评价报告明细
+ ///
+ ///
+ public static void AddSubUnitCheckRectifyItem(Model.Supervise_SubUnitCheckRectifyItem item)
+ {
+ Model.Supervise_SubUnitCheckRectifyItem newItem = new Model.Supervise_SubUnitCheckRectifyItem
+ {
+ SubUnitCheckRectifyItemId = item.SubUnitCheckRectifyItemId,
+ SubUnitCheckRectifyId = item.SubUnitCheckRectifyId,
+ Name = item.Name,
+ Sex = item.Sex,
+ UnitName = item.UnitName,
+ PostName = item.PostName,
+ WorkTitle = item.WorkTitle,
+ CheckPostName = item.CheckPostName,
+ CheckDate = item.CheckDate
+ };
+ Funs.DB.Supervise_SubUnitCheckRectifyItem.InsertOnSubmit(newItem);
+ Funs.DB.SubmitChanges();
+ }
+
+ ///
+ /// 根据评价报告主键删除所有相关明细信息
+ ///
+ ///
+ public static void DeleteSubUnitCheckRectifyItemsList(string subUnitCheckRectifyId)
+ {
+ var q = (from x in Funs.DB.Supervise_SubUnitCheckRectifyItem where x.SubUnitCheckRectifyId == subUnitCheckRectifyId select x).ToList();
+ if (q != null)
+ {
+ Funs.DB.Supervise_SubUnitCheckRectifyItem.DeleteAllOnSubmit(q);
+ Funs.DB.SubmitChanges();
+ }
+ }
+
+ ///
+ ///
+ ///
+ ///
+ public static void DeleteSubUnitCheckRectifyBySuperviseCheckReportId(string superviseCheckReportId)
+ {
+ var q = (from x in Funs.DB.Supervise_SubUnitCheckRectify where x.SuperviseCheckReportId == superviseCheckReportId select x);
+ if (q.Count() > 0)
+ {
+ foreach (var item in q)
+ {
+ var subUnitCheckRectifyItem = from x in Funs.DB.Supervise_SubUnitCheckRectifyItem where x.SubUnitCheckRectifyId == item.SubUnitCheckRectifyId select x;
+ if (subUnitCheckRectifyItem.Count() > 0)
+ {
+ Funs.DB.Supervise_SubUnitCheckRectifyItem.DeleteAllOnSubmit(subUnitCheckRectifyItem);
+ Funs.DB.SubmitChanges();
+ }
+ Funs.DB.Supervise_SubUnitCheckRectify.DeleteOnSubmit(item);
+ Funs.DB.SubmitChanges();
+ }
+
+ }
+ }
+ }
+}
diff --git a/SGGL/BLL/ZHGL/Supervise/SubUnitCheckRectifyService.cs b/SGGL/BLL/ZHGL/Supervise/SubUnitCheckRectifyService.cs
new file mode 100644
index 00000000..b0ba9ed7
--- /dev/null
+++ b/SGGL/BLL/ZHGL/Supervise/SubUnitCheckRectifyService.cs
@@ -0,0 +1,90 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BLL
+{
+ ///
+ /// 监督评价报告
+ ///
+ public static class SubUnitCheckRectifyService
+ {
+ ///
+ /// 根据安全监督检查报告id获取监督评价信息
+ ///
+ ///
+ ///
+ public static Model.Supervise_SubUnitCheckRectify GetSubUnitCheckRectifyBySuperviseCheckReportId(string superviseCheckReportId)
+ {
+ return Funs.DB.Supervise_SubUnitCheckRectify.FirstOrDefault(e => e.SuperviseCheckReportId == superviseCheckReportId);
+ }
+
+ ///
+ /// 根据主键获取监督评价信息
+ ///
+ ///
+ ///
+ public static Model.Supervise_SubUnitCheckRectify GetSubUnitCheckRectifyById(string subUnitCheckRectifyId)
+ {
+ return Funs.DB.Supervise_SubUnitCheckRectify.FirstOrDefault(e => e.SubUnitCheckRectifyId == subUnitCheckRectifyId);
+ }
+
+ ///
+ /// 添加监督评价报告
+ ///
+ ///
+ public static void AddSubUnitCheckRectify(Model.Supervise_SubUnitCheckRectify subUnitCheckRectify)
+ {
+ Model.Supervise_SubUnitCheckRectify newSubUnitCheckRectify = new Model.Supervise_SubUnitCheckRectify
+ {
+ SubUnitCheckRectifyId = subUnitCheckRectify.SubUnitCheckRectifyId,
+ SuperviseCheckReportId = subUnitCheckRectify.SuperviseCheckReportId,
+ UnitId = subUnitCheckRectify.UnitId,
+ CheckRectType = subUnitCheckRectify.CheckRectType,
+ Values1 = subUnitCheckRectify.Values1,
+ Values2 = subUnitCheckRectify.Values2,
+ Values3 = subUnitCheckRectify.Values3,
+ Values4 = subUnitCheckRectify.Values4,
+ Values5 = subUnitCheckRectify.Values5,
+ Values6 = subUnitCheckRectify.Values6,
+ Values7 = subUnitCheckRectify.Values7,
+ Values8 = subUnitCheckRectify.Values8,
+ AttachUrl = subUnitCheckRectify.AttachUrl,
+ UpDateTime = subUnitCheckRectify.UpDateTime,
+ CheckEndDate = subUnitCheckRectify.CheckEndDate,
+ UpState = subUnitCheckRectify.UpState
+ };
+ Funs.DB.Supervise_SubUnitCheckRectify.InsertOnSubmit(newSubUnitCheckRectify);
+ Funs.DB.SubmitChanges();
+ }
+
+ ///
+ /// 修改监督评价报告
+ ///
+ ///
+ public static void UpdateSubUnitCheckRectify(Model.Supervise_SubUnitCheckRectify subUnitCheckRectify)
+ {
+ Model.Supervise_SubUnitCheckRectify newSubUnitCheckRectify = Funs.DB.Supervise_SubUnitCheckRectify.FirstOrDefault(e => e.SubUnitCheckRectifyId == subUnitCheckRectify.SubUnitCheckRectifyId);
+ if (newSubUnitCheckRectify != null)
+ {
+ newSubUnitCheckRectify.UnitId = subUnitCheckRectify.UnitId;
+ newSubUnitCheckRectify.CheckRectType = subUnitCheckRectify.CheckRectType;
+ newSubUnitCheckRectify.Values1 = subUnitCheckRectify.Values1;
+ newSubUnitCheckRectify.Values2 = subUnitCheckRectify.Values2;
+ newSubUnitCheckRectify.Values3 = subUnitCheckRectify.Values3;
+ newSubUnitCheckRectify.Values4 = subUnitCheckRectify.Values4;
+ newSubUnitCheckRectify.Values5 = subUnitCheckRectify.Values5;
+ newSubUnitCheckRectify.Values6 = subUnitCheckRectify.Values6;
+ newSubUnitCheckRectify.Values7 = subUnitCheckRectify.Values7;
+ newSubUnitCheckRectify.Values8 = subUnitCheckRectify.Values8;
+ newSubUnitCheckRectify.AttachUrl = subUnitCheckRectify.AttachUrl;
+ newSubUnitCheckRectify.UpDateTime = subUnitCheckRectify.UpDateTime;
+ newSubUnitCheckRectify.UpState = subUnitCheckRectify.UpState;
+ newSubUnitCheckRectify.CheckEndDate = subUnitCheckRectify.CheckEndDate;
+ Funs.DB.SubmitChanges();
+ }
+ }
+ }
+}
diff --git a/SGGL/BLL/ZHGL/Supervise/SuperviseCheckRectifyItemService.cs b/SGGL/BLL/ZHGL/Supervise/SuperviseCheckRectifyItemService.cs
new file mode 100644
index 00000000..9b3ba215
--- /dev/null
+++ b/SGGL/BLL/ZHGL/Supervise/SuperviseCheckRectifyItemService.cs
@@ -0,0 +1,86 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BLL
+{
+ ///
+ /// 安全监督检查整改明细表
+ ///
+ public static class SuperviseCheckRectifyItemService
+ {
+ ///
+ /// 根据主键获取安全监督检查整改明细信息
+ ///
+ ///
+ ///
+ public static Model.Supervise_SuperviseCheckRectifyItem GetSuperviseCheckRectifyItemById(string superviseCheckRectifyItemId)
+ {
+ return Funs.DB.Supervise_SuperviseCheckRectifyItem.FirstOrDefault(e => e.SuperviseCheckRectifyItemId == superviseCheckRectifyItemId);
+ }
+
+ ///
+ /// 根据安全监督检查整改id获取所有相关明细信息
+ ///
+ ///
+ ///
+ public static List GetSuperviseCheckRectifyItemBySuperviseCheckRectifyId(string superviseCheckRectifyId)
+ {
+ return (from x in Funs.DB.Supervise_SuperviseCheckRectifyItem where x.SuperviseCheckRectifyId == superviseCheckRectifyId select x).ToList();
+ }
+
+ ///
+ /// 添加安全监督检查整改明细信息
+ ///
+ ///
+ public static void AddSuperviseCheckRectifyItem(Model.Supervise_SuperviseCheckRectifyItem superviseCheckRectifyItem)
+ {
+ Model.Supervise_SuperviseCheckRectifyItem newSuperviseCheckRectifyItem = new Model.Supervise_SuperviseCheckRectifyItem
+ {
+ SuperviseCheckRectifyItemId = superviseCheckRectifyItem.SuperviseCheckRectifyItemId,
+ SuperviseCheckRectifyId = superviseCheckRectifyItem.SuperviseCheckRectifyId,
+ RectifyItemId = superviseCheckRectifyItem.RectifyItemId,
+ ConfirmMan = superviseCheckRectifyItem.ConfirmMan,
+ ConfirmDate = superviseCheckRectifyItem.ConfirmDate,
+ OrderEndDate = superviseCheckRectifyItem.OrderEndDate,
+ OrderEndPerson = superviseCheckRectifyItem.OrderEndPerson,
+ RealEndDate = superviseCheckRectifyItem.RealEndDate,
+ AttachUrl = superviseCheckRectifyItem.AttachUrl,
+ VerifierName=superviseCheckRectifyItem.VerifierName,
+ VerifierDate=superviseCheckRectifyItem.VerifierDate,
+ };
+ Funs.DB.Supervise_SuperviseCheckRectifyItem.InsertOnSubmit(newSuperviseCheckRectifyItem);
+ Funs.DB.SubmitChanges();
+ }
+
+ ///
+ /// 根据主键删除安全监督检查整改明细信息
+ ///
+ ///
+ public static void DeleteSuperviseCheckRectifyItem(string superviseCheckRectifyItemId)
+ {
+ Model.Supervise_SuperviseCheckRectifyItem superviseCheckRectifyItem = Funs.DB.Supervise_SuperviseCheckRectifyItem.FirstOrDefault(e => e.SuperviseCheckRectifyItemId == superviseCheckRectifyItemId);
+ if (superviseCheckRectifyItem != null)
+ {
+ Funs.DB.Supervise_SuperviseCheckRectifyItem.DeleteOnSubmit(superviseCheckRectifyItem);
+ Funs.DB.SubmitChanges();
+ }
+ }
+
+ ///
+ /// 根据安全监督检查整改ID删除所有相关明细信息
+ ///
+ ///
+ public static void DeleteSuperviseCheckRectifyItemBySuperviseCheckRectifyId(string superviseCheckRectifyId)
+ {
+ var q = (from x in Funs.DB.Supervise_SuperviseCheckRectifyItem where x.SuperviseCheckRectifyId == superviseCheckRectifyId select x).ToList();
+ if (q != null)
+ {
+ Funs.DB.Supervise_SuperviseCheckRectifyItem.DeleteAllOnSubmit(q);
+ Funs.DB.SubmitChanges();
+ }
+ }
+ }
+}
diff --git a/SGGL/BLL/ZHGL/Supervise/SuperviseCheckRectifyService.cs b/SGGL/BLL/ZHGL/Supervise/SuperviseCheckRectifyService.cs
new file mode 100644
index 00000000..5b62af73
--- /dev/null
+++ b/SGGL/BLL/ZHGL/Supervise/SuperviseCheckRectifyService.cs
@@ -0,0 +1,97 @@
+using System.Linq;
+
+namespace BLL
+{
+ ///
+ /// 安全监督检查整改
+ ///
+ public static class SuperviseCheckRectifyService
+ {
+ ///
+ /// 根据主键获取安全监督检查整改
+ ///
+ ///
+ ///
+ public static Model.Supervise_SuperviseCheckRectify GetSuperviseCheckRectifyById(string superviseCheckRectifyId)
+ {
+ return Funs.DB.Supervise_SuperviseCheckRectify.FirstOrDefault(e => e.SuperviseCheckRectifyId == superviseCheckRectifyId);
+ }
+
+ ///
+ /// 根据检查报告id获取整改
+ ///
+ ///
+ ///
+ public static Model.Supervise_SuperviseCheckRectify GetSuperviseCheckRectifyBySuperviseCheckReportId(string superviseCheckReportId)
+ {
+ return Funs.DB.Supervise_SuperviseCheckRectify.FirstOrDefault(e => e.SuperviseCheckReportId == superviseCheckReportId);
+ }
+
+ ///
+ /// 添加安全监督检查整改
+ ///
+ ///
+ public static void AddSuperviseCheckRectify(Model.Supervise_SuperviseCheckRectify superviseCheckRectify)
+ {
+ Model.Supervise_SuperviseCheckRectify newSuperviseCheckRectify = new Model.Supervise_SuperviseCheckRectify
+ {
+ SuperviseCheckRectifyId = superviseCheckRectify.SuperviseCheckRectifyId,
+ SuperviseCheckRectifyCode = superviseCheckRectify.SuperviseCheckRectifyCode,
+ ProjectId = superviseCheckRectify.ProjectId,
+ UnitId = superviseCheckRectify.UnitId,
+ CheckDate = superviseCheckRectify.CheckDate,
+ IssueMan = superviseCheckRectify.IssueMan,
+ IssueDate = superviseCheckRectify.IssueDate,
+ SuperviseCheckReportId = superviseCheckRectify.SuperviseCheckReportId,
+ HandleState = superviseCheckRectify.HandleState
+ };
+ Funs.DB.Supervise_SuperviseCheckRectify.InsertOnSubmit(newSuperviseCheckRectify);
+ Funs.DB.SubmitChanges();
+ }
+
+ ///
+ /// 修改安全监督检查整改
+ ///
+ ///
+ public static void UpdateSuperviseCheckRectify(Model.Supervise_SuperviseCheckRectify superviseCheckRectify)
+ {
+ Model.Supervise_SuperviseCheckRectify newSuperviseCheckRectify = Funs.DB.Supervise_SuperviseCheckRectify.FirstOrDefault(e => e.SuperviseCheckRectifyId == superviseCheckRectify.SuperviseCheckRectifyId);
+ if (newSuperviseCheckRectify != null)
+ {
+ newSuperviseCheckRectify.SuperviseCheckRectifyCode = superviseCheckRectify.SuperviseCheckRectifyCode;
+ newSuperviseCheckRectify.ProjectId = superviseCheckRectify.ProjectId;
+ newSuperviseCheckRectify.UnitId = superviseCheckRectify.UnitId;
+ newSuperviseCheckRectify.CheckDate = superviseCheckRectify.CheckDate;
+ newSuperviseCheckRectify.IssueMan = superviseCheckRectify.IssueMan;
+ newSuperviseCheckRectify.IssueDate = superviseCheckRectify.IssueDate;
+ newSuperviseCheckRectify.SuperviseCheckReportId = superviseCheckRectify.SuperviseCheckReportId;
+ newSuperviseCheckRectify.HandleState = superviseCheckRectify.HandleState;
+ Funs.DB.SubmitChanges();
+ }
+ }
+
+ ///
+ /// 根据主键删除安全监督检查整改
+ ///
+ ///
+ public static void DeleteSuperviseCheckRectifyById(string superviseCheckRectifyId)
+ {
+ Model.Supervise_SuperviseCheckRectify superviseCheckRectify = Funs.DB.Supervise_SuperviseCheckRectify.FirstOrDefault(e => e.SuperviseCheckRectifyId == superviseCheckRectifyId);
+ if (superviseCheckRectify != null)
+ {
+ var superviseCheckRectifys = from x in Funs.DB.Supervise_SuperviseCheckRectify where x.SuperviseCheckReportId == superviseCheckRectify.SuperviseCheckReportId select x;
+ if (superviseCheckRectifys.Count() == 1)
+ {
+ var report = BLL.SuperviseCheckReportService.GetSuperviseCheckReportById(superviseCheckRectify.SuperviseCheckReportId);
+ if (report != null)
+ {
+ report.IsIssued = null; //已下发
+ BLL.SuperviseCheckReportService.UpdateSuperviseCheckReport(report);
+ }
+ }
+ Funs.DB.Supervise_SuperviseCheckRectify.DeleteOnSubmit(superviseCheckRectify);
+ Funs.DB.SubmitChanges();
+ }
+ }
+ }
+}
diff --git a/SGGL/BLL/ZHGL/Supervise/SuperviseCheckReportItemService.cs b/SGGL/BLL/ZHGL/Supervise/SuperviseCheckReportItemService.cs
new file mode 100644
index 00000000..75f09e57
--- /dev/null
+++ b/SGGL/BLL/ZHGL/Supervise/SuperviseCheckReportItemService.cs
@@ -0,0 +1,90 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BLL
+{
+ ///
+ /// 安全监督检查报告明细表
+ ///
+ public static class SuperviseCheckReportItemService
+ {
+ ///
+ /// 根据主键获取安全监督检查报告明细信息
+ ///
+ ///
+ ///
+ public static Model.Supervise_SuperviseCheckReportItem GetSuperviseCheckReportItemById(string superviseCheckReportItemId)
+ {
+ return Funs.DB.Supervise_SuperviseCheckReportItem.FirstOrDefault(e => e.SuperviseCheckReportItemId == superviseCheckReportItemId);
+ }
+
+ ///
+ /// 根据安全监督检查报告id获取所有相关明细信息
+ ///
+ ///
+ ///
+ public static List GetSuperviseCheckReportItemBySuperviseCheckReportId(string superviseCheckReportId)
+ {
+ return (from x in Funs.DB.Supervise_SuperviseCheckReportItem where x.SuperviseCheckReportId == superviseCheckReportId select x).ToList();
+ }
+
+ ///
+ /// 根据安全监督检查报告id获取所有选中的相关明细信息
+ ///
+ ///
+ ///
+ public static List GetSelectedSuperviseCheckReportItemBySuperviseCheckReportId(string superviseCheckReportId)
+ {
+ return (from x in Funs.DB.Supervise_SuperviseCheckReportItem where x.SuperviseCheckReportId == superviseCheckReportId && x.IsSelected == true select x).ToList();
+ }
+
+ ///
+ /// 添加安全监督检查报告明细信息
+ ///
+ ///
+ public static void AddSuperviseCheckReportItem(Model.Supervise_SuperviseCheckReportItem superviseCheckReportItem)
+ {
+ Model.Supervise_SuperviseCheckReportItem newSuperviseCheckReportItem = new Model.Supervise_SuperviseCheckReportItem
+ {
+ SuperviseCheckReportItemId = superviseCheckReportItem.SuperviseCheckReportItemId,
+ SuperviseCheckReportId = superviseCheckReportItem.SuperviseCheckReportId,
+ RectifyItemId = superviseCheckReportItem.RectifyItemId,
+ IsSelected = superviseCheckReportItem.IsSelected,
+ AttachUrl = superviseCheckReportItem.AttachUrl
+ };
+ Funs.DB.Supervise_SuperviseCheckReportItem.InsertOnSubmit(newSuperviseCheckReportItem);
+ Funs.DB.SubmitChanges();
+ }
+
+ ///
+ /// 根据主键删除安全监督检查报告明细信息
+ ///
+ ///
+ public static void DeleteSuperviseCheckReportItem(string superviseCheckReportItemId)
+ {
+ Model.Supervise_SuperviseCheckReportItem superviseCheckReportItem = Funs.DB.Supervise_SuperviseCheckReportItem.FirstOrDefault(e => e.SuperviseCheckReportItemId == superviseCheckReportItemId);
+ if (superviseCheckReportItem != null)
+ {
+ Funs.DB.Supervise_SuperviseCheckReportItem.DeleteOnSubmit(superviseCheckReportItem);
+ Funs.DB.SubmitChanges();
+ }
+ }
+
+ ///
+ /// 根据安全监督检查报告ID删除所有相关明细信息
+ ///
+ ///
+ public static void DeleteSuperviseCheckReportItemBySuperviseCheckReportId(string superviseCheckReportId)
+ {
+ var q = (from x in Funs.DB.Supervise_SuperviseCheckReportItem where x.SuperviseCheckReportId == superviseCheckReportId select x).ToList();
+ if (q != null)
+ {
+ Funs.DB.Supervise_SuperviseCheckReportItem.DeleteAllOnSubmit(q);
+ Funs.DB.SubmitChanges();
+ }
+ }
+ }
+}
diff --git a/SGGL/BLL/ZHGL/Supervise/SuperviseCheckReportService.cs b/SGGL/BLL/ZHGL/Supervise/SuperviseCheckReportService.cs
new file mode 100644
index 00000000..449b7fa1
--- /dev/null
+++ b/SGGL/BLL/ZHGL/Supervise/SuperviseCheckReportService.cs
@@ -0,0 +1,87 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BLL
+{
+ ///
+ /// 安全监督检查报告表
+ ///
+ public static class SuperviseCheckReportService
+ {
+ ///
+ /// 根据主键获取安全监督检查报告
+ ///
+ ///
+ ///
+ public static Model.Supervise_SuperviseCheckReport GetSuperviseCheckReportById(string superviseCheckReportId)
+ {
+ return Funs.DB.Supervise_SuperviseCheckReport.FirstOrDefault(e => e.SuperviseCheckReportId == superviseCheckReportId);
+ }
+
+ ///
+ /// 添加安全监督检查报告
+ ///
+ ///
+ public static void AddSuperviseCheckReport(Model.Supervise_SuperviseCheckReport superviseCheckReport)
+ {
+ Model.Supervise_SuperviseCheckReport newSuperviseCheckReport = new Model.Supervise_SuperviseCheckReport
+ {
+ SuperviseCheckReportId = superviseCheckReport.SuperviseCheckReportId,
+ SuperviseCheckReportCode = superviseCheckReport.SuperviseCheckReportCode,
+ CheckDate = superviseCheckReport.CheckDate,
+ ProjectId = superviseCheckReport.ProjectId,
+ UnitId = superviseCheckReport.UnitId,
+ CheckTeam = superviseCheckReport.CheckTeam,
+ EvaluationResult = superviseCheckReport.EvaluationResult,
+ CheckType = superviseCheckReport.CheckType,
+ AttachUrl = superviseCheckReport.AttachUrl,
+ IsIssued = superviseCheckReport.IsIssued
+ };
+ Funs.DB.Supervise_SuperviseCheckReport.InsertOnSubmit(newSuperviseCheckReport);
+ Funs.DB.SubmitChanges();
+ }
+
+ ///
+ /// 修改安全监督检查报告
+ ///
+ ///
+ public static void UpdateSuperviseCheckReport(Model.Supervise_SuperviseCheckReport superviseCheckReport)
+ {
+ Model.Supervise_SuperviseCheckReport newSuperviseCheckReport = Funs.DB.Supervise_SuperviseCheckReport.FirstOrDefault(e => e.SuperviseCheckReportId == superviseCheckReport.SuperviseCheckReportId);
+ if (newSuperviseCheckReport != null)
+ {
+ newSuperviseCheckReport.SuperviseCheckReportCode = superviseCheckReport.SuperviseCheckReportCode;
+ newSuperviseCheckReport.CheckDate = superviseCheckReport.CheckDate;
+ newSuperviseCheckReport.ProjectId = superviseCheckReport.ProjectId;
+ newSuperviseCheckReport.UnitId = superviseCheckReport.UnitId;
+ newSuperviseCheckReport.CheckTeam = superviseCheckReport.CheckTeam;
+ newSuperviseCheckReport.EvaluationResult = superviseCheckReport.EvaluationResult;
+ newSuperviseCheckReport.CheckType = superviseCheckReport.CheckType;
+ newSuperviseCheckReport.AttachUrl = superviseCheckReport.AttachUrl;
+ newSuperviseCheckReport.IsIssued = superviseCheckReport.IsIssued;
+ Funs.DB.SubmitChanges();
+ }
+ }
+
+ ///
+ /// 根据主键删除安全监督检查报告
+ ///
+ ///
+ public static void DeleteSuperviseCheckReportById(string superviseCheckReportId)
+ {
+ Model.Supervise_SuperviseCheckReport superviseCheckReport = Funs.DB.Supervise_SuperviseCheckReport.FirstOrDefault(e => e.SuperviseCheckReportId == superviseCheckReportId);
+ if (superviseCheckReport != null)
+ {
+ if (!string.IsNullOrEmpty(superviseCheckReport.AttachUrl))
+ {
+ BLL.UploadFileService.DeleteFile(Funs.RootPath, superviseCheckReport.AttachUrl);//删除附件
+ }
+ Funs.DB.Supervise_SuperviseCheckReport.DeleteOnSubmit(superviseCheckReport);
+ Funs.DB.SubmitChanges();
+ }
+ }
+ }
+}
diff --git a/SGGL/FineUIPro.Web/BaseInfo/Certificate.aspx b/SGGL/FineUIPro.Web/BaseInfo/Certificate.aspx
index 7d9d15fe..1fd9ae69 100644
--- a/SGGL/FineUIPro.Web/BaseInfo/Certificate.aspx
+++ b/SGGL/FineUIPro.Web/BaseInfo/Certificate.aspx
@@ -5,6 +5,18 @@
特岗证书
+
+
+