| 
									
										
										
										
											2021-04-30 10:28:37 +08:00
										 |  |  |  | using System; | 
					
						
							|  |  |  |  | using System.Collections.Generic; | 
					
						
							|  |  |  |  | using System.Linq; | 
					
						
							|  |  |  |  | using System.Text; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | namespace BLL | 
					
						
							|  |  |  |  | { | 
					
						
							|  |  |  |  |     /// <summary> | 
					
						
							| 
									
										
										
										
											2023-03-30 13:51:33 +08:00
										 |  |  |  |     /// 企业安全数据统计月报 | 
					
						
							| 
									
										
										
										
											2021-04-30 10:28:37 +08:00
										 |  |  |  |     /// </summary> | 
					
						
							|  |  |  |  |     public static class ProjectMillionsMonthlyReportService | 
					
						
							|  |  |  |  |     { | 
					
						
							|  |  |  |  |         public static Model.SGGLDB db = Funs.DB; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							| 
									
										
										
										
											2023-03-30 13:51:33 +08:00
										 |  |  |  |         /// 根据主键获取企业安全数据统计月报 | 
					
						
							| 
									
										
										
										
											2021-04-30 10:28:37 +08:00
										 |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="millionsMonthlyReport"></param> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public static Model.InformationProject_MillionsMonthlyReport GetMillionsMonthlyReportById(string millionsMonthlyReportId) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             return Funs.DB.InformationProject_MillionsMonthlyReport.FirstOrDefault(e => e.MillionsMonthlyReportId == millionsMonthlyReportId); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							| 
									
										
										
										
											2023-03-30 13:51:33 +08:00
										 |  |  |  |         /// 添加企业安全数据统计月报 | 
					
						
							| 
									
										
										
										
											2021-04-30 10:28:37 +08:00
										 |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="millionsMonthlyReport"></param> | 
					
						
							|  |  |  |  |         public static void AddMillionsMonthlyReport(Model.InformationProject_MillionsMonthlyReport millionsMonthlyReport) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             Model.SGGLDB db = Funs.DB; | 
					
						
							|  |  |  |  |             Model.InformationProject_MillionsMonthlyReport newMillionsMonthlyReport = new Model.InformationProject_MillionsMonthlyReport | 
					
						
							|  |  |  |  |             { | 
					
						
							|  |  |  |  |                 MillionsMonthlyReportId = millionsMonthlyReport.MillionsMonthlyReportId, | 
					
						
							|  |  |  |  |                 ProjectId = millionsMonthlyReport.ProjectId, | 
					
						
							|  |  |  |  |                 Year = millionsMonthlyReport.Year, | 
					
						
							|  |  |  |  |                 Month = millionsMonthlyReport.Month, | 
					
						
							|  |  |  |  |                 CompileMan = millionsMonthlyReport.CompileMan, | 
					
						
							|  |  |  |  |                 CompileDate = millionsMonthlyReport.CompileDate, | 
					
						
							|  |  |  |  |                 States = millionsMonthlyReport.States, | 
					
						
							|  |  |  |  |                 Affiliation = millionsMonthlyReport.Affiliation, | 
					
						
							|  |  |  |  |                 Name = millionsMonthlyReport.Name, | 
					
						
							|  |  |  |  |                 PostPersonNum = millionsMonthlyReport.PostPersonNum, | 
					
						
							|  |  |  |  |                 SnapPersonNum = millionsMonthlyReport.SnapPersonNum, | 
					
						
							|  |  |  |  |                 ContractorNum = millionsMonthlyReport.ContractorNum, | 
					
						
							|  |  |  |  |                 SumPersonNum = millionsMonthlyReport.SumPersonNum, | 
					
						
							|  |  |  |  |                 TotalWorkNum = millionsMonthlyReport.TotalWorkNum, | 
					
						
							| 
									
										
										
										
											2023-03-30 13:51:33 +08:00
										 |  |  |  |                 DeathAccidentNum = millionsMonthlyReport.DeathAccidentNum, | 
					
						
							|  |  |  |  |                 DeathAccidentPersonNum = millionsMonthlyReport.DeathAccidentPersonNum, | 
					
						
							|  |  |  |  |                 DeathAccidentLossHour = millionsMonthlyReport.DeathAccidentLossHour, | 
					
						
							| 
									
										
										
										
											2021-04-30 10:28:37 +08:00
										 |  |  |  |                 SeriousInjuriesNum = millionsMonthlyReport.SeriousInjuriesNum, | 
					
						
							|  |  |  |  |                 SeriousInjuriesPersonNum = millionsMonthlyReport.SeriousInjuriesPersonNum, | 
					
						
							|  |  |  |  |                 SeriousInjuriesLossHour = millionsMonthlyReport.SeriousInjuriesLossHour, | 
					
						
							|  |  |  |  |                 MinorAccidentNum = millionsMonthlyReport.MinorAccidentNum, | 
					
						
							|  |  |  |  |                 MinorAccidentPersonNum = millionsMonthlyReport.MinorAccidentPersonNum, | 
					
						
							|  |  |  |  |                 MinorAccidentLossHour = millionsMonthlyReport.MinorAccidentLossHour, | 
					
						
							|  |  |  |  |                 OtherAccidentNum = millionsMonthlyReport.OtherAccidentNum, | 
					
						
							|  |  |  |  |                 OtherAccidentPersonNum = millionsMonthlyReport.OtherAccidentPersonNum, | 
					
						
							|  |  |  |  |                 OtherAccidentLossHour = millionsMonthlyReport.OtherAccidentLossHour, | 
					
						
							|  |  |  |  |                 RestrictedWorkPersonNum = millionsMonthlyReport.RestrictedWorkPersonNum, | 
					
						
							|  |  |  |  |                 RestrictedWorkLossHour = millionsMonthlyReport.RestrictedWorkLossHour, | 
					
						
							|  |  |  |  |                 MedicalTreatmentPersonNum = millionsMonthlyReport.MedicalTreatmentPersonNum, | 
					
						
							|  |  |  |  |                 MedicalTreatmentLossHour = millionsMonthlyReport.MedicalTreatmentLossHour, | 
					
						
							|  |  |  |  |                 FireNum = millionsMonthlyReport.FireNum, | 
					
						
							|  |  |  |  |                 ExplosionNum = millionsMonthlyReport.ExplosionNum, | 
					
						
							| 
									
										
										
										
											2023-03-30 13:51:33 +08:00
										 |  |  |  |                 EnvironmenNum = millionsMonthlyReport.EnvironmenNum, | 
					
						
							| 
									
										
										
										
											2021-04-30 10:28:37 +08:00
										 |  |  |  |                 TrafficNum = millionsMonthlyReport.TrafficNum, | 
					
						
							|  |  |  |  |                 EquipmentNum = millionsMonthlyReport.EquipmentNum, | 
					
						
							|  |  |  |  |                 QualityNum = millionsMonthlyReport.QualityNum, | 
					
						
							|  |  |  |  |                 OtherNum = millionsMonthlyReport.OtherNum, | 
					
						
							|  |  |  |  |                 FirstAidDressingsNum = millionsMonthlyReport.FirstAidDressingsNum, | 
					
						
							|  |  |  |  |                 AttemptedEventNum = millionsMonthlyReport.AttemptedEventNum, | 
					
						
							| 
									
										
										
										
											2023-03-30 13:51:33 +08:00
										 |  |  |  |                 LossDayNum = millionsMonthlyReport.LossDayNum, | 
					
						
							|  |  |  |  |                 InputCosts = millionsMonthlyReport.InputCosts, | 
					
						
							|  |  |  |  |                 TrainNum = millionsMonthlyReport.TrainNum, | 
					
						
							|  |  |  |  |                 GeneralHazardNum = millionsMonthlyReport.GeneralHazardNum, | 
					
						
							|  |  |  |  |                 MajorHazardNum = millionsMonthlyReport.MajorHazardNum, | 
					
						
							|  |  |  |  |                 NotProofLargeProjectNum = millionsMonthlyReport.NotProofLargeProjectNum, | 
					
						
							|  |  |  |  |                 ProofLargeProjectNum = millionsMonthlyReport.ProofLargeProjectNum, | 
					
						
							|  |  |  |  |                 FireLicenseNum = millionsMonthlyReport.FireLicenseNum, | 
					
						
							|  |  |  |  |                 LimitLicenseNum = millionsMonthlyReport.LimitLicenseNum, | 
					
						
							|  |  |  |  |                 HighLicenseNum = millionsMonthlyReport.HighLicenseNum, | 
					
						
							|  |  |  |  |                 HoistingLicenseNum = millionsMonthlyReport.HoistingLicenseNum, | 
					
						
							|  |  |  |  |                 BreakGroundLicenseNum = millionsMonthlyReport.BreakGroundLicenseNum, | 
					
						
							|  |  |  |  |                 ElectricityLicenseNum = millionsMonthlyReport.ElectricityLicenseNum, | 
					
						
							|  |  |  |  |                 RTLicenseNum = millionsMonthlyReport.RTLicenseNum, | 
					
						
							|  |  |  |  |                 NightLicenseNum = millionsMonthlyReport.NightLicenseNum, | 
					
						
							|  |  |  |  |                 CommissionerNum = millionsMonthlyReport.CommissionerNum, | 
					
						
							|  |  |  |  |                 SoleDutyNum = millionsMonthlyReport.SoleDutyNum, | 
					
						
							| 
									
										
										
										
											2021-04-30 10:28:37 +08:00
										 |  |  |  |             }; | 
					
						
							|  |  |  |  |             db.InformationProject_MillionsMonthlyReport.InsertOnSubmit(newMillionsMonthlyReport); | 
					
						
							|  |  |  |  |             db.SubmitChanges(); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							| 
									
										
										
										
											2023-03-30 13:51:33 +08:00
										 |  |  |  |         /// 修改企业安全数据统计月报 | 
					
						
							| 
									
										
										
										
											2021-04-30 10:28:37 +08:00
										 |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="millionsMonthlyReport"></param> | 
					
						
							|  |  |  |  |         public static void UpdateMillionsMonthlyReport(Model.InformationProject_MillionsMonthlyReport millionsMonthlyReport) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             Model.SGGLDB db = Funs.DB; | 
					
						
							|  |  |  |  |             Model.InformationProject_MillionsMonthlyReport newMillionsMonthlyReport = db.InformationProject_MillionsMonthlyReport.FirstOrDefault(e => e.MillionsMonthlyReportId == millionsMonthlyReport.MillionsMonthlyReportId); | 
					
						
							|  |  |  |  |             if (newMillionsMonthlyReport != null) | 
					
						
							|  |  |  |  |             { | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.ProjectId = millionsMonthlyReport.ProjectId; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.Year = millionsMonthlyReport.Year; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.Month = millionsMonthlyReport.Month; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.CompileMan = millionsMonthlyReport.CompileMan; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.CompileDate = millionsMonthlyReport.CompileDate; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.States = millionsMonthlyReport.States; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.Affiliation = millionsMonthlyReport.Affiliation; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.Name = millionsMonthlyReport.Name; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.PostPersonNum = millionsMonthlyReport.PostPersonNum; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.SnapPersonNum = millionsMonthlyReport.SnapPersonNum; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.ContractorNum = millionsMonthlyReport.ContractorNum; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.SumPersonNum = millionsMonthlyReport.SumPersonNum; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.TotalWorkNum = millionsMonthlyReport.TotalWorkNum; | 
					
						
							| 
									
										
										
										
											2023-03-30 13:51:33 +08:00
										 |  |  |  |                 newMillionsMonthlyReport.DeathAccidentNum = millionsMonthlyReport.DeathAccidentNum; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.DeathAccidentPersonNum = millionsMonthlyReport.DeathAccidentPersonNum; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.DeathAccidentLossHour = millionsMonthlyReport.DeathAccidentLossHour; | 
					
						
							| 
									
										
										
										
											2021-04-30 10:28:37 +08:00
										 |  |  |  |                 newMillionsMonthlyReport.SeriousInjuriesNum = millionsMonthlyReport.SeriousInjuriesNum; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.SeriousInjuriesPersonNum = millionsMonthlyReport.SeriousInjuriesPersonNum; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.SeriousInjuriesLossHour = millionsMonthlyReport.SeriousInjuriesLossHour; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.MinorAccidentNum = millionsMonthlyReport.MinorAccidentNum; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.MinorAccidentPersonNum = millionsMonthlyReport.MinorAccidentPersonNum; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.MinorAccidentLossHour = millionsMonthlyReport.MinorAccidentLossHour; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.OtherAccidentNum = millionsMonthlyReport.OtherAccidentNum; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.OtherAccidentPersonNum = millionsMonthlyReport.OtherAccidentPersonNum; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.OtherAccidentLossHour = millionsMonthlyReport.OtherAccidentLossHour; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.RestrictedWorkPersonNum = millionsMonthlyReport.RestrictedWorkPersonNum; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.RestrictedWorkLossHour = millionsMonthlyReport.RestrictedWorkLossHour; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.MedicalTreatmentPersonNum = millionsMonthlyReport.MedicalTreatmentPersonNum; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.MedicalTreatmentLossHour = millionsMonthlyReport.MedicalTreatmentLossHour; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.FireNum = millionsMonthlyReport.FireNum; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.ExplosionNum = millionsMonthlyReport.ExplosionNum; | 
					
						
							| 
									
										
										
										
											2023-03-30 13:51:33 +08:00
										 |  |  |  |                 newMillionsMonthlyReport.EnvironmenNum = millionsMonthlyReport.EnvironmenNum; | 
					
						
							| 
									
										
										
										
											2021-04-30 10:28:37 +08:00
										 |  |  |  |                 newMillionsMonthlyReport.TrafficNum = millionsMonthlyReport.TrafficNum; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.EquipmentNum = millionsMonthlyReport.EquipmentNum; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.QualityNum = millionsMonthlyReport.QualityNum; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.OtherNum = millionsMonthlyReport.OtherNum; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.FirstAidDressingsNum = millionsMonthlyReport.FirstAidDressingsNum; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.AttemptedEventNum = millionsMonthlyReport.AttemptedEventNum; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.LossDayNum = millionsMonthlyReport.LossDayNum; | 
					
						
							| 
									
										
										
										
											2023-03-30 13:51:33 +08:00
										 |  |  |  |                 newMillionsMonthlyReport.InputCosts = millionsMonthlyReport.InputCosts; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.TrainNum = millionsMonthlyReport.TrainNum; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.GeneralHazardNum = millionsMonthlyReport.GeneralHazardNum; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.MajorHazardNum = millionsMonthlyReport.MajorHazardNum; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.NotProofLargeProjectNum = millionsMonthlyReport.NotProofLargeProjectNum; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.ProofLargeProjectNum = millionsMonthlyReport.ProofLargeProjectNum; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.FireLicenseNum = millionsMonthlyReport.FireLicenseNum; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.LimitLicenseNum = millionsMonthlyReport.LimitLicenseNum; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.HighLicenseNum = millionsMonthlyReport.HighLicenseNum; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.HoistingLicenseNum = millionsMonthlyReport.HoistingLicenseNum; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.BreakGroundLicenseNum = millionsMonthlyReport.BreakGroundLicenseNum; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.ElectricityLicenseNum = millionsMonthlyReport.ElectricityLicenseNum; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.RTLicenseNum = millionsMonthlyReport.RTLicenseNum; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.NightLicenseNum = millionsMonthlyReport.NightLicenseNum; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.CommissionerNum = millionsMonthlyReport.CommissionerNum; | 
					
						
							|  |  |  |  |                 newMillionsMonthlyReport.SoleDutyNum = millionsMonthlyReport.SoleDutyNum; | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-04-30 10:28:37 +08:00
										 |  |  |  |                 db.SubmitChanges(); | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							| 
									
										
										
										
											2023-03-30 13:51:33 +08:00
										 |  |  |  |         /// 根据主键删除企业安全数据统计月报 | 
					
						
							| 
									
										
										
										
											2021-04-30 10:28:37 +08:00
										 |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="millionsMonthlyReportId"></param> | 
					
						
							|  |  |  |  |         public static void DeleteMillionsMonthlyReportById(string millionsMonthlyReportId) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             Model.SGGLDB db = Funs.DB; | 
					
						
							|  |  |  |  |             Model.InformationProject_MillionsMonthlyReport millionsMonthlyReport = db.InformationProject_MillionsMonthlyReport.FirstOrDefault(e => e.MillionsMonthlyReportId == millionsMonthlyReportId); | 
					
						
							|  |  |  |  |             if (millionsMonthlyReport != null) | 
					
						
							|  |  |  |  |             { | 
					
						
							|  |  |  |  |                 CommonService.DeleteFlowOperateByID(millionsMonthlyReportId);//删除流程 | 
					
						
							|  |  |  |  |                 db.InformationProject_MillionsMonthlyReport.DeleteOnSubmit(millionsMonthlyReport); | 
					
						
							|  |  |  |  |                 db.SubmitChanges(); | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |     } | 
					
						
							|  |  |  |  | } |