From 98ca42dfa1dfad26ec00dfbdde971d8a511c9c13 Mon Sep 17 00:00:00 2001 From: fly-l <1420031550@qq.com> Date: Thu, 22 Dec 2022 10:35:20 +0800 Subject: [PATCH] =?UTF-8?q?2022-12-22=20=E7=84=8A=E6=8E=A5=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=9F=BA=E7=A1=80=E6=95=B0=E6=8D=AE=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vs/SGGL_SeDin/v17/.wsuo | Bin 23040 -> 23040 bytes .../WeldingManage/PipelineListPDMSIn.aspx.cs | 93 +++++++++++------- 2 files changed, 57 insertions(+), 36 deletions(-) diff --git a/.vs/SGGL_SeDin/v17/.wsuo b/.vs/SGGL_SeDin/v17/.wsuo index d3d1449442b72ce4b3dca4ef381acdbc016e9e2a..32a1be25f69c6b2bce7beafffb0b10119ea7b6e6 100644 GIT binary patch delta 650 zcmZ`$O-lk{5cXZyRZFEXp;E*AKryyfS5}0I4NK~fnt1c1lBZ7Lp-FweZ(>XBBDbj~=zbS%Bzde}Lqk&{J}$@B$g zhv))d0S|-6!4dxicS62q)Ycgs`!=J-9L+!(79jT2-Hynn}^7*`9~u3J6j_? z!acb}J+nJehu4@u9PQ6e=%emcgNK}ek*`CiE9V5PJ)kx4~vV(J$8rkGyD^<-dfY*@O`)wcX)_62 z1-Qu}9i%0u%LVfPVHSL=GJB6$IeKy6Vy?g&(Y87Gn7XSHs_ykQm8a@{g;jDlW-Z5S ud9Izeho!VEWu#0)tkvobF(s!Iu_nn4v96pZt5P~uSJDY4=3j_bvV8+8)e?IE delta 846 zcmZ{iOK1~O6o%(cX41swQQIVq(A1`xYKaZzF_8olGHJ{UY91t%Lc2*!g9~vX5ehCE z_g#ob5UEND3T~8=DGGuzwi_3MS%~0XK^G!Ig9y@kZXOZ^5B&F@`^`PC%hY#BeTQsc zV%51{#^sAf`3l=0!4ZaG4$-u@8&Fo%G|Gvh`~am#--a6Mu?~kkHzt_|2&L4H_t=qv zZw~ZN44j91zP!b~A?ntiq0^80C9%bo3=@Qfgf|lhe`1=r=&2E{LGXAObUa8+C<9%ze)9jXCO(hP>Fr%<%a!S>l4NOpzH0|`ZR1f!_p z=MzQ9TTX+U<#pc0Laqa2g`B(*5((5pQX|C5N~Df{R01g~HRd@`;+wFUm>~?jN<;{O zXfg&;()5>ZCFj7-n&2Jo_bub{c;bsnLpntn2BJ#=p2PYK#8VMCmlCxrpPoJZ_~Pyg z!6++yNSy>Fb$QgZd$2pX@ZetM$?eH+!3C!E9HjIjyiYqpNxQ>11Yz!|)~+uLYZAk- zk1-?tDTScFTD?#yiLSD*S diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineListPDMSIn.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineListPDMSIn.aspx.cs index ba9af812..e7d3ed27 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineListPDMSIn.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineListPDMSIn.aspx.cs @@ -755,7 +755,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage private Model.ResponeData AddDatasetToSQL(List pds, int count) { Model.ResponeData responeData = new Model.ResponeData(); - string result = string.Empty; + // string result = string.Empty; + List result = new List(); //pds = BLL.Funs.FilterBlankLines(pds); if (count < 28) { @@ -795,7 +796,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage string pipeLineId = string.Empty; if (string.IsNullOrEmpty(col0)) { - result += "第" + (i + 1).ToString() + "行," + "管线号" + "," + "此项为必填项!" + "|"; + result.Add( "第" + (i + 1).ToString() + "行," + "管线号" + "," + "此项为必填项!" + "|"); } else { @@ -808,14 +809,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage string col3 = pds[i].D; if (string.IsNullOrEmpty(col3)) { - result += "第" + (i + 1).ToString() + "行," + "介质名称" + "," + "此项为必填项!" + "|"; + result.Add("第" + (i + 1).ToString() + "行," + "介质名称" + "," + "此项为必填项!" + "|"); } else { var Medium = getMedium.FirstOrDefault(x => x.MediumName == col3); if (Medium == null) { - result += "第" + (i + 1).ToString() + "行," + "该介质不存在!" + "|"; + // result += "第" + (i + 1).ToString() + "行," + "该介质不存在!" + "|"; + result .Add( col3 + "-该介质不存在!" + "|"); } else { @@ -826,14 +828,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage string col4 = pds[i].E; if (string.IsNullOrEmpty(col4)) { - result += "第" + (i + 1).ToString() + "行," + "管道等级" + "," + "此项为必填项!" + "|"; + result.Add("第" + (i + 1).ToString() + "行," + "管道等级" + "," + "此项为必填项!" + "|"); } else { var PipeLineClass = getPipeLineClass.FirstOrDefault(x => x.PipingClassCode == col4); if (PipeLineClass == null) { - result += "第" + (i + 1).ToString() + "行," + "该管道等级不存在!" + "|"; + // result += "第" + (i + 1).ToString() + "行," + "该管道等级不存在!" + "|"; + result.Add(col4 + "-该管道等级不存在!" + "|"); } else { @@ -847,7 +850,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage var DetectionRate = getDetectionRate.FirstOrDefault(x => x.DetectionRateValue.ToString() == col5.Replace("%", "") || x.DetectionRateCode == col5); if (DetectionRate == null) { - result += "第" + (i + 1).ToString() + "行," + "该探伤比例不存在!" + "|"; + // result += "第" + (i + 1).ToString() + "行," + "该探伤比例不存在!" + "|"; + result.Add(col5 + "-该探伤比例不存在!" + "|"); } else { @@ -857,7 +861,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage } else { - result += "第" + (i + 1).ToString() + "行," + "探伤比例" + "," + "此项为必填项!" + "|"; + result.Add("第" + (i + 1).ToString() + "行," + "探伤比例" + "," + "此项为必填项!" + "|"); } string col6 = pds[i].G; @@ -869,7 +873,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage var type = getDetectionType.FirstOrDefault(x => x.DetectionTypeCode == t); if (type == null) { - result += "第" + (i + 1).ToString() + "行," + "探伤类型【" + t + "】不存在!" + "|"; + //result += "第" + (i + 1).ToString() + "行," + "探伤类型【" + t + "】不存在!" + "|"; + result.Add("探伤类型【" + t + "】不存在!" + "|"); } else { @@ -885,7 +890,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage } else { - result += "第" + (i + 1).ToString() + "行," + "探伤类型" + "," + "此项为必填项!" + "|"; + result.Add("第" + (i + 1).ToString() + "行," + "探伤类型" + "," + "此项为必填项!" + "|"); } string col7 = pds[i].H; @@ -904,7 +909,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage var TestMedium = getTestMedium.FirstOrDefault(x => x.MediumName == col9); if (TestMedium == null) { - result += "第" + (i + 1).ToString() + "行," + "该压力试验介质不存在!" + "|"; + //result += "第" + (i + 1).ToString() + "行," + "该压力试验介质不存在!" + "|"; + result.Add(col9 + "-该压力试验介质不存在!" + "|"); } else { @@ -923,7 +929,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage var PressurePipingClass = getPressurePipingClass.FirstOrDefault(x => x.PressurePipingClassCode == col11); if (PressurePipingClass == null) { - result += "第" + (i + 1).ToString() + "行," + "该压力管道级别不存在!" + "|"; + // result += "第" + (i + 1).ToString() + "行," + "该压力管道级别不存在!" + "|"; + result.Add(col11 + "-该压力管道级别不存在!" + "|"); } else { @@ -941,7 +948,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage } catch (Exception) { - result += "第" + (i + 1).ToString() + "行," + "管线长度(m)格式输入有误" + "|"; + result.Add("第" + (i + 1).ToString() + "行," + "管线长度(m)格式输入有误" + "|"); } } string col13 = pds[i].N; @@ -950,7 +957,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage var LeakMedium = getLeakMedium.FirstOrDefault(x => x.MediumName == col13); if (LeakMedium == null) { - result += "第" + (i + 1).ToString() + "行," + "该泄露试验介质不存在!" + "|"; + //result += "第" + (i + 1).ToString() + "行," + "该泄露试验介质不存在!" + "|"; + result.Add(col13 + "-该泄露试验介质不存在!" + "|"); } else { @@ -969,7 +977,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage var PurgeMethod = getPurgeMethod.FirstOrDefault(x => x.PurgeMethodCode == col15); if (PurgeMethod == null) { - result += "第" + (i + 1).ToString() + "行," + "该吹洗要求不存在!" + "|"; + //result += "第" + (i + 1).ToString() + "行," + "该吹洗要求不存在!" + "|"; + result.Add(col15 + "-该吹洗要求不存在!" + "|"); } else { @@ -989,7 +998,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage var material = getMaterial.FirstOrDefault(x => x.MaterialCode == col17); if (material == null) { - result += "第" + (i + 1).ToString() + "行," + "该材质不存在!" + "|"; + // result += "第" + (i + 1).ToString() + "行," + "该材质不存在!" + "|"; + result.Add(col17 + "-该材质不存在!" + "|"); } else { @@ -1003,7 +1013,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage string col19 = pds[i].T; if (string.IsNullOrEmpty(col19)) { - result += "第" + (i + 1).ToString() + "行," + "焊口号" + "," + "此项为必填项!" + "|"; + result.Add("第" + (i + 1).ToString() + "行," + "焊口号" + "," + "此项为必填项!" + "|"); } else { @@ -1025,7 +1035,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage var material = getMaterial.FirstOrDefault(x => x.MaterialCode == col20); if (material == null) { - result += "第" + (i + 1).ToString() + "行," + "该材质1不存在!" + "|"; + // result += "第" + (i + 1).ToString() + "行," + "该材质1不存在!" + "|"; + result.Add(col20 + "-该材质1不存在!" + "|"); } else { @@ -1035,7 +1046,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage } else { - result += "第" + (i + 1).ToString() + "行," + "材质1" + "," + "此项为必填项!" + "|"; + result.Add("第" + (i + 1).ToString() + "行," + "材质1" + "," + "此项为必填项!" + "|"); } string col21 = pds[i].V.ToString(); @@ -1044,7 +1055,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage var material = getMaterial.FirstOrDefault(x => x.MaterialCode == col21); if (material == null) { - result += "第" + (i + 1).ToString() + "行," + "该材质2不存在!" + "|"; + //result += "第" + (i + 1).ToString() + "行," + "该材质2不存在!" + "|"; + result.Add(col21 + "-该材质2不存在!" + "|"); } else { @@ -1054,11 +1066,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage } else { - result += "第" + (i + 1).ToString() + "行," + "材质2" + "," + "此项为必填项!" + "|"; + result.Add("第" + (i + 1).ToString() + "行," + "材质2" + "," + "此项为必填项!" + "|"); } string col22 = pds[i].W; - string col27 = pds[i].AB; + string col27 = ""; + if (pds[i].AB!=null) + { + col27= pds[i].AB.ToString(); + } if (rbDiaType.SelectedValue == "1") { if (!string.IsNullOrEmpty(col27)) @@ -1076,12 +1092,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage } catch (Exception) { - result += "第" + (i + 1).ToString() + "行," + "外径格式输入有误" + "|"; + result.Add("第" + (i + 1).ToString() + "行," + "外径格式输入有误" + "|"); } } else { - result += "第" + (i + 1).ToString() + "行," + "外径" + "," + "此项为必填项!" + "|"; + result.Add("第" + (i + 1).ToString() + "行," + "外径" + "," + "此项为必填项!" + "|"); } } else @@ -1093,7 +1109,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage } else { - result += "第" + (i + 1).ToString() + "行," + "DN公称直径" + "," + "此项为必填项!" + "|"; + result.Add("第" + (i + 1).ToString() + "行," + "DN公称直径" + "," + "此项为必填项!" + "|"); } } @@ -1109,12 +1125,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage } catch (Exception) { - result += "第" + (i + 1).ToString() + "行," + "达因格式输入有误" + "|"; + result.Add("第" + (i + 1).ToString() + "行," + "达因格式输入有误" + "|"); } } else { - result += "第" + (i + 1).ToString() + "行," + "达因" + "," + "此项为必填项!" + "|"; + result.Add("第" + (i + 1).ToString() + "行," + "达因" + "," + "此项为必填项!" + "|"); } var col24 = pds[i].Y; @@ -1136,12 +1152,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage } catch (Exception) { - result += "第" + (i + 1).ToString() + "行," + "壁厚格式输入有误" + "|"; + result.Add("第" + (i + 1).ToString() + "行," + "壁厚格式输入有误" + "|") ; } } else { - result += "第" + (i + 1).ToString() + "行," + "壁厚" + "," + "此项为必填项!" + "|"; + result.Add("第" + (i + 1).ToString() + "行," + "壁厚" + "," + "此项为必填项!" + "|"); } if (rbDiaType.SelectedValue == "1") { @@ -1160,7 +1176,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage var weldType = getWeldType.FirstOrDefault(x => x.WeldTypeCode == col25); if (weldType == null) { - result += "第" + (i + 1).ToString() + "行," + "该焊缝类型不存在!" + "|"; + // result += "第" + (i + 1).ToString() + "行," + "该焊缝类型不存在!" + "|"; + result.Add(col25 + "-该焊缝类型不存在!" + "|"); } else { @@ -1209,7 +1226,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage } else { - result += "第" + (i + 1).ToString() + "行," + "焊缝类型" + "," + "此项为必填项!" + "|"; + result.Add("第" + (i + 1).ToString() + "行," + "焊缝类型" + "," + "此项为必填项!" + "|"); } string col26 = pds[i].AA; if (!string.IsNullOrEmpty(col26)) @@ -1219,7 +1236,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage var q = JointAttribute.Where(x => x.Value == col26); if (q == null) { - result += "第" + (i + 1).ToString() + "行," + "该焊口属性不存在!" + "|"; + result.Add("第" + (i + 1).ToString() + "行," + "该焊口属性不存在!" + "|"); } else @@ -1230,7 +1247,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage } else { - result += "第" + (i + 1).ToString() + "行," + "焊口属性" + "," + "此项为必填项!" + "|"; + result.Add("第" + (i + 1).ToString() + "行," + "焊口属性" + "," + "此项为必填项!" + "|"); } @@ -1241,11 +1258,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage } } - 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; + //alert.Show(); responeData.code = 0; responeData.message = errorInfos; }