2023-2-14 001
This commit is contained in:
@@ -32,9 +32,9 @@
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Items>
|
||||
<f:Tree ID="tvControlItem" ShowHeader="false" Height="560px" Title="装置区域"
|
||||
OnNodeCommand="tvControlItem_NodeCommand" OnNodeExpand="tvControlItem_TreeNodeExpanded" runat="server" ShowBorder="false" EnableCollapse="true"
|
||||
EnableSingleClickExpand="true" AutoLeafIdentification="true" EnableSingleExpand="true"
|
||||
<f:Tree ID="tvControlItem" ShowHeader="false" Height="560px" Title="单位工程"
|
||||
OnNodeCommand="tvControlItem_NodeCommand" runat="server" ShowBorder="false" EnableCollapse="true"
|
||||
EnableSingleClickExpand="true" AutoLeafIdentification="true" OnNodeExpand="tvControlItem_TreeNodeExpanded"
|
||||
EnableTextSelection="true">
|
||||
</f:Tree>
|
||||
</Items>
|
||||
@@ -63,7 +63,7 @@
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="焊口台账总览"
|
||||
EnableCollapse="true" runat="server" BoxFlex="1" EnableColumnLines="true" DataKeyNames="WeldJointId"
|
||||
ClicksToEdit="2" DataIDField="WeldJointId" AllowSorting="true" EnableCheckBoxSelect="true"
|
||||
SortField="UnitWorkCode,PipelineCode,WeldJointCode" OnSort="Grid1_Sort" OnRowClick="Grid1_RowClick" EnableRowClickEvent="true"
|
||||
SortField="WeldJointCode" OnSort="Grid1_Sort" OnRowClick="Grid1_RowClick" EnableRowClickEvent="true"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableTextSelection="True">
|
||||
<Toolbars>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using BLL;
|
||||
using FineUIPro.Web.HJGL.WeldingManage;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -12,6 +13,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
{
|
||||
public partial class JointQuery : PageBase
|
||||
{
|
||||
public int pageSize = 20;
|
||||
public decimal JointComplete
|
||||
{
|
||||
get
|
||||
@@ -145,26 +147,28 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
{
|
||||
foreach (var q in unitWork1)
|
||||
{
|
||||
if (q != null)
|
||||
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.CommandName = 1 + "|" + Funs.GetEndPageNumber(a, pageSize);
|
||||
tn1.EnableClickEvent = true;
|
||||
tn1.EnableExpandEvent = true;
|
||||
rootNode1.Nodes.Add(tn1);
|
||||
if (a > 0)
|
||||
{
|
||||
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.CommandName = "单位工程";
|
||||
tn1.EnableExpandEvent = true;
|
||||
rootNode1.Nodes.Add(tn1);
|
||||
if (a > 0)
|
||||
{
|
||||
// BindNodes(tn1);
|
||||
TreeNode newNode = new TreeNode();
|
||||
newNode.Text = "加载管线...";
|
||||
newNode.NodeID = "加载管线...";
|
||||
tn1.Nodes.Add(newNode);
|
||||
}
|
||||
// BindNodes(tn1);
|
||||
TreeNode newNode = new TreeNode();
|
||||
newNode.Text = "加载管线...";
|
||||
newNode.NodeID = "加载管线...";
|
||||
tn1.Nodes.Add(newNode);
|
||||
}
|
||||
//if (a > 0)
|
||||
//{
|
||||
// BindNodes(tn1);
|
||||
//}
|
||||
}
|
||||
}
|
||||
if (unitWork2.Count() > 0)
|
||||
@@ -185,9 +189,9 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
tn2.Expanded = true;
|
||||
}
|
||||
tn2.ToolTip = "施工单位:" + u.UnitName;
|
||||
tn2.CommandName = "单位工程";
|
||||
tn2.EnableExpandEvent = true;
|
||||
tn2.CommandName = 1 + "|" + Funs.GetEndPageNumber(a, pageSize);
|
||||
tn2.EnableClickEvent = true;
|
||||
tn2.EnableExpandEvent = true;
|
||||
rootNode2.Nodes.Add(tn2);
|
||||
if (a > 0)
|
||||
{
|
||||
@@ -199,35 +203,6 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
}
|
||||
}
|
||||
}
|
||||
//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();
|
||||
// int a = (from x in Funs.DB.View_HJGL_JointInfoQuery 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.View_HJGL_JointInfoQuery 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
|
||||
|
||||
@@ -239,57 +214,78 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
/// <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;
|
||||
parameter3D.TagNum = "";
|
||||
parameter3D.ButtonType = "2.1";
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
||||
|
||||
|
||||
if (this.tvControlItem.SelectedNode.CommandName == "单位工程")
|
||||
if (e.CommandName == "加载")
|
||||
{
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
||||
parameter3D.Crater_data = "0";
|
||||
parameter3D.Completed_weldedjunction = Completed_weldedjunction;
|
||||
parameter3D.Incomplete_weldjunction = Incomplete_weldjunction;
|
||||
|
||||
string CommandName = e.Node.ParentNode.CommandName;
|
||||
e.Node.ParentNode.CommandName = (int.Parse(CommandName.Split('|')[0]) + 1) + "|" + int.Parse(CommandName.Split('|')[1]);
|
||||
TreeNode treeNode = e.Node.ParentNode;
|
||||
treeNode.Nodes.Remove(e.Node);
|
||||
BindNodes(e.Node.ParentNode);
|
||||
}
|
||||
else if (this.tvControlItem.SelectedNode.CommandName == "管线")
|
||||
else
|
||||
{
|
||||
var model = PipelineService.GetPipelineByPipelineId(tvControlItem.SelectedNodeID);
|
||||
if (model != null&&!string.IsNullOrEmpty(model.UnitWorkId))
|
||||
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;
|
||||
parameter3D.TagNum = "";
|
||||
parameter3D.ButtonType = "2.1";
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
||||
|
||||
if (this.tvControlItem.SelectedNode.CommandName.Split('|').Count() == 2)
|
||||
{
|
||||
parameter3D.Crater_data = "1";
|
||||
parameter3D.TagNum = "/" + model.PipelineCode;
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(model.UnitWorkId);
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
||||
parameter3D.Crater_data = "0";
|
||||
parameter3D.Completed_weldedjunction = Completed_weldedjunction;
|
||||
parameter3D.Incomplete_weldjunction = Incomplete_weldjunction;
|
||||
|
||||
}
|
||||
else if (this.tvControlItem.SelectedNode.CommandName == "管线")
|
||||
{
|
||||
var model = PipelineService.GetPipelineByPipelineId(tvControlItem.SelectedNodeID);
|
||||
if (model != null && !string.IsNullOrEmpty(model.UnitWorkId))
|
||||
{
|
||||
parameter3D.Crater_data = "1";
|
||||
parameter3D.TagNum = "/" + model.PipelineCode;
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(model.UnitWorkId);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
parameter3D.Transparency = colorModel.PipelineComplete;
|
||||
parameter3D.Finished_color = colorModel.JointCompleteColor;
|
||||
parameter3D.Incomplete_color = colorModel.JointNOCompleteColor;
|
||||
|
||||
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl_Item(this.CurrUser.LoginProjectId) + parameter3D.ModelName;
|
||||
ctlAuditFlow.data = parameter3D;
|
||||
ctlAuditFlow.BindData();
|
||||
}
|
||||
parameter3D.Transparency = colorModel.PipelineComplete;
|
||||
parameter3D.Finished_color = colorModel.JointCompleteColor;
|
||||
parameter3D.Incomplete_color = colorModel.JointNOCompleteColor;
|
||||
|
||||
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl_Item(this.CurrUser.LoginProjectId) + parameter3D.ModelName;
|
||||
ctlAuditFlow.data = parameter3D;
|
||||
ctlAuditFlow.BindData();
|
||||
|
||||
|
||||
}
|
||||
protected void tvControlItem_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
|
||||
{
|
||||
e.Node.Nodes.Clear();
|
||||
if (e.Node.CommandName == "单位工程")
|
||||
{
|
||||
var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == e.Node.NodeID
|
||||
&& x.PipelineCode.Contains(this.tvPipeCode.Text.Trim())
|
||||
orderby x.PipelineCode
|
||||
select x).ToList();
|
||||
var hJGL_WeldJoints = (from x in Funs.DB.HJGL_WeldJoint where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
|
||||
|
||||
if (e.Node.Nodes[0].NodeID == "加载管线...")
|
||||
{
|
||||
e.Node.Nodes.Clear();
|
||||
BindNodes(e.Node);
|
||||
}
|
||||
}
|
||||
private void BindNodes(TreeNode node)
|
||||
{
|
||||
var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == node.NodeID
|
||||
&& x.PipelineCode.Contains(this.tvPipeCode.Text.Trim())
|
||||
orderby x.PipelineCode
|
||||
select x).ToList();
|
||||
var hJGL_WeldJoints = (from x in Funs.DB.HJGL_WeldJoint where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
|
||||
int pageindex = int.Parse(node.CommandName.Split('|')[0]);
|
||||
int pageCount = int.Parse(node.CommandName.Split('|')[1]);
|
||||
if (pageindex <= pageCount)
|
||||
{
|
||||
pipeline = pipeline.Skip(pageSize * (pageindex - 1)).Take(pageSize).ToList();
|
||||
foreach (var item in pipeline)
|
||||
{
|
||||
var jotCount = (from x in hJGL_WeldJoints where x.PipelineId == item.PipelineId /*&& x.IsTwoJoint == null*/ select x).Count();
|
||||
@@ -298,7 +294,17 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
newNode.NodeID = item.PipelineId;
|
||||
newNode.CommandName = "管线";
|
||||
newNode.EnableClickEvent = true;
|
||||
e.Node.Nodes.Add(newNode);
|
||||
node.Nodes.Add(newNode);
|
||||
}
|
||||
if (pageindex < pageCount)
|
||||
{
|
||||
TreeNode newNode = new TreeNode();
|
||||
newNode.Text = "加载";
|
||||
newNode.NodeID = SQLHelper.GetNewID();
|
||||
newNode.CommandName = "加载";
|
||||
newNode.Icon = Icon.ArrowDown;
|
||||
newNode.EnableClickEvent = true;
|
||||
node.Nodes.Add(newNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -335,7 +341,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
//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 == "单位工程")
|
||||
if (this.tvControlItem.SelectedNode.CommandName.Split('|').Count() == 2 )
|
||||
{
|
||||
model.UnitWorkId = this.tvControlItem.SelectedNodeID;
|
||||
|
||||
@@ -346,18 +352,23 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
}
|
||||
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;
|
||||
if (!string.IsNullOrEmpty(ctlAuditFlow.Url))
|
||||
{
|
||||
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, list);
|
||||
Grid1.DataSource = list;
|
||||
this.JointComplete = q.Count();
|
||||
this.JointNoComplete = sumcount - JointComplete;
|
||||
this.JointPre = q2.Count();
|
||||
this.JointNoPre = sumcount - JointPre;
|
||||
}
|
||||
|
||||
var table = this.GetPagedDataTable(Grid1, list);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.RecordCount = list.Count;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
|
||||
@@ -465,6 +476,21 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
/// <param name="e"></param>
|
||||
protected void btnOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
Model.View_HJGL_WeldJoint model = new Model.View_HJGL_WeldJoint();
|
||||
model.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (this.tvControlItem.SelectedNode.CommandName.Split('|').Count() == 2)
|
||||
{
|
||||
model.UnitWorkId = this.tvControlItem.SelectedNodeID;
|
||||
|
||||
}
|
||||
else if (this.tvControlItem.SelectedNode.CommandName == "管线")
|
||||
{
|
||||
model.PipelineId = this.tvControlItem.SelectedNodeID;
|
||||
}
|
||||
model.WeldJointCode = this.txtWeldJointCode.Text;
|
||||
var list = BLL.WeldJointService.GetViewWeldJointsBymodel(model);
|
||||
|
||||
|
||||
Response.ClearContent();
|
||||
string filename = Funs.GetNewFileName();
|
||||
Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("焊口台账总览" + filename, System.Text.Encoding.UTF8) + ".xls");
|
||||
@@ -534,7 +560,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
parameter3D.TagNum = string.Join(",", weldjointcodes);
|
||||
parameter3D.ButtonType = "2.1";
|
||||
parameter3D.Crater_data = "1";
|
||||
if (this.tvControlItem.SelectedNode.CommandName == "单位工程")
|
||||
if (this.tvControlItem.SelectedNode.CommandName.Split('|').Count() == 2)
|
||||
{
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user