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

View File

@ -65,7 +65,12 @@
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtImplementationFrontState" runat="server" Label="实施状态" MaxLength="50" LabelAlign="Right" LabelWidth="130px"></f:TextBox>
<f:DropDownList ID="ddlImplementationFrontState" runat="server" Label="实施状态" Required="true" LabelAlign="Right" LabelWidth="130px">
<f:ListItem Value="" Text="-请选择-" Selected="true" />
<f:ListItem Value="整改中" Text="整改中" />
<f:ListItem Value="已闭合" Text="已闭合" />
</f:DropDownList>
<f:TextBox ID="txtResponsibleMan" runat="server" Label="责任人" MaxLength="100" LabelAlign="Right" LabelWidth="130px"></f:TextBox>
</Items>
</f:FormRow>
@ -83,7 +88,7 @@
<Items>
<f:Panel ID="Panel2" ShowHeader="false" ShowBorder="false" Layout="Column" CssClass="" runat="server">
<Items>
<f:Label ID="Label1" runat="server" Label="上传附件"
<f:Label ID="Label1" ShowRedStar="true" runat="server" Label="上传附件"
LabelAlign="Right" LabelWidth="130px">
</f:Label>
<f:Button ID="btnAttach" Icon="TableCell" EnablePostBack="true" Text="附件" runat="server" OnClick="btnAttach_Click">

View File

@ -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) //数据库没有记录 直接点提交 当前状态为 审核状态

View File

@ -121,13 +121,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
protected global::FineUIPro.DropDownList drpUnitIds;
/// <summary>
/// txtImplementationFrontState 控件。
/// ddlImplementationFrontState 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtImplementationFrontState;
protected global::FineUIPro.DropDownList ddlImplementationFrontState;
/// <summary>
/// txtResponsibleMan 控件。

View File

@ -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);

View File

@ -869,7 +869,7 @@
</f:Form>
</Items>
</f:Panel>
<%--9.计量器具报验管理情况--%>
<%--9.计量器具报验管理情况--%>
<f:Panel ID="Pnl9" IsFluid="true" Title="9.计量器具报验管理情况" runat="server" EnableCollapse="false"
ShowHeader="true">
<Items>
@ -1302,15 +1302,15 @@
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center"
TextAlign="Center" />
<f:RenderField Width="300px" ColumnID="ContentName" DataField="ContentName" ExpandUnusedSpace="true"
<f:RenderField Width="300px" ColumnID="WorkName" DataField="WorkName" ExpandUnusedSpace="true"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="施工分包商">
</f:RenderField>
<f:RenderField Width="250px" ColumnID="MonthsCount" DataField="MonthsCount"
<f:RenderField Width="250px" ColumnID="OneOKRate" DataField="OneOKRate"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="本月一次共捡合格率">
</f:RenderField>
<f:RenderField Width="160px" ColumnID="ProjectCount" DataField="ProjectCount"
<f:RenderField Width="160px" ColumnID="TotalOneOKRate" DataField="TotalOneOKRate"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="项目累计一次共捡合格率">
</f:RenderField>
</f:RenderField>
<f:RenderField Width="200px" ColumnID="Remarks" DataField="Remarks"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="备注">
<Editor>

View File

@ -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<Model.Report_CQMS_MonthReportItem>();
var list = new List<Model.CheckStatisc>();
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<string>("ContentName"),
MonthsCount = values.Value<int>("MonthsCount"),
ProjectCount = values.Value<int>("ProjectCount"),
//RectificationRate = values.Value<string>("RectificationRate"),
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)

View File

@ -13,20 +13,24 @@
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="控制点检查检测合格率统计" EnableCollapse="true"
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="控制点检查检测合格率统计" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="CheckDate" AllowCellEditing="true" EnableColumnLines="true"
ClicksToEdit="2" DataIDField="CheckDate" AllowSorting="true" SortField="CheckDate" ForceFit="true"
SortDirection="ASC" EnableTextSelection="true">
<Toolbars>
<f:Toolbar ID="ToolSearch" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:DropDownList ID="drpCNProfessional" runat="server" Label="专业" LabelAlign="Right" EnableEdit="true" LabelWidth="110px">
<f:DropDownList ID="drpZhType" runat="server" Label="类别" LabelAlign="Right" EnableEdit="true" LabelWidth="110px" AutoPostBack="true" OnSelectedIndexChanged="drpZhType_SelectedIndexChanged">
<f:ListItem Value="1" Text="专业" Selected="true" />
<f:ListItem Value="2" Text="单位名称" />
</f:DropDownList>
<f:DropDownList ID="drpCNProfessional" runat="server" Label="" LabelAlign="Right" EnableEdit="true">
</f:DropDownList>
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" Label="开始日期" ID="txtStartTime"
LabelAlign="right" >
LabelAlign="right">
</f:DatePicker>
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" Label="结束日期" ID="txtEndTime"
LabelAlign="right" >
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" Label="结束日期" ID="txtEndTime"
LabelAlign="right">
</f:DatePicker>
<f:Button ID="btnSearch" Icon="SystemSearch" ToolTip="查询"
EnablePostBack="true" runat="server" OnClick="btnSearch_Click">

View File

@ -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;
}
}
}

View File

@ -57,6 +57,15 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
/// </remarks>
protected global::FineUIPro.Toolbar ToolSearch;
/// <summary>
/// drpZhType 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpZhType;
/// <summary>
/// drpCNProfessional 控件。
/// </summary>

View File

@ -12,7 +12,7 @@
<appSettings>
<!--连接字符串-->
<!--<add key="ConnectionString" value="Server=.;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>-->
<add key="ConnectionString" value="Server=DESKTOP-1QITK9E\MSSQLSERVER2;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=123;MultipleActiveResultSets=true;Connect Timeout=1200"/>
<add key="ConnectionString" value="Server=.\SQL2012;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>
<!--系统名称-->
<add key="SystemName" value="智慧施工管理信息系统V1.0"/>
<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/Images/;"/>

View File

@ -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; }
}
}
}