1
This commit is contained in:
@@ -62,16 +62,19 @@ namespace BLL
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 维护管线材料导入编码,只更新材料编码字段,避免影响材料主编码和焊口关联。
|
||||
/// 维护管线材料主编码和导入材料编码。
|
||||
/// </summary>
|
||||
/// <param name="pipelineMatId">管线材料ID</param>
|
||||
/// <param name="mainMaterialCode">材料主编码,可空</param>
|
||||
/// <param name="materialCode">材料编码</param>
|
||||
public static void UpdateMaterialCode2(string pipelineMatId, string materialCode)
|
||||
public static void UpdateMaterialCodes(string pipelineMatId, string mainMaterialCode, string materialCode)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_PipeLineMat pipeLineMat = db.HJGL_PipeLineMat.FirstOrDefault(e => e.PipeLineMatId == pipelineMatId);
|
||||
if (pipeLineMat != null)
|
||||
{
|
||||
// 主编码与材料编码必须同次提交,避免列表展示到不一致的材料信息。
|
||||
pipeLineMat.MaterialCode = string.IsNullOrWhiteSpace(mainMaterialCode) ? null : mainMaterialCode.Trim();
|
||||
pipeLineMat.MaterialCode2 = materialCode;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
@@ -278,10 +278,10 @@ namespace BLL
|
||||
{
|
||||
throw new ArgumentException("焊口ID不能为空。");
|
||||
}
|
||||
if (string.IsNullOrEmpty(item.GrooveTypeId))
|
||||
/* if (string.IsNullOrEmpty(item.GrooveTypeId))
|
||||
{
|
||||
throw new ArgumentException("坡口类型不能为空。");
|
||||
}
|
||||
}*/
|
||||
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
@@ -290,10 +290,10 @@ namespace BLL
|
||||
{
|
||||
throw new ArgumentException("未找到对应焊口。");
|
||||
}
|
||||
if (!db.Base_GrooveType.Any(x => x.GrooveTypeId == item.GrooveTypeId))
|
||||
/* if (!db.Base_GrooveType.Any(x => x.GrooveTypeId == item.GrooveTypeId))
|
||||
{
|
||||
throw new ArgumentException("坡口类型不存在。");
|
||||
}
|
||||
}*/
|
||||
|
||||
var check = string.IsNullOrEmpty(item.FitupCheckId)
|
||||
? null
|
||||
@@ -310,7 +310,7 @@ namespace BLL
|
||||
|
||||
check.ProjectId = string.IsNullOrEmpty(item.ProjectId) ? weldJoint.ProjectId : item.ProjectId;
|
||||
check.WeldJointId = item.WeldJointId;
|
||||
check.GrooveTypeId = item.GrooveTypeId;
|
||||
//check.GrooveTypeId = item.GrooveTypeId;
|
||||
check.GrooveProcessType = item.GrooveProcessType;
|
||||
check.GrooveAngle = item.GrooveAngle;
|
||||
check.FitupGap = item.FitupGap;
|
||||
@@ -328,7 +328,7 @@ namespace BLL
|
||||
check.Remark = item.Remark;
|
||||
|
||||
// 组对检查需要同步回写焊口主表,保证焊口基础信息保持最新
|
||||
weldJoint.GrooveTypeId = item.GrooveTypeId;
|
||||
// weldJoint.GrooveTypeId = item.GrooveTypeId;
|
||||
weldJoint.GrooveProcessType = item.GrooveProcessType;
|
||||
weldJoint.GrooveAngle = item.GrooveAngle;
|
||||
weldJoint.FitupGap = item.FitupGap;
|
||||
|
||||
Reference in New Issue
Block a user