2022-09-05 16:36:31 +08:00
|
|
|
|
using BLL;
|
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;
|
|
|
|
|
|
using System.Data.SqlClient;
|
|
|
|
|
|
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;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
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)
|
|
|
|
|
|
{
|
|
|
|
|
|
ctlAuditFlow.Url = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId);
|
|
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
|
|
// 当前为施工单位,只能操作本单位的数据
|
|
|
|
|
|
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
|
|
|
|
|
|
{
|
|
|
|
|
|
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
|
|
|
|
|
|
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (unitWork1.Count() > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var q in unitWork1)
|
|
|
|
|
|
{
|
|
|
|
|
|
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count();
|
|
|
|
|
|
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
|
|
|
|
|
|
TreeNode tn1 = new TreeNode();
|
|
|
|
|
|
tn1.NodeID = q.UnitWorkId;
|
|
|
|
|
|
tn1.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线";
|
|
|
|
|
|
tn1.ToolTip = "施工单位:" + u.UnitName;
|
|
|
|
|
|
tn1.EnableClickEvent = true;
|
|
|
|
|
|
rootNode1.Nodes.Add(tn1);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
if (unitWork2.Count() > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var q in unitWork2)
|
|
|
|
|
|
{
|
|
|
|
|
|
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count();
|
|
|
|
|
|
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
|
|
|
|
|
|
TreeNode tn2 = new TreeNode();
|
|
|
|
|
|
tn2.NodeID = q.UnitWorkId;
|
|
|
|
|
|
tn2.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线";
|
|
|
|
|
|
tn2.ToolTip = "施工单位:" + u.UnitName;
|
|
|
|
|
|
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();
|
|
|
|
|
|
Model.Parameter3D parameter3D = new Model.Parameter3D();
|
|
|
|
|
|
Model.ColorModel colorModel = new Model.ColorModel();
|
|
|
|
|
|
colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId);
|
|
|
|
|
|
parameter3D.ColorModel = colorModel;
|
2022-10-12 18:36:04 +08:00
|
|
|
|
parameter3D.TagNum = "";
|
2022-09-05 16:36:31 +08:00
|
|
|
|
parameter3D.ButtonType = "0,2";
|
2022-10-12 19:17:42 +08:00
|
|
|
|
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
2022-11-01 17:11:30 +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-09-05 16:36:31 +08:00
|
|
|
|
|
2022-10-17 15:57:40 +08:00
|
|
|
|
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId) + "item/IPE%7CVPD%7C"+ parameter3D.ModelName;
|
2022-09-05 16:36:31 +08:00
|
|
|
|
ctlAuditFlow.data = parameter3D;
|
|
|
|
|
|
ctlAuditFlow.BindData();
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 数据绑定
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 数据绑定
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
private void BindGrid()
|
|
|
|
|
|
{
|
2022-10-25 22:30:17 +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);
|
|
|
|
|
|
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;
|
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;
|
|
|
|
|
|
}
|
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);
|
|
|
|
|
|
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
|
2022-10-25 22:30:17 +08:00
|
|
|
|
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>();
|
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);
|
|
|
|
|
|
//}
|
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
|
|
|
|
|
|
#region 导出按钮
|
|
|
|
|
|
/// 导出按钮
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="sender"></param>
|
|
|
|
|
|
/// <param name="e"></param>
|
|
|
|
|
|
protected void btnOut_Click(object sender, EventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
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();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//#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();
|
|
|
|
|
|
// }
|
|
|
|
|
|
#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)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (IsFinished.ToString()=="True")
|
|
|
|
|
|
{
|
|
|
|
|
|
IsFinishedValue = "已完成";
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
return IsFinishedValue;
|
|
|
|
|
|
}
|
2022-09-05 16:36:31 +08:00
|
|
|
|
protected void btnGetChart_Click(object sender, EventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
decimal PipelineComplete = 0;
|
|
|
|
|
|
decimal PipelineNoComplete = 0;
|
|
|
|
|
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PipelineQueryChart.aspx?PipelineComplete={0}&&PipelineNOComplete={1}", PipelineComplete, PipelineNoComplete, "编辑 - ")));
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
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();
|
2022-10-13 18:52:45 +08:00
|
|
|
|
var filemodel= BLL.HJGL_DataImportService.GetLatestFileByFileName(SingleName,"0", this.CurrUser.LoginProjectId);
|
2022-09-18 23:22:47 +08:00
|
|
|
|
if (filemodel!=null)
|
|
|
|
|
|
{
|
|
|
|
|
|
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;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
var pipecode ="/"+ q.PipelineCode;
|
|
|
|
|
|
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;
|
|
|
|
|
|
parameter3D.ButtonType = "0,2";
|
|
|
|
|
|
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
2022-11-01 17:11:30 +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
|
|
|
|
|
2022-10-17 15:57:40 +08:00
|
|
|
|
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId) + "item/IPE%7CVPD%7C" + parameter3D.ModelName;
|
2022-10-12 18:36:04 +08:00
|
|
|
|
ctlAuditFlow.data = parameter3D;
|
|
|
|
|
|
ctlAuditFlow.BindData();
|
|
|
|
|
|
}
|
2022-09-05 16:36:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|