From a2d3fd4cb2df22ab76967c719db826c8b9d4a282 Mon Sep 17 00:00:00 2001 From: fly-l <1420031550@qq.com> Date: Fri, 25 Nov 2022 17:20:37 +0800 Subject: [PATCH] =?UTF-8?q?2022-11-25=20=E7=84=8A=E6=8E=A5=E6=9D=90?= =?UTF-8?q?=E6=96=99=E5=AF=BC=E5=85=A5=E5=AE=A1=E6=A0=B8=E7=BB=93=E6=9E=9C?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vs/SGGL_SeDin/v17/.wsuo | Bin 22528 -> 24064 bytes .../DataImport/MaterialInformation.aspx.cs | 55 ++++++++++-------- .../HJGL/WeldingManage/PipelineMatIn.aspx | 2 +- .../HJGL/WeldingManage/PipelineMatIn.aspx.cs | 55 +++++++++--------- 4 files changed, 58 insertions(+), 54 deletions(-) diff --git a/.vs/SGGL_SeDin/v17/.wsuo b/.vs/SGGL_SeDin/v17/.wsuo index 77417425bd166cb07f0776a6b321055863aaa15a..6ea53edcfc31c3a2be37b29a2da423c472f31277 100644 GIT binary patch delta 1007 zcma)4O>fgc5cO_iCn@XHrbIMtgIX|ErQ+g5sVPE0r3TawscBJ~GoeYilmk*g+>#&A z1NGh!@(l^0Vv8FGq~^#WSN;V;xikmDOxLDq_*{83J8yPp-#kz2khDIM!#$e#`mUwC zk-iX}Kck!cNX_ytEybgfB=uqO?J0vdBCnex0l)%}$r$WM!N$R6z`g^P1dq9?z$11p z*dvbX!cd%nSRKMHLwp5nUf>6%G`j{{6Ko9Z{q`zx=w9MwyZKM{vA4|xT+zVrb!3bl zSI9UG7&68f*Y6l(mm=HmBjf3T7`q>093Dk~@KF89{yZE-_TI=Ujn4)(gv_kNHi;cCRS8}KNclJ?xNI0hsA%X zKe@%*s--MJ!jpL~z4n)zq57iSnVWtuwMJEflck?NI>%p(e`Yv#q445r3Yt>0%2h~| zB)>PQP;a_Gm;y0MdrEm`-!-VC6;5Oe$4k`Ewiuo}qh(j?uptVDjB~+w_Fl?Q&VGxy zbJVd4>>_}d2A=X8*1qgo)LCfoh7Fo5SiEa@c>B5~8*nb}ACGO2Kei&DwBjEx#-i>W z_!RzWe%W7MPehGceX&-p*6U`zYVVqPJC`$;vX!i9=j}?a{^-Wd%5KenvdM|Np7b7M bB7C%bi@(}=%Ac3-!u~PO?A-T1lsCu^sE3AL delta 1088 zcma)4%}*0S6z@#C+XCA!z)(KqvoytEC=F3kDXg$dDIrj0B_^$j7ZOd7D3+ub!~OwY z+~?5)sqv-;x(6?sl;FXGi5xv@qVZ}B9^hboZ?}!rL~)Ye%)Ia4do%h=rth$wHQo>_ zhCV*8yl2g@$roYYISPkd^N0?Iqk;>9?l9z?+pAJl(NsOj7{q%A!i@+cexQy(%a3w5 z!j^vRjdi-Vx;uIFz#UghFWm;w5Tz=@s6Nvd{^kU| zO9r`1Hp|mGGv!E`LGO@k#Pe(fHsf0?2H)cqVE_X?=Fy0o7l&QNb1tR=OH4`emE{aW zlRC4Uf#A>>lrPAS%L!JR&>8q9WYCkc(IporMUa&&WVJzhatCy4XW>f3&lv0}Qy{Av zyixq%UpWnZycHg*!%pU4a4(zmSpF2UmmUXwb{q<`5`=jGzGVBFX4FLP^NS~+UOmbg zsrBa3^Eq`rzq)aI weldJotCount) - //{ - // newNode.Text = "" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + ""; - //} - //else - //{ - // newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】"; - //} - newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】"; - newNode.NodeID = item.PipelineId; - newNode.EnableClickEvent = true; - e.Node.Nodes.Add(newNode); + var pipeline = (from x in PipelineService.hJGL_Pipelines + where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == e.Node.NodeID + && x.PipelineCode.Contains(this.tvPipeCode.Text.Trim()) + orderby x.PipelineCode + select x).ToList(); + foreach (var item in pipeline) + { + var jotCount = (from x in WeldJointService.hJGL_WeldJoints where x.PipelineId == item.PipelineId && x.IsTwoJoint == null select x).Count(); + //var weldJotCount = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == item.PipelineId && x.IsTwoJoint == null && x.WeldingDailyId != null select x).Count(); + TreeNode newNode = new TreeNode(); + //if (jotCount > weldJotCount) + //{ + // newNode.Text = "" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + ""; + //} + //else + //{ + // newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】"; + //} + newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】"; + newNode.NodeID = item.PipelineId; + newNode.EnableClickEvent = true; + e.Node.Nodes.Add(newNode); + } } + } + } @@ -215,8 +220,8 @@ namespace FineUIPro.Web.HJGL.DataImport if (tvControlItem.SelectedNode.CommandName== "单位工程") { this.hdUnitWorkId.Text=tvControlItem.SelectedNode.NodeID.ToString(); - this.BindGrid1("", this.hdUnitWorkId.Text); - this.BindGrid2("", this.hdUnitWorkId.Text); + //this.BindGrid1("", this.hdUnitWorkId.Text); + //this.BindGrid2("", this.hdUnitWorkId.Text); } else diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineMatIn.aspx b/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineMatIn.aspx index 3d5a3fb2..126cb30c 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineMatIn.aspx +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineMatIn.aspx @@ -55,7 +55,7 @@ EnableCollapse="false" runat="server" BoxFlex="1" DataKeyNames="DesignBasisDataImportId" AllowColumnLocking="true" EnableColumnLines="true" DataIDField="DesignBasisDataImportId" AllowSorting="true" SortField="CreateDate" SortDirection="ASC" EnableMultiSelect="false" - IsDatabasePaging="false" PageSize="15" > + IsDatabasePaging="false" AllowPaging="true" PageSize="300" EnableBigDataRowTip="false" EnableBigData="true"> diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineMatIn.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineMatIn.aspx.cs index 79cac443..da78c97d 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineMatIn.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineMatIn.aspx.cs @@ -141,6 +141,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage private Model.ResponeData AddDatasetToSQL(DataTable pds, int Cols) { Model.ResponeData responeData = new Model.ResponeData(); + List result = new List(); int ic, ir; ic = pds.Columns.Count; @@ -167,27 +168,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage string unitworkId = string.Empty; unitworkId = Request.Params["UnitWorkId"]; string PipeArea=string.Empty;//管线划分 1工厂预制 2现场施工 - //if (dv[i]["主项编号"] != null && !string.IsNullOrEmpty(dv[i]["主项编号"].ToString())) - //{ - // var unitWork = from x in Funs.DB.WBS_UnitWork where x.ProjectId == CurrUser.LoginProjectId && x.UnitWorkCode == dv[i]["主项编号"].ToString() && x.ProjectType == "2" select x; - // if (unitWork.Count() > 0) - // { - // unitworkId = unitWork.First().UnitWorkId; - // } - // else - // { - // errorInfos += (i + 2) + "Line, [主项编号] 不存在
"; - // } - - //} - //else - //{ - // errorInfos += (i + 2) + "Line, [主项编号] 不能为空
"; - //} if (dv[i]["管线号"] != null && !string.IsNullOrEmpty(dv[i]["管线号"].ToString())) { - var pipeline = from x in Funs.DB.HJGL_Pipeline where x.UnitWorkId == unitworkId && x.PipelineCode == dv[i]["管线号"].ToString() select x; + var pipeline = from x in PipelineService.hJGL_Pipelines where x.UnitWorkId == unitworkId && x.PipelineCode == dv[i]["管线号"].ToString().Trim() select x; if (pipeline.Count() > 0) { item.PipelineId = pipeline.First().PipelineId; @@ -195,13 +179,17 @@ namespace FineUIPro.Web.HJGL.WeldingManage } else { - errorInfos += (i + 2) + "Line,"+ dv[i]["管线号"].ToString() + " [管线号] 不存在
"; + // errorInfos += (i + 2) + "Line,"+ dv[i]["管线号"].ToString() + " [管线号] 不存在
"; + result.Add("不存在此管线号-" + dv[i]["管线号"].ToString()); + + } } else { - errorInfos += (i + 2) + "Line, [管线号] 不能为空
"; + //errorInfos += (i + 2) + "Line, [管线号] 不能为空
"; + result.Add((i + 2) + "Line, [管线号] 不能为空
"); } //if (dv[i]["管线划分"] != null && !string.IsNullOrEmpty(dv[i]["管线划分"].ToString())) //{ @@ -240,13 +228,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage } else { - errorInfos += (i + 2) + "Line," + dv[i]["材料编码"].ToString() + " [材料编码] 不存在
"; + //errorInfos += (i + 2) + "Line," + dv[i]["材料编码"].ToString() + " [材料编码] 不存在
"; + result.Add("不存在此材料编码-" + dv[i]["材料编码"].ToString()); + } } else { - errorInfos += (i + 2) + "Line, [材料编码] 不能为空
"; + //errorInfos += (i + 2) + "Line, [材料编码] 不能为空
"; + result.Add((i + 2) + "Line, [材料编码] 不能为空
"); } if (dv[i]["数量"] != null && !string.IsNullOrEmpty(dv[i]["数量"].ToString())) @@ -258,13 +249,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage } catch (Exception) { - errorInfos += "第" + (i + 2).ToString() + "行," + "数量格式输入有误
"; + //errorInfos += "第" + (i + 2).ToString() + "行," + "数量格式输入有误
"; + result.Add("第" + (i + 2).ToString() + "行," + "数量格式输入有误
"); } } else { - errorInfos += (i + 2) + "Line, [数量] 不能为空
"; + //errorInfos += (i + 2) + "Line, [数量] 不能为空
"; + result.Add((i + 2) + "Line, [数量] 不能为空
"); } if (PipeArea=="1") @@ -276,7 +269,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage } else { - errorInfos += (i + 2) + "Line, [预制组件] 不能为空
"; + result.Add((i + 2) + "Line, [预制组件] 不能为空
"); } } var model = matList.Where(x => x.PipelineId == item.PipelineId && x.MaterialCode == item.MaterialCode && x.PrefabricatedComponents == item.PrefabricatedComponents); @@ -320,12 +313,18 @@ namespace FineUIPro.Web.HJGL.WeldingManage responeData.message = "没有数据"; } - - if (!string.IsNullOrEmpty(errorInfos)) - { + if (result.Count > 0) + { + // 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; } + return responeData; } #endregion