包装管理修改

This commit is contained in:
2025-05-12 19:05:13 +08:00
parent 96139ddfb8
commit b1d732d1a9
21 changed files with 790 additions and 325 deletions
@@ -1,7 +1,9 @@
using BLL;
using FastReport.DevComponents.DotNetBar;
using FineUIPro.Web.HJGL.WeldingManage;
using Model;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
@@ -287,50 +289,21 @@ namespace FineUIPro.Web.HJGL.PreDesign
#region
private void BindGrid(string pipelineId, string unitworkid)
private void BindGrid(string pipelineId, string unitworkid)
{
var query = from pipe in Funs.DB.HJGL_PipeLineMat
join lib in Funs.DB.HJGL_MaterialCodeLib on pipe.MaterialCode equals lib.MaterialCode into libJoin
from libItem in libJoin.DefaultIfEmpty()
join line in Funs.DB.HJGL_Pipeline on pipe.PipelineId equals line.PipelineId into lineJoin
from lineItem in lineJoin.DefaultIfEmpty()
where lineItem != null && lineItem.UnitWorkId == unitworkid && lineItem.PipeArea == "1"
&& (pipe.PrefabricatedComponents == null || pipe.PrefabricatedComponents == "")
select new
{
pipe.PipeLineMatId,
libItem.MaterialCode,
libItem.MaterialName,
libItem.MaterialUnit,
libItem.MaterialSpec,
libItem.MaterialMade,
libItem.MaterialDef,
pipe.Number,
pipe.PrefabricatedComponents,
lineItem.PipelineId,
};
if (!string.IsNullOrEmpty(pipelineId))
{
query = query.Where(x => x.PipelineId == pipelineId);
}
query = query.OrderBy(x => x.PrefabricatedComponents);
var Prelist = HJGL_PipelineComponentService.GetPipelinePrefabricatedComponent(unitworkid, pipelineId);
var inoutplandetail = (from x in Funs.DB.HJGL_PackagingManageDetail
//where x.InOutPlanMasterId == Id && x.PipelineId == this.tvControlItem.SelectedNodeID
where x.PipelineId == pipelineId
&& (x.PipelineComponentId == null || x.PipelineComponentId == "")
select x).ToList();
var queryList=query.ToList();
// 优化 Linq 过滤条件
var result = (from x in queryList
join y in inoutplandetail on x.MaterialCode equals y.MaterialCode into yy
from y in yy.DefaultIfEmpty()
where y == null
select x).ToList();
// 2.获取当前分页数据
where x.PipelineId == pipelineId
&& (x.PipelineComponentId == null || x.PipelineComponentId == "")
select x).ToList();
var queryList = Prelist;
// 优化 Linq 过滤条件,过滤已经进入包装的预制散件
var result = (from x in queryList
join y in inoutplandetail on x.MaterialCode equals y.MaterialCode into yy
from y in yy.DefaultIfEmpty()
where y == null
select x).ToList();
Grid1.DataSource = result;
Grid1.DataBind();
}
@@ -388,7 +361,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
CreateTime = DateTime.Now,
CreateUser = this.CurrUser.PersonId,
};
PackagingmanagedetailService.Add(model);
HJGLPackagingmanagedetailService.Add(model);
}
}
}