This commit is contained in:
parent
30ed22732a
commit
b7fb2e95bb
|
|
@ -149,7 +149,7 @@ var stockList = TwMaterialstockService.GetTw_MaterialStockByModle(twMaterialStoc
|
||||||
/// <param name="pipelineId"></param>
|
/// <param name="pipelineId"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static decimal? GetPipeMatch(string pipelineId)
|
public static decimal? GetPipeMatch(string pipelineId)
|
||||||
{
|
{
|
||||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
{
|
{
|
||||||
var twPipeMatMatchOutputs = new List<Tw_PipeMatMatchOutput>();
|
var twPipeMatMatchOutputs = new List<Tw_PipeMatMatchOutput>();
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,87 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Report ScriptLanguage="CSharp" ReportInfo.Created="04/19/2026 09:00:00" ReportInfo.Modified="04/19/2026 00:22:44" ReportInfo.CreatorVersion="2017.1.16.0">
|
||||||
|
<ScriptText>using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Data;
|
||||||
|
using FastReport;
|
||||||
|
using FastReport.Data;
|
||||||
|
using FastReport.Dialog;
|
||||||
|
using FastReport.Table;
|
||||||
|
using FastReport.Utils;
|
||||||
|
|
||||||
|
namespace FastReport
|
||||||
|
{
|
||||||
|
public class ReportScript
|
||||||
|
{
|
||||||
|
private void TableData_ManualBuild(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
DataSourceBase rowData = Report.GetDataSource("Table1");
|
||||||
|
rowData.Init();
|
||||||
|
while (rowData.HasMoreRows)
|
||||||
|
{
|
||||||
|
TableData.PrintRow(0);
|
||||||
|
TableData.PrintColumns();
|
||||||
|
rowData.Next();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</ScriptText>
|
||||||
|
<Dictionary>
|
||||||
|
<TableDataSource Name="Table1" ReferenceName="Table1" DataType="System.Int32" Enabled="true">
|
||||||
|
<Column Name="PipelineCode" DataType="System.String"/>
|
||||||
|
<Column Name="SegmentCode" DataType="System.String"/>
|
||||||
|
<Column Name="WeldJointCode" DataType="System.String"/>
|
||||||
|
<Column Name="WeldJointMaterial" DataType="System.String"/>
|
||||||
|
<Column Name="DiaAndThickness" DataType="System.String"/>
|
||||||
|
</TableDataSource>
|
||||||
|
<Parameter Name="Code" DataType="System.String"/>
|
||||||
|
<Parameter Name="UnitWorkName" DataType="System.String"/>
|
||||||
|
</Dictionary>
|
||||||
|
<ReportPage Name="Page1" Landscape="true" PaperWidth="297" PaperHeight="210" RawPaperSize="9">
|
||||||
|
<PageHeaderBand Name="PageHeader1" Width="1047.06" Height="97.33">
|
||||||
|
<TableObject Name="TableHeader" Left="9.45" Top="9.45" Width="1028.16" Height="87.88" Border.Lines="All" Fill.Color="255, 255, 255">
|
||||||
|
<TableColumn Name="Column1" Width="204.86"/>
|
||||||
|
<TableColumn Name="Column2" Width="204.86"/>
|
||||||
|
<TableColumn Name="Column3" Width="274.66"/>
|
||||||
|
<TableColumn Name="Column4" Width="343.78"/>
|
||||||
|
<TableRow Name="Row1" Height="31.18">
|
||||||
|
<TableCell Name="Cell1" Text="任务单焊口号(安装)" HorzAlign="Center" VertAlign="Center" Font="宋体, 18pt, style=Bold" ColSpan="4"/>
|
||||||
|
<TableCell Name="Cell2"/>
|
||||||
|
<TableCell Name="Cell3"/>
|
||||||
|
<TableCell Name="Cell4"/>
|
||||||
|
</TableRow>
|
||||||
|
<TableRow Name="Row2" Height="28.35">
|
||||||
|
<TableCell Name="Cell5" Text="装置名称:[UnitWorkName]" VertAlign="Center" Font="宋体, 12pt" ColSpan="2"/>
|
||||||
|
<TableCell Name="Cell6"/>
|
||||||
|
<TableCell Name="Cell7" Text="任务单编号:[Code]" VertAlign="Center" Font="宋体, 12pt" ColSpan="2"/>
|
||||||
|
<TableCell Name="Cell8"/>
|
||||||
|
</TableRow>
|
||||||
|
<TableRow Name="Row3" Height="28.35">
|
||||||
|
<TableCell Name="Cell9" Border.Lines="All" Text="管线号" HorzAlign="Center" VertAlign="Center" Font="宋体, 13pt"/>
|
||||||
|
<TableCell Name="Cell10" Border.Lines="All" Text="焊口号" HorzAlign="Center" VertAlign="Center" Font="宋体, 13pt"/>
|
||||||
|
<TableCell Name="Cell11" Border.Lines="All" Text="材质" HorzAlign="Center" VertAlign="Center" Font="宋体, 13pt"/>
|
||||||
|
<TableCell Name="Cell12" Border.Lines="All" Text="规格" HorzAlign="Center" VertAlign="Center" Font="宋体, 13pt"/>
|
||||||
|
</TableRow>
|
||||||
|
</TableObject>
|
||||||
|
</PageHeaderBand>
|
||||||
|
<DataBand Name="Data1" Top="101.54" Width="1047.06" Height="28.35">
|
||||||
|
<TableObject Name="TableData" Left="9.45" Width="1028.16" Height="28.35" Border.Lines="All" ManualBuildEvent="TableData_ManualBuild">
|
||||||
|
<TableColumn Name="DataColumn1" Width="204.86"/>
|
||||||
|
<TableColumn Name="DataColumn2" Width="204.86"/>
|
||||||
|
<TableColumn Name="DataColumn3" Width="274.66"/>
|
||||||
|
<TableColumn Name="DataColumn4" Width="343.78"/>
|
||||||
|
<TableRow Name="DataRow1" Height="28.35">
|
||||||
|
<TableCell Name="DataCell1" Border.Lines="All" Text="[Table1.PipelineCode]" HorzAlign="Center" VertAlign="Center" Font="宋体, 11pt"/>
|
||||||
|
<TableCell Name="DataCell2" Border.Lines="All" Text="[Table1.WeldJointCode]" HorzAlign="Center" VertAlign="Center" Font="宋体, 11pt"/>
|
||||||
|
<TableCell Name="DataCell3" Border.Lines="All" Text="[Table1.WeldJointMaterial]" HorzAlign="Center" VertAlign="Center" Font="宋体, 11pt"/>
|
||||||
|
<TableCell Name="DataCell4" Border.Lines="All" Text="[Table1.DiaAndThickness]" HorzAlign="Center" VertAlign="Center" Font="宋体, 11pt"/>
|
||||||
|
</TableRow>
|
||||||
|
</TableObject>
|
||||||
|
</DataBand>
|
||||||
|
</ReportPage>
|
||||||
|
</Report>
|
||||||
|
|
@ -0,0 +1,93 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Report ScriptLanguage="CSharp" ReportInfo.Created="04/19/2026 09:00:00" ReportInfo.Modified="04/19/2026 00:22:04" ReportInfo.CreatorVersion="2017.1.16.0">
|
||||||
|
<ScriptText>using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Data;
|
||||||
|
using FastReport;
|
||||||
|
using FastReport.Data;
|
||||||
|
using FastReport.Dialog;
|
||||||
|
using FastReport.Table;
|
||||||
|
using FastReport.Utils;
|
||||||
|
|
||||||
|
namespace FastReport
|
||||||
|
{
|
||||||
|
public class ReportScript
|
||||||
|
{
|
||||||
|
private void TableData_ManualBuild(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
DataSourceBase rowData = Report.GetDataSource("Table1");
|
||||||
|
rowData.Init();
|
||||||
|
while (rowData.HasMoreRows)
|
||||||
|
{
|
||||||
|
TableData.PrintRow(0);
|
||||||
|
TableData.PrintColumns();
|
||||||
|
rowData.Next();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</ScriptText>
|
||||||
|
<Dictionary>
|
||||||
|
<TableDataSource Name="Table1" ReferenceName="Table1" DataType="System.Int32" Enabled="true">
|
||||||
|
<Column Name="PipelineCode" DataType="System.String"/>
|
||||||
|
<Column Name="SegmentCode" DataType="System.String"/>
|
||||||
|
<Column Name="WeldJointCode" DataType="System.String"/>
|
||||||
|
<Column Name="WeldJointMaterial" DataType="System.String"/>
|
||||||
|
<Column Name="DiaAndThickness" DataType="System.String"/>
|
||||||
|
</TableDataSource>
|
||||||
|
<Parameter Name="Code" DataType="System.String"/>
|
||||||
|
<Parameter Name="UnitWorkName" DataType="System.String"/>
|
||||||
|
</Dictionary>
|
||||||
|
<ReportPage Name="Page1" Landscape="true" PaperWidth="297" PaperHeight="210" RawPaperSize="9">
|
||||||
|
<PageHeaderBand Name="PageHeader1" Width="1047.06" Height="97.33">
|
||||||
|
<TableObject Name="TableHeader" Left="9.45" Top="9.45" Width="1028.16" Height="87.88" Border.Lines="All" Fill.Color="255, 255, 255">
|
||||||
|
<TableColumn Name="Column1" Width="159.75"/>
|
||||||
|
<TableColumn Name="Column2" Width="159.75"/>
|
||||||
|
<TableColumn Name="Column3" Width="159.75"/>
|
||||||
|
<TableColumn Name="Column4" Width="239.62"/>
|
||||||
|
<TableColumn Name="Column5" Width="309.29"/>
|
||||||
|
<TableRow Name="Row1" Height="31.18">
|
||||||
|
<TableCell Name="Cell1" Text="任务单焊口号(预制)" HorzAlign="Center" VertAlign="Center" Font="宋体, 18pt, style=Bold" ColSpan="5"/>
|
||||||
|
<TableCell Name="Cell2"/>
|
||||||
|
<TableCell Name="Cell3"/>
|
||||||
|
<TableCell Name="Cell4"/>
|
||||||
|
<TableCell Name="Cell5"/>
|
||||||
|
</TableRow>
|
||||||
|
<TableRow Name="Row2" Height="28.35">
|
||||||
|
<TableCell Name="Cell6" Text="装置名称:[UnitWorkName]" VertAlign="Center" Font="宋体, 12pt" ColSpan="2"/>
|
||||||
|
<TableCell Name="Cell7"/>
|
||||||
|
<TableCell Name="Cell8" Text="任务单编号:[Code]" VertAlign="Center" Font="宋体, 12pt" ColSpan="3"/>
|
||||||
|
<TableCell Name="Cell9"/>
|
||||||
|
<TableCell Name="Cell10"/>
|
||||||
|
</TableRow>
|
||||||
|
<TableRow Name="Row3" Height="28.35">
|
||||||
|
<TableCell Name="Cell11" Border.Lines="All" Text="管线号" HorzAlign="Center" VertAlign="Center" Font="宋体, 13pt"/>
|
||||||
|
<TableCell Name="Cell12" Border.Lines="All" Text="管段号" HorzAlign="Center" VertAlign="Center" Font="宋体, 13pt"/>
|
||||||
|
<TableCell Name="Cell13" Border.Lines="All" Text="焊口号" HorzAlign="Center" VertAlign="Center" Font="宋体, 13pt"/>
|
||||||
|
<TableCell Name="Cell14" Border.Lines="All" Text="材质" HorzAlign="Center" VertAlign="Center" Font="宋体, 13pt"/>
|
||||||
|
<TableCell Name="Cell15" Border.Lines="All" Text="规格" HorzAlign="Center" VertAlign="Center" Font="宋体, 13pt"/>
|
||||||
|
</TableRow>
|
||||||
|
</TableObject>
|
||||||
|
</PageHeaderBand>
|
||||||
|
<DataBand Name="Data1" Top="101.54" Width="1047.06" Height="28.35">
|
||||||
|
<TableObject Name="TableData" Left="9.45" Width="1028.16" Height="28.35" Border.Lines="All" ManualBuildEvent="TableData_ManualBuild">
|
||||||
|
<TableColumn Name="DataColumn1" Width="159.75"/>
|
||||||
|
<TableColumn Name="DataColumn2" Width="159.75"/>
|
||||||
|
<TableColumn Name="DataColumn3" Width="159.75"/>
|
||||||
|
<TableColumn Name="DataColumn4" Width="239.62"/>
|
||||||
|
<TableColumn Name="DataColumn5" Width="309.29"/>
|
||||||
|
<TableRow Name="DataRow1" Height="28.35">
|
||||||
|
<TableCell Name="DataCell1" Border.Lines="All" Text="[Table1.PipelineCode]" HorzAlign="Center" VertAlign="Center" Font="宋体, 11pt"/>
|
||||||
|
<TableCell Name="DataCell2" Border.Lines="All" Text="[Table1.SegmentCode]" HorzAlign="Center" VertAlign="Center" Font="宋体, 11pt"/>
|
||||||
|
<TableCell Name="DataCell3" Border.Lines="All" Text="[Table1.WeldJointCode]" HorzAlign="Center" VertAlign="Center" Font="宋体, 11pt"/>
|
||||||
|
<TableCell Name="DataCell4" Border.Lines="All" Text="[Table1.WeldJointMaterial]" HorzAlign="Center" VertAlign="Center" Font="宋体, 11pt"/>
|
||||||
|
<TableCell Name="DataCell5" Border.Lines="All" Text="[Table1.DiaAndThickness]" HorzAlign="Center" VertAlign="Center" Font="宋体, 11pt"/>
|
||||||
|
</TableRow>
|
||||||
|
</TableObject>
|
||||||
|
</DataBand>
|
||||||
|
</ReportPage>
|
||||||
|
</Report>
|
||||||
|
|
@ -574,13 +574,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||||
|
|
||||||
protected void btnDeletePipelineMatchMat_Click(object sender, EventArgs e)
|
protected void btnDeletePipelineMatchMat_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (Grid3.SelectedRowID != "")
|
if (Grid3.SelectedRowIDArray != null && Grid3.SelectedRowIDArray.Any())
|
||||||
{
|
{
|
||||||
dicSeclectPipeLine.Remove(Grid3.SelectedRowID);
|
foreach (string rowId in Grid3.SelectedRowIDArray)
|
||||||
var node = tvControlItem.FindNode(Grid3.SelectedRowID);
|
|
||||||
if (node != null)
|
|
||||||
{
|
{
|
||||||
node.Checked = false;
|
dicSeclectPipeLine.Remove(rowId);
|
||||||
|
var node = tvControlItem.FindNode(rowId);
|
||||||
|
if (node != null)
|
||||||
|
{
|
||||||
|
node.Checked = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tw_PipeMatMatchOutputs = TwArrivalStatisticsService.GetPipeMatMatch(this.CurrUser.LoginProjectId, dicSeclectPipeLine.Keys.ToList(), drpWarehouse.SelectedValue);
|
tw_PipeMatMatchOutputs = TwArrivalStatisticsService.GetPipeMatMatch(this.CurrUser.LoginProjectId, dicSeclectPipeLine.Keys.ToList(), drpWarehouse.SelectedValue);
|
||||||
|
|
@ -770,4 +773,4 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||||
this.InitTreeMenu();//加载树
|
this.InitTreeMenu();//加载树
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,7 @@
|
||||||
<f:Button runat="server" ID="btnSearch" Icon="SystemSearch" ToolTip="查询" Text="查询" OnClick="btnSearch_Click">
|
<f:Button runat="server" ID="btnSearch" Icon="SystemSearch" ToolTip="查询" Text="查询" OnClick="btnSearch_Click">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||||
|
<f:Label ID="lblTotalSize" runat="server" Text="总达因数:0" CssClass="customlabel"></f:Label>
|
||||||
<f:Button ID="btnPassMaster" Text="专工审核" Icon="ArrowRefresh" runat="server" OnClick="btnPassMaster_OnClick">
|
<f:Button ID="btnPassMaster" Text="专工审核" Icon="ArrowRefresh" runat="server" OnClick="btnPassMaster_OnClick">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
<f:DatePicker ID="txtTaskDate" Label="计划焊接日期" runat="server"
|
<f:DatePicker ID="txtTaskDate" Label="计划焊接日期" runat="server"
|
||||||
|
|
@ -115,6 +116,12 @@
|
||||||
<f:Button ID="btnPrintJoint" Text="打印焊口贴纸" Icon="Printer" runat="server"
|
<f:Button ID="btnPrintJoint" Text="打印焊口贴纸" Icon="Printer" runat="server"
|
||||||
OnClick="btnPrintJoint_Click">
|
OnClick="btnPrintJoint_Click">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
|
<f:Button ID="btnPrintTaskJointPrefab" Text="焊口打印(预制)" Icon="Printer" runat="server"
|
||||||
|
OnClick="btnPrintTaskJointPrefab_Click">
|
||||||
|
</f:Button>
|
||||||
|
<f:Button ID="btnPrintTaskJointInstall" Text="焊口打印(安装)" Icon="Printer" runat="server"
|
||||||
|
OnClick="btnPrintTaskJointInstall_Click">
|
||||||
|
</f:Button>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Toolbar>
|
</f:Toolbar>
|
||||||
</Toolbars>
|
</Toolbars>
|
||||||
|
|
|
||||||
|
|
@ -279,6 +279,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||||
|
|
||||||
private void BindGrid(List<Model.View_HJGL_WeldingTask> weldingTask)
|
private void BindGrid(List<Model.View_HJGL_WeldingTask> weldingTask)
|
||||||
{
|
{
|
||||||
|
UpdateTotalSizeLabel(weldingTask);
|
||||||
if (!string.IsNullOrEmpty(this.txtPipelineCode.Text.Trim()))
|
if (!string.IsNullOrEmpty(this.txtPipelineCode.Text.Trim()))
|
||||||
{
|
{
|
||||||
weldingTask = weldingTask.Where(e => e.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())).OrderBy(x => x.PipeLineSortIndex).ToList();
|
weldingTask = weldingTask.Where(e => e.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())).OrderBy(x => x.PipeLineSortIndex).ToList();
|
||||||
|
|
@ -320,6 +321,97 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||||
//this.btnSave.Hidden = false;
|
//this.btnSave.Hidden = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void UpdateTotalSizeLabel(List<Model.View_HJGL_WeldingTask> weldingTask)
|
||||||
|
{
|
||||||
|
decimal totalSize = 0;
|
||||||
|
if (weldingTask != null && weldingTask.Count > 0)
|
||||||
|
{
|
||||||
|
totalSize = weldingTask.Sum(x => x.Size ?? 0);
|
||||||
|
}
|
||||||
|
lblTotalSize.Text = "总达因数:" + totalSize.ToString("0.##");
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<Model.View_HJGL_WeldingTask> GetCurrentTaskList()
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(tvControlItem.SelectedNodeID) || !tvControlItem.SelectedNodeID.Contains("|"))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
DateTime? taskTime = Funs.GetNewDateTime(tvControlItem.SelectedNodeID.Split('|')[2]);
|
||||||
|
if (taskTime == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId,
|
||||||
|
tvControlItem.SelectedNodeID.Split('|')[0],
|
||||||
|
tvControlItem.SelectedNodeID.Split('|')[1],
|
||||||
|
Convert.ToDateTime(taskTime),
|
||||||
|
this.rbIsAudit.SelectedValue,
|
||||||
|
tvControlItem.SelectedNodeID.Split('|')[3]);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void PrintTaskJoint(bool isInstall)
|
||||||
|
{
|
||||||
|
var taskList = GetCurrentTaskList();
|
||||||
|
if (taskList == null || !taskList.Any())
|
||||||
|
{
|
||||||
|
ShowNotify("请选择任务单", MessageBoxIcon.Question);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
BLL.FastReportService.ResetData();
|
||||||
|
var pipelineIds = taskList.Select(x => x.PipelineId).Distinct().ToList();
|
||||||
|
var pipelines = Funs.DB.HJGL_Pipeline.Where(x => pipelineIds.Contains(x.PipelineId)).ToList();
|
||||||
|
var result = taskList.OrderBy(x => x.PipeLineSortIndex).ThenBy(x => x.WeldJointCode).Select(x =>
|
||||||
|
{
|
||||||
|
var pipeline = pipelines.FirstOrDefault(y => y.PipelineId == x.PipelineId);
|
||||||
|
return new
|
||||||
|
{
|
||||||
|
PipelineCode = x.PipelineCode,
|
||||||
|
SegmentCode = isInstall ? string.Empty : (pipeline?.FlowingSection ?? x.PipelineCode),
|
||||||
|
WeldJointCode = !string.IsNullOrEmpty(x.PipelineCode) ? x.WeldJointCode.Replace(x.PipelineCode + "/", "") : x.WeldJointCode,
|
||||||
|
WeldJointMaterial = x.MaterialCode,
|
||||||
|
DiaAndThickness = x.Specification
|
||||||
|
};
|
||||||
|
}).ToList();
|
||||||
|
|
||||||
|
var tb = LINQToDataTable(result);
|
||||||
|
if (tb == null || tb.Rows.Count == 0)
|
||||||
|
{
|
||||||
|
ShowNotify("当前任务单无焊口数据", MessageBoxIcon.Question);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
tb.TableName = "Table1";
|
||||||
|
BLL.FastReportService.AddFastreportTable(tb);
|
||||||
|
var firstTask = Funs.DB.HJGL_WeldTask.FirstOrDefault(x => x.WeldTaskId == taskList[0].WeldTaskId);
|
||||||
|
BLL.FastReportService.AddFastreportParameter(new Dictionary<string, string>
|
||||||
|
{
|
||||||
|
{ "Code", firstTask?.TaskCode ?? string.Empty },
|
||||||
|
{ "UnitWorkName", UnitWorkService.getUnitWorkByUnitWorkId(taskList[0].UnitWorkId)?.UnitWorkName ?? string.Empty }
|
||||||
|
});
|
||||||
|
string rootPath = Server.MapPath("~/");
|
||||||
|
string initTemplatePath = isInstall ? "File\\Fastreport\\任务单焊口号_安装.frx" : "File\\Fastreport\\任务单焊口号_预制.frx";
|
||||||
|
|
||||||
|
if (File.Exists(rootPath + initTemplatePath))
|
||||||
|
{
|
||||||
|
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("~/Controls/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private string GetJointSpecText(decimal? dia, decimal? thickness)
|
||||||
|
{
|
||||||
|
string diaText = dia.HasValue ? dia.Value.ToString("0.##") : string.Empty;
|
||||||
|
string thicknessText = thickness.HasValue ? thickness.Value.ToString("0.##") : string.Empty;
|
||||||
|
if (string.IsNullOrEmpty(diaText) && string.IsNullOrEmpty(thicknessText))
|
||||||
|
{
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
return diaText + "*" + thicknessText;
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 分页排序
|
#region 分页排序
|
||||||
|
|
@ -1375,6 +1467,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void btnPrintTaskJointPrefab_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
PrintTaskJoint(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void btnPrintTaskJointInstall_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
PrintTaskJoint(true);
|
||||||
|
}
|
||||||
|
|
||||||
protected void btnPrintTask_Click(object sender, EventArgs e)
|
protected void btnPrintTask_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
|
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
|
||||||
|
|
@ -1397,13 +1499,13 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||||
where x.ProjectId == this.CurrUser.LoginProjectId &&
|
where x.ProjectId == this.CurrUser.LoginProjectId &&
|
||||||
x.UnitWorkId == tvControlItem.SelectedNodeID.Split('|')[0] &&
|
x.UnitWorkId == tvControlItem.SelectedNodeID.Split('|')[0] &&
|
||||||
x.UnitId == tvControlItem.SelectedNodeID.Split('|')[1]
|
x.UnitId == tvControlItem.SelectedNodeID.Split('|')[1]
|
||||||
&& x.TaskDate.Value.Date == time.Date && x.Tabler != null
|
&& x.TaskDate.Value.Date == time.Date && x.SerialNumber == tvControlItem.SelectedNodeID.Split('|')[3] && x.Tabler != null
|
||||||
select x).FirstOrDefault();
|
select x).FirstOrDefault();
|
||||||
var weldTask = (from x in Funs.DB.HJGL_WeldTask
|
var weldTask = (from x in Funs.DB.HJGL_WeldTask
|
||||||
where x.ProjectId == this.CurrUser.LoginProjectId &&
|
where x.ProjectId == this.CurrUser.LoginProjectId &&
|
||||||
x.UnitWorkId == tvControlItem.SelectedNodeID.Split('|')[0] &&
|
x.UnitWorkId == tvControlItem.SelectedNodeID.Split('|')[0] &&
|
||||||
x.UnitId == tvControlItem.SelectedNodeID.Split('|')[1]
|
x.UnitId == tvControlItem.SelectedNodeID.Split('|')[1]
|
||||||
&& x.TaskDate.Value.Date == time.Date && x.AuditMan != null &&
|
&& x.TaskDate.Value.Date == time.Date && x.SerialNumber == tvControlItem.SelectedNodeID.Split('|')[3] && x.AuditMan != null &&
|
||||||
x.Tabler != null
|
x.Tabler != null
|
||||||
select x).FirstOrDefault();
|
select x).FirstOrDefault();
|
||||||
Model.Tw_PrintMaster printMaster = new Model.Tw_PrintMaster
|
Model.Tw_PrintMaster printMaster = new Model.Tw_PrintMaster
|
||||||
|
|
@ -1420,10 +1522,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||||
}
|
}
|
||||||
|
|
||||||
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
|
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
|
||||||
keyValuePairs.Add("Code", UnitWorkService.getUnitWorkByUnitWorkId(tvControlItem.SelectedNodeID.Split('|')[0]).UnitWorkCode + string.Format("{0:yyyyMMdd}", taskTime.Value));
|
keyValuePairs.Add("Code", weldTask?.TaskCode ?? weldTask_CreateName?.TaskCode ?? string.Empty);
|
||||||
keyValuePairs.Add("TaskDate", string.Format("{0:yyyy-MM-dd}", taskTime.Value));
|
keyValuePairs.Add("TaskDate", string.Format("{0:yyyy-MM-dd}", taskTime.Value));
|
||||||
keyValuePairs.Add("UnitName", UnitService.GetUnitNameByUnitId(tvControlItem.SelectedNodeID.Split('|')[1]));
|
keyValuePairs.Add("UnitName", UnitService.GetUnitNameByUnitId(tvControlItem.SelectedNodeID.Split('|')[1]));
|
||||||
keyValuePairs.Add("UnitWorkName]", UnitWorkService.getUnitWorkByUnitWorkId(tvControlItem.SelectedNodeID.Split('|')[0]).UnitWorkName);
|
keyValuePairs.Add("UnitWorkName", UnitWorkService.getUnitWorkByUnitWorkId(tvControlItem.SelectedNodeID.Split('|')[0]).UnitWorkName);
|
||||||
// 创建一个新的DataTable
|
// 创建一个新的DataTable
|
||||||
DataTable dataTable = new DataTable();
|
DataTable dataTable = new DataTable();
|
||||||
dataTable.TableName = "Data";
|
dataTable.TableName = "Data";
|
||||||
|
|
@ -1543,4 +1645,4 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -212,6 +212,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Button btnSearch;
|
protected global::FineUIPro.Button btnSearch;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// lblTotalSize 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Label lblTotalSize;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// btnPassMaster 控件。
|
/// btnPassMaster 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -302,6 +311,24 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Button btnPrintJoint;
|
protected global::FineUIPro.Button btnPrintJoint;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnPrintTaskJointPrefab 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Button btnPrintTaskJointPrefab;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnPrintTaskJointInstall 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Button btnPrintTaskJointInstall;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// drpJointAttribute 控件。
|
/// drpJointAttribute 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue