11
This commit is contained in:
@@ -5,12 +5,29 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title>焊口综合信息</title>
|
||||
<style>
|
||||
<style>
|
||||
.f-grid-row-summary .f-grid-cell-inner {
|
||||
font-weight: bold;
|
||||
color: red;
|
||||
}
|
||||
</style>
|
||||
|
||||
/*定义父容器*/
|
||||
.content {
|
||||
width: 550px;
|
||||
height: 30px;
|
||||
background: #E4F1FB;
|
||||
margin: 0 auto;
|
||||
}
|
||||
/*定义进度条*/
|
||||
.box {
|
||||
width: 0px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
background: #3BAAE3;
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
@@ -27,10 +44,10 @@
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpWorkAreaId" runat="server" Label="<%$ Resources:Lan,Area %>" AutoPostBack="true"
|
||||
LabelAlign="Right" Width="280px" OnSelectedIndexChanged="drpWorkAreaId_OnSelectedIndexChanged">
|
||||
<f:DropDownList ID="drpWorkAreaId" runat="server" Label="<%$ Resources:Lan,Area %>" EnableMultiSelect="true" EnableCheckBoxSelect="true"
|
||||
AutoPostBack="true" LabelAlign="Right" Width="480px" OnSelectedIndexChanged="drpWorkAreaId_OnSelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpPipeLine" runat="server" Label="管线" LabelAlign="Right" Width="600px" EmptyText="请选择管线"
|
||||
<f:DropDownList ID="drpPipeLine" runat="server" Label="管线" LabelAlign="Right" Width="480px" EmptyText="请选择管线"
|
||||
LabelWidth="60px" EnableEdit="true" EnableCheckBoxSelect="true" EnableMultiSelect="true" >
|
||||
</f:DropDownList>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
@@ -248,6 +265,22 @@
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Window ID="WindowExport" Hidden="true" runat="server" MinHeight="30px"
|
||||
Target="Parent" ShowHeader="false" BodyPadding="0" Margin="0"
|
||||
IsModal="true" Width="550px" Height="30px">
|
||||
<Items>
|
||||
<f:ContentPanel ShowBorder="false" Height="30px" ShowHeader="false" ID="ContentPanel3" runat="server">
|
||||
<div class="content" id="content">
|
||||
<div class="box" id="box"></div>
|
||||
</div>
|
||||
</f:ContentPanel>
|
||||
</Items>
|
||||
</f:Window>
|
||||
<asp:ScriptManager ID="ScriptManager2" runat="server" EnablePageMethods="true">
|
||||
<Scripts>
|
||||
<asp:ScriptReference Path="~/res/ProcessBar.js" />
|
||||
</Scripts>
|
||||
</asp:ScriptManager>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -9,12 +9,28 @@ using System.Data.SqlClient;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Threading;
|
||||
|
||||
|
||||
namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
||||
{
|
||||
public partial class JointComprehensive : PageBase
|
||||
{
|
||||
public static int percent { get; set; }
|
||||
public static string url { get; set; }
|
||||
|
||||
[System.Web.Services.WebMethod]
|
||||
public static int getPercent()
|
||||
{
|
||||
return percent;
|
||||
}
|
||||
|
||||
[System.Web.Services.WebMethod]
|
||||
public static string getUrl()
|
||||
{
|
||||
return url;
|
||||
}
|
||||
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
@@ -37,9 +53,12 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
||||
|
||||
if (drpWorkAreaId.SelectedValue != Const._Null && drpWorkAreaId.SelectedValue != null)
|
||||
{
|
||||
listStr.Add(new SqlParameter("@workAreaId", this.drpWorkAreaId.SelectedValue));
|
||||
string[] areaList = drpWorkAreaId.SelectedValueArray;
|
||||
string workAreaIds = string.Join(",", areaList);
|
||||
listStr.Add(new SqlParameter("@workAreaIds", workAreaIds));
|
||||
// listStr.Add(new SqlParameter("@workAreaId", this.drpWorkAreaId.SelectedValue));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(drpPipeLine.SelectedValue))
|
||||
if (!string.IsNullOrEmpty(drpPipeLine.SelectedValue) && drpPipeLine.SelectedValue!=Const._Null)
|
||||
{
|
||||
string[] pipeList = drpPipeLine.SelectedValueArray;
|
||||
string pipeLineIds = string.Join(",", pipeList);
|
||||
@@ -95,10 +114,10 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
||||
|
||||
protected void drpWorkAreaId_OnSelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
string workAreaId = drpWorkAreaId.SelectedValue;
|
||||
if (!string.IsNullOrEmpty(workAreaId))
|
||||
string[] workAreaIds = drpWorkAreaId.SelectedValueArray;
|
||||
if (workAreaIds.Length == 1)
|
||||
{
|
||||
BLL.Pipeline_PipelineService.InitPipelineDropDownList(drpPipeLine, workAreaId);
|
||||
BLL.Pipeline_PipelineService.InitPipelineDropDownList(drpPipeLine, workAreaIds[0], Resources.Lan.PleaseSelect);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,12 +165,25 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region 导出按钮
|
||||
/// 导出按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
percent = 0;
|
||||
url = "";
|
||||
|
||||
Thread t = new Thread(new ThreadStart(() => { Export(); }));
|
||||
t.Start();
|
||||
PageContext.RegisterStartupScript("showProcessBar()");
|
||||
}
|
||||
|
||||
|
||||
private void Export()
|
||||
{
|
||||
string rootPath = Server.MapPath("~/") + Const.ExcelUrl;
|
||||
//模板文件
|
||||
@@ -162,7 +194,9 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
||||
{
|
||||
Directory.CreateDirectory(filePath);
|
||||
}
|
||||
string ReportFileName = filePath + "out.xlsx";
|
||||
|
||||
string ReportFileName = filePath + "焊口综合分析" + DateTime.Now.ToString("yyyyMMddhhmmss") + ".xlsx";
|
||||
//string ReportFileName = filePath + "out.xlsx";
|
||||
|
||||
FileStream file = new FileStream(TempletFileName, FileMode.Open, FileAccess.Read);
|
||||
XSSFWorkbook hssfworkbook = new XSSFWorkbook(file);
|
||||
@@ -192,6 +226,8 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
||||
dataTable.DefaultView.Sort = "WorkAreaCode asc,PipelineCode asc,WeldJointCode asc";
|
||||
DataTable tb = dataTable.DefaultView.ToTable();
|
||||
|
||||
int totalNum = tb.Rows.Count;
|
||||
|
||||
if (tb.Rows.Count > 0)
|
||||
{
|
||||
var rowIndex = 1;
|
||||
@@ -221,7 +257,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
||||
if (reportModel.GetRow(rowIndex).GetCell(4) == null) reportModel.GetRow(rowIndex).CreateCell(4);
|
||||
reportModel.GetRow(rowIndex).GetCell(4).SetCellValue(itemOver["SingleNumber"].ToString());
|
||||
reportModel.GetRow(rowIndex).GetCell(4).CellStyle = style;
|
||||
|
||||
|
||||
//管线号
|
||||
if (reportModel.GetRow(rowIndex).GetCell(5) == null) reportModel.GetRow(rowIndex).CreateCell(5);
|
||||
reportModel.GetRow(rowIndex).GetCell(5).SetCellValue(itemOver["PipelineCode"].ToString());
|
||||
@@ -383,10 +419,15 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
||||
if (reportModel.GetRow(rowIndex).GetCell(40) == null) reportModel.GetRow(rowIndex).CreateCell(40);
|
||||
reportModel.GetRow(rowIndex).GetCell(40).SetCellValue(ConvertWeldFlux(itemOver["WeldSilkId"]));
|
||||
reportModel.GetRow(rowIndex).GetCell(40).CellStyle = style;
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
rowIndex++;
|
||||
if ((int)(90 * (rowIndex) / totalNum) > percent)
|
||||
{
|
||||
percent = (int)(100 * (rowIndex) / totalNum);
|
||||
|
||||
}
|
||||
rowIndex++;
|
||||
}
|
||||
|
||||
var distinctPipelineCode = tb.AsEnumerable().GroupBy(row => row.Field<string>("PipelineId")).Select(group => group.First());
|
||||
@@ -433,6 +474,12 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
||||
if (reportModel.GetRow(rowIndex).GetCell(24) == null) reportModel.GetRow(rowIndex).CreateCell(24);
|
||||
reportModel.GetRow(rowIndex).GetCell(24).SetCellValue(coverWelder.Count().ToString());
|
||||
reportModel.GetRow(rowIndex).GetCell(24).CellStyle.SetFont(cs_content_Font);
|
||||
|
||||
//if ((int)(90 * (rowIndex + 1) / totalNum) > percent)
|
||||
//{
|
||||
// percent = (int)(100 * (rowIndex + 1) / totalNum);
|
||||
|
||||
//}
|
||||
}
|
||||
#endregion
|
||||
reportModel.ForceFormulaRecalculation = true;
|
||||
@@ -441,28 +488,25 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
||||
{
|
||||
hssfworkbook.Write(filess);
|
||||
}
|
||||
FileInfo filet = new FileInfo(ReportFileName);
|
||||
Response.Clear();
|
||||
Response.Charset = "GB2312";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
// 添加头信息,为"文件下载/另存为"对话框指定默认文件名
|
||||
Response.AddHeader("Content-Disposition", "attachment; filename=焊口综合分析_" + Server.UrlEncode(DateTime.Now.ToString("yyyyMMddhhmmss") + ".xlsx"));
|
||||
// 添加头信息,指定文件大小,让浏览器能够显示下载进度
|
||||
Response.AddHeader("Content-Length", filet.Length.ToString());
|
||||
// 指定返回的是一个不能被客户端读取的流,必须被下载
|
||||
Response.ContentType = "application/ms-excel";
|
||||
// 把文件流发送到客户端
|
||||
Response.WriteFile(filet.FullName);
|
||||
// 停止页面的执行
|
||||
Response.End();
|
||||
|
||||
//Response.ClearContent();
|
||||
//string filename = Funs.GetNewFileName();
|
||||
//Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode(Resources.Lan.JointComprehensive + filename, System.Text.Encoding.UTF8) + ".xls");
|
||||
//Response.ContentType = "application/excel";
|
||||
percent = 100;
|
||||
url = ReportFileName.Replace(Server.MapPath("~/"), "");
|
||||
|
||||
//FileInfo filet = new FileInfo(ReportFileName);
|
||||
//Response.Clear();
|
||||
//Response.Charset = "GB2312";
|
||||
//Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
//Response.Write(GetGridTableHtml(Grid1));
|
||||
//// 添加头信息,为"文件下载/另存为"对话框指定默认文件名
|
||||
//Response.AddHeader("Content-Disposition", "attachment; filename=焊口综合分析_" + Server.UrlEncode(DateTime.Now.ToString("yyyyMMddhhmmss") + ".xlsx"));
|
||||
//// 添加头信息,指定文件大小,让浏览器能够显示下载进度
|
||||
//Response.AddHeader("Content-Length", filet.Length.ToString());
|
||||
//// 指定返回的是一个不能被客户端读取的流,必须被下载
|
||||
//Response.ContentType = "application/ms-excel";
|
||||
//// 把文件流发送到客户端
|
||||
//Response.WriteFile(filet.FullName);
|
||||
//// 停止页面的执行
|
||||
//Response.End();
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
+49
-20
@@ -7,11 +7,13 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.WeldingProcess.WeldingReport {
|
||||
|
||||
|
||||
public partial class JointComprehensive {
|
||||
|
||||
namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
||||
{
|
||||
|
||||
|
||||
public partial class JointComprehensive
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
@@ -29,7 +31,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
@@ -38,7 +40,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
@@ -47,7 +49,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
@@ -56,7 +58,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpWorkAreaId 控件。
|
||||
/// </summary>
|
||||
@@ -65,7 +67,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpWorkAreaId;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpPipeLine 控件。
|
||||
/// </summary>
|
||||
@@ -74,7 +76,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpPipeLine;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
@@ -83,7 +85,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// BtnAnalyse 控件。
|
||||
/// </summary>
|
||||
@@ -92,7 +94,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button BtnAnalyse;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnOut 控件。
|
||||
/// </summary>
|
||||
@@ -101,7 +103,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnOut;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// labNumber 控件。
|
||||
/// </summary>
|
||||
@@ -110,7 +112,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label labNumber;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Label3 控件。
|
||||
/// </summary>
|
||||
@@ -119,7 +121,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label3;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Label1 控件。
|
||||
/// </summary>
|
||||
@@ -128,7 +130,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
@@ -137,7 +139,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// </summary>
|
||||
@@ -146,7 +148,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 控件。
|
||||
/// </summary>
|
||||
@@ -155,5 +157,32 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
|
||||
/// <summary>
|
||||
/// WindowExport 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window WindowExport;
|
||||
|
||||
/// <summary>
|
||||
/// ContentPanel3 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ContentPanel ContentPanel3;
|
||||
|
||||
/// <summary>
|
||||
/// ScriptManager2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.ScriptManager ScriptManager2;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RTRateConfirm.aspx.cs" Inherits="FineUIPro.Web.WeldingProcess.WeldingReport.RTRateConfirm" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title>RT比例确认表</title>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
</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="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="RT比例确认表"
|
||||
EnableCollapse="true" runat="server" BoxFlex="1" EnableColumnLines="true" >
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpWorkAreaId" runat="server" Label="<%$ Resources:Lan,Area %>"
|
||||
AutoPostBack="true" LabelAlign="Right" Width="480px" OnSelectedIndexChanged="drpWorkAreaId_OnSelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpPipeLine" runat="server" Label="管线" LabelAlign="Right" Width="480px" EmptyText="请选择管线"
|
||||
LabelWidth="60px" EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
<f:Button ID="BtnAnalyse" Text="查询" Icon="ChartPie"
|
||||
runat="server" OnClick="BtnAnalyse_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:RenderField HeaderText="管线号" ColumnID="PipelineCode"
|
||||
DataField="PipelineCode" FieldType="String" HeaderTextAlign="Center"
|
||||
Width="260px" >
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="材质" ColumnID="MaterialCode"
|
||||
DataField="MaterialCode" FieldType="String" HeaderTextAlign="Center"
|
||||
Width="150px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="规格" ColumnID="Specification"
|
||||
DataField="Specification" FieldType="String"
|
||||
HeaderTextAlign="Center" Width="150px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="焊口总数" ColumnID="JointTotalNum"
|
||||
DataField="JointTotalNum" FieldType="String" HeaderTextAlign="Center"
|
||||
Width="130px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="固定口数" ColumnID="GJointTotalNum"
|
||||
DataField="GJointTotalNum" FieldType="String"
|
||||
HeaderTextAlign="Center" Width="130px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="焊工代号" ColumnID="WelderCode"
|
||||
DataField="WelderCode" FieldType="String" HeaderTextAlign="Center"
|
||||
Width="130px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="施焊数量" ColumnID="WeldingNum"
|
||||
DataField="WeldingNum" FieldType="String" HeaderTextAlign="Center"
|
||||
Width="130px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="检测总数" ColumnID="NdeNum" DataField="NdeNum"
|
||||
FieldType="String" HeaderTextAlign="Center" Width="130px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="检测固定口数" ColumnID="GNdeNum" DataField="GNdeNum"
|
||||
FieldType="String" HeaderTextAlign="Center" Width="130px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="实际检测比例" ColumnID="CheckRate" DataField="CheckRate"
|
||||
FieldType="String" HeaderTextAlign="Center" Width="130px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="应检测比例" ColumnID="DetectionRate" DataField="DetectionRate"
|
||||
FieldType="String" HeaderTextAlign="Center" Width="130px">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="dataload" Handler="onGridDataLoad" />
|
||||
</Listeners>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</form>
|
||||
<script>
|
||||
function onGridDataLoad(event) {
|
||||
this.mergeColumns(['PipelineCode', 'MaterialCode', 'Specification', 'JointTotalNum', 'GJointTotalNum']);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,94 @@
|
||||
using BLL;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
||||
{
|
||||
public partial class RTRateConfirm : PageBase
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
BLL.Project_WorkAreaService.InitWorkAreaDropDownList(this.drpWorkAreaId, true, this.CurrUser.LoginProjectId, string.Empty, string.Empty, string.Empty, Resources.Lan.PleaseSelect);//区域
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"SELECT t.WorkAreaId,t.PipelineCode,mat.MaterialCode,t.Specification,t.JointTotalNum,t.GJointTotalNum,
|
||||
welder.WelderCode,t.WeldingNum,t.NdeNum,t.GNdeNum,(CONVERT(NVARCHAR(10),r.DetectionRateValue)+'%') AS DetectionRate,
|
||||
CONVERT(NVARCHAR(10),((CAST((CASE ISNULL(t.WeldingNum,0) WHEN 0 THEN 0
|
||||
ELSE 1.0 * ISNULL(t.NdeNum,0) /(1.0 * t.WeldingNum)
|
||||
END ) AS DECIMAL(9,2)))*100))+'%' AS CheckRate
|
||||
FROM
|
||||
(SELECT pipe.WorkAreaId, jot.PipelineId,pipe.PipelineCode,pipe.MainMaterialId,pipe.DetectionRateId,jot.CoverWelderId,
|
||||
COUNT(*) AS WeldingNum, pipe.Specification,--MAX(jot.Specification) AS Specification,
|
||||
(SELECT COUNT(*) FROM dbo.Pipeline_WeldJoint WHERE PipelineId=jot.PipelineId) AS JointTotalNum,
|
||||
(SELECT COUNT(*) FROM dbo.Pipeline_WeldJoint WHERE PipelineId=jot.PipelineId AND JointAttribute='固定F') AS GJointTotalNum,
|
||||
(SELECT count(1) FROM Batch_NDEItem as nde
|
||||
LEFT join Batch_BatchTrustItem as trust ON trust.TrustBatchItemId = nde.TrustBatchItemId
|
||||
LEFT JOIN View_Pipeline_WeldJoint as joint ON joint.WeldJointId=trust.WeldJointId
|
||||
WHERE joint.PipelineId=jot.PipelineId and joint.CoverWelderId=jot.CoverWelderId) AS NdeNum,
|
||||
(SELECT count(1) FROM Batch_NDEItem as nde
|
||||
LEFT join Batch_BatchTrustItem as trust ON trust.TrustBatchItemId = nde.TrustBatchItemId
|
||||
LEFT JOIN View_Pipeline_WeldJoint as joint ON joint.WeldJointId=trust.WeldJointId
|
||||
WHERE joint.PipelineId=jot.PipelineId and joint.CoverWelderId=jot.CoverWelderId AND joint.JointAttribute='固定F') AS GNdeNum
|
||||
FROM dbo.Pipeline_WeldJoint jot
|
||||
LEFT JOIN dbo.Pipeline_Pipeline pipe ON pipe.PipelineId = jot.PipelineId
|
||||
WHERE jot.CoverWelderId IS NOT NULL
|
||||
GROUP BY pipe.WorkAreaId, jot.PipelineId,pipe.PipelineCode,pipe.MainMaterialId,pipe.Specification,pipe.DetectionRateId,jot.CoverWelderId) t
|
||||
LEFT JOIN dbo.Base_Material mat ON mat.MaterialId = t.MainMaterialId
|
||||
LEFT JOIN dbo.Welder_Welder welder ON welder.WelderId = t.CoverWelderId
|
||||
LEFT JOIN dbo.Base_DetectionRate r ON r.DetectionRateId = t.DetectionRateId
|
||||
WHERE t.PipelineId=@PipelineId";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>
|
||||
{
|
||||
};
|
||||
listStr.Add(new SqlParameter("@PipelineId", this.drpPipeLine.SelectedValue));
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
Grid1.DataSource = tb;
|
||||
Grid1.DataBind();
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void drpWorkAreaId_OnSelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
string[] workAreaIds = drpWorkAreaId.SelectedValueArray;
|
||||
if (workAreaIds.Length == 1)
|
||||
{
|
||||
BLL.Pipeline_PipelineService.InitPipelineDropDownList(drpPipeLine, workAreaIds[0], Resources.Lan.PleaseSelect);
|
||||
}
|
||||
}
|
||||
|
||||
#region 统计按钮事件
|
||||
/// <summary>
|
||||
/// 统计
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void BtnAnalyse_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (drpPipeLine.SelectedValue != null && drpPipeLine.SelectedValue != Const._Null)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("请选择管线!", MessageBoxIcon.Warning);
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
||||
{
|
||||
|
||||
|
||||
public partial class RTRateConfirm
|
||||
{
|
||||
|
||||
/// <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>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// drpWorkAreaId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpWorkAreaId;
|
||||
|
||||
/// <summary>
|
||||
/// drpPipeLine 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpPipeLine;
|
||||
|
||||
/// <summary>
|
||||
/// BtnAnalyse 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button BtnAnalyse;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user