This commit is contained in:
commit
c0c2738e7f
|
@ -950,7 +950,6 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
||||||
if (unitInfo == null)
|
if (unitInfo == null)
|
||||||
{
|
{
|
||||||
errorMsg += "未知的单位编号 | ";
|
errorMsg += "未知的单位编号 | ";
|
||||||
|
|
||||||
}
|
}
|
||||||
var installInfo = Funs.DB.Project_Installation.FirstOrDefault(t => t.InstallationCode == model.InstallCode);
|
var installInfo = Funs.DB.Project_Installation.FirstOrDefault(t => t.InstallationCode == model.InstallCode);
|
||||||
if (installInfo == null)
|
if (installInfo == null)
|
||||||
|
@ -1020,6 +1019,8 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
||||||
//查询当前的焊口是否被使用了
|
//查询当前的焊口是否被使用了
|
||||||
if (isALL == "否")
|
if (isALL == "否")
|
||||||
{
|
{
|
||||||
|
var baseDict = GetJointCodeByPipelineIdDic(newPipelineInfo.PipelineId);
|
||||||
|
|
||||||
var dict = GetJointCodeDic(newPipelineInfo.PipelineId);
|
var dict = GetJointCodeDic(newPipelineInfo.PipelineId);
|
||||||
string[] modelCodes = model.JointCode.Split(',');
|
string[] modelCodes = model.JointCode.Split(',');
|
||||||
for (int i = 0; i < modelCodes.Length; i++)
|
for (int i = 0; i < modelCodes.Length; i++)
|
||||||
|
@ -1028,6 +1029,10 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
||||||
{
|
{
|
||||||
errorMsg += $"焊口【{modelCodes[i]}】已被使用 | ";
|
errorMsg += $"焊口【{modelCodes[i]}】已被使用 | ";
|
||||||
}
|
}
|
||||||
|
if (!baseDict.ContainsValue(modelCodes[i]))
|
||||||
|
{
|
||||||
|
errorMsg += $"未知的焊口【{modelCodes[i]}】| ";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
int baseCount = BLL.TestPackageManageEditService.countBaseWeldJointCode(newPipelineInfo.PipelineId);
|
int baseCount = BLL.TestPackageManageEditService.countBaseWeldJointCode(newPipelineInfo.PipelineId);
|
||||||
if (dict.Count == baseCount)
|
if (dict.Count == baseCount)
|
||||||
|
@ -1036,9 +1041,10 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
model.Remark = errorMsg;
|
|
||||||
}
|
}
|
||||||
if(!string.IsNullOrEmpty(model.Remark))
|
|
||||||
|
model.Remark = errorMsg;
|
||||||
|
if (!string.IsNullOrEmpty(model.Remark))
|
||||||
flag = true;
|
flag = true;
|
||||||
|
|
||||||
listData.Add(model);
|
listData.Add(model);
|
||||||
|
@ -1070,5 +1076,13 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
||||||
}
|
}
|
||||||
return dict;
|
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