fix:1
This commit is contained in:
parent
4926935d71
commit
0cb37e2c02
|
@ -1,6 +1,7 @@
|
|||
using BLL.CNCECHSSEService;
|
||||
using FineUIPro;
|
||||
using Model;
|
||||
using Model.Customization;
|
||||
using Newtonsoft.Json;
|
||||
using NPOI.POIFS.Crypt.Dsig;
|
||||
using System;
|
||||
|
@ -8,6 +9,7 @@ using System.Collections;
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
|
@ -52,50 +54,52 @@ namespace BLL
|
|||
// 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.Id,
|
||||
x.UnitId,
|
||||
x.CollCropCode,
|
||||
x.UnitName,
|
||||
x.ReportDate,
|
||||
x.TrainPersonNum,
|
||||
x.TechnicalDisclosePersonNum,
|
||||
x.UseNum,
|
||||
x.OKNum,
|
||||
x.CompanyPersonNum,
|
||||
x.BranchPersonNum,
|
||||
x.ProjectPersonNum,
|
||||
x.ProblemNum,
|
||||
x.ProblemCompletedNum,
|
||||
x.ProblemNotCompletedNum,
|
||||
x.SNum,
|
||||
x.ANum,
|
||||
x.BNum,
|
||||
x.CNum,
|
||||
x.KeyProcessNum,
|
||||
x.KeyProcessOKNum,
|
||||
x.SpecialProcessNum,
|
||||
x.SpecialProcessOKNum,
|
||||
x.ConcealedWorksNum,
|
||||
x.ConcealedWorksOKNum,
|
||||
x.UnitProjectOnesNum,
|
||||
x.UnitProjectOnesOKNum,
|
||||
x.MaterialInRecheckNum,
|
||||
x.MaterialInRecheckOKNum,
|
||||
x.SingleProjectNum,
|
||||
x.UnitProjectNum,
|
||||
x.SubProjectNum,
|
||||
x.SubdivisionalWorksNum,
|
||||
x.InspectionLotNum,
|
||||
x.State,
|
||||
x.CreateDate,
|
||||
x.CreateMan
|
||||
};
|
||||
select new
|
||||
{
|
||||
x.Id,
|
||||
x.UnitId,
|
||||
x.CollCropCode,
|
||||
x.UnitName,
|
||||
x.ReportDate,
|
||||
x.TrainPersonNum,
|
||||
x.TechnicalDisclosePersonNum,
|
||||
x.UseNum,
|
||||
x.OKNum,
|
||||
x.CompanyPersonNum,
|
||||
x.BranchPersonNum,
|
||||
x.ProjectPersonNum,
|
||||
x.ProblemNum,
|
||||
x.ProblemCompletedNum,
|
||||
x.ProblemNotCompletedNum,
|
||||
x.SNum,
|
||||
x.ANum,
|
||||
x.BNum,
|
||||
x.CNum,
|
||||
x.KeyProcessNum,
|
||||
x.KeyProcessOKNum,
|
||||
x.SpecialProcessNum,
|
||||
x.SpecialProcessOKNum,
|
||||
x.ConcealedWorksNum,
|
||||
x.ConcealedWorksOKNum,
|
||||
x.UnitProjectOnesNum,
|
||||
x.UnitProjectOnesOKNum,
|
||||
x.MaterialInRecheckNum,
|
||||
x.MaterialInRecheckOKNum,
|
||||
x.SingleProjectNum,
|
||||
x.UnitProjectNum,
|
||||
x.SubProjectNum,
|
||||
x.SubdivisionalWorksNum,
|
||||
x.InspectionLotNum,
|
||||
x.State,
|
||||
x.CreateDate,
|
||||
x.CreateMan
|
||||
};
|
||||
}
|
||||
|
||||
#endregion 获取列表
|
||||
|
||||
#region 新增、编辑、删除
|
||||
|
||||
public static void AddCQMSData_CQMS(CQMSData_CQMS newtable)
|
||||
{
|
||||
using (Model.SUBQHSEDB db = new Model.SUBQHSEDB(Funs.ConnString))
|
||||
|
@ -136,6 +140,25 @@ namespace BLL
|
|||
SubProjectNum = newtable.SubProjectNum,
|
||||
SubdivisionalWorksNum = newtable.SubdivisionalWorksNum,
|
||||
InspectionLotNum = newtable.InspectionLotNum,
|
||||
EquipmentInspectionNum = newtable.EquipmentInspectionNum,
|
||||
EquipmentInspectionQualifiedNum = newtable.EquipmentInspectionQualifiedNum,
|
||||
MachineInspectionNum = newtable.MachineInspectionNum,
|
||||
MachineInspectionQualifiedNum = newtable.MachineInspectionQualifiedNum,
|
||||
PersonInspectionNum = newtable.PersonInspectionNum,
|
||||
PersonInspectionQualifiedNum = newtable.PersonInspectionQualifiedNum,
|
||||
MaterialInspectionNum = newtable.MaterialInspectionNum,
|
||||
MaterialInspectionQualifiedNum = newtable.MaterialInspectionQualifiedNum,
|
||||
ConstructSolutionNum = newtable.ConstructSolutionNum,
|
||||
ConstructSolutionProjectApproveNum = newtable.ConstructSolutionProjectApproveNum,
|
||||
ConstructSolutionUnitApproveNum = newtable.ConstructSolutionUnitApproveNum,
|
||||
SpecialEquipmentQualityAssuranceSystemNum = newtable.SpecialEquipmentQualityAssuranceSystemNum,
|
||||
DesignDetailsNum = newtable.DesignDetailsNum,
|
||||
UnitProjectAcceptNum = newtable.UnitProjectAcceptNum,
|
||||
UnitProjectAcceptOKNum = newtable.UnitProjectAcceptOKNum,
|
||||
SubProjectAcceptNum = newtable.SubProjectAcceptNum,
|
||||
SubProjectAcceptOKNum = newtable.SubProjectAcceptOKNum,
|
||||
SubdivisionalWorksAcceptNum = newtable.SubdivisionalWorksAcceptNum,
|
||||
SubdivisionalWorksAcceptOKNum = newtable.SubdivisionalWorksAcceptOKNum,
|
||||
State = newtable.State,
|
||||
CreateDate = newtable.CreateDate,
|
||||
CreateMan = newtable.CreateMan
|
||||
|
@ -144,6 +167,7 @@ namespace BLL
|
|||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
public static void UpdateCQMSData_CQMS(CQMSData_CQMS newtable)
|
||||
{
|
||||
using (Model.SUBQHSEDB db = new Model.SUBQHSEDB(Funs.ConnString))
|
||||
|
@ -185,6 +209,25 @@ namespace BLL
|
|||
table.SubProjectNum = newtable.SubProjectNum;
|
||||
table.SubdivisionalWorksNum = newtable.SubdivisionalWorksNum;
|
||||
table.InspectionLotNum = newtable.InspectionLotNum;
|
||||
table.EquipmentInspectionNum = newtable.EquipmentInspectionNum;
|
||||
table.EquipmentInspectionQualifiedNum = newtable.EquipmentInspectionQualifiedNum;
|
||||
table.MachineInspectionNum = newtable.MachineInspectionNum;
|
||||
table.MachineInspectionQualifiedNum = newtable.MachineInspectionQualifiedNum;
|
||||
table.PersonInspectionNum = newtable.PersonInspectionNum;
|
||||
table.PersonInspectionQualifiedNum = newtable.PersonInspectionQualifiedNum;
|
||||
table.MaterialInspectionNum = newtable.MaterialInspectionNum;
|
||||
table.MaterialInspectionQualifiedNum = newtable.MaterialInspectionQualifiedNum;
|
||||
table.ConstructSolutionNum = newtable.ConstructSolutionNum;
|
||||
table.ConstructSolutionProjectApproveNum = newtable.ConstructSolutionProjectApproveNum;
|
||||
table.ConstructSolutionUnitApproveNum = newtable.ConstructSolutionUnitApproveNum;
|
||||
table.SpecialEquipmentQualityAssuranceSystemNum = newtable.SpecialEquipmentQualityAssuranceSystemNum;
|
||||
table.DesignDetailsNum = newtable.DesignDetailsNum;
|
||||
table.UnitProjectAcceptNum = newtable.UnitProjectAcceptNum;
|
||||
table.UnitProjectAcceptOKNum = newtable.UnitProjectAcceptOKNum;
|
||||
table.SubProjectAcceptNum = newtable.SubProjectAcceptNum;
|
||||
table.SubProjectAcceptOKNum = newtable.SubProjectAcceptOKNum;
|
||||
table.SubdivisionalWorksAcceptNum = newtable.SubdivisionalWorksAcceptNum;
|
||||
table.SubdivisionalWorksAcceptOKNum = newtable.SubdivisionalWorksAcceptOKNum;
|
||||
table.State = newtable.State;
|
||||
table.CreateMan = newtable.CreateMan;
|
||||
table.CreateDate = newtable.CreateDate;
|
||||
|
@ -206,6 +249,8 @@ namespace BLL
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public static CQMSData_CQMS GetCQMSData_CQMSById(string id)
|
||||
{
|
||||
var db = Funs.DB;
|
||||
|
@ -258,6 +303,25 @@ namespace BLL
|
|||
item.SubProjectNum = model.SubProjectNum;
|
||||
item.SubdivisionalWorksNum = model.SubdivisionalWorksNum;
|
||||
item.InspectionLotNum = model.InspectionLotNum;
|
||||
item.EquipmentInspectionNum = model.EquipmentInspectionNum;
|
||||
item.EquipmentInspectionQualifiedNum = model.EquipmentInspectionQualifiedNum;
|
||||
item.MachineInspectionNum = model.MachineInspectionNum;
|
||||
item.MachineInspectionQualifiedNum = model.MachineInspectionQualifiedNum;
|
||||
item.PersonInspectionNum = model.PersonInspectionNum;
|
||||
item.PersonInspectionQualifiedNum = model.PersonInspectionQualifiedNum;
|
||||
item.MaterialInspectionNum = model.MaterialInspectionNum;
|
||||
item.MaterialInspectionQualifiedNum = model.MaterialInspectionQualifiedNum;
|
||||
item.ConstructSolutionNum = model.ConstructSolutionNum;
|
||||
item.ConstructSolutionProjectApproveNum = model.ConstructSolutionProjectApproveNum;
|
||||
item.ConstructSolutionUnitApproveNum = model.ConstructSolutionUnitApproveNum;
|
||||
item.SpecialEquipmentQualityAssuranceSystemNum = model.SpecialEquipmentQualityAssuranceSystemNum;
|
||||
item.DesignDetailsNum = model.DesignDetailsNum;
|
||||
item.UnitProjectAcceptNum = model.UnitProjectAcceptNum;
|
||||
item.UnitProjectAcceptOKNum = model.UnitProjectAcceptOKNum;
|
||||
item.SubProjectAcceptNum = model.SubProjectAcceptNum;
|
||||
item.SubProjectAcceptOKNum = model.SubProjectAcceptOKNum;
|
||||
item.SubdivisionalWorksAcceptNum = model.SubdivisionalWorksAcceptNum;
|
||||
item.SubdivisionalWorksAcceptOKNum = model.SubdivisionalWorksAcceptOKNum;
|
||||
}
|
||||
|
||||
var cqmsDataItems = new List<CqmsDataItem>();
|
||||
|
@ -266,34 +330,29 @@ namespace BLL
|
|||
return data;
|
||||
}
|
||||
|
||||
public static CQMSData GetTodayCQMSData_CQMS()
|
||||
public static async Task<CQMSData> GetTodayCQMSData_CQMS()
|
||||
{
|
||||
// var q = GetTodayData();
|
||||
var data = new CQMSData();
|
||||
data = StatisticalData();
|
||||
// var data = new CQMSData();
|
||||
// data = StatisticalData();
|
||||
|
||||
//if (q != null && q.State == Const.CNCEC_State_S)
|
||||
//{
|
||||
// // data = GetDataByCQMSData_CQMS(q);
|
||||
// data = StatisticalData();
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// data = StatisticalData();
|
||||
//}
|
||||
// return data;
|
||||
|
||||
var modelTask = StatisitcalDataAsync();
|
||||
var model = await modelTask;
|
||||
CQMSData data = model;
|
||||
return data;
|
||||
}
|
||||
|
||||
public static CQMSData_CQMS GetTodayData()
|
||||
{
|
||||
var q = (from x in Funs.DB.CQMSData_CQMS
|
||||
where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date
|
||||
select x).FirstOrDefault();
|
||||
where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date
|
||||
select x).FirstOrDefault();
|
||||
return q;
|
||||
}
|
||||
public static CQMSData_CQMS GetSubUnitCqmsDataByDate(string Unitid, DateTime? reportdate)
|
||||
{
|
||||
|
||||
|
||||
var result = new Model.CQMSData_CQMS();
|
||||
if (reportdate == null)
|
||||
{
|
||||
|
@ -303,7 +362,7 @@ namespace BLL
|
|||
var base_Unit = UnitService.GetUnitByUnitId(Unitid);
|
||||
var ProjectData = (from x in Funs.DB.Project_CQMSData_CQMS
|
||||
where x.ReportDate == reportdate && projectlist.Select(e => e.ProjectId).Contains(x.ProjectId)
|
||||
select x).ToList();
|
||||
select x).ToList();
|
||||
result = new CQMSData_CQMS
|
||||
{
|
||||
UnitId = Unitid,
|
||||
|
@ -358,8 +417,8 @@ namespace BLL
|
|||
{
|
||||
var result = false;
|
||||
var q = (from x in Funs.DB.CQMSData_CQMS
|
||||
where x.ReportDate >= dateTime.Date && x.ReportDate < dateTime.Date.AddDays(1).Date
|
||||
select x).ToList();
|
||||
where x.ReportDate >= dateTime.Date && x.ReportDate < dateTime.Date.AddDays(1).Date
|
||||
select x).ToList();
|
||||
if (q.Count > 0) result = true;
|
||||
return result;
|
||||
}
|
||||
|
@ -372,8 +431,8 @@ namespace BLL
|
|||
{
|
||||
var result = false;
|
||||
var q = (from x in Funs.DB.CQMSData_CQMS
|
||||
where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date
|
||||
select x).ToList();
|
||||
where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date
|
||||
select x).ToList();
|
||||
if (q.Count > 0) result = true;
|
||||
return result;
|
||||
}
|
||||
|
@ -396,8 +455,8 @@ namespace BLL
|
|||
Project_CQMSDataService.StatisticalAllProjectData();
|
||||
|
||||
var ProjectData = (from x in Funs.DB.Project_CQMSData_CQMS
|
||||
where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date
|
||||
select x).ToList();
|
||||
where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date
|
||||
select x).ToList();
|
||||
var table = new CQMSData_CQMS
|
||||
{
|
||||
UnitId = thisUnitId,
|
||||
|
@ -433,6 +492,25 @@ namespace BLL
|
|||
SubProjectNum = ProjectData.Sum(x => x.SubProjectNum),
|
||||
SubdivisionalWorksNum = ProjectData.Sum(x => x.SubdivisionalWorksNum),
|
||||
InspectionLotNum = ProjectData.Sum(x => x.InspectionLotNum),
|
||||
EquipmentInspectionNum = ProjectData.Sum(x => x.EquipmentInspectionNum),
|
||||
EquipmentInspectionQualifiedNum = ProjectData.Sum(x => x.EquipmentInspectionQualifiedNum),
|
||||
MachineInspectionNum = ProjectData.Sum(x => x.MachineInspectionNum),
|
||||
MachineInspectionQualifiedNum = ProjectData.Sum(x => x.MachineInspectionQualifiedNum),
|
||||
PersonInspectionNum = ProjectData.Sum(x => x.PersonInspectionNum),
|
||||
PersonInspectionQualifiedNum = ProjectData.Sum(x => x.PersonInspectionQualifiedNum),
|
||||
MaterialInspectionNum = ProjectData.Sum(x => x.MaterialInspectionNum),
|
||||
MaterialInspectionQualifiedNum = ProjectData.Sum(x => x.MaterialInspectionQualifiedNum),
|
||||
ConstructSolutionNum = ProjectData.Sum(x => x.ConstructSolutionNum),
|
||||
ConstructSolutionProjectApproveNum = ProjectData.Sum(x => x.ConstructSolutionProjectApproveNum),
|
||||
ConstructSolutionUnitApproveNum = ProjectData.Sum(x => x.ConstructSolutionUnitApproveNum),
|
||||
SpecialEquipmentQualityAssuranceSystemNum = ProjectData.Sum(x => x.SpecialEquipmentQualityAssuranceSystemNum),
|
||||
DesignDetailsNum = ProjectData.Sum(x => x.DesignDetailsNum),
|
||||
UnitProjectAcceptNum = ProjectData.Sum(x => x.UnitProjectAcceptNum),
|
||||
UnitProjectAcceptOKNum = ProjectData.Sum(x => x.UnitProjectAcceptOKNum),
|
||||
SubProjectAcceptNum = ProjectData.Sum(x => x.SubProjectAcceptNum),
|
||||
SubProjectAcceptOKNum = ProjectData.Sum(x => x.SubProjectAcceptOKNum),
|
||||
SubdivisionalWorksAcceptNum = ProjectData.Sum(x => x.SubdivisionalWorksAcceptNum),
|
||||
SubdivisionalWorksAcceptOKNum = ProjectData.Sum(x => x.SubdivisionalWorksAcceptOKNum),
|
||||
CreateMan = Const.sysglyId,
|
||||
CreateDate = DateTime.Now
|
||||
};
|
||||
|
@ -454,6 +532,241 @@ namespace BLL
|
|||
return data;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取质量统计数据
|
||||
/// </summary>
|
||||
public static async Task<CQMSData> StatisitcalDataAsync()
|
||||
{
|
||||
var thisUnitId = string.Empty;
|
||||
var thisUnit = CommonService.GetIsThisUnit();
|
||||
if (thisUnit != null) thisUnitId = thisUnit.UnitId;
|
||||
var baseUnit = UnitService.GetUnitByUnitId(thisUnitId);
|
||||
|
||||
// 并行执行异步方法
|
||||
var companyPersonNumTask = CQMSDataService.GetCompanyPersonNumAsync(); //获取企业总部人数
|
||||
var branchPersonNumTask = CQMSDataService.GetBranchPersonNumAsync(); //获取分支机构人数
|
||||
var projectPersonNumTask = CQMSDataService.GetProjectPersonNumAsync(); //获取项目专职人数
|
||||
var trainPersonNumTask = CQMSDataService.GetTrainPersonNumAsync(); //获取质量培训人次数
|
||||
var technicalDisclosePersonTask = CQMSDataService.GetTechnicalDisclosePersonNumAsync(); //获取技术交底人次数
|
||||
|
||||
var inspectionEquipmentTask = CQMSDataService.GetComprehensive_InspectionEquipmentAsync(); //获取设备报验
|
||||
var inspectionPersonTask = CQMSDataService.GetComprehensive_InspectionPersonAsync(); //获取人员报验
|
||||
var inspectionMachineTask = CQMSDataService.GetComprehensive_InspectionMachineAsync(); //获取机具报验
|
||||
var useNumTask = CQMSDataService.GetUseNumAsync(); //获取在用计量器具数
|
||||
var okNumTask = CQMSDataService.GetOkNumAsync(); //获取校准合格数
|
||||
|
||||
var singleProjectNumTask = CQMSDataService.GetSingleProjectNumAsync(); //获取单项工程个数
|
||||
var unitProjectNumTask = CQMSDataService.GetUnitProjectNumAsync(); //获取单位工程个数
|
||||
var subProjectNuTask = CQMSDataService.GetSubProjectNumAsync(); //获取分部工程个数
|
||||
var subdivisionalWorksNuTask = CQMSDataService.GetSubdivisionalWorksNumAsync(); //获取分项工程个数
|
||||
var inspectionLotNumTask = CQMSDataService.GetInspectionLotNumAsync(); //获取检验批个数
|
||||
var constructSolutionTask = CQMSDataService.GetConstructSolutionAsync(); //施工方案数量
|
||||
var cqmsProblemTask = CQMSDataService.GetCQMSProblemAsync(); //获取企业级、项目级质量问题
|
||||
|
||||
//质量验收数据
|
||||
var keyProcessNumTask = CQMSDataService.GetKeyProcessNumAsync(); //获取关键工序验收数
|
||||
var keyProcessOKNumTask = CQMSDataService.GetKeyProcessOkNumAsync(); //获取关键工序验收合格数
|
||||
var specialProcessNumTask = CQMSDataService.GetSpecialProcessNumAsync(); //获取特殊过程验收数
|
||||
var specialProcessOKNumTask = CQMSDataService.GetSpecialProcessOkNumAsync(); //获取特殊过程验收合格数
|
||||
var concealedWorksNumTask = CQMSDataService.GetConcealedWorksNumAsync(); //获取隐蔽工程验收数
|
||||
var concealedWorksOKNumTask = CQMSDataService.GetConcealedWorksOkNumAsync(); //获取隐蔽工程验收合格数
|
||||
|
||||
var unitProjectAcceptNumTask = CQMSDataService.GetUnitProjectAcceptNumAsync(); //获取单位工程验收数
|
||||
var unitProjectAcceptOKNumTask = CQMSDataService.GetUnitProjectAcceptOKNumAsync(); //获取单位工程验收合格数
|
||||
var subProjectAcceptNumTask = CQMSDataService.GetSubProjectAcceptNumAsync(); //获取分部工程验收数
|
||||
var subProjectAcceptOKNumTask = CQMSDataService.GetSubProjectAcceptOKNumAsync(); //获取分部工程验收合格数
|
||||
var subdivisionalWorksAcceptNumTask = CQMSDataService.GetSubdivisionalWorksAcceptNumAsync(); //获取分项工程验收数
|
||||
var subdivisionalWorksAcceptOKNumTask = CQMSDataService.GetSubdivisionalWorksAcceptOKNumAsync(); //获取分项工程验收合格数
|
||||
var materialInRecheckNumTask = CQMSDataService.GetMaterialInRecheckNumAsync(); //获取复核材料数
|
||||
var materialInRecheckOKNumTask = CQMSDataService.GetMaterialInRecheckOKNumAsync(); //获取复核材料合格数
|
||||
|
||||
// 等待所有异步方法执行完成
|
||||
await Task.WhenAll(
|
||||
companyPersonNumTask, branchPersonNumTask, projectPersonNumTask,
|
||||
trainPersonNumTask, technicalDisclosePersonTask,
|
||||
inspectionEquipmentTask, inspectionPersonTask, inspectionMachineTask,
|
||||
useNumTask, okNumTask,
|
||||
singleProjectNumTask, unitProjectNumTask, subProjectNuTask, subdivisionalWorksNuTask, inspectionLotNumTask,
|
||||
constructSolutionTask,
|
||||
cqmsProblemTask,
|
||||
keyProcessNumTask, keyProcessOKNumTask, specialProcessNumTask, specialProcessOKNumTask, concealedWorksNumTask, concealedWorksOKNumTask,
|
||||
unitProjectAcceptNumTask, unitProjectAcceptOKNumTask, subProjectAcceptNumTask, subProjectAcceptOKNumTask, subdivisionalWorksAcceptNumTask, subdivisionalWorksAcceptOKNumTask,
|
||||
materialInRecheckNumTask, materialInRecheckOKNumTask
|
||||
);
|
||||
|
||||
// 统一获取异步方法的返回值
|
||||
var companyPersonNum = await companyPersonNumTask;
|
||||
var branchPersonNum = await branchPersonNumTask;
|
||||
var projectPersonNumList = await projectPersonNumTask;
|
||||
var trainPersonNumList = await trainPersonNumTask;
|
||||
var technicalDisclosePersonList = await technicalDisclosePersonTask;
|
||||
|
||||
var inspectionEquipmentList = await inspectionEquipmentTask;
|
||||
var inspectionPersonList = await inspectionPersonTask;
|
||||
var inspectionMachineList = await inspectionMachineTask;
|
||||
var useNum = await useNumTask;
|
||||
var okNum = await okNumTask;
|
||||
var singleProjectNum = await singleProjectNumTask;
|
||||
var unitProjectNum = await unitProjectNumTask;
|
||||
var subProjectNum = await subProjectNuTask;
|
||||
var subdivisionalWorksNum = await subdivisionalWorksNuTask;
|
||||
var inspectionLotNum = await inspectionLotNumTask;
|
||||
|
||||
var constructSolutionList = await constructSolutionTask;
|
||||
var cqmsProblemList = await cqmsProblemTask;
|
||||
|
||||
var keyProcessNum = await keyProcessNumTask;
|
||||
var keyProcessOKNum = await keyProcessOKNumTask;
|
||||
var specialProcessNum = await specialProcessNumTask;
|
||||
var specialProcessOKNum = await specialProcessOKNumTask;
|
||||
var concealedWorksNum = await concealedWorksNumTask;
|
||||
var concealedWorksOKNum = await concealedWorksOKNumTask;
|
||||
|
||||
var unitProjectAcceptNum = await unitProjectAcceptNumTask;
|
||||
var unitProjectAcceptOKNum = await unitProjectAcceptOKNumTask;
|
||||
var subProjectAcceptNum = await subProjectAcceptNumTask;
|
||||
var subProjectAcceptOKNum = await subProjectAcceptOKNumTask;
|
||||
var subdivisionalWorksAcceptNum = await subdivisionalWorksAcceptNumTask;
|
||||
var subdivisionalWorksAcceptOKNum = await subdivisionalWorksAcceptOKNumTask;
|
||||
var materialInRecheckNum = await materialInRecheckNumTask;
|
||||
var materialInRecheckOKNum = await materialInRecheckOKNumTask;
|
||||
|
||||
// 构造结果对象
|
||||
var table = new CQMSData_CQMS
|
||||
{
|
||||
UnitId = thisUnitId,
|
||||
CollCropCode = baseUnit.CollCropCode,
|
||||
UnitName = baseUnit.UnitName,
|
||||
ReportDate = DateTime.Now.Date,
|
||||
CompanyPersonNum = companyPersonNum,//
|
||||
BranchPersonNum = branchPersonNum,//
|
||||
ProjectPersonNum = projectPersonNumList.Count(),
|
||||
TrainPersonNum = trainPersonNumList.Count(),
|
||||
TechnicalDisclosePersonNum = technicalDisclosePersonList.Sum(x => x.TrainPersonNum),
|
||||
EquipmentInspectionNum = inspectionEquipmentList.Count(),
|
||||
EquipmentInspectionQualifiedNum = inspectionEquipmentList.Where(x => x.SamplingResult == "1").Count(),
|
||||
PersonInspectionNum = inspectionPersonList.Count(),
|
||||
PersonInspectionQualifiedNum = inspectionPersonList.Where(x => x.IsOnSite.HasValue && x.IsOnSite == true).Count(),
|
||||
MachineInspectionNum = inspectionMachineList.Count(),
|
||||
MachineInspectionQualifiedNum = inspectionMachineList.Where(x => x.IsCheckOK.HasValue && x.IsCheckOK == true).Count(),
|
||||
MaterialInspectionNum = 0,
|
||||
MaterialInspectionQualifiedNum = 0,
|
||||
UseNum = useNum.Count(),
|
||||
OKNum = okNum.Count(),
|
||||
SingleProjectNum = singleProjectNum.Count(),
|
||||
UnitProjectNum = unitProjectNum.Count(),
|
||||
SubProjectNum = subProjectNum.Count(),
|
||||
SubdivisionalWorksNum = subdivisionalWorksNum.Count(),
|
||||
InspectionLotNum = inspectionLotNum.Sum(x => x.Sum),
|
||||
|
||||
ConstructSolutionNum = constructSolutionList.Count(),
|
||||
ConstructSolutionProjectApproveNum = constructSolutionList.Where(x => x.State == "1").Count(),
|
||||
ConstructSolutionUnitApproveNum = 0,//
|
||||
SpecialEquipmentQualityAssuranceSystemNum = 0,//
|
||||
DesignDetailsNum = technicalDisclosePersonList.Sum(x => x.TrainPersonNum),
|
||||
|
||||
ProblemNum = cqmsProblemList.Count(),
|
||||
ProblemCompletedNum = cqmsProblemList.Where(x => x.State == "7").Count(),
|
||||
ProblemNotCompletedNum = cqmsProblemList.Where(x => x.State != "7").Count(),
|
||||
|
||||
KeyProcessNum = keyProcessNum.Count(),
|
||||
KeyProcessOKNum = keyProcessOKNum.Count(),
|
||||
SpecialProcessNum = specialProcessNum.Count(),
|
||||
SpecialProcessOKNum = specialProcessOKNum.Count(),
|
||||
ConcealedWorksNum = concealedWorksNum.Count(),
|
||||
ConcealedWorksOKNum = concealedWorksOKNum.Count(),
|
||||
UnitProjectAcceptNum = unitProjectAcceptNum.Count(),
|
||||
UnitProjectAcceptOKNum = unitProjectAcceptOKNum.Count(),
|
||||
SubProjectAcceptNum = subProjectAcceptNum.Count(),
|
||||
SubProjectAcceptOKNum = subProjectAcceptOKNum.Count(),
|
||||
SubdivisionalWorksAcceptNum = subdivisionalWorksAcceptNum.Count(),
|
||||
SubdivisionalWorksAcceptOKNum = subdivisionalWorksAcceptOKNum.Count(),
|
||||
MaterialInRecheckNum = materialInRecheckNum.Count(),
|
||||
MaterialInRecheckOKNum = materialInRecheckOKNum.Count()
|
||||
};
|
||||
#region 添加项目统计数据
|
||||
|
||||
Project_CQMSDataService.DeleteProject_CQMSData_CQMByDate(DateTime.Now.Date);
|
||||
foreach (var projectid in BeUnderConstructionList)
|
||||
{
|
||||
var projectCqmsData = new Project_CQMSData_CQMS
|
||||
{
|
||||
Id = SQLHelper.GetNewID(),
|
||||
ProjectId = projectid,
|
||||
UnitId = thisUnitId,
|
||||
CollCropCode = baseUnit.CollCropCode,
|
||||
UnitName = baseUnit.UnitName,
|
||||
ReportDate = DateTime.Now.Date,
|
||||
CompanyPersonNum = companyPersonNum,//
|
||||
BranchPersonNum = branchPersonNum,//
|
||||
ProjectPersonNum = projectPersonNumList.Count(x => x.ProjectId == projectid),
|
||||
TrainPersonNum = trainPersonNumList.Count(x => x.ProjectId == projectid),
|
||||
TechnicalDisclosePersonNum = technicalDisclosePersonList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum),
|
||||
EquipmentInspectionNum = inspectionEquipmentList.Count(x => x.ProjectId == projectid),
|
||||
EquipmentInspectionQualifiedNum = inspectionEquipmentList.Where(x => x.SamplingResult == "1" && x.ProjectId == projectid).Count(),
|
||||
PersonInspectionNum = inspectionPersonList.Count(x => x.ProjectId == projectid),
|
||||
PersonInspectionQualifiedNum = inspectionPersonList.Where(x => x.IsOnSite.HasValue && x.IsOnSite == true && x.ProjectId == projectid).Count(),
|
||||
MachineInspectionNum = inspectionMachineList.Count(x => x.ProjectId == projectid),
|
||||
MachineInspectionQualifiedNum = inspectionMachineList.Where(x => x.IsCheckOK.HasValue && x.IsCheckOK == true && x.ProjectId == projectid).Count(),
|
||||
MaterialInspectionNum = 0,
|
||||
MaterialInspectionQualifiedNum = 0,
|
||||
UseNum = useNum.Count(x => x.ProjectId == projectid),
|
||||
OKNum = okNum.Count(x => x.ProjectId == projectid),
|
||||
SingleProjectNum = singleProjectNum.Count(x => x.ProjectId == projectid),
|
||||
UnitProjectNum = unitProjectNum.Count(x => x.ProjectId == projectid),
|
||||
SubProjectNum = subProjectNum.Count(x => x.ProjectId == projectid),
|
||||
SubdivisionalWorksNum = subdivisionalWorksNum.Count(x => x.ProjectId == projectid),
|
||||
InspectionLotNum = inspectionLotNum.Where(x => x.ProjectId == projectid).Sum(x => x.Sum),
|
||||
|
||||
ConstructSolutionNum = constructSolutionList.Count(x => x.ProjectId == projectid),
|
||||
ConstructSolutionProjectApproveNum = constructSolutionList.Where(x => x.State == "1" && x.ProjectId == projectid).Count(),
|
||||
ConstructSolutionUnitApproveNum = 0,//
|
||||
SpecialEquipmentQualityAssuranceSystemNum = 0,//
|
||||
DesignDetailsNum = technicalDisclosePersonList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum),
|
||||
|
||||
ProblemNum = cqmsProblemList.Count(x => x.ProjectId == projectid),
|
||||
ProblemCompletedNum = cqmsProblemList.Where(x => x.State == "7" && x.ProjectId == projectid).Count(),
|
||||
ProblemNotCompletedNum = cqmsProblemList.Where(x => x.State != "7" && x.ProjectId == projectid).Count(),
|
||||
|
||||
KeyProcessNum = keyProcessNum.Count(x => x.ProjectId == projectid),
|
||||
KeyProcessOKNum = keyProcessOKNum.Count(x => x.ProjectId == projectid),
|
||||
SpecialProcessNum = specialProcessNum.Count(x => x.ProjectId == projectid),
|
||||
SpecialProcessOKNum = specialProcessOKNum.Count(x => x.ProjectId == projectid),
|
||||
ConcealedWorksNum = concealedWorksNum.Count(x => x.ProjectId == projectid),
|
||||
ConcealedWorksOKNum = concealedWorksOKNum.Count(x => x.ProjectId == projectid),
|
||||
UnitProjectAcceptNum = unitProjectAcceptNum.Count(x => x.ProjectId == projectid),
|
||||
UnitProjectAcceptOKNum = unitProjectAcceptOKNum.Count(x => x.ProjectId == projectid),
|
||||
SubProjectAcceptNum = subProjectAcceptNum.Count(x => x.ProjectId == projectid),
|
||||
SubProjectAcceptOKNum = subProjectAcceptOKNum.Count(x => x.ProjectId == projectid),
|
||||
SubdivisionalWorksAcceptNum = subdivisionalWorksAcceptNum.Count(x => x.ProjectId == projectid),
|
||||
SubdivisionalWorksAcceptOKNum = subdivisionalWorksAcceptOKNum.Count(x => x.ProjectId == projectid),
|
||||
MaterialInRecheckNum = materialInRecheckNum.Count(x => x.ProjectId == projectid),
|
||||
MaterialInRecheckOKNum = materialInRecheckOKNum.Count(x => x.ProjectId == projectid)
|
||||
};
|
||||
Project_CQMSDataService.AddProject_CQMSData_CQMS(projectCqmsData);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
if (IsReportByToday())
|
||||
{
|
||||
table.Id = GetTodayData().Id;
|
||||
table.State = Const.CNCEC_State_1;
|
||||
UpdateCQMSData_CQMS(table);
|
||||
}
|
||||
else
|
||||
{
|
||||
table.Id = SQLHelper.GetNewID();
|
||||
table.State = Const.CNCEC_State_0;
|
||||
AddCQMSData_CQMS(table);
|
||||
}
|
||||
var data = new CQMSData();
|
||||
data = GetDataByCQMSData_CQMS(table);
|
||||
return data;
|
||||
|
||||
}
|
||||
|
||||
public static CQMSData GetDataByCQMSData_CQMS(CQMSData_CQMS table)
|
||||
{
|
||||
var data = new CQMSData();
|
||||
|
@ -497,13 +810,31 @@ namespace BLL
|
|||
item.SubProjectNum = table.SubProjectNum;
|
||||
item.SubdivisionalWorksNum = table.SubdivisionalWorksNum;
|
||||
item.InspectionLotNum = table.InspectionLotNum;
|
||||
item.EquipmentInspectionNum = table.EquipmentInspectionNum;
|
||||
item.EquipmentInspectionQualifiedNum = table.EquipmentInspectionQualifiedNum;
|
||||
item.MachineInspectionNum = table.MachineInspectionNum;
|
||||
item.MachineInspectionQualifiedNum = table.MachineInspectionQualifiedNum;
|
||||
item.PersonInspectionNum = table.PersonInspectionNum;
|
||||
item.PersonInspectionQualifiedNum = table.PersonInspectionQualifiedNum;
|
||||
item.MaterialInspectionNum = table.MaterialInspectionNum;
|
||||
item.MaterialInspectionQualifiedNum = table.MaterialInspectionQualifiedNum;
|
||||
item.ConstructSolutionNum = table.ConstructSolutionNum;
|
||||
item.ConstructSolutionProjectApproveNum = table.ConstructSolutionProjectApproveNum;
|
||||
item.ConstructSolutionUnitApproveNum = table.ConstructSolutionUnitApproveNum;
|
||||
item.SpecialEquipmentQualityAssuranceSystemNum = table.SpecialEquipmentQualityAssuranceSystemNum;
|
||||
item.DesignDetailsNum = table.DesignDetailsNum;
|
||||
item.UnitProjectAcceptNum = table.UnitProjectAcceptNum;
|
||||
item.UnitProjectAcceptOKNum = table.UnitProjectAcceptOKNum;
|
||||
item.SubProjectAcceptNum = table.SubProjectAcceptNum;
|
||||
item.SubProjectAcceptOKNum = table.SubProjectAcceptOKNum;
|
||||
item.SubdivisionalWorksAcceptNum = table.SubdivisionalWorksAcceptNum;
|
||||
item.SubdivisionalWorksAcceptOKNum = table.SubdivisionalWorksAcceptOKNum;
|
||||
var cqmsDataItems = new List<CqmsDataItem>();
|
||||
cqmsDataItems.Add(item);
|
||||
data.CQMSDataItems = cqmsDataItems;
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取企业总部人数
|
||||
/// </summary>
|
||||
|
@ -514,9 +845,9 @@ namespace BLL
|
|||
var thisUnit = CommonService.GetIsThisUnit();
|
||||
if (thisUnit != null) unitId = thisUnit.UnitId;
|
||||
var result = (from x in Funs.DB.Person_CompanyBranchPerson
|
||||
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
|
||||
where x.IsOnJob == true && y.IsCQMS == true && x.UnitId == unitId
|
||||
select x).Count();
|
||||
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
|
||||
where x.IsOnJob == true && y.IsCQMS == true && x.UnitId == unitId
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -539,9 +870,9 @@ namespace BLL
|
|||
var thisUnit = CommonService.GetIsThisUnit();
|
||||
if (thisUnit != null) unitId = thisUnit.UnitId;
|
||||
var result = (from x in Funs.DB.Person_CompanyBranchPerson
|
||||
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
|
||||
where x.IsOnJob == true && y.IsCQMS == true && x.UnitId != unitId
|
||||
select x).Count();
|
||||
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
|
||||
where x.IsOnJob == true && y.IsCQMS == true && x.UnitId != unitId
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -558,15 +889,15 @@ namespace BLL
|
|||
/// 获取项目专职人数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.OfSafetySupervisorsOutput> GetProjectPersonNum()
|
||||
public static IEnumerable<Model.OfSafetySupervisorsOutput> GetProjectPersonNum()
|
||||
{
|
||||
var result = (from x in Funs.DB.SitePerson_Person
|
||||
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
|
||||
join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup
|
||||
from p in pGroup.DefaultIfEmpty()
|
||||
join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup
|
||||
from u in uGroup.DefaultIfEmpty()
|
||||
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
|
||||
where BeUnderConstructionList.Contains(p.ProjectId) && y.IsCQMS == true && x.IsUsed == true && x.IdentityCard != null
|
||||
where BeUnderConstructionList.Contains(p.ProjectId) && y.IsCQMS == true && x.IsUsed == true
|
||||
select new Model.OfSafetySupervisorsOutput
|
||||
{
|
||||
ProjectId = x.ProjectId,
|
||||
|
@ -576,7 +907,7 @@ namespace BLL
|
|||
Name = x.PersonName,
|
||||
Sex = x.Sex == null ? "" : (x.Sex == "1" ? "男" : "女"),
|
||||
IdentityCard = x.IdentityCard,
|
||||
WorkPostName = PostService.GetPostNameById(x.WorkPostId),
|
||||
WorkPostName = y.WorkPostName == null ? "" : y.WorkPostName,
|
||||
Phone = x.Telephone
|
||||
}).ToList();
|
||||
result = result
|
||||
|
@ -589,7 +920,7 @@ namespace BLL
|
|||
/// 获取项目专职人数(异步)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static async Task<List<Model.OfSafetySupervisorsOutput>> GetProjectPersonNumAsync()
|
||||
public static async Task<IEnumerable<Model.OfSafetySupervisorsOutput>> GetProjectPersonNumAsync()
|
||||
{
|
||||
return await Task.Run(GetProjectPersonNum);
|
||||
}
|
||||
|
@ -605,8 +936,10 @@ namespace BLL
|
|||
from p in pGroup.DefaultIfEmpty()
|
||||
join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup
|
||||
from u in uGroup.DefaultIfEmpty()
|
||||
join y in Funs.DB.SitePerson_Person on x.InspectionPersonId equals y.PersonId
|
||||
join z in Funs.DB.Base_WorkPost on y.WorkPostId equals z.WorkPostId
|
||||
join y in Funs.DB.SitePerson_Person on x.InspectionPersonId equals y.PersonId into yGroup
|
||||
from y in yGroup.DefaultIfEmpty()
|
||||
join m in Funs.DB.Base_WorkPost on y.WorkPostId equals m.WorkPostId into mGroup
|
||||
from m in mGroup.DefaultIfEmpty()
|
||||
where BeUnderConstructionList.Contains(p.ProjectId) && x.IsTrain == true && x.CompileDate > Const.DtmarkTime
|
||||
select new Model.OfSafetySupervisorsOutput
|
||||
{
|
||||
|
@ -617,7 +950,7 @@ namespace BLL
|
|||
Name = x.PersonName,
|
||||
Sex = y.Sex == null ? "" : (y.Sex == "1" ? "男" : "女"),
|
||||
IdentityCard = y.IdentityCard,
|
||||
WorkPostName = PostService.GetPostNameById(y.WorkPostId),
|
||||
WorkPostName = m.WorkPostName == null ? "" : m.WorkPostName,
|
||||
Phone = y.Telephone
|
||||
}).ToList();
|
||||
return result;
|
||||
|
@ -870,11 +1203,16 @@ namespace BLL
|
|||
/// 获取检验批个数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<WBS_BreakdownProject> GetInspectionLotNum()
|
||||
public static List<WBSBreakdownProjectOutput> GetInspectionLotNum()
|
||||
{
|
||||
var result = (from x in Funs.DB.WBS_BreakdownProject
|
||||
where BeUnderConstructionList.Contains(x.ProjectId) && x.IsSelected == true
|
||||
select x).ToList();
|
||||
group x by x.ProjectId into g
|
||||
select new Model.WBSBreakdownProjectOutput()
|
||||
{
|
||||
ProjectId = g.Key,
|
||||
Sum = g.Count(),
|
||||
}).ToList() ;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -882,7 +1220,7 @@ namespace BLL
|
|||
/// 获取检验批个数(异步)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static async Task<List<WBS_BreakdownProject>> GetInspectionLotNumAsync()
|
||||
public static async Task<List<WBSBreakdownProjectOutput>> GetInspectionLotNumAsync()
|
||||
{
|
||||
return await Task.Run(GetInspectionLotNum);
|
||||
}
|
||||
|
@ -1204,6 +1542,68 @@ namespace BLL
|
|||
}
|
||||
|
||||
|
||||
/// 获取材料进场复验数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<InspectionManagementOutput> GetMaterialInRecheckNum()
|
||||
{
|
||||
var result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
|
||||
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId
|
||||
join z in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals z.InspectionId
|
||||
where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "5" && x.CreateDate > Const.DtmarkTime
|
||||
select new Model.InspectionManagementOutput()
|
||||
{
|
||||
ProjectId = y.ProjectId,
|
||||
//ProjectName = p.ProjectName,
|
||||
//UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds),
|
||||
Id = x.InspectionDetailId,
|
||||
BreakdownCode = y.BreakdownCode,
|
||||
BreakdownName = y.BreakdownName,
|
||||
Basis = y.Basis,
|
||||
CheckPoints = y.CheckPoints,
|
||||
}).ToList();
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取材料进场复验数(异步)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static async Task<List<InspectionManagementOutput>> GetMaterialInRecheckNumAsync()
|
||||
{
|
||||
return await Task.Run(GetMaterialInRecheckNum);
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取材料进场复验数合格数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<InspectionManagementOutput> GetMaterialInRecheckOKNum()
|
||||
{
|
||||
var result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
|
||||
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId
|
||||
join z in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals z.InspectionId
|
||||
where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "5" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
|
||||
select new Model.InspectionManagementOutput()
|
||||
{
|
||||
ProjectId = y.ProjectId,
|
||||
//ProjectName = p.ProjectName,
|
||||
//UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds),
|
||||
Id = x.InspectionDetailId,
|
||||
BreakdownCode = y.BreakdownCode,
|
||||
BreakdownName = y.BreakdownName,
|
||||
Basis = y.Basis,
|
||||
CheckPoints = y.CheckPoints,
|
||||
}).ToList();
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取材料进场复验数合格数(异步)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static async Task<List<InspectionManagementOutput>> GetMaterialInRecheckOKNumAsync()
|
||||
{
|
||||
return await Task.Run(GetMaterialInRecheckOKNum);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取分部工程验收数
|
||||
/// </summary>
|
||||
|
@ -1328,7 +1728,6 @@ namespace BLL
|
|||
{
|
||||
return await Task.Run(GetSubdivisionalWorksAcceptOKNum);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
|
|
@ -52,22 +52,22 @@ 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.UnitId,
|
||||
x.CollCropCode,
|
||||
x.UnitName,
|
||||
x.ReportDate,
|
||||
x.WelderNum,
|
||||
x.TotalDineNum,
|
||||
x.CompleteDineNum,
|
||||
x.TotalFilmNum,
|
||||
x.OKFilmNum,
|
||||
x.State,
|
||||
x.CreateDate,
|
||||
x.CreateMan
|
||||
};
|
||||
select new
|
||||
{
|
||||
x.Id,
|
||||
x.UnitId,
|
||||
x.CollCropCode,
|
||||
x.UnitName,
|
||||
x.ReportDate,
|
||||
x.WelderNum,
|
||||
x.TotalDineNum,
|
||||
x.CompleteDineNum,
|
||||
x.TotalFilmNum,
|
||||
x.OKFilmNum,
|
||||
x.State,
|
||||
x.CreateDate,
|
||||
x.CreateMan
|
||||
};
|
||||
}
|
||||
|
||||
#endregion 获取列表
|
||||
|
@ -94,8 +94,8 @@ namespace BLL
|
|||
};
|
||||
db.HJGLData_HJGL.InsertOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void DeleteHJGLData_HJGLById(string Id)
|
||||
|
@ -109,7 +109,7 @@ namespace BLL
|
|||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static HJGLData_HJGL GetHJGLData_HJGLById(string Id)
|
||||
|
@ -158,23 +158,27 @@ namespace BLL
|
|||
return data;
|
||||
}
|
||||
|
||||
public static HJGLData GetTodayHJGLData_HJGL()
|
||||
public static async Task<HJGLData> GetTodayHJGLData_HJGLAsync()
|
||||
{
|
||||
var data = new HJGLData();
|
||||
if (CommonService.GetIsThisUnit().CollCropCode== "91410200170644116B")
|
||||
if (CommonService.GetIsThisUnit().CollCropCode == "91410200170644116B")
|
||||
{
|
||||
return GetELECLTodayHJGLData_HJGL();
|
||||
return GetELECLTodayHJGLData_HJGL();
|
||||
}
|
||||
if (CommonService.GetIsThisUnit().CollCropCode == "914200001775697881")
|
||||
if (CommonService.GetIsThisUnit().CollCropCode == "914200001775697881")
|
||||
{
|
||||
return GetCNCEC_16TodayHJGLData_HJGL();
|
||||
|
||||
}
|
||||
var q = GetTodayData();
|
||||
/* var q = GetTodayData();
|
||||
if (q != null && q.State == Const.CNCEC_State_S)
|
||||
data = StatisticalData();
|
||||
else
|
||||
data = StatisticalData();
|
||||
data = StatisticalData();*/
|
||||
|
||||
var modelTask = StatisticalDataAsync();
|
||||
var model = await modelTask;
|
||||
data = model;
|
||||
return data;
|
||||
}
|
||||
/// <summary>
|
||||
|
@ -188,11 +192,11 @@ namespace BLL
|
|||
string token = Const.sysglyId;
|
||||
string response = Funs.RequestPost(baseurl, token, "");
|
||||
var json = JsonConvert.DeserializeObject(response) as JObject;
|
||||
if (json != null && json["code"]?.ToString()=="1")
|
||||
if (json != null && json["code"]?.ToString() == "1")
|
||||
{
|
||||
var str = json["data"]?.ToString();
|
||||
if (str != null) data = JsonConvert.DeserializeObject<HJGLData>(str);
|
||||
}
|
||||
if (str != null) data = JsonConvert.DeserializeObject<HJGLData>(str);
|
||||
}
|
||||
return data;
|
||||
|
||||
}
|
||||
|
@ -216,9 +220,9 @@ namespace BLL
|
|||
catch (Exception e)
|
||||
{
|
||||
APICommonService.SaveSysHttpLog("GetCNCEC_16TodayHJGLData_HJGL", baseurl, e.ToString(), "Request|Post");
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
var json = JsonConvert.DeserializeObject(response) as JObject;
|
||||
if (json != null && json["code"]?.ToString() == "1")
|
||||
|
@ -226,14 +230,14 @@ namespace BLL
|
|||
var str = json["data"]?.ToString();
|
||||
if (str != null) data = JsonConvert.DeserializeObject<HJGLData>(str);
|
||||
}
|
||||
APICommonService.SaveSysHttpLog("GetCNCEC_16TodayHJGLData_HJGL", baseurl, response, "Request|Post" );
|
||||
APICommonService.SaveSysHttpLog("GetCNCEC_16TodayHJGLData_HJGL", baseurl, response, "Request|Post");
|
||||
return data;
|
||||
}
|
||||
public static HJGLData_HJGL GetTodayData()
|
||||
{
|
||||
var q = (from x in Funs.DB.HJGLData_HJGL
|
||||
where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date
|
||||
select x).FirstOrDefault();
|
||||
where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date
|
||||
select x).FirstOrDefault();
|
||||
return q;
|
||||
}
|
||||
public static HJGLData_HJGL GetSubUnitHjglDataByDate(string Unitid, DateTime? reportdate)
|
||||
|
@ -247,7 +251,7 @@ namespace BLL
|
|||
var baseUnit = UnitService.GetUnitByUnitId(Unitid);
|
||||
var ProjectData = (from x in Funs.DB.Project_HJGLData_HJGL
|
||||
where x.ReportDate == reportdate && projectlist.Select(e => e.ProjectId).Contains(x.ProjectId)
|
||||
select x).ToList();
|
||||
select x).ToList();
|
||||
result = new HJGLData_HJGL
|
||||
{
|
||||
UnitId = Unitid,
|
||||
|
@ -262,7 +266,7 @@ namespace BLL
|
|||
CreateMan = Const.sysglyId,
|
||||
CreateDate = DateTime.Now
|
||||
};
|
||||
return result;
|
||||
return result;
|
||||
}
|
||||
public static void UpdateTodyData_State()
|
||||
{
|
||||
|
@ -278,8 +282,8 @@ namespace BLL
|
|||
{
|
||||
var result = false;
|
||||
var q = (from x in Funs.DB.HJGLData_HJGL
|
||||
where x.ReportDate >= dateTime.Date && x.ReportDate < dateTime.Date.AddDays(1).Date
|
||||
select x).ToList();
|
||||
where x.ReportDate >= dateTime.Date && x.ReportDate < dateTime.Date.AddDays(1).Date
|
||||
select x).ToList();
|
||||
if (q != null && q.Count > 0) result = true;
|
||||
return result;
|
||||
}
|
||||
|
@ -292,8 +296,8 @@ namespace BLL
|
|||
{
|
||||
var result = false;
|
||||
var q = (from x in Funs.DB.HJGLData_HJGL
|
||||
where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date
|
||||
select x).ToList();
|
||||
where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date
|
||||
select x).ToList();
|
||||
if (q.Count > 0) result = true;
|
||||
return result;
|
||||
}
|
||||
|
@ -307,33 +311,101 @@ namespace BLL
|
|||
return responeData;
|
||||
}
|
||||
|
||||
public static HJGLData StatisticalData()
|
||||
public static async Task<HJGLData> StatisticalDataAsync()
|
||||
{
|
||||
var data = new HJGLData();
|
||||
var thisUnitId = string.Empty;
|
||||
var thisUnit = CommonService.GetIsThisUnit();
|
||||
if (thisUnit != null) thisUnitId = thisUnit.UnitId;
|
||||
var baseUnit = UnitService.GetUnitByUnitId(thisUnitId);
|
||||
var ProjectData = (from x in Funs.DB.Project_HJGLData_HJGL
|
||||
where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date
|
||||
select x).ToList();
|
||||
Project_HJGLData_HJGLService.StatisticalAllProjectData();
|
||||
Project_HJGLData_DefectService.StatisticalAllProjectData();
|
||||
// 并行执行异步方法
|
||||
var welderNumTask = HJGLData_HJGLService.GetWelderNumAsync(); //获取焊工总数
|
||||
var dineInfoListTask = HJGLData_HJGLService.GetDineInfoAsync(); //获达因数信息
|
||||
var chCheckItemListTask = HJGLData_HJGLService.GetCHCheckItemAsync(); //获取焊接检查信息
|
||||
|
||||
// 等待所有异步方法执行完成
|
||||
await Task.WhenAll(
|
||||
welderNumTask,
|
||||
dineInfoListTask,
|
||||
chCheckItemListTask
|
||||
);
|
||||
|
||||
// 统一获取异步方法的返回值
|
||||
var welderNum = await welderNumTask;
|
||||
var dineInfoList = await dineInfoListTask;
|
||||
var chCheckItemList = await chCheckItemListTask;
|
||||
|
||||
|
||||
var table = new HJGLData_HJGL
|
||||
{
|
||||
UnitId = thisUnitId,
|
||||
CollCropCode = baseUnit.CollCropCode,
|
||||
UnitName = baseUnit.UnitName,
|
||||
ReportDate = DateTime.Now.Date,
|
||||
WelderNum = ProjectData.Sum(x => x.WelderNum),
|
||||
TotalDineNum = ProjectData.Sum(x => x.TotalDineNum),
|
||||
CompleteDineNum = ProjectData.Sum(x => x.CompleteDineNum),
|
||||
TotalFilmNum = ProjectData.Sum(x => x.TotalFilmNum),
|
||||
OKFilmNum = ProjectData.Sum(x => x.OKFilmNum),
|
||||
WelderNum = welderNum.Count(),
|
||||
TotalDineNum = Convert.ToInt32(dineInfoList.Sum(x => x.Size)),
|
||||
CompleteDineNum = Convert.ToInt32(dineInfoList.Sum(x => x.DoneDin)),
|
||||
TotalFilmNum = Convert.ToInt32(chCheckItemList.Sum(x => x.CHT_TotalFilm)),
|
||||
OKFilmNum = Convert.ToInt32(chCheckItemList.Sum(x => x.CHT_PassFilm)),
|
||||
CreateMan = Const.sysglyId,
|
||||
CreateDate = DateTime.Now
|
||||
};
|
||||
|
||||
Project_HJGLData_HJGLService.DeleteProject_HJGLData_HJGLByDate(DateTime.Now.Date);
|
||||
// 预先对 dineInfoList 和 chCheckItemList 按 ProjectId 进行分组
|
||||
var dineInfoDict = dineInfoList
|
||||
.Where(x => BeUnderConstructionList.Contains(x.ProjectId))
|
||||
.GroupBy(x => x.ProjectId)
|
||||
.ToDictionary(g => g.Key, g => new
|
||||
{
|
||||
TotalDineNum = g.Sum(x => x.Size),
|
||||
CompleteDineNum = g.Sum(x => x.DoneDin)
|
||||
});
|
||||
|
||||
var chCheckItemDict = chCheckItemList
|
||||
.Where(x => BeUnderConstructionList.Contains(x.ProjectId))
|
||||
.GroupBy(x => x.ProjectId)
|
||||
.ToDictionary(g => g.Key, g => new
|
||||
{
|
||||
TotalFilmNum = g.Sum(x => x.CHT_TotalFilm),
|
||||
OKFilmNum = g.Sum(x => x.CHT_PassFilm)
|
||||
});
|
||||
|
||||
foreach (var projectid in BeUnderConstructionList)
|
||||
{
|
||||
// 获取焊工数量
|
||||
int welderCount = welderNum.Count(x => x.ProjectId == projectid);
|
||||
|
||||
// 获取达因信息
|
||||
var dineInfo = dineInfoDict.TryGetValue(projectid, out var dineData)
|
||||
? dineData
|
||||
: new { TotalDineNum = (decimal ?)0, CompleteDineNum = (decimal?)0 };
|
||||
|
||||
// 获取拍片信息
|
||||
var chCheckItem = chCheckItemDict.TryGetValue(projectid, out var checkData)
|
||||
? checkData
|
||||
: new { TotalFilmNum = (int?)0, OKFilmNum = (int?)0 };
|
||||
|
||||
var projectCqmsData = new Project_HJGLData_HJGL()
|
||||
{
|
||||
Id = SQLHelper.GetNewID(),
|
||||
ProjectId = projectid,
|
||||
UnitId = thisUnitId,
|
||||
CollCropCode = baseUnit.CollCropCode,
|
||||
UnitName = baseUnit.UnitName,
|
||||
ReportDate = DateTime.Now.Date,
|
||||
WelderNum = welderCount,
|
||||
TotalDineNum = Convert.ToInt32 (dineInfo.TotalDineNum),
|
||||
CompleteDineNum = Convert.ToInt32(dineInfo.CompleteDineNum),
|
||||
TotalFilmNum = chCheckItem.TotalFilmNum,
|
||||
OKFilmNum = chCheckItem.OKFilmNum,
|
||||
};
|
||||
|
||||
Project_HJGLData_HJGLService.AddProject_HJGLData_HJGL(projectCqmsData);
|
||||
}
|
||||
|
||||
|
||||
if (IsReportByToday())
|
||||
{
|
||||
table.Id = GetTodayData().Id;
|
||||
|
@ -367,7 +439,7 @@ namespace BLL
|
|||
}
|
||||
|
||||
public static void UpdateHJGLData_HJGL(HJGLData_HJGL newtable)
|
||||
{
|
||||
{
|
||||
using (Model.SUBQHSEDB db = new Model.SUBQHSEDB(Funs.ConnString))
|
||||
{
|
||||
var table = db.HJGLData_HJGL.FirstOrDefault(x => x.Id == newtable.Id);
|
||||
|
@ -388,11 +460,11 @@ namespace BLL
|
|||
table.CreateDate = newtable.CreateDate;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取焊工总数
|
||||
/// </summary>
|
||||
|
@ -424,29 +496,23 @@ namespace BLL
|
|||
/// 获取总达因数和完成达因数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<WeldDineOutput> GetDineInfo()
|
||||
public static IEnumerable<WeldDineOutput> GetDineInfo()
|
||||
{
|
||||
var result = (from x in Funs.DB.PW_JointInfo
|
||||
where BeUnderConstructionList.Contains(x.ProjectId)
|
||||
group x by x.ProjectId into g
|
||||
select new Model.WeldDineOutput()
|
||||
{
|
||||
Id = x.JOT_ID,
|
||||
ProjectId = x.ProjectId,
|
||||
Size = x.JOT_Size,
|
||||
DoneDin = x.JOT_DoneDin
|
||||
//UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds),
|
||||
}).ToList();
|
||||
ProjectId = g.Key,
|
||||
Size = g.Sum(x => x.JOT_Size),
|
||||
DoneDin = g.Sum(x => x.JOT_DoneDin)
|
||||
});
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取总达因数(异步)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static async Task<List<WeldDineOutput>> GetDineInfoAsync()
|
||||
}
|
||||
public static async Task<IEnumerable<WeldDineOutput>> GetDineInfoAsync()
|
||||
{
|
||||
return await Task.Run(GetDineInfo);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取焊接检查信息
|
||||
/// </summary>
|
||||
|
|
|
@ -41,6 +41,7 @@ namespace BLL
|
|||
SafeTrainNum = newtable.SafeTrainNum,
|
||||
SpecialTrainNum = newtable.SpecialTrainNum,
|
||||
SpecialOperationTrainNum = newtable.SpecialOperationTrainNum,
|
||||
HseTechnicalNum = newtable.HseTechnicalNum,
|
||||
EnvironmentalTrainNum = newtable.EnvironmentalTrainNum,
|
||||
TotalEnergyConsumption = newtable.TotalEnergyConsumption,
|
||||
IncomeComprehensiveEnergyConsumption = newtable.IncomeComprehensiveEnergyConsumption,
|
||||
|
@ -76,10 +77,12 @@ namespace BLL
|
|||
CompanySpecialPlanNum = newtable.CompanySpecialPlanNum,
|
||||
CompanyOnSiteDisposalPlan = newtable.CompanyOnSiteDisposalPlan,
|
||||
CompanyDrillNum = newtable.CompanyDrillNum,
|
||||
CompanyDrillPersonNum = newtable.CompanyDrillPersonNum,
|
||||
ProjectComprehensivePlanNum = newtable.ProjectComprehensivePlanNum,
|
||||
ProjectSpecialPlanNum = newtable.ProjectSpecialPlanNum,
|
||||
ProjectOnSiteDisposalPlan = newtable.ProjectOnSiteDisposalPlan,
|
||||
ProjectDrillNum = newtable.ProjectDrillNum,
|
||||
ProjectDrillPersonNum = newtable.ProjectDrillPersonNum,
|
||||
CostExtract = newtable.CostExtract,
|
||||
CostUse = newtable.CostUse,
|
||||
UseEquipmentNum = newtable.UseEquipmentNum,
|
||||
|
@ -98,10 +101,12 @@ namespace BLL
|
|||
TrainPersonNum = newtable.TrainPersonNum,
|
||||
ConstructionNum = newtable.ConstructionNum,
|
||||
FinishedNum = newtable.FinishedNum,
|
||||
ArgumentNum = newtable.ArgumentNum,
|
||||
SuperCompletedNum = newtable.SuperCompletedNum,
|
||||
SuperTrainPersonNum = newtable.SuperTrainPersonNum,
|
||||
SuperConstructionNum = newtable.SuperConstructionNum,
|
||||
SuperFinishedNum = newtable.SuperFinishedNum,
|
||||
SuperArgumentNum = newtable.SuperArgumentNum,
|
||||
State = newtable.State,
|
||||
CreateDate = newtable.CreateDate,
|
||||
CreateMan = newtable.CreateMan
|
||||
|
@ -149,6 +154,7 @@ namespace BLL
|
|||
item.CompanyComprehensiveCheckNum = dataHsse.CompanyComprehensiveCheckNum;
|
||||
item.CompanyComprehensivePlanNum = dataHsse.CompanyComprehensivePlanNum;
|
||||
item.CompanyDrillNum = dataHsse.CompanyDrillNum;
|
||||
item.CompanyDrillPersonNum = dataHsse.CompanyDrillPersonNum;
|
||||
item.CompanyLeadShiftCheckNum = dataHsse.CompanyLeadShiftCheckNum;
|
||||
item.CompanyOnSiteDisposalPlan = dataHsse.CompanyOnSiteDisposalPlan;
|
||||
item.CompanySpecialCheckNum = dataHsse.CompanySpecialCheckNum;
|
||||
|
@ -159,6 +165,7 @@ namespace BLL
|
|||
item.CostUse = dataHsse.CostUse;
|
||||
item.EnterpriseTopicsMeetingNum = dataHsse.EnterpriseTopicsMeetingNum;
|
||||
item.FinishedNum = dataHsse.FinishedNum;
|
||||
item.ArgumentNum = dataHsse.ArgumentNum;
|
||||
item.GeneralAccidentNum = dataHsse.GeneralAccidentNum;
|
||||
item.GeneralClosedNum = dataHsse.GeneralClosedNum;
|
||||
item.GeneralNotClosedNum = dataHsse.GeneralNotClosedNum;
|
||||
|
@ -184,6 +191,7 @@ namespace BLL
|
|||
item.NewWaterConsumption = dataHsse.NewWaterConsumption;
|
||||
item.ProjectComprehensivePlanNum = dataHsse.ProjectComprehensivePlanNum;
|
||||
item.ProjectDrillNum = dataHsse.ProjectDrillNum;
|
||||
item.ProjectDrillPersonNum = dataHsse.ProjectDrillPersonNum;
|
||||
item.ProjectFullTimeNum = dataHsse.ProjectFullTimeNum;
|
||||
item.ProjectInspectorGeneralNum = dataHsse.ProjectInspectorGeneralNum;
|
||||
item.ProjectLeadShiftCheckNum = dataHsse.ProjectLeadShiftCheckNum;
|
||||
|
@ -204,6 +212,7 @@ namespace BLL
|
|||
item.ShutdownNum = dataHsse.ShutdownNum;
|
||||
item.SpecialEquipmentNum = dataHsse.SpecialEquipmentNum;
|
||||
item.SpecialOperationTrainNum = dataHsse.SpecialOperationTrainNum;
|
||||
item.HseTechnicalNum = dataHsse.HseTechnicalNum;
|
||||
item.EnvironmentalTrainNum = dataHsse.EnvironmentalTrainNum;
|
||||
item.SpecialSeriousAccidentNum = dataHsse.SpecialSeriousAccidentNum;
|
||||
item.SpecialTrainNum = dataHsse.SpecialTrainNum;
|
||||
|
@ -211,6 +220,7 @@ namespace BLL
|
|||
item.SuperConstructionNum = dataHsse.SuperConstructionNum;
|
||||
item.SuperFinishedNum = dataHsse.SuperFinishedNum;
|
||||
item.SuperTrainPersonNum = dataHsse.SuperTrainPersonNum;
|
||||
item.SuperArgumentNum = dataHsse.SuperArgumentNum;
|
||||
item.TotalEnergyConsumption = dataHsse.TotalEnergyConsumption;
|
||||
item.TotalWorkingHour = dataHsse.TotalWorkingHour;
|
||||
item.TrainPersonNum = dataHsse.TrainPersonNum;
|
||||
|
@ -254,6 +264,7 @@ namespace BLL
|
|||
item.CompanyComprehensiveCheckNum = dataHsse.CompanyComprehensiveCheckNum;
|
||||
item.CompanyComprehensivePlanNum = dataHsse.CompanyComprehensivePlanNum;
|
||||
item.CompanyDrillNum = dataHsse.CompanyDrillNum;
|
||||
item.CompanyDrillPersonNum = dataHsse.CompanyDrillPersonNum;
|
||||
item.CompanyLeadShiftCheckNum = dataHsse.CompanyLeadShiftCheckNum;
|
||||
item.CompanyOnSiteDisposalPlan = dataHsse.CompanyOnSiteDisposalPlan;
|
||||
item.CompanySpecialCheckNum = dataHsse.CompanySpecialCheckNum;
|
||||
|
@ -264,6 +275,7 @@ namespace BLL
|
|||
item.CostUse = dataHsse.CostUse;
|
||||
item.EnterpriseTopicsMeetingNum = dataHsse.EnterpriseTopicsMeetingNum;
|
||||
item.FinishedNum = dataHsse.FinishedNum;
|
||||
item.ArgumentNum = dataHsse.ArgumentNum;
|
||||
item.GeneralAccidentNum = dataHsse.GeneralAccidentNum;
|
||||
item.GeneralClosedNum = dataHsse.GeneralClosedNum;
|
||||
item.GeneralNotClosedNum = dataHsse.GeneralNotClosedNum;
|
||||
|
@ -289,6 +301,7 @@ namespace BLL
|
|||
item.NewWaterConsumption = dataHsse.NewWaterConsumption;
|
||||
item.ProjectComprehensivePlanNum = dataHsse.ProjectComprehensivePlanNum;
|
||||
item.ProjectDrillNum = dataHsse.ProjectDrillNum;
|
||||
item.ProjectDrillPersonNum = dataHsse.ProjectDrillPersonNum;
|
||||
item.ProjectFullTimeNum = dataHsse.ProjectFullTimeNum;
|
||||
item.ProjectInspectorGeneralNum = dataHsse.ProjectInspectorGeneralNum;
|
||||
item.ProjectLeadShiftCheckNum = dataHsse.ProjectLeadShiftCheckNum;
|
||||
|
@ -309,12 +322,14 @@ namespace BLL
|
|||
item.ShutdownNum = dataHsse.ShutdownNum;
|
||||
item.SpecialEquipmentNum = dataHsse.SpecialEquipmentNum;
|
||||
item.SpecialOperationTrainNum = dataHsse.SpecialOperationTrainNum;
|
||||
item.HseTechnicalNum = dataHsse.HseTechnicalNum;
|
||||
item.EnvironmentalTrainNum = dataHsse.EnvironmentalTrainNum;
|
||||
item.SpecialSeriousAccidentNum = dataHsse.SpecialSeriousAccidentNum;
|
||||
item.SpecialTrainNum = dataHsse.SpecialTrainNum;
|
||||
item.SuperCompletedNum = dataHsse.SuperCompletedNum;
|
||||
item.SuperConstructionNum = dataHsse.SuperConstructionNum;
|
||||
item.SuperFinishedNum = dataHsse.SuperFinishedNum;
|
||||
item.SuperArgumentNum = dataHsse.SuperArgumentNum;
|
||||
item.SuperTrainPersonNum = dataHsse.SuperTrainPersonNum;
|
||||
item.TotalEnergyConsumption = dataHsse.TotalEnergyConsumption;
|
||||
item.TotalWorkingHour = dataHsse.TotalWorkingHour;
|
||||
|
@ -647,6 +662,7 @@ namespace BLL
|
|||
var safeTrainTask = HSSEData_HSSEService.GetSafeTrainAsync();
|
||||
var specialTrainTask = HSSEData_HSSEService.GetSpecialTrainAsync();
|
||||
var specialOperationTrainTask = HSSEData_HSSEService.GetSpecialOperationTrainAsync();
|
||||
var hseTechnicalNumTask = HSSEData_HSSEService.GetHseTechnicalNumAsync();
|
||||
var headOfficeInspectorGeneralTask = HSSEData_HSSEService.GetHeadOfficeInspectorGeneralAsync();
|
||||
var headOfficeFullTimeTask = HSSEData_HSSEService.GetHeadOfficeFullTimeAsync();
|
||||
var branchInspectorGeneralTask = HSSEData_HSSEService.GetBranchInspectorGeneralAsync();
|
||||
|
@ -704,7 +720,7 @@ namespace BLL
|
|||
safeWorkingHourTask,
|
||||
safeTrainTask,
|
||||
specialTrainTask,
|
||||
specialOperationTrainTask,
|
||||
specialOperationTrainTask, hseTechnicalNumTask,
|
||||
headOfficeInspectorGeneralTask,
|
||||
headOfficeFullTimeTask,
|
||||
branchInspectorGeneralTask,
|
||||
|
@ -765,6 +781,7 @@ namespace BLL
|
|||
var safeTrainList = await safeTrainTask;
|
||||
var specialTrainList = await specialTrainTask;
|
||||
var specialOperationTrainList = await specialOperationTrainTask;
|
||||
var hseTechnicalNum = await hseTechnicalNumTask;
|
||||
var headOfficeInspectorGeneralList = await headOfficeInspectorGeneralTask;
|
||||
var headOfficeFullTimeList = await headOfficeFullTimeTask;
|
||||
var branchInspectorGeneralList = await branchInspectorGeneralTask;
|
||||
|
@ -826,6 +843,7 @@ namespace BLL
|
|||
SafeTrainNum = safeTrainList.Sum(x => x.TrainPersonNum),
|
||||
SpecialTrainNum = specialTrainList.Sum(x => x.TrainPersonNum),
|
||||
SpecialOperationTrainNum = specialOperationTrainList.Sum(x => x.TrainPersonNum),
|
||||
HseTechnicalNum = hseTechnicalNum,
|
||||
EnvironmentalTrainNum = 0,
|
||||
TotalEnergyConsumption = totalEnergyConsumption,
|
||||
IncomeComprehensiveEnergyConsumption = incomeComprehensiveEnergyConsumption,
|
||||
|
@ -857,10 +875,12 @@ namespace BLL
|
|||
CompanySpecialPlanNum = companySpecialPlanList.Count(),
|
||||
CompanyOnSiteDisposalPlan = companyOnSiteDisposalPlanList.Count(),
|
||||
CompanyDrillNum = companyDrillList.Count(),
|
||||
CompanyDrillPersonNum = companyDrillList.Sum(x => x.JointPersonNum),
|
||||
ProjectComprehensivePlanNum = projectComprehensivePlanList.Count(),
|
||||
ProjectSpecialPlanNum = projectSpecialPlanList.Count(),
|
||||
ProjectOnSiteDisposalPlan = projectOnSiteDisposalPlanList.Count(),
|
||||
ProjectDrillNum = projectDrillList.Count(),
|
||||
ProjectDrillPersonNum = projectDrillList.Sum(x => x.JointPersonNum),
|
||||
CostExtract = Convert.ToInt32(costExtract.Sum(x => x.SUMCost)),
|
||||
CostUse = Convert.ToInt32(costUseList.Sum(x => x.SUMCost)),
|
||||
UseEquipmentNum = useEquipmentList.Count(),
|
||||
|
@ -879,16 +899,67 @@ namespace BLL
|
|||
TrainPersonNum = largeEngineeringOutputsTask.Result.Sum(x => x.TrainPersonNum),
|
||||
ConstructionNum = largeEngineeringOutputsTask.Result.Sum(x => x.ConstructionNum),
|
||||
FinishedNum = largeEngineeringOutputsTask.Result.Sum(x => x.FinishedNum),
|
||||
ArgumentNum = largeEngineeringOutputsTask.Result.Sum(x => x.ArgumentNum),
|
||||
SuperCompletedNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperCompletedNum),
|
||||
SuperTrainPersonNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperTrainPersonNum),
|
||||
SuperConstructionNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperConstructionNum)
|
||||
SuperConstructionNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperConstructionNum),
|
||||
SuperFinishedNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperFinishedNum),
|
||||
SuperArgumentNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperArgumentNum)
|
||||
};
|
||||
|
||||
#region 添加项目统计数据
|
||||
|
||||
Project_HSSEData_HSSEService.DeleteProject_HSSEData_HSSEByDate(DateTime.Now.Date);
|
||||
|
||||
var generalHiddenRectificationOutputsDict = generalHiddenRectificationOutputsList
|
||||
.GroupBy(x => x.ProjectId)
|
||||
.ToDictionary(
|
||||
g => g.Key,
|
||||
g => new { ClosedNum = g.Sum(x => x.RecNum), NotClosedNum = g.Sum(x => x.NoRecNum) }
|
||||
);
|
||||
var majorHiddenRectificationOutputsDict = majorHiddenRectificationOutputsList
|
||||
.GroupBy(x => x.ProjectId)
|
||||
.ToDictionary(
|
||||
g => g.Key,
|
||||
g => new { ClosedNum = g.Sum(x => x.RecNum), NotClosedNum = g.Sum(x => x.NoRecNum) }
|
||||
);
|
||||
var securityRiskOutputList = securityRiskOutputListTask.Result;
|
||||
var securityRiskOutputDict = securityRiskOutputList
|
||||
.GroupBy(x => x.ProjectId)
|
||||
.ToDictionary(
|
||||
g => g.Key,
|
||||
g => new
|
||||
{
|
||||
LowRiskNum = g.Sum(x => x.LowRiskNum),
|
||||
GeneralRiskNum = g.Sum(x => x.GeneralRiskNum),
|
||||
MediumRiskNum = g.Sum(x => x.MediumRiskNum),
|
||||
HighRiskNum = g.Sum(x => x.HighRiskNum)
|
||||
}
|
||||
);
|
||||
var largeEngineeringOutputList = largeEngineeringOutputsTask.Result;
|
||||
var largeEngineeringOutputsDict = largeEngineeringOutputList
|
||||
.GroupBy(x => x.ProjectId)
|
||||
.ToDictionary(
|
||||
g => g.Key,
|
||||
g => new
|
||||
{
|
||||
CompletedNum = g.Sum(x => x.CompletedNum),
|
||||
TrainPersonNum = g.Sum(x => x.TrainPersonNum),
|
||||
ConstructionNum = g.Sum(x => x.ConstructionNum),
|
||||
FinishedNum = g.Sum(x => x.FinishedNum),
|
||||
ArgumentNum = g.Sum(x => x.ArgumentNum),
|
||||
SuperCompletedNum = g.Sum(x => x.SuperCompletedNum),
|
||||
SuperTrainPersonNum = g.Sum(x => x.SuperTrainPersonNum),
|
||||
SuperConstructionNum = g.Sum(x => x.SuperConstructionNum),
|
||||
SuperArgumentNum = g.Sum(x => x.SuperArgumentNum)
|
||||
}
|
||||
);
|
||||
foreach (var projectid in BeUnderConstructionList)
|
||||
{
|
||||
generalHiddenRectificationOutputsDict.TryGetValue(projectid, out var generalHiddenRectificationOutputs);
|
||||
majorHiddenRectificationOutputsDict.TryGetValue(projectid, out var majorHiddenRectificationOutputs);
|
||||
securityRiskOutputDict.TryGetValue(projectid, out var securityRiskOutputs);
|
||||
largeEngineeringOutputsDict.TryGetValue(projectid, out var largeEngineeringOutputs);
|
||||
var projectHsseData = new Project_HSSEData_HSSE
|
||||
{
|
||||
Id = SQLHelper.GetNewID(),
|
||||
|
@ -905,6 +976,7 @@ namespace BLL
|
|||
SafeTrainNum = safeTrainList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum),
|
||||
SpecialTrainNum = specialTrainList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum),
|
||||
SpecialOperationTrainNum = specialOperationTrainList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum),
|
||||
HseTechnicalNum = hseTechnicalNum,
|
||||
EnvironmentalTrainNum = 0,
|
||||
TotalEnergyConsumption = 0,
|
||||
IncomeComprehensiveEnergyConsumption = 0,
|
||||
|
@ -939,31 +1011,35 @@ namespace BLL
|
|||
CompanySpecialPlanNum = 0,
|
||||
CompanyOnSiteDisposalPlan = 0,
|
||||
CompanyDrillNum = 0,
|
||||
CompanyDrillPersonNum = 0,
|
||||
ProjectComprehensivePlanNum = projectComprehensivePlanList.Count(x => x.ProjectId == projectid),
|
||||
ProjectSpecialPlanNum = projectSpecialPlanList.Count(x => x.ProjectId == projectid),
|
||||
ProjectOnSiteDisposalPlan = projectOnSiteDisposalPlanList.Count(x => x.ProjectId == projectid),
|
||||
ProjectDrillNum = projectDrillList.Count(x => x.ProjectId == projectid),
|
||||
ProjectDrillPersonNum = projectDrillList.Where(x => x.ProjectId == projectid).Sum(x => x.JointPersonNum),
|
||||
CostExtract = Convert.ToInt32(costExtract.Where(x => x.ProjectId == projectid).Sum(x => x.SUMCost)),
|
||||
CostUse = Convert.ToInt32(costUseList.Where(x => x.ProjectId == projectid).Sum(x => x.SUMCost)),
|
||||
UseEquipmentNum = useEquipmentList.Count(x => x.ProjectId == projectid),
|
||||
SpecialEquipmentNum = specialEquipmentList.Count(x => x.ProjectId == projectid),
|
||||
LicensesNum = licensesList.Count(x => x.ProjectId == projectid),
|
||||
LicensesCloseNum = licensesCloseList.Count(x => x.ProjectId == projectid),
|
||||
GeneralClosedNum = generalHiddenRectificationOutputsList.Where(x => x.ProjectId == projectid).Sum(x => x.RecNum),
|
||||
GeneralNotClosedNum = generalHiddenRectificationOutputsList.Where(x => x.ProjectId == projectid).Sum(x => x.NoRecNum),
|
||||
MajorClosedNum = majorHiddenRectificationOutputsList.Where(x => x.ProjectId == projectid).Sum(x => x.RecNum),
|
||||
MajorNotClosedNum = majorHiddenRectificationOutputsList.Where(x => x.ProjectId == projectid).Sum(x => x.NoRecNum),
|
||||
LowRiskNum = securityRiskOutputListTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.LowRiskNum),
|
||||
GeneralRiskNum = securityRiskOutputListTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.GeneralRiskNum),
|
||||
MediumRiskNum = securityRiskOutputListTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.MediumRiskNum),
|
||||
HighRiskNum = securityRiskOutputListTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.HighRiskNum),
|
||||
CompletedNum = largeEngineeringOutputsTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.CompletedNum),
|
||||
TrainPersonNum = largeEngineeringOutputsTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum),
|
||||
ConstructionNum = largeEngineeringOutputsTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.ConstructionNum),
|
||||
FinishedNum = largeEngineeringOutputsTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.FinishedNum),
|
||||
SuperCompletedNum = largeEngineeringOutputsTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.SuperCompletedNum),
|
||||
SuperTrainPersonNum = largeEngineeringOutputsTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.SuperTrainPersonNum),
|
||||
SuperConstructionNum = largeEngineeringOutputsTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.SuperConstructionNum)
|
||||
GeneralClosedNum = generalHiddenRectificationOutputs?.ClosedNum ?? 0,
|
||||
GeneralNotClosedNum = generalHiddenRectificationOutputs?.NotClosedNum ?? 0,
|
||||
MajorClosedNum = majorHiddenRectificationOutputs?.ClosedNum ?? 0,
|
||||
MajorNotClosedNum = majorHiddenRectificationOutputs?.NotClosedNum ?? 0,
|
||||
LowRiskNum = securityRiskOutputs?.LowRiskNum ?? 0,
|
||||
GeneralRiskNum = securityRiskOutputs?.GeneralRiskNum ?? 0,
|
||||
MediumRiskNum = securityRiskOutputs?.MediumRiskNum ?? 0,
|
||||
HighRiskNum = securityRiskOutputs?.HighRiskNum ?? 0,
|
||||
CompletedNum = largeEngineeringOutputs?.CompletedNum ?? 0,
|
||||
TrainPersonNum = largeEngineeringOutputs?.TrainPersonNum ?? 0,
|
||||
ConstructionNum = largeEngineeringOutputs?.ConstructionNum ?? 0,
|
||||
FinishedNum = largeEngineeringOutputs?.FinishedNum ?? 0,
|
||||
ArgumentNum = largeEngineeringOutputs?.ArgumentNum ?? 0,
|
||||
SuperCompletedNum = largeEngineeringOutputs?.SuperCompletedNum ?? 0,
|
||||
SuperTrainPersonNum = largeEngineeringOutputs?.SuperTrainPersonNum ?? 0,
|
||||
SuperConstructionNum = largeEngineeringOutputs?.SuperConstructionNum ?? 0,
|
||||
SuperArgumentNum = largeEngineeringOutputs?.SuperArgumentNum ?? 0
|
||||
};
|
||||
Project_HSSEData_HSSEService.AddProject_HSSEData_HSSE(projectHsseData);
|
||||
}
|
||||
|
@ -1123,6 +1199,7 @@ namespace BLL
|
|||
table.SafeTrainNum = newtable.SafeTrainNum;
|
||||
table.SpecialTrainNum = newtable.SpecialTrainNum;
|
||||
table.SpecialOperationTrainNum = newtable.SpecialOperationTrainNum;
|
||||
table.HseTechnicalNum = newtable.HseTechnicalNum;
|
||||
table.EnvironmentalTrainNum = newtable.EnvironmentalTrainNum;
|
||||
table.TotalEnergyConsumption = newtable.TotalEnergyConsumption;
|
||||
table.IncomeComprehensiveEnergyConsumption = newtable.IncomeComprehensiveEnergyConsumption;
|
||||
|
@ -1158,10 +1235,12 @@ namespace BLL
|
|||
table.CompanySpecialPlanNum = newtable.CompanySpecialPlanNum;
|
||||
table.CompanyOnSiteDisposalPlan = newtable.CompanyOnSiteDisposalPlan;
|
||||
table.CompanyDrillNum = newtable.CompanyDrillNum;
|
||||
table.CompanyDrillPersonNum = newtable.CompanyDrillPersonNum;
|
||||
table.ProjectComprehensivePlanNum = newtable.ProjectComprehensivePlanNum;
|
||||
table.ProjectSpecialPlanNum = newtable.ProjectSpecialPlanNum;
|
||||
table.ProjectOnSiteDisposalPlan = newtable.ProjectOnSiteDisposalPlan;
|
||||
table.ProjectDrillNum = newtable.ProjectDrillNum;
|
||||
table.ProjectDrillPersonNum = newtable.ProjectDrillPersonNum;
|
||||
table.CostExtract = newtable.CostExtract;
|
||||
table.CostUse = newtable.CostUse;
|
||||
table.UseEquipmentNum = newtable.UseEquipmentNum;
|
||||
|
@ -1180,10 +1259,12 @@ namespace BLL
|
|||
table.TrainPersonNum = newtable.TrainPersonNum;
|
||||
table.ConstructionNum = newtable.ConstructionNum;
|
||||
table.FinishedNum = newtable.FinishedNum;
|
||||
table.ArgumentNum = newtable.ArgumentNum;
|
||||
table.SuperCompletedNum = newtable.SuperCompletedNum;
|
||||
table.SuperTrainPersonNum = newtable.SuperTrainPersonNum;
|
||||
table.SuperConstructionNum = newtable.SuperConstructionNum;
|
||||
table.SuperFinishedNum = newtable.SuperFinishedNum;
|
||||
table.SuperArgumentNum = newtable.SuperArgumentNum;
|
||||
table.State = newtable.State;
|
||||
table.CreateMan = newtable.CreateMan;
|
||||
table.CreateDate = newtable.CreateDate;
|
||||
|
@ -1192,6 +1273,28 @@ namespace BLL
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取安全技术交底数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetHseTechnicalNum()
|
||||
{
|
||||
var list = (from x in Funs.DB.License_HSETechnical
|
||||
where BeUnderConstructionList.Contains(x.ProjectId)
|
||||
select x).Distinct().ToList();
|
||||
var result = list.ToList().Count();
|
||||
return result;
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取安全技术交底数(异步)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static async Task<int> GetHseTechnicalNumAsync()
|
||||
{
|
||||
return await Task.Run(GetHseTechnicalNum);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -3623,11 +3726,12 @@ namespace BLL
|
|||
TrainPersonNum = gg.Where(x => x.IsSuperLargerHazard == false).Sum(x => x.TrainPersonNum) ?? 0,
|
||||
ConstructionNum = gg.Count(x => x.States == "2" && x.IsSuperLargerHazard == false),
|
||||
FinishedNum = gg.Count(x => x.States == "3" && x.IsSuperLargerHazard == false),
|
||||
ArgumentNum = gg.Count(x => x.IsArgument == true && x.IsSuperLargerHazard == false),
|
||||
SuperCompletedNum = gg.Count(x => x.States == "1" && x.IsSuperLargerHazard == true),
|
||||
SuperTrainPersonNum = gg.Where(x => x.IsSuperLargerHazard == true).Sum(x => x.TrainPersonNum) ?? 0,
|
||||
SuperConstructionNum = gg.Count(x => x.States == "2" && x.IsSuperLargerHazard == true),
|
||||
SuperFinishedNum = gg.Count(x => x.States == "3" && x.IsSuperLargerHazard == true),
|
||||
|
||||
SuperArgumentNum = gg.Count(x => x.IsArgument == true && x.IsSuperLargerHazard == true),
|
||||
}).ToList();
|
||||
return query;
|
||||
}
|
||||
|
@ -3800,6 +3904,7 @@ namespace BLL
|
|||
x.SafeTrainNum,
|
||||
x.SpecialTrainNum,
|
||||
x.SpecialOperationTrainNum,
|
||||
x.HseTechnicalNum,
|
||||
x.EnvironmentalTrainNum,
|
||||
x.TotalEnergyConsumption,
|
||||
x.IncomeComprehensiveEnergyConsumption,
|
||||
|
@ -3835,10 +3940,12 @@ namespace BLL
|
|||
x.CompanySpecialPlanNum,
|
||||
x.CompanyOnSiteDisposalPlan,
|
||||
x.CompanyDrillNum,
|
||||
x.CompanyDrillPersonNum,
|
||||
x.ProjectComprehensivePlanNum,
|
||||
x.ProjectSpecialPlanNum,
|
||||
x.ProjectOnSiteDisposalPlan,
|
||||
x.ProjectDrillNum,
|
||||
x.ProjectDrillPersonNum,
|
||||
x.CostExtract,
|
||||
x.CostUse,
|
||||
x.UseEquipmentNum,
|
||||
|
@ -3857,10 +3964,12 @@ namespace BLL
|
|||
x.TrainPersonNum,
|
||||
x.ConstructionNum,
|
||||
x.FinishedNum,
|
||||
x.ArgumentNum,
|
||||
x.SuperCompletedNum,
|
||||
x.SuperTrainPersonNum,
|
||||
x.SuperConstructionNum,
|
||||
x.SuperFinishedNum,
|
||||
x.SuperArgumentNum,
|
||||
x.State,
|
||||
x.CreateDate,
|
||||
x.CreateMan
|
||||
|
|
|
@ -48,6 +48,18 @@ namespace BLL
|
|||
/// </summary>
|
||||
ProjectDivision,
|
||||
/// <summary>
|
||||
/// 报验数据
|
||||
/// </summary>
|
||||
Inspection,
|
||||
/// <summary>
|
||||
/// 施工方案数据
|
||||
/// </summary>
|
||||
ConstructSolution,
|
||||
/// <summary>
|
||||
/// 特种设备质保体系和图纸会审/设计交底
|
||||
/// </summary>
|
||||
SpecialEquipmentAndDesignDetails,
|
||||
/// <summary>
|
||||
/// 全部数据
|
||||
/// </summary>
|
||||
All
|
||||
|
@ -195,6 +207,25 @@ namespace BLL
|
|||
SubProjectNum = newtable.SubProjectNum,
|
||||
SubdivisionalWorksNum = newtable.SubdivisionalWorksNum,
|
||||
InspectionLotNum = newtable.InspectionLotNum,
|
||||
EquipmentInspectionNum = newtable.EquipmentInspectionNum,
|
||||
EquipmentInspectionQualifiedNum = newtable.EquipmentInspectionQualifiedNum,
|
||||
MachineInspectionNum = newtable.MachineInspectionNum,
|
||||
MachineInspectionQualifiedNum = newtable.MachineInspectionQualifiedNum,
|
||||
PersonInspectionNum = newtable.PersonInspectionNum,
|
||||
PersonInspectionQualifiedNum = newtable.PersonInspectionQualifiedNum,
|
||||
MaterialInspectionNum = newtable.MaterialInspectionNum,
|
||||
MaterialInspectionQualifiedNum = newtable.MaterialInspectionQualifiedNum,
|
||||
ConstructSolutionNum = newtable.ConstructSolutionNum,
|
||||
ConstructSolutionProjectApproveNum = newtable.ConstructSolutionProjectApproveNum,
|
||||
ConstructSolutionUnitApproveNum = newtable.ConstructSolutionUnitApproveNum,
|
||||
SpecialEquipmentQualityAssuranceSystemNum = newtable.SpecialEquipmentQualityAssuranceSystemNum,
|
||||
DesignDetailsNum = newtable.DesignDetailsNum,
|
||||
UnitProjectAcceptNum = newtable.UnitProjectAcceptNum,
|
||||
UnitProjectAcceptOKNum = newtable.UnitProjectAcceptOKNum,
|
||||
SubProjectAcceptNum = newtable.SubProjectAcceptNum,
|
||||
SubProjectAcceptOKNum = newtable.SubProjectAcceptOKNum,
|
||||
SubdivisionalWorksAcceptNum = newtable.SubdivisionalWorksAcceptNum,
|
||||
SubdivisionalWorksAcceptOKNum = newtable.SubdivisionalWorksAcceptOKNum
|
||||
};
|
||||
db.Project_CQMSData_CQMS.InsertOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
|
@ -247,6 +278,25 @@ namespace BLL
|
|||
table.SubProjectNum = newtable.SubProjectNum;
|
||||
table.SubdivisionalWorksNum = newtable.SubdivisionalWorksNum;
|
||||
table.InspectionLotNum = newtable.InspectionLotNum;
|
||||
table.EquipmentInspectionNum = newtable.EquipmentInspectionNum;
|
||||
table.EquipmentInspectionQualifiedNum = newtable.EquipmentInspectionQualifiedNum;
|
||||
table.MachineInspectionNum = newtable.MachineInspectionNum;
|
||||
table.MachineInspectionQualifiedNum = newtable.MachineInspectionQualifiedNum;
|
||||
table.PersonInspectionNum = newtable.PersonInspectionNum;
|
||||
table.PersonInspectionQualifiedNum = newtable.PersonInspectionQualifiedNum;
|
||||
table.MaterialInspectionNum = newtable.MaterialInspectionNum;
|
||||
table.MaterialInspectionQualifiedNum = newtable.MaterialInspectionQualifiedNum;
|
||||
table.ConstructSolutionNum = newtable.ConstructSolutionNum;
|
||||
table.ConstructSolutionProjectApproveNum = newtable.ConstructSolutionProjectApproveNum;
|
||||
table.ConstructSolutionUnitApproveNum = newtable.ConstructSolutionUnitApproveNum;
|
||||
table.SpecialEquipmentQualityAssuranceSystemNum = newtable.SpecialEquipmentQualityAssuranceSystemNum;
|
||||
table.DesignDetailsNum = newtable.DesignDetailsNum;
|
||||
table.UnitProjectAcceptNum = newtable.UnitProjectAcceptNum;
|
||||
table.UnitProjectAcceptOKNum = newtable.UnitProjectAcceptOKNum;
|
||||
table.SubProjectAcceptNum = newtable.SubProjectAcceptNum;
|
||||
table.SubProjectAcceptOKNum = newtable.SubProjectAcceptOKNum;
|
||||
table.SubdivisionalWorksAcceptNum = newtable.SubdivisionalWorksAcceptNum;
|
||||
table.SubdivisionalWorksAcceptOKNum = newtable.SubdivisionalWorksAcceptOKNum;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
@ -269,6 +319,20 @@ namespace BLL
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static void DeleteProject_CQMSData_CQMByDate(DateTime? reportDate)
|
||||
{
|
||||
using (var db = new SUBQHSEDB(Funs.ConnString))
|
||||
{
|
||||
var table = db.Project_CQMSData_CQMS.Where(x => x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0);
|
||||
if (table != null)
|
||||
{
|
||||
db.Project_CQMSData_CQMS.DeleteAllOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据projectid判断当天项目是否已统计数据
|
||||
/// </summary>
|
||||
|
@ -322,6 +386,7 @@ namespace BLL
|
|||
StatisticalData(item.ProjectId, CQMSDateType.All);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 统计数据
|
||||
/// </summary>
|
||||
|
@ -392,6 +457,13 @@ namespace BLL
|
|||
table.UnitProjectOnesOKNum = GetUnitProjectOnesOKNum(projectid);
|
||||
table.MaterialInRecheckNum = GetMaterialInRecheckNum(projectid);
|
||||
table.MaterialInRecheckOKNum = GetMaterialInRecheckOKNum(projectid);
|
||||
|
||||
table.UnitProjectAcceptNum = GetUnitProjectOnesNum(projectid);
|
||||
table.UnitProjectAcceptOKNum = GetUnitProjectOnesOKNum(projectid);
|
||||
table.SubProjectAcceptNum = GetMaterialInRecheckNum(projectid);
|
||||
table.SubProjectAcceptOKNum = GetMaterialInRecheckOKNum(projectid);
|
||||
table.SubdivisionalWorksAcceptNum = GetSubdivisionalWorksAcceptNum(projectid);
|
||||
table.SubdivisionalWorksAcceptOKNum = GetSubdivisionalWorksAcceptOKNum(projectid);
|
||||
}
|
||||
if (cQMSDateType == CQMSDateType.ProjectDivision || cQMSDateType == CQMSDateType.All)
|
||||
{
|
||||
|
@ -401,6 +473,28 @@ namespace BLL
|
|||
table.SubdivisionalWorksNum = GetSubdivisionalWorksNum(projectid);
|
||||
table.InspectionLotNum = GetInspectionLotNum(projectid);
|
||||
}
|
||||
if (cQMSDateType == CQMSDateType.Inspection || cQMSDateType == CQMSDateType.All)
|
||||
{
|
||||
table.EquipmentInspectionNum = GetComprehensiveInspectionEquipmentNum(projectid);
|
||||
table.EquipmentInspectionQualifiedNum = GetComprehensiveInspectionEquipmentOKNum(projectid);
|
||||
table.MachineInspectionNum = GetComprehensiveInspectionMachineNum(projectid);
|
||||
table.MachineInspectionQualifiedNum = GetComprehensiveInspectionMachineOKNum(projectid);
|
||||
table.PersonInspectionNum = GetComprehensiveInspectionPersonNum(projectid);
|
||||
table.PersonInspectionQualifiedNum = GetComprehensiveInspectionPersonOKNum(projectid);
|
||||
table.MaterialInspectionNum = GetComprehensiveInspectionMaterialNum(projectid);
|
||||
table.MaterialInspectionQualifiedNum = GetComprehensiveInspectionMaterialOKNum(projectid);
|
||||
}
|
||||
if (cQMSDateType == CQMSDateType.ConstructSolution || cQMSDateType == CQMSDateType.All)
|
||||
{
|
||||
table.ConstructSolutionNum = GetConstructSolutionNum(projectid);
|
||||
table.ConstructSolutionProjectApproveNum = GetConstructSolutionProjectApproveNum(projectid);
|
||||
table.ConstructSolutionUnitApproveNum = GetConstructSolutionUnitApproveNum(projectid);
|
||||
}
|
||||
if (cQMSDateType == CQMSDateType.SpecialEquipmentAndDesignDetails || cQMSDateType == CQMSDateType.All)
|
||||
{
|
||||
table.SpecialEquipmentQualityAssuranceSystemNum = GetSpecialEquipmentQualityAssuranceSystemNum(projectid);
|
||||
table.DesignDetailsNum = GetTechnicalDisclosePersonNum(projectid);
|
||||
}
|
||||
|
||||
if (IsReportByToday(projectid))
|
||||
{
|
||||
|
@ -691,6 +785,32 @@ namespace BLL
|
|||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取分项工程验收数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetSubdivisionalWorksAcceptNum(string projectid)
|
||||
{
|
||||
int result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
|
||||
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId
|
||||
where y.ProjectId == projectid && y.CheckAcceptType == "6" && x.CreateDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取分项工程验收合格数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetSubdivisionalWorksAcceptOKNum(string projectid)
|
||||
{
|
||||
int result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
|
||||
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId
|
||||
join z in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals z.InspectionId
|
||||
where y.ProjectId == projectid && y.CheckAcceptType == "6" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取单项工程个数
|
||||
/// </summary>
|
||||
|
@ -747,6 +867,148 @@ namespace BLL
|
|||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设备报验-报检数
|
||||
/// </summary>
|
||||
/// <param name="projectid"></param>
|
||||
/// <returns></returns>
|
||||
public static int GetComprehensiveInspectionEquipmentNum(string projectid)
|
||||
{
|
||||
int result = (from x in Funs.DB.Comprehensive_InspectionEquipment
|
||||
where x.ProjectId == projectid && x.CompileDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 设备报验-报检合格数
|
||||
/// </summary>
|
||||
/// <param name="projectid"></param>
|
||||
/// <returns></returns>
|
||||
public static int GetComprehensiveInspectionEquipmentOKNum(string projectid)
|
||||
{
|
||||
int result = (from x in Funs.DB.Comprehensive_InspectionEquipment
|
||||
where x.ProjectId == projectid && x.SamplingResult == "1" && x.CompileDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取机具报验-报检数
|
||||
/// </summary>
|
||||
/// <param name="projectid"></param>
|
||||
/// <returns></returns>
|
||||
public static int GetComprehensiveInspectionMachineNum(string projectid)
|
||||
{
|
||||
int result = (from x in Funs.DB.Comprehensive_InspectionMachine
|
||||
where x.ProjectId == projectid && x.CompileDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取机具报验-报检合格数
|
||||
/// </summary>
|
||||
/// <param name="projectid"></param>
|
||||
/// <returns></returns>
|
||||
public static int GetComprehensiveInspectionMachineOKNum(string projectid)
|
||||
{
|
||||
int result = (from x in Funs.DB.Comprehensive_InspectionMachine
|
||||
where x.ProjectId == projectid && x.IsCheckOK.HasValue && x.IsCheckOK == true && x.CompileDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取人员报验-报检数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetComprehensiveInspectionPersonNum(string projectid)
|
||||
{
|
||||
var result = (from x in Funs.DB.Comprehensive_InspectionPerson
|
||||
where x.ProjectId == projectid && x.IsOnSite.HasValue && x.CompileDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取人员报验-报检合格数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetComprehensiveInspectionPersonOKNum(string projectid)
|
||||
{
|
||||
var result = (from x in Funs.DB.Comprehensive_InspectionPerson
|
||||
where x.ProjectId == projectid && x.IsOnSite == true && x.CompileDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取材料报验-报检数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetComprehensiveInspectionMaterialNum(string projectid)
|
||||
{
|
||||
var result = 0;
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取材料报验-报检合格数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetComprehensiveInspectionMaterialOKNum(string projectid)
|
||||
{
|
||||
var result = 0;
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 施工方案数量
|
||||
/// </summary>
|
||||
/// <param name="projectid"></param>
|
||||
/// <returns></returns>
|
||||
public static int GetConstructSolutionNum(string projectid)
|
||||
{
|
||||
var result = (from x in Funs.DB.Solution_CQMSConstructSolution
|
||||
where x.ProjectId == projectid
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 施工方案数量——项目审批数量
|
||||
/// </summary>
|
||||
/// <param name="projectid"></param>
|
||||
/// <returns></returns>
|
||||
public static int GetConstructSolutionProjectApproveNum(string projectid)
|
||||
{
|
||||
var result = (from x in Funs.DB.Solution_CQMSConstructSolution
|
||||
where x.ProjectId == projectid && x.State == "1"
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 施工方案数量——项目审批数量
|
||||
/// </summary>
|
||||
/// <param name="projectid"></param>
|
||||
/// <returns></returns>
|
||||
public static int GetConstructSolutionUnitApproveNum(string projectid)
|
||||
{
|
||||
var result = 0;
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 特种设备质保体系
|
||||
/// </summary>
|
||||
/// <param name="projectid"></param>
|
||||
/// <returns></returns>
|
||||
public static int GetSpecialEquipmentQualityAssuranceSystemNum(string projectid)
|
||||
{
|
||||
var result = 0;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#region 推送项目质量数据
|
||||
|
||||
|
@ -756,7 +1018,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static ReturnData PushProjectCQMSData()
|
||||
{
|
||||
var items = (from x in db.Project_CQMSData_CQMS
|
||||
var items = (from x in Funs.DB.Project_CQMSData_CQMS
|
||||
where x.ReportDate == DateTime.Now.Date
|
||||
select x).ToList();
|
||||
Model.ReturnData responeData = new Model.ReturnData();
|
||||
|
|
|
@ -355,12 +355,12 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static ReturnData PushProjectHJGLData()
|
||||
{
|
||||
var items = (from x in db.Project_HJGLData_HJGL
|
||||
where x.ReportDate == DateTime.Now.Date
|
||||
select x).ToList();
|
||||
var defectItems = (from x in db.Project_HJGLData_Defect
|
||||
where x.ReportDate == DateTime.Now.Date
|
||||
select x).ToList();
|
||||
var items = (from x in Funs.DB.Project_HJGLData_HJGL
|
||||
where x.ReportDate == DateTime.Now.Date
|
||||
select x).ToList();
|
||||
var defectItems = (from x in Funs.DB.Project_HJGLData_Defect
|
||||
where x.ReportDate == DateTime.Now.Date
|
||||
select x).ToList();
|
||||
Model.ReturnData responeData = new Model.ReturnData();
|
||||
if (items.Count() > 0 || defectItems.Count() > 0)
|
||||
{
|
||||
|
@ -379,5 +379,20 @@ namespace BLL
|
|||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
public static void DeleteProject_HJGLData_HJGLByDate(DateTime? reportDate)
|
||||
{
|
||||
using (var db = new SUBQHSEDB(Funs.ConnString))
|
||||
{
|
||||
var table = db.Project_HJGLData_HJGL.Where(x => x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0);
|
||||
if (table != null)
|
||||
{
|
||||
db.Project_HJGLData_HJGL.DeleteAllOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -129,6 +129,7 @@ namespace BLL
|
|||
SafeTrainNum = newtable.SafeTrainNum,
|
||||
SpecialTrainNum = newtable.SpecialTrainNum,
|
||||
SpecialOperationTrainNum = newtable.SpecialOperationTrainNum,
|
||||
HseTechnicalNum = newtable.HseTechnicalNum,
|
||||
TotalEnergyConsumption = newtable.TotalEnergyConsumption,
|
||||
IncomeComprehensiveEnergyConsumption = newtable.IncomeComprehensiveEnergyConsumption,
|
||||
NewWaterConsumption = newtable.NewWaterConsumption,
|
||||
|
@ -163,10 +164,12 @@ namespace BLL
|
|||
CompanySpecialPlanNum = newtable.CompanySpecialPlanNum,
|
||||
CompanyOnSiteDisposalPlan = newtable.CompanyOnSiteDisposalPlan,
|
||||
CompanyDrillNum = newtable.CompanyDrillNum,
|
||||
CompanyDrillPersonNum = newtable.CompanyDrillPersonNum,
|
||||
ProjectComprehensivePlanNum = newtable.ProjectComprehensivePlanNum,
|
||||
ProjectSpecialPlanNum = newtable.ProjectSpecialPlanNum,
|
||||
ProjectOnSiteDisposalPlan = newtable.ProjectOnSiteDisposalPlan,
|
||||
ProjectDrillNum = newtable.ProjectDrillNum,
|
||||
ProjectDrillPersonNum = newtable.ProjectDrillPersonNum,
|
||||
CostExtract = newtable.CostExtract,
|
||||
CostUse = newtable.CostUse,
|
||||
UseEquipmentNum = newtable.UseEquipmentNum,
|
||||
|
@ -185,16 +188,19 @@ namespace BLL
|
|||
TrainPersonNum = newtable.TrainPersonNum,
|
||||
ConstructionNum = newtable.ConstructionNum,
|
||||
FinishedNum = newtable.FinishedNum,
|
||||
ArgumentNum = newtable.ArgumentNum,
|
||||
SuperCompletedNum = newtable.SuperCompletedNum,
|
||||
SuperTrainPersonNum = newtable.SuperTrainPersonNum,
|
||||
SuperConstructionNum = newtable.SuperConstructionNum,
|
||||
SuperFinishedNum = newtable.SuperFinishedNum
|
||||
SuperFinishedNum = newtable.SuperFinishedNum,
|
||||
SuperArgumentNum = newtable.SuperArgumentNum
|
||||
};
|
||||
db.Project_HSSEData_HSSE.InsertOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除实体
|
||||
/// </summary>
|
||||
|
|
|
@ -175,10 +175,10 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
|||
BItem = pds.Rows[i][7].ToString().Trim(),
|
||||
};
|
||||
|
||||
if (!string.IsNullOrEmpty(pds.Rows[i][12].ToString().Trim()))
|
||||
{
|
||||
newViewTrainingItem.Score = int.Parse(pds.Rows[i][12].ToString().Trim());
|
||||
}
|
||||
// if (!string.IsNullOrEmpty(pds.Rows[i][12].ToString().Trim()))
|
||||
// {
|
||||
// newViewTrainingItem.Score = int.Parse(pds.Rows[i][12].ToString().Trim());
|
||||
// }
|
||||
|
||||
////试题类型
|
||||
string col1 = pds.Rows[i][1].ToString().Trim();
|
||||
|
@ -331,7 +331,7 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
|||
CItem = newViewTrainingItem.CItem,
|
||||
DItem = newViewTrainingItem.DItem,
|
||||
EItem = newViewTrainingItem.EItem,
|
||||
Score = newViewTrainingItem.Score,
|
||||
// Score = newViewTrainingItem.Score,
|
||||
AnswerItems = newViewTrainingItem.AnswerItems,
|
||||
};
|
||||
if (newViewTrainingItem.Abstracts.Contains("(") || newViewTrainingItem.Abstracts.Contains(")")
|
||||
|
|
|
@ -35,13 +35,17 @@ namespace FineUIPro.Web.HSSE.Emergency
|
|||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.ProjectId)
|
||||
{
|
||||
this.ProjectId = Request.Params["projectId"];
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
this.panelLeftRegion.Hidden = true;
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
}
|
||||
this.InitDropDownList();
|
||||
|
||||
this.btnNew.OnClientClick = Window1.GetShowReference("EmergencyListEdit.aspx") + "return false;";
|
||||
|
|
|
@ -37,13 +37,17 @@ namespace FineUIPro.Web.HSSE.Emergency
|
|||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.ProjectId)
|
||||
{
|
||||
this.ProjectId = Request.Params["projectId"];
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
this.panelLeftRegion.Hidden = true;
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
}
|
||||
this.InitDropDownList();
|
||||
this.btnNew.OnClientClick = Window1.GetShowReference("EmergencySupplyEdit.aspx") + "return false;";
|
||||
if (this.CurrUser != null && this.CurrUser.PageSize.HasValue)
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -346,6 +346,7 @@
|
|||
<Compile Include="SpTDesktopItem.cs" />
|
||||
<Compile Include="Sys_UserDto.cs" />
|
||||
<Compile Include="ZHGL\DataSync\CHCheckItemOutput.cs" />
|
||||
<Compile Include="ZHGL\DataSync\WBSBreakdownProjectOutput.cs" />
|
||||
<Compile Include="ZHGL\DataSync\WelderOutput.cs" />
|
||||
<Compile Include="ZHGL\DataSync\WeldDineOutput.cs" />
|
||||
<Compile Include="ZHGL\DataSync\InspectionManagementOutput.cs" />
|
||||
|
|
|
@ -7,7 +7,7 @@ namespace Model
|
|||
/// </summary>
|
||||
public class CHCheckItemOutput : BaseEntities
|
||||
{
|
||||
public string Id { get; set; }
|
||||
public string Id { get; set; }
|
||||
/// <summary>
|
||||
/// 总片数
|
||||
/// </summary>
|
||||
|
|
|
@ -54,6 +54,25 @@ namespace Model
|
|||
public int? UnitProjectOnesOKNum { get; set; }
|
||||
public string UnitProjectOnesRate { get; set; }
|
||||
public int? UseNum { get; set; }
|
||||
public int? EquipmentInspectionNum { get; set; }
|
||||
public int? EquipmentInspectionQualifiedNum { get; set; }
|
||||
public int? MachineInspectionNum { get; set; }
|
||||
public int? MachineInspectionQualifiedNum { get; set; }
|
||||
public int? PersonInspectionNum { get; set; }
|
||||
public int? PersonInspectionQualifiedNum { get; set; }
|
||||
public int? MaterialInspectionNum { get; set; }
|
||||
public int? MaterialInspectionQualifiedNum { get; set; }
|
||||
public int? ConstructSolutionNum { get; set; }
|
||||
public int? ConstructSolutionProjectApproveNum { get; set; }
|
||||
public int? ConstructSolutionUnitApproveNum { get; set; }
|
||||
public int? SpecialEquipmentQualityAssuranceSystemNum { get; set; }
|
||||
public int? DesignDetailsNum { get; set; }
|
||||
public int? UnitProjectAcceptNum { get; set; }
|
||||
public int? UnitProjectAcceptOKNum { get; set; }
|
||||
public int? SubProjectAcceptNum { get; set; }
|
||||
public int? SubProjectAcceptOKNum { get; set; }
|
||||
public int? SubdivisionalWorksAcceptNum { get; set; }
|
||||
public int? SubdivisionalWorksAcceptOKNum { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -29,6 +29,8 @@ namespace Model
|
|||
public int? CompanyComprehensiveCheckNum { get; set; }
|
||||
public int? CompanyComprehensivePlanNum { get; set; }
|
||||
public int? CompanyDrillNum { get; set; }
|
||||
public int? CompanyDrillPersonNum { get; set; }
|
||||
|
||||
public int? CompanyLeadShiftCheckNum { get; set; }
|
||||
public int? CompanyOnSiteDisposalPlan { get; set; }
|
||||
public int? CompanySpecialCheckNum { get; set; }
|
||||
|
@ -39,6 +41,8 @@ namespace Model
|
|||
public int? CostUse { get; set; }
|
||||
public int? EnterpriseTopicsMeetingNum { get; set; }
|
||||
public int? FinishedNum { get; set; }
|
||||
public int? ArgumentNum { get; set; }
|
||||
public int? SuperArgumentNum { get; set; }
|
||||
public int? GeneralAccidentNum { get; set; }
|
||||
public int? GeneralClosedNum { get; set; }
|
||||
public int? GeneralNotClosedNum { get; set; }
|
||||
|
@ -64,6 +68,8 @@ namespace Model
|
|||
public decimal? NewWaterConsumption { get; set; }
|
||||
public int? ProjectComprehensivePlanNum { get; set; }
|
||||
public int? ProjectDrillNum { get; set; }
|
||||
public int? ProjectDrillPersonNum { get; set; }
|
||||
|
||||
public int? ProjectFullTimeNum { get; set; }
|
||||
public int? ProjectInspectorGeneralNum { get; set; }
|
||||
public int? ProjectLeadShiftCheckNum { get; set; }
|
||||
|
@ -84,6 +90,8 @@ namespace Model
|
|||
public int? ShutdownNum { get; set; }
|
||||
public int? SpecialEquipmentNum { get; set; }
|
||||
public int? SpecialOperationTrainNum { get; set; }
|
||||
public int? HseTechnicalNum { get; set; }
|
||||
|
||||
public int? EnvironmentalTrainNum { get; set; }
|
||||
public int? SpecialSeriousAccidentNum { get; set; }
|
||||
public int? SpecialTrainNum { get; set; }
|
||||
|
|
|
@ -7,7 +7,7 @@ namespace Model
|
|||
/// </summary>
|
||||
public class InspectionManagementOutput : BaseEntities
|
||||
{
|
||||
public string Id { get; set; }
|
||||
public string Id { get; set; }
|
||||
public string BreakdownCode { get; set; }
|
||||
public string BreakdownName { get; set; }
|
||||
public string Basis { get; set; }
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
namespace Model
|
||||
{
|
||||
public class LargeEngineeringOutput:BaseEntities
|
||||
public class LargeEngineeringOutput : BaseEntities
|
||||
{
|
||||
/// <summary>
|
||||
/// 危大工程审批完成数
|
||||
|
@ -34,5 +34,13 @@
|
|||
/// 超危大工程完工个数
|
||||
/// </summary>
|
||||
public int SuperFinishedNum { get; set; }
|
||||
/// <summary>
|
||||
/// 危大工程论证个数
|
||||
/// </summary>
|
||||
public int ArgumentNum { get; set; }
|
||||
/// <summary>
|
||||
/// 超危大工程论证个数
|
||||
/// </summary>
|
||||
public int SuperArgumentNum { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Model
|
||||
{
|
||||
public class WBSBreakdownProjectOutput :BaseEntities
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
public string Id { get; set; }
|
||||
/// <summary>
|
||||
/// 数量
|
||||
/// </summary>
|
||||
public int Sum { get; set; }
|
||||
}
|
||||
}
|
|
@ -7,7 +7,7 @@ namespace Model
|
|||
/// </summary>
|
||||
public class WeldDineOutput : BaseEntities
|
||||
{
|
||||
public string Id { get; set; }
|
||||
public string Id { get; set; }
|
||||
/// <summary>
|
||||
/// 达因数
|
||||
/// </summary>
|
||||
|
|
|
@ -7,7 +7,7 @@ namespace Model
|
|||
/// </summary>
|
||||
public class WelderOutput : BaseEntities
|
||||
{
|
||||
public string Id { get; set; }
|
||||
public string Id { get; set; }
|
||||
public string WEDCode { get; set; }
|
||||
public string WEDName { get; set; }
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ namespace WebAPI.Controllers
|
|||
/// 获取焊接统计数据
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public Model.ReturnData PostGetHJGLData()
|
||||
public async Task<ReturnData> PostGetHJGLData()
|
||||
{
|
||||
var returnData = new Model.ReturnData();
|
||||
returnData.type = "HJGL";
|
||||
|
@ -80,7 +80,7 @@ namespace WebAPI.Controllers
|
|||
returnData.expiryTime = BLL.SysConstSetService.CNCECTTokenExTime;
|
||||
if (!string.IsNullOrEmpty(returnData.token) && !string.IsNullOrEmpty(returnData.expiryTime) && DateTime.Parse(returnData.expiryTime) > DateTime.Now)
|
||||
{
|
||||
returnData.data = HJGLData_HJGLService.GetTodayHJGLData_HJGL();
|
||||
returnData.data = await HJGLData_HJGLService.GetTodayHJGLData_HJGLAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -161,6 +161,7 @@ namespace WebAPI.Filter
|
|||
, "TestRecord*getTestRecordItemAnswerBySelectedItem"
|
||||
, "TestRecord*postSubmitTestRecord"
|
||||
, "TestRecord*getTestScoreByPersonId"
|
||||
, "ShouYe*GetRectificationOutputs "
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in New Issue