2022-11-25 焊接材料匹配任务清单树优化
This commit is contained in:
@@ -150,7 +150,8 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
{
|
||||
Model.ResponeData responeData = new Model.ResponeData();
|
||||
|
||||
string result = string.Empty;
|
||||
//string result = string.Empty;
|
||||
List<string> result = new List<string> () ;
|
||||
int ic, ir;
|
||||
ic = pds.Columns.Count;
|
||||
ir = pds.Rows.Count;
|
||||
@@ -175,39 +176,41 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
|
||||
if (string.IsNullOrEmpty(pipelinecode))
|
||||
{
|
||||
result += "第" + (i + 2).ToString() + "行," + "管线号" + "," + "此项为必填项!" + "|";
|
||||
//result += "第" + (i + 2).ToString() + "行," + "管线号" + "," + "此项为必填项!" + "|";
|
||||
result.Add("第" + (i + 2).ToString() + "行," + "管线号" + "," + "此项为必填项!");
|
||||
}
|
||||
else
|
||||
{
|
||||
pipeline = getPipeline.FirstOrDefault(x => x.PipelineCode == pipelinecode);
|
||||
if (pipeline == null)
|
||||
{
|
||||
result += "第" + (i + 2).ToString() + "行," + "不存在此管线号" + "|";
|
||||
|
||||
//result += "第" + (i + 2).ToString() + "行," + "不存在此管线号" + "|";
|
||||
result.Add("不存在此管线号-"+ pipelinecode);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (string.IsNullOrEmpty(PipelineComponentCode))
|
||||
{
|
||||
result += "第" + (i + 2).ToString() + "行," + "预制组件" + "," + "此项为必填项!" + "|";
|
||||
//result += "第" + (i + 2).ToString() + "行," + "预制组件" + "," + "此项为必填项!" + "|";
|
||||
result.Add("第" + (i + 2).ToString() + "行," + "预制组件" + "," + "此项为必填项!");
|
||||
}
|
||||
else
|
||||
{
|
||||
hJGL_Pipeline_Component = HJGL_PipelineComponentService.GetPipelineComponentByCodeandpipelineId(PipelineComponentCode, pipeline.PipelineId);
|
||||
if (hJGL_Pipeline_Component == null)
|
||||
{
|
||||
result += "第" + (i + 2).ToString() + "行," + "不存在此预制组件 " + PipelineComponentCode + " |";
|
||||
|
||||
//result += "第" + (i + 2).ToString() + "行," + "不存在此预制组件 " + PipelineComponentCode + " |";
|
||||
result.Add("不存在此预制组件-" + PipelineComponentCode);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (!string.IsNullOrEmpty(result))
|
||||
if (result.Count>0)
|
||||
{
|
||||
PipelineList.Clear();
|
||||
result = result.Substring(0, result.LastIndexOf("|"));
|
||||
errorInfos = result;
|
||||
// result = result.Substring(0, result.LastIndexOf("|"));
|
||||
errorInfos = string .Join("|", result.Distinct()) ;
|
||||
//Alert alert = new Alert();
|
||||
//alert.Message = result;
|
||||
//alert.Target = Target.Self;
|
||||
|
||||
Reference in New Issue
Block a user