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
@@ -1,11 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Web;
namespace BLL
{
public static class WeldJointService
{
public static List<Model.HJGL_WeldJoint> hJGL_WeldJoints
{
get;
set;
}
/// <summary>
/// 根据焊口Id获取焊口信息
/// </summary>
@@ -59,6 +69,15 @@ namespace BLL
var q = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == PipelineId select x).ToList();
return q;
}
public static Model.HJGL_WeldJoint GetWeldJointsByWeldJointCode(string PipelineId, string WeldJointCode)
{
var q=(from x in Funs.DB.HJGL_WeldJoint where x.PipelineId==PipelineId && x.WeldJointCode==WeldJointCode select x ).FirstOrDefault();
return q;
}
/// <summary>
/// 添加
/// </summary>
@@ -312,6 +331,26 @@ namespace BLL
Model.SGGLDB db = Funs.DB;
return db.View_HJGL_WeldJoint.FirstOrDefault(e => e.WeldJointId == weldJointId);
}
public static List<Model.HJGL_WeldJoint> GetWeldJointByUnitworkId(string UnitWorkId)
{
Model.SGGLDB db = Funs.DB;
var q = (from x in db.HJGL_WeldJoint
join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId into tt
from g in tt.DefaultIfEmpty()
where g.UnitWorkId == UnitWorkId
select x).ToList();
return q;
}
public static List<Model.HJGL_WeldJoint> GetWeldJointByProjectid(string ProjectId)
{
Model.SGGLDB db = Funs.DB;
var q = (from x in db.HJGL_WeldJoint
where x.ProjectId == ProjectId
select x).ToList();
return q;
}
/// <summary>
/// 根据焊口Id获取插入焊口数