This commit is contained in:
2025-06-25 11:51:00 +08:00
parent 8816de937f
commit f8b9a0f0ce
2 changed files with 135 additions and 152 deletions
+105 -116
View File
@@ -1557,19 +1557,19 @@ namespace BLL
/// <returns></returns> /// <returns></returns>
public static List<InspectionManagementOutput> GetKeyProcessNum() public static List<InspectionManagementOutput> GetKeyProcessNum()
{ {
var result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail var result = (from x in Funs.DB.Check_SpotCheckDetail
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId join y in Funs.DB.WBS_ControlItemAndCycle on x.ControlItemAndCycleId equals y.ControlItemAndCycleId
where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "1" && x.CreateDate > Const.DtmarkTime where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "1" && x.CreateDate > Const.DtmarkTime
select new Model.InspectionManagementOutput() select new Model.InspectionManagementOutput()
{ {
ProjectId = y.ProjectId, ProjectId = y.ProjectId,
//ProjectName = p.ProjectName, //ProjectName = p.ProjectName,
//UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds), //UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds),
Id = x.InspectionDetailId, Id = x.SpotCheckDetailId,
BreakdownCode = y.BreakdownCode, BreakdownCode = y.ControlItemAndCycleCode,
BreakdownName = y.BreakdownName, BreakdownName = y.ControlItemContent,
Basis = y.Basis, Basis = y.HGForms,
CheckPoints = y.CheckPoints, CheckPoints = y.ControlItemDef,
}).ToList(); }).ToList();
return result; return result;
} }
@@ -1588,20 +1588,19 @@ namespace BLL
/// <returns></returns> /// <returns></returns>
public static List<InspectionManagementOutput> GetKeyProcessOkNum() public static List<InspectionManagementOutput> GetKeyProcessOkNum()
{ {
var result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail var result = (from x in Funs.DB.Check_SpotCheckDetail
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId join y in Funs.DB.WBS_ControlItemAndCycle on x.ControlItemAndCycleId equals y.ControlItemAndCycleId
join z in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals z.InspectionId where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "1" && x.IsOK == true && x.CreateDate > Const.DtmarkTime
where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "1" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
select new Model.InspectionManagementOutput() select new Model.InspectionManagementOutput()
{ {
ProjectId = y.ProjectId, ProjectId = y.ProjectId,
//ProjectName = p.ProjectName, //ProjectName = p.ProjectName,
//UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds), //UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds),
Id = x.InspectionDetailId, Id = x.SpotCheckDetailId,
BreakdownCode = y.BreakdownCode, BreakdownCode = y.ControlItemAndCycleCode,
BreakdownName = y.BreakdownName, BreakdownName = y.ControlItemContent,
Basis = y.Basis, Basis = y.HGForms,
CheckPoints = y.CheckPoints, CheckPoints = y.ControlItemDef,
}).ToList(); }).ToList();
return result; return result;
} }
@@ -1620,19 +1619,19 @@ namespace BLL
/// <returns></returns> /// <returns></returns>
public static List<InspectionManagementOutput> GetSpecialProcessNum() public static List<InspectionManagementOutput> GetSpecialProcessNum()
{ {
var result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail var result = (from x in Funs.DB.Check_SpotCheckDetail
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId join y in Funs.DB.WBS_ControlItemAndCycle on x.ControlItemAndCycleId equals y.ControlItemAndCycleId
where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "2" && x.CreateDate > Const.DtmarkTime where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "2" && x.CreateDate > Const.DtmarkTime
select new Model.InspectionManagementOutput() select new Model.InspectionManagementOutput()
{ {
ProjectId = y.ProjectId, ProjectId = y.ProjectId,
//ProjectName = p.ProjectName, //ProjectName = p.ProjectName,
//UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds), //UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds),
Id = x.InspectionDetailId, Id = x.SpotCheckDetailId,
BreakdownCode = y.BreakdownCode, BreakdownCode = y.ControlItemAndCycleCode,
BreakdownName = y.BreakdownName, BreakdownName = y.ControlItemContent,
Basis = y.Basis, Basis = y.HGForms,
CheckPoints = y.CheckPoints, CheckPoints = y.ControlItemDef,
}).ToList(); }).ToList();
return result; return result;
} }
@@ -1650,20 +1649,19 @@ namespace BLL
/// <returns></returns> /// <returns></returns>
public static List<InspectionManagementOutput> GetSpecialProcessOkNum() public static List<InspectionManagementOutput> GetSpecialProcessOkNum()
{ {
var result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail var result = (from x in Funs.DB.Check_SpotCheckDetail
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId join y in Funs.DB.WBS_ControlItemAndCycle on x.ControlItemAndCycleId equals y.ControlItemAndCycleId
join z in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals z.InspectionId where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "2" && x.IsOK == true && x.CreateDate > Const.DtmarkTime
where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "2" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
select new Model.InspectionManagementOutput() select new Model.InspectionManagementOutput()
{ {
ProjectId = y.ProjectId, ProjectId = y.ProjectId,
//ProjectName = p.ProjectName, //ProjectName = p.ProjectName,
//UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds), //UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds),
Id = x.InspectionDetailId, Id = x.SpotCheckDetailId,
BreakdownCode = y.BreakdownCode, BreakdownCode = y.ControlItemAndCycleCode,
BreakdownName = y.BreakdownName, BreakdownName = y.ControlItemContent,
Basis = y.Basis, Basis = y.HGForms,
CheckPoints = y.CheckPoints, CheckPoints = y.ControlItemDef,
}).ToList(); }).ToList();
return result; return result;
} }
@@ -1681,19 +1679,19 @@ namespace BLL
/// <returns></returns> /// <returns></returns>
public static List<InspectionManagementOutput> GetConcealedWorksNum() public static List<InspectionManagementOutput> GetConcealedWorksNum()
{ {
var result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail var result = (from x in Funs.DB.Check_SpotCheckDetail
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId join y in Funs.DB.WBS_ControlItemAndCycle on x.ControlItemAndCycleId equals y.ControlItemAndCycleId
where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "3" && x.CreateDate > Const.DtmarkTime where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "3" && x.CreateDate > Const.DtmarkTime
select new Model.InspectionManagementOutput() select new Model.InspectionManagementOutput()
{ {
ProjectId = y.ProjectId, ProjectId = y.ProjectId,
//ProjectName = p.ProjectName, //ProjectName = p.ProjectName,
//UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds), //UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds),
Id = x.InspectionDetailId, Id = x.SpotCheckDetailId,
BreakdownCode = y.BreakdownCode, BreakdownCode = y.ControlItemAndCycleCode,
BreakdownName = y.BreakdownName, BreakdownName = y.ControlItemContent,
Basis = y.Basis, Basis = y.HGForms,
CheckPoints = y.CheckPoints, CheckPoints = y.ControlItemDef,
}).ToList(); }).ToList();
return result; return result;
} }
@@ -1711,20 +1709,19 @@ namespace BLL
/// <returns></returns> /// <returns></returns>
public static List<InspectionManagementOutput> GetConcealedWorksOkNum() public static List<InspectionManagementOutput> GetConcealedWorksOkNum()
{ {
var result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail var result = (from x in Funs.DB.Check_SpotCheckDetail
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId join y in Funs.DB.WBS_ControlItemAndCycle on x.ControlItemAndCycleId equals y.ControlItemAndCycleId
join z in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals z.InspectionId where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "3" && x.IsOK == true && x.CreateDate > Const.DtmarkTime
where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "3" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
select new Model.InspectionManagementOutput() select new Model.InspectionManagementOutput()
{ {
ProjectId = y.ProjectId, ProjectId = y.ProjectId,
//ProjectName = p.ProjectName, //ProjectName = p.ProjectName,
//UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds), //UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds),
Id = x.InspectionDetailId, Id = x.SpotCheckDetailId,
BreakdownCode = y.BreakdownCode, BreakdownCode = y.ControlItemAndCycleCode,
BreakdownName = y.BreakdownName, BreakdownName = y.ControlItemContent,
Basis = y.Basis, Basis = y.HGForms,
CheckPoints = y.CheckPoints, CheckPoints = y.ControlItemDef,
}).ToList(); }).ToList();
return result; return result;
} }
@@ -1743,20 +1740,19 @@ namespace BLL
/// <returns></returns> /// <returns></returns>
public static List<InspectionManagementOutput> GetUnitProjectAcceptNum() public static List<InspectionManagementOutput> GetUnitProjectAcceptNum()
{ {
var result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail var result = (from x in Funs.DB.Check_SpotCheckDetail
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId join y in Funs.DB.WBS_ControlItemAndCycle on x.ControlItemAndCycleId equals y.ControlItemAndCycleId
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 where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "4" && x.CreateDate > Const.DtmarkTime
select new Model.InspectionManagementOutput() select new Model.InspectionManagementOutput()
{ {
ProjectId = y.ProjectId, ProjectId = y.ProjectId,
//ProjectName = p.ProjectName, //ProjectName = p.ProjectName,
//UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds), //UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds),
Id = x.InspectionDetailId, Id = x.SpotCheckDetailId,
BreakdownCode = y.BreakdownCode, BreakdownCode = y.ControlItemAndCycleCode,
BreakdownName = y.BreakdownName, BreakdownName = y.ControlItemContent,
Basis = y.Basis, Basis = y.HGForms,
CheckPoints = y.CheckPoints, CheckPoints = y.ControlItemDef,
}).ToList(); }).ToList();
return result; return result;
} }
@@ -1774,20 +1770,19 @@ namespace BLL
/// <returns></returns> /// <returns></returns>
public static List<InspectionManagementOutput> GetUnitProjectAcceptOKNum() public static List<InspectionManagementOutput> GetUnitProjectAcceptOKNum()
{ {
var result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail var result = (from x in Funs.DB.Check_SpotCheckDetail
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId join y in Funs.DB.WBS_ControlItemAndCycle on x.ControlItemAndCycleId equals y.ControlItemAndCycleId
join z in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals z.InspectionId where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "4" && x.IsOK == true && x.CreateDate > Const.DtmarkTime
where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "4" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
select new Model.InspectionManagementOutput() select new Model.InspectionManagementOutput()
{ {
ProjectId = y.ProjectId, ProjectId = y.ProjectId,
//ProjectName = p.ProjectName, //ProjectName = p.ProjectName,
//UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds), //UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds),
Id = x.InspectionDetailId, Id = x.SpotCheckDetailId,
BreakdownCode = y.BreakdownCode, BreakdownCode = y.ControlItemAndCycleCode,
BreakdownName = y.BreakdownName, BreakdownName = y.ControlItemContent,
Basis = y.Basis, Basis = y.HGForms,
CheckPoints = y.CheckPoints, CheckPoints = y.ControlItemDef,
}).ToList(); }).ToList();
return result; return result;
} }
@@ -1806,20 +1801,19 @@ namespace BLL
/// <returns></returns> /// <returns></returns>
public static List<InspectionManagementOutput> GetMaterialInRecheckNum() public static List<InspectionManagementOutput> GetMaterialInRecheckNum()
{ {
var result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail var result = (from x in Funs.DB.Check_SpotCheckDetail
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId join y in Funs.DB.WBS_ControlItemAndCycle on x.ControlItemAndCycleId equals y.ControlItemAndCycleId
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 where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "5" && x.CreateDate > Const.DtmarkTime
select new Model.InspectionManagementOutput() select new Model.InspectionManagementOutput()
{ {
ProjectId = y.ProjectId, ProjectId = y.ProjectId,
//ProjectName = p.ProjectName, //ProjectName = p.ProjectName,
//UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds), //UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds),
Id = x.InspectionDetailId, Id = x.SpotCheckDetailId,
BreakdownCode = y.BreakdownCode, BreakdownCode = y.ControlItemAndCycleCode,
BreakdownName = y.BreakdownName, BreakdownName = y.ControlItemContent,
Basis = y.Basis, Basis = y.HGForms,
CheckPoints = y.CheckPoints, CheckPoints = y.ControlItemDef,
}).ToList(); }).ToList();
return result; return result;
} }
@@ -1837,20 +1831,19 @@ namespace BLL
/// <returns></returns> /// <returns></returns>
public static List<InspectionManagementOutput> GetMaterialInRecheckOKNum() public static List<InspectionManagementOutput> GetMaterialInRecheckOKNum()
{ {
var result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail var result = (from x in Funs.DB.Check_SpotCheckDetail
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId join y in Funs.DB.WBS_ControlItemAndCycle on x.ControlItemAndCycleId equals y.ControlItemAndCycleId
join z in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals z.InspectionId where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "5" && x.IsOK == true && x.CreateDate > Const.DtmarkTime
where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "5" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
select new Model.InspectionManagementOutput() select new Model.InspectionManagementOutput()
{ {
ProjectId = y.ProjectId, ProjectId = y.ProjectId,
//ProjectName = p.ProjectName, //ProjectName = p.ProjectName,
//UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds), //UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds),
Id = x.InspectionDetailId, Id = x.SpotCheckDetailId,
BreakdownCode = y.BreakdownCode, BreakdownCode = y.ControlItemAndCycleCode,
BreakdownName = y.BreakdownName, BreakdownName = y.ControlItemContent,
Basis = y.Basis, Basis = y.HGForms,
CheckPoints = y.CheckPoints, CheckPoints = y.ControlItemDef,
}).ToList(); }).ToList();
return result; return result;
} }
@@ -1869,20 +1862,19 @@ namespace BLL
/// <returns></returns> /// <returns></returns>
public static List<InspectionManagementOutput> GetSubProjectAcceptNum() public static List<InspectionManagementOutput> GetSubProjectAcceptNum()
{ {
var result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail var result = (from x in Funs.DB.Check_SpotCheckDetail
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId join y in Funs.DB.WBS_ControlItemAndCycle on x.ControlItemAndCycleId equals y.ControlItemAndCycleId
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 where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "5" && x.CreateDate > Const.DtmarkTime
select new Model.InspectionManagementOutput() select new Model.InspectionManagementOutput()
{ {
ProjectId = y.ProjectId, ProjectId = y.ProjectId,
//ProjectName = p.ProjectName, //ProjectName = p.ProjectName,
//UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds), //UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds),
Id = x.InspectionDetailId, Id = x.SpotCheckDetailId,
BreakdownCode = y.BreakdownCode, BreakdownCode = y.ControlItemAndCycleCode,
BreakdownName = y.BreakdownName, BreakdownName = y.ControlItemContent,
Basis = y.Basis, Basis = y.HGForms,
CheckPoints = y.CheckPoints, CheckPoints = y.ControlItemDef,
}).ToList(); }).ToList();
return result; return result;
} }
@@ -1900,20 +1892,19 @@ namespace BLL
/// <returns></returns> /// <returns></returns>
public static List<InspectionManagementOutput> GetSubProjectAcceptOKNum() public static List<InspectionManagementOutput> GetSubProjectAcceptOKNum()
{ {
var result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail var result = (from x in Funs.DB.Check_SpotCheckDetail
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId join y in Funs.DB.WBS_ControlItemAndCycle on x.ControlItemAndCycleId equals y.ControlItemAndCycleId
join z in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals z.InspectionId where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "5" && x.IsOK == true && x.CreateDate > Const.DtmarkTime
where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "5" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
select new Model.InspectionManagementOutput() select new Model.InspectionManagementOutput()
{ {
ProjectId = y.ProjectId, ProjectId = y.ProjectId,
//ProjectName = p.ProjectName, //ProjectName = p.ProjectName,
//UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds), //UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds),
Id = x.InspectionDetailId, Id = x.SpotCheckDetailId,
BreakdownCode = y.BreakdownCode, BreakdownCode = y.ControlItemAndCycleCode,
BreakdownName = y.BreakdownName, BreakdownName = y.ControlItemContent,
Basis = y.Basis, Basis = y.HGForms,
CheckPoints = y.CheckPoints, CheckPoints = y.ControlItemDef,
}).ToList(); }).ToList();
return result; return result;
} }
@@ -1931,20 +1922,19 @@ namespace BLL
/// <returns></returns> /// <returns></returns>
public static List<InspectionManagementOutput> GetSubdivisionalWorksAcceptNum() public static List<InspectionManagementOutput> GetSubdivisionalWorksAcceptNum()
{ {
var result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail var result = (from x in Funs.DB.Check_SpotCheckDetail
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId join y in Funs.DB.WBS_ControlItemAndCycle on x.ControlItemAndCycleId equals y.ControlItemAndCycleId
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 where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "6" && x.CreateDate > Const.DtmarkTime
select new Model.InspectionManagementOutput() select new Model.InspectionManagementOutput()
{ {
ProjectId = y.ProjectId, ProjectId = y.ProjectId,
//ProjectName = p.ProjectName, //ProjectName = p.ProjectName,
//UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds), //UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds),
Id = x.InspectionDetailId, Id = x.SpotCheckDetailId,
BreakdownCode = y.BreakdownCode, BreakdownCode = y.ControlItemAndCycleCode,
BreakdownName = y.BreakdownName, BreakdownName = y.ControlItemContent,
Basis = y.Basis, Basis = y.HGForms,
CheckPoints = y.CheckPoints, CheckPoints = y.ControlItemDef,
}).ToList(); }).ToList();
return result; return result;
} }
@@ -1962,20 +1952,19 @@ namespace BLL
/// <returns></returns> /// <returns></returns>
public static List<InspectionManagementOutput> GetSubdivisionalWorksAcceptOKNum() public static List<InspectionManagementOutput> GetSubdivisionalWorksAcceptOKNum()
{ {
var result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail var result = (from x in Funs.DB.Check_SpotCheckDetail
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId join y in Funs.DB.WBS_ControlItemAndCycle on x.ControlItemAndCycleId equals y.ControlItemAndCycleId
join z in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals z.InspectionId where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "6" && x.IsOK == true && x.CreateDate > Const.DtmarkTime
where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "6" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
select new Model.InspectionManagementOutput() select new Model.InspectionManagementOutput()
{ {
ProjectId = y.ProjectId, ProjectId = y.ProjectId,
//ProjectName = p.ProjectName, //ProjectName = p.ProjectName,
//UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds), //UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds),
Id = x.InspectionDetailId, Id = x.SpotCheckDetailId,
BreakdownCode = y.BreakdownCode, BreakdownCode = y.ControlItemAndCycleCode,
BreakdownName = y.BreakdownName, BreakdownName = y.ControlItemContent,
Basis = y.Basis, Basis = y.HGForms,
CheckPoints = y.CheckPoints, CheckPoints = y.ControlItemDef,
}).ToList(); }).ToList();
return result; return result;
} }
@@ -749,8 +749,8 @@ namespace BLL
/// <returns></returns> /// <returns></returns>
public static int GetKeyProcessNum(string projectid) public static int GetKeyProcessNum(string projectid)
{ {
int result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail int result = (from x in Funs.DB.Check_SpotCheckDetail
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId join y in Funs.DB.WBS_ControlItemAndCycle on x.ControlItemAndCycleId equals y.ControlItemAndCycleId
where y.ProjectId == projectid && y.CheckAcceptType == "1" && x.CreateDate > Const.DtmarkTime where y.ProjectId == projectid && y.CheckAcceptType == "1" && x.CreateDate > Const.DtmarkTime
select x).Count(); select x).Count();
return result; return result;
@@ -761,10 +761,9 @@ namespace BLL
/// <returns></returns> /// <returns></returns>
public static int GetKeyProcessOkNum(string projectid) public static int GetKeyProcessOkNum(string projectid)
{ {
int result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail int result = (from x in Funs.DB.Check_SpotCheckDetail
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId join y in Funs.DB.WBS_ControlItemAndCycle on x.ControlItemAndCycleId equals y.ControlItemAndCycleId
join z in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals z.InspectionId where y.ProjectId == projectid && y.CheckAcceptType == "1" && x.IsOK == true && x.CreateDate > Const.DtmarkTime
where y.ProjectId == projectid && y.CheckAcceptType == "1" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
select x).Count(); select x).Count();
return result; return result;
} }
@@ -774,8 +773,8 @@ namespace BLL
/// <returns></returns> /// <returns></returns>
public static int GetSpecialProcessNum(string projectid) public static int GetSpecialProcessNum(string projectid)
{ {
int result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail int result = (from x in Funs.DB.Check_SpotCheckDetail
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId join y in Funs.DB.WBS_ControlItemAndCycle on x.ControlItemAndCycleId equals y.ControlItemAndCycleId
where y.ProjectId == projectid && y.CheckAcceptType == "2" && x.CreateDate > Const.DtmarkTime where y.ProjectId == projectid && y.CheckAcceptType == "2" && x.CreateDate > Const.DtmarkTime
select x).Count(); select x).Count();
return result; return result;
@@ -786,10 +785,9 @@ namespace BLL
/// <returns></returns> /// <returns></returns>
public static int GetSpecialProcessOkNum(string projectid) public static int GetSpecialProcessOkNum(string projectid)
{ {
var result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail var result = (from x in Funs.DB.Check_SpotCheckDetail
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId join y in Funs.DB.WBS_ControlItemAndCycle on x.ControlItemAndCycleId equals y.ControlItemAndCycleId
join z in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals z.InspectionId where y.ProjectId == projectid && y.CheckAcceptType == "2" && x.IsOK == true && x.CreateDate > Const.DtmarkTime
where y.ProjectId == projectid && y.CheckAcceptType == "2" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
select x).Count(); select x).Count();
return result; return result;
} }
@@ -799,8 +797,8 @@ namespace BLL
/// <returns></returns> /// <returns></returns>
public static int GetConcealedWorksNum(string projectid) public static int GetConcealedWorksNum(string projectid)
{ {
int result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail int result = (from x in Funs.DB.Check_SpotCheckDetail
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId join y in Funs.DB.WBS_ControlItemAndCycle on x.ControlItemAndCycleId equals y.ControlItemAndCycleId
where y.ProjectId == projectid && y.CheckAcceptType == "3" && x.CreateDate > Const.DtmarkTime where y.ProjectId == projectid && y.CheckAcceptType == "3" && x.CreateDate > Const.DtmarkTime
select x).Count(); select x).Count();
return result; return result;
@@ -811,10 +809,9 @@ namespace BLL
/// <returns></returns> /// <returns></returns>
public static int GetConcealedWorksOkNum(string projectid) public static int GetConcealedWorksOkNum(string projectid)
{ {
int result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail int result = (from x in Funs.DB.Check_SpotCheckDetail
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId join y in Funs.DB.WBS_ControlItemAndCycle on x.ControlItemAndCycleId equals y.ControlItemAndCycleId
join z in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals z.InspectionId where y.ProjectId == projectid && y.CheckAcceptType == "3" && x.IsOK == true && x.CreateDate > Const.DtmarkTime
where y.ProjectId == projectid && y.CheckAcceptType == "3" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
select x).Count(); select x).Count();
return result; return result;
} }
@@ -824,8 +821,8 @@ namespace BLL
/// <returns></returns> /// <returns></returns>
public static int GetUnitProjectOnesNum(string projectid) public static int GetUnitProjectOnesNum(string projectid)
{ {
int result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail int result = (from x in Funs.DB.Check_SpotCheckDetail
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId join y in Funs.DB.WBS_ControlItemAndCycle on x.ControlItemAndCycleId equals y.ControlItemAndCycleId
where y.ProjectId == projectid && y.CheckAcceptType == "4" && x.CreateDate > Const.DtmarkTime where y.ProjectId == projectid && y.CheckAcceptType == "4" && x.CreateDate > Const.DtmarkTime
select x).Count(); select x).Count();
return result; return result;
@@ -836,10 +833,9 @@ namespace BLL
/// <returns></returns> /// <returns></returns>
public static int GetUnitProjectOnesOKNum(string projectid) public static int GetUnitProjectOnesOKNum(string projectid)
{ {
int result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail int result = (from x in Funs.DB.Check_SpotCheckDetail
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId join y in Funs.DB.WBS_ControlItemAndCycle on x.ControlItemAndCycleId equals y.ControlItemAndCycleId
join z in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals z.InspectionId where y.ProjectId == projectid && y.CheckAcceptType == "4" && x.IsOK == true && x.CreateDate > Const.DtmarkTime
where y.ProjectId == projectid && y.CheckAcceptType == "4" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
select x).Count(); select x).Count();
return result; return result;
} }
@@ -849,8 +845,8 @@ namespace BLL
/// <returns></returns> /// <returns></returns>
public static int GetMaterialInRecheckNum(string projectid) public static int GetMaterialInRecheckNum(string projectid)
{ {
int result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail int result = (from x in Funs.DB.Check_SpotCheckDetail
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId join y in Funs.DB.WBS_ControlItemAndCycle on x.ControlItemAndCycleId equals y.ControlItemAndCycleId
where y.ProjectId == projectid && y.CheckAcceptType == "5" && x.CreateDate > Const.DtmarkTime where y.ProjectId == projectid && y.CheckAcceptType == "5" && x.CreateDate > Const.DtmarkTime
select x).Count(); select x).Count();
return result; return result;
@@ -861,10 +857,9 @@ namespace BLL
/// <returns></returns> /// <returns></returns>
public static int GetMaterialInRecheckOKNum(string projectid) public static int GetMaterialInRecheckOKNum(string projectid)
{ {
int result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail int result = (from x in Funs.DB.Check_SpotCheckDetail
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId join y in Funs.DB.WBS_ControlItemAndCycle on x.ControlItemAndCycleId equals y.ControlItemAndCycleId
join z in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals z.InspectionId where y.ProjectId == projectid && y.CheckAcceptType == "5" && x.IsOK == true && x.CreateDate > Const.DtmarkTime
where y.ProjectId == projectid && y.CheckAcceptType == "5" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
select x).Count(); select x).Count();
return result; return result;
} }
@@ -874,8 +869,8 @@ namespace BLL
/// <returns></returns> /// <returns></returns>
public static int GetSubdivisionalWorksAcceptNum(string projectid) public static int GetSubdivisionalWorksAcceptNum(string projectid)
{ {
int result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail int result = (from x in Funs.DB.Check_SpotCheckDetail
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId join y in Funs.DB.WBS_ControlItemAndCycle on x.ControlItemAndCycleId equals y.ControlItemAndCycleId
where y.ProjectId == projectid && y.CheckAcceptType == "6" && x.CreateDate > Const.DtmarkTime where y.ProjectId == projectid && y.CheckAcceptType == "6" && x.CreateDate > Const.DtmarkTime
select x).Count(); select x).Count();
return result; return result;
@@ -886,10 +881,9 @@ namespace BLL
/// <returns></returns> /// <returns></returns>
public static int GetSubdivisionalWorksAcceptOKNum(string projectid) public static int GetSubdivisionalWorksAcceptOKNum(string projectid)
{ {
int result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail int result = (from x in Funs.DB.Check_SpotCheckDetail
join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId join y in Funs.DB.WBS_ControlItemAndCycle on x.ControlItemAndCycleId equals y.ControlItemAndCycleId
join z in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals z.InspectionId where y.ProjectId == projectid && y.CheckAcceptType == "6" && x.IsOK == true && x.CreateDate > Const.DtmarkTime
where y.ProjectId == projectid && y.CheckAcceptType == "6" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
select x).Count(); select x).Count();
return result; return result;
} }