20240417 质量月报
This commit is contained in:
@@ -311,6 +311,13 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||
//保存9.计量器具报验管理情况
|
||||
saveMeasuringInspection();
|
||||
//保存10.现场质量共检数据
|
||||
saveTjInspection();
|
||||
saveSbInspection();
|
||||
saveGDInspection();
|
||||
saveDQInspection();
|
||||
saveYBInspection();
|
||||
saveFFInspection();
|
||||
saveXFInspection();
|
||||
saveInspectionDataInspection();
|
||||
//保存11.压力管道监检情况
|
||||
savePressureInspection();
|
||||
@@ -450,7 +457,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||
//加载13.特种设备监检情况
|
||||
loadSpecialInspection(objType);
|
||||
////加载14.NCR管理情况
|
||||
loadNcrManagementInspection();
|
||||
loadNcrManagementInspection(objType);
|
||||
|
||||
//加载15.质量巡检情况
|
||||
loadQualityInspection(objType);
|
||||
@@ -1083,7 +1090,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||
/// <summary>
|
||||
/// NCR管理情况
|
||||
/// </summary>
|
||||
void loadNcrManagementInspection()
|
||||
void loadNcrManagementInspection(string objType)
|
||||
{
|
||||
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
||||
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
|
||||
@@ -1121,7 +1128,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||
u.UnitId,
|
||||
u.UnitName,
|
||||
c.IssuedDate,
|
||||
c.Status
|
||||
c.Status,
|
||||
c.ImplementationFrontState,
|
||||
};
|
||||
|
||||
var AllList = query.ToList();
|
||||
@@ -1131,9 +1139,13 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||
Model.NCRReportStatisc NCRStatisc = new Model.NCRReportStatisc();
|
||||
NCRStatisc.Id = Guid.NewGuid().ToString();
|
||||
NCRStatisc.WorkName = item.UnitName;
|
||||
NCRStatisc.CurrentPeriodOkNum = unitNCRStatic.Count(x => x.Status == "3");
|
||||
NCRStatisc.OKNum = AllList.Count(x => x.Status == "3");
|
||||
//NCRStatisc.CurrentPeriodOkNum = unitNCRStatic.Count(x => x.Status == "3");
|
||||
//NCRStatisc.OKNum = AllList.Count(x => x.Status == "3");
|
||||
NCRStatisc.CurrentPeriodOkNum = unitNCRStatic.Where(x => x.ImplementationFrontState.Trim().Equals("已闭合")).Count();
|
||||
NCRStatisc.OKNum = AllList.Where(x => x.ImplementationFrontState.Trim().Equals("已闭合")).Count();
|
||||
|
||||
NCRStatisc.CheckNum = AllList.Count();
|
||||
|
||||
if (NCRStatisc.CheckNum != 0)//被除数不能为零
|
||||
{
|
||||
NCRStatisc.OKRate = Math.Round((double)NCRStatisc.OKNum / (double)NCRStatisc.CheckNum * 100, 2) + "%";//保留两位小数、后四舍五入
|
||||
@@ -1142,11 +1154,12 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||
{
|
||||
NCRStatisc.OKRate = "0%";
|
||||
}
|
||||
|
||||
StatisticsList.Add(NCRStatisc);
|
||||
|
||||
CurrentPeriodOkNumSum += NCRStatisc.CurrentPeriodOkNum;
|
||||
OKNumSum += NCRStatisc.OKNum;
|
||||
CheckNumSum += NCRStatisc.CheckNum;
|
||||
CheckNumSum += NCRStatisc.CheckNum;
|
||||
i++;
|
||||
}
|
||||
|
||||
@@ -1171,8 +1184,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||
summary.Add("OKRate", OKRateSum.ToString());
|
||||
|
||||
gvNcrManagementInspection.SummaryData = summary;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 15.质量巡检情况 gvQualityInspection方法
|
||||
/// <summary>
|
||||
@@ -1590,6 +1603,246 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||
#endregion
|
||||
|
||||
#region 10.现场质量共检数据
|
||||
void saveTjInspection() //检验批统计:土建
|
||||
{
|
||||
List<Model.Report_CQMS_MonthReportItem> detailLists = new List<Model.Report_CQMS_MonthReportItem>();
|
||||
JArray teamGroupData = gvTj.GetMergedData();
|
||||
foreach (JObject teamGroupRow in teamGroupData)
|
||||
{
|
||||
JObject values = teamGroupRow.Value<JObject>("values");
|
||||
int rowIndex = teamGroupRow.Value<int>("index");
|
||||
Model.Report_CQMS_MonthReportItem newDetail = new Model.Report_CQMS_MonthReportItem
|
||||
{
|
||||
ReportId = ReportId,
|
||||
ReType = "10-1",
|
||||
ContentName = values.Value<string>("WorkName"),
|
||||
|
||||
MonthsCount = values.Value<int>("CheckNum"), //当前检查点数
|
||||
MonthsBackCount = values.Value<int>("TotalCheckNum"),//累计点数
|
||||
|
||||
ProjectCount = values.Value<int>("OKNum"),//当前合格点数
|
||||
TotalNoBackCount = values.Value<int>("TotalOKNum"),//累计合格点数
|
||||
|
||||
RectificationRate = values.Value<string>("OneOKRate"),//本月合格点数
|
||||
Remarks = values.Value<string>("TotalOneOKRate"),//本月累计合格点数
|
||||
};
|
||||
if (gvTj.Rows[rowIndex].DataKeys.Length > 0)
|
||||
{
|
||||
newDetail.Id = gvTj.Rows[rowIndex].DataKeys[0].ToString();
|
||||
}
|
||||
detailLists.Add(newDetail);
|
||||
}
|
||||
if (detailLists.Count > 0)
|
||||
{
|
||||
Funs.DB.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
void saveSbInspection() //检验批统计:设备
|
||||
{
|
||||
List<Model.Report_CQMS_MonthReportItem> detailLists = new List<Model.Report_CQMS_MonthReportItem>();
|
||||
JArray teamGroupData = GvSb.GetMergedData();
|
||||
foreach (JObject teamGroupRow in teamGroupData)
|
||||
{
|
||||
JObject values = teamGroupRow.Value<JObject>("values");
|
||||
int rowIndex = teamGroupRow.Value<int>("index");
|
||||
Model.Report_CQMS_MonthReportItem newDetail = new Model.Report_CQMS_MonthReportItem
|
||||
{
|
||||
ReportId = ReportId,
|
||||
ReType = "10-2",
|
||||
ContentName = values.Value<string>("WorkName"),
|
||||
MonthsCount = values.Value<int>("CheckNum"), //当前检查点数
|
||||
MonthsBackCount = values.Value<int>("TotalCheckNum"),//累计点数
|
||||
|
||||
ProjectCount = values.Value<int>("OKNum"),//当前合格点数
|
||||
TotalNoBackCount = values.Value<int>("TotalOKNum"),//累计合格点数
|
||||
|
||||
RectificationRate = values.Value<string>("OneOKRate"),//本月合格点数
|
||||
Remarks = values.Value<string>("TotalOneOKRate"),//本月累计合格点数
|
||||
};
|
||||
if (GvSb.Rows[rowIndex].DataKeys.Length > 0)
|
||||
{
|
||||
newDetail.Id = GvSb.Rows[rowIndex].DataKeys[0].ToString();
|
||||
}
|
||||
detailLists.Add(newDetail);
|
||||
}
|
||||
if (detailLists.Count > 0)
|
||||
{
|
||||
Funs.DB.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
void saveGDInspection() //检验批统计:管道
|
||||
{
|
||||
List<Model.Report_CQMS_MonthReportItem> detailLists = new List<Model.Report_CQMS_MonthReportItem>();
|
||||
JArray teamGroupData = GvGD.GetMergedData();
|
||||
foreach (JObject teamGroupRow in teamGroupData)
|
||||
{
|
||||
JObject values = teamGroupRow.Value<JObject>("values");
|
||||
int rowIndex = teamGroupRow.Value<int>("index");
|
||||
Model.Report_CQMS_MonthReportItem newDetail = new Model.Report_CQMS_MonthReportItem
|
||||
{
|
||||
ReportId = ReportId,
|
||||
ReType = "10-3",
|
||||
ContentName = values.Value<string>("WorkName"),
|
||||
MonthsCount = values.Value<int>("CheckNum"), //当前检查点数
|
||||
MonthsBackCount = values.Value<int>("TotalCheckNum"),//累计点数
|
||||
|
||||
ProjectCount = values.Value<int>("OKNum"),//当前合格点数
|
||||
TotalNoBackCount = values.Value<int>("TotalOKNum"),//累计合格点数
|
||||
|
||||
RectificationRate = values.Value<string>("OneOKRate"),//本月合格点数
|
||||
Remarks = values.Value<string>("TotalOneOKRate"),//本月累计合格点数
|
||||
};
|
||||
if (GvGD.Rows[rowIndex].DataKeys.Length > 0)
|
||||
{
|
||||
newDetail.Id = GvGD.Rows[rowIndex].DataKeys[0].ToString();
|
||||
}
|
||||
detailLists.Add(newDetail);
|
||||
}
|
||||
if (detailLists.Count > 0)
|
||||
{
|
||||
Funs.DB.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
void saveDQInspection() //检验批统计:电气
|
||||
{
|
||||
List<Model.Report_CQMS_MonthReportItem> detailLists = new List<Model.Report_CQMS_MonthReportItem>();
|
||||
JArray teamGroupData = GvDq.GetMergedData();
|
||||
foreach (JObject teamGroupRow in teamGroupData)
|
||||
{
|
||||
JObject values = teamGroupRow.Value<JObject>("values");
|
||||
int rowIndex = teamGroupRow.Value<int>("index");
|
||||
Model.Report_CQMS_MonthReportItem newDetail = new Model.Report_CQMS_MonthReportItem
|
||||
{
|
||||
ReportId = ReportId,
|
||||
ReType = "10-4",
|
||||
ContentName = values.Value<string>("WorkName"),
|
||||
MonthsCount = values.Value<int>("CheckNum"), //当前检查点数
|
||||
MonthsBackCount = values.Value<int>("TotalCheckNum"),//累计点数
|
||||
|
||||
ProjectCount = values.Value<int>("OKNum"),//当前合格点数
|
||||
TotalNoBackCount = values.Value<int>("TotalOKNum"),//累计合格点数
|
||||
|
||||
RectificationRate = values.Value<string>("OneOKRate"),//本月合格点数
|
||||
Remarks = values.Value<string>("TotalOneOKRate"),//本月累计合格点数
|
||||
};
|
||||
if (GvDq.Rows[rowIndex].DataKeys.Length > 0)
|
||||
{
|
||||
newDetail.Id = GvDq.Rows[rowIndex].DataKeys[0].ToString();
|
||||
}
|
||||
detailLists.Add(newDetail);
|
||||
}
|
||||
if (detailLists.Count > 0)
|
||||
{
|
||||
Funs.DB.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
void saveYBInspection() //检验批统计:仪表
|
||||
{
|
||||
List<Model.Report_CQMS_MonthReportItem> detailLists = new List<Model.Report_CQMS_MonthReportItem>();
|
||||
JArray teamGroupData = GvYb.GetMergedData();
|
||||
foreach (JObject teamGroupRow in teamGroupData)
|
||||
{
|
||||
JObject values = teamGroupRow.Value<JObject>("values");
|
||||
int rowIndex = teamGroupRow.Value<int>("index");
|
||||
Model.Report_CQMS_MonthReportItem newDetail = new Model.Report_CQMS_MonthReportItem
|
||||
{
|
||||
ReportId = ReportId,
|
||||
ReType = "10-5",
|
||||
ContentName = values.Value<string>("WorkName"),
|
||||
MonthsCount = values.Value<int>("CheckNum"), //当前检查点数
|
||||
MonthsBackCount = values.Value<int>("TotalCheckNum"),//累计点数
|
||||
|
||||
ProjectCount = values.Value<int>("OKNum"),//当前合格点数
|
||||
TotalNoBackCount = values.Value<int>("TotalOKNum"),//累计合格点数
|
||||
|
||||
RectificationRate = values.Value<string>("OneOKRate"),//本月合格点数
|
||||
Remarks = values.Value<string>("TotalOneOKRate"),//本月累计合格点数
|
||||
};
|
||||
if (GvYb.Rows[rowIndex].DataKeys.Length > 0)
|
||||
{
|
||||
newDetail.Id = GvYb.Rows[rowIndex].DataKeys[0].ToString();
|
||||
}
|
||||
detailLists.Add(newDetail);
|
||||
}
|
||||
if (detailLists.Count > 0)
|
||||
{
|
||||
Funs.DB.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
void saveFFInspection() //检验批统计:防腐
|
||||
{
|
||||
List<Model.Report_CQMS_MonthReportItem> detailLists = new List<Model.Report_CQMS_MonthReportItem>();
|
||||
JArray teamGroupData = GvFf.GetMergedData();
|
||||
foreach (JObject teamGroupRow in teamGroupData)
|
||||
{
|
||||
JObject values = teamGroupRow.Value<JObject>("values");
|
||||
int rowIndex = teamGroupRow.Value<int>("index");
|
||||
Model.Report_CQMS_MonthReportItem newDetail = new Model.Report_CQMS_MonthReportItem
|
||||
{
|
||||
ReportId = ReportId,
|
||||
ReType = "10-6",
|
||||
ContentName = values.Value<string>("WorkName"),
|
||||
MonthsCount = values.Value<int>("CheckNum"), //当前检查点数
|
||||
MonthsBackCount = values.Value<int>("TotalCheckNum"),//累计点数
|
||||
|
||||
ProjectCount = values.Value<int>("OKNum"),//当前合格点数
|
||||
TotalNoBackCount = values.Value<int>("TotalOKNum"),//累计合格点数
|
||||
|
||||
RectificationRate = values.Value<string>("OneOKRate"),//本月合格点数
|
||||
Remarks = values.Value<string>("TotalOneOKRate"),//本月累计合格点数
|
||||
};
|
||||
if (GvFf.Rows[rowIndex].DataKeys.Length > 0)
|
||||
{
|
||||
newDetail.Id = GvFf.Rows[rowIndex].DataKeys[0].ToString();
|
||||
}
|
||||
detailLists.Add(newDetail);
|
||||
}
|
||||
if (detailLists.Count > 0)
|
||||
{
|
||||
Funs.DB.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
void saveXFInspection() //检验批统计:消防
|
||||
{
|
||||
List<Model.Report_CQMS_MonthReportItem> detailLists = new List<Model.Report_CQMS_MonthReportItem>();
|
||||
JArray teamGroupData = GvXf.GetMergedData();
|
||||
foreach (JObject teamGroupRow in teamGroupData)
|
||||
{
|
||||
JObject values = teamGroupRow.Value<JObject>("values");
|
||||
int rowIndex = teamGroupRow.Value<int>("index");
|
||||
Model.Report_CQMS_MonthReportItem newDetail = new Model.Report_CQMS_MonthReportItem
|
||||
{
|
||||
ReportId = ReportId,
|
||||
ReType = "10-7",
|
||||
ContentName = values.Value<string>("WorkName"),
|
||||
MonthsCount = values.Value<int>("CheckNum"), //当前检查点数
|
||||
MonthsBackCount = values.Value<int>("TotalCheckNum"),//累计点数
|
||||
|
||||
ProjectCount = values.Value<int>("OKNum"),//当前合格点数
|
||||
TotalNoBackCount = values.Value<int>("TotalOKNum"),//累计合格点数
|
||||
|
||||
RectificationRate = values.Value<string>("OneOKRate"),//本月合格点数
|
||||
Remarks = values.Value<string>("TotalOneOKRate"),//本月累计合格点数
|
||||
};
|
||||
if (GvXf.Rows[rowIndex].DataKeys.Length > 0)
|
||||
{
|
||||
newDetail.Id = GvXf.Rows[rowIndex].DataKeys[0].ToString();
|
||||
}
|
||||
detailLists.Add(newDetail);
|
||||
}
|
||||
if (detailLists.Count > 0)
|
||||
{
|
||||
Funs.DB.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
void saveInspectionDataInspection()
|
||||
{
|
||||
List<Model.Report_CQMS_MonthReportItem> detailLists = new List<Model.Report_CQMS_MonthReportItem>();
|
||||
@@ -1602,11 +1855,11 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||
{
|
||||
ReportId = ReportId,
|
||||
ReType = "10",
|
||||
ContentName = values.Value<string>("ContentName"),
|
||||
MonthsCount = values.Value<int>("MonthsCount"),
|
||||
ProjectCount = values.Value<int>("ProjectCount"),
|
||||
//RectificationRate = values.Value<string>("RectificationRate"),
|
||||
Remarks = values.Value<string>("Remarks")
|
||||
ContentName = values.Value<string>("WorkName"),
|
||||
RectificationRate = values.Value<string>("OneOKRate"),
|
||||
TotationRate = values.Value<string>("TotalOneOKRate"),
|
||||
|
||||
Remarks = values.Value<string>("Remarks"),
|
||||
};
|
||||
if (gvInspectionDataInspection.Rows[rowIndex].DataKeys.Length > 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user