This commit is contained in:
佘春生 2024-05-12 10:29:59 +08:00
parent a1c00d5980
commit cd0275d2bc
11 changed files with 634 additions and 452 deletions

View File

@ -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

Binary file not shown.

View File

@ -15,9 +15,8 @@
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<StartPageUrl>
</StartPageUrl>
<StartAction>CurrentPage</StartAction>
<StartPageUrl>Login.aspx</StartPageUrl>
<StartAction>SpecificPage</StartAction>
<AspNetDebugging>True</AspNetDebugging>
<SilverlightDebugging>False</SilverlightDebugging>
<NativeDebugging>False</NativeDebugging>

View File

@ -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<SqlParameter> listStr = new List<SqlParameter>();
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<string> welderStr = new List<string>();
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;

View File

@ -9,31 +9,7 @@
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<Items>
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
EnableCollapse="true" Width="240px" Title="<%$ Resources:Lan,DailyWeldingReport %>"
ShowBorder="true" Layout="VBox" ShowHeader="true" AutoScroll="true" BodyPadding="5px"
IconFont="ArrowCircleLeft">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:DatePicker ID="txtMonth" runat="server" Label="月份" EmptyText="输入查询条件" AutoPostBack="true"
OnTextChanged="Tree_TextChanged" Width="220px" LabelWidth="50px" DisplayType="Month" DateFormatString="yyyy-MM">
</f:DatePicker>
</Items>
</f:Toolbar>
</Toolbars>
<Items>
<f:Tree ID="tvControlItem" ShowHeader="false" Height="400px" Title="<%$ Resources:Lan,DailyWeldingReport %>"
OnNodeCommand="tvControlItem_NodeCommand" runat="server" ShowBorder="false" EnableCollapse="true"
EnableSingleClickExpand="true" AutoLeafIdentification="true" EnableSingleExpand="true"
EnableTextSelection="true">
</f:Tree>
</Items>
</f:Panel>
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="<%$ Resources:Lan,DailyWeldingReport %>"
TitleToolTip="<%$ Resources:Lan,DailyWeldingReport %>" AutoScroll="true">
<Toolbars>
<f:Toolbar ID="Toolbar3" Position="Top" runat="server" ToolbarAlign="Right">
<Items>
@ -59,6 +35,8 @@
<f:DatePicker ID="txtWeldingDate" Label="<%$ Resources:Lan,WeldingDate %>" runat="server"
DateFormatString="yyyy-MM-dd" LabelWidth="100px" LabelAlign="Right">
</f:DatePicker>
<f:DropDownList ID="drpInstallation" runat="server" Label="装置"
Width="220px" LabelWidth="100px" LabelAlign="Right"></f:DropDownList>
<f:TextBox ID="txtPipelineCode" runat="server" Label="<%$ Resources:Lan,PipelineCode %>"
EmptyText="<%$ Resources:Lan,EnterQueryConditions %>" Width="250px" LabelWidth="100px" LabelAlign="Right">
</f:TextBox>
@ -78,7 +56,7 @@
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="WeldingDailyId"
AllowCellEditing="true" AllowColumnLocking="true" EnableColumnLines="true" ClicksToEdit="2"
DataIDField="WeldingDailyId" AllowSorting="true" SortField="WeldingDailyCode"
SortDirection="ASC" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true"
SortDirection="DESC" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true"
PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True"
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick">
<Columns>
@ -86,7 +64,7 @@
FieldType="String" HeaderText="<%$ Resources:Lan,WeldingReportCode %>" HeaderTextAlign="Center"
TextAlign="Left" SortField="WeldingDailyCode">
</f:RenderField>
<f:TemplateField Width="200px" HeaderText="<%$ Resources:Lan,UnitName %>" HeaderTextAlign="Center"
<f:TemplateField Width="260px" HeaderText="<%$ Resources:Lan,UnitName %>" HeaderTextAlign="Center"
TextAlign="Center" SortField="UnitId">
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# ConvertUnitName(Eval("UnitId")) %>'></asp:Label>
@ -143,8 +121,7 @@
</f:Grid>
</Items>
</f:Panel>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="<%$ Resources:Lan,PopForm %>" Hidden="true" EnableIFrame="true"
EnableMaximize="true" Target="Top" EnableResize="true" runat="server" OnClose="Window1_Close"
IsModal="true" Width="1200px" Height="650px">

View File

@ -28,9 +28,11 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
{
if (!IsPostBack)
{
this.txtMonth.Text = string.Format("{0:yyyy-MM}",DateTime.Now);
//this.txtMonth.Text = string.Format("{0:yyyy-MM}",DateTime.Now);
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
this.InitTreeMenu();//加载树
BLL.Project_InstallationService.InitInstallationDropDownList(this.drpInstallation, true, this.CurrUser.LoginProjectId, Resources.Lan.PleaseSelect);
BindGrid();
//this.InitTreeMenu();//加载树
}
}
@ -40,20 +42,20 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
/// </summary>
private void InitTreeMenu()
{
if (!string.IsNullOrEmpty(this.txtMonth.Text.Trim()))
{
DateTime startTime = Convert.ToDateTime(this.txtMonth.Text.Trim() + "-01");
DateTime endTime = startTime.AddMonths(1);
this.tvControlItem.Nodes.Clear();
var weldReports = (from x in Funs.DB.Pipeline_WeldingDaily
where x.ProjectId == this.CurrUser.LoginProjectId
select x).ToList();
this.BindNodes(null, weldReports, startTime, endTime);
}
else
{
Alert.ShowInTop("请选择月份!", MessageBoxIcon.Warning);
}
//if (!string.IsNullOrEmpty(this.txtMonth.Text.Trim()))
//{
// DateTime startTime = Convert.ToDateTime(this.txtMonth.Text.Trim() + "-01");
// DateTime endTime = startTime.AddMonths(1);
// this.tvControlItem.Nodes.Clear();
// var weldReports = (from x in Funs.DB.Pipeline_WeldingDaily
// where x.ProjectId == this.CurrUser.LoginProjectId
// select x).ToList();
// this.BindNodes(null, weldReports, startTime, endTime);
//}
//else
//{
// Alert.ShowInTop("请选择月份!", MessageBoxIcon.Warning);
//}
}
#endregion
@ -65,80 +67,80 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
/// <param name="node"></param>
private void BindNodes(TreeNode node, List<Model.Pipeline_WeldingDaily> projectWeldReports, DateTime startTime, DateTime endTime)
{
var pUnitDepth = Funs.DB.Project_Unit.FirstOrDefault(x => x.UnitId == this.CurrUser.UnitId && x.ProjectId == this.CurrUser.LoginProjectId);
//var pUnitDepth = Funs.DB.Project_Unit.FirstOrDefault(x => x.UnitId == this.CurrUser.UnitId && x.ProjectId == this.CurrUser.LoginProjectId);
if (node == null)
{
if (pUnitDepth!=null && pUnitDepth.UnitType == Const.UnitType_5)
{
var installations = (from x in projectWeldReports
join y in Funs.DB.Project_Installation
on x.InstallationId equals y.InstallationId
where x.UnitId==this.CurrUser.UnitId && x.WeldingDate >= startTime && x.WeldingDate < endTime
select y).Distinct().ToList();
foreach (var q in installations)
{
TreeNode newNode = new TreeNode();
newNode.NodeID = q.InstallationId;
newNode.Text = q.InstallationName;
newNode.ToolTip = Resources.Lan.InstallationName;
newNode.Expanded = true;
this.tvControlItem.Nodes.Add(newNode);
this.BindNodes(newNode, projectWeldReports, startTime, endTime);
}
}
else
{
var installations = (from x in projectWeldReports
join y in Funs.DB.Project_Installation
on x.InstallationId equals y.InstallationId
where x.WeldingDate >= startTime && x.WeldingDate < endTime
select y).Distinct().ToList();
foreach (var q in installations)
{
TreeNode newNode = new TreeNode();
newNode.NodeID = q.InstallationId;
newNode.Text = q.InstallationName;
newNode.ToolTip = Resources.Lan.InstallationName;
newNode.Expanded = true;
this.tvControlItem.Nodes.Add(newNode);
this.BindNodes(newNode, projectWeldReports, startTime, endTime);
}
}
//if (node == null)
//{
// if (pUnitDepth!=null && pUnitDepth.UnitType == Const.UnitType_5)
// {
// var installations = (from x in projectWeldReports
// join y in Funs.DB.Project_Installation
// on x.InstallationId equals y.InstallationId
// where x.UnitId==this.CurrUser.UnitId && x.WeldingDate >= startTime && x.WeldingDate < endTime
// select y).Distinct().ToList();
// foreach (var q in installations)
// {
// TreeNode newNode = new TreeNode();
// newNode.NodeID = q.InstallationId;
// newNode.Text = q.InstallationName;
// newNode.ToolTip = Resources.Lan.InstallationName;
// newNode.Expanded = true;
// this.tvControlItem.Nodes.Add(newNode);
// this.BindNodes(newNode, projectWeldReports, startTime, endTime);
// }
// }
// else
// {
// var installations = (from x in projectWeldReports
// join y in Funs.DB.Project_Installation
// on x.InstallationId equals y.InstallationId
// where x.WeldingDate >= startTime && x.WeldingDate < endTime
// select y).Distinct().ToList();
// foreach (var q in installations)
// {
// TreeNode newNode = new TreeNode();
// newNode.NodeID = q.InstallationId;
// newNode.Text = q.InstallationName;
// newNode.ToolTip = Resources.Lan.InstallationName;
// newNode.Expanded = true;
// this.tvControlItem.Nodes.Add(newNode);
// this.BindNodes(newNode, projectWeldReports, startTime, endTime);
// }
// }
}
else if (node.ToolTip == Resources.Lan.InstallationName)
{
List<Model.Base_Unit> units = null;
if (pUnitDepth != null && pUnitDepth.UnitType == Const.UnitType_5)
{
units = (from x in Funs.DB.Base_Unit
where x.UnitId == this.CurrUser.UnitId
select x).ToList();
//}
//else if (node.ToolTip == Resources.Lan.InstallationName)
//{
// List<Model.Base_Unit> units = null;
// if (pUnitDepth != null && pUnitDepth.UnitType == Const.UnitType_5)
// {
// units = (from x in Funs.DB.Base_Unit
// where x.UnitId == this.CurrUser.UnitId
// select x).ToList();
}
else
{
units = (from x in projectWeldReports
join y in Funs.DB.Project_Installation
on x.InstallationId equals y.InstallationId
join z in Funs.DB.Base_Unit
on x.UnitId equals z.UnitId
where x.InstallationId == node.NodeID && x.WeldingDate >= startTime && x.WeldingDate < endTime
select z).Distinct().ToList();
}
// }
// else
// {
// units = (from x in projectWeldReports
// join y in Funs.DB.Project_Installation
// on x.InstallationId equals y.InstallationId
// join z in Funs.DB.Base_Unit
// on x.UnitId equals z.UnitId
// where x.InstallationId == node.NodeID && x.WeldingDate >= startTime && x.WeldingDate < endTime
// select z).Distinct().ToList();
// }
units = units.OrderBy(x => x.InTime).Distinct().ToList();
foreach (var q in units)
{
TreeNode newNode = new TreeNode();
newNode.Text = q.UnitName;
newNode.NodeID = q.UnitId + "|" + node.NodeID;
newNode.ToolTip = Resources.Lan.UnitName;
newNode.EnableClickEvent = true;
node.Nodes.Add(newNode);
}
}
// units = units.OrderBy(x => x.InTime).Distinct().ToList();
// foreach (var q in units)
// {
// TreeNode newNode = new TreeNode();
// newNode.Text = q.UnitName;
// newNode.NodeID = q.UnitId + "|" + node.NodeID;
// newNode.ToolTip = Resources.Lan.UnitName;
// newNode.EnableClickEvent = true;
// node.Nodes.Add(newNode);
// }
//}
}
#endregion
#endregion
@ -173,13 +175,13 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
/// </summary>
private void BindGrid()
{
if (this.tvControlItem.SelectedNode != null && this.tvControlItem.SelectedNode.ToolTip == Resources.Lan.UnitName)
{
string[] strs = this.tvControlItem.SelectedNodeID.Split('|');
DateTime startDate = Convert.ToDateTime(this.txtMonth.Text.Trim() + "-1");
DateTime endDate = startDate.AddMonths(1);
string startDateStr = string.Format("{0:yyyy-MM-dd}", startDate);
string endDateStr = string.Format("{0:yyyy-MM-dd}", endDate);
//if (this.tvControlItem.SelectedNode != null && this.tvControlItem.SelectedNode.ToolTip == Resources.Lan.UnitName)
//{
//string[] strs = this.tvControlItem.SelectedNodeID.Split('|');
//DateTime startDate = Convert.ToDateTime(this.txtMonth.Text.Trim() + "-1");
//DateTime endDate = startDate.AddMonths(1);
//string startDateStr = string.Format("{0:yyyy-MM-dd}", startDate);
//string endDateStr = string.Format("{0:yyyy-MM-dd}", endDate);
string strSql = @"SELECT distinct d.WeldingDailyId,d.WeldingDailyCode,d.ProjectId,
d.InstallationId,d.UnitId,d.WeldingDate,d.Tabler,d.TableDate,d.Remark
FROM dbo.Pipeline_WeldingDaily d
@ -191,14 +193,18 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
};
strSql += " AND d.ProjectId =@ProjectId";
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
if (drpInstallation.SelectedValue != Const._Null)
{
strSql += " AND d.InstallationId =@InstallationId";
listStr.Add(new SqlParameter("@InstallationId", strs[1]));
strSql += " AND d.UnitId =@UnitId";
listStr.Add(new SqlParameter("@UnitId", strs[0]));
strSql += " AND d.WeldingDate >=@startDateStr";
listStr.Add(new SqlParameter("@startDateStr", startDateStr));
strSql += " AND d.WeldingDate <@endDateStr";
listStr.Add(new SqlParameter("@endDateStr", endDateStr));
listStr.Add(new SqlParameter("@InstallationId", drpInstallation.SelectedValue));
}
//strSql += " AND d.UnitId =@UnitId";
//listStr.Add(new SqlParameter("@UnitId", strs[0]));
//strSql += " AND d.WeldingDate >=@startDateStr";
//listStr.Add(new SqlParameter("@startDateStr", startDateStr));
//strSql += " AND d.WeldingDate <@endDateStr";
//listStr.Add(new SqlParameter("@endDateStr", endDateStr));
if (!string.IsNullOrEmpty(this.txtWeldingDate.Text.Trim()))
{
strSql += " AND d.WeldingDate = @WeldingDate";
@ -211,9 +217,10 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
}
if (!string.IsNullOrEmpty(this.txtWeldJointCode.Text.Trim()))
{
strSql += " AND w.WeldJointCode LIKE @WeldJointCode";
listStr.Add(new SqlParameter("@WeldJointCode", "%" + this.txtWeldJointCode.Text.Trim() + "%"));
strSql += " AND w.WeldJointCode = @WeldJointCode";
listStr.Add(new SqlParameter("@WeldJointCode", this.txtWeldJointCode.Text.Trim()));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
@ -224,7 +231,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
}
//}
}
#endregion

View File

@ -7,10 +7,12 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.WeldingProcess.WeldingManage {
namespace FineUIPro.Web.WeldingProcess.WeldingManage
{
public partial class WeldReport {
public partial class WeldReport
{
/// <summary>
/// form1 控件。
@ -39,51 +41,6 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// panelLeftRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// txtMonth 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtMonth;
/// <summary>
/// tvControlItem 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tree tvControlItem;
/// <summary>
/// panelCenterRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelCenterRegion;
/// <summary>
/// Toolbar3 控件。
/// </summary>
@ -165,6 +122,15 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
/// </remarks>
protected global::FineUIPro.DatePicker txtWeldingDate;
/// <summary>
/// drpInstallation 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpInstallation;
/// <summary>
/// txtPipelineCode 控件。
/// </summary>

View File

@ -65,6 +65,16 @@
DataField="SingleNumber" FieldType="String" HeaderTextAlign="Center"
Width="180px">
</f:RenderField>
<f:RenderField HeaderText="管道等级" ColumnID="PipingClassCode"
DataField="PipingClassCode" FieldType="String" HeaderTextAlign="Center"
Width="90px">
</f:RenderField>
<f:RenderField HeaderText="压力管道分级" ColumnID="PIPClassCode"
DataField="PIPClassCode" FieldType="String" HeaderTextAlign="Center"
Width="110px">
</f:RenderField>
<f:RenderField HeaderText="<%$ Resources:Lan,PipelineCode %>" ColumnID="PipelineCode"
DataField="PipelineCode" SortField="PipelineCode" FieldType="String" HeaderTextAlign="Center"
Width="180px">

View File

@ -225,152 +225,162 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
reportModel.GetRow(rowIndex).GetCell(5).SetCellValue(itemOver["PipelineCode"].ToString());
reportModel.GetRow(rowIndex).GetCell(5).CellStyle = style;
//图纸版次
//管道等级
if (reportModel.GetRow(rowIndex).GetCell(6) == null) reportModel.GetRow(rowIndex).CreateCell(6);
reportModel.GetRow(rowIndex).GetCell(6).SetCellValue(itemOver["DrawingsNum"].ToString());
reportModel.GetRow(rowIndex).GetCell(6).SetCellValue(itemOver["PipingClassCode"].ToString());
reportModel.GetRow(rowIndex).GetCell(6).CellStyle = style;
//页码
//压力管道分级
if (reportModel.GetRow(rowIndex).GetCell(7) == null) reportModel.GetRow(rowIndex).CreateCell(7);
reportModel.GetRow(rowIndex).GetCell(7).SetCellValue(itemOver["PageNum"].ToString());
reportModel.GetRow(rowIndex).GetCell(7).SetCellValue(itemOver["PIPClassCode"].ToString());
reportModel.GetRow(rowIndex).GetCell(7).CellStyle = style;
//管段
//图纸版次
if (reportModel.GetRow(rowIndex).GetCell(8) == null) reportModel.GetRow(rowIndex).CreateCell(8);
reportModel.GetRow(rowIndex).GetCell(8).SetCellValue(itemOver["PipeSegment"].ToString());
reportModel.GetRow(rowIndex).GetCell(8).SetCellValue(itemOver["DrawingsNum"].ToString());
reportModel.GetRow(rowIndex).GetCell(8).CellStyle = style;
//焊口号
//页码
if (reportModel.GetRow(rowIndex).GetCell(9) == null) reportModel.GetRow(rowIndex).CreateCell(9);
reportModel.GetRow(rowIndex).GetCell(9).SetCellValue(itemOver["WeldJointCode"].ToString());
reportModel.GetRow(rowIndex).GetCell(9).SetCellValue(itemOver["PageNum"].ToString());
reportModel.GetRow(rowIndex).GetCell(9).CellStyle = style;
//焊缝类型
//管段
if (reportModel.GetRow(rowIndex).GetCell(10) == null) reportModel.GetRow(rowIndex).CreateCell(10);
reportModel.GetRow(rowIndex).GetCell(10).SetCellValue(itemOver["WeldTypeCode"].ToString());
reportModel.GetRow(rowIndex).GetCell(10).SetCellValue(itemOver["PipeSegment"].ToString());
reportModel.GetRow(rowIndex).GetCell(10).CellStyle = style;
//焊接位置
//焊口号
if (reportModel.GetRow(rowIndex).GetCell(11) == null) reportModel.GetRow(rowIndex).CreateCell(11);
reportModel.GetRow(rowIndex).GetCell(11).SetCellValue(itemOver["WeldingLocationCode"].ToString());
reportModel.GetRow(rowIndex).GetCell(11).SetCellValue(itemOver["WeldJointCode"].ToString());
reportModel.GetRow(rowIndex).GetCell(11).CellStyle = style;
//管径
//焊缝类型
if (reportModel.GetRow(rowIndex).GetCell(12) == null) reportModel.GetRow(rowIndex).CreateCell(12);
reportModel.GetRow(rowIndex).GetCell(12).SetCellValue(itemOver["JOT_Size"].ToString());
reportModel.GetRow(rowIndex).GetCell(12).SetCellValue(itemOver["WeldTypeCode"].ToString());
reportModel.GetRow(rowIndex).GetCell(12).CellStyle = style;
//规格
//焊接位置
if (reportModel.GetRow(rowIndex).GetCell(13) == null) reportModel.GetRow(rowIndex).CreateCell(13);
reportModel.GetRow(rowIndex).GetCell(13).SetCellValue(itemOver["Specification"].ToString());
reportModel.GetRow(rowIndex).GetCell(13).SetCellValue(itemOver["WeldingLocationCode"].ToString());
reportModel.GetRow(rowIndex).GetCell(13).CellStyle = style;
//材质1
//管径
if (reportModel.GetRow(rowIndex).GetCell(14) == null) reportModel.GetRow(rowIndex).CreateCell(14);
reportModel.GetRow(rowIndex).GetCell(14).SetCellValue(itemOver["MaterialCode1"].ToString());
reportModel.GetRow(rowIndex).GetCell(14).SetCellValue(itemOver["JOT_Size"].ToString());
reportModel.GetRow(rowIndex).GetCell(14).CellStyle = style;
//材质2
//规格
if (reportModel.GetRow(rowIndex).GetCell(15) == null) reportModel.GetRow(rowIndex).CreateCell(15);
reportModel.GetRow(rowIndex).GetCell(15).SetCellValue(itemOver["MaterialCode2"].ToString());
reportModel.GetRow(rowIndex).GetCell(15).SetCellValue(itemOver["Specification"].ToString());
reportModel.GetRow(rowIndex).GetCell(15).CellStyle = style;
//组件1
//材质1
if (reportModel.GetRow(rowIndex).GetCell(16) == null) reportModel.GetRow(rowIndex).CreateCell(16);
reportModel.GetRow(rowIndex).GetCell(16).SetCellValue(itemOver["PipeAssembly1"].ToString());
reportModel.GetRow(rowIndex).GetCell(16).SetCellValue(itemOver["MaterialCode1"].ToString());
reportModel.GetRow(rowIndex).GetCell(16).CellStyle = style;
//组件2
//材质2
if (reportModel.GetRow(rowIndex).GetCell(17) == null) reportModel.GetRow(rowIndex).CreateCell(17);
reportModel.GetRow(rowIndex).GetCell(17).SetCellValue(itemOver["PipeAssembly2"].ToString());
reportModel.GetRow(rowIndex).GetCell(17).SetCellValue(itemOver["MaterialCode2"].ToString());
reportModel.GetRow(rowIndex).GetCell(17).CellStyle = style;
//组件1
if (reportModel.GetRow(rowIndex).GetCell(18) == null) reportModel.GetRow(rowIndex).CreateCell(18);
reportModel.GetRow(rowIndex).GetCell(18).SetCellValue(itemOver["PipeAssembly1"].ToString());
reportModel.GetRow(rowIndex).GetCell(18).CellStyle = style;
//组件2
if (reportModel.GetRow(rowIndex).GetCell(19) == null) reportModel.GetRow(rowIndex).CreateCell(19);
reportModel.GetRow(rowIndex).GetCell(19).SetCellValue(itemOver["PipeAssembly2"].ToString());
reportModel.GetRow(rowIndex).GetCell(19).CellStyle = style;
//炉批号1
if (reportModel.GetRow(rowIndex).GetCell(18) == null) reportModel.GetRow(rowIndex).CreateCell(18);
reportModel.GetRow(rowIndex).GetCell(18).SetCellValue(itemOver["HeartNo1"].ToString());
reportModel.GetRow(rowIndex).GetCell(18).CellStyle = style;
//炉批号2
if (reportModel.GetRow(rowIndex).GetCell(19) == null) reportModel.GetRow(rowIndex).CreateCell(19);
reportModel.GetRow(rowIndex).GetCell(19).SetCellValue(itemOver["HeartNo2"].ToString());
reportModel.GetRow(rowIndex).GetCell(19).CellStyle = style;
//WPS编号
if (reportModel.GetRow(rowIndex).GetCell(20) == null) reportModel.GetRow(rowIndex).CreateCell(20);
reportModel.GetRow(rowIndex).GetCell(20).SetCellValue(itemOver["WPQCode"].ToString());
reportModel.GetRow(rowIndex).GetCell(20).SetCellValue(itemOver["HeartNo1"].ToString());
reportModel.GetRow(rowIndex).GetCell(20).CellStyle = style;
//打底焊工
//炉批号2
if (reportModel.GetRow(rowIndex).GetCell(21) == null) reportModel.GetRow(rowIndex).CreateCell(21);
reportModel.GetRow(rowIndex).GetCell(21).SetCellValue(itemOver["BackingWelderCode"].ToString());
reportModel.GetRow(rowIndex).GetCell(21).SetCellValue(itemOver["HeartNo2"].ToString());
reportModel.GetRow(rowIndex).GetCell(21).CellStyle = style;
//盖面焊工
//WPS编号
if (reportModel.GetRow(rowIndex).GetCell(22) == null) reportModel.GetRow(rowIndex).CreateCell(22);
reportModel.GetRow(rowIndex).GetCell(22).SetCellValue(itemOver["CoverWelderCode"].ToString());
reportModel.GetRow(rowIndex).GetCell(22).SetCellValue(itemOver["WPQCode"].ToString());
reportModel.GetRow(rowIndex).GetCell(22).CellStyle = style;
//打底焊工
if (reportModel.GetRow(rowIndex).GetCell(23) == null) reportModel.GetRow(rowIndex).CreateCell(23);
reportModel.GetRow(rowIndex).GetCell(23).SetCellValue(itemOver["BackingWelderCode"].ToString());
reportModel.GetRow(rowIndex).GetCell(23).CellStyle = style;
//盖面焊工
if (reportModel.GetRow(rowIndex).GetCell(24) == null) reportModel.GetRow(rowIndex).CreateCell(24);
reportModel.GetRow(rowIndex).GetCell(24).SetCellValue(itemOver["CoverWelderCode"].ToString());
reportModel.GetRow(rowIndex).GetCell(24).CellStyle = style;
//焊接方法
if (reportModel.GetRow(rowIndex).GetCell(23) == null) reportModel.GetRow(rowIndex).CreateCell(23);
reportModel.GetRow(rowIndex).GetCell(23).SetCellValue(itemOver["WeldingMethodName"].ToString());
reportModel.GetRow(rowIndex).GetCell(23).CellStyle = style;
//介质
if (reportModel.GetRow(rowIndex).GetCell(24) == null) reportModel.GetRow(rowIndex).CreateCell(24);
reportModel.GetRow(rowIndex).GetCell(24).SetCellValue(itemOver["MediumName"].ToString());
reportModel.GetRow(rowIndex).GetCell(24).CellStyle = style;
//焊接日期
if (reportModel.GetRow(rowIndex).GetCell(25) == null) reportModel.GetRow(rowIndex).CreateCell(25);
reportModel.GetRow(rowIndex).GetCell(25).SetCellValue(itemOver["WeldingMethodName"].ToString());
reportModel.GetRow(rowIndex).GetCell(25).CellStyle = style;
//介质
if (reportModel.GetRow(rowIndex).GetCell(26) == null) reportModel.GetRow(rowIndex).CreateCell(26);
reportModel.GetRow(rowIndex).GetCell(26).SetCellValue(itemOver["MediumName"].ToString());
reportModel.GetRow(rowIndex).GetCell(26).CellStyle = style;
//焊接日期
if (reportModel.GetRow(rowIndex).GetCell(27) == null) reportModel.GetRow(rowIndex).CreateCell(27);
if (itemOver["WeldingDate"] != null && itemOver["WeldingDate"].ToString() != string.Empty)
{
reportModel.GetRow(rowIndex).GetCell(25).SetCellValue((DateTime)Convert.ToDateTime(itemOver["WeldingDate"].ToString()));
reportModel.GetRow(rowIndex).GetCell(25).CellStyle = styleDate;
reportModel.GetRow(rowIndex).GetCell(27).SetCellValue((DateTime)Convert.ToDateTime(itemOver["WeldingDate"].ToString()));
reportModel.GetRow(rowIndex).GetCell(27).CellStyle = styleDate;
}
//reportModel.GetRow(rowIndex).GetCell(23).SetCellValue(itemOver["WeldingDate"].ToString());
//焊接日报号
if (reportModel.GetRow(rowIndex).GetCell(26) == null) reportModel.GetRow(rowIndex).CreateCell(26);
reportModel.GetRow(rowIndex).GetCell(26).SetCellValue(itemOver["WeldingDailyCode"].ToString());
reportModel.GetRow(rowIndex).GetCell(26).CellStyle = style;
//检测类型
if (reportModel.GetRow(rowIndex).GetCell(27) == null) reportModel.GetRow(rowIndex).CreateCell(27);
reportModel.GetRow(rowIndex).GetCell(27).SetCellValue(itemOver["DetectionTypeCode"].ToString());
reportModel.GetRow(rowIndex).GetCell(27).CellStyle = style;
//是否点口
if (reportModel.GetRow(rowIndex).GetCell(28) == null) reportModel.GetRow(rowIndex).CreateCell(28);
reportModel.GetRow(rowIndex).GetCell(28).SetCellValue(itemOver["if_dk"].ToString());
reportModel.GetRow(rowIndex).GetCell(28).SetCellValue(itemOver["WeldingDailyCode"].ToString());
reportModel.GetRow(rowIndex).GetCell(28).CellStyle = style;
//委托号
//检测类型
if (reportModel.GetRow(rowIndex).GetCell(29) == null) reportModel.GetRow(rowIndex).CreateCell(29);
reportModel.GetRow(rowIndex).GetCell(29).SetCellValue(itemOver["TrustBatchCode"].ToString());
reportModel.GetRow(rowIndex).GetCell(29).SetCellValue(itemOver["DetectionTypeCode"].ToString());
reportModel.GetRow(rowIndex).GetCell(29).CellStyle = style;
//检测比例
//是否点口
if (reportModel.GetRow(rowIndex).GetCell(30) == null) reportModel.GetRow(rowIndex).CreateCell(30);
reportModel.GetRow(rowIndex).GetCell(30).SetCellValue(itemOver["DetectionRateCode"].ToString());
reportModel.GetRow(rowIndex).GetCell(30).SetCellValue(itemOver["if_dk"].ToString());
reportModel.GetRow(rowIndex).GetCell(30).CellStyle = style;
//合格等级
//委托号
if (reportModel.GetRow(rowIndex).GetCell(31) == null) reportModel.GetRow(rowIndex).CreateCell(31);
reportModel.GetRow(rowIndex).GetCell(31).SetCellValue(itemOver["AcceptLevel"].ToString());
reportModel.GetRow(rowIndex).GetCell(31).SetCellValue(itemOver["TrustBatchCode"].ToString());
reportModel.GetRow(rowIndex).GetCell(31).CellStyle = style;
//检测日期
//检测比例
if (reportModel.GetRow(rowIndex).GetCell(32) == null) reportModel.GetRow(rowIndex).CreateCell(32);
reportModel.GetRow(rowIndex).GetCell(32).SetCellValue(itemOver["DetectionRateCode"].ToString());
reportModel.GetRow(rowIndex).GetCell(32).CellStyle = style;
//合格等级
if (reportModel.GetRow(rowIndex).GetCell(33) == null) reportModel.GetRow(rowIndex).CreateCell(33);
reportModel.GetRow(rowIndex).GetCell(33).SetCellValue(itemOver["AcceptLevel"].ToString());
reportModel.GetRow(rowIndex).GetCell(33).CellStyle = style;
//检测日期
if (reportModel.GetRow(rowIndex).GetCell(34) == null) reportModel.GetRow(rowIndex).CreateCell(34);
if (itemOver["CHT_CHECKDATE"] != null && itemOver["CHT_CHECKDATE"].ToString() != string.Empty)
{
reportModel.GetRow(rowIndex).GetCell(32).SetCellValue((DateTime)Convert.ToDateTime(itemOver["CHT_CHECKDATE"].ToString()));
reportModel.GetRow(rowIndex).GetCell(32).CellStyle = styleDate;
reportModel.GetRow(rowIndex).GetCell(34).SetCellValue((DateTime)Convert.ToDateTime(itemOver["CHT_CHECKDATE"].ToString()));
reportModel.GetRow(rowIndex).GetCell(34).CellStyle = styleDate;
}
//reportModel.GetRow(rowIndex).GetCell(30).SetCellValue(itemOver["CHT_CHECKDATE"].ToString());
//检测报告
if (reportModel.GetRow(rowIndex).GetCell(33) == null) reportModel.GetRow(rowIndex).CreateCell(33);
reportModel.GetRow(rowIndex).GetCell(33).SetCellValue(itemOver["NDEReportNo"].ToString());
reportModel.GetRow(rowIndex).GetCell(33).CellStyle = style;
if (reportModel.GetRow(rowIndex).GetCell(35) == null) reportModel.GetRow(rowIndex).CreateCell(35);
reportModel.GetRow(rowIndex).GetCell(35).SetCellValue(itemOver["NDEReportNo"].ToString());
reportModel.GetRow(rowIndex).GetCell(35).CellStyle = style;
//是否热处理
if (reportModel.GetRow(rowIndex).GetCell(34) == null) reportModel.GetRow(rowIndex).CreateCell(34);
reportModel.GetRow(rowIndex).GetCell(34).SetCellValue(itemOver["IsHotProess"].ToString());
reportModel.GetRow(rowIndex).GetCell(34).CellStyle = style;
//热处理报告
if (reportModel.GetRow(rowIndex).GetCell(35) == null) reportModel.GetRow(rowIndex).CreateCell(35);
reportModel.GetRow(rowIndex).GetCell(35).SetCellValue(itemOver["HotReportCode"].ToString());
reportModel.GetRow(rowIndex).GetCell(35).CellStyle = style;
//焊丝
if (reportModel.GetRow(rowIndex).GetCell(36) == null) reportModel.GetRow(rowIndex).CreateCell(36);
reportModel.GetRow(rowIndex).GetCell(36).SetCellValue(ConvertWeldSilk(itemOver["WeldSilkId"]));
reportModel.GetRow(rowIndex).GetCell(36).SetCellValue(itemOver["IsHotProess"].ToString());
reportModel.GetRow(rowIndex).GetCell(36).CellStyle = style;
//焊条
//热处理报告
if (reportModel.GetRow(rowIndex).GetCell(37) == null) reportModel.GetRow(rowIndex).CreateCell(37);
reportModel.GetRow(rowIndex).GetCell(37).SetCellValue(itemOver["WMT_MatCode"].ToString());
reportModel.GetRow(rowIndex).GetCell(37).SetCellValue(itemOver["HotReportCode"].ToString());
reportModel.GetRow(rowIndex).GetCell(37).CellStyle = style;
//焊
//焊丝
if (reportModel.GetRow(rowIndex).GetCell(38) == null) reportModel.GetRow(rowIndex).CreateCell(38);
reportModel.GetRow(rowIndex).GetCell(38).SetCellValue(ConvertWeldFlux(itemOver["WeldSilkId"]));
reportModel.GetRow(rowIndex).GetCell(38).SetCellValue(ConvertWeldSilk(itemOver["WeldSilkId"]));
reportModel.GetRow(rowIndex).GetCell(38).CellStyle = style;
//焊条
if (reportModel.GetRow(rowIndex).GetCell(39) == null) reportModel.GetRow(rowIndex).CreateCell(39);
reportModel.GetRow(rowIndex).GetCell(39).SetCellValue(itemOver["WMT_MatCode"].ToString());
reportModel.GetRow(rowIndex).GetCell(39).CellStyle = style;
//焊剂
if (reportModel.GetRow(rowIndex).GetCell(40) == null) reportModel.GetRow(rowIndex).CreateCell(40);
reportModel.GetRow(rowIndex).GetCell(40).SetCellValue(ConvertWeldFlux(itemOver["WeldSilkId"]));
reportModel.GetRow(rowIndex).GetCell(40).CellStyle = style;
#endregion