代码无效引用清理,试压包资料界面看板修改

This commit is contained in:
2025-10-10 14:33:21 +08:00
parent 87fb529521
commit 55b798135c
933 changed files with 5897 additions and 7541 deletions
+1 -2
View File
@@ -2,12 +2,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BLL
{
public static class BaseDataService
public static class BaseDataService
{
public static List<string> BeUnderConstructionList = GetBeUnderConstruction().Select(p => p.ProjectId).ToList();
+1 -5
View File
@@ -1,15 +1,11 @@
using BLL;
using FineUIPro;
using Model;
using FineUIPro;
using Model;
using Newtonsoft.Json;
using NPOI.POIFS.Crypt.Dsig;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Web.UI.WebControls;
namespace BLL
{
@@ -3,8 +3,6 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model;
namespace BLL
@@ -29,7 +27,7 @@ namespace BLL
(string.IsNullOrEmpty(table.UnitId) || x.UnitId.Contains(table.UnitId)) &&
(string.IsNullOrEmpty(table.CollCropCode) || x.CollCropCode.Contains(table.CollCropCode)) &&
(string.IsNullOrEmpty(table.UnitName) || x.UnitName.Contains(table.UnitName)) &&
(string.IsNullOrEmpty(table.DefectName) || x.DefectName.Contains(table.DefectName))
(string.IsNullOrEmpty(table.DefectName) || x.DefectName.Contains(table.DefectName))
select x
;
@@ -49,7 +47,7 @@ namespace BLL
{
return null;
}
// q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
// q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
return from x in q
select new
{
@@ -73,7 +71,7 @@ namespace BLL
{
var q = from x in Funs.DB.HJGLData_Defect
where x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0
select x;
select x;
return q.ToList();
}
@@ -137,7 +135,7 @@ namespace BLL
db.HJGLData_Defect.DeleteAllOnSubmit(table);
db.SubmitChanges();
}
}
}
}
}
+12 -14
View File
@@ -1,13 +1,11 @@
using FineUIPro;
using Model;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json.Linq;
using Model;
using System.Net.PeerToPeer;
using System.Threading.Tasks;
namespace BLL
@@ -170,11 +168,11 @@ namespace BLL
return GetCNCEC_16TodayHJGLData_HJGL();
}
/* var q = GetTodayData();
if (q != null && q.State == Const.CNCEC_State_S)
data = StatisticalData();
else
data = StatisticalData();*/
/* var q = GetTodayData();
if (q != null && q.State == Const.CNCEC_State_S)
data = StatisticalData();
else
data = StatisticalData();*/
var modelTask = StatisticalDataAsync();
var model = await modelTask;
@@ -335,8 +333,8 @@ namespace BLL
var welderNum = await welderNumTask;
var dineInfoList = await dineInfoListTask;
var chCheckItemList = await chCheckItemListTask;
var table = new HJGLData_HJGL
{
UnitId = thisUnitId,
@@ -380,7 +378,7 @@ namespace BLL
// 获取达因信息
var dineInfo = dineInfoDict.TryGetValue(projectid, out var dineData)
? dineData
: new { TotalDineNum = (decimal ?)0, CompleteDineNum = (decimal?)0 };
: new { TotalDineNum = (decimal?)0, CompleteDineNum = (decimal?)0 };
// 获取拍片信息
var chCheckItem = chCheckItemDict.TryGetValue(projectid, out var checkData)
@@ -396,7 +394,7 @@ namespace BLL
UnitName = baseUnit.UnitName,
ReportDate = DateTime.Now.Date,
WelderNum = welderCount,
TotalDineNum = Convert.ToInt32 (dineInfo.TotalDineNum),
TotalDineNum = Convert.ToInt32(dineInfo.TotalDineNum),
CompleteDineNum = Convert.ToInt32(dineInfo.CompleteDineNum),
TotalFilmNum = chCheckItem.TotalFilmNum,
OKFilmNum = chCheckItem.OKFilmNum,
@@ -464,7 +462,7 @@ namespace BLL
}
/// <summary>
/// 获取焊工总数
/// </summary>
@@ -508,7 +506,7 @@ namespace BLL
DoneDin = g.Sum(x => x.Dia)
});
return result;
}
}
public static async Task<IEnumerable<WeldDineOutput>> GetDineInfoAsync()
{
return await Task.Run(GetDineInfo);
@@ -1,15 +1,11 @@
using System;
using FineUIPro;
using Model;
using Newtonsoft.Json;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices.ComTypes;
using System.Runtime.Remoting.Contexts;
using System.Threading.Tasks;
using System.Web.UI.WebControls;
using Aspose.Words.Lists;
using FineUIPro;
using Model;
using Newtonsoft.Json;
namespace BLL
{
@@ -3,8 +3,6 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model;
namespace BLL
@@ -29,7 +27,7 @@ namespace BLL
(string.IsNullOrEmpty(table.UnitId) || x.UnitId.Contains(table.UnitId)) &&
(string.IsNullOrEmpty(table.CollCropCode) || x.CollCropCode.Contains(table.CollCropCode)) &&
(string.IsNullOrEmpty(table.UnitName) || x.UnitName.Contains(table.UnitName)) &&
(string.IsNullOrEmpty(table.TypeName) || x.TypeName.Contains(table.TypeName))
(string.IsNullOrEmpty(table.TypeName) || x.TypeName.Contains(table.TypeName))
select x
;
@@ -49,7 +47,7 @@ namespace BLL
{
return null;
}
// q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
// q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
return from x in q
select new
{
@@ -3,8 +3,6 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model;
namespace BLL
@@ -59,7 +57,7 @@ namespace BLL
(string.IsNullOrEmpty(table.ProjectId) || x.ProjectId.Contains(table.ProjectId)) &&
(string.IsNullOrEmpty(table.Value) || x.Value.Contains(table.Value)) &&
(string.IsNullOrEmpty(table.FactoryId) || x.FactoryId.Contains(table.FactoryId)) &&
(string.IsNullOrEmpty(table.ReceiveDate) || x.ReceiveDate.Contains(table.ReceiveDate))
(string.IsNullOrEmpty(table.ReceiveDate) || x.ReceiveDate.Contains(table.ReceiveDate))
select x
;
+1 -5
View File
@@ -1,13 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BLL
{
public class LotAPIService
{
{
/// <summary>
/// 保存环境监测
/// </summary>
+332 -330
View File
@@ -4,320 +4,321 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace BLL {
public class MainSevice
namespace BLL
{
/// <summary>
/// 在建项目集合
/// </summary>
private List<string> _beUnderConstructionList;
private HSSEData_HSSE _hsseData;
private string _unitId;
private int _unitType;
public MainSevice(string userid)
public class MainSevice
{
var userModel = Person_PersonsService.GetPerson_PersonsById(userid);
int unitType = CommonService.GetUnitTypeByUserId(userid);
var projectList = ProjectService.GetProjectWorkList().Select(x => new { x.ProjectId, x.UnitId }).ToList();
_unitId = userModel.UnitId;
_unitType = unitType;
if (unitType == 0)
{
_beUnderConstructionList = projectList.Select(x => x.ProjectId).ToList();
_unitId = BLL.Const.UnitId_SEDIN;
}
else if (unitType == 1)
{
_beUnderConstructionList = projectList.Where(x => x.UnitId == userModel.UnitId).Select(x => x.ProjectId).ToList();
}
else if (unitType == 2)
{
_beUnderConstructionList = new List<string>() { "0" };
}
}
public async Task<HSSEData_HSSE> GetHsseDataAsync()
{
/// <summary>
/// 在建项目集合
/// </summary>
private List<string> _beUnderConstructionList;
private HSSEData_HSSE _hsseData;
private string _unitId;
private int _unitType;
public MainSevice(string userid)
{
var userModel = Person_PersonsService.GetPerson_PersonsById(userid);
int unitType = CommonService.GetUnitTypeByUserId(userid);
var projectList = ProjectService.GetProjectWorkList().Select(x => new { x.ProjectId, x.UnitId }).ToList();
_unitId = userModel.UnitId;
_unitType = unitType;
if (unitType == 0)
{
_beUnderConstructionList = projectList.Select(x => x.ProjectId).ToList();
_unitId = BLL.Const.UnitId_SEDIN;
}
else if (unitType == 1)
{
_beUnderConstructionList = projectList.Where(x => x.UnitId == userModel.UnitId).Select(x => x.ProjectId).ToList();
}
else if (unitType == 2)
{
_beUnderConstructionList = new List<string>() { "0" };
}
}
public async Task<HSSEData_HSSE> GetHsseDataAsync()
{
try
{
// 并行执行异步方法
var totalEnergyConsumptionTask = ChemicalReportItemService.GetLatstTimeTotalEnergyConsumption();
var incomeComprehensiveEnergyConsumptionTask = ChemicalReportItemService.GetLatstTimeIncomeComprehensiveEnergyConsumption();
var newWaterConsumptionTask = ChemicalReportItemService.GetLatstTimeNewWaterConsumption();
var securityRiskOutputListTask = HSSEData_HSSEService.GetSecurityRiskOutputsAsync()
.ContinueWith(t => t.Result.Where(x => _beUnderConstructionList.Contains(x.ProjectId)));
var largeEngineeringOutputsTask = HSSEData_HSSEService.GetLargeEngineeringOutputsAsync()
.ContinueWith(t => t.Result.Where(x => _beUnderConstructionList.Contains(x.ProjectId)));
var safetyInjectionEngineerTask = HSSEData_HSSEService.GetSafetyInjectionEngineerAsync();
var certificateATask = HSSEData_HSSEService.GetCertificateAAsync();
var certificateBTask = HSSEData_HSSEService.GetCertificateBAsync();
var certificateCTask = HSSEData_HSSEService.GetCertificateCAsync();
var beUnderConstructionTask = HSSEData_HSSEService.GetBeUnderConstructionAsync();
var shutdownTask = HSSEData_HSSEService.GetShutdownAsync();
var joinConstructionPersonTask = HSSEData_HSSEService.GetJoinConstructionPersonAsync();
var majorProjectsUnderConstructionTask = HSSEData_HSSEService.GetMajorProjectsUnderConstructionAsync();
var totalWorkingHourTask = HSSEData_HSSEService.GetTotalWorkingHourAsync();
var lostWorkingHourTask = HSSEData_HSSEService.GetLostWorkingHourAsync();
var safeWorkingHourTask = HSSEData_HSSEService.GetSafeWorkingHourAsync();
var safeTrainTask = HSSEData_HSSEService.GetSafeTrainAsync();
var specialTrainTask = HSSEData_HSSEService.GetSpecialTrainAsync();
var specialOperationTrainTask = HSSEData_HSSEService.GetSpecialOperationTrainAsync();
var headOfficeInspectorGeneralTask = HSSEData_HSSEService.GetHeadOfficeInspectorGeneralAsync();
var headOfficeFullTimeTask = HSSEData_HSSEService.GetHeadOfficeFullTimeAsync();
var branchInspectorGeneralTask = HSSEData_HSSEService.GetBranchInspectorGeneralAsync();
var branchFullTimeTask = HSSEData_HSSEService.GetBranchFullTimeAsync();
var projectInspectorGeneralTask = HSSEData_HSSEService.GetProjectInspectorGeneralAsync();
var projectFullTimeTask = HSSEData_HSSEService.GetProjectFullTimeAsync();
var projectSafetyMonitorTask = HSSEData_HSSEService.GetProjectSafetyMonitorAsync();
var safetyCommitteeMeetingTask = HSSEData_HSSEService.GetSafetyCommitteeMeetingAsync();
var enterpriseTopicsMeetingTask = HSSEData_HSSEService.GetEnterpriseTopicsMeetingAsync();
var projectSafetyLeadingGroupMeetingTask = HSSEData_HSSEService.GetProjectSafetyLeadingGroupMeetingAsync();
var projectSafetyMeetingTask = HSSEData_HSSEService.GetProjectSafetyMeetingAsync();
var companyLeadShiftCheckTask = HSSEData_HSSEService.GetCompanyLeadShiftCheckAsync();
var companyComprehensiveCheckTask = HSSEData_HSSEService.GetCompanyComprehensiveCheckAsync();
var companySpecialCheckTask = HSSEData_HSSEService.GetCompanySpecialCheckAsync();
var projectLeadShiftCheckTask = HSSEData_HSSEService.GetProjectLeadShiftCheckAsync();
var projectSpecialCheckTask = HSSEData_HSSEService.GetProjectSpecialCheckAsync();
var projectMajorCheckTask = HSSEData_HSSEService.GetProjectMajorCheckAsync();
var nearMissTask = HSSEData_HSSEService.GetNearMissAsync();
var recordableEventTask = HSSEData_HSSEService.GetRecordableEventAsync();
var generalAccidentTask = HSSEData_HSSEService.GetGeneralAccidentAsync();
var majorAccidentTask = HSSEData_HSSEService.GetMajorAccidentAsync();
var seriousAccidentTask = HSSEData_HSSEService.GetSeriousAccidentAsync();
var specialSeriousAccidentTask = HSSEData_HSSEService.GetSpecialSeriousAccidentAsync();
var companyComprehensivePlanTask = HSSEData_HSSEService.GetCompanyComprehensivePlanAsync();
var companySpecialPlanTask = HSSEData_HSSEService.GetCompanySpecialPlanAsync();
var companyOnSiteDisposalPlanTask = HSSEData_HSSEService.GetCompanyOnSiteDisposalPlanAsync();
var companyDrillTask = HSSEData_HSSEService.GetCompanyDrillAsync();
var projectComprehensivePlanTask = HSSEData_HSSEService.GetProjectComprehensivePlanAsync();
var projectSpecialPlanTask = HSSEData_HSSEService.GetProjectSpecialPlanAsync();
var projectOnSiteDisposalPlanTask = HSSEData_HSSEService.GetProjectOnSiteDisposalPlanAsync();
var projectDrillTask = HSSEData_HSSEService.GetProjectDrillAsync();
var costExtractTask = HSSEData_HSSEService.GetCostExtractAsync();
var costUseTask = HSSEData_HSSEService.GetCostUseAsync();
var useEquipmentTask = HSSEData_HSSEService.GetUseEquipmentAsync();
var specialEquipmentTask = HSSEData_HSSEService.GetSpecialEquipmentAsync();
var licensesTask = HSSEData_HSSEService.GetLicensesAsync();
var licensesCloseTask = HSSEData_HSSEService.GetLicensesCloseAsync();
var generalHiddenRectificationOutputsTask = HSSEData_HSSEService.GetGeneralHiddenRectificationOutputsAsync();
var majorHiddenRectificationOutputsTask = HSSEData_HSSEService.GetMajorHiddenRectificationOutputsAsync();
// 等待所有异步方法执行完成
await Task.WhenAll(
securityRiskOutputListTask,
largeEngineeringOutputsTask,
safetyInjectionEngineerTask,
certificateATask,
certificateBTask,
certificateCTask,
beUnderConstructionTask,
shutdownTask,
joinConstructionPersonTask,
majorProjectsUnderConstructionTask,
totalWorkingHourTask,
lostWorkingHourTask,
safeWorkingHourTask,
safeTrainTask,
specialTrainTask,
specialOperationTrainTask,
headOfficeInspectorGeneralTask,
headOfficeFullTimeTask,
branchInspectorGeneralTask,
branchFullTimeTask,
projectInspectorGeneralTask,
projectFullTimeTask,
projectSafetyMonitorTask,
safetyCommitteeMeetingTask,
enterpriseTopicsMeetingTask,
projectSafetyLeadingGroupMeetingTask,
projectSafetyMeetingTask,
companyLeadShiftCheckTask,
companyComprehensiveCheckTask,
companySpecialCheckTask,
projectLeadShiftCheckTask,
projectSpecialCheckTask,
projectMajorCheckTask,
nearMissTask,
recordableEventTask,
generalAccidentTask,
majorAccidentTask,
seriousAccidentTask,
specialSeriousAccidentTask,
companyComprehensivePlanTask,
companySpecialPlanTask,
companyOnSiteDisposalPlanTask,
companyDrillTask,
projectComprehensivePlanTask,
projectSpecialPlanTask,
projectOnSiteDisposalPlanTask,
projectDrillTask,
costExtractTask,
costUseTask,
useEquipmentTask,
specialEquipmentTask,
licensesTask,
licensesCloseTask,
generalHiddenRectificationOutputsTask,
majorHiddenRectificationOutputsTask
);
// 并行执行异步方法
var totalEnergyConsumptionTask = ChemicalReportItemService.GetLatstTimeTotalEnergyConsumption();
var incomeComprehensiveEnergyConsumptionTask = ChemicalReportItemService.GetLatstTimeIncomeComprehensiveEnergyConsumption();
var newWaterConsumptionTask = ChemicalReportItemService.GetLatstTimeNewWaterConsumption();
var securityRiskOutputListTask = HSSEData_HSSEService.GetSecurityRiskOutputsAsync()
.ContinueWith(t => t.Result.Where(x => _beUnderConstructionList.Contains(x.ProjectId)));
var largeEngineeringOutputsTask = HSSEData_HSSEService.GetLargeEngineeringOutputsAsync()
.ContinueWith(t => t.Result.Where(x => _beUnderConstructionList.Contains(x.ProjectId)));
var safetyInjectionEngineerTask = HSSEData_HSSEService.GetSafetyInjectionEngineerAsync();
var certificateATask = HSSEData_HSSEService.GetCertificateAAsync();
var certificateBTask = HSSEData_HSSEService.GetCertificateBAsync();
var certificateCTask = HSSEData_HSSEService.GetCertificateCAsync();
var beUnderConstructionTask = HSSEData_HSSEService.GetBeUnderConstructionAsync();
var shutdownTask = HSSEData_HSSEService.GetShutdownAsync();
var joinConstructionPersonTask = HSSEData_HSSEService.GetJoinConstructionPersonAsync();
var majorProjectsUnderConstructionTask = HSSEData_HSSEService.GetMajorProjectsUnderConstructionAsync();
var totalWorkingHourTask = HSSEData_HSSEService.GetTotalWorkingHourAsync();
var lostWorkingHourTask = HSSEData_HSSEService.GetLostWorkingHourAsync();
var safeWorkingHourTask = HSSEData_HSSEService.GetSafeWorkingHourAsync();
var safeTrainTask = HSSEData_HSSEService.GetSafeTrainAsync();
var specialTrainTask = HSSEData_HSSEService.GetSpecialTrainAsync();
var specialOperationTrainTask = HSSEData_HSSEService.GetSpecialOperationTrainAsync();
var headOfficeInspectorGeneralTask = HSSEData_HSSEService.GetHeadOfficeInspectorGeneralAsync();
var headOfficeFullTimeTask = HSSEData_HSSEService.GetHeadOfficeFullTimeAsync();
var branchInspectorGeneralTask = HSSEData_HSSEService.GetBranchInspectorGeneralAsync();
var branchFullTimeTask = HSSEData_HSSEService.GetBranchFullTimeAsync();
var projectInspectorGeneralTask = HSSEData_HSSEService.GetProjectInspectorGeneralAsync();
var projectFullTimeTask = HSSEData_HSSEService.GetProjectFullTimeAsync();
var projectSafetyMonitorTask = HSSEData_HSSEService.GetProjectSafetyMonitorAsync();
var safetyCommitteeMeetingTask = HSSEData_HSSEService.GetSafetyCommitteeMeetingAsync();
var enterpriseTopicsMeetingTask = HSSEData_HSSEService.GetEnterpriseTopicsMeetingAsync();
var projectSafetyLeadingGroupMeetingTask = HSSEData_HSSEService.GetProjectSafetyLeadingGroupMeetingAsync();
var projectSafetyMeetingTask = HSSEData_HSSEService.GetProjectSafetyMeetingAsync();
var companyLeadShiftCheckTask = HSSEData_HSSEService.GetCompanyLeadShiftCheckAsync();
var companyComprehensiveCheckTask = HSSEData_HSSEService.GetCompanyComprehensiveCheckAsync();
var companySpecialCheckTask = HSSEData_HSSEService.GetCompanySpecialCheckAsync();
var projectLeadShiftCheckTask = HSSEData_HSSEService.GetProjectLeadShiftCheckAsync();
var projectSpecialCheckTask = HSSEData_HSSEService.GetProjectSpecialCheckAsync();
var projectMajorCheckTask = HSSEData_HSSEService.GetProjectMajorCheckAsync();
var nearMissTask = HSSEData_HSSEService.GetNearMissAsync();
var recordableEventTask = HSSEData_HSSEService.GetRecordableEventAsync();
var generalAccidentTask = HSSEData_HSSEService.GetGeneralAccidentAsync();
var majorAccidentTask = HSSEData_HSSEService.GetMajorAccidentAsync();
var seriousAccidentTask = HSSEData_HSSEService.GetSeriousAccidentAsync();
var specialSeriousAccidentTask = HSSEData_HSSEService.GetSpecialSeriousAccidentAsync();
var companyComprehensivePlanTask = HSSEData_HSSEService.GetCompanyComprehensivePlanAsync();
var companySpecialPlanTask = HSSEData_HSSEService.GetCompanySpecialPlanAsync();
var companyOnSiteDisposalPlanTask = HSSEData_HSSEService.GetCompanyOnSiteDisposalPlanAsync();
var companyDrillTask = HSSEData_HSSEService.GetCompanyDrillAsync();
var projectComprehensivePlanTask = HSSEData_HSSEService.GetProjectComprehensivePlanAsync();
var projectSpecialPlanTask = HSSEData_HSSEService.GetProjectSpecialPlanAsync();
var projectOnSiteDisposalPlanTask = HSSEData_HSSEService.GetProjectOnSiteDisposalPlanAsync();
var projectDrillTask = HSSEData_HSSEService.GetProjectDrillAsync();
var costExtractTask = HSSEData_HSSEService.GetCostExtractAsync();
var costUseTask = HSSEData_HSSEService.GetCostUseAsync();
var useEquipmentTask = HSSEData_HSSEService.GetUseEquipmentAsync();
var specialEquipmentTask = HSSEData_HSSEService.GetSpecialEquipmentAsync();
var licensesTask = HSSEData_HSSEService.GetLicensesAsync();
var licensesCloseTask = HSSEData_HSSEService.GetLicensesCloseAsync();
var generalHiddenRectificationOutputsTask = HSSEData_HSSEService.GetGeneralHiddenRectificationOutputsAsync();
var majorHiddenRectificationOutputsTask = HSSEData_HSSEService.GetMajorHiddenRectificationOutputsAsync();
// 等待所有异步方法执行完成
await Task.WhenAll(
securityRiskOutputListTask,
largeEngineeringOutputsTask,
safetyInjectionEngineerTask,
certificateATask,
certificateBTask,
certificateCTask,
beUnderConstructionTask,
shutdownTask,
joinConstructionPersonTask,
majorProjectsUnderConstructionTask,
totalWorkingHourTask,
lostWorkingHourTask,
safeWorkingHourTask,
safeTrainTask,
specialTrainTask,
specialOperationTrainTask,
headOfficeInspectorGeneralTask,
headOfficeFullTimeTask,
branchInspectorGeneralTask,
branchFullTimeTask,
projectInspectorGeneralTask,
projectFullTimeTask,
projectSafetyMonitorTask,
safetyCommitteeMeetingTask,
enterpriseTopicsMeetingTask,
projectSafetyLeadingGroupMeetingTask,
projectSafetyMeetingTask,
companyLeadShiftCheckTask,
companyComprehensiveCheckTask,
companySpecialCheckTask,
projectLeadShiftCheckTask,
projectSpecialCheckTask,
projectMajorCheckTask,
nearMissTask,
recordableEventTask,
generalAccidentTask,
majorAccidentTask,
seriousAccidentTask,
specialSeriousAccidentTask,
companyComprehensivePlanTask,
companySpecialPlanTask,
companyOnSiteDisposalPlanTask,
companyDrillTask,
projectComprehensivePlanTask,
projectSpecialPlanTask,
projectOnSiteDisposalPlanTask,
projectDrillTask,
costExtractTask,
costUseTask,
useEquipmentTask,
specialEquipmentTask,
licensesTask,
licensesCloseTask,
generalHiddenRectificationOutputsTask,
majorHiddenRectificationOutputsTask
);
// 统一获取异步方法的返回值
var totalEnergyConsumption = totalEnergyConsumptionTask;
var incomeComprehensiveEnergyConsumption = incomeComprehensiveEnergyConsumptionTask;
var newWaterConsumption = newWaterConsumptionTask;
var safetyInjectionEngineerList = await safetyInjectionEngineerTask;
var certificateAList = await certificateATask;
var certificateBList = await certificateBTask;
var certificateCList = await certificateCTask;
var beUnderConstructionList = await beUnderConstructionTask;
var shutdownList = await shutdownTask;
var joinConstructionPersonList = await joinConstructionPersonTask;
var majorProjectsUnderConstructionList = await majorProjectsUnderConstructionTask;
var totalWorkingHour = await totalWorkingHourTask;
var lostWorkingHour = await lostWorkingHourTask;
var safeWorkingHour = await safeWorkingHourTask;
var safeTrainList = await safeTrainTask;
var specialTrainList = await specialTrainTask;
var specialOperationTrainList = await specialOperationTrainTask;
var headOfficeInspectorGeneralList = await headOfficeInspectorGeneralTask;
var headOfficeFullTimeList = await headOfficeFullTimeTask;
var branchInspectorGeneralList = await branchInspectorGeneralTask;
var branchFullTimeList = await branchFullTimeTask;
var projectInspectorGeneralList = await projectInspectorGeneralTask;
var projectFullTimeList = await projectFullTimeTask;
var projectSafetyMonitorList = await projectSafetyMonitorTask;
var safetyCommitteeMeetingList = await safetyCommitteeMeetingTask;
var enterpriseTopicsMeetingList = await enterpriseTopicsMeetingTask;
var projectSafetyLeadingGroupMeetingList = await projectSafetyLeadingGroupMeetingTask;
var projectSafetyMeetingList = await projectSafetyMeetingTask;
var companyLeadShiftCheckList = await companyLeadShiftCheckTask;
var companyComprehensiveCheckList = await companyComprehensiveCheckTask;
var companySpecialCheckList = await companySpecialCheckTask;
var projectLeadShiftCheckList = await projectLeadShiftCheckTask;
var projectSpecialCheckList = await projectSpecialCheckTask;
var projectMajorCheckList = await projectMajorCheckTask;
var nearMissList = await nearMissTask;
var recordableEventList = await recordableEventTask;
var generalAccidentList = await generalAccidentTask;
var majorAccidentList = await majorAccidentTask;
var seriousAccidentList = await seriousAccidentTask;
var specialSeriousAccidentList = await specialSeriousAccidentTask;
var companyComprehensivePlanList = await companyComprehensivePlanTask;
var companySpecialPlanList = await companySpecialPlanTask;
var companyOnSiteDisposalPlanList = await companyOnSiteDisposalPlanTask;
var companyDrillList = await companyDrillTask;
var projectComprehensivePlanList = await projectComprehensivePlanTask;
var projectSpecialPlanList = await projectSpecialPlanTask;
var projectOnSiteDisposalPlanList = await projectOnSiteDisposalPlanTask;
var projectDrillList = await projectDrillTask;
var costExtractList = await costExtractTask;
var costUseList = await costUseTask;
var useEquipmentList = await useEquipmentTask;
var specialEquipmentList = await specialEquipmentTask;
var licensesList = await licensesTask;
var licensesCloseList = await licensesCloseTask;
var generalHiddenRectificationOutputsList = await generalHiddenRectificationOutputsTask;
var majorHiddenRectificationOutputsList = await majorHiddenRectificationOutputsTask;
// 统一获取异步方法的返回值
var totalEnergyConsumption = totalEnergyConsumptionTask;
var incomeComprehensiveEnergyConsumption = incomeComprehensiveEnergyConsumptionTask;
var newWaterConsumption = newWaterConsumptionTask;
var safetyInjectionEngineerList = await safetyInjectionEngineerTask;
var certificateAList = await certificateATask;
var certificateBList = await certificateBTask;
var certificateCList = await certificateCTask;
var beUnderConstructionList = await beUnderConstructionTask;
var shutdownList = await shutdownTask;
var joinConstructionPersonList = await joinConstructionPersonTask;
var majorProjectsUnderConstructionList = await majorProjectsUnderConstructionTask;
var totalWorkingHour = await totalWorkingHourTask;
var lostWorkingHour = await lostWorkingHourTask;
var safeWorkingHour = await safeWorkingHourTask;
var safeTrainList = await safeTrainTask;
var specialTrainList = await specialTrainTask;
var specialOperationTrainList = await specialOperationTrainTask;
var headOfficeInspectorGeneralList = await headOfficeInspectorGeneralTask;
var headOfficeFullTimeList = await headOfficeFullTimeTask;
var branchInspectorGeneralList = await branchInspectorGeneralTask;
var branchFullTimeList = await branchFullTimeTask;
var projectInspectorGeneralList = await projectInspectorGeneralTask;
var projectFullTimeList = await projectFullTimeTask;
var projectSafetyMonitorList = await projectSafetyMonitorTask;
var safetyCommitteeMeetingList = await safetyCommitteeMeetingTask;
var enterpriseTopicsMeetingList = await enterpriseTopicsMeetingTask;
var projectSafetyLeadingGroupMeetingList = await projectSafetyLeadingGroupMeetingTask;
var projectSafetyMeetingList = await projectSafetyMeetingTask;
var companyLeadShiftCheckList = await companyLeadShiftCheckTask;
var companyComprehensiveCheckList = await companyComprehensiveCheckTask;
var companySpecialCheckList = await companySpecialCheckTask;
var projectLeadShiftCheckList = await projectLeadShiftCheckTask;
var projectSpecialCheckList = await projectSpecialCheckTask;
var projectMajorCheckList = await projectMajorCheckTask;
var nearMissList = await nearMissTask;
var recordableEventList = await recordableEventTask;
var generalAccidentList = await generalAccidentTask;
var majorAccidentList = await majorAccidentTask;
var seriousAccidentList = await seriousAccidentTask;
var specialSeriousAccidentList = await specialSeriousAccidentTask;
var companyComprehensivePlanList = await companyComprehensivePlanTask;
var companySpecialPlanList = await companySpecialPlanTask;
var companyOnSiteDisposalPlanList = await companyOnSiteDisposalPlanTask;
var companyDrillList = await companyDrillTask;
var projectComprehensivePlanList = await projectComprehensivePlanTask;
var projectSpecialPlanList = await projectSpecialPlanTask;
var projectOnSiteDisposalPlanList = await projectOnSiteDisposalPlanTask;
var projectDrillList = await projectDrillTask;
var costExtractList = await costExtractTask;
var costUseList = await costUseTask;
var useEquipmentList = await useEquipmentTask;
var specialEquipmentList = await specialEquipmentTask;
var licensesList = await licensesTask;
var licensesCloseList = await licensesCloseTask;
var generalHiddenRectificationOutputsList = await generalHiddenRectificationOutputsTask;
var majorHiddenRectificationOutputsList = await majorHiddenRectificationOutputsTask;
// 构造结果对象
var table = new HSSEData_HSSE
{
JoinConstructionPersonNum = joinConstructionPersonList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
MajorProjectsUnderConstructionNum = majorProjectsUnderConstructionList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
TotalWorkingHour = totalWorkingHour,
LostWorkingHour = lostWorkingHour,
SafeWorkingHour = safeWorkingHour,
SafeTrainNum = safeTrainList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.TrainPersonNum),
SpecialTrainNum = specialTrainList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.TrainPersonNum),
SpecialOperationTrainNum = specialOperationTrainList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.TrainPersonNum),
EnvironmentalTrainNum = 0,
TotalEnergyConsumption = totalEnergyConsumption,
IncomeComprehensiveEnergyConsumption = incomeComprehensiveEnergyConsumption,
NewWaterConsumption = newWaterConsumption,
HeadOfficeInspectorGeneralNum = headOfficeInspectorGeneralList.Count(),
HeadOfficeFullTimeNum = headOfficeFullTimeList.Count,
BranchInspectorGeneralNum = branchInspectorGeneralList.Count,
BranchFullTimeNum = branchFullTimeList.Count,
ProjectInspectorGeneralNum = projectInspectorGeneralList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
ProjectFullTimeNum = projectFullTimeList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
ProjectSafetyMonitorNum = projectSafetyMonitorList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
ProjectSafetyLeadingGroupMeetingNum = projectSafetyLeadingGroupMeetingList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
ProjectSafetyMeetingNum = projectSafetyMeetingList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
CompanyLeadShiftCheckNum = companyLeadShiftCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
CompanyComprehensiveCheckNum = companyComprehensiveCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
CompanySpecialCheckNum = companySpecialCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
ProjectLeadShiftCheckNum = projectLeadShiftCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
ProjectSpecialCheckNum = projectSpecialCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
ProjectMajorCheckNum = projectMajorCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
NearMissNum = nearMissList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
RecordableEventNum = recordableEventList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
GeneralAccidentNum = generalAccidentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
MajorAccidentNum = majorAccidentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
SeriousAccidentNum = seriousAccidentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
SpecialSeriousAccidentNum = specialSeriousAccidentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
CompanyComprehensivePlanNum = companyComprehensivePlanList.Count(x => x.UnitId == _unitId),
CompanySpecialPlanNum = companySpecialPlanList.Count(x => x.UnitId == _unitId),
CompanyOnSiteDisposalPlan = companyOnSiteDisposalPlanList.Count(x => x.UnitId == _unitId),
CompanyDrillNum = companyDrillList.Count(x => x.UnitId.Contains(_unitId)),
ProjectComprehensivePlanNum = projectComprehensivePlanList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
ProjectSpecialPlanNum = projectSpecialPlanList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
ProjectOnSiteDisposalPlan = projectOnSiteDisposalPlanList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
ProjectDrillNum = projectDrillList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
CostExtract = Convert.ToInt32(costExtractList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.SUMCost)),
CostUse = Convert.ToInt32(costUseList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.SUMCost)),
UseEquipmentNum = useEquipmentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
SpecialEquipmentNum = specialEquipmentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
LicensesNum = licensesList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
LicensesCloseNum = licensesCloseList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
GeneralClosedNum = generalHiddenRectificationOutputsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.RecNum),
GeneralNotClosedNum = generalHiddenRectificationOutputsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.NoRecNum),
MajorClosedNum = majorHiddenRectificationOutputsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.RecNum),
MajorNotClosedNum = majorHiddenRectificationOutputsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.NoRecNum),
LowRiskNum = securityRiskOutputListTask.Result.Sum(x => x.LowRiskNum),
GeneralRiskNum = securityRiskOutputListTask.Result.Sum(x => x.GeneralRiskNum),
MediumRiskNum = securityRiskOutputListTask.Result.Sum(x => x.MediumRiskNum),
HighRiskNum = securityRiskOutputListTask.Result.Sum(x => x.HighRiskNum),
CompletedNum = largeEngineeringOutputsTask.Result.Sum(x => x.CompletedNum),
TrainPersonNum = largeEngineeringOutputsTask.Result.Sum(x => x.TrainPersonNum),
ConstructionNum = largeEngineeringOutputsTask.Result.Sum(x => x.ConstructionNum),
FinishedNum = largeEngineeringOutputsTask.Result.Sum(x => x.FinishedNum),
SuperCompletedNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperCompletedNum),
SuperTrainPersonNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperTrainPersonNum),
SuperConstructionNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperConstructionNum)
};
// 构造结果对象
var table = new HSSEData_HSSE
{
JoinConstructionPersonNum = joinConstructionPersonList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
MajorProjectsUnderConstructionNum = majorProjectsUnderConstructionList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
TotalWorkingHour = totalWorkingHour,
LostWorkingHour = lostWorkingHour,
SafeWorkingHour = safeWorkingHour,
SafeTrainNum = safeTrainList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.TrainPersonNum),
SpecialTrainNum = specialTrainList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.TrainPersonNum),
SpecialOperationTrainNum = specialOperationTrainList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.TrainPersonNum),
EnvironmentalTrainNum = 0,
TotalEnergyConsumption = totalEnergyConsumption,
IncomeComprehensiveEnergyConsumption = incomeComprehensiveEnergyConsumption,
NewWaterConsumption = newWaterConsumption,
HeadOfficeInspectorGeneralNum = headOfficeInspectorGeneralList.Count(),
HeadOfficeFullTimeNum = headOfficeFullTimeList.Count,
BranchInspectorGeneralNum = branchInspectorGeneralList.Count,
BranchFullTimeNum = branchFullTimeList.Count,
ProjectInspectorGeneralNum = projectInspectorGeneralList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
ProjectFullTimeNum = projectFullTimeList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
ProjectSafetyMonitorNum = projectSafetyMonitorList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
ProjectSafetyLeadingGroupMeetingNum = projectSafetyLeadingGroupMeetingList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
ProjectSafetyMeetingNum = projectSafetyMeetingList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
CompanyLeadShiftCheckNum = companyLeadShiftCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
CompanyComprehensiveCheckNum = companyComprehensiveCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
CompanySpecialCheckNum = companySpecialCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
ProjectLeadShiftCheckNum = projectLeadShiftCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
ProjectSpecialCheckNum = projectSpecialCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
ProjectMajorCheckNum = projectMajorCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
NearMissNum = nearMissList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
RecordableEventNum = recordableEventList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
GeneralAccidentNum = generalAccidentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
MajorAccidentNum = majorAccidentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
SeriousAccidentNum = seriousAccidentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
SpecialSeriousAccidentNum = specialSeriousAccidentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
CompanyComprehensivePlanNum = companyComprehensivePlanList.Count(x => x.UnitId == _unitId),
CompanySpecialPlanNum = companySpecialPlanList.Count(x => x.UnitId == _unitId),
CompanyOnSiteDisposalPlan = companyOnSiteDisposalPlanList.Count(x => x.UnitId == _unitId),
CompanyDrillNum = companyDrillList.Count(x => x.UnitId.Contains(_unitId)),
ProjectComprehensivePlanNum = projectComprehensivePlanList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
ProjectSpecialPlanNum = projectSpecialPlanList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
ProjectOnSiteDisposalPlan = projectOnSiteDisposalPlanList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
ProjectDrillNum = projectDrillList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
CostExtract = Convert.ToInt32(costExtractList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.SUMCost)),
CostUse = Convert.ToInt32(costUseList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.SUMCost)),
UseEquipmentNum = useEquipmentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
SpecialEquipmentNum = specialEquipmentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
LicensesNum = licensesList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
LicensesCloseNum = licensesCloseList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
GeneralClosedNum = generalHiddenRectificationOutputsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.RecNum),
GeneralNotClosedNum = generalHiddenRectificationOutputsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.NoRecNum),
MajorClosedNum = majorHiddenRectificationOutputsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.RecNum),
MajorNotClosedNum = majorHiddenRectificationOutputsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.NoRecNum),
LowRiskNum = securityRiskOutputListTask.Result.Sum(x => x.LowRiskNum),
GeneralRiskNum = securityRiskOutputListTask.Result.Sum(x => x.GeneralRiskNum),
MediumRiskNum = securityRiskOutputListTask.Result.Sum(x => x.MediumRiskNum),
HighRiskNum = securityRiskOutputListTask.Result.Sum(x => x.HighRiskNum),
CompletedNum = largeEngineeringOutputsTask.Result.Sum(x => x.CompletedNum),
TrainPersonNum = largeEngineeringOutputsTask.Result.Sum(x => x.TrainPersonNum),
ConstructionNum = largeEngineeringOutputsTask.Result.Sum(x => x.ConstructionNum),
FinishedNum = largeEngineeringOutputsTask.Result.Sum(x => x.FinishedNum),
SuperCompletedNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperCompletedNum),
SuperTrainPersonNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperTrainPersonNum),
SuperConstructionNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperConstructionNum)
};
if (_unitType == 0)
{
table.BeUnderConstructionNum = beUnderConstructionList.Count();
table.ShutdownNum = shutdownList.Count();
table.SafetyInjectionEngineer = safetyInjectionEngineerList.Count();
table.EnterpriseTopicsMeetingNum = enterpriseTopicsMeetingList.Count();
table.CertificateANum = certificateAList.Count();
table.CertificateBNum = certificateBList.Count();
table.CertificateCNum = certificateCList.Count();
table.SafetyCommitteeMeetingNum = safetyCommitteeMeetingList.Count();
if (_unitType == 0)
{
table.BeUnderConstructionNum = beUnderConstructionList.Count();
table.ShutdownNum = shutdownList.Count();
table.SafetyInjectionEngineer = safetyInjectionEngineerList.Count();
table.EnterpriseTopicsMeetingNum = enterpriseTopicsMeetingList.Count();
table.CertificateANum = certificateAList.Count();
table.CertificateBNum = certificateBList.Count();
table.CertificateCNum = certificateCList.Count();
table.SafetyCommitteeMeetingNum = safetyCommitteeMeetingList.Count();
}
else if (_unitType == 1)
{
table.BeUnderConstructionNum = beUnderConstructionList.Count(x => x.UnitId == _unitId);
table.ShutdownNum = shutdownList.Count(x => x.UnitId == _unitId);
table.SafetyCommitteeMeetingNum = safetyCommitteeMeetingList.Count(x => x.UnitId == _unitId);
table.SafetyInjectionEngineer = safetyInjectionEngineerList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) || x.UnitId == _unitId);
table.EnterpriseTopicsMeetingNum = safetyInjectionEngineerList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) || x.UnitId == _unitId);
table.CertificateANum = certificateAList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) || x.UnitId == _unitId);
table.CertificateBNum = certificateBList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) || x.UnitId == _unitId);
table.CertificateCNum = certificateCList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) || x.UnitId == _unitId);
}
}
else if (_unitType == 1)
{
table.BeUnderConstructionNum = beUnderConstructionList.Count(x => x.UnitId == _unitId);
table.ShutdownNum = shutdownList.Count(x => x.UnitId == _unitId);
table.SafetyCommitteeMeetingNum = safetyCommitteeMeetingList.Count(x => x.UnitId == _unitId);
table.SafetyInjectionEngineer = safetyInjectionEngineerList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) || x.UnitId == _unitId);
table.EnterpriseTopicsMeetingNum = safetyInjectionEngineerList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) || x.UnitId == _unitId);
table.CertificateANum = certificateAList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) || x.UnitId == _unitId);
table.CertificateBNum = certificateBList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) || x.UnitId == _unitId);
table.CertificateCNum = certificateCList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) || x.UnitId == _unitId);
}
_hsseData = table;
return _hsseData;
_hsseData = table;
return _hsseData;
}
catch (Exception ex)
{
@@ -326,35 +327,36 @@ public class MainSevice
}
}
public List<HSSEDataHiddenDangerDetailItem> GetDataHiddenDangerDetailItems()
{
var db = Funs.DB;
var list = from x in db.HSSE_Hazard_HazardRegister
where _beUnderConstructionList.Contains(x.ProjectId)
select x;
var data = (from x in list
join y in db.HSSE_Hazard_HazardRegisterTypes on x.RegisterTypesId equals y.RegisterTypesId
group x by new
{ x.ProjectId, x.RegisterTypesId, y.RegisterTypesName }
into g
select new
{
UnitId = _unitId,
ProjectId = g.Key.ProjectId,
TypeName = g.Key.RegisterTypesName,
TotalNum = g.Count(),
NeedRectifyNum = g.Count(x => x.States == "1"),
}).ToList();
public List<HSSEDataHiddenDangerDetailItem> GetDataHiddenDangerDetailItems()
{
var db = Funs.DB;
var list = from x in db.HSSE_Hazard_HazardRegister
where _beUnderConstructionList.Contains(x.ProjectId)
select x;
var data = (from x in list
join y in db.HSSE_Hazard_HazardRegisterTypes on x.RegisterTypesId equals y.RegisterTypesId
group x by new
{ x.ProjectId, x.RegisterTypesId, y.RegisterTypesName }
into g
select new
{
UnitId = _unitId,
ProjectId = g.Key.ProjectId,
TypeName = g.Key.RegisterTypesName,
TotalNum = g.Count(),
NeedRectifyNum = g.Count(x => x.States == "1"),
}).ToList();
var result = (from x in data
group x by x.TypeName into g
select new Model.HSSEDataHiddenDangerDetailItem
{
Id = SQLHelper.GetNewID(),
TypeName = g.Key,
NeedRectifyNum = g.Sum(p => p.NeedRectifyNum),
TotalNum = g.Sum(p => p.TotalNum)
}).ToList();
return result;
var result = (from x in data
group x by x.TypeName into g
select new Model.HSSEDataHiddenDangerDetailItem
{
Id = SQLHelper.GetNewID(),
TypeName = g.Key,
NeedRectifyNum = g.Sum(p => p.NeedRectifyNum),
TotalNum = g.Sum(p => p.TotalNum)
}).ToList();
return result;
}
}
} }
}
@@ -1,11 +1,9 @@
using FineUIPro;
using NPOI.SS.Formula.Functions;
using Model;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model;
namespace BLL
{
@@ -49,17 +47,17 @@ namespace BLL
if (count == 0) return null;
// q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
return from x in q
select new
{
x.Id,
x.ProjectId,
x.UnitId,
x.CollCropCode,
x.UnitName,
x.ReportDate,
x.DefectName,
x.DefectNum
};
select new
{
x.Id,
x.ProjectId,
x.UnitId,
x.CollCropCode,
x.UnitName,
x.ReportDate,
x.DefectName,
x.DefectNum
};
}
#endregion
@@ -79,8 +77,8 @@ namespace BLL
string projectid)
{
var q = from x in db.Project_HJGLData_Defect
where x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0 && x.ProjectId == projectid
select x;
where x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0 && x.ProjectId == projectid
select x;
return q.ToList();
}
@@ -183,9 +181,9 @@ namespace BLL
{
var result = false;
var q = (from x in Funs.DB.Project_HJGLData_Defect
where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date &&
x.ProjectId == projectid && x.DefectName == type
select x).ToList();
where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date &&
x.ProjectId == projectid && x.DefectName == type
select x).ToList();
if (q != null && q.Count > 0) result = true;
return result;
}
@@ -198,24 +196,24 @@ namespace BLL
public static Project_HJGLData_Defect getTodayProject_HJGLData_Defect(string projectid, string type)
{
var q = (from x in Funs.DB.Project_HJGLData_Defect
where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date &&
x.ProjectId == projectid && x.DefectName == type
select x).FirstOrDefault();
where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date &&
x.ProjectId == projectid && x.DefectName == type
select x).FirstOrDefault();
return q;
}
public static List<HJGLDataDefectItems> getTodayProject_HJGLData_Defect()
{
var q = (from x in Funs.DB.Project_HJGLData_Defect
where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date
group x by x.DefectName
where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date
group x by x.DefectName
into g
select new HJGLDataDefectItems
{
Id = SQLHelper.GetNewID(),
DefectName = g.Key,
DefectNum = g.Sum(p => p.DefectNum)
}).ToList();
select new HJGLDataDefectItems
{
Id = SQLHelper.GetNewID(),
DefectName = g.Key,
DefectNum = g.Sum(p => p.DefectNum)
}).ToList();
return q;
}
public static List<HJGLDataDefectItems> GetModelByUnitIdAndReportDate(string Unitid, DateTime? reportdate)
@@ -226,33 +224,33 @@ namespace BLL
}
var projectlist = BLL.ProjectService.GetProjectWorkList();
var q = (from x in Funs.DB.Project_HJGLData_Defect
where x.ReportDate == reportdate && projectlist.Select(e => e.ProjectId).Contains(x.ProjectId)
where x.ReportDate == reportdate && projectlist.Select(e => e.ProjectId).Contains(x.ProjectId)
group x by x.DefectName
into g
select new HJGLDataDefectItems
{
Id = SQLHelper.GetNewID(),
DefectName = g.Key,
DefectNum = g.Sum(p => p.DefectNum)
}).ToList();
select new HJGLDataDefectItems
{
Id = SQLHelper.GetNewID(),
DefectName = g.Key,
DefectNum = g.Sum(p => p.DefectNum)
}).ToList();
return q;
}
public static List<HJGLDataDefectItems> GetModelByReportDate( DateTime? reportdate)
public static List<HJGLDataDefectItems> GetModelByReportDate(DateTime? reportdate)
{
if (!reportdate.HasValue)
{
return new List<HJGLDataDefectItems>();
}
var q = (from x in Funs.DB.Project_HJGLData_Defect
where x.ReportDate == reportdate
group x by x.DefectName
where x.ReportDate == reportdate
group x by x.DefectName
into g
select new HJGLDataDefectItems
{
Id = SQLHelper.GetNewID(),
DefectName = g.Key,
DefectNum = g.Sum(p => p.DefectNum)
}).ToList();
select new HJGLDataDefectItems
{
Id = SQLHelper.GetNewID(),
DefectName = g.Key,
DefectNum = g.Sum(p => p.DefectNum)
}).ToList();
return q;
}
/// <summary>
@@ -1,13 +1,10 @@
using FineUIPro;
using Model;
using Newtonsoft.Json;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model;
using RestSharp;
using Newtonsoft.Json;
using static BLL.Project_CQMSDataService;
namespace BLL
{
@@ -1,10 +1,10 @@
using System;
using FineUIPro;
using Model;
using Newtonsoft.Json;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using FineUIPro;
using Model;
using Newtonsoft.Json;
namespace BLL
{
@@ -1334,12 +1334,12 @@ namespace BLL
{
var result = (from x in Funs.DB.InApproveManager_EquipmentInItem
join y in Funs.DB.InApproveManager_EquipmentIn on x.EquipmentInId equals y.EquipmentInId
where y.ProjectId == projectid
where y.ProjectId == projectid
select x).Count() +
(from x in Funs.DB.InApproveManager_GeneralEquipmentInItem
join y in Funs.DB.InApproveManager_GeneralEquipmentIn on x.GeneralEquipmentInId equals y
.GeneralEquipmentInId
where y.ProjectId == projectid
where y.ProjectId == projectid
select x).Count();
return result;
}
@@ -1352,7 +1352,7 @@ namespace BLL
{
var result = (from x in Funs.DB.InApproveManager_EquipmentInItem
join y in Funs.DB.InApproveManager_EquipmentIn on x.EquipmentInId equals y.EquipmentInId
where y.ProjectId == projectid
where y.ProjectId == projectid
select x).Count();
return result;
}
@@ -1442,7 +1442,7 @@ namespace BLL
{
var result = (from x in Funs.DB.Hazard_HazardSelectedItem
join y in Funs.DB.Base_RiskLevel on x.HazardLevel equals y.RiskLevelId
where x.ProjectId == projectid && (y.RiskLevel == 2 || x.HazardLevel == "2") && x.IsStart == true
where x.ProjectId == projectid && (y.RiskLevel == 2 || x.HazardLevel == "2") && x.IsStart == true
select x).Count();
return result;
}
@@ -1455,7 +1455,7 @@ namespace BLL
{
var result = (from x in Funs.DB.Hazard_HazardSelectedItem
join y in Funs.DB.Base_RiskLevel on x.HazardLevel equals y.RiskLevelId
where x.ProjectId == projectid && (y.RiskLevel == 1 || x.HazardLevel == "1") && x.IsStart == true
where x.ProjectId == projectid && (y.RiskLevel == 1 || x.HazardLevel == "1") && x.IsStart == true
select x).Count();
return result;
}
@@ -1468,7 +1468,7 @@ namespace BLL
{
var result = (from x in Funs.DB.Hazard_HazardSelectedItem
join y in Funs.DB.Base_RiskLevel on x.HazardLevel equals y.RiskLevelId
where x.ProjectId == projectid && (y.RiskLevel == 3 || x.HazardLevel == "3") && x.IsStart == true
where x.ProjectId == projectid && (y.RiskLevel == 3 || x.HazardLevel == "3") && x.IsStart == true
select x).Count();
return result;
}
@@ -1481,7 +1481,7 @@ namespace BLL
{
var result = (from x in Funs.DB.Hazard_HazardSelectedItem
join y in Funs.DB.Base_RiskLevel on x.HazardLevel equals y.RiskLevelId
where x.ProjectId == projectid && y.RiskLevel == 4 && x.IsStart == true
where x.ProjectId == projectid && y.RiskLevel == 4 && x.IsStart == true
select x).Count();
return result;
}
@@ -1752,7 +1752,7 @@ namespace BLL
where (x.IsUpdate == null || x.IsUpdate == false) && x.CheckTime > BLL.Const.DtmarkTime
&& x.ProblemTypes == "1"
&& x.ProjectState == "1"
// && x.IsBranch.Value == true
// && x.IsBranch.Value == true
select new Model.Hazard_HazardRegisterItem
{
HazardRegisterId = x.HazardRegisterId,
@@ -4,7 +4,6 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BLL
@@ -112,10 +111,10 @@ namespace BLL
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
db.Project_HSSEData_HiddenDangerDetail.InsertAllOnSubmit(newtables);
db.SubmitChanges();
}
}
}
public static void UpdateProject_HSSEData_HiddenDangerDetail(Model.Project_HSSEData_HiddenDangerDetail newtable)
{
@@ -172,7 +171,7 @@ namespace BLL
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
var table = db.Project_HSSEData_HiddenDangerDetail.Where(x => x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0 );
var table = db.Project_HSSEData_HiddenDangerDetail.Where(x => x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0);
db.Project_HSSEData_HiddenDangerDetail.DeleteAllOnSubmit(table);
db.SubmitChanges();
}
@@ -213,14 +212,14 @@ namespace BLL
public static List<Model.HSSEDataHiddenDangerDetailItem> GetTodayModel()
{
var q = (from x in Funs.DB.Project_HSSEData_HiddenDangerDetail
where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date
where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date
group x by x.TypeName into g
select new Model.HSSEDataHiddenDangerDetailItem
{
Id = SQLHelper.GetNewID(),
TypeName= g.Key,
NeedRectifyNum= g.Sum(p => p.NeedRectifyNum),
TotalNum= g.Sum(p => p.TotalNum)
TypeName = g.Key,
NeedRectifyNum = g.Sum(p => p.NeedRectifyNum),
TotalNum = g.Sum(p => p.TotalNum)
}).ToList();
return q;
}
@@ -234,15 +233,15 @@ namespace BLL
{
var projectlist = BLL.ProjectService.GetProjectWorkList();
var q = (from x in Funs.DB.Project_HSSEData_HiddenDangerDetail
where x.ReportDate == reportdate && projectlist.Select(e => e.ProjectId).Contains(x.ProjectId)
where x.ReportDate == reportdate && projectlist.Select(e => e.ProjectId).Contains(x.ProjectId)
group x by x.TypeName into g
select new Model.HSSEDataHiddenDangerDetailItem
{
Id = SQLHelper.GetNewID(),
TypeName = g.Key,
NeedRectifyNum = g.Sum(p => p.NeedRectifyNum),
TotalNum = g.Sum(p => p.TotalNum)
}).ToList();
select new Model.HSSEDataHiddenDangerDetailItem
{
Id = SQLHelper.GetNewID(),
TypeName = g.Key,
NeedRectifyNum = g.Sum(p => p.NeedRectifyNum),
TotalNum = g.Sum(p => p.TotalNum)
}).ToList();
return q;
}
/// <summary>
@@ -250,24 +249,24 @@ namespace BLL
/// </summary>
/// <param name="reportdate"></param>
/// <returns></returns>
public static List<Model.HSSEDataHiddenDangerDetailItem> GetModelByReportDate( DateTime? reportdate)
public static List<Model.HSSEDataHiddenDangerDetailItem> GetModelByReportDate(DateTime? reportdate)
{
var q = (from x in Funs.DB.Project_HSSEData_HiddenDangerDetail
where x.ReportDate == reportdate
group x by x.TypeName into g
select new Model.HSSEDataHiddenDangerDetailItem
{
Id = SQLHelper.GetNewID(),
TypeName = g.Key,
NeedRectifyNum = g.Sum(p => p.NeedRectifyNum),
TotalNum = g.Sum(p => p.TotalNum)
}).ToList();
where x.ReportDate == reportdate
group x by x.TypeName into g
select new Model.HSSEDataHiddenDangerDetailItem
{
Id = SQLHelper.GetNewID(),
TypeName = g.Key,
NeedRectifyNum = g.Sum(p => p.NeedRectifyNum),
TotalNum = g.Sum(p => p.TotalNum)
}).ToList();
return q;
}
public static List<Model.HSSEDataHiddenDangerDetailItem> GetModelByReportDate(DateTime? reportdate,string projectid)
public static List<Model.HSSEDataHiddenDangerDetailItem> GetModelByReportDate(DateTime? reportdate, string projectid)
{
var q = (from x in Funs.DB.Project_HSSEData_HiddenDangerDetail
where x.ReportDate == reportdate && x.ProjectId==projectid
where x.ReportDate == reportdate && x.ProjectId == projectid
group x by x.TypeName into g
select new Model.HSSEDataHiddenDangerDetailItem
{
@@ -290,24 +289,25 @@ namespace BLL
thisUnitId = thisUnit.UnitId;
}
var baseUnit = BLL.UnitService.GetUnitByUnitId(thisUnitId);
var list = from x in db.HSSE_Hazard_HazardRegister where projectids.Contains(x.ProjectId)
select x;
var list = from x in db.HSSE_Hazard_HazardRegister
where projectids.Contains(x.ProjectId)
select x;
var data = (from x in list
join y in db.HSSE_Hazard_HazardRegisterTypes on x.RegisterTypesId equals y.RegisterTypesId
group x by new
{ x.ProjectId, x.RegisterTypesId ,y.RegisterTypesName}
join y in db.HSSE_Hazard_HazardRegisterTypes on x.RegisterTypesId equals y.RegisterTypesId
group x by new
{ x.ProjectId, x.RegisterTypesId, y.RegisterTypesName }
into g
select new
{
UnitId = thisUnitId,
CollCropCode = baseUnit.CollCropCode,
UnitName = baseUnit.UnitName,
ProjectId= g.Key.ProjectId,
ReportDate = DateTime.Now.Date,
TypeName=g.Key.RegisterTypesName,
TotalNum = g.Count(),
NeedRectifyNum = g.Count(x => x.States == "1"),
}).ToList();
select new
{
UnitId = thisUnitId,
CollCropCode = baseUnit.CollCropCode,
UnitName = baseUnit.UnitName,
ProjectId = g.Key.ProjectId,
ReportDate = DateTime.Now.Date,
TypeName = g.Key.RegisterTypesName,
TotalNum = g.Count(),
NeedRectifyNum = g.Count(x => x.States == "1"),
}).ToList();
DeleteProject_HSSEData_HiddenDangerDetailByDate(DateTime.Now.Date);
var projectHsseDataHiddenDangerDetails = new List<Project_HSSEData_HiddenDangerDetail>();
foreach (var item in data)
@@ -3,10 +3,6 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model;
using Newtonsoft.Json;
using static BLL.Project_HJGLData_HJGLService;
namespace BLL
{
@@ -56,7 +52,7 @@ namespace BLL
public static int count
{
get;
set;
set;
}
public static List<Model.Project_SYHSEData_SYHSE> GetProject_SYHSEData_SYHSEByModle(Model.Project_SYHSEData_SYHSE table)
{
@@ -66,7 +62,7 @@ namespace BLL
(string.IsNullOrEmpty(table.ProjectId) || x.Id.Contains(table.ProjectId)) &&
(string.IsNullOrEmpty(table.UnitId) || x.UnitId.Contains(table.UnitId)) &&
(string.IsNullOrEmpty(table.CollCropCode) || x.CollCropCode.Contains(table.CollCropCode)) &&
(string.IsNullOrEmpty(table.UnitName) || x.UnitName.Contains(table.UnitName))
(string.IsNullOrEmpty(table.UnitName) || x.UnitName.Contains(table.UnitName))
select x
;
@@ -80,13 +76,13 @@ namespace BLL
/// <returns></returns>
public static IEnumerable getListData(Model.Project_SYHSEData_SYHSE table, Grid Grid1)
{
var q = GetProject_SYHSEData_SYHSEByModle(table);
var q = GetProject_SYHSEData_SYHSEByModle(table);
count = q.Count();
if (count == 0)
{
return null;
}
//q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
//q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
return from x in q
select new
{
@@ -301,7 +297,7 @@ namespace BLL
/// </summary>
/// <param name="projectid"></param>
/// <param name="sYHSESDateType"></param>
public static void StatisticalData(string projectid,SYHSESDateType sYHSESDateType)
public static void StatisticalData(string projectid, SYHSESDateType sYHSESDateType)
{
string thisUnitId = string.Empty;
var thisUnit = CommonService.GetIsThisUnit();
@@ -325,7 +321,7 @@ namespace BLL
table.ProjectId = projectid;
table.ReportDate = DateTime.Now.Date;
if (sYHSESDateType== SYHSESDateType.RiskControl || sYHSESDateType == SYHSESDateType.All)
if (sYHSESDateType == SYHSESDateType.RiskControl || sYHSESDateType == SYHSESDateType.All)
{
table.GeneralRiskNum = GetGeneralRiskNum(projectid);
table.LowRiskNum = GetLowRiskNum(projectid);
+36 -37
View File
@@ -5,7 +5,6 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BLL
@@ -27,7 +26,7 @@ namespace BLL
var q = from x in Funs.DB.SYHSEData_Data
where
(string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) &&
(string.IsNullOrEmpty(table.FactoryId) || x.FactoryId.Contains(table.FactoryId))
(string.IsNullOrEmpty(table.FactoryId) || x.FactoryId.Contains(table.FactoryId))
select x
;
@@ -86,31 +85,31 @@ namespace BLL
}
public static Model.NewSYHSEData GetItemById(string Id)
{
var data=GetSYHSEData_DataById(Id);
var data = GetSYHSEData_DataById(Id);
var data_realtime = HazardRealtimedeviceService.GetHazard_RealTimeDeviceByDate(data.ReportDate);
var data_hidden= SyhsedataHiddendangercheckService.GetSYHSEData_HiddenDangerCheckByDate(data.ReportDate);
var data_risk= SyhsedataRiskcontrolService.GetSYHSEData_RiskControlByDate(data.ReportDate);
var data_hidden = SyhsedataHiddendangercheckService.GetSYHSEData_HiddenDangerCheckByDate(data.ReportDate);
var data_risk = SyhsedataRiskcontrolService.GetSYHSEData_RiskControlByDate(data.ReportDate);
NewSYHSEData APIData = new NewSYHSEData();
var APIDataList_Item= new List<NewSYHSEDataItem>();
var APIDataList_Relatime= new List<NewSYHSEDataRealTimeDeviceItem>();
var APIDataList_Hidden= new List<NewSYHSEDataHiddenDangerCheckItem>();
var APIDataList_Risk= new List<NewSYHSEDataRiskControlItem>();
var APIDataList_Item = new List<NewSYHSEDataItem>();
var APIDataList_Relatime = new List<NewSYHSEDataRealTimeDeviceItem>();
var APIDataList_Hidden = new List<NewSYHSEDataHiddenDangerCheckItem>();
var APIDataList_Risk = new List<NewSYHSEDataRiskControlItem>();
foreach (var tb in data_realtime)
{
var q = new NewSYHSEDataRealTimeDeviceItem()
{
Id=tb.ID,
HazardName=tb.HazardName,
HazardLevel=tb.HazardLevel,
DeviceName=tb.DeviceName,
Medium=tb.Medium,
MeasurementUnit=tb.MeasurementUnit,
DateTime=tb.DateTime.ToString(),
Value=tb.Value,
Id = tb.ID,
HazardName = tb.HazardName,
HazardLevel = tb.HazardLevel,
DeviceName = tb.DeviceName,
Medium = tb.Medium,
MeasurementUnit = tb.MeasurementUnit,
DateTime = tb.DateTime.ToString(),
Value = tb.Value,
};
APIDataList_Relatime.Add(q);
@@ -120,10 +119,10 @@ namespace BLL
{
var q = new NewSYHSEDataHiddenDangerCheckItem()
{
Id=tb.Id,
HiddenDangerName=tb.HiddenDangerName,
TotalNum=tb.TotalNum.HasValue ? tb.TotalNum.Value:0,
OKNum=tb.OKNum.HasValue ? tb.OKNum.Value : 0,
Id = tb.Id,
HiddenDangerName = tb.HiddenDangerName,
TotalNum = tb.TotalNum.HasValue ? tb.TotalNum.Value : 0,
OKNum = tb.OKNum.HasValue ? tb.OKNum.Value : 0,
};
APIDataList_Hidden.Add(q);
@@ -133,31 +132,31 @@ namespace BLL
{
var q = new NewSYHSEDataRiskControlItem()
{
Id=tb.Id,
RiskControlName=tb.RiskControlName,
};
{
Id = tb.Id,
RiskControlName = tb.RiskControlName,
};
APIDataList_Risk.Add(q);
}
var thisUnit = CommonService.GetIsThisUnit();
NewSYHSEDataItem Item = new NewSYHSEDataItem();
Item.Id = data.Id;
Item.ReportDate=data.ReportDate.ToString();
Item.ReportDate = data.ReportDate.ToString();
Item.UnitId = thisUnit.UnitId;
Item.CollCropCode = thisUnit.CollCropCode;
Item.UnitName= thisUnit.UnitName;
Item.UnitName = thisUnit.UnitName;
Item.FactoryId = data.FactoryId;
Item.FactoryCode = ProjectService.GetProjectByProjectId(data.FactoryId).ProjectCode;
Item.FactoryCode = ProjectService.GetProjectByProjectId(data.FactoryId).ProjectCode;
Item.FactoryName = ProjectService.GetProjectByProjectId(data.FactoryId).ProjectName;
Item.Address = ProjectService.GetProjectByProjectId(data.FactoryId).ProjectAddress;
Item.MapCoordinates= ProjectService.GetProjectByProjectId(data.FactoryId).MapCoordinates;
Item.SafetyMnaHours = data.SafetyMnaHours.HasValue ? data.SafetyMnaHours.Value : 0;
Item.GeneralRiskNum = data.GeneralRiskNum.HasValue ? data.GeneralRiskNum.Value : 0;
Item.LowRiskNum = data.LowRiskNum.HasValue ? data.LowRiskNum.Value : 0;
Item.MoreRiskNum = data.MoreRiskNum.HasValue ? data.MoreRiskNum.Value : 0;
Item.GreatRiskNum = data.GreatRiskNum.HasValue ? data.GreatRiskNum.Value : 0;
Item.MapCoordinates = ProjectService.GetProjectByProjectId(data.FactoryId).MapCoordinates;
Item.SafetyMnaHours = data.SafetyMnaHours.HasValue ? data.SafetyMnaHours.Value : 0;
Item.GeneralRiskNum = data.GeneralRiskNum.HasValue ? data.GeneralRiskNum.Value : 0;
Item.LowRiskNum = data.LowRiskNum.HasValue ? data.LowRiskNum.Value : 0;
Item.MoreRiskNum = data.MoreRiskNum.HasValue ? data.MoreRiskNum.Value : 0;
Item.GreatRiskNum = data.GreatRiskNum.HasValue ? data.GreatRiskNum.Value : 0;
Item.NewSYHSEDataRiskControlItems = APIDataList_Risk;
Item.NewSYHSEDataRealTimeDeviceItems = APIDataList_Relatime;
Item.NewSYHSEDataHiddenDangerCheckItems = APIDataList_Hidden;
@@ -165,7 +164,7 @@ namespace BLL
APIDataList_Item.Add(Item);
APIData.NewSYHSEDataItems = APIDataList_Item;
return APIData;
}
@@ -3,8 +3,6 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model;
namespace BLL
@@ -27,7 +25,7 @@ namespace BLL
where
(string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) &&
(string.IsNullOrEmpty(table.FactoryId) || x.FactoryId.Contains(table.FactoryId)) &&
(string.IsNullOrEmpty(table.HiddenDangerName) || x.HiddenDangerName.Contains(table.HiddenDangerName))
(string.IsNullOrEmpty(table.HiddenDangerName) || x.HiddenDangerName.Contains(table.HiddenDangerName))
select x
;
@@ -3,8 +3,6 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model;
namespace BLL
@@ -27,7 +25,7 @@ namespace BLL
where
(string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) &&
(string.IsNullOrEmpty(table.FactoryId) || x.FactoryId.Contains(table.FactoryId)) &&
(string.IsNullOrEmpty(table.RiskControlName) || x.RiskControlName.Contains(table.RiskControlName))
(string.IsNullOrEmpty(table.RiskControlName) || x.RiskControlName.Contains(table.RiskControlName))
select x
;
@@ -10,7 +10,7 @@ namespace BLL
{
public static class SYHSEData_SYHSEService
{
#region
@@ -307,7 +307,7 @@ namespace BLL
q.State = Const.CNCEC_State_1;
UpdateSYHSEData_SYHSE(q);
}
}
public static bool IsReportByDate(DateTime dateTime)
{
-5
View File
@@ -4,13 +4,8 @@ using Newtonsoft.Json.Linq;
using RestSharp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Configuration;
using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;
using ResponeData = Model.ResponeData;
namespace BLL
{