20250812 热处理委托单打印

This commit is contained in:
毕文静 2025-08-12 15:01:16 +08:00
parent 89d13c387d
commit c0abd5db77
4 changed files with 133 additions and 23 deletions

View File

@ -0,0 +1,110 @@
ALTER VIEW [dbo].[HJGL_View_CH_HotProessTrustItem]
/*热处理委托明细表查询列表*/
AS
SELECT TrustItem.HotProessTrustItemId, --id
TrustItem.HotProessTrustId, -- 热处理委托id
JointInfo.JOT_ID, --id
ROW_NUMBER() OVER(ORDER BY JointInfo.Sort1,JointInfo.Sort2,JointInfo.Sort3,JointInfo.Sort4,JointInfo.Sort5) as Number,
TrustItem.TrustDate,
'' as NewJotId,
IsoInfo.ISO_IsoNo,
JointInfo.ISO_ID,
(CASE WHEN record.RepairMark IS NOT NULL THEN (JointInfo.JOT_JointNo+record.RepairMark)
ELSE JointInfo.JOT_JointNo END )+ISNULL(TrustItem.HardRepairMark,'') AS JOT_JointNo,
JointInfo.DReportID,
report.JOT_WeldDate,
TrustItem.Remark,
TrustItem.TrustItemID,
TrustItem.HardTestResultId,
TrustItem.HardRepairMark,
TrustItem.IsComplete,
CASE Result.IsOK WHEN 1 THEN ''
WHEN 0 THEN ''
ELSE '' END AS IsOKStr,
CASE Result.IsOK WHEN 1 THEN '已完成'
WHEN 0 THEN '未完成'
ELSE '' END AS IsOKStr2,
TrustItem.ProessTypes, --
JointInfo.JOT_JointDesc, --
JointInfo.ProjectId,
WeldMethod.WME_Code, --
--(CASE WHEN Welder1.WED_Code!=Welder2.WED_Code THEN (Welder1.WED_Code+'/'+Welder2.WED_Code) ELSE Welder1.WED_Code END) AS WED_Code, --
(CASE WHEN JointInfo.JOT_CellWelder!=JointInfo.JOT_FloorWelder THEN (Welder1.WED_Code+'/'+Welder2.WED_Code) ELSE Welder1.WED_Code END) AS WED_Code, --
(CASE WHEN JointInfo.STE_ID<>JointInfo.STE_ID2 THEN Steel1.STE_Code+'/'+Steel2.STE_Code
ELSE Steel1.STE_Code END) AS STE_Code, --
Result.IsOK --
FROM dbo.HJGL_PW_JointInfo AS JointInfo
LEFT JOIN dbo.HJGL_BS_WeldMethod WeldMethod ON WeldMethod.WME_ID=JointInfo.WME_ID
LEFT JOIN HJGL_BS_Welder AS Welder1 ON Welder1.WED_ID = JointInfo.JOT_CellWelder
LEFT JOIN HJGL_BS_Welder AS Welder2 ON Welder2.WED_ID = JointInfo.JOT_FloorWelder
LEFT JOIN dbo.HJGL_BO_WeldReportMain report ON report.DReportID = JointInfo.DReportID
LEFT JOIN dbo.HJGL_CH_HotProessTrustItem AS TrustItem ON JointInfo.JOT_ID = TrustItem.JOT_ID
LEFT JOIN dbo.HJGL_CH_HotProessTrust AS Trust ON Trust.HotProessTrustId=TrustItem.HotProessTrustId
LEFT JOIN dbo.HJGL_CH_RepairItemRecord AS record ON record.RepairItemRecordId=TrustItem.TrustItemID
LEFT JOIN dbo.HJGL_PW_IsoInfo AS IsoInfo ON JointInfo.ISO_ID = IsoInfo.ISO_ID
LEFT JOIN dbo.HJGL_BS_Steel AS Steel1 ON JointInfo.STE_ID = Steel1.STE_ID
LEFT JOIN dbo.HJGL_BS_Steel AS Steel2 ON JointInfo.STE_ID2 = Steel2.STE_ID
LEFT JOIN dbo.HJGL_CH_HotProessResult AS Result ON Result.HotProessTrustId=TrustItem.HotProessTrustId AND Result.JOT_ID=TrustItem.JOT_ID AND TrustItem.ProessTypes=Result.ProessTypes
GO
ALTER PROCEDURE [dbo].[HJGL_spCH_HotProessTrustItem]
(
@HotProessTrustId nvarchar(50)
)
AS
--id获取委托单信息
BEGIN
select *,
ProessTypes1+
(case when ProessTypes1<>'' and ProessTypes2<>'' then ','+ ProessTypes2 else ProessTypes2 end)
+(case when (ProessTypes1<>'' or ProessTypes2<>'') and ProessTypes3<>'' then ','+ ProessTypes3 else ProessTypes3 end)
+(case when (ProessTypes1<>'' or ProessTypes2<>'' or ProessTypes3<>'') and ProessTypes4<>'' then ','+ ProessTypes4 else ProessTypes4 end)
+(case when (ProessTypes1<>'' or ProessTypes2<>'' or ProessTypes3<>'' or ProessTypes4<>'') and ProessTypes5<>'' then ','+ ProessTypes5 else ProessTypes5 end) as ProessTypes
from
(
select --ROW_NUMBER() OVER(ORDER BY JOT_JointNo) as Sort,
--ROW_NUMBER() OVER(ORDER BY JOT_JointNo) as Number,
c.Number,
c.HotProessTrustItemId, --id
c.HotProessTrustId, -- 热处理委托id
c.JOT_ID, --id
c.TrustDate,
c.ISO_IsoNo,
c.JOT_JointNo,
c.Remark,
ProessTypes1 =case when ProessTypes like '%1%' then '预热'
else '' end,
ProessTypes2 =case when ProessTypes like '%2%' then '消氢'
else '' end,
ProessTypes3 =case when ProessTypes like '%3%' then '后热'
else '' end,
ProessTypes4 =case when ProessTypes like '%4%' then '消应力热处理'
else '' end,
ProessTypes5 =case when ProessTypes like '%5%' then '稳定化处理'
else '' end,
c.JOT_JointDesc, --
c.ProjectId,
c.STE_Code, --
c.WME_Code, --
c.WED_Code --
from dbo.HJGL_View_CH_HotProessTrustItem c
where c.HotProessTrustId = @HotProessTrustId
) as t
--order by t.ISO_IsoNo,t.JOT_JointNo
union
select 99999999 as Number,null,null,null,null,'以下空白' AS ISO_IsoNo,null,null,null,null,null,null,null,null,null,null,null,null,null
order by Number
END
GO

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" ReportInfo.Created="11/21/2024 15:06:49" ReportInfo.Modified="08/04/2025 11:22:27" ReportInfo.CreatorVersion="2017.1.16.0">
<Report ScriptLanguage="CSharp" ReportInfo.Created="11/21/2024 15:06:49" ReportInfo.Modified="08/12/2025 14:54:39" ReportInfo.CreatorVersion="2017.1.16.0">
<ScriptText>using System;
using System.Collections;
using System.Collections.Generic;
@ -42,7 +42,7 @@ namespace FastReport
}
</ScriptText>
<Dictionary>
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqtRsOalcXxDhVt62rPEPNYjaATUoMqziRYvJtgNsyJKYAG7kXKvNAMI/qBkgJNPccFsWrhiII6oyX1HS+uwN7YigxVjqUq3vIet2zpPnmWhwvYEvWOOCZZGx6EC4BfGfWX8aPj6bmoF52Z0fnUA9g71duxa/gvChTW/nzu9qsYVuvlVHliMnnu6jEIF9n+/QFmhXUpA5i9qSRkRYKlw5wRw==">
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqtRsOalcXxDhVt62rPEPNYjaATUoMqziRYvJtgNsyJKYAG7kXKvNAMI/qBkgJNPccFsWrhiII6oyX1HS+uwN7YigxVjqUq3vIet2zpPnmWhwvYEvWOOCZZGx6EC4BfGfWX8aPj6bmoF52Z0fnUA9g71duxa/gvChTW/nzu9qsYVuvlVHliMnnu6jEIF9n+/QF9KaaYnf752kTTcgAAMfUGw==">
<TableDataSource Name="MainData" DataType="System.Int32" PropName="Attach_Image" Enabled="true" TableName="MainData">
<Column Name="ProjectName" DataType="System.String" PropName="attach_image_id"/>
<Column Name="ProjectCode" DataType="System.String" PropName="image_series"/>
@ -59,14 +59,14 @@ namespace FastReport
</TableDataSource>
</MsSqlDataConnection>
</Dictionary>
<ReportPage Name="Page1" LeftMargin="25" TopMargin="20" RightMargin="20" BottomMargin="21" FirstPageSource="4" OtherPagesSource="4" Guides="0,623.22,141.67,66.07,84.97,113.32,132.22,377.68,491,226.64,292.71,623.28,84.98,226.66,292.74,377.72,491.05,84.78,227.47,103.68,293.35,378.13,491.26,623.29,316.37">
<PageHeaderBand Name="PageHeader1" Width="623.7" Height="245.63" Guides="0,245.63,17.71,44.87,27.16,72.03,99.19,135.8,36.61,172.41,209.02">
<TableObject Name="Table1" Width="623.22" Height="245.63">
<ReportPage Name="Page1" LeftMargin="25" TopMargin="20" RightMargin="20" BottomMargin="21" FirstPageSource="4" OtherPagesSource="4" Guides="0,623.22,141.67,66.07,94.42,103.87,132.22,84.97,387.13,491,226.64,292.71,623.28,84.98,226.66,292.74,387.17,491.05,84.78,227.47,103.68,293.35,387.58,491.26,623.29,316.37">
<PageHeaderBand Name="PageHeader1" Width="623.7" Height="258.18" Guides="0,258.18,17.71,48.67,30.96,84.58,35.91,111.74,27.16,148.35,36.61,184.96,221.57">
<TableObject Name="Table1" Width="623.22" Height="258.18">
<TableColumn Name="Column1" Width="84.97"/>
<TableColumn Name="Column2" Width="141.67"/>
<TableColumn Name="Column3" Width="66.07"/>
<TableColumn Name="Column4" Width="84.97"/>
<TableColumn Name="Column5" Width="113.32"/>
<TableColumn Name="Column4" Width="94.42"/>
<TableColumn Name="Column5" Width="103.87"/>
<TableColumn Name="Column6" Width="132.22"/>
<TableRow Name="Row1" Height="17.71">
<TableCell Name="Cell1" Text="ZDS-T6.60.005.A/0.2021" HorzAlign="Right" VertAlign="Center" ColSpan="6"/>
@ -76,7 +76,7 @@ namespace FastReport
<TableCell Name="Cell5" HorzAlign="Right" VertAlign="Center"/>
<TableCell Name="Cell26" HorzAlign="Right" VertAlign="Center"/>
</TableRow>
<TableRow Name="Row2" Height="27.16">
<TableRow Name="Row2" Height="30.96">
<TableCell Name="Cell6" Text="浙 江 鼎 盛 石 化 工 程 有 限 公 司" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt" ColSpan="6"/>
<TableCell Name="Cell7"/>
<TableCell Name="Cell8"/>
@ -84,7 +84,7 @@ namespace FastReport
<TableCell Name="Cell10"/>
<TableCell Name="Cell27"/>
</TableRow>
<TableRow Name="Row3" Height="27.16">
<TableRow Name="Row3" Height="35.91">
<TableCell Name="Cell11" Text="热 处 理 委 托 单" HorzAlign="Center" VertAlign="Center" Font="宋体, 16pt, style=Bold" ColSpan="6"/>
<TableCell Name="Cell12"/>
<TableCell Name="Cell13"/>
@ -134,13 +134,13 @@ namespace FastReport
</TableRow>
</TableObject>
</PageHeaderBand>
<DataBand Name="Data1" Top="249.63" Width="623.7" Height="37.8" Guides="0,37.8">
<DataBand Name="Data1" Top="262.18" Width="623.7" Height="37.8" Guides="0,37.8">
<TableObject Name="Table2" Width="623.28" Height="37.8" Border.Lines="Right" ManualBuildEvent="Table2_ManualBuild">
<TableColumn Name="Column24" Width="84.98"/>
<TableColumn Name="Column25" Width="141.68"/>
<TableColumn Name="Column26" Width="66.08"/>
<TableColumn Name="Column27" Width="84.98"/>
<TableColumn Name="Column28" Width="113.33"/>
<TableColumn Name="Column27" Width="94.43"/>
<TableColumn Name="Column28" Width="103.88"/>
<TableColumn Name="Column29" Width="132.23"/>
<TableRow Name="Row21" Height="37.8">
<TableCell Name="Cell132" Border.Lines="All" Text="[Data.SortNum]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
@ -152,17 +152,17 @@ namespace FastReport
</TableRow>
</TableObject>
</DataBand>
<ColumnFooterBand Name="ColumnFooter1" Top="332.04" Width="623.7">
<ChildBand Name="Child1" Top="291.43" Width="623.7" Height="36.61" Guides="0,36.61" FillUnusedSpace="true">
<TableObject Name="Table3" Width="623.29" Height="36.61">
<ColumnFooterBand Name="ColumnFooter1" Top="345.78" Width="623.7">
<ChildBand Name="Child1" Top="303.98" Width="623.7" Height="37.8" Guides="0,37.8" FillUnusedSpace="true">
<TableObject Name="Table3" Width="623.29" Height="37.8">
<TableColumn Name="Column15" Width="84.78"/>
<TableColumn Name="Column16" Width="39.01"/>
<TableColumn Name="Column17" Width="103.68"/>
<TableColumn Name="Column18" Width="65.88"/>
<TableColumn Name="Column19" Width="84.78"/>
<TableColumn Name="Column20" Width="113.13"/>
<TableColumn Name="Column19" Width="94.23"/>
<TableColumn Name="Column20" Width="103.68"/>
<TableColumn Name="Column21" Width="132.03"/>
<TableRow Name="Row17" Height="36.61">
<TableRow Name="Row17" Height="37.8">
<TableCell Name="Cell113" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell114" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt" ColSpan="2"/>
<TableCell Name="Cell115" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
@ -174,11 +174,11 @@ namespace FastReport
</TableObject>
</ChildBand>
</ColumnFooterBand>
<PageFooterBand Name="PageFooter1" Top="336.04" Width="623.7" Height="119.57" Guides="0,119.57,50.27,94.37">
<TableObject Name="Table4" Width="623.29" Height="119.57" Border.Lines="All">
<PageFooterBand Name="PageFooter1" Top="349.78" Width="623.7" Height="104.45" Guides="0,104.45,35.15,79.25">
<TableObject Name="Table4" Width="623.29" Height="104.45" Border.Lines="All">
<TableColumn Name="Column22" Width="316.37"/>
<TableColumn Name="Column23" Width="306.92"/>
<TableRow Name="Row18" Height="50.27">
<TableRow Name="Row18" Height="35.15">
<TableCell Name="Cell120" Border.Lines="All" Text="委托部门(设备维修一部)" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell121" Border.Lines="All" Text="热处理单位" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
</TableRow>

View File

@ -707,7 +707,7 @@ namespace FineUIPro.Web.HJGL.HotProessManage
dt2.Columns.Add("ProessTypes");
DataView dv = tb2.DefaultView;//获取表视图
dv.Sort = "ISO_IsoNo,JOT_JointNo ASC";//按照ID倒序排序
dv.Sort = "Number ASC";//按照ID倒序排序
tb2 = dv.ToTable();//转为表
DataRow[] rows2 = tb2.DefaultView.ToTable().Select();
int i = 0;

View File

@ -11,7 +11,7 @@
<FineUIPro DebugMode="false" Theme="Cupertino"/>
<appSettings>
<!--连接字符串-->
<add key="ConnectionString" value="Server=.\MSSQLSERVER01;Database=HJGLDB_DS;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Max Pool Size = 1000;Connect Timeout=1200"/>
<add key="ConnectionString" value="Server=.\SQL2022;Database=HJGLDB_DS;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Max Pool Size = 1000;Connect Timeout=1200"/>
<!--系统名称-->
<add key="SystemName" value="诺必达焊接管理系统"/>
<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/Images/;"/>