This commit is contained in:
2025-10-24 18:27:46 +08:00
parent 47172cd0b3
commit 78a2b0f525
47 changed files with 678 additions and 277 deletions
@@ -32,7 +32,7 @@ namespace BLL.API.CQMS
newInspectionManagement.Branch = inspectionManagement.Branch;
newInspectionManagement.ControlPointType = inspectionManagement.ControlPointType;
newInspectionManagement.AcceptanceSite = inspectionManagement.AcceptanceSite;
newInspectionManagement.IsOnceQualified = (inspectionManagement.IsOnceQualified == "true"|| inspectionManagement.IsOnceQualified == null) ? true : false;
newInspectionManagement.IsOnceQualified = (inspectionManagement.IsOnceQualified == "true"|| inspectionManagement.IsOnceQualified == "True") ? true : false;
if (!string.IsNullOrEmpty(inspectionManagement.InspectionDate))
newInspectionManagement.InspectionDate = DateTime.Parse(inspectionManagement.InspectionDate);
newInspectionManagement.AttachUrl = inspectionManagement.AttachUrl;
@@ -164,7 +164,7 @@ namespace BLL
{
return (from x in db.ProcessControl_InspectionManagementDetail
join y in db.ProcessControl_InspectionManagement on x.InspectionId equals y.InspectionId
where x.InspectionId == InspectionId && (y.IsOnceQualified == null || y.IsOnceQualified == true)
where x.InspectionId == InspectionId && y.IsOnceQualified == true
select x).ToList();
}
}
@@ -174,7 +174,7 @@ namespace BLL
{
return (from x in db.ProcessControl_InspectionManagementDetail
join y in db.ProcessControl_InspectionManagement on x.InspectionId equals y.InspectionId
where x.InspectionId == InspectionId && (y.IsOnceQualified == null || y.IsOnceQualified == true)
where x.InspectionId == InspectionId && y.IsOnceQualified == true
select x).ToList();
}
}
@@ -72,7 +72,7 @@ namespace BLL
ControlPointType = (from y in db.WBS_BreakdownProject where y.BreakdownProjectId == x.ControlPointType select y.BreakdownName).FirstOrDefault(),//质量控制点
Class = (from y in db.WBS_BreakdownProject where y.BreakdownProjectId == x.ControlPointType select y.Class).FirstOrDefault(),//控制等级
x.AcceptanceSite,
IsOnceQualified = ((x.IsOnceQualified == null || x.IsOnceQualified == true) ? "是" : "否"),
IsOnceQualified = (x.IsOnceQualified == true ? "是" : "否"),
x.InspectionDate,
x.AttachUrl,
x.AttachUrl2,
@@ -121,7 +121,7 @@ namespace BLL
ControlPointType = (from y in db.WBS_BreakdownProject where y.BreakdownProjectId == x.ControlPointType select y.BreakdownName).FirstOrDefault(),//质量控制点
Class = (from y in db.WBS_BreakdownProject where y.BreakdownProjectId == x.ControlPointType select y.Class).FirstOrDefault(),//控制等级
x.AcceptanceSite,
IsOnceQualified = ((x.IsOnceQualified == null || x.IsOnceQualified == true) ? "是" : "否"),
IsOnceQualified = (x.IsOnceQualified == true ? "是" : "否"),
x.InspectionDate,
x.AttachUrl,
x.AttachUrl2,
@@ -322,16 +322,24 @@ namespace BLL
}
if (isOnceQualified == true)
{
InspectionMangementList = InspectionMangementList.Where(x => x.IsOnceQualified == null || x.IsOnceQualified == true).ToList();
InspectionMangementList = InspectionMangementList.Where(x => x.IsOnceQualified == true).ToList();
}
if (startDate != null && startDate != Convert.ToDateTime("2015-01-01"))
if (startDate != null)
{
InspectionMangementList = InspectionMangementList.Where(x => x.InspectionDate >= startDate).ToList();
InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate >= startDate).ToList();
}
if (SoptDate != null)
{
InspectionMangementList = InspectionMangementList.Where(x => x.InspectionDate == null || x.InspectionDate <= SoptDate).ToList();
InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate <= SoptDate).ToList();
}
//if (startDate != null && startDate != Convert.ToDateTime("2015-01-01"))
//{
// InspectionMangementList = InspectionMangementList.Where(x => x.InspectionDate >= startDate).ToList();
//}
//if (SoptDate != null)
//{
// InspectionMangementList = InspectionMangementList.Where(x => x.InspectionDate == null || x.InspectionDate <= SoptDate).ToList();
//}
return InspectionMangementList;
}
@@ -349,16 +357,24 @@ namespace BLL
}
if (isOnceQualified == true)
{
InspectionMangementList = InspectionMangementList.Where(x => x.IsOnceQualified == null || x.IsOnceQualified == true).ToList();
InspectionMangementList = InspectionMangementList.Where(x => x.IsOnceQualified == true).ToList();
}
if (startDate != null && startDate != Convert.ToDateTime("2015-01-01"))
if (startDate != null)
{
InspectionMangementList = InspectionMangementList.Where(x => x.InspectionDate >= startDate).ToList();
InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate >= startDate).ToList();
}
if (SoptDate != null)
{
InspectionMangementList = InspectionMangementList.Where(x => x.InspectionDate == null || x.InspectionDate <= SoptDate).ToList();
InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate <= SoptDate).ToList();
}
//if (startDate != null && startDate != Convert.ToDateTime("2015-01-01"))
//{
// InspectionMangementList = InspectionMangementList.Where(x => x.InspectionDate >= startDate).ToList();
//}
//if (SoptDate != null)
//{
// InspectionMangementList = InspectionMangementList.Where(x => x.InspectionDate == null || x.InspectionDate <= SoptDate).ToList();
//}
return InspectionMangementList;
}
@@ -371,16 +387,24 @@ namespace BLL
}
if (isOnceQualified == true)
{
InspectionMangementList = InspectionMangementList.Where(x => x.IsOnceQualified == null || x.IsOnceQualified == true).ToList();
InspectionMangementList = InspectionMangementList.Where(x => x.IsOnceQualified == true).ToList();
}
if (startDate != null && startDate != Convert.ToDateTime("2015-01-01"))
if (startDate != null)
{
InspectionMangementList = InspectionMangementList.Where(x => x.InspectionDate >= startDate).ToList();
InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate >= startDate).ToList();
}
if (SoptDate != null)
{
InspectionMangementList = InspectionMangementList.Where(x => x.InspectionDate == null || x.InspectionDate <= SoptDate).ToList();
InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate <= SoptDate).ToList();
}
//if (startDate != null && startDate != Convert.ToDateTime("2015-01-01"))
//{
// InspectionMangementList = InspectionMangementList.Where(x => x.InspectionDate >= startDate).ToList();
//}
//if (SoptDate != null)
//{
// InspectionMangementList = InspectionMangementList.Where(x => x.InspectionDate == null || x.InspectionDate <= SoptDate).ToList();
//}
return InspectionMangementList;
}
@@ -419,16 +443,24 @@ namespace BLL
List<Model.ProcessControl_InspectionManagement> InspectionMangementList = (from x in Funs.DB.ProcessControl_InspectionManagement where x.ProjectId == projectId select x).ToList();
if (isOnceQualified == true)
{
InspectionMangementList = InspectionMangementList.Where(x => x.IsOnceQualified == null || x.IsOnceQualified == true).ToList();
InspectionMangementList = InspectionMangementList.Where(x => x.IsOnceQualified == true).ToList();
}
if (startDate != null && startDate != Convert.ToDateTime("2015-01-01"))
if (startDate != null)
{
InspectionMangementList = InspectionMangementList.Where(x => x.InspectionDate >= startDate).ToList();
InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate >= startDate).ToList();
}
if (SoptDate != null)
{
InspectionMangementList = InspectionMangementList.Where(x => x.InspectionDate == null || x.InspectionDate <= SoptDate).ToList();
InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate <= SoptDate).ToList();
}
//if (startDate != null && startDate != Convert.ToDateTime("2015-01-01"))
//{
// InspectionMangementList = InspectionMangementList.Where(x => x.InspectionDate >= startDate).ToList();
//}
//if (SoptDate != null)
//{
// InspectionMangementList = InspectionMangementList.Where(x => x.InspectionDate == null || x.InspectionDate <= SoptDate).ToList();
//}
return InspectionMangementList;
}
@@ -446,16 +478,24 @@ namespace BLL
}
if (isOnceQualified == true)
{
InspectionMangementList = InspectionMangementList.Where(x => x.IsOnceQualified == null || x.IsOnceQualified == true).ToList();
InspectionMangementList = InspectionMangementList.Where(x => x.IsOnceQualified == true).ToList();
}
if (startDate != null && startDate != Convert.ToDateTime("2015-01-01"))
if (startDate != null)
{
InspectionMangementList = InspectionMangementList.Where(x => x.InspectionDate >= startDate).ToList();
InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate >= startDate).ToList();
}
if (SoptDate != null)
{
InspectionMangementList = InspectionMangementList.Where(x => x.InspectionDate == null || x.InspectionDate <= SoptDate).ToList();
InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate <= SoptDate).ToList();
}
//if (startDate != null && startDate != Convert.ToDateTime("2015-01-01"))
//{
// InspectionMangementList = InspectionMangementList.Where(x => x.InspectionDate >= startDate).ToList();
//}
//if (SoptDate != null)
//{
// InspectionMangementList = InspectionMangementList.Where(x => x.InspectionDate == null || x.InspectionDate <= SoptDate).ToList();
//}
return InspectionMangementList;
}
@@ -469,16 +509,24 @@ namespace BLL
}
if (isOnceQualified == true)
{
InspectionMangementList = InspectionMangementList.Where(x => x.IsOnceQualified == null || x.IsOnceQualified == true).ToList();
InspectionMangementList = InspectionMangementList.Where(x => x.IsOnceQualified == true).ToList();
}
if (startDate != null && startDate != Convert.ToDateTime("2015-01-01"))
if (startDate != null)
{
InspectionMangementList = InspectionMangementList.Where(x => x.InspectionDate >= startDate).ToList();
InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate >= startDate).ToList();
}
if (SoptDate != null)
{
InspectionMangementList = InspectionMangementList.Where(x => x.InspectionDate == null || x.InspectionDate <= SoptDate).ToList();
InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate <= SoptDate).ToList();
}
//if (startDate != null && startDate != Convert.ToDateTime("2015-01-01"))
//{
// InspectionMangementList = InspectionMangementList.Where(x => x.InspectionDate >= startDate).ToList();
//}
//if (SoptDate != null)
//{
// InspectionMangementList = InspectionMangementList.Where(x => x.InspectionDate == null || x.InspectionDate <= SoptDate).ToList();
//}
return InspectionMangementList;
}
@@ -498,16 +546,24 @@ namespace BLL
}
if (isOnceQualified == true)
{
InspectionMangementList = InspectionMangementList.Where(x => x.IsOnceQualified == null || x.IsOnceQualified == true).ToList();
InspectionMangementList = InspectionMangementList.Where(x => x.IsOnceQualified == true).ToList();
}
if (startDate != null && startDate != Convert.ToDateTime("2015-01-01"))
if (startDate != null)
{
InspectionMangementList = InspectionMangementList.Where(x => x.InspectionDate >= startDate).ToList();
InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate >= startDate).ToList();
}
if (SoptDate != null)
{
InspectionMangementList = InspectionMangementList.Where(x => x.InspectionDate == null || x.InspectionDate <= SoptDate).ToList();
InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate <= SoptDate).ToList();
}
//if (startDate != null && startDate != Convert.ToDateTime("2015-01-01"))
//{
// InspectionMangementList = InspectionMangementList.Where(x => x.InspectionDate >= startDate).ToList();
//}
//if (SoptDate != null)
//{
// InspectionMangementList = InspectionMangementList.Where(x => x.InspectionDate == null || x.InspectionDate <= SoptDate).ToList();
//}
return InspectionMangementList;
}
+7 -7
View File
@@ -1527,7 +1527,7 @@ namespace BLL
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 == null || z.IsOnceQualified == true) && x.CreateDate > Const.DtmarkTime
where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "1" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
select new Model.InspectionManagementOutput()
{
ProjectId = y.ProjectId,
@@ -1589,7 +1589,7 @@ namespace BLL
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 == null || z.IsOnceQualified == true) && x.CreateDate > Const.DtmarkTime
where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "2" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
select new Model.InspectionManagementOutput()
{
ProjectId = y.ProjectId,
@@ -1650,7 +1650,7 @@ namespace BLL
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 == null || z.IsOnceQualified == true) && x.CreateDate > Const.DtmarkTime
where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "3" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
select new Model.InspectionManagementOutput()
{
ProjectId = y.ProjectId,
@@ -1713,7 +1713,7 @@ namespace BLL
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 == null || z.IsOnceQualified == true) && x.CreateDate > Const.DtmarkTime
where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "4" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
select new Model.InspectionManagementOutput()
{
ProjectId = y.ProjectId,
@@ -1776,7 +1776,7 @@ namespace BLL
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 == null || z.IsOnceQualified == true) && x.CreateDate > Const.DtmarkTime
where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "5" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
select new Model.InspectionManagementOutput()
{
ProjectId = y.ProjectId,
@@ -1839,7 +1839,7 @@ namespace BLL
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 == null || z.IsOnceQualified == true) && x.CreateDate > Const.DtmarkTime
where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "5" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
select new Model.InspectionManagementOutput()
{
ProjectId = y.ProjectId,
@@ -1901,7 +1901,7 @@ namespace BLL
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 == null || z.IsOnceQualified == true) && x.CreateDate > Const.DtmarkTime
where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "6" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
select new Model.InspectionManagementOutput()
{
ProjectId = y.ProjectId,
@@ -743,7 +743,7 @@ namespace BLL
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 == null || z.IsOnceQualified == true) && x.CreateDate > Const.DtmarkTime
where y.ProjectId == projectid && y.CheckAcceptType == "1" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
select x).Count();
return result;
}
@@ -768,7 +768,7 @@ namespace BLL
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 == null || z.IsOnceQualified == true) && x.CreateDate > Const.DtmarkTime
where y.ProjectId == projectid && y.CheckAcceptType == "2" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
select x).Count();
return result;
}
@@ -793,7 +793,7 @@ namespace BLL
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 == null || z.IsOnceQualified == true) && x.CreateDate > Const.DtmarkTime
where y.ProjectId == projectid && y.CheckAcceptType == "3" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
select x).Count();
return result;
}
@@ -818,7 +818,7 @@ namespace BLL
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 == null || z.IsOnceQualified == true) && x.CreateDate > Const.DtmarkTime
where y.ProjectId == projectid && y.CheckAcceptType == "4" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
select x).Count();
return result;
}
@@ -843,7 +843,7 @@ namespace BLL
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 == null || z.IsOnceQualified == true) && x.CreateDate > Const.DtmarkTime
where y.ProjectId == projectid && y.CheckAcceptType == "5" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
select x).Count();
return result;
}
@@ -868,7 +868,7 @@ namespace BLL
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 == null || z.IsOnceQualified == true) && x.CreateDate > Const.DtmarkTime
where y.ProjectId == projectid && y.CheckAcceptType == "6" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime
select x).Count();
return result;
}