修改上报接口

This commit is contained in:
2023-07-24 16:42:54 +08:00
parent 97207481b2
commit cdf073a097
6 changed files with 685 additions and 585 deletions
+76 -45
View File
@@ -538,9 +538,9 @@ namespace BLL
var ProjectData = (from x in Funs.DB.Project_HSSEData_HSSE
where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date
select x).ToList();
//int TotalEnergyConsumption= Information_EnvironmentalDataService.GetLatstTimeTotalEnergyConsumption();
//int IncomeComprehensiveEnergyConsumption = Information_EnvironmentalDataService.GetLatstTimeIncomeComprehensiveEnergyConsumption();
//int NewWaterConsumption = Information_EnvironmentalDataService.GetLatstTimeNewWaterConsumption();
decimal TotalEnergyConsumption = GetLatstTimeTotalEnergyConsumption();
decimal IncomeComprehensiveEnergyConsumption = GetLatstTimeIncomeComprehensiveEnergyConsumption();
decimal NewWaterConsumption = GetLatstTimeNewWaterConsumption();
Model.HSSEData_HSSE table = new Model.HSSEData_HSSE
{
@@ -801,9 +801,8 @@ namespace BLL
/// <returns></returns>
public static int GetSafetyCommitteeMeetingNum()
{
//DateTime date = DateTime.Now;
//int result = (from x in Funs.DB.Meeting_CompanySafetyMeeting where x.CompanySafetyMeetingDate.Value.Year == date.Year && x.CompanySafetyMeetingDate.Value.Month == date.Month && x.CompanySafetyMeetingDate.Value.Day == date.Day select x).Count();
return 0;
int result = (from x in Funs.DB.Meeting_CompanySafetyMeeting select x).Count();
return result;
}
/// <summary>
/// 获取企业专题会议数
@@ -811,9 +810,8 @@ namespace BLL
/// <returns></returns>
public static int GetEnterpriseTopicsMeetingNum()
{
//DateTime date = DateTime.Now;
//int result = (from x in Funs.DB.Meeting_CompanySpecialMeeting where x.CompanySpecialMeetingDate.Value.Year == date.Year && x.CompanySpecialMeetingDate.Value.Month == date.Month && x.CompanySpecialMeetingDate.Value.Day == date.Day select x).Count();
return 0;
int result = (from x in Funs.DB.Meeting_CompanySpecialMeeting select x).Count();
return result;
}
/// <summary>
@@ -822,9 +820,8 @@ namespace BLL
/// <returns></returns>
public static int GetCompanyLeadShiftCheckNum()
{
//DateTime date = DateTime.Now;
//int result = (from x in Funs.DB.Supervise_SuperviseCheckReport where x.CheckType == "1" && x.CheckDate.Value.Year == date.Year && x.CheckDate.Value.Month == date.Month && x.CheckDate.Value.Day == date.Day select x).Count();
return 0;
int result = (from x in Funs.DB.Supervise_SuperviseCheckReport where x.CheckType == "1" select x).Count();
return result;
}
/// <summary>
/// 获取企业综合检查次数
@@ -832,9 +829,8 @@ namespace BLL
/// <returns></returns>
public static int GetCompanyComprehensiveCheckNum()
{
//DateTime date = DateTime.Now;
//int result = (from x in Funs.DB.Supervise_SuperviseCheckReport where x.CheckType == "2" && x.CheckDate.Value.Year == date.Year && x.CheckDate.Value.Month == date.Month && x.CheckDate.Value.Day == date.Day select x).Count();
return 0;
int result = (from x in Funs.DB.Supervise_SuperviseCheckReport where x.CheckType == "2" select x).Count();
return result;
}
/// <summary>
/// 获取企业专项检查次数
@@ -842,9 +838,8 @@ namespace BLL
/// <returns></returns>
public static int GetCompanySpecialCheckNum()
{
//DateTime date = DateTime.Now;
//int result = (from x in Funs.DB.Supervise_SuperviseCheckReport where x.CheckType == "3" && x.CheckDate.Value.Year == date.Year && x.CheckDate.Value.Month == date.Month && x.CheckDate.Value.Day == date.Day select x).Count();
return 0;
int result = (from x in Funs.DB.Supervise_SuperviseCheckReport where x.CheckType == "3" select x).Count();
return result;
}
/// <summary>
/// 获取企业级综合预案数
@@ -852,13 +847,11 @@ namespace BLL
/// <returns></returns>
public static int GetCompanyComprehensivePlanNum()
{
//DateTime date = DateTime.Now;
//int result = (from x in Funs.DB.Emergency_EmergencyList_Unit
// join y in Funs.DB.Base_EmergencyType on x.EmergencyTypeId equals y.EmergencyTypeId
// where x.CompileDate.Value.Year == date.Year && x.CompileDate.Value.Month == date.Month
// && x.CompileDate.Value.Day == date.Day && y.EmergencyTypeName.Contains("综合")
// select x).Count();
return 0;
int result = (from x in Funs.DB.Emergency_EmergencyList_Unit
join y in Funs.DB.Base_EmergencyType on x.EmergencyTypeId equals y.EmergencyTypeId
where y.EmergencyTypeName.Contains("综合")
select x).Count();
return result;
}
/// <summary>
/// 获取企业级专项预案数
@@ -866,13 +859,11 @@ namespace BLL
/// <returns></returns>
public static int GetCompanySpecialPlanNum()
{
//DateTime date = DateTime.Now;
//int result = (from x in Funs.DB.Emergency_EmergencyList_Unit
// join y in Funs.DB.Base_EmergencyType on x.EmergencyTypeId equals y.EmergencyTypeId
// where x.CompileDate.Value.Year == date.Year && x.CompileDate.Value.Month == date.Month
// && x.CompileDate.Value.Day == date.Day && y.EmergencyTypeName.Contains("专项")
// select x).Count();
return 0;
int result = (from x in Funs.DB.Emergency_EmergencyList_Unit
join y in Funs.DB.Base_EmergencyType on x.EmergencyTypeId equals y.EmergencyTypeId
where y.EmergencyTypeName.Contains("专项")
select x).Count();
return result;
}
/// <summary>
/// 获取企业级现场处置预案
@@ -880,13 +871,11 @@ namespace BLL
/// <returns></returns>
public static int GetCompanyOnSiteDisposalPlan()
{
//DateTime date = DateTime.Now;
//int result = (from x in Funs.DB.Emergency_EmergencyList_Unit
// join y in Funs.DB.Base_EmergencyType on x.EmergencyTypeId equals y.EmergencyTypeId
// where x.CompileDate.Value.Year == date.Year && x.CompileDate.Value.Month == date.Month
// && x.CompileDate.Value.Day == date.Day && y.EmergencyTypeName.Contains("现场处置")
// select x).Count();
return 0;
int result = (from x in Funs.DB.Emergency_EmergencyList_Unit
join y in Funs.DB.Base_EmergencyType on x.EmergencyTypeId equals y.EmergencyTypeId
where y.EmergencyTypeName.Contains("现场处置")
select x).Count();
return result;
}
/// <summary>
/// 获取企业级演练次数
@@ -894,12 +883,54 @@ namespace BLL
/// <returns></returns>
public static int GetCompanyDrillNum()
{
//DateTime date = DateTime.Now;
//int result = (from x in Funs.DB.Emergency_DrillRecordList_Unit
// where x.DrillRecordDate.Value.Year == date.Year && x.DrillRecordDate.Value.Month == date.Month
// && x.DrillRecordDate.Value.Day == date.Day
// select x).Count();
return 0;
int result = (from x in Funs.DB.Emergency_DrillRecordList_Unit
select x).Count();
return result;
}
public static decimal GetLatstTimeTotalEnergyConsumption()
{
var q1 = (from x in db.Environmental_ChemicalReportItem where x.SortIndex == "01" select x);
decimal d1 = 0;
foreach (var item in q1)
{
d1 += Funs.GetNewDecimalOrZero(item.ThisYearValue);
}
var q2 = (from x in db.Environmental_ArchitectureReportItem where x.SortIndex == "01" select x);
decimal d2 = 0;
foreach (var item in q2)
{
d2 += Funs.GetNewDecimalOrZero(item.ThisYearValue);
}
return d1 + d2;
}
public static decimal GetLatstTimeIncomeComprehensiveEnergyConsumption()
{
var q2 = (from x in db.Environmental_ArchitectureReportItem where x.SortIndex == "15" select x);
decimal d2 = 0;
foreach (var item in q2)
{
d2 += Funs.GetNewDecimalOrZero(item.ThisYearValue);
}
return d2;
}
public static decimal GetLatstTimeNewWaterConsumption()
{
var q1 = (from x in db.Environmental_ChemicalReportItem where x.SortIndex == "70" select x);
decimal d1 = 0;
foreach (var item in q1)
{
d1 += Funs.GetNewDecimalOrZero(item.ThisYearValue);
}
var q2 = (from x in db.Environmental_ArchitectureReportItem where x.SortIndex == "38" select x);
decimal d2 = 0;
foreach (var item in q2)
{
d2 += Funs.GetNewDecimalOrZero(item.ThisYearValue);
}
return d1 + d2;
}
}
}