Merge branch 'master' of https://gitee.com/frane-yang/SGGL_SeDin_New
This commit is contained in:
@@ -287,6 +287,8 @@
|
||||
<Compile Include="CQMS\Check\SpotCheckService.cs" />
|
||||
<Compile Include="CQMS\Check\TechnicalContactListApproveService.cs" />
|
||||
<Compile Include="CQMS\Check\TechnicalContactListService.cs" />
|
||||
<Compile Include="CQMS\ManageReport\ProjectQualityWorkSummaryReportService.cs" />
|
||||
<Compile Include="CQMS\ManageReport\ProjectQuarterlyProjectQualityService.cs" />
|
||||
<Compile Include="CQMS\Material\CQMS_ConstructionTestService.cs" />
|
||||
<Compile Include="CQMS\Material\CQMS_EquipmentService.cs" />
|
||||
<Compile Include="CQMS\Material\CQMS_InspectionApproveService.cs" />
|
||||
@@ -461,8 +463,10 @@
|
||||
<Compile Include="HSSE\InformationProject\ProjectDrillConductedQuarterlyReportService.cs" />
|
||||
<Compile Include="HSSE\InformationProject\ProjectDrillPlanHalfYearReportItemService.cs" />
|
||||
<Compile Include="HSSE\InformationProject\ProjectDrillPlanHalfYearReportService.cs" />
|
||||
<Compile Include="HSSE\InformationProject\ProjectEPSummaryReportService.cs" />
|
||||
<Compile Include="HSSE\InformationProject\ProjectMillionsMonthlyReportService.cs" />
|
||||
<Compile Include="HSSE\InformationProject\ProjectSafetyQuarterlyReportService.cs" />
|
||||
<Compile Include="HSSE\InformationProject\ProjectWorkSummaryReportService.cs" />
|
||||
<Compile Include="HSSE\Law\HSSEStandardsListService.cs" />
|
||||
<Compile Include="HSSE\Law\ManageRuleService.cs" />
|
||||
<Compile Include="HSSE\Law\RulesRegulationsService.cs" />
|
||||
@@ -620,6 +624,7 @@
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Reference.svcmap</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SHIYE\InformationProject_SafetyBriefingService.cs" />
|
||||
<Compile Include="SortConditionHelper.cs" />
|
||||
<Compile Include="SQLHelper.cs" />
|
||||
<Compile Include="Common\Const.cs" />
|
||||
@@ -666,16 +671,33 @@
|
||||
<Compile Include="ZHGL\DataSync\SYHSEData_HiddenDangerCheckService.cs" />
|
||||
<Compile Include="ZHGL\DataSync\SYHSEData_RiskControlService.cs" />
|
||||
<Compile Include="ZHGL\DataSync\SYHSEData_SYHSEService.cs" />
|
||||
<Compile Include="ZHGL\Environmental\ArchitectureReportItemService.cs" />
|
||||
<Compile Include="ZHGL\Environmental\ArchitectureReportService.cs" />
|
||||
<Compile Include="ZHGL\Environmental\ChemicalReportItemService.cs" />
|
||||
<Compile Include="ZHGL\Environmental\ChemicalReportService.cs" />
|
||||
<Compile Include="ZHGL\Environmental\EnergyreportItemService .cs" />
|
||||
<Compile Include="ZHGL\Environmental\EnergyReportService.cs" />
|
||||
<Compile Include="ZHGL\Environmental\ProjectArchitectureReportItemService.cs" />
|
||||
<Compile Include="ZHGL\Environmental\ProjectArchitectureReportService.cs" />
|
||||
<Compile Include="ZHGL\Environmental\ProjectChemicalReportItemService.cs" />
|
||||
<Compile Include="ZHGL\Environmental\ProjectChemicalReportService.cs" />
|
||||
<Compile Include="ZHGL\Environmental\ProjectEnergyreportItemService .cs" />
|
||||
<Compile Include="ZHGL\Environmental\ProjectEnergyReportService.cs" />
|
||||
<Compile Include="ZHGL\Information\AccidentCauseReportItemService.cs" />
|
||||
<Compile Include="ZHGL\Information\AccidentCauseReportService.cs" />
|
||||
<Compile Include="ZHGL\Information\DrillConductedQuarterlyReportItemService.cs" />
|
||||
<Compile Include="ZHGL\Information\DrillConductedQuarterlyReportService.cs" />
|
||||
<Compile Include="ZHGL\Information\DrillPlanHalfYearReportItemService.cs" />
|
||||
<Compile Include="ZHGL\Information\DrillPlanHalfYearReportService.cs" />
|
||||
<Compile Include="ZHGL\Information\EPSummaryReportService.cs" />
|
||||
<Compile Include="ZHGL\Information\MillionsMonthlyReportItemService.cs" />
|
||||
<Compile Include="ZHGL\Information\MillionsMonthlyReportService.cs" />
|
||||
<Compile Include="ZHGL\Information\QualityWorkSummaryReportService.cs" />
|
||||
<Compile Include="ZHGL\Information\QuarterlyProjectQualityService.cs" />
|
||||
<Compile Include="ZHGL\Information\SafetyBriefingService.cs" />
|
||||
<Compile Include="ZHGL\Information\SafetyQuarterlyReportService.cs" />
|
||||
<Compile Include="ZHGL\Information\UrgeReportService.cs" />
|
||||
<Compile Include="ZHGL\Information\WorkSummaryReportService.cs" />
|
||||
<Compile Include="ZHGL\RealName\BasicDataService.cs" />
|
||||
<Compile Include="ZHGL\RealName\CityService.cs" />
|
||||
<Compile Include="ZHGL\RealName\CountryService.cs" />
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 质量管理工作总结报告
|
||||
/// </summary>
|
||||
public static class ProjectQualityWorkSummaryReportService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取质量管理工作总结报告
|
||||
/// </summary>
|
||||
/// <param name="qualityWorkSummaryReportId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.InformationProject_QualityWorkSummaryReport GetQualityWorkSummaryReportById(string qualityWorkSummaryReportId)
|
||||
{
|
||||
return Funs.DB.InformationProject_QualityWorkSummaryReport.FirstOrDefault(e => e.QualityWorkSummaryReportId == qualityWorkSummaryReportId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 质量管理工作总结报告
|
||||
/// </summary>
|
||||
/// <param name="unitId">单位Id</param>
|
||||
/// <param name="year">年度</param>
|
||||
/// <returns>质量管理工作总结报告</returns>
|
||||
public static Model.InformationProject_QualityWorkSummaryReport GetQualityWorkSummaryReportByUnitIdAndYear(string unitId, int year)
|
||||
{
|
||||
return Funs.DB.InformationProject_QualityWorkSummaryReport.FirstOrDefault(e => e.UnitId == unitId && e.YearId == year);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加质量管理工作总结报告
|
||||
/// </summary>
|
||||
/// <param name="qualityWorkSummaryReport"></param>
|
||||
public static void AddQualityWorkSummaryReport(Model.InformationProject_QualityWorkSummaryReport qualityWorkSummaryReport)
|
||||
{
|
||||
Model.InformationProject_QualityWorkSummaryReport newQualityWorkSummaryReport = new Model.InformationProject_QualityWorkSummaryReport
|
||||
{
|
||||
QualityWorkSummaryReportId = qualityWorkSummaryReport.QualityWorkSummaryReportId,
|
||||
ProjectId = qualityWorkSummaryReport.ProjectId,
|
||||
YearId = qualityWorkSummaryReport.YearId,
|
||||
UnitId = qualityWorkSummaryReport.UnitId,
|
||||
ResponsiblePerson = qualityWorkSummaryReport.ResponsiblePerson,
|
||||
ResponsiblePersonTel = qualityWorkSummaryReport.ResponsiblePersonTel,
|
||||
ContactPerson = qualityWorkSummaryReport.ContactPerson,
|
||||
ContactPersonTel = qualityWorkSummaryReport.ContactPersonTel,
|
||||
ReportDate = qualityWorkSummaryReport.ReportDate,
|
||||
Performance = qualityWorkSummaryReport.Performance,
|
||||
AccidentSituation = qualityWorkSummaryReport.AccidentSituation,
|
||||
Awards = qualityWorkSummaryReport.Awards,
|
||||
WorkDevelopment = qualityWorkSummaryReport.WorkDevelopment,
|
||||
PersonnelTraining = qualityWorkSummaryReport.PersonnelTraining,
|
||||
CheckSituation = qualityWorkSummaryReport.CheckSituation,
|
||||
ManagementActivity = qualityWorkSummaryReport.ManagementActivity,
|
||||
WorkExperience = qualityWorkSummaryReport.WorkExperience,
|
||||
Countermeasures = qualityWorkSummaryReport.Countermeasures,
|
||||
NextYearWorkPlan = qualityWorkSummaryReport.NextYearWorkPlan,
|
||||
JobSuggestion = qualityWorkSummaryReport.JobSuggestion,
|
||||
CompileMan = qualityWorkSummaryReport.CompileMan,
|
||||
CompileDate = qualityWorkSummaryReport.CompileDate
|
||||
};
|
||||
Funs.DB.InformationProject_QualityWorkSummaryReport.InsertOnSubmit(newQualityWorkSummaryReport);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改质量管理工作总结报告
|
||||
/// </summary>
|
||||
/// <param name="qualityWorkSummaryReport"></param>
|
||||
public static void UpdateQualityWorkSummaryReport(Model.InformationProject_QualityWorkSummaryReport qualityWorkSummaryReport)
|
||||
{
|
||||
Model.InformationProject_QualityWorkSummaryReport newQualityWorkSummaryReport = Funs.DB.InformationProject_QualityWorkSummaryReport.FirstOrDefault(e => e.QualityWorkSummaryReportId == qualityWorkSummaryReport.QualityWorkSummaryReportId);
|
||||
if (newQualityWorkSummaryReport != null)
|
||||
{
|
||||
newQualityWorkSummaryReport.UnitId = qualityWorkSummaryReport.UnitId;
|
||||
newQualityWorkSummaryReport.YearId = qualityWorkSummaryReport.YearId;
|
||||
newQualityWorkSummaryReport.ResponsiblePerson = qualityWorkSummaryReport.ResponsiblePerson;
|
||||
newQualityWorkSummaryReport.ResponsiblePersonTel = qualityWorkSummaryReport.ResponsiblePersonTel;
|
||||
newQualityWorkSummaryReport.ContactPerson = qualityWorkSummaryReport.ContactPerson;
|
||||
newQualityWorkSummaryReport.ContactPersonTel = qualityWorkSummaryReport.ContactPersonTel;
|
||||
newQualityWorkSummaryReport.ReportDate = qualityWorkSummaryReport.ReportDate;
|
||||
newQualityWorkSummaryReport.Performance = qualityWorkSummaryReport.Performance;
|
||||
newQualityWorkSummaryReport.AccidentSituation = qualityWorkSummaryReport.AccidentSituation;
|
||||
newQualityWorkSummaryReport.Awards = qualityWorkSummaryReport.Awards;
|
||||
newQualityWorkSummaryReport.WorkDevelopment = qualityWorkSummaryReport.WorkDevelopment;
|
||||
newQualityWorkSummaryReport.PersonnelTraining = qualityWorkSummaryReport.PersonnelTraining;
|
||||
newQualityWorkSummaryReport.CheckSituation = qualityWorkSummaryReport.CheckSituation;
|
||||
newQualityWorkSummaryReport.ManagementActivity = qualityWorkSummaryReport.ManagementActivity;
|
||||
newQualityWorkSummaryReport.WorkExperience = qualityWorkSummaryReport.WorkExperience;
|
||||
newQualityWorkSummaryReport.Countermeasures = qualityWorkSummaryReport.Countermeasures;
|
||||
newQualityWorkSummaryReport.NextYearWorkPlan = qualityWorkSummaryReport.NextYearWorkPlan;
|
||||
newQualityWorkSummaryReport.JobSuggestion = qualityWorkSummaryReport.JobSuggestion;
|
||||
newQualityWorkSummaryReport.CompileMan = qualityWorkSummaryReport.CompileMan;
|
||||
newQualityWorkSummaryReport.CompileDate = qualityWorkSummaryReport.CompileDate;
|
||||
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除质量管理工作总结报告
|
||||
/// </summary>
|
||||
/// <param name="QualityWorkSummaryReportId"></param>
|
||||
public static void DeleteQualityWorkSummaryReportById(string QualityWorkSummaryReportId)
|
||||
{
|
||||
Model.InformationProject_QualityWorkSummaryReport qualityWorkSummaryReport = Funs.DB.InformationProject_QualityWorkSummaryReport.FirstOrDefault(e => e.QualityWorkSummaryReportId == QualityWorkSummaryReportId);
|
||||
if (qualityWorkSummaryReport != null)
|
||||
{
|
||||
Funs.DB.InformationProject_QualityWorkSummaryReport.DeleteOnSubmit(qualityWorkSummaryReport);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 季度工程项目质量信息表
|
||||
/// </summary>
|
||||
public static class ProjectQuarterlyProjectQualityService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取季度工程项目质量信息表
|
||||
/// </summary>
|
||||
/// <param name="quarterlyProjectQualityId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.InformationProject_QuarterlyProjectQuality GetQuarterlyProjectQualityById(string quarterlyProjectQualityId)
|
||||
{
|
||||
return Funs.DB.InformationProject_QuarterlyProjectQuality.FirstOrDefault(e => e.QuarterlyProjectQualityId == quarterlyProjectQualityId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 季度工程项目质量信息表
|
||||
/// </summary>
|
||||
/// <param name="unitId">单位Id</param>
|
||||
/// <param name="year">年度</param>
|
||||
/// <returns>季度工程项目质量信息表</returns>
|
||||
public static Model.InformationProject_QuarterlyProjectQuality GetQuarterlyProjectQualityByUnitIdAndYearAndQuarter(string unitId, int year,int quarter)
|
||||
{
|
||||
return Funs.DB.InformationProject_QuarterlyProjectQuality.FirstOrDefault(e => e.UnitId == unitId && e.Year == year && e.Quarter == quarter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加季度工程项目质量信息表
|
||||
/// </summary>
|
||||
/// <param name="quarterlyProjectQuality"></param>
|
||||
public static void AddQuarterlyProjectQuality(Model.InformationProject_QuarterlyProjectQuality quarterlyProjectQuality)
|
||||
{
|
||||
Model.InformationProject_QuarterlyProjectQuality newQuarterlyProjectQuality = new Model.InformationProject_QuarterlyProjectQuality
|
||||
{
|
||||
QuarterlyProjectQualityId = quarterlyProjectQuality.QuarterlyProjectQualityId,
|
||||
ProjectId = quarterlyProjectQuality.ProjectId,
|
||||
UnitId = quarterlyProjectQuality.UnitId,
|
||||
Year=quarterlyProjectQuality.Year,
|
||||
Quarter = quarterlyProjectQuality.Quarter,
|
||||
QualityManagePersonNum=quarterlyProjectQuality.QualityManagePersonNum,
|
||||
AdvancedTitlePersonNum=quarterlyProjectQuality.AdvancedTitlePersonNum,
|
||||
IntermediateTitlePersonNum=quarterlyProjectQuality.IntermediateTitlePersonNum,
|
||||
BeImplementedProjectNum=quarterlyProjectQuality.BeImplementedProjectNum,
|
||||
StartImplementedProjectNum=quarterlyProjectQuality.StartImplementedProjectNum,
|
||||
AccumulativeStartImplemented=quarterlyProjectQuality.AccumulativeStartImplemented,
|
||||
CompleteProjectNum=quarterlyProjectQuality.CompleteProjectNum,
|
||||
YearCompleteProjectNum = quarterlyProjectQuality.YearCompleteProjectNum,
|
||||
QuarterTotal= quarterlyProjectQuality.QuarterTotal,
|
||||
QuarterFirstPassNum=quarterlyProjectQuality.QuarterFirstPassNum,
|
||||
QuarterFirstPassRate=quarterlyProjectQuality.QuarterFirstPassRate,
|
||||
YearTotal=quarterlyProjectQuality.YearTotal,
|
||||
YearFirstPassNum=quarterlyProjectQuality.YearFirstPassNum,
|
||||
YearFirstPassRate=quarterlyProjectQuality.YearFirstPassRate,
|
||||
QuaterCheckSuperviseNum=quarterlyProjectQuality.QuaterCheckSuperviseNum,
|
||||
QuaterCorrectiveNoticeNum=quarterlyProjectQuality.QuaterCorrectiveNoticeNum,
|
||||
QuaterQualityProblemNum=quarterlyProjectQuality.QuaterQualityProblemNum,
|
||||
QuaterClosedQualityProblemNum=quarterlyProjectQuality.QuaterClosedQualityProblemNum,
|
||||
YearCheckSuperviseNum = quarterlyProjectQuality.YearCheckSuperviseNum,
|
||||
YearCorrectiveNoticeNum=quarterlyProjectQuality.YearCorrectiveNoticeNum,
|
||||
YearQualityProblemNum = quarterlyProjectQuality.YearQualityProblemNum,
|
||||
YearClosedQualityProblemNum=quarterlyProjectQuality.YearClosedQualityProblemNum,
|
||||
QuaterQualityAccidentNum = quarterlyProjectQuality.QuaterQualityAccidentNum,
|
||||
QuaterDirectEconomicLoss = quarterlyProjectQuality.QuaterDirectEconomicLoss,
|
||||
YearQualityAccidentNum = quarterlyProjectQuality.YearQualityAccidentNum,
|
||||
YearDirectEconomicLoss=quarterlyProjectQuality.YearDirectEconomicLoss,
|
||||
ResponsiblePerson=quarterlyProjectQuality.ResponsiblePerson,
|
||||
CompileMan = quarterlyProjectQuality.CompileMan,
|
||||
CompileDate = quarterlyProjectQuality.CompileDate,
|
||||
Tel=quarterlyProjectQuality.Tel
|
||||
};
|
||||
Funs.DB.InformationProject_QuarterlyProjectQuality.InsertOnSubmit(newQuarterlyProjectQuality);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改季度工程项目质量信息表
|
||||
/// </summary>
|
||||
/// <param name="quarterlyProjectQuality"></param>
|
||||
public static void UpdateQuarterlyProjectQuality(Model.InformationProject_QuarterlyProjectQuality quarterlyProjectQuality)
|
||||
{
|
||||
Model.InformationProject_QuarterlyProjectQuality newQuarterlyProjectQuality = Funs.DB.InformationProject_QuarterlyProjectQuality.FirstOrDefault(e => e.QuarterlyProjectQualityId == quarterlyProjectQuality.QuarterlyProjectQualityId);
|
||||
if (newQuarterlyProjectQuality != null)
|
||||
{
|
||||
newQuarterlyProjectQuality.UnitId = quarterlyProjectQuality.UnitId;
|
||||
newQuarterlyProjectQuality.Year = quarterlyProjectQuality.Year;
|
||||
newQuarterlyProjectQuality.Quarter = quarterlyProjectQuality.Quarter;
|
||||
newQuarterlyProjectQuality.QualityManagePersonNum = quarterlyProjectQuality.QualityManagePersonNum;
|
||||
newQuarterlyProjectQuality.AdvancedTitlePersonNum = quarterlyProjectQuality.AdvancedTitlePersonNum;
|
||||
newQuarterlyProjectQuality.IntermediateTitlePersonNum = quarterlyProjectQuality.IntermediateTitlePersonNum;
|
||||
newQuarterlyProjectQuality.BeImplementedProjectNum = quarterlyProjectQuality.BeImplementedProjectNum;
|
||||
newQuarterlyProjectQuality.StartImplementedProjectNum = quarterlyProjectQuality.StartImplementedProjectNum;
|
||||
newQuarterlyProjectQuality.AccumulativeStartImplemented = quarterlyProjectQuality.AccumulativeStartImplemented;
|
||||
newQuarterlyProjectQuality.CompleteProjectNum = quarterlyProjectQuality.CompleteProjectNum;
|
||||
newQuarterlyProjectQuality.YearCompleteProjectNum = quarterlyProjectQuality.YearCompleteProjectNum;
|
||||
newQuarterlyProjectQuality.QuarterTotal = quarterlyProjectQuality.QuarterTotal;
|
||||
newQuarterlyProjectQuality.QuarterFirstPassNum = quarterlyProjectQuality.QuarterFirstPassNum;
|
||||
newQuarterlyProjectQuality.QuarterFirstPassRate = quarterlyProjectQuality.QuarterFirstPassRate;
|
||||
newQuarterlyProjectQuality.YearTotal = quarterlyProjectQuality.YearTotal;
|
||||
newQuarterlyProjectQuality.YearFirstPassNum = quarterlyProjectQuality.YearFirstPassNum;
|
||||
newQuarterlyProjectQuality.YearFirstPassRate = quarterlyProjectQuality.YearFirstPassRate;
|
||||
newQuarterlyProjectQuality.QuaterCheckSuperviseNum = quarterlyProjectQuality.QuaterCheckSuperviseNum;
|
||||
newQuarterlyProjectQuality.QuaterCorrectiveNoticeNum = quarterlyProjectQuality.QuaterCorrectiveNoticeNum;
|
||||
newQuarterlyProjectQuality.QuaterQualityProblemNum = quarterlyProjectQuality.QuaterQualityProblemNum;
|
||||
newQuarterlyProjectQuality.QuaterClosedQualityProblemNum = quarterlyProjectQuality.QuaterClosedQualityProblemNum;
|
||||
newQuarterlyProjectQuality.YearCheckSuperviseNum = quarterlyProjectQuality.YearCheckSuperviseNum;
|
||||
newQuarterlyProjectQuality.YearCorrectiveNoticeNum = quarterlyProjectQuality.YearCorrectiveNoticeNum;
|
||||
newQuarterlyProjectQuality.YearQualityProblemNum = quarterlyProjectQuality.YearQualityProblemNum;
|
||||
newQuarterlyProjectQuality.YearClosedQualityProblemNum = quarterlyProjectQuality.YearClosedQualityProblemNum;
|
||||
newQuarterlyProjectQuality.QuaterQualityAccidentNum = quarterlyProjectQuality.QuaterQualityAccidentNum;
|
||||
newQuarterlyProjectQuality.QuaterDirectEconomicLoss = quarterlyProjectQuality.QuaterDirectEconomicLoss;
|
||||
newQuarterlyProjectQuality.YearQualityAccidentNum = quarterlyProjectQuality.YearQualityAccidentNum;
|
||||
newQuarterlyProjectQuality.YearDirectEconomicLoss = quarterlyProjectQuality.YearDirectEconomicLoss;
|
||||
newQuarterlyProjectQuality.ResponsiblePerson = quarterlyProjectQuality.ResponsiblePerson;
|
||||
newQuarterlyProjectQuality.CompileMan = quarterlyProjectQuality.CompileMan;
|
||||
newQuarterlyProjectQuality.CompileDate = quarterlyProjectQuality.CompileDate;
|
||||
newQuarterlyProjectQuality.Tel = quarterlyProjectQuality.Tel;
|
||||
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除季度工程项目质量信息表
|
||||
/// </summary>
|
||||
/// <param name="QuarterlyProjectQualityId"></param>
|
||||
public static void DeleteQuarterlyProjectQualityById(string QuarterlyProjectQualityId)
|
||||
{
|
||||
Model.InformationProject_QuarterlyProjectQuality quarterlyProjectQuality = Funs.DB.InformationProject_QuarterlyProjectQuality.FirstOrDefault(e => e.QuarterlyProjectQualityId == QuarterlyProjectQualityId);
|
||||
if (quarterlyProjectQuality != null)
|
||||
{
|
||||
Funs.DB.InformationProject_QuarterlyProjectQuality.DeleteOnSubmit(quarterlyProjectQuality);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -784,7 +784,114 @@
|
||||
/// 实业
|
||||
/// </summary>
|
||||
public const string SYHSEData_DataMenuId = "S89E5EC2-F725-4656-9110-5AF83C18FB6C";
|
||||
/// <summary>
|
||||
/// 安全管理工作总结报告
|
||||
/// </summary>
|
||||
public const string ReportType_6 = "11";
|
||||
|
||||
/// <summary>
|
||||
/// 质量管理工作总结报告
|
||||
/// </summary>
|
||||
public const string ReportType_7 = "12";
|
||||
|
||||
/// <summary>
|
||||
/// 实业安全简报
|
||||
/// </summary>
|
||||
public const string ReportType_8 = "13";
|
||||
|
||||
/// <summary>
|
||||
/// 季度工程项目质量信息表
|
||||
/// </summary>
|
||||
public const string ReportType_9 = "14";
|
||||
|
||||
/// <summary>
|
||||
/// 生态环保工作总结报告
|
||||
/// </summary>
|
||||
public const string ReportType_10 = "15";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 化工行业能源节约与生态环境保护汇总表
|
||||
/// </summary>
|
||||
public const string ChemicalReportMenuId = "ECDD89AC-1E16-4D82-B3BE-5D62F31B7A14";
|
||||
|
||||
/// <summary>
|
||||
/// 建筑行业能源节约与生态环境保护汇总表
|
||||
/// </summary>
|
||||
public const string ArchitectureReportMenuId = "7C47F078-D4C9-40D9-BEEF-E657EAFEC650";
|
||||
|
||||
public const string ProjectOperationReportMenuId = "EFA6E45F-1267-4804-BEE7-41E0C5461204";
|
||||
public const string OperationReportMenuId = "7652D239-1897-4886-8DF2-B71E3B060D21";
|
||||
|
||||
/// <summary>
|
||||
/// 节能环保产业企业生产和服务业务情况报表
|
||||
/// </summary>
|
||||
public const string EnergyReportMenuId = "30579BFE-AB4B-49A7-A73D-B7CE902A8B69";
|
||||
|
||||
/// <summary>
|
||||
/// 安全管理工作总结报告
|
||||
/// </summary>
|
||||
public const string WorkSummaryReportMenuId = "07FEEC9D-09C1-4C19-9269-62F69532086C";
|
||||
|
||||
/// <summary>
|
||||
/// 质量管理工作总结报告
|
||||
/// </summary>
|
||||
public const string QualityWorkSummaryReportMenuId = "12941594-2171-411A-8CC8-32E3BD9FCDDF";
|
||||
|
||||
/// <summary>
|
||||
/// 实业安全简报
|
||||
/// </summary>
|
||||
public const string SafetyBriefingMenuId = "AAC7C263-6E25-49DC-985B-DC3FA7AAF3A1";
|
||||
|
||||
/// <summary>
|
||||
/// 季度工程项目质量信息表
|
||||
/// </summary>
|
||||
public const string QuarterlyProjectQualityMenuId = "CF9C1F00-34B8-42E5-B2D1-704094169CA3";
|
||||
|
||||
/// <summary>
|
||||
/// 生态环保工作总结报告
|
||||
/// </summary>
|
||||
public const string EPSummaryReportMenuId = "5B344750-79DD-40AA-8AA7-34B04E41FA72";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 安全管理工作总结报告
|
||||
/// </summary>
|
||||
public const string ProjectWorkSummaryReportMenuId = "FB174DD6-CBAE-43AF-9356-B098A17B719D";
|
||||
|
||||
/// <summary>
|
||||
/// 质量管理工作总结报告
|
||||
/// </summary>
|
||||
public const string ProjectQualitySummaryReportMenuId = "1443C901-A9C3-4CCC-B858-55512DE8C5CA";
|
||||
|
||||
/// <summary>
|
||||
/// 季度工程项目质量信息表
|
||||
/// </summary>
|
||||
public const string ProjectQuarterlyProjectQualityMenuId = "267064F1-88F7-4468-998A-49A1A2F25BB8";
|
||||
|
||||
/// <summary>
|
||||
/// 实业安全简报
|
||||
/// </summary>
|
||||
public const string ProjectSafetyBriefingMenuId = "86F71934-7149-470E-BEAB-FFDC5BF3C0F2";
|
||||
|
||||
/// 化工行业能源节约与生态环境保护汇总表
|
||||
/// </summary>
|
||||
public const string ProjectChemicalReportMenuId = "A44E98F6-E9FE-43F8-8349-C166263BF608";
|
||||
|
||||
/// <summary>
|
||||
/// 建筑行业能源节约与生态环境保护汇总表
|
||||
/// </summary>
|
||||
public const string ProjectArchitectureReportMenuId = "25CE6894-2840-4DC4-AD2E-D72292849CEE";
|
||||
|
||||
/// <summary>
|
||||
/// 生态环保工作总结报告
|
||||
/// </summary>
|
||||
public const string ProjectEPSummaryReportMenuId = "FD572EFA-8E87-43D1-B514-25A39768106F";
|
||||
|
||||
/// <summary>
|
||||
/// 节能环保产业企业生产和服务业务情况报表(项目级)
|
||||
/// </summary>
|
||||
public const string ProjectEnergyReportMenuId = "9DE996D9-A2CF-40C8-86D3-6A472AB30E5D";
|
||||
|
||||
#region 系统设置
|
||||
/// <summary>
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 生态环保工作总结报告
|
||||
/// </summary>
|
||||
public static class ProjectEPSummaryReportService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取生态环保工作总结报告
|
||||
/// </summary>
|
||||
/// <param name="ePSummaryReportId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.InformationProject_EPSummaryReport GetEPSummaryReportById(string ePSummaryReportId)
|
||||
{
|
||||
return Funs.DB.InformationProject_EPSummaryReport.FirstOrDefault(e => e.EPSummaryReportId == ePSummaryReportId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加生态环保工作总结报告
|
||||
/// </summary>
|
||||
/// <param name="ePSummaryReport"></param>
|
||||
public static void AddEPSummaryReport(Model.InformationProject_EPSummaryReport ePSummaryReport)
|
||||
{
|
||||
Model.InformationProject_EPSummaryReport newReport = new Model.InformationProject_EPSummaryReport
|
||||
{
|
||||
EPSummaryReportId = ePSummaryReport.EPSummaryReportId,
|
||||
ProjectId = ePSummaryReport.ProjectId,
|
||||
UnitId = ePSummaryReport.UnitId,
|
||||
YearId = ePSummaryReport.YearId,
|
||||
ResponsiblePerson = ePSummaryReport.ResponsiblePerson,
|
||||
ResponsiblePersonTel = ePSummaryReport.ResponsiblePersonTel,
|
||||
ContactPerson = ePSummaryReport.ContactPerson,
|
||||
ContactPersonTel = ePSummaryReport.ContactPersonTel,
|
||||
ReportDate = ePSummaryReport.ReportDate,
|
||||
Description1 = ePSummaryReport.Description1,
|
||||
Description2 = ePSummaryReport.Description2,
|
||||
Description3 = ePSummaryReport.Description3,
|
||||
Description4 = ePSummaryReport.Description4,
|
||||
Description5 = ePSummaryReport.Description5,
|
||||
Description6 = ePSummaryReport.Description6,
|
||||
Description7 = ePSummaryReport.Description7,
|
||||
Description8 = ePSummaryReport.Description8,
|
||||
Description9 = ePSummaryReport.Description9
|
||||
};
|
||||
Funs.DB.InformationProject_EPSummaryReport.InsertOnSubmit(newReport);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改生态环保工作总结报告
|
||||
/// </summary>
|
||||
/// <param name="ePSummaryReport"></param>
|
||||
public static void UpdateEPSummaryReport(Model.InformationProject_EPSummaryReport ePSummaryReport)
|
||||
{
|
||||
Model.InformationProject_EPSummaryReport newReport = Funs.DB.InformationProject_EPSummaryReport.FirstOrDefault(e => e.EPSummaryReportId == ePSummaryReport.EPSummaryReportId);
|
||||
if (newReport != null)
|
||||
{
|
||||
newReport.UnitId = ePSummaryReport.UnitId;
|
||||
newReport.YearId = ePSummaryReport.YearId;
|
||||
newReport.ResponsiblePerson = ePSummaryReport.ResponsiblePerson;
|
||||
newReport.ResponsiblePersonTel = ePSummaryReport.ResponsiblePersonTel;
|
||||
newReport.ContactPerson = ePSummaryReport.ContactPerson;
|
||||
newReport.ContactPersonTel = ePSummaryReport.ContactPersonTel;
|
||||
newReport.ReportDate = ePSummaryReport.ReportDate;
|
||||
newReport.Description1 = ePSummaryReport.Description1;
|
||||
newReport.Description2 = ePSummaryReport.Description2;
|
||||
newReport.Description3 = ePSummaryReport.Description3;
|
||||
newReport.Description4 = ePSummaryReport.Description4;
|
||||
newReport.Description5 = ePSummaryReport.Description5;
|
||||
newReport.Description6 = ePSummaryReport.Description6;
|
||||
newReport.Description7 = ePSummaryReport.Description7;
|
||||
newReport.Description8 = ePSummaryReport.Description8;
|
||||
newReport.Description9 = ePSummaryReport.Description9;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除生态环保工作总结报告
|
||||
/// </summary>
|
||||
/// <param name="ePSummaryReportId"></param>
|
||||
public static void DeleteEPSummaryReportById(string ePSummaryReportId)
|
||||
{
|
||||
Model.InformationProject_EPSummaryReport ePSummaryReport = Funs.DB.InformationProject_EPSummaryReport.FirstOrDefault(e => e.EPSummaryReportId == ePSummaryReportId);
|
||||
if (ePSummaryReport != null)
|
||||
{
|
||||
Funs.DB.InformationProject_EPSummaryReport.DeleteOnSubmit(ePSummaryReport);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,16 +1,19 @@
|
||||
using System.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 百万工时安全统计月报
|
||||
/// 企业安全数据统计月报
|
||||
/// </summary>
|
||||
public static class ProjectMillionsMonthlyReportService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取百万工时安全统计月报
|
||||
/// 根据主键获取企业安全数据统计月报
|
||||
/// </summary>
|
||||
/// <param name="millionsMonthlyReport"></param>
|
||||
/// <returns></returns>
|
||||
@@ -20,7 +23,7 @@ namespace BLL
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加百万工时安全统计月报
|
||||
/// 添加企业安全数据统计月报
|
||||
/// </summary>
|
||||
/// <param name="millionsMonthlyReport"></param>
|
||||
public static void AddMillionsMonthlyReport(Model.InformationProject_MillionsMonthlyReport millionsMonthlyReport)
|
||||
@@ -42,6 +45,9 @@ namespace BLL
|
||||
ContractorNum = millionsMonthlyReport.ContractorNum,
|
||||
SumPersonNum = millionsMonthlyReport.SumPersonNum,
|
||||
TotalWorkNum = millionsMonthlyReport.TotalWorkNum,
|
||||
DeathAccidentNum = millionsMonthlyReport.DeathAccidentNum,
|
||||
DeathAccidentPersonNum = millionsMonthlyReport.DeathAccidentPersonNum,
|
||||
DeathAccidentLossHour = millionsMonthlyReport.DeathAccidentLossHour,
|
||||
SeriousInjuriesNum = millionsMonthlyReport.SeriousInjuriesNum,
|
||||
SeriousInjuriesPersonNum = millionsMonthlyReport.SeriousInjuriesPersonNum,
|
||||
SeriousInjuriesLossHour = millionsMonthlyReport.SeriousInjuriesLossHour,
|
||||
@@ -57,20 +63,37 @@ namespace BLL
|
||||
MedicalTreatmentLossHour = millionsMonthlyReport.MedicalTreatmentLossHour,
|
||||
FireNum = millionsMonthlyReport.FireNum,
|
||||
ExplosionNum = millionsMonthlyReport.ExplosionNum,
|
||||
EnvironmenNum = millionsMonthlyReport.EnvironmenNum,
|
||||
TrafficNum = millionsMonthlyReport.TrafficNum,
|
||||
EquipmentNum = millionsMonthlyReport.EquipmentNum,
|
||||
QualityNum = millionsMonthlyReport.QualityNum,
|
||||
OtherNum = millionsMonthlyReport.OtherNum,
|
||||
FirstAidDressingsNum = millionsMonthlyReport.FirstAidDressingsNum,
|
||||
AttemptedEventNum = millionsMonthlyReport.AttemptedEventNum,
|
||||
LossDayNum = millionsMonthlyReport.LossDayNum
|
||||
LossDayNum = millionsMonthlyReport.LossDayNum,
|
||||
InputCosts = millionsMonthlyReport.InputCosts,
|
||||
TrainNum = millionsMonthlyReport.TrainNum,
|
||||
GeneralHazardNum = millionsMonthlyReport.GeneralHazardNum,
|
||||
MajorHazardNum = millionsMonthlyReport.MajorHazardNum,
|
||||
NotProofLargeProjectNum = millionsMonthlyReport.NotProofLargeProjectNum,
|
||||
ProofLargeProjectNum = millionsMonthlyReport.ProofLargeProjectNum,
|
||||
FireLicenseNum = millionsMonthlyReport.FireLicenseNum,
|
||||
LimitLicenseNum = millionsMonthlyReport.LimitLicenseNum,
|
||||
HighLicenseNum = millionsMonthlyReport.HighLicenseNum,
|
||||
HoistingLicenseNum = millionsMonthlyReport.HoistingLicenseNum,
|
||||
BreakGroundLicenseNum = millionsMonthlyReport.BreakGroundLicenseNum,
|
||||
ElectricityLicenseNum = millionsMonthlyReport.ElectricityLicenseNum,
|
||||
RTLicenseNum = millionsMonthlyReport.RTLicenseNum,
|
||||
NightLicenseNum = millionsMonthlyReport.NightLicenseNum,
|
||||
CommissionerNum = millionsMonthlyReport.CommissionerNum,
|
||||
SoleDutyNum = millionsMonthlyReport.SoleDutyNum,
|
||||
};
|
||||
db.InformationProject_MillionsMonthlyReport.InsertOnSubmit(newMillionsMonthlyReport);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改百万工时安全统计月报
|
||||
/// 修改企业安全数据统计月报
|
||||
/// </summary>
|
||||
/// <param name="millionsMonthlyReport"></param>
|
||||
public static void UpdateMillionsMonthlyReport(Model.InformationProject_MillionsMonthlyReport millionsMonthlyReport)
|
||||
@@ -92,6 +115,9 @@ namespace BLL
|
||||
newMillionsMonthlyReport.ContractorNum = millionsMonthlyReport.ContractorNum;
|
||||
newMillionsMonthlyReport.SumPersonNum = millionsMonthlyReport.SumPersonNum;
|
||||
newMillionsMonthlyReport.TotalWorkNum = millionsMonthlyReport.TotalWorkNum;
|
||||
newMillionsMonthlyReport.DeathAccidentNum = millionsMonthlyReport.DeathAccidentNum;
|
||||
newMillionsMonthlyReport.DeathAccidentPersonNum = millionsMonthlyReport.DeathAccidentPersonNum;
|
||||
newMillionsMonthlyReport.DeathAccidentLossHour = millionsMonthlyReport.DeathAccidentLossHour;
|
||||
newMillionsMonthlyReport.SeriousInjuriesNum = millionsMonthlyReport.SeriousInjuriesNum;
|
||||
newMillionsMonthlyReport.SeriousInjuriesPersonNum = millionsMonthlyReport.SeriousInjuriesPersonNum;
|
||||
newMillionsMonthlyReport.SeriousInjuriesLossHour = millionsMonthlyReport.SeriousInjuriesLossHour;
|
||||
@@ -107,6 +133,7 @@ namespace BLL
|
||||
newMillionsMonthlyReport.MedicalTreatmentLossHour = millionsMonthlyReport.MedicalTreatmentLossHour;
|
||||
newMillionsMonthlyReport.FireNum = millionsMonthlyReport.FireNum;
|
||||
newMillionsMonthlyReport.ExplosionNum = millionsMonthlyReport.ExplosionNum;
|
||||
newMillionsMonthlyReport.EnvironmenNum = millionsMonthlyReport.EnvironmenNum;
|
||||
newMillionsMonthlyReport.TrafficNum = millionsMonthlyReport.TrafficNum;
|
||||
newMillionsMonthlyReport.EquipmentNum = millionsMonthlyReport.EquipmentNum;
|
||||
newMillionsMonthlyReport.QualityNum = millionsMonthlyReport.QualityNum;
|
||||
@@ -114,12 +141,29 @@ namespace BLL
|
||||
newMillionsMonthlyReport.FirstAidDressingsNum = millionsMonthlyReport.FirstAidDressingsNum;
|
||||
newMillionsMonthlyReport.AttemptedEventNum = millionsMonthlyReport.AttemptedEventNum;
|
||||
newMillionsMonthlyReport.LossDayNum = millionsMonthlyReport.LossDayNum;
|
||||
newMillionsMonthlyReport.InputCosts = millionsMonthlyReport.InputCosts;
|
||||
newMillionsMonthlyReport.TrainNum = millionsMonthlyReport.TrainNum;
|
||||
newMillionsMonthlyReport.GeneralHazardNum = millionsMonthlyReport.GeneralHazardNum;
|
||||
newMillionsMonthlyReport.MajorHazardNum = millionsMonthlyReport.MajorHazardNum;
|
||||
newMillionsMonthlyReport.NotProofLargeProjectNum = millionsMonthlyReport.NotProofLargeProjectNum;
|
||||
newMillionsMonthlyReport.ProofLargeProjectNum = millionsMonthlyReport.ProofLargeProjectNum;
|
||||
newMillionsMonthlyReport.FireLicenseNum = millionsMonthlyReport.FireLicenseNum;
|
||||
newMillionsMonthlyReport.LimitLicenseNum = millionsMonthlyReport.LimitLicenseNum;
|
||||
newMillionsMonthlyReport.HighLicenseNum = millionsMonthlyReport.HighLicenseNum;
|
||||
newMillionsMonthlyReport.HoistingLicenseNum = millionsMonthlyReport.HoistingLicenseNum;
|
||||
newMillionsMonthlyReport.BreakGroundLicenseNum = millionsMonthlyReport.BreakGroundLicenseNum;
|
||||
newMillionsMonthlyReport.ElectricityLicenseNum = millionsMonthlyReport.ElectricityLicenseNum;
|
||||
newMillionsMonthlyReport.RTLicenseNum = millionsMonthlyReport.RTLicenseNum;
|
||||
newMillionsMonthlyReport.NightLicenseNum = millionsMonthlyReport.NightLicenseNum;
|
||||
newMillionsMonthlyReport.CommissionerNum = millionsMonthlyReport.CommissionerNum;
|
||||
newMillionsMonthlyReport.SoleDutyNum = millionsMonthlyReport.SoleDutyNum;
|
||||
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除百万工时安全统计月报
|
||||
/// 根据主键删除企业安全数据统计月报
|
||||
/// </summary>
|
||||
/// <param name="millionsMonthlyReportId"></param>
|
||||
public static void DeleteMillionsMonthlyReportById(string millionsMonthlyReportId)
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 安全管理工作总结报告
|
||||
/// </summary>
|
||||
public static class ProjectWorkSummaryReportService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取安全管理工作总结报告
|
||||
/// </summary>
|
||||
/// <param name="workSummaryReportId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.InformationProject_WorkSummaryReport GetWorkSummaryReportById(string workSummaryReportId)
|
||||
{
|
||||
return Funs.DB.InformationProject_WorkSummaryReport.FirstOrDefault(e => e.WorkSummaryReportId == workSummaryReportId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加安全管理工作总结报告
|
||||
/// </summary>
|
||||
/// <param name="workSummaryReport"></param>
|
||||
public static void AddWorkSummaryReport(Model.InformationProject_WorkSummaryReport workSummaryReport)
|
||||
{
|
||||
Model.InformationProject_WorkSummaryReport newWorkSummaryReport = new Model.InformationProject_WorkSummaryReport
|
||||
{
|
||||
WorkSummaryReportId = workSummaryReport.WorkSummaryReportId,
|
||||
ProjectId=workSummaryReport.ProjectId,
|
||||
YearId = workSummaryReport.YearId,
|
||||
UnitId = workSummaryReport.UnitId,
|
||||
ResponsiblePerson = workSummaryReport.ResponsiblePerson,
|
||||
ResponsiblePersonTel = workSummaryReport.ResponsiblePersonTel,
|
||||
ContactPerson = workSummaryReport.ContactPerson,
|
||||
ContactPersonTel = workSummaryReport.ContactPersonTel,
|
||||
ReportDate = workSummaryReport.ReportDate,
|
||||
SafeLaborTime = workSummaryReport.SafeLaborTime,
|
||||
SafetyObjectives = workSummaryReport.SafetyObjectives,
|
||||
AccidentSituation = workSummaryReport.AccidentSituation,
|
||||
Awards = workSummaryReport.Awards,
|
||||
WorkDevelopment = workSummaryReport.WorkDevelopment,
|
||||
PersonnelTraining = workSummaryReport.PersonnelTraining,
|
||||
GovernanceSituation = workSummaryReport.GovernanceSituation,
|
||||
ManagementActivity = workSummaryReport.ManagementActivity,
|
||||
WorkExperience = workSummaryReport.WorkExperience,
|
||||
Countermeasures = workSummaryReport.Countermeasures,
|
||||
NextYearWorkPlan = workSummaryReport.NextYearWorkPlan,
|
||||
JobSuggestion = workSummaryReport.JobSuggestion,
|
||||
CompileMan=workSummaryReport.CompileMan,
|
||||
CompileDate=workSummaryReport.CompileDate
|
||||
};
|
||||
Funs.DB.InformationProject_WorkSummaryReport.InsertOnSubmit(newWorkSummaryReport);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改安全管理工作总结报告
|
||||
/// </summary>
|
||||
/// <param name="workSummaryReport"></param>
|
||||
public static void UpdateWorkSummaryReport(Model.InformationProject_WorkSummaryReport workSummaryReport)
|
||||
{
|
||||
Model.InformationProject_WorkSummaryReport newWorkSummaryReport = Funs.DB.InformationProject_WorkSummaryReport.FirstOrDefault(e => e.WorkSummaryReportId == workSummaryReport.WorkSummaryReportId);
|
||||
if (newWorkSummaryReport != null)
|
||||
{
|
||||
newWorkSummaryReport.UnitId = workSummaryReport.UnitId;
|
||||
newWorkSummaryReport.YearId = workSummaryReport.YearId;
|
||||
newWorkSummaryReport.ResponsiblePerson = workSummaryReport.ResponsiblePerson;
|
||||
newWorkSummaryReport.ResponsiblePersonTel = workSummaryReport.ResponsiblePersonTel;
|
||||
newWorkSummaryReport.ContactPerson = workSummaryReport.ContactPerson;
|
||||
newWorkSummaryReport.ContactPersonTel = workSummaryReport.ContactPersonTel;
|
||||
newWorkSummaryReport.ReportDate = workSummaryReport.ReportDate;
|
||||
newWorkSummaryReport.SafeLaborTime = workSummaryReport.SafeLaborTime;
|
||||
newWorkSummaryReport.SafetyObjectives = workSummaryReport.SafetyObjectives;
|
||||
newWorkSummaryReport.AccidentSituation = workSummaryReport.AccidentSituation;
|
||||
newWorkSummaryReport.Awards = workSummaryReport.Awards;
|
||||
newWorkSummaryReport.WorkDevelopment = workSummaryReport.WorkDevelopment;
|
||||
newWorkSummaryReport.PersonnelTraining = workSummaryReport.PersonnelTraining;
|
||||
newWorkSummaryReport.GovernanceSituation = workSummaryReport.GovernanceSituation;
|
||||
newWorkSummaryReport.ManagementActivity = workSummaryReport.ManagementActivity;
|
||||
newWorkSummaryReport.WorkExperience = workSummaryReport.WorkExperience;
|
||||
newWorkSummaryReport.Countermeasures = workSummaryReport.Countermeasures;
|
||||
newWorkSummaryReport.NextYearWorkPlan = workSummaryReport.NextYearWorkPlan;
|
||||
newWorkSummaryReport.JobSuggestion = workSummaryReport.JobSuggestion;
|
||||
newWorkSummaryReport.CompileMan = workSummaryReport.CompileMan;
|
||||
newWorkSummaryReport.CompileDate = workSummaryReport.CompileDate;
|
||||
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除安全管理工作总结报告
|
||||
/// </summary>
|
||||
/// <param name="workSummaryReportId"></param>
|
||||
public static void DeleteWorkSummaryReportById(string workSummaryReportId)
|
||||
{
|
||||
Model.InformationProject_WorkSummaryReport workSummaryReport = Funs.DB.InformationProject_WorkSummaryReport.FirstOrDefault(e => e.WorkSummaryReportId == workSummaryReportId);
|
||||
if (workSummaryReport != null)
|
||||
{
|
||||
Funs.DB.InformationProject_WorkSummaryReport.DeleteOnSubmit(workSummaryReport);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 实业安全简报
|
||||
/// </summary>
|
||||
public static class InformationProject_SafetyBriefingService
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取实业安全简报
|
||||
/// </summary>
|
||||
/// <param name="safetyBriefingId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.InformationProject_SafetyBriefing GetSafetyBriefingById(string safetyBriefingId)
|
||||
{
|
||||
return Funs.DB.InformationProject_SafetyBriefing.FirstOrDefault(e => e.SafetyBriefingId == safetyBriefingId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加实业安全简报
|
||||
/// </summary>
|
||||
/// <param name="safetyBriefing"></param>
|
||||
public static void AddSafetyBriefing(Model.InformationProject_SafetyBriefing safetyBriefing)
|
||||
{
|
||||
Model.InformationProject_SafetyBriefing newSafetyBriefing = new Model.InformationProject_SafetyBriefing
|
||||
{
|
||||
SafetyBriefingId = safetyBriefing.SafetyBriefingId,
|
||||
ProjectId = safetyBriefing.ProjectId,
|
||||
UnitId = safetyBriefing.UnitId,
|
||||
YearId = safetyBriefing.YearId,
|
||||
Month = safetyBriefing.Month,
|
||||
CompileMan = safetyBriefing.CompileMan,
|
||||
CompileDate = safetyBriefing.CompileDate,
|
||||
Auditor = safetyBriefing.Auditor,
|
||||
Approver = safetyBriefing.Approver,
|
||||
MainWork = safetyBriefing.MainWork,
|
||||
HazardRecording = safetyBriefing.HazardRecording,
|
||||
SafetyAccident = safetyBriefing.SafetyAccident,
|
||||
EPAccident = safetyBriefing.EPAccident,
|
||||
OHAccident = safetyBriefing.OHAccident,
|
||||
WorkPermitNum = safetyBriefing.WorkPermitNum,
|
||||
HiddenDangerDetection = safetyBriefing.HiddenDangerDetection,
|
||||
RectificationSituation = safetyBriefing.RectificationSituation,
|
||||
CheckProblemsRectification = safetyBriefing.CheckProblemsRectification,
|
||||
PendingProject = safetyBriefing.PendingProject,
|
||||
ContractorManagement = safetyBriefing.ContractorManagement,
|
||||
EnvironmentalEmissions = safetyBriefing.EnvironmentalEmissions,
|
||||
NextMonthWorkPlan = safetyBriefing.NextMonthWorkPlan
|
||||
};
|
||||
Funs.DB.InformationProject_SafetyBriefing.InsertOnSubmit(newSafetyBriefing);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改实业安全简报
|
||||
/// </summary>
|
||||
/// <param name="safetyBriefing"></param>
|
||||
public static void UpdateSafetyBriefing(Model.InformationProject_SafetyBriefing safetyBriefing)
|
||||
{
|
||||
Model.InformationProject_SafetyBriefing newSafetyBriefing = Funs.DB.InformationProject_SafetyBriefing.FirstOrDefault(e => e.SafetyBriefingId == safetyBriefing.SafetyBriefingId);
|
||||
if (newSafetyBriefing != null)
|
||||
{
|
||||
newSafetyBriefing.UnitId = safetyBriefing.UnitId;
|
||||
newSafetyBriefing.YearId = safetyBriefing.YearId;
|
||||
newSafetyBriefing.Month = safetyBriefing.Month;
|
||||
newSafetyBriefing.CompileMan = safetyBriefing.CompileMan;
|
||||
newSafetyBriefing.CompileDate = safetyBriefing.CompileDate;
|
||||
newSafetyBriefing.Auditor = safetyBriefing.Auditor;
|
||||
newSafetyBriefing.Approver = safetyBriefing.Approver;
|
||||
newSafetyBriefing.MainWork = safetyBriefing.MainWork;
|
||||
newSafetyBriefing.HazardRecording = safetyBriefing.HazardRecording;
|
||||
newSafetyBriefing.SafetyAccident = safetyBriefing.SafetyAccident;
|
||||
newSafetyBriefing.EPAccident = safetyBriefing.EPAccident;
|
||||
newSafetyBriefing.OHAccident = safetyBriefing.OHAccident;
|
||||
newSafetyBriefing.WorkPermitNum = safetyBriefing.WorkPermitNum;
|
||||
newSafetyBriefing.HiddenDangerDetection = safetyBriefing.HiddenDangerDetection;
|
||||
newSafetyBriefing.RectificationSituation = safetyBriefing.RectificationSituation;
|
||||
newSafetyBriefing.CheckProblemsRectification = safetyBriefing.CheckProblemsRectification;
|
||||
newSafetyBriefing.PendingProject = safetyBriefing.PendingProject;
|
||||
newSafetyBriefing.ContractorManagement = safetyBriefing.ContractorManagement;
|
||||
newSafetyBriefing.EnvironmentalEmissions = safetyBriefing.EnvironmentalEmissions;
|
||||
newSafetyBriefing.NextMonthWorkPlan = safetyBriefing.NextMonthWorkPlan;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除实业安全简报
|
||||
/// </summary>
|
||||
/// <param name="safetyBriefingId"></param>
|
||||
public static void DeleteSafetyBriefingById(string safetyBriefingId)
|
||||
{
|
||||
Model.InformationProject_SafetyBriefing safetyBriefing = Funs.DB.InformationProject_SafetyBriefing.FirstOrDefault(e => e.SafetyBriefingId == safetyBriefingId);
|
||||
if (safetyBriefing != null)
|
||||
{
|
||||
Funs.DB.InformationProject_SafetyBriefing.DeleteOnSubmit(safetyBriefing);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,307 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public static class ArchitectureReportItemService
|
||||
{
|
||||
/// <summary>
|
||||
/// 建筑行业能源节约与生态环境保护汇总明细表
|
||||
/// </summary>
|
||||
/// <param name="ArchitectureReportItemId">建筑行业能源节约与生态环境保护汇总明细表Id</param>
|
||||
/// <returns>建筑行业能源节约与生态环境保护汇总明细表</returns>
|
||||
public static Model.Environmental_ArchitectureReportItem GetArchitectureReportItemByArchitectureReportItemId(string ArchitectureReportItemId)
|
||||
{
|
||||
return Funs.DB.Environmental_ArchitectureReportItem.FirstOrDefault(e => e.ArchitectureReportItemId == ArchitectureReportItemId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 建筑行业能源节约与生态环境保护汇总明细表
|
||||
/// </summary>
|
||||
/// <param name="ArchitectureReportItemId">建筑行业能源节约与生态环境保护汇总明细表Id</param>
|
||||
/// <returns>建筑行业能源节约与生态环境保护汇总明细表</returns>
|
||||
public static Model.Environmental_ArchitectureReportItem GetArchitectureReportItemByArchitectureReportIdAndTypeId(string ArchitectureReportId)
|
||||
{
|
||||
return Funs.DB.Environmental_ArchitectureReportItem.FirstOrDefault(e => e.ArchitectureReportId == ArchitectureReportId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主表Id判断是否存在明细记录
|
||||
/// </summary>
|
||||
/// <param name="ArchitectureReportItemId">企业安全数据统计月报表Id</param>
|
||||
/// <returns>是否存在明细记录</returns>
|
||||
public static bool IsExitItems(string ArchitectureReportId)
|
||||
{
|
||||
return (from x in Funs.DB.Environmental_ArchitectureReportItem where x.ArchitectureReportId == ArchitectureReportId select x).Count() > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主表Id获取明细记录集合
|
||||
/// </summary>
|
||||
/// <param name="ArchitectureReportItemId">建筑行业能源节约与生态环境保护汇总明细表Id</param>
|
||||
/// <returns>明细记录集合</returns>
|
||||
public static List<Model.Environmental_ArchitectureReportItem> GetItems(string ArchitectureReportId)
|
||||
{
|
||||
return (from x in Funs.DB.Environmental_ArchitectureReportItem
|
||||
where x.ArchitectureReportId == ArchitectureReportId
|
||||
orderby x.SortIndex
|
||||
select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主表Id获取明细记录集合
|
||||
/// </summary>
|
||||
/// <param name="ArchitectureReportItemId">建筑行业能源节约与生态环境保护汇总明细表Id</param>
|
||||
/// <returns>明细记录集合</returns>
|
||||
public static List<Model.Environmental_ArchitectureReportItem> GetYearSumItems(string unitId, int? year, int? Quarters)
|
||||
{
|
||||
return (from x in Funs.DB.Environmental_ArchitectureReportItem
|
||||
join y in Funs.DB.Environmental_ArchitectureReport
|
||||
on x.ArchitectureReportId equals y.ArchitectureReportId
|
||||
where y.UnitId == unitId && y.Year == year && y.Quarters == Quarters
|
||||
orderby x.SortIndex
|
||||
select x).Distinct().ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主表Id获取年度明细记录集合
|
||||
/// </summary>
|
||||
/// <param name="ArchitectureReportItemId">建筑行业能源节约与生态环境保护汇总明细表Id</param>
|
||||
/// <returns>年度明细记录集合</returns>
|
||||
public static List<Model.Environmental_ArchitectureReportItem> GetLastYearItems(int year)
|
||||
{
|
||||
return (from x in Funs.DB.Environmental_ArchitectureReportItem
|
||||
join y in Funs.DB.Environmental_ArchitectureReport
|
||||
on x.ArchitectureReportId equals y.ArchitectureReportId
|
||||
where y.Year == year
|
||||
select x).Distinct().ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主表Id获取明细记录集合(不包含本月合计行)
|
||||
/// </summary>
|
||||
/// <param name="ArchitectureReportItemId">建筑行业能源节约与生态环境保护汇总明细表Id</param>
|
||||
/// <returns>明细记录集合</returns>
|
||||
public static List<Model.ArchitectureReportItem> GetShowItems(string ArchitectureReportId)
|
||||
{
|
||||
var q = (from x in Funs.DB.Environmental_ArchitectureReportItem
|
||||
where x.ArchitectureReportId == ArchitectureReportId
|
||||
orderby x.SortIndex
|
||||
select x).ToList();
|
||||
List<Model.ArchitectureReportItem> newItems = new List<Model.ArchitectureReportItem>();
|
||||
var indexNames = GetIndexNames();
|
||||
var units = GetUnits();
|
||||
foreach (var item in q)
|
||||
{
|
||||
Model.ArchitectureReportItem newItem = new Model.ArchitectureReportItem();
|
||||
newItem.ArchitectureReportItemId = item.ArchitectureReportItemId;
|
||||
newItem.IndexName = indexNames.First(x => x.Value == item.SortIndex).Text;
|
||||
newItem.Unit = units.First(x => x.Value == item.SortIndex).Text;
|
||||
newItem.SortIndex = item.SortIndex;
|
||||
newItem.BaseNumber = item.BaseNumber;
|
||||
newItem.LastYearValue = item.LastYearValue;
|
||||
newItem.ThisYearValue = item.ThisYearValue;
|
||||
newItem.Rate = item.Rate;
|
||||
newItems.Add(newItem);
|
||||
}
|
||||
return newItems;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加建筑行业能源节约与生态环境保护汇总明细表
|
||||
/// </summary>
|
||||
/// <param name="ArchitectureReportItem">建筑行业能源节约与生态环境保护汇总明细表实体</param>
|
||||
public static void AddArchitectureReportItem(Model.Environmental_ArchitectureReportItem ArchitectureReportItem)
|
||||
{
|
||||
Model.Environmental_ArchitectureReportItem newArchitectureReportItem = new Model.Environmental_ArchitectureReportItem
|
||||
{
|
||||
ArchitectureReportItemId = ArchitectureReportItem.ArchitectureReportItemId,
|
||||
ArchitectureReportId = ArchitectureReportItem.ArchitectureReportId,
|
||||
BaseNumber = ArchitectureReportItem.BaseNumber,
|
||||
SortIndex = ArchitectureReportItem.SortIndex,
|
||||
LastYearValue = ArchitectureReportItem.LastYearValue,
|
||||
ThisYearValue = ArchitectureReportItem.ThisYearValue,
|
||||
Rate = ArchitectureReportItem.Rate,
|
||||
};
|
||||
|
||||
Funs.DB.Environmental_ArchitectureReportItem.InsertOnSubmit(newArchitectureReportItem);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改建筑行业能源节约与生态环境保护汇总明细表
|
||||
/// </summary>
|
||||
/// <param name="ArchitectureReportItem">建筑行业能源节约与生态环境保护汇总明细表实体</param>
|
||||
public static void UpdateArchitectureReportItem(Model.Environmental_ArchitectureReportItem ArchitectureReportItem)
|
||||
{
|
||||
Model.Environmental_ArchitectureReportItem newArchitectureReportItem = Funs.DB.Environmental_ArchitectureReportItem.FirstOrDefault(e => e.ArchitectureReportItemId == ArchitectureReportItem.ArchitectureReportItemId);
|
||||
newArchitectureReportItem.SortIndex = ArchitectureReportItem.SortIndex;
|
||||
newArchitectureReportItem.BaseNumber = ArchitectureReportItem.BaseNumber;
|
||||
newArchitectureReportItem.LastYearValue = ArchitectureReportItem.LastYearValue;
|
||||
newArchitectureReportItem.ThisYearValue = ArchitectureReportItem.ThisYearValue;
|
||||
newArchitectureReportItem.Rate = ArchitectureReportItem.Rate;
|
||||
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据Id删除所有数据
|
||||
/// </summary>
|
||||
/// <param name="ArchitectureReportItemId"></param>
|
||||
public static void DeleteArchitectureReportItemByArchitectureReportId(string ArchitectureReportId)
|
||||
{
|
||||
var q = from x in Funs.DB.Environmental_ArchitectureReportItem where x.ArchitectureReportId == ArchitectureReportId select x;
|
||||
if (q != null)
|
||||
{
|
||||
Funs.DB.Environmental_ArchitectureReportItem.DeleteAllOnSubmit(q);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取指标名称集合
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static ListItem[] GetIndexNames()
|
||||
{
|
||||
ListItem[] list = new ListItem[61];
|
||||
list[0] = new ListItem("1.能源消费量", "01");
|
||||
list[1] = new ListItem("A其中:原煤(标准量)", "02");
|
||||
list[2] = new ListItem("B原煤(实物量)", "03");
|
||||
list[3] = new ListItem("C其中:发电用煤", "04");
|
||||
list[4] = new ListItem("B焦炭", "05");
|
||||
list[5] = new ListItem("B电力", "06");
|
||||
list[6] = new ListItem("B原油", "07");
|
||||
list[7] = new ListItem("B汽油", "08");
|
||||
list[8] = new ListItem("B煤油", "09");
|
||||
list[9] = new ListItem("B柴油", "10");
|
||||
list[10] = new ListItem("B燃料油", "11");
|
||||
list[11] = new ListItem("B天然气", "12");
|
||||
list[12] = new ListItem("B热力", "13");
|
||||
list[13] = new ListItem("B其他能源", "14");
|
||||
list[14] = new ListItem("2.万元营业收入综合能耗(现价)", "15");
|
||||
list[15] = new ListItem("A其中:营业收入(现价)", "16");
|
||||
list[16] = new ListItem("E万元营业收入综合能耗(可比价)", "17");
|
||||
list[17] = new ListItem("A其中:营业收入(可比价)", "18");
|
||||
list[18] = new ListItem("3.万元增加值综合能耗(现价)", "19");
|
||||
list[19] = new ListItem("A其中:增加值(现价)", "20");
|
||||
list[20] = new ListItem("E万元增加值综合能耗(可比价)", "21");
|
||||
list[21] = new ListItem("A其中:增加值(可比价)", "22");
|
||||
list[22] = new ListItem("4.万元营业收入用新水量(可比价)", "23");
|
||||
list[23] = new ListItem("A其中:用新水量", "24");
|
||||
list[24] = new ListItem("5.节能量", "25");
|
||||
list[25] = new ListItem("6.二氧化硫排放量", "26");
|
||||
list[26] = new ListItem("7.氮氧化物排放量", "27");
|
||||
list[27] = new ListItem("8.化学需氧量排放量", "28");
|
||||
list[28] = new ListItem("A其中:排入外环境", "29");
|
||||
list[29] = new ListItem("B排入市政管网或生活污水处理厂", "30");
|
||||
list[30] = new ListItem("9.氨氮排放量", "31");
|
||||
list[31] = new ListItem("A其中:排入外环境", "32");
|
||||
list[32] = new ListItem("B排入市政管网或生活污水处理厂", "33");
|
||||
list[33] = new ListItem("10.烟(粉)尘排放量", "34");
|
||||
list[34] = new ListItem("11.挥发性有机物排放量", "35");
|
||||
list[35] = new ListItem("12.废水排放量", "36");
|
||||
list[36] = new ListItem("13.万元收入二氧化碳排放(可比价)", "37");
|
||||
list[37] = new ListItem("A其中:二氧化碳排放量", "38");
|
||||
list[38] = new ListItem("14.一般固体废物综合利用率", "39");
|
||||
list[39] = new ListItem("A其中:一般固体废物综合利用量", "40");
|
||||
list[40] = new ListItem("B其中:综合利用往年贮存量", "41");
|
||||
list[41] = new ListItem("F一般固体废物产生量", "42");
|
||||
list[42] = new ListItem("15.危险废物处置率", "43");
|
||||
list[43] = new ListItem("A其中:危险废物处置量", "44");
|
||||
list[44] = new ListItem("B其中:处置往年贮存量", "45");
|
||||
list[45] = new ListItem("F危险废物产生量", "46");
|
||||
list[46] = new ListItem("16.土壤污染治理率", "47");
|
||||
list[47] = new ListItem("A其中:土壤污染治理面积", "48");
|
||||
list[48] = new ListItem("B土壤污染需要治理面积", "49");
|
||||
list[49] = new ListItem("17.矿山(或生态)修复治理率", "50");
|
||||
list[50] = new ListItem("A其中:矿山(或生态)修复治理面积", "51");
|
||||
list[51] = new ListItem("B矿山(或生态)需要修复治理面积", "52");
|
||||
list[52] = new ListItem("18.废气治理设施数", "53");
|
||||
list[53] = new ListItem("19.废气治理设施处理能力", "54");
|
||||
list[54] = new ListItem("20.废水治理设施数", "55");
|
||||
list[55] = new ListItem("21.废水治理设施处理能力", "56");
|
||||
list[56] = new ListItem("22.生态环境污染源", "57");
|
||||
list[57] = new ListItem("23.生态环境风险点", "58");
|
||||
list[58] = new ListItem("24.节能环保投入占收入比重", "59");
|
||||
list[59] = new ListItem("A其中:节能投入", "60");
|
||||
list[60] = new ListItem("B环保投入", "61");
|
||||
return list;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取计量单位集合
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static ListItem[] GetUnits()
|
||||
{
|
||||
ListItem[] list = new ListItem[61];
|
||||
list[0] = new ListItem("万吨标准煤", "01");
|
||||
list[1] = new ListItem("万吨标准煤", "02");
|
||||
list[2] = new ListItem("万吨", "03");
|
||||
list[3] = new ListItem("万吨", "04");
|
||||
list[4] = new ListItem("吨", "05");
|
||||
list[5] = new ListItem("万千瓦时", "06");
|
||||
list[6] = new ListItem("吨", "07");
|
||||
list[7] = new ListItem("吨", "08");
|
||||
list[8] = new ListItem("吨", "09");
|
||||
list[9] = new ListItem("吨", "10");
|
||||
list[10] = new ListItem("吨", "11");
|
||||
list[11] = new ListItem("万立方米", "12");
|
||||
list[12] = new ListItem("百万千焦", "13");
|
||||
list[13] = new ListItem("吨标准煤", "14");
|
||||
list[14] = new ListItem("吨标准煤/万元", "15");
|
||||
list[15] = new ListItem("万元", "16");
|
||||
list[16] = new ListItem("吨标准煤/万元", "17");
|
||||
list[17] = new ListItem("万元", "18");
|
||||
list[18] = new ListItem("吨标准煤/万元", "19");
|
||||
list[19] = new ListItem("万元", "20");
|
||||
list[20] = new ListItem("吨标准煤/万元", "21");
|
||||
list[21] = new ListItem("万元", "22");
|
||||
list[22] = new ListItem("吨/万元", "23");
|
||||
list[23] = new ListItem("万吨", "24");
|
||||
list[24] = new ListItem("吨标准煤", "25");
|
||||
list[25] = new ListItem("吨", "26");
|
||||
list[26] = new ListItem("吨", "27");
|
||||
list[27] = new ListItem("吨", "28");
|
||||
list[28] = new ListItem("吨", "29");
|
||||
list[29] = new ListItem("吨", "30");
|
||||
list[30] = new ListItem("吨", "31");
|
||||
list[31] = new ListItem("吨", "32");
|
||||
list[32] = new ListItem("吨", "33");
|
||||
list[33] = new ListItem("吨", "34");
|
||||
list[34] = new ListItem("吨", "35");
|
||||
list[35] = new ListItem("万吨", "36");
|
||||
list[36] = new ListItem("吨二氧化碳当量/万元", "37");
|
||||
list[37] = new ListItem("万吨二氧化碳当量", "38");
|
||||
list[38] = new ListItem("%", "39");
|
||||
list[39] = new ListItem("万吨", "40");
|
||||
list[40] = new ListItem("万吨", "41");
|
||||
list[41] = new ListItem("万吨", "42");
|
||||
list[42] = new ListItem("%", "43");
|
||||
list[43] = new ListItem("万吨", "44");
|
||||
list[44] = new ListItem("万吨", "45");
|
||||
list[45] = new ListItem("万吨", "46");
|
||||
list[46] = new ListItem("%", "47");
|
||||
list[47] = new ListItem("公顷", "48");
|
||||
list[48] = new ListItem("公顷", "49");
|
||||
list[49] = new ListItem("%", "50");
|
||||
list[50] = new ListItem("公顷", "51");
|
||||
list[51] = new ListItem("公顷", "52");
|
||||
list[52] = new ListItem("套", "53");
|
||||
list[53] = new ListItem("万立方米/年", "54");
|
||||
list[54] = new ListItem("套", "55");
|
||||
list[55] = new ListItem("万吨/年", "56");
|
||||
list[56] = new ListItem("个", "57");
|
||||
list[57] = new ListItem("个", "58");
|
||||
list[58] = new ListItem("%", "59");
|
||||
list[59] = new ListItem("万元", "60");
|
||||
list[60] = new ListItem("万元", "61");
|
||||
return list;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public static class ArchitectureReportService
|
||||
{
|
||||
/// <summary>
|
||||
/// 建筑行业能源节约与生态环境保护汇总表
|
||||
/// </summary>
|
||||
/// <param name="ArchitectureReportId">建筑行业能源节约与生态环境保护汇总表Id</param>
|
||||
/// <returns>建筑行业能源节约与生态环境保护汇总表</returns>
|
||||
public static Model.Environmental_ArchitectureReport GetArchitectureReportByArchitectureReportId(string ArchitectureReportId)
|
||||
{
|
||||
return Funs.DB.Environmental_ArchitectureReport.FirstOrDefault(e => e.ArchitectureReportId == ArchitectureReportId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 建筑行业能源节约与生态环境保护汇总表
|
||||
/// </summary>
|
||||
/// <param name="unitId">单位Id</param>
|
||||
/// <param name = "year" > 年度 </ param >
|
||||
/// <param name="month">月份</param>
|
||||
/// <returns>建筑行业能源节约与生态环境保护汇总表</returns>
|
||||
public static Model.Environmental_ArchitectureReport GetArchitectureReportByUnitIdAndYearAndQuarters(string unitId, int year, int Quarters)
|
||||
{
|
||||
return Funs.DB.Environmental_ArchitectureReport.FirstOrDefault(e => e.UnitId == unitId && e.Quarters == Quarters && e.Year == year);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据单位Id获取建筑行业能源节约与生态环境保护汇总表集合
|
||||
/// </summary>
|
||||
/// <param name="UnitId">单位Id</param>
|
||||
/// <returns>建筑行业能源节约与生态环境保护汇总表集合</returns>
|
||||
public static List<Model.View_Environmental_ArchitectureReport> GetArchitectureReportsByUnitId(string UnitId)
|
||||
{
|
||||
return (from x in Funs.DB.View_Environmental_ArchitectureReport where x.UnitId == UnitId orderby x.FillingDate descending select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加建筑行业能源节约与生态环境保护汇总表
|
||||
/// </summary>
|
||||
/// <param name="ArchitectureReport">建筑行业能源节约与生态环境保护汇总表实体</param>
|
||||
public static void AddArchitectureReport(Model.Environmental_ArchitectureReport ArchitectureReport)
|
||||
{
|
||||
Model.Environmental_ArchitectureReport newArchitectureReport = new Model.Environmental_ArchitectureReport
|
||||
{
|
||||
ArchitectureReportId = ArchitectureReport.ArchitectureReportId,
|
||||
Year = ArchitectureReport.Year,
|
||||
Quarters = ArchitectureReport.Quarters,
|
||||
UnitId = ArchitectureReport.UnitId,
|
||||
FillingDate = ArchitectureReport.FillingDate,
|
||||
DutyPerson = ArchitectureReport.DutyPerson,
|
||||
FillingMan = ArchitectureReport.FillingMan,
|
||||
UpState = ArchitectureReport.UpState,
|
||||
};
|
||||
|
||||
Funs.DB.Environmental_ArchitectureReport.InsertOnSubmit(newArchitectureReport);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改建筑行业能源节约与生态环境保护汇总表
|
||||
/// </summary>
|
||||
/// <param name="ArchitectureReport">建筑行业能源节约与生态环境保护汇总表实体</param>
|
||||
public static void UpdateArchitectureReport(Model.Environmental_ArchitectureReport ArchitectureReport)
|
||||
{
|
||||
Model.Environmental_ArchitectureReport newArchitectureReport = Funs.DB.Environmental_ArchitectureReport.FirstOrDefault(e => e.ArchitectureReportId == ArchitectureReport.ArchitectureReportId);
|
||||
if (newArchitectureReport != null)
|
||||
{
|
||||
newArchitectureReport.Year = ArchitectureReport.Year;
|
||||
newArchitectureReport.Quarters = ArchitectureReport.Quarters;
|
||||
newArchitectureReport.UnitId = ArchitectureReport.UnitId;
|
||||
newArchitectureReport.FillingDate = ArchitectureReport.FillingDate;
|
||||
newArchitectureReport.DutyPerson = ArchitectureReport.DutyPerson;
|
||||
newArchitectureReport.UpState = ArchitectureReport.UpState;
|
||||
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据Id获取数据
|
||||
/// </summary>
|
||||
/// <param name="ArchitectureReportId"></param>
|
||||
public static void DeleteArchitectureReportByArchitectureReportId(string ArchitectureReportId)
|
||||
{
|
||||
Model.Environmental_ArchitectureReport newArchitectureReport = Funs.DB.Environmental_ArchitectureReport.FirstOrDefault(e => e.ArchitectureReportId == ArchitectureReportId);
|
||||
if (newArchitectureReport != null)
|
||||
{
|
||||
Funs.DB.Environmental_ArchitectureReport.DeleteOnSubmit(newArchitectureReport);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据报表单位,报表时间判断是否存在
|
||||
/// </summary>
|
||||
/// <param name="Id">Id</param>
|
||||
/// <returns></returns>
|
||||
public static Model.Environmental_ArchitectureReport GetArchitectureReportByUnitIdDate(string unitId, int year, int Quarters)
|
||||
{
|
||||
return Funs.DB.Environmental_ArchitectureReport.FirstOrDefault(e => e.UnitId == unitId && e.Year == year && e.Quarters == Quarters);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据报表单位,报表年份获取对应集合
|
||||
/// </summary>
|
||||
/// <param name="Id">Id</param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Environmental_ArchitectureReport> GetArchitectureReportByUnitIdYear(string unitId, int year)
|
||||
{
|
||||
return (from x in Funs.DB.Environmental_ArchitectureReport where x.UnitId == unitId && x.Year == year select x).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,383 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public static class ChemicalReportItemService
|
||||
{
|
||||
/// <summary>
|
||||
/// 化工行业能源节约与生态环境保护汇总明细表
|
||||
/// </summary>
|
||||
/// <param name="ChemicalReportItemId">化工行业能源节约与生态环境保护汇总明细表Id</param>
|
||||
/// <returns>化工行业能源节约与生态环境保护汇总明细表</returns>
|
||||
public static Model.Environmental_ChemicalReportItem GetChemicalReportItemByChemicalReportItemId(string ChemicalReportItemId)
|
||||
{
|
||||
return Funs.DB.Environmental_ChemicalReportItem.FirstOrDefault(e => e.ChemicalReportItemId == ChemicalReportItemId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 化工行业能源节约与生态环境保护汇总明细表
|
||||
/// </summary>
|
||||
/// <param name="ChemicalReportItemId">化工行业能源节约与生态环境保护汇总明细表Id</param>
|
||||
/// <returns>化工行业能源节约与生态环境保护汇总明细表</returns>
|
||||
public static Model.Environmental_ChemicalReportItem GetChemicalReportItemByChemicalReportIdAndTypeId(string ChemicalReportId)
|
||||
{
|
||||
return Funs.DB.Environmental_ChemicalReportItem.FirstOrDefault(e => e.ChemicalReportId == ChemicalReportId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主表Id判断是否存在明细记录
|
||||
/// </summary>
|
||||
/// <param name="ChemicalReportItemId">企业安全数据统计月报表Id</param>
|
||||
/// <returns>是否存在明细记录</returns>
|
||||
public static bool IsExitItems(string ChemicalReportId)
|
||||
{
|
||||
return (from x in Funs.DB.Environmental_ChemicalReportItem where x.ChemicalReportId == ChemicalReportId select x).Count() > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主表Id获取明细记录集合
|
||||
/// </summary>
|
||||
/// <param name="ChemicalReportItemId">化工行业能源节约与生态环境保护汇总明细表Id</param>
|
||||
/// <returns>明细记录集合</returns>
|
||||
public static List<Model.Environmental_ChemicalReportItem> GetItems(string ChemicalReportId)
|
||||
{
|
||||
return (from x in Funs.DB.Environmental_ChemicalReportItem
|
||||
where x.ChemicalReportId == ChemicalReportId
|
||||
orderby x.SortIndex
|
||||
select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主表Id获取明细记录集合
|
||||
/// </summary>
|
||||
/// <param name="ChemicalReportItemId">化工行业能源节约与生态环境保护汇总明细表Id</param>
|
||||
/// <returns>明细记录集合</returns>
|
||||
public static List<Model.Environmental_ChemicalReportItem> GetYearSumItems(string unitId, int? year, int? month)
|
||||
{
|
||||
return (from x in Funs.DB.Environmental_ChemicalReportItem
|
||||
join y in Funs.DB.Environmental_ChemicalReport
|
||||
on x.ChemicalReportId equals y.ChemicalReportId
|
||||
where y.UnitId == unitId && y.Year == year && y.Month == month
|
||||
orderby x.SortIndex
|
||||
select x).Distinct().ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主表Id获取年度明细记录集合
|
||||
/// </summary>
|
||||
/// <param name="ChemicalReportItemId">化工行业能源节约与生态环境保护汇总明细表Id</param>
|
||||
/// <returns>年度明细记录集合</returns>
|
||||
public static List<Model.Environmental_ChemicalReportItem> GetLastYearItems(int year)
|
||||
{
|
||||
return (from x in Funs.DB.Environmental_ChemicalReportItem
|
||||
join y in Funs.DB.Environmental_ChemicalReport
|
||||
on x.ChemicalReportId equals y.ChemicalReportId
|
||||
where y.Year == year
|
||||
select x).Distinct().ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主表Id获取明细记录集合(不包含本月合计行)
|
||||
/// </summary>
|
||||
/// <param name="ChemicalReportItemId">化工行业能源节约与生态环境保护汇总明细表Id</param>
|
||||
/// <returns>明细记录集合</returns>
|
||||
public static List<Model.ChemicalReportItem> GetShowItems(string ChemicalReportId)
|
||||
{
|
||||
var q = (from x in Funs.DB.Environmental_ChemicalReportItem
|
||||
where x.ChemicalReportId == ChemicalReportId
|
||||
orderby x.SortIndex
|
||||
select x).ToList();
|
||||
List<Model.ChemicalReportItem> newItems = new List<Model.ChemicalReportItem>();
|
||||
var indexNames = GetIndexNames();
|
||||
var units = GetUnits();
|
||||
foreach (var item in q)
|
||||
{
|
||||
Model.ChemicalReportItem newItem = new Model.ChemicalReportItem();
|
||||
newItem.ChemicalReportItemId = item.ChemicalReportItemId;
|
||||
newItem.IndexName = indexNames.First(x => x.Value == item.SortIndex).Text;
|
||||
newItem.Unit = units.First(x => x.Value == item.SortIndex).Text;
|
||||
newItem.SortIndex = item.SortIndex;
|
||||
newItem.BaseNumber = item.BaseNumber;
|
||||
newItem.LastYearValue = item.LastYearValue;
|
||||
newItem.ThisYearValue = item.ThisYearValue;
|
||||
newItem.Rate = item.Rate;
|
||||
newItems.Add(newItem);
|
||||
}
|
||||
return newItems;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加化工行业能源节约与生态环境保护汇总明细表
|
||||
/// </summary>
|
||||
/// <param name="ChemicalReportItem">化工行业能源节约与生态环境保护汇总明细表实体</param>
|
||||
public static void AddChemicalReportItem(Model.Environmental_ChemicalReportItem ChemicalReportItem)
|
||||
{
|
||||
Model.Environmental_ChemicalReportItem newChemicalReportItem = new Model.Environmental_ChemicalReportItem
|
||||
{
|
||||
ChemicalReportItemId = ChemicalReportItem.ChemicalReportItemId,
|
||||
ChemicalReportId = ChemicalReportItem.ChemicalReportId,
|
||||
SortIndex = ChemicalReportItem.SortIndex,
|
||||
BaseNumber = ChemicalReportItem.BaseNumber,
|
||||
LastYearValue = ChemicalReportItem.LastYearValue,
|
||||
ThisYearValue = ChemicalReportItem.ThisYearValue,
|
||||
Rate = ChemicalReportItem.Rate,
|
||||
};
|
||||
|
||||
Funs.DB.Environmental_ChemicalReportItem.InsertOnSubmit(newChemicalReportItem);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改化工行业能源节约与生态环境保护汇总明细表
|
||||
/// </summary>
|
||||
/// <param name="ChemicalReportItem">化工行业能源节约与生态环境保护汇总明细表实体</param>
|
||||
public static void UpdateChemicalReportItem(Model.Environmental_ChemicalReportItem ChemicalReportItem)
|
||||
{
|
||||
Model.Environmental_ChemicalReportItem newChemicalReportItem = Funs.DB.Environmental_ChemicalReportItem.FirstOrDefault(e => e.ChemicalReportItemId == ChemicalReportItem.ChemicalReportItemId);
|
||||
newChemicalReportItem.SortIndex = ChemicalReportItem.SortIndex;
|
||||
newChemicalReportItem.BaseNumber = ChemicalReportItem.BaseNumber;
|
||||
newChemicalReportItem.LastYearValue = ChemicalReportItem.LastYearValue;
|
||||
newChemicalReportItem.ThisYearValue = ChemicalReportItem.ThisYearValue;
|
||||
newChemicalReportItem.Rate = ChemicalReportItem.Rate;
|
||||
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据Id删除所有数据
|
||||
/// </summary>
|
||||
/// <param name="ChemicalReportItemId"></param>
|
||||
public static void DeleteChemicalReportItemByChemicalReportId(string ChemicalReportId)
|
||||
{
|
||||
var q = from x in Funs.DB.Environmental_ChemicalReportItem where x.ChemicalReportId == ChemicalReportId select x;
|
||||
if (q != null)
|
||||
{
|
||||
Funs.DB.Environmental_ChemicalReportItem.DeleteAllOnSubmit(q);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取指标名称集合
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static ListItem[] GetIndexNames()
|
||||
{
|
||||
ListItem[] list = new ListItem[99];
|
||||
list[0] = new ListItem("1.能源消费量", "01");
|
||||
list[1] = new ListItem("A含:综合能源消费量", "02");
|
||||
list[2] = new ListItem("A其中:原煤(标准量)", "03");
|
||||
list[3] = new ListItem("B原煤(实物量)", "04");
|
||||
list[4] = new ListItem("C其中:发电用煤", "05");
|
||||
list[5] = new ListItem("B焦炭", "06");
|
||||
list[6] = new ListItem("B电力", "07");
|
||||
list[7] = new ListItem("B原油", "08");
|
||||
list[8] = new ListItem("B汽油", "09");
|
||||
list[9] = new ListItem("B煤油", "10");
|
||||
list[10] = new ListItem("B柴油", "11");
|
||||
list[11] = new ListItem("B燃料油", "12");
|
||||
list[12] = new ListItem("B天然气", "13");
|
||||
list[13] = new ListItem("B热力", "14");
|
||||
list[14] = new ListItem("B其他能源", "15");
|
||||
list[15] = new ListItem("2.万元产值综合能耗(现价)", "16");
|
||||
list[16] = new ListItem("A其中:工业总产值(现价)", "17");
|
||||
list[17] = new ListItem("E万元产值综合能耗(可比价)", "18");
|
||||
list[18] = new ListItem("A其中:工业总产值(可比价)", "19");
|
||||
list[19] = new ListItem("3.万元增加值综合能耗(现价)", "20");
|
||||
list[20] = new ListItem("A其中:增加值(现价)", "21");
|
||||
list[21] = new ListItem("E万元增加值综合能耗(可比价)", "22");
|
||||
list[22] = new ListItem("A其中:增加值(可比价)", "23");
|
||||
list[23] = new ListItem("4.万元产值用新水量(可比价)", "24");
|
||||
list[24] = new ListItem("A其中:用新水量", "25");
|
||||
list[25] = new ListItem("E重复用水率", "26");
|
||||
list[26] = new ListItem("A其中:重复用水量", "27");
|
||||
list[27] = new ListItem("5.单位乙烯能耗", "28");
|
||||
list[28] = new ListItem("A其中:乙烯装置能耗", "29");
|
||||
list[29] = new ListItem("B乙烯装置合格乙烯产品产量", "30");
|
||||
list[30] = new ListItem("6.合成氨单位产品综合能耗", "31");
|
||||
list[31] = new ListItem("A其中:合成氨综合能耗", "32");
|
||||
list[32] = new ListItem("B合成氨产量", "33");
|
||||
list[33] = new ListItem("7.节能量", "34");
|
||||
list[34] = new ListItem("8.电煤占煤炭消费比重", "35");
|
||||
list[35] = new ListItem("9.余热余能回收利用率", "36");
|
||||
list[36] = new ListItem("A其中:回收利用的余热余能", "37");
|
||||
list[37] = new ListItem("10.自备电厂发电装机容量", "38");
|
||||
list[38] = new ListItem("A其中:燃煤发电", "39");
|
||||
list[39] = new ListItem("C其中:燃煤热电", "40");
|
||||
list[40] = new ListItem("B清洁能源发电", "41");
|
||||
list[41] = new ListItem("C其中:天然气发电", "42");
|
||||
list[42] = new ListItem("D核能发电", "43");
|
||||
list[43] = new ListItem("D水力发电", "44");
|
||||
list[44] = new ListItem("D风力发电", "45");
|
||||
list[45] = new ListItem("D太阳能发电", "46");
|
||||
list[46] = new ListItem("D其他清洁能源发电", "47");
|
||||
list[47] = new ListItem("B生物质发电", "48");
|
||||
list[48] = new ListItem("B其他发电", "49");
|
||||
list[49] = new ListItem("11.燃煤热电机组装机容量占燃煤发电装机容量比重", "50");
|
||||
list[50] = new ListItem("12.自备电厂发电量", "51");
|
||||
list[51] = new ListItem("13.排污许可证许可的二氧化硫排放量", "52");
|
||||
list[52] = new ListItem("14.排污许可证许可的氮氧化物排放量", "53");
|
||||
list[53] = new ListItem("15.排污许可证许可的化学需氧量排放量", "54");
|
||||
list[54] = new ListItem("16.排污许可证许可的氨氮排放量", "55");
|
||||
list[55] = new ListItem("17.排污许可证许可的烟(粉)尘排放量", "56");
|
||||
list[56] = new ListItem("18.排污许可证许可的挥发性有机物排放量", "57");
|
||||
list[57] = new ListItem("19.二氧化硫排放量", "58");
|
||||
list[58] = new ListItem("20.氮氧化物排放量", "59");
|
||||
list[59] = new ListItem("21.化学需氧量排放量", "60");
|
||||
list[60] = new ListItem("A其中:排入外环境", "61");
|
||||
list[61] = new ListItem("B排入市政管网或生活污水处理厂", "62");
|
||||
list[62] = new ListItem("22.氨氮排放量", "63");
|
||||
list[63] = new ListItem("A其中:排入外环境", "64");
|
||||
list[64] = new ListItem("B排入市政管网或生活污水处理厂", "65");
|
||||
list[65] = new ListItem("23.烟(粉)尘排放量", "66");
|
||||
list[66] = new ListItem("24.挥发性有机物排放量", "67");
|
||||
list[67] = new ListItem("25.废水排放量", "68");
|
||||
list[68] = new ListItem("26.万元产值二氧化碳排放(可比价)", "69");
|
||||
list[69] = new ListItem("A其中:二氧化碳排放量", "70");
|
||||
list[70] = new ListItem("27.一般固体废物综合利用率", "71");
|
||||
list[71] = new ListItem("A其中:一般固体废物综合利用量", "72");
|
||||
list[72] = new ListItem("C其中:综合利用往年贮存量", "73");
|
||||
list[73] = new ListItem("F一般固体废物产生量", "74");
|
||||
list[74] = new ListItem("28.危险废物处置率", "75");
|
||||
list[75] = new ListItem("A其中:危险废物处置量", "76");
|
||||
list[76] = new ListItem("C其中:处置往年贮存量", "77");
|
||||
list[77] = new ListItem("F危险废物产生量", "78");
|
||||
list[78] = new ListItem("29.土壤污染治理率", "79");
|
||||
list[79] = new ListItem("A其中:土壤污染治理面积", "80");
|
||||
list[80] = new ListItem("B土壤污染需要治理面积", "81");
|
||||
list[81] = new ListItem("30.矿山(或生态)修复治理率", "82");
|
||||
list[82] = new ListItem("A其中:矿山(或生态)修复治理面积", "83");
|
||||
list[83] = new ListItem("B矿山(或生态)需要修复治理面积", "84");
|
||||
list[84] = new ListItem("31.烟气脱硫机组装机容量占燃煤发电机组的比例", "85");
|
||||
list[85] = new ListItem("A其中:配备烟气脱硫装置的机组装机容量", "86");
|
||||
list[86] = new ListItem("32.烟气脱硝机组装机容量占燃煤发电机组的比例", "87");
|
||||
list[87] = new ListItem("A其中:配备烟气脱硝装置的机组装机容量", "88");
|
||||
list[88] = new ListItem("33.超低排放限值的机组装机容量占燃煤发电机组的比例", "89");
|
||||
list[89] = new ListItem("A其中:执行超低排放限值的机组装机容量", "90");
|
||||
list[90] = new ListItem("34.废气治理设施数", "91");
|
||||
list[91] = new ListItem("35.废气治理设施处理能力", "92");
|
||||
list[92] = new ListItem("36.废水治理设施数", "93");
|
||||
list[93] = new ListItem("37.废水治理设施处理能力", "94");
|
||||
list[94] = new ListItem("38.生态环境污染源", "95");
|
||||
list[95] = new ListItem("39.生态环境风险点", "96");
|
||||
list[96] = new ListItem("40.节能环保投入占产值比重", "97");
|
||||
list[97] = new ListItem("A其中:节能投入", "98");
|
||||
list[98] = new ListItem("B环保投入", "99");
|
||||
return list;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取计量单位集合
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static ListItem[] GetUnits()
|
||||
{
|
||||
ListItem[] list = new ListItem[99];
|
||||
list[0] = new ListItem("万吨标准煤", "01");
|
||||
list[1] = new ListItem("万吨标准煤", "02");
|
||||
list[2] = new ListItem("万吨标准煤", "03");
|
||||
list[3] = new ListItem("万吨", "04");
|
||||
list[4] = new ListItem("万吨", "05");
|
||||
list[5] = new ListItem("吨", "06");
|
||||
list[6] = new ListItem("万千瓦时", "07");
|
||||
list[7] = new ListItem("吨", "08");
|
||||
list[8] = new ListItem("吨", "09");
|
||||
list[9] = new ListItem("吨", "10");
|
||||
list[10] = new ListItem("吨", "11");
|
||||
list[11] = new ListItem("吨", "12");
|
||||
list[12] = new ListItem("万立方米", "13");
|
||||
list[13] = new ListItem("百万千焦", "14");
|
||||
list[14] = new ListItem("吨标准煤", "15");
|
||||
list[15] = new ListItem("吨标准煤/万元", "16");
|
||||
list[16] = new ListItem("万元", "17");
|
||||
list[17] = new ListItem("吨标准煤/万元", "18");
|
||||
list[18] = new ListItem("万元", "19");
|
||||
list[19] = new ListItem("吨标准煤/万元", "20");
|
||||
list[20] = new ListItem("万元", "21");
|
||||
list[21] = new ListItem("吨标准煤/万元", "22");
|
||||
list[22] = new ListItem("万元", "23");
|
||||
list[23] = new ListItem("吨/万元", "24");
|
||||
list[24] = new ListItem("万吨", "25");
|
||||
list[25] = new ListItem("%", "26");
|
||||
list[26] = new ListItem("万吨", "27");
|
||||
list[27] = new ListItem("千克标准油/吨", "28");
|
||||
list[28] = new ListItem("千克标准油", "29");
|
||||
list[29] = new ListItem("吨", "30");
|
||||
list[30] = new ListItem("千克标准煤/吨", "31");
|
||||
list[31] = new ListItem("吨标准煤", "32");
|
||||
list[32] = new ListItem("吨", "33");
|
||||
list[33] = new ListItem("吨标准煤", "34");
|
||||
list[34] = new ListItem("%", "35");
|
||||
list[35] = new ListItem("%", "36");
|
||||
list[36] = new ListItem("百万千焦", "37");
|
||||
list[37] = new ListItem("万千瓦", "38");
|
||||
list[38] = new ListItem("万千瓦", "39");
|
||||
list[39] = new ListItem("万千瓦", "40");
|
||||
list[40] = new ListItem("万千瓦", "41");
|
||||
list[41] = new ListItem("万千瓦", "42");
|
||||
list[42] = new ListItem("万千瓦", "43");
|
||||
list[43] = new ListItem("万千瓦", "44");
|
||||
list[44] = new ListItem("万千瓦", "45");
|
||||
list[45] = new ListItem("万千瓦", "46");
|
||||
list[46] = new ListItem("万千瓦", "47");
|
||||
list[47] = new ListItem("万千瓦", "48");
|
||||
list[48] = new ListItem("万千瓦", "49");
|
||||
list[49] = new ListItem("%", "50");
|
||||
list[50] = new ListItem("万千瓦时", "51");
|
||||
list[51] = new ListItem("吨", "52");
|
||||
list[52] = new ListItem("吨", "53");
|
||||
list[53] = new ListItem("吨", "54");
|
||||
list[54] = new ListItem("吨", "55");
|
||||
list[55] = new ListItem("吨", "56");
|
||||
list[56] = new ListItem("吨", "57");
|
||||
list[57] = new ListItem("吨", "58");
|
||||
list[58] = new ListItem("吨", "59");
|
||||
list[59] = new ListItem("吨", "60");
|
||||
list[60] = new ListItem("吨", "61");
|
||||
list[61] = new ListItem("吨", "62");
|
||||
list[62] = new ListItem("吨", "63");
|
||||
list[63] = new ListItem("吨", "64");
|
||||
list[64] = new ListItem("吨", "65");
|
||||
list[65] = new ListItem("吨", "66");
|
||||
list[66] = new ListItem("吨", "67");
|
||||
list[67] = new ListItem("万吨", "68");
|
||||
list[68] = new ListItem("吨二氧化碳当量/万元", "69");
|
||||
list[69] = new ListItem("万吨二氧化碳当量", "70");
|
||||
list[70] = new ListItem("%", "71");
|
||||
list[71] = new ListItem("万吨", "72");
|
||||
list[72] = new ListItem("万吨", "73");
|
||||
list[73] = new ListItem("万吨", "74");
|
||||
list[74] = new ListItem("%", "75");
|
||||
list[75] = new ListItem("万吨", "76");
|
||||
list[76] = new ListItem("万吨", "77");
|
||||
list[77] = new ListItem("万吨", "78");
|
||||
list[78] = new ListItem("%", "79");
|
||||
list[79] = new ListItem("公顷", "80");
|
||||
list[80] = new ListItem("公顷", "81");
|
||||
list[81] = new ListItem("%", "82");
|
||||
list[82] = new ListItem("公顷", "83");
|
||||
list[83] = new ListItem("公顷", "84");
|
||||
list[84] = new ListItem("%", "85");
|
||||
list[85] = new ListItem("万千瓦", "86");
|
||||
list[86] = new ListItem("%", "87");
|
||||
list[87] = new ListItem("万千瓦", "88");
|
||||
list[88] = new ListItem("%", "89");
|
||||
list[89] = new ListItem("万千瓦", "90");
|
||||
list[90] = new ListItem("套", "91");
|
||||
list[91] = new ListItem("万立方米/年", "92");
|
||||
list[92] = new ListItem("套", "93");
|
||||
list[93] = new ListItem("万吨/年", "94");
|
||||
list[94] = new ListItem("个", "95");
|
||||
list[95] = new ListItem("个", "96");
|
||||
list[96] = new ListItem("%", "97");
|
||||
list[97] = new ListItem("万元", "98");
|
||||
list[98] = new ListItem("万元", "99");
|
||||
return list;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public static class ChemicalReportService
|
||||
{
|
||||
/// <summary>
|
||||
/// 化工行业能源节约与生态环境保护汇总表
|
||||
/// </summary>
|
||||
/// <param name="ChemicalReportId">化工行业能源节约与生态环境保护汇总表Id</param>
|
||||
/// <returns>化工行业能源节约与生态环境保护汇总表</returns>
|
||||
public static Model.Environmental_ChemicalReport GetChemicalReportByChemicalReportId(string ChemicalReportId)
|
||||
{
|
||||
return Funs.DB.Environmental_ChemicalReport.FirstOrDefault(e => e.ChemicalReportId == ChemicalReportId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 化工行业能源节约与生态环境保护汇总表
|
||||
/// </summary>
|
||||
/// <param name="unitId">单位Id</param>
|
||||
/// <param name = "year" > 年度 </ param >
|
||||
/// <param name="month">月份</param>
|
||||
/// <returns>化工行业能源节约与生态环境保护汇总表</returns>
|
||||
public static Model.Environmental_ChemicalReport GetChemicalReportByUnitIdAndYearAndMonth(string unitId, int year, int month)
|
||||
{
|
||||
return Funs.DB.Environmental_ChemicalReport.FirstOrDefault(e => e.UnitId == unitId && e.Month == month && e.Year == year);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据单位Id获取化工行业能源节约与生态环境保护汇总表集合
|
||||
/// </summary>
|
||||
/// <param name="UnitId">单位Id</param>
|
||||
/// <returns>化工行业能源节约与生态环境保护汇总表集合</returns>
|
||||
public static List<Model.View_Environmental_ChemicalReport> GetChemicalReportsByUnitId(string UnitId)
|
||||
{
|
||||
return (from x in Funs.DB.View_Environmental_ChemicalReport where x.UnitId == UnitId orderby x.FillingDate descending select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加化工行业能源节约与生态环境保护汇总表
|
||||
/// </summary>
|
||||
/// <param name="ChemicalReport">化工行业能源节约与生态环境保护汇总表实体</param>
|
||||
public static void AddChemicalReport(Model.Environmental_ChemicalReport ChemicalReport)
|
||||
{
|
||||
Model.Environmental_ChemicalReport newChemicalReport = new Model.Environmental_ChemicalReport
|
||||
{
|
||||
ChemicalReportId = ChemicalReport.ChemicalReportId,
|
||||
Year = ChemicalReport.Year,
|
||||
Month = ChemicalReport.Month,
|
||||
UnitId = ChemicalReport.UnitId,
|
||||
FillingDate = ChemicalReport.FillingDate,
|
||||
DutyPerson = ChemicalReport.DutyPerson,
|
||||
FillingMan = ChemicalReport.FillingMan,
|
||||
UpState = ChemicalReport.UpState,
|
||||
};
|
||||
|
||||
Funs.DB.Environmental_ChemicalReport.InsertOnSubmit(newChemicalReport);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改化工行业能源节约与生态环境保护汇总表
|
||||
/// </summary>
|
||||
/// <param name="ChemicalReport">化工行业能源节约与生态环境保护汇总表实体</param>
|
||||
public static void UpdateChemicalReport(Model.Environmental_ChemicalReport ChemicalReport)
|
||||
{
|
||||
Model.Environmental_ChemicalReport newChemicalReport = Funs.DB.Environmental_ChemicalReport.FirstOrDefault(e => e.ChemicalReportId == ChemicalReport.ChemicalReportId);
|
||||
if (newChemicalReport != null)
|
||||
{
|
||||
newChemicalReport.Year = ChemicalReport.Year;
|
||||
newChemicalReport.Month = ChemicalReport.Month;
|
||||
newChemicalReport.UnitId = ChemicalReport.UnitId;
|
||||
newChemicalReport.FillingDate = ChemicalReport.FillingDate;
|
||||
newChemicalReport.DutyPerson = ChemicalReport.DutyPerson;
|
||||
newChemicalReport.UpState = ChemicalReport.UpState;
|
||||
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据Id获取数据
|
||||
/// </summary>
|
||||
/// <param name="ChemicalReportId"></param>
|
||||
public static void DeleteChemicalReportByChemicalReportId(string ChemicalReportId)
|
||||
{
|
||||
Model.Environmental_ChemicalReport newChemicalReport = Funs.DB.Environmental_ChemicalReport.FirstOrDefault(e => e.ChemicalReportId == ChemicalReportId);
|
||||
if (newChemicalReport != null)
|
||||
{
|
||||
Funs.DB.Environmental_ChemicalReport.DeleteOnSubmit(newChemicalReport);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据报表单位,报表时间判断是否存在
|
||||
/// </summary>
|
||||
/// <param name="Id">Id</param>
|
||||
/// <returns></returns>
|
||||
public static Model.Environmental_ChemicalReport GetChemicalReportByUnitIdDate(string unitId, int year, int Month)
|
||||
{
|
||||
return Funs.DB.Environmental_ChemicalReport.FirstOrDefault(e => e.UnitId == unitId && e.Year == year && e.Month == Month);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据报表单位,报表年份获取对应集合
|
||||
/// </summary>
|
||||
/// <param name="Id">Id</param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Environmental_ChemicalReport> GetChemicalReportByUnitIdYear(string unitId, int year)
|
||||
{
|
||||
return (from x in Funs.DB.Environmental_ChemicalReport where x.UnitId == unitId && x.Year == year select x).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,165 @@
|
||||
using FineUIPro;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
|
||||
public static class EnergyReportService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
#region 获取列表
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
/// </summary>
|
||||
public static int count
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public static List<Model.Environmental_EnergyReport> GetEnvironmental_EnergyReportByModle(Model.Environmental_EnergyReport table)
|
||||
{
|
||||
var q = from x in db.Environmental_EnergyReport
|
||||
where
|
||||
(string.IsNullOrEmpty(table.EnergyReportId) || x.EnergyReportId.Contains(table.EnergyReportId)) &&
|
||||
(string.IsNullOrEmpty(table.UnitId) || x.UnitId.Contains(table.UnitId)) &&
|
||||
(string.IsNullOrEmpty(table.FillingMan) || x.FillingMan.Contains(table.FillingMan)) &&
|
||||
(string.IsNullOrEmpty(table.DutyPerson) || x.DutyPerson.Contains(table.DutyPerson)) &&
|
||||
(string.IsNullOrEmpty(table.UpState) || x.UpState.Contains(table.UpState))
|
||||
select x
|
||||
;
|
||||
|
||||
return q.ToList();
|
||||
}
|
||||
|
||||
/// 获取分页列表
|
||||
/// </summary>
|
||||
/// <param name="PageIndex">页码</param>
|
||||
/// <param name="PageSize">每页数量</param>
|
||||
/// <returns></returns>
|
||||
public static IEnumerable getListData(Model.Environmental_EnergyReport table, Grid Grid1)
|
||||
{
|
||||
var q = GetEnvironmental_EnergyReportByModle(table);
|
||||
count = q.Count();
|
||||
if (count == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
// q= q.Take(Grid1.PageSize * Grid1.PageIndex).Skip(Grid1.PageSize * (Grid1.PageIndex)).ToList();
|
||||
// q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
|
||||
return from x in q
|
||||
select new
|
||||
{
|
||||
x.EnergyReportId,
|
||||
x.UnitId,
|
||||
x.Year,
|
||||
x.Quarters,
|
||||
x.FillingMan,
|
||||
x.FillingDate,
|
||||
x.DutyPerson,
|
||||
x.UpState,
|
||||
|
||||
};
|
||||
}
|
||||
#endregion
|
||||
|
||||
public static Model.Environmental_EnergyReport GetEnvironmental_EnergyReportById(string EnergyReportId)
|
||||
{
|
||||
return db.Environmental_EnergyReport.FirstOrDefault(x => x.EnergyReportId == EnergyReportId);
|
||||
}
|
||||
|
||||
public static Model.Environmental_EnergyReport GetEnvironmental_EnergyReportByUnitIdAndYearAndQuarters(string unitId, int year, int Quarters)
|
||||
{
|
||||
return Funs.DB.Environmental_EnergyReport.FirstOrDefault(e => e.UnitId == unitId && e.Quarters == Quarters && e.Year == year);
|
||||
}
|
||||
public static void AddEnvironmental_EnergyReport(Model.Environmental_EnergyReport newtable)
|
||||
{
|
||||
|
||||
Model.Environmental_EnergyReport table = new Model.Environmental_EnergyReport
|
||||
{
|
||||
EnergyReportId = newtable.EnergyReportId,
|
||||
UnitId = newtable.UnitId,
|
||||
Year = newtable.Year,
|
||||
Quarters = newtable.Quarters,
|
||||
FillingMan = newtable.FillingMan,
|
||||
FillingDate = newtable.FillingDate,
|
||||
DutyPerson = newtable.DutyPerson,
|
||||
UpState = newtable.UpState,
|
||||
};
|
||||
db.Environmental_EnergyReport.InsertOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
public static void AddBulkEnvironmental_EnergyReport(List<Model.Environmental_EnergyReport> newtables)
|
||||
{
|
||||
|
||||
db.Environmental_EnergyReport.InsertAllOnSubmit(newtables);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据报表单位,报表时间判断是否存在
|
||||
/// </summary>
|
||||
/// <param name="Id">Id</param>
|
||||
/// <returns></returns>
|
||||
public static Model.Environmental_EnergyReport GetEnergyReportByUnitIdDate(string unitId, int year, int Quarters)
|
||||
{
|
||||
return Funs.DB.Environmental_EnergyReport.FirstOrDefault(e => e.UnitId == unitId && e.Year == year && e.Quarters == Quarters);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据报表单位,报表年份获取对应集合
|
||||
/// </summary>
|
||||
/// <param name="Id">Id</param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Environmental_EnergyReport> GetEnergyReportByUnitIdYear(string unitId, int year)
|
||||
{
|
||||
return (from x in Funs.DB.Environmental_EnergyReport where x.UnitId == unitId && x.Year == year select x).ToList();
|
||||
}
|
||||
public static void UpdateEnvironmental_EnergyReport(Model.Environmental_EnergyReport newtable)
|
||||
{
|
||||
|
||||
Model.Environmental_EnergyReport table = db.Environmental_EnergyReport.FirstOrDefault(x => x.EnergyReportId == newtable.EnergyReportId);
|
||||
if (table != null)
|
||||
{
|
||||
table.EnergyReportId = newtable.EnergyReportId;
|
||||
table.UnitId = newtable.UnitId;
|
||||
table.Year = newtable.Year;
|
||||
table.Quarters = newtable.Quarters;
|
||||
table.FillingMan = newtable.FillingMan;
|
||||
table.FillingDate = newtable.FillingDate;
|
||||
table.DutyPerson = newtable.DutyPerson;
|
||||
table.UpState = newtable.UpState;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
public static void DeleteEnvironmental_EnergyReportById(string EnergyReportId)
|
||||
{
|
||||
|
||||
Model.Environmental_EnergyReport table = db.Environmental_EnergyReport.FirstOrDefault(x => x.EnergyReportId == EnergyReportId);
|
||||
if (table != null)
|
||||
{
|
||||
db.Environmental_EnergyReport.DeleteOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void DeleteALLEnvironmental_EnergyReport()
|
||||
{
|
||||
if (db.Environmental_EnergyReport != null)
|
||||
{
|
||||
db.Environmental_EnergyReport.DeleteAllOnSubmit(db.Environmental_EnergyReport);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,281 @@
|
||||
using FineUIPro;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
|
||||
public static class EnergyreportItemService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
#region 获取列表
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
/// </summary>
|
||||
public static int count
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public static List<Model.Environmental_EnergyReportItem> GetEnvironmental_EnergyReportItemByModle(Model.Environmental_EnergyReportItem table)
|
||||
{
|
||||
var q = from x in db.Environmental_EnergyReportItem
|
||||
where
|
||||
(string.IsNullOrEmpty(table.EnergyReportItemId) || x.EnergyReportItemId.Contains(table.EnergyReportItemId)) &&
|
||||
(string.IsNullOrEmpty(table.EnergyReportId) || x.EnergyReportId.Contains(table.EnergyReportId)) &&
|
||||
(string.IsNullOrEmpty(table.SortIndex) || x.SortIndex.Contains(table.SortIndex)) &&
|
||||
(string.IsNullOrEmpty(table.BusinessCategory) || x.BusinessCategory.Contains(table.BusinessCategory)) &&
|
||||
(string.IsNullOrEmpty(table.Throughput_UnitOfMeasurement) || x.Throughput_UnitOfMeasurement.Contains(table.Throughput_UnitOfMeasurement)) &&
|
||||
(string.IsNullOrEmpty(table.Yield_UnitOfMeasurement) || x.Yield_UnitOfMeasurement.Contains(table.Yield_UnitOfMeasurement)) &&
|
||||
(string.IsNullOrEmpty(table.OperationScale_UnitOfMeasurement) || x.OperationScale_UnitOfMeasurement.Contains(table.OperationScale_UnitOfMeasurement))
|
||||
select x
|
||||
;
|
||||
|
||||
return q.ToList();
|
||||
}
|
||||
|
||||
/// 获取分页列表
|
||||
/// </summary>
|
||||
/// <param name="PageIndex">页码</param>
|
||||
/// <param name="PageSize">每页数量</param>
|
||||
/// <returns></returns>
|
||||
public static IEnumerable getListData(Model.Environmental_EnergyReportItem table, Grid Grid1)
|
||||
{
|
||||
var q = GetEnvironmental_EnergyReportItemByModle(table);
|
||||
count = q.Count();
|
||||
if (count == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
// q= q.Take(Grid1.PageSize * Grid1.PageIndex).Skip(Grid1.PageSize * (Grid1.PageIndex)).ToList();
|
||||
// q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
|
||||
return from x in q
|
||||
select new
|
||||
{
|
||||
x.EnergyReportItemId,
|
||||
x.EnergyReportId,
|
||||
x.SortIndex,
|
||||
x.BusinessCategory,
|
||||
x.Throughput_BasePeriod,
|
||||
x.Throughput_LastPeriod,
|
||||
x.Throughput_ThisPeriod,
|
||||
x.Throughput_UnitOfMeasurement,
|
||||
x.Yield_BasePeriod,
|
||||
x.Yield_LastPeriod,
|
||||
x.Yield_ThisPeriod,
|
||||
x.Yield_UnitOfMeasurement,
|
||||
x.OutputValue_BasePeriod,
|
||||
x.OutputValue_LastYear,
|
||||
x.OutputValue_ThisYear,
|
||||
x.OperationScale_BasePeriod,
|
||||
x.OperationScale_LastYear,
|
||||
x.OperationScale_ThisYear,
|
||||
x.OperationScale_UnitOfMeasurement,
|
||||
x.ServiceOperatingIncome_BasePeriod,
|
||||
x.ServiceOperatingIncome_LastYear,
|
||||
x.ServiceOperatingIncome_ThisYear,
|
||||
|
||||
};
|
||||
}
|
||||
#endregion
|
||||
|
||||
public static Model.Environmental_EnergyReportItem GetEnvironmental_EnergyReportItemById(string EnergyReportItemId)
|
||||
{
|
||||
return db.Environmental_EnergyReportItem.FirstOrDefault(x => x.EnergyReportItemId == EnergyReportItemId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主表Id获取明细记录集合
|
||||
/// </summary>
|
||||
/// <param name="ChemicalReportItemId"></param>
|
||||
/// <returns>明细记录集合</returns>
|
||||
public static List<Model.Environmental_EnergyReportItem> GetItems(string EnergyReportId)
|
||||
{
|
||||
return (from x in Funs.DB.Environmental_EnergyReportItem
|
||||
where x.EnergyReportId == EnergyReportId
|
||||
orderby x.SortIndex
|
||||
select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主表Id获取明细记录集合
|
||||
/// </summary>
|
||||
/// <param name="ChemicalReportItemId">化工行业能源节约与生态环境保护汇总明细表Id</param>
|
||||
/// <returns>明细记录集合</returns>
|
||||
public static List<Model.Environmental_EnergyReportItem> GetYearSumItems(string unitId, int? year, int? Quarters)
|
||||
{
|
||||
return (from x in Funs.DB.Environmental_EnergyReportItem
|
||||
join y in Funs.DB.Environmental_EnergyReport
|
||||
on x.EnergyReportId equals y.EnergyReportId
|
||||
where y.UnitId == unitId && y.Year == year && y.Quarters == Quarters
|
||||
orderby x.SortIndex
|
||||
select x).Distinct().ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主表Id获取年度明细记录集合
|
||||
/// </summary>
|
||||
/// <param name="ChemicalReportItemId">化工行业能源节约与生态环境保护汇总明细表Id</param>
|
||||
/// <returns>年度明细记录集合</returns>
|
||||
public static List<Model.Environmental_EnergyReportItem> GetLastYearItems(int year)
|
||||
{
|
||||
return (from x in Funs.DB.Environmental_EnergyReportItem
|
||||
join y in Funs.DB.Environmental_EnergyReport
|
||||
on x.EnergyReportId equals y.EnergyReportId
|
||||
where y.Year == year
|
||||
select x).Distinct().ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主表Id获取明细记录集合(不包含本月合计行)
|
||||
/// </summary>
|
||||
/// <param name="ChemicalReportItemId">化工行业能源节约与生态环境保护汇总明细表Id</param>
|
||||
/// <returns>明细记录集合</returns>
|
||||
public static List<Model.Environmental_EnergyReportItem> GetShowItems(string EnergyReportId)
|
||||
{
|
||||
var q = (from x in Funs.DB.Environmental_EnergyReportItem
|
||||
where x.EnergyReportId == EnergyReportId
|
||||
orderby x.SortIndex
|
||||
select x).ToList();
|
||||
List<Model.Environmental_EnergyReportItem> newItems = new List<Model.Environmental_EnergyReportItem>();
|
||||
foreach (var item in q)
|
||||
{
|
||||
Model.Environmental_EnergyReportItem newItem = new Model.Environmental_EnergyReportItem();
|
||||
|
||||
newItem.EnergyReportItemId = item.EnergyReportItemId;
|
||||
newItem.EnergyReportId = item.EnergyReportId;
|
||||
newItem.SortIndex = item.SortIndex;
|
||||
newItem.BusinessCategory = item.BusinessCategory;
|
||||
newItem.Throughput_BasePeriod = item.Throughput_BasePeriod;
|
||||
newItem.Throughput_LastPeriod = item.Throughput_LastPeriod;
|
||||
newItem.Throughput_ThisPeriod = item.Throughput_ThisPeriod;
|
||||
newItem.Throughput_UnitOfMeasurement = item.Throughput_UnitOfMeasurement;
|
||||
newItem.Yield_BasePeriod = item.Yield_BasePeriod;
|
||||
newItem.Yield_LastPeriod = item.Yield_LastPeriod;
|
||||
newItem.Yield_ThisPeriod = item.Yield_ThisPeriod;
|
||||
newItem.Yield_UnitOfMeasurement = item.Yield_UnitOfMeasurement;
|
||||
newItem.OutputValue_BasePeriod = item.OutputValue_BasePeriod;
|
||||
newItem.OutputValue_LastYear = item.OutputValue_LastYear;
|
||||
newItem.OutputValue_ThisYear = item.OutputValue_ThisYear;
|
||||
newItem.OperationScale_BasePeriod = item.OperationScale_BasePeriod;
|
||||
newItem.OperationScale_LastYear = item.OperationScale_LastYear;
|
||||
newItem.OperationScale_ThisYear = item.OperationScale_ThisYear;
|
||||
newItem.OperationScale_UnitOfMeasurement = item.OperationScale_UnitOfMeasurement;
|
||||
newItem.ServiceOperatingIncome_BasePeriod = item.ServiceOperatingIncome_BasePeriod;
|
||||
newItem.ServiceOperatingIncome_LastYear = item.ServiceOperatingIncome_LastYear;
|
||||
newItem.ServiceOperatingIncome_ThisYear = item.ServiceOperatingIncome_ThisYear;
|
||||
newItems.Add(newItem);
|
||||
}
|
||||
return newItems;
|
||||
}
|
||||
public static void AddEnvironmental_EnergyReportItem(Model.Environmental_EnergyReportItem newtable)
|
||||
{
|
||||
|
||||
Model.Environmental_EnergyReportItem table = new Model.Environmental_EnergyReportItem
|
||||
{
|
||||
EnergyReportItemId = newtable.EnergyReportItemId,
|
||||
EnergyReportId = newtable.EnergyReportId,
|
||||
SortIndex = newtable.SortIndex,
|
||||
BusinessCategory = newtable.BusinessCategory,
|
||||
Throughput_BasePeriod = newtable.Throughput_BasePeriod,
|
||||
Throughput_LastPeriod = newtable.Throughput_LastPeriod,
|
||||
Throughput_ThisPeriod = newtable.Throughput_ThisPeriod,
|
||||
Throughput_UnitOfMeasurement = newtable.Throughput_UnitOfMeasurement,
|
||||
Yield_BasePeriod = newtable.Yield_BasePeriod,
|
||||
Yield_LastPeriod = newtable.Yield_LastPeriod,
|
||||
Yield_ThisPeriod = newtable.Yield_ThisPeriod,
|
||||
Yield_UnitOfMeasurement = newtable.Yield_UnitOfMeasurement,
|
||||
OutputValue_BasePeriod = newtable.OutputValue_BasePeriod,
|
||||
OutputValue_LastYear = newtable.OutputValue_LastYear,
|
||||
OutputValue_ThisYear = newtable.OutputValue_ThisYear,
|
||||
OperationScale_BasePeriod = newtable.OperationScale_BasePeriod,
|
||||
OperationScale_LastYear = newtable.OperationScale_LastYear,
|
||||
OperationScale_ThisYear = newtable.OperationScale_ThisYear,
|
||||
OperationScale_UnitOfMeasurement = newtable.OperationScale_UnitOfMeasurement,
|
||||
ServiceOperatingIncome_BasePeriod = newtable.ServiceOperatingIncome_BasePeriod,
|
||||
ServiceOperatingIncome_LastYear = newtable.ServiceOperatingIncome_LastYear,
|
||||
ServiceOperatingIncome_ThisYear = newtable.ServiceOperatingIncome_ThisYear,
|
||||
};
|
||||
db.Environmental_EnergyReportItem.InsertOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
public static void AddBulkEnvironmental_EnergyReportItem(List<Model.Environmental_EnergyReportItem> newtables)
|
||||
{
|
||||
|
||||
db.Environmental_EnergyReportItem.InsertAllOnSubmit(newtables);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
|
||||
public static void UpdateEnvironmental_EnergyReportItem(Model.Environmental_EnergyReportItem newtable)
|
||||
{
|
||||
|
||||
Model.Environmental_EnergyReportItem table = db.Environmental_EnergyReportItem.FirstOrDefault(x => x.EnergyReportItemId == newtable.EnergyReportItemId);
|
||||
if (table != null)
|
||||
{
|
||||
table.EnergyReportItemId = newtable.EnergyReportItemId;
|
||||
table.EnergyReportId = newtable.EnergyReportId;
|
||||
table.SortIndex = newtable.SortIndex;
|
||||
table.BusinessCategory = newtable.BusinessCategory;
|
||||
table.Throughput_BasePeriod = newtable.Throughput_BasePeriod;
|
||||
table.Throughput_LastPeriod = newtable.Throughput_LastPeriod;
|
||||
table.Throughput_ThisPeriod = newtable.Throughput_ThisPeriod;
|
||||
table.Throughput_UnitOfMeasurement = newtable.Throughput_UnitOfMeasurement;
|
||||
table.Yield_BasePeriod = newtable.Yield_BasePeriod;
|
||||
table.Yield_LastPeriod = newtable.Yield_LastPeriod;
|
||||
table.Yield_ThisPeriod = newtable.Yield_ThisPeriod;
|
||||
table.Yield_UnitOfMeasurement = newtable.Yield_UnitOfMeasurement;
|
||||
table.OutputValue_BasePeriod = newtable.OutputValue_BasePeriod;
|
||||
table.OutputValue_LastYear = newtable.OutputValue_LastYear;
|
||||
table.OutputValue_ThisYear = newtable.OutputValue_ThisYear;
|
||||
table.OperationScale_BasePeriod = newtable.OperationScale_BasePeriod;
|
||||
table.OperationScale_LastYear = newtable.OperationScale_LastYear;
|
||||
table.OperationScale_ThisYear = newtable.OperationScale_ThisYear;
|
||||
table.OperationScale_UnitOfMeasurement = newtable.OperationScale_UnitOfMeasurement;
|
||||
table.ServiceOperatingIncome_BasePeriod = newtable.ServiceOperatingIncome_BasePeriod;
|
||||
table.ServiceOperatingIncome_LastYear = newtable.ServiceOperatingIncome_LastYear;
|
||||
table.ServiceOperatingIncome_ThisYear = newtable.ServiceOperatingIncome_ThisYear;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
public static void DeleteEnvironmental_EnergyReportItemById(string EnergyReportItemId)
|
||||
{
|
||||
|
||||
Model.Environmental_EnergyReportItem table = db.Environmental_EnergyReportItem.FirstOrDefault(x => x.EnergyReportItemId == EnergyReportItemId);
|
||||
if (table != null)
|
||||
{
|
||||
db.Environmental_EnergyReportItem.DeleteOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void DeleteALLEnvironmental_EnergyReportItem()
|
||||
{
|
||||
if (db.Environmental_EnergyReportItem != null)
|
||||
{
|
||||
db.Environmental_EnergyReportItem.DeleteAllOnSubmit(db.Environmental_EnergyReportItem);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
public static void DeleteEnergyReportItemByChemicalReportId(string EnergyReportId)
|
||||
{
|
||||
var q = from x in Funs.DB.Environmental_EnergyReportItem where x.EnergyReportId == EnergyReportId select x;
|
||||
if (q != null)
|
||||
{
|
||||
Funs.DB.Environmental_EnergyReportItem.DeleteAllOnSubmit(q);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,307 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public static class ProjectArchitectureReportItemService
|
||||
{
|
||||
/// <summary>
|
||||
/// 建筑行业能源节约与生态环境保护汇总明细表
|
||||
/// </summary>
|
||||
/// <param name="ArchitectureReportItemId">建筑行业能源节约与生态环境保护汇总明细表Id</param>
|
||||
/// <returns>建筑行业能源节约与生态环境保护汇总明细表</returns>
|
||||
public static Model.Environmental_ProjectArchitectureReportItem GetArchitectureReportItemByArchitectureReportItemId(string ArchitectureReportItemId)
|
||||
{
|
||||
return Funs.DB.Environmental_ProjectArchitectureReportItem.FirstOrDefault(e => e.ArchitectureReportItemId == ArchitectureReportItemId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 建筑行业能源节约与生态环境保护汇总明细表
|
||||
/// </summary>
|
||||
/// <param name="ArchitectureReportItemId">建筑行业能源节约与生态环境保护汇总明细表Id</param>
|
||||
/// <returns>建筑行业能源节约与生态环境保护汇总明细表</returns>
|
||||
public static Model.Environmental_ProjectArchitectureReportItem GetArchitectureReportItemByArchitectureReportIdAndTypeId(string ArchitectureReportId)
|
||||
{
|
||||
return Funs.DB.Environmental_ProjectArchitectureReportItem.FirstOrDefault(e => e.ArchitectureReportId == ArchitectureReportId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主表Id判断是否存在明细记录
|
||||
/// </summary>
|
||||
/// <param name="ArchitectureReportItemId">企业安全数据统计月报表Id</param>
|
||||
/// <returns>是否存在明细记录</returns>
|
||||
public static bool IsExitItems(string ArchitectureReportId)
|
||||
{
|
||||
return (from x in Funs.DB.Environmental_ProjectArchitectureReportItem where x.ArchitectureReportId == ArchitectureReportId select x).Count() > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主表Id获取明细记录集合
|
||||
/// </summary>
|
||||
/// <param name="ArchitectureReportItemId">建筑行业能源节约与生态环境保护汇总明细表Id</param>
|
||||
/// <returns>明细记录集合</returns>
|
||||
public static List<Model.Environmental_ProjectArchitectureReportItem> GetItems(string ArchitectureReportId)
|
||||
{
|
||||
return (from x in Funs.DB.Environmental_ProjectArchitectureReportItem
|
||||
where x.ArchitectureReportId == ArchitectureReportId
|
||||
orderby x.SortIndex
|
||||
select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主表Id获取明细记录集合
|
||||
/// </summary>
|
||||
/// <param name="ArchitectureReportItemId">建筑行业能源节约与生态环境保护汇总明细表Id</param>
|
||||
/// <returns>明细记录集合</returns>
|
||||
public static List<Model.Environmental_ProjectArchitectureReportItem> GetYearSumItems(string projectId, int? year, int? Quarters)
|
||||
{
|
||||
return (from x in Funs.DB.Environmental_ProjectArchitectureReportItem
|
||||
join y in Funs.DB.Environmental_ProjectArchitectureReport
|
||||
on x.ArchitectureReportId equals y.ArchitectureReportId
|
||||
where y.ProjectId == projectId && y.Year == year && y.Quarters == Quarters
|
||||
orderby x.SortIndex
|
||||
select x).Distinct().ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主表Id获取年度明细记录集合
|
||||
/// </summary>
|
||||
/// <param name="ArchitectureReportItemId">建筑行业能源节约与生态环境保护汇总明细表Id</param>
|
||||
/// <returns>年度明细记录集合</returns>
|
||||
public static List<Model.Environmental_ProjectArchitectureReportItem> GetLastYearItems(int year)
|
||||
{
|
||||
return (from x in Funs.DB.Environmental_ProjectArchitectureReportItem
|
||||
join y in Funs.DB.Environmental_ProjectArchitectureReport
|
||||
on x.ArchitectureReportId equals y.ArchitectureReportId
|
||||
where y.Year == year
|
||||
select x).Distinct().ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主表Id获取明细记录集合(不包含本月合计行)
|
||||
/// </summary>
|
||||
/// <param name="ArchitectureReportItemId">建筑行业能源节约与生态环境保护汇总明细表Id</param>
|
||||
/// <returns>明细记录集合</returns>
|
||||
public static List<Model.ArchitectureReportItem> GetShowItems(string ArchitectureReportId)
|
||||
{
|
||||
var q = (from x in Funs.DB.Environmental_ProjectArchitectureReportItem
|
||||
where x.ArchitectureReportId == ArchitectureReportId
|
||||
orderby x.SortIndex
|
||||
select x).ToList();
|
||||
List<Model.ArchitectureReportItem> newItems = new List<Model.ArchitectureReportItem>();
|
||||
var indexNames = GetIndexNames();
|
||||
var units = GetUnits();
|
||||
foreach (var item in q)
|
||||
{
|
||||
Model.ArchitectureReportItem newItem = new Model.ArchitectureReportItem();
|
||||
newItem.ArchitectureReportItemId = item.ArchitectureReportItemId;
|
||||
newItem.IndexName = indexNames.First(x => x.Value == item.SortIndex).Text;
|
||||
newItem.Unit = units.First(x => x.Value == item.SortIndex).Text;
|
||||
newItem.SortIndex = item.SortIndex;
|
||||
newItem.BaseNumber = item.BaseNumber;
|
||||
newItem.LastYearValue = item.LastYearValue;
|
||||
newItem.ThisYearValue = item.ThisYearValue;
|
||||
newItem.Rate = item.Rate;
|
||||
newItems.Add(newItem);
|
||||
}
|
||||
return newItems;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加建筑行业能源节约与生态环境保护汇总明细表
|
||||
/// </summary>
|
||||
/// <param name="ArchitectureReportItem">建筑行业能源节约与生态环境保护汇总明细表实体</param>
|
||||
public static void AddArchitectureReportItem(Model.Environmental_ProjectArchitectureReportItem ArchitectureReportItem)
|
||||
{
|
||||
Model.Environmental_ProjectArchitectureReportItem newArchitectureReportItem = new Model.Environmental_ProjectArchitectureReportItem
|
||||
{
|
||||
ArchitectureReportItemId = ArchitectureReportItem.ArchitectureReportItemId,
|
||||
ArchitectureReportId = ArchitectureReportItem.ArchitectureReportId,
|
||||
BaseNumber = ArchitectureReportItem.BaseNumber,
|
||||
SortIndex = ArchitectureReportItem.SortIndex,
|
||||
LastYearValue = ArchitectureReportItem.LastYearValue,
|
||||
ThisYearValue = ArchitectureReportItem.ThisYearValue,
|
||||
Rate = ArchitectureReportItem.Rate,
|
||||
};
|
||||
|
||||
Funs.DB.Environmental_ProjectArchitectureReportItem.InsertOnSubmit(newArchitectureReportItem);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改建筑行业能源节约与生态环境保护汇总明细表
|
||||
/// </summary>
|
||||
/// <param name="ArchitectureReportItem">建筑行业能源节约与生态环境保护汇总明细表实体</param>
|
||||
public static void UpdateArchitectureReportItem(Model.Environmental_ProjectArchitectureReportItem ArchitectureReportItem)
|
||||
{
|
||||
Model.Environmental_ProjectArchitectureReportItem newArchitectureReportItem = Funs.DB.Environmental_ProjectArchitectureReportItem.FirstOrDefault(e => e.ArchitectureReportItemId == ArchitectureReportItem.ArchitectureReportItemId);
|
||||
newArchitectureReportItem.SortIndex = ArchitectureReportItem.SortIndex;
|
||||
newArchitectureReportItem.BaseNumber = ArchitectureReportItem.BaseNumber;
|
||||
newArchitectureReportItem.LastYearValue = ArchitectureReportItem.LastYearValue;
|
||||
newArchitectureReportItem.ThisYearValue = ArchitectureReportItem.ThisYearValue;
|
||||
newArchitectureReportItem.Rate = ArchitectureReportItem.Rate;
|
||||
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据Id删除所有数据
|
||||
/// </summary>
|
||||
/// <param name="ArchitectureReportItemId"></param>
|
||||
public static void DeleteArchitectureReportItemByArchitectureReportId(string ArchitectureReportId)
|
||||
{
|
||||
var q = from x in Funs.DB.Environmental_ProjectArchitectureReportItem where x.ArchitectureReportId == ArchitectureReportId select x;
|
||||
if (q != null)
|
||||
{
|
||||
Funs.DB.Environmental_ProjectArchitectureReportItem.DeleteAllOnSubmit(q);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取指标名称集合
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static ListItem[] GetIndexNames()
|
||||
{
|
||||
ListItem[] list = new ListItem[61];
|
||||
list[0] = new ListItem("1.能源消费量", "01");
|
||||
list[1] = new ListItem("A其中:原煤(标准量)", "02");
|
||||
list[2] = new ListItem("B原煤(实物量)", "03");
|
||||
list[3] = new ListItem("C其中:发电用煤", "04");
|
||||
list[4] = new ListItem("B焦炭", "05");
|
||||
list[5] = new ListItem("B电力", "06");
|
||||
list[6] = new ListItem("B原油", "07");
|
||||
list[7] = new ListItem("B汽油", "08");
|
||||
list[8] = new ListItem("B煤油", "09");
|
||||
list[9] = new ListItem("B柴油", "10");
|
||||
list[10] = new ListItem("B燃料油", "11");
|
||||
list[11] = new ListItem("B天然气", "12");
|
||||
list[12] = new ListItem("B热力", "13");
|
||||
list[13] = new ListItem("B其他能源", "14");
|
||||
list[14] = new ListItem("2.万元营业收入综合能耗(现价)", "15");
|
||||
list[15] = new ListItem("A其中:营业收入(现价)", "16");
|
||||
list[16] = new ListItem("E万元营业收入综合能耗(可比价)", "17");
|
||||
list[17] = new ListItem("A其中:营业收入(可比价)", "18");
|
||||
list[18] = new ListItem("3.万元增加值综合能耗(现价)", "19");
|
||||
list[19] = new ListItem("A其中:增加值(现价)", "20");
|
||||
list[20] = new ListItem("E万元增加值综合能耗(可比价)", "21");
|
||||
list[21] = new ListItem("A其中:增加值(可比价)", "22");
|
||||
list[22] = new ListItem("4.万元营业收入用新水量(可比价)", "23");
|
||||
list[23] = new ListItem("A其中:用新水量", "24");
|
||||
list[24] = new ListItem("5.节能量", "25");
|
||||
list[25] = new ListItem("6.二氧化硫排放量", "26");
|
||||
list[26] = new ListItem("7.氮氧化物排放量", "27");
|
||||
list[27] = new ListItem("8.化学需氧量排放量", "28");
|
||||
list[28] = new ListItem("A其中:排入外环境", "29");
|
||||
list[29] = new ListItem("B排入市政管网或生活污水处理厂", "30");
|
||||
list[30] = new ListItem("9.氨氮排放量", "31");
|
||||
list[31] = new ListItem("A其中:排入外环境", "32");
|
||||
list[32] = new ListItem("B排入市政管网或生活污水处理厂", "33");
|
||||
list[33] = new ListItem("10.烟(粉)尘排放量", "34");
|
||||
list[34] = new ListItem("11.挥发性有机物排放量", "35");
|
||||
list[35] = new ListItem("12.废水排放量", "36");
|
||||
list[36] = new ListItem("13.万元收入二氧化碳排放(可比价)", "37");
|
||||
list[37] = new ListItem("A其中:二氧化碳排放量", "38");
|
||||
list[38] = new ListItem("14.一般固体废物综合利用率", "39");
|
||||
list[39] = new ListItem("A其中:一般固体废物综合利用量", "40");
|
||||
list[40] = new ListItem("B其中:综合利用往年贮存量", "41");
|
||||
list[41] = new ListItem("F一般固体废物产生量", "42");
|
||||
list[42] = new ListItem("15.危险废物处置率", "43");
|
||||
list[43] = new ListItem("A其中:危险废物处置量", "44");
|
||||
list[44] = new ListItem("B其中:处置往年贮存量", "45");
|
||||
list[45] = new ListItem("F危险废物产生量", "46");
|
||||
list[46] = new ListItem("16.土壤污染治理率", "47");
|
||||
list[47] = new ListItem("A其中:土壤污染治理面积", "48");
|
||||
list[48] = new ListItem("B土壤污染需要治理面积", "49");
|
||||
list[49] = new ListItem("17.矿山(或生态)修复治理率", "50");
|
||||
list[50] = new ListItem("A其中:矿山(或生态)修复治理面积", "51");
|
||||
list[51] = new ListItem("B矿山(或生态)需要修复治理面积", "52");
|
||||
list[52] = new ListItem("18.废气治理设施数", "53");
|
||||
list[53] = new ListItem("19.废气治理设施处理能力", "54");
|
||||
list[54] = new ListItem("20.废水治理设施数", "55");
|
||||
list[55] = new ListItem("21.废水治理设施处理能力", "56");
|
||||
list[56] = new ListItem("22.生态环境污染源", "57");
|
||||
list[57] = new ListItem("23.生态环境风险点", "58");
|
||||
list[58] = new ListItem("24.节能环保投入占收入比重", "59");
|
||||
list[59] = new ListItem("A其中:节能投入", "60");
|
||||
list[60] = new ListItem("B环保投入", "61");
|
||||
return list;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取计量单位集合
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static ListItem[] GetUnits()
|
||||
{
|
||||
ListItem[] list = new ListItem[61];
|
||||
list[0] = new ListItem("万吨标准煤", "01");
|
||||
list[1] = new ListItem("万吨标准煤", "02");
|
||||
list[2] = new ListItem("万吨", "03");
|
||||
list[3] = new ListItem("万吨", "04");
|
||||
list[4] = new ListItem("吨", "05");
|
||||
list[5] = new ListItem("万千瓦时", "06");
|
||||
list[6] = new ListItem("吨", "07");
|
||||
list[7] = new ListItem("吨", "08");
|
||||
list[8] = new ListItem("吨", "09");
|
||||
list[9] = new ListItem("吨", "10");
|
||||
list[10] = new ListItem("吨", "11");
|
||||
list[11] = new ListItem("万立方米", "12");
|
||||
list[12] = new ListItem("百万千焦", "13");
|
||||
list[13] = new ListItem("吨标准煤", "14");
|
||||
list[14] = new ListItem("吨标准煤/万元", "15");
|
||||
list[15] = new ListItem("万元", "16");
|
||||
list[16] = new ListItem("吨标准煤/万元", "17");
|
||||
list[17] = new ListItem("万元", "18");
|
||||
list[18] = new ListItem("吨标准煤/万元", "19");
|
||||
list[19] = new ListItem("万元", "20");
|
||||
list[20] = new ListItem("吨标准煤/万元", "21");
|
||||
list[21] = new ListItem("万元", "22");
|
||||
list[22] = new ListItem("吨/万元", "23");
|
||||
list[23] = new ListItem("万吨", "24");
|
||||
list[24] = new ListItem("吨标准煤", "25");
|
||||
list[25] = new ListItem("吨", "26");
|
||||
list[26] = new ListItem("吨", "27");
|
||||
list[27] = new ListItem("吨", "28");
|
||||
list[28] = new ListItem("吨", "29");
|
||||
list[29] = new ListItem("吨", "30");
|
||||
list[30] = new ListItem("吨", "31");
|
||||
list[31] = new ListItem("吨", "32");
|
||||
list[32] = new ListItem("吨", "33");
|
||||
list[33] = new ListItem("吨", "34");
|
||||
list[34] = new ListItem("吨", "35");
|
||||
list[35] = new ListItem("万吨", "36");
|
||||
list[36] = new ListItem("吨二氧化碳当量/万元", "37");
|
||||
list[37] = new ListItem("万吨二氧化碳当量", "38");
|
||||
list[38] = new ListItem("%", "39");
|
||||
list[39] = new ListItem("万吨", "40");
|
||||
list[40] = new ListItem("万吨", "41");
|
||||
list[41] = new ListItem("万吨", "42");
|
||||
list[42] = new ListItem("%", "43");
|
||||
list[43] = new ListItem("万吨", "44");
|
||||
list[44] = new ListItem("万吨", "45");
|
||||
list[45] = new ListItem("万吨", "46");
|
||||
list[46] = new ListItem("%", "47");
|
||||
list[47] = new ListItem("公顷", "48");
|
||||
list[48] = new ListItem("公顷", "49");
|
||||
list[49] = new ListItem("%", "50");
|
||||
list[50] = new ListItem("公顷", "51");
|
||||
list[51] = new ListItem("公顷", "52");
|
||||
list[52] = new ListItem("套", "53");
|
||||
list[53] = new ListItem("万立方米/年", "54");
|
||||
list[54] = new ListItem("套", "55");
|
||||
list[55] = new ListItem("万吨/年", "56");
|
||||
list[56] = new ListItem("个", "57");
|
||||
list[57] = new ListItem("个", "58");
|
||||
list[58] = new ListItem("%", "59");
|
||||
list[59] = new ListItem("万元", "60");
|
||||
list[60] = new ListItem("万元", "61");
|
||||
return list;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public static class ProjectArchitectureReportService
|
||||
{
|
||||
/// <summary>
|
||||
/// 建筑行业能源节约与生态环境保护汇总表
|
||||
/// </summary>
|
||||
/// <param name="ArchitectureReportId">建筑行业能源节约与生态环境保护汇总表Id</param>
|
||||
/// <returns>建筑行业能源节约与生态环境保护汇总表</returns>
|
||||
public static Model.Environmental_ProjectArchitectureReport GetArchitectureReportByArchitectureReportId(string ArchitectureReportId)
|
||||
{
|
||||
return Funs.DB.Environmental_ProjectArchitectureReport.FirstOrDefault(e => e.ArchitectureReportId == ArchitectureReportId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 建筑行业能源节约与生态环境保护汇总表
|
||||
/// </summary>
|
||||
/// <param name="unitId">单位Id</param>
|
||||
/// <param name = "year" > 年度 </ param >
|
||||
/// <param name="month">月份</param>
|
||||
/// <returns>建筑行业能源节约与生态环境保护汇总表</returns>
|
||||
public static Model.Environmental_ProjectArchitectureReport GetArchitectureReportByProjectIdAndYearAndQuarters(string projectId, int year, int Quarters)
|
||||
{
|
||||
return Funs.DB.Environmental_ProjectArchitectureReport.FirstOrDefault(e => e.ProjectId == projectId && e.Quarters == Quarters && e.Year == year);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据单位Id获取建筑行业能源节约与生态环境保护汇总表集合
|
||||
/// </summary>
|
||||
/// <param name="UnitId">单位Id</param>
|
||||
/// <returns>建筑行业能源节约与生态环境保护汇总表集合</returns>
|
||||
public static List<Model.View_Environmental_ProjectArchitectureReport> GetArchitectureReportsByProjectId(string ProjectId)
|
||||
{
|
||||
return (from x in Funs.DB.View_Environmental_ProjectArchitectureReport where x.ProjectId == ProjectId orderby x.FillingDate descending select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加建筑行业能源节约与生态环境保护汇总表
|
||||
/// </summary>
|
||||
/// <param name="ArchitectureReport">建筑行业能源节约与生态环境保护汇总表实体</param>
|
||||
public static void AddArchitectureReport(Model.Environmental_ProjectArchitectureReport ArchitectureReport)
|
||||
{
|
||||
Model.Environmental_ProjectArchitectureReport newArchitectureReport = new Model.Environmental_ProjectArchitectureReport
|
||||
{
|
||||
ArchitectureReportId = ArchitectureReport.ArchitectureReportId,
|
||||
Year = ArchitectureReport.Year,
|
||||
Quarters = ArchitectureReport.Quarters,
|
||||
ProjectId = ArchitectureReport.ProjectId,
|
||||
FillingDate = ArchitectureReport.FillingDate,
|
||||
DutyPerson = ArchitectureReport.DutyPerson,
|
||||
FillingMan = ArchitectureReport.FillingMan,
|
||||
UpState = ArchitectureReport.UpState,
|
||||
};
|
||||
|
||||
Funs.DB.Environmental_ProjectArchitectureReport.InsertOnSubmit(newArchitectureReport);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改建筑行业能源节约与生态环境保护汇总表
|
||||
/// </summary>
|
||||
/// <param name="ArchitectureReport">建筑行业能源节约与生态环境保护汇总表实体</param>
|
||||
public static void UpdateArchitectureReport(Model.Environmental_ProjectArchitectureReport ArchitectureReport)
|
||||
{
|
||||
Model.Environmental_ProjectArchitectureReport newArchitectureReport = Funs.DB.Environmental_ProjectArchitectureReport.FirstOrDefault(e => e.ArchitectureReportId == ArchitectureReport.ArchitectureReportId);
|
||||
if (newArchitectureReport != null)
|
||||
{
|
||||
newArchitectureReport.Year = ArchitectureReport.Year;
|
||||
newArchitectureReport.Quarters = ArchitectureReport.Quarters;
|
||||
newArchitectureReport.ProjectId = ArchitectureReport.ProjectId;
|
||||
newArchitectureReport.FillingDate = ArchitectureReport.FillingDate;
|
||||
newArchitectureReport.DutyPerson = ArchitectureReport.DutyPerson;
|
||||
newArchitectureReport.UpState = ArchitectureReport.UpState;
|
||||
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据Id获取数据
|
||||
/// </summary>
|
||||
/// <param name="ArchitectureReportId"></param>
|
||||
public static void DeleteArchitectureReportByArchitectureReportId(string ArchitectureReportId)
|
||||
{
|
||||
Model.Environmental_ProjectArchitectureReport newArchitectureReport = Funs.DB.Environmental_ProjectArchitectureReport.FirstOrDefault(e => e.ArchitectureReportId == ArchitectureReportId);
|
||||
if (newArchitectureReport != null)
|
||||
{
|
||||
Funs.DB.Environmental_ProjectArchitectureReport.DeleteOnSubmit(newArchitectureReport);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据报表单位,报表时间判断是否存在
|
||||
/// </summary>
|
||||
/// <param name="Id">Id</param>
|
||||
/// <returns></returns>
|
||||
public static Model.Environmental_ProjectArchitectureReport GetArchitectureReportByProjectIdDate(string ProjectId, int year, int Quarters)
|
||||
{
|
||||
return Funs.DB.Environmental_ProjectArchitectureReport.FirstOrDefault(e => e.ProjectId == ProjectId && e.Year == year && e.Quarters == Quarters);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据报表单位,报表年份获取对应集合
|
||||
/// </summary>
|
||||
/// <param name="Id">Id</param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Environmental_ProjectArchitectureReport> GetArchitectureReportByProjectIdYear(string ProjectId, int year)
|
||||
{
|
||||
return (from x in Funs.DB.Environmental_ProjectArchitectureReport where x.ProjectId == ProjectId && x.Year == year select x).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,383 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public static class ProjectChemicalReportItemService
|
||||
{
|
||||
/// <summary>
|
||||
/// 化工行业能源节约与生态环境保护汇总明细表
|
||||
/// </summary>
|
||||
/// <param name="ChemicalReportItemId">化工行业能源节约与生态环境保护汇总明细表Id</param>
|
||||
/// <returns>化工行业能源节约与生态环境保护汇总明细表</returns>
|
||||
public static Model.Environmental_ProjectChemicalReportItem GetChemicalReportItemByChemicalReportItemId(string ChemicalReportItemId)
|
||||
{
|
||||
return Funs.DB.Environmental_ProjectChemicalReportItem.FirstOrDefault(e => e.ChemicalReportItemId == ChemicalReportItemId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 化工行业能源节约与生态环境保护汇总明细表
|
||||
/// </summary>
|
||||
/// <param name="ChemicalReportItemId">化工行业能源节约与生态环境保护汇总明细表Id</param>
|
||||
/// <returns>化工行业能源节约与生态环境保护汇总明细表</returns>
|
||||
public static Model.Environmental_ProjectChemicalReportItem GetChemicalReportItemByChemicalReportIdAndTypeId(string ChemicalReportId)
|
||||
{
|
||||
return Funs.DB.Environmental_ProjectChemicalReportItem.FirstOrDefault(e => e.ChemicalReportId == ChemicalReportId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主表Id判断是否存在明细记录
|
||||
/// </summary>
|
||||
/// <param name="ChemicalReportItemId">企业安全数据统计月报表Id</param>
|
||||
/// <returns>是否存在明细记录</returns>
|
||||
public static bool IsExitItems(string ChemicalReportId)
|
||||
{
|
||||
return (from x in Funs.DB.Environmental_ProjectChemicalReportItem where x.ChemicalReportId == ChemicalReportId select x).Count() > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主表Id获取明细记录集合
|
||||
/// </summary>
|
||||
/// <param name="ChemicalReportItemId">化工行业能源节约与生态环境保护汇总明细表Id</param>
|
||||
/// <returns>明细记录集合</returns>
|
||||
public static List<Model.Environmental_ProjectChemicalReportItem> GetItems(string ChemicalReportId)
|
||||
{
|
||||
return (from x in Funs.DB.Environmental_ProjectChemicalReportItem
|
||||
where x.ChemicalReportId == ChemicalReportId
|
||||
orderby x.SortIndex
|
||||
select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主表Id获取明细记录集合
|
||||
/// </summary>
|
||||
/// <param name="ChemicalReportItemId">化工行业能源节约与生态环境保护汇总明细表Id</param>
|
||||
/// <returns>明细记录集合</returns>
|
||||
public static List<Model.Environmental_ProjectChemicalReportItem> GetYearSumItems(string projectId, int? year, int? month)
|
||||
{
|
||||
return (from x in Funs.DB.Environmental_ProjectChemicalReportItem
|
||||
join y in Funs.DB.Environmental_ProjectChemicalReport
|
||||
on x.ChemicalReportId equals y.ChemicalReportId
|
||||
where y.ProjectId == projectId && y.Year == year && y.Month == month
|
||||
orderby x.SortIndex
|
||||
select x).Distinct().ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主表Id获取年度明细记录集合
|
||||
/// </summary>
|
||||
/// <param name="ChemicalReportItemId">化工行业能源节约与生态环境保护汇总明细表Id</param>
|
||||
/// <returns>年度明细记录集合</returns>
|
||||
public static List<Model.Environmental_ProjectChemicalReportItem> GetLastYearItems(int year)
|
||||
{
|
||||
return (from x in Funs.DB.Environmental_ProjectChemicalReportItem
|
||||
join y in Funs.DB.Environmental_ProjectChemicalReport
|
||||
on x.ChemicalReportId equals y.ChemicalReportId
|
||||
where y.Year == year
|
||||
select x).Distinct().ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主表Id获取明细记录集合(不包含本月合计行)
|
||||
/// </summary>
|
||||
/// <param name="ChemicalReportItemId">化工行业能源节约与生态环境保护汇总明细表Id</param>
|
||||
/// <returns>明细记录集合</returns>
|
||||
public static List<Model.ChemicalReportItem> GetShowItems(string ChemicalReportId)
|
||||
{
|
||||
var q = (from x in Funs.DB.Environmental_ProjectChemicalReportItem
|
||||
where x.ChemicalReportId == ChemicalReportId
|
||||
orderby x.SortIndex
|
||||
select x).ToList();
|
||||
List<Model.ChemicalReportItem> newItems = new List<Model.ChemicalReportItem>();
|
||||
var indexNames = GetIndexNames();
|
||||
var units = GetUnits();
|
||||
foreach (var item in q)
|
||||
{
|
||||
Model.ChemicalReportItem newItem = new Model.ChemicalReportItem();
|
||||
newItem.ChemicalReportItemId = item.ChemicalReportItemId;
|
||||
newItem.IndexName = indexNames.First(x => x.Value == item.SortIndex).Text;
|
||||
newItem.Unit = units.First(x => x.Value == item.SortIndex).Text;
|
||||
newItem.SortIndex = item.SortIndex;
|
||||
newItem.BaseNumber = item.BaseNumber;
|
||||
newItem.LastYearValue = item.LastYearValue;
|
||||
newItem.ThisYearValue = item.ThisYearValue;
|
||||
newItem.Rate = item.Rate;
|
||||
newItems.Add(newItem);
|
||||
}
|
||||
return newItems;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加化工行业能源节约与生态环境保护汇总明细表
|
||||
/// </summary>
|
||||
/// <param name="ChemicalReportItem">化工行业能源节约与生态环境保护汇总明细表实体</param>
|
||||
public static void AddChemicalReportItem(Model.Environmental_ProjectChemicalReportItem ChemicalReportItem)
|
||||
{
|
||||
Model.Environmental_ProjectChemicalReportItem newChemicalReportItem = new Model.Environmental_ProjectChemicalReportItem
|
||||
{
|
||||
ChemicalReportItemId = ChemicalReportItem.ChemicalReportItemId,
|
||||
ChemicalReportId = ChemicalReportItem.ChemicalReportId,
|
||||
SortIndex = ChemicalReportItem.SortIndex,
|
||||
BaseNumber = ChemicalReportItem.BaseNumber,
|
||||
LastYearValue = ChemicalReportItem.LastYearValue,
|
||||
ThisYearValue = ChemicalReportItem.ThisYearValue,
|
||||
Rate = ChemicalReportItem.Rate,
|
||||
};
|
||||
|
||||
Funs.DB.Environmental_ProjectChemicalReportItem.InsertOnSubmit(newChemicalReportItem);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改化工行业能源节约与生态环境保护汇总明细表
|
||||
/// </summary>
|
||||
/// <param name="ChemicalReportItem">化工行业能源节约与生态环境保护汇总明细表实体</param>
|
||||
public static void UpdateChemicalReportItem(Model.Environmental_ProjectChemicalReportItem ChemicalReportItem)
|
||||
{
|
||||
Model.Environmental_ProjectChemicalReportItem newChemicalReportItem = Funs.DB.Environmental_ProjectChemicalReportItem.FirstOrDefault(e => e.ChemicalReportItemId == ChemicalReportItem.ChemicalReportItemId);
|
||||
newChemicalReportItem.SortIndex = ChemicalReportItem.SortIndex;
|
||||
newChemicalReportItem.BaseNumber = ChemicalReportItem.BaseNumber;
|
||||
newChemicalReportItem.LastYearValue = ChemicalReportItem.LastYearValue;
|
||||
newChemicalReportItem.ThisYearValue = ChemicalReportItem.ThisYearValue;
|
||||
newChemicalReportItem.Rate = ChemicalReportItem.Rate;
|
||||
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据Id删除所有数据
|
||||
/// </summary>
|
||||
/// <param name="ChemicalReportItemId"></param>
|
||||
public static void DeleteChemicalReportItemByChemicalReportId(string ChemicalReportId)
|
||||
{
|
||||
var q = from x in Funs.DB.Environmental_ProjectChemicalReportItem where x.ChemicalReportId == ChemicalReportId select x;
|
||||
if (q != null)
|
||||
{
|
||||
Funs.DB.Environmental_ProjectChemicalReportItem.DeleteAllOnSubmit(q);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取指标名称集合
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static ListItem[] GetIndexNames()
|
||||
{
|
||||
ListItem[] list = new ListItem[99];
|
||||
list[0] = new ListItem("1.能源消费量", "01");
|
||||
list[1] = new ListItem("A含:综合能源消费量", "02");
|
||||
list[2] = new ListItem("A其中:原煤(标准量)", "03");
|
||||
list[3] = new ListItem("B原煤(实物量)", "04");
|
||||
list[4] = new ListItem("C其中:发电用煤", "05");
|
||||
list[5] = new ListItem("B焦炭", "06");
|
||||
list[6] = new ListItem("B电力", "07");
|
||||
list[7] = new ListItem("B原油", "08");
|
||||
list[8] = new ListItem("B汽油", "09");
|
||||
list[9] = new ListItem("B煤油", "10");
|
||||
list[10] = new ListItem("B柴油", "11");
|
||||
list[11] = new ListItem("B燃料油", "12");
|
||||
list[12] = new ListItem("B天然气", "13");
|
||||
list[13] = new ListItem("B热力", "14");
|
||||
list[14] = new ListItem("B其他能源", "15");
|
||||
list[15] = new ListItem("2.万元产值综合能耗(现价)", "16");
|
||||
list[16] = new ListItem("A其中:工业总产值(现价)", "17");
|
||||
list[17] = new ListItem("E万元产值综合能耗(可比价)", "18");
|
||||
list[18] = new ListItem("A其中:工业总产值(可比价)", "19");
|
||||
list[19] = new ListItem("3.万元增加值综合能耗(现价)", "20");
|
||||
list[20] = new ListItem("A其中:增加值(现价)", "21");
|
||||
list[21] = new ListItem("E万元增加值综合能耗(可比价)", "22");
|
||||
list[22] = new ListItem("A其中:增加值(可比价)", "23");
|
||||
list[23] = new ListItem("4.万元产值用新水量(可比价)", "24");
|
||||
list[24] = new ListItem("A其中:用新水量", "25");
|
||||
list[25] = new ListItem("E重复用水率", "26");
|
||||
list[26] = new ListItem("A其中:重复用水量", "27");
|
||||
list[27] = new ListItem("5.单位乙烯能耗", "28");
|
||||
list[28] = new ListItem("A其中:乙烯装置能耗", "29");
|
||||
list[29] = new ListItem("B乙烯装置合格乙烯产品产量", "30");
|
||||
list[30] = new ListItem("6.合成氨单位产品综合能耗", "31");
|
||||
list[31] = new ListItem("A其中:合成氨综合能耗", "32");
|
||||
list[32] = new ListItem("B合成氨产量", "33");
|
||||
list[33] = new ListItem("7.节能量", "34");
|
||||
list[34] = new ListItem("8.电煤占煤炭消费比重", "35");
|
||||
list[35] = new ListItem("9.余热余能回收利用率", "36");
|
||||
list[36] = new ListItem("A其中:回收利用的余热余能", "37");
|
||||
list[37] = new ListItem("10.自备电厂发电装机容量", "38");
|
||||
list[38] = new ListItem("A其中:燃煤发电", "39");
|
||||
list[39] = new ListItem("C其中:燃煤热电", "40");
|
||||
list[40] = new ListItem("B清洁能源发电", "41");
|
||||
list[41] = new ListItem("C其中:天然气发电", "42");
|
||||
list[42] = new ListItem("D核能发电", "43");
|
||||
list[43] = new ListItem("D水力发电", "44");
|
||||
list[44] = new ListItem("D风力发电", "45");
|
||||
list[45] = new ListItem("D太阳能发电", "46");
|
||||
list[46] = new ListItem("D其他清洁能源发电", "47");
|
||||
list[47] = new ListItem("B生物质发电", "48");
|
||||
list[48] = new ListItem("B其他发电", "49");
|
||||
list[49] = new ListItem("11.燃煤热电机组装机容量占燃煤发电装机容量比重", "50");
|
||||
list[50] = new ListItem("12.自备电厂发电量", "51");
|
||||
list[51] = new ListItem("13.排污许可证许可的二氧化硫排放量", "52");
|
||||
list[52] = new ListItem("14.排污许可证许可的氮氧化物排放量", "53");
|
||||
list[53] = new ListItem("15.排污许可证许可的化学需氧量排放量", "54");
|
||||
list[54] = new ListItem("16.排污许可证许可的氨氮排放量", "55");
|
||||
list[55] = new ListItem("17.排污许可证许可的烟(粉)尘排放量", "56");
|
||||
list[56] = new ListItem("18.排污许可证许可的挥发性有机物排放量", "57");
|
||||
list[57] = new ListItem("19.二氧化硫排放量", "58");
|
||||
list[58] = new ListItem("20.氮氧化物排放量", "59");
|
||||
list[59] = new ListItem("21.化学需氧量排放量", "60");
|
||||
list[60] = new ListItem("A其中:排入外环境", "61");
|
||||
list[61] = new ListItem("B排入市政管网或生活污水处理厂", "62");
|
||||
list[62] = new ListItem("22.氨氮排放量", "63");
|
||||
list[63] = new ListItem("A其中:排入外环境", "64");
|
||||
list[64] = new ListItem("B排入市政管网或生活污水处理厂", "65");
|
||||
list[65] = new ListItem("23.烟(粉)尘排放量", "66");
|
||||
list[66] = new ListItem("24.挥发性有机物排放量", "67");
|
||||
list[67] = new ListItem("25.废水排放量", "68");
|
||||
list[68] = new ListItem("26.万元产值二氧化碳排放(可比价)", "69");
|
||||
list[69] = new ListItem("A其中:二氧化碳排放量", "70");
|
||||
list[70] = new ListItem("27.一般固体废物综合利用率", "71");
|
||||
list[71] = new ListItem("A其中:一般固体废物综合利用量", "72");
|
||||
list[72] = new ListItem("C其中:综合利用往年贮存量", "73");
|
||||
list[73] = new ListItem("F一般固体废物产生量", "74");
|
||||
list[74] = new ListItem("28.危险废物处置率", "75");
|
||||
list[75] = new ListItem("A其中:危险废物处置量", "76");
|
||||
list[76] = new ListItem("C其中:处置往年贮存量", "77");
|
||||
list[77] = new ListItem("F危险废物产生量", "78");
|
||||
list[78] = new ListItem("29.土壤污染治理率", "79");
|
||||
list[79] = new ListItem("A其中:土壤污染治理面积", "80");
|
||||
list[80] = new ListItem("B土壤污染需要治理面积", "81");
|
||||
list[81] = new ListItem("30.矿山(或生态)修复治理率", "82");
|
||||
list[82] = new ListItem("A其中:矿山(或生态)修复治理面积", "83");
|
||||
list[83] = new ListItem("B矿山(或生态)需要修复治理面积", "84");
|
||||
list[84] = new ListItem("31.烟气脱硫机组装机容量占燃煤发电机组的比例", "85");
|
||||
list[85] = new ListItem("A其中:配备烟气脱硫装置的机组装机容量", "86");
|
||||
list[86] = new ListItem("32.烟气脱硝机组装机容量占燃煤发电机组的比例", "87");
|
||||
list[87] = new ListItem("A其中:配备烟气脱硝装置的机组装机容量", "88");
|
||||
list[88] = new ListItem("33.超低排放限值的机组装机容量占燃煤发电机组的比例", "89");
|
||||
list[89] = new ListItem("A其中:执行超低排放限值的机组装机容量", "90");
|
||||
list[90] = new ListItem("34.废气治理设施数", "91");
|
||||
list[91] = new ListItem("35.废气治理设施处理能力", "92");
|
||||
list[92] = new ListItem("36.废水治理设施数", "93");
|
||||
list[93] = new ListItem("37.废水治理设施处理能力", "94");
|
||||
list[94] = new ListItem("38.生态环境污染源", "95");
|
||||
list[95] = new ListItem("39.生态环境风险点", "96");
|
||||
list[96] = new ListItem("40.节能环保投入占产值比重", "97");
|
||||
list[97] = new ListItem("A其中:节能投入", "98");
|
||||
list[98] = new ListItem("B环保投入", "99");
|
||||
return list;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取计量单位集合
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static ListItem[] GetUnits()
|
||||
{
|
||||
ListItem[] list = new ListItem[99];
|
||||
list[0] = new ListItem("万吨标准煤", "01");
|
||||
list[1] = new ListItem("万吨标准煤", "02");
|
||||
list[2] = new ListItem("万吨标准煤", "03");
|
||||
list[3] = new ListItem("万吨", "04");
|
||||
list[4] = new ListItem("万吨", "05");
|
||||
list[5] = new ListItem("吨", "06");
|
||||
list[6] = new ListItem("万千瓦时", "07");
|
||||
list[7] = new ListItem("吨", "08");
|
||||
list[8] = new ListItem("吨", "09");
|
||||
list[9] = new ListItem("吨", "10");
|
||||
list[10] = new ListItem("吨", "11");
|
||||
list[11] = new ListItem("吨", "12");
|
||||
list[12] = new ListItem("万立方米", "13");
|
||||
list[13] = new ListItem("百万千焦", "14");
|
||||
list[14] = new ListItem("吨标准煤", "15");
|
||||
list[15] = new ListItem("吨标准煤/万元", "16");
|
||||
list[16] = new ListItem("万元", "17");
|
||||
list[17] = new ListItem("吨标准煤/万元", "18");
|
||||
list[18] = new ListItem("万元", "19");
|
||||
list[19] = new ListItem("吨标准煤/万元", "20");
|
||||
list[20] = new ListItem("万元", "21");
|
||||
list[21] = new ListItem("吨标准煤/万元", "22");
|
||||
list[22] = new ListItem("万元", "23");
|
||||
list[23] = new ListItem("吨/万元", "24");
|
||||
list[24] = new ListItem("万吨", "25");
|
||||
list[25] = new ListItem("%", "26");
|
||||
list[26] = new ListItem("万吨", "27");
|
||||
list[27] = new ListItem("千克标准油/吨", "28");
|
||||
list[28] = new ListItem("千克标准油", "29");
|
||||
list[29] = new ListItem("吨", "30");
|
||||
list[30] = new ListItem("千克标准煤/吨", "31");
|
||||
list[31] = new ListItem("吨标准煤", "32");
|
||||
list[32] = new ListItem("吨", "33");
|
||||
list[33] = new ListItem("吨标准煤", "34");
|
||||
list[34] = new ListItem("%", "35");
|
||||
list[35] = new ListItem("%", "36");
|
||||
list[36] = new ListItem("百万千焦", "37");
|
||||
list[37] = new ListItem("万千瓦", "38");
|
||||
list[38] = new ListItem("万千瓦", "39");
|
||||
list[39] = new ListItem("万千瓦", "40");
|
||||
list[40] = new ListItem("万千瓦", "41");
|
||||
list[41] = new ListItem("万千瓦", "42");
|
||||
list[42] = new ListItem("万千瓦", "43");
|
||||
list[43] = new ListItem("万千瓦", "44");
|
||||
list[44] = new ListItem("万千瓦", "45");
|
||||
list[45] = new ListItem("万千瓦", "46");
|
||||
list[46] = new ListItem("万千瓦", "47");
|
||||
list[47] = new ListItem("万千瓦", "48");
|
||||
list[48] = new ListItem("万千瓦", "49");
|
||||
list[49] = new ListItem("%", "50");
|
||||
list[50] = new ListItem("万千瓦时", "51");
|
||||
list[51] = new ListItem("吨", "52");
|
||||
list[52] = new ListItem("吨", "53");
|
||||
list[53] = new ListItem("吨", "54");
|
||||
list[54] = new ListItem("吨", "55");
|
||||
list[55] = new ListItem("吨", "56");
|
||||
list[56] = new ListItem("吨", "57");
|
||||
list[57] = new ListItem("吨", "58");
|
||||
list[58] = new ListItem("吨", "59");
|
||||
list[59] = new ListItem("吨", "60");
|
||||
list[60] = new ListItem("吨", "61");
|
||||
list[61] = new ListItem("吨", "62");
|
||||
list[62] = new ListItem("吨", "63");
|
||||
list[63] = new ListItem("吨", "64");
|
||||
list[64] = new ListItem("吨", "65");
|
||||
list[65] = new ListItem("吨", "66");
|
||||
list[66] = new ListItem("吨", "67");
|
||||
list[67] = new ListItem("万吨", "68");
|
||||
list[68] = new ListItem("吨二氧化碳当量/万元", "69");
|
||||
list[69] = new ListItem("万吨二氧化碳当量", "70");
|
||||
list[70] = new ListItem("%", "71");
|
||||
list[71] = new ListItem("万吨", "72");
|
||||
list[72] = new ListItem("万吨", "73");
|
||||
list[73] = new ListItem("万吨", "74");
|
||||
list[74] = new ListItem("%", "75");
|
||||
list[75] = new ListItem("万吨", "76");
|
||||
list[76] = new ListItem("万吨", "77");
|
||||
list[77] = new ListItem("万吨", "78");
|
||||
list[78] = new ListItem("%", "79");
|
||||
list[79] = new ListItem("公顷", "80");
|
||||
list[80] = new ListItem("公顷", "81");
|
||||
list[81] = new ListItem("%", "82");
|
||||
list[82] = new ListItem("公顷", "83");
|
||||
list[83] = new ListItem("公顷", "84");
|
||||
list[84] = new ListItem("%", "85");
|
||||
list[85] = new ListItem("万千瓦", "86");
|
||||
list[86] = new ListItem("%", "87");
|
||||
list[87] = new ListItem("万千瓦", "88");
|
||||
list[88] = new ListItem("%", "89");
|
||||
list[89] = new ListItem("万千瓦", "90");
|
||||
list[90] = new ListItem("套", "91");
|
||||
list[91] = new ListItem("万立方米/年", "92");
|
||||
list[92] = new ListItem("套", "93");
|
||||
list[93] = new ListItem("万吨/年", "94");
|
||||
list[94] = new ListItem("个", "95");
|
||||
list[95] = new ListItem("个", "96");
|
||||
list[96] = new ListItem("%", "97");
|
||||
list[97] = new ListItem("万元", "98");
|
||||
list[98] = new ListItem("万元", "99");
|
||||
return list;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public static class ProjectChemicalReportService
|
||||
{
|
||||
/// <summary>
|
||||
/// 化工行业能源节约与生态环境保护汇总表
|
||||
/// </summary>
|
||||
/// <param name="ChemicalReportId">化工行业能源节约与生态环境保护汇总表Id</param>
|
||||
/// <returns>化工行业能源节约与生态环境保护汇总表</returns>
|
||||
public static Model.Environmental_ProjectChemicalReport GetChemicalReportByChemicalReportId(string ChemicalReportId)
|
||||
{
|
||||
return Funs.DB.Environmental_ProjectChemicalReport.FirstOrDefault(e => e.ChemicalReportId == ChemicalReportId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 化工行业能源节约与生态环境保护汇总表
|
||||
/// </summary>
|
||||
/// <param name="unitId">单位Id</param>
|
||||
/// <param name = "year" > 年度 </ param >
|
||||
/// <param name="month">月份</param>
|
||||
/// <returns>化工行业能源节约与生态环境保护汇总表</returns>
|
||||
public static Model.Environmental_ProjectChemicalReport GetChemicalReportByProjectIdAndYearAndMonth(string projectId, int year, int month)
|
||||
{
|
||||
return Funs.DB.Environmental_ProjectChemicalReport.FirstOrDefault(e => e.ProjectId == projectId && e.Month == month && e.Year == year);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加化工行业能源节约与生态环境保护汇总表
|
||||
/// </summary>
|
||||
/// <param name="ChemicalReport">化工行业能源节约与生态环境保护汇总表实体</param>
|
||||
public static void AddChemicalReport(Model.Environmental_ProjectChemicalReport ChemicalReport)
|
||||
{
|
||||
Model.Environmental_ProjectChemicalReport newChemicalReport = new Model.Environmental_ProjectChemicalReport
|
||||
{
|
||||
ChemicalReportId = ChemicalReport.ChemicalReportId,
|
||||
Year = ChemicalReport.Year,
|
||||
Month = ChemicalReport.Month,
|
||||
ProjectId = ChemicalReport.ProjectId,
|
||||
FillingDate = ChemicalReport.FillingDate,
|
||||
DutyPerson = ChemicalReport.DutyPerson,
|
||||
FillingMan = ChemicalReport.FillingMan,
|
||||
UpState = ChemicalReport.UpState,
|
||||
};
|
||||
|
||||
Funs.DB.Environmental_ProjectChemicalReport.InsertOnSubmit(newChemicalReport);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改化工行业能源节约与生态环境保护汇总表
|
||||
/// </summary>
|
||||
/// <param name="ChemicalReport">化工行业能源节约与生态环境保护汇总表实体</param>
|
||||
public static void UpdateChemicalReport(Model.Environmental_ProjectChemicalReport ChemicalReport)
|
||||
{
|
||||
Model.Environmental_ProjectChemicalReport newChemicalReport = Funs.DB.Environmental_ProjectChemicalReport.FirstOrDefault(e => e.ChemicalReportId == ChemicalReport.ChemicalReportId);
|
||||
if (newChemicalReport != null)
|
||||
{
|
||||
newChemicalReport.Year = ChemicalReport.Year;
|
||||
newChemicalReport.Month = ChemicalReport.Month;
|
||||
newChemicalReport.ProjectId = ChemicalReport.ProjectId;
|
||||
newChemicalReport.FillingDate = ChemicalReport.FillingDate;
|
||||
newChemicalReport.DutyPerson = ChemicalReport.DutyPerson;
|
||||
newChemicalReport.UpState = ChemicalReport.UpState;
|
||||
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据Id获取数据
|
||||
/// </summary>
|
||||
/// <param name="ChemicalReportId"></param>
|
||||
public static void DeleteChemicalReportByChemicalReportId(string ChemicalReportId)
|
||||
{
|
||||
Model.Environmental_ProjectChemicalReport newChemicalReport = Funs.DB.Environmental_ProjectChemicalReport.FirstOrDefault(e => e.ChemicalReportId == ChemicalReportId);
|
||||
if (newChemicalReport != null)
|
||||
{
|
||||
Funs.DB.Environmental_ProjectChemicalReport.DeleteOnSubmit(newChemicalReport);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据报表单位,报表时间判断是否存在
|
||||
/// </summary>
|
||||
/// <param name="Id">Id</param>
|
||||
/// <returns></returns>
|
||||
public static Model.Environmental_ProjectChemicalReport GetChemicalReportByProjectIdDate(string projectId, int year, int Month)
|
||||
{
|
||||
return Funs.DB.Environmental_ProjectChemicalReport.FirstOrDefault(e => e.ProjectId == projectId && e.Year == year && e.Month == Month);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据报表单位,报表年份获取对应集合
|
||||
/// </summary>
|
||||
/// <param name="Id">Id</param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Environmental_ProjectChemicalReport> GetChemicalReportByProjectIdYear(string projectId, int year)
|
||||
{
|
||||
return (from x in Funs.DB.Environmental_ProjectChemicalReport where x.ProjectId == projectId && x.Year == year select x).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,174 @@
|
||||
using FineUIPro;
|
||||
using Microsoft.SqlServer.Dts.Runtime;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
|
||||
public static class ProjectEnergyReportService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
#region 获取列表
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
/// </summary>
|
||||
public static int count
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public static List<Model.Environmental_ProjectEnergyReport> GetEnvironmental_ProjectEnergyReportByModle(Model.Environmental_ProjectEnergyReport table)
|
||||
{
|
||||
var q = from x in db.Environmental_ProjectEnergyReport
|
||||
where
|
||||
(string.IsNullOrEmpty(table.EnergyReportId) || x.EnergyReportId.Contains(table.EnergyReportId)) &&
|
||||
(string.IsNullOrEmpty(table.UnitId) || x.UnitId.Contains(table.UnitId)) &&
|
||||
(string.IsNullOrEmpty(table.FillingMan) || x.FillingMan.Contains(table.FillingMan)) &&
|
||||
(string.IsNullOrEmpty(table.DutyPerson) || x.DutyPerson.Contains(table.DutyPerson)) &&
|
||||
(string.IsNullOrEmpty(table.UpState) || x.UpState.Contains(table.UpState))
|
||||
select x
|
||||
;
|
||||
|
||||
return q.ToList();
|
||||
}
|
||||
|
||||
/// 获取分页列表
|
||||
/// </summary>
|
||||
/// <param name="PageIndex">页码</param>
|
||||
/// <param name="PageSize">每页数量</param>
|
||||
/// <returns></returns>
|
||||
public static IEnumerable getListData(Model.Environmental_ProjectEnergyReport table, Grid Grid1)
|
||||
{
|
||||
var q = GetEnvironmental_ProjectEnergyReportByModle(table);
|
||||
count = q.Count();
|
||||
if (count == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
// q= q.Take(Grid1.PageSize * Grid1.PageIndex).Skip(Grid1.PageSize * (Grid1.PageIndex)).ToList();
|
||||
// q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
|
||||
return from x in q
|
||||
select new
|
||||
{
|
||||
x.EnergyReportId,
|
||||
x.UnitId,
|
||||
x.Year,
|
||||
x.Quarters,
|
||||
x.FillingMan,
|
||||
x.FillingDate,
|
||||
x.DutyPerson,
|
||||
x.UpState,
|
||||
x.ProjectId
|
||||
|
||||
};
|
||||
}
|
||||
#endregion
|
||||
|
||||
public static Model.Environmental_ProjectEnergyReport GetEnvironmental_ProjectEnergyReportById(string EnergyReportId)
|
||||
{
|
||||
return db.Environmental_ProjectEnergyReport.FirstOrDefault(x => x.EnergyReportId == EnergyReportId);
|
||||
}
|
||||
|
||||
public static Model.Environmental_ProjectEnergyReport GetEnvironmental_ProjectEnergyReportByProjectIdAndYearAndQuarters(string ProjectId, int year, int Quarters)
|
||||
{
|
||||
return Funs.DB.Environmental_ProjectEnergyReport.FirstOrDefault(e => e.ProjectId == ProjectId && e.Quarters == Quarters && e.Year == year);
|
||||
}
|
||||
public static void AddEnvironmental_ProjectEnergyReport(Model.Environmental_ProjectEnergyReport newtable)
|
||||
{
|
||||
|
||||
Model.Environmental_ProjectEnergyReport table = new Model.Environmental_ProjectEnergyReport
|
||||
{
|
||||
EnergyReportId = newtable.EnergyReportId,
|
||||
UnitId = newtable.UnitId,
|
||||
Year = newtable.Year,
|
||||
Quarters = newtable.Quarters,
|
||||
FillingMan = newtable.FillingMan,
|
||||
FillingDate = newtable.FillingDate,
|
||||
DutyPerson = newtable.DutyPerson,
|
||||
UpState = newtable.UpState,
|
||||
ProjectId=newtable.ProjectId,
|
||||
};
|
||||
db.Environmental_ProjectEnergyReport.InsertOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
public static void AddBulkEnvironmental_ProjectEnergyReport(List<Model.Environmental_ProjectEnergyReport> newtables)
|
||||
{
|
||||
|
||||
db.Environmental_ProjectEnergyReport.InsertAllOnSubmit(newtables);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据报表单位,报表时间判断是否存在
|
||||
/// </summary>
|
||||
/// <param name="Id">Id</param>
|
||||
/// <returns></returns>
|
||||
public static Model.Environmental_ProjectEnergyReport GetEnergyReportByProjectIdDate(string ProjectId, int year, int Quarters)
|
||||
{
|
||||
return Funs.DB.Environmental_ProjectEnergyReport.FirstOrDefault(e => e.ProjectId == ProjectId && e.Year == year && e.Quarters == Quarters);
|
||||
}
|
||||
public static List<Model.Environmental_ProjectEnergyReport> GetEnergyReportByDate(int year, int Quarters)
|
||||
{
|
||||
var q = (from x in Funs.DB.Environmental_ProjectEnergyReport where x.Year == year && x.Quarters == Quarters select x).ToList();
|
||||
return q;
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据报表单位,报表年份获取对应集合
|
||||
/// </summary>
|
||||
/// <param name="Id">Id</param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Environmental_ProjectEnergyReport> GetEnergyReportByProjectIdYear(string ProjectId, int year)
|
||||
{
|
||||
return (from x in Funs.DB.Environmental_ProjectEnergyReport where x.ProjectId == ProjectId && x.Year == year select x).ToList();
|
||||
}
|
||||
public static void UpdateEnvironmental_ProjectEnergyReport(Model.Environmental_ProjectEnergyReport newtable)
|
||||
{
|
||||
|
||||
Model.Environmental_ProjectEnergyReport table = db.Environmental_ProjectEnergyReport.FirstOrDefault(x => x.EnergyReportId == newtable.EnergyReportId);
|
||||
if (table != null)
|
||||
{
|
||||
table.EnergyReportId = newtable.EnergyReportId;
|
||||
table.UnitId = newtable.UnitId;
|
||||
table.Year = newtable.Year;
|
||||
table.Quarters = newtable.Quarters;
|
||||
table.FillingMan = newtable.FillingMan;
|
||||
table.FillingDate = newtable.FillingDate;
|
||||
table.DutyPerson = newtable.DutyPerson;
|
||||
table.UpState = newtable.UpState;
|
||||
table.ProjectId=newtable.ProjectId;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
public static void DeleteEnvironmental_ProjectEnergyReportById(string EnergyReportId)
|
||||
{
|
||||
|
||||
Model.Environmental_ProjectEnergyReport table = db.Environmental_ProjectEnergyReport.FirstOrDefault(x => x.EnergyReportId == EnergyReportId);
|
||||
if (table != null)
|
||||
{
|
||||
db.Environmental_ProjectEnergyReport.DeleteOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void DeleteALLEnvironmental_ProjectEnergyReport()
|
||||
{
|
||||
if (db.Environmental_ProjectEnergyReport != null)
|
||||
{
|
||||
db.Environmental_ProjectEnergyReport.DeleteAllOnSubmit(db.Environmental_ProjectEnergyReport);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,289 @@
|
||||
using FineUIPro;
|
||||
using Microsoft.SqlServer.Dts.Runtime;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
|
||||
public static class ProjectEnergyreportItemService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
#region 获取列表
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
/// </summary>
|
||||
public static int count
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public static List<Model.Environmental_ProjectEnergyReportItem> GetEnvironmental_ProjectEnergyReportItemByModle(Model.Environmental_ProjectEnergyReportItem table)
|
||||
{
|
||||
var q = from x in db.Environmental_ProjectEnergyReportItem
|
||||
where
|
||||
(string.IsNullOrEmpty(table.EnergyReportItemId) || x.EnergyReportItemId.Contains(table.EnergyReportItemId)) &&
|
||||
(string.IsNullOrEmpty(table.EnergyReportId) || x.EnergyReportId.Contains(table.EnergyReportId)) &&
|
||||
(string.IsNullOrEmpty(table.SortIndex) || x.SortIndex.Contains(table.SortIndex)) &&
|
||||
(string.IsNullOrEmpty(table.BusinessCategory) || x.BusinessCategory.Contains(table.BusinessCategory)) &&
|
||||
(string.IsNullOrEmpty(table.Throughput_UnitOfMeasurement) || x.Throughput_UnitOfMeasurement.Contains(table.Throughput_UnitOfMeasurement)) &&
|
||||
(string.IsNullOrEmpty(table.Yield_UnitOfMeasurement) || x.Yield_UnitOfMeasurement.Contains(table.Yield_UnitOfMeasurement)) &&
|
||||
(string.IsNullOrEmpty(table.OperationScale_UnitOfMeasurement) || x.OperationScale_UnitOfMeasurement.Contains(table.OperationScale_UnitOfMeasurement))
|
||||
select x
|
||||
;
|
||||
|
||||
return q.ToList();
|
||||
}
|
||||
|
||||
/// 获取分页列表
|
||||
/// </summary>
|
||||
/// <param name="PageIndex">页码</param>
|
||||
/// <param name="PageSize">每页数量</param>
|
||||
/// <returns></returns>
|
||||
public static IEnumerable getListData(Model.Environmental_ProjectEnergyReportItem table, Grid Grid1)
|
||||
{
|
||||
var q = GetEnvironmental_ProjectEnergyReportItemByModle(table);
|
||||
count = q.Count();
|
||||
if (count == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
// q= q.Take(Grid1.PageSize * Grid1.PageIndex).Skip(Grid1.PageSize * (Grid1.PageIndex)).ToList();
|
||||
// q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
|
||||
return from x in q
|
||||
select new
|
||||
{
|
||||
x.EnergyReportItemId,
|
||||
x.EnergyReportId,
|
||||
x.SortIndex,
|
||||
x.BusinessCategory,
|
||||
x.Throughput_BasePeriod,
|
||||
x.Throughput_LastPeriod,
|
||||
x.Throughput_ThisPeriod,
|
||||
x.Throughput_UnitOfMeasurement,
|
||||
x.Yield_BasePeriod,
|
||||
x.Yield_LastPeriod,
|
||||
x.Yield_ThisPeriod,
|
||||
x.Yield_UnitOfMeasurement,
|
||||
x.OutputValue_BasePeriod,
|
||||
x.OutputValue_LastYear,
|
||||
x.OutputValue_ThisYear,
|
||||
x.OperationScale_BasePeriod,
|
||||
x.OperationScale_LastYear,
|
||||
x.OperationScale_ThisYear,
|
||||
x.OperationScale_UnitOfMeasurement,
|
||||
x.ServiceOperatingIncome_BasePeriod,
|
||||
x.ServiceOperatingIncome_LastYear,
|
||||
x.ServiceOperatingIncome_ThisYear,
|
||||
|
||||
};
|
||||
}
|
||||
#endregion
|
||||
|
||||
public static Model.Environmental_ProjectEnergyReportItem GetEnvironmental_ProjectEnergyReportItemById(string EnergyReportItemId)
|
||||
{
|
||||
return db.Environmental_ProjectEnergyReportItem.FirstOrDefault(x => x.EnergyReportItemId == EnergyReportItemId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主表Id获取明细记录集合
|
||||
/// </summary>
|
||||
/// <param name="ChemicalReportItemId"></param>
|
||||
/// <returns>明细记录集合</returns>
|
||||
public static List<Model.Environmental_ProjectEnergyReportItem> GetItems(string EnergyReportId)
|
||||
{
|
||||
return (from x in Funs.DB.Environmental_ProjectEnergyReportItem
|
||||
where x.EnergyReportId == EnergyReportId
|
||||
orderby x.SortIndex
|
||||
select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主表Id获取明细记录集合
|
||||
/// </summary>
|
||||
/// <param name="ChemicalReportItemId">化工行业能源节约与生态环境保护汇总明细表Id</param>
|
||||
/// <returns>明细记录集合</returns>
|
||||
public static List<Model.Environmental_ProjectEnergyReportItem> GetYearSumItems(string ProjectId, int? year, int? Quarters)
|
||||
{
|
||||
return (from x in Funs.DB.Environmental_ProjectEnergyReportItem
|
||||
join y in Funs.DB.Environmental_ProjectEnergyReport
|
||||
on x.EnergyReportId equals y.EnergyReportId
|
||||
where y.ProjectId == ProjectId && y.Year == year && y.Quarters == Quarters
|
||||
orderby x.SortIndex
|
||||
select x).Distinct().ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主表Id获取年度明细记录集合
|
||||
/// </summary>
|
||||
/// <param name="ChemicalReportItemId">化工行业能源节约与生态环境保护汇总明细表Id</param>
|
||||
/// <returns>年度明细记录集合</returns>
|
||||
public static List<Model.Environmental_ProjectEnergyReportItem> GetItemsByDate(int year, int Quarters)
|
||||
{
|
||||
return (from x in Funs.DB.Environmental_ProjectEnergyReportItem
|
||||
join y in Funs.DB.Environmental_ProjectEnergyReport
|
||||
on x.EnergyReportId equals y.EnergyReportId
|
||||
where y.Year == year && y.Quarters== Quarters
|
||||
select x).Distinct().ToList();
|
||||
}
|
||||
public static List<Model.Environmental_ProjectEnergyReportItem> GetLastYearItems(int year)
|
||||
{
|
||||
return (from x in Funs.DB.Environmental_ProjectEnergyReportItem
|
||||
join y in Funs.DB.Environmental_ProjectEnergyReport
|
||||
on x.EnergyReportId equals y.EnergyReportId
|
||||
where y.Year == year
|
||||
select x).Distinct().ToList();
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据主表Id获取明细记录集合(不包含本月合计行)
|
||||
/// </summary>
|
||||
/// <param name="ChemicalReportItemId">化工行业能源节约与生态环境保护汇总明细表Id</param>
|
||||
/// <returns>明细记录集合</returns>
|
||||
public static List<Model.Environmental_ProjectEnergyReportItem> GetShowItems(string EnergyReportId)
|
||||
{
|
||||
var q = (from x in Funs.DB.Environmental_ProjectEnergyReportItem
|
||||
where x.EnergyReportId == EnergyReportId
|
||||
orderby x.SortIndex
|
||||
select x).ToList();
|
||||
List<Model.Environmental_ProjectEnergyReportItem> newItems = new List<Model.Environmental_ProjectEnergyReportItem>();
|
||||
foreach (var item in q)
|
||||
{
|
||||
Model.Environmental_ProjectEnergyReportItem newItem = new Model.Environmental_ProjectEnergyReportItem();
|
||||
|
||||
newItem.EnergyReportItemId = item.EnergyReportItemId;
|
||||
newItem.EnergyReportId = item.EnergyReportId;
|
||||
newItem.SortIndex = item.SortIndex;
|
||||
newItem.BusinessCategory = item.BusinessCategory;
|
||||
newItem.Throughput_BasePeriod = item.Throughput_BasePeriod;
|
||||
newItem.Throughput_LastPeriod = item.Throughput_LastPeriod;
|
||||
newItem.Throughput_ThisPeriod = item.Throughput_ThisPeriod;
|
||||
newItem.Throughput_UnitOfMeasurement = item.Throughput_UnitOfMeasurement;
|
||||
newItem.Yield_BasePeriod = item.Yield_BasePeriod;
|
||||
newItem.Yield_LastPeriod = item.Yield_LastPeriod;
|
||||
newItem.Yield_ThisPeriod = item.Yield_ThisPeriod;
|
||||
newItem.Yield_UnitOfMeasurement = item.Yield_UnitOfMeasurement;
|
||||
newItem.OutputValue_BasePeriod = item.OutputValue_BasePeriod;
|
||||
newItem.OutputValue_LastYear = item.OutputValue_LastYear;
|
||||
newItem.OutputValue_ThisYear = item.OutputValue_ThisYear;
|
||||
newItem.OperationScale_BasePeriod = item.OperationScale_BasePeriod;
|
||||
newItem.OperationScale_LastYear = item.OperationScale_LastYear;
|
||||
newItem.OperationScale_ThisYear = item.OperationScale_ThisYear;
|
||||
newItem.OperationScale_UnitOfMeasurement = item.OperationScale_UnitOfMeasurement;
|
||||
newItem.ServiceOperatingIncome_BasePeriod = item.ServiceOperatingIncome_BasePeriod;
|
||||
newItem.ServiceOperatingIncome_LastYear = item.ServiceOperatingIncome_LastYear;
|
||||
newItem.ServiceOperatingIncome_ThisYear = item.ServiceOperatingIncome_ThisYear;
|
||||
newItems.Add(newItem);
|
||||
}
|
||||
return newItems;
|
||||
}
|
||||
public static void AddEnvironmental_ProjectEnergyReportItem(Model.Environmental_ProjectEnergyReportItem newtable)
|
||||
{
|
||||
|
||||
Model.Environmental_ProjectEnergyReportItem table = new Model.Environmental_ProjectEnergyReportItem
|
||||
{
|
||||
EnergyReportItemId = newtable.EnergyReportItemId,
|
||||
EnergyReportId = newtable.EnergyReportId,
|
||||
SortIndex = newtable.SortIndex,
|
||||
BusinessCategory = newtable.BusinessCategory,
|
||||
Throughput_BasePeriod = newtable.Throughput_BasePeriod,
|
||||
Throughput_LastPeriod = newtable.Throughput_LastPeriod,
|
||||
Throughput_ThisPeriod = newtable.Throughput_ThisPeriod,
|
||||
Throughput_UnitOfMeasurement = newtable.Throughput_UnitOfMeasurement,
|
||||
Yield_BasePeriod = newtable.Yield_BasePeriod,
|
||||
Yield_LastPeriod = newtable.Yield_LastPeriod,
|
||||
Yield_ThisPeriod = newtable.Yield_ThisPeriod,
|
||||
Yield_UnitOfMeasurement = newtable.Yield_UnitOfMeasurement,
|
||||
OutputValue_BasePeriod = newtable.OutputValue_BasePeriod,
|
||||
OutputValue_LastYear = newtable.OutputValue_LastYear,
|
||||
OutputValue_ThisYear = newtable.OutputValue_ThisYear,
|
||||
OperationScale_BasePeriod = newtable.OperationScale_BasePeriod,
|
||||
OperationScale_LastYear = newtable.OperationScale_LastYear,
|
||||
OperationScale_ThisYear = newtable.OperationScale_ThisYear,
|
||||
OperationScale_UnitOfMeasurement = newtable.OperationScale_UnitOfMeasurement,
|
||||
ServiceOperatingIncome_BasePeriod = newtable.ServiceOperatingIncome_BasePeriod,
|
||||
ServiceOperatingIncome_LastYear = newtable.ServiceOperatingIncome_LastYear,
|
||||
ServiceOperatingIncome_ThisYear = newtable.ServiceOperatingIncome_ThisYear,
|
||||
};
|
||||
db.Environmental_ProjectEnergyReportItem.InsertOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
public static void AddBulkEnvironmental_ProjectEnergyReportItem(List<Model.Environmental_ProjectEnergyReportItem> newtables)
|
||||
{
|
||||
|
||||
db.Environmental_ProjectEnergyReportItem.InsertAllOnSubmit(newtables);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
|
||||
public static void UpdateEnvironmental_ProjectEnergyReportItem(Model.Environmental_ProjectEnergyReportItem newtable)
|
||||
{
|
||||
|
||||
Model.Environmental_ProjectEnergyReportItem table = db.Environmental_ProjectEnergyReportItem.FirstOrDefault(x => x.EnergyReportItemId == newtable.EnergyReportItemId);
|
||||
if (table != null)
|
||||
{
|
||||
table.EnergyReportItemId = newtable.EnergyReportItemId;
|
||||
table.EnergyReportId = newtable.EnergyReportId;
|
||||
table.SortIndex = newtable.SortIndex;
|
||||
table.BusinessCategory = newtable.BusinessCategory;
|
||||
table.Throughput_BasePeriod = newtable.Throughput_BasePeriod;
|
||||
table.Throughput_LastPeriod = newtable.Throughput_LastPeriod;
|
||||
table.Throughput_ThisPeriod = newtable.Throughput_ThisPeriod;
|
||||
table.Throughput_UnitOfMeasurement = newtable.Throughput_UnitOfMeasurement;
|
||||
table.Yield_BasePeriod = newtable.Yield_BasePeriod;
|
||||
table.Yield_LastPeriod = newtable.Yield_LastPeriod;
|
||||
table.Yield_ThisPeriod = newtable.Yield_ThisPeriod;
|
||||
table.Yield_UnitOfMeasurement = newtable.Yield_UnitOfMeasurement;
|
||||
table.OutputValue_BasePeriod = newtable.OutputValue_BasePeriod;
|
||||
table.OutputValue_LastYear = newtable.OutputValue_LastYear;
|
||||
table.OutputValue_ThisYear = newtable.OutputValue_ThisYear;
|
||||
table.OperationScale_BasePeriod = newtable.OperationScale_BasePeriod;
|
||||
table.OperationScale_LastYear = newtable.OperationScale_LastYear;
|
||||
table.OperationScale_ThisYear = newtable.OperationScale_ThisYear;
|
||||
table.OperationScale_UnitOfMeasurement = newtable.OperationScale_UnitOfMeasurement;
|
||||
table.ServiceOperatingIncome_BasePeriod = newtable.ServiceOperatingIncome_BasePeriod;
|
||||
table.ServiceOperatingIncome_LastYear = newtable.ServiceOperatingIncome_LastYear;
|
||||
table.ServiceOperatingIncome_ThisYear = newtable.ServiceOperatingIncome_ThisYear;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
public static void DeleteEnvironmental_ProjectEnergyReportItemById(string EnergyReportItemId)
|
||||
{
|
||||
|
||||
Model.Environmental_ProjectEnergyReportItem table = db.Environmental_ProjectEnergyReportItem.FirstOrDefault(x => x.EnergyReportItemId == EnergyReportItemId);
|
||||
if (table != null)
|
||||
{
|
||||
db.Environmental_ProjectEnergyReportItem.DeleteOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void DeleteALLEnvironmental_ProjectEnergyReportItem()
|
||||
{
|
||||
if (db.Environmental_ProjectEnergyReportItem != null)
|
||||
{
|
||||
db.Environmental_ProjectEnergyReportItem.DeleteAllOnSubmit(db.Environmental_ProjectEnergyReportItem);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
public static void DeleteEnergyReportItemByChemicalReportId(string EnergyReportId)
|
||||
{
|
||||
var q = from x in Funs.DB.Environmental_ProjectEnergyReportItem where x.EnergyReportId == EnergyReportId select x;
|
||||
if (q != null)
|
||||
{
|
||||
Funs.DB.Environmental_ProjectEnergyReportItem.DeleteAllOnSubmit(q);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 生态环保工作总结报告
|
||||
/// </summary>
|
||||
public static class EPSummaryReportService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取生态环保工作总结报告
|
||||
/// </summary>
|
||||
/// <param name="ePSummaryReportId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Information_EPSummaryReport GetEPSummaryReportById(string ePSummaryReportId)
|
||||
{
|
||||
return Funs.DB.Information_EPSummaryReport.FirstOrDefault(e => e.EPSummaryReportId == ePSummaryReportId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据单位和年份获取生态环保工作总结报告
|
||||
/// </summary>
|
||||
/// <param name="unitId"></param>
|
||||
/// <param name="yearId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Information_EPSummaryReport GetEPSummaryReportByUnitIdAndYearId(string unitId, int yearId)
|
||||
{
|
||||
return Funs.DB.Information_EPSummaryReport.FirstOrDefault(e => e.UnitId == unitId && e.YearId == yearId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加生态环保工作总结报告
|
||||
/// </summary>
|
||||
/// <param name="ePSummaryReport"></param>
|
||||
public static void AddEPSummaryReport(Model.Information_EPSummaryReport ePSummaryReport)
|
||||
{
|
||||
Model.Information_EPSummaryReport newReport = new Model.Information_EPSummaryReport
|
||||
{
|
||||
EPSummaryReportId = ePSummaryReport.EPSummaryReportId,
|
||||
UnitId = ePSummaryReport.UnitId,
|
||||
YearId = ePSummaryReport.YearId,
|
||||
ResponsiblePerson = ePSummaryReport.ResponsiblePerson,
|
||||
ResponsiblePersonTel = ePSummaryReport.ResponsiblePersonTel,
|
||||
ContactPerson = ePSummaryReport.ContactPerson,
|
||||
ContactPersonTel = ePSummaryReport.ContactPersonTel,
|
||||
ReportDate = ePSummaryReport.ReportDate,
|
||||
Description1 = ePSummaryReport.Description1,
|
||||
Description2 = ePSummaryReport.Description2,
|
||||
Description3 = ePSummaryReport.Description3,
|
||||
Description4 = ePSummaryReport.Description4,
|
||||
Description5 = ePSummaryReport.Description5,
|
||||
Description6 = ePSummaryReport.Description6,
|
||||
Description7 = ePSummaryReport.Description7,
|
||||
Description8 = ePSummaryReport.Description8,
|
||||
Description9 = ePSummaryReport.Description9
|
||||
};
|
||||
Funs.DB.Information_EPSummaryReport.InsertOnSubmit(newReport);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改生态环保工作总结报告
|
||||
/// </summary>
|
||||
/// <param name="ePSummaryReport"></param>
|
||||
public static void UpdateEPSummaryReport(Model.Information_EPSummaryReport ePSummaryReport)
|
||||
{
|
||||
Model.Information_EPSummaryReport newReport = Funs.DB.Information_EPSummaryReport.FirstOrDefault(e => e.EPSummaryReportId == ePSummaryReport.EPSummaryReportId);
|
||||
if (newReport != null)
|
||||
{
|
||||
newReport.UnitId = ePSummaryReport.UnitId;
|
||||
newReport.YearId = ePSummaryReport.YearId;
|
||||
newReport.ResponsiblePerson = ePSummaryReport.ResponsiblePerson;
|
||||
newReport.ResponsiblePersonTel = ePSummaryReport.ResponsiblePersonTel;
|
||||
newReport.ContactPerson = ePSummaryReport.ContactPerson;
|
||||
newReport.ContactPersonTel = ePSummaryReport.ContactPersonTel;
|
||||
newReport.ReportDate = ePSummaryReport.ReportDate;
|
||||
newReport.Description1 = ePSummaryReport.Description1;
|
||||
newReport.Description2 = ePSummaryReport.Description2;
|
||||
newReport.Description3 = ePSummaryReport.Description3;
|
||||
newReport.Description4 = ePSummaryReport.Description4;
|
||||
newReport.Description5 = ePSummaryReport.Description5;
|
||||
newReport.Description6 = ePSummaryReport.Description6;
|
||||
newReport.Description7 = ePSummaryReport.Description7;
|
||||
newReport.Description8 = ePSummaryReport.Description8;
|
||||
newReport.Description9 = ePSummaryReport.Description9;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除生态环保工作总结报告
|
||||
/// </summary>
|
||||
/// <param name="ePSummaryReportId"></param>
|
||||
public static void DeleteEPSummaryReportById(string ePSummaryReportId)
|
||||
{
|
||||
Model.Information_EPSummaryReport ePSummaryReport = Funs.DB.Information_EPSummaryReport.FirstOrDefault(e => e.EPSummaryReportId == ePSummaryReportId);
|
||||
if (ePSummaryReport != null)
|
||||
{
|
||||
Funs.DB.Information_EPSummaryReport.DeleteOnSubmit(ePSummaryReport);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,20 +6,20 @@ namespace BLL
|
||||
public static class MillionsMonthlyReportItemService
|
||||
{
|
||||
/// <summary>
|
||||
/// 百万工时安全统计月报表明细表
|
||||
/// 企业安全数据统计月报明细表
|
||||
/// </summary>
|
||||
/// <param name="MillionsMonthlyReportItemId">百万工时安全统计月报表明细表Id</param>
|
||||
/// <returns>百万工时安全统计月报表明细表</returns>
|
||||
/// <param name="MillionsMonthlyReportItemId">企业安全数据统计月报明细表Id</param>
|
||||
/// <returns>企业安全数据统计月报明细表</returns>
|
||||
public static Model.Information_MillionsMonthlyReportItem GetMillionsMonthlyReportItemByMillionsMonthlyReportItemId(string MillionsMonthlyReportItemId)
|
||||
{
|
||||
return Funs.DB.Information_MillionsMonthlyReportItem.FirstOrDefault(e => e.MillionsMonthlyReportItemId == MillionsMonthlyReportItemId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 百万工时安全统计月报表明细表
|
||||
/// 企业安全数据统计月报明细表
|
||||
/// </summary>
|
||||
/// <param name="MillionsMonthlyReportItemId">百万工时安全统计月报表明细表Id</param>
|
||||
/// <returns>百万工时安全统计月报表明细表</returns>
|
||||
/// <param name="MillionsMonthlyReportItemId">企业安全数据统计月报明细表Id</param>
|
||||
/// <returns>企业安全数据统计月报明细表</returns>
|
||||
public static Model.Information_MillionsMonthlyReportItem GetMillionsMonthlyReportItemByMillionsMonthlyReportIdAndTypeId(string MillionsMonthlyReportId)
|
||||
{
|
||||
return Funs.DB.Information_MillionsMonthlyReportItem.FirstOrDefault(e => e.MillionsMonthlyReportId == MillionsMonthlyReportId);
|
||||
@@ -28,7 +28,7 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 根据主表Id判断是否存在明细记录
|
||||
/// </summary>
|
||||
/// <param name="MillionsMonthlyReportItemId">百万工时安全统计月报表表Id</param>
|
||||
/// <param name="MillionsMonthlyReportItemId">企业安全数据统计月报表Id</param>
|
||||
/// <returns>是否存在明细记录</returns>
|
||||
public static bool IsExitItems(string MillionsMonthlyReportId)
|
||||
{
|
||||
@@ -38,7 +38,7 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 根据主表Id获取明细记录集合
|
||||
/// </summary>
|
||||
/// <param name="MillionsMonthlyReportItemId">百万工时安全统计月报表明细表Id</param>
|
||||
/// <param name="MillionsMonthlyReportItemId">企业安全数据统计月报明细表Id</param>
|
||||
/// <returns>明细记录集合</returns>
|
||||
public static List<Model.Information_MillionsMonthlyReportItem> GetItems(string MillionsMonthlyReportId)
|
||||
{
|
||||
@@ -51,7 +51,7 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 根据主表Id获取明细记录集合
|
||||
/// </summary>
|
||||
/// <param name="MillionsMonthlyReportItemId">百万工时安全统计月报表明细表Id</param>
|
||||
/// <param name="MillionsMonthlyReportItemId">企业安全数据统计月报明细表Id</param>
|
||||
/// <returns>明细记录集合</returns>
|
||||
public static List<Model.Information_MillionsMonthlyReportItem> GetYearSumItems(string unitId, int? year, int? month)
|
||||
{
|
||||
@@ -66,7 +66,7 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 根据主表Id获取明细记录集合
|
||||
/// </summary>
|
||||
/// <param name="MillionsMonthlyReportItemId">百万工时安全统计月报表明细表Id</param>
|
||||
/// <param name="MillionsMonthlyReportItemId">企业安全数据统计月报明细表Id</param>
|
||||
/// <returns>明细记录集合</returns>
|
||||
public static List<Model.Information_MillionsMonthlyReportItem> GetAllUnitYearSumItems(int year, int month)
|
||||
{
|
||||
@@ -80,7 +80,7 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 根据主表Id获取明细记录集合(不包含本月合计行)
|
||||
/// </summary>
|
||||
/// <param name="MillionsMonthlyReportItemId">百万工时安全统计月报表明细表Id</param>
|
||||
/// <param name="MillionsMonthlyReportItemId">企业安全数据统计月报明细表Id</param>
|
||||
/// <returns>明细记录集合</returns>
|
||||
public static List<Model.Information_MillionsMonthlyReportItem> GetItemsNoSum(string MillionsMonthlyReportId)
|
||||
{
|
||||
@@ -92,9 +92,9 @@ namespace BLL
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加百万工时安全统计月报表明细表
|
||||
/// 增加企业安全数据统计月报明细表
|
||||
/// </summary>
|
||||
/// <param name="MillionsMonthlyReportItem">百万工时安全统计月报表明细表实体</param>
|
||||
/// <param name="MillionsMonthlyReportItem">企业安全数据统计月报明细表实体</param>
|
||||
public static void AddMillionsMonthlyReportItem(Model.Information_MillionsMonthlyReportItem MillionsMonthlyReportItem)
|
||||
{
|
||||
Model.Information_MillionsMonthlyReportItem newMillionsMonthlyReportItem = new Model.Information_MillionsMonthlyReportItem
|
||||
@@ -109,6 +109,9 @@ namespace BLL
|
||||
ContractorNum = MillionsMonthlyReportItem.ContractorNum,
|
||||
SumPersonNum = MillionsMonthlyReportItem.SumPersonNum,
|
||||
TotalWorkNum = MillionsMonthlyReportItem.TotalWorkNum,
|
||||
DeathAccidentNum = MillionsMonthlyReportItem.DeathAccidentNum,
|
||||
DeathAccidentPersonNum = MillionsMonthlyReportItem.DeathAccidentPersonNum,
|
||||
DeathAccidentLossHour = MillionsMonthlyReportItem.DeathAccidentLossHour,
|
||||
SeriousInjuriesNum = MillionsMonthlyReportItem.SeriousInjuriesNum,
|
||||
SeriousInjuriesPersonNum = MillionsMonthlyReportItem.SeriousInjuriesPersonNum,
|
||||
SeriousInjuriesLossHour = MillionsMonthlyReportItem.SeriousInjuriesLossHour,
|
||||
@@ -123,6 +126,7 @@ namespace BLL
|
||||
MedicalTreatmentPersonNum = MillionsMonthlyReportItem.MedicalTreatmentPersonNum,
|
||||
MedicalTreatmentLossHour = MillionsMonthlyReportItem.MedicalTreatmentLossHour,
|
||||
FireNum = MillionsMonthlyReportItem.FireNum,
|
||||
EnvironmenNum = MillionsMonthlyReportItem.EnvironmenNum,
|
||||
ExplosionNum = MillionsMonthlyReportItem.ExplosionNum,
|
||||
TrafficNum = MillionsMonthlyReportItem.TrafficNum,
|
||||
EquipmentNum = MillionsMonthlyReportItem.EquipmentNum,
|
||||
@@ -138,9 +142,9 @@ namespace BLL
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改百万工时安全统计月报表明细表
|
||||
/// 修改企业安全数据统计月报明细表
|
||||
/// </summary>
|
||||
/// <param name="MillionsMonthlyReportItem">百万工时安全统计月报表明细表实体</param>
|
||||
/// <param name="MillionsMonthlyReportItem">企业安全数据统计月报明细表实体</param>
|
||||
public static void UpdateMillionsMonthlyReportItem(Model.Information_MillionsMonthlyReportItem MillionsMonthlyReportItem)
|
||||
{
|
||||
Model.Information_MillionsMonthlyReportItem newMillionsMonthlyReportItem = Funs.DB.Information_MillionsMonthlyReportItem.FirstOrDefault(e => e.MillionsMonthlyReportItemId == MillionsMonthlyReportItem.MillionsMonthlyReportItemId);
|
||||
@@ -152,6 +156,9 @@ namespace BLL
|
||||
newMillionsMonthlyReportItem.ContractorNum = MillionsMonthlyReportItem.ContractorNum;
|
||||
newMillionsMonthlyReportItem.SumPersonNum = MillionsMonthlyReportItem.SumPersonNum;
|
||||
newMillionsMonthlyReportItem.TotalWorkNum = MillionsMonthlyReportItem.TotalWorkNum;
|
||||
newMillionsMonthlyReportItem.DeathAccidentNum = MillionsMonthlyReportItem.DeathAccidentNum;
|
||||
newMillionsMonthlyReportItem.DeathAccidentPersonNum = MillionsMonthlyReportItem.DeathAccidentPersonNum;
|
||||
newMillionsMonthlyReportItem.DeathAccidentLossHour = MillionsMonthlyReportItem.DeathAccidentLossHour;
|
||||
newMillionsMonthlyReportItem.SeriousInjuriesNum = MillionsMonthlyReportItem.SeriousInjuriesNum;
|
||||
newMillionsMonthlyReportItem.SeriousInjuriesPersonNum = MillionsMonthlyReportItem.SeriousInjuriesPersonNum;
|
||||
newMillionsMonthlyReportItem.SeriousInjuriesLossHour = MillionsMonthlyReportItem.SeriousInjuriesLossHour;
|
||||
@@ -167,6 +174,7 @@ namespace BLL
|
||||
newMillionsMonthlyReportItem.MedicalTreatmentLossHour = MillionsMonthlyReportItem.MedicalTreatmentLossHour;
|
||||
newMillionsMonthlyReportItem.FireNum = MillionsMonthlyReportItem.FireNum;
|
||||
newMillionsMonthlyReportItem.ExplosionNum = MillionsMonthlyReportItem.ExplosionNum;
|
||||
newMillionsMonthlyReportItem.EnvironmenNum = MillionsMonthlyReportItem.EnvironmenNum;
|
||||
newMillionsMonthlyReportItem.TrafficNum = MillionsMonthlyReportItem.TrafficNum;
|
||||
newMillionsMonthlyReportItem.EquipmentNum = MillionsMonthlyReportItem.EquipmentNum;
|
||||
newMillionsMonthlyReportItem.QualityNum = MillionsMonthlyReportItem.QualityNum;
|
||||
|
||||
@@ -6,41 +6,41 @@ namespace BLL
|
||||
public static class MillionsMonthlyReportService
|
||||
{
|
||||
/// <summary>
|
||||
/// 百万工时安全统计月报表
|
||||
/// 企业安全数据统计月报
|
||||
/// </summary>
|
||||
/// <param name="MillionsMonthlyReportId">百万工时安全统计月报表Id</param>
|
||||
/// <returns>百万工时安全统计月报表</returns>
|
||||
/// <param name="MillionsMonthlyReportId">企业安全数据统计月报Id</param>
|
||||
/// <returns>企业安全数据统计月报</returns>
|
||||
public static Model.Information_MillionsMonthlyReport GetMillionsMonthlyReportByMillionsMonthlyReportId(string MillionsMonthlyReportId)
|
||||
{
|
||||
return Funs.DB.Information_MillionsMonthlyReport.FirstOrDefault(e => e.MillionsMonthlyReportId == MillionsMonthlyReportId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 百万工时安全统计月报表
|
||||
/// 企业安全数据统计月报
|
||||
/// </summary>
|
||||
/// <param name="unitId">单位Id</param>
|
||||
/// <param name = "year" > 年度 </ param >
|
||||
/// <param name="month">月份</param>
|
||||
/// <returns>百万工时安全统计月报表</returns>
|
||||
/// <returns>企业安全数据统计月报</returns>
|
||||
public static Model.Information_MillionsMonthlyReport GetMillionsMonthlyReportByUnitIdAndYearAndMonth(string unitId, int year, int month)
|
||||
{
|
||||
return Funs.DB.Information_MillionsMonthlyReport.FirstOrDefault(e => e.UnitId == unitId && e.Month == month && e.Year == year);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据单位Id获取百万工时安全统计月报表集合
|
||||
/// 根据单位Id获取企业安全数据统计月报集合
|
||||
/// </summary>
|
||||
/// <param name="UnitId">单位Id</param>
|
||||
/// <returns>百万工时安全统计月报表集合</returns>
|
||||
/// <returns>企业安全数据统计月报集合</returns>
|
||||
public static List<Model.View_Information_MillionsMonthlyReport> GetMillionsMonthlyReportsByUnitId(string UnitId)
|
||||
{
|
||||
return (from x in Funs.DB.View_Information_MillionsMonthlyReport where x.UnitId == UnitId orderby x.FillingDate descending select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加百万工时安全统计月报表
|
||||
/// 增加企业安全数据统计月报
|
||||
/// </summary>
|
||||
/// <param name="MillionsMonthlyReport">百万工时安全统计月报表实体</param>
|
||||
/// <param name="MillionsMonthlyReport">企业安全数据统计月报实体</param>
|
||||
public static void AddMillionsMonthlyReport(Model.Information_MillionsMonthlyReport MillionsMonthlyReport)
|
||||
{
|
||||
Model.Information_MillionsMonthlyReport newMillionsMonthlyReport = new Model.Information_MillionsMonthlyReport
|
||||
@@ -59,7 +59,23 @@ namespace BLL
|
||||
FillingMan = MillionsMonthlyReport.FillingMan,
|
||||
UpState = MillionsMonthlyReport.UpState,
|
||||
HandleState = MillionsMonthlyReport.HandleState,
|
||||
HandleMan = MillionsMonthlyReport.HandleMan
|
||||
HandleMan = MillionsMonthlyReport.HandleMan,
|
||||
InputCosts = MillionsMonthlyReport.InputCosts,
|
||||
TrainNum = MillionsMonthlyReport.TrainNum,
|
||||
GeneralHazardNum = MillionsMonthlyReport.GeneralHazardNum,
|
||||
MajorHazardNum = MillionsMonthlyReport.MajorHazardNum,
|
||||
NotProofLargeProjectNum = MillionsMonthlyReport.NotProofLargeProjectNum,
|
||||
ProofLargeProjectNum = MillionsMonthlyReport.ProofLargeProjectNum,
|
||||
FireLicenseNum = MillionsMonthlyReport.FireLicenseNum,
|
||||
LimitLicenseNum = MillionsMonthlyReport.LimitLicenseNum,
|
||||
HighLicenseNum = MillionsMonthlyReport.HighLicenseNum,
|
||||
HoistingLicenseNum = MillionsMonthlyReport.HoistingLicenseNum,
|
||||
BreakGroundLicenseNum = MillionsMonthlyReport.BreakGroundLicenseNum,
|
||||
ElectricityLicenseNum = MillionsMonthlyReport.ElectricityLicenseNum,
|
||||
RTLicenseNum = MillionsMonthlyReport.RTLicenseNum,
|
||||
NightLicenseNum = MillionsMonthlyReport.NightLicenseNum,
|
||||
CommissionerNum = MillionsMonthlyReport.CommissionerNum,
|
||||
SoleDutyNum = MillionsMonthlyReport.SoleDutyNum,
|
||||
};
|
||||
|
||||
Funs.DB.Information_MillionsMonthlyReport.InsertOnSubmit(newMillionsMonthlyReport);
|
||||
@@ -67,9 +83,9 @@ namespace BLL
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改百万工时安全统计月报表
|
||||
/// 修改企业安全数据统计月报
|
||||
/// </summary>
|
||||
/// <param name="MillionsMonthlyReport">百万工时安全统计月报表实体</param>
|
||||
/// <param name="MillionsMonthlyReport">企业安全数据统计月报实体</param>
|
||||
public static void UpdateMillionsMonthlyReport(Model.Information_MillionsMonthlyReport MillionsMonthlyReport)
|
||||
{
|
||||
Model.Information_MillionsMonthlyReport newMillionsMonthlyReport = Funs.DB.Information_MillionsMonthlyReport.FirstOrDefault(e => e.MillionsMonthlyReportId == MillionsMonthlyReport.MillionsMonthlyReportId);
|
||||
@@ -88,6 +104,22 @@ namespace BLL
|
||||
newMillionsMonthlyReport.UpState = MillionsMonthlyReport.UpState;
|
||||
newMillionsMonthlyReport.HandleState = MillionsMonthlyReport.HandleState;
|
||||
newMillionsMonthlyReport.HandleMan = MillionsMonthlyReport.HandleMan;
|
||||
newMillionsMonthlyReport.InputCosts = MillionsMonthlyReport.InputCosts;
|
||||
newMillionsMonthlyReport.TrainNum = MillionsMonthlyReport.TrainNum;
|
||||
newMillionsMonthlyReport.GeneralHazardNum = MillionsMonthlyReport.GeneralHazardNum;
|
||||
newMillionsMonthlyReport.MajorHazardNum = MillionsMonthlyReport.MajorHazardNum;
|
||||
newMillionsMonthlyReport.NotProofLargeProjectNum = MillionsMonthlyReport.NotProofLargeProjectNum;
|
||||
newMillionsMonthlyReport.ProofLargeProjectNum = MillionsMonthlyReport.ProofLargeProjectNum;
|
||||
newMillionsMonthlyReport.FireLicenseNum = MillionsMonthlyReport.FireLicenseNum;
|
||||
newMillionsMonthlyReport.LimitLicenseNum = MillionsMonthlyReport.LimitLicenseNum;
|
||||
newMillionsMonthlyReport.HighLicenseNum = MillionsMonthlyReport.HighLicenseNum;
|
||||
newMillionsMonthlyReport.HoistingLicenseNum = MillionsMonthlyReport.HoistingLicenseNum;
|
||||
newMillionsMonthlyReport.BreakGroundLicenseNum = MillionsMonthlyReport.BreakGroundLicenseNum;
|
||||
newMillionsMonthlyReport.ElectricityLicenseNum = MillionsMonthlyReport.ElectricityLicenseNum;
|
||||
newMillionsMonthlyReport.RTLicenseNum = MillionsMonthlyReport.RTLicenseNum;
|
||||
newMillionsMonthlyReport.NightLicenseNum = MillionsMonthlyReport.NightLicenseNum;
|
||||
newMillionsMonthlyReport.CommissionerNum = MillionsMonthlyReport.CommissionerNum;
|
||||
newMillionsMonthlyReport.SoleDutyNum = MillionsMonthlyReport.SoleDutyNum;
|
||||
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 质量管理工作总结报告
|
||||
/// </summary>
|
||||
public static class QualityWorkSummaryReportService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取质量管理工作总结报告
|
||||
/// </summary>
|
||||
/// <param name="qualityWorkSummaryReportId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Information_QualityWorkSummaryReport GetQualityWorkSummaryReportById(string qualityWorkSummaryReportId)
|
||||
{
|
||||
return Funs.DB.Information_QualityWorkSummaryReport.FirstOrDefault(e => e.QualityWorkSummaryReportId == qualityWorkSummaryReportId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 质量管理工作总结报告
|
||||
/// </summary>
|
||||
/// <param name="unitId">单位Id</param>
|
||||
/// <param name="year">年度</param>
|
||||
/// <returns>质量管理工作总结报告</returns>
|
||||
public static Model.Information_QualityWorkSummaryReport GetQualityWorkSummaryReportByUnitIdAndYear(string unitId, int year)
|
||||
{
|
||||
return Funs.DB.Information_QualityWorkSummaryReport.FirstOrDefault(e => e.UnitId == unitId && e.YearId == year);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加质量管理工作总结报告
|
||||
/// </summary>
|
||||
/// <param name="qualityWorkSummaryReport"></param>
|
||||
public static void AddQualityWorkSummaryReport(Model.Information_QualityWorkSummaryReport qualityWorkSummaryReport)
|
||||
{
|
||||
Model.Information_QualityWorkSummaryReport newQualityWorkSummaryReport = new Model.Information_QualityWorkSummaryReport
|
||||
{
|
||||
QualityWorkSummaryReportId = qualityWorkSummaryReport.QualityWorkSummaryReportId,
|
||||
YearId = qualityWorkSummaryReport.YearId,
|
||||
UnitId = qualityWorkSummaryReport.UnitId,
|
||||
ResponsiblePerson = qualityWorkSummaryReport.ResponsiblePerson,
|
||||
ResponsiblePersonTel = qualityWorkSummaryReport.ResponsiblePersonTel,
|
||||
ContactPerson = qualityWorkSummaryReport.ContactPerson,
|
||||
ContactPersonTel = qualityWorkSummaryReport.ContactPersonTel,
|
||||
ReportDate = qualityWorkSummaryReport.ReportDate,
|
||||
Performance = qualityWorkSummaryReport.Performance,
|
||||
AccidentSituation = qualityWorkSummaryReport.AccidentSituation,
|
||||
Awards = qualityWorkSummaryReport.Awards,
|
||||
WorkDevelopment = qualityWorkSummaryReport.WorkDevelopment,
|
||||
PersonnelTraining = qualityWorkSummaryReport.PersonnelTraining,
|
||||
CheckSituation = qualityWorkSummaryReport.CheckSituation,
|
||||
ManagementActivity = qualityWorkSummaryReport.ManagementActivity,
|
||||
WorkExperience = qualityWorkSummaryReport.WorkExperience,
|
||||
Countermeasures = qualityWorkSummaryReport.Countermeasures,
|
||||
NextYearWorkPlan = qualityWorkSummaryReport.NextYearWorkPlan,
|
||||
JobSuggestion = qualityWorkSummaryReport.JobSuggestion,
|
||||
UpState = qualityWorkSummaryReport.UpState
|
||||
};
|
||||
Funs.DB.Information_QualityWorkSummaryReport.InsertOnSubmit(newQualityWorkSummaryReport);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改质量管理工作总结报告
|
||||
/// </summary>
|
||||
/// <param name="qualityWorkSummaryReport"></param>
|
||||
public static void UpdateQualityWorkSummaryReport(Model.Information_QualityWorkSummaryReport qualityWorkSummaryReport)
|
||||
{
|
||||
Model.Information_QualityWorkSummaryReport newQualityWorkSummaryReport = Funs.DB.Information_QualityWorkSummaryReport.FirstOrDefault(e => e.QualityWorkSummaryReportId == qualityWorkSummaryReport.QualityWorkSummaryReportId);
|
||||
if (newQualityWorkSummaryReport != null)
|
||||
{
|
||||
newQualityWorkSummaryReport.UnitId = qualityWorkSummaryReport.UnitId;
|
||||
newQualityWorkSummaryReport.YearId = qualityWorkSummaryReport.YearId;
|
||||
newQualityWorkSummaryReport.ResponsiblePerson = qualityWorkSummaryReport.ResponsiblePerson;
|
||||
newQualityWorkSummaryReport.ResponsiblePersonTel = qualityWorkSummaryReport.ResponsiblePersonTel;
|
||||
newQualityWorkSummaryReport.ContactPerson = qualityWorkSummaryReport.ContactPerson;
|
||||
newQualityWorkSummaryReport.ContactPersonTel = qualityWorkSummaryReport.ContactPersonTel;
|
||||
newQualityWorkSummaryReport.ReportDate = qualityWorkSummaryReport.ReportDate;
|
||||
newQualityWorkSummaryReport.Performance = qualityWorkSummaryReport.Performance;
|
||||
newQualityWorkSummaryReport.AccidentSituation = qualityWorkSummaryReport.AccidentSituation;
|
||||
newQualityWorkSummaryReport.Awards = qualityWorkSummaryReport.Awards;
|
||||
newQualityWorkSummaryReport.WorkDevelopment = qualityWorkSummaryReport.WorkDevelopment;
|
||||
newQualityWorkSummaryReport.PersonnelTraining = qualityWorkSummaryReport.PersonnelTraining;
|
||||
newQualityWorkSummaryReport.CheckSituation = qualityWorkSummaryReport.CheckSituation;
|
||||
newQualityWorkSummaryReport.ManagementActivity = qualityWorkSummaryReport.ManagementActivity;
|
||||
newQualityWorkSummaryReport.WorkExperience = qualityWorkSummaryReport.WorkExperience;
|
||||
newQualityWorkSummaryReport.Countermeasures = qualityWorkSummaryReport.Countermeasures;
|
||||
newQualityWorkSummaryReport.NextYearWorkPlan = qualityWorkSummaryReport.NextYearWorkPlan;
|
||||
newQualityWorkSummaryReport.JobSuggestion = qualityWorkSummaryReport.JobSuggestion;
|
||||
newQualityWorkSummaryReport.UpState = qualityWorkSummaryReport.UpState;
|
||||
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除质量管理工作总结报告
|
||||
/// </summary>
|
||||
/// <param name="QualityWorkSummaryReportId"></param>
|
||||
public static void DeleteQualityWorkSummaryReportById(string QualityWorkSummaryReportId)
|
||||
{
|
||||
Model.Information_QualityWorkSummaryReport qualityWorkSummaryReport = Funs.DB.Information_QualityWorkSummaryReport.FirstOrDefault(e => e.QualityWorkSummaryReportId == QualityWorkSummaryReportId);
|
||||
if (qualityWorkSummaryReport != null)
|
||||
{
|
||||
Funs.DB.Information_QualityWorkSummaryReport.DeleteOnSubmit(qualityWorkSummaryReport);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,146 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 季度工程项目质量信息表
|
||||
/// </summary>
|
||||
public static class QuarterlyProjectQualityService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取季度工程项目质量信息表
|
||||
/// </summary>
|
||||
/// <param name="quarterlyProjectQualityId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Information_QuarterlyProjectQuality GetQuarterlyProjectQualityById(string quarterlyProjectQualityId)
|
||||
{
|
||||
return Funs.DB.Information_QuarterlyProjectQuality.FirstOrDefault(e => e.QuarterlyProjectQualityId == quarterlyProjectQualityId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 季度工程项目质量信息表
|
||||
/// </summary>
|
||||
/// <param name="unitId">单位Id</param>
|
||||
/// <param name="year">年度</param>
|
||||
/// <param name="quarter">季度</param>
|
||||
/// <returns>季度工程项目质量信息表</returns>
|
||||
public static Model.Information_QuarterlyProjectQuality GetQuarterlyProjectQualityByUnitIdAndYearAndQuarter(string unitId, int year,int quarter)
|
||||
{
|
||||
return Funs.DB.Information_QuarterlyProjectQuality.FirstOrDefault(e => e.UnitId == unitId && e.Year == year && e.Quarter == quarter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加季度工程项目质量信息表
|
||||
/// </summary>
|
||||
/// <param name="quarterlyProjectQuality"></param>
|
||||
public static void AddQuarterlyProjectQuality(Model.Information_QuarterlyProjectQuality quarterlyProjectQuality)
|
||||
{
|
||||
Model.Information_QuarterlyProjectQuality newQuarterlyProjectQuality = new Model.Information_QuarterlyProjectQuality
|
||||
{
|
||||
QuarterlyProjectQualityId = quarterlyProjectQuality.QuarterlyProjectQualityId,
|
||||
UnitId = quarterlyProjectQuality.UnitId,
|
||||
Year = quarterlyProjectQuality.Year,
|
||||
Quarter = quarterlyProjectQuality.Quarter,
|
||||
QualityManagePersonNum = quarterlyProjectQuality.QualityManagePersonNum,
|
||||
AdvancedTitlePersonNum = quarterlyProjectQuality.AdvancedTitlePersonNum,
|
||||
IntermediateTitlePersonNum = quarterlyProjectQuality.IntermediateTitlePersonNum,
|
||||
BeImplementedProjectNum = quarterlyProjectQuality.BeImplementedProjectNum,
|
||||
StartImplementedProjectNum = quarterlyProjectQuality.StartImplementedProjectNum,
|
||||
AccumulativeStartImplemented = quarterlyProjectQuality.AccumulativeStartImplemented,
|
||||
CompleteProjectNum = quarterlyProjectQuality.CompleteProjectNum,
|
||||
YearCompleteProjectNum = quarterlyProjectQuality.YearCompleteProjectNum,
|
||||
QuarterTotal = quarterlyProjectQuality.QuarterTotal,
|
||||
QuarterFirstPassNum = quarterlyProjectQuality.QuarterFirstPassNum,
|
||||
QuarterFirstPassRate = quarterlyProjectQuality.QuarterFirstPassRate,
|
||||
YearTotal = quarterlyProjectQuality.YearTotal,
|
||||
YearFirstPassNum = quarterlyProjectQuality.YearFirstPassNum,
|
||||
YearFirstPassRate = quarterlyProjectQuality.YearFirstPassRate,
|
||||
QuaterCheckSuperviseNum = quarterlyProjectQuality.QuaterCheckSuperviseNum,
|
||||
QuaterCorrectiveNoticeNum = quarterlyProjectQuality.QuaterCorrectiveNoticeNum,
|
||||
QuaterQualityProblemNum = quarterlyProjectQuality.QuaterQualityProblemNum,
|
||||
QuaterClosedQualityProblemNum = quarterlyProjectQuality.QuaterClosedQualityProblemNum,
|
||||
YearCheckSuperviseNum = quarterlyProjectQuality.YearCheckSuperviseNum,
|
||||
YearCorrectiveNoticeNum = quarterlyProjectQuality.YearCorrectiveNoticeNum,
|
||||
YearQualityProblemNum = quarterlyProjectQuality.YearQualityProblemNum,
|
||||
YearClosedQualityProblemNum = quarterlyProjectQuality.YearClosedQualityProblemNum,
|
||||
QuaterQualityAccidentNum = quarterlyProjectQuality.QuaterQualityAccidentNum,
|
||||
QuaterDirectEconomicLoss = quarterlyProjectQuality.QuaterDirectEconomicLoss,
|
||||
YearQualityAccidentNum = quarterlyProjectQuality.YearQualityAccidentNum,
|
||||
YearDirectEconomicLoss = quarterlyProjectQuality.YearDirectEconomicLoss,
|
||||
ResponsiblePerson = quarterlyProjectQuality.ResponsiblePerson,
|
||||
CompileMan = quarterlyProjectQuality.CompileMan,
|
||||
CompileDate = quarterlyProjectQuality.CompileDate,
|
||||
Tel = quarterlyProjectQuality.Tel,
|
||||
UpState = quarterlyProjectQuality.UpState
|
||||
};
|
||||
Funs.DB.Information_QuarterlyProjectQuality.InsertOnSubmit(newQuarterlyProjectQuality);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改季度工程项目质量信息表
|
||||
/// </summary>
|
||||
/// <param name="quarterlyProjectQuality"></param>
|
||||
public static void UpdateQuarterlyProjectQuality(Model.Information_QuarterlyProjectQuality quarterlyProjectQuality)
|
||||
{
|
||||
Model.Information_QuarterlyProjectQuality newQuarterlyProjectQuality = Funs.DB.Information_QuarterlyProjectQuality.FirstOrDefault(e => e.QuarterlyProjectQualityId == quarterlyProjectQuality.QuarterlyProjectQualityId);
|
||||
if (newQuarterlyProjectQuality != null)
|
||||
{
|
||||
newQuarterlyProjectQuality.UnitId = quarterlyProjectQuality.UnitId;
|
||||
newQuarterlyProjectQuality.Year = quarterlyProjectQuality.Year;
|
||||
newQuarterlyProjectQuality.Quarter = quarterlyProjectQuality.Quarter;
|
||||
newQuarterlyProjectQuality.QualityManagePersonNum = quarterlyProjectQuality.QualityManagePersonNum;
|
||||
newQuarterlyProjectQuality.AdvancedTitlePersonNum = quarterlyProjectQuality.AdvancedTitlePersonNum;
|
||||
newQuarterlyProjectQuality.IntermediateTitlePersonNum = quarterlyProjectQuality.IntermediateTitlePersonNum;
|
||||
newQuarterlyProjectQuality.BeImplementedProjectNum = quarterlyProjectQuality.BeImplementedProjectNum;
|
||||
newQuarterlyProjectQuality.StartImplementedProjectNum = quarterlyProjectQuality.StartImplementedProjectNum;
|
||||
newQuarterlyProjectQuality.AccumulativeStartImplemented = quarterlyProjectQuality.AccumulativeStartImplemented;
|
||||
newQuarterlyProjectQuality.CompleteProjectNum = quarterlyProjectQuality.CompleteProjectNum;
|
||||
newQuarterlyProjectQuality.YearCompleteProjectNum = quarterlyProjectQuality.YearCompleteProjectNum;
|
||||
newQuarterlyProjectQuality.QuarterTotal = quarterlyProjectQuality.QuarterTotal;
|
||||
newQuarterlyProjectQuality.QuarterFirstPassNum = quarterlyProjectQuality.QuarterFirstPassNum;
|
||||
newQuarterlyProjectQuality.QuarterFirstPassRate = quarterlyProjectQuality.QuarterFirstPassRate;
|
||||
newQuarterlyProjectQuality.YearTotal = quarterlyProjectQuality.YearTotal;
|
||||
newQuarterlyProjectQuality.YearFirstPassNum = quarterlyProjectQuality.YearFirstPassNum;
|
||||
newQuarterlyProjectQuality.YearFirstPassRate = quarterlyProjectQuality.YearFirstPassRate;
|
||||
newQuarterlyProjectQuality.QuaterCheckSuperviseNum = quarterlyProjectQuality.QuaterCheckSuperviseNum;
|
||||
newQuarterlyProjectQuality.QuaterCorrectiveNoticeNum = quarterlyProjectQuality.QuaterCorrectiveNoticeNum;
|
||||
newQuarterlyProjectQuality.QuaterQualityProblemNum = quarterlyProjectQuality.QuaterQualityProblemNum;
|
||||
newQuarterlyProjectQuality.QuaterClosedQualityProblemNum = quarterlyProjectQuality.QuaterClosedQualityProblemNum;
|
||||
newQuarterlyProjectQuality.YearCheckSuperviseNum = quarterlyProjectQuality.YearCheckSuperviseNum;
|
||||
newQuarterlyProjectQuality.YearCorrectiveNoticeNum = quarterlyProjectQuality.YearCorrectiveNoticeNum;
|
||||
newQuarterlyProjectQuality.YearQualityProblemNum = quarterlyProjectQuality.YearQualityProblemNum;
|
||||
newQuarterlyProjectQuality.YearClosedQualityProblemNum = quarterlyProjectQuality.YearClosedQualityProblemNum;
|
||||
newQuarterlyProjectQuality.QuaterQualityAccidentNum = quarterlyProjectQuality.QuaterQualityAccidentNum;
|
||||
newQuarterlyProjectQuality.QuaterDirectEconomicLoss = quarterlyProjectQuality.QuaterDirectEconomicLoss;
|
||||
newQuarterlyProjectQuality.YearQualityAccidentNum = quarterlyProjectQuality.YearQualityAccidentNum;
|
||||
newQuarterlyProjectQuality.YearDirectEconomicLoss = quarterlyProjectQuality.YearDirectEconomicLoss;
|
||||
newQuarterlyProjectQuality.ResponsiblePerson = quarterlyProjectQuality.ResponsiblePerson;
|
||||
newQuarterlyProjectQuality.CompileMan = quarterlyProjectQuality.CompileMan;
|
||||
newQuarterlyProjectQuality.CompileDate = quarterlyProjectQuality.CompileDate;
|
||||
newQuarterlyProjectQuality.Tel = quarterlyProjectQuality.Tel;
|
||||
newQuarterlyProjectQuality.UpState = quarterlyProjectQuality.UpState;
|
||||
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除季度工程项目质量信息表
|
||||
/// </summary>
|
||||
/// <param name="quarterlyProjectQualityId"></param>
|
||||
public static void DeleteQuarterlyProjectQualityById(string quarterlyProjectQualityId)
|
||||
{
|
||||
Model.Information_QuarterlyProjectQuality quarterlyProjectQuality = Funs.DB.Information_QuarterlyProjectQuality.FirstOrDefault(e => e.QuarterlyProjectQualityId == quarterlyProjectQualityId);
|
||||
if (quarterlyProjectQuality != null)
|
||||
{
|
||||
Funs.DB.Information_QuarterlyProjectQuality.DeleteOnSubmit(quarterlyProjectQuality);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 实业安全简报
|
||||
/// </summary>
|
||||
public static class SafetyBriefingService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取实业安全简报
|
||||
/// </summary>
|
||||
/// <param name="safetyBriefingId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Information_SafetyBriefing GetSafetyBriefingById(string safetyBriefingId)
|
||||
{
|
||||
return Funs.DB.Information_SafetyBriefing.FirstOrDefault(e => e.SafetyBriefingId == safetyBriefingId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 实业安全简报
|
||||
/// </summary>
|
||||
/// <param name="unitId">单位Id</param>
|
||||
/// <param name="year">年度</param>
|
||||
/// <param name="month">月份</param>
|
||||
/// <returns>实业安全简报</returns>
|
||||
public static Model.Information_SafetyBriefing GetSafetyBriefingByUnitIdAndYearAndMonth(string unitId, int year,int month)
|
||||
{
|
||||
return Funs.DB.Information_SafetyBriefing.FirstOrDefault(e => e.UnitId == unitId && e.YearId == year && e.Month == month);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加实业安全简报
|
||||
/// </summary>
|
||||
/// <param name="safetyBriefing"></param>
|
||||
public static void AddSafetyBriefing(Model.Information_SafetyBriefing safetyBriefing)
|
||||
{
|
||||
Model.Information_SafetyBriefing newSafetyBriefing = new Model.Information_SafetyBriefing
|
||||
{
|
||||
SafetyBriefingId = safetyBriefing.SafetyBriefingId,
|
||||
UnitId = safetyBriefing.UnitId,
|
||||
YearId = safetyBriefing.YearId,
|
||||
Month = safetyBriefing.Month,
|
||||
CompileMan = safetyBriefing.CompileMan,
|
||||
CompileDate = safetyBriefing.CompileDate,
|
||||
Auditor = safetyBriefing.Auditor,
|
||||
Approver = safetyBriefing.Approver,
|
||||
MainWork=safetyBriefing.MainWork,
|
||||
HazardRecording=safetyBriefing.HazardRecording,
|
||||
SafetyAccident=safetyBriefing.SafetyAccident,
|
||||
EPAccident=safetyBriefing.EPAccident,
|
||||
OHAccident=safetyBriefing.OHAccident,
|
||||
WorkPermitNum=safetyBriefing.WorkPermitNum,
|
||||
HiddenDangerDetection=safetyBriefing.HiddenDangerDetection,
|
||||
RectificationSituation=safetyBriefing.RectificationSituation,
|
||||
CheckProblemsRectification=safetyBriefing.CheckProblemsRectification,
|
||||
PendingProject=safetyBriefing.PendingProject,
|
||||
ContractorManagement=safetyBriefing.ContractorManagement,
|
||||
EnvironmentalEmissions=safetyBriefing.EnvironmentalEmissions,
|
||||
NextMonthWorkPlan=safetyBriefing.NextMonthWorkPlan,
|
||||
UpState = safetyBriefing.UpState
|
||||
};
|
||||
Funs.DB.Information_SafetyBriefing.InsertOnSubmit(newSafetyBriefing);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改实业安全简报
|
||||
/// </summary>
|
||||
/// <param name="safetyBriefing"></param>
|
||||
public static void UpdateSafetyBriefing(Model.Information_SafetyBriefing safetyBriefing)
|
||||
{
|
||||
Model.Information_SafetyBriefing newSafetyBriefing = Funs.DB.Information_SafetyBriefing.FirstOrDefault(e => e.SafetyBriefingId == safetyBriefing.SafetyBriefingId);
|
||||
if (newSafetyBriefing != null)
|
||||
{
|
||||
newSafetyBriefing.UnitId = safetyBriefing.UnitId;
|
||||
newSafetyBriefing.YearId = safetyBriefing.YearId;
|
||||
newSafetyBriefing.Month = safetyBriefing.Month;
|
||||
newSafetyBriefing.CompileMan = safetyBriefing.CompileMan;
|
||||
newSafetyBriefing.CompileDate = safetyBriefing.CompileDate;
|
||||
newSafetyBriefing.Auditor = safetyBriefing.Auditor;
|
||||
newSafetyBriefing.Approver = safetyBriefing.Approver;
|
||||
newSafetyBriefing.MainWork = safetyBriefing.MainWork;
|
||||
newSafetyBriefing.HazardRecording = safetyBriefing.HazardRecording;
|
||||
newSafetyBriefing.SafetyAccident = safetyBriefing.SafetyAccident;
|
||||
newSafetyBriefing.EPAccident = safetyBriefing.EPAccident;
|
||||
newSafetyBriefing.OHAccident = safetyBriefing.OHAccident;
|
||||
newSafetyBriefing.WorkPermitNum = safetyBriefing.WorkPermitNum;
|
||||
newSafetyBriefing.HiddenDangerDetection = safetyBriefing.HiddenDangerDetection;
|
||||
newSafetyBriefing.RectificationSituation = safetyBriefing.RectificationSituation;
|
||||
newSafetyBriefing.CheckProblemsRectification = safetyBriefing.CheckProblemsRectification;
|
||||
newSafetyBriefing.PendingProject = safetyBriefing.PendingProject;
|
||||
newSafetyBriefing.ContractorManagement = safetyBriefing.ContractorManagement;
|
||||
newSafetyBriefing.EnvironmentalEmissions = safetyBriefing.EnvironmentalEmissions;
|
||||
newSafetyBriefing.NextMonthWorkPlan = safetyBriefing.NextMonthWorkPlan;
|
||||
newSafetyBriefing.UpState = safetyBriefing.UpState;
|
||||
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除实业安全简报
|
||||
/// </summary>
|
||||
/// <param name="safetyBriefingId"></param>
|
||||
public static void DeleteSafetyBriefingById(string safetyBriefingId)
|
||||
{
|
||||
Model.Information_SafetyBriefing safetyBriefing = Funs.DB.Information_SafetyBriefing.FirstOrDefault(e => e.SafetyBriefingId == safetyBriefingId);
|
||||
if (safetyBriefing != null)
|
||||
{
|
||||
Funs.DB.Information_SafetyBriefing.DeleteOnSubmit(safetyBriefing);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,11 +21,11 @@ namespace BLL
|
||||
public static void SetComplete(string unitId, string reportType, string year, string value)
|
||||
{
|
||||
Model.Information_UrgeReport urgeReport = new Model.Information_UrgeReport();
|
||||
if (reportType == Const.ReportType_1 || reportType == Const.ReportType_2)
|
||||
if (reportType == Const.ReportType_1 || reportType == Const.ReportType_2 || reportType == Const.ReportType_8)
|
||||
{
|
||||
urgeReport = Funs.DB.Information_UrgeReport.FirstOrDefault(x => x.UnitId == unitId && x.ReprotType == reportType && x.YearId == year && x.MonthId == value);
|
||||
}
|
||||
else if (reportType == Const.ReportType_3 || reportType == Const.ReportType_4)
|
||||
else if (reportType == Const.ReportType_3 || reportType == Const.ReportType_4 || reportType == Const.ReportType_9)
|
||||
{
|
||||
urgeReport = Funs.DB.Information_UrgeReport.FirstOrDefault(x => x.UnitId == unitId && x.ReprotType == reportType && x.YearId == year && x.QuarterId == value);
|
||||
}
|
||||
@@ -33,6 +33,10 @@ namespace BLL
|
||||
{
|
||||
urgeReport = Funs.DB.Information_UrgeReport.FirstOrDefault(x => x.UnitId == unitId && x.ReprotType == reportType && x.YearId == year && x.HalfYearId == value);
|
||||
}
|
||||
else if (reportType == Const.ReportType_6 || reportType == Const.ReportType_7 || reportType == Const.ReportType_10)
|
||||
{
|
||||
urgeReport = Funs.DB.Information_UrgeReport.FirstOrDefault(x => x.UnitId == unitId && x.ReprotType == reportType && x.YearId == year);
|
||||
}
|
||||
if (urgeReport != null)
|
||||
{
|
||||
urgeReport.IsComplete = true;
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 安全管理工作总结报告
|
||||
/// </summary>
|
||||
public static class WorkSummaryReportService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取安全管理工作总结报告
|
||||
/// </summary>
|
||||
/// <param name="workSummaryReportId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Information_WorkSummaryReport GetWorkSummaryReportById(string workSummaryReportId)
|
||||
{
|
||||
return Funs.DB.Information_WorkSummaryReport.FirstOrDefault(e => e.WorkSummaryReportId == workSummaryReportId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 安全管理工作总结报告
|
||||
/// </summary>
|
||||
/// <param name="unitId">单位Id</param>
|
||||
/// <param name="year">年度</param>
|
||||
/// <returns>安全管理工作总结报告</returns>
|
||||
public static Model.Information_WorkSummaryReport GetWorkSummaryReportByUnitIdAndYear(string unitId, int year)
|
||||
{
|
||||
return Funs.DB.Information_WorkSummaryReport.FirstOrDefault(e => e.UnitId == unitId && e.YearId == year);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加安全管理工作总结报告
|
||||
/// </summary>
|
||||
/// <param name="workSummaryReport"></param>
|
||||
public static void AddWorkSummaryReport(Model.Information_WorkSummaryReport workSummaryReport)
|
||||
{
|
||||
Model.Information_WorkSummaryReport newWorkSummaryReport = new Model.Information_WorkSummaryReport
|
||||
{
|
||||
WorkSummaryReportId = workSummaryReport.WorkSummaryReportId,
|
||||
YearId = workSummaryReport.YearId,
|
||||
UnitId = workSummaryReport.UnitId,
|
||||
ResponsiblePerson = workSummaryReport.ResponsiblePerson,
|
||||
ResponsiblePersonTel = workSummaryReport.ResponsiblePersonTel,
|
||||
ContactPerson = workSummaryReport.ContactPerson,
|
||||
ContactPersonTel = workSummaryReport.ContactPersonTel,
|
||||
ReportDate = workSummaryReport.ReportDate,
|
||||
SafeLaborTime = workSummaryReport.SafeLaborTime,
|
||||
SafetyObjectives = workSummaryReport.SafetyObjectives,
|
||||
AccidentSituation = workSummaryReport.AccidentSituation,
|
||||
Awards = workSummaryReport.Awards,
|
||||
WorkDevelopment = workSummaryReport.WorkDevelopment,
|
||||
PersonnelTraining = workSummaryReport.PersonnelTraining,
|
||||
GovernanceSituation = workSummaryReport.GovernanceSituation,
|
||||
ManagementActivity = workSummaryReport.ManagementActivity,
|
||||
WorkExperience = workSummaryReport.WorkExperience,
|
||||
Countermeasures = workSummaryReport.Countermeasures,
|
||||
NextYearWorkPlan = workSummaryReport.NextYearWorkPlan,
|
||||
JobSuggestion = workSummaryReport.JobSuggestion,
|
||||
UpState = workSummaryReport.UpState
|
||||
};
|
||||
Funs.DB.Information_WorkSummaryReport.InsertOnSubmit(newWorkSummaryReport);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改安全管理工作总结报告
|
||||
/// </summary>
|
||||
/// <param name="workSummaryReport"></param>
|
||||
public static void UpdateWorkSummaryReport(Model.Information_WorkSummaryReport workSummaryReport)
|
||||
{
|
||||
Model.Information_WorkSummaryReport newWorkSummaryReport = Funs.DB.Information_WorkSummaryReport.FirstOrDefault(e => e.WorkSummaryReportId == workSummaryReport.WorkSummaryReportId);
|
||||
if (newWorkSummaryReport != null)
|
||||
{
|
||||
newWorkSummaryReport.UnitId = workSummaryReport.UnitId;
|
||||
newWorkSummaryReport.YearId = workSummaryReport.YearId;
|
||||
newWorkSummaryReport.ResponsiblePerson = workSummaryReport.ResponsiblePerson;
|
||||
newWorkSummaryReport.ResponsiblePersonTel = workSummaryReport.ResponsiblePersonTel;
|
||||
newWorkSummaryReport.ContactPerson = workSummaryReport.ContactPerson;
|
||||
newWorkSummaryReport.ContactPersonTel = workSummaryReport.ContactPersonTel;
|
||||
newWorkSummaryReport.ReportDate = workSummaryReport.ReportDate;
|
||||
newWorkSummaryReport.SafeLaborTime = workSummaryReport.SafeLaborTime;
|
||||
newWorkSummaryReport.SafetyObjectives = workSummaryReport.SafetyObjectives;
|
||||
newWorkSummaryReport.AccidentSituation = workSummaryReport.AccidentSituation;
|
||||
newWorkSummaryReport.Awards = workSummaryReport.Awards;
|
||||
newWorkSummaryReport.WorkDevelopment = workSummaryReport.WorkDevelopment;
|
||||
newWorkSummaryReport.PersonnelTraining = workSummaryReport.PersonnelTraining;
|
||||
newWorkSummaryReport.GovernanceSituation = workSummaryReport.GovernanceSituation;
|
||||
newWorkSummaryReport.ManagementActivity = workSummaryReport.ManagementActivity;
|
||||
newWorkSummaryReport.WorkExperience = workSummaryReport.WorkExperience;
|
||||
newWorkSummaryReport.Countermeasures = workSummaryReport.Countermeasures;
|
||||
newWorkSummaryReport.NextYearWorkPlan = workSummaryReport.NextYearWorkPlan;
|
||||
newWorkSummaryReport.JobSuggestion = workSummaryReport.JobSuggestion;
|
||||
newWorkSummaryReport.UpState = workSummaryReport.UpState;
|
||||
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除安全管理工作总结报告
|
||||
/// </summary>
|
||||
/// <param name="workSummaryReportId"></param>
|
||||
public static void DeleteWorkSummaryReportById(string workSummaryReportId)
|
||||
{
|
||||
Model.Information_WorkSummaryReport workSummaryReport = Funs.DB.Information_WorkSummaryReport.FirstOrDefault(e => e.WorkSummaryReportId == workSummaryReportId);
|
||||
if (workSummaryReport != null)
|
||||
{
|
||||
Funs.DB.Information_WorkSummaryReport.DeleteOnSubmit(workSummaryReport);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user