20240416 质量月报
This commit is contained in:
parent
bfdc028335
commit
1aa2c9a2b5
|
@ -65,7 +65,12 @@
|
||||||
</f:FormRow>
|
</f:FormRow>
|
||||||
<f:FormRow>
|
<f:FormRow>
|
||||||
<Items>
|
<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>
|
<f:TextBox ID="txtResponsibleMan" runat="server" Label="责任人" MaxLength="100" LabelAlign="Right" LabelWidth="130px"></f:TextBox>
|
||||||
</Items>
|
</Items>
|
||||||
</f:FormRow>
|
</f:FormRow>
|
||||||
|
@ -83,7 +88,7 @@
|
||||||
<Items>
|
<Items>
|
||||||
<f:Panel ID="Panel2" ShowHeader="false" ShowBorder="false" Layout="Column" CssClass="" runat="server">
|
<f:Panel ID="Panel2" ShowHeader="false" ShowBorder="false" Layout="Column" CssClass="" runat="server">
|
||||||
<Items>
|
<Items>
|
||||||
<f:Label ID="Label1" runat="server" Label="上传附件"
|
<f:Label ID="Label1" ShowRedStar="true" runat="server" Label="上传附件"
|
||||||
LabelAlign="Right" LabelWidth="130px">
|
LabelAlign="Right" LabelWidth="130px">
|
||||||
</f:Label>
|
</f:Label>
|
||||||
<f:Button ID="btnAttach" Icon="TableCell" EnablePostBack="true" Text="附件" runat="server" OnClick="btnAttach_Click">
|
<f:Button ID="btnAttach" Icon="TableCell" EnablePostBack="true" Text="附件" runat="server" OnClick="btnAttach_Click">
|
||||||
|
|
|
@ -85,9 +85,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||||
}
|
}
|
||||||
this.txtMeasure.Text = nCRManagement.Measure;
|
this.txtMeasure.Text = nCRManagement.Measure;
|
||||||
|
|
||||||
this.txtResponsibleMan.Text = nCRManagement.ResponsibleMan;
|
|
||||||
this.txtImplementationFrontState.Text = nCRManagement.ImplementationFrontState;
|
|
||||||
|
|
||||||
|
this.txtResponsibleMan.Text = nCRManagement.ResponsibleMan;
|
||||||
|
//this.txtImplementationFrontState.Text = nCRManagement.ImplementationFrontState;
|
||||||
|
this.ddlImplementationFrontState.SelectedValue = nCRManagement.ImplementationFrontState;
|
||||||
|
|
||||||
var currApprove = NCRManagementApproveService.GetCurrentApprove(nCRManagement.NCRManagementId);
|
var currApprove = NCRManagementApproveService.GetCurrentApprove(nCRManagement.NCRManagementId);
|
||||||
if (currApprove != null)
|
if (currApprove != null)
|
||||||
|
@ -142,7 +143,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||||
this.txtCompleteDate.Readonly = true;
|
this.txtCompleteDate.Readonly = true;
|
||||||
this.drpCNProfessionalId.Readonly = true;
|
this.drpCNProfessionalId.Readonly = true;
|
||||||
this.txtContents.Readonly = true;
|
this.txtContents.Readonly = true;
|
||||||
this.txtImplementationFrontState.Readonly = true;
|
this.ddlImplementationFrontState.Readonly = true;
|
||||||
this.txtIssuedDate.Readonly = true;
|
this.txtIssuedDate.Readonly = true;
|
||||||
this.txtNCRCode.Readonly = true;
|
this.txtNCRCode.Readonly = true;
|
||||||
this.txtResponsibleMan.Readonly = true;
|
this.txtResponsibleMan.Readonly = true;
|
||||||
|
@ -237,7 +238,9 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||||
nCRManagement.CompleteDate = Convert.ToDateTime(this.txtCompleteDate.Text);
|
nCRManagement.CompleteDate = Convert.ToDateTime(this.txtCompleteDate.Text);
|
||||||
}
|
}
|
||||||
nCRManagement.ResponsibleMan = this.txtResponsibleMan.Text.Trim();
|
nCRManagement.ResponsibleMan = this.txtResponsibleMan.Text.Trim();
|
||||||
nCRManagement.ImplementationFrontState = this.txtImplementationFrontState.Text.Trim();
|
nCRManagement.ImplementationFrontState = this.ddlImplementationFrontState.SelectedValue.Trim();
|
||||||
|
|
||||||
|
|
||||||
string ids = string.Empty;
|
string ids = string.Empty;
|
||||||
var lists = this.drpUnitWorkIds.SelectedValueArray;
|
var lists = this.drpUnitWorkIds.SelectedValueArray;
|
||||||
foreach (var item in lists)
|
foreach (var item in lists)
|
||||||
|
@ -272,6 +275,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||||
nCRManagement.NCRManagementId = SQLHelper.GetNewID(typeof(Model.Comprehensive_NCRManagement));
|
nCRManagement.NCRManagementId = SQLHelper.GetNewID(typeof(Model.Comprehensive_NCRManagement));
|
||||||
this.hdAttachUrl.Text = nCRManagement.NCRManagementId;
|
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.CompileMan = this.CurrUser.UserId;
|
||||||
nCRManagement.Status = BLL.Const.Comprehensive_Compile;
|
nCRManagement.Status = BLL.Const.Comprehensive_Compile;
|
||||||
BLL.NCRManagementService.AddNCRManagement(nCRManagement);
|
BLL.NCRManagementService.AddNCRManagement(nCRManagement);
|
||||||
|
@ -279,6 +288,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
nCRManagement.NCRManagementId = this.NCRManagementId;
|
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();
|
var model = Funs.DB.Comprehensive_NCRManagement.Where(u => u.NCRManagementId == this.NCRManagementId).FirstOrDefault();
|
||||||
if (model != null)
|
if (model != null)
|
||||||
{
|
{
|
||||||
|
@ -344,7 +359,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||||
nCRManagement.CompleteDate = Convert.ToDateTime(this.txtCompleteDate.Text);
|
nCRManagement.CompleteDate = Convert.ToDateTime(this.txtCompleteDate.Text);
|
||||||
}
|
}
|
||||||
nCRManagement.ResponsibleMan = this.txtResponsibleMan.Text.Trim();
|
nCRManagement.ResponsibleMan = this.txtResponsibleMan.Text.Trim();
|
||||||
nCRManagement.ImplementationFrontState = this.txtImplementationFrontState.Text.Trim();
|
nCRManagement.ImplementationFrontState = this.ddlImplementationFrontState.SelectedValue.Trim();
|
||||||
string ids = string.Empty;
|
string ids = string.Empty;
|
||||||
var lists = this.drpUnitWorkIds.SelectedValueArray;
|
var lists = this.drpUnitWorkIds.SelectedValueArray;
|
||||||
foreach (var item in lists)
|
foreach (var item in lists)
|
||||||
|
@ -379,6 +394,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||||
nCRManagement.NCRManagementId = SQLHelper.GetNewID(typeof(Model.Comprehensive_NCRManagement));
|
nCRManagement.NCRManagementId = SQLHelper.GetNewID(typeof(Model.Comprehensive_NCRManagement));
|
||||||
this.hdAttachUrl.Text = nCRManagement.NCRManagementId;
|
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.CompileMan = this.CurrUser.UserId;
|
||||||
nCRManagement.Status = BLL.Const.Comprehensive_Audit;
|
nCRManagement.Status = BLL.Const.Comprehensive_Audit;
|
||||||
BLL.NCRManagementService.AddNCRManagement(nCRManagement);
|
BLL.NCRManagementService.AddNCRManagement(nCRManagement);
|
||||||
|
@ -386,6 +407,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
nCRManagement.NCRManagementId = this.NCRManagementId;
|
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);
|
//BLL.NCRManagementService.UpdateNCRManagement(nCRManagement);
|
||||||
var oldNCRManagement = Funs.DB.Comprehensive_NCRManagement.Where(u => u.NCRManagementId == this.NCRManagementId).FirstOrDefault();
|
var oldNCRManagement = Funs.DB.Comprehensive_NCRManagement.Where(u => u.NCRManagementId == this.NCRManagementId).FirstOrDefault();
|
||||||
if (oldNCRManagement == null) //数据库没有记录 直接点提交 当前状态为 审核状态
|
if (oldNCRManagement == null) //数据库没有记录 直接点提交 当前状态为 审核状态
|
||||||
|
|
|
@ -121,13 +121,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||||
protected global::FineUIPro.DropDownList drpUnitIds;
|
protected global::FineUIPro.DropDownList drpUnitIds;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// txtImplementationFrontState 控件。
|
/// ddlImplementationFrontState 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// 自动生成的字段。
|
/// 自动生成的字段。
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.TextBox txtImplementationFrontState;
|
protected global::FineUIPro.DropDownList ddlImplementationFrontState;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// txtResponsibleMan 控件。
|
/// txtResponsibleMan 控件。
|
||||||
|
|
|
@ -2261,18 +2261,21 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
}
|
}
|
||||||
numberIndex = 1;
|
numberIndex = 1;
|
||||||
int? num1 = 0, num2 = 0;
|
int? num1 = 0, num2 = 0;
|
||||||
|
int MonthsCountstring = 0, ProjectCountstring = 0;
|
||||||
foreach (var item in InspectionDataInspection)
|
foreach (var item in InspectionDataInspection)
|
||||||
{
|
{
|
||||||
|
MonthsCountstring = Convert.ToInt32(item.RectificationRate.Replace("%", ""));
|
||||||
|
ProjectCountstring = Convert.ToInt32(item.TotationRate.Replace("%", ""));
|
||||||
//创建行
|
//创建行
|
||||||
Row row = new Row(doc);
|
Row row = new Row(doc);
|
||||||
row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width));
|
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.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.RectificationRate.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.TotationRate.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
|
||||||
row.Cells.Add(CreateCell(item.Remarks, doc, table.FirstRow.Cells[4].CellFormat.Width));
|
row.Cells.Add(CreateCell(item.Remarks, doc, table.FirstRow.Cells[4].CellFormat.Width));
|
||||||
table.Rows.Insert(numberIndex, row);
|
table.Rows.Insert(numberIndex, row);
|
||||||
num1 += item.MonthsCount;
|
num1 += MonthsCountstring;
|
||||||
num2 += item.ProjectCount;
|
num2 += ProjectCountstring;
|
||||||
numberIndex += 1;
|
numberIndex += 1;
|
||||||
}
|
}
|
||||||
//自动设置表格样式
|
//自动设置表格样式
|
||||||
|
@ -2282,8 +2285,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
Row rowhj = new Row(doc);
|
Row rowhj = new Row(doc);
|
||||||
rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[0].CellFormat.Width));
|
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("合计", doc, table.FirstRow.Cells[1].CellFormat.Width));
|
||||||
rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.FirstRow.Cells[2].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(num2.ToString() + "%", doc, table.FirstRow.Cells[3].CellFormat.Width));
|
||||||
rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[4].CellFormat.Width));
|
rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[4].CellFormat.Width));
|
||||||
table.Rows.Insert(numberIndex, rowhj);
|
table.Rows.Insert(numberIndex, rowhj);
|
||||||
|
|
||||||
|
|
|
@ -869,7 +869,7 @@
|
||||||
</f:Form>
|
</f:Form>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Panel>
|
</f:Panel>
|
||||||
<%--9.计量器具报验管理情况--%>
|
<%--9.计量器具报验管理情况--%>
|
||||||
<f:Panel ID="Pnl9" IsFluid="true" Title="9.计量器具报验管理情况" runat="server" EnableCollapse="false"
|
<f:Panel ID="Pnl9" IsFluid="true" Title="9.计量器具报验管理情况" runat="server" EnableCollapse="false"
|
||||||
ShowHeader="true">
|
ShowHeader="true">
|
||||||
<Items>
|
<Items>
|
||||||
|
@ -1302,13 +1302,13 @@
|
||||||
<Columns>
|
<Columns>
|
||||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center"
|
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center"
|
||||||
TextAlign="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="施工分包商">
|
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="施工分包商">
|
||||||
</f:RenderField>
|
</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="本月一次共捡合格率">
|
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="本月一次共捡合格率">
|
||||||
</f:RenderField>
|
</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="项目累计一次共捡合格率">
|
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="项目累计一次共捡合格率">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField Width="200px" ColumnID="Remarks" DataField="Remarks"
|
<f:RenderField Width="200px" ColumnID="Remarks" DataField="Remarks"
|
||||||
|
|
|
@ -1499,11 +1499,19 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
var db = Funs.DB;
|
var db = Funs.DB;
|
||||||
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
||||||
DateTime endDate = Convert.ToDateTime(this.txtEndDate.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 i = 1;
|
||||||
|
|
||||||
int Quantity1Sum = 0;
|
int CheckNum = 0;//本月检查点数
|
||||||
int Quantity2Sum = 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
|
var units = from x in Funs.DB.Project_ProjectUnit
|
||||||
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
|
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.CheckDate,
|
||||||
c.ProjectId,
|
c.ProjectId,
|
||||||
u.UnitId,
|
u.UnitId,
|
||||||
u.UnitName
|
u.UnitName,
|
||||||
|
c.IsOnceQualified
|
||||||
};
|
};
|
||||||
var AllList = query.ToList();
|
var AllList = query.ToList();
|
||||||
var monethCount = query
|
var monethCount = query
|
||||||
.Where(x => (x.CheckDate >= Convert.ToDateTime(startDate) && x.CheckDate <= Convert.ToDateTime(endDate)));
|
.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.CheckStatisc checkStatisc = new Model.CheckStatisc();
|
||||||
model.MonthsCount = monethCount.Count();
|
checkStatisc.Id = Guid.NewGuid().ToString();
|
||||||
model.ProjectCount = AllList.Count();
|
checkStatisc.ReportId = ReportId;
|
||||||
model.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")
|
if (objType == "1")
|
||||||
{
|
{
|
||||||
var NewModel = db.Report_CQMS_MonthReportItem.FirstOrDefault(x => x.ReportId == ReportId && x.ContentName == item.UnitName && x.ReType == "10");
|
var NewModel = db.Report_CQMS_MonthReportItem.FirstOrDefault(x => x.ReportId == ReportId && x.ContentName == item.UnitName && x.ReType == "10");
|
||||||
if (NewModel != null)
|
if (NewModel != null)
|
||||||
{
|
{
|
||||||
model.RectificationRate = NewModel.RectificationRate;
|
checkStatisc.Remarks = NewModel.Remarks;
|
||||||
model.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++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
gvInspectionDataInspection.DataSource = list;
|
gvInspectionDataInspection.DataSource = list;
|
||||||
gvInspectionDataInspection.DataBind();
|
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();
|
JObject summary = new JObject();
|
||||||
summary.Add("ContentName", "合计");
|
summary.Add("WorkName", "合计");
|
||||||
summary.Add("MonthsCount", Quantity1Sum.ToString());
|
summary.Add("OneOKRate", Quantity1Sum.ToString());
|
||||||
summary.Add("ProjectCount", Quantity2Sum.ToString());
|
summary.Add("TotalOneOKRate", Quantity2Sum.ToString());
|
||||||
|
|
||||||
gvInspectionDataInspection.SummaryData = summary;
|
gvInspectionDataInspection.SummaryData = summary;
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -1647,7 +1697,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
OneOKRate = "0%";
|
OneOKRate = "0";
|
||||||
}
|
}
|
||||||
if (TotalCheckNum != 0)//被除数不能为零
|
if (TotalCheckNum != 0)//被除数不能为零
|
||||||
{
|
{
|
||||||
|
@ -1655,7 +1705,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TotalOneOKRate = "0%";
|
TotalOneOKRate = "0";
|
||||||
}
|
}
|
||||||
|
|
||||||
//检验批统计:土建
|
//检验批统计:土建
|
||||||
|
@ -2071,7 +2121,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
u.UnitId,
|
u.UnitId,
|
||||||
u.UnitName,
|
u.UnitName,
|
||||||
c.IssuedDate,
|
c.IssuedDate,
|
||||||
c.Status
|
c.Status,
|
||||||
|
c.ImplementationFrontState,
|
||||||
};
|
};
|
||||||
|
|
||||||
var AllList = query.ToList();
|
var AllList = query.ToList();
|
||||||
|
@ -2083,8 +2134,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
NCRStatisc.WorkName = item.UnitName;
|
NCRStatisc.WorkName = item.UnitName;
|
||||||
//NCRStatisc.CurrentPeriodOkNum = unitNCRStatic.Count(x => x.Status == "3");
|
//NCRStatisc.CurrentPeriodOkNum = unitNCRStatic.Count(x => x.Status == "3");
|
||||||
//NCRStatisc.OKNum = AllList.Count(x => x.Status == "3");
|
//NCRStatisc.OKNum = AllList.Count(x => x.Status == "3");
|
||||||
NCRStatisc.CurrentPeriodOkNum = unitNCRStatic.Count();
|
NCRStatisc.CurrentPeriodOkNum = unitNCRStatic.Where(x => x.ImplementationFrontState.Trim().Equals("已闭合")).Count();
|
||||||
NCRStatisc.OKNum = AllList.Count();
|
NCRStatisc.OKNum = AllList.Where(x => x.ImplementationFrontState.Trim().Equals("已闭合")).Count();
|
||||||
|
|
||||||
NCRStatisc.CheckNum = AllList.Count();
|
NCRStatisc.CheckNum = AllList.Count();
|
||||||
|
|
||||||
|
@ -3427,10 +3478,10 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||||
{
|
{
|
||||||
ReportId = ReportId,
|
ReportId = ReportId,
|
||||||
ReType = "10",
|
ReType = "10",
|
||||||
ContentName = values.Value<string>("ContentName"),
|
ContentName = values.Value<string>("WorkName"),
|
||||||
MonthsCount = values.Value<int>("MonthsCount"),
|
RectificationRate = values.Value<string>("OneOKRate"),
|
||||||
ProjectCount = values.Value<int>("ProjectCount"),
|
TotationRate = values.Value<string>("TotalOneOKRate"),
|
||||||
//RectificationRate = values.Value<string>("RectificationRate"),
|
|
||||||
Remarks = values.Value<string>("Remarks"),
|
Remarks = values.Value<string>("Remarks"),
|
||||||
};
|
};
|
||||||
if (gvInspectionDataInspection.Rows[rowIndex].DataKeys.Length > 0)
|
if (gvInspectionDataInspection.Rows[rowIndex].DataKeys.Length > 0)
|
||||||
|
|
|
@ -13,20 +13,24 @@
|
||||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||||
<Items>
|
<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"
|
runat="server" BoxFlex="1" DataKeyNames="CheckDate" AllowCellEditing="true" EnableColumnLines="true"
|
||||||
ClicksToEdit="2" DataIDField="CheckDate" AllowSorting="true" SortField="CheckDate" ForceFit="true"
|
ClicksToEdit="2" DataIDField="CheckDate" AllowSorting="true" SortField="CheckDate" ForceFit="true"
|
||||||
SortDirection="ASC" EnableTextSelection="true">
|
SortDirection="ASC" EnableTextSelection="true">
|
||||||
<Toolbars>
|
<Toolbars>
|
||||||
<f:Toolbar ID="ToolSearch" Position="Top" runat="server" ToolbarAlign="Left">
|
<f:Toolbar ID="ToolSearch" Position="Top" runat="server" ToolbarAlign="Left">
|
||||||
<Items>
|
<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:DropDownList>
|
||||||
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" Label="开始日期" ID="txtStartTime"
|
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" Label="开始日期" ID="txtStartTime"
|
||||||
LabelAlign="right" >
|
LabelAlign="right">
|
||||||
</f:DatePicker>
|
</f:DatePicker>
|
||||||
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" Label="结束日期" ID="txtEndTime"
|
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" Label="结束日期" ID="txtEndTime"
|
||||||
LabelAlign="right" >
|
LabelAlign="right">
|
||||||
</f:DatePicker>
|
</f:DatePicker>
|
||||||
<f:Button ID="btnSearch" Icon="SystemSearch" ToolTip="查询"
|
<f:Button ID="btnSearch" Icon="SystemSearch" ToolTip="查询"
|
||||||
EnablePostBack="true" runat="server" OnClick="btnSearch_Click">
|
EnablePostBack="true" runat="server" OnClick="btnSearch_Click">
|
||||||
|
|
|
@ -21,8 +21,19 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||||
{
|
{
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessional, true);//专业
|
if (drpZhType.SelectedValue.Equals("1"))
|
||||||
BindGvInspectionManagement(null);
|
{
|
||||||
|
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
|
#region 绑定GridView
|
||||||
|
@ -30,7 +41,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||||
/// 绑定
|
/// 绑定
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="cNProfessionalId"></param>
|
/// <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())) //未选择日期,统计项目开始起的每月数据
|
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)
|
if (DateTime.Now < NewDate)
|
||||||
{
|
{
|
||||||
//统计所给时间段的全部数量
|
List<Model.View_CQMS_InspectionManagementDetail> managementListSunNumber = new List<Model.View_CQMS_InspectionManagementDetail>();
|
||||||
List<Model.View_CQMS_InspectionManagementDetail> managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, false);
|
List<Model.View_CQMS_InspectionManagementDetail> managementListOneNumber = new List<Model.View_CQMS_InspectionManagementDetail>();
|
||||||
//统计所给时间段的合格数量
|
if (ZyType == "1")
|
||||||
List<Model.View_CQMS_InspectionManagementDetail> managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true);
|
{
|
||||||
|
//统计所给时间段的全部数量
|
||||||
|
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.CheckDate += string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||||
Statistics.SunNumber = managementListSunNumber.Count();
|
Statistics.SunNumber = managementListSunNumber.Count();
|
||||||
|
@ -70,12 +93,24 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||||
}
|
}
|
||||||
else
|
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");
|
NextDate = Convert.ToDateTime(StartDate.Year + "-" + StartDate.Month + "-25");
|
||||||
//统计所给事件段的全部数量
|
if (ZyType == "1")
|
||||||
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);
|
|
||||||
|
|
||||||
|
//统计所给事件段的全部数量
|
||||||
|
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.CheckDate += string.Format("{0:yyyy-MM-dd}", NextDate);
|
||||||
Statistics.SunNumber = managementListSunNumber.Count();
|
Statistics.SunNumber = managementListSunNumber.Count();
|
||||||
Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
|
Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
|
||||||
|
@ -93,10 +128,25 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||||
{
|
{
|
||||||
if (DateTime.Now < NewDate)
|
if (DateTime.Now < NewDate)
|
||||||
{
|
{
|
||||||
//统计所给事件段的全部数量
|
List<Model.View_CQMS_InspectionManagementDetail> managementListSunNumber = new List<Model.View_CQMS_InspectionManagementDetail>();
|
||||||
List<Model.View_CQMS_InspectionManagementDetail> managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, false);
|
List<Model.View_CQMS_InspectionManagementDetail> managementListOneNumber = new List<Model.View_CQMS_InspectionManagementDetail>();
|
||||||
//统计所给事件段的合格数量
|
if (ZyType == "1")
|
||||||
List<Model.View_CQMS_InspectionManagementDetail> managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true);
|
{
|
||||||
|
//统计所给事件段的全部数量
|
||||||
|
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.CheckDate += string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||||
Statistics.SunNumber = managementListSunNumber.Count();
|
Statistics.SunNumber = managementListSunNumber.Count();
|
||||||
|
@ -115,10 +165,22 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//统计所给事件段的全部数量
|
List<Model.View_CQMS_InspectionManagementDetail> managementListSunNumber = new List<Model.View_CQMS_InspectionManagementDetail>();
|
||||||
List<Model.View_CQMS_InspectionManagementDetail> managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, false);
|
List<Model.View_CQMS_InspectionManagementDetail> managementListOneNumber = new List<Model.View_CQMS_InspectionManagementDetail>();
|
||||||
//统计所给事件段的合格数量
|
if (ZyType == "1")
|
||||||
List<Model.View_CQMS_InspectionManagementDetail> managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, true);
|
{
|
||||||
|
//统计所给事件段的全部数量
|
||||||
|
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.CheckDate += string.Format("{0:yyyy-MM-dd}", NewDate);
|
||||||
Statistics.SunNumber = managementListSunNumber.Count();
|
Statistics.SunNumber = managementListSunNumber.Count();
|
||||||
Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
|
Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
|
||||||
|
@ -151,11 +213,23 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||||
NewDate = Convert.ToDateTime(NextDate.Year + "-" + NextDate.Month + "-25");
|
NewDate = Convert.ToDateTime(NextDate.Year + "-" + NextDate.Month + "-25");
|
||||||
if (DateTime.Now < NewDate)
|
if (DateTime.Now < NewDate)
|
||||||
{
|
{
|
||||||
//统计所给事件段的全部数量
|
List<Model.View_CQMS_InspectionManagementDetail> managementListSunNumber = new List<Model.View_CQMS_InspectionManagementDetail>();
|
||||||
List<Model.View_CQMS_InspectionManagementDetail> managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, false);
|
List<Model.View_CQMS_InspectionManagementDetail> managementListOneNumber = new List<Model.View_CQMS_InspectionManagementDetail>();
|
||||||
//统计所给事件段的合格数量
|
if (ZyType == "1")
|
||||||
List<Model.View_CQMS_InspectionManagementDetail> managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true);
|
{
|
||||||
|
//统计所给事件段的全部数量
|
||||||
|
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.CheckDate += string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||||
Statistics.SunNumber = managementListSunNumber.Count();
|
Statistics.SunNumber = managementListSunNumber.Count();
|
||||||
Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
|
Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
|
||||||
|
@ -173,10 +247,21 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//统计所给事件段的全部数量
|
List<Model.View_CQMS_InspectionManagementDetail> managementListSunNumber = new List<Model.View_CQMS_InspectionManagementDetail>();
|
||||||
List<Model.View_CQMS_InspectionManagementDetail> managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, false);
|
List<Model.View_CQMS_InspectionManagementDetail> managementListOneNumber = new List<Model.View_CQMS_InspectionManagementDetail>();
|
||||||
//统计所给事件段的合格数量
|
if (ZyType == "1")
|
||||||
List<Model.View_CQMS_InspectionManagementDetail> managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, true);
|
{
|
||||||
|
//统计所给事件段的全部数量
|
||||||
|
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.CheckDate += string.Format("{0:yyyy-MM-dd}", NewDate);
|
||||||
Statistics.SunNumber = managementListSunNumber.Count();
|
Statistics.SunNumber = managementListSunNumber.Count();
|
||||||
Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
|
Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
|
||||||
|
@ -231,10 +316,25 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||||
EndDate = Convert.ToDateTime(this.txtEndTime.Text.Trim());
|
EndDate = Convert.ToDateTime(this.txtEndTime.Text.Trim());
|
||||||
}
|
}
|
||||||
Model.InspectionManagementStatistics Statistics = new Model.InspectionManagementStatistics();
|
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> managementListSunNumber = new List<Model.View_CQMS_InspectionManagementDetail>();
|
||||||
List<Model.View_CQMS_InspectionManagementDetail> managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, EndDate, true);
|
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.CheckDate = string.Format("{0:yyyy-MM-dd}", StartDate) + " 至 " + string.Format("{0:yyyy-MM-dd}", EndDate);
|
||||||
Statistics.SunNumber = managementListSunNumber.Count();
|
Statistics.SunNumber = managementListSunNumber.Count();
|
||||||
Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
|
Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
|
||||||
|
@ -255,14 +355,16 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||||
|
|
||||||
protected void btnSearch_Click(object sender, EventArgs e)
|
protected void btnSearch_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (this.drpCNProfessional.SelectedValue != BLL.Const._Null)
|
BindGvInspectionManagement(this.drpZhType.SelectedValue, this.drpCNProfessional.SelectedValue);
|
||||||
{
|
|
||||||
BindGvInspectionManagement(this.drpCNProfessional.SelectedValue);
|
//if (this.drpCNProfessional.SelectedValue != BLL.Const._Null)
|
||||||
}
|
//{
|
||||||
else
|
// BindGvInspectionManagement(this.drpCNProfessional.SelectedValue);
|
||||||
{
|
//}
|
||||||
BindGvInspectionManagement(null);
|
//else
|
||||||
}
|
//{
|
||||||
|
// BindGvInspectionManagement(null);
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -274,16 +376,38 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||||
Response.ContentType = "application/excel";
|
Response.ContentType = "application/excel";
|
||||||
Response.ContentEncoding = Encoding.UTF8;
|
Response.ContentEncoding = Encoding.UTF8;
|
||||||
this.Grid1.PageSize = Grid1.RecordCount;
|
this.Grid1.PageSize = Grid1.RecordCount;
|
||||||
if (this.drpCNProfessional.SelectedValue != BLL.Const._Null)
|
//if (this.drpCNProfessional.SelectedValue != BLL.Const._Null)
|
||||||
{
|
//{
|
||||||
BindGvInspectionManagement(this.drpCNProfessional.SelectedValue);
|
// BindGvInspectionManagement(this.drpCNProfessional.SelectedValue);
|
||||||
}
|
//}
|
||||||
else
|
//else
|
||||||
{
|
//{
|
||||||
BindGvInspectionManagement(null);
|
// BindGvInspectionManagement(null);
|
||||||
}
|
//}
|
||||||
|
BindGvInspectionManagement(this.drpZhType.SelectedValue, this.drpCNProfessional.SelectedValue);
|
||||||
Response.Write(GetGridTableHtml2(Grid1));
|
Response.Write(GetGridTableHtml2(Grid1));
|
||||||
Response.End();
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -57,6 +57,15 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Toolbar ToolSearch;
|
protected global::FineUIPro.Toolbar ToolSearch;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// drpZhType 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.DropDownList drpZhType;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// drpCNProfessional 控件。
|
/// drpCNProfessional 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<appSettings>
|
<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=.;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="SystemName" value="智慧施工管理信息系统V1.0"/>
|
||||||
<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/Images/;"/>
|
<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/Images/;"/>
|
||||||
|
|
|
@ -96,5 +96,17 @@ namespace Model
|
||||||
get { return id; }
|
get { return id; }
|
||||||
set { id = value; }
|
set { id = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string ReportId
|
||||||
|
{
|
||||||
|
get { return ReportId; }
|
||||||
|
set { ReportId = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Remarks
|
||||||
|
{
|
||||||
|
get { return Remarks; }
|
||||||
|
set { Remarks = value; }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue