20250805 试压管理

This commit is contained in:
2025-08-05 23:34:06 +08:00
parent 151bdde705
commit 4e366b3827
22 changed files with 369 additions and 159 deletions
@@ -54,6 +54,7 @@ namespace FineUIPro.Web.HJGL.TestPackage
{
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
this.InitTreeMenu();//加载树
BindGrid();
}
}
@@ -172,10 +173,19 @@ namespace FineUIPro.Web.HJGL.TestPackage
t.TestPackageName,
(case when t.PrintState>0 then '第'+convert(varchar(10),t.PrintState)+'次打印' else '未打印' end) as PrintState,
t.TableDate
from PTP_TestPackage t where t.ProjectId=@projectId and t.UnitWorkId=@unitWorkId";
from PTP_TestPackage t where t.ProjectId=@projectId";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@unitWorkId", this.UnitWorkId));
if (!string.IsNullOrEmpty(this.UnitWorkId))
{
strSql += " and t.UnitWorkId =@unitWorkId";
listStr.Add(new SqlParameter("@unitWorkId", this.UnitWorkId));
}
if (!string.IsNullOrEmpty(this.txtTestPackageNo.Text.Trim()))
{
strSql += " and t.TestPackageNo like @testPackageNo";
listStr.Add(new SqlParameter("@testPackageNo", "%" + this.txtTestPackageNo.Text.Trim() + "%"));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
// 2.获取当前分页数据
@@ -466,9 +476,10 @@ namespace FineUIPro.Web.HJGL.TestPackage
break;
case "4"://管道试压包尾项清单
{
string sql = @"select PT_PipeId,PTP_ID,pipelineList.PipelineId,pipeline.PipelineCode from PTP_PipelineList as pipelineList
left join HJGL_Pipeline pipeline on pipeline.PipelineId = pipelineList.PipelineId
where PTP_ID=@ptp_id";
string sql = @"select ItemCheckId,PTP_ID,PTP_ItemEndCheck.PipelineId,Content,ItemType,Result,HJGL_Pipeline.PipelineCode from PTP_ItemEndCheck
left join PTP_ItemEndCheckList on PTP_ItemEndCheckList.ItemEndCheckListId = PTP_ItemEndCheck.ItemEndCheckListId
left join HJGL_Pipeline on HJGL_Pipeline.PipelineId = PTP_ItemEndCheck.PipelineId
where PTP_ItemEndCheckList.PTP_ID=@ptp_id";
List<SqlParameter> listStr = new List<SqlParameter>
{
new SqlParameter("@ptp_id", this.PTP_ID),
@@ -480,12 +491,16 @@ namespace FineUIPro.Web.HJGL.TestPackage
dt.TableName = "Data";
dt.Columns.Add("SortNumber");
dt.Columns.Add("PipelineCode");
dt.Columns.Add("Content");
dt.Columns.Add("ItemType");
for (int i = 0; i < tb.Rows.Count; i++)
{
var newRows = dt.NewRow();
newRows["SortNumber"] = (i + 1).ToString();
newRows["PipelineCode"] = tb.Rows[i]["PipelineCode"].ToString();
newRows["Content"] = tb.Rows[i]["Content"].ToString();
newRows["ItemType"] = tb.Rows[i]["ItemType"].ToString();
dt.Rows.Add(newRows);
}
@@ -506,12 +521,21 @@ namespace FineUIPro.Web.HJGL.TestPackage
break;
case "5"://管道系统压力试验记录
{
string sql = @"select PT_PipeId,PTP_ID,pipelineList.PipelineId,pipeline.PipelineCode,pipeline.DesignPress,pipeline.DesignTemperature,
testMedium.MediumName,pipelineList.TestPressure
from PTP_PipelineList as pipelineList
left join HJGL_Pipeline pipeline on pipeline.PipelineId = pipelineList.PipelineId
LEFT JOIN dbo.Base_TestMedium AS testMedium ON testMedium.TestMediumId = pipelineList.TestMedium
where PTP_ID=@ptp_id";
string sql = @"SELECT ptpPipe.PT_PipeId,
ptpPipe.PTP_ID,
ptpPipe.PipelineId,
ptpPipe.DesignPress, --设计压力
ptpPipe.DesignTemperature, --设计温度
ptpPipe.TestPressure, --试验压力
IsoInfo.PipelineCode,--管道编号/单线号
testMedium.MediumName,--试验介质
testPackage.AmbientTemperature,--试验环境温度
testPackage.TestMediumTemperature--试验介质温度
FROM dbo.PTP_PipelineList AS ptpPipe
LEFT JOIN dbo.HJGL_Pipeline AS IsoInfo ON ptpPipe.PipelineId = IsoInfo.PipelineId
LEFT JOIN dbo.Base_TestMedium AS testMedium ON testMedium.TestMediumId = IsoInfo.TestMedium
left join PTP_TestPackage as testPackage on testPackage.PTP_ID = ptpPipe.PTP_ID
where ptpPipe.PTP_ID=@ptp_id";
List<SqlParameter> listStr = new List<SqlParameter>
{
new SqlParameter("@ptp_id", this.PTP_ID),
@@ -526,6 +550,8 @@ namespace FineUIPro.Web.HJGL.TestPackage
dt.Columns.Add("DesignTemperature");
dt.Columns.Add("MediumName");
dt.Columns.Add("TestPressure");
dt.Columns.Add("AmbientTemperature");
dt.Columns.Add("TestMediumTemperature");
for (int i = 0; i < tb.Rows.Count; i++)
{
@@ -535,6 +561,9 @@ namespace FineUIPro.Web.HJGL.TestPackage
newRows["DesignTemperature"] = tb.Rows[i]["DesignTemperature"].ToString();
newRows["MediumName"] = tb.Rows[i]["MediumName"].ToString();
newRows["TestPressure"] = tb.Rows[i]["TestPressure"].ToString();
newRows["AmbientTemperature"] = tb.Rows[i]["AmbientTemperature"].ToString();
var temp = tb.Rows[i]["TestMediumTemperature"].ToString();
newRows["TestMediumTemperature"] = tb.Rows[i]["TestMediumTemperature"].ToString();
dt.Rows.Add(newRows);
}
@@ -911,7 +940,7 @@ namespace FineUIPro.Web.HJGL.TestPackage
if (iosList.Count > 0)
{
var q = iosList[0];
var isoNos = string.Join("','", iosList.Select(x => x.PipelineCode).ToArray());
var isoNos = string.Join(",", iosList.Select(x => x.PipelineCode).ToArray());
var isoIds = string.Join("','", iosList.Select(x => x.PipelineId).ToArray());
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
@@ -1546,5 +1575,17 @@ namespace FineUIPro.Web.HJGL.TestPackage
return spcificaation;
}
#endregion
#region
/// <summary>
/// 查询
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void txtTestPackageNo_TextChanged(object sender, EventArgs e)
{
BindGrid();
}
#endregion
}
}