diff --git a/DataBase/hjglDB_7_2024.06.26.rar b/DataBase/hjglDB_7_2024.06.26.rar deleted file mode 100644 index fe83b40..0000000 Binary files a/DataBase/hjglDB_7_2024.06.26.rar and /dev/null differ diff --git a/DataBase/hjglDB_7_2024.06.27.rar b/DataBase/hjglDB_7_2024.06.27.rar deleted file mode 100644 index 909cb8f..0000000 Binary files a/DataBase/hjglDB_7_2024.06.27.rar and /dev/null differ diff --git a/DataBase/hjglDB_7_2024.06.28.rar b/DataBase/hjglDB_7_2024.06.28.rar deleted file mode 100644 index c803e75..0000000 Binary files a/DataBase/hjglDB_7_2024.06.28.rar and /dev/null differ diff --git a/HJGL/.vs/HJGL/config/applicationhost.config b/HJGL/.vs/HJGL/config/applicationhost.config index ada02a4..1963de0 100644 --- a/HJGL/.vs/HJGL/config/applicationhost.config +++ b/HJGL/.vs/HJGL/config/applicationhost.config @@ -162,7 +162,7 @@ - + diff --git a/HJGL/.vs/HJGL/v17/.suo b/HJGL/.vs/HJGL/v17/.suo index e94f811..6f6a2c4 100644 Binary files a/HJGL/.vs/HJGL/v17/.suo and b/HJGL/.vs/HJGL/v17/.suo differ diff --git a/HJGL/BLL/DropListService.cs b/HJGL/BLL/DropListService.cs index 6ae333e..94f0e9f 100644 --- a/HJGL/BLL/DropListService.cs +++ b/HJGL/BLL/DropListService.cs @@ -81,19 +81,20 @@ list[3] = new ListItem("低合金钢", "4"); list[4] = new ListItem("镍合金钢", "5"); list[5] = new ListItem("钛合金钢", "6"); - list[6] = new ListItem("其他", "7"); + list[6] = new ListItem("其它", "7"); return list; } // 材质类型 public static ListItem[] MaterialTypeList() { - ListItem[] list = new ListItem[5]; + ListItem[] list = new ListItem[6]; list[0] = new ListItem("低碳钢(FeⅠ)", "FeⅠ"); list[1] = new ListItem("低合金钢(FeⅡ)", "FeⅡ"); list[2] = new ListItem("Cr≥5%铬钼钢、铁素体钢、马氏体钢(FeⅢ)", "FeⅢ"); list[3] = new ListItem("奥氏体钢、奥氏体与铁素体双相钢(FeⅣ)", "FeⅣ"); - list[4] = new ListItem("其他", "其他"); + list[4] = new ListItem("NiⅢ", "NiⅢ"); + list[5] = new ListItem("其它", "其它"); return list; } diff --git a/HJGL/BLL/WeldingProcess/TrustManage/Batch_PointBatchItemService.cs b/HJGL/BLL/WeldingProcess/TrustManage/Batch_PointBatchItemService.cs index 625e135..38b519a 100644 --- a/HJGL/BLL/WeldingProcess/TrustManage/Batch_PointBatchItemService.cs +++ b/HJGL/BLL/WeldingProcess/TrustManage/Batch_PointBatchItemService.cs @@ -367,6 +367,12 @@ namespace BLL } + if (rate.DetectionRateValue == 100) + { + UpdatePointBatchItem(pointBatchItemId, "1", System.DateTime.Now, null); + UpdatePointBatchOrder(pointBatchItemId, true); + } + #region 暂不用了 //// 一个段位的数量 //int dnum = Convert.ToInt32((double)100 / (double)rate.DetectionRateValue); diff --git a/HJGL/BLL/WeldingProcess/WeldingManage/Pipeline_PipelineService.cs b/HJGL/BLL/WeldingProcess/WeldingManage/Pipeline_PipelineService.cs index 3413363..96e9d45 100644 --- a/HJGL/BLL/WeldingProcess/WeldingManage/Pipeline_PipelineService.cs +++ b/HJGL/BLL/WeldingProcess/WeldingManage/Pipeline_PipelineService.cs @@ -319,12 +319,13 @@ namespace BLL /// /// /// - public static void InitPipelineDropDownList(FineUIPro.DropDownList dropName,string workAreaId) + public static void InitPipelineDropDownList(FineUIPro.DropDownList dropName,string workAreaId, string itemText) { dropName.DataValueField = "PipelineId"; dropName.DataTextField = "PipelineCode"; dropName.DataSource = GetPipelineList(workAreaId); dropName.DataBind(); + Funs.FineUIPleaseSelect(dropName, itemText); } } } diff --git a/HJGL/BLL/WeldingProcess/WeldingManage/Pipeline_WeldJointService.cs b/HJGL/BLL/WeldingProcess/WeldingManage/Pipeline_WeldJointService.cs index 2d9a6d1..106bde9 100644 --- a/HJGL/BLL/WeldingProcess/WeldingManage/Pipeline_WeldJointService.cs +++ b/HJGL/BLL/WeldingProcess/WeldingManage/Pipeline_WeldJointService.cs @@ -168,6 +168,55 @@ namespace BLL } } + public static void UpdateWeldJointByGly(Model.Pipeline_WeldJoint weldJoint) + { + Model.HJGLDB db = Funs.DB; + Model.Pipeline_WeldJoint newWeldJoint = db.Pipeline_WeldJoint.FirstOrDefault(e => e.WeldJointId == weldJoint.WeldJointId); + if (newWeldJoint != null) + { + newWeldJoint.WeldJointCode = weldJoint.WeldJointCode; + newWeldJoint.WeldTypeId = weldJoint.WeldTypeId; + newWeldJoint.Material1Id = weldJoint.Material1Id; + newWeldJoint.Material2Id = weldJoint.Material2Id; + newWeldJoint.Thickness = weldJoint.Thickness; + newWeldJoint.Dia = weldJoint.Dia; + newWeldJoint.Size = weldJoint.Size; + newWeldJoint.JointAttribute = weldJoint.JointAttribute; + newWeldJoint.JointArea = weldJoint.JointArea; + newWeldJoint.WeldingMethodId = weldJoint.WeldingMethodId; + newWeldJoint.IsHotProess = weldJoint.IsHotProess; + newWeldJoint.WeldingLocationId = weldJoint.WeldingLocationId; + newWeldJoint.WeldMatId = weldJoint.WeldMatId; + newWeldJoint.WeldSilkId = weldJoint.WeldSilkId; + newWeldJoint.GrooveTypeId = weldJoint.GrooveTypeId; + newWeldJoint.PipeSegment = weldJoint.PipeSegment; + newWeldJoint.PipeAssembly1Id = weldJoint.PipeAssembly1Id; + newWeldJoint.PipeAssembly2Id = weldJoint.PipeAssembly2Id; + newWeldJoint.PipeAssemblyCount = weldJoint.PipeAssemblyCount; + newWeldJoint.HeartNo1 = weldJoint.HeartNo1; + newWeldJoint.HeartNo2 = weldJoint.HeartNo2; + newWeldJoint.LastTemp = weldJoint.LastTemp; + newWeldJoint.CellTemp = weldJoint.CellTemp; + newWeldJoint.PrepareTemp = weldJoint.PrepareTemp; + newWeldJoint.Electricity = weldJoint.Electricity; + newWeldJoint.Voltage = weldJoint.Voltage; + newWeldJoint.IsPMI = weldJoint.IsPMI; + newWeldJoint.TestPackageNo = weldJoint.TestPackageNo; + newWeldJoint.PipingClassId = weldJoint.PipingClassId; + newWeldJoint.Specification = weldJoint.Specification; + newWeldJoint.DoneDin = weldJoint.DoneDin; + newWeldJoint.SystemNumber = weldJoint.SystemNumber; + newWeldJoint.Remark = weldJoint.Remark; + //newWeldJoint.IsCancel = weldJoint.IsCancel; + newWeldJoint.IsGoldJoint = weldJoint.IsGoldJoint; + newWeldJoint.WPQId = weldJoint.WPQId; + newWeldJoint.DetectionType = weldJoint.DetectionType; + newWeldJoint.PageNum = weldJoint.PageNum; + newWeldJoint.ANSISCH = weldJoint.ANSISCH; + db.SubmitChanges(); + } + } + /// /// 修改部分内容 /// @@ -302,152 +351,6 @@ namespace BLL } } - /// - /// 修改部分内容TCC11,暂时 - /// - /// - public static void UpdateDepartWeldJointToTCC11(Model.Pipeline_WeldJoint weldJoint) - { - Model.HJGLDB db = Funs.DB; - Model.Pipeline_WeldJoint newWeldJoint = db.Pipeline_WeldJoint.FirstOrDefault(e => e.WeldJointId == weldJoint.WeldJointId); - if (newWeldJoint != null) - { - newWeldJoint.WeldJointCode = weldJoint.WeldJointCode; - //newWeldJoint.WeldTypeId = weldJoint.WeldTypeId; - //newWeldJoint.Material1Id = weldJoint.Material1Id; - //newWeldJoint.Material2Id = weldJoint.Material2Id; - if (weldJoint.Thickness != null) - { - newWeldJoint.Thickness = weldJoint.Thickness; - } - if (weldJoint.Dia != null) - { - newWeldJoint.Dia = weldJoint.Dia; - } - if (weldJoint.Size != null) - { - newWeldJoint.Size = weldJoint.Size; - } - if (!string.IsNullOrEmpty(weldJoint.JointAttribute)) - { - newWeldJoint.JointAttribute = weldJoint.JointAttribute; - } - - if (!string.IsNullOrEmpty(weldJoint.JointArea)) - { - newWeldJoint.JointArea = weldJoint.JointArea; - } - - //newWeldJoint.WeldingMethodId = weldJoint.WeldingMethodId; - if (weldJoint.IsHotProess != null) - { - newWeldJoint.IsHotProess = weldJoint.IsHotProess; - } - if (!string.IsNullOrEmpty(weldJoint.WeldingLocationId)) - { - newWeldJoint.WeldingLocationId = weldJoint.WeldingLocationId; - } - if (!string.IsNullOrEmpty(weldJoint.WeldMatId)) - { - newWeldJoint.WeldMatId = weldJoint.WeldMatId; - } - if (!string.IsNullOrEmpty(weldJoint.WeldSilkId)) - { - newWeldJoint.WeldSilkId = weldJoint.WeldSilkId; - } - //newWeldJoint.GrooveTypeId = weldJoint.GrooveTypeId; - if (!string.IsNullOrEmpty(weldJoint.PipeSegment)) - { - newWeldJoint.PipeSegment = weldJoint.PipeSegment; - } - if (!string.IsNullOrEmpty(weldJoint.PipeAssembly1Id)) - { - newWeldJoint.PipeAssembly1Id = weldJoint.PipeAssembly1Id; - } - if (!string.IsNullOrEmpty(weldJoint.PipeAssembly2Id)) - { - newWeldJoint.PipeAssembly2Id = weldJoint.PipeAssembly2Id; - } - if (weldJoint.PipeAssemblyCount != null) - { - newWeldJoint.PipeAssemblyCount = weldJoint.PipeAssemblyCount; - } - if (!string.IsNullOrEmpty(weldJoint.HeartNo1)) - { - newWeldJoint.HeartNo1 = weldJoint.HeartNo1; - } - if (!string.IsNullOrEmpty(weldJoint.HeartNo2)) - { - newWeldJoint.HeartNo2 = weldJoint.HeartNo2; - } - if (!string.IsNullOrEmpty(weldJoint.LastTemp)) - { - newWeldJoint.LastTemp = weldJoint.LastTemp; - } - if (!string.IsNullOrEmpty(weldJoint.CellTemp)) - { - newWeldJoint.CellTemp = weldJoint.CellTemp; - } - if (!string.IsNullOrEmpty(weldJoint.PrepareTemp)) - { - newWeldJoint.PrepareTemp = weldJoint.PrepareTemp; - } - if (!string.IsNullOrEmpty(weldJoint.Electricity)) - { - newWeldJoint.Electricity = weldJoint.Electricity; - } - if (!string.IsNullOrEmpty(weldJoint.Voltage)) - { - newWeldJoint.Voltage = weldJoint.Voltage; - } - if (!string.IsNullOrEmpty(weldJoint.TestPackageNo)) - { - newWeldJoint.TestPackageNo = weldJoint.TestPackageNo; - } - //newWeldJoint.WeldingDailyCode = weldJoint.WeldingDailyCode; - //newWeldJoint.BackingWelderId = weldJoint.BackingWelderId; - //newWeldJoint.CoverWelderId = weldJoint.CoverWelderId; - //newWeldJoint.WeldingDate = weldJoint.WeldingDate; - //newWeldJoint.WeldingDailyId = weldJoint.WeldingDailyId; - //newWeldJoint.PipingClassId = weldJoint.PipingClassId; - if (!string.IsNullOrEmpty(weldJoint.Specification)) - { - newWeldJoint.Specification = weldJoint.Specification; - } - //newWeldJoint.DoneDin = weldJoint.DoneDin; - if (!string.IsNullOrEmpty(weldJoint.SystemNumber)) - { - newWeldJoint.SystemNumber = weldJoint.SystemNumber; - } - if (!string.IsNullOrEmpty(weldJoint.Remark)) - { - newWeldJoint.Remark = weldJoint.Remark; - } - //newWeldJoint.IsCancel = weldJoint.IsCancel; - if (weldJoint.IsGoldJoint != null) - { - newWeldJoint.IsGoldJoint = weldJoint.IsGoldJoint; - } - if (!string.IsNullOrEmpty(weldJoint.WPQId)) - { - newWeldJoint.WPQId = weldJoint.WPQId; - } - if (!string.IsNullOrEmpty(weldJoint.DetectionType)) - { - newWeldJoint.DetectionType = weldJoint.DetectionType; - } - if (!string.IsNullOrEmpty(weldJoint.PageNum)) - { - newWeldJoint.PageNum = weldJoint.PageNum; - } - if (!string.IsNullOrEmpty(weldJoint.ANSISCH)) - { - newWeldJoint.ANSISCH = weldJoint.ANSISCH; - } - db.SubmitChanges(); - } - } - /// /// 根据主键删除焊口信息 /// diff --git a/HJGL/BLL/WeldingProcess/WeldingManage/Pipeline_WeldingDailyService.cs b/HJGL/BLL/WeldingProcess/WeldingManage/Pipeline_WeldingDailyService.cs index cbfec5f..948e8c8 100644 --- a/HJGL/BLL/WeldingProcess/WeldingManage/Pipeline_WeldingDailyService.cs +++ b/HJGL/BLL/WeldingProcess/WeldingManage/Pipeline_WeldingDailyService.cs @@ -62,7 +62,8 @@ namespace BLL newWeldReportItem.WeldingLocationId = item.WeldingLocationId; newWeldReportItem.WeldingLocationCode = item.WeldingLocationCode; newWeldReportItem.JointAttribute = item.JointAttribute; - newWeldReportItem.DoneDin = item.DoneDin; + newWeldReportItem.DoneDin = item.Size; + newWeldReportItem.Size = item.Size; newWeldReportItem.Dia = item.Dia; newWeldReportItem.Thickness = item.Thickness; newWeldReportItem.Specification = item.Specification; @@ -157,14 +158,8 @@ namespace BLL //newWeldReportItem.WeldMatCode = weldline.WeldMatCode; - if (weldline.DoneDin == null) - { - newWeldReportItem.DoneDin = weldline.Size; - } - else - { - newWeldReportItem.DoneDin = weldline.DoneDin; - } + newWeldReportItem.DoneDin = weldline.Size; + newWeldReportItem.Size = weldline.Size; newWeldReportItem.Dia = weldline.Dia; newWeldReportItem.Thickness = weldline.Thickness; newWeldReportItem.Specification = weldline.Specification; diff --git a/HJGL/FineUIPro.Web/FineUIPro.Web.csproj b/HJGL/FineUIPro.Web/FineUIPro.Web.csproj index 0899ec1..4cd31ed 100644 --- a/HJGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/HJGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -1312,6 +1312,7 @@ + @@ -5792,6 +5793,13 @@ JointComprehensive.aspx + + RTRateConfirm.aspx + ASPXCodeBehind + + + RTRateConfirm.aspx + WeldDailyExport.aspx ASPXCodeBehind diff --git a/HJGL/FineUIPro.Web/FineUIPro.Web.csproj.user b/HJGL/FineUIPro.Web/FineUIPro.Web.csproj.user index 0baedd9..8d0cdf2 100644 --- a/HJGL/FineUIPro.Web/FineUIPro.Web.csproj.user +++ b/HJGL/FineUIPro.Web/FineUIPro.Web.csproj.user @@ -2,7 +2,7 @@ ProjectFiles - Release|Any CPU + Debug|Any CPU true diff --git a/HJGL/FineUIPro.Web/Web.config b/HJGL/FineUIPro.Web/Web.config index 23f0894..5535ca1 100644 --- a/HJGL/FineUIPro.Web/Web.config +++ b/HJGL/FineUIPro.Web/Web.config @@ -51,7 +51,7 @@ - + diff --git a/HJGL/FineUIPro.Web/WelderManage/AnalysisEdit.aspx b/HJGL/FineUIPro.Web/WelderManage/AnalysisEdit.aspx index 5d17517..8a0439f 100644 --- a/HJGL/FineUIPro.Web/WelderManage/AnalysisEdit.aspx +++ b/HJGL/FineUIPro.Web/WelderManage/AnalysisEdit.aspx @@ -39,6 +39,7 @@ + diff --git a/HJGL/FineUIPro.Web/WelderManage/AnalysisEdit.aspx.cs b/HJGL/FineUIPro.Web/WelderManage/AnalysisEdit.aspx.cs index 925f145..acfb106 100644 --- a/HJGL/FineUIPro.Web/WelderManage/AnalysisEdit.aspx.cs +++ b/HJGL/FineUIPro.Web/WelderManage/AnalysisEdit.aspx.cs @@ -112,7 +112,7 @@ namespace FineUIPro.Web.WelderManage } if (!string.IsNullOrEmpty(numSizesMin.Text)) { - updateQue.SizesMin = Convert.ToInt32(numSizesMin.Text); + updateQue.SizesMin = Convert.ToDecimal(numSizesMin.Text); } else { @@ -120,7 +120,7 @@ namespace FineUIPro.Web.WelderManage } if (!string.IsNullOrEmpty(numThicknessMax.Text)) { - updateQue.ThicknessMax = Convert.ToInt32(numThicknessMax.Text); + updateQue.ThicknessMax = Convert.ToDecimal(numThicknessMax.Text); } else { diff --git a/HJGL/FineUIPro.Web/WelderManage/QualifiedProject.aspx.cs b/HJGL/FineUIPro.Web/WelderManage/QualifiedProject.aspx.cs index 0f39950..e9fa97d 100644 --- a/HJGL/FineUIPro.Web/WelderManage/QualifiedProject.aspx.cs +++ b/HJGL/FineUIPro.Web/WelderManage/QualifiedProject.aspx.cs @@ -474,7 +474,7 @@ namespace FineUIPro.Web.WelderManage } else { - if (queProject[2] == ("6G")) + if (queProject[2].Contains("6G")) { weldType = "1,2,3"; } diff --git a/HJGL/FineUIPro.Web/WelderManage/WelderTestInfo.aspx.cs b/HJGL/FineUIPro.Web/WelderManage/WelderTestInfo.aspx.cs index 9f83e46..cfd7dfb 100644 --- a/HJGL/FineUIPro.Web/WelderManage/WelderTestInfo.aspx.cs +++ b/HJGL/FineUIPro.Web/WelderManage/WelderTestInfo.aspx.cs @@ -627,7 +627,7 @@ namespace FineUIPro.Web.WelderManage listData.Add(model); } - string type = "FeⅠ,FeⅡ,FeⅢ,FeⅣ,其他"; + string type = "FeⅠ,FeⅡ,FeⅢ,FeⅣ,NiⅢ,其它"; var isAnyMeaterail = weldMeatrail.Split(','); foreach (var item in isAnyMeaterail) { @@ -637,7 +637,7 @@ namespace FineUIPro.Web.WelderManage model.rowId = i; model.createdTime = DateTime.Now; model.columnName = "焊接材质"; - model.errMsg = "材质应为FeⅠ,FeⅡ,FeⅢ,FeⅣ,其他,多个用','隔开"; + model.errMsg = "材质应为FeⅠ,FeⅡ,FeⅢ,FeⅣ,NiⅢ,其它,多个用','隔开"; model.isSuccess = false; listData.Add(model); diff --git a/HJGL/FineUIPro.Web/WeldingProcess/CheckManage/CheckManageEdit.aspx.cs b/HJGL/FineUIPro.Web/WeldingProcess/CheckManage/CheckManageEdit.aspx.cs index d1e5400..71e5ac7 100644 --- a/HJGL/FineUIPro.Web/WeldingProcess/CheckManage/CheckManageEdit.aspx.cs +++ b/HJGL/FineUIPro.Web/WeldingProcess/CheckManage/CheckManageEdit.aspx.cs @@ -486,6 +486,11 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage List GetNDEItem = this.CollectGridNDEItem(); string errlog = string.Empty; + if (GetNDEItem.Count()==0) + { + ShowNotify("请勾选检测细明!", MessageBoxIcon.Warning); + return; + } foreach (var item in GetNDEItem) { var oldItem = BLL.Batch_NDEItemService.GetNDEItemById(item.NDEItemID); diff --git a/HJGL/FineUIPro.Web/WeldingProcess/CheckManage/RepairAndExpand.aspx b/HJGL/FineUIPro.Web/WeldingProcess/CheckManage/RepairAndExpand.aspx index 0de24aa..e4d8089 100644 --- a/HJGL/FineUIPro.Web/WeldingProcess/CheckManage/RepairAndExpand.aspx +++ b/HJGL/FineUIPro.Web/WeldingProcess/CheckManage/RepairAndExpand.aspx @@ -73,15 +73,18 @@ - + OnClick="btnGenerate_Click" Hidden="true"> + + diff --git a/HJGL/FineUIPro.Web/WeldingProcess/CheckManage/RepairAndExpand.aspx.cs b/HJGL/FineUIPro.Web/WeldingProcess/CheckManage/RepairAndExpand.aspx.cs index bfe4d97..babb058 100644 --- a/HJGL/FineUIPro.Web/WeldingProcess/CheckManage/RepairAndExpand.aspx.cs +++ b/HJGL/FineUIPro.Web/WeldingProcess/CheckManage/RepairAndExpand.aspx.cs @@ -7,6 +7,7 @@ using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using BLL; +using NPOI.SS.Formula.Functions; namespace FineUIPro.Web.WeldingProcess.CheckManage { @@ -239,7 +240,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage JointArea,Size,WeldingDate,PipelineCode,PipingClassName FROM dbo.View_Batch_PointBatchItem WHERE ProjectId=@ProjectId AND DetectionTypeId=@DetectionTypeId - AND (PointDate IS NULL OR (PointDate IS NOT NULL AND RepairRecordId=@RepairRecordId))"; + AND (PState IS NULL OR (PState='2' AND RepairRecordId=@RepairRecordId))"; } List listStr = new List(); @@ -392,32 +393,107 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage if (ckbIsCut.Checked) { repair.IsCut = true; - repair.RepairRecordCode = repair.RepairRecordCode.Substring(0, repair.RepairRecordCode.Length - 1) + "C"; + repair.RepairRecordCode = repair.RepairRecordCode.Substring(0, repair.RepairRecordCode.Length - 2) + "C1"; + //先还原 + var joint = BLL.Pipeline_WeldJointService.GetWeldJointByWeldJointId(repair.WeldJointId); + if (!string.IsNullOrEmpty(joint.OldWeldJointCode)) + { + joint.WeldJointCode = joint.OldWeldJointCode; + joint.OldWeldJointCode = null; + Funs.DB.SubmitChanges(); + } + // 回写焊口号 + var rjot = BLL.Pipeline_WeldJointService.GetWeldJointByWeldJointId(repair.WeldJointId); + rjot.WeldJointCode = rjot.WeldJointCode.Replace("R1","").Replace("P1", "").Replace("S1", "").Trim() + "C1"; + rjot.OldWeldJointCode = rjot.WeldJointCode; + Funs.DB.SubmitChanges(); + } + else + { + // 回写焊口号 撤消 + var joint = BLL.Pipeline_WeldJointService.GetWeldJointByWeldJointId(repair.WeldJointId); + if (joint.WeldJointCode.Contains("C1") && joint.OldWeldJointCode != null) + { + joint.WeldJointCode = joint.OldWeldJointCode; + joint.OldWeldJointCode = null; + Funs.DB.SubmitChanges(); + } } } - // 更新返修口 - var batchItem = db.Batch_PointBatchItem.FirstOrDefault(x => x.WeldJointId == repair.WeldJointId && x.RepairDate == null); - if (batchItem != null) + #region 更新返修口 不用了,改为增加批明细 + //var batchItem = db.Batch_PointBatchItem.FirstOrDefault(x => x.WeldJointId == repair.WeldJointId && x.RepairDate == null); + //if (batchItem != null) + //{ + // batchItem.RepairDate = Convert.ToDateTime(this.txtRepairDate.Text); + // batchItem.RepairRecordId = repairRecordId; + // if (ckbIsCut.Checked) + // { + // batchItem.CutDate = DateTime.Now.Date; + // } + // db.SubmitChanges(); + //} + //else + //{ + // var updatebatchItem = db.Batch_PointBatchItem.FirstOrDefault(x => x.WeldJointId == repair.WeldJointId && x.RepairRecordId == repairRecordId); + // if (updatebatchItem != null) + // { + // updatebatchItem.RepairDate = Convert.ToDateTime(this.txtRepairDate.Text); + // db.SubmitChanges(); + // } + //} + #endregion + + // 点口状态3表示返修口 + var repairbatchItem = db.Batch_PointBatchItem.FirstOrDefault(x => x.WeldJointId == repair.WeldJointId && x.RepairRecordId == repairRecordId && (x.PointState == "3" || x.PointState == "4" || x.PointState == "5")); + var repairbatch = (from x in db.Batch_PointBatchItem + join y in db.Batch_PointBatch on x.PointBatchId equals y.PointBatchId + where x.WeldJointId==repair.WeldJointId && y.DetectionTypeId==repair.DetectionTypeId + select x).FirstOrDefault(); + if (repairbatchItem == null) // 增加返修口 { - batchItem.RepairDate = Convert.ToDateTime(this.txtRepairDate.Text); - batchItem.RepairRecordId = repairRecordId; - if (ckbIsCut.Checked) + if (repairbatch != null) { - batchItem.CutDate = DateTime.Now.Date; - } - db.SubmitChanges(); + if (ckbIsCut.Checked) // 切除 + { + repairbatch.CutDate = DateTime.Now.Date; + } + else + { + Model.Batch_PointBatchItem addRepairPointBatch = new Model.Batch_PointBatchItem(); + string itemId = SQLHelper.GetNewID(typeof(Model.Batch_PointBatchItem)); + addRepairPointBatch.PointBatchItemId = itemId; + addRepairPointBatch.PointBatchId = repairbatch.PointBatchId; + addRepairPointBatch.WeldJointId = repair.WeldJointId; + addRepairPointBatch.WeldingDate = Convert.ToDateTime(this.txtRepairDate.Text); + addRepairPointBatch.RepairDate = Convert.ToDateTime(this.txtRepairDate.Text); + addRepairPointBatch.AcceptLevel = repairbatch.AcceptLevel; + + addRepairPointBatch.PointDate = DateTime.Now; + addRepairPointBatch.RepairRecordId = repairRecordId; + addRepairPointBatch.IsCheckRepair = false; + addRepairPointBatch.EnterDate= DateTime.Now; + if (repair.RepairMark.Contains("R")) + { + addRepairPointBatch.PointState = "3"; + } + if (repair.RepairMark.Contains("P")) + { + addRepairPointBatch.PointState = "4"; + } + if (repair.RepairMark.Contains("S")) + { + addRepairPointBatch.PointState = "5"; + } + BLL.Batch_PointBatchItemService.AddPointBatchItem(addRepairPointBatch); + } + } } else { - var updatebatchItem = db.Batch_PointBatchItem.FirstOrDefault(x => x.WeldJointId == repair.WeldJointId && x.RepairRecordId == repairRecordId); - if (updatebatchItem != null) - { - updatebatchItem.RepairDate = Convert.ToDateTime(this.txtRepairDate.Text); - db.SubmitChanges(); - } + repairbatchItem.RepairDate = Convert.ToDateTime(this.txtRepairDate.Text); + db.SubmitChanges(); } - var exp = BLL.RepairRecordService.GetExportItem(repairRecordId); if (exp != null) @@ -433,8 +509,14 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage newPointBatchItem.RepairRecordId = null; db.SubmitChanges(); } + // 回写焊口号 + var joint = BLL.Pipeline_WeldJointService.GetWeldJointByWeldJointId(item.WeldJointId); + joint.WeldJointCode = joint.OldWeldJointCode; + joint.OldWeldJointCode = null; + Funs.DB.SubmitChanges(); } } + // 更新扩透口 string[] checkedRow = Grid1.SelectedRowIDArray; if (checkedRow.Count() > 0) @@ -451,6 +533,15 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage newPointBatchItem.PointDate = DateTime.Now; newPointBatchItem.RepairRecordId = repairRecordId; db.SubmitChanges(); + + // 回写焊口号 + var joint = BLL.Pipeline_WeldJointService.GetWeldJointByWeldJointId(newPointBatchItem.WeldJointId); + if (!joint.WeldJointCode.Contains("EX1")) + { + joint.WeldJointCode = joint.WeldJointCode + "EX1"; + joint.OldWeldJointCode = joint.WeldJointCode; + Funs.DB.SubmitChanges(); + } } // 大于500的焊口扩透口是自身,这时要增加批明细 else @@ -472,8 +563,17 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage addPointBatchItem.IsCheckRepair = false; BLL.Batch_PointBatchItemService.AddPointBatchItem(addPointBatchItem); + + // 回写焊口号 不用回写,本身是返修口又是扩透口 + //var joint = BLL.Pipeline_WeldJointService.GetWeldJointByWeldJointId(repair.WeldJointId); + //joint.WeldJointCode = joint.WeldJointCode + "EX1"; + //joint.OldWeldJointCode = joint.WeldJointCode; + //Funs.DB.SubmitChanges(); + } } + + } } } @@ -492,6 +592,52 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage } } + protected void btnDelete_Click(object sender, EventArgs e) + { + if (CurrUser.UserId == Const.GlyId) + { + Model.HJGLDB db = Funs.DB; + string repairRecordId = tvControlItem.SelectedNodeID; + var repair = db.Repair_RepairRecord.FirstOrDefault(x => x.RepairRecordId == repairRecordId); + var repairTrust = from x in db.Batch_PointBatchItem where x.RepairRecordId == repairRecordId && (x.PointState == "2" || x.PointState == "3") select x; + if (repairTrust.Count() > 0) + { + ShowNotify("返修扩透数据已提交,不能删除!", MessageBoxIcon.Warning); + return; + } + + // 回写焊口 + var joint = BLL.Pipeline_WeldJointService.GetWeldJointByWeldJointId(repair.WeldJointId); + if (!string.IsNullOrEmpty(joint.OldWeldJointCode)) + { + joint.WeldJointCode = joint.OldWeldJointCode; + joint.OldWeldJointCode = null; + Funs.DB.SubmitChanges(); + } + //var exp = BLL.RepairRecordService.GetExportItem(repairRecordId); + //if (exp != null) + //{ + // foreach (Model.Batch_PointBatchItem item in exp) + // { + // Model.Batch_PointBatchItem newPointBatchItem = db.Batch_PointBatchItem.FirstOrDefault(x => x.PointBatchItemId == item.PointBatchItemId); + // newPointBatchItem.PointState = null; + // newPointBatchItem.PointDate = null; + // newPointBatchItem.RepairRecordId = null; + // db.SubmitChanges(); + // } + //} + db.Repair_RepairRecord.DeleteOnSubmit(repair); + db.SubmitChanges(); + this.InitTreeMenu();//加载树 + Alert.ShowInTop("删除成功!", MessageBoxIcon.Success); + } + else + { + ShowNotify(Resources.Lan.NoPrivilegePrompt, MessageBoxIcon.Warning); + return; + } + } + protected void btnPointAudit_Click(object sender, EventArgs e) { Model.HJGLDB db = Funs.DB; @@ -534,9 +680,13 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage Model.Repair_RepairRecord repairRecord = BLL.RepairRecordService.GetRepairRecordById(repairRecordId); var pipe = BLL.Pipeline_WeldJointService.GetViewWeldJointById(repairRecord.WeldJointId); string pipelineId = string.Empty; + string weldingMethodId = string.Empty; + string grooveTypeId = string.Empty; if (pipe != null) { pipelineId = pipe.PipelineId; + weldingMethodId = pipe.WeldingMethodId; + grooveTypeId = pipe.GrooveTypeId; } var t = from x in Funs.DB.Batch_BatchTrustItem where x.RepairRecordId == repairRecordId select x; if (t.Count() == 0) @@ -557,6 +707,9 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage newRepairTrust.WorkAreaId = repairRecord.WorkAreaId; newRepairTrust.DetectionTypeId = repairRecord.DetectionTypeId; newRepairTrust.PipelineId = pipelineId; + newRepairTrust.WeldingMethodId = weldingMethodId; + newRepairTrust.GrooveTypeId = grooveTypeId; + BLL.Batch_BatchTrustService.AddBatchTrust(newRepairTrust); // 新增返修委托单 Model.Batch_BatchTrustItem newRepairTrustItem = new Model.Batch_BatchTrustItem(); @@ -572,6 +725,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage var exp = BLL.RepairRecordService.GetExportItem(repairRecordId); if (exp != null) { + var jot = BLL.Pipeline_WeldJointService.GetWeldJointByWeldJointId(exp.First().WeldJointId); string exportTrustCode = string.Empty; if (repairRecord.RepairRecordCode.Substring(repairRecord.RepairRecordCode.Length - 5) == "EX1R2") { @@ -600,6 +754,8 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage newExportTrust.WorkAreaId = repairRecord.WorkAreaId; newExportTrust.DetectionTypeId = repairRecord.DetectionTypeId; newExportTrust.PipelineId = pipelineId; + newExportTrust.WeldingMethodId = jot.WeldingMethodId; + newExportTrust.GrooveTypeId = jot.GrooveTypeId; BLL.Batch_BatchTrustService.AddBatchTrust(newExportTrust); // 新增扩透委托单 foreach (var q in exp) diff --git a/HJGL/FineUIPro.Web/WeldingProcess/CheckManage/RepairAndExpand.aspx.designer.cs b/HJGL/FineUIPro.Web/WeldingProcess/CheckManage/RepairAndExpand.aspx.designer.cs index 0fbaa6d..6ddf74c 100644 --- a/HJGL/FineUIPro.Web/WeldingProcess/CheckManage/RepairAndExpand.aspx.designer.cs +++ b/HJGL/FineUIPro.Web/WeldingProcess/CheckManage/RepairAndExpand.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.WeldingProcess.CheckManage { - - - public partial class RepairAndExpand { - +namespace FineUIPro.Web.WeldingProcess.CheckManage +{ + + + public partial class RepairAndExpand + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// panelLeftRegion 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel panelLeftRegion; - + /// /// Toolbar4 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar4; - + /// /// drpTrust 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpTrust; - + /// /// Toolbar1 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// txtRepairMonth 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtRepairMonth; - + /// /// Toolbar5 控件。 /// @@ -92,7 +94,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar5; - + /// /// txtSearchCode 控件。 /// @@ -101,7 +103,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtSearchCode; - + /// /// tvControlItem 控件。 /// @@ -110,7 +112,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Tree tvControlItem; - + /// /// panelCenterRegion 控件。 /// @@ -119,7 +121,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel panelCenterRegion; - + /// /// Toolbar2 控件。 /// @@ -128,7 +130,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar2; - + /// /// hdNDEID 控件。 /// @@ -137,7 +139,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.HiddenField hdNDEID; - + /// /// ToolbarFill1 控件。 /// @@ -146,7 +148,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + /// /// btnSave 控件。 /// @@ -155,7 +157,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSave; - + /// /// btnPointAudit 控件。 /// @@ -164,7 +166,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnPointAudit; - + /// /// btnGenerate 控件。 /// @@ -173,7 +175,16 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnGenerate; - + + /// + /// btnDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDelete; + /// /// btnSee 控件。 /// @@ -182,7 +193,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSee; - + /// /// SimpleForm1 控件。 /// @@ -191,7 +202,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// txtPipeCode 控件。 /// @@ -200,7 +211,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtPipeCode; - + /// /// txtWeldJointCode 控件。 /// @@ -209,7 +220,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtWeldJointCode; - + /// /// txtRepairLocation 控件。 /// @@ -218,7 +229,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtRepairLocation; - + /// /// txtWelder 控件。 /// @@ -227,7 +238,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtWelder; - + /// /// txtJudgeGrade 控件。 /// @@ -236,7 +247,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtJudgeGrade; - + /// /// txtCheckDefects 控件。 /// @@ -245,7 +256,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtCheckDefects; - + /// /// drpRepairWelder 控件。 /// @@ -254,7 +265,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpRepairWelder; - + /// /// txtRepairDate 控件。 /// @@ -263,7 +274,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtRepairDate; - + /// /// ckbIsCut 控件。 /// @@ -272,7 +283,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.CheckBox ckbIsCut; - + /// /// lbIsAudit 控件。 /// @@ -281,7 +292,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbIsAudit; - + /// /// Grid1 控件。 /// @@ -290,7 +301,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// Toolbar3 控件。 /// @@ -299,7 +310,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar3; - + /// /// ckbWelder 控件。 /// @@ -308,7 +319,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.CheckBox ckbWelder; - + /// /// ckbPipe 控件。 /// @@ -317,7 +328,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.CheckBox ckbPipe; - + /// /// ckbRepairBefore 控件。 /// @@ -326,7 +337,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.CheckBox ckbRepairBefore; - + /// /// ckbMat 控件。 /// @@ -335,7 +346,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.CheckBox ckbMat; - + /// /// ckbSpec 控件。 /// @@ -344,7 +355,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.CheckBox ckbSpec; - + /// /// ToolbarSeparator1 控件。 /// @@ -353,7 +364,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; - + /// /// ToolbarText1 控件。 /// @@ -362,7 +373,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// @@ -371,7 +382,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSize; - + /// /// Window1 控件。 /// diff --git a/HJGL/FineUIPro.Web/WeldingProcess/CheckManage/RepairNotice.aspx.cs b/HJGL/FineUIPro.Web/WeldingProcess/CheckManage/RepairNotice.aspx.cs index 2059ef1..adc499c 100644 --- a/HJGL/FineUIPro.Web/WeldingProcess/CheckManage/RepairNotice.aspx.cs +++ b/HJGL/FineUIPro.Web/WeldingProcess/CheckManage/RepairNotice.aspx.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using BLL; +using NPOI.SS.Formula.Functions; namespace FineUIPro.Web.WeldingProcess.CheckManage { @@ -27,7 +28,18 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage select x; if (mark.Count() == 0) { - txtRepairMark.Text = "R1"; + if (q.PassFilm != q.TotalFilm) + { + txtRepairMark.Text = "R1"; + } + if (q.Remark.Contains("修磨")) + { + txtRepairMark.Text = "P1"; + } + if (q.Remark.Contains("异物")) + { + txtRepairMark.Text = "S1"; + } } else { @@ -57,54 +69,159 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage var repair = BLL.RepairRecordService.GetRepairRecordByNdeItemId(ndeItemId); Model.Repair_RepairRecord newItem = new Model.Repair_RepairRecord(); + string newJointCode = string.Empty; + if (repair == null) { - newItem.RepairRecordId = SQLHelper.GetNewID(typeof(Model.Repair_RepairRecord)); + if (q.CheckResult != null) + { + newItem.RepairRecordId = SQLHelper.GetNewID(typeof(Model.Repair_RepairRecord)); - string code = q.TrustBatchCode; - if (code.Substring(code.Length - 2, 1) == "R") - { - string first = code.Substring(0, code.Length - 1); - string last = code.Substring(code.Length - 1); - int n = Convert.ToInt32(last) + 1; - newItem.RepairRecordCode = first + n.ToString(); - } - else - { - if (code.Substring(code.Length - 3, 2) == "EX") + string code = q.TrustBatchCode; + if (code.Substring(code.Length - 2, 1) == "R") { - newItem.RepairRecordCode = q.TrustBatchCode.Substring(0, code.Length - 3) + "-" + q.WeldJointCode + "EX1R1"; + string first = code.Substring(0, code.Length - 1); + string last = code.Substring(code.Length - 1); + int n = Convert.ToInt32(last) + 1; + newItem.RepairRecordCode = first + n.ToString(); + newJointCode = q.WeldJointCode.Substring(0, q.WeldJointCode.Length - 2) + "R" + n.ToString(); } else { - if (q.Remark.Contains("修磨")) + if (q.CheckResult != "1") // 不合格 { - newItem.RepairRecordCode = q.TrustBatchCode + "-" + q.WeldJointCode + "P1"; + if (code.Substring(code.Length - 3, 2) == "EX") + { + newItem.RepairRecordCode = q.TrustBatchCode.Substring(0, code.Length - 3) + "-" + "EX1R1"; + } + else + { + newItem.RepairRecordCode = q.TrustBatchCode + "R1"; + } + if (!q.WeldJointCode.Contains("R1")) + { + newJointCode = q.WeldJointCode + "R1"; + } + else + { + newJointCode = q.WeldJointCode; + } } - else if (q.Remark.Contains("异物")) + else // 合格但有修磨或异物 { - newItem.RepairRecordCode = q.TrustBatchCode + "-" + q.WeldJointCode + "S1"; - } - else - { - newItem.RepairRecordCode = q.TrustBatchCode + "-" + q.WeldJointCode + "R1"; + if (q.Remark.Contains("修磨")) + { + newItem.RepairRecordCode = q.TrustBatchCode + "P1"; + if (!q.WeldJointCode.Contains("P1")) + { + newJointCode = q.WeldJointCode + "P1"; + } + else + { + newJointCode = q.WeldJointCode; + } + } + if (q.Remark.Contains("异物")) + { + newItem.RepairRecordCode = q.TrustBatchCode + "S1"; + + if (!q.WeldJointCode.Contains("S1")) + { + newJointCode = q.WeldJointCode + "S1"; + } + else + { + newJointCode = q.WeldJointCode; + } + } } + + #region 原逻辑 + //if (code.Substring(code.Length - 3, 2) == "EX") + //{ + // newItem.RepairRecordCode = q.TrustBatchCode.Substring(0, code.Length - 3) + "-" + "EX1R1"; + // if (!q.WeldJointCode.Contains("R1")) + // { + // newJointCode = q.WeldJointCode + "R1"; + // } + // else + // { + // newJointCode = q.WeldJointCode; + // } + //} + //else + //{ + // if (q.Remark.Contains("修磨")) + // { + // newItem.RepairRecordCode = q.TrustBatchCode + "P1"; + // if (!q.WeldJointCode.Contains("P1")) + // { + // newJointCode = q.WeldJointCode + "P1"; + // } + // else + // { + // newJointCode = q.WeldJointCode; + // } + // } + // else if (q.Remark.Contains("异物")) + // { + // newItem.RepairRecordCode = q.TrustBatchCode + "S1"; + + // if (!q.WeldJointCode.Contains("S1")) + // { + // newJointCode = q.WeldJointCode + "S1"; + // } + // else + // { + // newJointCode = q.WeldJointCode; + // } + // } + // else + // { + // newItem.RepairRecordCode = q.TrustBatchCode + "R1"; + // if (!q.WeldJointCode.Contains("R1")) + // { + // newJointCode = q.WeldJointCode + "R1"; + // } + // else + // { + // newJointCode = q.WeldJointCode; + // } + // } + //} + #endregion } + var isExistRepairRecordCode = from x in Funs.DB.Repair_RepairRecord where x.RepairRecordCode == newItem.RepairRecordCode select x; + if (isExistRepairRecordCode.Count() > 0) + { + ShowNotify("该返修号已存在!请修改已存在的返修号", MessageBoxIcon.Warning); + return; + } + newItem.ProjectId = q.ProjectId; + newItem.UnitId = q.UnitId; + newItem.InstallationId = q.InstallationId; + newItem.WorkAreaId = q.WorkAreaId; + newItem.NoticeDate = DateTime.Now; + newItem.NDEItemID = ndeItemId; + newItem.WeldJointId = q.WeldJointId; + newItem.DetectionTypeId = q.DetectionTypeId; + newItem.WelderId = q.BackingWelderId; + newItem.RepairLocation = q.RepairLocation; + newItem.CheckDefects = txtCheckDefects.Text; + newItem.RepairMark = txtRepairMark.Text; + newItem.PhotoUrl = imgPhoto.ImageUrl; + BLL.RepairRecordService.AddRepairRecord(newItem); + + // 回写焊口号 + var joint = BLL.Pipeline_WeldJointService.GetWeldJointByWeldJointId(q.WeldJointId); + joint.WeldJointCode = newJointCode; + joint.OldWeldJointCode = q.WeldJointCode; + Funs.DB.SubmitChanges(); + } + else + { + ShowNotify("没有检测结果!不能生成委托单", MessageBoxIcon.Warning); } - newItem.ProjectId = q.ProjectId; - newItem.UnitId = q.UnitId; - newItem.InstallationId = q.InstallationId; - newItem.WorkAreaId = q.WorkAreaId; - newItem.NoticeDate = DateTime.Now; - newItem.NDEItemID = ndeItemId; - newItem.WeldJointId = q.WeldJointId; - newItem.DetectionTypeId = q.DetectionTypeId; - newItem.WelderId = q.BackingWelderId; - newItem.RepairLocation = q.RepairLocation; - newItem.CheckDefects = txtCheckDefects.Text; - newItem.RepairMark = txtRepairMark.Text; - newItem.PhotoUrl = imgPhoto.ImageUrl; - BLL.RepairRecordService.AddRepairRecord(newItem); } else { diff --git a/HJGL/FineUIPro.Web/WeldingProcess/TestPackageManage/TestPackageManageAudit.aspx b/HJGL/FineUIPro.Web/WeldingProcess/TestPackageManage/TestPackageManageAudit.aspx index 36a9ce8..af1f4c2 100644 --- a/HJGL/FineUIPro.Web/WeldingProcess/TestPackageManage/TestPackageManageAudit.aspx +++ b/HJGL/FineUIPro.Web/WeldingProcess/TestPackageManage/TestPackageManageAudit.aspx @@ -36,6 +36,23 @@ .f-grid-row.Purple { background-color: Purple; } + + /*定义父容器*/ + .content { + width: 550px; + height: 30px; + background: #E4F1FB; + margin: 0 auto; + } + /*定义进度条*/ + .box { + width: 0px; + height: 30px; + line-height: 30px; + text-align: center; + background: #3BAAE3; + color: #fff; + } @@ -293,6 +310,23 @@ EnableMaximize="true" Target="Top" EnableResize="true" runat="server" IsModal="true" Width="1000px" Height="520px"> + + + + + + + + + diff --git a/HJGL/FineUIPro.Web/WeldingProcess/WeldingReport/RTRateConfirm.aspx.cs b/HJGL/FineUIPro.Web/WeldingProcess/WeldingReport/RTRateConfirm.aspx.cs new file mode 100644 index 0000000..e245a93 --- /dev/null +++ b/HJGL/FineUIPro.Web/WeldingProcess/WeldingReport/RTRateConfirm.aspx.cs @@ -0,0 +1,94 @@ +using BLL; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.WeldingProcess.WeldingReport +{ + public partial class RTRateConfirm : PageBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + BLL.Project_WorkAreaService.InitWorkAreaDropDownList(this.drpWorkAreaId, true, this.CurrUser.LoginProjectId, string.Empty, string.Empty, string.Empty, Resources.Lan.PleaseSelect);//区域 + } + } + + + private void BindGrid() + { + string strSql = @"SELECT t.WorkAreaId,t.PipelineCode,mat.MaterialCode,t.Specification,t.JointTotalNum,t.GJointTotalNum, + welder.WelderCode,t.WeldingNum,t.NdeNum,t.GNdeNum,(CONVERT(NVARCHAR(10),r.DetectionRateValue)+'%') AS DetectionRate, + CONVERT(NVARCHAR(10),((CAST((CASE ISNULL(t.WeldingNum,0) WHEN 0 THEN 0 + ELSE 1.0 * ISNULL(t.NdeNum,0) /(1.0 * t.WeldingNum) + END ) AS DECIMAL(9,2)))*100))+'%' AS CheckRate + FROM + (SELECT pipe.WorkAreaId, jot.PipelineId,pipe.PipelineCode,pipe.MainMaterialId,pipe.DetectionRateId,jot.CoverWelderId, + COUNT(*) AS WeldingNum, pipe.Specification,--MAX(jot.Specification) AS Specification, + (SELECT COUNT(*) FROM dbo.Pipeline_WeldJoint WHERE PipelineId=jot.PipelineId) AS JointTotalNum, + (SELECT COUNT(*) FROM dbo.Pipeline_WeldJoint WHERE PipelineId=jot.PipelineId AND JointAttribute='固定F') AS GJointTotalNum, + (SELECT count(1) FROM Batch_NDEItem as nde + LEFT join Batch_BatchTrustItem as trust ON trust.TrustBatchItemId = nde.TrustBatchItemId + LEFT JOIN View_Pipeline_WeldJoint as joint ON joint.WeldJointId=trust.WeldJointId + WHERE joint.PipelineId=jot.PipelineId and joint.CoverWelderId=jot.CoverWelderId) AS NdeNum, + (SELECT count(1) FROM Batch_NDEItem as nde + LEFT join Batch_BatchTrustItem as trust ON trust.TrustBatchItemId = nde.TrustBatchItemId + LEFT JOIN View_Pipeline_WeldJoint as joint ON joint.WeldJointId=trust.WeldJointId + WHERE joint.PipelineId=jot.PipelineId and joint.CoverWelderId=jot.CoverWelderId AND joint.JointAttribute='固定F') AS GNdeNum + FROM dbo.Pipeline_WeldJoint jot + LEFT JOIN dbo.Pipeline_Pipeline pipe ON pipe.PipelineId = jot.PipelineId + WHERE jot.CoverWelderId IS NOT NULL + GROUP BY pipe.WorkAreaId, jot.PipelineId,pipe.PipelineCode,pipe.MainMaterialId,pipe.Specification,pipe.DetectionRateId,jot.CoverWelderId) t + LEFT JOIN dbo.Base_Material mat ON mat.MaterialId = t.MainMaterialId + LEFT JOIN dbo.Welder_Welder welder ON welder.WelderId = t.CoverWelderId + LEFT JOIN dbo.Base_DetectionRate r ON r.DetectionRateId = t.DetectionRateId + WHERE t.PipelineId=@PipelineId"; + List listStr = new List + { + }; + listStr.Add(new SqlParameter("@PipelineId", this.drpPipeLine.SelectedValue)); + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.DataSource = tb; + Grid1.DataBind(); + + } + + + protected void drpWorkAreaId_OnSelectedIndexChanged(object sender, EventArgs e) + { + string[] workAreaIds = drpWorkAreaId.SelectedValueArray; + if (workAreaIds.Length == 1) + { + BLL.Pipeline_PipelineService.InitPipelineDropDownList(drpPipeLine, workAreaIds[0], Resources.Lan.PleaseSelect); + } + } + + #region 统计按钮事件 + /// + /// 统计 + /// + /// + /// + protected void BtnAnalyse_Click(object sender, EventArgs e) + { + if (drpPipeLine.SelectedValue != null && drpPipeLine.SelectedValue != Const._Null) + { + BindGrid(); + } + else + { + ShowNotify("请选择管线!", MessageBoxIcon.Warning); + } + + } + #endregion + } +} \ No newline at end of file diff --git a/HJGL/FineUIPro.Web/WeldingProcess/WeldingReport/RTRateConfirm.aspx.designer.cs b/HJGL/FineUIPro.Web/WeldingProcess/WeldingReport/RTRateConfirm.aspx.designer.cs new file mode 100644 index 0000000..a0dbd3d --- /dev/null +++ b/HJGL/FineUIPro.Web/WeldingProcess/WeldingReport/RTRateConfirm.aspx.designer.cs @@ -0,0 +1,89 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.WeldingProcess.WeldingReport +{ + + + public partial class RTRateConfirm + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// drpWorkAreaId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpWorkAreaId; + + /// + /// drpPipeLine 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpPipeLine; + + /// + /// BtnAnalyse 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button BtnAnalyse; + } +} diff --git a/HJGL/Model/Model.cs b/HJGL/Model/Model.cs index 71bd9c3..cddaafe 100644 --- a/HJGL/Model/Model.cs +++ b/HJGL/Model/Model.cs @@ -29,10 +29,6 @@ namespace Model #region 可扩展性方法定义 partial void OnCreated(); - partial void OnCreated() - { - this.CommandTimeout = 600; - } partial void InsertAttachFile(AttachFile instance); partial void UpdateAttachFile(AttachFile instance); partial void DeleteAttachFile(AttachFile instance); @@ -34549,6 +34545,8 @@ namespace Model private string _WorkAreaCode; + private string _WorkAreaId; + private string _PipelineCode; private string _PipingClassCode; @@ -34561,6 +34559,8 @@ namespace Model private string _WelderCode; + private string _TeamGroupName; + private string _WeldTypeCode; private System.Nullable _Dia; @@ -34581,6 +34581,8 @@ namespace Model private string _AcceptLevel; + private string _PIPClassCode; + private string _Sheet; private string _PNO; @@ -34833,6 +34835,22 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaId", DbType="NVarChar(50)")] + public string WorkAreaId + { + get + { + return this._WorkAreaId; + } + set + { + if ((this._WorkAreaId != value)) + { + this._WorkAreaId = value; + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PipelineCode", DbType="NVarChar(100)")] public string PipelineCode { @@ -34929,6 +34947,22 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TeamGroupName", DbType="NVarChar(50)")] + public string TeamGroupName + { + get + { + return this._TeamGroupName; + } + set + { + if ((this._TeamGroupName != value)) + { + this._TeamGroupName = value; + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeldTypeCode", DbType="NVarChar(50)")] public string WeldTypeCode { @@ -35089,6 +35123,22 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PIPClassCode", DbType="NVarChar(50)")] + public string PIPClassCode + { + get + { + return this._PIPClassCode; + } + set + { + if ((this._PIPClassCode != value)) + { + this._PIPClassCode = value; + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Sheet", DbType="NVarChar(50)")] public string Sheet { @@ -38184,6 +38234,10 @@ namespace Model private int _IsWelderFirst; + private string _PointState; + + private string _RepairRecordId; + public View_GenerateTrust_FJ() { } @@ -38347,6 +38401,38 @@ namespace Model } } } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PointState", DbType="Char(1)")] + public string PointState + { + get + { + return this._PointState; + } + set + { + if ((this._PointState != value)) + { + this._PointState = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RepairRecordId", DbType="NVarChar(50)")] + public string RepairRecordId + { + get + { + return this._RepairRecordId; + } + set + { + if ((this._RepairRecordId != value)) + { + this._RepairRecordId = value; + } + } + } } [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_GenerateTrustItem")] @@ -38534,6 +38620,10 @@ namespace Model private System.Nullable _Dia; + private string _PointState; + + private string _RepairRecordId; + public View_GenerateTrustItem_FJ() { } @@ -38761,6 +38851,38 @@ namespace Model } } } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PointState", DbType="Char(1)")] + public string PointState + { + get + { + return this._PointState; + } + set + { + if ((this._PointState != value)) + { + this._PointState = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RepairRecordId", DbType="NVarChar(50)")] + public string RepairRecordId + { + get + { + return this._RepairRecordId; + } + set + { + if ((this._RepairRecordId != value)) + { + this._RepairRecordId = value; + } + } + } } [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_Hard_Report")] diff --git a/HJGL/WebApi/obj/Release/WebApi.csproj.AssemblyReference.cache b/HJGL/WebApi/obj/Release/WebApi.csproj.AssemblyReference.cache index 26ed033..b1fb73c 100644 Binary files a/HJGL/WebApi/obj/Release/WebApi.csproj.AssemblyReference.cache and b/HJGL/WebApi/obj/Release/WebApi.csproj.AssemblyReference.cache differ