2022-10-25 焊接修改
This commit is contained in:
@@ -56,6 +56,28 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
ViewState["JointNoPre"] = value;
|
||||
}
|
||||
}
|
||||
public string Completed_weldedjunction
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["Completed_weldedjunction"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["Completed_weldedjunction"] = value;
|
||||
}
|
||||
}
|
||||
public string Incomplete_weldjunction
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["Incomplete_weldjunction"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["Incomplete_weldjunction"] = value;
|
||||
}
|
||||
}
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
ctlAuditFlow.Url = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId);
|
||||
@@ -221,6 +243,9 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
parameter3D.TagNum = "";
|
||||
parameter3D.ButtonType = "0,2";
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
||||
parameter3D.Completed_weldedjunction = Completed_weldedjunction;
|
||||
parameter3D.Incomplete_weldjunction = Incomplete_weldjunction;
|
||||
|
||||
if (this.tvControlItem.SelectedNode.CommandName == "单位工程")
|
||||
{
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
||||
@@ -278,43 +303,90 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"SELECT * FROM dbo.View_HJGL_JointInfoQuery
|
||||
WHERE ProjectId= @ProjectId";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@projectId", this.CurrUser.LoginProjectId));
|
||||
//string strSql = @"SELECT * FROM dbo.View_HJGL_JointInfoQuery
|
||||
// WHERE ProjectId= @ProjectId";
|
||||
//List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
//listStr.Add(new SqlParameter("@projectId", this.CurrUser.LoginProjectId));
|
||||
//if (this.tvControlItem.SelectedNode.CommandName == "单位工程")
|
||||
//{
|
||||
// strSql += " AND UnitWorkId =@UnitWorkId";
|
||||
// listStr.Add(new SqlParameter("@UnitWorkId", this.tvControlItem.SelectedNodeID));
|
||||
|
||||
//}
|
||||
//else if (this.tvControlItem.SelectedNode.CommandName == "管线")
|
||||
//{
|
||||
// strSql += " AND PipelineId = @PipelineId";
|
||||
// listStr.Add(new SqlParameter("@PipelineId", this.tvControlItem.SelectedNodeID));
|
||||
//}
|
||||
//if (!string.IsNullOrEmpty(this.txtWeldJointCode.Text.Trim()))
|
||||
//{
|
||||
// strSql += " AND WeldJointCode LIKE @WeldJointCode";
|
||||
// listStr.Add(new SqlParameter("@WeldJointCode", this.txtWeldJointCode.Text.Trim()));
|
||||
//}
|
||||
//SqlParameter[] parameter = listStr.ToArray();
|
||||
//DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
//var q = tb.AsEnumerable().Where(x => x["WeldingDate"].ToString() != "");
|
||||
//var q2 = tb.AsEnumerable().Where(x => x["JointAttribute"].ToString() == "预制口");
|
||||
//var sumcount = tb.Rows.Count;
|
||||
//this.Grid1.RecordCount = tb.Rows.Count;
|
||||
Model.View_HJGL_WeldJoint model =new Model.View_HJGL_WeldJoint();
|
||||
model.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (this.tvControlItem.SelectedNode.CommandName == "单位工程")
|
||||
{
|
||||
strSql += " AND UnitWorkId =@UnitWorkId";
|
||||
listStr.Add(new SqlParameter("@UnitWorkId", this.tvControlItem.SelectedNodeID));
|
||||
model.UnitWorkId = this.tvControlItem.SelectedNodeID;
|
||||
|
||||
}
|
||||
else if (this.tvControlItem.SelectedNode.CommandName == "管线")
|
||||
{
|
||||
strSql += " AND PipelineId = @PipelineId";
|
||||
listStr.Add(new SqlParameter("@PipelineId", this.tvControlItem.SelectedNodeID));
|
||||
model.PipelineId= this.tvControlItem.SelectedNodeID;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtWeldJointCode.Text.Trim()))
|
||||
{
|
||||
strSql += " AND WeldJointCode LIKE @WeldJointCode";
|
||||
listStr.Add(new SqlParameter("@WeldJointCode", this.txtWeldJointCode.Text.Trim()));
|
||||
}
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
var q = tb.AsEnumerable().Where(x => x["WeldingDate"].ToString() != "");
|
||||
var q2 = tb.AsEnumerable().Where(x => x["JointAttribute"].ToString() == "预制口");
|
||||
var sumcount= tb.Rows.Count;
|
||||
this.Grid1.RecordCount = tb.Rows.Count;
|
||||
model.WeldJointCode = this.txtWeldJointCode.Text;
|
||||
var list= BLL.WeldJointService.GetViewWeldJointsBymodel(model);
|
||||
get3DParmeter_weldjoint(list);//获取三维所需焊口参数
|
||||
var q = list.Where(x => !string.IsNullOrEmpty(x.WeldingDate));
|
||||
var q2 = list.Where(x =>x.JointAttribute == "预制口");
|
||||
var sumcount= list.Count;
|
||||
this.Grid1.RecordCount = list.Count;
|
||||
|
||||
this.JointComplete = q.Count();
|
||||
this.JointNoComplete = sumcount - JointComplete;
|
||||
this.JointPre = q2.Count();
|
||||
this.JointNoPre = sumcount - JointPre;
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
//var table = this.GetPagedDataTable(Grid1, list);
|
||||
Grid1.DataSource = list;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
|
||||
private void get3DParmeter_weldjoint(List<View_HJGL_WeldJoint> model)
|
||||
{
|
||||
if (model.Any())
|
||||
{
|
||||
var q = model.Where(x => !string.IsNullOrEmpty(x.WeldingDate));//获取已完成焊口
|
||||
if (q.Any())
|
||||
{
|
||||
List<string> Completed_weldedjunctionList = new List<string>();
|
||||
|
||||
foreach (var item in q)
|
||||
{
|
||||
Completed_weldedjunctionList.Add("/" + item.WeldJointCode);
|
||||
}
|
||||
Completed_weldedjunction = string.Join(",", Completed_weldedjunctionList);
|
||||
}
|
||||
|
||||
var q1 = model.Where(x => string.IsNullOrEmpty(x.WeldingDate));//获取未完成管线
|
||||
if (q1.Any())
|
||||
{
|
||||
List<string> Incomplete_weldjunctionList = new List<string>();
|
||||
foreach (var item in q1)
|
||||
{
|
||||
Incomplete_weldjunctionList.Add("/" + item.PipelineCode);
|
||||
}
|
||||
Incomplete_weldjunction = string.Join(",", Incomplete_weldjunctionList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#region
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
@@ -449,6 +521,8 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
parameter3D.ColorModel = colorModel;
|
||||
parameter3D.TagNum = pipecode;
|
||||
parameter3D.ButtonType = "0,2";
|
||||
parameter3D.Completed_weldedjunction = Completed_weldedjunction;
|
||||
parameter3D.Incomplete_weldjunction=Incomplete_weldjunction;
|
||||
if (this.tvControlItem.SelectedNode.CommandName == "单位工程")
|
||||
{
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
||||
|
||||
@@ -95,10 +95,16 @@
|
||||
DataField="PipelineCode" SortField="PipelineCode" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="220px" Locked="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="是否完成" ColumnID="IsFinished"
|
||||
<%--<f:RenderField HeaderText="是否完成" ColumnID="IsFinished"
|
||||
DataField="IsFinished" SortField="IsFinished" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="90px" Locked="true">
|
||||
</f:RenderField>
|
||||
</f:RenderField>--%>
|
||||
<f:TemplateField Width="90px" HeaderText="是否完成" HeaderTextAlign="Center"
|
||||
TextAlign="Center" SortField="IsFinished">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="txtIsFinished" runat="server" Text='<%# ConvertIsFinished(Eval("IsFinished")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField HeaderText="完成日期" ColumnID="FinishedDate"
|
||||
DataField="FinishedDate" SortField="FinishedDate" FieldType="Date" Renderer="Date" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="100px" Locked="true">
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -203,6 +203,15 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// txtIsFinished 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label txtIsFinished;
|
||||
|
||||
/// <summary>
|
||||
/// Label1 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -109,10 +109,16 @@
|
||||
Title="管线号" DataToolTipField="PipelineCode" SortField="PipelineCode"
|
||||
Locked="true">
|
||||
</f:WindowField>
|
||||
<f:RenderField HeaderText="管线划分" ColumnID="PipeArea"
|
||||
<%-- <f:RenderField HeaderText="管线划分" ColumnID="PipeArea"
|
||||
DataField="PipeArea" SortField="PipeArea" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Center" Width="300px">
|
||||
</f:RenderField>
|
||||
</f:RenderField>--%>
|
||||
<f:TemplateField Width="300px" HeaderText="管线划分" HeaderTextAlign="Center"
|
||||
TextAlign="Center" SortField="PipeArea">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="txt" runat="server" Text='<%# ConvertPipeArea(Eval("PipeArea")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
</Columns>
|
||||
|
||||
<PageItems>
|
||||
|
||||
@@ -33,6 +33,17 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
ViewState["PipelineNOComplete"] = value;
|
||||
}
|
||||
}
|
||||
public string Line_No
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["Line_No"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["Line_No"] = value;
|
||||
}
|
||||
}
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
ctlAuditFlow.Url = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId);
|
||||
@@ -148,7 +159,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
parameter3D.TagNum = "";
|
||||
parameter3D.ButtonType = "0,1";
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
||||
|
||||
parameter3D.Line_No = Line_No;
|
||||
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId) + "item/IPE%7CVPD%7C" + parameter3D.ModelName;
|
||||
ctlAuditFlow.data = parameter3D;
|
||||
ctlAuditFlow.BindData();
|
||||
@@ -162,47 +173,33 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"SELECT ProjectId,UnitWorkId,PipelineId,PipelineCode,
|
||||
(CASE WHEN PipeArea='1' THEN '工厂预制' WHEN PipeArea='2' THEN '现场施工'
|
||||
ELSE '' END) AS PipeArea
|
||||
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()))
|
||||
|
||||
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.SingleName = this.txtSingleName.Text.Trim();
|
||||
view_HJGL_Pipeline.DesignPress=this.txtDesignPress.Text.Trim();
|
||||
view_HJGL_Pipeline.MaterialCode=this.txtMaterialCode.Text.Trim();
|
||||
var list = BLL.PipelineService.GetView_HJGL_Pipelines(view_HJGL_Pipeline);
|
||||
var q = list.Where(x => x.PipeArea == PipelineService.PipeArea_SHOP );
|
||||
var q2 = list.Where(x => x.PipeArea == PipelineService.PipeArea_FIELD );
|
||||
if (q.Any())
|
||||
{
|
||||
strSql += " AND PipelineCode LIKE @PipelineCode";
|
||||
listStr.Add(new SqlParameter("@PipelineCode", "%" + this.txtPipelineCode.Text.Trim() + "%"));
|
||||
List<string> listpipecode = new List<string>();
|
||||
foreach (var item in q)
|
||||
{
|
||||
listpipecode.Add("/" + item.PipelineCode);
|
||||
}
|
||||
Line_No = string.Join(",", listpipecode);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtSingleName.Text.Trim()))
|
||||
{
|
||||
strSql += " AND SingleName LIKE @SingleName";
|
||||
listStr.Add(new SqlParameter("@SingleName", "%" + this.txtSingleName.Text.Trim() + "%"));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtDesignPress.Text.Trim()))
|
||||
{
|
||||
strSql += " AND DesignPress LIKE @DesignPress";
|
||||
listStr.Add(new SqlParameter("@DesignPress", "%" + this.txtDesignPress.Text.Trim() + "%"));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtMaterialCode.Text.Trim()))
|
||||
{
|
||||
strSql += " AND MaterialCode LIKE @MaterialCode";
|
||||
listStr.Add(new SqlParameter("@MaterialCode", "%" + this.txtMaterialCode.Text.Trim() + "%"));
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
var q = tb.AsEnumerable().Where(x => x["PipeArea"].ToString() == "工厂预制");
|
||||
var q2 = tb.AsEnumerable().Where(x => x["PipeArea"].ToString() == "现场施工");
|
||||
|
||||
PipelineComplete = q.Count();
|
||||
PipelineNOComplete = q2.Count();
|
||||
// 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();
|
||||
//list = GetFilteredTable(Grid1.FilteredData, list);
|
||||
var table = this.GetPagedDataTable(Grid1, list);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
@@ -284,6 +281,8 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
parameter3D.TagNum = pipecode;
|
||||
parameter3D.ButtonType = "0,1";
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
||||
parameter3D.Line_No = Line_No;
|
||||
|
||||
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId) + "item/IPE%7CVPD%7C" + parameter3D.ModelName;
|
||||
ctlAuditFlow.data = parameter3D;
|
||||
ctlAuditFlow.BindData();
|
||||
@@ -363,29 +362,24 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
}
|
||||
|
||||
#endregion
|
||||
protected string ConvertDetectionType(object detectionType)
|
||||
protected string ConvertPipeArea(object PipeArea)
|
||||
{
|
||||
string detectionName = string.Empty;
|
||||
if (detectionType != null)
|
||||
string PipeAreaValue = string.Empty;
|
||||
if (PipeArea != null)
|
||||
{
|
||||
string[] types = detectionType.ToString().Split('|');
|
||||
foreach (string t in types)
|
||||
var q = PipelineService.GetPipeArea().Where(x => x.Value == PipeArea.ToString());
|
||||
if (q!=null&&q.Count()>0)
|
||||
{
|
||||
var type = BLL.Base_DetectionTypeService.GetDetectionTypeByDetectionTypeId(t);
|
||||
if (type != null)
|
||||
{
|
||||
detectionName += type.DetectionTypeCode + ",";
|
||||
}
|
||||
PipeAreaValue = q.First().Text;
|
||||
|
||||
}
|
||||
}
|
||||
if (detectionName != string.Empty)
|
||||
{
|
||||
return detectionName.Substring(0, detectionName.Length - 1);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
return "";
|
||||
}
|
||||
return PipeAreaValue;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -230,6 +230,15 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// txt 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label txt;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -5,6 +5,11 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title>查询焊口</title>
|
||||
<style type="text/css">
|
||||
.tn-color-green .f-tree-folder {
|
||||
color: green;
|
||||
}
|
||||
</style>
|
||||
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
Reference in New Issue
Block a user