看板质量验收数据汇总
This commit is contained in:
@@ -7,12 +7,14 @@ using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public static class CQMSDataService
|
||||
{
|
||||
public static SUBQHSEDB db = Funs.DB;
|
||||
public static List<string> BeUnderConstructionList = ProjectService.GetProjectWorkList().Where(x => (x.ProjectAttribute == "GONGCHENG" || x.ProjectAttribute == null)).Select(x => x.ProjectId).ToList();
|
||||
|
||||
#region 获取列表
|
||||
|
||||
@@ -518,6 +520,15 @@ namespace BLL
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取企业总部人数(异步)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static async Task<int> GetCompanyPersonNumAsync()
|
||||
{
|
||||
return await Task.Run(GetCompanyPersonNum);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取分支机构人数
|
||||
/// </summary>
|
||||
@@ -533,5 +544,792 @@ namespace BLL
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取分支机构人数(异步)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static async Task<int> GetBranchPersonNumAsync()
|
||||
{
|
||||
return await Task.Run(GetBranchPersonNum);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取项目专职人数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.OfSafetySupervisorsOutput> GetProjectPersonNum()
|
||||
{
|
||||
var result = (from x in Funs.DB.SitePerson_Person
|
||||
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
|
||||
select new Model.OfSafetySupervisorsOutput
|
||||
{
|
||||
ProjectId = x.ProjectId,
|
||||
ProjectName = p.ProjectName,
|
||||
UnitId = u.UnitId,
|
||||
UnitName = u.UnitName,
|
||||
Name = x.PersonName,
|
||||
Sex = x.Sex == null ? "" : (x.Sex == "1" ? "男" : "女"),
|
||||
IdentityCard = x.IdentityCard,
|
||||
WorkPostName = PostService.GetPostNameById(x.WorkPostId),
|
||||
Phone = x.Telephone
|
||||
}).ToList();
|
||||
result = result
|
||||
.GroupBy(x => x.IdentityCard)
|
||||
.Select(g => g.FirstOrDefault())
|
||||
.ToList();
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取项目专职人数(异步)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static async Task<List<Model.OfSafetySupervisorsOutput>> GetProjectPersonNumAsync()
|
||||
{
|
||||
return await Task.Run(GetProjectPersonNum);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取质量培训人次数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.OfSafetySupervisorsOutput> GetTrainPersonNum()
|
||||
{
|
||||
var result = (from x in Funs.DB.Comprehensive_InspectionPerson
|
||||
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.SitePerson_Person on x.InspectionPersonId equals y.PersonId
|
||||
join z in Funs.DB.Base_WorkPost on y.WorkPostId equals z.WorkPostId
|
||||
where BeUnderConstructionList.Contains(p.ProjectId) && x.IsTrain == true && x.CompileDate > Const.DtmarkTime
|
||||
select new Model.OfSafetySupervisorsOutput
|
||||
{
|
||||
ProjectId = x.ProjectId,
|
||||
ProjectName = p.ProjectName,
|
||||
UnitId = u.UnitId,
|
||||
UnitName = u.UnitName,
|
||||
Name = x.PersonName,
|
||||
Sex = y.Sex == null ? "" : (y.Sex == "1" ? "男" : "女"),
|
||||
IdentityCard = y.IdentityCard,
|
||||
WorkPostName = PostService.GetPostNameById(y.WorkPostId),
|
||||
Phone = y.Telephone
|
||||
}).ToList();
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取质量培训人次数(异步)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static async Task<List<Model.OfSafetySupervisorsOutput>> GetTrainPersonNumAsync()
|
||||
{
|
||||
return await Task.Run(GetTrainPersonNum);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取技术交底人次数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetTechnicalDisclosePersonNum()
|
||||
{
|
||||
var result = (from x in Funs.DB.Comprehensive_DesignDetails
|
||||
where BeUnderConstructionList.Contains(x.ProjectId) && x.CompileDate > Const.DtmarkTime
|
||||
select x.JoinPersonNum).ToList().Sum(x => x.Value);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取技术交底人次数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.EduTrainOutput> GetTechnicalDisclosePerson()
|
||||
{
|
||||
var result = (from x in Funs.DB.Comprehensive_DesignDetails
|
||||
join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup
|
||||
from p in pGroup.DefaultIfEmpty()
|
||||
where BeUnderConstructionList.Contains(p.ProjectId) && x.CompileDate > Const.DtmarkTime
|
||||
select new Model.EduTrainOutput()
|
||||
{
|
||||
ProjectId = x.ProjectId,
|
||||
ProjectName = p.ProjectName,
|
||||
UnitName = "",
|
||||
Id = x.DesignDetailsId,
|
||||
TrainTitle = "",
|
||||
TrainStartDate = null,
|
||||
TrainEndDate = null,
|
||||
TrainPersonNum = x.JoinPersonNum ?? 0,
|
||||
}).ToList();
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取技术交底人次数(异步)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static async Task<List<EduTrainOutput>> GetTechnicalDisclosePersonNumAsync()
|
||||
{
|
||||
return await Task.Run(GetTechnicalDisclosePerson);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取设备报验
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Comprehensive_InspectionEquipment> GetComprehensive_InspectionEquipment()
|
||||
{
|
||||
var result = (from x in Funs.DB.Comprehensive_InspectionEquipment
|
||||
where BeUnderConstructionList.Contains(x.ProjectId) && x.CompileDate > Const.DtmarkTime
|
||||
select x).ToList();
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取设备报验(异步)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static async Task<List<Comprehensive_InspectionEquipment>> GetComprehensive_InspectionEquipmentAsync()
|
||||
{
|
||||
return await Task.Run(GetComprehensive_InspectionEquipment);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取人员报验
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Comprehensive_InspectionPerson> GetComprehensive_InspectionPerson()
|
||||
{
|
||||
var result = (from x in Funs.DB.Comprehensive_InspectionPerson
|
||||
where BeUnderConstructionList.Contains(x.ProjectId) && x.CompileDate > Const.DtmarkTime
|
||||
select x).ToList();
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取人员报验(异步)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static async Task<List<Comprehensive_InspectionPerson>> GetComprehensive_InspectionPersonAsync()
|
||||
{
|
||||
return await Task.Run(GetComprehensive_InspectionPerson);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取机具报验
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Comprehensive_InspectionMachine> GetComprehensive_InspectionMachine()
|
||||
{
|
||||
var result = (from x in Funs.DB.Comprehensive_InspectionMachine
|
||||
where BeUnderConstructionList.Contains(x.ProjectId) && x.CompileDate > Const.DtmarkTime
|
||||
select x).ToList();
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取机具报验(异步)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static async Task<List<Comprehensive_InspectionMachine>> GetComprehensive_InspectionMachineAsync()
|
||||
{
|
||||
return await Task.Run(GetComprehensive_InspectionMachine);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取在用计量器具数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Comprehensive_InspectionMachine> GetUseNum()
|
||||
{
|
||||
var result = (from x in Funs.DB.Comprehensive_InspectionMachine
|
||||
where BeUnderConstructionList.Contains(x.ProjectId) && x.IsOnSite == true && x.InspectionType.Contains("计量") && x.CompileDate > Const.DtmarkTime
|
||||
select x).ToList();
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取在用计量器具数(异步)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static async Task<List<Comprehensive_InspectionMachine>> GetUseNumAsync()
|
||||
{
|
||||
return await Task.Run(GetUseNum);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取校准合格数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Comprehensive_InspectionMachine> GetOkNum()
|
||||
{
|
||||
var result = (from x in Funs.DB.Comprehensive_InspectionMachine
|
||||
where BeUnderConstructionList.Contains(x.ProjectId) && x.IsOnSite == true && x.InspectionType.Contains("计量") && x.IsCheckOK == true
|
||||
&& x.CompileDate > Const.DtmarkTime
|
||||
select x).ToList();
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取校准合格数(异步)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static async Task<List<Comprehensive_InspectionMachine>> GetOkNumAsync()
|
||||
{
|
||||
return await Task.Run(GetOkNum);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取单项工程个数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Project_Installation> GetSingleProjectNum()
|
||||
{
|
||||
var result = (from x in Funs.DB.Project_Installation
|
||||
where BeUnderConstructionList.Contains(x.ProjectId) && x.SuperInstallationId == "0"
|
||||
select x).ToList();
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取单项工程个数(异步)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static async Task<List<Project_Installation>> GetSingleProjectNumAsync()
|
||||
{
|
||||
return await Task.Run(GetSingleProjectNum);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取单位工程个数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<WBS_UnitWork> GetUnitProjectNum()
|
||||
{
|
||||
var result = (from x in Funs.DB.WBS_UnitWork
|
||||
where BeUnderConstructionList.Contains(x.ProjectId)
|
||||
select x).ToList();
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取单位工程个数(异步)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static async Task<List<WBS_UnitWork>> GetUnitProjectNumAsync()
|
||||
{
|
||||
return await Task.Run(GetUnitProjectNum);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取分部工程个数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<WBS_DivisionProject> GetSubProjectNum()
|
||||
{
|
||||
var result = (from x in Funs.DB.WBS_DivisionProject
|
||||
where BeUnderConstructionList.Contains(x.ProjectId) && x.SubItemType == "1" && x.IsSelected == true
|
||||
select x).ToList();
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取分部工程个数(异步)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static async Task<List<WBS_DivisionProject>> GetSubProjectNumAsync()
|
||||
{
|
||||
return await Task.Run(GetSubProjectNum);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取分项工程个数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<WBS_DivisionProject> GetSubdivisionalWorksNum()
|
||||
{
|
||||
var result = (from x in Funs.DB.WBS_DivisionProject
|
||||
where BeUnderConstructionList.Contains(x.ProjectId) && x.SubItemType == "3" && x.IsSelected == true
|
||||
select x).ToList();
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取分项工程个数(异步)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static async Task<List<WBS_DivisionProject>> GetSubdivisionalWorksNumAsync()
|
||||
{
|
||||
return await Task.Run(GetSubdivisionalWorksNum);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取检验批个数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<WBS_BreakdownProject> GetInspectionLotNum()
|
||||
{
|
||||
var result = (from x in Funs.DB.WBS_BreakdownProject
|
||||
where BeUnderConstructionList.Contains(x.ProjectId) && x.IsSelected == true
|
||||
select x).ToList();
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取检验批个数(异步)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static async Task<List<WBS_BreakdownProject>> GetInspectionLotNumAsync()
|
||||
{
|
||||
return await Task.Run(GetInspectionLotNum);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 施工方案数量
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Solution_CQMSConstructSolution> GetConstructSolution()
|
||||
{
|
||||
var result = (from x in Funs.DB.Solution_CQMSConstructSolution
|
||||
where BeUnderConstructionList.Contains(x.ProjectId)
|
||||
select x).ToList();
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 施工方案数量(异步)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static async Task<List<Solution_CQMSConstructSolution>> GetConstructSolutionAsync()
|
||||
{
|
||||
return await Task.Run(GetConstructSolution);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取质量问题
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Check_CheckControl> GetCQMSProblem()
|
||||
{
|
||||
var result = (from x in Funs.DB.Check_CheckControl
|
||||
where BeUnderConstructionList.Contains(x.ProjectId) && x.CheckDate > Const.DtmarkTime
|
||||
select x).ToList();
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取质量问题(异步)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static async Task<List<Check_CheckControl>> GetCQMSProblemAsync()
|
||||
{
|
||||
return await Task.Run(GetCQMSProblem);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取分支机构巡检质量问题
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<View_DCGL_CheckRectifyListFromSUB> GetBranchCQMSProblem()
|
||||
{
|
||||
var result = (from x in Funs.DB.View_DCGL_CheckRectifyListFromSUB
|
||||
where BeUnderConstructionList.Contains(x.ProjectId) && x.ProblemTypes == "1" && x.CheckDate > Const.DtmarkTime
|
||||
select x).ToList();
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取分支机构巡检质量问题(异步)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static async Task<List<View_DCGL_CheckRectifyListFromSUB>> GetBranchCQMSProblemAsync()
|
||||
{
|
||||
return await Task.Run(GetBranchCQMSProblem);
|
||||
}
|
||||
|
||||
#region 质量验收数据
|
||||
|
||||
/// <summary>
|
||||
/// 获取关键工序验收数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<InspectionManagementOutput> GetKeyProcessNum()
|
||||
{
|
||||
var result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
|
||||
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId
|
||||
where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "1" && 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>> GetKeyProcessNumAsync()
|
||||
{
|
||||
return await Task.Run(GetKeyProcessNum);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取关键工序验收合格数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<InspectionManagementOutput> GetKeyProcessOkNum()
|
||||
{
|
||||
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 == "1" && 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>> GetKeyProcessOkNumAsync()
|
||||
{
|
||||
return await Task.Run(GetKeyProcessOkNum);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取特殊过程验收数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<InspectionManagementOutput> GetSpecialProcessNum()
|
||||
{
|
||||
var result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
|
||||
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId
|
||||
where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "2" && 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>> GetSpecialProcessNumAsync()
|
||||
{
|
||||
return await Task.Run(GetSpecialProcessNum);
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取特殊过程验收合格数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<InspectionManagementOutput> GetSpecialProcessOkNum()
|
||||
{
|
||||
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 == "2" && 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>> GetSpecialProcessOkNumAsync()
|
||||
{
|
||||
return await Task.Run(GetSpecialProcessOkNum);
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取隐蔽工程验收数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<InspectionManagementOutput> GetConcealedWorksNum()
|
||||
{
|
||||
var result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
|
||||
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId
|
||||
where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "3" && 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>> GetConcealedWorksNumAsync()
|
||||
{
|
||||
return await Task.Run(GetConcealedWorksNum);
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取隐蔽工程验收合格数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<InspectionManagementOutput> GetConcealedWorksOkNum()
|
||||
{
|
||||
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 == "3" && 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>> GetConcealedWorksOkNumAsync()
|
||||
{
|
||||
return await Task.Run(GetConcealedWorksOkNum);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取单位工程验收数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<InspectionManagementOutput> GetUnitProjectAcceptNum()
|
||||
{
|
||||
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 == "4" && 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>> GetUnitProjectAcceptNumAsync()
|
||||
{
|
||||
return await Task.Run(GetUnitProjectAcceptNum);
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取单位工程验收合格数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<InspectionManagementOutput> GetUnitProjectAcceptOKNum()
|
||||
{
|
||||
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 == "4" && 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>> GetUnitProjectAcceptOKNumAsync()
|
||||
{
|
||||
return await Task.Run(GetUnitProjectAcceptOKNum);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取分部工程验收数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<InspectionManagementOutput> GetSubProjectAcceptNum()
|
||||
{
|
||||
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>> GetSubProjectAcceptNumAsync()
|
||||
{
|
||||
return await Task.Run(GetSubProjectAcceptNum);
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取分部工程验收合格数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<InspectionManagementOutput> GetSubProjectAcceptOKNum()
|
||||
{
|
||||
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>> GetSubProjectAcceptOKNumAsync()
|
||||
{
|
||||
return await Task.Run(GetSubProjectAcceptOKNum);
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取分项工程验收数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<InspectionManagementOutput> GetSubdivisionalWorksAcceptNum()
|
||||
{
|
||||
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 == "6" && 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>> GetSubdivisionalWorksAcceptNumAsync()
|
||||
{
|
||||
return await Task.Run(GetSubdivisionalWorksAcceptNum);
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取分项工程验收合格数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<InspectionManagementOutput> GetSubdivisionalWorksAcceptOKNum()
|
||||
{
|
||||
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 == "6" && 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>> GetSubdivisionalWorksAcceptOKNumAsync()
|
||||
{
|
||||
return await Task.Run(GetSubdivisionalWorksAcceptOKNum);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user