新增:安全技术数据
This commit is contained in:
@@ -289,6 +289,51 @@ namespace BLL
|
||||
select x).FirstOrDefault();
|
||||
return q;
|
||||
}
|
||||
/// <summary>
|
||||
/// 汇总项目质量数据生成单位级CQMS汇总记录
|
||||
/// </summary>
|
||||
private static CQMSData_CQMS BuildCqmsSummary(string unitId, Model.Base_Unit baseUnit, List<Model.Project_CQMSData_CQMS> projectData)
|
||||
{
|
||||
return new CQMSData_CQMS
|
||||
{
|
||||
UnitId = unitId,
|
||||
CollCropCode = baseUnit.CollCropCode,
|
||||
UnitName = baseUnit.UnitName,
|
||||
ReportDate = DateTime.Now.Date,
|
||||
TrainPersonNum = projectData.Sum(x => x.TrainPersonNum),
|
||||
TechnicalDisclosePersonNum = projectData.Sum(x => x.TechnicalDisclosePersonNum),
|
||||
UseNum = projectData.Sum(x => x.UseNum),
|
||||
OKNum = projectData.Sum(x => x.OKNum),
|
||||
CompanyPersonNum = GetCompanyPersonNum(),
|
||||
BranchPersonNum = GetBranchPersonNum(),
|
||||
ProjectPersonNum = projectData.Sum(x => x.ProjectPersonNum),
|
||||
ProblemNum = projectData.Sum(x => x.ProblemNum),
|
||||
ProblemCompletedNum = projectData.Sum(x => x.ProblemCompletedNum),
|
||||
ProblemNotCompletedNum = projectData.Sum(x => x.ProblemNotCompletedNum),
|
||||
SNum = projectData.Sum(x => x.SNum),
|
||||
ANum = projectData.Sum(x => x.ANum),
|
||||
BNum = projectData.Sum(x => x.BNum),
|
||||
CNum = projectData.Sum(x => x.CNum),
|
||||
KeyProcessNum = projectData.Sum(x => x.KeyProcessNum),
|
||||
KeyProcessOKNum = projectData.Sum(x => x.KeyProcessOKNum),
|
||||
SpecialProcessNum = projectData.Sum(x => x.SpecialProcessNum),
|
||||
SpecialProcessOKNum = projectData.Sum(x => x.SpecialProcessOKNum),
|
||||
ConcealedWorksNum = projectData.Sum(x => x.ConcealedWorksNum),
|
||||
ConcealedWorksOKNum = projectData.Sum(x => x.ConcealedWorksOKNum),
|
||||
UnitProjectOnesNum = projectData.Sum(x => x.UnitProjectOnesNum),
|
||||
UnitProjectOnesOKNum = projectData.Sum(x => x.UnitProjectOnesOKNum),
|
||||
MaterialInRecheckNum = projectData.Sum(x => x.MaterialInRecheckNum),
|
||||
MaterialInRecheckOKNum = projectData.Sum(x => x.MaterialInRecheckOKNum),
|
||||
SingleProjectNum = projectData.Sum(x => x.SingleProjectNum),
|
||||
UnitProjectNum = projectData.Sum(x => x.UnitProjectNum),
|
||||
SubProjectNum = projectData.Sum(x => x.SubProjectNum),
|
||||
SubdivisionalWorksNum = projectData.Sum(x => x.SubdivisionalWorksNum),
|
||||
InspectionLotNum = projectData.Sum(x => x.InspectionLotNum),
|
||||
CreateMan = Const.sysglyId,
|
||||
CreateDate = DateTime.Now
|
||||
};
|
||||
}
|
||||
|
||||
public static CQMSData_CQMS GetSubUnitCqmsDataByDate(string Unitid, DateTime? reportdate)
|
||||
{
|
||||
|
||||
@@ -302,44 +347,7 @@ namespace BLL
|
||||
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();
|
||||
result = new CQMSData_CQMS
|
||||
{
|
||||
UnitId = Unitid,
|
||||
CollCropCode = base_Unit.CollCropCode,
|
||||
UnitName = base_Unit.UnitName,
|
||||
ReportDate = DateTime.Now.Date,
|
||||
TrainPersonNum = ProjectData.Sum(x => x.TrainPersonNum),
|
||||
TechnicalDisclosePersonNum = ProjectData.Sum(x => x.TechnicalDisclosePersonNum),
|
||||
UseNum = ProjectData.Sum(x => x.UseNum),
|
||||
OKNum = ProjectData.Sum(x => x.OKNum),
|
||||
CompanyPersonNum = GetCompanyPersonNum(),
|
||||
BranchPersonNum = GetBranchPersonNum(),
|
||||
ProjectPersonNum = ProjectData.Sum(x => x.ProjectPersonNum),
|
||||
ProblemNum = ProjectData.Sum(x => x.ProblemNum),
|
||||
ProblemCompletedNum = ProjectData.Sum(x => x.ProblemCompletedNum),
|
||||
ProblemNotCompletedNum = ProjectData.Sum(x => x.ProblemNotCompletedNum),
|
||||
SNum = ProjectData.Sum(x => x.SNum),
|
||||
ANum = ProjectData.Sum(x => x.ANum),
|
||||
BNum = ProjectData.Sum(x => x.BNum),
|
||||
CNum = ProjectData.Sum(x => x.CNum),
|
||||
KeyProcessNum = ProjectData.Sum(x => x.KeyProcessNum),
|
||||
KeyProcessOKNum = ProjectData.Sum(x => x.KeyProcessOKNum),
|
||||
SpecialProcessNum = ProjectData.Sum(x => x.SpecialProcessNum),
|
||||
SpecialProcessOKNum = ProjectData.Sum(x => x.SpecialProcessOKNum),
|
||||
ConcealedWorksNum = ProjectData.Sum(x => x.ConcealedWorksNum),
|
||||
ConcealedWorksOKNum = ProjectData.Sum(x => x.ConcealedWorksOKNum),
|
||||
UnitProjectOnesNum = ProjectData.Sum(x => x.UnitProjectOnesNum),
|
||||
UnitProjectOnesOKNum = ProjectData.Sum(x => x.UnitProjectOnesOKNum),
|
||||
MaterialInRecheckNum = ProjectData.Sum(x => x.MaterialInRecheckNum),
|
||||
MaterialInRecheckOKNum = ProjectData.Sum(x => x.MaterialInRecheckOKNum),
|
||||
SingleProjectNum = ProjectData.Sum(x => x.SingleProjectNum),
|
||||
UnitProjectNum = ProjectData.Sum(x => x.UnitProjectNum),
|
||||
SubProjectNum = ProjectData.Sum(x => x.SubProjectNum),
|
||||
SubdivisionalWorksNum = ProjectData.Sum(x => x.SubdivisionalWorksNum),
|
||||
InspectionLotNum = ProjectData.Sum(x => x.InspectionLotNum),
|
||||
CreateMan = Const.sysglyId,
|
||||
CreateDate = DateTime.Now
|
||||
};
|
||||
result = BuildCqmsSummary(Unitid, base_Unit, ProjectData);
|
||||
return result;
|
||||
}
|
||||
public static void UpdateTodyData_State()
|
||||
@@ -396,44 +404,7 @@ namespace BLL
|
||||
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();
|
||||
var table = new CQMSData_CQMS
|
||||
{
|
||||
UnitId = thisUnitId,
|
||||
CollCropCode = base_Unit.CollCropCode,
|
||||
UnitName = base_Unit.UnitName,
|
||||
ReportDate = DateTime.Now.Date,
|
||||
TrainPersonNum = ProjectData.Sum(x => x.TrainPersonNum),
|
||||
TechnicalDisclosePersonNum = ProjectData.Sum(x => x.TechnicalDisclosePersonNum),
|
||||
UseNum = ProjectData.Sum(x => x.UseNum),
|
||||
OKNum = ProjectData.Sum(x => x.OKNum),
|
||||
CompanyPersonNum = GetCompanyPersonNum(),
|
||||
BranchPersonNum = GetBranchPersonNum(),
|
||||
ProjectPersonNum = ProjectData.Sum(x => x.ProjectPersonNum),
|
||||
ProblemNum = ProjectData.Sum(x => x.ProblemNum),
|
||||
ProblemCompletedNum = ProjectData.Sum(x => x.ProblemCompletedNum),
|
||||
ProblemNotCompletedNum = ProjectData.Sum(x => x.ProblemNotCompletedNum),
|
||||
SNum = ProjectData.Sum(x => x.SNum),
|
||||
ANum = ProjectData.Sum(x => x.ANum),
|
||||
BNum = ProjectData.Sum(x => x.BNum),
|
||||
CNum = ProjectData.Sum(x => x.CNum),
|
||||
KeyProcessNum = ProjectData.Sum(x => x.KeyProcessNum),
|
||||
KeyProcessOKNum = ProjectData.Sum(x => x.KeyProcessOKNum),
|
||||
SpecialProcessNum = ProjectData.Sum(x => x.SpecialProcessNum),
|
||||
SpecialProcessOKNum = ProjectData.Sum(x => x.SpecialProcessOKNum),
|
||||
ConcealedWorksNum = ProjectData.Sum(x => x.ConcealedWorksNum),
|
||||
ConcealedWorksOKNum = ProjectData.Sum(x => x.ConcealedWorksOKNum),
|
||||
UnitProjectOnesNum = ProjectData.Sum(x => x.UnitProjectOnesNum),
|
||||
UnitProjectOnesOKNum = ProjectData.Sum(x => x.UnitProjectOnesOKNum),
|
||||
MaterialInRecheckNum = ProjectData.Sum(x => x.MaterialInRecheckNum),
|
||||
MaterialInRecheckOKNum = ProjectData.Sum(x => x.MaterialInRecheckOKNum),
|
||||
SingleProjectNum = ProjectData.Sum(x => x.SingleProjectNum),
|
||||
UnitProjectNum = ProjectData.Sum(x => x.UnitProjectNum),
|
||||
SubProjectNum = ProjectData.Sum(x => x.SubProjectNum),
|
||||
SubdivisionalWorksNum = ProjectData.Sum(x => x.SubdivisionalWorksNum),
|
||||
InspectionLotNum = ProjectData.Sum(x => x.InspectionLotNum),
|
||||
CreateMan = Const.sysglyId,
|
||||
CreateDate = DateTime.Now
|
||||
};
|
||||
var table = BuildCqmsSummary(thisUnitId, base_Unit, ProjectData);
|
||||
if (IsReportByToday())
|
||||
{
|
||||
table.Id = GetTodayData().Id;
|
||||
|
||||
@@ -2968,10 +2968,10 @@ namespace BLL
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取一般事故数
|
||||
/// 按事故等级获取在施项目事故列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.AccidentOutput> GetGeneralAccident()
|
||||
/// <param name="accidentDegree">事故等级(1一般 2较大 3重大 4特别重大)</param>
|
||||
private static List<Model.AccidentOutput> GetAccidentByDegree(string accidentDegree)
|
||||
{
|
||||
var query = from Record in Funs.DB.Accident_AccidentReport
|
||||
join AccidentType in Funs.DB.Sys_Const on new { ConstValue = Record.AccidentTypeId, GroupId = "AccidentReportRegistration" } equals new { ConstValue = AccidentType.ConstValue, GroupId = AccidentType.GroupId } into AccidentTypeGroup
|
||||
@@ -2980,7 +2980,7 @@ namespace BLL
|
||||
from Project in ProjectGroup.DefaultIfEmpty()
|
||||
join Unit in Funs.DB.Base_Unit on Record.UnitId equals Unit.UnitId into UnitGroup
|
||||
from Unit in UnitGroup.DefaultIfEmpty()
|
||||
where Record.AccidentDate > Const.DtmarkTime && BeUnderConstructionList.Contains(Record.ProjectId) && Record.AccidentDegree == "1"
|
||||
where Record.AccidentDate > Const.DtmarkTime && BeUnderConstructionList.Contains(Record.ProjectId) && Record.AccidentDegree == accidentDegree
|
||||
select new AccidentOutput
|
||||
{
|
||||
Id = Record.AccidentReportId,
|
||||
@@ -2995,10 +2995,15 @@ namespace BLL
|
||||
Info = Record.Abstract
|
||||
};
|
||||
|
||||
var result = query.ToList();
|
||||
return query.ToList();
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
/// <summary>
|
||||
/// 获取一般事故数
|
||||
/// </summary>
|
||||
public static List<Model.AccidentOutput> GetGeneralAccident()
|
||||
{
|
||||
return GetAccidentByDegree("1");
|
||||
}
|
||||
|
||||
public static async Task<List<Model.AccidentOutput>> GetGeneralAccidentAsync()
|
||||
@@ -3009,33 +3014,9 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 获取较大事故数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.AccidentOutput> GetMajorAccident()
|
||||
{
|
||||
var query = from Record in Funs.DB.Accident_AccidentReport
|
||||
join AccidentType in Funs.DB.Sys_Const on new { ConstValue = Record.AccidentTypeId, GroupId = "AccidentReportRegistration" } equals new { ConstValue = AccidentType.ConstValue, GroupId = AccidentType.GroupId } into AccidentTypeGroup
|
||||
from AccidentType in AccidentTypeGroup.DefaultIfEmpty()
|
||||
join Project in Funs.DB.Base_Project on Record.ProjectId equals Project.ProjectId into ProjectGroup
|
||||
from Project in ProjectGroup.DefaultIfEmpty()
|
||||
join Unit in Funs.DB.Base_Unit on Record.UnitId equals Unit.UnitId into UnitGroup
|
||||
from Unit in UnitGroup.DefaultIfEmpty()
|
||||
where Record.AccidentDate > Const.DtmarkTime && BeUnderConstructionList.Contains(Record.ProjectId) && Record.AccidentDegree == "2"
|
||||
select new AccidentOutput
|
||||
{
|
||||
Id = Record.AccidentReportId,
|
||||
ProjectId = Record.ProjectId,
|
||||
ProjectCode = Project.ProjectCode,
|
||||
ProjectName = Project.ProjectName,
|
||||
AccidentTypeName = AccidentType.ConstText,
|
||||
AccidentDate = Record.AccidentDate,
|
||||
UnitId = Unit.UnitId,
|
||||
UnitName = Unit.UnitName,
|
||||
PeopleNum = Record.PeopleNum,
|
||||
Info = Record.Abstract
|
||||
};
|
||||
|
||||
var result = query.ToList();
|
||||
return result;
|
||||
return GetAccidentByDegree("2");
|
||||
}
|
||||
|
||||
public static async Task<List<Model.AccidentOutput>> GetMajorAccidentAsync()
|
||||
@@ -3046,69 +3027,22 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 获取重大事故数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.AccidentOutput> GetSeriousAccident()
|
||||
{
|
||||
var query = from Record in Funs.DB.Accident_AccidentReport
|
||||
join AccidentType in Funs.DB.Sys_Const on new { ConstValue = Record.AccidentTypeId, GroupId = "AccidentReportRegistration" } equals new { ConstValue = AccidentType.ConstValue, GroupId = AccidentType.GroupId } into AccidentTypeGroup
|
||||
from AccidentType in AccidentTypeGroup.DefaultIfEmpty()
|
||||
join Project in Funs.DB.Base_Project on Record.ProjectId equals Project.ProjectId into ProjectGroup
|
||||
from Project in ProjectGroup.DefaultIfEmpty()
|
||||
join Unit in Funs.DB.Base_Unit on Record.UnitId equals Unit.UnitId into UnitGroup
|
||||
from Unit in UnitGroup.DefaultIfEmpty()
|
||||
where Record.AccidentDate > Const.DtmarkTime && BeUnderConstructionList.Contains(Record.ProjectId) && Record.AccidentDegree == "3"
|
||||
select new AccidentOutput
|
||||
{
|
||||
Id = Record.AccidentReportId,
|
||||
ProjectId = Record.ProjectId,
|
||||
ProjectCode = Project.ProjectCode,
|
||||
ProjectName = Project.ProjectName,
|
||||
AccidentTypeName = AccidentType.ConstText,
|
||||
AccidentDate = Record.AccidentDate,
|
||||
UnitId = Unit.UnitId,
|
||||
UnitName = Unit.UnitName,
|
||||
PeopleNum = Record.PeopleNum,
|
||||
Info = Record.Abstract
|
||||
};
|
||||
|
||||
var result = query.ToList();
|
||||
return result;
|
||||
return GetAccidentByDegree("3");
|
||||
}
|
||||
|
||||
public static async Task<List<Model.AccidentOutput>> GetSeriousAccidentAsync()
|
||||
{
|
||||
return await Task.Run(GetSeriousAccident);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取特别重大事故数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.AccidentOutput> GetSpecialSeriousAccident()
|
||||
{
|
||||
var query = from Record in Funs.DB.Accident_AccidentReport
|
||||
join AccidentType in Funs.DB.Sys_Const on new { ConstValue = Record.AccidentTypeId, GroupId = "AccidentReportRegistration" } equals new { ConstValue = AccidentType.ConstValue, GroupId = AccidentType.GroupId } into AccidentTypeGroup
|
||||
from AccidentType in AccidentTypeGroup.DefaultIfEmpty()
|
||||
join Project in Funs.DB.Base_Project on Record.ProjectId equals Project.ProjectId into ProjectGroup
|
||||
from Project in ProjectGroup.DefaultIfEmpty()
|
||||
join Unit in Funs.DB.Base_Unit on Record.UnitId equals Unit.UnitId into UnitGroup
|
||||
from Unit in UnitGroup.DefaultIfEmpty()
|
||||
where Record.AccidentDate > Const.DtmarkTime && BeUnderConstructionList.Contains(Record.ProjectId) && Record.AccidentDegree == "4"
|
||||
select new AccidentOutput
|
||||
{
|
||||
Id = Record.AccidentReportId,
|
||||
ProjectId = Record.ProjectId,
|
||||
ProjectCode = Project.ProjectCode,
|
||||
ProjectName = Project.ProjectName,
|
||||
AccidentTypeName = AccidentType.ConstText,
|
||||
AccidentDate = Record.AccidentDate,
|
||||
UnitId = Unit.UnitId,
|
||||
UnitName = Unit.UnitName,
|
||||
PeopleNum = Record.PeopleNum,
|
||||
Info = Record.Abstract
|
||||
};
|
||||
|
||||
var result = query.ToList();
|
||||
return result;
|
||||
return GetAccidentByDegree("4");
|
||||
}
|
||||
|
||||
public static async Task<List<Model.AccidentOutput>> GetSpecialSeriousAccidentAsync()
|
||||
|
||||
@@ -523,173 +523,132 @@ namespace BLL
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 按质量控制点级别(S/A/B/C)统计数量
|
||||
/// </summary>
|
||||
private static int GetClassNum(string projectid, string classType)
|
||||
{
|
||||
return (from x in Funs.DB.WBS_BreakdownProject
|
||||
where x.ProjectId == projectid && x.Class.Contains(classType) && x.IsSelected == true && x.CompileDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取S级数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetSNum(string projectid)
|
||||
{
|
||||
int result = (from x in Funs.DB.WBS_BreakdownProject
|
||||
where x.ProjectId == projectid && x.Class.Contains("S") && x.IsSelected == true && x.CompileDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
return GetClassNum(projectid, "S");
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取A级数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetANum(string projectid)
|
||||
{
|
||||
int result = (from x in Funs.DB.WBS_BreakdownProject
|
||||
where x.ProjectId == projectid && x.Class.Contains("A") && x.IsSelected == true && x.CompileDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
return GetClassNum(projectid, "A");
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取B级数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetBNum(string projectid)
|
||||
{
|
||||
int result = (from x in Funs.DB.WBS_BreakdownProject
|
||||
where x.ProjectId == projectid && x.Class.Contains("B") && x.IsSelected == true && x.CompileDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
return GetClassNum(projectid, "B");
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取C级数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetCNum(string projectid)
|
||||
{
|
||||
int result = (from x in Funs.DB.WBS_BreakdownProject
|
||||
where x.ProjectId == projectid && x.Class.Contains("C") && x.IsSelected == true && x.CompileDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
return GetClassNum(projectid, "C");
|
||||
}
|
||||
/// <summary>
|
||||
/// 按验收类型统计验收数
|
||||
/// </summary>
|
||||
private static int GetInspectionNum(string projectid, string checkAcceptType)
|
||||
{
|
||||
return (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 == checkAcceptType && x.CreateDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
}
|
||||
/// <summary>
|
||||
/// 按验收类型统计一次验收合格数
|
||||
/// </summary>
|
||||
private static int GetInspectionOkNum(string projectid, string checkAcceptType)
|
||||
{
|
||||
return (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 == checkAcceptType && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取关键工序验收数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetKeyProcessNum(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 == "1" && x.CreateDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
return GetInspectionNum(projectid, "1");
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取关键工序验收合格数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetKeyProcessOkNum(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 == "1" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
return GetInspectionOkNum(projectid, "1");
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取特殊过程验收数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetSpecialProcessNum(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 == "2" && x.CreateDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
return GetInspectionNum(projectid, "2");
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取特殊过程验收合格数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetSpecialProcessOkNum(string projectid)
|
||||
{
|
||||
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 y.ProjectId == projectid && y.CheckAcceptType == "2" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
return GetInspectionOkNum(projectid, "2");
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取隐蔽工程验收数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetConcealedWorksNum(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 == "3" && x.CreateDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
return GetInspectionNum(projectid, "3");
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取隐蔽工程验收合格数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetConcealedWorksOkNum(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 == "3" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
return GetInspectionOkNum(projectid, "3");
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取单位工程一次验收数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetUnitProjectOnesNum(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 == "4" && x.CreateDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
return GetInspectionNum(projectid, "4");
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取单位工程一次验收合格数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetUnitProjectOnesOKNum(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 == "4" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
return GetInspectionOkNum(projectid, "4");
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取材料进场复验数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetMaterialInRecheckNum(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 == "5" && x.CreateDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
return GetInspectionNum(projectid, "5");
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取材料进场复验合格数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetMaterialInRecheckOKNum(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 == "5" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
return GetInspectionOkNum(projectid, "5");
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取单项工程个数
|
||||
|
||||
Reference in New Issue
Block a user