2023-11-02
This commit is contained in:
parent
3cf8ddd583
commit
abf5432676
Binary file not shown.
|
@ -329,7 +329,12 @@ namespace BLL
|
|||
}
|
||||
public static List<Model.View_CQMS_InspectionManagementDetail> getInspectionManagementDetailListByCNProfessionalIdAndDate(string projectId, string cNProfessionalId, DateTime startDate, DateTime SoptDate, bool isOnceQualified)
|
||||
{
|
||||
List<Model.View_CQMS_InspectionManagementDetail> InspectionMangementList = (from x in Funs.DB.View_CQMS_InspectionManagementDetail where x.ProjectId == projectId select x).ToList();
|
||||
List<Model.View_CQMS_InspectionManagementDetail> InspectionMangementList = (from x in Funs.DB.View_CQMS_InspectionManagementDetail select x).ToList();
|
||||
|
||||
if (!string.IsNullOrEmpty(projectId))
|
||||
{
|
||||
InspectionMangementList = (from x in InspectionMangementList where x.ProjectId == projectId select x).ToList();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(cNProfessionalId) && cNProfessionalId != "0")
|
||||
{
|
||||
InspectionMangementList = (from x in InspectionMangementList where x.CNProfessionalId == cNProfessionalId select x).ToList();
|
||||
|
|
|
@ -0,0 +1,125 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InspectionManagementStatisc.aspx.cs" Inherits="FineUIPro.Web.DataShowLocal.InspectionManagementStatisc" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<link href="~/res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<script src="~/Controls/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
|
||||
<title>计量器具</title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="true" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="NCR数据" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="ProjectId" DataIDField="ProjectId" AllowSorting="true"
|
||||
SortField="ProjectName" SortDirection="ASC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpProject" runat="server" Label="项目" Width="400px" LabelWidth="80px" LabelAlign="Right"
|
||||
EnableEdit="true" OnSelectedIndexChanged="TextBox_TextChanged" AutoPostBack="true">
|
||||
</f:DropDownList>
|
||||
<f:DatePicker ID="txtStartTime" runat="server" Label="时间" LabelAlign="Right"
|
||||
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="200px" LabelWidth="80px">
|
||||
</f:DatePicker>
|
||||
<f:Label ID="Label3" runat="server" Text="至">
|
||||
</f:Label>
|
||||
<f:DatePicker ID="txtEndTime" runat="server" AutoPostBack="true" OnTextChanged="TextBox_TextChanged"
|
||||
Width="130px">
|
||||
</f:DatePicker>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" Text="关闭" runat="server" Icon="SystemClose" OnClientClick="closeNow();">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:TemplateField ColumnID="tfNumber" Width="55px" HeaderText="序号" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="labNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="150px" ColumnID="ProjectCode" DataField="ProjectCode" FieldType="String" HeaderText="项目号" TextAlign="Left"
|
||||
HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="350px" ColumnID="ProjectName" DataField="ProjectName" FieldType="String" HeaderText="项目名称" TextAlign="Left"
|
||||
HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:TemplateField ColumnID="Count1" Width="120px" HeaderText="共检总数" HeaderTextAlign="Center" TextAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label2" runat="server" Text='<%# Count1(Eval("ProjectId")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:TemplateField ColumnID="Count3" Width="120px" HeaderText="次合格数量" HeaderTextAlign="Center" TextAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label4" runat="server" Text='<%# Count2(Eval("ProjectId")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:TemplateField ColumnID="Count4" Width="120px" HeaderText="整改率" HeaderTextAlign="Center" TextAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label5" runat="server" Text='<%# Count3(Eval("ProjectId")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
</Listeners>
|
||||
<PageItems>
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||
</f:ToolbarSeparator>
|
||||
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
|
||||
</f:ToolbarText>
|
||||
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
|
||||
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
</PageItems>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" Title="详情" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
|
||||
Width="1200px" Height="620px" Maximized="true">
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<Items>
|
||||
<f:MenuButton ID="btnView" EnablePostBack="true" runat="server"
|
||||
Text="查看" Icon="Find" OnClick="btnView_Click">
|
||||
</f:MenuButton>
|
||||
</Items>
|
||||
</f:Menu>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
var menuID = '<%= Menu1.ClientID %>';
|
||||
|
||||
// 返回false,来阻止浏览器右键菜单
|
||||
function onRowContextMenu(event, rowId) {
|
||||
F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||
return false;
|
||||
}
|
||||
|
||||
// 点击标题栏工具图标 - 退出
|
||||
function closeNow(event) {
|
||||
var bConfirmed = confirm('您确定要退出吗?');
|
||||
if (bConfirmed) { closePage(); }
|
||||
}
|
||||
|
||||
function closePage() {
|
||||
if (navigator.userAgent.indexOf('Firefox') !== -1 || navigator.userAgent.indexOf('Chrome') !== -1) {
|
||||
window.location.href = "about:blank";
|
||||
window.close();
|
||||
} else {
|
||||
window.opener = null;
|
||||
window.open("", "_self");
|
||||
window.close();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,222 @@
|
|||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.SqlClient;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.DataShowLocal
|
||||
{
|
||||
public partial class InspectionManagementStatisc : PageBase
|
||||
{
|
||||
|
||||
#region 加载页面
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
// 绑定表格t
|
||||
BindGrid();
|
||||
this.Panel1.Title = "质量验收数据(" + BLL.UnitService.GetUnitNameByUnitId(BLL.Const.UnitId_CWCEC) + ")";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"select ProjectId,ProjectCode, ProjectName from Base_Project where ProjectState =1";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
string cpara = string.Empty;
|
||||
if (this.drpProject.SelectedValue != Const._Null)
|
||||
{
|
||||
strSql += " AND projectId = @projectId"; ///状态为已完成
|
||||
listStr.Add(new SqlParameter("@projectId", this.drpProject.SelectedValue));
|
||||
}
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 查询
|
||||
/// <summary>
|
||||
/// 查询
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void TextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 表排序、分页、关闭窗口
|
||||
/// <summary>
|
||||
/// 分页
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_Sort(object sender, GridSortEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页显示条数下拉框
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 关闭弹出窗
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Grid双击事件 编辑
|
||||
/// <summary>
|
||||
/// Grid行双击事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
EditData();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
private void EditData()
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InspectionManagementStatiscItem.aspx?projectId={0}", Grid1.SelectedRowID, "查看 - ")));
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
protected void btnView_Click(object sender, EventArgs e)
|
||||
{
|
||||
EditData();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 共检总数
|
||||
/// </summary>
|
||||
/// <param name="state"></param>
|
||||
/// <returns></returns>
|
||||
protected int Count1(object projectId)
|
||||
{
|
||||
int cout1 = 0;
|
||||
if (projectId != null)
|
||||
{
|
||||
var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
||||
var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
||||
var getD1 = from x in Funs.DB.View_CQMS_InspectionManagementDetail where x.ProjectId == projectId.ToString() select x;
|
||||
|
||||
if (datetime1.HasValue)
|
||||
{
|
||||
getD1 = getD1.Where(x => x.InspectionDate >= datetime1);
|
||||
}
|
||||
if (datetime2.HasValue)
|
||||
{
|
||||
getD1 = getD1.Where(x => x.InspectionDate <= datetime2);
|
||||
}
|
||||
cout1 = getD1.Count();
|
||||
}
|
||||
return cout1;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 一次合格数
|
||||
/// </summary>
|
||||
/// <param name="state"></param>
|
||||
/// <returns></returns>
|
||||
protected int Count2(object projectId)
|
||||
{
|
||||
int cout1 = 0;
|
||||
if (projectId != null)
|
||||
{
|
||||
var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
||||
var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
||||
var getD1 = from x in Funs.DB.View_CQMS_InspectionManagementDetail
|
||||
where x.ProjectId == projectId.ToString() && x.IsOnceQualified==true
|
||||
select x;
|
||||
|
||||
if (datetime1.HasValue)
|
||||
{
|
||||
getD1 = getD1.Where(x => x.InspectionDate >= datetime1);
|
||||
}
|
||||
if (datetime2.HasValue)
|
||||
{
|
||||
getD1 = getD1.Where(x => x.InspectionDate <= datetime2);
|
||||
}
|
||||
cout1 = getD1.Count();
|
||||
}
|
||||
return cout1;
|
||||
}
|
||||
|
||||
protected string Count3(object projectId)
|
||||
{
|
||||
string result = "";
|
||||
if (projectId != null)
|
||||
{
|
||||
if (Count1(projectId) != 0)//被除数不能为零
|
||||
{
|
||||
result = Math.Round((double)Count2(projectId) / (double)Count1(projectId) * 100, 2) + "%";//保留两位小数、后四舍五入
|
||||
}
|
||||
else
|
||||
{
|
||||
result = "0%";
|
||||
}
|
||||
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
197
SGGL/FineUIPro.Web/DataShowLocal/InspectionManagementStatisc.aspx.designer.cs
generated
Normal file
197
SGGL/FineUIPro.Web/DataShowLocal/InspectionManagementStatisc.aspx.designer.cs
generated
Normal file
|
@ -0,0 +1,197 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.DataShowLocal
|
||||
{
|
||||
|
||||
|
||||
public partial class InspectionManagementStatisc
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// drpProject 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpProject;
|
||||
|
||||
/// <summary>
|
||||
/// txtStartTime 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtStartTime;
|
||||
|
||||
/// <summary>
|
||||
/// Label3 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label Label3;
|
||||
|
||||
/// <summary>
|
||||
/// txtEndTime 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtEndTime;
|
||||
|
||||
/// <summary>
|
||||
/// btnClose 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnClose;
|
||||
|
||||
/// <summary>
|
||||
/// labNumber 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label labNumber;
|
||||
|
||||
/// <summary>
|
||||
/// Label2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label2;
|
||||
|
||||
/// <summary>
|
||||
/// Label4 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label4;
|
||||
|
||||
/// <summary>
|
||||
/// Label5 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label5;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
/// <summary>
|
||||
/// btnView 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnView;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,65 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InspectionManagementStatiscItem.aspx.cs" Inherits="FineUIPro.Web.DataShowLocal.InspectionManagementStatiscItem" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>控制点检查检测合格率统计</title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="Panel1" />
|
||||
<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"
|
||||
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>
|
||||
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" Label="开始日期" ID="txtStartTime"
|
||||
LabelAlign="right" >
|
||||
</f:DatePicker>
|
||||
<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">
|
||||
</f:Button>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp"
|
||||
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:TemplateField ColumnID="tfPageIndex" Width="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblPageIndex" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField ColumnID="CheckDate" DataField="CheckDate" FieldType="String" HeaderText="日期" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="220px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="OneStatisticsSunNumber" DataField="OneStatisticsSunNumber" FieldType="String" HeaderText="一次合格数" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="220px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="SunNumber" DataField="SunNumber" FieldType="String" HeaderText="总数" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="220px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="OneStatistics" DataField="OneStatistics" FieldType="String" HeaderText="一次合格率" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="220px">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,289 @@
|
|||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.DataShowLocal
|
||||
{
|
||||
public partial class InspectionManagementStatiscItem : PageBase
|
||||
{
|
||||
public DateTime StartDate;
|
||||
public DateTime NextDate;
|
||||
public DateTime NewDate;
|
||||
public DateTime EndDate;
|
||||
|
||||
public int SunNumber;
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessional, true);//专业
|
||||
BindGvInspectionManagement(null);
|
||||
}
|
||||
}
|
||||
#region 绑定GridView
|
||||
/// <summary>
|
||||
/// 绑定
|
||||
/// </summary>
|
||||
/// <param name="cNProfessionalId"></param>
|
||||
public void BindGvInspectionManagement(string cNProfessionalId)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.txtStartTime.Text.Trim()) && string.IsNullOrEmpty(this.txtEndTime.Text.Trim())) //未选择日期,统计项目开始起的每月数据
|
||||
{
|
||||
List<Model.InspectionManagementStatistics> StatisticsList = new List<Model.InspectionManagementStatistics>();
|
||||
Model.Base_Project project = BLL.ProjectService.GetProjectByProjectId(Request.Params["projectId"]);
|
||||
StartDate = Convert.ToDateTime(project.StartDate);
|
||||
for (int i = 0; i < i + 1; i++)
|
||||
{
|
||||
Model.InspectionManagementStatistics Statistics = new Model.InspectionManagementStatistics();
|
||||
if (i == 0)
|
||||
{
|
||||
NextDate = Convert.ToDateTime(DateTime.Parse(StartDate.ToString("yyyy-MM-dd")).AddMonths(1).ToShortDateString());
|
||||
NewDate = Convert.ToDateTime(NextDate.Year + "-" + NextDate.Month + "-25");
|
||||
Statistics.CheckDate = string.Format("{0:yyyy-MM-dd}", StartDate) + " 至 ";
|
||||
if (StartDate.Day < 25)
|
||||
{
|
||||
if (DateTime.Now < NewDate)
|
||||
{
|
||||
//统计所给时间段的全部数量
|
||||
List<Model.View_CQMS_InspectionManagementDetail> managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(Request.Params["projectId"], cNProfessionalId, StartDate, DateTime.Now, false);
|
||||
//统计所给时间段的合格数量
|
||||
List<Model.View_CQMS_InspectionManagementDetail> managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(Request.Params["projectId"], cNProfessionalId, StartDate, DateTime.Now, true);
|
||||
|
||||
Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||
Statistics.SunNumber = managementListSunNumber.Count();
|
||||
Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
|
||||
if (managementListSunNumber.Count() != 0)//被除数不能为零
|
||||
{
|
||||
Statistics.OneStatistics = Math.Round((double)managementListOneNumber.Count() / (double)managementListSunNumber.Count() * 100, 2) + "%";//保留两位小数、后四舍五入
|
||||
}
|
||||
else
|
||||
{
|
||||
Statistics.OneStatistics = "0%";
|
||||
}
|
||||
StatisticsList.Add(Statistics);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
NextDate = Convert.ToDateTime(StartDate.Year + "-" + StartDate.Month + "-25");
|
||||
//统计所给事件段的全部数量
|
||||
List<Model.View_CQMS_InspectionManagementDetail> managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(Request.Params["projectId"], cNProfessionalId, StartDate, NextDate, false);
|
||||
//统计所给事件段的合格数量
|
||||
List<Model.View_CQMS_InspectionManagementDetail> managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(Request.Params["projectId"], cNProfessionalId, StartDate, NextDate, true);
|
||||
|
||||
Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", NextDate);
|
||||
Statistics.SunNumber = managementListSunNumber.Count();
|
||||
Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
|
||||
if (managementListSunNumber.Count() != 0)//被除数不能为零
|
||||
{
|
||||
Statistics.OneStatistics = Math.Round((double)managementListOneNumber.Count() / (double)managementListSunNumber.Count() * 100, 2) + "%";//保留两位小数、后四舍五入
|
||||
}
|
||||
else
|
||||
{
|
||||
Statistics.OneStatistics = "0%";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (DateTime.Now < NewDate)
|
||||
{
|
||||
//统计所给事件段的全部数量
|
||||
List<Model.View_CQMS_InspectionManagementDetail> managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(Request.Params["projectId"], cNProfessionalId, StartDate, DateTime.Now, false);
|
||||
//统计所给事件段的合格数量
|
||||
List<Model.View_CQMS_InspectionManagementDetail> managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(Request.Params["projectId"], cNProfessionalId, StartDate, DateTime.Now, true);
|
||||
|
||||
Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||
Statistics.SunNumber = managementListSunNumber.Count();
|
||||
Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
|
||||
if (managementListSunNumber.Count() != 0)//被除数不能为零
|
||||
{
|
||||
Statistics.OneStatistics = Math.Round((double)managementListOneNumber.Count() / (double)managementListSunNumber.Count() * 100, 2) + "%";//保留两位小数、后四舍五入
|
||||
}
|
||||
else
|
||||
{
|
||||
Statistics.OneStatistics = "0%";
|
||||
}
|
||||
|
||||
StatisticsList.Add(Statistics);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
//统计所给事件段的全部数量
|
||||
List<Model.View_CQMS_InspectionManagementDetail> managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(Request.Params["projectId"], cNProfessionalId, StartDate, NewDate, false);
|
||||
//统计所给事件段的合格数量
|
||||
List<Model.View_CQMS_InspectionManagementDetail> managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(Request.Params["projectId"], cNProfessionalId, StartDate, NewDate, true);
|
||||
Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", NewDate);
|
||||
Statistics.SunNumber = managementListSunNumber.Count();
|
||||
Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
|
||||
if (managementListSunNumber.Count() != 0)//被除数不能为零
|
||||
{
|
||||
Statistics.OneStatistics = Math.Round((double)managementListOneNumber.Count() / (double)managementListSunNumber.Count() * 100, 2) + "%";//保留两位小数、后四舍五入
|
||||
}
|
||||
else
|
||||
{
|
||||
Statistics.OneStatistics = "0%";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (StartDate.Day > 25)
|
||||
{
|
||||
Statistics.CheckDate = NewDate.Year + "-" + NewDate.Month + "-" + (NewDate.Day + 1) + " 至 ";
|
||||
StartDate = Convert.ToDateTime(NewDate.Year + "-" + NewDate.Month + "-" + (NewDate.Day + 1));//获取上一记录的结束日期加一天为本次记录的开始日期
|
||||
}
|
||||
else
|
||||
{
|
||||
Statistics.CheckDate = NextDate.Year + "-" + NextDate.Month + "-" + (NextDate.Day + 1) + " 至 ";
|
||||
StartDate = Convert.ToDateTime(NextDate.Year + "-" + NextDate.Month + "-" + (NextDate.Day + 1));//获取上一记录的结束日期加一天为本次记录的开始日期
|
||||
}
|
||||
|
||||
NextDate = Convert.ToDateTime(DateTime.Parse(NextDate.ToString("yyyy-MM-dd")).AddMonths(1).ToShortDateString());
|
||||
NewDate = Convert.ToDateTime(NextDate.Year + "-" + NextDate.Month + "-25");
|
||||
if (DateTime.Now < NewDate)
|
||||
{
|
||||
//统计所给事件段的全部数量
|
||||
List<Model.View_CQMS_InspectionManagementDetail> managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(Request.Params["projectId"], cNProfessionalId, StartDate, DateTime.Now, false);
|
||||
//统计所给事件段的合格数量
|
||||
List<Model.View_CQMS_InspectionManagementDetail> managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(Request.Params["projectId"], cNProfessionalId, StartDate, DateTime.Now, true);
|
||||
|
||||
Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||
Statistics.SunNumber = managementListSunNumber.Count();
|
||||
Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
|
||||
if (managementListSunNumber.Count() != 0)//被除数不能为零
|
||||
{
|
||||
Statistics.OneStatistics = Math.Round((double)managementListOneNumber.Count() / (double)managementListSunNumber.Count() * 100, 2) + "%";//保留两位小数、后四舍五入
|
||||
}
|
||||
else
|
||||
{
|
||||
Statistics.OneStatistics = "0%";
|
||||
}
|
||||
|
||||
StatisticsList.Add(Statistics);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
//统计所给事件段的全部数量
|
||||
List<Model.View_CQMS_InspectionManagementDetail> managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(Request.Params["projectId"], cNProfessionalId, StartDate, NewDate, false);
|
||||
//统计所给事件段的合格数量
|
||||
List<Model.View_CQMS_InspectionManagementDetail> managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(Request.Params["projectId"], cNProfessionalId, StartDate, NewDate, true);
|
||||
Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", NewDate);
|
||||
Statistics.SunNumber = managementListSunNumber.Count();
|
||||
Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
|
||||
if (managementListSunNumber.Count() != 0)//被除数不能为零
|
||||
{
|
||||
Statistics.OneStatistics = Math.Round((double)managementListOneNumber.Count() / (double)managementListSunNumber.Count() * 100, 2) + "%";//保留两位小数、后四舍五入
|
||||
}
|
||||
else
|
||||
{
|
||||
Statistics.OneStatistics = "0%";
|
||||
}
|
||||
}
|
||||
}
|
||||
StatisticsList.Add(Statistics);
|
||||
}
|
||||
Model.InspectionManagementStatistics StatisticsLast = new Model.InspectionManagementStatistics();
|
||||
StatisticsLast.CheckDate = "合计";
|
||||
int sum1 = 0;
|
||||
int sum2 = 0;
|
||||
foreach (Model.InspectionManagementStatistics item in StatisticsList)
|
||||
{
|
||||
sum1 += item.OneStatisticsSunNumber;
|
||||
sum2 += item.SunNumber;
|
||||
|
||||
}
|
||||
StatisticsLast.OneStatisticsSunNumber = sum1;
|
||||
StatisticsLast.SunNumber = sum2;
|
||||
if (sum2 != 0)//被除数不能为零
|
||||
{
|
||||
StatisticsLast.OneStatistics = Math.Round((double)sum1 / (double)sum2 * 100, 2) + "%";//保留两位小数、后四舍五入
|
||||
}
|
||||
else
|
||||
{
|
||||
StatisticsLast.OneStatistics = "0%";
|
||||
}
|
||||
StatisticsList.Add(StatisticsLast);
|
||||
this.Grid1.DataSource = StatisticsList;
|
||||
this.Grid1.DataBind();
|
||||
}
|
||||
else //选择日期,统计对应时间段内的数据
|
||||
{
|
||||
List<Model.InspectionManagementStatistics> StatisticsList = new List<Model.InspectionManagementStatistics>();
|
||||
Model.Base_Project project = BLL.ProjectService.GetProjectByProjectId(Request.Params["projectId"]);
|
||||
StartDate = Convert.ToDateTime(project.StartDate);
|
||||
EndDate = DateTime.Now;
|
||||
if (!string.IsNullOrEmpty(this.txtStartTime.Text.Trim()))
|
||||
{
|
||||
StartDate = Convert.ToDateTime(this.txtStartTime.Text.Trim());
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtEndTime.Text.Trim()))
|
||||
{
|
||||
EndDate = Convert.ToDateTime(this.txtEndTime.Text.Trim());
|
||||
}
|
||||
Model.InspectionManagementStatistics Statistics = new Model.InspectionManagementStatistics();
|
||||
//统计所给时间段的全部数量
|
||||
List<Model.View_CQMS_InspectionManagementDetail> managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(Request.Params["projectId"], cNProfessionalId, StartDate, EndDate, false);
|
||||
//统计所给时间段的合格数量
|
||||
List<Model.View_CQMS_InspectionManagementDetail> managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(Request.Params["projectId"], 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();
|
||||
if (managementListSunNumber.Count() != 0)//被除数不能为零
|
||||
{
|
||||
Statistics.OneStatistics = Math.Round((double)managementListOneNumber.Count() / (double)managementListSunNumber.Count() * 100, 2) + "%";//保留两位小数、后四舍五入
|
||||
}
|
||||
else
|
||||
{
|
||||
Statistics.OneStatistics = "0%";
|
||||
}
|
||||
StatisticsList.Add(Statistics);
|
||||
this.Grid1.DataSource = StatisticsList;
|
||||
this.Grid1.DataBind();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void btnSearch_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.drpCNProfessional.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
BindGvInspectionManagement(this.drpCNProfessional.SelectedValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
BindGvInspectionManagement(null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void btnOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
Response.ClearContent();
|
||||
string filename = Funs.GetNewFileName();
|
||||
Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("控制点检查检测合格率统计" + filename, System.Text.Encoding.UTF8) + ".xls");
|
||||
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);
|
||||
}
|
||||
Response.Write(GetGridTableHtml2(Grid1));
|
||||
Response.End();
|
||||
}
|
||||
}
|
||||
}
|
116
SGGL/FineUIPro.Web/DataShowLocal/InspectionManagementStatiscItem.aspx.designer.cs
generated
Normal file
116
SGGL/FineUIPro.Web/DataShowLocal/InspectionManagementStatiscItem.aspx.designer.cs
generated
Normal file
|
@ -0,0 +1,116 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.DataShowLocal
|
||||
{
|
||||
|
||||
|
||||
public partial class InspectionManagementStatiscItem
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// ToolSearch 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar ToolSearch;
|
||||
|
||||
/// <summary>
|
||||
/// drpCNProfessional 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpCNProfessional;
|
||||
|
||||
/// <summary>
|
||||
/// txtStartTime 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtStartTime;
|
||||
|
||||
/// <summary>
|
||||
/// txtEndTime 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtEndTime;
|
||||
|
||||
/// <summary>
|
||||
/// btnSearch 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSearch;
|
||||
|
||||
/// <summary>
|
||||
/// btnOut 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnOut;
|
||||
|
||||
/// <summary>
|
||||
/// lblPageIndex 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblPageIndex;
|
||||
}
|
||||
}
|
|
@ -562,6 +562,8 @@
|
|||
<Content Include="CQMS\WBS\WorkPackageSet1.aspx" />
|
||||
<Content Include="CQMS\WBS\WorkPackageSet2.aspx" />
|
||||
<Content Include="CQMS\WBS\WorkPackageSet2In.aspx" />
|
||||
<Content Include="DataShowLocal\InspectionManagementStatisc.aspx" />
|
||||
<Content Include="DataShowLocal\InspectionManagementStatiscItem.aspx" />
|
||||
<Content Include="DataShowLocal\NCRStatisc.aspx" />
|
||||
<Content Include="DataShowLocal\NCRStatiscItem.aspx" />
|
||||
<Content Include="DataShowLocal\QualityInstruments.aspx" />
|
||||
|
@ -8127,6 +8129,20 @@
|
|||
<Compile Include="CQMS\WBS\WorkPackageSet2In.aspx.designer.cs">
|
||||
<DependentUpon>WorkPackageSet2In.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DataShowLocal\InspectionManagementStatisc.aspx.cs">
|
||||
<DependentUpon>InspectionManagementStatisc.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="DataShowLocal\InspectionManagementStatisc.aspx.designer.cs">
|
||||
<DependentUpon>InspectionManagementStatisc.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DataShowLocal\InspectionManagementStatiscItem.aspx.cs">
|
||||
<DependentUpon>InspectionManagementStatiscItem.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="DataShowLocal\InspectionManagementStatiscItem.aspx.designer.cs">
|
||||
<DependentUpon>InspectionManagementStatiscItem.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DataShowLocal\NCRStatisc.aspx.cs">
|
||||
<DependentUpon>NCRStatisc.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
|
|
@ -105,21 +105,21 @@
|
|||
</div>
|
||||
|
||||
|
||||
<div class="y_box js-hover" data-type="QualityProblem" style="width: 100%;">
|
||||
<div class="y_box js-hover" data-type="QualityInspection" style="width: 100%;">
|
||||
<div class="y_box_label y_image_default">质量验收数据</div>
|
||||
<div class="y_box_main">
|
||||
<div class="zl-card y_row">
|
||||
<div class="y_image_default y_column" style="width: 2.7625rem;">
|
||||
<div class="zl-label">整改闭环项</div>
|
||||
<div class="zl-number" style="color: #2BFAFF;"><%=GetProblemCompletedNum() %></div>
|
||||
<div class="zl-label">共检总数</div>
|
||||
<div class="zl-number" style="color: #2BFAFF;"><%=getAllInspectionManagement() %></div>
|
||||
</div>
|
||||
<div class="y_image_default y_column" style="width: 2.7625rem;">
|
||||
<div class="zl-label">未整改完成项</div>
|
||||
<div class="zl-number" style="color: #FF7474;"><%=GetProblemNotCompletedNum() %></div>
|
||||
<div class="zl-label">-次合格数量</div>
|
||||
<div class="zl-number" style="color: #FF7474;"><%=getIsOnceInspectionManagement() %></div>
|
||||
</div>
|
||||
<div class="y_image_default y_column" style="width: 2.7625rem;">
|
||||
<div class="zl-label">整改率</div>
|
||||
<div class="zl-number" style="color: #FFA602;"><%=GetProblemZgl() %></div>
|
||||
<div class="zl-label">-次验收合格率</div>
|
||||
<div class="zl-number" style="color: #FFA602;"><%=GetInspectionManagementZgl() %></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="zlysmap"></div>
|
||||
|
@ -544,6 +544,11 @@
|
|||
// $('iframe').attr('src', '../InterfacePopup/CQMS/QualityProblem.aspx') //质量问题数据
|
||||
window.open("../DataShow/QualityProblem.aspx")
|
||||
|
||||
}
|
||||
else if (type == 'QualityInspection') {
|
||||
// $('iframe').attr('src', '../InterfacePopup/CQMS/QualityProblem.aspx') //质量问题数据
|
||||
window.open("../DataShowLocal/InspectionManagementStatisc.aspx")
|
||||
|
||||
}
|
||||
else if (type == 'QualityControlPoint') {
|
||||
// $('iframe').attr('src', '../InterfacePopup/CQMS/QualityControlPoint.aspx') //质量控制点数据
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
using BLL;
|
||||
using FineUIPro.Web.BaseInfo;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices.ComTypes;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
@ -142,7 +144,7 @@ namespace FineUIPro.Web.common
|
|||
DateTime date = DateTime.Now.AddDays(-1);
|
||||
var result = (from x in Funs.DB.Comprehensive_DesignDetails
|
||||
where x.DetailsDate.Value.Year == date.Year && x.DetailsDate.Value.Month == date.Month && x.DetailsDate.Value.Day == date.Day
|
||||
select x.JoinPersonNum).ToList().Sum(x => x.Value);
|
||||
select x.JoinPersonNum??0).ToList().Sum();
|
||||
var q = Funs.GetNewIntOrZero(result.ToString());
|
||||
return q;
|
||||
}
|
||||
|
@ -162,6 +164,55 @@ namespace FineUIPro.Web.common
|
|||
this.spanQualityChartAnalysis.InnerHtml = allCount.ToString();
|
||||
}
|
||||
|
||||
#region 质量验收数据
|
||||
/// <summary>
|
||||
/// 共检总数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int getAllInspectionManagement()
|
||||
{
|
||||
int result = 0;
|
||||
;
|
||||
//统计所给时间段的全部数量
|
||||
List<Model.View_CQMS_InspectionManagementDetail> managementListSunNumber =
|
||||
BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(
|
||||
null, null, DateTime.Parse("2001-01-01"), DateTime.Now, false);
|
||||
result = managementListSunNumber.Count;
|
||||
//int result = (from x in Funs.DB.Check_CheckControl
|
||||
// where x.CheckDate <= DateTime.Now && x.State == "7"
|
||||
// select x).Count();
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 次合格数量
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int getIsOnceInspectionManagement()
|
||||
{
|
||||
int result = 0;
|
||||
//统计所给时间段的合格数量
|
||||
List<Model.View_CQMS_InspectionManagementDetail> managementListOneNumber =
|
||||
BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(
|
||||
null, null, DateTime.Parse("2001-01-01"), DateTime.Now, true);
|
||||
result = managementListOneNumber.Count;
|
||||
|
||||
//int result = (from x in Funs.DB.Check_CheckControl
|
||||
// where x.CheckDate <= DateTime.Now && x.State != "7"
|
||||
// select x).Count();
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 整改率
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static string GetInspectionManagementZgl()
|
||||
{
|
||||
string zgl = String.Format("{0:N2}", 100.0 * getIsOnceInspectionManagement() / getAllInspectionManagement());
|
||||
return zgl + "%";
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
#region 质量问题治理数据
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in New Issue