20230920 HSE管理月报
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// HSE合规义务识别与评价
|
||||
/// </summary>
|
||||
public class ComplianceObligationsCService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据月报ID获取相关HSE合规义务识别与评价
|
||||
/// </summary>
|
||||
/// <param name="monthRepportId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Manager_Month_ComplianceObligationsC> GetComplianceObligationsCByMonthReportId(string monthRepportId)
|
||||
{
|
||||
return (from x in Funs.DB.Manager_Month_ComplianceObligationsC where x.MonthReportId == monthRepportId select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
public static void AddComplianceObligationsC(Model.Manager_Month_ComplianceObligationsC data)
|
||||
{
|
||||
Model.Manager_Month_ComplianceObligationsC newData = new Model.Manager_Month_ComplianceObligationsC
|
||||
{
|
||||
ComplianceObligationsId = data.ComplianceObligationsId,
|
||||
MonthReportId = data.MonthReportId,
|
||||
InformationContent = data.InformationContent,
|
||||
ResponseMeasures = data.ResponseMeasures,
|
||||
ImplementationStatus = data.ImplementationStatus,
|
||||
EvaluationConclusion = data.EvaluationConclusion
|
||||
};
|
||||
Funs.DB.Manager_Month_ComplianceObligationsC.InsertOnSubmit(newData);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据HSE月报ID删除相关HSE合规义务识别与评价
|
||||
/// </summary>
|
||||
/// <param name="monthReportId"></param>
|
||||
public static void DeleteComplianceObligationsCByMonthReportId(string monthReportId)
|
||||
{
|
||||
var q = (from x in Funs.DB.Manager_Month_ComplianceObligationsC where x.MonthReportId == monthReportId select x).ToList();
|
||||
if (q != null)
|
||||
{
|
||||
Funs.DB.Manager_Month_ComplianceObligationsC.DeleteAllOnSubmit(q);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static List<Model.Manager_Month_HazardC> GetHazardByMonthReportId(string monthReportId)
|
||||
{
|
||||
return (from x in Funs.DB.Manager_Month_HazardC where x.MonthReportId == monthReportId orderby x.SortIndex select x).ToList();
|
||||
return (from x in Funs.DB.Manager_Month_HazardC where x.MonthReportId == monthReportId select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -31,10 +31,10 @@ namespace BLL
|
||||
HazardId = SQLHelper.GetNewID(typeof(Model.Manager_Month_HazardC)),
|
||||
MonthReportId = hazard.MonthReportId,
|
||||
WorkArea = hazard.WorkArea,
|
||||
Subcontractor = hazard.Subcontractor,
|
||||
DangerousSource = hazard.DangerousSource,
|
||||
EnvironmentalFactors = hazard.EnvironmentalFactors,
|
||||
Consequence = hazard.Consequence,
|
||||
ControlMeasures = hazard.ControlMeasures,
|
||||
SortIndex = hazard.SortIndex
|
||||
IsMajor = hazard.IsMajor
|
||||
};
|
||||
db.Manager_Month_HazardC.InsertOnSubmit(newHazard);
|
||||
db.SubmitChanges();
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 伤害事故统计
|
||||
/// </summary>
|
||||
public class InjuryAccidentCService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据月报ID获取伤害事故统计
|
||||
/// </summary>
|
||||
/// <param name="monthReportId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Manager_Month_InjuryAccidentC> GetInjuryAccidentCByMonthReportId(string monthReportId)
|
||||
{
|
||||
return (from x in Funs.DB.Manager_Month_InjuryAccidentC where x.MonthReportId == monthReportId select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加伤害事故统计
|
||||
/// </summary>
|
||||
/// <param name="injuryAccount"></param>
|
||||
public static void AddInjuryAccidentC(Model.Manager_Month_InjuryAccidentC injuryAccident)
|
||||
{
|
||||
Model.Manager_Month_InjuryAccidentC newInjuryAccident = new Model.Manager_Month_InjuryAccidentC
|
||||
{
|
||||
InjuryAccidentId = injuryAccident.InjuryAccidentId,
|
||||
MonthReportId = injuryAccident.MonthReportId,
|
||||
UnitName = injuryAccident.UnitName,
|
||||
AttemptedIncidents = injuryAccident.AttemptedIncidents,
|
||||
FirstAidDressing = injuryAccident.FirstAidDressing,
|
||||
MedicalTreatment = injuryAccident.MedicalTreatment,
|
||||
WorkLimitation = injuryAccident.WorkLimitation,
|
||||
LossPerson = injuryAccident.LossPerson,
|
||||
LossWorkTime = injuryAccident.LossWorkTime,
|
||||
LossEconomy = injuryAccident.LossEconomy,
|
||||
DeathPerson = injuryAccident.DeathPerson,
|
||||
DeathWorkTime = injuryAccident.DeathWorkTime,
|
||||
DeathEconomy = injuryAccident.DeathEconomy
|
||||
};
|
||||
Funs.DB.Manager_Month_InjuryAccidentC.InsertOnSubmit(newInjuryAccident);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据月报ID删除伤害事故
|
||||
/// </summary>
|
||||
/// <param name="montReportId"></param>
|
||||
public static void DeleteInjuryAccidengtByMonthReportId(string montReportId)
|
||||
{
|
||||
var q = (from x in Funs.DB.Manager_Month_InjuryAccidentC where x.MonthReportId == montReportId select x).ToList();
|
||||
if (q != null)
|
||||
{
|
||||
Funs.DB.Manager_Month_InjuryAccidentC.DeleteAllOnSubmit(q);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -225,7 +225,8 @@ namespace BLL
|
||||
YearSolutionNum = monthReport.YearSolutionNum,
|
||||
AccidentDes = monthReport.AccidentDes,
|
||||
Question = monthReport.Question,
|
||||
SubcontractManHours = monthReport.SubcontractManHours
|
||||
SubcontractManHours = monthReport.SubcontractManHours,
|
||||
AccidentDef = monthReport.AccidentDef,
|
||||
};
|
||||
|
||||
db.Manager_MonthReportC.InsertOnSubmit(newMonthReport);
|
||||
@@ -295,6 +296,7 @@ namespace BLL
|
||||
newMonthReport.AccidentDes = monthReport.AccidentDes;
|
||||
newMonthReport.Question = monthReport.Question;
|
||||
newMonthReport.SubcontractManHours = monthReport.SubcontractManHours;
|
||||
newMonthReport.AccidentDef = monthReport.AccidentDef;
|
||||
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 本月无伤害事故统计
|
||||
/// </summary>
|
||||
public class NoInjuryAccidentCService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据月报ID获取本月无伤害事故统计
|
||||
/// </summary>
|
||||
/// <param name="monthReportId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Manager_Month_NoInjuryAccidentC> GetNoInjuryAccidentByMonthReportId(string monthReportId)
|
||||
{
|
||||
return (from x in Funs.DB.Manager_Month_NoInjuryAccidentC where x.MonthReportId == monthReportId select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加无伤害事故统计
|
||||
/// </summary>
|
||||
/// <param name="noInjury"></param>
|
||||
public static void AddNoInjuryAccident(Model.Manager_Month_NoInjuryAccidentC noInjury)
|
||||
{
|
||||
Model.Manager_Month_NoInjuryAccidentC newNoInjury = new Model.Manager_Month_NoInjuryAccidentC
|
||||
{
|
||||
NoInjuryAccidentId = noInjury.NoInjuryAccidentId,
|
||||
MonthReportId = noInjury.MonthReportId,
|
||||
AccidentType = noInjury.AccidentType,
|
||||
EconomicLosses = noInjury.EconomicLosses,
|
||||
WHAccidentCount = noInjury.WHAccidentCount,
|
||||
SubAccidentCount = noInjury.SubAccidentCount,
|
||||
};
|
||||
Funs.DB.Manager_Month_NoInjuryAccidentC.InsertOnSubmit(newNoInjury);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据月报ID删除无伤害事故统计
|
||||
/// </summary>
|
||||
/// <param name="monthReportId"></param>
|
||||
public static void DeleteNoInjuryAccidentByMonthReportId(string monthReportId)
|
||||
{
|
||||
var q = (from x in Funs.DB.Manager_Month_NoInjuryAccidentC where x.MonthReportId == monthReportId select x).ToList();
|
||||
if (q!=null)
|
||||
{
|
||||
Funs.DB.Manager_Month_NoInjuryAccidentC.DeleteAllOnSubmit(q);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 项目HSE绩效指标
|
||||
/// </summary>
|
||||
public class PerformanceIndicatorCService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据月报ID获取HSE绩效指标
|
||||
/// </summary>
|
||||
/// <param name="monthReportId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Manager_Month_PerformanceIndicatorC> GetPerformanceIndicatorByMonthReportId(string monthReportId)
|
||||
{
|
||||
return (from x in Funs.DB.Manager_Month_PerformanceIndicatorC where x.MonthReportId == monthReportId orderby x.SortIndex select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加HSE绩效指标
|
||||
/// </summary>
|
||||
/// <param name="indicator"></param>
|
||||
public static void AddPerformanceIndicator(Model.Manager_Month_PerformanceIndicatorC indicator)
|
||||
{
|
||||
Model.Manager_Month_PerformanceIndicatorC newIndicator = new Model.Manager_Month_PerformanceIndicatorC
|
||||
{
|
||||
PerformanceIndicatorId = indicator.PerformanceIndicatorId,
|
||||
MonthReportId = indicator.MonthReportId,
|
||||
IndicatorType = indicator.IndicatorType,
|
||||
IndicatorName = indicator.IndicatorName,
|
||||
IndicatorValue = indicator.IndicatorValue,
|
||||
SortIndex = indicator.SortIndex,
|
||||
};
|
||||
Funs.DB.Manager_Month_PerformanceIndicatorC.InsertOnSubmit(newIndicator);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除HSE绩效指标
|
||||
/// </summary>
|
||||
/// <param name="monthReportId"></param>
|
||||
public static void DeletePerformanceIndicatorByMonthReportId(string monthReportId)
|
||||
{
|
||||
var q = (from x in Funs.DB.Manager_Month_PerformanceIndicatorC where x.MonthReportId == monthReportId select x).ToList();
|
||||
if (q != null)
|
||||
{
|
||||
Funs.DB.Manager_Month_PerformanceIndicatorC.DeleteAllOnSubmit(q);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -39,11 +39,11 @@ namespace BLL
|
||||
MonthReportId = checkSort.MonthReportId,
|
||||
UnitId = checkSort.UnitId,
|
||||
SumPersonNum = checkSort.SumPersonNum,
|
||||
SumOutPersonNum = checkSort.SumOutPersonNum,
|
||||
HSEPersonNum = checkSort.HSEPersonNum,
|
||||
ContractRange = checkSort.ContractRange,
|
||||
Remark = checkSort.Remark
|
||||
};
|
||||
|
||||
db.Manager_PersonSortC.InsertOnSubmit(newPersonSort);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// HSE奖励与处罚
|
||||
/// </summary>
|
||||
public class RewardAndPunishSortCService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据月报ID获取HSE奖励与处罚列表
|
||||
/// </summary>
|
||||
/// <param name="monthReportId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Manager_RewardAndPunishSortC> GetRewardAndPunishSortCByMontReportId(string monthReportId)
|
||||
{
|
||||
return (from x in Funs.DB.Manager_RewardAndPunishSortC where x.MonthReportId == monthReportId select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加HSE奖励与处罚
|
||||
/// </summary>
|
||||
/// <param name="sortC"></param>
|
||||
public static void AddRewardAndPunishSortC(Model.Manager_RewardAndPunishSortC sortC)
|
||||
{
|
||||
Model.Manager_RewardAndPunishSortC newSortC = new Model.Manager_RewardAndPunishSortC
|
||||
{
|
||||
RewardAndPunishId = sortC.RewardAndPunishId,
|
||||
MonthReportId = sortC.MonthReportId,
|
||||
RewardNum = sortC.RewardNum,
|
||||
RewardMoney = sortC.RewardMoney,
|
||||
ProjectRewardMoney = sortC.ProjectRewardMoney,
|
||||
PunishNum = sortC.PunishNum,
|
||||
PunishMoney = sortC.PunishMoney,
|
||||
ProjectPunishMoney = sortC.ProjectPunishMoney
|
||||
};
|
||||
Funs.DB.Manager_RewardAndPunishSortC.InsertOnSubmit(newSortC);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据月报id删除HSE奖励与处罚
|
||||
/// </summary>
|
||||
/// <param name="monthReportId"></param>
|
||||
public static void DeleteRewardAndPunishSortCByMonthReportId(string monthReportId)
|
||||
{
|
||||
var q = (from x in Funs.DB.Manager_RewardAndPunishSortC where x.MonthReportId == monthReportId select x).ToList();
|
||||
if (q != null)
|
||||
{
|
||||
Funs.DB.Manager_RewardAndPunishSortC.DeleteAllOnSubmit(q);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -33,7 +33,10 @@ namespace BLL
|
||||
SubUnit = subExpense.SubUnit,
|
||||
CostMonth = subExpense.CostMonth,
|
||||
CostYear = subExpense.CostYear,
|
||||
SortIndex = subExpense.SortIndex
|
||||
SortIndex = subExpense.SortIndex,
|
||||
ContractAmount=subExpense.ContractAmount,
|
||||
MonthApprovalAmount = subExpense.MonthApprovalAmount,
|
||||
ProjectApprovalAmount=subExpense.ProjectApprovalAmount
|
||||
};
|
||||
db.Manager_Month_SubExpenseC.InsertOnSubmit(newSubExpense);
|
||||
db.SubmitChanges();
|
||||
|
||||
@@ -36,7 +36,9 @@ namespace BLL
|
||||
TeachHour = trainSort.TeachHour,
|
||||
TeachMan = trainSort.TeachMan,
|
||||
UnitName = trainSort.UnitName,
|
||||
PersonNum = trainSort.PersonNum
|
||||
PersonNum = trainSort.PersonNum,
|
||||
TrainType = trainSort.TrainType,
|
||||
TotalPersonNum = trainSort.TotalPersonNum
|
||||
};
|
||||
|
||||
db.Manager_TrainSortC.InsertOnSubmit(newTrainSort);
|
||||
|
||||
Reference in New Issue
Block a user