提交代码
This commit is contained in:
@@ -40,6 +40,7 @@ namespace BLL
|
||||
SafeTrainNum = newtable.SafeTrainNum,
|
||||
SpecialTrainNum = newtable.SpecialTrainNum,
|
||||
SpecialOperationTrainNum = newtable.SpecialOperationTrainNum,
|
||||
HseTechnicalNum = newtable.HseTechnicalNum,
|
||||
EnvironmentalTrainNum = newtable.EnvironmentalTrainNum,
|
||||
TotalEnergyConsumption = newtable.TotalEnergyConsumption,
|
||||
IncomeComprehensiveEnergyConsumption = newtable.IncomeComprehensiveEnergyConsumption,
|
||||
@@ -75,10 +76,12 @@ namespace BLL
|
||||
CompanySpecialPlanNum = newtable.CompanySpecialPlanNum,
|
||||
CompanyOnSiteDisposalPlan = newtable.CompanyOnSiteDisposalPlan,
|
||||
CompanyDrillNum = newtable.CompanyDrillNum,
|
||||
CompanyDrillPersonNum = newtable.CompanyDrillPersonNum,
|
||||
ProjectComprehensivePlanNum = newtable.ProjectComprehensivePlanNum,
|
||||
ProjectSpecialPlanNum = newtable.ProjectSpecialPlanNum,
|
||||
ProjectOnSiteDisposalPlan = newtable.ProjectOnSiteDisposalPlan,
|
||||
ProjectDrillNum = newtable.ProjectDrillNum,
|
||||
ProjectDrillPersonNum = newtable.ProjectDrillPersonNum,
|
||||
CostExtract = newtable.CostExtract,
|
||||
CostUse = newtable.CostUse,
|
||||
UseEquipmentNum = newtable.UseEquipmentNum,
|
||||
@@ -97,10 +100,12 @@ namespace BLL
|
||||
TrainPersonNum = newtable.TrainPersonNum,
|
||||
ConstructionNum = newtable.ConstructionNum,
|
||||
FinishedNum = newtable.FinishedNum,
|
||||
ArgumentNum = newtable.ArgumentNum,
|
||||
SuperCompletedNum = newtable.SuperCompletedNum,
|
||||
SuperTrainPersonNum = newtable.SuperTrainPersonNum,
|
||||
SuperConstructionNum = newtable.SuperConstructionNum,
|
||||
SuperFinishedNum = newtable.SuperFinishedNum,
|
||||
SuperArgumentNum = newtable.SuperArgumentNum,
|
||||
State = newtable.State,
|
||||
CreateDate = newtable.CreateDate,
|
||||
CreateMan = newtable.CreateMan
|
||||
@@ -108,6 +113,7 @@ namespace BLL
|
||||
db.HSSEData_HSSE.InsertOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void DeleteHSSEData_HSSEById(string id)
|
||||
@@ -148,6 +154,7 @@ namespace BLL
|
||||
item.CompanyComprehensiveCheckNum = dataHsse.CompanyComprehensiveCheckNum;
|
||||
item.CompanyComprehensivePlanNum = dataHsse.CompanyComprehensivePlanNum;
|
||||
item.CompanyDrillNum = dataHsse.CompanyDrillNum;
|
||||
item.CompanyDrillPersonNum = dataHsse.CompanyDrillPersonNum;
|
||||
item.CompanyLeadShiftCheckNum = dataHsse.CompanyLeadShiftCheckNum;
|
||||
item.CompanyOnSiteDisposalPlan = dataHsse.CompanyOnSiteDisposalPlan;
|
||||
item.CompanySpecialCheckNum = dataHsse.CompanySpecialCheckNum;
|
||||
@@ -158,6 +165,7 @@ namespace BLL
|
||||
item.CostUse = dataHsse.CostUse;
|
||||
item.EnterpriseTopicsMeetingNum = dataHsse.EnterpriseTopicsMeetingNum;
|
||||
item.FinishedNum = dataHsse.FinishedNum;
|
||||
item.ArgumentNum = dataHsse.ArgumentNum;
|
||||
item.GeneralAccidentNum = dataHsse.GeneralAccidentNum;
|
||||
item.GeneralClosedNum = dataHsse.GeneralClosedNum;
|
||||
item.GeneralNotClosedNum = dataHsse.GeneralNotClosedNum;
|
||||
@@ -183,6 +191,7 @@ namespace BLL
|
||||
item.NewWaterConsumption = dataHsse.NewWaterConsumption;
|
||||
item.ProjectComprehensivePlanNum = dataHsse.ProjectComprehensivePlanNum;
|
||||
item.ProjectDrillNum = dataHsse.ProjectDrillNum;
|
||||
item.ProjectDrillPersonNum = dataHsse.ProjectDrillPersonNum;
|
||||
item.ProjectFullTimeNum = dataHsse.ProjectFullTimeNum;
|
||||
item.ProjectInspectorGeneralNum = dataHsse.ProjectInspectorGeneralNum;
|
||||
item.ProjectLeadShiftCheckNum = dataHsse.ProjectLeadShiftCheckNum;
|
||||
@@ -203,6 +212,7 @@ namespace BLL
|
||||
item.ShutdownNum = dataHsse.ShutdownNum;
|
||||
item.SpecialEquipmentNum = dataHsse.SpecialEquipmentNum;
|
||||
item.SpecialOperationTrainNum = dataHsse.SpecialOperationTrainNum;
|
||||
item.HseTechnicalNum = dataHsse.HseTechnicalNum;
|
||||
item.EnvironmentalTrainNum = dataHsse.EnvironmentalTrainNum;
|
||||
item.SpecialSeriousAccidentNum = dataHsse.SpecialSeriousAccidentNum;
|
||||
item.SpecialTrainNum = dataHsse.SpecialTrainNum;
|
||||
@@ -210,6 +220,7 @@ namespace BLL
|
||||
item.SuperConstructionNum = dataHsse.SuperConstructionNum;
|
||||
item.SuperFinishedNum = dataHsse.SuperFinishedNum;
|
||||
item.SuperTrainPersonNum = dataHsse.SuperTrainPersonNum;
|
||||
item.SuperArgumentNum = dataHsse.SuperArgumentNum;
|
||||
item.TotalEnergyConsumption = dataHsse.TotalEnergyConsumption;
|
||||
item.TotalWorkingHour = dataHsse.TotalWorkingHour;
|
||||
item.TrainPersonNum = dataHsse.TrainPersonNum;
|
||||
@@ -234,6 +245,7 @@ namespace BLL
|
||||
var hsseDataItems = new List<HsseDataItem> { item };
|
||||
data.HSSEDataItems = hsseDataItems;
|
||||
return data;
|
||||
|
||||
}
|
||||
|
||||
public static HSSEData GetItemByHSSEData_HSSE(HSSEData_HSSE dataHsse,
|
||||
@@ -253,6 +265,7 @@ namespace BLL
|
||||
item.CompanyComprehensiveCheckNum = dataHsse.CompanyComprehensiveCheckNum;
|
||||
item.CompanyComprehensivePlanNum = dataHsse.CompanyComprehensivePlanNum;
|
||||
item.CompanyDrillNum = dataHsse.CompanyDrillNum;
|
||||
item.CompanyDrillPersonNum = dataHsse.CompanyDrillPersonNum;
|
||||
item.CompanyLeadShiftCheckNum = dataHsse.CompanyLeadShiftCheckNum;
|
||||
item.CompanyOnSiteDisposalPlan = dataHsse.CompanyOnSiteDisposalPlan;
|
||||
item.CompanySpecialCheckNum = dataHsse.CompanySpecialCheckNum;
|
||||
@@ -263,6 +276,7 @@ namespace BLL
|
||||
item.CostUse = dataHsse.CostUse;
|
||||
item.EnterpriseTopicsMeetingNum = dataHsse.EnterpriseTopicsMeetingNum;
|
||||
item.FinishedNum = dataHsse.FinishedNum;
|
||||
item.ArgumentNum = dataHsse.ArgumentNum;
|
||||
item.GeneralAccidentNum = dataHsse.GeneralAccidentNum;
|
||||
item.GeneralClosedNum = dataHsse.GeneralClosedNum;
|
||||
item.GeneralNotClosedNum = dataHsse.GeneralNotClosedNum;
|
||||
@@ -288,6 +302,7 @@ namespace BLL
|
||||
item.NewWaterConsumption = dataHsse.NewWaterConsumption;
|
||||
item.ProjectComprehensivePlanNum = dataHsse.ProjectComprehensivePlanNum;
|
||||
item.ProjectDrillNum = dataHsse.ProjectDrillNum;
|
||||
item.ProjectDrillPersonNum = dataHsse.ProjectDrillPersonNum;
|
||||
item.ProjectFullTimeNum = dataHsse.ProjectFullTimeNum;
|
||||
item.ProjectInspectorGeneralNum = dataHsse.ProjectInspectorGeneralNum;
|
||||
item.ProjectLeadShiftCheckNum = dataHsse.ProjectLeadShiftCheckNum;
|
||||
@@ -308,12 +323,14 @@ namespace BLL
|
||||
item.ShutdownNum = dataHsse.ShutdownNum;
|
||||
item.SpecialEquipmentNum = dataHsse.SpecialEquipmentNum;
|
||||
item.SpecialOperationTrainNum = dataHsse.SpecialOperationTrainNum;
|
||||
item.HseTechnicalNum = dataHsse.HseTechnicalNum;
|
||||
item.EnvironmentalTrainNum = dataHsse.EnvironmentalTrainNum;
|
||||
item.SpecialSeriousAccidentNum = dataHsse.SpecialSeriousAccidentNum;
|
||||
item.SpecialTrainNum = dataHsse.SpecialTrainNum;
|
||||
item.SuperCompletedNum = dataHsse.SuperCompletedNum;
|
||||
item.SuperConstructionNum = dataHsse.SuperConstructionNum;
|
||||
item.SuperFinishedNum = dataHsse.SuperFinishedNum;
|
||||
item.SuperArgumentNum = dataHsse.SuperArgumentNum;
|
||||
item.SuperTrainPersonNum = dataHsse.SuperTrainPersonNum;
|
||||
item.TotalEnergyConsumption = dataHsse.TotalEnergyConsumption;
|
||||
item.TotalWorkingHour = dataHsse.TotalWorkingHour;
|
||||
@@ -338,6 +355,7 @@ namespace BLL
|
||||
var hsseDataItems = new List<HsseDataItem> { item };
|
||||
data.HSSEDataItems = hsseDataItems;
|
||||
return data;
|
||||
|
||||
}
|
||||
|
||||
public static async Task<HSSEData> GetTodayHSSEData_HSSE()
|
||||
@@ -633,6 +651,7 @@ namespace BLL
|
||||
var safeTrainTask = HSSEData_HSSEService.GetSafeTrainAsync();
|
||||
var specialTrainTask = HSSEData_HSSEService.GetSpecialTrainAsync();
|
||||
var specialOperationTrainTask = HSSEData_HSSEService.GetSpecialOperationTrainAsync();
|
||||
var hseTechnicalNumTask = HSSEData_HSSEService.GetHseTechnicalNumAsync();
|
||||
var headOfficeInspectorGeneralTask = HSSEData_HSSEService.GetHeadOfficeInspectorGeneralAsync();
|
||||
var headOfficeFullTimeTask = HSSEData_HSSEService.GetHeadOfficeFullTimeAsync();
|
||||
var branchInspectorGeneralTask = HSSEData_HSSEService.GetBranchInspectorGeneralAsync();
|
||||
@@ -690,7 +709,7 @@ namespace BLL
|
||||
safeWorkingHourTask,
|
||||
safeTrainTask,
|
||||
specialTrainTask,
|
||||
specialOperationTrainTask,
|
||||
specialOperationTrainTask, hseTechnicalNumTask,
|
||||
headOfficeInspectorGeneralTask,
|
||||
headOfficeFullTimeTask,
|
||||
branchInspectorGeneralTask,
|
||||
@@ -751,6 +770,7 @@ namespace BLL
|
||||
var safeTrainList = await safeTrainTask;
|
||||
var specialTrainList = await specialTrainTask;
|
||||
var specialOperationTrainList = await specialOperationTrainTask;
|
||||
var hseTechnicalNum = await hseTechnicalNumTask;
|
||||
var headOfficeInspectorGeneralList = await headOfficeInspectorGeneralTask;
|
||||
var headOfficeFullTimeList = await headOfficeFullTimeTask;
|
||||
var branchInspectorGeneralList = await branchInspectorGeneralTask;
|
||||
@@ -812,6 +832,7 @@ namespace BLL
|
||||
SafeTrainNum = safeTrainList.Sum(x => x.TrainPersonNum),
|
||||
SpecialTrainNum = specialTrainList.Sum(x => x.TrainPersonNum),
|
||||
SpecialOperationTrainNum = specialOperationTrainList.Sum(x => x.TrainPersonNum),
|
||||
HseTechnicalNum = hseTechnicalNum,
|
||||
EnvironmentalTrainNum = 0,
|
||||
TotalEnergyConsumption = totalEnergyConsumption,
|
||||
IncomeComprehensiveEnergyConsumption = incomeComprehensiveEnergyConsumption,
|
||||
@@ -843,10 +864,12 @@ namespace BLL
|
||||
CompanySpecialPlanNum = companySpecialPlanList.Count(),
|
||||
CompanyOnSiteDisposalPlan = companyOnSiteDisposalPlanList.Count(),
|
||||
CompanyDrillNum = companyDrillList.Count(),
|
||||
CompanyDrillPersonNum = companyDrillList.Sum(x => x.JointPersonNum),
|
||||
ProjectComprehensivePlanNum = projectComprehensivePlanList.Count(),
|
||||
ProjectSpecialPlanNum = projectSpecialPlanList.Count(),
|
||||
ProjectOnSiteDisposalPlan = projectOnSiteDisposalPlanList.Count(),
|
||||
ProjectDrillNum = projectDrillList.Count(),
|
||||
ProjectDrillPersonNum = projectDrillList.Sum(x => x.JointPersonNum),
|
||||
CostExtract = Convert.ToInt32(costExtract.Sum(x => x.SUMCost)),
|
||||
CostUse = Convert.ToInt32(costUseList.Sum(x => x.SUMCost)),
|
||||
UseEquipmentNum = useEquipmentList.Count(),
|
||||
@@ -865,16 +888,67 @@ namespace BLL
|
||||
TrainPersonNum = largeEngineeringOutputsTask.Result.Sum(x => x.TrainPersonNum),
|
||||
ConstructionNum = largeEngineeringOutputsTask.Result.Sum(x => x.ConstructionNum),
|
||||
FinishedNum = largeEngineeringOutputsTask.Result.Sum(x => x.FinishedNum),
|
||||
ArgumentNum = largeEngineeringOutputsTask.Result.Sum(x => x.ArgumentNum),
|
||||
SuperCompletedNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperCompletedNum),
|
||||
SuperTrainPersonNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperTrainPersonNum),
|
||||
SuperConstructionNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperConstructionNum)
|
||||
SuperConstructionNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperConstructionNum),
|
||||
SuperFinishedNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperFinishedNum),
|
||||
SuperArgumentNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperArgumentNum)
|
||||
};
|
||||
|
||||
#region 添加项目统计数据
|
||||
|
||||
Project_HSSEData_HSSEService.DeleteProject_HSSEData_HSSEByDate(DateTime.Now.Date);
|
||||
|
||||
var generalHiddenRectificationOutputsDict = generalHiddenRectificationOutputsList
|
||||
.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(
|
||||
g => g.Key,
|
||||
g => new { ClosedNum = g.Sum(x => x.RecNum), NotClosedNum = g.Sum(x => x.NoRecNum) }
|
||||
);
|
||||
var securityRiskOutputList = securityRiskOutputListTask.Result;
|
||||
var securityRiskOutputDict = securityRiskOutputList
|
||||
.GroupBy(x => x.ProjectId)
|
||||
.ToDictionary(
|
||||
g => g.Key,
|
||||
g => new
|
||||
{
|
||||
LowRiskNum = g.Sum(x => x.LowRiskNum),
|
||||
GeneralRiskNum = g.Sum(x => x.GeneralRiskNum),
|
||||
MediumRiskNum = g.Sum(x => x.MediumRiskNum),
|
||||
HighRiskNum = g.Sum(x => x.HighRiskNum)
|
||||
}
|
||||
);
|
||||
var largeEngineeringOutputList = largeEngineeringOutputsTask.Result;
|
||||
var largeEngineeringOutputsDict = largeEngineeringOutputList
|
||||
.GroupBy(x => x.ProjectId)
|
||||
.ToDictionary(
|
||||
g => g.Key,
|
||||
g => new
|
||||
{
|
||||
CompletedNum = g.Sum(x => x.CompletedNum),
|
||||
TrainPersonNum = g.Sum(x => x.TrainPersonNum),
|
||||
ConstructionNum = g.Sum(x => x.ConstructionNum),
|
||||
FinishedNum = g.Sum(x => x.FinishedNum),
|
||||
ArgumentNum = g.Sum(x => x.ArgumentNum),
|
||||
SuperCompletedNum = g.Sum(x => x.SuperCompletedNum),
|
||||
SuperTrainPersonNum = g.Sum(x => x.SuperTrainPersonNum),
|
||||
SuperConstructionNum = g.Sum(x => x.SuperConstructionNum),
|
||||
SuperArgumentNum = g.Sum(x => x.SuperArgumentNum)
|
||||
}
|
||||
);
|
||||
foreach (var projectid in BeUnderConstructionList)
|
||||
{
|
||||
generalHiddenRectificationOutputsDict.TryGetValue(projectid, out var generalHiddenRectificationOutputs);
|
||||
majorHiddenRectificationOutputsDict.TryGetValue(projectid, out var majorHiddenRectificationOutputs);
|
||||
securityRiskOutputDict.TryGetValue(projectid, out var securityRiskOutputs);
|
||||
largeEngineeringOutputsDict.TryGetValue(projectid, out var largeEngineeringOutputs);
|
||||
var projectHsseData = new Project_HSSEData_HSSE
|
||||
{
|
||||
Id = SQLHelper.GetNewID(),
|
||||
@@ -891,6 +965,7 @@ namespace BLL
|
||||
SafeTrainNum = safeTrainList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum),
|
||||
SpecialTrainNum = specialTrainList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum),
|
||||
SpecialOperationTrainNum = specialOperationTrainList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum),
|
||||
HseTechnicalNum = hseTechnicalNum,
|
||||
EnvironmentalTrainNum = 0,
|
||||
TotalEnergyConsumption = 0,
|
||||
IncomeComprehensiveEnergyConsumption = 0,
|
||||
@@ -925,31 +1000,35 @@ namespace BLL
|
||||
CompanySpecialPlanNum = 0,
|
||||
CompanyOnSiteDisposalPlan = 0,
|
||||
CompanyDrillNum = 0,
|
||||
CompanyDrillPersonNum = 0,
|
||||
ProjectComprehensivePlanNum = projectComprehensivePlanList.Count(x => x.ProjectId == projectid),
|
||||
ProjectSpecialPlanNum = projectSpecialPlanList.Count(x => x.ProjectId == projectid),
|
||||
ProjectOnSiteDisposalPlan = projectOnSiteDisposalPlanList.Count(x => x.ProjectId == projectid),
|
||||
ProjectDrillNum = projectDrillList.Count(x => x.ProjectId == projectid),
|
||||
ProjectDrillPersonNum = projectDrillList.Where(x => x.ProjectId == projectid).Sum(x => x.JointPersonNum),
|
||||
CostExtract = Convert.ToInt32(costExtract.Where(x => x.ProjectId == projectid).Sum(x => x.SUMCost)),
|
||||
CostUse = Convert.ToInt32(costUseList.Where(x => x.ProjectId == projectid).Sum(x => x.SUMCost)),
|
||||
UseEquipmentNum = useEquipmentList.Count(x => x.ProjectId == projectid),
|
||||
SpecialEquipmentNum = specialEquipmentList.Count(x => x.ProjectId == projectid),
|
||||
LicensesNum = licensesList.Count(x => x.ProjectId == projectid),
|
||||
LicensesCloseNum = licensesCloseList.Count(x => x.ProjectId == projectid),
|
||||
GeneralClosedNum = generalHiddenRectificationOutputsList.Where(x => x.ProjectId == projectid).Sum(x => x.RecNum),
|
||||
GeneralNotClosedNum = generalHiddenRectificationOutputsList.Where(x => x.ProjectId == projectid).Sum(x => x.NoRecNum),
|
||||
MajorClosedNum = majorHiddenRectificationOutputsList.Where(x => x.ProjectId == projectid).Sum(x => x.RecNum),
|
||||
MajorNotClosedNum = majorHiddenRectificationOutputsList.Where(x => x.ProjectId == projectid).Sum(x => x.NoRecNum),
|
||||
LowRiskNum = securityRiskOutputListTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.LowRiskNum),
|
||||
GeneralRiskNum = securityRiskOutputListTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.GeneralRiskNum),
|
||||
MediumRiskNum = securityRiskOutputListTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.MediumRiskNum),
|
||||
HighRiskNum = securityRiskOutputListTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.HighRiskNum),
|
||||
CompletedNum = largeEngineeringOutputsTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.CompletedNum),
|
||||
TrainPersonNum = largeEngineeringOutputsTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum),
|
||||
ConstructionNum = largeEngineeringOutputsTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.ConstructionNum),
|
||||
FinishedNum = largeEngineeringOutputsTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.FinishedNum),
|
||||
SuperCompletedNum = largeEngineeringOutputsTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.SuperCompletedNum),
|
||||
SuperTrainPersonNum = largeEngineeringOutputsTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.SuperTrainPersonNum),
|
||||
SuperConstructionNum = largeEngineeringOutputsTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.SuperConstructionNum)
|
||||
GeneralClosedNum = generalHiddenRectificationOutputs?.ClosedNum ?? 0,
|
||||
GeneralNotClosedNum = generalHiddenRectificationOutputs?.NotClosedNum ?? 0,
|
||||
MajorClosedNum = majorHiddenRectificationOutputs?.ClosedNum ?? 0,
|
||||
MajorNotClosedNum = majorHiddenRectificationOutputs?.NotClosedNum ?? 0,
|
||||
LowRiskNum = securityRiskOutputs?.LowRiskNum ?? 0,
|
||||
GeneralRiskNum = securityRiskOutputs?.GeneralRiskNum ?? 0,
|
||||
MediumRiskNum = securityRiskOutputs?.MediumRiskNum ?? 0,
|
||||
HighRiskNum = securityRiskOutputs?.HighRiskNum ?? 0,
|
||||
CompletedNum = largeEngineeringOutputs?.CompletedNum ?? 0,
|
||||
TrainPersonNum = largeEngineeringOutputs?.TrainPersonNum ?? 0,
|
||||
ConstructionNum = largeEngineeringOutputs?.ConstructionNum ?? 0,
|
||||
FinishedNum = largeEngineeringOutputs?.FinishedNum ?? 0,
|
||||
ArgumentNum = largeEngineeringOutputs?.ArgumentNum ?? 0,
|
||||
SuperCompletedNum = largeEngineeringOutputs?.SuperCompletedNum ?? 0,
|
||||
SuperTrainPersonNum = largeEngineeringOutputs?.SuperTrainPersonNum ?? 0,
|
||||
SuperConstructionNum = largeEngineeringOutputs?.SuperConstructionNum ?? 0,
|
||||
SuperArgumentNum = largeEngineeringOutputs?.SuperArgumentNum ?? 0
|
||||
};
|
||||
Project_HSSEData_HSSEService.AddProject_HSSEData_HSSE(projectHsseData);
|
||||
}
|
||||
@@ -971,6 +1050,7 @@ namespace BLL
|
||||
|
||||
var data = GetItemByHSSEData_HSSE(table, Project_HSSEData_HiddenDangerDetailService.GetTodayModel());
|
||||
return data;
|
||||
|
||||
}
|
||||
|
||||
//public static HSSEData StatisticalDataOld()
|
||||
@@ -1109,6 +1189,7 @@ namespace BLL
|
||||
table.SafeTrainNum = newtable.SafeTrainNum;
|
||||
table.SpecialTrainNum = newtable.SpecialTrainNum;
|
||||
table.SpecialOperationTrainNum = newtable.SpecialOperationTrainNum;
|
||||
table.HseTechnicalNum = newtable.HseTechnicalNum;
|
||||
table.EnvironmentalTrainNum = newtable.EnvironmentalTrainNum;
|
||||
table.TotalEnergyConsumption = newtable.TotalEnergyConsumption;
|
||||
table.IncomeComprehensiveEnergyConsumption = newtable.IncomeComprehensiveEnergyConsumption;
|
||||
@@ -1144,10 +1225,12 @@ namespace BLL
|
||||
table.CompanySpecialPlanNum = newtable.CompanySpecialPlanNum;
|
||||
table.CompanyOnSiteDisposalPlan = newtable.CompanyOnSiteDisposalPlan;
|
||||
table.CompanyDrillNum = newtable.CompanyDrillNum;
|
||||
table.CompanyDrillPersonNum = newtable.CompanyDrillPersonNum;
|
||||
table.ProjectComprehensivePlanNum = newtable.ProjectComprehensivePlanNum;
|
||||
table.ProjectSpecialPlanNum = newtable.ProjectSpecialPlanNum;
|
||||
table.ProjectOnSiteDisposalPlan = newtable.ProjectOnSiteDisposalPlan;
|
||||
table.ProjectDrillNum = newtable.ProjectDrillNum;
|
||||
table.ProjectDrillPersonNum = newtable.ProjectDrillPersonNum;
|
||||
table.CostExtract = newtable.CostExtract;
|
||||
table.CostUse = newtable.CostUse;
|
||||
table.UseEquipmentNum = newtable.UseEquipmentNum;
|
||||
@@ -1166,19 +1249,45 @@ namespace BLL
|
||||
table.TrainPersonNum = newtable.TrainPersonNum;
|
||||
table.ConstructionNum = newtable.ConstructionNum;
|
||||
table.FinishedNum = newtable.FinishedNum;
|
||||
table.ArgumentNum = newtable.ArgumentNum;
|
||||
table.SuperCompletedNum = newtable.SuperCompletedNum;
|
||||
table.SuperTrainPersonNum = newtable.SuperTrainPersonNum;
|
||||
table.SuperConstructionNum = newtable.SuperConstructionNum;
|
||||
table.SuperFinishedNum = newtable.SuperFinishedNum;
|
||||
table.SuperArgumentNum = newtable.SuperArgumentNum;
|
||||
table.State = newtable.State;
|
||||
table.CreateMan = newtable.CreateMan;
|
||||
table.CreateDate = newtable.CreateDate;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取安全技术交底数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetHseTechnicalNum()
|
||||
{
|
||||
var list = (from x in Funs.DB.License_HSETechnical
|
||||
where BeUnderConstructionList.Contains(x.ProjectId)
|
||||
select x).Distinct().ToList();
|
||||
var result = list.ToList().Count();
|
||||
return result;
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取安全技术交底数(异步)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static async Task<int> GetHseTechnicalNumAsync()
|
||||
{
|
||||
return await Task.Run(GetHseTechnicalNum);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#region 安监人员数据
|
||||
@@ -3513,13 +3622,15 @@ namespace BLL
|
||||
TrainPersonNum = gg.Where(x => x.IsSuperLargerHazard == false).Sum(x => x.TrainPersonNum) ?? 0,
|
||||
ConstructionNum = gg.Count(x => x.States == "2" && x.IsSuperLargerHazard == false),
|
||||
FinishedNum = gg.Count(x => x.States == "3" && x.IsSuperLargerHazard == false),
|
||||
ArgumentNum = gg.Count(x => x.IsArgument == true && x.IsSuperLargerHazard == false),
|
||||
SuperCompletedNum = gg.Count(x => x.States == "1" && x.IsSuperLargerHazard == true),
|
||||
SuperTrainPersonNum = gg.Where(x => x.IsSuperLargerHazard == true).Sum(x => x.TrainPersonNum) ?? 0,
|
||||
SuperConstructionNum = gg.Count(x => x.States == "2" && x.IsSuperLargerHazard == true),
|
||||
SuperFinishedNum = gg.Count(x => x.States == "3" && x.IsSuperLargerHazard == true),
|
||||
|
||||
SuperArgumentNum = gg.Count(x => x.IsArgument == true && x.IsSuperLargerHazard == true),
|
||||
}).ToList();
|
||||
return query;
|
||||
|
||||
}
|
||||
public static async Task<List<Model.LargeEngineeringOutput>> GetLargeEngineeringOutputsAsync()
|
||||
{
|
||||
@@ -3690,6 +3801,7 @@ namespace BLL
|
||||
x.SafeTrainNum,
|
||||
x.SpecialTrainNum,
|
||||
x.SpecialOperationTrainNum,
|
||||
x.HseTechnicalNum,
|
||||
x.EnvironmentalTrainNum,
|
||||
x.TotalEnergyConsumption,
|
||||
x.IncomeComprehensiveEnergyConsumption,
|
||||
@@ -3725,10 +3837,12 @@ namespace BLL
|
||||
x.CompanySpecialPlanNum,
|
||||
x.CompanyOnSiteDisposalPlan,
|
||||
x.CompanyDrillNum,
|
||||
x.CompanyDrillPersonNum,
|
||||
x.ProjectComprehensivePlanNum,
|
||||
x.ProjectSpecialPlanNum,
|
||||
x.ProjectOnSiteDisposalPlan,
|
||||
x.ProjectDrillNum,
|
||||
x.ProjectDrillPersonNum,
|
||||
x.CostExtract,
|
||||
x.CostUse,
|
||||
x.UseEquipmentNum,
|
||||
@@ -3747,14 +3861,17 @@ namespace BLL
|
||||
x.TrainPersonNum,
|
||||
x.ConstructionNum,
|
||||
x.FinishedNum,
|
||||
x.ArgumentNum,
|
||||
x.SuperCompletedNum,
|
||||
x.SuperTrainPersonNum,
|
||||
x.SuperConstructionNum,
|
||||
x.SuperFinishedNum,
|
||||
x.SuperArgumentNum,
|
||||
x.State,
|
||||
x.CreateDate,
|
||||
x.CreateMan
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endregion 获取列表
|
||||
|
||||
Reference in New Issue
Block a user