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
@@ -81,7 +81,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
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;
@@ -98,7 +98,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
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;
@@ -120,9 +120,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
private void BindNodes(TreeNode node)
{
List<Model.HJGL_Pipeline> pipeline = new List<Model.HJGL_Pipeline>();
var pipelines = from x in Funs.DB.HJGL_Pipeline select x;
pipeline = (from x in pipelines
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == node.NodeID
pipeline = (from x in PipelineService.hJGL_Pipelines
where x.UnitWorkId == node.NodeID
&& x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())
orderby x.PipelineCode
select x).ToList();
@@ -140,8 +139,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
// newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】";
//}
var jotCount = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == item.PipelineId && x.IsTwoJoint == true select x).Count();
var AuditCount= (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == item.PipelineId && x.IsTwoJoint == true && x.AuditDate !=null select x).Count();
var jotCount = (from x in WeldJointService.hJGL_WeldJoints where x.PipelineId == item.PipelineId && x.IsTwoJoint == true select x).Count();
var AuditCount= (from x in WeldJointService.hJGL_WeldJoints where x.PipelineId == item.PipelineId && x.IsTwoJoint == true && x.AuditDate !=null select x).Count();
TreeNode newNode = new TreeNode();
if (jotCount== AuditCount) //全部审核