2022-10-25 焊接修改
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using BLL;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
@@ -9,6 +10,28 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
{
|
||||
public partial class PipelineQuery : PageBase
|
||||
{
|
||||
public string Completed_pipeline
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["Completed_pipeline"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["Completed_pipeline"] = value;
|
||||
}
|
||||
}
|
||||
public string Incomplete_pipeline
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["Incomplete_pipeline"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["Incomplete_pipeline"] = value;
|
||||
}
|
||||
}
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
ctlAuditFlow.Url = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId);
|
||||
@@ -118,6 +141,8 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
parameter3D.TagNum = "";
|
||||
parameter3D.ButtonType = "0,2";
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
||||
parameter3D.Completed_pipeline = Completed_pipeline;
|
||||
parameter3D.Incomplete_pipeline = Incomplete_pipeline;
|
||||
|
||||
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId) + "item/IPE%7CVPD%7C"+ parameter3D.ModelName;
|
||||
ctlAuditFlow.data = parameter3D;
|
||||
@@ -132,46 +157,89 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"SELECT ProjectId,UnitWorkId,PipelineId,PipelineCode,UnitName,MediumCode,MediumName,PipingClassCode,UnitWorkCode,SingleName,
|
||||
TestPressure,SingleNumber,DetectionRateCode,DetectionType,Remark,TestMediumCode,TotalDin,FinishSize,
|
||||
JointCount,PressurePipingClassCode,PipeLenth,DesignPress,DesignTemperature,LeakPressure,VacuumPressure,
|
||||
LeakMediumName,PCMediumName,MaterialCode,FinishedDate,
|
||||
(CASE WHEN IsFinished=1 THEN '已完成' ELSE '未完成' END) AS IsFinished
|
||||
FROM dbo.View_HJGL_Pipeline
|
||||
WHERE ProjectId= @ProjectId";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
// string strSql = @"SELECT ProjectId,UnitWorkId,PipelineId,PipelineCode,UnitName,MediumCode,MediumName,PipingClassCode,UnitWorkCode,SingleName,
|
||||
// TestPressure,SingleNumber,DetectionRateCode,DetectionType,Remark,TestMediumCode,TotalDin,FinishSize,
|
||||
// JointCount,PressurePipingClassCode,PipeLenth,DesignPress,DesignTemperature,LeakPressure,VacuumPressure,
|
||||
// LeakMediumName,PCMediumName,MaterialCode,FinishedDate,
|
||||
//(CASE WHEN IsFinished=1 THEN '已完成' ELSE '未完成' END) AS IsFinished
|
||||
// FROM dbo.View_HJGL_Pipeline
|
||||
// WHERE ProjectId= @ProjectId";
|
||||
// List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
// listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
|
||||
strSql += " AND UnitWorkId =@UnitWorkId";
|
||||
listStr.Add(new SqlParameter("@UnitWorkId", this.tvControlItem.SelectedNodeID));
|
||||
if (!string.IsNullOrEmpty(this.txtPipelineCode.Text.Trim()))
|
||||
{
|
||||
strSql += " AND PipelineCode LIKE @PipelineCode";
|
||||
listStr.Add(new SqlParameter("@PipelineCode", "%" + this.txtPipelineCode.Text.Trim() + "%"));
|
||||
}
|
||||
// strSql += " AND UnitWorkId =@UnitWorkId";
|
||||
// listStr.Add(new SqlParameter("@UnitWorkId", this.tvControlItem.SelectedNodeID));
|
||||
// if (!string.IsNullOrEmpty(this.txtPipelineCode.Text.Trim()))
|
||||
// {
|
||||
// strSql += " AND PipelineCode LIKE @PipelineCode";
|
||||
// listStr.Add(new SqlParameter("@PipelineCode", "%" + this.txtPipelineCode.Text.Trim() + "%"));
|
||||
// }
|
||||
// if (drpIsFinish.SelectedValue == "1")
|
||||
// {
|
||||
// strSql += " AND pipe.IsFinished = 1";
|
||||
// }
|
||||
// if (drpIsFinish.SelectedValue == "0")
|
||||
// {
|
||||
// strSql += " AND (pipe.IsFinished IS NULL OR pipe.IsFinished = 0)";
|
||||
// }
|
||||
|
||||
// SqlParameter[] parameter = listStr.ToArray();
|
||||
// DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
Model.View_HJGL_Pipeline view_HJGL_Pipeline = new Model.View_HJGL_Pipeline();
|
||||
view_HJGL_Pipeline.ProjectId = this.CurrUser.LoginProjectId;
|
||||
view_HJGL_Pipeline.UnitWorkId = this.tvControlItem.SelectedNodeID;
|
||||
view_HJGL_Pipeline.PipelineCode = this.txtPipelineCode.Text.Trim();
|
||||
view_HJGL_Pipeline.IsFinished = null;
|
||||
if (drpIsFinish.SelectedValue == "1")
|
||||
{
|
||||
strSql += " AND pipe.IsFinished = 1";
|
||||
}
|
||||
view_HJGL_Pipeline.IsFinished = true;
|
||||
}
|
||||
if (drpIsFinish.SelectedValue == "0")
|
||||
{
|
||||
strSql += " AND (pipe.IsFinished IS NULL OR pipe.IsFinished = 0)";
|
||||
view_HJGL_Pipeline.IsFinished = false;
|
||||
}
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
var list = BLL.PipelineService.GetView_HJGL_Pipelines(view_HJGL_Pipeline);
|
||||
get3DParmeter_pipeline(list);
|
||||
// 2.获取当前分页数据
|
||||
//var table = this.GetPagedDataTable(Grid1, tb1);
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.RecordCount = list.Count;
|
||||
//tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
var table = this.GetPagedDataTable(Grid1, list);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
|
||||
}
|
||||
#endregion
|
||||
private void get3DParmeter_pipeline(List<View_HJGL_Pipeline> view_HJGL_Pipelines )
|
||||
{
|
||||
if (view_HJGL_Pipelines.Any())
|
||||
{
|
||||
var q = view_HJGL_Pipelines.Where(x => x.IsFinished == true);//获取已完成管线
|
||||
if (q.Any())
|
||||
{
|
||||
List<string> Completed_pipelineList = new List<string>();
|
||||
|
||||
foreach (var item in q)
|
||||
{
|
||||
Completed_pipelineList.Add("/" + item.PipelineCode);
|
||||
}
|
||||
Completed_pipeline = string.Join(",", Completed_pipelineList);
|
||||
}
|
||||
|
||||
var q1 = view_HJGL_Pipelines.Where(x => x.IsFinished != true);//获取未完成管线
|
||||
if (q1.Any())
|
||||
{
|
||||
List<string> Incomplete_pipelineList = new List<string>();
|
||||
foreach (var item in q1)
|
||||
{
|
||||
Incomplete_pipelineList.Add("/" + item.PipelineCode);
|
||||
}
|
||||
Incomplete_pipeline = string.Join(",", Incomplete_pipelineList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
#region 分页排序
|
||||
#region 页索引改变事件
|
||||
/// <summary>
|
||||
@@ -325,7 +393,19 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
protected string ConvertIsFinished(object IsFinished)
|
||||
{
|
||||
string IsFinishedValue = "未完成";
|
||||
if (IsFinished != null)
|
||||
{
|
||||
if (IsFinished.ToString()=="True")
|
||||
{
|
||||
IsFinishedValue = "已完成";
|
||||
}
|
||||
|
||||
}
|
||||
return IsFinishedValue;
|
||||
}
|
||||
protected void btnGetChart_Click(object sender, EventArgs e)
|
||||
{
|
||||
decimal PipelineComplete = 0;
|
||||
@@ -372,6 +452,9 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
parameter3D.TagNum = pipecode;
|
||||
parameter3D.ButtonType = "0,2";
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
||||
parameter3D.Completed_pipeline = Completed_pipeline;
|
||||
parameter3D.Incomplete_pipeline = Incomplete_pipeline;
|
||||
|
||||
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId) + "item/IPE%7CVPD%7C" + parameter3D.ModelName;
|
||||
ctlAuditFlow.data = parameter3D;
|
||||
ctlAuditFlow.BindData();
|
||||
|
||||
Reference in New Issue
Block a user