2023-04-07-001
This commit is contained in:
Binary file not shown.
@@ -28,7 +28,7 @@
|
|||||||
</Toolbars>
|
</Toolbars>
|
||||||
<Items>
|
<Items>
|
||||||
<f:Tree ID="tvControlItem" ShowHeader="false" Height="450px" Title="管线列表" OnNodeCommand="tvControlItem_NodeCommand"
|
<f:Tree ID="tvControlItem" ShowHeader="false" Height="450px" Title="管线列表" OnNodeCommand="tvControlItem_NodeCommand"
|
||||||
runat="server" ShowBorder="false" EnableCollapse="true" EnableSingleClickExpand="true"
|
runat="server" ShowBorder="false" EnableCollapse="true" EnableSingleClickExpand="true"
|
||||||
AutoLeafIdentification="true" EnableTextSelection="true" Expanded="true">
|
AutoLeafIdentification="true" EnableTextSelection="true" Expanded="true">
|
||||||
</f:Tree>
|
</f:Tree>
|
||||||
</Items>
|
</Items>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace FineUIPro.Web.HJGL.HotProcessHard
|
namespace FineUIPro.Web.HJGL.HotProcessHard
|
||||||
@@ -68,7 +69,6 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
|
|||||||
ViewState["SelectedList"] = value;
|
ViewState["SelectedList"] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 未被选择项列表
|
/// 未被选择项列表
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -83,6 +83,9 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
|
|||||||
ViewState["NoSelectedList"] = value;
|
ViewState["NoSelectedList"] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public int pageSize = 20;
|
||||||
|
|
||||||
|
public List<TreeNode> TreeNodes=new List<TreeNode>();
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 加载页面
|
#region 加载页面
|
||||||
@@ -129,29 +132,62 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
|
|||||||
{
|
{
|
||||||
iso = iso.Where(e => e.PipelineCode.Contains(this.txtIsono.Text.Trim()));
|
iso = iso.Where(e => e.PipelineCode.Contains(this.txtIsono.Text.Trim()));
|
||||||
}
|
}
|
||||||
|
var q = (from x in iso
|
||||||
iso = iso.OrderBy(x => x.PipelineCode);
|
select new
|
||||||
if (iso.Count() > 0)
|
{
|
||||||
|
x.PipelineId,
|
||||||
|
x.PipelineCode,
|
||||||
|
jointcount = (from y in Funs.DB.HJGL_WeldJoint where y.PipelineId == x.PipelineId && y.IsHotProess == true select y).Count(),
|
||||||
|
Trustcount = (from z in Funs.DB.HJGL_HotProess_TrustItem join m in Funs.DB.HJGL_WeldJoint on z.WeldJointId equals m.WeldJointId where m.PipelineId == x.PipelineId select z).Count(),
|
||||||
|
}).ToList().Where(x=>x.jointcount>x.Trustcount).OrderBy(x=>x.PipelineCode);
|
||||||
|
if (q.Count()>0)
|
||||||
{
|
{
|
||||||
foreach (var q in iso)
|
foreach (var item in q)
|
||||||
{
|
{
|
||||||
var jots = from x in Funs.DB.HJGL_WeldJoint
|
TreeNode newNode = new TreeNode();
|
||||||
where x.PipelineId == q.PipelineId && x.IsHotProess == true
|
newNode.NodeID = item.PipelineId;
|
||||||
select x;
|
newNode.Text = item.PipelineCode;
|
||||||
var hotItem = from x in Funs.DB.HJGL_HotProess_TrustItem
|
newNode.EnableClickEvent = true;
|
||||||
join y in Funs.DB.HJGL_WeldJoint on x.WeldJointId equals y.WeldJointId
|
rootNode.Nodes.Add(newNode);
|
||||||
where y.PipelineId == q.PipelineId
|
|
||||||
select x;
|
|
||||||
if (jots.Count() > hotItem.Count())
|
|
||||||
{
|
|
||||||
TreeNode newNode = new TreeNode();
|
|
||||||
newNode.NodeID = q.PipelineId;
|
|
||||||
newNode.Text = q.PipelineCode;
|
|
||||||
newNode.EnableClickEvent = true;
|
|
||||||
rootNode.Nodes.Add(newNode);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
// iso = iso.OrderBy(x => x.PipelineCode);
|
||||||
|
//if (iso.Count() > 0)
|
||||||
|
//{
|
||||||
|
// foreach (var q in iso)
|
||||||
|
// {
|
||||||
|
// var jots = (from x in Funs.DB.HJGL_WeldJoint
|
||||||
|
// where x.PipelineId == q.PipelineId && x.IsHotProess == true
|
||||||
|
// select x).Count();
|
||||||
|
// var hotItem = (from x in Funs.DB.HJGL_HotProess_TrustItem
|
||||||
|
// join y in Funs.DB.HJGL_WeldJoint on x.WeldJointId equals y.WeldJointId
|
||||||
|
// where y.PipelineId == q.PipelineId
|
||||||
|
// select x).Count();
|
||||||
|
// if (jots> hotItem)
|
||||||
|
// {
|
||||||
|
// TreeNode newNode = new TreeNode();
|
||||||
|
// newNode.NodeID = q.PipelineId;
|
||||||
|
// newNode.Text = q.PipelineCode;
|
||||||
|
// newNode.EnableClickEvent = true;
|
||||||
|
// TreeNodes.Add(newNode);
|
||||||
|
// //rootNode.Nodes.Add(newNode);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// if (TreeNodes.Count>0)
|
||||||
|
// {
|
||||||
|
// rootNode.CommandName = 1 + "|" + Funs.GetEndPageNumber(TreeNodes.Count, pageSize);
|
||||||
|
// rootNode.EnableClickEvent = true;
|
||||||
|
// rootNode.EnableExpandEvent = true;
|
||||||
|
// // BindNodes(tn1);
|
||||||
|
// TreeNode newNode = new TreeNode();
|
||||||
|
// newNode.Text = "加载管线...";
|
||||||
|
// newNode.NodeID = "加载管线...";
|
||||||
|
// rootNode.Nodes.Add(newNode);
|
||||||
|
|
||||||
|
// }
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -182,7 +218,10 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
|
|||||||
SelectedList.Add(id);
|
SelectedList.Add(id);
|
||||||
}
|
}
|
||||||
this.BindGrid();
|
this.BindGrid();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 数据绑定
|
#region 数据绑定
|
||||||
|
|||||||
@@ -384,7 +384,7 @@ namespace FineUIPro.Web.HJGL.TestPackage
|
|||||||
Model.PTP_PipelineList newView = new Model.PTP_PipelineList();
|
Model.PTP_PipelineList newView = new Model.PTP_PipelineList();
|
||||||
newView.PTP_ID = this.PTP_ID;
|
newView.PTP_ID = this.PTP_ID;
|
||||||
newView.PipelineId = Grid1.DataKeys[i][0].ToString();
|
newView.PipelineId = Grid1.DataKeys[i][0].ToString();
|
||||||
newView.TestMedium = Grid1.DataKeys[i][1].ToString();
|
newView.TestMedium = Grid1.DataKeys[i][1]?.ToString();
|
||||||
if (!string.IsNullOrEmpty(values.Value<string>("DesignPress").ToString()))
|
if (!string.IsNullOrEmpty(values.Value<string>("DesignPress").ToString()))
|
||||||
{
|
{
|
||||||
newView.DesignPress = Funs.GetNewDecimal(values.Value<string>("DesignPress").ToString());
|
newView.DesignPress = Funs.GetNewDecimal(values.Value<string>("DesignPress").ToString());
|
||||||
|
|||||||
Reference in New Issue
Block a user