2022-11-23 焊接wbs树加载优化,管线划分数据加载优化
This commit is contained in:
@@ -1381,6 +1381,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
|
||||
ShowNotify("导入成功!", MessageBoxIcon.Success);
|
||||
PipelineService.hJGL_Pipelines = PipelineService.GetPipelinesByProjectId(this.CurrUser.LoginProjectId);
|
||||
WeldJointService.hJGL_WeldJoints = WeldJointService.GetWeldJointByProjectid(this.CurrUser.LoginProjectId);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
else
|
||||
@@ -1485,7 +1487,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
#endregion
|
||||
void addPipelines(List<Model.View_HJGL_WeldJoint> PipelineList, string UnitWorkId)
|
||||
{
|
||||
var getPipeline = from x in Funs.DB.View_HJGL_WeldJoint where x.UnitWorkId == UnitWorkId select x;
|
||||
// var getPipeline = from x in Funs.DB.View_HJGL_WeldJoint where x.UnitWorkId == UnitWorkId select x;
|
||||
var pipelines = (from x in PipelineList
|
||||
select new Model.HJGL_Pipeline
|
||||
{
|
||||
@@ -1565,8 +1567,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
pipeline.MaterialId = pipelines[i].MaterialId;
|
||||
pipeline.Remark = pipelines[i].Remark;
|
||||
|
||||
var isExistPipelineCode = getPipeline.FirstOrDefault(x => x.PipelineCode == pipeline.PipelineCode && x.UnitWorkId == UnitWorkId);
|
||||
if (isExistPipelineCode != null) // 更新管线
|
||||
var isExistPipelineCode = PipelineService.GetPipelineByCode(pipeline.PipelineCode, pipeline.UnitWorkId);
|
||||
if (isExistPipelineCode!=null) // 更新管线
|
||||
{
|
||||
pipeline.PipelineId = isExistPipelineCode.PipelineId;
|
||||
BLL.PipelineService.UpdatePipeline(pipeline);
|
||||
@@ -1582,7 +1584,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
void addHJGL_WeldJoints(List<Model.View_HJGL_WeldJoint> PipelineList, string UnitWorkId)
|
||||
{
|
||||
var getweldjonts = from x in Funs.DB.View_HJGL_WeldJoint where x.UnitWorkId == UnitWorkId select x;
|
||||
var getpipelines= from y in Funs.DB.HJGL_Pipeline where y.UnitWorkId== UnitWorkId select y;
|
||||
List<Model.HJGL_WeldJoint> weldJoints_add = new List<Model.HJGL_WeldJoint>();
|
||||
|
||||
@@ -1637,7 +1638,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
weldJoint.JointAttribute = weldJoints[i].JointAttribute;
|
||||
weldJoint.ProjectId = weldJoints[i].ProjectId;
|
||||
|
||||
var isExistJot = getweldjonts.FirstOrDefault(x => x.PipelineId == weldJoint.PipelineId && x.WeldJointCode == PipelineList[i].WeldJointCode);
|
||||
var isExistJot = WeldJointService.GetWeldJointsByWeldJointCode(weldJoint.PipelineId, weldJoint.WeldJointCode);
|
||||
if (isExistJot != null) // 更新焊口
|
||||
{
|
||||
weldJoint.WeldJointId = isExistJot.WeldJointId;
|
||||
|
||||
Reference in New Issue
Block a user