feat(hjgl): 完善检测结果导入与焊接质量管理
通过批量导入、标准化打印和材料导出,减少检测结果及材料信息的人工整理,确保检测单、委托状态和焊口质量资料保持一致。
This commit is contained in:
@@ -88,13 +88,12 @@
|
||||
</f:Button>
|
||||
<f:Button ID="btnQuery" ToolTip="查询" Icon="SystemSearch" Text="查询"
|
||||
EnablePostBack="true" OnClick="btnQuery_Click" runat="server">
|
||||
</f:Button>
|
||||
<f:Button ID="btnPrint" Text="打印" Icon="Printer" runat="server"
|
||||
OnClick="btnPrint_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnMatImport" Text="材料导入" ToolTip="材料导入" Icon="PackageIn" runat="server" OnClick="btnMatImport_Click">
|
||||
</f:Button>
|
||||
|
||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出" ToolTip="导出" Icon="FolderUp"
|
||||
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
|
||||
@@ -734,73 +734,6 @@ namespace FineUIPro.Web.HJGL.DataImport
|
||||
|
||||
#endregion
|
||||
|
||||
#region 报表打印
|
||||
/// <summary>
|
||||
/// 报表打印
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnPrint_Click(object sender, EventArgs e)
|
||||
{
|
||||
string pipelineId = this.tvControlItem.SelectedNodeID;
|
||||
var q = BLL.PipelineService.GetPipelineByPipelineId(pipelineId);
|
||||
|
||||
if (q != null)
|
||||
{
|
||||
var jotCount = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == pipelineId select x).Count();
|
||||
var weldJotCount = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == pipelineId && x.WeldingDailyId != null select x).Count();
|
||||
if (jotCount == weldJotCount)
|
||||
{
|
||||
string varValue = string.Empty;
|
||||
var project = BLL.ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId);
|
||||
if (project != null)
|
||||
{
|
||||
varValue = project.ProjectName;
|
||||
var unitWork = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(q.UnitWorkId);
|
||||
if (unitWork != null)
|
||||
{
|
||||
varValue = varValue + "|" + unitWork.UnitWorkName;
|
||||
}
|
||||
}
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@IsoId", pipelineId));
|
||||
listStr.Add(new SqlParameter("@Flag", "0"));
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = BLL.SQLHelper.GetDataTableRunProc("HJGL_spJointWorkRecordNew", parameter);
|
||||
string page = Funs.GetPagesCountByPageSize(11, 16, tb.Rows.Count).ToString();
|
||||
|
||||
|
||||
varValue = varValue + "|" + page;
|
||||
|
||||
if (!string.IsNullOrEmpty(varValue))
|
||||
{
|
||||
varValue = HttpUtility.UrlEncodeUnicode(varValue);
|
||||
}
|
||||
if (tb.Rows.Count <= 11)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.HJGL_JointInfoReport1Id, pipelineId, varValue, this.CurrUser.LoginProjectId)));
|
||||
}
|
||||
else
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.HJGL_JointInfoReport2Id, pipelineId, varValue, this.CurrUser.LoginProjectId)));
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.HJGL_JointInfoReport1Id, pipelineId, varValue, this.CurrUser.LoginProjectId)));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("请选择焊接完成管线!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
ShowNotify("请选择管线!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 关闭弹出窗口及刷新页面
|
||||
/// <summary>
|
||||
/// 关闭弹出窗口
|
||||
@@ -951,47 +884,17 @@ namespace FineUIPro.Web.HJGL.DataImport
|
||||
/// <param name="e"></param>
|
||||
protected void btnOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
//var iso = BLL.Pipeline_PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID);
|
||||
//var workArea = BLL.Project_WorkAreaService.GetProject_WorkAreaByWorkAreaId(this.tvControlItem.SelectedNodeID);
|
||||
//if (iso != null)
|
||||
//{
|
||||
// PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("JointInfoOut.aspx?PipelineId={0}", this.tvControlItem.SelectedNodeID, "导出 - ")));
|
||||
//}
|
||||
//else if (workArea != null)
|
||||
//{
|
||||
// PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("JointInfoOut.aspx?WorkAreaId={0}", this.tvControlItem.SelectedNodeID, "导出 - ")));
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// Alert.ShowInTop("请选择"PipelineOrArea, MessageBoxIcon.Warning);
|
||||
//}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 导出焊口初始信息
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnOut2_Click(object sender, EventArgs e)
|
||||
{
|
||||
//var iso = BLL.Pipeline_PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID);
|
||||
//if (iso != null)
|
||||
//{
|
||||
// Response.ClearContent();
|
||||
// string filename = Funs.GetNewFileName();
|
||||
// Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode(Resources.Lan.WeldingJointInfo + filename, System.Text.Encoding.UTF8) + ".xls");
|
||||
// Response.ContentType = "application/excel";
|
||||
// Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
// this.Grid1.PageSize = 100000;
|
||||
// this.BindGrid();
|
||||
// Response.Write(GetGridTableHtml(Grid1));
|
||||
// Response.End();
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// Alert.ShowInTop("请选择"PipelinetFirst, MessageBoxIcon.Warning);
|
||||
//}
|
||||
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 = System.Text.Encoding.UTF8;
|
||||
this.Grid1.PageSize = 500;
|
||||
this.BindGrid1(this.tvControlItem.SelectedNodeID, this.hdUnitWorkId.Text);
|
||||
Response.Write(GetGridTableHtml(Grid1));
|
||||
Response.End();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 导出方法btnMatImport_Click
|
||||
@@ -1046,9 +949,6 @@ namespace FineUIPro.Web.HJGL.DataImport
|
||||
this.BindGrid2(this.tvControlItem.SelectedNodeID, this.hdUnitWorkId.Text);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#region 管线材料导入
|
||||
|
||||
/// <summary>
|
||||
@@ -1123,5 +1023,7 @@ namespace FineUIPro.Web.HJGL.DataImport
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,15 +176,6 @@ namespace FineUIPro.Web.HJGL.DataImport
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnQuery;
|
||||
|
||||
/// <summary>
|
||||
/// btnPrint 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnPrint;
|
||||
|
||||
/// <summary>
|
||||
/// btnMatImport 控件。
|
||||
/// </summary>
|
||||
@@ -194,6 +185,15 @@ namespace FineUIPro.Web.HJGL.DataImport
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnMatImport;
|
||||
|
||||
/// <summary>
|
||||
/// btnOut 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnOut;
|
||||
|
||||
/// <summary>
|
||||
/// TabStrip1 控件。
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user