From 3aedbf975fafc72600a4946b4fd09b0ae82f823e Mon Sep 17 00:00:00 2001 From: fly-l <1420031550@qq.com> Date: Mon, 19 Jun 2023 17:14:28 +0800 Subject: [PATCH] 2023-06-19 --- .../HJGL/WeldingManage/PipelineMatIn.aspx.cs | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineMatIn.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineMatIn.aspx.cs index f91a1b9b..66b72644 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineMatIn.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineMatIn.aspx.cs @@ -342,7 +342,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage if (pds.Count > 0 && pds != null) { - for (int i = 0; i < pds.Count; i++) + for (int i = 1; i < pds.Count; i++) { HJGL_PipeLineMat item = new HJGL_PipeLineMat(); @@ -435,6 +435,25 @@ namespace FineUIPro.Web.HJGL.WeldingManage #endregion } + if (result.Count > 0) + { + matList.Clear(); + // result = result.Substring(0, result.LastIndexOf("|")); + errorInfos = string.Join("|", result.Distinct()); + //Alert alert = new Alert(); + //alert.Message = result; + //alert.Target = Target.Self; + //alert.Show(); + responeData.code = 0; + responeData.message = errorInfos; + } + else + { + errorInfos = string.Empty; + + + } + } else { @@ -638,7 +657,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage foreach (var item in matList) { var pipeLineMat = from x in Funs.DB.HJGL_PipeLineMat where x.MaterialCode == item.MaterialCode && x.PipelineId == item.PipelineId &&x.PrefabricatedComponents==item.PrefabricatedComponents select x; - if (pipeLineMat.Count() == 0) + if (pipeLineMat.Count() == 0|| pipeLineMat==null) { item.PipeLineMatId = SQLHelper.GetNewID(typeof(Model.HJGL_PipeLineMat)); BLL.PipelineMatService.AddPipeLineMat(item);