2022-10-25 焊接修改

This commit is contained in:
2022-10-25 22:30:17 +08:00
parent 75fb02a45c
commit 5fc76eec1a
15 changed files with 632 additions and 121 deletions
@@ -1,4 +1,5 @@
using MiniExcelLibs;
using Model;
using System;
using System.Collections.Generic;
using System.Data;
@@ -40,6 +41,33 @@ 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)
{
var db = Funs.DB;
var pipelineList =( from x in db.View_HJGL_Pipeline
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();
if (model.IsFinished!=null)
{
if (model.IsFinished==true)
{
pipelineList= pipelineList.Where(x => x.IsFinished == true).ToList();
}
else
{
pipelineList = pipelineList.Where(x => x.IsFinished == false||x.IsFinished==null).ToList();
}
}
return pipelineList;
}
/// <summary>
/// 根据unitworkId获取所有管线
/// </summary>
@@ -369,7 +369,18 @@ namespace BLL
var q = (from x in Funs.DB.View_HJGL_WeldJoint where x.PipelineId == pipelineId orderby x.WeldJointCode select x).ToList();
return q;
}
public static List<Model.View_HJGL_WeldJoint> GetViewWeldJointsBymodel(Model.View_HJGL_WeldJoint model)
{
var q = (from x in Funs.DB.View_HJGL_WeldJoint
where
(string.IsNullOrEmpty(model.ProjectId) || x.ProjectId.Contains(model.ProjectId))
&& (string.IsNullOrEmpty(model.UnitWorkId) || x.UnitWorkId.Contains(model.UnitWorkId))
&& (string.IsNullOrEmpty(model.PipelineId) || x.PipelineId.Contains(model.PipelineId))
&& (string.IsNullOrEmpty(model.PipelineCode) || x.PipelineCode.Contains(model.PipelineCode))
&& (string.IsNullOrEmpty(model.WeldJointCode) || x.WeldJointCode.Contains(model.WeldJointCode))
orderby x.WeldJointCode select x).ToList();
return q;
}
/// <summary>
/// 根据壁厚计算焊口达因
/// </summary>