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>
|
||||
|
||||
Reference in New Issue
Block a user