From a8b2ae27c319ef2f26edb01d31f16b5ba92b6981 Mon Sep 17 00:00:00 2001 From: fly-l <1420031550@qq.com> Date: Fri, 7 Jul 2023 16:19:46 +0800 Subject: [PATCH] 2023-07-07 --- .vs/SGGL_SeDin/v17/.wsuo | Bin 253440 -> 253952 bytes .../ZHGL/Plan/ActionPlanListEdit.aspx | 4 +- .../ZHGL/Plan/ActionPlanListEdit.aspx.cs | 2 +- .../DataIn/PDMS输出(设计)数据模板.xlsx | Bin 9984 -> 10004 bytes .../WeldingManage/PipelineListPDMSIn.aspx.cs | 918 ++++-------------- .../HJGL/WeldingManage/WeldJointEdit.aspx | 15 +- .../HJGL/WeldingManage/WeldJointEdit.aspx.cs | 2 +- .../WeldJointEdit.aspx.designer.cs | 18 +- .../HJGL/WeldingManage/WeldJointList.aspx.cs | 32 +- 9 files changed, 227 insertions(+), 764 deletions(-) diff --git a/.vs/SGGL_SeDin/v17/.wsuo b/.vs/SGGL_SeDin/v17/.wsuo index 5b8815fa60549d31d0c8ceefabf12c1434b07aa3..1488becbdd403d6db5eb7fb70ef7fe11c6bc2800 100644 GIT binary patch delta 1785 zcmeIy%TH556bInW+yVt}TONg0C{P|T1gW%8N|AyXFflwr7o;M-01Lhqu^>JnF&Y;v zq(j7&F^v+Igf3uVB9Vn*BP!lxj;tV*daq`7+aUXYRc{XXcK) z){e|;pSThW6$(Wv>=lQVX@TUNapvRAtU%=P+{C(v&(!_XA6Tv!;P2HeK0Ngonn=+W z3a|9C#eg6M_Jn&Gy&BRW31|^r-yiNbG1i2~6sNWowmH_NH<)lS5AvY^_5m#teM*Dt z3sWe}2poV?uz(fHpd4&a0d}Ya2UNj9s0Jt0KrI{sv60k1?8e|2w8L@efD>>MPQht7 z1D((X-EbB>&;z}24$i{`xCocvGF*YHa1Hw4I`qR0@WKH7pFs?6!Vuho+i(Z&!acYT z!!QDo>Le%sqdEywN2oefnG~Q*C!(jy(3o06cuZBJBx})ArKlqGo7&b`S5~$O!QHAt z6Lhq7{+C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=yN zjwkUHp2jnH7F+QgI^CI_yLFUBYwiq_+=hHzv4IijwAR3e?oq8^yL__&?jAfbiD3LfBye7_#d6Ygy0PN zoRuc|mqSjp+*bk~XQ6S5oa!;*4NLYmmiXk}H~Aju(rn!3#C<{JCn^ HVWavt{z|Y- diff --git a/SGGL/FineUIPro.Mobile/ZHGL/Plan/ActionPlanListEdit.aspx b/SGGL/FineUIPro.Mobile/ZHGL/Plan/ActionPlanListEdit.aspx index 92649606..023c48e7 100644 --- a/SGGL/FineUIPro.Mobile/ZHGL/Plan/ActionPlanListEdit.aspx +++ b/SGGL/FineUIPro.Mobile/ZHGL/Plan/ActionPlanListEdit.aspx @@ -1,5 +1,6 @@ <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ActionPlanListEdit.aspx.cs" Inherits="FineUIPro.Mobile.ZHGL.Plan.ActionPlanListEdit" %> + @@ -159,7 +160,7 @@ BodyPadding="10px" EnableCollapse="true" ShowHeader="true" AutoScroll="true" runat="server"> + DataKeyNames="ActionPlanListApproveId" EnableColumnLines="true" OnRowCommand="gvApprove_RowCommand"> - diff --git a/SGGL/FineUIPro.Mobile/ZHGL/Plan/ActionPlanListEdit.aspx.cs b/SGGL/FineUIPro.Mobile/ZHGL/Plan/ActionPlanListEdit.aspx.cs index f17ac9b4..fbafeb10 100644 --- a/SGGL/FineUIPro.Mobile/ZHGL/Plan/ActionPlanListEdit.aspx.cs +++ b/SGGL/FineUIPro.Mobile/ZHGL/Plan/ActionPlanListEdit.aspx.cs @@ -8,7 +8,7 @@ using System.Web.UI.WebControls; namespace FineUIPro.Mobile.ZHGL.Plan { - public partial class ActionPlanListEdit : PageBase + public partial class ActionPlanListEdit : PageBaseMobile { #region 定义项 /// diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/PDMS输出(设计)数据模板.xlsx b/SGGL/FineUIPro.Web/File/Excel/DataIn/PDMS输出(设计)数据模板.xlsx index e16a45be00ba6ac44144691990a7027d803fec50..c27db7a7ebaa39dad647a4c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WR{tSeY>~^8i2q)?b4p0#Mj`rf5dY5|m)TxtO&p@N_N$-|O{8 z=FkI_^k!QHBLhXz)=_7A=lQUs>H6g8$g$9Jp`+kSuAZmQDzofx7bWb1_E99NI(mUZ-_w_`!bU6Y>llZr;q!*cJG zJ{6RwYZR=DDE%D2n(D5$GymZcU7ortY`JnOUhH6G{!Tg%uOi`~Dw41@wai5# z1H23PKkwwQ7>Z#W4;Pmc{I3W@004nst^aK-5WFx1ia!wJ#6K2?GRAY_3pjcIP4Dw@ zp81Un!*7cV!~Xvk{I0|BQWBD|e+m6Xwd1dQaqf5VR}_f%k+{luZ~Excel文件路径名 private void ImportXlsToData(string fileName) { - //支持.xls和.xlsx,即包括office2010等版本的 HDR=Yes代表第一行是标题,不是数据; try { - //string oleDBConnString = String.Empty; - //oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; - //oleDBConnString += "Data Source="; - //oleDBConnString += fileName; - //oleDBConnString += ";Extended Properties=Excel 8.0;"; - //OleDbConnection oleDBConn = null; - //OleDbDataAdapter oleAdMaster = null; - //DataTable m_tableName = new DataTable(); - //DataSet ds = new DataSet(); - - //oleDBConn = new OleDbConnection(oleDBConnString); - //oleDBConn.Open(); - //m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); - - //if (m_tableName != null && m_tableName.Rows.Count > 0) - //{ - // m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim(); - //} - //string sqlMaster; - //sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; - //oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); - //oleAdMaster.Fill(ds, "m_tableName"); - //oleAdMaster.Dispose(); - //oleDBConn.Close(); - //oleDBConn.Dispose(); var ds = MiniExcel.Query(fileName).ToList(); var columns = MiniExcel.GetColumns(fileName); var cnt = columns.Count; @@ -214,14 +187,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage { ErrLogInfo.WriteLog("焊接基础数据上传失败!", exc); - //return null; - // return dt; + } - //finally - //{ - // conn.Close(); - // conn.Dispose(); - //} } #endregion @@ -234,524 +201,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 数据集 /// 数据集行数 /// - private Model.ResponeData AddDatasetToSQL(DataTable pds, int Cols) - { - Model.ResponeData responeData = new Model.ResponeData(); - string result = string.Empty; - int ic, ir; - //pds = BLL.Funs.FilterBlankLines(pds); - ic = pds.Columns.Count; - ir = pds.Rows.Count; - if (ic < Cols) - { - responeData.code = 0; - responeData.message = "导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列"; - return responeData; - - //ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning); - //return false; - } - if (pds != null && ir > 0) - { - var getPipeline = from x in Funs.DB.View_HJGL_WeldJoint where x.ProjectId == this.CurrUser.LoginProjectId select x; - var getMedium = from x in Funs.DB.Base_Medium where x.ProjectId == this.CurrUser.LoginProjectId select x;//介质 - var getPipeLineClass = from x in Funs.DB.Base_PipingClass where x.ProjectId == this.CurrUser.LoginProjectId select x;//管道等级 - var getDetectionRate = from x in Funs.DB.Base_DetectionRate select x;//探伤比例 - var getDetectionType = from x in Funs.DB.Base_DetectionType select x;//探伤类型 - var getPressurePipingClass = from x in Funs.DB.Base_PressurePipingClass select x;//压力管道级别 - var getTestMedium = from x in Funs.DB.Base_TestMedium where x.TestType == "1" select x;//压力试验介质 - var getLeakMedium = from x in Funs.DB.Base_TestMedium where x.TestType == "2" select x;//泄露性试验介质 - var getPurgeMethod = from x in Funs.DB.Base_PurgeMethod select x; - var getMaterial = from x in Funs.DB.Base_Material select x; - var getWeldType = from x in Funs.DB.Base_WeldType select x; - //var getComponents = from x in Funs.DB.Base_Components where x.ProjeceId == this.CurrUser.LoginProjectId select x; - - - for (int i = 0; i < ir; i++) - { - Model.View_HJGL_WeldJoint pipeline = new Model.View_HJGL_WeldJoint(); - //pipeline.PipelineId = SQLHelper.GetNewID(); - Model.WBS_UnitWork unitWork = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(Request.Params["UnitWorkId"]); - if (unitWork != null) - { - pipeline.UnitWorkId = Request.Params["UnitWorkId"]; - pipeline.UnitId = unitWork.UnitId; - } - - string col0 = pds.Rows[i][0].ToString(); - string pipeLineId = string.Empty; - if (string.IsNullOrEmpty(col0)) - { - result += "第" + (i + 2).ToString() + "行," + "管线号" + "," + "此项为必填项!" + "|"; - } - else - { - pipeline.PipelineCode = col0; - } - - pipeline.SingleNumber = pds.Rows[i][1].ToString(); - pipeline.SingleName = pds.Rows[i][2].ToString(); - - string col3 = pds.Rows[i][3].ToString(); - if (string.IsNullOrEmpty(col3)) - { - result += "第" + (i + 2).ToString() + "行," + "介质名称" + "," + "此项为必填项!" + "|"; - } - else - { - var Medium = getMedium.FirstOrDefault(x => x.MediumName == col3); - if (Medium == null) - { - result += "第" + (i + 2).ToString() + "行," + "该介质不存在!" + "|"; - } - else - { - pipeline.MediumId = Medium.MediumId; - pipeline.MediumName = col3; - } - } - string col4 = pds.Rows[i][4].ToString(); - if (string.IsNullOrEmpty(col4)) - { - result += "第" + (i + 2).ToString() + "行," + "管道等级" + "," + "此项为必填项!" + "|"; - } - else - { - var PipeLineClass = getPipeLineClass.FirstOrDefault(x => x.PipingClassCode == col4); - if (PipeLineClass == null) - { - result += "第" + (i + 2).ToString() + "行," + "该管道等级不存在!" + "|"; - } - else - { - pipeline.PipingClassId = PipeLineClass.PipingClassId; - pipeline.PipingClassCode = col4; - } - } - string col5 = pds.Rows[i][5].ToString(); - if (!string.IsNullOrEmpty(col5)) - { - var DetectionRate = getDetectionRate.FirstOrDefault(x => x.DetectionRateValue.ToString() == col5.Replace("%", "") || x.DetectionRateCode == col5); - if (DetectionRate == null) - { - result += "第" + (i + 2).ToString() + "行," + "该探伤比例不存在!" + "|"; - } - else - { - pipeline.DetectionRateId = DetectionRate.DetectionRateId; - pipeline.DetectionRateCode = col5; - } - } - else - { - result += "第" + (i + 2).ToString() + "行," + "探伤比例" + "," + "此项为必填项!" + "|"; - } - - string col6 = pds.Rows[i][6].ToString(); - if (!string.IsNullOrEmpty(col6)) - { - string[] types = col6.ToString().Split(','); - foreach (string t in types) - { - var type = getDetectionType.FirstOrDefault(x => x.DetectionTypeCode == t); - if (type == null) - { - result += "第" + (i + 2).ToString() + "行," + "探伤类型【" + t + "】不存在!" + "|"; - } - else - { - pipeline.DetectionType += type.DetectionTypeId + "|"; - } - } - if (!string.IsNullOrEmpty(pipeline.DetectionType)) - { - pipeline.DetectionType = pipeline.DetectionType.Substring(0, pipeline.DetectionType.Length - 1); - pipeline.DetectionTypeStr = col6; - } - - } - else - { - result += "第" + (i + 2).ToString() + "行," + "探伤类型" + "," + "此项为必填项!" + "|"; - } - - string col7 = pds.Rows[i][7].ToString(); - if (!string.IsNullOrEmpty(col7)) - { - pipeline.DesignTemperature = col7; - } - string col8 = pds.Rows[i][8].ToString(); - if (!string.IsNullOrEmpty(col8)) - { - pipeline.DesignPress = col8; - } - string col9 = pds.Rows[i][9].ToString(); - if (!string.IsNullOrEmpty(col9)) - { - var TestMedium = getTestMedium.FirstOrDefault(x => x.MediumName == col9); - if (TestMedium == null) - { - result += "第" + (i + 2).ToString() + "行," + "该压力试验介质不存在!" + "|"; - } - else - { - pipeline.TestMedium = TestMedium.TestMediumId; - pipeline.TestMediumName = col9; - } - } - string col10 = pds.Rows[i][10].ToString(); - if (!string.IsNullOrEmpty(col10)) - { - pipeline.TestPressure = col10; - } - string col11 = pds.Rows[i][11].ToString(); - if (!string.IsNullOrEmpty(col11)) - { - var PressurePipingClass = getPressurePipingClass.FirstOrDefault(x => x.PressurePipingClassCode == col11); - if (PressurePipingClass == null) - { - result += "第" + (i + 2).ToString() + "行," + "该压力管道级别不存在!" + "|"; - } - else - { - pipeline.PressurePipingClassId = PressurePipingClass.PressurePipingClassId; - pipeline.PressurePipingClassCode = col11; - } - } - string col12 = pds.Rows[i][12].ToString(); - if (!string.IsNullOrEmpty(col12)) - { - try - { - var PipeLenth = Funs.GetNewDecimal(col12); - pipeline.PipeLenth = PipeLenth; - } - catch (Exception) - { - result += "第" + (i + 2).ToString() + "行," + "管线长度(m)格式输入有误" + "|"; - } - } - string col13 = pds.Rows[i][13].ToString(); - if (!string.IsNullOrEmpty(col13)) - { - var LeakMedium = getLeakMedium.FirstOrDefault(x => x.MediumName == col13); - if (LeakMedium == null) - { - result += "第" + (i + 2).ToString() + "行," + "该泄露试验介质不存在!" + "|"; - } - else - { - pipeline.LeakMedium = LeakMedium.TestMediumId; - pipeline.LeakMediumName = col13; - } - } - string col14 = pds.Rows[i][14].ToString(); - if (!string.IsNullOrEmpty(col14)) - { - pipeline.LeakPressure = col14; - } - string col15 = pds.Rows[i][15].ToString(); - if (!string.IsNullOrEmpty(col15)) - { - var PurgeMethod = getPurgeMethod.FirstOrDefault(x => x.PurgeMethodCode == col15); - if (PurgeMethod == null) - { - result += "第" + (i + 2).ToString() + "行," + "该吹洗要求不存在!" + "|"; - } - else - { - pipeline.PCMedium = PurgeMethod.PurgeMethodId; - pipeline.PurgeMethodCode = col15; - - } - } - string col16 = pds.Rows[i][16].ToString(); - if (!string.IsNullOrEmpty(col16)) - { - pipeline.VacuumPressure = col16; - } - string col17 = pds.Rows[i][17].ToString(); - if (!string.IsNullOrEmpty(col17)) - { - var material = getMaterial.FirstOrDefault(x => x.MaterialCode == col17); - if (material == null) - { - result += "第" + (i + 2).ToString() + "行," + "该材质不存在!" + "|"; - } - else - { - pipeline.MaterialId = material.MaterialId; - pipeline.PipeMaterialCode = col17; - } - } - pipeline.Remark = pds.Rows[i][18].ToString(); - - // 以下是焊口信息 - string col19 = pds.Rows[i][19].ToString(); - if (string.IsNullOrEmpty(col19)) - { - result += "第" + (i + 2).ToString() + "行," + "焊口号" + "," + "此项为必填项!" + "|"; - } - else - { - //var oldWeldJoint = getPipeline.FirstOrDefault(x => x.PipelineId == pipeLineId && x.WeldJointCode == col19); - //if (oldWeldJoint != null) - //{ - // pipeline.WeldJointId = oldWeldJoint.WeldJointId; - //} - //else - //{ - // pipeline.WeldJointId = SQLHelper.GetNewID(); - //} - pipeline.WeldJointCode = col19; - } - - string col20 = pds.Rows[i][20].ToString(); - if (!string.IsNullOrEmpty(col20)) - { - var material = getMaterial.FirstOrDefault(x => x.MaterialCode == col20); - if (material == null) - { - result += "第" + (i + 2).ToString() + "行," + "该材质1不存在!" + "|"; - } - else - { - pipeline.Material1Id = material.MaterialId; - pipeline.Material1Code = col20; - } - } - else - { - result += "第" + (i + 2).ToString() + "行," + "材质1" + "," + "此项为必填项!" + "|"; - } - - string col21 = pds.Rows[i][21].ToString(); - if (!string.IsNullOrEmpty(col21)) - { - var material = getMaterial.FirstOrDefault(x => x.MaterialCode == col21); - if (material == null) - { - result += "第" + (i + 2).ToString() + "行," + "该材质2不存在!" + "|"; - } - else - { - pipeline.Material2Id = material.MaterialId; - pipeline.Material2Code = col21; - } - } - else - { - result += "第" + (i + 2).ToString() + "行," + "材质2" + "," + "此项为必填项!" + "|"; - } - - string col22 = pds.Rows[i][22].ToString().Replace("Φ", ""); - string col27 = pds.Rows[i][22].ToString(); - if (rbDiaType.SelectedValue=="1") - { - if (!string.IsNullOrEmpty(col27)) - { - try - { - decimal Dia = Convert.ToDecimal(col27); - pipeline.Dia = Dia; - - //var inch = BLL.Base_DNCompareService.GetSizeByDia(Dia); - //if (inch != null) - //{ - // pipeline.Size = inch; - //} - } - catch (Exception) - { - result += "第" + (i + 2).ToString() + "行," + "外径格式输入有误" + "|"; - } - } - else - { - result += "第" + (i + 2).ToString() + "行," + "外径" + "," + "此项为必填项!" + "|"; - } - } - else - { - if (!string.IsNullOrEmpty(col22)) - { - pipeline.DNDia = col22; - - } - else - { - result += "第" + (i + 2).ToString() + "行," + "DN公称直径" + "," + "此项为必填项!" + "|"; - } - - } - - - string col23 = pds.Rows[i][23].ToString(); - if (!string.IsNullOrEmpty(col23)) - { - try - { - decimal Size = Convert.ToDecimal(col23); - pipeline.Size = Size; - } - catch (Exception) - { - result += "第" + (i + 2).ToString() + "行," + "达因格式输入有误" + "|"; - } - } - else - { - result += "第" + (i + 2).ToString() + "行," + "达因" + "," + "此项为必填项!" + "|"; - } - - string col24 = pds.Rows[i][24].ToString(); - if (!string.IsNullOrEmpty(col24)) - { - try - { - var Thickness = Convert.ToDecimal(col24); - pipeline.Thickness = Thickness; - //是否根据壁厚计算达因 - //Model.Project_Sys_Set thicknessSet = BLL.Project_SysSetService.GetSysSetBySetId("7", this.CurrUser.LoginProjectId); - //if (thicknessSet != null && thicknessSet.IsAuto == true) - //{ - // if (pipeline.Size != null) - // { - // pipeline.Size = Convert.ToDecimal(BLL.WeldJointService.GetSizeByThickness(pipeline.Size, Thickness)); - // } - //} - } - catch (Exception) - { - result += "第" + (i + 2).ToString() + "行," + "壁厚格式输入有误" + "|"; - } - } - else - { - result += "第" + (i + 2).ToString() + "行," + "壁厚" + "," + "此项为必填项!" + "|"; - } - if (rbDiaType.SelectedValue=="1") - { - pipeline.Specification = "Φ" + (pipeline.Dia ?? 0).ToString() + "*" + (pipeline.Thickness ?? 0).ToString(); - - } - else - { - pipeline.Specification = pipeline.DNDia + "*" + (pipeline.Thickness ?? 0).ToString(); - - } - - string col25 = pds.Rows[i][25].ToString(); - if (!string.IsNullOrEmpty(col25)) - { - var weldType = getWeldType.FirstOrDefault(x => x.WeldTypeCode == col25); - if (weldType == null) - { - result += "第" + (i + 2).ToString() + "行," + "该焊缝类型不存在!" + "|"; - } - else - { - pipeline.WeldTypeId = weldType.WeldTypeId; - pipeline.WeldTypeCode = col25; - - if (col25.Contains("B")) - { - if (col6.Contains("RT")) - { - Model.Base_DetectionType rt = BLL.Base_DetectionTypeService.GetDetectionTypeIdByDetectionTypeCode("RT"); - if (rt != null) - { - pipeline.DetectionTypeId = rt.DetectionTypeId; - } - } - else - { - Model.Base_DetectionType ut = BLL.Base_DetectionTypeService.GetDetectionTypeIdByDetectionTypeCode("UT"); - if (ut != null) - { - pipeline.DetectionTypeId = ut.DetectionTypeId; - } - } - } - else - { - if (col6.Contains("MT")) - { - Model.Base_DetectionType mt = BLL.Base_DetectionTypeService.GetDetectionTypeIdByDetectionTypeCode("MT"); - if (mt != null) - { - pipeline.DetectionTypeId = mt.DetectionTypeId; - } - } - else - { - Model.Base_DetectionType pt = BLL.Base_DetectionTypeService.GetDetectionTypeIdByDetectionTypeCode("PT"); - if (pt != null) - { - pipeline.DetectionTypeId = pt.DetectionTypeId; - } - } - } - } - } - else - { - result += "第" + (i + 2).ToString() + "行," + "焊缝类型" + "," + "此项为必填项!" + "|"; - } - string col26 = pds.Rows[i][26].ToString(); - if (!string.IsNullOrEmpty(col26)) - { - var JointAttribute = BLL.DropListService.HJGL_JointAttribute(); - - var q = JointAttribute.Where(x => x.Value == col26); - if (q==null ) - { - result += "第" + (i + 2).ToString() + "行," + "该焊口属性不存在!" + "|"; - - } - else - { - pipeline.JointAttribute = col26; - } - - } - else - { - result += "第" + (i + 2).ToString() + "行," + "焊口属性" + "," + "此项为必填项!" + "|"; - - } - - if (!string.IsNullOrEmpty(pipeline.PipelineCode) && !string.IsNullOrEmpty(pipeline.WeldJointCode)) - { - pipeline.ProjectId = this.CurrUser.LoginProjectId; - PipelineList.Add(pipeline); - } - - } - if (!string.IsNullOrEmpty(result)) - { - PipelineList.Clear(); - result = result.Substring(0, result.LastIndexOf("|")); - errorInfos = result; - responeData.code = 0; - responeData.message = errorInfos; - } - else - { - errorInfos = string.Empty; - - //ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success); - - } - } - else - { - responeData.code = 0; - responeData.message = "导入数据为空!"; - //ShowNotify("导入数据为空!", MessageBoxIcon.Warning); - } - return responeData; - } private Model.ResponeData AddDatasetToSQL(List pds, int count) { Model.ResponeData responeData = new Model.ResponeData(); @@ -1261,12 +710,21 @@ namespace FineUIPro.Web.HJGL.WeldingManage result.Add("第" + (i + 1).ToString() + "行," + "焊口属性" + "," + "此项为必填项!" + "|"); } + string col28 = Convert.ToString(pds[i].AD); + if (!string.IsNullOrEmpty(col28)) + { + if (col28.Trim() == "是") + { + pipeline.IsHotProess = true; + } + } if (!string.IsNullOrEmpty(pipeline.PipelineCode) && !string.IsNullOrEmpty(pipeline.WeldJointCode)) { pipeline.ProjectId = this.CurrUser.LoginProjectId; PipelineList.Add(pipeline); } + } if (result.Count > 0) @@ -1443,6 +901,186 @@ namespace FineUIPro.Web.HJGL.WeldingManage addHJGL_WeldJoints(PipelineList, unitworkId); } + void addPipelines(List PipelineList, string UnitWorkId) + { + // var getPipeline = from x in Funs.DB.View_HJGL_WeldJoint where x.UnitWorkId == UnitWorkId select x; + var pipelines = (from x in PipelineList + select new Model.HJGL_Pipeline + { + PipelineId = x.PipelineId, + ProjectId = this.CurrUser.LoginProjectId, + UnitId = x.UnitId, + UnitWorkId = x.UnitWorkId, + PipelineCode = x.PipelineCode, + SingleName = x.SingleName, + SingleNumber = x.SingleNumber, + MediumId = x.MediumId, + PipingClassId = x.PipingClassId, + DetectionRateId = x.DetectionRateId, + DetectionType = x.DetectionType, + DesignPress = x.DesignPress, + DesignTemperature = x.DesignTemperature, + TestMedium = x.TestMedium, + TestPressure = x.TestPressure, + PressurePipingClassId = x.PressurePipingClassId, + PipeLenth = x.PipeLenth, + LeakMedium = x.LeakMedium, + LeakPressure = x.LeakPressure, + VacuumPressure = x.VacuumPressure, + PCMedium = x.PCMedium, + MaterialId = x.MaterialId, + Remark = x.Remark, + FlowingSection = x.FlowingSection + }).DistinctBy(temp => new + { + temp.PipelineId, + temp.ProjectId, + temp.UnitId, + temp.UnitWorkId, + temp.PipelineCode, + temp.SingleName, + temp.SingleNumber, + temp.MediumId, + temp.PipingClassId, + temp.DetectionRateId, + temp.DetectionType, + temp.DesignPress, + temp.DesignTemperature, + temp.TestMedium, + temp.TestPressure, + temp.PressurePipingClassId, + temp.PipeLenth, + temp.LeakMedium, + temp.LeakPressure, + temp.VacuumPressure, + temp.PCMedium, + temp.MaterialId, + temp.Remark, + temp.FlowingSection + }).ToList(); + for (int i = 0; i < pipelines.Count(); i++) + { + Model.HJGL_Pipeline pipeline = new Model.HJGL_Pipeline(); + pipeline.PipelineId = pipelines[i].PipelineId; + pipeline.ProjectId = this.CurrUser.LoginProjectId; + pipeline.UnitId = pipelines[i].UnitId; + pipeline.UnitWorkId = pipelines[i].UnitWorkId; + pipeline.PipelineCode = pipelines[i].PipelineCode; + pipeline.SingleName = pipelines[i].SingleName; + pipeline.SingleNumber = pipelines[i].SingleNumber; + pipeline.MediumId = pipelines[i].MediumId; + pipeline.PipingClassId = pipelines[i].PipingClassId; + pipeline.DetectionRateId = pipelines[i].DetectionRateId; + pipeline.DetectionType = pipelines[i].DetectionType; + pipeline.DesignPress = pipelines[i].DesignPress; + pipeline.DesignTemperature = pipelines[i].DesignTemperature; + pipeline.TestMedium = pipelines[i].TestMedium; + pipeline.TestPressure = pipelines[i].TestPressure; + pipeline.PressurePipingClassId = pipelines[i].PressurePipingClassId; + pipeline.PipeLenth = pipelines[i].PipeLenth; + pipeline.LeakMedium = pipelines[i].LeakMedium; + pipeline.LeakPressure = pipelines[i].LeakPressure; + pipeline.VacuumPressure = pipelines[i].VacuumPressure; + pipeline.PCMedium = pipelines[i].PCMedium; + pipeline.MaterialId = pipelines[i].MaterialId; + pipeline.Remark = pipelines[i].Remark; + pipeline.FlowingSection = pipelines[i].FlowingSection; + + var isExistPipelineCode = PipelineService.GetPipelineByCode(pipeline.PipelineCode, pipeline.UnitWorkId); + if (isExistPipelineCode != null) // 更新管线 + { + pipeline.PipelineId = isExistPipelineCode.PipelineId; + BLL.PipelineService.UpdatePipeline(pipeline); + } + else // 增加管线 + { + pipeline.PipelineId = SQLHelper.GetNewID(); + BLL.PipelineService.AddPipeline(pipeline); + } + } + + + } + void addHJGL_WeldJoints(List PipelineList, string UnitWorkId) + { + var getpipelines = from y in Funs.DB.HJGL_Pipeline where y.UnitWorkId == UnitWorkId select y; + List weldJoints_add = new List(); + + var weldJoints = (from x in PipelineList + select new Model.HJGL_WeldJoint + { + WeldJointCode = x.WeldJointCode, + PipelineCode = x.PipelineCode, + Material1Id = x.Material1Id, + Material2Id = x.Material2Id, + Dia = x.Dia, + DNDia = x.DNDia, + Size = x.Size, + Thickness = x.Thickness, + Specification = x.Specification, + WeldTypeId = x.WeldTypeId, + DetectionTypeId = x.DetectionTypeId, + JointAttribute = x.JointAttribute, + ProjectId = this.CurrUser.LoginProjectId, + IsHotProess = x.IsHotProess, + }).DistinctBy(temp => new + { + temp.WeldJointCode, + temp.PipelineCode, + temp.Material1Id, + temp.Material2Id, + temp.Dia, + temp.DNDia, + temp.Size, + temp.Thickness, + temp.Specification, + temp.WeldTypeId, + temp.DetectionTypeId, + temp.JointAttribute, + temp.ProjectId, + temp.IsHotProess + }).ToList(); + + for (int i = 0; i < weldJoints.Count(); i++) + { + Model.HJGL_WeldJoint weldJoint = new Model.HJGL_WeldJoint(); + weldJoint.PipelineId = getpipelines.Where(x => x.PipelineCode == weldJoints[i].PipelineCode).FirstOrDefault().PipelineId; + weldJoint.WeldJointCode = weldJoints[i].WeldJointCode; + weldJoint.PipelineCode = weldJoints[i].PipelineCode; + weldJoint.Material1Id = weldJoints[i].Material1Id; + weldJoint.Material2Id = weldJoints[i].Material2Id; + weldJoint.Dia = weldJoints[i].Dia; + weldJoint.DNDia = weldJoints[i].DNDia; + weldJoint.Size = weldJoints[i].Size; + weldJoint.Thickness = weldJoints[i].Thickness; + weldJoint.Specification = weldJoints[i].Specification; + weldJoint.WeldTypeId = weldJoints[i].WeldTypeId; + weldJoint.DetectionTypeId = weldJoints[i].DetectionTypeId; + weldJoint.JointAttribute = weldJoints[i].JointAttribute; + weldJoint.ProjectId = weldJoints[i].ProjectId; + weldJoint.IsHotProess = weldJoints[i].IsHotProess; + + var isExistJot = WeldJointService.GetWeldJointsByWeldJointCode(weldJoint.PipelineId, weldJoint.WeldJointCode); + if (isExistJot != null) // 更新焊口 + { + weldJoint.WeldJointId = isExistJot.WeldJointId; + BLL.WeldJointService.UpdateWeldJoint(weldJoint); + } + else // 增加焊口 + { + weldJoint.WeldJointId = SQLHelper.GetNewID(); + weldJoints_add.Add(weldJoint); + //BLL.WeldJointService.AddWeldJoint(weldJoint); + } + + } + if (weldJoints_add.Count > 0) + { + BLL.WeldJointService.AddBulkWeldJoint(weldJoints_add); + + } + } + //public void AddView_HJGL_WeldJoint(List PipelineList) //{ // string unitworkId = Request.Params["UnitWorkId"]; @@ -1530,182 +1168,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage //} #endregion - void addPipelines(List PipelineList, string UnitWorkId) - { - // var getPipeline = from x in Funs.DB.View_HJGL_WeldJoint where x.UnitWorkId == UnitWorkId select x; - var pipelines = (from x in PipelineList - select new Model.HJGL_Pipeline - { - PipelineId = x.PipelineId, - ProjectId = this.CurrUser.LoginProjectId, - UnitId = x.UnitId, - UnitWorkId = x.UnitWorkId, - PipelineCode = x.PipelineCode, - SingleName = x.SingleName, - SingleNumber = x.SingleNumber, - MediumId = x.MediumId, - PipingClassId = x.PipingClassId, - DetectionRateId = x.DetectionRateId, - DetectionType = x.DetectionType, - DesignPress = x.DesignPress, - DesignTemperature = x.DesignTemperature, - TestMedium = x.TestMedium, - TestPressure = x.TestPressure, - PressurePipingClassId = x.PressurePipingClassId, - PipeLenth = x.PipeLenth, - LeakMedium = x.LeakMedium, - LeakPressure = x.LeakPressure, - VacuumPressure = x.VacuumPressure, - PCMedium = x.PCMedium, - MaterialId = x.MaterialId, - Remark = x.Remark, - FlowingSection=x.FlowingSection - }).DistinctBy(temp => new - { - temp.PipelineId, - temp.ProjectId, - temp.UnitId, - temp.UnitWorkId, - temp.PipelineCode, - temp.SingleName, - temp.SingleNumber, - temp.MediumId, - temp.PipingClassId, - temp.DetectionRateId, - temp.DetectionType, - temp.DesignPress, - temp.DesignTemperature, - temp.TestMedium, - temp.TestPressure, - temp.PressurePipingClassId, - temp.PipeLenth, - temp.LeakMedium, - temp.LeakPressure, - temp.VacuumPressure, - temp.PCMedium, - temp.MaterialId, - temp.Remark, - temp.FlowingSection - }).ToList(); - for (int i = 0; i < pipelines.Count(); i++) - { - Model.HJGL_Pipeline pipeline = new Model.HJGL_Pipeline(); - pipeline.PipelineId = pipelines[i].PipelineId; - pipeline.ProjectId = this.CurrUser.LoginProjectId; - pipeline.UnitId = pipelines[i].UnitId; - pipeline.UnitWorkId = pipelines[i].UnitWorkId; - pipeline.PipelineCode = pipelines[i].PipelineCode; - pipeline.SingleName = pipelines[i].SingleName; - pipeline.SingleNumber = pipelines[i].SingleNumber; - pipeline.MediumId = pipelines[i].MediumId; - pipeline.PipingClassId = pipelines[i].PipingClassId; - pipeline.DetectionRateId = pipelines[i].DetectionRateId; - pipeline.DetectionType = pipelines[i].DetectionType; - pipeline.DesignPress = pipelines[i].DesignPress; - pipeline.DesignTemperature = pipelines[i].DesignTemperature; - pipeline.TestMedium = pipelines[i].TestMedium; - pipeline.TestPressure = pipelines[i].TestPressure; - pipeline.PressurePipingClassId = pipelines[i].PressurePipingClassId; - pipeline.PipeLenth = pipelines[i].PipeLenth; - pipeline.LeakMedium = pipelines[i].LeakMedium; - pipeline.LeakPressure = pipelines[i].LeakPressure; - pipeline.VacuumPressure = pipelines[i].VacuumPressure; - pipeline.PCMedium = pipelines[i].PCMedium; - pipeline.MaterialId = pipelines[i].MaterialId; - pipeline.Remark = pipelines[i].Remark; - pipeline.FlowingSection = pipelines[i].FlowingSection; - - var isExistPipelineCode = PipelineService.GetPipelineByCode(pipeline.PipelineCode, pipeline.UnitWorkId); - if (isExistPipelineCode!=null) // 更新管线 - { - pipeline.PipelineId = isExistPipelineCode.PipelineId; - BLL.PipelineService.UpdatePipeline(pipeline); - } - else // 增加管线 - { - pipeline.PipelineId = SQLHelper.GetNewID(); - BLL.PipelineService.AddPipeline(pipeline); - } - } - - - } - void addHJGL_WeldJoints(List PipelineList, string UnitWorkId) - { - var getpipelines= from y in Funs.DB.HJGL_Pipeline where y.UnitWorkId== UnitWorkId select y; - List weldJoints_add = new List(); - - var weldJoints = (from x in PipelineList - select new Model.HJGL_WeldJoint - { - WeldJointCode = x.WeldJointCode, - PipelineCode = x.PipelineCode, - Material1Id = x.Material1Id, - Material2Id = x.Material2Id, - Dia = x.Dia, - DNDia=x.DNDia, - Size = x.Size, - Thickness = x.Thickness, - Specification = x.Specification, - WeldTypeId = x.WeldTypeId, - DetectionTypeId = x.DetectionTypeId, - JointAttribute = x.JointAttribute, - ProjectId = this.CurrUser.LoginProjectId - }).DistinctBy(temp => new - { - temp.WeldJointCode , - temp.PipelineCode , - temp.Material1Id , - temp.Material2Id , - temp.Dia, - temp.DNDia, - temp.Size, - temp.Thickness, - temp.Specification, - temp.WeldTypeId, - temp.DetectionTypeId, - temp.JointAttribute, - temp.ProjectId - }).ToList(); - - for (int i = 0; i < weldJoints.Count(); i++) - { - Model.HJGL_WeldJoint weldJoint = new Model.HJGL_WeldJoint(); - weldJoint.PipelineId = getpipelines.Where(x=>x.PipelineCode== weldJoints[i].PipelineCode).FirstOrDefault().PipelineId; - weldJoint.WeldJointCode = weldJoints[i].WeldJointCode; - weldJoint.PipelineCode = weldJoints[i].PipelineCode; - weldJoint.Material1Id = weldJoints[i].Material1Id; - weldJoint.Material2Id = weldJoints[i].Material2Id; - weldJoint.Dia = weldJoints[i].Dia; - weldJoint.DNDia = weldJoints[i].DNDia; - weldJoint.Size = weldJoints[i].Size; - weldJoint.Thickness = weldJoints[i].Thickness; - weldJoint.Specification = weldJoints[i].Specification; - weldJoint.WeldTypeId = weldJoints[i].WeldTypeId; - weldJoint.DetectionTypeId = weldJoints[i].DetectionTypeId; - weldJoint.JointAttribute = weldJoints[i].JointAttribute; - weldJoint.ProjectId = weldJoints[i].ProjectId; - - var isExistJot = WeldJointService.GetWeldJointsByWeldJointCode(weldJoint.PipelineId, weldJoint.WeldJointCode); - if (isExistJot != null) // 更新焊口 - { - weldJoint.WeldJointId = isExistJot.WeldJointId; - BLL.WeldJointService.UpdateWeldJoint(weldJoint); - } - else // 增加焊口 - { - weldJoint.WeldJointId = SQLHelper.GetNewID(); - weldJoints_add.Add(weldJoint); - //BLL.WeldJointService.AddWeldJoint(weldJoint); - } - - } - if (weldJoints_add.Count > 0) - { - BLL.WeldJointService.AddBulkWeldJoint(weldJoints_add); - - } - } /// /// 恢复版本 diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointEdit.aspx b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointEdit.aspx index 3f0e943d..1e9f2061 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointEdit.aspx +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointEdit.aspx @@ -66,7 +66,7 @@ runat="server" ShowRedStar="true" Required="true" EnableEdit="true" LabelWidth="100px" LabelAlign="Right"> @@ -111,7 +111,11 @@ - + + + + @@ -155,11 +159,8 @@ - - - - + + diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointEdit.aspx.cs index 9e45ef75..399944b1 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointEdit.aspx.cs @@ -414,7 +414,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage //{ // joint.IsHotProess = false; //} - //joint.IsHotProess = Convert.ToBoolean(drpIsHotProess.SelectedValue); + joint.IsHotProess = Convert.ToBoolean(drpIsHotProess.SelectedValue); //joint.DesignIsHotProess = Convert.ToBoolean(drpDesignIsHotProess.SelectedValue); joint.Remark = txtRemark.Text.Trim(); joint.SubmitMan = CurrUser.PersonId; diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointEdit.aspx.designer.cs index bd6aff10..f09a67cb 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointEdit.aspx.designer.cs @@ -248,6 +248,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// protected global::FineUIPro.DropDownList DropTwoJointType; + /// + /// drpIsHotProess 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpIsHotProess; + /// /// GroupPanel2 控件。 /// @@ -329,15 +338,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// protected global::FineUIPro.TextBox txtPreTemperature; - /// - /// drpIsHotProess 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList drpIsHotProess; - /// /// txtWpqId 控件。 /// diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointList.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointList.aspx.cs index 6ed9864d..9528b728 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointList.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointList.aspx.cs @@ -458,28 +458,28 @@ namespace FineUIPro.Web.HJGL.WeldingManage private string GetWeldJointRateByUnitWork(string unitworkid) { string rate = ""; - int ShopNum = 0; - int FieldNum = 0; + int shopNum = 0; + int fieldNum = 0; int AllNum = 0; var db = Funs.DB; var q = from x in db.View_HJGL_WeldJoint where x.UnitWorkId == unitworkid select x; if (q != null && q.Count() > 0) { - ShopNum = (from x in q + shopNum = (from x in q where x.JointAttribute == "预制口" select x ).Count(); - FieldNum = (from x in q + fieldNum = (from x in q where x.JointAttribute == "安装口" select x ).Count(); - ShopSum = ShopNum.ToString(); - FieldSum = FieldSum.ToString(); - AllNum = ShopNum + FieldNum; + ShopSum = shopNum.ToString(); + FieldSum = fieldNum.ToString(); + AllNum = shopNum + fieldNum; if (AllNum > 0) { - var a = (decimal)100 * ShopNum / AllNum; + var a = (decimal)100 * shopNum / AllNum; rate = Math.Round((decimal)a, 1).ToString() + "%"; } @@ -542,27 +542,27 @@ namespace FineUIPro.Web.HJGL.WeldingManage private string GetWeldJointRateByPipelineid(string pipelineid) { string rate = ""; - int ShopNum = 0; - int FieldNum = 0; + int shopNum = 0; + int fieldNum = 0; int AllNum = 0; var db = Funs.DB; var q = from x in db.View_HJGL_WeldJoint where x.PipelineId == pipelineid select x; if (q != null && q.Count() > 0) { - ShopNum = (from x in q + shopNum = (from x in q where x.JointAttribute == "预制口" select x ).Count(); - FieldNum = (from x in q + fieldNum = (from x in q where x.JointAttribute == "安装口" select x ).Count(); - ShopSum = ShopNum.ToString(); - FieldSum = FieldSum.ToString(); - AllNum = ShopNum + FieldNum; + ShopSum = shopNum.ToString(); + FieldSum = fieldNum.ToString(); + AllNum = shopNum + fieldNum; if (AllNum > 0) { - var a = (decimal)100 * ShopNum / AllNum; + var a = (decimal)100 * shopNum / AllNum; rate = Math.Round((decimal)a, 1).ToString() + "%"; }