diff --git a/DataBase/版本日志/SGGLDB_V2025-10-28-001-bwj.sql b/DataBase/版本日志/SGGLDB_V2025-10-28-001-bwj.sql new file mode 100644 index 0000000..ec615a0 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2025-10-28-001-bwj.sql @@ -0,0 +1,90 @@ + +ALTER VIEW [dbo].[V_JOINTVIEW] + +AS + +SELECT jot.JOT_ID, + jot.ProjectId, + WorkArea.WorkAreaId, + WorkArea.WorkAreaCode, + IsoInfo.ISO_ISONO, + jot.JOT_BelongPipe, + jot.JOT_JointNo, + jot.JOT_Dia, + jot.JOT_Sch, + jot.JOT_FactSch, + Steel.MaterialType as MetalType, + cw.wed_code AS JOT_CellWelder, + fw.wed_code AS JOT_FloorWelder, + WeldMethod.WeldingMethodName, + NDTRate.DetectionRate, + (NDTRate.DetectionRate+'%') AS NDTR, + bService.MediumName AS SER_NAME, + WeldReportMain.JOT_WeldDate, + WeldReportMain.JOT_DailyReportNo, + trust.CH_TrustCode AS CH_TRUSTCODE1, + jot.IS_Proess, + trust.CHT_CheckDate AS CHT_CHECKDATE, + CAST(ISNULL(jot.JOT_Size,0) AS DECIMAL(19,2)) AS JOT_Size, + WeldMaterialMat.ConsumablesCode AS WMT_MatCode, + WeldMaterialMat.ConsumablesName AS WMT_Matname, + WeldMaterialSilk.ConsumablesCode AS hsCode, + WeldMaterialSilk.ConsumablesName AS hsname, + jot.JOT_JointDesc, + jot.PW_PointID, + Steel.MaterialCode as STE_Name1,--1 + (CASE WHEN jot.PW_PointID IS NULL THEN '0' ELSE '1' END) AS if_dk, + (CASE WHEN jot.IS_Proess ='1' THEN '' ELSE '' END) AS ProessName, + (CASE WHEN jot.PW_PointID IS NULL THEN '' ELSE '' END) AS if_dkName, + WorkArea.SupervisorUnitId, + jot.JOT_JointStatus, + jot.JOT_ProessDate, + HJGL_Hard_Trust.HardTrustNo HotHardCode,--Ӳίб + HJGL_Hard_Trust.HardTrustDate HotHardDate, --Ӳί + HOTTrust.HotProessTrustNo JOT_HotRpt,--ȴ + HOTTrust.ProessDate --ȴί + ,IsoInfo.UnitId + ,trust.CH_TrustType + ,trust.CH_TrustDate + ,trust.CH_TrustCode + ,TPPackage.PTP_TestPackageNo + ,jot.ISO_Type + ,jot.JOTY_ID + ,WeldType.WeldTypeCode + ,jot.JOT_Location + ,jot.JOT_PrepareTemp +FROM PW_JointInfo AS jot + LEFT JOIN PW_IsoInfo AS IsoInfo ON IsoInfo.ISO_ID = jot.ISO_ID + LEFT JOIN ProjectData_WorkArea AS WorkArea ON WorkArea.WorkAreaId = IsoInfo.WorkAreaId + LEFT JOIN Base_Material AS Steel ON Steel.MaterialId = jot.MaterialId + LEFT JOIN Base_WeldingMethod AS WeldMethod ON WeldMethod.WeldingMethodId = jot.WME_ID + LEFT JOIN Base_DetectionRate AS NDTRate ON NDTRate.DetectionRateId = IsoInfo.DetectionRateId + LEFT JOIN Base_TestMedium AS bService ON bService.TestMediumId = IsoInfo.TestMediumId + LEFT JOIN BO_WeldReportMain AS WeldReportMain ON WeldReportMain.DReportID = jot.DReportID + LEFT JOIN bs_welder AS fw ON jot.JOT_FloorWelder = fw.wed_id + LEFT JOIN bs_welder AS cw ON jot.JOT_CellWelder = cw.wed_id + LEFT JOIN Base_Consumables AS WeldMaterialMat ON WeldMaterialMat.ConsumablesId =jot.JOT_WeldMat + LEFT JOIN Base_Consumables AS WeldMaterialSilk ON WeldMaterialSilk.ConsumablesId =jot.JOT_WeldSilk + LEFT JOIN (SELECT DISTINCT JOT_ID, CH_TrustCode,CH_TrustDate ,Checks.CHT_CheckDate,CH_TrustType FROM CH_TrustItem AS TrustItem + LEFT JOIN CH_Trust AS CH_Trust ON TrustItem.CH_TrustID = CH_Trust.CH_TrustID + LEFT JOIN CH_Check AS Checks ON Checks.CH_TrustID=CH_Trust.CH_TrustID + ) AS trust ON trust.JOT_ID = jot.JOT_ID + LEFT JOIN HJGL_Hard_TrustItem ON HJGL_Hard_TrustItem.WeldJointId=jot.JOT_ID + LEFT JOIN HJGL_Hard_Trust ON HJGL_Hard_Trust.HardTrustID = HJGL_Hard_TrustItem.HardTrustID + LEFT JOIN TP_IsoList TPIso ON IsoInfo.ISO_ID = TPIso.ISO_ID + LEFT JOIN TP_TestPackage TPPackage ON TPPackage.PTP_ID = TPIso.PTP_ID + LEFT JOIN HJGL_HotProess_TrustItem AS HotTrustItem ON jot.JOT_ID=HotTrustItem.WeldJointId + LEFT JOIN HJGL_HotProess_Trust AS HOTTrust ON HOTTrust.HotProessTrustId=HotTrustItem.HotProessTrustId + LEFT JOIN Base_WeldType AS WeldType ON WeldType.WeldTypeId=jot.JOTY_ID + + + + + + + + + +GO + + diff --git a/SGGL/FineUIPro.Web/File/Fastreport/管道焊接工作记录.frx b/SGGL/FineUIPro.Web/File/Fastreport/管道焊接工作记录.frx index 5bf1b35..c1bb68b 100644 --- a/SGGL/FineUIPro.Web/File/Fastreport/管道焊接工作记录.frx +++ b/SGGL/FineUIPro.Web/File/Fastreport/管道焊接工作记录.frx @@ -1,5 +1,5 @@  - + using System; using System.Collections; using System.Collections.Generic; @@ -57,70 +57,18 @@ namespace FastReport } - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -154,8 +102,8 @@ namespace FastReport - - + + @@ -227,7 +175,7 @@ namespace FastReport - + @@ -243,19 +191,19 @@ namespace FastReport - + - - - + + + - - + + @@ -285,7 +233,7 @@ namespace FastReport - + @@ -301,7 +249,7 @@ namespace FastReport - + diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs index 3212599..31ecc8c 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs @@ -59,8 +59,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage //this.SetDailyReportNo(null, null); List GetWeldReportItem = BLL.WeldReportService.GetDistinctWeldReportItem(this.DReportID); + + this.PageInfoLoad(); // 加载页面 this.BindGrid(GetWeldReportItem); // 初始化页面 - this.PageInfoLoad(); // 加载页面 } } #endregion @@ -101,6 +102,40 @@ namespace FineUIPro.Web.HJGL.WeldingManage } BLL.Project_InstallationService.InitInstallationListDownList(this.drpInstallation, this.CurrUser.LoginProjectId, this.drpUnit.SelectedValue, true); this.drpInstallation.SelectedValue = BLL.Const._Null; + + var report = BLL.WeldReportService.GetWeldReportByDReportID(this.DReportID); + if (report != null) + { + //this.txtDailyReportNo.Text = report.JOT_DailyReportNo; + if (!string.IsNullOrEmpty(report.UnitId)) + { + this.drpUnit.SelectedValue = report.UnitId; + this.hdUnitId.Text = report.UnitId; + //this.txtUnitName.Text = BLL.UnitService.GetUnitNameByUnitId(report.UnitId); + } + if (!string.IsNullOrEmpty(report.CHT_Tabler)) + { + this.hdUserId.Text = report.CHT_Tabler; + this.txtUserName.Text = BLL.UserService.GetUserNameByUserId(report.CHT_Tabler); + } + if (!string.IsNullOrEmpty(report.InstallationId)) + { + this.drpInstallation.Items.Clear(); + BLL.Project_InstallationService.InitInstallationListDownList(this.drpInstallation, this.CurrUser.LoginProjectId, this.drpUnit.SelectedValue, true); + this.drpInstallation.SelectedValue = report.InstallationId; + } + this.hdDailyReportNo.Text = report.JOT_DailyReportNo; + this.txtJOT_WeldDate.Text = string.Format("{0:yyyy-MM-dd}", report.JOT_WeldDate); + this.txtCHT_TableDate.Text = string.Format("{0:yyyy-MM-dd}", report.CHT_TableDate); + this.txtJOT_Remark.Text = report.JOT_Remark; + } + else + { + this.SimpleForm1.Reset(); ///重置所有字段 + this.txtJOT_WeldDate.Text = string.Format("{0:yyyy-MM-dd}", System.DateTime.Now); + this.txtCHT_TableDate.Text = string.Format("{0:yyyy-MM-dd}", System.DateTime.Now); + } + ///盖面焊工 this.drpCellWelderCode.Items.Clear(); ///打底焊工 @@ -119,36 +154,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage drpFloorWelderCode.DataSource = BLL.WelderService.GetWelderCodeListByProjectIdAndUnitId(this.CurrUser.LoginProjectId, this.drpUnit.SelectedValue); drpFloorWelderCode.DataBind(); } - var report = BLL.WeldReportService.GetWeldReportByDReportID(this.DReportID); - if (report != null) - { - //this.txtDailyReportNo.Text = report.JOT_DailyReportNo; - if (!string.IsNullOrEmpty(report.UnitId)) - { - - this.hdUnitId.Text = report.UnitId; - //this.txtUnitName.Text = BLL.UnitService.GetUnitNameByUnitId(report.UnitId); - } - if (!string.IsNullOrEmpty(report.CHT_Tabler)) - { - this.hdUserId.Text = report.CHT_Tabler; - this.txtUserName.Text = BLL.UserService.GetUserNameByUserId(report.CHT_Tabler); - } - if (!string.IsNullOrEmpty(report.InstallationId)) - { - this.drpInstallation.SelectedValue = report.InstallationId; - } - this.hdDailyReportNo.Text = report.JOT_DailyReportNo; - this.txtJOT_WeldDate.Text = string.Format("{0:yyyy-MM-dd}", report.JOT_WeldDate); - this.txtCHT_TableDate.Text = string.Format("{0:yyyy-MM-dd}", report.CHT_TableDate); - this.txtJOT_Remark.Text = report.JOT_Remark; - } - else - { - this.SimpleForm1.Reset(); ///重置所有字段 - this.txtJOT_WeldDate.Text = string.Format("{0:yyyy-MM-dd}", System.DateTime.Now); - this.txtCHT_TableDate.Text = string.Format("{0:yyyy-MM-dd}", System.DateTime.Now); - } /////制单人 //this.drpCHT_Tabler.DataTextField = "UserName"; @@ -161,9 +166,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage // this.drpCHT_Tabler.SelectedValue = this.CurrUser.UserId; //} - - + + //BLL.Project_InstallationService.InitInstallationsDropDownList(this.drpInstallation, this.CurrUser.LoginProjectId, true); @@ -207,7 +212,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage // 2.获取当前分页数据 //var table = this.GetPagedDataTable(GridNewDynamic, tb1); Grid1.RecordCount = tb.Rows.Count; - tb = GetFilteredTable(Grid1.FilteredData, tb); + //tb = GetFilteredTable(Grid1.FilteredData, tb); var table = this.GetPagedDataTable(Grid1, tb); Grid1.DataSource = table; @@ -250,108 +255,111 @@ namespace FineUIPro.Web.HJGL.WeldingManage } List GetWeldReportItem = this.CollectGridJointInfo(); - Model.BO_WeldReportMain newWeldReportMain = new Model.BO_WeldReportMain(); - newWeldReportMain.ProjectId = this.CurrUser.LoginProjectId; - //newWeldReportMain.JOT_DailyReportNo = this.txtDailyReportNo.Text.Trim(); - if (this.drpUnit.SelectedValue != BLL.Const._Null) + if (GetWeldReportItem.Count > 0) { - newWeldReportMain.UnitId = this.drpUnit.SelectedValue; - } - //if (!string.IsNullOrEmpty(this.CurrUser.UnitId)) - //{ - // newWeldReportMain.UnitId = this.CurrUser.UnitId; - //} - if (this.drpInstallation.SelectedValue != BLL.Const._Null&&!string.IsNullOrEmpty(this.drpInstallation.SelectedValue)) - { - newWeldReportMain.InstallationId = this.drpInstallation.SelectedValue; - } - DateTime? weldDate = Funs.GetNewDateTime(this.txtJOT_WeldDate.Text); - if (weldDate.HasValue) - { - newWeldReportMain.JOT_WeldDate = weldDate.Value; - } - else - { - newWeldReportMain.JOT_WeldDate = System.DateTime.Now; - } - //if (this.drpCHT_Tabler.SelectedValue != BLL.Const._Null) - //{ - // newWeldReportMain.CHT_Tabler = this.drpCHT_Tabler.SelectedValue; - //} - if (!string.IsNullOrEmpty(this.CurrUser.UserId)) - { - newWeldReportMain.CHT_Tabler = this.CurrUser.UserId; - } - newWeldReportMain.CHT_TableDate = Funs.GetNewDateTime(this.txtCHT_TableDate.Text); - newWeldReportMain.JOT_Remark = this.txtJOT_Remark.Text.Trim(); - - if (!string.IsNullOrEmpty(this.DReportID)) - { - newWeldReportMain.JOT_DailyReportNo = this.hdDailyReportNo.Text.Trim(); - newWeldReportMain.DReportID = this.DReportID; - BLL.WeldReportService.UpdateWeldReport(newWeldReportMain); - BLL.LogService.AddSys_Log(this.CurrUser, newWeldReportMain.JOT_DailyReportNo, this.DReportID, BLL.Const.HJGL_WeldReportMenuId, "修改焊接日报信息"); - } - else - { - #region 自动生成日报告号 - var workAreaCode = string.Empty; - var welderCode = string.Empty; - string jotId = GetWeldReportItem.FirstOrDefault().JOT_ID; - if (!string.IsNullOrEmpty(jotId)) + Model.BO_WeldReportMain newWeldReportMain = new Model.BO_WeldReportMain(); + newWeldReportMain.ProjectId = this.CurrUser.LoginProjectId; + //newWeldReportMain.JOT_DailyReportNo = this.txtDailyReportNo.Text.Trim(); + if (this.drpUnit.SelectedValue != BLL.Const._Null) { - var jotInfo = BLL.PW_JointInfoService.GetJointInfoByJotID(jotId); - if (jotInfo != null) + newWeldReportMain.UnitId = this.drpUnit.SelectedValue; + } + //if (!string.IsNullOrEmpty(this.CurrUser.UnitId)) + //{ + // newWeldReportMain.UnitId = this.CurrUser.UnitId; + //} + if (this.drpInstallation.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpInstallation.SelectedValue)) + { + newWeldReportMain.InstallationId = this.drpInstallation.SelectedValue; + } + DateTime? weldDate = Funs.GetNewDateTime(this.txtJOT_WeldDate.Text); + if (weldDate.HasValue) + { + newWeldReportMain.JOT_WeldDate = weldDate.Value; + } + else + { + newWeldReportMain.JOT_WeldDate = System.DateTime.Now; + } + //if (this.drpCHT_Tabler.SelectedValue != BLL.Const._Null) + //{ + // newWeldReportMain.CHT_Tabler = this.drpCHT_Tabler.SelectedValue; + //} + if (!string.IsNullOrEmpty(this.CurrUser.UserId)) + { + newWeldReportMain.CHT_Tabler = this.CurrUser.UserId; + } + newWeldReportMain.CHT_TableDate = Funs.GetNewDateTime(this.txtCHT_TableDate.Text); + newWeldReportMain.JOT_Remark = this.txtJOT_Remark.Text.Trim(); + + if (!string.IsNullOrEmpty(this.DReportID)) + { + newWeldReportMain.JOT_DailyReportNo = this.hdDailyReportNo.Text.Trim(); + newWeldReportMain.DReportID = this.DReportID; + BLL.WeldReportService.UpdateWeldReport(newWeldReportMain); + BLL.LogService.AddSys_Log(this.CurrUser, newWeldReportMain.JOT_DailyReportNo, this.DReportID, BLL.Const.HJGL_WeldReportMenuId, "修改焊接日报信息"); + } + else + { + #region 自动生成日报告号 + var workAreaCode = string.Empty; + var welderCode = string.Empty; + string jotId = GetWeldReportItem.FirstOrDefault().JOT_ID; + if (!string.IsNullOrEmpty(jotId)) { - if (!string.IsNullOrEmpty(jotInfo.ISO_ID)) + var jotInfo = BLL.PW_JointInfoService.GetJointInfoByJotID(jotId); + if (jotInfo != null) { - var isoInfo = BLL.PW_IsoInfoService.GetIsoInfoByIsoInfoId(jotInfo.ISO_ID); - if (isoInfo != null) + if (!string.IsNullOrEmpty(jotInfo.ISO_ID)) { - workAreaCode = BLL.WorkAreaService.GetWorkAreaCodeByWorkAreaId(isoInfo.WorkAreaId); + var isoInfo = BLL.PW_IsoInfoService.GetIsoInfoByIsoInfoId(jotInfo.ISO_ID); + if (isoInfo != null) + { + workAreaCode = BLL.WorkAreaService.GetWorkAreaCodeByWorkAreaId(isoInfo.WorkAreaId); + } } } } + string welderId = GetWeldReportItem.FirstOrDefault().JOT_CellWelder; + if (!string.IsNullOrEmpty(welderId)) + { + welderCode = BLL.WelderService.GetWelderById(welderId).WED_Code; + } + string perfix = workAreaCode + "-" + welderCode + "-"; + newWeldReportMain.JOT_DailyReportNo = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.BO_WeldReportMain", "JOT_DailyReportNo", this.CurrUser.LoginProjectId, perfix); + #endregion + + this.DReportID = SQLHelper.GetNewID(typeof(Model.BO_WeldReportMain)); + newWeldReportMain.DReportID = this.DReportID; + BLL.WeldReportService.AddWeldReport(newWeldReportMain); + BLL.LogService.AddSys_Log(this.CurrUser, newWeldReportMain.JOT_DailyReportNo, this.DReportID, BLL.Const.HJGL_WeldReportMenuId, "添加焊接日报信息"); } - string welderId = GetWeldReportItem.FirstOrDefault().JOT_CellWelder; - if (!string.IsNullOrEmpty(welderId)) + + foreach (var item in GetWeldReportItem) { - welderCode = BLL.WelderService.GetWelderById(welderId).WED_Code; + Model.PW_JointInfo jot = BLL.PW_JointInfoService.GetJointInfoByJotID(item.JOT_ID); + jot.DReportID = newWeldReportMain.DReportID; + jot.JOT_CellWelder = item.JOT_CellWelder; + jot.JOT_FloorWelder = item.JOT_FloorWelder; + jot.WLO_Code = item.WLO_Code == "安装" ? "F" : "S"; + jot.JOT_JointAttribute = item.JOT_JointAttribute; + jot.JOT_Location = item.JOT_Location; + jot.JOT_DoneDin = item.JOT_DoneDin; + jot.JOT_Electricity = item.JOT_Electricity; + jot.JOT_Voltage = item.JOT_Voltage; + jot.JOT_JointStatus = "100"; + jot.WeldingSpeed = item.WeldingSpeed; + jot.JOT_PrepareTemp = item.JOT_PrepareTemp; + jot.ActualPrepareTemp = item.ActualPrepareTemp; + jot.JOT_CellTemp = item.JOT_CellTemp; + jot.JOT_LastTemp = item.JOT_LastTemp; + BLL.PW_JointInfoService.UpdateJointInfoByDReport(jot); + //更新焊口号 修改固定焊口号后 +G + BLL.PW_JointInfoService.UpdateJointNoAddG(item.JOT_ID, item.JOT_JointAttribute, "Add"); } - string perfix = workAreaCode + "-" + welderCode + "-"; - newWeldReportMain.JOT_DailyReportNo = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.BO_WeldReportMain", "JOT_DailyReportNo", this.CurrUser.LoginProjectId, perfix); - #endregion - - this.DReportID = SQLHelper.GetNewID(typeof(Model.BO_WeldReportMain)); - newWeldReportMain.DReportID = this.DReportID; - BLL.WeldReportService.AddWeldReport(newWeldReportMain); - BLL.LogService.AddSys_Log(this.CurrUser, newWeldReportMain.JOT_DailyReportNo, this.DReportID, BLL.Const.HJGL_WeldReportMenuId, "添加焊接日报信息"); + ShowNotify("提交成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); } - - foreach (var item in GetWeldReportItem) - { - Model.PW_JointInfo jot = BLL.PW_JointInfoService.GetJointInfoByJotID(item.JOT_ID); - jot.DReportID = newWeldReportMain.DReportID; - jot.JOT_CellWelder = item.JOT_CellWelder; - jot.JOT_FloorWelder = item.JOT_FloorWelder; - jot.WLO_Code = item.WLO_Code == "安装" ? "F" : "S"; - jot.JOT_JointAttribute = item.JOT_JointAttribute; - jot.JOT_Location = item.JOT_Location; - jot.JOT_DoneDin = item.JOT_DoneDin; - jot.JOT_Electricity = item.JOT_Electricity; - jot.JOT_Voltage = item.JOT_Voltage; - jot.JOT_JointStatus = "100"; - jot.WeldingSpeed = item.WeldingSpeed; - jot.JOT_PrepareTemp = item.JOT_PrepareTemp; - jot.ActualPrepareTemp = item.ActualPrepareTemp; - jot.JOT_CellTemp = item.JOT_CellTemp; - jot.JOT_LastTemp = item.JOT_LastTemp; - BLL.PW_JointInfoService.UpdateJointInfoByDReport(jot); - //更新焊口号 修改固定焊口号后 +G - BLL.PW_JointInfoService.UpdateJointNoAddG(item.JOT_ID, item.JOT_JointAttribute, "Add"); - } - ShowNotify("提交成功!", MessageBoxIcon.Success); - PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); } else { diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingReport/JointComprehensive.aspx b/SGGL/FineUIPro.Web/HJGL/WeldingReport/JointComprehensive.aspx index eea5517..2230105 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingReport/JointComprehensive.aspx +++ b/SGGL/FineUIPro.Web/HJGL/WeldingReport/JointComprehensive.aspx @@ -7,47 +7,55 @@ 焊口综合信息 + /*定义父容器*/ + .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; + } + -
+ - + + + + - - + + - <%-- --%> @@ -123,7 +131,7 @@ color: #fff; - + FieldType="Date" Renderer="Date" HeaderTextAlign="Center" TextAlign="Left" Width="100px"> @@ -172,7 +180,7 @@ color: #fff; - @@ -190,25 +198,30 @@ color: #fff; -