2022-11-23 焊接wbs树加载优化,管线划分数据加载优化
This commit is contained in:
@@ -1,21 +1,27 @@
|
||||
using BLL;
|
||||
using Apache.NMS.ActiveMQ.Threads;
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
|
||||
namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
public partial class WeldJointList : PageBase
|
||||
{
|
||||
public static List<Model.HJGL_WeldJoint> WeldJointlist = new List<Model.HJGL_WeldJoint>();
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
// WeldJointlist = WeldJointService.GetWeldJointByProjectid(this.CurrUser.LoginProjectId);
|
||||
this.InitTreeMenu();//加载树
|
||||
//显示列
|
||||
//Model.Sys_UserShowColumns c = BLL.UserShowColumnsService.GetColumnsByUserId(this.CurrUser.PersonId, "Joint");
|
||||
@@ -173,36 +179,33 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
//}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
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())
|
||||
var pipeline = (from x in BLL.PipelineService.hJGL_Pipelines
|
||||
where x.UnitWorkId == e.Node.NodeID && x.PipelineCode.Contains(this.tvPipeCode.Text.Trim())
|
||||
orderby x.PipelineCode
|
||||
select x).ToList();
|
||||
|
||||
// var WeldJointlist = (from x in Funs.DB.View_HJGL_WeldJoint where x.UnitWorkId == e.Node.NodeID && x.IsTwoJoint == null select x).ToList();
|
||||
|
||||
foreach (var item in pipeline)
|
||||
{
|
||||
var jotCount = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == item.PipelineId && x.IsTwoJoint == null select x).Count();
|
||||
//var weldJotCount = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == item.PipelineId && x.IsTwoJoint == null && x.WeldingDailyId != null select x).Count();
|
||||
//var jotCount = WeldJointlist.Where(x => x.PipelineId == item.PipelineId).Count();
|
||||
var jotCount = WeldJointService.hJGL_WeldJoints.Where(x => x.PipelineId == item.PipelineId).Count();
|
||||
TreeNode newNode = new TreeNode();
|
||||
//if (jotCount > weldJotCount)
|
||||
//{
|
||||
// newNode.Text = "<font color='#EE0000'>" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + "</font>";
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】";
|
||||
//}
|
||||
newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】";
|
||||
newNode.NodeID = item.PipelineId;
|
||||
newNode.EnableClickEvent = true;
|
||||
e.Node.Nodes.Add(newNode);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user