diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/射线检测结果确认表.frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/射线检测结果确认表.frx index b5b26a5..4eb301d 100644 --- a/HJGL_DS/FineUIPro.Web/File/Fastreport/射线检测结果确认表.frx +++ b/HJGL_DS/FineUIPro.Web/File/Fastreport/射线检测结果确认表.frx @@ -1,5 +1,5 @@  - + using System; using System.Collections; using System.Collections.Generic; @@ -42,7 +42,7 @@ namespace FastReport } - + diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/射线检测综合报告(二).frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/射线检测综合报告(二).frx new file mode 100644 index 0000000..288badc --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/File/Fastreport/射线检测综合报告(二).frx @@ -0,0 +1,357 @@ + + + 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.Barcode; +using FastReport.Table; +using FastReport.Utils; + +namespace FastReport +{ + public class ReportScript + { + + private void Table2_ManualBuild(object sender, EventArgs e) + { + DataSourceBase rowData = Report.GetDataSource("Data"); + // init the data source + rowData.Init(); + + // print the first table row - it is a header + + // now enumerate the data source and print the table body + while (rowData.HasMoreRows) + { + // print the table body + Table2.PrintRow(0); + Table2.PrintColumns(); + + // go next data source row + rowData.Next(); + } + } + } +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/工程无损检测管理清单.frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/工程无损检测管理清单.frx new file mode 100644 index 0000000..d30c58c --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/File/Fastreport/工程无损检测管理清单.frx @@ -0,0 +1,168 @@ + + + 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.Barcode; +using FastReport.Table; +using FastReport.Utils; + +namespace FastReport +{ + public class ReportScript + { + + private void Table2_ManualBuild(object sender, EventArgs e) + { + DataSourceBase rowData = Report.GetDataSource("Data"); + // init the data source + rowData.Init(); + + // print the first table row - it is a header + + // now enumerate the data source and print the table body + while (rowData.HasMoreRows) + { + // print the table body + Table2.PrintRow(0); + Table2.PrintColumns(); + + // go next data source row + rowData.Next(); + } + } + } +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/检测综合报告(除射线检测外).frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/检测综合报告(除射线检测外).frx new file mode 100644 index 0000000..7ae5649 --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/File/Fastreport/检测综合报告(除射线检测外).frx @@ -0,0 +1,322 @@ + + + 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.Barcode; +using FastReport.Table; +using FastReport.Utils; + +namespace FastReport +{ + public class ReportScript + { + + private void Table5_ManualBuild(object sender, EventArgs e) + { + DataSourceBase rowData = Report.GetDataSource("Data"); + // init the data source + rowData.Init(); + + // print the first table row - it is a header + + // now enumerate the data source and print the table body + while (rowData.HasMoreRows) + { + // print the table body + Table5.PrintRow(0); + Table5.PrintColumns(); + + // go next data source row + rowData.Next(); + } + } + } +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/管道焊接接头报检检查记录.frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/管道焊接接头报检检查记录.frx index a83b0fe..e1dd3f5 100644 --- a/HJGL_DS/FineUIPro.Web/File/Fastreport/管道焊接接头报检检查记录.frx +++ b/HJGL_DS/FineUIPro.Web/File/Fastreport/管道焊接接头报检检查记录.frx @@ -1,5 +1,5 @@  - + using System; using System.Collections; using System.Collections.Generic; @@ -42,7 +42,7 @@ namespace FastReport } - + @@ -64,12 +64,12 @@ namespace FastReport - + - + @@ -81,7 +81,7 @@ namespace FastReport - + @@ -190,7 +190,7 @@ namespace FastReport - + @@ -202,7 +202,7 @@ namespace FastReport - + @@ -227,7 +227,7 @@ namespace FastReport - + @@ -239,7 +239,7 @@ namespace FastReport - + @@ -261,9 +261,9 @@ namespace FastReport - - - + + + diff --git a/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj.user b/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj.user index bf54086..8aa7c11 100644 --- a/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj.user +++ b/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj.user @@ -2,7 +2,7 @@ true - Debug|Any CPU + Release|Any CPU diff --git a/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/NDTManageList.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/NDTManageList.aspx.cs index 70c92b5..284a912 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/NDTManageList.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/NDTManageList.aspx.cs @@ -9,6 +9,7 @@ using BLL; using System.Data.SqlClient; using System.Data; using AspNet = System.Web.UI.WebControls; +using System.IO; namespace FineUIPro.Web.HJGL.CheckManage { @@ -158,9 +159,73 @@ namespace FineUIPro.Web.HJGL.CheckManage /// protected void btnPrint_Click(object sender, EventArgs e) { - string projects = this.lblProjectCode.Text.Trim() + "|" + this.lblProjectName.Text.Trim(); - projects = Microsoft.JScript.GlobalObject.escape(projects.Replace("/", ",")); - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../../Common/ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId=0", Const.HJGL_NDTManageListReportId, this.tvControlItem.SelectedNodeID, projects))); + if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) + { + string initTemplatePath = ""; + string rootPath = Server.MapPath("~/"); + BLL.Common.FastReportService.ResetData(); + + var listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNodeID)); + SqlParameter[] parameter = listStr.ToArray(); + var tb = SQLHelper.GetDataTableRunProc("HJGL_sp_NDTManageList", parameter); + + DataTable dt = new DataTable(); + dt.TableName = "Data"; + dt.Columns.Add("CH_TrustCode"); + dt.Columns.Add("BatchCode"); + dt.Columns.Add("ISO_IsoNo"); + dt.Columns.Add("JOT_JointNo"); + dt.Columns.Add("CH_TrustDate"); + dt.Columns.Add("ShootMan"); + dt.Columns.Add("shootDate"); + dt.Columns.Add("States"); + dt.Columns.Add("FilmAmount"); + dt.Columns.Add("ReportCode"); + + DataView dv = tb.DefaultView;//获取表视图 + dv.Sort = "CH_TrustCode,BatchCode,ISO_IsoNo,JOT_JointNo ASC";//按照ID倒序排序 + tb = dv.ToTable();//转为表 + DataRow[] rows = tb.DefaultView.ToTable().Select(); + foreach (var row in rows) + { + var newRows = dt.NewRow(); + newRows["CH_TrustCode"] = row["CH_TrustCode"].ToString(); + newRows["BatchCode"] = row["BatchCode"].ToString(); + newRows["ISO_IsoNo"] = row["ISO_IsoNo"].ToString(); + newRows["JOT_JointNo"] = row["JOT_JointNo"].ToString(); + newRows["CH_TrustDate"] = row["CH_TrustDate"].ToString(); + newRows["ShootMan"] = row["ShootMan"].ToString(); + newRows["shootDate"] = string.Format("{0:yyyy-MM-dd}", row["shootDate"].ToString()); + newRows["States"] = row["States"].ToString(); + newRows["FilmAmount"] = row["FilmAmount"].ToString(); + newRows["ReportCode"] = row["ReportCode"].ToString(); + + dt.Rows.Add(newRows); + } + BLL.Common.FastReportService.AddFastreportTable(dt); + + //传参 + Dictionary keyValuePairs = new Dictionary(); + keyValuePairs.Add("ProjectCode", this.lblProjectCode.Text.Trim()); + keyValuePairs.Add("ProjectName", this.lblProjectName.Text.Trim()); + BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs); + + initTemplatePath = "File\\Fastreport\\工程无损检测管理清单.frx"; + + if (File.Exists(rootPath + initTemplatePath)) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../../common/ReportPrint/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath))); + } + } + else + { + Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning); + return; + } + //string projects = this.lblProjectCode.Text.Trim() + "|" + this.lblProjectName.Text.Trim(); + //projects = Microsoft.JScript.GlobalObject.escape(projects.Replace("/", ",")); + //PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../../Common/ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId=0", Const.HJGL_NDTManageListReportId, this.tvControlItem.SelectedNodeID, projects))); } #region 导出按钮 diff --git a/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/RTReport.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/RTReport.aspx.cs index ae43a74..d172097 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/RTReport.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/RTReport.aspx.cs @@ -7,6 +7,7 @@ using System.Web.UI.WebControls; using System.Data.SqlClient; using System.Data; using BLL; +using System.IO; namespace FineUIPro.Web.HJGL.CheckManage { @@ -153,8 +154,90 @@ namespace FineUIPro.Web.HJGL.CheckManage /// protected void btnPrint_Click(object sender, EventArgs e) { - string projects = this.lblProjectCode.Text.Trim() + "|" + this.lblProjectName.Text.Trim() + "|" + this.lblProjectCodes.Text.Trim(); - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../../Common/ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId=0", Const.HJGL_RTReportTwoId, this.tvControlItem.SelectedNodeID, projects, "打印 - "))); + if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) + { + string initTemplatePath = ""; + string rootPath = Server.MapPath("~/"); + BLL.Common.FastReportService.ResetData(); + + var listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNodeID)); + SqlParameter[] parameter = listStr.ToArray(); + var tb = SQLHelper.GetDataTableRunProc("HJGL_sp_RTColligateReport", parameter); + + DataTable dt = new DataTable(); + dt.TableName = "Data"; + dt.Columns.Add("Num"); + dt.Columns.Add("ISO_IsoNo"); + dt.Columns.Add("STE_Code"); + dt.Columns.Add("JOT_JointDesc"); + dt.Columns.Add("CheckRate"); + dt.Columns.Add("QuaLevel"); + dt.Columns.Add("CheckJointNum1"); + dt.Columns.Add("CheckFilmNum1"); + dt.Columns.Add("NoPassJointNum1"); + dt.Columns.Add("NoPassFilmNum1"); + dt.Columns.Add("CheckJointNumK"); + dt.Columns.Add("CheckFilmNumK"); + dt.Columns.Add("NoPassJointNumK"); + dt.Columns.Add("NoPassFilmNumK"); + dt.Columns.Add("TopRepairNum"); + dt.Columns.Add("TotalJointNum"); + dt.Columns.Add("TotalFilmNum"); + dt.Columns.Add("PassRate"); + + DataView dv = tb.DefaultView;//获取表视图 + dv.Sort = "ISO_IsoNo ASC";//按照ID倒序排序 + tb = dv.ToTable();//转为表 + DataRow[] rows = tb.DefaultView.ToTable().Select(); + int i = 0; + foreach (var row in rows) + { + var newRows = dt.NewRow(); + newRows["Num"] = i + 1; + newRows["ISO_IsoNo"] = row["ISO_IsoNo"].ToString(); + newRows["STE_Code"] = row["STE_Code"].ToString(); + newRows["JOT_JointDesc"] = row["JOT_JointDesc"].ToString(); + newRows["CheckRate"] = row["CheckRate"].ToString(); + newRows["QuaLevel"] = row["QuaLevel"].ToString(); + newRows["CheckJointNum1"] = row["CheckJointNum1"].ToString(); + newRows["CheckFilmNum1"] = row["CheckFilmNum1"].ToString(); + newRows["NoPassJointNum1"] = row["NoPassJointNum1"].ToString(); + newRows["NoPassFilmNum1"] = row["NoPassFilmNum1"].ToString(); + newRows["CheckJointNumK"] = row["CheckJointNumK"].ToString(); + newRows["CheckFilmNumK"] = row["CheckFilmNumK"].ToString(); + newRows["NoPassJointNumK"] = row["NoPassJointNumK"].ToString(); + newRows["NoPassFilmNumK"] = row["NoPassFilmNumK"].ToString(); + newRows["TopRepairNum"] = row["TopRepairNum"].ToString(); + newRows["TotalJointNum"] = row["TotalJointNum"].ToString(); + newRows["TotalFilmNum"] = row["TotalFilmNum"].ToString(); + newRows["PassRate"] = row["PassRate"].ToString(); + + dt.Rows.Add(newRows); + i++; + } + BLL.Common.FastReportService.AddFastreportTable(dt); + + //传参 + Dictionary keyValuePairs = new Dictionary(); + keyValuePairs.Add("ProjectCode", this.lblProjectCode.Text.Trim()); + keyValuePairs.Add("ProjectName", this.lblProjectName.Text.Trim()); + BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs); + + initTemplatePath = "File\\Fastreport\\射线检测综合报告(二).frx"; + + if (File.Exists(rootPath + initTemplatePath)) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../../common/ReportPrint/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath))); + } + } + else + { + Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning); + return; + } + //string projects = this.lblProjectCode.Text.Trim() + "|" + this.lblProjectName.Text.Trim() + "|" + this.lblProjectCodes.Text.Trim(); + //PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../../Common/ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId=0", Const.HJGL_RTReportTwoId, this.tvControlItem.SelectedNodeID, projects, "打印 - "))); } } } \ No newline at end of file diff --git a/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/TestingReportNotRT.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/TestingReportNotRT.aspx.cs index 96a0c63..feec7ff 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/TestingReportNotRT.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/TestingReportNotRT.aspx.cs @@ -7,6 +7,7 @@ using System.Web.UI.WebControls; using BLL; using System.Data.SqlClient; using System.Data; +using System.IO; namespace FineUIPro.Web.HJGL.CheckManage { @@ -157,9 +158,83 @@ namespace FineUIPro.Web.HJGL.CheckManage /// protected void btnPrint_Click(object sender, EventArgs e) { - string projects = this.lblProjectCode.Text.Trim() + "|" + this.lblProjectName.Text.Trim() + "|" + this.lblProjectCodes.Text.Trim(); - string varValue = System.Web.HttpUtility.UrlEncode(projects); - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../../Common/ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId=0", Const.HJGL_TestingReportNotRT, this.tvControlItem.SelectedNodeID, varValue))); + if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) + { + string initTemplatePath = ""; + string rootPath = Server.MapPath("~/"); + BLL.Common.FastReportService.ResetData(); + + var listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNodeID)); + SqlParameter[] parameter = listStr.ToArray(); + var tb = SQLHelper.GetDataTableRunProc("HJGL_sp_UnRTColligateReport", parameter); + + DataTable dt = new DataTable(); + dt.TableName = "Data"; + dt.Columns.Add("Num"); + dt.Columns.Add("ISO_IsoNo"); + dt.Columns.Add("STE_Code"); + dt.Columns.Add("JOT_JointDesc"); + dt.Columns.Add("CheckRate"); + dt.Columns.Add("QuaLevel"); + dt.Columns.Add("CheckJointNum1"); + dt.Columns.Add("NoPassJointNum1"); + dt.Columns.Add("CheckJointNumK"); + dt.Columns.Add("NoPassJointNumK"); + dt.Columns.Add("TopRepairNum"); + dt.Columns.Add("TotalJointNum"); + dt.Columns.Add("TotalFilmNum"); + dt.Columns.Add("PassRate"); + + DataView dv = tb.DefaultView;//获取表视图 + dv.Sort = "ISO_IsoNo ASC";//按照ID倒序排序 + tb = dv.ToTable();//转为表 + DataRow[] rows = tb.DefaultView.ToTable().Select(); + int i = 0; + foreach (var row in rows) + { + var newRows = dt.NewRow(); + newRows["Num"] = i + 1; + newRows["ISO_IsoNo"] = row["ISO_IsoNo"].ToString(); + newRows["STE_Code"] = row["STE_Code"].ToString(); + newRows["JOT_JointDesc"] = row["JOT_JointDesc"].ToString(); + newRows["CheckRate"] = row["CheckRate"].ToString(); + newRows["QuaLevel"] = row["QuaLevel"].ToString(); + newRows["CheckJointNum1"] = row["CheckJointNum1"].ToString(); + newRows["NoPassJointNum1"] = row["NoPassJointNum1"].ToString(); + newRows["CheckJointNumK"] = row["CheckJointNumK"].ToString(); + newRows["NoPassJointNumK"] = row["NoPassJointNumK"].ToString(); + newRows["TopRepairNum"] = row["TopRepairNum"].ToString(); + newRows["TotalJointNum"] = row["TotalJointNum"].ToString(); + newRows["TotalFilmNum"] = row["TotalFilmNum"].ToString(); + newRows["PassRate"] = row["PassRate"].ToString(); + + dt.Rows.Add(newRows); + i++; + } + BLL.Common.FastReportService.AddFastreportTable(dt); + + //传参 + Dictionary keyValuePairs = new Dictionary(); + keyValuePairs.Add("ProjectCode", this.lblProjectCode.Text.Trim()); + keyValuePairs.Add("ProjectName", this.lblProjectName.Text.Trim()); + BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs); + + initTemplatePath = "File\\Fastreport\\检测综合报告(除射线检测外).frx"; + + if (File.Exists(rootPath + initTemplatePath)) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../../common/ReportPrint/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath))); + } + } + else + { + Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning); + return; + } + //string projects = this.lblProjectCode.Text.Trim() + "|" + this.lblProjectName.Text.Trim() + "|" + this.lblProjectCodes.Text.Trim(); + //string varValue = System.Web.HttpUtility.UrlEncode(projects); + //PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../../Common/ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId=0", Const.HJGL_TestingReportNotRT, this.tvControlItem.SelectedNodeID, varValue))); } #endregion } diff --git a/HJGL_DS/FineUIPro.Web/Web.config b/HJGL_DS/FineUIPro.Web/Web.config index 9a5da32..aa58035 100644 --- a/HJGL_DS/FineUIPro.Web/Web.config +++ b/HJGL_DS/FineUIPro.Web/Web.config @@ -50,7 +50,7 @@ - + diff --git a/HJGL_DS/WebAPI/WebAPI.csproj.user b/HJGL_DS/WebAPI/WebAPI.csproj.user index a48b337..28be9c4 100644 --- a/HJGL_DS/WebAPI/WebAPI.csproj.user +++ b/HJGL_DS/WebAPI/WebAPI.csproj.user @@ -1,7 +1,7 @@  - Debug|Any CPU + Release|Any CPU FolderProfile true