20240416 质量月报

This commit is contained in:
2024-04-16 16:28:26 +08:00
parent bfdc028335
commit 1aa2c9a2b5
11 changed files with 337 additions and 102 deletions
@@ -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
/// 绑定
/// </summary>
/// <param name="cNProfessionalId"></param>
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<Model.View_CQMS_InspectionManagementDetail> managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, false);
//统计所给时间段的合格数量
List<Model.View_CQMS_InspectionManagementDetail> managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true);
List<Model.View_CQMS_InspectionManagementDetail> managementListSunNumber = new List<Model.View_CQMS_InspectionManagementDetail>();
List<Model.View_CQMS_InspectionManagementDetail> managementListOneNumber = new List<Model.View_CQMS_InspectionManagementDetail>();
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<Model.View_CQMS_InspectionManagementDetail> managementListSunNumber = new List<Model.View_CQMS_InspectionManagementDetail>();
List<Model.View_CQMS_InspectionManagementDetail> managementListOneNumber = new List<Model.View_CQMS_InspectionManagementDetail>();
NextDate = Convert.ToDateTime(StartDate.Year + "-" + StartDate.Month + "-25");
//统计所给事件段的全部数量
List<Model.View_CQMS_InspectionManagementDetail> managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NextDate, false);
//统计所给事件段的合格数量
List<Model.View_CQMS_InspectionManagementDetail> 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<Model.View_CQMS_InspectionManagementDetail> managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, false);
//统计所给事件段的合格数量
List<Model.View_CQMS_InspectionManagementDetail> managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true);
List<Model.View_CQMS_InspectionManagementDetail> managementListSunNumber = new List<Model.View_CQMS_InspectionManagementDetail>();
List<Model.View_CQMS_InspectionManagementDetail> managementListOneNumber = new List<Model.View_CQMS_InspectionManagementDetail>();
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<Model.View_CQMS_InspectionManagementDetail> managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, false);
//统计所给事件段的合格数量
List<Model.View_CQMS_InspectionManagementDetail> managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, true);
List<Model.View_CQMS_InspectionManagementDetail> managementListSunNumber = new List<Model.View_CQMS_InspectionManagementDetail>();
List<Model.View_CQMS_InspectionManagementDetail> managementListOneNumber = new List<Model.View_CQMS_InspectionManagementDetail>();
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<Model.View_CQMS_InspectionManagementDetail> managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, false);
//统计所给事件段的合格数量
List<Model.View_CQMS_InspectionManagementDetail> managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true);
List<Model.View_CQMS_InspectionManagementDetail> managementListSunNumber = new List<Model.View_CQMS_InspectionManagementDetail>();
List<Model.View_CQMS_InspectionManagementDetail> managementListOneNumber = new List<Model.View_CQMS_InspectionManagementDetail>();
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<Model.View_CQMS_InspectionManagementDetail> managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, false);
//统计所给事件段的合格数量
List<Model.View_CQMS_InspectionManagementDetail> managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, true);
List<Model.View_CQMS_InspectionManagementDetail> managementListSunNumber = new List<Model.View_CQMS_InspectionManagementDetail>();
List<Model.View_CQMS_InspectionManagementDetail> managementListOneNumber = new List<Model.View_CQMS_InspectionManagementDetail>();
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<Model.View_CQMS_InspectionManagementDetail> managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, EndDate, false);
//统计所给时间段的合格数量
List<Model.View_CQMS_InspectionManagementDetail> managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, EndDate, true);
List<Model.View_CQMS_InspectionManagementDetail> managementListSunNumber = new List<Model.View_CQMS_InspectionManagementDetail>();
List<Model.View_CQMS_InspectionManagementDetail> managementListOneNumber = new List<Model.View_CQMS_InspectionManagementDetail>();
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();
}
/// <summary>
///下拉动态加载数据信息
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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;
}
}
}