2022-09-05 16:36:31 +08:00
|
|
|
|
using BLL;
|
2023-02-20 21:59:35 +08:00
|
|
|
|
using MiniExcelLibs;
|
2022-10-25 22:30:17 +08:00
|
|
|
|
using Model;
|
2022-09-05 16:36:31 +08:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Data;
|
2023-02-20 21:59:35 +08:00
|
|
|
|
using System.IO;
|
2022-09-05 16:36:31 +08:00
|
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
|
|
|
|
namespace FineUIPro.Web.HJGL.InfoQuery
|
|
|
|
|
|
{
|
|
|
|
|
|
public partial class PipelineQuery : PageBase
|
|
|
|
|
|
{
|
2022-11-01 17:11:30 +08:00
|
|
|
|
public string Line_No
|
2022-10-25 22:30:17 +08:00
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
return (string)ViewState["Completed_pipeline"];
|
|
|
|
|
|
}
|
|
|
|
|
|
set
|
|
|
|
|
|
{
|
|
|
|
|
|
ViewState["Completed_pipeline"] = value;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-10-10 14:33:21 +08:00
|
|
|
|
public static List<Model.View_HJGL_Pipeline> View_HJGL_Pipeline = new List<Model.View_HJGL_Pipeline>();
|
2022-11-01 17:11:30 +08:00
|
|
|
|
//public string Incomplete_pipeline
|
|
|
|
|
|
//{
|
|
|
|
|
|
// get
|
|
|
|
|
|
// {
|
|
|
|
|
|
// return (string)ViewState["Incomplete_pipeline"];
|
|
|
|
|
|
// }
|
|
|
|
|
|
// set
|
|
|
|
|
|
// {
|
|
|
|
|
|
// ViewState["Incomplete_pipeline"] = value;
|
|
|
|
|
|
// }
|
|
|
|
|
|
//}
|
2022-09-05 16:36:31 +08:00
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
|
|
|
|
{
|
2026-05-30 10:14:10 +08:00
|
|
|
|
//ctlAuditFlow.Url = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId);
|
2022-09-05 16:36:31 +08:00
|
|
|
|
|
|
|
|
|
|
if (!IsPostBack)
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
|
|
|
|
|
this.InitTreeMenu();//加载树
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#region 加载树装置-单位-工作区
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 加载树
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
private void InitTreeMenu()
|
|
|
|
|
|
{
|
|
|
|
|
|
this.tvControlItem.Nodes.Clear();
|
|
|
|
|
|
|
|
|
|
|
|
TreeNode rootNode1 = new TreeNode();
|
|
|
|
|
|
rootNode1.NodeID = "1";
|
|
|
|
|
|
rootNode1.Text = "建筑工程";
|
|
|
|
|
|
rootNode1.CommandName = "建筑工程";
|
|
|
|
|
|
rootNode1.Selectable = false;
|
|
|
|
|
|
this.tvControlItem.Nodes.Add(rootNode1);
|
|
|
|
|
|
|
|
|
|
|
|
TreeNode rootNode2 = new TreeNode();
|
|
|
|
|
|
rootNode2.NodeID = "2";
|
|
|
|
|
|
rootNode2.Text = "安装工程";
|
|
|
|
|
|
rootNode2.CommandName = "安装工程";
|
|
|
|
|
|
rootNode2.Expanded = true;
|
|
|
|
|
|
this.tvControlItem.Nodes.Add(rootNode2);
|
|
|
|
|
|
|
|
|
|
|
|
var pUnits = (from x in Funs.DB.Project_ProjectUnit where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
|
|
|
|
|
|
// 获取当前用户所在单位
|
|
|
|
|
|
var currUnit = pUnits.FirstOrDefault(x => x.UnitId == this.CurrUser.UnitId);
|
|
|
|
|
|
|
|
|
|
|
|
var unitWorkList = (from x in Funs.DB.WBS_UnitWork
|
|
|
|
|
|
where x.ProjectId == this.CurrUser.LoginProjectId
|
|
|
|
|
|
&& x.SuperUnitWork == null && x.UnitId != null && x.ProjectType != null
|
|
|
|
|
|
select x).ToList();
|
|
|
|
|
|
|
|
|
|
|
|
List<Model.WBS_UnitWork> unitWork1 = null;
|
|
|
|
|
|
List<Model.WBS_UnitWork> unitWork2 = null;
|
|
|
|
|
|
|
2023-08-30 16:19:19 +08:00
|
|
|
|
//// 当前为施工单位,只能操作本单位的数据
|
|
|
|
|
|
//if (currUnit != null && currUnit.UnitType == Const.ProjectUnitType_2)
|
|
|
|
|
|
//{
|
|
|
|
|
|
// unitWork1 = (from x in unitWorkList
|
|
|
|
|
|
// where x.UnitId == this.CurrUser.UnitId && x.ProjectType == "1"
|
|
|
|
|
|
// select x).ToList();
|
|
|
|
|
|
// unitWork2 = (from x in unitWorkList
|
|
|
|
|
|
// where x.UnitId == this.CurrUser.UnitId && x.ProjectType == "2"
|
|
|
|
|
|
// select x).ToList();
|
|
|
|
|
|
//}
|
|
|
|
|
|
//else
|
|
|
|
|
|
//{
|
2025-10-10 14:33:21 +08:00
|
|
|
|
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
|
|
|
|
|
|
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
|
2023-08-30 16:19:19 +08:00
|
|
|
|
//}
|
2022-09-05 16:36:31 +08:00
|
|
|
|
|
|
|
|
|
|
if (unitWork1.Count() > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var q in unitWork1)
|
|
|
|
|
|
{
|
2022-12-30 15:36:30 +08:00
|
|
|
|
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count();
|
2023-10-25 19:44:10 +08:00
|
|
|
|
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
|
2022-09-05 16:36:31 +08:00
|
|
|
|
TreeNode tn1 = new TreeNode();
|
|
|
|
|
|
tn1.NodeID = q.UnitWorkId;
|
|
|
|
|
|
tn1.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线";
|
2023-10-25 19:44:10 +08:00
|
|
|
|
tn1.ToolTip = "施工单位:" + unitNamesUnitIds;
|
2022-09-05 16:36:31 +08:00
|
|
|
|
tn1.EnableClickEvent = true;
|
|
|
|
|
|
rootNode1.Nodes.Add(tn1);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
if (unitWork2.Count() > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var q in unitWork2)
|
|
|
|
|
|
{
|
2022-12-30 15:36:30 +08:00
|
|
|
|
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count();
|
2023-10-25 19:44:10 +08:00
|
|
|
|
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
|
2022-09-05 16:36:31 +08:00
|
|
|
|
TreeNode tn2 = new TreeNode();
|
|
|
|
|
|
tn2.NodeID = q.UnitWorkId;
|
|
|
|
|
|
tn2.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线";
|
2023-10-25 19:44:10 +08:00
|
|
|
|
tn2.ToolTip = "施工单位:" + unitNamesUnitIds;
|
2022-09-05 16:36:31 +08:00
|
|
|
|
tn2.EnableClickEvent = true;
|
|
|
|
|
|
rootNode2.Nodes.Add(tn2);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 点击TreeView
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 点击TreeView
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="sender"></param>
|
|
|
|
|
|
/// <param name="e"></param>
|
|
|
|
|
|
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
this.BindGrid();
|
2025-10-10 14:33:21 +08:00
|
|
|
|
|
2022-09-05 16:36:31 +08:00
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 数据绑定
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 数据绑定
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
private void BindGrid()
|
|
|
|
|
|
{
|
2025-10-10 14:33:21 +08:00
|
|
|
|
// 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() + "%"));
|
|
|
|
|
|
// }
|
|
|
|
|
|
// 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);
|
2023-02-20 21:59:35 +08:00
|
|
|
|
Model.View_HJGL_Pipeline view_HJGL_Pipeline = new Model.View_HJGL_Pipeline();
|
2022-10-25 22:30:17 +08:00
|
|
|
|
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;
|
2022-09-05 16:36:31 +08:00
|
|
|
|
if (drpIsFinish.SelectedValue == "1")
|
|
|
|
|
|
{
|
2022-10-25 22:30:17 +08:00
|
|
|
|
view_HJGL_Pipeline.IsFinished = true;
|
2025-10-10 14:33:21 +08:00
|
|
|
|
}
|
2022-09-05 16:36:31 +08:00
|
|
|
|
if (drpIsFinish.SelectedValue == "0")
|
|
|
|
|
|
{
|
2022-10-25 22:30:17 +08:00
|
|
|
|
view_HJGL_Pipeline.IsFinished = false;
|
2022-09-05 16:36:31 +08:00
|
|
|
|
}
|
2022-10-25 22:30:17 +08:00
|
|
|
|
var list = BLL.PipelineService.GetView_HJGL_Pipelines(view_HJGL_Pipeline);
|
2023-02-20 21:59:35 +08:00
|
|
|
|
View_HJGL_Pipeline = list;
|
2022-10-25 22:30:17 +08:00
|
|
|
|
get3DParmeter_pipeline(list);
|
2022-09-05 16:36:31 +08:00
|
|
|
|
// 2.获取当前分页数据
|
|
|
|
|
|
//var table = this.GetPagedDataTable(Grid1, tb1);
|
2022-10-25 22:30:17 +08:00
|
|
|
|
Grid1.RecordCount = list.Count;
|
|
|
|
|
|
//tb = GetFilteredTable(Grid1.FilteredData, tb);
|
|
|
|
|
|
var table = this.GetPagedDataTable(Grid1, list);
|
2022-09-05 16:36:31 +08:00
|
|
|
|
Grid1.DataSource = table;
|
|
|
|
|
|
Grid1.DataBind();
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
2025-10-10 14:33:21 +08:00
|
|
|
|
private void get3DParmeter_pipeline(List<View_HJGL_Pipeline> view_HJGL_Pipelines)
|
2022-10-25 22:30:17 +08:00
|
|
|
|
{
|
|
|
|
|
|
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>();
|
2022-09-05 16:36:31 +08:00
|
|
|
|
|
2022-10-25 22:30:17 +08:00
|
|
|
|
foreach (var item in q)
|
|
|
|
|
|
{
|
|
|
|
|
|
Completed_pipelineList.Add("/" + item.PipelineCode);
|
|
|
|
|
|
}
|
2022-11-01 17:11:30 +08:00
|
|
|
|
Line_No = string.Join(",", Completed_pipelineList);
|
2022-10-25 22:30:17 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2022-11-01 17:11:30 +08:00
|
|
|
|
//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);
|
|
|
|
|
|
//}
|
2025-10-10 14:33:21 +08:00
|
|
|
|
|
2022-10-25 22:30:17 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
2022-09-05 16:36:31 +08:00
|
|
|
|
#region 分页排序
|
|
|
|
|
|
#region 页索引改变事件
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 页索引改变事件
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="sender"></param>
|
|
|
|
|
|
/// <param name="e"></param>
|
|
|
|
|
|
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
Grid1.PageIndex = e.NewPageIndex;
|
|
|
|
|
|
BindGrid();
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 排序
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 排序
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="sender"></param>
|
|
|
|
|
|
/// <param name="e"></param>
|
|
|
|
|
|
protected void Grid1_Sort(object sender, GridSortEventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
Grid1.SortDirection = e.SortDirection;
|
|
|
|
|
|
Grid1.SortField = e.SortField;
|
|
|
|
|
|
BindGrid();
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 分页选择下拉改变事件
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 分页选择下拉改变事件
|
|
|
|
|
|
/// </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
|
|
|
|
|
|
|
|
|
|
|
|
#region 查询页面
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="sender"></param>
|
|
|
|
|
|
/// <param name="e"></param>
|
|
|
|
|
|
protected void btnQuery_Click(object sender, EventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
this.BindGrid();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="sender"></param>
|
|
|
|
|
|
/// <param name="e"></param>
|
|
|
|
|
|
protected void Tree_TextChanged(object sender, EventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
this.InitTreeMenu();
|
|
|
|
|
|
this.BindGrid();
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
2023-02-20 21:59:35 +08:00
|
|
|
|
|
2022-09-05 16:36:31 +08:00
|
|
|
|
#region 导出按钮
|
|
|
|
|
|
/// 导出按钮
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="sender"></param>
|
|
|
|
|
|
/// <param name="e"></param>
|
|
|
|
|
|
protected void btnOut_Click(object sender, EventArgs e)
|
|
|
|
|
|
{
|
2023-02-20 21:59:35 +08:00
|
|
|
|
string path = Funs.RootPath + @"File\Excel\Temp\pipelineQuery.xlsx";
|
|
|
|
|
|
path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd-HH-mm}", DateTime.Now) + ".xlsx");
|
|
|
|
|
|
var q = (from x in View_HJGL_Pipeline
|
|
|
|
|
|
select new
|
|
|
|
|
|
{
|
|
|
|
|
|
管线号 = x.PipelineCode,
|
2025-10-10 14:33:21 +08:00
|
|
|
|
是否完成 = x.IsFinished,
|
|
|
|
|
|
完成日期 = x.FinishedDate,
|
|
|
|
|
|
完成达因 = x.FinishSize,
|
|
|
|
|
|
完成焊口 = x.FinishJointCount,
|
|
|
|
|
|
总达因数 = x.TotalDin,
|
|
|
|
|
|
总焊口量 = x.JointCount,
|
|
|
|
|
|
预制口量 = x.ShopJointCount,
|
2024-03-28 09:47:10 +08:00
|
|
|
|
管线划分 = x.PipeAreaStr,
|
2025-10-10 14:33:21 +08:00
|
|
|
|
无损检测类型 = x.DetectionTypeCode,
|
|
|
|
|
|
探伤比例 = x.DetectionRateCode,
|
|
|
|
|
|
介质名称 = x.MediumName,
|
|
|
|
|
|
管道等级 = x.PipingClassCode,
|
|
|
|
|
|
图纸名称 = x.SingleName,
|
|
|
|
|
|
单线图号 = x.SingleNumber,
|
|
|
|
|
|
设计压力 = x.DesignPress,
|
|
|
|
|
|
设计温度 = x.DesignTemperature,
|
|
|
|
|
|
压力试验介质 = x.TestMediumCode,
|
|
|
|
|
|
压力试验压力 = x.TestPressure,
|
|
|
|
|
|
压力管道级别 = x.PressurePipingClassCode,
|
|
|
|
|
|
管线长度 = x.PipeLenth,
|
|
|
|
|
|
泄露试验介质 = x.LeakMediumName,
|
|
|
|
|
|
泄露试验压力 = x.LeakPressure,
|
|
|
|
|
|
吹洗要求 = x.PCMediumName,
|
|
|
|
|
|
真空试验压力 = x.VacuumPressure,
|
|
|
|
|
|
材质 = x.MaterialCode,
|
|
|
|
|
|
备注 = x.Remark
|
2023-02-20 21:59:35 +08:00
|
|
|
|
}).ToList();
|
|
|
|
|
|
MiniExcel.SaveAs(path, q);
|
|
|
|
|
|
|
|
|
|
|
|
string fileName = "管线信息总览.xlsx";
|
|
|
|
|
|
FileInfo info = new FileInfo(path);
|
|
|
|
|
|
long fileSize = info.Length;
|
|
|
|
|
|
System.Web.HttpContext.Current.Response.Clear();
|
|
|
|
|
|
System.Web.HttpContext.Current.Response.ContentType = "application/x-zip-compressed";
|
|
|
|
|
|
System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
|
|
|
|
|
|
System.Web.HttpContext.Current.Response.AddHeader("Content-Length", fileSize.ToString());
|
|
|
|
|
|
System.Web.HttpContext.Current.Response.TransmitFile(path, 0, fileSize);
|
|
|
|
|
|
System.Web.HttpContext.Current.Response.Flush();
|
|
|
|
|
|
System.Web.HttpContext.Current.Response.Close();
|
|
|
|
|
|
File.Delete(path);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Response.ClearContent();
|
|
|
|
|
|
//string filename = Funs.GetNewFileName();
|
|
|
|
|
|
//Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("管线信息总览" + filename, System.Text.Encoding.UTF8) + ".xls");
|
|
|
|
|
|
//Response.ContentType = "application/excel";
|
|
|
|
|
|
//Response.ContentEncoding = System.Text.Encoding.UTF8;
|
|
|
|
|
|
////this.Grid1.PageSize = this.;
|
|
|
|
|
|
//BindGrid();
|
|
|
|
|
|
//Response.Write(GetGridTableHtml(Grid1));
|
|
|
|
|
|
//Response.End();
|
2022-09-05 16:36:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//#pragma warning disable CS0108 // “PersonList.GetGridTableHtml(Grid)”隐藏继承的成员“PageBase.GetGridTableHtml(Grid)”。如果是有意隐藏,请使用关键字 new。
|
|
|
|
|
|
// /// <summary>
|
|
|
|
|
|
// /// 导出方法
|
|
|
|
|
|
// /// </summary>
|
|
|
|
|
|
// /// <param name="grid"></param>
|
|
|
|
|
|
// /// <returns></returns>
|
|
|
|
|
|
// private string GetGridTableHtml(Grid grid)
|
|
|
|
|
|
//#pragma warning restore CS0108 // “PersonList.GetGridTableHtml(Grid)”隐藏继承的成员“PageBase.GetGridTableHtml(Grid)”。如果是有意隐藏,请使用关键字 new。
|
|
|
|
|
|
// {
|
|
|
|
|
|
// StringBuilder sb = new StringBuilder();
|
|
|
|
|
|
// sb.Append("<meta http-equiv=\"content-type\" content=\"application/excel; charset=UTF-8\"/>");
|
|
|
|
|
|
// sb.Append("<table cellspacing=\"0\" rules=\"all\" border=\"1\" style=\"border-collapse:collapse;\">");
|
|
|
|
|
|
// sb.Append("<tr>");
|
|
|
|
|
|
// foreach (GridColumn column in grid.Columns)
|
|
|
|
|
|
// {
|
|
|
|
|
|
// sb.AppendFormat("<td>{0}</td>", column.HeaderText);
|
|
|
|
|
|
// }
|
|
|
|
|
|
// sb.Append("</tr>");
|
|
|
|
|
|
// foreach (GridRow row in grid.Rows)
|
|
|
|
|
|
// {
|
|
|
|
|
|
// sb.Append("<tr>");
|
|
|
|
|
|
// foreach (GridColumn column in grid.Columns)
|
|
|
|
|
|
// {
|
|
|
|
|
|
// string html = row.Values[column.ColumnIndex].ToString();
|
|
|
|
|
|
// if (column.ColumnID == "tfNumber")
|
|
|
|
|
|
// {
|
|
|
|
|
|
// html = (row.FindControl("labNumber") as AspNet.Label).Text;
|
|
|
|
|
|
// }
|
|
|
|
|
|
// if (column.ColumnID == "tfI")
|
|
|
|
|
|
// {
|
|
|
|
|
|
// html = (row.FindControl("lbI") as AspNet.Label).Text;
|
|
|
|
|
|
// }
|
|
|
|
|
|
// //sb.AppendFormat("<td>{0}</td>", html);
|
|
|
|
|
|
// sb.AppendFormat("<td style='vnd.ms-excel.numberformat:@;width:140px;'>{0}</td>", html);
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
// sb.Append("</tr>");
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
// sb.Append("</table>");
|
|
|
|
|
|
|
|
|
|
|
|
// return sb.ToString();
|
|
|
|
|
|
// }
|
2026-06-24 09:59:56 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 管道数据表导出按钮
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
protected void btnPipelineDataOut_Click(object sender, EventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
var pipelines = GetCurrentPipelineList();
|
|
|
|
|
|
if (pipelines.Count == 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
ShowNotify("没有可导出的管线数据!", MessageBoxIcon.Warning);
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
string templatePath = Funs.RootPath + @"File\Excel\DataOut\管道数据表导出模板.xlsx";
|
|
|
|
|
|
if (!File.Exists(templatePath))
|
|
|
|
|
|
{
|
|
|
|
|
|
ShowNotify("导出模板不存在!", MessageBoxIcon.Warning);
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
string tempPath = Funs.RootPath + @"File\Excel\Temp\管道数据表.xlsx";
|
|
|
|
|
|
tempPath = tempPath.Replace(".xlsx", string.Format("{0:yyyy-MM-dd-HH-mm-ss}", DateTime.Now) + ".xlsx");
|
|
|
|
|
|
Directory.CreateDirectory(Path.GetDirectoryName(tempPath));
|
|
|
|
|
|
|
|
|
|
|
|
var pipelineIds = pipelines.Select(x => x.PipelineId).Where(x => !string.IsNullOrEmpty(x)).ToList();
|
|
|
|
|
|
var hotPipelineIds = Funs.DB.HJGL_WeldJoint
|
|
|
|
|
|
.Where(x => x.ProjectId == this.CurrUser.LoginProjectId && x.PipelineId != null && pipelineIds.Contains(x.PipelineId) && x.IsHotProess == true)
|
|
|
|
|
|
.Select(x => x.PipelineId)
|
|
|
|
|
|
.Distinct()
|
|
|
|
|
|
.ToList();
|
|
|
|
|
|
var hotPipelineIdSet = new HashSet<string>(hotPipelineIds);
|
|
|
|
|
|
|
|
|
|
|
|
var pipelineData = pipelines.Select((x, index) => new
|
|
|
|
|
|
{
|
|
|
|
|
|
No = index + 1,
|
|
|
|
|
|
PipelineCode = SafeText(x.PipelineCode),
|
|
|
|
|
|
PipingClassCode = SafeText(x.PipingClassCode),
|
|
|
|
|
|
MediumName = SafeText(x.MediumName),
|
|
|
|
|
|
PressurePipingClassCode = SafeText(x.PressurePipingClassCode),
|
|
|
|
|
|
DesignPress = SafeText(x.DesignPress),
|
|
|
|
|
|
DesignTemperature = SafeText(x.DesignTemperature),
|
|
|
|
|
|
OperatePressure = "/",
|
|
|
|
|
|
OperateTemperature = "/",
|
|
|
|
|
|
PWHT = hotPipelineIdSet.Contains(x.PipelineId) ? "PWHT" : "/",
|
|
|
|
|
|
DetectionRateCode = SafeText(x.DetectionRateCode),
|
|
|
|
|
|
InsulationType = "/",
|
|
|
|
|
|
Tracing = "/",
|
|
|
|
|
|
TestType = "/",
|
|
|
|
|
|
TestMethod = SafeText(x.TestMediumCode),
|
|
|
|
|
|
TestPressure = SafeText(x.TestPressure)
|
|
|
|
|
|
}).ToList();
|
|
|
|
|
|
|
|
|
|
|
|
var weldJoints = Funs.DB.View_HJGL_WeldJoint
|
|
|
|
|
|
.Where(x => x.ProjectId == this.CurrUser.LoginProjectId && x.PipelineId != null && pipelineIds.Contains(x.PipelineId))
|
|
|
|
|
|
.OrderBy(x => x.PipelineCode)
|
|
|
|
|
|
.ThenBy(x => x.WeldJointCode)
|
|
|
|
|
|
.ToList();
|
|
|
|
|
|
var weldJointIds = weldJoints.Select(x => x.WeldJointId).Where(x => !string.IsNullOrEmpty(x)).ToList();
|
|
|
|
|
|
var pointJointIds = Funs.DB.HJGL_Batch_PointBatchItem
|
|
|
|
|
|
.Where(x => x.WeldJointId != null && weldJointIds.Contains(x.WeldJointId) && x.PointState != null)
|
|
|
|
|
|
.Select(x => x.WeldJointId)
|
|
|
|
|
|
.Distinct()
|
|
|
|
|
|
.ToList();
|
|
|
|
|
|
var pointJointIdSet = new HashSet<string>(pointJointIds);
|
|
|
|
|
|
|
|
|
|
|
|
var weldJointData = weldJoints.Select((x, index) => new
|
|
|
|
|
|
{
|
|
|
|
|
|
No = index + 1,
|
|
|
|
|
|
SingleNumber = SafeText(x.SingleNumber),
|
|
|
|
|
|
WeldJointCode = SafeText(x.WeldJointCode),
|
|
|
|
|
|
Dia = x.Dia,
|
|
|
|
|
|
Thickness = x.Thickness,
|
|
|
|
|
|
MaterialCode = SafeText(x.MaterialCode),
|
|
|
|
|
|
WeldingDate = SafeText(x.WeldingDate),
|
|
|
|
|
|
WelderName = JoinTexts(x.BackingWelderName, x.CoverWelderName),
|
|
|
|
|
|
CertificateNo = "/",
|
|
|
|
|
|
WelderCode = JoinTexts(x.BackingWelderCode, x.CoverWelderCode),
|
|
|
|
|
|
WelderExamDate = "/",
|
|
|
|
|
|
TestJointDate = "/",
|
|
|
|
|
|
RootWeldingData = FormatWeldingData(x.WeldingMethodCode, x.WeldingRodCode, x.WeldingWireCode),
|
|
|
|
|
|
RemainingWeldingData = FormatWeldingData(x.WeldingMethodCode, x.WeldingRodCode, x.WeldingWireCode),
|
|
|
|
|
|
// P列和V列按“管线需要热处理”判断,不按单个焊口判断。
|
|
|
|
|
|
PWHT = hotPipelineIdSet.Contains(x.PipelineId) ? "PWHT" : "/",
|
|
|
|
|
|
HotProcessAccept = hotPipelineIdSet.Contains(x.PipelineId) ? "ACC." : "/",
|
|
|
|
|
|
// AB列按点口记录判断;AC列按管道等级1级判断,否则保持模板要求的“/”。
|
|
|
|
|
|
PointAccept = IsPointed(x.IsPoint, x.WeldJointId, pointJointIdSet) ? "ACC." : "/",
|
|
|
|
|
|
PipingClassAccept = IsFirstLevelPipingClass(x.PipingClassCode) ? "ACC." : "/"
|
|
|
|
|
|
}).ToList();
|
|
|
|
|
|
|
|
|
|
|
|
var value = new Dictionary<string, object>
|
|
|
|
|
|
{
|
|
|
|
|
|
["PipelineData"] = pipelineData,
|
|
|
|
|
|
["WeldJointData"] = weldJointData
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
MiniExcel.SaveAsByTemplate(tempPath, templatePath, value);
|
|
|
|
|
|
DownTempFile(tempPath, "管道数据表.xlsx");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 按当前页面筛选条件重新获取导出管线,避免使用跨用户共享的静态缓存。
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
private List<Model.View_HJGL_Pipeline> GetCurrentPipelineList()
|
|
|
|
|
|
{
|
|
|
|
|
|
Model.View_HJGL_Pipeline model = new Model.View_HJGL_Pipeline();
|
|
|
|
|
|
model.ProjectId = this.CurrUser.LoginProjectId;
|
|
|
|
|
|
model.UnitWorkId = this.tvControlItem.SelectedNodeID;
|
|
|
|
|
|
model.PipelineCode = this.txtPipelineCode.Text.Trim();
|
|
|
|
|
|
model.IsFinished = null;
|
|
|
|
|
|
if (drpIsFinish.SelectedValue == "1")
|
|
|
|
|
|
{
|
|
|
|
|
|
model.IsFinished = true;
|
|
|
|
|
|
}
|
|
|
|
|
|
if (drpIsFinish.SelectedValue == "0")
|
|
|
|
|
|
{
|
|
|
|
|
|
model.IsFinished = false;
|
|
|
|
|
|
}
|
|
|
|
|
|
return BLL.PipelineService.GetView_HJGL_Pipelines(model);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void DownTempFile(string path, string fileName)
|
|
|
|
|
|
{
|
|
|
|
|
|
FileInfo info = new FileInfo(path);
|
|
|
|
|
|
long fileSize = info.Length;
|
|
|
|
|
|
System.Web.HttpContext.Current.Response.Clear();
|
|
|
|
|
|
System.Web.HttpContext.Current.Response.ContentType = "application/x-zip-compressed";
|
|
|
|
|
|
System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
|
|
|
|
|
|
System.Web.HttpContext.Current.Response.AddHeader("Content-Length", fileSize.ToString());
|
|
|
|
|
|
System.Web.HttpContext.Current.Response.TransmitFile(path, 0, fileSize);
|
|
|
|
|
|
System.Web.HttpContext.Current.Response.Flush();
|
|
|
|
|
|
System.Web.HttpContext.Current.Response.Close();
|
|
|
|
|
|
File.Delete(path);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private static string SafeText(object value)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (value == null)
|
|
|
|
|
|
{
|
|
|
|
|
|
return "/";
|
|
|
|
|
|
}
|
|
|
|
|
|
string text = value.ToString();
|
|
|
|
|
|
return string.IsNullOrWhiteSpace(text) ? "/" : text.Trim();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private static string JoinTexts(params string[] values)
|
|
|
|
|
|
{
|
|
|
|
|
|
var texts = values
|
|
|
|
|
|
.Where(x => !string.IsNullOrWhiteSpace(x))
|
|
|
|
|
|
.Select(x => x.Trim())
|
|
|
|
|
|
.Distinct()
|
|
|
|
|
|
.ToList();
|
|
|
|
|
|
return texts.Count == 0 ? "/" : string.Join("/", texts);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private static string FormatWeldingData(params string[] values)
|
|
|
|
|
|
{
|
|
|
|
|
|
return JoinTexts(values);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private static bool IsPointed(string isPoint, string weldJointId, HashSet<string> pointJointIdSet)
|
|
|
|
|
|
{
|
|
|
|
|
|
return pointJointIdSet.Contains(weldJointId) || isPoint == "1" || isPoint == "是" || isPoint == "True";
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private static bool IsFirstLevelPipingClass(string pipingClassCode)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(pipingClassCode))
|
|
|
|
|
|
{
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
string code = pipingClassCode.Trim();
|
|
|
|
|
|
return code == "1" || code == "1级" || code == "一级" || code == "Ⅰ级" || code == "Ⅰ";
|
|
|
|
|
|
}
|
2022-09-05 16:36:31 +08:00
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
protected string ConvertDetectionType(object detectionType)
|
|
|
|
|
|
{
|
|
|
|
|
|
string detectionName = string.Empty;
|
|
|
|
|
|
if (detectionType != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
string[] types = detectionType.ToString().Split('|');
|
|
|
|
|
|
foreach (string t in types)
|
|
|
|
|
|
{
|
|
|
|
|
|
var type = BLL.Base_DetectionTypeService.GetDetectionTypeByDetectionTypeId(t);
|
|
|
|
|
|
if (type != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
detectionName += type.DetectionTypeCode + ",";
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
if (detectionName != string.Empty)
|
|
|
|
|
|
{
|
|
|
|
|
|
return detectionName.Substring(0, detectionName.Length - 1);
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
return "";
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2022-10-25 22:30:17 +08:00
|
|
|
|
protected string ConvertIsFinished(object IsFinished)
|
|
|
|
|
|
{
|
|
|
|
|
|
string IsFinishedValue = "未完成";
|
|
|
|
|
|
if (IsFinished != null)
|
|
|
|
|
|
{
|
2025-10-10 14:33:21 +08:00
|
|
|
|
if (IsFinished.ToString() == "True")
|
2022-10-25 22:30:17 +08:00
|
|
|
|
{
|
|
|
|
|
|
IsFinishedValue = "已完成";
|
|
|
|
|
|
}
|
2025-10-10 14:33:21 +08:00
|
|
|
|
|
2022-10-25 22:30:17 +08:00
|
|
|
|
}
|
2025-10-10 14:33:21 +08:00
|
|
|
|
return IsFinishedValue;
|
2022-10-25 22:30:17 +08:00
|
|
|
|
}
|
2022-09-05 16:36:31 +08:00
|
|
|
|
protected void btnGetChart_Click(object sender, EventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
decimal PipelineComplete = 0;
|
2025-10-10 14:33:21 +08:00
|
|
|
|
decimal PipelineNoComplete = 0;
|
2023-02-20 21:59:35 +08:00
|
|
|
|
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
|
|
|
|
|
|
{
|
|
|
|
|
|
var allline = (from x in Funs.DB.HJGL_Pipeline where x.UnitWorkId == tvControlItem.SelectedNodeID select x).ToList().Count();
|
|
|
|
|
|
var Completeline = (from x in Funs.DB.HJGL_Pipeline where x.UnitWorkId == tvControlItem.SelectedNodeID && x.IsFinished == true select x).ToList().Count();
|
|
|
|
|
|
int NoCompleteline = allline - Completeline;
|
|
|
|
|
|
PipelineComplete = Completeline;
|
|
|
|
|
|
PipelineNoComplete = NoCompleteline;
|
|
|
|
|
|
}
|
2022-09-05 16:36:31 +08:00
|
|
|
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PipelineQueryChart.aspx?PipelineComplete={0}&&PipelineNOComplete={1}", PipelineComplete, PipelineNoComplete, "编辑 - ")));
|
|
|
|
|
|
|
|
|
|
|
|
}
|
2026-05-30 10:09:22 +08:00
|
|
|
|
protected void btnJoinMarke_Click(object sender, EventArgs e)
|
|
|
|
|
|
{ //string httpUrl = @"FileUpload\HJGL_DataImport\095e9691-99c2-4f70-8e67-e70c8fa6be9c\2022-06\管道焊接工作记录.pdf";
|
2026-05-30 11:36:22 +08:00
|
|
|
|
//var newurl = Funs.SGGLUrl + httpUrl.Replace(Funs.RootPath, "");
|
2026-05-30 10:09:22 +08:00
|
|
|
|
var id = Grid1.SelectedRowID;
|
|
|
|
|
|
if (string.IsNullOrEmpty(id))
|
|
|
|
|
|
{
|
|
|
|
|
|
ShowNotify("请选择相对应的ISO轴测图", MessageBoxIcon.Warning);
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
2026-05-30 11:36:22 +08:00
|
|
|
|
if (id != null)
|
2026-05-30 10:09:22 +08:00
|
|
|
|
{
|
2026-05-30 11:36:22 +08:00
|
|
|
|
|
|
|
|
|
|
PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("../JoinMarking/JoinMarking.aspx?ISO_ID={0}", id, "查看 -")));
|
2022-09-05 16:36:31 +08:00
|
|
|
|
|
2026-05-30 10:09:22 +08:00
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
ShowNotify("请上传相关ISO轴测图", MessageBoxIcon.Warning);
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2022-09-05 16:36:31 +08:00
|
|
|
|
protected void btnSinglePreview_Click(object sender, EventArgs e)
|
|
|
|
|
|
{
|
2022-09-18 23:22:47 +08:00
|
|
|
|
//string httpUrl = @"FileUpload\HJGL_DataImport\095e9691-99c2-4f70-8e67-e70c8fa6be9c\2022-06\管道焊接工作记录.pdf";
|
|
|
|
|
|
//var newurl = Funs.SGGLUrl + httpUrl.Replace(Funs.RootPath, "");
|
2022-09-05 16:36:31 +08:00
|
|
|
|
var id = Grid1.SelectedRowID;
|
|
|
|
|
|
if (string.IsNullOrEmpty(id))
|
|
|
|
|
|
{
|
2022-10-13 18:52:45 +08:00
|
|
|
|
ShowNotify("请选择相对应的ISO轴测图", MessageBoxIcon.Warning);
|
2022-09-05 16:36:31 +08:00
|
|
|
|
return;
|
|
|
|
|
|
}
|
2022-09-18 23:22:47 +08:00
|
|
|
|
var SingleName = (from x in Funs.DB.View_HJGL_Pipeline where x.PipelineId == id select (x.SingleName)).FirstOrDefault();
|
2025-10-10 14:33:21 +08:00
|
|
|
|
var filemodel = BLL.HJGL_DataImportService.GetLatestFileByFileName(SingleName, "0", this.CurrUser.LoginProjectId);
|
|
|
|
|
|
if (filemodel != null)
|
2022-09-18 23:22:47 +08:00
|
|
|
|
{
|
|
|
|
|
|
string httpUrl = filemodel.FilePath;
|
|
|
|
|
|
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("~/AttachFile/Look.aspx?fileUrl={0}", httpUrl, "查看 -")));
|
2022-09-05 16:36:31 +08:00
|
|
|
|
|
2022-09-18 23:22:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
2022-10-13 18:52:45 +08:00
|
|
|
|
ShowNotify("请上传相关ISO轴测图", MessageBoxIcon.Warning);
|
2022-09-18 23:22:47 +08:00
|
|
|
|
return;
|
|
|
|
|
|
}
|
2025-10-10 14:33:21 +08:00
|
|
|
|
|
2022-09-05 16:36:31 +08:00
|
|
|
|
|
|
|
|
|
|
}
|
2022-10-12 18:36:04 +08:00
|
|
|
|
|
|
|
|
|
|
protected void Grid1_RowClick(object sender, GridRowClickEventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
var q = PipelineService.GetPipelineByPipelineId(Grid1.SelectedRowID);
|
2025-10-10 14:33:21 +08:00
|
|
|
|
var pipecode = "/" + q.PipelineCode;
|
2022-10-12 18:36:04 +08:00
|
|
|
|
Model.Parameter3D parameter3D = new Model.Parameter3D();
|
|
|
|
|
|
Model.ColorModel colorModel = new Model.ColorModel();
|
|
|
|
|
|
colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId);
|
|
|
|
|
|
parameter3D.ColorModel = colorModel;
|
|
|
|
|
|
parameter3D.TagNum = pipecode;
|
2022-11-03 17:39:51 +08:00
|
|
|
|
parameter3D.ButtonType = "2";
|
2022-10-12 18:36:04 +08:00
|
|
|
|
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
2022-11-09 16:57:01 +08:00
|
|
|
|
//parameter3D.Line_No = Line_No;
|
2022-10-28 17:01:51 +08:00
|
|
|
|
parameter3D.Transparency = colorModel.PipelineComplete;
|
|
|
|
|
|
parameter3D.Finished_color = colorModel.JointCompleteColor;
|
|
|
|
|
|
parameter3D.Incomplete_color = colorModel.JointNOCompleteColor;
|
2022-10-25 22:30:17 +08:00
|
|
|
|
|
2026-05-30 10:14:10 +08:00
|
|
|
|
//ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl_Item(this.CurrUser.LoginProjectId) + parameter3D.ModelName;
|
|
|
|
|
|
//ctlAuditFlow.data = parameter3D;
|
|
|
|
|
|
//ctlAuditFlow.BindData();
|
2022-10-12 18:36:04 +08:00
|
|
|
|
}
|
2022-11-03 17:39:51 +08:00
|
|
|
|
|
|
|
|
|
|
protected void btnSinglePreview_2_Click(object sender, EventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
var id = Grid1.SelectedRowID;
|
|
|
|
|
|
if (string.IsNullOrEmpty(id))
|
|
|
|
|
|
{
|
|
|
|
|
|
ShowNotify("请选择相对应的ISO施工轴测图", MessageBoxIcon.Warning);
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
var SingleName = (from x in Funs.DB.View_HJGL_Pipeline where x.PipelineId == id select (x.SingleName)).FirstOrDefault();
|
|
|
|
|
|
var filemodel = BLL.HJGL_DataImportService.GetLatestFileByFileName(SingleName, "4", this.CurrUser.LoginProjectId);
|
|
|
|
|
|
if (filemodel != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
string httpUrl = filemodel.FilePath;
|
|
|
|
|
|
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("~/AttachFile/Look.aspx?fileUrl={0}", httpUrl, "查看 -")));
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
ShowNotify("请上传相关ISO施工轴测图", MessageBoxIcon.Warning);
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
2023-02-20 21:59:35 +08:00
|
|
|
|
|
|
|
|
|
|
protected void btnrefresh_Click(object sender, EventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
Model.Parameter3D parameter3D = new Model.Parameter3D();
|
|
|
|
|
|
Model.ColorModel colorModel = new Model.ColorModel();
|
|
|
|
|
|
colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId);
|
|
|
|
|
|
parameter3D.ColorModel = colorModel;
|
|
|
|
|
|
parameter3D.TagNum = Line_No;
|
|
|
|
|
|
parameter3D.ButtonType = "2";
|
|
|
|
|
|
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
|
|
|
|
|
// parameter3D.Line_No = Line_No;
|
|
|
|
|
|
parameter3D.Transparency = colorModel.PipelineComplete;
|
|
|
|
|
|
parameter3D.Finished_color = colorModel.JointCompleteColor;
|
|
|
|
|
|
parameter3D.Incomplete_color = colorModel.JointNOCompleteColor;
|
|
|
|
|
|
|
2026-05-30 10:14:10 +08:00
|
|
|
|
//ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl_Item(this.CurrUser.LoginProjectId) + parameter3D.ModelName;
|
|
|
|
|
|
//ctlAuditFlow.data = parameter3D;
|
|
|
|
|
|
//ctlAuditFlow.BindData();
|
2023-02-20 21:59:35 +08:00
|
|
|
|
}
|
2022-09-05 16:36:31 +08:00
|
|
|
|
}
|
2026-06-24 09:59:56 +08:00
|
|
|
|
}
|