This commit is contained in:
夏菊 2025-09-30 13:32:35 +08:00
parent 2cba5bad4b
commit cd7f83a45c
29 changed files with 354 additions and 353 deletions

View File

@ -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" ? true : false;
newInspectionManagement.IsOnceQualified = (inspectionManagement.IsOnceQualified == "true"|| inspectionManagement.IsOnceQualified == null) ? true : false;
if (!string.IsNullOrEmpty(inspectionManagement.InspectionDate))
newInspectionManagement.InspectionDate = DateTime.Parse(inspectionManagement.InspectionDate);
newInspectionManagement.AttachUrl = inspectionManagement.AttachUrl;

View File

@ -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 == true
where x.InspectionId == InspectionId && (y.IsOnceQualified == null || 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 == true
where x.InspectionId == InspectionId && (y.IsOnceQualified == null || y.IsOnceQualified == true)
select x).ToList();
}
}

View File

@ -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 == true ? "是" : "否"),
IsOnceQualified = ((x.IsOnceQualified == null || x.IsOnceQualified == true) ? "是" : "否"),
x.InspectionDate,
x.AttachUrl,
x.AttachUrl2,
@ -87,7 +87,7 @@ namespace BLL
if (!string.IsNullOrEmpty(controlPointType))
{
string[] types = controlPointType.Split(',');
q = q.Where(e=> types.Contains(e.ControlPointType));
q = q.Where(e => types.Contains(e.ControlPointType));
}
if (UnitWorkId != "0")
{
@ -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 == true ? "是" : "否"),
IsOnceQualified = ((x.IsOnceQualified == null || x.IsOnceQualified == true) ? "是" : "否"),
x.InspectionDate,
x.AttachUrl,
x.AttachUrl2,
@ -155,8 +155,8 @@ namespace BLL
/// <param name="startRowIndex"></param>
/// <param name="maximumRows"></param>
/// <returns></returns>
public static int GetListCount(string projectId, string name, string startDate, string endDate)
{
public static int GetListCount(string projectId, string name, string startDate, string endDate)
{
return count;
}
public static DataSet GetListData(string projectId, string name, string startDate, string endDate, int startRowIndex, int maximumRows)
@ -196,13 +196,13 @@ namespace BLL
dataTable.Columns.Add(row.ToString());
}
data.Tables.Add(dataTable);
for (int i = startRowIndex; i <= (startRowIndex + maximumRows)&&i<dataSet.Tables[0].Rows.Count; i++)
for (int i = startRowIndex; i <= (startRowIndex + maximumRows) && i < dataSet.Tables[0].Rows.Count; i++)
{
var row = dataTable.NewRow();
row["AcceptanceCheckMan"] = dataSet.Tables[0].Rows[i]["AcceptanceCheckMan"];
row["SunNumber"] = dataSet.Tables[0].Rows[i]["SunNumber"];
row["OneStatisticsSunNumber"] = dataSet.Tables[0].Rows[i]["OneStatisticsSunNumber"];
row["OneStatistics"] = dataSet.Tables[0].Rows[i]["OneStatistics"].ToString() +"%";
row["OneStatistics"] = dataSet.Tables[0].Rows[i]["OneStatistics"].ToString() + "%";
dataTable.Rows.Add(row);
}
return data;
@ -322,7 +322,7 @@ namespace BLL
}
if (isOnceQualified == true)
{
InspectionMangementList = (from x in InspectionMangementList where x.IsOnceQualified == isOnceQualified select x).ToList();
InspectionMangementList = (from x in InspectionMangementList where x.IsOnceQualified == null || x.IsOnceQualified == true select x).ToList();
}
if (startDate != null && SoptDate != null)
{
@ -341,11 +341,11 @@ namespace BLL
}
if (!string.IsNullOrEmpty(cNProfessionalId) && cNProfessionalId != "0")
{
InspectionMangementList = (from x in InspectionMangementList where x.CNProfessionalId==cNProfessionalId select x).ToList();
InspectionMangementList = (from x in InspectionMangementList where x.CNProfessionalId == cNProfessionalId select x).ToList();
}
if (isOnceQualified == true)
{
InspectionMangementList = (from x in InspectionMangementList where x.IsOnceQualified == isOnceQualified select x).ToList();
InspectionMangementList = (from x in InspectionMangementList where x.IsOnceQualified == null || x.IsOnceQualified == true select x).ToList();
}
if (startDate != null && SoptDate != null)
{
@ -363,7 +363,7 @@ namespace BLL
}
if (isOnceQualified == true)
{
InspectionMangementList = (from x in InspectionMangementList where x.IsOnceQualified == isOnceQualified select x).ToList();
InspectionMangementList = (from x in InspectionMangementList where x.IsOnceQualified == null || x.IsOnceQualified == true select x).ToList();
}
if (startDate != null && SoptDate != null)
{
@ -386,7 +386,8 @@ namespace BLL
/// <summary>
/// 根据id修改验收日期和是否一次合格
/// </summary>
public static void UpdateByInspectionManagementId(Model.ProcessControl_InspectionManagement inspectionManagement) {
public static void UpdateByInspectionManagementId(Model.ProcessControl_InspectionManagement inspectionManagement)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
Model.ProcessControl_InspectionManagement newInspectionManagement = db.ProcessControl_InspectionManagement.FirstOrDefault(e => e.InspectionId == inspectionManagement.InspectionId);
@ -406,7 +407,7 @@ 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 = (from x in InspectionMangementList where x.IsOnceQualified == isOnceQualified select x).ToList();
InspectionMangementList = (from x in InspectionMangementList where x.IsOnceQualified == null || x.IsOnceQualified == true select x).ToList();
}
if (startDate != null && SoptDate != null)
{
@ -429,7 +430,7 @@ namespace BLL
}
if (isOnceQualified == true)
{
InspectionMangementList = (from x in InspectionMangementList where x.IsOnceQualified == isOnceQualified select x).ToList();
InspectionMangementList = (from x in InspectionMangementList where x.IsOnceQualified == null || x.IsOnceQualified == true select x).ToList();
}
if (startDate != null && SoptDate != null)
{
@ -448,7 +449,7 @@ namespace BLL
}
if (isOnceQualified == true)
{
InspectionMangementList = (from x in InspectionMangementList where x.IsOnceQualified == isOnceQualified select x).ToList();
InspectionMangementList = (from x in InspectionMangementList where x.IsOnceQualified == null || x.IsOnceQualified == true select x).ToList();
}
if (startDate != null && SoptDate != null)
{
@ -473,7 +474,7 @@ namespace BLL
}
if (isOnceQualified == true)
{
InspectionMangementList = (from x in InspectionMangementList where x.IsOnceQualified == isOnceQualified select x).ToList();
InspectionMangementList = (from x in InspectionMangementList where x.IsOnceQualified == null || x.IsOnceQualified == true select x).ToList();
}
if (startDate != null && SoptDate != null)
{

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 == true && x.CreateDate > Const.DtmarkTime
where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "1" && (z.IsOnceQualified == null || 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 == true && x.CreateDate > Const.DtmarkTime
where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "2" && (z.IsOnceQualified == null || 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 == true && x.CreateDate > Const.DtmarkTime
where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "3" && (z.IsOnceQualified == null || 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 == true && x.CreateDate > Const.DtmarkTime
where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "4" && (z.IsOnceQualified == null || 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 == true && x.CreateDate > Const.DtmarkTime
where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "5" && (z.IsOnceQualified == null || 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 == true && x.CreateDate > Const.DtmarkTime
where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "5" && (z.IsOnceQualified == null || 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 == true && x.CreateDate > Const.DtmarkTime
where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "6" && (z.IsOnceQualified == null || z.IsOnceQualified == true) && x.CreateDate > Const.DtmarkTime
select new Model.InspectionManagementOutput()
{
ProjectId = y.ProjectId,

View File

@ -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 == true && x.CreateDate > Const.DtmarkTime
where y.ProjectId == projectid && y.CheckAcceptType == "1" && (z.IsOnceQualified == null || 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 == true && x.CreateDate > Const.DtmarkTime
where y.ProjectId == projectid && y.CheckAcceptType == "2" && (z.IsOnceQualified == null || 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 == true && x.CreateDate > Const.DtmarkTime
where y.ProjectId == projectid && y.CheckAcceptType == "3" && (z.IsOnceQualified == null || 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 == true && x.CreateDate > Const.DtmarkTime
where y.ProjectId == projectid && y.CheckAcceptType == "4" && (z.IsOnceQualified == null || 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 == true && x.CreateDate > Const.DtmarkTime
where y.ProjectId == projectid && y.CheckAcceptType == "5" && (z.IsOnceQualified == null || 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 == true && x.CreateDate > Const.DtmarkTime
where y.ProjectId == projectid && y.CheckAcceptType == "6" && (z.IsOnceQualified == null || z.IsOnceQualified == true) && x.CreateDate > Const.DtmarkTime
select x).Count();
return result;
}

View File

@ -3179,7 +3179,7 @@ namespace FineUIPro.Web.CQMS.DataBase
Ins.UnitWorkId,
Ins.ControlPointType,
Ins.AcceptanceSite,
(CASE WHEN Ins.IsOnceQualified=1 THEN '是' ELSE '否' END) AS IsOnceQualified,
(CASE WHEN Ins.IsOnceQualified=0 THEN '否' ELSE '是' END) AS IsOnceQualified,
Ins.InspectionDate,
Ins.AttachUrl,
Ins.CheckDate,

View File

@ -48,7 +48,7 @@ namespace FineUIPro.Web.CQMS.Foreign
checks.Branch,
breakdown.BreakdownName as ControlPointType,
checks.AcceptanceSite,
(CASE WHEN checks.IsOnceQualified='True' THEN '是' ELSE '否' END) AS IsOnceQualified,
(CASE WHEN checks.IsOnceQualified='Flase' THEN '否' ELSE '是' END) AS IsOnceQualified,
checks.InspectionDate,
checks.AttachUrl,
checks.CheckDate,

View File

@ -101,8 +101,8 @@ namespace FineUIPro.Web.CQMS.ManageReport
workNames.Add(divisionProject.DivisionName);
checkStatisc.CheckNum = managementList.Count(x => x.ControlPointType == item.ControlPointType);
checkStatisc.TotalCheckNum = totalManagementList.Count(x => x.ControlPointType == item.ControlPointType);
checkStatisc.OKNum = managementList.Count(x => x.ControlPointType == item.ControlPointType && x.IsOnceQualified == true);
checkStatisc.TotalOKNum = totalManagementList.Count(x => x.ControlPointType == item.ControlPointType && x.IsOnceQualified == true);
checkStatisc.OKNum = managementList.Count(x => x.ControlPointType == item.ControlPointType && (x.IsOnceQualified == null|| x.IsOnceQualified == true));
checkStatisc.TotalOKNum = totalManagementList.Count(x => x.ControlPointType == item.ControlPointType && (x.IsOnceQualified == null || x.IsOnceQualified == true));
StatisticsList.Add(checkStatisc);
}
else //更新已有记录
@ -110,8 +110,8 @@ namespace FineUIPro.Web.CQMS.ManageReport
Model.CheckStatisc checkStatisc1 = StatisticsList.FirstOrDefault(x => x.WorkName == divisionProject.DivisionName);
checkStatisc1.CheckNum += managementList.Count(x => x.ControlPointType == item.ControlPointType);
checkStatisc1.TotalCheckNum += totalManagementList.Count(x => x.ControlPointType == item.ControlPointType);
checkStatisc1.OKNum += managementList.Count(x => x.ControlPointType == item.ControlPointType && x.IsOnceQualified == true);
checkStatisc1.TotalOKNum += totalManagementList.Count(x => x.ControlPointType == item.ControlPointType && x.IsOnceQualified == true);
checkStatisc1.OKNum += managementList.Count(x => x.ControlPointType == item.ControlPointType && (x.IsOnceQualified == null || x.IsOnceQualified == true));
checkStatisc1.TotalOKNum += totalManagementList.Count(x => x.ControlPointType == item.ControlPointType && (x.IsOnceQualified == null || x.IsOnceQualified == true));
}
}
}
@ -151,8 +151,8 @@ namespace FineUIPro.Web.CQMS.ManageReport
checkStatisc.WorkName = item.ProfessionalName;
checkStatisc.CheckNum = managementList.Count();
checkStatisc.TotalCheckNum = totalManagementList.Count();
checkStatisc.OKNum = managementList.Count(x => x.IsOnceQualified == true);
checkStatisc.TotalOKNum = totalManagementList.Count(x => x.IsOnceQualified == true);
checkStatisc.OKNum = managementList.Count(x => x.IsOnceQualified == null|| x.IsOnceQualified == true);
checkStatisc.TotalOKNum = totalManagementList.Count(x => x.IsOnceQualified == null || x.IsOnceQualified == true);
StatisticsList.Add(checkStatisc);
i++;
}
@ -251,7 +251,7 @@ namespace FineUIPro.Web.CQMS.ManageReport
checkStatisc.CheckNum = managementList.Count(x => x.ControlPointType == item.ControlPointType);
checkStatisc.TotalCheckNum = totalManagementList.Count(x => x.ControlPointType == item.ControlPointType);
checkStatisc.OKNum = managementList.Count(x => x.ControlPointType == item.ControlPointType && x.IsOnceQualified == true);
checkStatisc.TotalOKNum = totalManagementList.Count(x => x.ControlPointType == item.ControlPointType && x.IsOnceQualified == true);
checkStatisc.TotalOKNum = totalManagementList.Count(x => x.ControlPointType == item.ControlPointType && (x.IsOnceQualified == null || x.IsOnceQualified == true));
StatisticsList.Add(checkStatisc);
}
else //更新已有记录
@ -259,8 +259,8 @@ namespace FineUIPro.Web.CQMS.ManageReport
Model.CheckStatisc checkStatisc1 = StatisticsList.FirstOrDefault(x => x.WorkName == divisionProject.DivisionName);
checkStatisc1.CheckNum += managementList.Count(x => x.ControlPointType == item.ControlPointType);
checkStatisc1.TotalCheckNum += totalManagementList.Count(x => x.ControlPointType == item.ControlPointType);
checkStatisc1.OKNum += managementList.Count(x => x.ControlPointType == item.ControlPointType && x.IsOnceQualified == true);
checkStatisc1.TotalOKNum += totalManagementList.Count(x => x.ControlPointType == item.ControlPointType && x.IsOnceQualified == true);
checkStatisc1.OKNum += managementList.Count(x => x.ControlPointType == item.ControlPointType && (x.IsOnceQualified == null || x.IsOnceQualified == true));
checkStatisc1.TotalOKNum += totalManagementList.Count(x => x.ControlPointType == item.ControlPointType && (x.IsOnceQualified == null || x.IsOnceQualified == true));
}
}
}

View File

@ -535,8 +535,8 @@ namespace FineUIPro.Web.CQMS.ManageReport
checkStatisc.WorkName = ins.UnitWorkName;
checkStatisc.CheckNum = managementList.Count(x => x.UnitWorkId == item);
checkStatisc.TotalCheckNum = totalManagementList.Count(x => x.UnitWorkId == item);
checkStatisc.OKNum = managementList.Count(x => x.UnitWorkId == item && x.IsOnceQualified == true);
checkStatisc.TotalOKNum = totalManagementList.Count(x => x.UnitWorkId == item && x.IsOnceQualified == true);
checkStatisc.OKNum = managementList.Count(x => x.UnitWorkId == item && (x.IsOnceQualified == null || x.IsOnceQualified == true));
checkStatisc.TotalOKNum = totalManagementList.Count(x => x.UnitWorkId == item && (x.IsOnceQualified == null || x.IsOnceQualified == true));
StatisticsList.Add(checkStatisc);
}

View File

@ -250,8 +250,8 @@ namespace FineUIPro.Web.CQMS.ManageReport
workNames.Add(ins.UnitWorkName);
checkStatisc.CheckNum = managementList.Count(x => x.ControlPointType == item.ControlPointType);
checkStatisc.TotalCheckNum = totalManagementList.Count(x => x.ControlPointType == item.ControlPointType);
checkStatisc.OKNum = managementList.Count(x => x.ControlPointType == item.ControlPointType && x.IsOnceQualified == true);
checkStatisc.TotalOKNum = totalManagementList.Count(x => x.ControlPointType == item.ControlPointType && x.IsOnceQualified == true);
checkStatisc.OKNum = managementList.Count(x => x.ControlPointType == item.ControlPointType && (x.IsOnceQualified == null || x.IsOnceQualified == true));
checkStatisc.TotalOKNum = totalManagementList.Count(x => x.ControlPointType == item.ControlPointType && (x.IsOnceQualified == null || x.IsOnceQualified == true));
StatisticsList.Add(checkStatisc);
i++;
}
@ -260,8 +260,8 @@ namespace FineUIPro.Web.CQMS.ManageReport
Model.CheckStatisc checkStatisc1 = StatisticsList.FirstOrDefault(x => x.WorkName == ins.UnitWorkName);
checkStatisc1.CheckNum += managementList.Count(x => x.ControlPointType == item.ControlPointType);
checkStatisc1.TotalCheckNum += totalManagementList.Count(x => x.ControlPointType == item.ControlPointType);
checkStatisc1.OKNum += managementList.Count(x => x.ControlPointType == item.ControlPointType && x.IsOnceQualified == true);
checkStatisc1.TotalOKNum += totalManagementList.Count(x => x.ControlPointType == item.ControlPointType && x.IsOnceQualified == true);
checkStatisc1.OKNum += managementList.Count(x => x.ControlPointType == item.ControlPointType && (x.IsOnceQualified == null || x.IsOnceQualified == true));
checkStatisc1.TotalOKNum += totalManagementList.Count(x => x.ControlPointType == item.ControlPointType && (x.IsOnceQualified == null || x.IsOnceQualified == true));
}
}
}
@ -286,8 +286,8 @@ namespace FineUIPro.Web.CQMS.ManageReport
workNames.Add(divisionProject.DivisionName);
checkStatisc.CheckNum = managementList.Count(x => x.ControlPointType == item.ControlPointType);
checkStatisc.TotalCheckNum = totalManagementList.Count(x => x.ControlPointType == item.ControlPointType);
checkStatisc.OKNum = managementList.Count(x => x.ControlPointType == item.ControlPointType && x.IsOnceQualified == true);
checkStatisc.TotalOKNum = totalManagementList.Count(x => x.ControlPointType == item.ControlPointType && x.IsOnceQualified == true);
checkStatisc.OKNum = managementList.Count(x => x.ControlPointType == item.ControlPointType && (x.IsOnceQualified == null || x.IsOnceQualified == true));
checkStatisc.TotalOKNum = totalManagementList.Count(x => x.ControlPointType == item.ControlPointType && (x.IsOnceQualified == null || x.IsOnceQualified == true));
StatisticsList.Add(checkStatisc);
i++;
}
@ -296,8 +296,8 @@ namespace FineUIPro.Web.CQMS.ManageReport
Model.CheckStatisc checkStatisc1 = StatisticsList.FirstOrDefault(x => x.WorkName == divisionProject.DivisionName);
checkStatisc1.CheckNum += managementList.Count(x => x.ControlPointType == item.ControlPointType);
checkStatisc1.TotalCheckNum += totalManagementList.Count(x => x.ControlPointType == item.ControlPointType);
checkStatisc1.OKNum += managementList.Count(x => x.ControlPointType == item.ControlPointType && x.IsOnceQualified == true);
checkStatisc1.TotalOKNum += totalManagementList.Count(x => x.ControlPointType == item.ControlPointType && x.IsOnceQualified == true);
checkStatisc1.OKNum += managementList.Count(x => x.ControlPointType == item.ControlPointType && (x.IsOnceQualified == null || x.IsOnceQualified == true));
checkStatisc1.TotalOKNum += totalManagementList.Count(x => x.ControlPointType == item.ControlPointType && (x.IsOnceQualified == null || x.IsOnceQualified == true));
}
}
}
@ -1519,8 +1519,8 @@ namespace FineUIPro.Web.CQMS.ManageReport
workNames.Add(ins.UnitWorkName);
checkStatisc.CheckNum = managementList.Count(x => x.ControlPointType == item.ControlPointType);
checkStatisc.TotalCheckNum = totalManagementList.Count(x => x.ControlPointType == item.ControlPointType);
checkStatisc.OKNum = managementList.Count(x => x.ControlPointType == item.ControlPointType && x.IsOnceQualified == true);
checkStatisc.TotalOKNum = totalManagementList.Count(x => x.ControlPointType == item.ControlPointType && x.IsOnceQualified == true);
checkStatisc.OKNum = managementList.Count(x => x.ControlPointType == item.ControlPointType && (x.IsOnceQualified == null || x.IsOnceQualified == true));
checkStatisc.TotalOKNum = totalManagementList.Count(x => x.ControlPointType == item.ControlPointType && (x.IsOnceQualified == null || x.IsOnceQualified == true));
StatisticsList.Add(checkStatisc);
i++;
}
@ -1529,8 +1529,8 @@ namespace FineUIPro.Web.CQMS.ManageReport
Model.CheckStatisc checkStatisc1 = StatisticsList.FirstOrDefault(x => x.WorkName == ins.UnitWorkName);
checkStatisc1.CheckNum += managementList.Count(x => x.ControlPointType == item.ControlPointType);
checkStatisc1.TotalCheckNum += totalManagementList.Count(x => x.ControlPointType == item.ControlPointType);
checkStatisc1.OKNum += managementList.Count(x => x.ControlPointType == item.ControlPointType && x.IsOnceQualified == true);
checkStatisc1.TotalOKNum += totalManagementList.Count(x => x.ControlPointType == item.ControlPointType && x.IsOnceQualified == true);
checkStatisc1.OKNum += managementList.Count(x => x.ControlPointType == item.ControlPointType && (x.IsOnceQualified == null || x.IsOnceQualified == true));
checkStatisc1.TotalOKNum += totalManagementList.Count(x => x.ControlPointType == item.ControlPointType && (x.IsOnceQualified == null || x.IsOnceQualified == true));
}
}
}
@ -1555,8 +1555,8 @@ namespace FineUIPro.Web.CQMS.ManageReport
workNames.Add(divisionProject.DivisionName);
checkStatisc.CheckNum = managementList.Count(x => x.ControlPointType == item.ControlPointType);
checkStatisc.TotalCheckNum = totalManagementList.Count(x => x.ControlPointType == item.ControlPointType);
checkStatisc.OKNum = managementList.Count(x => x.ControlPointType == item.ControlPointType && x.IsOnceQualified == true);
checkStatisc.TotalOKNum = totalManagementList.Count(x => x.ControlPointType == item.ControlPointType && x.IsOnceQualified == true);
checkStatisc.OKNum = managementList.Count(x => x.ControlPointType == item.ControlPointType && (x.IsOnceQualified == null || x.IsOnceQualified == true));
checkStatisc.TotalOKNum = totalManagementList.Count(x => x.ControlPointType == item.ControlPointType && (x.IsOnceQualified == null || x.IsOnceQualified == true));
StatisticsList.Add(checkStatisc);
i++;
}
@ -1565,8 +1565,8 @@ namespace FineUIPro.Web.CQMS.ManageReport
Model.CheckStatisc checkStatisc1 = StatisticsList.FirstOrDefault(x => x.WorkName == divisionProject.DivisionName);
checkStatisc1.CheckNum += managementList.Count(x => x.ControlPointType == item.ControlPointType);
checkStatisc1.TotalCheckNum += totalManagementList.Count(x => x.ControlPointType == item.ControlPointType);
checkStatisc1.OKNum += managementList.Count(x => x.ControlPointType == item.ControlPointType && x.IsOnceQualified == true);
checkStatisc1.TotalOKNum += totalManagementList.Count(x => x.ControlPointType == item.ControlPointType && x.IsOnceQualified == true);
checkStatisc1.OKNum += managementList.Count(x => x.ControlPointType == item.ControlPointType && (x.IsOnceQualified == null || x.IsOnceQualified == true));
checkStatisc1.TotalOKNum += totalManagementList.Count(x => x.ControlPointType == item.ControlPointType && (x.IsOnceQualified == null || x.IsOnceQualified == true));
}
}
}

View File

@ -530,8 +530,8 @@ namespace FineUIPro.Web.CQMS.ManageReport
checkStatisc.WorkName = ins.UnitWorkName;
checkStatisc.CheckNum = managementList.Count(x => x.UnitWorkId == item);
checkStatisc.TotalCheckNum = totalManagementList.Count(x => x.UnitWorkId == item);
checkStatisc.OKNum = managementList.Count(x => x.UnitWorkId == item && x.IsOnceQualified == true);
checkStatisc.TotalOKNum = totalManagementList.Count(x => x.UnitWorkId == item && x.IsOnceQualified == true);
checkStatisc.OKNum = managementList.Count(x => x.UnitWorkId == item && (x.IsOnceQualified == null || x.IsOnceQualified == true));
checkStatisc.TotalOKNum = totalManagementList.Count(x => x.UnitWorkId == item && (x.IsOnceQualified == null || x.IsOnceQualified == true));
StatisticsList.Add(checkStatisc);
}

View File

@ -252,8 +252,8 @@ namespace FineUIPro.Web.CQMS.ManageReport
workNames.Add(ins.UnitWorkName);
checkStatisc.CheckNum = managementList.Count(x => x.ControlPointType == item.ControlPointType);
checkStatisc.TotalCheckNum = totalManagementList.Count(x => x.ControlPointType == item.ControlPointType);
checkStatisc.OKNum = managementList.Count(x => x.ControlPointType == item.ControlPointType && x.IsOnceQualified == true);
checkStatisc.TotalOKNum = totalManagementList.Count(x => x.ControlPointType == item.ControlPointType && x.IsOnceQualified == true);
checkStatisc.OKNum = managementList.Count(x => x.ControlPointType == item.ControlPointType && (x.IsOnceQualified == null || x.IsOnceQualified == true));
checkStatisc.TotalOKNum = totalManagementList.Count(x => x.ControlPointType == item.ControlPointType && (x.IsOnceQualified == null || x.IsOnceQualified == true));
StatisticsList.Add(checkStatisc);
i++;
}
@ -262,8 +262,8 @@ namespace FineUIPro.Web.CQMS.ManageReport
Model.CheckStatisc checkStatisc1 = StatisticsList.FirstOrDefault(x => x.WorkName == ins.UnitWorkName);
checkStatisc1.CheckNum += managementList.Count(x => x.ControlPointType == item.ControlPointType);
checkStatisc1.TotalCheckNum += totalManagementList.Count(x => x.ControlPointType == item.ControlPointType);
checkStatisc1.OKNum += managementList.Count(x => x.ControlPointType == item.ControlPointType && x.IsOnceQualified == true);
checkStatisc1.TotalOKNum += totalManagementList.Count(x => x.ControlPointType == item.ControlPointType && x.IsOnceQualified == true);
checkStatisc1.OKNum += managementList.Count(x => x.ControlPointType == item.ControlPointType && (x.IsOnceQualified == null || x.IsOnceQualified == true));
checkStatisc1.TotalOKNum += totalManagementList.Count(x => x.ControlPointType == item.ControlPointType && (x.IsOnceQualified == null || x.IsOnceQualified == true));
}
}
}
@ -288,8 +288,8 @@ namespace FineUIPro.Web.CQMS.ManageReport
workNames.Add(divisionProject.DivisionName);
checkStatisc.CheckNum = managementList.Count(x => x.ControlPointType == item.ControlPointType);
checkStatisc.TotalCheckNum = totalManagementList.Count(x => x.ControlPointType == item.ControlPointType);
checkStatisc.OKNum = managementList.Count(x => x.ControlPointType == item.ControlPointType && x.IsOnceQualified == true);
checkStatisc.TotalOKNum = totalManagementList.Count(x => x.ControlPointType == item.ControlPointType && x.IsOnceQualified == true);
checkStatisc.OKNum = managementList.Count(x => x.ControlPointType == item.ControlPointType && (x.IsOnceQualified == null || x.IsOnceQualified == true));
checkStatisc.TotalOKNum = totalManagementList.Count(x => x.ControlPointType == item.ControlPointType && (x.IsOnceQualified == null || x.IsOnceQualified == true));
StatisticsList.Add(checkStatisc);
i++;
}
@ -298,8 +298,8 @@ namespace FineUIPro.Web.CQMS.ManageReport
Model.CheckStatisc checkStatisc1 = StatisticsList.FirstOrDefault(x => x.WorkName == divisionProject.DivisionName);
checkStatisc1.CheckNum += managementList.Count(x => x.ControlPointType == item.ControlPointType);
checkStatisc1.TotalCheckNum += totalManagementList.Count(x => x.ControlPointType == item.ControlPointType);
checkStatisc1.OKNum += managementList.Count(x => x.ControlPointType == item.ControlPointType && x.IsOnceQualified == true);
checkStatisc1.TotalOKNum += totalManagementList.Count(x => x.ControlPointType == item.ControlPointType && x.IsOnceQualified == true);
checkStatisc1.OKNum += managementList.Count(x => x.ControlPointType == item.ControlPointType && (x.IsOnceQualified == null || x.IsOnceQualified == true));
checkStatisc1.TotalOKNum += totalManagementList.Count(x => x.ControlPointType == item.ControlPointType && (x.IsOnceQualified == null || x.IsOnceQualified == true));
}
}
}
@ -1523,8 +1523,8 @@ namespace FineUIPro.Web.CQMS.ManageReport
workNames.Add(ins.UnitWorkName);
checkStatisc.CheckNum = managementList.Count(x => x.ControlPointType == item.ControlPointType);
checkStatisc.TotalCheckNum = totalManagementList.Count(x => x.ControlPointType == item.ControlPointType);
checkStatisc.OKNum = managementList.Count(x => x.ControlPointType == item.ControlPointType && x.IsOnceQualified == true);
checkStatisc.TotalOKNum = totalManagementList.Count(x => x.ControlPointType == item.ControlPointType && x.IsOnceQualified == true);
checkStatisc.OKNum = managementList.Count(x => x.ControlPointType == item.ControlPointType && (x.IsOnceQualified == null || x.IsOnceQualified == true));
checkStatisc.TotalOKNum = totalManagementList.Count(x => x.ControlPointType == item.ControlPointType && (x.IsOnceQualified == null || x.IsOnceQualified == true));
StatisticsList.Add(checkStatisc);
i++;
}
@ -1533,8 +1533,8 @@ namespace FineUIPro.Web.CQMS.ManageReport
Model.CheckStatisc checkStatisc1 = StatisticsList.FirstOrDefault(x => x.WorkName == ins.UnitWorkName);
checkStatisc1.CheckNum += managementList.Count(x => x.ControlPointType == item.ControlPointType);
checkStatisc1.TotalCheckNum += totalManagementList.Count(x => x.ControlPointType == item.ControlPointType);
checkStatisc1.OKNum += managementList.Count(x => x.ControlPointType == item.ControlPointType && x.IsOnceQualified == true);
checkStatisc1.TotalOKNum += totalManagementList.Count(x => x.ControlPointType == item.ControlPointType && x.IsOnceQualified == true);
checkStatisc1.OKNum += managementList.Count(x => x.ControlPointType == item.ControlPointType && (x.IsOnceQualified == null || x.IsOnceQualified == true));
checkStatisc1.TotalOKNum += totalManagementList.Count(x => x.ControlPointType == item.ControlPointType && (x.IsOnceQualified == null || x.IsOnceQualified == true));
}
}
}
@ -1559,8 +1559,8 @@ namespace FineUIPro.Web.CQMS.ManageReport
workNames.Add(divisionProject.DivisionName);
checkStatisc.CheckNum = managementList.Count(x => x.ControlPointType == item.ControlPointType);
checkStatisc.TotalCheckNum = totalManagementList.Count(x => x.ControlPointType == item.ControlPointType);
checkStatisc.OKNum = managementList.Count(x => x.ControlPointType == item.ControlPointType && x.IsOnceQualified == true);
checkStatisc.TotalOKNum = totalManagementList.Count(x => x.ControlPointType == item.ControlPointType && x.IsOnceQualified == true);
checkStatisc.OKNum = managementList.Count(x => x.ControlPointType == item.ControlPointType && (x.IsOnceQualified == null || x.IsOnceQualified == true));
checkStatisc.TotalOKNum = totalManagementList.Count(x => x.ControlPointType == item.ControlPointType && (x.IsOnceQualified == null || x.IsOnceQualified == true));
StatisticsList.Add(checkStatisc);
i++;
}
@ -1569,8 +1569,8 @@ namespace FineUIPro.Web.CQMS.ManageReport
Model.CheckStatisc checkStatisc1 = StatisticsList.FirstOrDefault(x => x.WorkName == divisionProject.DivisionName);
checkStatisc1.CheckNum += managementList.Count(x => x.ControlPointType == item.ControlPointType);
checkStatisc1.TotalCheckNum += totalManagementList.Count(x => x.ControlPointType == item.ControlPointType);
checkStatisc1.OKNum += managementList.Count(x => x.ControlPointType == item.ControlPointType && x.IsOnceQualified == true);
checkStatisc1.TotalOKNum += totalManagementList.Count(x => x.ControlPointType == item.ControlPointType && x.IsOnceQualified == true);
checkStatisc1.OKNum += managementList.Count(x => x.ControlPointType == item.ControlPointType && (x.IsOnceQualified == null || x.IsOnceQualified == true));
checkStatisc1.TotalOKNum += totalManagementList.Count(x => x.ControlPointType == item.ControlPointType && (x.IsOnceQualified == null || x.IsOnceQualified == true));
}
}
}

View File

@ -315,7 +315,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
#endregion
//加载所有grid
// lodAllGrid("1");
// lodAllGrid("1");
objType = "1";
RegisterAsyncTask(new PageAsyncTask(lodAllGrid));
}
@ -357,30 +357,30 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
var units21 = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1).ToList();
var units2 = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2 ).ToList();
var units2 = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2).ToList();
var remarks = loadRemarksDt();
var cqmsRemarks = cqmsRemarksDt();
var generalPlanApproval = loadGeneralPlanApprovalDt();
var generalPlanApproval = loadGeneralPlanApprovalDt();
var majorPlanApproval = loadMajorPlanApprovalDt();
var inspectionTestPlan = loadInspectionTestPlanDt();
var designDetailsApprove = loadDesignDetailsApproveDt();
var designDetailsApprove = loadDesignDetailsApproveDt();
var reviewDrawings = loadReviewDrawingsDt();
var designChangeOrder = loadDesignChangeOrderDt();
var passWelder = loadPassWelderDt();
var processControl_NondestructiveTest = loadProcessControl_NondestructiveTest_NewDt();
var inspectionEquipment = LoadInspectionEquipmentDt();
var measuringInspection = LoadMeasuringInspectionDt();
var measuringInspection = LoadMeasuringInspectionDt();
var checkLotBindStatisc = CheckLotBindStatiscDt();
var pressureInspection = LoadPressureInspectionDt();
var InspectionDataInspection = loadInspectionDataInspectionDt();
var pipingInspection = LoadPipingInspectionDt();
var specialInspection = LoadSpecialInspectionDt();
var ncrManagementInspection = LoadNcrManagementInspectionDt();
var qualityInspection = LoadQualityInspectionDt();
var InspectionDataInspection = loadInspectionDataInspectionDt();
var pipingInspection = LoadPipingInspectionDt();
var specialInspection = LoadSpecialInspectionDt();
var ncrManagementInspection = LoadNcrManagementInspectionDt();
var qualityInspection = LoadQualityInspectionDt();
var specialCheck = loadSpecialCheckDt();
var fileReport = loadFileReportDt();
await Task.WhenAll(new[] { remarks, cqmsRemarks, generalPlanApproval, majorPlanApproval, inspectionTestPlan, designDetailsApprove, reviewDrawings, designChangeOrder, passWelder, processControl_NondestructiveTest, inspectionEquipment, measuringInspection, checkLotBindStatisc, InspectionDataInspection, pressureInspection, pipingInspection, specialInspection, ncrManagementInspection , qualityInspection, specialCheck, fileReport });
var fileReport = loadFileReportDt();
await Task.WhenAll(new[] { remarks, cqmsRemarks, generalPlanApproval, majorPlanApproval, inspectionTestPlan, designDetailsApprove, reviewDrawings, designChangeOrder, passWelder, processControl_NondestructiveTest, inspectionEquipment, measuringInspection, checkLotBindStatisc, InspectionDataInspection, pressureInspection, pipingInspection, specialInspection, ncrManagementInspection, qualityInspection, specialCheck, fileReport });
var generalPlanApprovalData = await generalPlanApproval;
var remarksData = await remarks;
@ -435,12 +435,12 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
}
if (generalPlanApprovalData != null)
{
var list = new List<Model.Report_Construction_Plan>();
var list = new List<Model.Report_Construction_Plan>();
int Quantity1Sum = 0;
int Quantity2Sum = 0;
int Quantity2Sum = 0;
Dictionary<string, int> Quantity1Dic = new Dictionary<string, int>();
Dictionary<string, int> Quantity2Dic = new Dictionary<string, int>();
Dictionary<string, int> Quantity2Dic = new Dictionary<string, int>();
foreach (DataRow row in generalPlanApprovalData.Rows)
{
@ -458,7 +458,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
if (ApprovalDate.HasValue && ApprovalDate.Value >= startDate && ApprovalDate.Value <= endDate)
{
Quantity1Dic[UnitId] = Quantity1Dic[UnitId] + 1;
}
}
}
foreach (var item in units21)
@ -493,13 +493,13 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
if (majorPlanApprovalData != null)
{
var list = new List<Model.Report_Construction_Plan>();
var list = new List<Model.Report_Construction_Plan>();
int Quantity1Sum = 0;
int Quantity2Sum = 0;
int Quantity3Sum = 0;
Dictionary<string, int> Quantity1Dic = new Dictionary<string, int>();
Dictionary<string, int> Quantity2Dic = new Dictionary<string, int>();
Dictionary<string, int> Quantity3Dic = new Dictionary<string, int>();
Dictionary<string, int> Quantity3Dic = new Dictionary<string, int>();
foreach (DataRow row in majorPlanApprovalData.Rows)
{
string UnitId = row["UnitId"].ToString();
@ -561,7 +561,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
Quantity3Sum += model.Quantity3.Value;
}
Grid3.DataSource = list;
Grid3.DataBind();
Grid3.DataBind();
//合计
JObject summary = new JObject();
summary.Add("UnitOrMajor", "合计");
@ -573,7 +573,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
if (inspectionTestPlanData != null)
{
var list = new List<Model.Report_Construction_Plan>();
var list = new List<Model.Report_Construction_Plan>();
int Quantity1Sum = 0;
int Quantity2Sum = 0;
//加载所有专业
@ -589,7 +589,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
Quantity2Dic.Add(CNProfessionalId, 0);
}
Quantity2Dic[CNProfessionalId] = Quantity2Dic[CNProfessionalId] + 1;
if (!Quantity1Dic.ContainsKey(CNProfessionalId))
{
Quantity1Dic.Add(CNProfessionalId, 0);
@ -641,9 +641,9 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
if (designDetailsApproveData != null)
{
var list = new List<Model.Report_Construction_Plan>();
var list = new List<Model.Report_Construction_Plan>();
int Quantity1Sum = 0;
int Quantity2Sum = 0;
int Quantity2Sum = 0;
Dictionary<string, int> Quantity1Dic = new Dictionary<string, int>();
Dictionary<string, int> Quantity2Dic = new Dictionary<string, int>();
@ -689,9 +689,9 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
model.Remarks = remarksDic[item.ProfessionalName + "3"];
}
list.Add(model);
list.Add(model);
Quantity1Sum += model.Quantity1.Value;
Quantity2Sum += model.Quantity2.Value;
Quantity2Sum += model.Quantity2.Value;
}
Grid5.DataSource = list;
Grid5.DataBind();
@ -704,7 +704,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
}
if (reviewDrawingsData != null)
{
{
var list = new List<Model.Report_Construction_Plan>();
int Quantity1Sum = 0;
int Quantity2Sum = 0;
@ -767,7 +767,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
if (designChangeOrderData != null)
{
int Quantity1Sum = 0, Quantity2Sum = 0, Quantity3Sum = 0, Quantity4Sum = 0, Quantity5Sum = 0, Quantity6Sum = 0;
int Quantity1Sum = 0, Quantity2Sum = 0, Quantity3Sum = 0, Quantity4Sum = 0, Quantity5Sum = 0, Quantity6Sum = 0;
DateTime projectStartDate = Convert.ToDateTime("2015-01-01");
List<Model.CheckStatisc> StatisticsList = new List<Model.CheckStatisc>();
Model.Base_Project project = BLL.ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId);
@ -790,12 +790,12 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
string CNProfessionalId = row["CNProfessionalId"].ToString();
string ImplementationFrontState = row["ImplementationFrontState"].ToString();
DateTime? IssuedDate = Funs.GetNewDateTime(row["IssuedDate"].ToString());
string ApprovalDate = row["ApprovalDate"].ToString() ;
string ApprovalDate = row["ApprovalDate"].ToString();
if (!Quantity1Dic.ContainsKey(CNProfessionalId))
{
Quantity1Dic.Add(CNProfessionalId, 0);
}
}
if (!Quantity2Dic.ContainsKey(CNProfessionalId))
{
Quantity2Dic.Add(CNProfessionalId, 0);
@ -837,7 +837,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
Quantity3Dic[CNProfessionalId] = Quantity3Dic[CNProfessionalId] + 1;
}
if(ImplementationFrontState== "已完成")
if (ImplementationFrontState == "已完成")
{
Quantity5Dic[CNProfessionalId] = Quantity5Dic[CNProfessionalId] + 1;
}
@ -858,9 +858,9 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
Model.CheckStatisc checkStatisc = new Model.CheckStatisc();
checkStatisc.Num = i;
checkStatisc.WorkName = item.ProfessionalName;
checkStatisc.OneOKRate = "0";
checkStatisc.TotalOneOKRate ="0";
checkStatisc.TotalOneOKRate = "0";
if (Quantity1Dic.ContainsKey(item.CNProfessionalId))
{
checkStatisc.CheckNum = Quantity1Dic[item.CNProfessionalId];
@ -997,10 +997,10 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
}
}
foreach (var item in units2)
{
Model.PassWelderStatisc passWelderStatisc = new Model.PassWelderStatisc();
passWelderStatisc.Num = i;
passWelderStatisc.UnitName = item.UnitName;
@ -1226,7 +1226,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
if (inspectionEquipmentData != null)
{
var list = new List<Model.Report_Construction_Plan>();
int Quantity1Sum = 0;
int Quantity2Sum = 0;
@ -1300,12 +1300,12 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
Quantity2Sum += model.Quantity2.Value;
}
Grid11.DataSource = list;
Grid11.DataBind();
Grid11.DataBind();
//合计
JObject summary = new JObject();
summary.Add("UnitOrMajor", "合计");
summary.Add("Quantity1", Quantity1Sum.ToString());
summary.Add("Quantity2", Quantity2Sum.ToString());
summary.Add("Quantity2", Quantity2Sum.ToString());
Grid11.SummaryData = summary;
}
@ -1495,7 +1495,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
}
foreach (Model.CheckStatisc cs in StatisticsListCV)
{
{
if (cs.CheckNum != 0)//被除数不能为零
{
cs.OneOKRate = Math.Round((double)cs.OKNum / (double)cs.CheckNum * 100, 2) + "%";//保留两位小数、后四舍五入
@ -1583,7 +1583,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
}
if (TotalCheckNumEQ != 0)//被除数不能为零
{
TotalOneOKRateEQ = Math.Round((double)TotalOKNumEQ / (double)TotalCheckNumEQ * 100, 2) + "%";//保留两位小数、后四舍五入
TotalOneOKRateEQ = Math.Round((double)TotalOKNumEQ / (double)TotalCheckNumEQ * 100, 2) + "%";//保留两位小数、后四舍五入
}
else
{
@ -1905,7 +1905,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
if (InspectionDataInspectionData != null)
{
var list = new List<Model.CheckStatisc>();
int CheckNum = 0;//本月检查点数
int TotalCheckNum = 0;//累计检查点数
@ -1957,10 +1957,10 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
}
foreach (var item in units21)
{
Model.CheckStatisc checkStatisc = new Model.CheckStatisc();
checkStatisc.Id = Guid.NewGuid().ToString();
@ -2005,7 +2005,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
OKNum += checkStatisc.OKNum;
TotalOKNum += checkStatisc.TotalOKNum;
}
gvInspectionDataInspection.DataSource = list;
@ -2044,21 +2044,21 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
if (pressureInspectionData != null)
{
var list = new List<Model.Report_CQMS_MonthReportItem>();
int Quantity0Sum = 0;
int Quantity1Sum = 0;
int Quantity2Sum = 0;
Dictionary<string, int> Quantity1Dic = new Dictionary<string, int>();
Dictionary<string, int> Quantity2Dic = new Dictionary<string, int>();
Dictionary<string, int> Quantity3Dic = new Dictionary<string, int>();
Dictionary<string, int> Quantity3Dic = new Dictionary<string, int>();
foreach (DataRow row in pressureInspectionData.Rows)
{
string UnitId = row["UnitId"].ToString();
int ActualNumber = Funs.GetNewIntOrZero(row["ActualNumber"].ToString());
int PressurePipeNumber = Funs.GetNewIntOrZero( row["PressurePipeNumber"].ToString());
int PressurePipeNumber = Funs.GetNewIntOrZero(row["PressurePipeNumber"].ToString());
DateTime? ReportTime = Funs.GetNewDateTime(row["ReportTime"].ToString());
if (!Quantity1Dic.ContainsKey(UnitId))
{
@ -2080,10 +2080,10 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
}
Quantity2Dic[UnitId] = Quantity2Dic[UnitId] + PressurePipeNumber;
}
}
foreach (var item in units21)
{
{
Model.Report_CQMS_MonthReportItem model = new Model.Report_CQMS_MonthReportItem();
model.Id = Guid.NewGuid().ToString();
model.ContentName = item.UnitName;
@ -2106,7 +2106,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
Quantity0Sum += model.TotalNoBackCount.Value;
Quantity1Sum += model.MonthsCount.Value;
Quantity2Sum += model.ProjectCount.Value;
}
gvPressureInspection.DataSource = list;
gvPressureInspection.DataBind();
@ -2123,10 +2123,10 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
if (pipingInspectionData != null)
{
var list = new List<Model.Report_CQMS_MonthReportItem>();
var list = new List<Model.Report_CQMS_MonthReportItem>();
int Quantity0Sum = 0;
int Quantity1Sum = 0;
int Quantity2Sum = 0;
int Quantity2Sum = 0;
Dictionary<string, int> Quantity1Dic = new Dictionary<string, int>();
Dictionary<string, int> Quantity2Dic = new Dictionary<string, int>();
Dictionary<string, int> Quantity3Dic = new Dictionary<string, int>();
@ -2160,7 +2160,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
}
foreach (var item in units21)
{
Model.Report_CQMS_MonthReportItem model = new Model.Report_CQMS_MonthReportItem();
model.Id = Guid.NewGuid().ToString();
@ -2280,7 +2280,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
if (ncrManagementInspectionData != null)
{
List<Model.NCRReportStatisc> StatisticsList = new List<Model.NCRReportStatisc>();
int CurrentPeriodOkNumSum = 0;
int OKNumSum = 0;
@ -2329,11 +2329,11 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
Quantity2Dic[UnitId] = Quantity2Dic[UnitId] + 1;
}
Quantity3Dic[UnitId] = Quantity3Dic[UnitId] + 1;
Quantity3Dic[UnitId] = Quantity3Dic[UnitId] + 1;
}
}
}
foreach (var item in units)
{
{
Model.NCRReportStatisc NCRStatisc = new Model.NCRReportStatisc();
NCRStatisc.Id = Guid.NewGuid().ToString();
NCRStatisc.WorkName = item.UnitName;
@ -2357,7 +2357,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
CurrentPeriodOkNumSum += NCRStatisc.CurrentPeriodOkNum;
OKNumSum += NCRStatisc.OKNum;
CheckNumSum += NCRStatisc.CheckNum;
}
if (CheckNumSum != 0)//被除数不能为零
@ -2431,7 +2431,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
foreach (var item in units21)
{
var ClosedCount = 0;
var ClosedCount = 0;
Model.Report_CQMS_MonthReportItem model = new Model.Report_CQMS_MonthReportItem();
model.Id = Guid.NewGuid().ToString();
model.ContentName = item.UnitName;
@ -2444,7 +2444,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
model.ProjectCount = Quantity2Dic[item.UnitId];
if (model.ProjectCount.Value > 0)
{
model.RectificationRate = (100.0 * (ClosedCount/ model.ProjectCount.Value)).ToString("#0.00") + "%";
model.RectificationRate = (100.0 * (ClosedCount / model.ProjectCount.Value)).ToString("#0.00") + "%";
}
else
{
@ -2493,7 +2493,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
if (specialCheckData != null)
{
var list = new List<Model.Report_CQMS_MonthReportItem>();
int Quantity1Sum = 0;
int Quantity2Sum = 0;
@ -2503,7 +2503,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
string CheckType = row["CheckType"].ToString();
DateTime? CheckDate = Funs.GetNewDateTime(row["CheckDate"].ToString());
if (!Quantity1Dic.ContainsKey(CheckType))
{
Quantity1Dic.Add(CheckType, 0);
@ -2512,21 +2512,21 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
Quantity2Dic.Add(CheckType, 0);
}
if (CheckDate.HasValue && CheckDate.Value >= startDate && CheckDate.Value <= endDate)
{
Quantity1Dic[CheckType] = Quantity1Dic[CheckType] + 1;
}
Quantity2Dic[CheckType] = Quantity2Dic[CheckType] + 1;
}
//加载检查类别
var lists = BLL.JointCheckService.GetCheckTypeList();
foreach (var item in lists)
{
{
Model.Report_CQMS_MonthReportItem model = new Model.Report_CQMS_MonthReportItem();
model.Id = Guid.NewGuid().ToString();
model.ContentName = item.Value;
@ -2648,7 +2648,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
Model.Report_CQMS_MonthReportItem model = new Model.Report_CQMS_MonthReportItem();
model.Id = Guid.NewGuid().ToString();
model.ContentName = item.UnitName;
model.MonthsCount =0;
model.MonthsCount = 0;
model.ProjectCount = 0;
model.MonthsBackCount = 0;
model.TotalNoBackCount = 0;
@ -2657,7 +2657,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
model.MonthsCount = Quantity2Dic[item.UnitId];
model.ProjectCount = Quantity1Dic[item.UnitId];
model.MonthsBackCount = Quantity3Dic[item.UnitId];
model.TotalNoBackCount = Quantity1Dic[item.UnitId]-Quantity4Dic[item.UnitId];
model.TotalNoBackCount = Quantity1Dic[item.UnitId] - Quantity4Dic[item.UnitId];
}
model.ReportId = ReportId;
@ -2778,14 +2778,14 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
if (AddOrUpdate == "update")
{
// lodAllGrid("1");
// lodAllGrid("1");
objType = "1";
RegisterAsyncTask(new PageAsyncTask(lodAllGrid));
PageContext.RegisterStartupScript("rehiden();");
}
else
{
// lodAllGrid("0");
// lodAllGrid("0");
objType = "0";
RegisterAsyncTask(new PageAsyncTask(lodAllGrid));
PageContext.RegisterStartupScript("rehiden();");
@ -2881,9 +2881,9 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
foreach (var item in generalPlanUnits)
{
var query = from c in db.Comprehensive_GeneralPlanApproval
join u in db.Base_Unit on c.UnitId equals u.UnitId into unitJoin
from u in unitJoin.DefaultIfEmpty()
var query = from c in db.Comprehensive_GeneralPlanApproval
join u in db.Base_Unit on c.UnitId equals u.UnitId into unitJoin
from u in unitJoin.DefaultIfEmpty()
where c.ProjectId == this.CurrUser.LoginProjectId && c.UnitId == item.UnitId
select new
@ -2947,7 +2947,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
return dt;
});
}
#endregion
#region 3.2 Grid3方法
@ -3047,7 +3047,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
});
}
#endregion
@ -3065,7 +3065,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
int Quantity1Sum = 0;
int Quantity2Sum = 0;
//加载所有专业
foreach (var item in CNProfessionals)
@ -3140,7 +3140,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
return dt;
});
}
#endregion
#region 4 Grid5方法
@ -3450,7 +3450,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
join p in db.Base_Post on c.PostId equals p.PostId into postJoin
from p in postJoin.DefaultIfEmpty()
where c.ProjectId == this.CurrUser.LoginProjectId && c.UnitId == item.UnitId
select new
select new
{
c.InspectionPersonId,
c.ProjectId,
@ -3859,7 +3859,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
string strSql = @"select UnitId,ProfessionalName,MonthQuantity,TotalQuantity,MonthRate,TotalRate
from ProcessControl_NondestructiveTest_New
where ProjectId='" + this.CurrUser.LoginProjectId + "' and CreateDate >='"+ startDate + "' and CreateDate <='"+ endDate + "'";
where ProjectId='" + this.CurrUser.LoginProjectId + "' and CreateDate >='" + startDate + "' and CreateDate <='" + endDate + "'";
DataTable dt = SQLHelper.GetDataTableRunText(strSql, null);
return dt;
});
@ -4170,8 +4170,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
checkStatisc.WorkName = item.UnitName;
checkStatisc.CheckNum = monethCount.Count();
checkStatisc.TotalCheckNum = AllList.Count();
checkStatisc.OKNum = monethCount.Count(x => x.IsOnceQualified == true);
checkStatisc.TotalOKNum = AllList.Count(x => x.IsOnceQualified == true);
checkStatisc.OKNum = monethCount.Count(x => x.IsOnceQualified == null || x.IsOnceQualified == true);
checkStatisc.TotalOKNum = AllList.Count(x => x.IsOnceQualified == null || x.IsOnceQualified == true);
if (checkStatisc.CheckNum != 0)//被除数不能为零
{
@ -4302,8 +4302,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
checkStatisc.CheckNum = managementList.Count(x => x.UnitWorkId == item);
checkStatisc.TotalCheckNum = totalManagementList.Count(x => x.UnitWorkId == item);
checkStatisc.OKNum = managementList.Count(x => x.UnitWorkId == item && x.IsOnceQualified == true);
checkStatisc.TotalOKNum = totalManagementList.Count(x => x.UnitWorkId == item && x.IsOnceQualified == true);
checkStatisc.OKNum = managementList.Count(x => x.UnitWorkId == item && (x.IsOnceQualified == null || x.IsOnceQualified == true));
checkStatisc.TotalOKNum = totalManagementList.Count(x => x.UnitWorkId == item && (x.IsOnceQualified == null || x.IsOnceQualified == true)e);
if (checkStatisc.CheckNum != 0)//被除数不能为零
{
@ -4494,7 +4494,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
return await Task.Run(() =>
{
string strSql = @"select a.UnitWorkId,UnitWorkName,cNProfessionalCode,IsOnceQualified,InspectionDate from View_MonthReport_InspectionManagement a
left join WBS_UnitWork b on a.UnitWorkId =b.UnitWorkId
left join Base_CNProfessional c on a.CNProfessionalId= c.CNProfessionalId
@ -4673,7 +4673,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
async Task<DataTable> LoadPipingInspectionDt()
{
return await Task.Run(() =>
{
{
string strSql = @"select UnitId, PackageNumber,IssuedReportNumber, ReportTime from Comprehensive_PressurePipe
where Projctid='" + this.CurrUser.LoginProjectId + "' ";
DataTable dt = SQLHelper.GetDataTableRunText(strSql, null);
@ -4823,7 +4823,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
Model.NCRReportStatisc NCRStatisc = new Model.NCRReportStatisc();
NCRStatisc.Id = Guid.NewGuid().ToString();
NCRStatisc.WorkName = item.UnitName;
NCRStatisc.CurrentPeriodOkNum = unitNCRStatic.Where(x => x.ImplementationFrontState == "已闭合").Count();
NCRStatisc.OKNum = AllList.Where(x => x.ImplementationFrontState == "已闭合").Count();
@ -5728,7 +5728,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
//BLL.NextQualityControlService.DeleteNextQualityControlByReportId(ReportId);
#endregion
#region
@ -5798,11 +5798,11 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
////保存23.施工照片
//saveImages();
#endregion
if (save)
{
ShowNotify("保存成功!", MessageBoxIcon.Success);
@ -6227,9 +6227,9 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
#endregion
try
{
var result = db.Report_TextBoxContent.Where(a => a.ReportId == ReportId).ToList();
var result = db.Report_TextBoxContent.Where(a => a.ReportId == ReportId).ToList();
db.Report_TextBoxContent.DeleteAllOnSubmit(result);
//TextBoxContentService.Delete(ReportId);
//TextBoxContentService.Delete(ReportId);
db.Report_TextBoxContent.InsertAllOnSubmit(txtContentList);
db.SubmitChanges();

View File

@ -664,8 +664,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
checkStatisc.WorkName = ins.UnitWorkName;
checkStatisc.CheckNum = managementList.Count(x => x.UnitWorkId == item);
checkStatisc.TotalCheckNum = totalManagementList.Count(x => x.UnitWorkId == item);
checkStatisc.OKNum = managementList.Count(x => x.UnitWorkId == item && x.IsOnceQualified == true);
checkStatisc.TotalOKNum = totalManagementList.Count(x => x.UnitWorkId == item && x.IsOnceQualified == true);
checkStatisc.OKNum = managementList.Count(x => x.UnitWorkId == item && (x.IsOnceQualified == null || x.IsOnceQualified == true));
checkStatisc.TotalOKNum = totalManagementList.Count(x => x.UnitWorkId == item && (x.IsOnceQualified == null || x.IsOnceQualified == true));
StatisticsList.Add(checkStatisc);
}
}

View File

@ -1576,8 +1576,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
checkStatisc.WorkName = ins.UnitWorkName;
checkStatisc.CheckNum = managementList.Count(x => x.UnitWorkId == item);
checkStatisc.TotalCheckNum = totalManagementList.Count(x => x.UnitWorkId == item);
checkStatisc.OKNum = managementList.Count(x => x.UnitWorkId == item && x.IsOnceQualified == true);
checkStatisc.TotalOKNum = totalManagementList.Count(x => x.UnitWorkId == item && x.IsOnceQualified == true);
checkStatisc.OKNum = managementList.Count(x => x.UnitWorkId == item && (x.IsOnceQualified == null || x.IsOnceQualified == true));
checkStatisc.TotalOKNum = totalManagementList.Count(x => x.UnitWorkId == item && (x.IsOnceQualified == null || x.IsOnceQualified == true));
StatisticsList.Add(checkStatisc);
}
}

View File

@ -4138,9 +4138,9 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
checkStatisc.ReportId = ReportId;
checkStatisc.WorkName = item.UnitName;
checkStatisc.CheckNum = monethCount.Count();
checkStatisc.TotalCheckNum = AllList.Count();
checkStatisc.OKNum = monethCount.Count(x => x.IsOnceQualified == true);
checkStatisc.TotalOKNum = AllList.Count(x => x.IsOnceQualified == true);
checkStatisc.TotalCheckNum = AllList.Count();
checkStatisc.OKNum = monethCount.Count(x => x.IsOnceQualified == null || x.IsOnceQualified == true);
checkStatisc.TotalOKNum = AllList.Count(x => x.IsOnceQualified == null || x.IsOnceQualified == true);
if (checkStatisc.CheckNum != 0)//被除数不能为零
{
@ -4266,8 +4266,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
checkStatisc.CheckNum = managementList.Count(x => x.UnitWorkId == item);
checkStatisc.TotalCheckNum = totalManagementList.Count(x => x.UnitWorkId == item);
checkStatisc.OKNum = managementList.Count(x => x.UnitWorkId == item && x.IsOnceQualified == true);
checkStatisc.TotalOKNum = totalManagementList.Count(x => x.UnitWorkId == item && x.IsOnceQualified == true);
checkStatisc.OKNum = managementList.Count(x => x.UnitWorkId == item && (x.IsOnceQualified == null || x.IsOnceQualified == true));
checkStatisc.TotalOKNum = totalManagementList.Count(x => x.UnitWorkId == item && (x.IsOnceQualified == null || x.IsOnceQualified == true));
if (checkStatisc.CheckNum != 0)//被除数不能为零
{

View File

@ -259,13 +259,13 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// <param name="e"></param>
protected void rblIsOnceQualified_SelectedIndexChanged(object sender, EventArgs e)
{
if (this.rblIsOnceQualified.SelectedValue == "True")
if (this.rblIsOnceQualified.SelectedValue == "Flase")
{
this.txtUnqualifiedReason.Hidden = true;
this.txtUnqualifiedReason.Hidden = false;
}
else
{
this.txtUnqualifiedReason.Hidden = false;
this.txtUnqualifiedReason.Hidden = true;
}
}
#endregion

View File

@ -188,7 +188,7 @@ namespace FineUIPro.Web.DataShow
{
var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text);
var datetime2 = Funs.GetNewDateTime(this.txtEndTime.Text);
var getT = Funs.DB.ProcessControl_InspectionManagement.Where(x => x.ProjectId == projectId.ToString() && x.IsOnceQualified == true);
var getT = Funs.DB.ProcessControl_InspectionManagement.Where(x => x.ProjectId == projectId.ToString() && (x.IsOnceQualified == null|| x.IsOnceQualified == true));
if (datetime1.HasValue)
{
getT = getT.Where(x => x.InspectionDate >= datetime1);
@ -220,7 +220,7 @@ namespace FineUIPro.Web.DataShow
{
getALL = getALL.Where(x => x.CheckDate >= datetime1);
}
var getT = getALL.Where(x => x.ProjectId == projectId.ToString() && x.IsOnceQualified == true);
var getT = getALL.Where(x => x.ProjectId == projectId.ToString() && (x.IsOnceQualified == null || x.IsOnceQualified == true));
int coutall = getALL.Count();
int cout0 = getT.Count();
if (coutall > 0)

View File

@ -53,7 +53,7 @@ namespace FineUIPro.Web.DataShow
BP.Class,
P.AcceptanceSite,
P.AcceptanceCheckMan,
(CASE WHEN IsOnceQualified='True' THEN '是' ELSE '否' END)AS IsOnceQualified,
(CASE WHEN IsOnceQualified='Flase' THEN '否' ELSE '是' END)AS IsOnceQualified,
P.InspectionCode,
P.InspectionDate"
+ @" FROM ProcessControl_InspectionManagementDetail AS D"

View File

@ -162,7 +162,7 @@ namespace FineUIPro.Web.DataShow
int cout1 = 0;
if (projectId != null)
{
var getT = getDataItemLists.Where(x => x.ProjectId == projectId.ToString() && x.CheckAcceptType == this.rbType.SelectedValue && x.IsOnceQualified == true);
var getT = getDataItemLists.Where(x => x.ProjectId == projectId.ToString() && x.CheckAcceptType == this.rbType.SelectedValue && (x.IsOnceQualified == null || x.IsOnceQualified == true));
cout1 = getT.Count();
}
return cout1;
@ -179,7 +179,7 @@ namespace FineUIPro.Web.DataShow
if (projectId != null)
{
var getT1 = getDataItemLists.Where(x => x.ProjectId == projectId.ToString() && x.CheckAcceptType == this.rbType.SelectedValue);
var getT2 = getDataItemLists.Where(x => x.ProjectId == projectId.ToString() && x.CheckAcceptType == this.rbType.SelectedValue && x.IsOnceQualified == true);
var getT2 = getDataItemLists.Where(x => x.ProjectId == projectId.ToString() && x.CheckAcceptType == this.rbType.SelectedValue && (x.IsOnceQualified == null || x.IsOnceQualified == true));
cout1 = getT1.Count() - getT2.Count();
}
return cout1;
@ -196,7 +196,7 @@ namespace FineUIPro.Web.DataShow
if (projectId != null)
{
var getT1 = getDataItemLists.Where(x => x.ProjectId == projectId.ToString() && x.CheckAcceptType == this.rbType.SelectedValue);
var getT2 = getDataItemLists.Where(x => x.ProjectId == projectId.ToString() && x.CheckAcceptType == this.rbType.SelectedValue && x.IsOnceQualified == true);
var getT2 = getDataItemLists.Where(x => x.ProjectId == projectId.ToString() && x.CheckAcceptType == this.rbType.SelectedValue && (x.IsOnceQualified == null || x.IsOnceQualified == true));
if (getT1.Count() > 0)
{
rate = Math.Round(getT2.Count() * 1.0 / getT1.Count() * 100, 2).ToString();

View File

@ -185,7 +185,7 @@ namespace FineUIPro.Web.DataShowLocal
var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text);
var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text);
var getD1 = from x in Funs.DB.View_CQMS_InspectionManagementDetail
where x.ProjectId == projectId.ToString() && x.IsOnceQualified==true
where x.ProjectId == projectId.ToString() && (x.IsOnceQualified == null || x.IsOnceQualified == true)
select x;
if (datetime1.HasValue)

View File

@ -4,153 +4,153 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>现场质量检查</title>
<style>
/* 增强合计行样式 - 使用多种选择器确保生效 */
.f-grid-row-summary .f-grid-cell,
.f-grid-summary-row .f-grid-cell-inner {
font-weight: bold !important;
color: red !important;
}
</style>
/* 增强合计行样式 - 使用多种选择器确保生效 */
.f-grid-row-summary .f-grid-cell,
.f-grid-summary-row .f-grid-cell-inner {
font-weight: bold !important;
color: red !important;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server"/>
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false" AutoScroll="true"
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="现场质量检查" EnableCollapse="true"
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false" AutoScroll="true"
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="现场质量检查" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="ProjectId" DataIDField="ProjectId" AllowSorting="true" SortField="SortIndex"
SortDirection="ASC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowColumnLocking="true" EnableSummary="true" SummaryPosition="Flow"
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
<Items>
<f:TextBox ID="txtProjectName" runat="server" Label="项目名称" LabelAlign="left" LabelWidth="80px" EmptyText="输入查询条件" AutoPostBack="true" OnTextChanged="btSearch_Click"></f:TextBox>
SortDirection="ASC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowColumnLocking="true" EnableSummary="true" SummaryPosition="Bottom"
AllowPaging="false" IsDatabasePaging="false" PageSize="100" OnPageIndexChange="Grid1_PageIndexChange">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
<Items>
<f:TextBox ID="txtProjectName" runat="server" Label="项目名称" LabelAlign="left" LabelWidth="80px" EmptyText="输入查询条件" AutoPostBack="true" OnTextChanged="btSearch_Click"></f:TextBox>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出" ToolTip="导出" Icon="FolderUp"
EnableAjax="false" DisableControlBeforePostBack="false">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:TemplateField ColumnID="tfNumber" Width="50px" HeaderText="序号" HeaderTextAlign="Center" Locked="true"
TextAlign="Center">
<ItemTemplate>
<asp:Label ID="lblNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="250px" ColumnID="ProjectName" DataField="ProjectName" SortField="ProjectName" Locked="true"
FieldType="String" HeaderText="项目名称" TextAlign="Left" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="150px" ColumnID="ShortName" DataField="ShortName" SortField="ShortName" Locked="true"
FieldType="String" HeaderText="项目简称" TextAlign="Left" HeaderTextAlign="Center">
</f:RenderField>
<f:GroupField HeaderText="现场共检点" TextAlign="Center">
<Columns>
<f:RenderField Width="100px" ColumnID="Value1" DataField="Value1" SortField="Value1"
FieldType="String" HeaderText="本月" TextAlign="Left" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="Value2" DataField="Value2" SortField="Value2"
FieldType="String" HeaderText="累计" TextAlign="Left" HeaderTextAlign="Center">
</f:RenderField>
</Columns>
</f:GroupField>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出" ToolTip="导出" Icon="FolderUp"
EnableAjax="false" DisableControlBeforePostBack="false">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:TemplateField ColumnID="tfNumber" Width="50px" HeaderText="序号" HeaderTextAlign="Center" Locked="true"
TextAlign="Center">
<ItemTemplate>
<asp:Label ID="lblNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="250px" ColumnID="ProjectName" DataField="ProjectName" SortField="ProjectName" Locked="true"
FieldType="String" HeaderText="项目名称" TextAlign="Left" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="150px" ColumnID="ShortName" DataField="ShortName" SortField="ShortName" Locked="true"
FieldType="String" HeaderText="项目简称" TextAlign="Left" HeaderTextAlign="Center">
</f:RenderField>
<f:GroupField HeaderText="现场共检点" TextAlign="Center">
<Columns>
<f:RenderField Width="100px" ColumnID="Value1" DataField="Value1" SortField="Value1"
FieldType="String" HeaderText="本月" TextAlign="Left" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="Value2" DataField="Value2" SortField="Value2"
FieldType="String" HeaderText="累计" TextAlign="Left" HeaderTextAlign="Center">
</f:RenderField>
</Columns>
</f:GroupField>
<f:GroupField HeaderText="共检合格点" TextAlign="Center">
<Columns>
<f:RenderField Width="100px" ColumnID="Value3" DataField="Value3"
FieldType="String" HeaderText="本月" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="Value4" DataField="Value4"
FieldType="String" HeaderText="累计" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
</Columns>
</f:GroupField>
<f:GroupField HeaderText="共检一次合格率" TextAlign="Center">
<Columns>
<f:RenderField Width="100px" ColumnID="Value5" DataField="Value5"
FieldType="String" HeaderText="本月" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="Value6" DataField="Value6"
FieldType="String" HeaderText="累计" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
</Columns>
</f:GroupField>
<f:GroupField HeaderText="计量器具管理(台套)" TextAlign="Center">
<Columns>
<f:RenderField Width="100px" ColumnID="Value7" DataField="Value7"
FieldType="String" HeaderText="本月报验" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="Value8" DataField="Value8"
FieldType="String" HeaderText="累计报验" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
</Columns>
</f:GroupField>
<f:GroupField HeaderText="质量专项检查" TextAlign="Center">
<Columns>
<f:RenderField Width="100px" ColumnID="Value9" DataField="Value9"
FieldType="String" HeaderText="本月检查次数" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="Value10" DataField="Value10"
FieldType="String" HeaderText="累计检查次数" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
</Columns>
</f:GroupField>
<f:GroupField HeaderText="NCR管理" TextAlign="Center">
<Columns>
<f:RenderField Width="100px" ColumnID="Value11" DataField="Value11"
FieldType="String" HeaderText="本月" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="Value12" DataField="Value12"
FieldType="String" HeaderText="NCR总数" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="Value13" DataField="Value13"
FieldType="String" HeaderText="本月已整改" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="Value14" DataField="Value14"
FieldType="String" HeaderText="累计已整改" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="Value15" DataField="Value15"
FieldType="String" HeaderText="累计完成比例" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
</Columns>
</f:GroupField>
<f:GroupField HeaderText="共检合格点" TextAlign="Center">
<Columns>
<f:RenderField Width="100px" ColumnID="Value3" DataField="Value3"
FieldType="String" HeaderText="本月" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="Value4" DataField="Value4"
FieldType="String" HeaderText="累计" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
</Columns>
</f:GroupField>
<f:GroupField HeaderText="共检一次合格率" TextAlign="Center">
<Columns>
<f:RenderField Width="100px" ColumnID="Value5" DataField="Value5"
FieldType="String" HeaderText="本月" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="Value6" DataField="Value6"
FieldType="String" HeaderText="累计" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
</Columns>
</f:GroupField>
<f:GroupField HeaderText="计量器具管理(台套)" TextAlign="Center">
<Columns>
<f:RenderField Width="100px" ColumnID="Value7" DataField="Value7"
FieldType="String" HeaderText="本月报验" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="Value8" DataField="Value8"
FieldType="String" HeaderText="累计报验" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
</Columns>
</f:GroupField>
<f:GroupField HeaderText="质量专项检查" TextAlign="Center">
<Columns>
<f:RenderField Width="110px" ColumnID="Value9" DataField="Value9"
FieldType="String" HeaderText="本月检查次数" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="110px" ColumnID="Value10" DataField="Value10"
FieldType="String" HeaderText="累计检查次数" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
</Columns>
</f:GroupField>
<f:GroupField HeaderText="NCR管理" TextAlign="Center">
<Columns>
<f:RenderField Width="100px" ColumnID="Value11" DataField="Value11"
FieldType="String" HeaderText="本月" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="Value12" DataField="Value12"
FieldType="String" HeaderText="NCR总数" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="Value13" DataField="Value13"
FieldType="String" HeaderText="本月已整改" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="Value14" DataField="Value14"
FieldType="String" HeaderText="累计已整改" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="110px" ColumnID="Value15" DataField="Value15"
FieldType="String" HeaderText="累计完成比例" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
</Columns>
</f:GroupField>
</Columns>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
<f:ListItem Text="10" Value="10"/>
<f:ListItem Text="15" Value="15"/>
<f:ListItem Text="20" Value="20"/>
<f:ListItem Text="25" Value="25"/>
<f:ListItem Text="所有行" Value="100000"/>
</f:DropDownList>
</PageItems>
</f:Grid>
</Items>
</f:Panel>
<f:Window ID="Window1" runat="server" Hidden="true" ShowHeader="true"
IsModal="true" Target="Parent" EnableMaximize="true" EnableResize="true" OnClose="Window1_Close"
Title="编辑Project_CQMSData_CQMS" EnableIFrame="true" Height="650px"
Width="1200px">
</f:Window>
</Columns>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
<f:ListItem Text="10" Value="10" />
<f:ListItem Text="15" Value="15" />
<f:ListItem Text="20" Value="20" />
<f:ListItem Text="25" Value="25" />
<f:ListItem Text="所有行" Value="100000" />
</f:DropDownList>
</PageItems>
</f:Grid>
</Items>
</f:Panel>
<f:Window ID="Window1" runat="server" Hidden="true" ShowHeader="true"
IsModal="true" Target="Parent" EnableMaximize="true" EnableResize="true" OnClose="Window1_Close"
Title="编辑Project_CQMSData_CQMS" EnableIFrame="true" Height="650px"
Width="1200px">
</f:Window>
</form>
<script type="text/javascript">
</form>
<script type="text/javascript">
function reloadGrid() {
__doPostBack(null, 'reloadGrid');
}
</script>
</body>
</html>
</html>

View File

@ -70,8 +70,8 @@ namespace FineUIPro.Web.ZHGL.CQMSData
value1 = managementList.Count();
value2 = totalManagementList.Count();
value3 = managementList.Count(x => x.IsOnceQualified == true);
value4 = totalManagementList.Count(x => x.IsOnceQualified == true);
value3 = managementList.Count(x => x.IsOnceQualified == null || x.IsOnceQualified == true);
value4 = totalManagementList.Count(x => x.IsOnceQualified == null || x.IsOnceQualified == true);
if (value1 != 0)//被除数不能为零

View File

@ -92,8 +92,8 @@ namespace FineUIPro.Web.ZHGL.CQMSData
value1 = managementList1.Count();
value2 = totalManagementList1.Count();
value3 = managementList1.Count(x => x.IsOnceQualified == true);
value4 = totalManagementList1.Count(x => x.IsOnceQualified == true);
value3 = managementList1.Count(x => x.IsOnceQualified == null || x.IsOnceQualified == true);
value4 = totalManagementList1.Count(x => x.IsOnceQualified == null || x.IsOnceQualified == true);
if (value1 != 0)//被除数不能为零
{
@ -119,8 +119,8 @@ namespace FineUIPro.Web.ZHGL.CQMSData
value7 = managementList2.Count();
value8 = totalManagementList2.Count();
value9 = managementList2.Count(x => x.IsOnceQualified == true);
value10 = totalManagementList2.Count(x => x.IsOnceQualified == true);
value9 = managementList2.Count(x => x.IsOnceQualified == null || x.IsOnceQualified == true);
value10 = totalManagementList2.Count(x => x.IsOnceQualified == null || x.IsOnceQualified == true);
if (value7 != 0)//被除数不能为零
{
@ -146,8 +146,8 @@ namespace FineUIPro.Web.ZHGL.CQMSData
value13 = managementList3.Count();
value14 = totalManagementList3.Count();
value15 = managementList3.Count(x => x.IsOnceQualified == true);
value16 = totalManagementList3.Count(x => x.IsOnceQualified == true);
value15 = managementList3.Count(x => x.IsOnceQualified == null || x.IsOnceQualified == true);
value16 = totalManagementList3.Count(x => x.IsOnceQualified == null || x.IsOnceQualified == true);
if (value13 != 0)//被除数不能为零
{
@ -173,8 +173,8 @@ namespace FineUIPro.Web.ZHGL.CQMSData
value19 = managementList4.Count();
value20 = totalManagementList4.Count();
value21 = managementList4.Count(x => x.IsOnceQualified == true);
value22 = totalManagementList4.Count(x => x.IsOnceQualified == true);
value21 = managementList4.Count(x => x.IsOnceQualified == null || x.IsOnceQualified == true);
value22 = totalManagementList4.Count(x => x.IsOnceQualified == null || x.IsOnceQualified == true);
if (value19 != 0)//被除数不能为零
{
@ -200,8 +200,8 @@ namespace FineUIPro.Web.ZHGL.CQMSData
value25 = managementList5.Count();
value26 = totalManagementList5.Count();
value27 = managementList5.Count(x => x.IsOnceQualified == true);
value28 = totalManagementList5.Count(x => x.IsOnceQualified == true);
value27 = managementList5.Count(x => x.IsOnceQualified == null || x.IsOnceQualified == true);
value28 = totalManagementList5.Count(x => x.IsOnceQualified == null || x.IsOnceQualified == true);
if (value25 != 0)//被除数不能为零
{

View File

@ -276,7 +276,7 @@ namespace FineUIPro.Web.ZHGL.InspectionSummary
//一次共检合格数
var list20 = (from x in Funs.DB.ProcessControl_InspectionManagement
where x.IsOnceQualified == true
where x.IsOnceQualified == null || x.IsOnceQualified == true
select new { x.ProjectId,x.InspectionDate,x.IsOnceQualified,x.InspectionId, Isid= x.InspectionId }).ToList();
////总数
var list21 = (from x in Funs.DB.ProcessControl_InspectionManagement

View File

@ -55,7 +55,7 @@ namespace FineUIPro.Web.common
var inspectionManagements = from x in db.ProcessControl_InspectionManagement where x.ProjectId == this.CurrUser.LoginProjectId && cns.Contains(x.CNProfessionalId) select x;
this.divZLGJ.InnerHtml = inspectionManagements.Count().ToString();
//验收数据
this.divYS.InnerHtml = inspectionManagements.Count(x => x.IsOnceQualified == true).ToString();
this.divYS.InnerHtml = inspectionManagements.Count(x => x.IsOnceQualified == null || x.IsOnceQualified == true).ToString();
//焊工过期人数统计
var welders = from x in db.Comprehensive_InspectionPerson
join y in db.Base_Post on x.PostId equals y.PostId
@ -63,7 +63,7 @@ namespace FineUIPro.Web.common
select x;
this.divHG.InnerHtml = welders.Count().ToString();
//竣工资料
this.divJGZL.InnerHtml = inspectionManagements.Count(x => x.IsOnceQualified == true).ToString();
this.divJGZL.InnerHtml = inspectionManagements.Count(x => x.IsOnceQualified == null || x.IsOnceQualified == true).ToString();
//NCR
var NCRManagements = from x in db.Comprehensive_NCRManagement where x.ProjectId == this.CurrUser.LoginProjectId && cns.Contains(x.CNProfessionalId) select x;
this.divNCR.InnerHtml = NCRManagements.Count().ToString();

View File

@ -78,7 +78,7 @@ namespace FineUIPro.Web.common
select new { x.InspectionId, y.IsOnceQualified }).Distinct().ToList();
this.divZLGJ.InnerHtml = inspectionManagementDetails.Count().ToString();
//验收数据
this.divYS.InnerHtml = inspectionManagementDetails.Count(x => x.IsOnceQualified == true).ToString();
this.divYS.InnerHtml = inspectionManagementDetails.Count(x => x.IsOnceQualified == null || x.IsOnceQualified == true).ToString();
//焊工过期人数统计
var welders = from x in db.Comprehensive_InspectionPerson
join y in db.Base_Post on x.PostId equals y.PostId
@ -92,7 +92,7 @@ namespace FineUIPro.Web.common
newWelders = newWelders.Distinct().ToList();
this.divHG.InnerHtml = newWelders.Count().ToString();
//竣工资料
this.divJGZL.InnerHtml = inspectionManagementDetails.Count(x => x.IsOnceQualified == true).ToString();
this.divJGZL.InnerHtml = inspectionManagementDetails.Count(x => x.IsOnceQualified == null || x.IsOnceQualified == true).ToString();
//NCR
var NCRManagements = from x in db.Comprehensive_NCRManagement where x.ProjectId == this.CurrUser.LoginProjectId && cns.Contains(x.CNProfessionalId) select x;
List<Model.Comprehensive_NCRManagement> newNCRManagements = new List<Model.Comprehensive_NCRManagement>();

View File

@ -26,7 +26,7 @@ namespace FineUIPro.Web
{
var db = new Model.SGGLDB(Funs.ConnString);
List<Model.ProcessControl_InspectionManagement> TotalCheckDetailOKLists = (from x in db.ProcessControl_InspectionManagement
where x.ProjectId == this.CurrUser.LoginProjectId && x.IsOnceQualified == true
where x.ProjectId == this.CurrUser.LoginProjectId && (x.IsOnceQualified == null || x.IsOnceQualified == true)
select x).ToList();
List<Model.ProcessControl_InspectionManagement> TotalCheckDetailLists = (from x in db.ProcessControl_InspectionManagement
where x.ProjectId == this.CurrUser.LoginProjectId
@ -284,7 +284,7 @@ namespace FineUIPro.Web
Model.SGGLDB db = Funs.DB;
var units = BLL.ProjectUnitService.GetProjectUnitListByProjectIdUnitType(CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2);
List<Model.ProcessControl_InspectionManagement> TotalCheckDetailOKLists = (from x in db.ProcessControl_InspectionManagement
where x.ProjectId == this.CurrUser.LoginProjectId && x.IsOnceQualified == true
where x.ProjectId == this.CurrUser.LoginProjectId && (x.IsOnceQualified == null || x.IsOnceQualified == true)
select x).ToList();
List<Model.ProcessControl_InspectionManagement> TotalCheckDetailLists = (from x in db.ProcessControl_InspectionManagement
where x.ProjectId == this.CurrUser.LoginProjectId
@ -321,7 +321,7 @@ namespace FineUIPro.Web
series.Add(s2);
businessColumn.categories = listCategories;
businessColumn.series = series;
return JsonConvert.SerializeObject(businessColumn);
return JsonConvert.SerializeObject(businessColumn);
}
}
@ -340,7 +340,7 @@ namespace FineUIPro.Web
var cns = BLL.CNProfessionalService.GetCnProList();
Model.SGGLDB db = Funs.DB;
List<Model.ProcessControl_InspectionManagement> TotalCheckDetailOKLists = (from x in db.ProcessControl_InspectionManagement
where x.ProjectId == this.CurrUser.LoginProjectId && x.IsOnceQualified == true
where x.ProjectId == this.CurrUser.LoginProjectId && (x.IsOnceQualified == null || x.IsOnceQualified == true)
select x).ToList();
List<Model.ProcessControl_InspectionManagement> TotalCheckDetailLists = (from x in db.ProcessControl_InspectionManagement
where x.ProjectId == this.CurrUser.LoginProjectId
@ -384,7 +384,7 @@ namespace FineUIPro.Web
var cns = BLL.CNProfessionalService.GetList();
Model.SGGLDB db = Funs.DB;
List<Model.ProcessControl_InspectionManagement> TotalCheckDetailOKLists = (from x in db.ProcessControl_InspectionManagement
where x.ProjectId == this.CurrUser.LoginProjectId && x.IsOnceQualified == true
where x.ProjectId == this.CurrUser.LoginProjectId && (x.IsOnceQualified == null || x.IsOnceQualified == true)
select x).ToList();
List<Model.ProcessControl_InspectionManagement> TotalCheckDetailLists = (from x in db.ProcessControl_InspectionManagement
where x.ProjectId == this.CurrUser.LoginProjectId
@ -452,7 +452,7 @@ namespace FineUIPro.Web
foreach (var unitWork in unitWorks)
{
listCategories.Add(unitWork.UnitWorkName);
var okChecks = TotalCheckDetailOKLists.Where(x => x.UnitWorkId == unitWork.UnitWorkId && x.IsOnceQualified == true).ToList();
var okChecks = TotalCheckDetailOKLists.Where(x => x.UnitWorkId == unitWork.UnitWorkId && (x.IsOnceQualified == null || x.IsOnceQualified == true)).ToList();
var totalChecks = TotalCheckDetailOKLists.Where(x => x.UnitWorkId == unitWork.UnitWorkId).ToList();
if (okChecks.Count > 0 && totalChecks.Count > 0)
{

View File

@ -44,9 +44,9 @@ namespace FineUIPro.Web.common
var inspectionManagements = from x in db.ProcessControl_InspectionManagement where x.ProjectId == this.CurrUser.LoginProjectId select x;
this.divZLGJ.InnerHtml = inspectionManagements.Count().ToString();
//验收数据
this.divYS.InnerHtml = inspectionManagements.Count(x => x.IsOnceQualified == true).ToString();
this.divYS.InnerHtml = inspectionManagements.Count(x => x.IsOnceQualified== null || x.IsOnceQualified == true).ToString();
//竣工资料
this.divJGZL.InnerHtml = inspectionManagements.Count(x => x.IsOnceQualified == true).ToString();
this.divJGZL.InnerHtml = inspectionManagements.Count(x => x.IsOnceQualified == null || x.IsOnceQualified == true).ToString();
//NCR
var NCRManagements = from x in db.Comprehensive_NCRManagement where x.ProjectId == this.CurrUser.LoginProjectId select x;
this.divNCR.InnerHtml = NCRManagements.Count().ToString();