焊接材料修改
This commit is contained in:
@@ -93,33 +93,25 @@ namespace BLL
|
||||
/// <param name="IsCheckPrint"></param>
|
||||
/// <returns></returns>
|
||||
public static IEnumerable<PipelineComponentPrintDto> GetPrintModelByPipelineComponentIds(
|
||||
string[] PipelineComponentId, string[] PipelineId, bool IsCheckPrint)
|
||||
string[] PipelineComponentId, string[] PipelineId, bool IsCheckPrint)
|
||||
{
|
||||
var db = Funs.DB;
|
||||
var query =
|
||||
from com in db.HJGL_Pipeline_Component
|
||||
|
||||
join mat in db.HJGL_PipeLineMat on com.PipeLineMatId equals mat.PipeLineMatId into matJoin
|
||||
|
||||
from mat in matJoin.DefaultIfEmpty()
|
||||
join pipe in db.HJGL_Pipeline on com.PipelineId equals pipe.PipelineId into pipeJoin
|
||||
|
||||
from pipe in pipeJoin.DefaultIfEmpty()
|
||||
join punit in db.Base_Unit on com.PreUnit equals punit.UnitId into punitJoin
|
||||
|
||||
from punit in punitJoin.DefaultIfEmpty()
|
||||
join aunit in db.Base_Unit on com.AssembleUnit equals aunit.UnitId into aunitJoin
|
||||
|
||||
from aunit in aunitJoin.DefaultIfEmpty()
|
||||
join unitwork in db.WBS_UnitWork on pipe.UnitWorkId equals unitwork.UnitWorkId into unitworkJoin
|
||||
|
||||
from unitwork in unitworkJoin.DefaultIfEmpty()
|
||||
join mater in db.Base_Material on pipe.MaterialId equals mater.MaterialId into materJoin
|
||||
|
||||
from mater in materJoin.DefaultIfEmpty()
|
||||
where com.QRCode != ""
|
||||
orderby com.PipelineComponentCode,com.PipelineId
|
||||
|
||||
where com.QRCode != ""
|
||||
orderby com.PipelineComponentCode, com.PipelineId
|
||||
select new PipelineComponentPrintDto
|
||||
{
|
||||
PipelineComponentId = com.PipelineComponentId,
|
||||
@@ -138,26 +130,32 @@ namespace BLL
|
||||
QRCode2 = "PrePipeline$" + com.PipelineComponentId,
|
||||
MaterialCode = mater.MaterialCode,
|
||||
IsPrint = com.IsPrint
|
||||
|
||||
};
|
||||
|
||||
var result = query.ToList();
|
||||
if (PipelineComponentId!=null &&PipelineComponentId.Length > 0)
|
||||
|
||||
if (PipelineComponentId != null && PipelineComponentId.Length > 0)
|
||||
{
|
||||
result = result.Where(x => PipelineComponentId.Contains(x.PipelineComponentId.ToString())).ToList();
|
||||
}
|
||||
|
||||
if (PipelineId != null && PipelineId.Length > 0)
|
||||
{
|
||||
result = result.Where(x => PipelineId.Contains(x.PipelineId.ToString())).ToList();
|
||||
// 按照传入的 PipelineId 顺序排序
|
||||
result = result.OrderBy(x => Array.IndexOf(PipelineId, x.PipelineId.ToString())).ToList();
|
||||
}
|
||||
|
||||
//if (IsCheckPrint != null & IsCheckPrint ==true)
|
||||
//{
|
||||
// result = result.Where(x => x.IsPrint==false||x.IsPrint==null).ToList();
|
||||
//}
|
||||
// if (IsCheckPrint != null & IsCheckPrint == true)
|
||||
// {
|
||||
// result = result.Where(x => x.IsPrint == false || x.IsPrint == null).ToList();
|
||||
// }
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 判断管线组件Code是否存在
|
||||
|
||||
Reference in New Issue
Block a user