2022-11-23 焊接wbs树加载优化,管线划分数据加载优化
This commit is contained in:
@@ -24,7 +24,13 @@ namespace BLL
|
||||
/// 现场安装
|
||||
/// </summary>
|
||||
public const string PipeArea_FIELD = "2";
|
||||
|
||||
public static List<Model.HJGL_Pipeline> hJGL_Pipelines
|
||||
{
|
||||
|
||||
get;
|
||||
set;
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 实际日期类型
|
||||
/// </summary>
|
||||
@@ -161,18 +167,18 @@ namespace BLL
|
||||
{
|
||||
return Funs.DB.HJGL_Pipeline.FirstOrDefault(e => e.PipelineCode == pipelineCode);
|
||||
}
|
||||
public static List<View_HJGL_Pipeline> GetView_HJGL_Pipelines(View_HJGL_Pipeline model)
|
||||
public static List<HJGL_Pipeline> GetView_HJGL_Pipelines(HJGL_Pipeline model)
|
||||
{
|
||||
var db = Funs.DB;
|
||||
var pipelineList =( from x in db.View_HJGL_Pipeline
|
||||
where
|
||||
var pipelineList =( from x in hJGL_Pipelines
|
||||
where
|
||||
(string.IsNullOrEmpty(model.ProjectId) || x.ProjectId.Contains(model.ProjectId))
|
||||
&& (string.IsNullOrEmpty(model.UnitWorkId) || x.UnitWorkId.Contains(model.UnitWorkId))
|
||||
&& (string.IsNullOrEmpty(model.PipelineCode) || x.PipelineCode.Contains(model.PipelineCode))
|
||||
&& (string.IsNullOrEmpty(model.SingleName) || x.SingleName.Contains(model.SingleName))
|
||||
&& (string.IsNullOrEmpty(model.DesignPress) || x.DesignPress.Contains(model.DesignPress))
|
||||
&& (string.IsNullOrEmpty(model.MaterialCode) || x.MaterialCode.Contains(model.MaterialCode))
|
||||
select x).ToList();
|
||||
/* && (string.IsNullOrEmpty(model.MaterialCode) || x.MaterialCode.Contains(model.MaterialCode))*/
|
||||
select x).ToList();
|
||||
if (model.IsFinished!=null)
|
||||
{
|
||||
if (model.IsFinished==true)
|
||||
@@ -200,6 +206,17 @@ namespace BLL
|
||||
return q;
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据项目获取所有管线
|
||||
/// </summary>
|
||||
/// <param name="ProjectId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.HJGL_Pipeline> GetPipelinesByProjectId(string ProjectId)
|
||||
{
|
||||
|
||||
var q = Funs.DB.HJGL_Pipeline.Where(e => e.ProjectId == ProjectId).ToList();
|
||||
return q;
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据管线ID获取管线信息
|
||||
/// </summary>
|
||||
/// <param name="pipelineName"></param>
|
||||
@@ -385,10 +402,28 @@ namespace BLL
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加作业管线
|
||||
/// </summary>
|
||||
/// <param name="pipeline"></param>
|
||||
public static bool IsExistPipelineCode(string pipelineCode, string unitWorkId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_Pipeline q = null;
|
||||
q = Funs.DB.HJGL_Pipeline.FirstOrDefault(x => x.PipelineCode == pipelineCode && x.UnitWorkId == unitWorkId);
|
||||
if (q != null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public static HJGL_Pipeline GetPipelineByCode(string pipelineCode, string unitWorkId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_Pipeline q = null;
|
||||
q = Funs.DB.HJGL_Pipeline.FirstOrDefault(x => x.PipelineCode == pipelineCode && x.UnitWorkId == unitWorkId);
|
||||
return q;
|
||||
}
|
||||
|
||||
public static void AddPipeline(Model.HJGL_Pipeline pipeline)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
|
||||
@@ -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获取插入焊口数
|
||||
|
||||
Reference in New Issue
Block a user