1
This commit is contained in:
@@ -43,6 +43,15 @@ namespace BLL
|
||||
NewWaterConsumption = newtable.NewWaterConsumption,
|
||||
HeadOfficeInspectorGeneralNum = newtable.HeadOfficeInspectorGeneralNum,
|
||||
HeadOfficeFullTimeNum = newtable.HeadOfficeFullTimeNum,
|
||||
LargerClosedNum = newtable.LargerClosedNum,
|
||||
LargerNotClosedNum = newtable.LargerNotClosedNum,
|
||||
|
||||
AwaitApprovalNum = newtable.AwaitApprovalNum,
|
||||
PendingApprovalNum = newtable.PendingApprovalNum,
|
||||
CompletedApprovalNum = newtable.CompletedApprovalNum,
|
||||
SuperAwaitApprovalNum = newtable.SuperAwaitApprovalNum,
|
||||
SuperPendingApprovalNum = newtable.SuperPendingApprovalNum,
|
||||
SuperCompletedApprovalNum = newtable.SuperCompletedApprovalNum,
|
||||
BranchInspectorGeneralNum = newtable.BranchInspectorGeneralNum,
|
||||
BranchFullTimeNum = newtable.BranchFullTimeNum,
|
||||
ProjectInspectorGeneralNum = newtable.ProjectInspectorGeneralNum,
|
||||
@@ -182,6 +191,17 @@ namespace BLL
|
||||
item.EnterpriseTopicsMeetingNum = dataHsse.EnterpriseTopicsMeetingNum;
|
||||
item.FinishedNum = dataHsse.FinishedNum;
|
||||
item.ArgumentNum = dataHsse.ArgumentNum;
|
||||
item.LargerClosedNum = dataHsse.LargerClosedNum;
|
||||
item.LargerNotClosedNum = dataHsse.LargerNotClosedNum;
|
||||
item.LargerRate = "";
|
||||
|
||||
item.AwaitApprovalNum = dataHsse.AwaitApprovalNum;
|
||||
item.PendingApprovalNum = dataHsse.PendingApprovalNum;
|
||||
item.CompletedApprovalNum = dataHsse.CompletedApprovalNum;
|
||||
item.SuperAwaitApprovalNum = dataHsse.SuperAwaitApprovalNum;
|
||||
item.SuperPendingApprovalNum = dataHsse.SuperPendingApprovalNum;
|
||||
item.SuperCompletedApprovalNum = dataHsse.SuperCompletedApprovalNum;
|
||||
|
||||
item.GeneralAccidentNum = dataHsse.GeneralAccidentNum;
|
||||
item.GeneralClosedNum = dataHsse.GeneralClosedNum;
|
||||
item.GeneralNotClosedNum = dataHsse.GeneralNotClosedNum;
|
||||
@@ -492,6 +512,15 @@ namespace BLL
|
||||
CertificateANum = projectData.Sum(x => x.CertificateANum),
|
||||
CertificateBNum = projectData.Sum(x => x.CertificateBNum),
|
||||
CertificateCNum = projectData.Sum(x => x.CertificateCNum),
|
||||
LargerClosedNum = projectData.Sum(x => x.LargerClosedNum),
|
||||
LargerNotClosedNum = projectData.Sum(x => x.LargerNotClosedNum),
|
||||
|
||||
AwaitApprovalNum = projectData.Sum(x => x.AwaitApprovalNum),
|
||||
PendingApprovalNum = projectData.Sum(x => x.PendingApprovalNum),
|
||||
CompletedApprovalNum = projectData.Sum(x => x.CompletedApprovalNum),
|
||||
SuperAwaitApprovalNum = projectData.Sum(x => x.SuperAwaitApprovalNum),
|
||||
SuperPendingApprovalNum = projectData.Sum(x => x.SuperPendingApprovalNum),
|
||||
SuperCompletedApprovalNum = projectData.Sum(x => x.SuperCompletedApprovalNum),
|
||||
SafetyCommitteeMeetingNum = GetSafetyCommitteeMeeting().Count,
|
||||
EnterpriseTopicsMeetingNum = GetEnterpriseTopicsMeetingNum(),
|
||||
ProjectSafetyLeadingGroupMeetingNum = projectData.Sum(x => x.ProjectSafetyLeadingGroupMeetingNum),
|
||||
@@ -668,7 +697,7 @@ namespace BLL
|
||||
var newWaterConsumptionTask = ChemicalReportItemService.GetLatstTimeNewWaterConsumption();
|
||||
var securityRiskOutputListTask = HSSEData_HSSEService.GetSecurityRiskOutputsAsync();
|
||||
var largeEngineeringOutputsTask = HSSEData_HSSEService.GetLargeEngineeringOutputsAsync();
|
||||
|
||||
var largerHiddenRectificationOutputsTask = HSSEData_HSSEService.GetLargerHiddenRectificationOutputsAsync();
|
||||
var safetyInjectionEngineerTask = HSSEData_HSSEService.GetSafetyInjectionEngineerAsync();
|
||||
var certificateATask = HSSEData_HSSEService.GetCertificateAAsync();
|
||||
var certificateBTask = HSSEData_HSSEService.GetCertificateBAsync();
|
||||
@@ -742,6 +771,7 @@ namespace BLL
|
||||
certificateATask,
|
||||
certificateBTask,
|
||||
certificateCTask,
|
||||
largerHiddenRectificationOutputsTask,
|
||||
qualityPersonNumTask,
|
||||
beUnderConstructionTask,
|
||||
shutdownTask,
|
||||
@@ -810,6 +840,7 @@ namespace BLL
|
||||
var certificateAList = await certificateATask;
|
||||
var certificateBList = await certificateBTask;
|
||||
var certificateCList = await certificateCTask;
|
||||
var largerHiddenRectificationOutputsList = await largerHiddenRectificationOutputsTask;
|
||||
var qualityPersonList = await qualityPersonNumTask;
|
||||
var beUnderConstructionList = await beUnderConstructionTask;
|
||||
var shutdownList = await shutdownTask;
|
||||
@@ -890,6 +921,16 @@ namespace BLL
|
||||
TotalWorkingHour = totalWorkingHour,
|
||||
LostWorkingHour = lostWorkingHour,
|
||||
SafeWorkingHour = safeWorkingHour,
|
||||
LargerClosedNum = largerHiddenRectificationOutputsList.Sum(x => x.RecNum),
|
||||
LargerNotClosedNum = largerHiddenRectificationOutputsList.Sum(x => x.NoRecNum),
|
||||
|
||||
AwaitApprovalNum = largeEngineeringOutputsTask.Result.Sum(x => x.AwaitApprovalNum),
|
||||
PendingApprovalNum = largeEngineeringOutputsTask.Result.Sum(x => x.PendingApprovalNum),
|
||||
CompletedApprovalNum = largeEngineeringOutputsTask.Result.Sum(x => x.CompletedApprovalNum),
|
||||
SuperAwaitApprovalNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperAwaitApprovalNum),
|
||||
SuperPendingApprovalNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperPendingApprovalNum),
|
||||
SuperCompletedApprovalNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperCompletedApprovalNum),
|
||||
|
||||
SafeTrainNum = safeTrainList.Sum(x => x.TrainPersonNum),
|
||||
SpecialTrainNum = specialTrainList.Sum(x => x.TrainPersonNum),
|
||||
SpecialOperationTrainNum = specialOperationTrainList.Sum(x => x.TrainPersonNum),
|
||||
@@ -978,6 +1019,12 @@ namespace BLL
|
||||
g => g.Key,
|
||||
g => new { ClosedNum = g.Sum(x => x.RecNum), NotClosedNum = g.Sum(x => x.NoRecNum) }
|
||||
);
|
||||
var largerHiddenRectificationOutputsDict = largerHiddenRectificationOutputsList
|
||||
.GroupBy(x => x.ProjectId)
|
||||
.ToDictionary(
|
||||
g => g.Key,
|
||||
g => new { ClosedNum = g.Sum(x => x.RecNum), NotClosedNum = g.Sum(x => x.NoRecNum) }
|
||||
);
|
||||
var majorHiddenRectificationOutputsDict = majorHiddenRectificationOutputsList
|
||||
.GroupBy(x => x.ProjectId)
|
||||
.ToDictionary(
|
||||
@@ -1015,12 +1062,19 @@ namespace BLL
|
||||
SuperOperativesNum = g.Sum(x => x.SuperOperativesNum),
|
||||
SuperConstructionNum = g.Sum(x => x.SuperConstructionNum),
|
||||
SuperFinishedNum = g.Sum(x => x.SuperFinishedNum),
|
||||
AwaitApprovalNum = g.Sum(x => x.AwaitApprovalNum),
|
||||
PendingApprovalNum = g.Sum(x => x.PendingApprovalNum),
|
||||
CompletedApprovalNum = g.Sum(x => x.CompletedApprovalNum),
|
||||
SuperAwaitApprovalNum = g.Sum(x => x.SuperAwaitApprovalNum),
|
||||
SuperPendingApprovalNum = g.Sum(x => x.SuperPendingApprovalNum),
|
||||
SuperCompletedApprovalNum = g.Sum(x => x.SuperCompletedApprovalNum),
|
||||
SuperArgumentNum = g.Sum(x => x.SuperArgumentNum)
|
||||
}
|
||||
);
|
||||
foreach (var projectid in BeUnderConstructionList)
|
||||
{
|
||||
generalHiddenRectificationOutputsDict.TryGetValue(projectid, out var generalHiddenRectificationOutputs);
|
||||
largerHiddenRectificationOutputsDict.TryGetValue(projectid, out var largerHiddenRectificationOutputs);
|
||||
majorHiddenRectificationOutputsDict.TryGetValue(projectid, out var majorHiddenRectificationOutputs);
|
||||
securityRiskOutputDict.TryGetValue(projectid, out var securityRiskOutputs);
|
||||
largeEngineeringOutputsDict.TryGetValue(projectid, out var largeEngineeringOutputs);
|
||||
@@ -1042,6 +1096,14 @@ namespace BLL
|
||||
SpecialOperationTrainNum = specialOperationTrainList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum),
|
||||
HseTechnicalNum = hseTechnicalList.Count(x => x.ProjectId == projectid),
|
||||
EnvironmentalTrainNum = 0,
|
||||
LargerClosedNum = largerHiddenRectificationOutputs?.ClosedNum ?? 0,
|
||||
LargerNotClosedNum = largerHiddenRectificationOutputs?.NotClosedNum ?? 0,
|
||||
AwaitApprovalNum = largeEngineeringOutputs?.AwaitApprovalNum ?? 0,
|
||||
PendingApprovalNum = largeEngineeringOutputs?.PendingApprovalNum ?? 0,
|
||||
CompletedApprovalNum = largeEngineeringOutputs?.CompletedApprovalNum ?? 0,
|
||||
SuperAwaitApprovalNum = largeEngineeringOutputs?.SuperAwaitApprovalNum ?? 0,
|
||||
SuperPendingApprovalNum = largeEngineeringOutputs?.SuperPendingApprovalNum ?? 0,
|
||||
SuperCompletedApprovalNum = largeEngineeringOutputs?.SuperCompletedApprovalNum ?? 0,
|
||||
TotalEnergyConsumption = 0,
|
||||
IncomeComprehensiveEnergyConsumption = 0,
|
||||
NewWaterConsumption = 0,
|
||||
@@ -1277,6 +1339,14 @@ namespace BLL
|
||||
table.SafeWorkingHour = newtable.SafeWorkingHour;
|
||||
table.SafeTrainNum = newtable.SafeTrainNum;
|
||||
table.SpecialTrainNum = newtable.SpecialTrainNum;
|
||||
table.LargerClosedNum = newtable.LargerClosedNum;
|
||||
table.LargerNotClosedNum = newtable.LargerNotClosedNum;
|
||||
table.AwaitApprovalNum = newtable.AwaitApprovalNum;
|
||||
table.PendingApprovalNum = newtable.PendingApprovalNum;
|
||||
table.CompletedApprovalNum = newtable.CompletedApprovalNum;
|
||||
table.SuperAwaitApprovalNum = newtable.SuperAwaitApprovalNum;
|
||||
table.SuperPendingApprovalNum = newtable.SuperPendingApprovalNum;
|
||||
table.SuperCompletedApprovalNum = newtable.SuperCompletedApprovalNum;
|
||||
table.SpecialOperationTrainNum = newtable.SpecialOperationTrainNum;
|
||||
table.HseTechnicalNum = newtable.HseTechnicalNum;
|
||||
table.EnvironmentalTrainNum = newtable.EnvironmentalTrainNum;
|
||||
@@ -3937,24 +4007,24 @@ namespace BLL
|
||||
{
|
||||
List<LicenseOutput> result = new List<LicenseOutput>();
|
||||
var result1 = (from x in Funs.DB.View_License_LicenseManager
|
||||
where BeUnderConstructionList.Contains(x.ProjectId) && x.IsHighRisk == true &&
|
||||
x.CompileDate > Const.DtmarkTime
|
||||
select new Model.LicenseOutput
|
||||
{
|
||||
Id = x.LicenseManagerId,
|
||||
ProjectId = x.ProjectId,
|
||||
ProjectName = ProjectService.GetProjectNameByProjectId(x.ProjectId),
|
||||
UnitId = x.UnitId,
|
||||
UnitName = UnitService.GetUnitNameByUnitId(x.UnitId),
|
||||
LicenseTypeName = x.LicenseTypeName,
|
||||
UnitTypeName = "",
|
||||
IsHighRisk = x.IsHighRisk,
|
||||
WorkAreaName = "",
|
||||
CompileDate = x.CompileDate,
|
||||
StartDate = x.StartDate,
|
||||
EndDate = x.EndDate,
|
||||
WorkStatesStr = ""
|
||||
}).ToList();
|
||||
where BeUnderConstructionList.Contains(x.ProjectId) && x.IsHighRisk == true &&
|
||||
x.CompileDate > Const.DtmarkTime
|
||||
select new Model.LicenseOutput
|
||||
{
|
||||
Id = x.LicenseManagerId,
|
||||
ProjectId = x.ProjectId,
|
||||
ProjectName = ProjectService.GetProjectNameByProjectId(x.ProjectId),
|
||||
UnitId = x.UnitId,
|
||||
UnitName = UnitService.GetUnitNameByUnitId(x.UnitId),
|
||||
LicenseTypeName = x.LicenseTypeName,
|
||||
UnitTypeName = "",
|
||||
IsHighRisk = x.IsHighRisk,
|
||||
WorkAreaName = "",
|
||||
CompileDate = x.CompileDate,
|
||||
StartDate = x.StartDate,
|
||||
EndDate = x.EndDate,
|
||||
WorkStatesStr = ""
|
||||
}).ToList();
|
||||
var result2 = (from x in Funs.DB.License_FireWork
|
||||
where BeUnderConstructionList.Contains(x.ProjectId)
|
||||
select new Model.LicenseOutput
|
||||
@@ -4162,7 +4232,7 @@ namespace BLL
|
||||
var query = (from x in Funs.DB.Base_Project
|
||||
join y in Funs.DB.HSSE_Hazard_HazardRegister on x.ProjectId equals y.ProjectId into yGroup
|
||||
from y in yGroup.DefaultIfEmpty()
|
||||
where BeUnderConstructionList.Contains(x.ProjectId) && y.ProblemTypes == "1" && (y.HazardValue == "0.3" || y.HazardValue == "1" || y.HazardValue == null) && y.CheckTime > Const.DtmarkTime
|
||||
where BeUnderConstructionList.Contains(x.ProjectId) && y.ProblemTypes == "1" && (y.HazardValue == "0.3" || y.HazardValue == null) && y.CheckTime > Const.DtmarkTime
|
||||
group y by new { x.ProjectId, x.ProjectName, x.ProjectCode } into gg
|
||||
select new HiddenRectificationOutput
|
||||
{
|
||||
@@ -4188,6 +4258,42 @@ namespace BLL
|
||||
return await Task.Run(GetGeneralHiddenRectificationOutputs);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取较大隐患数据
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.HiddenRectificationOutput> GetLargerHiddenRectificationOutputs()
|
||||
{
|
||||
var query = (from x in Funs.DB.Base_Project
|
||||
join y in Funs.DB.HSSE_Hazard_HazardRegister on x.ProjectId equals y.ProjectId into yGroup
|
||||
from y in yGroup.DefaultIfEmpty()
|
||||
where BeUnderConstructionList.Contains(x.ProjectId) && y.ProblemTypes == "1" && y.HazardValue == "1" && y.CheckTime > Const.DtmarkTime
|
||||
group y by new { x.ProjectId, x.ProjectName, x.ProjectCode } into gg
|
||||
select new HiddenRectificationOutput
|
||||
{
|
||||
ProjectId = gg.Key.ProjectId,
|
||||
ProjectName = gg.Key.ProjectName,
|
||||
ProjectCode = gg.Key.ProjectCode,
|
||||
ProNum = gg.Count(y => y.States != "4" && y.States != "-1"),
|
||||
RecNum = gg.Count(y => y.States == "3"),
|
||||
NoRecNum = gg.Count(y => y.States != "3" && y.States != "4" && y.States != "-1"),
|
||||
RecRate = gg.Count(y => y.States != "4" && y.States != "-1") == 0 ? "0" :
|
||||
Math.Round(Convert.ToDecimal(gg.Count(y => y.States == "3") /
|
||||
gg.Count(y => y.States != "4" && y.States != "-1") * 100), 2, MidpointRounding.AwayFromZero).ToString()
|
||||
}).ToList();
|
||||
|
||||
foreach (var item in query)
|
||||
{
|
||||
item.RecRate = Math.Round(Convert.ToDecimal(item.RecRate), 2).ToString(); // 转换为字符串并格式化为两位小数
|
||||
}
|
||||
return query;
|
||||
}
|
||||
public static async Task<List<Model.HiddenRectificationOutput>> GetLargerHiddenRectificationOutputsAsync()
|
||||
{
|
||||
return await Task.Run(GetLargerHiddenRectificationOutputs);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取重大隐患数据
|
||||
/// </summary>
|
||||
@@ -4285,6 +4391,12 @@ namespace BLL
|
||||
SuperArgumentNum = gg.Count(x => x.IsArgument == true && x.IsSuperLargerHazard == true),
|
||||
OperativesNum = gg.Where(x => x.IsSuperLargerHazard == false).Sum(x => x.OperativesNum) ?? 0,
|
||||
SuperOperativesNum = gg.Where(x => x.IsSuperLargerHazard == true).Sum(x => x.OperativesNum) ?? 0,
|
||||
AwaitApprovalNum = gg.Count(x => x.ApprovalState == "0" && x.IsSuperLargerHazard == false),
|
||||
PendingApprovalNum = gg.Count(x => x.ApprovalState == "1" && x.IsSuperLargerHazard == false),
|
||||
CompletedApprovalNum = gg.Count(x => x.ApprovalState == "2" && x.IsSuperLargerHazard == false),
|
||||
SuperAwaitApprovalNum = gg.Count(x => x.ApprovalState == "0" && x.IsSuperLargerHazard == true),
|
||||
SuperPendingApprovalNum = gg.Count(x => x.ApprovalState == "1" && x.IsSuperLargerHazard == true),
|
||||
SuperCompletedApprovalNum = gg.Count(x => x.ApprovalState == "2" && x.IsSuperLargerHazard == true),
|
||||
}).ToList();
|
||||
return query;
|
||||
|
||||
@@ -4531,6 +4643,14 @@ namespace BLL
|
||||
x.SpecialTrainNum,
|
||||
x.SpecialOperationTrainNum,
|
||||
x.HseTechnicalNum,
|
||||
x.LargerClosedNum,
|
||||
x.LargerNotClosedNum,
|
||||
x.AwaitApprovalNum,
|
||||
x.PendingApprovalNum,
|
||||
x.CompletedApprovalNum,
|
||||
x.SuperAwaitApprovalNum,
|
||||
x.SuperPendingApprovalNum,
|
||||
x.SuperCompletedApprovalNum,
|
||||
x.EnvironmentalTrainNum,
|
||||
x.TotalEnergyConsumption,
|
||||
x.IncomeComprehensiveEnergyConsumption,
|
||||
|
||||
@@ -127,6 +127,16 @@ namespace BLL
|
||||
LostWorkingHour = newtable.LostWorkingHour,
|
||||
SafeWorkingHour = newtable.SafeWorkingHour,
|
||||
SafeTrainNum = newtable.SafeTrainNum,
|
||||
LargerClosedNum = newtable.LargerClosedNum,
|
||||
LargerNotClosedNum = newtable.LargerNotClosedNum,
|
||||
|
||||
AwaitApprovalNum = newtable.AwaitApprovalNum,
|
||||
PendingApprovalNum = newtable.PendingApprovalNum,
|
||||
CompletedApprovalNum = newtable.CompletedApprovalNum,
|
||||
SuperAwaitApprovalNum = newtable.SuperAwaitApprovalNum,
|
||||
SuperPendingApprovalNum = newtable.SuperPendingApprovalNum,
|
||||
SuperCompletedApprovalNum = newtable.SuperCompletedApprovalNum,
|
||||
|
||||
SpecialTrainNum = newtable.SpecialTrainNum,
|
||||
SpecialOperationTrainNum = newtable.SpecialOperationTrainNum,
|
||||
HseTechnicalNum = newtable.HseTechnicalNum,
|
||||
@@ -275,6 +285,18 @@ namespace BLL
|
||||
table.TotalEnergyConsumption = newtable.TotalEnergyConsumption;
|
||||
table.IncomeComprehensiveEnergyConsumption = newtable.IncomeComprehensiveEnergyConsumption;
|
||||
table.NewWaterConsumption = newtable.NewWaterConsumption;
|
||||
table.LargerClosedNum = newtable.LargerClosedNum;
|
||||
table.LargerNotClosedNum = newtable.LargerNotClosedNum;
|
||||
|
||||
table.ArgumentNum = newtable.ArgumentNum;
|
||||
table.SuperArgumentNum = newtable.SuperArgumentNum;
|
||||
table.AwaitApprovalNum = newtable.AwaitApprovalNum;
|
||||
table.PendingApprovalNum = newtable.PendingApprovalNum;
|
||||
table.CompletedApprovalNum = newtable.CompletedApprovalNum;
|
||||
table.SuperAwaitApprovalNum = newtable.SuperAwaitApprovalNum;
|
||||
table.SuperPendingApprovalNum = newtable.SuperPendingApprovalNum;
|
||||
table.SuperCompletedApprovalNum = newtable.SuperCompletedApprovalNum;
|
||||
|
||||
table.HeadOfficeInspectorGeneralNum = newtable.HeadOfficeInspectorGeneralNum;
|
||||
table.HeadOfficeFullTimeNum = newtable.HeadOfficeFullTimeNum;
|
||||
table.BranchInspectorGeneralNum = newtable.BranchInspectorGeneralNum;
|
||||
@@ -552,6 +574,9 @@ namespace BLL
|
||||
table.GeneralNotClosedNum = GetGeneralNotClosedNum(projectid);
|
||||
table.MajorClosedNum = GetMajorClosedNum(projectid);
|
||||
table.MajorNotClosedNum = GetMajorNotClosedNum(projectid);
|
||||
table.LargerClosedNum = GetLargerClosedNum(projectid);
|
||||
table.LargerNotClosedNum = GetLargerNotClosedNum(projectid);
|
||||
|
||||
}
|
||||
|
||||
if (hSseDateType == HSSEDateType.SecurityRisk || hSseDateType == HSSEDateType.All)
|
||||
@@ -616,6 +641,14 @@ namespace BLL
|
||||
table.SuperOperativesNum = GetSuperOperativesNum(projectid);
|
||||
table.SuperConstructionNum = GetSuperConstructionNum(projectid);
|
||||
table.SuperFinishedNum = GetSuperFinishedNum(projectid);
|
||||
table.ArgumentNum = GetArgumentNum(projectid);
|
||||
table.SuperArgumentNum = GetSuperArgumentNum(projectid);
|
||||
table.AwaitApprovalNum = GetAwaitApprovalNum(projectid);
|
||||
table.PendingApprovalNum = GetPendingApprovalNum(projectid);
|
||||
table.CompletedApprovalNum = GetCompletedApprovalNum(projectid);
|
||||
table.SuperAwaitApprovalNum = GetSuperAwaitApprovalNum(projectid);
|
||||
table.SuperPendingApprovalNum = GetSuperPendingApprovalNum(projectid);
|
||||
table.SuperCompletedApprovalNum = GetSuperCompletedApprovalNum(projectid);
|
||||
}
|
||||
|
||||
if (IsReportByToday(projectid))
|
||||
@@ -1389,7 +1422,7 @@ namespace BLL
|
||||
public static int GetGeneralClosedNum(string projectid)
|
||||
{
|
||||
var result = (from x in Funs.DB.HSSE_Hazard_HazardRegister
|
||||
where x.ProjectId == projectid && (x.HazardValue == "0.3" || x.HazardValue == "1" || x.HazardValue == null) && x.States == "3" &&
|
||||
where x.ProjectId == projectid && (x.HazardValue == "0.3" || x.HazardValue == null) && x.States == "3" &&
|
||||
x.CheckTime > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
@@ -1402,7 +1435,33 @@ namespace BLL
|
||||
public static int GetGeneralNotClosedNum(string projectid)
|
||||
{
|
||||
var result = (from x in Funs.DB.HSSE_Hazard_HazardRegister
|
||||
where x.ProjectId == projectid && (x.HazardValue == "0.3" || x.HazardValue == "1" || x.HazardValue == null) && x.States != "3" && x.States != "-1" &&
|
||||
where x.ProjectId == projectid && (x.HazardValue == "0.3" || x.HazardValue == null) && x.States != "3" && x.States != "-1" &&
|
||||
x.CheckTime > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取较大隐患整改闭环项
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetLargerClosedNum(string projectid)
|
||||
{
|
||||
var result = (from x in Funs.DB.HSSE_Hazard_HazardRegister
|
||||
where x.ProjectId == projectid && x.HazardValue == "1" && x.States == "3" &&
|
||||
x.CheckTime > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取较大隐患未整改完成项
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetLargerNotClosedNum(string projectid)
|
||||
{
|
||||
var result = (from x in Funs.DB.HSSE_Hazard_HazardRegister
|
||||
where x.ProjectId == projectid && x.HazardValue == "1" && x.States != "3" && x.States != "-1" &&
|
||||
x.CheckTime > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
@@ -1537,6 +1596,105 @@ namespace BLL
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取危大工程论证个数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetArgumentNum(string projectid)
|
||||
{
|
||||
var result = (from x in Funs.DB.Solution_LargerHazard
|
||||
where x.ProjectId == projectid && x.IsArgument == true && x.IsSuperLargerHazard == false &&
|
||||
x.RecordTime > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取超危大工程论证个数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetSuperArgumentNum(string projectid)
|
||||
{
|
||||
var result = (from x in Funs.DB.Solution_LargerHazard
|
||||
where x.ProjectId == projectid && x.IsArgument == true && x.IsSuperLargerHazard == true &&
|
||||
x.RecordTime > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取危大工程待审核个数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetAwaitApprovalNum(string projectid)
|
||||
{
|
||||
var result = (from x in Funs.DB.Solution_LargerHazard
|
||||
where x.ProjectId == projectid && x.ApprovalState == "0" && x.IsSuperLargerHazard == false && x.RecordTime > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取超危大工程待审核个数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetSuperAwaitApprovalNum(string projectid)
|
||||
{
|
||||
var result = (from x in Funs.DB.Solution_LargerHazard
|
||||
where x.ProjectId == projectid && x.ApprovalState == "0" && x.IsSuperLargerHazard == true && x.RecordTime > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取危大工程审核中个数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetPendingApprovalNum(string projectid)
|
||||
{
|
||||
var result = (from x in Funs.DB.Solution_LargerHazard
|
||||
where x.ProjectId == projectid && x.ApprovalState == "1" && x.IsSuperLargerHazard == false && x.RecordTime > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取超危大工程审核中个数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetSuperPendingApprovalNum(string projectid)
|
||||
{
|
||||
var result = (from x in Funs.DB.Solution_LargerHazard
|
||||
where x.ProjectId == projectid && x.ApprovalState == "1" && x.IsSuperLargerHazard == true && x.RecordTime > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取危大工程已完成个数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetCompletedApprovalNum(string projectid)
|
||||
{
|
||||
var result = (from x in Funs.DB.Solution_LargerHazard
|
||||
where x.ProjectId == projectid && x.ApprovalState == "2" && x.IsSuperLargerHazard == false && x.RecordTime > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取超危大工程已完成个数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetSuperCompletedApprovalNum(string projectid)
|
||||
{
|
||||
var result = (from x in Funs.DB.Solution_LargerHazard
|
||||
where x.ProjectId == projectid && x.ApprovalState == "2" && x.IsSuperLargerHazard == true && x.RecordTime > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取超危大工程审批完成数
|
||||
/// </summary>
|
||||
@@ -1639,6 +1797,18 @@ namespace BLL
|
||||
x.SafeWorkingHour,
|
||||
x.SafeTrainNum,
|
||||
x.SpecialTrainNum,
|
||||
x.LargerClosedNum,
|
||||
x.LargerNotClosedNum,
|
||||
|
||||
x.ArgumentNum,
|
||||
x.SuperArgumentNum,
|
||||
x.AwaitApprovalNum,
|
||||
x.PendingApprovalNum,
|
||||
x.CompletedApprovalNum,
|
||||
x.SuperAwaitApprovalNum,
|
||||
x.SuperPendingApprovalNum,
|
||||
x.SuperCompletedApprovalNum,
|
||||
|
||||
x.SpecialOperationTrainNum,
|
||||
x.TotalEnergyConsumption,
|
||||
x.IncomeComprehensiveEnergyConsumption,
|
||||
|
||||
Reference in New Issue
Block a user