feat(hjgl):焊接日报增加导入功能
This commit is contained in:
@@ -102,6 +102,7 @@ namespace BLL
|
||||
MaterialCode = newtable.MaterialCode,
|
||||
PrefabricatedComponents = newtable.PrefabricatedComponents,
|
||||
Number = newtable.Number,
|
||||
// 领料出库由焊接任务单焊口驱动,关联明细需要保存焊口ID用于后续追溯。
|
||||
WeldJointId = newtable.WeldJointId,
|
||||
};
|
||||
Funs.DB.Tw_InOutPlanDetail_Relation.InsertOnSubmit(table);
|
||||
@@ -134,6 +135,7 @@ namespace BLL
|
||||
table.MaterialCode = newtable.MaterialCode;
|
||||
table.PrefabricatedComponents = newtable.PrefabricatedComponents;
|
||||
table.Number = newtable.Number;
|
||||
// 更新关联明细时同步维护焊口ID,避免出库申请修改后丢失焊口归属。
|
||||
table.WeldJointId = newtable.WeldJointId;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
@@ -992,7 +992,8 @@ namespace BLL
|
||||
.Select(e => e.WeldJointId)
|
||||
.Distinct()
|
||||
.ToList();
|
||||
//领料出库需要排除散件材料
|
||||
// 领料出库按当前任务单焊口取料,避免同一管线其他未下任务单焊口的材料被带出。
|
||||
// 这里只取已反写 MaterialCode 的材料;未匹配主编码的材料无法生成库存出库明细。
|
||||
var allMaterDatial = (from x in db.HJGL_PipeLineMat
|
||||
join y in db.HJGL_MaterialCodeLib on x.MaterialCode equals y.MaterialCode
|
||||
where pipelineList.Contains(x.PipelineId)
|
||||
@@ -1063,6 +1064,7 @@ namespace BLL
|
||||
};
|
||||
TwInOutplandetailService.Add(detail);
|
||||
}
|
||||
// 管件申请单只保存单位为“个”的材料关联,并同步记录焊口ID,便于追溯出库材料归属。
|
||||
var twinoutplandetailRelationList = MaterDatial.Where(x => x.MaterialUnit.Contains("个")).Select(x => new Tw_InOutPlanDetail_Relation
|
||||
{
|
||||
PipelineId = x.PipelineId,
|
||||
@@ -1103,6 +1105,7 @@ namespace BLL
|
||||
};
|
||||
TwInOutplandetailService.Add(detail);
|
||||
}
|
||||
// 管段申请单只保存单位为“米”的材料关联,并同步记录焊口ID,避免关联明细跨单据混写。
|
||||
var twinoutplandetailRelationList = MaterDatial.Where(x => x.MaterialUnit.Contains("米")).Select(x => new Tw_InOutPlanDetail_Relation
|
||||
{
|
||||
PipelineId = x.PipelineId,
|
||||
|
||||
Reference in New Issue
Block a user