1212
This commit is contained in:
parent
39e59b1ac6
commit
b1bb7c36e3
Binary file not shown.
|
@ -1019,6 +1019,8 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
|||
//查询当前的焊口是否被使用了
|
||||
if (isALL == "否")
|
||||
{
|
||||
var baseDict = GetJointCodeByPipelineIdDic(newPipelineInfo.PipelineId);
|
||||
|
||||
var dict = GetJointCodeDic(newPipelineInfo.PipelineId);
|
||||
string[] modelCodes = model.JointCode.Split(',');
|
||||
for (int i = 0; i < modelCodes.Length; i++)
|
||||
|
@ -1027,6 +1029,10 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
|||
{
|
||||
errorMsg += $"焊口【{modelCodes[i]}】已被使用 | ";
|
||||
}
|
||||
if (!baseDict.ContainsValue(modelCodes[i]))
|
||||
{
|
||||
errorMsg += $"未知的焊口【{modelCodes[i]}】| ";
|
||||
}
|
||||
}
|
||||
int baseCount = BLL.TestPackageManageEditService.countBaseWeldJointCode(newPipelineInfo.PipelineId);
|
||||
if (dict.Count == baseCount)
|
||||
|
@ -1070,5 +1076,13 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
|||
}
|
||||
return dict;
|
||||
}
|
||||
|
||||
private Dictionary<string,string> GetJointCodeByPipelineIdDic(string piplineId)
|
||||
{
|
||||
var dict = Funs.DB.Pipeline_WeldJoint.Where(t => t.PipelineId == piplineId)
|
||||
.ToDictionary(t => t.WeldJointId, t => t.WeldJointCode);
|
||||
|
||||
return dict;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue