2023-09-26
This commit is contained in:
@@ -9,6 +9,50 @@ namespace BLL
|
||||
{
|
||||
public static class ChemicalReportItemService
|
||||
{
|
||||
public static decimal GetLatstTimeTotalEnergyConsumption()
|
||||
{
|
||||
var q1 = (from x in Funs.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 Funs.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 Funs.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 Funs.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 Funs.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;
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 化工行业能源节约与生态环境保护汇总明细表
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user