diff --git a/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj.user b/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj.user index 80f7761..6e29203 100644 --- a/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj.user +++ b/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj.user @@ -1,8 +1,8 @@ - + true - Release|Any CPU + Debug|Any CPU diff --git a/HJGL_DS/FineUIPro.Web/HJGL/DataIn/DrawingRecognitionContent.aspx b/HJGL_DS/FineUIPro.Web/HJGL/DataIn/DrawingRecognitionContent.aspx index ea3ed4b..6fc7585 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/DataIn/DrawingRecognitionContent.aspx +++ b/HJGL_DS/FineUIPro.Web/HJGL/DataIn/DrawingRecognitionContent.aspx @@ -72,10 +72,17 @@ - - + + + + + - + + + + + @@ -168,9 +180,14 @@ - + + + + + diff --git a/HJGL_DS/FineUIPro.Web/HJGL/DataIn/DrawingRecognitionContent.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/DataIn/DrawingRecognitionContent.aspx.cs index b628a14..38b460e 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/DataIn/DrawingRecognitionContent.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/HJGL/DataIn/DrawingRecognitionContent.aspx.cs @@ -1,10 +1,13 @@ using Aspose.Words.Rendering; using BLL; using BLL.Common; +using FastReport.DevComponents.DotNetBar; using FineUIPro.Web.HJGL.Match; +using Microsoft.JScript; using Model; using Newtonsoft.Json.Linq; using NPOI.SS.Formula.Functions; +using NPOI.XSSF.Streaming.Values; using System; using System.Collections.Generic; using System.Data; @@ -13,6 +16,7 @@ using System.Linq; using System.Net; using System.Text; using System.Text.RegularExpressions; +using System.Web.Security; using UglyToad.PdfPig; using UglyToad.PdfPig.Content; using UglyToad.PdfPig.Writer; @@ -339,6 +343,7 @@ namespace FineUIPro.Web.HJGL.DataIn dt.Columns.Add("pipe_no"); dt.Columns.Add("drawing_number"); dt.Columns.Add("seq_no"); + dt.Columns.Add("code"); dt.Columns.Add("category"); dt.Columns.Add("description"); dt.Columns.Add("spec"); @@ -389,7 +394,7 @@ namespace FineUIPro.Web.HJGL.DataIn row["id"] = item.Value("id"); row["pipe_no"] = item.Value("pipe_no"); row["drawing_number"] = item.Value("drawing_number"); - + row["code"] = item.Value("code"); row["seq_no"] = item.Value("seq_no"); row["category"] = item.Value("category"); row["description"] = item.Value("description"); @@ -450,12 +455,15 @@ namespace FineUIPro.Web.HJGL.DataIn dtGroupByDrawing.Columns.Add("category"); dtGroupByDrawing.Columns.Add("spec"); dtGroupByDrawing.Columns.Add("qty"); - dtGroupByDrawing.Columns.Add("description"); + dtGroupByDrawing.Columns.Add("description"); + dtGroupByDrawing.Columns.Add("code"); + var groups2 = dt.AsEnumerable() .GroupBy(r => new { drawing_number = r.Field("drawing_number") ?? "", category = r.Field("category") ?? "", + code = r.Field("code") ?? "", spec = r.Field("spec") ?? "", description = r.Field("description") ?? "" }) @@ -463,6 +471,7 @@ namespace FineUIPro.Web.HJGL.DataIn { g.Key.drawing_number, g.Key.category, + g.Key.code, g.Key.spec, g.Key.description, qty = g.Sum(r => Funs.GetNewDecimalOrZero(r.Field("qty"))), @@ -474,6 +483,7 @@ namespace FineUIPro.Web.HJGL.DataIn newRow["id"] = Guid.NewGuid().ToString(); newRow["drawing_number"] = g.drawing_number; newRow["category"] = g.category; + newRow["code"] = g.code; newRow["spec"] = g.spec; newRow["qty"] = g.qty.ToString() + g.unit; newRow["description"] = g.description; @@ -494,6 +504,7 @@ namespace FineUIPro.Web.HJGL.DataIn dtGroupByPipe.Columns.Add("id"); dtGroupByPipe.Columns.Add("pipe_no"); dtGroupByPipe.Columns.Add("category"); + dtGroupByPipe.Columns.Add("code"); dtGroupByPipe.Columns.Add("spec"); dtGroupByPipe.Columns.Add("qty"); dtGroupByPipe.Columns.Add("description"); @@ -502,6 +513,7 @@ namespace FineUIPro.Web.HJGL.DataIn { pipe_no = r.Field("pipe_no") ?? "", category = r.Field("category") ?? "", + code = r.Field("code") ?? "", spec = r.Field("spec") ?? "", description = r.Field("description") ?? "" }) @@ -509,6 +521,7 @@ namespace FineUIPro.Web.HJGL.DataIn { g.Key.pipe_no, g.Key.category, + g.Key.code, g.Key.spec, g.Key.description, qty = g.Sum(r => Funs.GetNewDecimalOrZero(r.Field("qty"))), @@ -521,6 +534,7 @@ namespace FineUIPro.Web.HJGL.DataIn newRow["pipe_no"] = g.pipe_no; newRow["category"] = g.category; newRow["spec"] = g.spec; + newRow["code"] = g.code; newRow["qty"] = g.qty.ToString() + g.unit; newRow["description"] = g.description; dtGroupByPipe.Rows.Add(newRow); @@ -740,6 +754,34 @@ namespace FineUIPro.Web.HJGL.DataIn sb.Append(""); return sb.ToString(); } + + + protected string ConvertCategory(object Category) + { + Dictionary CategoryDic = new Dictionary(); + + string res = string.Empty; + CategoryDic.Add("BOLTS", "螺栓"); + CategoryDic.Add("FITTINGS", "管件"); + CategoryDic.Add("FLANGES", "法兰"); + CategoryDic.Add("GASKETS", "垫片"); + CategoryDic.Add("INSTRUMENTS", "仪表元件"); + CategoryDic.Add("PIPE", "无缝钢管"); + CategoryDic.Add("SUPPORTS", "支吊架"); + CategoryDic.Add(" VALVES/IN-LINEITEMS ", "阀门"); + if (CategoryDic.ContainsKey(Category.ToString())) + { + res = CategoryDic[Category.ToString()]; + } + else + { + res = Category.ToString(); + } + + return res; + } + + #endregion } } \ No newline at end of file diff --git a/HJGL_DS/FineUIPro.Web/HJGL/DataIn/DrawingRecognitionContent.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/HJGL/DataIn/DrawingRecognitionContent.aspx.designer.cs index 1d92a2a..0346001 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/DataIn/DrawingRecognitionContent.aspx.designer.cs +++ b/HJGL_DS/FineUIPro.Web/HJGL/DataIn/DrawingRecognitionContent.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.HJGL.DataIn { - - - public partial class DrawingRecognitionContent { - +namespace FineUIPro.Web.HJGL.DataIn +{ + + + public partial class DrawingRecognitionContent + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// resultdata 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlInputHidden resultdata; - + /// /// PageManager1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// Toolbar1 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// ToolbarFill1 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + /// /// btnAudit 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnAudit; - + /// /// btnSave 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSave; - + /// /// contentPanel1 控件。 /// @@ -92,7 +94,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ContentPanel contentPanel1; - + /// /// TabStrip1 控件。 /// @@ -101,7 +103,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TabStrip TabStrip1; - + /// /// RegionPanel1 控件。 /// @@ -110,7 +112,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.RegionPanel RegionPanel1; - + /// /// Toolbar2 控件。 /// @@ -119,7 +121,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar2; - + /// /// btnOut1 控件。 /// @@ -128,7 +130,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnOut1; - + /// /// Region2 控件。 /// @@ -137,7 +139,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Region Region2; - + /// /// Grid1 控件。 /// @@ -146,7 +148,16 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + + /// + /// Label8 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label8; + /// /// RegionPanel2 控件。 /// @@ -155,7 +166,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.RegionPanel RegionPanel2; - + /// /// Toolbar3 控件。 /// @@ -164,7 +175,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar3; - + /// /// btnOut2 控件。 /// @@ -173,7 +184,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnOut2; - + /// /// Region3 控件。 /// @@ -182,7 +193,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Region Region3; - + /// /// Grid2 控件。 /// @@ -191,7 +202,16 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid2; - + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + /// /// RegionPanel3 控件。 /// @@ -200,7 +220,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.RegionPanel RegionPanel3; - + /// /// Toolbar4 控件。 /// @@ -209,7 +229,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar4; - + /// /// btnOut3 控件。 /// @@ -218,7 +238,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnOut3; - + /// /// Region4 控件。 /// @@ -227,7 +247,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Region Region4; - + /// /// Grid3 控件。 /// @@ -236,7 +256,16 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid3; - + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + /// /// RegionPanel4 控件。 /// @@ -245,7 +274,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.RegionPanel RegionPanel4; - + /// /// Toolbar5 控件。 /// @@ -254,7 +283,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar5; - + /// /// btnOut4 控件。 /// @@ -263,7 +292,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnOut4; - + /// /// Region5 控件。 /// @@ -272,7 +301,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Region Region5; - + /// /// Grid4 控件。 /// @@ -281,7 +310,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid4; - + /// /// Window1 控件。 /// diff --git a/HJGL_DS/FineUIPro.Web/Web.config b/HJGL_DS/FineUIPro.Web/Web.config index 070a5f8..f469b13 100644 --- a/HJGL_DS/FineUIPro.Web/Web.config +++ b/HJGL_DS/FineUIPro.Web/Web.config @@ -11,7 +11,7 @@ - + @@ -67,7 +67,7 @@ - +