看板图表样式;人员报验补充查询条件;

This commit is contained in:
2025-07-01 14:07:38 +08:00
parent 94eea2512d
commit 037888ef1f
24 changed files with 707 additions and 229 deletions
+5 -112
View File
@@ -544,116 +544,6 @@ namespace BLL
return result;
}
public static HSSEData StatisticalData()
{
var thisUnitId = string.Empty;
var thisUnit = CommonService.GetIsThisUnit();
if (thisUnit != null) thisUnitId = thisUnit.UnitId;
var baseUnit = UnitService.GetUnitByUnitId(thisUnitId);
Project_HSSEData_HiddenDangerDetailService.StatisticalAllProjectData();
var totalEnergyConsumption = ChemicalReportItemService.GetLatstTimeTotalEnergyConsumption();
var incomeComprehensiveEnergyConsumption =
ChemicalReportItemService.GetLatstTimeIncomeComprehensiveEnergyConsumption();
var newWaterConsumption = ChemicalReportItemService.GetLatstTimeNewWaterConsumption();
var table = new HSSEData_HSSE
{
UnitId = thisUnitId,
CollCropCode = baseUnit.CollCropCode,
UnitName = baseUnit.UnitName,
ReportDate = DateTime.Now.Date,
BeUnderConstructionNum = GetBeUnderConstruction().Count,
ShutdownNum = GetShutdown().Count,
JoinConstructionPersonNum = GetJoinConstructionPerson().Count,
MajorProjectsUnderConstructionNum = GetMajorProjectsUnderConstruction().Count,
TotalWorkingHour = GetTotalWorkingHour(),
LostWorkingHour = GetLostWorkingHour(),
SafeWorkingHour = GetSafeWorkingHour(),
SafeTrainNum = GetSafeTrain().Sum(x => x.TrainPersonNum) + GetBoShengSafeTrain().Sum(x => x.TrainPersonNum),
SpecialTrainNum = GetSpecialTrain().Sum(x => x.TrainPersonNum),
SpecialOperationTrainNum = GetSpecialOperationTrain().Sum(x => x.TrainPersonNum),
EnvironmentalTrainNum = 0,
TotalEnergyConsumption = totalEnergyConsumption,
IncomeComprehensiveEnergyConsumption = incomeComprehensiveEnergyConsumption,
NewWaterConsumption = newWaterConsumption,
HeadOfficeInspectorGeneralNum = GetHeadOfficeInspectorGeneral().Count,
HeadOfficeFullTimeNum = GetHeadOfficeFullTime().Count,
BranchInspectorGeneralNum = GetBranchInspectorGeneral().Count,
BranchFullTimeNum = GetBranchFullTime().Count,
ProjectInspectorGeneralNum = GetProjectInspectorGeneral().Count,
ProjectFullTimeNum = GetProjectFullTime().Count,
ProjectSafetyMonitorNum = GetProjectSafetyMonitor().Count,
SafetyInjectionEngineer = GetSafetyInjectionEngineer().Count,
CertificateANum = GetCertificateA().Count,
CertificateBNum = GetCertificateB().Count,
CertificateCNum = GetCertificateC().Count,
SafetyCommitteeMeetingNum = GetSafetyCommitteeMeeting().Count,
EnterpriseTopicsMeetingNum = GetEnterpriseTopicsMeeting().Count,
ProjectSafetyLeadingGroupMeetingNum = GetProjectSafetyLeadingGroupMeeting().Count,
ProjectSafetyMeetingNum = GetProjectSafetyMeeting().Count,
CompanyLeadShiftCheckNum = GetCompanyLeadShiftCheck().Count,
CompanyComprehensiveCheckNum = GetCompanyComprehensiveCheck().Count,
CompanySpecialCheckNum = GetCompanySpecialCheck().Count,
ProjectLeadShiftCheckNum = GetProjectLeadShiftCheck().Count,
ProjectSpecialCheckNum = GetProjectSpecialCheck().Count,
ProjectMajorCheckNum = GetProjectMajorCheck().Count,
NearMissNum = GetNearMiss().Count,
RecordableEventNum = GetRecordableEvent().Count,
GeneralAccidentNum = GetGeneralAccident().Count,
MajorAccidentNum = GetMajorAccident().Count,
SeriousAccidentNum = GetSeriousAccident().Count,
SpecialSeriousAccidentNum = GetSpecialSeriousAccident().Count,
CompanyComprehensivePlanNum = GetCompanyComprehensivePlan().Count,
CompanySpecialPlanNum = GetCompanySpecialPlan().Count,
CompanyOnSiteDisposalPlan = GetCompanyOnSiteDisposalPlan().Count,
CompanyDrillNum = GetCompanyDrill().Count,
ProjectComprehensivePlanNum = GetProjectComprehensivePlan().Count,
ProjectSpecialPlanNum = GetProjectSpecialPlan().Count,
ProjectOnSiteDisposalPlan = GetProjectOnSiteDisposalPlan().Count,
ProjectDrillNum = GetProjectDrill().Count,
CostExtract = Convert.ToInt32(GetCostExtract().Sum(x => x.SUMCost)),
CostUse = Convert.ToInt32(GetCostUse().Sum(x => x.SUMCost)),
UseEquipmentNum = GetUseEquipment().Count,
SpecialEquipmentNum = GetSpecialEquipment().Count,
LicensesNum = GetLicenses().Count,
LicensesCloseNum = GetLicensesClose().Count,
GeneralClosedNum = GetGeneralHiddenRectificationOutputs().Sum(x => x.RecNum),
GeneralNotClosedNum = GetGeneralHiddenRectificationOutputs().Sum(x => x.NoRecNum),
MajorClosedNum = GetMajorHiddenRectificationOutputs().Sum(x => x.RecNum),
MajorNotClosedNum = GetMajorHiddenRectificationOutputs().Sum(x => x.NoRecNum),
GeneralRiskNum = GetSecurityRiskOutputs().Sum(x => x.GeneralRiskNum),
LowRiskNum = GetSecurityRiskOutputs().Sum(x => x.LowRiskNum),
MediumRiskNum = GetSecurityRiskOutputs().Sum(x => x.MediumRiskNum),
HighRiskNum = GetSecurityRiskOutputs().Sum(x => x.HighRiskNum),
CompletedNum = GetLargeEngineeringOutputs().Sum(x => x.CompletedNum),
TrainPersonNum = GetLargeEngineeringOutputs().Sum(x => x.TrainPersonNum),
ConstructionNum = GetLargeEngineeringOutputs().Sum(x => x.ConstructionNum),
FinishedNum = GetLargeEngineeringOutputs().Sum(x => x.FinishedNum),
SuperCompletedNum = GetLargeEngineeringOutputs().Sum(x => x.SuperCompletedNum),
SuperTrainPersonNum = GetLargeEngineeringOutputs().Sum(x => x.SuperTrainPersonNum),
SuperConstructionNum = GetLargeEngineeringOutputs().Sum(x => x.SuperConstructionNum),
SuperFinishedNum = GetLargeEngineeringOutputs().Sum(x => x.SuperFinishedNum),
CreateMan = Const.sysglyId,
CreateDate = DateTime.Now
};
if (IsReportByToday())
{
table.Id = GetTodayData().Id;
table.State = Const.CNCEC_State_1;
UpdateHSSEData_HSSE(table);
}
else
{
table.Id = SQLHelper.GetNewID();
table.State = Const.CNCEC_State_0;
AddHSSEData_HSSE(table);
}
var data = GetItemByHSSEData_HSSE(table, Project_HSSEData_HiddenDangerDetailService.GetTodayModel());
return data;
}
/// <summary>
/// 统计数据(异步)
/// </summary>
@@ -687,6 +577,7 @@ namespace BLL
var lostWorkingHourTask = HSSEData_HSSEService.GetLostWorkingHourAsync();
var safeWorkingHourTask = HSSEData_HSSEService.GetSafeWorkingHourAsync();
var safeTrainTask = HSSEData_HSSEService.GetSafeTrainAsync();
var safeTrainBoShengTask = HSSEData_HSSEService.GetBoShengSafeTrainAsync();
var specialTrainTask = HSSEData_HSSEService.GetSpecialTrainAsync();
var specialOperationTrainTask = HSSEData_HSSEService.GetSpecialOperationTrainAsync();
var hseTechnicalTask = HSSEData_HSSEService.GetHseTechnicalAsync();
@@ -754,6 +645,7 @@ namespace BLL
lostWorkingHourTask,
safeWorkingHourTask,
safeTrainTask,
safeTrainBoShengTask,
specialTrainTask,
specialOperationTrainTask, hseTechnicalTask,
headOfficeInspectorGeneralTask,
@@ -821,6 +713,7 @@ namespace BLL
var lostWorkingHour = await lostWorkingHourTask;
var safeWorkingHour = await safeWorkingHourTask;
var safeTrainList = await safeTrainTask;
var safeTrainBoShengList = await safeTrainBoShengTask;
var specialTrainList = await specialTrainTask;
var specialOperationTrainList = await specialOperationTrainTask;
var hseTechnicalList = await hseTechnicalTask;
@@ -890,7 +783,7 @@ namespace BLL
TotalWorkingHour = totalWorkingHour,
LostWorkingHour = lostWorkingHour,
SafeWorkingHour = safeWorkingHour,
SafeTrainNum = safeTrainList.Sum(x => x.TrainPersonNum),
SafeTrainNum = safeTrainList.Sum(x => x.TrainPersonNum) + safeTrainBoShengList.Sum(x => x.TrainPersonNum),
SpecialTrainNum = specialTrainList.Sum(x => x.TrainPersonNum),
SpecialOperationTrainNum = specialOperationTrainList.Sum(x => x.TrainPersonNum),
HseTechnicalNum = hseTechnicalList.Count(),
@@ -1037,7 +930,7 @@ namespace BLL
TotalWorkingHour = 0,//工时数据取自集团报表,项目无法提取
LostWorkingHour = 0,
SafeWorkingHour = 0,
SafeTrainNum = safeTrainList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum),
SafeTrainNum = safeTrainList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum) + safeTrainBoShengList.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 = hseTechnicalList.Count(x => x.ProjectId == projectid),