2022-11-23 焊接wbs树加载优化,管线划分数据加载优化

This commit is contained in:
2022-11-23 00:02:22 +08:00
parent fe520d1201
commit 0759a36121
17 changed files with 186 additions and 134 deletions
@@ -145,7 +145,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
{
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 PipelineService.hJGL_Pipelines where x.UnitWorkId == q.UnitWorkId select x).Count();
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
TreeNode tn1 = new TreeNode();
tn1.NodeID = q.UnitWorkId;
@@ -168,8 +168,8 @@ namespace FineUIPro.Web.HJGL.InfoQuery
{
foreach (var q in unitWork2)
{
int a = (from x in Funs.DB.HJGL_Pipeline
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId
int a = (from x in PipelineService.hJGL_Pipelines
where x.UnitWorkId == q.UnitWorkId
&& x.PipelineCode.Contains(this.tvPipeCode.Text.Trim())
select x).Count();
@@ -280,24 +280,15 @@ namespace FineUIPro.Web.HJGL.InfoQuery
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
var pipeline = (from x in PipelineService.hJGL_Pipelines
where x.UnitWorkId == e.Node.NodeID
&& x.PipelineCode.Contains(this.tvPipeCode.Text.Trim())
orderby x.PipelineCode
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 = (from x in WeldJointService.hJGL_WeldJoints where x.PipelineId == item.PipelineId /*&& x.IsTwoJoint == null*/ select x).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.CommandName = "管线";
@@ -98,7 +98,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
{
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 PipelineService.hJGL_Pipelines where x.UnitWorkId == q.UnitWorkId select x).Count();
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
TreeNode tn1 = new TreeNode();
tn1.NodeID = q.UnitWorkId;
@@ -112,7 +112,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
{
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();
int a = (from x in PipelineService.hJGL_Pipelines where x.UnitWorkId == q.UnitWorkId select x).Count();
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
TreeNode tn2 = new TreeNode();
tn2.NodeID = q.UnitWorkId;
@@ -187,7 +187,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
// SqlParameter[] parameter = listStr.ToArray();
// DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Model.View_HJGL_Pipeline view_HJGL_Pipeline = new Model.View_HJGL_Pipeline();
Model.HJGL_Pipeline view_HJGL_Pipeline = new Model.HJGL_Pipeline();
view_HJGL_Pipeline.ProjectId = this.CurrUser.LoginProjectId;
view_HJGL_Pipeline.UnitWorkId = this.tvControlItem.SelectedNodeID;
view_HJGL_Pipeline.PipelineCode = this.txtPipelineCode.Text.Trim();
@@ -212,7 +212,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
}
#endregion
private void get3DParmeter_pipeline(List<View_HJGL_Pipeline> view_HJGL_Pipelines )
private void get3DParmeter_pipeline(List<HJGL_Pipeline> view_HJGL_Pipelines )
{
if (view_HJGL_Pipelines.Any())
{