代码无效引用清理,试压包资料界面看板修改

This commit is contained in:
2025-10-10 14:33:21 +08:00
parent 87fb529521
commit 55b798135c
933 changed files with 5897 additions and 7541 deletions
@@ -11,6 +11,7 @@ namespace FineUIPro.Web.HJGL.TestPackage
public partial class TestPackageComplete : PageBase
{
#region
/// <summary>
/// 试压包主键
/// </summary>
@@ -25,93 +26,10 @@ namespace FineUIPro.Web.HJGL.TestPackage
ViewState["PTP_ID"] = value;
}
}
#endregion
#endregion
#region
/// <summary>
/// 加载页面
/// </summary>
@@ -122,6 +40,11 @@ namespace FineUIPro.Web.HJGL.TestPackage
if (!IsPostBack)
{
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
drpStateStr.DataTextField = "Value";
drpStateStr.DataValueField = "Value";
drpStateStr.DataSource= BLL.TestPackageEditService.StateMap;
drpStateStr.DataBind();
this.PTP_ID = string.Empty;
Model.Project_Sys_Set pressUnit = BLL.Project_SysSetService.GetSysSetBySetId("8", this.CurrUser.LoginProjectId);
if (pressUnit != null && pressUnit.SetValue == "2")
@@ -133,9 +56,11 @@ namespace FineUIPro.Web.HJGL.TestPackage
BindGrid2();
}
}
#endregion
#endregion
#region --
/// <summary>
/// 加载树
/// </summary>
@@ -177,7 +102,7 @@ namespace FineUIPro.Web.HJGL.TestPackage
testPackageLists = (from x in Funs.DB.PTP_TestPackage
where x.ProjectId == this.CurrUser.LoginProjectId
select x).ToList();
}
}
List<Model.WBS_UnitWork> unitWork1 = null;
List<Model.WBS_UnitWork> unitWork2 = null;
@@ -193,20 +118,20 @@ namespace FineUIPro.Web.HJGL.TestPackage
//}
//else
//{
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
//}
var dicUnitWorkTestPackagePassPercent= BLL.TestPackageEditService.GetTestPackagePassPercentByProjectId(this.CurrUser.LoginProjectId);
var dicUnitWorkTestPackagePassPercent = BLL.TestPackageEditService.GetTestPackagePassPercentByProjectId(this.CurrUser.LoginProjectId);
if (unitWork1.Count() > 0)
{
foreach (var q in unitWork1)
{
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
var unitWorkTestPackagePassPercent = dicUnitWorkTestPackagePassPercent.TryGetValue(q.UnitWorkId, out var value) ? value : 0;
TreeNode tn1 = new TreeNode();
TreeNode tn1 = new TreeNode();
tn1.NodeID = q.UnitWorkId;
tn1.Text = q.UnitWorkName+"(已完成"+ unitWorkTestPackagePassPercent+"%)";
tn1.Text = q.UnitWorkName + "(已完成" + unitWorkTestPackagePassPercent + "%)";
tn1.ToolTip = "施工单位:" + unitNamesUnitIds;
tn1.CommandName = "单位工程";
rootNode1.Nodes.Add(tn1);
@@ -232,9 +157,11 @@ namespace FineUIPro.Web.HJGL.TestPackage
}
}
}
#endregion
#endregion --
#region
/// <summary>
/// 绑定树节点
/// </summary>
@@ -280,9 +207,10 @@ namespace FineUIPro.Web.HJGL.TestPackage
}
}
#endregion
#endregion
#region TreeView
/// <summary>
/// 点击TreeView
/// </summary>
@@ -294,7 +222,7 @@ namespace FineUIPro.Web.HJGL.TestPackage
this.BindGrid();
}
#endregion
#endregion TreeView
#region
/// <summary>
@@ -304,10 +232,10 @@ namespace FineUIPro.Web.HJGL.TestPackage
{
this.SetTextTemp();
this.PageInfoLoad(); ///页面输入保存信息
string strSql = @" SELECT ptpPipe.PT_PipeId, ptpPipe.PTP_ID, ptpPipe.PipelineId, ptpPipe.DesignPress,
ptpPipe.DesignTemperature, ptpPipe.AmbientTemperature, ptpPipe.TestMedium,
string strSql = @" SELECT ptpPipe.PT_PipeId, ptpPipe.PTP_ID, ptpPipe.PipelineId, ptpPipe.DesignPress,
ptpPipe.DesignTemperature, ptpPipe.AmbientTemperature, ptpPipe.TestMedium,
ptpPipe.TestMediumTemperature, ptpPipe.TestPressure, ptpPipe.HoldingTime,IsoInfo.PipelineCode,testMedium.MediumName
FROM dbo.PTP_PipelineList AS ptpPipe
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
WHERE ptpPipe.PTP_ID=@PTP_ID";
@@ -336,22 +264,58 @@ namespace FineUIPro.Web.HJGL.TestPackage
Grid2.DataSource = null;
Grid2.DataBind();
return;
}
}
if (!string.IsNullOrEmpty(this.txtGrid2code.Text.Trim()))
{
projectTestPackages = projectTestPackages.Where(x => x.TestPackageNo.Contains(this.txtGrid2code.Text.Trim())).ToList();
}
// 分析每个试压包
var analyzeList = new List<Model.TestPackageAnalyzeOutput>();
foreach (var pkg in projectTestPackages)
{
var analyze = BLL.TestPackageEditService.getTestPackageAnalyze(pkg.PTP_ID, pkg.ProjectId);
var analyze = BLL.TestPackageEditService.getTestPackageAnalyze(pkg.PTP_ID, pkg.ProjectId);
analyzeList.Add(analyze);
}
analyzeList = analyzeList.OrderBy(x => x.UnitWorkName).ThenBy(x => x.TestPackageNo).ToList();
if (drpCanPressureTest.SelectedValueArray.Length>0)
{
analyzeList = analyzeList.Where(x => drpCanPressureTest.SelectedValueArray.ToList().Contains(x.CanPressureTest)).ToList();
}
if (drpStateStr.SelectedValueArray.Length > 0)
{
analyzeList = analyzeList.Where(x => drpStateStr.SelectedValueArray.ToList().Contains(x.StateStr)).ToList();
}
// 绑定到Grid1
Grid2.RecordCount = analyzeList.Count;
Grid2.DataSource = analyzeList;
Grid2.DataBind();
// 设置行样式(保留原逻辑)
for (int i = 0; i < Grid2.Rows.Count; i++)
{
string ptpId = Grid2.Rows[i].DataKeys[0].ToString();
var ptpModel = analyzeList.FirstOrDefault(x=>x.PTP_ID== ptpId);
if (ptpModel != null)
{
if (ptpModel.CanPressureTest== "未具备")
{
Grid2.Rows[i].RowCssClass = "Red";
}
else if (ptpModel.CanPressureTest == "易具备")
{
Grid2.Rows[i].RowCssClass = "Yellow";
}
}
}
}
#region
/// <summary>
/// 加载页面输入保存信息
/// </summary>
@@ -370,9 +334,11 @@ namespace FineUIPro.Web.HJGL.TestPackage
this.txtTestMediumTemperature.Text = testPackageManage.TestMediumTemperature.ToString();
}
}
#endregion
#endregion
#region
/// <summary>
/// 清空页面输入信息
/// </summary>
@@ -386,416 +352,65 @@ namespace FineUIPro.Web.HJGL.TestPackage
this.txtTestMediumTemperature.Text = string.Empty;
}
#endregion
#endregion
#endregion
#endregion
#region
#region
/// <summary>
/// 页索引改变事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
/// 页索引改变事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
{
BindGrid();
}
#endregion
#endregion
#region
/// <summary>
/// 排序
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_Sort(object sender, GridSortEventArgs e)
/// 排序
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_Sort(object sender, GridSortEventArgs e)
{
BindGrid();
}
#endregion
#endregion
#region
/// <summary>
/// 分页选择下拉改变事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
/// 分页选择下拉改变事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
BindGrid();
}
#endregion
#endregion
#endregion
#endregion
#region
/// <summary>
/// 关闭弹出窗口
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Window1_Close(object sender, WindowCloseEventArgs e)
/// 关闭弹出窗口
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
this.PTP_ID = this.hdPTP_ID.Text;
this.BindGrid();
@@ -803,79 +418,18 @@ namespace FineUIPro.Web.HJGL.TestPackage
this.hdPTP_ID.Text = string.Empty;
}
/// <summary>
/// 查询
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Tree_TextChanged(object sender, EventArgs e)
protected void Tree_TextChanged(object sender, EventArgs e)
{
this.InitTreeMenu();
this.BindGrid();
}
#endregion
#endregion
protected void btnMenuModify_Click(object sender, EventArgs e)
{
@@ -925,6 +479,7 @@ namespace FineUIPro.Web.HJGL.TestPackage
}
#region
/// <summary>
/// 查询
/// </summary>
@@ -934,6 +489,12 @@ namespace FineUIPro.Web.HJGL.TestPackage
{
InitTreeMenu();
}
#endregion
protected void btnSearch_Click(object sender, EventArgs e)
{
BindGrid2();
}
#endregion
}
}