2023-02-16 焊接修改

This commit is contained in:
2023-02-16 17:19:08 +08:00
parent c19e51a290
commit 75431705fb
28 changed files with 599 additions and 342 deletions
@@ -24,6 +24,8 @@ namespace BLL
/// 现场安装
/// </summary>
public const string PipeArea_FIELD = "2";
public const int pageSize = 20;
public static List<Model.HJGL_Pipeline> hJGL_Pipelines
{
@@ -615,5 +617,42 @@ namespace BLL
Funs.FineUIPleaseSelect(dropName);
}
}
public static void BindTreeNodes(FineUIPro.TreeNode node,string pipecode,string ProjectId,int pageSize)
{
var pipeline = (from x in Funs.DB.HJGL_Pipeline
where x.ProjectId == ProjectId && x.UnitWorkId == node.NodeID
&& x.PipelineCode.Contains(pipecode)
orderby x.PipelineCode
select x).ToList();
var hJGL_WeldJoints = (from x in Funs.DB.HJGL_WeldJoint where x.ProjectId == ProjectId 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();
FineUIPro.TreeNode newNode = new FineUIPro.TreeNode();
newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】";
newNode.NodeID = item.PipelineId;
newNode.CommandName = "管线";
newNode.EnableClickEvent = true;
node.Nodes.Add(newNode);
}
if (pageindex < pageCount)
{
FineUIPro.TreeNode newNode = new FineUIPro.TreeNode();
newNode.Text = "加载";
newNode.NodeID = SQLHelper.GetNewID();
newNode.CommandName = "加载";
newNode.Icon = FineUIPro.Icon.ArrowDown;
newNode.EnableClickEvent = true;
node.Nodes.Add(newNode);
}
}
}
}
}