diff --git a/DataBase/版本日志/HJGLDB_2024.05.12.sql b/DataBase/版本日志/HJGLDB_2024.05.12.sql new file mode 100644 index 0000000..c62f498 --- /dev/null +++ b/DataBase/版本日志/HJGLDB_2024.05.12.sql @@ -0,0 +1,206 @@ + +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 + + + + diff --git a/HJGL/.vs/HJGL/v17/.suo b/HJGL/.vs/HJGL/v17/.suo index 1594d9a..d295d43 100644 Binary files a/HJGL/.vs/HJGL/v17/.suo and b/HJGL/.vs/HJGL/v17/.suo differ 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/WeldingProcess/WeldingManage/JointInfo.aspx.cs b/HJGL/FineUIPro.Web/WeldingProcess/WeldingManage/JointInfo.aspx.cs index 4d86810..6370c42 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 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +