diff --git a/.gitignore b/.gitignore index 0623f6c..e82d945 100644 --- a/.gitignore +++ b/.gitignore @@ -5731,3 +5731,4 @@ HJGLPackFile/版本日志/HJGLDB_2024.05.02.sql /HJGL/FineUIPro.Web/File/Excel /HJGLPackFile/PackFile /HJGL/.vs/HJGL/v17/.suo +/CreateModel2017.bat diff --git a/DataBase/版本日志/HJGLDB_2024.05.12.sql b/DataBase/版本日志/HJGLDB_2024.05.12.sql new file mode 100644 index 0000000..da44f3e --- /dev/null +++ b/DataBase/版本日志/HJGLDB_2024.05.12.sql @@ -0,0 +1,215 @@ + +ALTER VIEW [dbo].[View_Pipeline_WeldJoint] +AS +/************Ϣͼ*****************/ +SELECT WeldJoint.WeldJointId, +WeldJoint.ProjectId, +WeldJoint.PipelineId, +WeldJoint.WeldJointCode, +dbo.Fun_GetParseInt(WeldJoint.WeldJointCode) AS ConvertWeldJoint, +WeldJoint.WeldTypeId, +WeldJoint.Material1Id, +WeldJoint.Material2Id, +WeldJoint.ANSISCH, +WeldJoint.Thickness, +WeldJoint.Dia, +WeldJoint.Size, +WeldJoint.JointAttribute, +WeldJoint.JointArea, +WeldJoint.WeldingMethodId, +WeldJoint.IsHotProess, +WeldJoint.WeldingLocationId, +WeldJoint.WeldMatId, +WeldJoint.WeldSilkId, +WeldJoint.GrooveTypeId, +WeldJoint.PipeSegment, +WeldJoint.PipeAssembly1Id, +WeldJoint.PipeAssembly2Id, +WeldJoint.PipeAssemblyCount, +WeldJoint.HeartNo1, +WeldJoint.HeartNo2, +WeldJoint.LastTemp, +WeldJoint.CellTemp, +WeldJoint.PrepareTemp, +WeldJoint.Electricity, +WeldJoint.SystemNumber, +WeldJoint.Remark, +WeldJoint.DoneDin, +WeldJoint.Voltage, +WeldJoint.TestPackageNo, +WeldJoint.WeldingDailyCode, +WeldJoint.WeldingDailyId, +WeldJoint.BackingWelderId, +WeldJoint.CoverWelderId, +WeldJoint.PipingClassId, +WeldJoint.Specification, +WeldJoint.CancelResult, +Project.ProjectCode, +Project.ProjectName, +Pipeline.PipelineCode, +Pipeline.InstallationId, +Pipeline.UnitId, +Pipeline.SingleNumber, +Pipeline.WorkAreaId, +WeldType.WeldTypeCode, +Material1.MaterialCode AS Material1Code, +Material2.MaterialCode AS Material2Code, +WeldingMethod.WeldingMethodCode, +WeldingLocation.WeldingLocationCode, +WeldMat.ConsumablesCode AS WeldMatCode, +--WeldSilk.ConsumablesCode AS WeldSilkCode, +'' AS WeldSilkCode, +GrooveType.GrooveTypeCode, +CASE WHEN WeldJoint.WeldingDailyId IS NULL THEN '' ELSE '' END AS Is_hjName, +CASE WHEN WeldJoint.IsHotProess=1 THEN '' ELSE '' END AS IsHotProessStr, +Components1.ComponentsCode AS ComponentsCode1, +Components2.ComponentsCode AS ComponentsCode2, +BackingWelder.WelderCode AS BackingWelderCode, +BackingWelder.WelderName AS BackingWelderName, +CoverWelder.WelderCode AS CoverWelderCode, +CoverWelder.WelderName AS CoverWelderName, +(CASE WHEN CoverWelder.WelderCode IS NOT NULL AND BackingWelder.WelderCode IS NOT NULL + THEN CoverWelder.WelderCode + '/' + BackingWelder.WelderCode + ELSE (ISNULL(CoverWelder.WelderCode,'') + ISNULL(BackingWelder.WelderCode,'')) END) AS WelderCode, -- + (CASE WHEN Material1.MaterialCode IS NOT NULL AND Material2.MaterialCode IS NOT NULL + THEN Material1.MaterialCode + '/' + Material2.MaterialCode + ELSE (ISNULL(Material1.MaterialCode,'') + ISNULL(Material2.MaterialCode,'')) END) AS MaterialCode, -- +pipingClass.PipingClassCode,pip.PIPClassCode, +CONVERT(VARCHAR(100), WeldingDaily.WeldingDate, 23) AS WeldingDate, +WeldJoint.IsCancel, +WeldJoint.IsGoldJoint, +WeldJoint.WPQId,wps.WPQCode, +WeldJoint.DetectionType, +WeldJoint.PageNum +FROM Pipeline_WeldJoint AS WeldJoint +LEFT JOIN Base_Project AS Project ON Project.ProjectId=WeldJoint.ProjectId +LEFT JOIN Pipeline_Pipeline AS Pipeline ON Pipeline.PipelineId = WeldJoint.PipelineId +LEFT JOIN Base_WeldType AS WeldType ON WeldType.WeldTypeId=WeldJoint.WeldTypeId +LEFT JOIN Base_Material AS Material1 ON Material1.MaterialId = WeldJoint.Material1Id +LEFT JOIN Base_Material AS Material2 ON Material2.MaterialId = WeldJoint.Material2Id +LEFT JOIN Base_WeldingMethod AS WeldingMethod ON WeldingMethod.WeldingMethodId=WeldJoint.WeldingMethodId +LEFT JOIN Base_WeldingLocation AS WeldingLocation ON WeldingLocation.WeldingLocationId=WeldJoint.WeldingLocationId +LEFT JOIN Base_Consumables AS WeldMat ON WeldMat.ConsumablesId=WeldJoint.WeldMatId +--LEFT JOIN Base_Consumables AS WeldSilk ON WeldSilk.ConsumablesId=WeldJoint.WeldSilkId +LEFT JOIN Base_GrooveType AS GrooveType ON GrooveType.GrooveTypeId=WeldJoint.GrooveTypeId +LEFT JOIN Base_Components AS Components1 ON Components1.ComponentsId = WeldJoint.PipeAssembly1Id +LEFT JOIN Base_Components AS Components2 ON Components2.ComponentsId = WeldJoint.PipeAssembly2Id +LEFT JOIN Welder_Welder AS BackingWelder ON BackingWelder.WelderId=WeldJoint.BackingWelderId +LEFT JOIN Welder_Welder AS CoverWelder ON CoverWelder.WelderId=WeldJoint.CoverWelderId +LEFT JOIN Pipeline_WeldingDaily AS WeldingDaily ON WeldingDaily.WeldingDailyId=WeldJoint.WeldingDailyId +LEFT JOIN Base_PipingClass AS pipingClass ON pipingClass.PipingClassId=WeldJoint.PipingClassId +LEFT JOIN dbo.Base_PIPClass pip ON pip.PIPClassId = Pipeline.PIPClassId +LEFT JOIN dbo.WPQ_WPQList wps ON wps.WPQId=WeldJoint.WPQId + + + +GO + + + + +ALTER PROC [dbo].[sp_rpt_JointComprehensive] + @projectId NVARCHAR(50), + @workAreaId NVARCHAR(50)=NULL, + @pipelineIds NVARCHAR(MAX) = NULL + +AS +/**********ۺϢ**********/ +SELECT + weldJoint.WeldJointId, + weldJoint.ProjectId, + WorkArea.WorkAreaId, + WorkArea.WorkAreaCode, + weldJoint.SystemNumber, + weldJoint.TestPackageNo, + pipeline.SingleNumber, + pipeline.PipelineCode, + pipeline.DrawingsNum, + pipingClass.PipingClassCode,pip.PIPClassCode, + weldJoint.PageNum, + weldJoint.PipeSegment,--ܶ + weldJoint.WeldJointCode, + weldType.WeldTypeCode, + weldJoint.JointAttribute, + wl.WeldingLocationCode, + weldJoint.Dia, + weldJoint.Thickness,--ں + weldJoint.HeartNo1, + weldJoint.HeartNo2, + com1.ComponentsName AS PipeAssembly1, + com2.ComponentsName AS PipeAssembly2, + --material.MaterialCode, + mat1.MaterialCode AS MaterialCode1, + mat2.MaterialCode AS MaterialCode2, + cw.WelderCode AS CoverWelderCode, + fw.WelderCode AS BackingWelderCode, + WeldMethod.WeldingMethodName, + medium.MediumName, + weldingDaily.WeldingDate, + weldingDaily.WeldingDailyCode, + trust.TrustBatchCode, + --TrustBatchCode.DetectionRateCode, + --TrustBatchCode.AcceptLevel, + (CASE WHEN weldJoint.IsHotProess=1 THEN '' ELSE '' END) AS IsHotProess, + null as TrustBatchCode, + null as DetectionRateCode, + null as AcceptLevel, + nde.NDEDate AS CHT_CHECKDATE, + ndeItem.NDEReportNo, + CAST(CAST(ISNULL(weldJoint.Size,0) AS REAL) AS NVARCHAR(8)) AS JOT_Size, + WeldMaterialMat.ConsumablesCode AS WMT_MatCode, + WeldMaterialMat.ConsumablesName AS WMT_Matname, + weldJoint.WeldSilkId, + --WeldMaterialSilk.ConsumablesCode AS hsCode, + --WeldMaterialSilk.ConsumablesName AS hsname, + --WeldMaterialSilk.UserFlux, + weldJoint.Specification, + wps.WPQCode,ndttype.DetectionTypeCode,NULL AS HotReportCode, + (CASE WHEN (PointBatchItem.PointState='1' OR PointBatchItem.PointState='2') + THEN (CASE WHEN PointBatchItem.IsWelderFirst=1 THEN '' ELSE '' END) ELSE '' END) AS if_dk +FROM Pipeline_WeldJoint AS weldJoint + LEFT JOIN Pipeline_Pipeline AS pipeline ON pipeline.PipelineId = weldJoint.PipelineId + LEFT JOIN Project_WorkArea AS WorkArea ON WorkArea.WorkAreaId = pipeline.WorkAreaId + LEFT JOIN Base_Material AS mat1 ON mat1.MaterialId = weldJoint.Material1Id + LEFT JOIN Base_Material AS mat2 ON mat2.MaterialId = weldJoint.Material2Id + LEFT JOIN Base_WeldingMethod AS WeldMethod ON WeldMethod.WeldingMethodId = weldJoint.WeldingMethodId + LEFT JOIN dbo.Base_WeldType weldType ON weldType.WeldTypeId = weldJoint.WeldTypeId + LEFT JOIN dbo.Base_WeldingLocation wl ON wl.WeldingLocationId = weldJoint.WeldingLocationId + LEFT JOIN Base_Medium AS medium ON medium.MediumId = pipeline.MediumId + LEFT JOIN Base_Components com1 ON com1.ComponentsId=weldJoint.PipeAssembly1Id + LEFT JOIN Base_Components com2 ON com2.ComponentsId=weldJoint.PipeAssembly2Id + LEFT JOIN Base_PipingClass AS pipingClass ON pipingClass.PipingClassId=WeldJoint.PipingClassId + LEFT JOIN dbo.Base_PIPClass pip ON pip.PIPClassId = Pipeline.PIPClassId + LEFT JOIN Pipeline_WeldingDaily AS weldingDaily ON weldingDaily.WeldingDailyId = weldJoint.WeldingDailyId + LEFT JOIN dbo.WPQ_WPQList wps ON wps.WPQId = weldJoint.WPQId + left join Welder_Welder AS fw on weldJoint.BackingWelderId = fw.WelderId + left join Welder_Welder AS cw on weldJoint.CoverWelderId = cw.WelderId + LEFT JOIN Base_Consumables AS WeldMaterialMat ON WeldMaterialMat.ConsumablesId =weldJoint.WeldMatId + --LEFT JOIN Base_Consumables AS WeldMaterialSilk ON WeldMaterialSilk.ConsumablesId =weldJoint.WeldSilkId + LEFT JOIN Batch_PointBatchItem AS PointBatchItem ON PointBatchItem.WeldJointId =weldJoint.WeldJointId + LEFT JOIN dbo.Batch_PointBatch point ON point.PointBatchId = PointBatchItem.PointBatchId + LEFT JOIN dbo.Base_DetectionType ndttype ON ndttype.DetectionTypeId = point.DetectionTypeId + LEFT JOIN dbo.Batch_BatchTrustItem trustItem ON trustItem.PointBatchItemId = PointBatchItem.PointBatchItemId + LEFT JOIN dbo.Batch_BatchTrust trust ON trust.TrustBatchId = trustItem.TrustBatchId + LEFT JOIN dbo.Batch_NDEItem ndeItem ON ndeItem.TrustBatchItemId = trustItem.TrustBatchItemId + LEFT JOIN dbo.Batch_NDE nde ON nde.NDEID = ndeItem.NDEID + + WHERE weldJoint.ProjectId=@projectId + AND(pipeline.WorkAreaId=@workAreaId OR @workAreaId IS NULL) + AND (CHARINDEX(weldJoint.PipelineId,@pipelineIds)>0 or @pipelineIds IS NULl) + --AND(pipeline.PipelineCode=@pipelineCode OR @pipelineCode IS NULl) + + GO + + +UPDATE dbo.Template_Files SET title=REPLACE(title,cast(sortindex as nvarchar(50))+'-','') +GO + +UPDATE dbo.Template_Files SET SortIndex=SortIndex+1 where SortIndex>24 +GO + +INSERT INTO [dbo].[Template_Files]([id],[title],[filePath],[SortIndex]) +VALUES('95125974-3DD4-4E16-B4F0-A9D9C9A1406D','ܵӽͷPMIȷϱ','',25) +GO + + diff --git a/HJGL/.vs/HJGL/config/applicationhost.config b/HJGL/.vs/HJGL/config/applicationhost.config index b8c8efa..9292fa5 100644 --- a/HJGL/.vs/HJGL/config/applicationhost.config +++ b/HJGL/.vs/HJGL/config/applicationhost.config @@ -162,7 +162,7 @@ - + @@ -250,7 +250,7 @@ - + diff --git a/HJGL/BLL/Common/ReportPrint/Common_ReportPrintService.cs b/HJGL/BLL/Common/ReportPrint/Common_ReportPrintService.cs index 1f51f99..2226f9b 100644 --- a/HJGL/BLL/Common/ReportPrint/Common_ReportPrintService.cs +++ b/HJGL/BLL/Common/ReportPrint/Common_ReportPrintService.cs @@ -28,7 +28,7 @@ namespace BLL dic.Add("管道无损检测结果汇总表", BLL.Const.NdtTotalReport1); dic.Add("管道无损检测结果汇总表(续)", BLL.Const.NdtTotalReport2); dic.Add("管道无损检测比例统计表", BLL.Const.NdtRateReport1); - + return dic; } @@ -36,9 +36,17 @@ namespace BLL /// 试压包打印下拉项 /// /// - public static List TestPackageSelectPrint() + public static object TestPackageSelectPrint() { - var result = Funs.DB.Template_Files.OrderBy(t=>t.SortIndex).ToList(); + //var result = Funs.DB.Template_Files.OrderBy(t=>t.SortIndex).ToList(); + var result = (from x in Funs.DB.Template_Files + select new + { + Id = x.Id, + FilePath = x.FilePath, + SortIndex = x.SortIndex, + Title = (x.SortIndex ?? 0).ToString() + "-" + x.Title, + }).OrderBy(t => t.SortIndex).ToList(); return result; } } diff --git a/HJGL/FineUIPro.Web/File/Excel/JointComprehensive.xlsx b/HJGL/FineUIPro.Web/File/Excel/JointComprehensive.xlsx index 7e6d7f7..9bb2609 100644 Binary files a/HJGL/FineUIPro.Web/File/Excel/JointComprehensive.xlsx and b/HJGL/FineUIPro.Web/File/Excel/JointComprehensive.xlsx differ diff --git a/HJGL/FineUIPro.Web/FineUIPro.Web.csproj.user b/HJGL/FineUIPro.Web/FineUIPro.Web.csproj.user index 6f3d27a..8d0cdf2 100644 --- a/HJGL/FineUIPro.Web/FineUIPro.Web.csproj.user +++ b/HJGL/FineUIPro.Web/FineUIPro.Web.csproj.user @@ -15,9 +15,8 @@ - - - CurrentPage + Login.aspx + SpecificPage True False False diff --git a/HJGL/FineUIPro.Web/Web.config b/HJGL/FineUIPro.Web/Web.config index baa8804..9ecdad1 100644 --- a/HJGL/FineUIPro.Web/Web.config +++ b/HJGL/FineUIPro.Web/Web.config @@ -9,7 +9,7 @@
- + diff --git a/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDetectionEntry.aspx b/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDetectionEntry.aspx new file mode 100644 index 0000000..79410dd --- /dev/null +++ b/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDetectionEntry.aspx @@ -0,0 +1,177 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PMIDetectionEntry.aspx.cs" Inherits="FineUIPro.Web.WeldingProcess.PMI.PMIDetectionEntry" %> + + + + + + + PMI检测录入 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDetectionEntry.aspx.cs b/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDetectionEntry.aspx.cs new file mode 100644 index 0000000..92ae0a2 --- /dev/null +++ b/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDetectionEntry.aspx.cs @@ -0,0 +1,298 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using BLL; +using System.Web; +using System.Collections; +using Model; +using static System.Windows.Forms.VisualStyles.VisualStyleElement; + +namespace FineUIPro.Web.WeldingProcess.PMI +{ + public partial class PMIDetectionEntry : PageBase + { + #region 定义项 + /// + /// 检测单主键 + /// + public string PMIID + { + get + { + return (string)ViewState["PMIID"]; + } + set + { + ViewState["PMIID"] = value; + } + } + #endregion + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.txtNDEDateMonth.Text = string.Format("{0:yyyy-MM}", DateTime.Now); + this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); + this.PMIID = string.Empty; + this.InitTreeMenu();//加载树 + } + } + + #region 加载树 + /// + /// 加载树 + /// + private void InitTreeMenu() + { + if (!string.IsNullOrEmpty(this.txtNDEDateMonth.Text.Trim())) + { + DateTime startTime = Convert.ToDateTime(this.txtNDEDateMonth.Text.Trim() + "-01"); + DateTime endTime = startTime.AddMonths(1); + this.tvControlItem.Nodes.Clear(); + List units = new List(); + Model.Project_Unit pUnit = BLL.Project_UnitService.GetProject_UnitByProjectIdUnitId(this.CurrUser.LoginProjectId, this.CurrUser.UnitId); + if (pUnit == null || pUnit.UnitType == BLL.Const.UnitType_1 || pUnit.UnitType == BLL.Const.UnitType_2 + || pUnit.UnitType == BLL.Const.UnitType_3 || pUnit.UnitType == BLL.Const.UnitType_4 + || pUnit.UnitType == BLL.Const.UnitType_6) + { + units = (from x in Funs.DB.Base_Unit + join y in Funs.DB.Project_Unit on x.UnitId equals y.UnitId + where y.ProjectId == this.CurrUser.LoginProjectId && y.UnitType.Contains(BLL.Const.UnitType_5) + select x).ToList(); + } + else + { + units.Add(BLL.Base_UnitService.GetUnit(this.CurrUser.UnitId)); + } + if (units != null) + { + foreach (var unit in units) + { + TreeNode newNode = new TreeNode();//定义根节点 + newNode.Text = unit.UnitName; + newNode.NodeID = unit.UnitId; + newNode.Expanded = true; + newNode.ToolTip = "Unit"; + this.tvControlItem.Nodes.Add(newNode); + this.BindNodes(newNode); + } + } + else + { + Alert.ShowInTop(Resources.Lan.PleaseAddUnitFirst, MessageBoxIcon.Warning); + } + } + else + { + Alert.ShowInTop(Resources.Lan.PleaseSelectTrustMonth, MessageBoxIcon.Warning); + } + } + + /// + /// 绑定树节点 + /// + /// + private void BindNodes(TreeNode node) + { + if (node.ToolTip == "Unit") + { + ///装置 + var install = (from x in Funs.DB.Project_Installation + join y in Funs.DB.PMI_Delegation on x.InstallationId equals y.InstallationId + where y.UnitId == node.NodeID && x.ProjectId == this.CurrUser.LoginProjectId + orderby x.InstallationCode + select x).Distinct(); + foreach (var q in install) + { + TreeNode newNode = new TreeNode(); + newNode.Text = q.InstallationName; + newNode.NodeID = q.InstallationId + "|" + node.NodeID; + newNode.ToolTip = "Installation"; + node.Nodes.Add(newNode); + BindNodes(newNode); + } + } + else if (node.ToolTip == "Installation") + { + string[] unitAndInstallationArr= node.NodeID.Split('|'); + var ndt = from x in Funs.DB.PMI_Delegation where x.UnitId == unitAndInstallationArr[1] + && x.InstallationId == unitAndInstallationArr[0] + && x.ProjectId == this.CurrUser.LoginProjectId select x; + foreach (var q in ndt) + { + + TreeNode newNode = new TreeNode(); + newNode.Text = q.DelegationNo; + newNode.NodeID = q.Id; + newNode.ToolTip = "DelegationNo"; + newNode.EnableClickEvent = true; + node.Nodes.Add(newNode); + BindNodes(newNode); + } + } + } + #endregion + + #region 点击TreeView + /// + /// 点击TreeView + /// + /// + /// + protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e) + { + this.PMIID = tvControlItem.SelectedNodeID; + this.hdPMIId.Text = this.PMIID; + this.BindGrid(); + } + #endregion + + #region 数据绑定 + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + + /// + /// 数据绑定 + /// + private void BindGrid() + { + if (!string.IsNullOrWhiteSpace(this.hdPMIId.Text) && this.tvControlItem.SelectedNode.ToolTip == "DelegationNo") + { + this.SetTextTemp(); + this.PageInfoLoad(); ///页面输入提交信息 + + } + } + + #region 加载页面输入提交信息 + /// + /// 加载页面输入提交信息 + /// + private void PageInfoLoad() + { + this.SimpleForm1.Reset(); ///重置所有字段 + var pageInfo = (from x in Funs.DB.PMI_Delegation + join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId + join n in Funs.DB.Project_Installation on x.InstallationId equals n.InstallationId + join u in Funs.DB.Sys_User on x.DetectionStandard equals u.UserId into u1 //左连接查询 + from u in u1.DefaultIfEmpty() + where x.Id==hdPMIId.Text + select new { DelegationNo=x.DelegationNo, + DelegationDate=x.DelegationDate, + InstallationName=n.InstallationName, + UnitName=y.UnitName, + DetectionMethod="待定", + Tabler=x.Tabler, + Remark=x.Remark, + }).ToList(); + if (pageInfo.Count>0) + { + this.txtDelegationNo.Text = pageInfo[0].DelegationNo; + this.txtDelegationDate.Text = pageInfo[0].DelegationDate.ToString(); + this.txtInstallationName.Text = pageInfo[0].InstallationName; + this.txtUnitName.Text = pageInfo[0].UnitName; + this.txtDetectionMethod.Text = pageInfo[0].DetectionMethod; + this.txtTabler.Text = pageInfo[0].Tabler; + this.txtRemark.Text = pageInfo[0].Remark; + } + } + #endregion + + /// + /// 清空 + /// + private void SetTextTemp() + { + this.txtDelegationNo.Text = string.Empty; + this.txtDelegationDate.Text = string.Empty; + this.txtInstallationName.Text = string.Empty; + this.txtUnitName.Text = string.Empty; + this.txtDetectionMethod.Text = string.Empty; + this.txtTabler.Text = string.Empty; + this.txtRemark.Text = string.Empty; + } + #endregion + + #region 分页排序 + #region 页索引改变事件 + /// + /// 页索引改变事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + #endregion + + #region 排序 + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + #endregion + + #region 分页选择下拉改变事件 + /// + /// 分页选择下拉改变事件 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + #endregion + #endregion + + #region 关闭弹出窗口及刷新页面 + + /// + /// 查询 + /// + /// + /// + protected void Tree_TextChanged(object sender, EventArgs e) + { + this.InitTreeMenu(); + //this.BindGrid(); + } + #endregion + + #region 格式化字符串 + /// + /// 获取缺陷 + /// + /// + /// + protected string ConvertCheckDefects(object CheckDefects) + { + string str = string.Empty; + if (CheckDefects != null) + { + HttpCookie lanCookie = Request.Cookies["SelectLan"]; + if (lanCookie["lan"] == "zh-CN") //中文 + { + str = BLL.Base_DefectService.GetDefectNameStrByDefectIdStr(CheckDefects.ToString()); + } + else + { + str = BLL.Base_DefectService.GetDefectEngNameStrByDefectIdStr(CheckDefects.ToString()); + } + } + return str; + } + #endregion + } +} \ No newline at end of file diff --git a/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDetectionEntry.aspx.designer.cs b/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDetectionEntry.aspx.designer.cs new file mode 100644 index 0000000..76a035a --- /dev/null +++ b/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDetectionEntry.aspx.designer.cs @@ -0,0 +1,251 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.WeldingProcess.PMI +{ + + + public partial class PMIDetectionEntry + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// panelLeftRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelLeftRegion; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// txtNDEDateMonth 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtNDEDateMonth; + + /// + /// Toolbar5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar5; + + /// + /// txtSearchCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSearchCode; + + /// + /// tvControlItem 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Tree tvControlItem; + + /// + /// panelCenterRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelCenterRegion; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// hdPMIId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdPMIId; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// txtDelegationNo 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtDelegationNo; + + /// + /// txtDelegationDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtDelegationDate; + + /// + /// txtInstallationName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtInstallationName; + + /// + /// txtUnitName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtUnitName; + + /// + /// txtDetectionMethod 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtDetectionMethod; + + /// + /// txtDetectionStandard 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtDetectionStandard; + + /// + /// txtTabler 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtTabler; + + /// + /// txtRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtRemark; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + } +} diff --git a/HJGL/FineUIPro.Web/WeldingProcess/TestPackageManage/TestPackageManageAudit.aspx.cs b/HJGL/FineUIPro.Web/WeldingProcess/TestPackageManage/TestPackageManageAudit.aspx.cs index f4de55b..3025cb9 100644 --- a/HJGL/FineUIPro.Web/WeldingProcess/TestPackageManage/TestPackageManageAudit.aspx.cs +++ b/HJGL/FineUIPro.Web/WeldingProcess/TestPackageManage/TestPackageManageAudit.aspx.cs @@ -4094,6 +4094,212 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage } + //24-TP-10-渗透&MT检测比例确认表 + private void template25_1(XSSFWorkbook hssfworkbook, XSSFSheet ws) + { + int rowIndex = 0; + var style = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Center, 10, true, false, "Arial Unicode MS"); + #region 头部 + var style1 = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.None, BorderStyle.None, BorderStyle.None, BorderStyle.None, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Right, 10, true, false, "Arial Unicode MS"); + ws = ExcelCreateRow(ws, hssfworkbook, rowIndex, rowIndex, style1, 0, 20, true); + + //设置行宽度 + ws.SetColumnWidth(0, 13 * 256); + ws.SetColumnWidth(1, 3 * 256); + ws.SetColumnWidth(2, 10 * 256); + for (int i = 3; i < 20; i++) + { + ws.SetColumnWidth(1, 3 * 256); + } + ws.SetColumnWidth(20, 23 * 256); + + //设置行高度 + ws.GetRow(rowIndex).Height = 10 * 20; + ws.GetRow(rowIndex).GetCell(20).CellStyle = style1; + ws.GetRow(rowIndex).GetCell(20).SetCellValue("Form No. TP-10"); + + ws = ExcelCreateRow(ws, hssfworkbook, rowIndex + 1, rowIndex + 2, style, 0, 20, true); + //设置行高度 + ws.GetRow(rowIndex + 1).Height = 10 * 20 * 9; + ws.GetRow(rowIndex + 2).Height = 10 * 20 * 3; + + //合并单元格和填充文本 + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 1, rowIndex + 1, 0, 2)); + ws.GetRow(rowIndex + 1).GetCell(0).SetCellValue(""); + + var style3 = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Center, 14, true, true, "Arial Unicode MS"); + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 1, rowIndex + 1, 3, 17)); + ws.GetRow(rowIndex + 1).GetCell(3).CellStyle = style3; + ws.GetRow(rowIndex + 1).GetCell(3).SetCellValue("管道焊接接头PMI检测比例确认表(一)\nPipeline Welding Joints PMI Examination Rate Confirmation Form(I)\n共 1 页 第 1 页"); + + var style2 = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Top, NPOI.SS.UserModel.HorizontalAlignment.Left, 10, true, false, "Arial Unicode MS"); + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 1, rowIndex + 1, 18, 20)); + ws.GetRow(rowIndex + 1).GetCell(18).CellStyle = style2; + ws.GetRow(rowIndex + 1).GetCell(18).SetCellValue("\n 工程名称:巴斯夫(广东)一体化项目\n Project Name:BASF (Guangdong) Integrated Project\n 单元名称:Citral\n Unit Name:Citral"); + + ws.GetRow(rowIndex + 2).GetCell(0).SetCellValue("执行标准\nApplicable code"); + + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 2, rowIndex + 2, 1, 5)); + ws.GetRow(rowIndex + 2).GetCell(1).SetCellValue(""); + + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 2, rowIndex + 2, 6, 7)); + ws.GetRow(rowIndex + 2).GetCell(6).SetCellValue("检测方法\nExam. Method"); + + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 2, rowIndex + 2, 8, 15)); + ws.GetRow(rowIndex + 2).GetCell(8).SetCellValue("PMI检测"); + + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 2, rowIndex + 2, 16, 17)); + ws.GetRow(rowIndex + 2).GetCell(16).SetCellValue("检测比例\nExam. Rate"); + + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 2, rowIndex + 2, 18, 20)); + ws.GetRow(rowIndex + 2).GetCell(18).SetCellValue("2%"); + + #endregion + + #region 表格部分 + + ws = ExcelCreateRow(ws, hssfworkbook, rowIndex + 3, rowIndex + 13, style, 0, 20, true); + //设置高度和合并列填充文本 + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 3, rowIndex + 4, 0, 1)); + ws.GetRow(rowIndex + 3).GetCell(0).SetCellValue("管道编号\nPipeline No."); + + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 3, rowIndex + 4, 2, 2)); + ws.GetRow(rowIndex + 3).GetCell(2).SetCellValue("材质\nMaterial"); + + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 3, rowIndex + 4, 3, 4)); + ws.GetRow(rowIndex + 3).GetCell(3).SetCellValue("规 格/Size\n mm"); + + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 3, rowIndex + 3, 5, 8)); + ws.GetRow(rowIndex + 3).GetCell(5).SetCellValue("管道焊接接头\nWelding Joints"); + + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 3, rowIndex + 3, 9, 12)); + ws.GetRow(rowIndex + 3).GetCell(9).SetCellValue("施焊焊工\nWelder"); + + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 3, rowIndex + 3, 13, 16)); + ws.GetRow(rowIndex + 3).GetCell(13).SetCellValue("检测焊接接头\nExanined Joints"); + + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 4, rowIndex + 4, 5, 6)); + ws.GetRow(rowIndex + 4).GetCell(5).SetCellValue("总数\nTotal"); + + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 4, rowIndex + 4, 7, 8)); + ws.GetRow(rowIndex + 4).GetCell(7).SetCellValue("固定口数\nField Joints"); + + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 4, rowIndex + 4, 9, 10)); + ws.GetRow(rowIndex + 4).GetCell(9).SetCellValue("焊工代号\nWelder No."); + + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 4, rowIndex + 4, 11, 12)); + ws.GetRow(rowIndex + 4).GetCell(11).SetCellValue("施焊数量\nWelded Joints"); + + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 4, rowIndex + 4, 13, 14)); + ws.GetRow(rowIndex + 4).GetCell(13).SetCellValue("总数\nTotal Joints"); + + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 4, rowIndex + 4, 15, 16)); + ws.GetRow(rowIndex + 4).GetCell(15).SetCellValue("固定口数\nField Joints"); + + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 3, rowIndex + 4, 17, 19)); + ws.GetRow(rowIndex + 3).GetCell(17).SetCellValue("实际检测比例\nActual exam. Rate"); + + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 3, rowIndex + 4, 20, 20)); + ws.GetRow(rowIndex + 3).GetCell(20).SetCellValue("检测报告编号\nExamination Report No."); + + + for (int i = 3; i < 14; i++) + { + if (i == 3 || i == 4) + { + ws.GetRow(rowIndex + i).Height = 30 * 20; + continue; + } + + if (i == 13) + ws.GetRow(rowIndex + i).Height = 30 * 20; + else + ws.GetRow(rowIndex + i).Height = 19 * 20; + + ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + i, 0, 1)); + ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + i, 3, 4)); + ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + i, 5, 6)); + ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + i, 7, 8)); + ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + i, 9, 10)); + ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + i, 11, 12)); + ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + i, 13, 14)); + ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + i, 15, 16)); + ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + i, 17, 19)); + } + ws.GetRow(rowIndex + 13).GetCell(0).SetCellValue("小计\nTotal"); + #endregion + + #region 尾部 + + ws = ExcelCreateRow(ws, hssfworkbook, rowIndex + 14, rowIndex + 16, style, 0, 20, true); + //设置行高 + ws.GetRow(rowIndex + 14).Height = 20 * 20 * 2; + ws.GetRow(rowIndex + 15).Height = 20 * 20 * 2; + ws.GetRow(rowIndex + 16).Height = 20 * 20 * 7; + + ws.GetRow(rowIndex + 14).GetCell(0).SetCellValue("备注\nRemark"); + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 14, rowIndex + 14, 1, 20)); + + ws.GetRow(rowIndex + 14).GetCell(1).CellStyle = style2; + ws.GetRow(rowIndex + 14).GetCell(1).SetCellValue("焊口位置与检测焊口见管道单线图与无损检测报告。\nPlease refer to Pipeline Iso-drawing and NDE Report for joints position and examined joints."); + + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 15, rowIndex + 15, 0, 3)); + ws.GetRow(rowIndex + 15).GetCell(0).SetCellValue("建 设 / 监 理 单 位\nOwner/JianLi Company"); + + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 15, rowIndex + 15, 4, 9)); + ws.GetRow(rowIndex + 15).GetCell(4).SetCellValue("总 承 包 单 位\nGeneral Contractor"); + + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 15, rowIndex + 15, 10, 16)); + ws.GetRow(rowIndex + 15).GetCell(10).SetCellValue("检 测 单 位\nExamination Contractor"); + + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 15, rowIndex + 15, 17, 20)); + ws.GetRow(rowIndex + 15).GetCell(17).SetCellValue("施 工 单 位\nConstruction Company"); + + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 16, rowIndex + 16, 0, 3)); + ws.GetRow(rowIndex + 16).GetCell(0).CellStyle = style2; + ws.GetRow(rowIndex + 16).GetCell(0).SetCellValue("专业工程师\n Discipline Engineer: \n\n\n\n\n\n\n\n 日期Date: 年 月 日"); + + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 16, rowIndex + 16, 4, 9)); + ws.GetRow(rowIndex + 16).GetCell(4).CellStyle = style2; + ws.GetRow(rowIndex + 16).GetCell(4).SetCellValue("专业工程师\n Discipline Engineer: \n\n\n\n\n\n\n\n 日期Date: 年 月 日"); + + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 16, rowIndex + 16, 10, 16)); + ws.GetRow(rowIndex + 16).GetCell(10).CellStyle = style2; + ws.GetRow(rowIndex + 16).GetCell(10).SetCellValue("专业工程师\n Discipline Engineer: \n\n\n\n\n\n\n\n 日期Date: 年 月 日"); + + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 16, rowIndex + 16, 17, 20)); + ws.GetRow(rowIndex + 16).GetCell(17).CellStyle = style2; + ws.GetRow(rowIndex + 16).GetCell(17).SetCellValue("专业工程师\n Discipline Engineer: \n\n 质量检查员:\n Quality Inspector:\n\n 制表:\n Prepared:\n\n 日期Date: 年 月 日"); + + #endregion + + ws.PrintSetup.FitWidth = 1; + ws.PrintSetup.FitHeight = 0; + ws.PrintSetup.PaperSize = (int)PaperSize.A4_Small; + + ws.FitToPage = true; + + //水平垂直居中 + ws.HorizontallyCenter = true; + ws.VerticallyCenter = true; + + //横向打印 + ws.PrintSetup.Landscape = true; + //垂直水平居中 + ws.VerticallyCenter = true; + ws.HorizontallyCenter = true; + //打印边距设置 厘米/3 + ws.SetMargin(MarginType.RightMargin, (double)2.4 / 3); + ws.SetMargin(MarginType.LeftMargin, (double)2.4 / 3); + ws.SetMargin(MarginType.TopMargin, (double)2.9 / 3); + ws.SetMargin(MarginType.BottomMargin, (double)2.4 / 3); + + //页眉页脚间距 + ws.SetMargin(MarginType.HeaderMargin, 0); + ws.SetMargin(MarginType.FooterMargin, 0); + + } + //25-管道无损检测结果汇总表SHT 3503-J412-2017 private void template25(XSSFWorkbook hssfworkbook, XSSFSheet ws) { @@ -6038,6 +6244,11 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage XSSFSheet sheet24 = (XSSFSheet)hssfworkbook.CreateSheet(oneTemp.Title); template24(hssfworkbook, sheet24); break; + //25-1-管道无损检测结果汇总表SHT 3503-J412-2017 + case "95125974-3DD4-4E16-B4F0-A9D9C9A1406D": + XSSFSheet sheet25_1 = (XSSFSheet)hssfworkbook.CreateSheet(oneTemp.Title); + template25_1(hssfworkbook, sheet25_1); + break; //25-管道无损检测结果汇总表SHT 3503-J412-2017 case "4C45ABAB-89E9-4874-8F55-5050CDE98DFC": XSSFSheet sheet25 = (XSSFSheet)hssfworkbook.CreateSheet(oneTemp.Title); diff --git a/HJGL/FineUIPro.Web/WeldingProcess/WeldingManage/JointInfo.aspx.cs b/HJGL/FineUIPro.Web/WeldingProcess/WeldingManage/JointInfo.aspx.cs index afcdbdd..9605a2b 100644 --- a/HJGL/FineUIPro.Web/WeldingProcess/WeldingManage/JointInfo.aspx.cs +++ b/HJGL/FineUIPro.Web/WeldingProcess/WeldingManage/JointInfo.aspx.cs @@ -962,7 +962,14 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage } string ReportFileName = filePath + "管道焊接工作记录.xlsx"; - string sqlStr = @"SELECT WeldSilkId,PipelineId,WorkAreaId,a.ProjectName,a.WeldJointCode,a.Specification,a.Material1Code,a.WeldingMethodCode,a.WeldingDate,a.WeldSilkCode,a.WeldMatCode,a.BackingWelderCode,a.CoverWelderCode,a.IsHotProess,(case a.IsHotProess when 1 then '是' else '否' end) as IsHotProessName,PrepareTemp,WeldingLocationCode FROM View_Pipeline_WeldJoint as a WHERE 1= 1 AND PipelineId =@PipelineId and Is_hjName='是' "; + string sqlStr = @"SELECT WeldSilkId,PipelineId,WorkAreaId,a.ProjectName,a.WeldJointCode,a.Specification,a.Material1Code, + a.WeldingMethodCode,a.WeldingDate,a.WeldSilkCode,a.WeldMatCode,a.BackingWelderCode,a.CoverWelderCode, + a.IsHotProess,(case a.IsHotProess when 1 then '是' else '否' end) as IsHotProessName,PrepareTemp, + WeldingLocationCode,a.WeldTypeCode, + (SELECT TOP 1 n.NDEReportNo FROM dbo.Batch_NDEItem n WHERE n.TrustBatchItemId= + (SELECT TOP 1 bt.TrustBatchItemId FROM dbo.Batch_BatchTrustItem bt WHERE bt.WeldJointId=a.WeldJointId)) AS NDEReportNo + FROM View_Pipeline_WeldJoint as a + WHERE 1= 1 AND PipelineId =@PipelineId and Is_hjName='是' "; List listStr = new List(); listStr.Add(new SqlParameter("@PipelineId", this.tvControlItem.SelectedNodeID)); SqlParameter[] parameter = listStr.ToArray(); @@ -970,8 +977,8 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage var titleQuery = from a in Funs.DB.Pipeline_Pipeline join b in Funs.DB.Base_Project on a.ProjectId equals b.ProjectId - join c in Funs.DB.Base_Unit on a.UnitId equals c.UnitId - select new { a.PipelineId, a.PipelineCode, b.ProjectName, c.UnitName }; + join c in Funs.DB.Project_WorkArea on a.WorkAreaId equals c.WorkAreaId + select new { a.PipelineId, a.PipelineCode, b.EnProjectName, b.ProjectName, c.WorkAreaName, c.EnWorkAreaName }; var titleModel = titleQuery.FirstOrDefault(); if (titleModel != null && tb.Rows.Count > 0) { @@ -1030,19 +1037,19 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage //行1 region = new CellRangeAddress(rowIndex + 1, rowIndex + 1, 11, 14); ws.AddMergedRegion(region); - ws.GetRow(rowIndex + 1).GetCell(11).SetCellValue("Project Name:"); + ws.GetRow(rowIndex + 1).GetCell(11).SetCellValue($"Project Name:{titleModel.EnProjectName}"); ws.GetRow(rowIndex + 1).GetCell(11).CellStyle = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, HorizontalAlignment.Justify, 9, true, false); //行2 region = new CellRangeAddress(rowIndex + 2, rowIndex + 2, 11, 14); ws.AddMergedRegion(region); - ws.GetRow(rowIndex + 2).GetCell(11).SetCellValue($"单位工程名称:{titleModel.UnitName}"); + ws.GetRow(rowIndex + 2).GetCell(11).SetCellValue($"单位工程名称:{titleModel.WorkAreaName}"); ws.GetRow(rowIndex + 2).GetCell(11).CellStyle = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, HorizontalAlignment.Justify, 10, true, false); //行3 region = new CellRangeAddress(rowIndex + 3, rowIndex + 3, 11, 14); ws.AddMergedRegion(region); - ws.GetRow(rowIndex + 3).GetCell(11).SetCellValue("Unit Name:"); + ws.GetRow(rowIndex + 3).GetCell(11).SetCellValue($"Unit Name:{titleModel.EnWorkAreaName}"); ws.GetRow(rowIndex + 3).GetCell(11).CellStyle = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, HorizontalAlignment.Justify, 10, true, false); //画线 @@ -1140,7 +1147,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage //焊口编号 ws.GetRow(dataIndex).GetCell(1).SetCellValue(tb.Rows[i]["WeldJointCode"].ToString()); //焊接形式 - ws.GetRow(dataIndex).GetCell(3).SetCellValue(""); + ws.GetRow(dataIndex).GetCell(3).SetCellValue(tb.Rows[i]["WeldTypeCode"].ToString()); //焊工代号 List welderStr = new List(); if (!string.IsNullOrWhiteSpace(tb.Rows[i]["BackingWelderCode"].ToString())) @@ -1178,7 +1185,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage //焊接日期 ws.GetRow(dataIndex).GetCell(13).SetCellValue(tb.Rows[i]["WeldingDate"].ToString()); //无损检查报告 - ws.GetRow(dataIndex).GetCell(14).SetCellValue(""); + ws.GetRow(dataIndex).GetCell(14).SetCellValue(tb.Rows[i]["NDEReportNo"].ToString()); } rowIndex += tIndex; diff --git a/HJGL/FineUIPro.Web/WeldingProcess/WeldingManage/WeldReport.aspx b/HJGL/FineUIPro.Web/WeldingProcess/WeldingManage/WeldReport.aspx index b111b95..40f72f6 100644 --- a/HJGL/FineUIPro.Web/WeldingProcess/WeldingManage/WeldReport.aspx +++ b/HJGL/FineUIPro.Web/WeldingProcess/WeldingManage/WeldReport.aspx @@ -7,157 +7,134 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +