From 1aa2c9a2b520f47a2a40b6d3c71c7db0996de492 Mon Sep 17 00:00:00 2001
From: wendy <408182087@qq.com>
Date: Tue, 16 Apr 2024 16:28:26 +0800
Subject: [PATCH] =?UTF-8?q?20240416=20=E8=B4=A8=E9=87=8F=E6=9C=88=E6=8A=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../CQMS/Comprehensive/NCRManagementEdit.aspx | 9 +-
.../Comprehensive/NCRManagementEdit.aspx.cs | 41 +++-
.../NCRManagementEdit.aspx.designer.cs | 4 +-
.../CQMS/ManageReportNew/MonthReport.aspx.cs | 15 +-
.../CQMS/ManageReportNew/MonthReportEdit.aspx | 10 +-
.../ManageReportNew/MonthReportEdit.aspx.cs | 105 ++++++---
.../InspectionManagementStatistics.aspx | 14 +-
.../InspectionManagementStatistics.aspx.cs | 218 ++++++++++++++----
...ctionManagementStatistics.aspx.designer.cs | 9 +
SGGL/FineUIPro.Web/Web.config | 2 +-
SGGL/Model/CQMS/CheckStatisc.cs | 12 +
11 files changed, 337 insertions(+), 102 deletions(-)
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx
index c75baf46..653c6db2 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx
@@ -65,7 +65,12 @@
-
+
+
+
+
+
+
@@ -83,7 +88,7 @@
-
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.cs
index 5abfa10e..0b4321f5 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.cs
@@ -83,12 +83,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
this.ddlProblem.SelectedValue = nCRManagement.Problem;
}
- this.txtMeasure.Text = nCRManagement.Measure;
+ this.txtMeasure.Text = nCRManagement.Measure;
+
this.txtResponsibleMan.Text = nCRManagement.ResponsibleMan;
- this.txtImplementationFrontState.Text = nCRManagement.ImplementationFrontState;
-
-
+ //this.txtImplementationFrontState.Text = nCRManagement.ImplementationFrontState;
+ this.ddlImplementationFrontState.SelectedValue = nCRManagement.ImplementationFrontState;
+
var currApprove = NCRManagementApproveService.GetCurrentApprove(nCRManagement.NCRManagementId);
if (currApprove != null)
{
@@ -142,7 +143,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
this.txtCompleteDate.Readonly = true;
this.drpCNProfessionalId.Readonly = true;
this.txtContents.Readonly = true;
- this.txtImplementationFrontState.Readonly = true;
+ this.ddlImplementationFrontState.Readonly = true;
this.txtIssuedDate.Readonly = true;
this.txtNCRCode.Readonly = true;
this.txtResponsibleMan.Readonly = true;
@@ -237,7 +238,9 @@ namespace FineUIPro.Web.CQMS.Comprehensive
nCRManagement.CompleteDate = Convert.ToDateTime(this.txtCompleteDate.Text);
}
nCRManagement.ResponsibleMan = this.txtResponsibleMan.Text.Trim();
- nCRManagement.ImplementationFrontState = this.txtImplementationFrontState.Text.Trim();
+ nCRManagement.ImplementationFrontState = this.ddlImplementationFrontState.SelectedValue.Trim();
+
+
string ids = string.Empty;
var lists = this.drpUnitWorkIds.SelectedValueArray;
foreach (var item in lists)
@@ -272,6 +275,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
nCRManagement.NCRManagementId = SQLHelper.GetNewID(typeof(Model.Comprehensive_NCRManagement));
this.hdAttachUrl.Text = nCRManagement.NCRManagementId;
}
+ var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == nCRManagement.NCRManagementId);
+ if (sour == null || string.IsNullOrEmpty(sour.AttachUrl))
+ {
+ Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning);
+ return;
+ }
nCRManagement.CompileMan = this.CurrUser.UserId;
nCRManagement.Status = BLL.Const.Comprehensive_Compile;
BLL.NCRManagementService.AddNCRManagement(nCRManagement);
@@ -279,6 +288,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
else
{
nCRManagement.NCRManagementId = this.NCRManagementId;
+ var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.NCRManagementId);
+ if (sour == null || string.IsNullOrEmpty(sour.AttachUrl))
+ {
+ Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning);
+ return;
+ }
var model = Funs.DB.Comprehensive_NCRManagement.Where(u => u.NCRManagementId == this.NCRManagementId).FirstOrDefault();
if (model != null)
{
@@ -344,7 +359,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
nCRManagement.CompleteDate = Convert.ToDateTime(this.txtCompleteDate.Text);
}
nCRManagement.ResponsibleMan = this.txtResponsibleMan.Text.Trim();
- nCRManagement.ImplementationFrontState = this.txtImplementationFrontState.Text.Trim();
+ nCRManagement.ImplementationFrontState = this.ddlImplementationFrontState.SelectedValue.Trim();
string ids = string.Empty;
var lists = this.drpUnitWorkIds.SelectedValueArray;
foreach (var item in lists)
@@ -379,6 +394,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
nCRManagement.NCRManagementId = SQLHelper.GetNewID(typeof(Model.Comprehensive_NCRManagement));
this.hdAttachUrl.Text = nCRManagement.NCRManagementId;
}
+ var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == nCRManagement.NCRManagementId);
+ if (sour == null || string.IsNullOrEmpty(sour.AttachUrl))
+ {
+ Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning);
+ return;
+ }
nCRManagement.CompileMan = this.CurrUser.UserId;
nCRManagement.Status = BLL.Const.Comprehensive_Audit;
BLL.NCRManagementService.AddNCRManagement(nCRManagement);
@@ -386,6 +407,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
else
{
nCRManagement.NCRManagementId = this.NCRManagementId;
+ var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.NCRManagementId);
+ if (sour == null || string.IsNullOrEmpty(sour.AttachUrl))
+ {
+ Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning);
+ return;
+ }
//BLL.NCRManagementService.UpdateNCRManagement(nCRManagement);
var oldNCRManagement = Funs.DB.Comprehensive_NCRManagement.Where(u => u.NCRManagementId == this.NCRManagementId).FirstOrDefault();
if (oldNCRManagement == null) //数据库没有记录 直接点提交 当前状态为 审核状态
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.designer.cs
index f844bd96..9d5d8213 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.designer.cs
@@ -121,13 +121,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
protected global::FineUIPro.DropDownList drpUnitIds;
///
- /// txtImplementationFrontState 控件。
+ /// ddlImplementationFrontState 控件。
///
///
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::FineUIPro.TextBox txtImplementationFrontState;
+ protected global::FineUIPro.DropDownList ddlImplementationFrontState;
///
/// txtResponsibleMan 控件。
diff --git a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReport.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReport.aspx.cs
index c3ca791d..996ae474 100644
--- a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReport.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReport.aspx.cs
@@ -2261,18 +2261,21 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
}
numberIndex = 1;
int? num1 = 0, num2 = 0;
+ int MonthsCountstring = 0, ProjectCountstring = 0;
foreach (var item in InspectionDataInspection)
{
+ MonthsCountstring = Convert.ToInt32(item.RectificationRate.Replace("%", ""));
+ ProjectCountstring = Convert.ToInt32(item.TotationRate.Replace("%", ""));
//创建行
Row row = new Row(doc);
row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width));
row.Cells.Add(CreateCell(item.ContentName, doc, table.FirstRow.Cells[1].CellFormat.Width));
- row.Cells.Add(CreateCell(item.MonthsCount.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
- row.Cells.Add(CreateCell(item.ProjectCount.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
+ row.Cells.Add(CreateCell(item.RectificationRate.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
+ row.Cells.Add(CreateCell(item.TotationRate.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
row.Cells.Add(CreateCell(item.Remarks, doc, table.FirstRow.Cells[4].CellFormat.Width));
table.Rows.Insert(numberIndex, row);
- num1 += item.MonthsCount;
- num2 += item.ProjectCount;
+ num1 += MonthsCountstring;
+ num2 += ProjectCountstring;
numberIndex += 1;
}
//自动设置表格样式
@@ -2282,8 +2285,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
Row rowhj = new Row(doc);
rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[0].CellFormat.Width));
rowhj.Cells.Add(CreateCell("合计", doc, table.FirstRow.Cells[1].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
+ rowhj.Cells.Add(CreateCell(num1.ToString() + "%", doc, table.FirstRow.Cells[2].CellFormat.Width));
+ rowhj.Cells.Add(CreateCell(num2.ToString() + "%", doc, table.FirstRow.Cells[3].CellFormat.Width));
rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[4].CellFormat.Width));
table.Rows.Insert(numberIndex, rowhj);
diff --git a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx
index 51b7f5fe..7c94fc41 100644
--- a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx
@@ -869,7 +869,7 @@
- <%--9.计量器具报验管理情况--%>
+ <%--9.计量器具报验管理情况--%>
@@ -1302,15 +1302,15 @@
-
-
-
-
+
diff --git a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx.cs
index 643d5945..6acde988 100644
--- a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx.cs
@@ -1499,11 +1499,19 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
var db = Funs.DB;
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
- var list = new List();
+ var list = new List();
int i = 1;
- int Quantity1Sum = 0;
- int Quantity2Sum = 0;
+ int CheckNum = 0;//本月检查点数
+ int TotalCheckNum = 0;//累计检查点数
+
+ int OKNum = 0;//本月检查合格点数
+ int TotalOKNum = 0;//累计检查合格点数
+
+ string Quantity1Sum = String.Empty;//本月检查合格点数/本月检查点数
+ string Quantity2Sum = String.Empty;//累计检查合格点数/累计检查点数
+
+
//加载所有单位
var units = from x in Funs.DB.Project_ProjectUnit
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
@@ -1521,43 +1529,85 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
c.CheckDate,
c.ProjectId,
u.UnitId,
- u.UnitName
+ u.UnitName,
+ c.IsOnceQualified
};
var AllList = query.ToList();
var monethCount = query
.Where(x => (x.CheckDate >= Convert.ToDateTime(startDate) && x.CheckDate <= Convert.ToDateTime(endDate)));
- Model.Report_CQMS_MonthReportItem model = new Model.Report_CQMS_MonthReportItem();
- model.Id = Guid.NewGuid().ToString();
- model.ContentName = item.UnitName;
- model.MonthsCount = monethCount.Count();
- model.ProjectCount = AllList.Count();
- model.ReportId = ReportId;
+
+
+ Model.CheckStatisc checkStatisc = new Model.CheckStatisc();
+ checkStatisc.Id = Guid.NewGuid().ToString();
+ 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);
+
+ if (checkStatisc.CheckNum != 0)//被除数不能为零
+ {
+ checkStatisc.OneOKRate = Math.Round((double)checkStatisc.OKNum / (double)checkStatisc.CheckNum * 100, 2) + "%";//保留两位小数、后四舍五入
+ }
+ else
+ {
+ checkStatisc.OneOKRate = "0%";
+ }
+
+ if (checkStatisc.TotalCheckNum != 0)//被除数不能为零
+ {
+ checkStatisc.TotalOneOKRate = Math.Round((double)checkStatisc.TotalOKNum / (double)checkStatisc.TotalCheckNum * 100, 2) + "%";//保留两位小数、后四舍五入
+ }
+ else
+ {
+ checkStatisc.TotalOneOKRate = "0%";
+ }
//如果是修改,查询表中数据
if (objType == "1")
{
var NewModel = db.Report_CQMS_MonthReportItem.FirstOrDefault(x => x.ReportId == ReportId && x.ContentName == item.UnitName && x.ReType == "10");
if (NewModel != null)
{
- model.RectificationRate = NewModel.RectificationRate;
- model.Remarks = NewModel.Remarks;
+ checkStatisc.Remarks = NewModel.Remarks;
}
}
- list.Add(model);
+ list.Add(checkStatisc);
+
+ CheckNum += checkStatisc.CheckNum;
+ TotalCheckNum += checkStatisc.TotalCheckNum;
+
+ OKNum += checkStatisc.OKNum;
+ TotalOKNum += checkStatisc.TotalOKNum;
- Quantity1Sum += monethCount.Count();
- Quantity2Sum += AllList.Count();
i++;
}
gvInspectionDataInspection.DataSource = list;
gvInspectionDataInspection.DataBind();
+ if (CheckNum != 0)//被除数不能为零
+ {
+ Quantity1Sum = Math.Round((double)OKNum / (double)CheckNum * 100, 2) + "%";//保留两位小数、后四舍五入
+ }
+ else
+ {
+ Quantity1Sum = "0%";
+ }
+ if (TotalCheckNum != 0)//被除数不能为零
+ {
+ Quantity2Sum = Math.Round((double)TotalOKNum / (double)TotalCheckNum * 100, 2) + "%";//保留两位小数、后四舍五入
+ }
+ else
+ {
+ Quantity2Sum = "0%";
+ }
//合计
JObject summary = new JObject();
- summary.Add("ContentName", "合计");
- summary.Add("MonthsCount", Quantity1Sum.ToString());
- summary.Add("ProjectCount", Quantity2Sum.ToString());
+ summary.Add("WorkName", "合计");
+ summary.Add("OneOKRate", Quantity1Sum.ToString());
+ summary.Add("TotalOneOKRate", Quantity2Sum.ToString());
gvInspectionDataInspection.SummaryData = summary;
#endregion
@@ -1647,7 +1697,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
}
else
{
- OneOKRate = "0%";
+ OneOKRate = "0";
}
if (TotalCheckNum != 0)//被除数不能为零
{
@@ -1655,7 +1705,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
}
else
{
- TotalOneOKRate = "0%";
+ TotalOneOKRate = "0";
}
//检验批统计:土建
@@ -2071,7 +2121,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
u.UnitId,
u.UnitName,
c.IssuedDate,
- c.Status
+ c.Status,
+ c.ImplementationFrontState,
};
var AllList = query.ToList();
@@ -2083,8 +2134,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
NCRStatisc.WorkName = item.UnitName;
//NCRStatisc.CurrentPeriodOkNum = unitNCRStatic.Count(x => x.Status == "3");
//NCRStatisc.OKNum = AllList.Count(x => x.Status == "3");
- NCRStatisc.CurrentPeriodOkNum = unitNCRStatic.Count();
- NCRStatisc.OKNum = AllList.Count();
+ NCRStatisc.CurrentPeriodOkNum = unitNCRStatic.Where(x => x.ImplementationFrontState.Trim().Equals("已闭合")).Count();
+ NCRStatisc.OKNum = AllList.Where(x => x.ImplementationFrontState.Trim().Equals("已闭合")).Count();
NCRStatisc.CheckNum = AllList.Count();
@@ -3427,10 +3478,10 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
ReportId = ReportId,
ReType = "10",
- ContentName = values.Value("ContentName"),
- MonthsCount = values.Value("MonthsCount"),
- ProjectCount = values.Value("ProjectCount"),
- //RectificationRate = values.Value("RectificationRate"),
+ ContentName = values.Value("WorkName"),
+ RectificationRate = values.Value("OneOKRate"),
+ TotationRate = values.Value("TotalOneOKRate"),
+
Remarks = values.Value("Remarks"),
};
if (gvInspectionDataInspection.Rows[rowIndex].DataKeys.Length > 0)
diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx
index 9ced3062..e41e3da7 100644
--- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx
@@ -13,20 +13,24 @@
-
-
+
+
+
+
+
+ LabelAlign="right">
-
+
diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx.cs
index 681a183f..e197618a 100644
--- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx.cs
@@ -21,8 +21,19 @@ namespace FineUIPro.Web.CQMS.ProcessControl
{
if (!IsPostBack)
{
- BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessional, true);//专业
- BindGvInspectionManagement(null);
+ if (drpZhType.SelectedValue.Equals("1"))
+ {
+ BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessional, false);//专业
+ drpCNProfessional.Items.Insert(0, new FineUIPro.ListItem("- 请选择专业 -", BLL.Const._Null));
+ }
+ else
+ {
+ BLL.UnitService.InitUnitDownList(this.drpCNProfessional, this.CurrUser.LoginProjectId, false);//施工分包商
+ drpCNProfessional.Items.Insert(0, new FineUIPro.ListItem("- 请选择单位名称 -", BLL.Const._Null));
+ }
+ BindGvInspectionManagement(this.drpZhType.SelectedValue, this.drpCNProfessional.SelectedValue);
+
+
}
}
#region 绑定GridView
@@ -30,7 +41,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 绑定
///
///
- public void BindGvInspectionManagement(string cNProfessionalId)
+ public void BindGvInspectionManagement(string ZyType, string cNProfessionalId)
{
if (string.IsNullOrEmpty(this.txtStartTime.Text.Trim()) && string.IsNullOrEmpty(this.txtEndTime.Text.Trim())) //未选择日期,统计项目开始起的每月数据
{
@@ -49,10 +60,22 @@ namespace FineUIPro.Web.CQMS.ProcessControl
{
if (DateTime.Now < NewDate)
{
- //统计所给时间段的全部数量
- List managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, false);
- //统计所给时间段的合格数量
- List managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true);
+ List managementListSunNumber = new List();
+ List managementListOneNumber = new List();
+ if (ZyType == "1")
+ {
+ //统计所给时间段的全部数量
+ managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, false);
+ //统计所给时间段的合格数量
+ managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true);
+ }
+ else
+ {
+ //统计所给时间段的全部数量
+ managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, false);
+ //统计所给时间段的合格数量
+ managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true);
+ }
Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", DateTime.Now);
Statistics.SunNumber = managementListSunNumber.Count();
@@ -70,12 +93,24 @@ namespace FineUIPro.Web.CQMS.ProcessControl
}
else
{
+ List managementListSunNumber = new List();
+ List managementListOneNumber = new List();
NextDate = Convert.ToDateTime(StartDate.Year + "-" + StartDate.Month + "-25");
- //统计所给事件段的全部数量
- List managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NextDate, false);
- //统计所给事件段的合格数量
- List managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NextDate, true);
+ if (ZyType == "1")
+ {
+ //统计所给事件段的全部数量
+ managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NextDate, false);
+ //统计所给事件段的合格数量
+ managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NextDate, true);
+ }
+ else
+ {
+ //统计所给事件段的全部数量
+ managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NextDate, false);
+ //统计所给事件段的合格数量
+ managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NextDate, true);
+ }
Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", NextDate);
Statistics.SunNumber = managementListSunNumber.Count();
Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
@@ -93,10 +128,25 @@ namespace FineUIPro.Web.CQMS.ProcessControl
{
if (DateTime.Now < NewDate)
{
- //统计所给事件段的全部数量
- List managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, false);
- //统计所给事件段的合格数量
- List managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true);
+ List managementListSunNumber = new List();
+ List managementListOneNumber = new List();
+ if (ZyType == "1")
+ {
+ //统计所给事件段的全部数量
+ managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, false);
+ //统计所给事件段的合格数量
+ managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true);
+
+ }
+ else
+ {
+ //统计所给事件段的全部数量
+ managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, false);
+ //统计所给事件段的合格数量
+ managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true);
+
+ }
+
Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", DateTime.Now);
Statistics.SunNumber = managementListSunNumber.Count();
@@ -115,10 +165,22 @@ namespace FineUIPro.Web.CQMS.ProcessControl
}
else
{
- //统计所给事件段的全部数量
- List managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, false);
- //统计所给事件段的合格数量
- List managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, true);
+ List managementListSunNumber = new List();
+ List managementListOneNumber = new List();
+ if (ZyType == "1")
+ {
+ //统计所给事件段的全部数量
+ managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, false);
+ //统计所给事件段的合格数量
+ managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, true);
+ }
+ else
+ {
+ //统计所给事件段的全部数量
+ managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, false);
+ //统计所给事件段的合格数量
+ managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, true);
+ }
Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", NewDate);
Statistics.SunNumber = managementListSunNumber.Count();
Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
@@ -151,11 +213,23 @@ namespace FineUIPro.Web.CQMS.ProcessControl
NewDate = Convert.ToDateTime(NextDate.Year + "-" + NextDate.Month + "-25");
if (DateTime.Now < NewDate)
{
- //统计所给事件段的全部数量
- List managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, false);
- //统计所给事件段的合格数量
- List managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true);
+ List managementListSunNumber = new List();
+ List managementListOneNumber = new List();
+ if (ZyType == "1")
+ {
+ //统计所给事件段的全部数量
+ managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, false);
+ //统计所给事件段的合格数量
+ managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true);
+ }
+ else
+ {
+ //统计所给事件段的全部数量
+ managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, false);
+ //统计所给事件段的合格数量
+ managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true);
+ }
Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", DateTime.Now);
Statistics.SunNumber = managementListSunNumber.Count();
Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
@@ -173,10 +247,21 @@ namespace FineUIPro.Web.CQMS.ProcessControl
}
else
{
- //统计所给事件段的全部数量
- List managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, false);
- //统计所给事件段的合格数量
- List managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, true);
+ List managementListSunNumber = new List();
+ List managementListOneNumber = new List();
+ if (ZyType == "1")
+ {
+ //统计所给事件段的全部数量
+ managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, false);
+ //统计所给事件段的合格数量
+ managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, true);
+ }
+ else
+ { //统计所给事件段的全部数量
+ managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, false);
+ //统计所给事件段的合格数量
+ managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, true);
+ }
Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", NewDate);
Statistics.SunNumber = managementListSunNumber.Count();
Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
@@ -231,10 +316,25 @@ namespace FineUIPro.Web.CQMS.ProcessControl
EndDate = Convert.ToDateTime(this.txtEndTime.Text.Trim());
}
Model.InspectionManagementStatistics Statistics = new Model.InspectionManagementStatistics();
- //统计所给时间段的全部数量
- List managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, EndDate, false);
- //统计所给时间段的合格数量
- List managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, EndDate, true);
+
+
+ List managementListSunNumber = new List();
+ List managementListOneNumber = new List();
+ if (ZyType == "1")
+ {
+ //统计所给时间段的全部数量
+ managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, EndDate, false);
+ //统计所给时间段的合格数量
+ managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, EndDate, true);
+
+ }
+ else
+ {
+ //统计所给时间段的全部数量
+ managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, EndDate, false);
+ //统计所给时间段的合格数量
+ managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, EndDate, true);
+ }
Statistics.CheckDate = string.Format("{0:yyyy-MM-dd}", StartDate) + " 至 " + string.Format("{0:yyyy-MM-dd}", EndDate);
Statistics.SunNumber = managementListSunNumber.Count();
Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
@@ -255,14 +355,16 @@ namespace FineUIPro.Web.CQMS.ProcessControl
protected void btnSearch_Click(object sender, EventArgs e)
{
- if (this.drpCNProfessional.SelectedValue != BLL.Const._Null)
- {
- BindGvInspectionManagement(this.drpCNProfessional.SelectedValue);
- }
- else
- {
- BindGvInspectionManagement(null);
- }
+ BindGvInspectionManagement(this.drpZhType.SelectedValue, this.drpCNProfessional.SelectedValue);
+
+ //if (this.drpCNProfessional.SelectedValue != BLL.Const._Null)
+ //{
+ // BindGvInspectionManagement(this.drpCNProfessional.SelectedValue);
+ //}
+ //else
+ //{
+ // BindGvInspectionManagement(null);
+ //}
}
@@ -274,16 +376,38 @@ namespace FineUIPro.Web.CQMS.ProcessControl
Response.ContentType = "application/excel";
Response.ContentEncoding = Encoding.UTF8;
this.Grid1.PageSize = Grid1.RecordCount;
- if (this.drpCNProfessional.SelectedValue != BLL.Const._Null)
- {
- BindGvInspectionManagement(this.drpCNProfessional.SelectedValue);
- }
- else
- {
- BindGvInspectionManagement(null);
- }
+ //if (this.drpCNProfessional.SelectedValue != BLL.Const._Null)
+ //{
+ // BindGvInspectionManagement(this.drpCNProfessional.SelectedValue);
+ //}
+ //else
+ //{
+ // BindGvInspectionManagement(null);
+ //}
+ BindGvInspectionManagement(this.drpZhType.SelectedValue, this.drpCNProfessional.SelectedValue);
Response.Write(GetGridTableHtml2(Grid1));
Response.End();
}
+
+ ///
+ ///下拉动态加载数据信息
+ ///
+ ///
+ ///
+ protected void drpZhType_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ this.drpCNProfessional.Items.Clear();
+ if (drpZhType.SelectedValue.Equals("1"))
+ {
+ BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessional, false);//专业
+ drpCNProfessional.Items.Insert(0, new FineUIPro.ListItem("- 请选择专业 -", BLL.Const._Null));
+ }
+ else
+ {
+ BLL.UnitService.InitUnitDownList(this.drpCNProfessional, this.CurrUser.LoginProjectId, false);//施工分包商
+ drpCNProfessional.Items.Insert(0, new FineUIPro.ListItem("- 请选择单位 -", BLL.Const._Null));
+ }
+ this.drpCNProfessional.SelectedIndex = 0;
+ }
}
}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx.designer.cs
index 1414cd3e..d39c7ade 100644
--- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx.designer.cs
@@ -57,6 +57,15 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
///
protected global::FineUIPro.Toolbar ToolSearch;
+ ///
+ /// drpZhType 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpZhType;
+
///
/// drpCNProfessional 控件。
///
diff --git a/SGGL/FineUIPro.Web/Web.config b/SGGL/FineUIPro.Web/Web.config
index 1ba63cb7..9fc55c34 100644
--- a/SGGL/FineUIPro.Web/Web.config
+++ b/SGGL/FineUIPro.Web/Web.config
@@ -12,7 +12,7 @@
-
+
diff --git a/SGGL/Model/CQMS/CheckStatisc.cs b/SGGL/Model/CQMS/CheckStatisc.cs
index 68ad2819..ecff1acc 100644
--- a/SGGL/Model/CQMS/CheckStatisc.cs
+++ b/SGGL/Model/CQMS/CheckStatisc.cs
@@ -96,5 +96,17 @@ namespace Model
get { return id; }
set { id = value; }
}
+
+ public string ReportId
+ {
+ get { return ReportId; }
+ set { ReportId = value; }
+ }
+
+ public string Remarks
+ {
+ get { return Remarks; }
+ set { Remarks = value; }
+ }
}
}