This commit is contained in:
李鹏飞 2026-05-29 14:37:37 +08:00
commit f7ee79c8f2
233 changed files with 6845 additions and 5 deletions

View File

@ -0,0 +1,2 @@
INSERT INTO [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed]) VALUES (N'34BAD63E-EF7C-4D7E-8641-C706BBFCD85F', N'Öá²âͼʶ±ð', NULL, N'HJGL/DataImport/DrawingRecognition.aspx', '40', N'8IDKGJE2-09B1-4607-DCS2-DCC3O48F080F', N'Menu_HJGL', '0', '1', '1');
INSERT INTO [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed]) VALUES (N'EFD1E914-E79C-4F5E-A2F7-CFF4F7821284', N'¹ÜÏßµ¼Èë', NULL, N'HJGL/DataImport/PipeLineInAuto.aspx', '30', N'8IDKGJE2-09B1-4607-DCS2-DCC3O48F080F', N'Menu_HJGL', '0', '1', '1');

View File

@ -0,0 +1,6 @@
Alter TABLE [dbo].HJGL_WeldJoint add
[AttachSourceId] [nvarchar](50) NULL,
[x] [nvarchar](50) NULL,
[y] [nvarchar](50) NULL,
[x2] [nvarchar](50) NULL,
[y2] [nvarchar] (50) NULL

View File

@ -277,6 +277,7 @@
<Compile Include="BaseInfo\WorkPostService.cs" />
<Compile Include="BaseInfo\WorkStageService.cs" />
<Compile Include="Common\DataCleanupMergeHelper.cs" />
<Compile Include="Common\OpenAIhelper.cs" />
<Compile Include="CQMS\ProjectHighlightsSite\ProjectHighlightsSiteService.cs" />
<Compile Include="DataShare\APIDataShareSyncService.cs" />
<Compile Include="DataShare\CQMS\APICheckControlSyncService.cs" />
@ -937,4 +938,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>

View File

@ -2974,7 +2974,13 @@ namespace BLL
/// </summary>
public const string HJGL_TDMImportMenuId = "B13BFFA5-3112-4209-8562-5329B78B405C";
/// <summary>
/// 数据导入
/// </summary>
public const string HJGL_DataInMenuId = "ERDXV53M-09B1-6UIO-6666-5DVZDF329001";
#endregion
#region
/// <summary>
/// 焊口二次设计

View File

@ -0,0 +1,56 @@

using FastReport.Utils;
using Newtonsoft.Json;
using NPOI.POIFS.Crypt;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Net.Http;
namespace BLL.Common
{
public class OpenAIhelper
{
private const string ApiKey = "sk-a5014a22a49049d1b2179a6c0d8eec1c";
private const string AIURL = "https://api.deepseek.com/chat/completions";
public static string ChatCompletion(string content)
{
try
{
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", "Bearer " + ApiKey);
var requestData = new
{
model = "deepseek-v4-flash",
messages = new[] {
new { role = "user", content = content }
},
temperature = 0.3
};
string json = JsonConvert.SerializeObject(requestData);
var chatContent = new StringContent(json, Encoding.UTF8, "application/json");
// 同步请求
var response = client.PostAsync(AIURL, chatContent).Result;
string resultJson = response.Content.ReadAsStringAsync().Result;
// 解析返回
dynamic result = JsonConvert.DeserializeObject(resultJson);
return result.choices[0].message.content.ToString();
}
}
catch (Exception ex)
{
return ex.ToString();
}
}
}
}

View File

@ -106,6 +106,9 @@
<EmbedInteropTypes>False</EmbedInteropTypes>
<HintPath>..\FineUIPro\Reference BLL\Interop.WIA.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Bcl.HashCode, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.HashCode.6.0.0\lib\netstandard2.0\Microsoft.Bcl.HashCode.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.QualityTools.Testing.Fakes, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
@ -135,6 +138,12 @@
<Reference Include="RestSharp, Version=106.15.0.0, Culture=neutral, PublicKeyToken=598062e77f915f75, processorArchitecture=MSIL">
<HintPath>..\packages\RestSharp.106.15.0\lib\net452\RestSharp.dll</HintPath>
</Reference>
<Reference Include="Spire.Pdf, Version=12.2.6.0, Culture=neutral, PublicKeyToken=663f351905198cb3, processorArchitecture=MSIL">
<HintPath>..\packages\Spire.PDF.12.2.6\lib\net40\Spire.Pdf.dll</HintPath>
</Reference>
<Reference Include="System.Buffers, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.6.0\lib\netstandard2.0\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data.Linq" />
<Reference Include="System.DirectoryServices" />
@ -144,8 +153,14 @@
<Reference Include="System.IO.Compression" />
<Reference Include="System.IO.Compression.FileSystem" />
<Reference Include="System.Management" />
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.0\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
<Reference Include="System.Memory, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Memory.4.6.0\lib\netstandard2.0\System.Memory.dll</HintPath>
</Reference>
<Reference Include="System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Numerics.Vectors.4.6.0\lib\netstandard2.0\System.Numerics.Vectors.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.1.0\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
@ -177,6 +192,27 @@
<Reference Include="ThoughtWorks.QRCode.Fakes">
<HintPath>..\FineUIPro\Reference BLL\ThoughtWorks.QRCode.Fakes.dll</HintPath>
</Reference>
<Reference Include="UglyToad.PdfPig, Version=0.1.14.0, Culture=neutral, PublicKeyToken=605d367334e74123, processorArchitecture=MSIL">
<HintPath>..\packages\PdfPig.0.1.14\lib\netstandard2.0\UglyToad.PdfPig.dll</HintPath>
</Reference>
<Reference Include="UglyToad.PdfPig.Core, Version=0.1.14.0, Culture=neutral, PublicKeyToken=605d367334e74123, processorArchitecture=MSIL">
<HintPath>..\packages\PdfPig.0.1.14\lib\netstandard2.0\UglyToad.PdfPig.Core.dll</HintPath>
</Reference>
<Reference Include="UglyToad.PdfPig.DocumentLayoutAnalysis, Version=0.1.14.0, Culture=neutral, PublicKeyToken=605d367334e74123, processorArchitecture=MSIL">
<HintPath>..\packages\PdfPig.0.1.14\lib\netstandard2.0\UglyToad.PdfPig.DocumentLayoutAnalysis.dll</HintPath>
</Reference>
<Reference Include="UglyToad.PdfPig.Fonts, Version=0.1.14.0, Culture=neutral, PublicKeyToken=605d367334e74123, processorArchitecture=MSIL">
<HintPath>..\packages\PdfPig.0.1.14\lib\netstandard2.0\UglyToad.PdfPig.Fonts.dll</HintPath>
</Reference>
<Reference Include="UglyToad.PdfPig.Package, Version=0.1.14.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\PdfPig.0.1.14\lib\netstandard2.0\UglyToad.PdfPig.Package.dll</HintPath>
</Reference>
<Reference Include="UglyToad.PdfPig.Tokenization, Version=0.1.14.0, Culture=neutral, PublicKeyToken=605d367334e74123, processorArchitecture=MSIL">
<HintPath>..\packages\PdfPig.0.1.14\lib\netstandard2.0\UglyToad.PdfPig.Tokenization.dll</HintPath>
</Reference>
<Reference Include="UglyToad.PdfPig.Tokens, Version=0.1.14.0, Culture=neutral, PublicKeyToken=605d367334e74123, processorArchitecture=MSIL">
<HintPath>..\packages\PdfPig.0.1.14\lib\netstandard2.0\UglyToad.PdfPig.Tokens.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Content Include="AttachFile\dist\add-on\jplayer.playlist.js" />
@ -1534,8 +1570,14 @@
<Content Include="HJGL\BaseInfo\WeldingMethodEdit.aspx" />
<Content Include="HJGL\BaseInfo\WeldingMethodView.aspx" />
<Content Include="HJGL\BaseInfo\WeldView.aspx" />
<Content Include="HJGL\DataImport\DrawingRecognition.aspx" />
<Content Include="HJGL\DataImport\DrawingRecognitionContent.aspx" />
<Content Include="HJGL\DataImport\DrawingRecognitionContentEdit.aspx" />
<Content Include="HJGL\DataImport\MaterialInformation.aspx" />
<Content Include="HJGL\DataImport\MaterialStock.aspx" />
<Content Include="HJGL\DataImport\PipelineGrid.aspx" />
<Content Include="HJGL\DataImport\PipeLineInAuto.aspx" />
<Content Include="HJGL\DataImport\PipelineInEdit.aspx" />
<Content Include="HJGL\DataImport\TDMImport.aspx" />
<Content Include="HJGL\DataImport\DrawingImport.aspx" />
<Content Include="HJGL\DataImport\TDMImportEdit.aspx" />
@ -1558,6 +1600,11 @@
<Content Include="HJGL\InfoQuery\JointQueryChart.aspx" />
<Content Include="HJGL\InfoQuery\PipelineQuery.aspx" />
<Content Include="HJGL\InfoQuery\PipelineQueryChart.aspx" />
<Content Include="HJGL\JoinMarking\DataInEdit.aspx" />
<Content Include="HJGL\JoinMarking\JoinMarking.aspx" />
<Content Include="HJGL\JoinMarking\JointShow.aspx" />
<Content Include="HJGL\JoinMarking\PDFMarking.aspx" />
<Content Include="HJGL\JoinMarking\PDFShow.aspx" />
<Content Include="HJGL\LeakVacuum\LeakVacuumAudit.aspx" />
<Content Include="HJGL\LeakVacuum\LeakVacuumComplete.aspx" />
<Content Include="HJGL\LeakVacuum\LeakVacuumEdit.aspx" />
@ -10458,6 +10505,27 @@
<Compile Include="HJGL\BaseInfo\WeldView.aspx.designer.cs">
<DependentUpon>WeldView.aspx</DependentUpon>
</Compile>
<Compile Include="HJGL\DataImport\DrawingRecognition.aspx.cs">
<DependentUpon>DrawingRecognition.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="HJGL\DataImport\DrawingRecognition.aspx.designer.cs">
<DependentUpon>DrawingRecognition.aspx</DependentUpon>
</Compile>
<Compile Include="HJGL\DataImport\DrawingRecognitionContent.aspx.cs">
<DependentUpon>DrawingRecognitionContent.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="HJGL\DataImport\DrawingRecognitionContent.aspx.designer.cs">
<DependentUpon>DrawingRecognitionContent.aspx</DependentUpon>
</Compile>
<Compile Include="HJGL\DataImport\DrawingRecognitionContentEdit.aspx.cs">
<DependentUpon>DrawingRecognitionContentEdit.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="HJGL\DataImport\DrawingRecognitionContentEdit.aspx.designer.cs">
<DependentUpon>DrawingRecognitionContentEdit.aspx</DependentUpon>
</Compile>
<Compile Include="HJGL\DataImport\MaterialInformation.aspx.cs">
<DependentUpon>MaterialInformation.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -10472,6 +10540,27 @@
<Compile Include="HJGL\DataImport\MaterialStock.aspx.designer.cs">
<DependentUpon>MaterialStock.aspx</DependentUpon>
</Compile>
<Compile Include="HJGL\DataImport\PipelineGrid.aspx.cs">
<DependentUpon>PipelineGrid.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="HJGL\DataImport\PipelineGrid.aspx.designer.cs">
<DependentUpon>PipelineGrid.aspx</DependentUpon>
</Compile>
<Compile Include="HJGL\DataImport\PipeLineInAuto.aspx.cs">
<DependentUpon>PipeLineInAuto.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="HJGL\DataImport\PipeLineInAuto.aspx.designer.cs">
<DependentUpon>PipeLineInAuto.aspx</DependentUpon>
</Compile>
<Compile Include="HJGL\DataImport\PipelineInEdit.aspx.cs">
<DependentUpon>PipelineInEdit.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="HJGL\DataImport\PipelineInEdit.aspx.designer.cs">
<DependentUpon>PipelineInEdit.aspx</DependentUpon>
</Compile>
<Compile Include="HJGL\DataImport\TDMImport.aspx.cs">
<DependentUpon>TDMImport.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -10626,6 +10715,41 @@
<Compile Include="HJGL\InfoQuery\PipelineQueryChart.aspx.designer.cs">
<DependentUpon>PipelineQueryChart.aspx</DependentUpon>
</Compile>
<Compile Include="HJGL\JoinMarking\DataInEdit.aspx.cs">
<DependentUpon>DataInEdit.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="HJGL\JoinMarking\DataInEdit.aspx.designer.cs">
<DependentUpon>DataInEdit.aspx</DependentUpon>
</Compile>
<Compile Include="HJGL\JoinMarking\JoinMarking.aspx.cs">
<DependentUpon>JoinMarking.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="HJGL\JoinMarking\JoinMarking.aspx.designer.cs">
<DependentUpon>JoinMarking.aspx</DependentUpon>
</Compile>
<Compile Include="HJGL\JoinMarking\JointShow.aspx.cs">
<DependentUpon>JointShow.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="HJGL\JoinMarking\JointShow.aspx.designer.cs">
<DependentUpon>JointShow.aspx</DependentUpon>
</Compile>
<Compile Include="HJGL\JoinMarking\PDFMarking.aspx.cs">
<DependentUpon>PDFMarking.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="HJGL\JoinMarking\PDFMarking.aspx.designer.cs">
<DependentUpon>PDFMarking.aspx</DependentUpon>
</Compile>
<Compile Include="HJGL\JoinMarking\PDFShow.aspx.cs">
<DependentUpon>PDFShow.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="HJGL\JoinMarking\PDFShow.aspx.designer.cs">
<DependentUpon>PDFShow.aspx</DependentUpon>
</Compile>
<Compile Include="HJGL\LeakVacuum\LeakVacuumAudit.aspx.cs">
<DependentUpon>LeakVacuumAudit.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -17068,4 +17192,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>

View File

@ -0,0 +1,34 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DrawingRecognition.aspx.cs" Inherits="FineUIPro.Web.HJGL.DataIn.DrawingRecognition" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>轴测图识别</title>
<style>
.f-grid-row-summary .f-grid-cell-inner {
font-weight: bold;
color: red;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="RegionPanel1" />
<f:Panel ID="RegionPanel1" ShowBorder="false" runat="server" Margin="5px" EnableIFrame="true" ShowHeader="false" IFrameUrl="DrawingRecognitionContent.aspx">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="TOP" runat="server" ToolbarAlign="Left">
<Items>
<f:HiddenField ID="hdId" runat="server"></f:HiddenField>
<f:FileUpload ID="FileExcel" runat="server" Label="轴测图" EmptyText="请上传pdf格式文件" Width="350px" LabelWidth="90px" LabelAlign="Right"></f:FileUpload>
<f:Button ID="imgbtnImport" runat="server" Text="上传" ToolTip="文件上传" OnClick="imgbtnImport_Click"></f:Button>
</Items>
</f:Toolbar>
</Toolbars>
</f:Panel>
</form>
</body>
</html>

View File

@ -0,0 +1,81 @@
using Aspose.Words;
using BLL;
using BLL.Common;
using NPOI.SS.Formula.Functions;
using Spire.Pdf;
using Spire.Pdf.Utilities;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.OleDb;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading;
using System.Web.UI.DataVisualization.Charting;
namespace FineUIPro.Web.HJGL.DataIn
{
public partial class DrawingRecognition : PageBase
{
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
}
}
#endregion
#region
/// <summary>
/// 文件上传
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void imgbtnImport_Click(object sender, EventArgs e)
{
try
{
if (this.FileExcel.HasFile == false)
{
Response.Write("<script>alert('请您选择pdf文件')</script> ");
return;
}
string IsXls = Path.GetExtension(FileExcel.FileName).ToString().Trim().ToLower();
if (IsXls != ".pdf")
{
Response.Write("\"<script>alert('请您选择pdf文件')</script> ");
return;
}
string rootPath = Server.MapPath("~/");
string initFullPath = rootPath + Const.ExcelUrl;
if (!Directory.Exists(initFullPath))
{
Directory.CreateDirectory(initFullPath);
}
string fileUrl = initFullPath + BLL.Funs.GetNewFileName() + IsXls;
this.FileExcel.PostedFile.SaveAs(fileUrl);
RegionPanel1.IFrameUrl = "./DrawingRecognitionContent.aspx?fileUrl=" + fileUrl.Replace(rootPath,"");
}
catch (Exception ex)
{
ShowNotify(ex.Message, MessageBoxIcon.Warning);
return;
}
}
#endregion
}
}

View File

@ -0,0 +1,80 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HJGL.DataIn
{
public partial class DrawingRecognition
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// RegionPanel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel RegionPanel1;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// hdId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdId;
/// <summary>
/// FileExcel 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FileUpload FileExcel;
/// <summary>
/// imgbtnImport 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button imgbtnImport;
}
}

View File

@ -0,0 +1,80 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DrawingRecognitionContent.aspx.cs" Inherits="FineUIPro.Web.HJGL.DataIn.DrawingRecognitionContent" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>
</title>
<script type="module" src="./ocrz-app.js"></script>
<link rel="stylesheet" href="./ocrz-app.css">
</head>
<body>
<form id="form1" runat="server">
<input id="hdpdfurl2" type="hidden" value="<%=URL %>" />
<input id="resultdata" type="hidden" runat="server" />
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region" >
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" runat="server" ToolbarAlign="Left">
<Items>
<f:ToolbarFill ID="ToolbarFill1" runat="server"> </f:ToolbarFill>
<f:Button ID="btnAudit" runat="server" Text="审核材料表"
OnClick="btnAudit_Click" >
</f:Button>
<f:Button ID="btnSave" runat="server" Text="保存材料表" Hidden="true"
OnClick="btnSave_Click" >
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Items>
<f:ContentPanel ID="contentPanel1" runat="server" ShowHeader="false" >
<div id="app"></div>
</f:ContentPanel>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="" EnableCollapse="true" Hidden="true"
runat="server" BoxFlex="1" DataKeyNames="id" EnableColumnLines="true" DataIDField="id" OnRowDoubleClick="Grid1_RowDoubleClick"
EnableTextSelection="True" EnableRowDoubleClickEvent="true" AllowColumnLocking="true">
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="60px" HeaderTextAlign="Center" TextAlign="Center"/>
<f:RenderField Width="70px" HeaderText="管线号" ColumnID="pipe_no" DataField="pipe_no"
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" >
</f:RenderField>
<f:RenderField Width="70px" HeaderText="图号" ColumnID="drawing_number" DataField="drawing_number"
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" >
</f:RenderField>
<f:RenderField Width="70px" HeaderText="类型" ColumnID="category" DataField="category"
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" >
</f:RenderField>
<f:RenderField Width="70px" HeaderText="规格" ColumnID="spec" DataField="spec"
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" >
</f:RenderField>
<f:RenderField Width="70px" HeaderText="数量" ColumnID="qty" DataField="qty"
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" >
</f:RenderField>
<f:RenderField Width="70px" HeaderText="描述" ColumnID="description" DataField="description" ExpandUnusedSpace="true"
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" >
</f:RenderField>
</Columns>
</f:Grid>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="数据信息" Hidden="true" EnableIFrame="true"
EnableMaximize="true" Target="Top" EnableResize="true" runat="server" OnClose="Window1_Close"
IsModal="true" Width="1200px" Height="500px">
</f:Window>
</form>
</body>
</html>

View File

@ -0,0 +1,471 @@
using Aspose.Words.Rendering;
using BLL;
using BLL.Common;
using Model;
using Newtonsoft.Json.Linq;
using NPOI.SS.Formula.Functions;
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Text.RegularExpressions;
using UglyToad.PdfPig;
using UglyToad.PdfPig.Content;
using UglyToad.PdfPig.Writer;
namespace FineUIPro.Web.HJGL.DataIn
{
public partial class DrawingRecognitionContent : PageBase
{
public string URL
{
get
{
return (string)ViewState["URL"];
}
set
{
ViewState["URL"] = value;
}
}
public string fileUrl
{
get
{
return (string)ViewState["fileUrl"];
}
set
{
ViewState["fileUrl"] = value;
}
}
public DataTable dt
{
get
{
return (DataTable)ViewState["DataTable"];
}
set
{
ViewState["DataTable"] = value;
}
}
public DataTable dtOther
{
get
{
return (DataTable)ViewState["dtOther"];
}
set
{
ViewState["dtOther"] = value;
}
}
public DataTable dtIsoInfo
{
get
{
return (DataTable)ViewState["dtIsoInfo"];
}
set
{
ViewState["dtIsoInfo"] = value;
}
}
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (!string.IsNullOrEmpty(Request.Params["fileUrl"]))
{
URL = Funs.SGGLUrl + Request.Params["fileUrl"].Replace("\\", "/");
string rootPath = Server.MapPath("~/");
fileUrl = rootPath + Request.Params["fileUrl"];
// 加载PDF文档
if (!File.Exists(fileUrl))
{
return;
}
}
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
Grid1.Hidden = true;
contentPanel1.Hidden =false ;
string rootPath = Server.MapPath("~/");
Dictionary<string,List<int>> dic= new Dictionary<string, List<int>>();
foreach (DataRow row in dt.Rows)
{
if (!dic.ContainsKey(row["pipe_no"].ToString()))
{
dic.Add(row["pipe_no"].ToString().Trim(),new List<int>());
}
dic[row["pipe_no"].ToString().Trim()].Add(int.Parse(row["page_no"].ToString()));
}
using (var pdf = PdfDocument.Open(fileUrl))
{
for (int i = 0; i < pdf.NumberOfPages; i++)
{
var page = pdf.GetPage(i + 1);
var rotation = page.Rotation;
string outputPath = "";
string isono = "";
foreach (string key in dic.Keys)
{
if (dic[key].IndexOf(i + 1) >= 0)
{
isono = key;
outputPath = $"{rootPath}/File/PDF/Pipe/" + key;
if (!Directory.Exists(outputPath))
{
Directory.CreateDirectory(outputPath);
}
string fileName = key;
var row = dtOther.Select(" page='" + (i + 1) + "' and region_type='C' ").FirstOrDefault();
if (row != null)
{
if (!string.IsNullOrEmpty(row["text"].ToString()))
{
fileName = row["text"].ToString();
}
}
outputPath = $"{outputPath}/" + fileName + DateTime.Now.ToString("yyyyMMddHHmm") + ".pdf";
}
}
using (var writer = new PdfDocumentBuilder())
{
PdfPageBuilder newPage = null;
if (rotation.Value != 0 && rotation.Value != 180)
{
newPage = writer.AddPage(page.Height, page.Width);
}
else
{
newPage = writer.AddPage(page.Width, page.Height);
}
newPage.CopyFrom(page);
// 3. 关键:清除旋转标记 + 反向旋转内容(修正视觉方向)
// 清除 /Rotate 标记
newPage.SetRotation(new PageRotationDegrees(rotation.Value));
var newPdf = writer.Build();
File.WriteAllBytes(outputPath, newPdf);
var isoInfo = Funs.DB.HJGL_Pipeline.FirstOrDefault(x => x.PipelineCode == isono && x.ProjectId==CurrUser.LoginProjectId);
if (isoInfo != null)
{
Regex NumberRegex = new Regex(@"\d+\.?\d*");
DataRow[] rows = dt.Select(" pipe_no='" + isono + "' and category='PIPE'");
if (rows != null && rows.Length > 0)
{
//string description = rows[0]["description"].ToString();
//if (!isoInfo.ISO_Dia.HasValue || !isoInfo.ISO_Sch.HasValue || string.IsNullOrEmpty(isoInfo.MaterialStandardId))
//{
// string res = OpenAIhelper.ChatCompletion("请根据 " + description + ",识别外径,壁厚,材质标准(请严格按照国家标准返回)结果仅以JSON格式返回不要解释不要多余文字不要markdown例如 {\r\n \"外径\": \"33.4 mm\",\r\n \"壁厚\": \"6.35 mm\",\r\n \"材质标准\": \"GB/T 9948\"\r\n}");
// ErrLogInfo.WriteLog(res);
// JObject jobject = JObject.Parse(res);
// string dia = jobject.Value<string>("外径");
// string sch = jobject.Value<string>("壁厚");
// string materialStandard = jobject.Value<string>("材质标准");
// MatchCollection matchCollection1 = NumberRegex.Matches(dia);
// foreach (var match in matchCollection1)
// {
// // 使用 TryParse 确保转换安全,避免异常
// if (decimal.TryParse(match.ToString(), out decimal number))
// {
// isoInfo.ISO_Dia = number;
// }
// }
// MatchCollection matchCollection2 = NumberRegex.Matches(sch);
// foreach (var match in matchCollection2)
// {
// // 使用 TryParse 确保转换安全,避免异常
// if (decimal.TryParse(match.ToString(), out decimal number))
// {
// isoInfo.ISO_Sch = number;
// }
// }
// isoInfo.MaterialStandardId = Funs.DB.HJGL_BS_MaterialStandard.Where(x => x.MaterialStandardCode == materialStandard).Select(x => x.MaterialStandardId).FirstOrDefault();
//}
//decimal length = 0;
//foreach (DataRow row in rows)
//{
// MatchCollection matches = NumberRegex.Matches(row["qty"].ToString());
// foreach (var match in matches)
// {
// // 使用 TryParse 确保转换安全,避免异常
// if (decimal.TryParse(match.ToString(), out decimal number))
// {
// length += number;
// }
// }
//}
//isoInfo.PipeLineLength = length;
}
//DataRow[] rowsPipe = dtIsoInfo.Select(" pipeline_id='" + isono + "' ");
//if (rowsPipe != null && rowsPipe.Length > 0)
//{
// string isNeedHead = rowsPipe[0]["post_weld_heat_treatment"].ToString();
// if (isNeedHead == "N")
// {
// isoInfo.IsHot = "0";
// isoInfo.IsHotType = null;
// }
// else
// {
// isoInfo.IsHot = "1";
// }
//}
Funs.DB.SubmitChanges();
//保存文件到附件
UploadFileService.SaveAttachUrl(UploadFileService.GetSourceByAttachUrl(outputPath.Replace(rootPath, ""), 10, null), outputPath.Replace(rootPath, ""), Const.HJGL_PipelineMenuId, isoInfo.PipelineId);
}
}
}
}
}
public static string HeaderCorrespondence(string uploadUrl, string data, string method, string contenttype)
{
// 5. 创建HTTP请求
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uploadUrl);
request.Method = string.IsNullOrEmpty(method) ? "GET" : method;
request.ContentType = string.IsNullOrEmpty(contenttype) ? "application/json;charset=utf-8" : contenttype;
if (uploadUrl.IndexOf("https") >= 0)
{
request.ProtocolVersion = HttpVersion.Version10;
}
if (!string.IsNullOrEmpty(data))
{
Stream RequestStream = request.GetRequestStream();
byte[] bytes = Encoding.UTF8.GetBytes(data);
RequestStream.Write(bytes, 0, bytes.Length);
RequestStream.Close();
}
HttpWebResponse response = null;
Stream ResponseStream = null;
StreamReader StreamReader = null;
try
{
response = (HttpWebResponse)request.GetResponse();
ResponseStream = response.GetResponseStream();
StreamReader = new StreamReader(ResponseStream, Encoding.GetEncoding("utf-8"));
string re = StreamReader.ReadToEnd();
StreamReader.Close();
ResponseStream.Close();
return re;
}
catch (WebException ex)
{
response = (HttpWebResponse)ex.Response;
ResponseStream = response.GetResponseStream();
StreamReader = new StreamReader(ResponseStream, Encoding.GetEncoding("utf-8"));
string re = StreamReader.ReadToEnd();
return re;
}
finally
{
if (StreamReader != null)
{
StreamReader.Close();
}
if (ResponseStream != null)
{
ResponseStream.Close();
}
if (response != null)
{
response.Close();
}
}
}
protected void btnAudit_Click(object sender, EventArgs e)
{
Grid1.Hidden = false;
contentPanel1.Hidden = true;
btnAudit.Hidden = true;
btnSave.Hidden = false;
if (!string.IsNullOrEmpty(resultdata.Value))
{
JObject jobject = JObject.Parse(resultdata.Value);
JArray jArray = jobject.Value<JArray>("material_rows");
JArray jArrayOther = jobject.Value<JArray>("other_regions");
JArray jArrayIsoInfo = jobject.Value<JArray>("drawing_info");
dt = new DataTable();
dt.Columns.Add("id");
dt.Columns.Add("pipe_no");
dt.Columns.Add("drawing_number");
dt.Columns.Add("seq_no");
dt.Columns.Add("category");
dt.Columns.Add("description");
dt.Columns.Add("spec");
dt.Columns.Add("qty");
dt.Columns.Add("page_no");
dt.Columns.Add("remark");
dtOther = new DataTable();
dtOther.Columns.Add("id");
dtOther.Columns.Add("region_type");
dtOther.Columns.Add("region_label");
dtOther.Columns.Add("page");
dtOther.Columns.Add("text");
dtIsoInfo = new DataTable();
dtIsoInfo.Columns.Add("id");
dtIsoInfo.Columns.Add("page_no");
dtIsoInfo.Columns.Add("drawing_number");
dtIsoInfo.Columns.Add("pipeline_id");
dtIsoInfo.Columns.Add("operation_pressure_mpa");
dtIsoInfo.Columns.Add("operation_temp_c");
dtIsoInfo.Columns.Add("design_pressure_mpa");
dtIsoInfo.Columns.Add("design_temp_c");
dtIsoInfo.Columns.Add("test_pressure_mpa");
dtIsoInfo.Columns.Add("hydraulic_test_pressure");
dtIsoInfo.Columns.Add("pipe_diameter_dn");
dtIsoInfo.Columns.Add("pipe_spec_grade");
dtIsoInfo.Columns.Add("heat_insulation");
dtIsoInfo.Columns.Add("insulation_thickness_mm");
dtIsoInfo.Columns.Add("post_weld_heat_treatment");
dtIsoInfo.Columns.Add("radiographic_examination");
foreach (JObject item in jArrayOther)
{
var row = dtOther.NewRow();
row["id"] = item.Value<string>("id");
row["region_type"] = item.Value<string>("region_type");
row["region_label"] = item.Value<string>("region_label");
row["page"] = item.Value<string>("page");
row["text"] = item.Value<string>("text");
dtOther.Rows.Add(row);
}
// 遍历并提取数据
foreach (JObject item in jArray)
{
var row = dt.NewRow();
row["id"] = item.Value<string>("id");
row["pipe_no"] = item.Value<string>("pipe_no");
row["drawing_number"] = item.Value<string>("drawing_number");
row["seq_no"] = item.Value<string>("seq_no");
row["category"] = item.Value<string>("category");
row["description"] = item.Value<string>("description");
row["spec"] = item.Value<string>("spec");
row["qty"] = item.Value<string>("qty");
row["page_no"] = item.Value<string>("page_no");
row["remark"] = item.Value<string>("remark");
if (string.IsNullOrEmpty(row["drawing_number"].ToString()))
{
var rowOther = dtOther.Select("page= " + row["page_no"].ToString()).FirstOrDefault();
row["drawing_number"] = rowOther["text"];
}
dt.Rows.Add(row);
}
foreach (JObject item in jArrayIsoInfo)
{
var row = dtIsoInfo.NewRow();
row["id"] = item.Value<string>("id");
row["page_no"] = item.Value<string>("page_no");
row["drawing_number"] = item.Value<string>("drawing_number");
row["pipeline_id"] = item.Value<string>("pipeline_id");
row["operation_temp_c"] = item.Value<string>("operation_temp_c");
row["design_pressure_mpa"] = item.Value<string>("design_pressure_mpa");
row["design_temp_c"] = item.Value<string>("design_temp_c");
row["test_pressure_mpa"] = item.Value<string>("test_pressure_mpa");
row["hydraulic_test_pressure"] = item.Value<string>("hydraulic_test_pressure");
row["pipe_diameter_dn"] = item.Value<string>("pipe_diameter_dn");
row["pipe_spec_grade"] = item.Value<string>("pipe_spec_grade");
row["heat_insulation"] = item.Value<string>("heat_insulation");
row["insulation_thickness_mm"] = item.Value<string>("insulation_thickness_mm");
row["post_weld_heat_treatment"] = item.Value<string>("post_weld_heat_treatment");
row["radiographic_examination"] = item.Value<string>("radiographic_examination");
dtIsoInfo.Rows.Add(row);
}
BindGrid();
}
}
private void BindGrid()
{
Grid1.DataSource = dt;
Grid1.DataBind();
}
#region
/// <summary>
/// Grid行双击事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
return;
}
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_DataInMenuId, Const.BtnAdd))
{
if (DrawingRecognitionContentEdit.dicDt.ContainsKey(CurrUser.PersonId))
{
DrawingRecognitionContentEdit.dicDt[CurrUser.PersonId] = dt;
}
else
{
DrawingRecognitionContentEdit.dicDt.Add(CurrUser.PersonId, dt);
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DrawingRecognitionContentEdit.aspx?Index={0}", Grid1.SelectedRowIndex, "维护 - ")));
}
else
{
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
}
}
#endregion
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
Grid1.DataSource = dt;
Grid1.DataBind();
}
}
}

View File

@ -0,0 +1,116 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HJGL.DataIn
{
public partial class DrawingRecognitionContent
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// resultdata 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlInputHidden resultdata;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnAudit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAudit;
/// <summary>
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// contentPanel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel contentPanel1;
/// <summary>
/// Grid1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Window1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
}
}

View File

@ -0,0 +1,64 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DrawingRecognitionContentEdit.aspx.cs" Inherits="FineUIPro.Web.HJGL.DataIn.DrawingRecognitionContentEdit" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>导入信息维护</title>
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" runat="server" ToolbarAlign="Right">
<Items>
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存"
OnClick="btnSave_Click" >
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Rows>
<f:FormRow>
<Items>
<f:TextBox ID="txtPipeNo" Label="管线号" ShowRedStar="true" Required="true" runat="server" FocusOnPageLoad="true" MaxLength="100" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtDrawingNumber" Label="图号" ShowRedStar="true" Required="true" runat="server" MaxLength="20" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtCategory" Label="类型" ShowRedStar="true" Required="true" runat="server" MaxLength="50" LabelWidth="120px">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtQty" Label="数量" ShowRedStar="true" Required="true" runat="server" MaxLength="50" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtSpec" Label="规格" ShowRedStar="true" Required="true" runat="server" MaxLength="50" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtPageNo" Label="图号" ShowRedStar="true" Required="true" runat="server" MaxLength="50" LabelWidth="120px">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextArea runat="server" Label="描述" ID="txtDescription" Readonly="true" Height="50px" LabelWidth="120px"></f:TextArea>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</form>
<script type="text/javascript">
</script>
</body>
</html>

View File

@ -0,0 +1,84 @@
namespace FineUIPro.Web.HJGL.DataIn
{
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using BLL;
public partial class DrawingRecognitionContentEdit : PageBase
{
#region
/// <summary>
/// 临时表主键
/// </summary>
public static Dictionary<string, DataTable> dicDt = new Dictionary<string, DataTable>();
public int Index
{
get
{
return (int)ViewState["Index"];
}
set
{
ViewState["Index"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.Index = int.Parse(Request.Params["Index"]);
DataTable dt = dicDt[CurrUser.PersonId];
var dataInTemp = dt.Rows[this.Index];
if (dataInTemp != null)
{
this.txtPipeNo.Text = dataInTemp["pipe_no"].ToString();
this.txtDrawingNumber.Text = dataInTemp["drawing_number"].ToString();
this.txtCategory.Text = dataInTemp["category"].ToString();
this.txtQty.Text = dataInTemp["qty"].ToString();
this.txtSpec.Text = dataInTemp["spec"].ToString();
this.txtPageNo.Text = dataInTemp["page_no"].ToString();
this.txtDescription.Text = dataInTemp["description"].ToString();
}
}
}
#endregion
#region
/// <summary>
/// 提交按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
DataTable dt = dicDt[CurrUser.PersonId];
var dataInTemp = dt.Rows[this.Index];
dataInTemp["pipe_no"] = this.txtPipeNo.Text;
dataInTemp["drawing_number"] = this.txtDrawingNumber.Text;
dataInTemp["category"] = this.txtCategory.Text;
dataInTemp["qty"] = this.txtQty.Text;
dataInTemp["spec"] = this.txtSpec.Text;
dataInTemp["page_no"] = this.txtPageNo.Text;
dataInTemp["description"] = this.txtDescription;
Alert.ShowInTop("信息修改完成!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference("") + ActiveWindow.GetHidePostBackReference());
dicDt.Remove(CurrUser.PersonId);
}
#endregion
}
}

View File

@ -0,0 +1,134 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HJGL.DataIn
{
public partial class DrawingRecognitionContentEdit
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// txtPipeNo 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtPipeNo;
/// <summary>
/// txtDrawingNumber 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtDrawingNumber;
/// <summary>
/// txtCategory 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtCategory;
/// <summary>
/// txtQty 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtQty;
/// <summary>
/// txtSpec 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSpec;
/// <summary>
/// txtPageNo 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtPageNo;
/// <summary>
/// txtDescription 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txtDescription;
}
}

View File

@ -0,0 +1,35 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PipeLineInAuto.aspx.cs" Inherits="FineUIPro.Web.HJGL.DataIn.PipeLineInAuto" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>管线导入</title>
<style>
.f-grid-row-summary .f-grid-cell-inner {
font-weight: bold;
color: red;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="RegionPanel1" />
<f:Panel ID="RegionPanel1" ShowBorder="false" runat="server" Margin="5px" EnableIFrame="true" ShowHeader="false" IFrameUrl="PipelineGrid.aspx">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="TOP" runat="server" ToolbarAlign="Left">
<Items>
<f:HiddenField ID="hdId" runat="server"></f:HiddenField>
<f:CheckBox ID="ckbSkipFirst" runat="server" Checked="true" Label="跳过首页" LabelAlign="Right"></f:CheckBox>
<f:FileUpload ID="FileExcel" runat="server" Label="数据文件" EmptyText="请上传pdf格式文件" Width="350px" LabelWidth="90px" LabelAlign="Right"></f:FileUpload>
<f:Button ID="imgbtnImport" runat="server" Text="上传" ToolTip="文件上传" OnClick="imgbtnImport_Click"></f:Button>
</Items>
</f:Toolbar>
</Toolbars>
</f:Panel>
</form>
</body>
</html>

View File

@ -0,0 +1,87 @@
using Aspose.Words;
using BLL;
using BLL.Common;
using NPOI.SS.Formula.Functions;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.OleDb;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading;
using System.Web.UI.DataVisualization.Charting;
namespace FineUIPro.Web.HJGL.DataIn
{
public partial class PipeLineInAuto : PageBase
{
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
}
}
#endregion
#region
/// <summary>
/// 文件上传
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void imgbtnImport_Click(object sender, EventArgs e)
{
try
{
if (this.FileExcel.HasFile == false)
{
Response.Write("<script>alert('请您选择pdf文件')</script> ");
return;
}
string IsXls = Path.GetExtension(FileExcel.FileName).ToString().Trim().ToLower();
if (IsXls != ".pdf")
{
Response.Write("\"<script>alert('请您选择pdf文件')</script> ");
return;
}
string rootPath = Server.MapPath("~/");
string initFullPath = rootPath + Const.ExcelUrl;
if (!Directory.Exists(initFullPath))
{
Directory.CreateDirectory(initFullPath);
}
string fileUrl = initFullPath + BLL.Funs.GetNewFileName() + IsXls;
this.FileExcel.PostedFile.SaveAs(fileUrl);
if (ckbSkipFirst.Checked)
{
RegionPanel1.IFrameUrl = "./PipelineGrid.aspx?ckbSkipFirst=" + 1 + "&&fileUrl=" + fileUrl;
}
else
{
RegionPanel1.IFrameUrl = "./PipelineGrid.aspx?ckbSkipFirst=" + 0 + "&&fileUrl=" + fileUrl;
}
}
catch (Exception ex)
{
ShowNotify(ex.Message, MessageBoxIcon.Warning);
return;
}
}
#endregion
}
}

View File

@ -0,0 +1,89 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HJGL.DataIn
{
public partial class PipeLineInAuto
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// RegionPanel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel RegionPanel1;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// hdId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdId;
/// <summary>
/// ckbSkipFirst 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBox ckbSkipFirst;
/// <summary>
/// FileExcel 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FileUpload FileExcel;
/// <summary>
/// imgbtnImport 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button imgbtnImport;
}
}

View File

@ -0,0 +1,206 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PipelineGrid.aspx.cs" Inherits="FineUIPro.Web.HJGL.DataIn.PipelineGrid" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>PDF导入</title>
<style>
.f-grid-row-summary .f-grid-cell-inner {
font-weight: bold;
color: red;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="RegionPanel1" />
<f:HiddenField ID="hdIds" runat="server"></f:HiddenField>
<f:TabStrip ID="TabStrip1" ShowBorder="true" TabPosition="Top" Height="700"
EnableTabCloseMenu="false" ActiveTabIndex="0" runat="server">
<Tabs>
<f:Tab Title="PDF解析表格" BodyPadding="10px" Layout="Fit" runat="server" >
<Items>
<f:RegionPanel ID="RegionPanel1" ShowBorder="false" runat="server" Margin="5px">
<Regions>
<f:Region ID="Region2" ShowBorder="false" ShowHeader="false" Position="Center" AutoScroll="true" EnableAjax="true" MinHeight="100px"
BoxConfigAlign="Stretch" BoxConfigPosition="Left" runat="server">
<Items>
</Items>
</f:Region>
</Regions>
</f:RegionPanel>
</Items>
</f:Tab>
<f:Tab Title="大模型优化后" BodyPadding="10px" Layout="Fit" runat="server" >
<Items>
<f:RegionPanel ID="RegionPanel2" ShowBorder="false" runat="server" Margin="5px">
<Regions>
<f:Region ID="Region1" ShowBorder="false" ShowHeader="false" Position="Center" AutoScroll="true" EnableAjax="true" MinHeight="100px"
BoxConfigAlign="Stretch" BoxConfigPosition="Left" runat="server">
<Items>
</Items>
</f:Region>
</Regions>
</f:RegionPanel>
</Items>
</f:Tab>
<f:Tab Title="管道数据" BodyPadding="10px" Layout="Fit" runat="server">
<Items>
<f:RegionPanel ID="RegionPanel3" ShowBorder="false" runat="server" Margin="5px">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" runat="server" ToolbarAlign="Right">
<Items>
<f:HiddenField ID="HiddenField2" runat="server"></f:HiddenField>
<f:Button ID="btnImport" ToolTip="导入数据库" Text="导入数据库" OnClick="btnImport_Click" Icon="SystemSave" runat="server" >
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Regions>
<f:Region ID="Region4" ShowBorder="false" ShowHeader="false" Position="Center" AutoScroll="true" EnableAjax="true" MinHeight="100px"
BoxConfigAlign="Stretch" BoxConfigPosition="Left" runat="server">
<Items>
<f:Grid ID="IsoGrid" ShowBorder="true" ShowHeader="false" Title="管线信息" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="PipelineId" EnableColumnLines="true" DataIDField="PipelineId"
EnableTextSelection="True" EnableRowDoubleClickEvent="true" OnRowDoubleClick="IsoGrid_RowDoubleClick" AllowColumnLocking="true">
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号"
Width="60px" HeaderTextAlign="Center" TextAlign="Center" />
<f:WindowField ColumnID="PipelineCode" HeaderTextAlign="Center" TextAlign="Left"
Width="220px" WindowID="Window1" HeaderText="管线号" DataTextField="PipelineCode"
DataIFrameUrlFields="PipelineId" DataIFrameUrlFormatString="PipelineEdit.aspx?PipelineId={0}"
Title="管线号" DataToolTipField="PipelineCode" SortField="PipelineCode"
Locked="true">
</f:WindowField>
<f:RenderField Width="200px" ColumnID="UnitName" DataField="UnitName" SortField="UnitName"
FieldType="String" HeaderText="单位名称" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:TemplateField Width="130px" HeaderText="无损检测类型" HeaderTextAlign="Center"
TextAlign="Center" SortField="DetectionType">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# ConvertDetectionType(Eval("DetectionType")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField Width="130px" HeaderText="探伤比例" HeaderTextAlign="Center"
TextAlign="Center" SortField="DetectionRateId">
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# ConvertDetectionRate(Eval("DetectionRateId")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField Width="130px" HeaderText="介质代号" HeaderTextAlign="Center"
TextAlign="Center" SortField="MediumId">
<ItemTemplate>
<asp:Label ID="Label3" runat="server" Text='<%# ConvertMedium(Eval("MediumId")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField Width="130px" HeaderText="管道等级" HeaderTextAlign="Center"
TextAlign="Center" SortField="PipingClassId">
<ItemTemplate>
<asp:Label ID="Label4" runat="server" Text='<%# ConvertPipingClass(Eval("PipingClassId")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="100px" ColumnID="SingleName" DataField="SingleName" SortField="SingleName"
FieldType="String" HeaderText="图纸名称" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="SingleNumber" DataField="SingleNumber" SortField="SingleNumber"
FieldType="String" HeaderText="单线图号" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="130px" ColumnID="DesignPress" DataField="DesignPress" SortField="DesignPress"
FieldType="String" HeaderText="设计压力 MPa(g)" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="130px" ColumnID="DesignTemperature" DataField="DesignTemperature" SortField="DesignTemperature"
FieldType="String" HeaderText="设计温度℃" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="130px" ColumnID="TestMediumCode" DataField="TestMediumCode" SortField="TestMediumCode"
FieldType="String" HeaderText="压力试验介质" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:TemplateField Width="130px" HeaderText="压力试验介质" HeaderTextAlign="Center"
TextAlign="Center" SortField="TestMediumId">
<ItemTemplate>
<asp:Label ID="Label5" runat="server" Text='<%# ConvertTestMedium(Eval("TestMedium")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="160px" ColumnID="TestPressure" DataField="TestPressure" SortField="TestPressure"
FieldType="String" HeaderText="压力试验压力 MPa(g)" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:TemplateField Width="130px" HeaderText="压力管道级别" HeaderTextAlign="Center"
TextAlign="Center" SortField="PressurePipingClassId">
<ItemTemplate>
<asp:Label ID="Label6" runat="server" Text='<%# ConvertPressurePipingClass(Eval("PressurePipingClassId")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField Width="130px" HeaderText="泄露试验介质" HeaderTextAlign="Center"
TextAlign="Center" SortField="LeakMedium">
<ItemTemplate>
<asp:Label ID="Label7" runat="server" Text='<%# ConvertTestMedium(Eval("LeakMedium")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="160px" ColumnID="LeakPressure" DataField="LeakPressure" SortField="LeakPressure"
FieldType="String" HeaderText="泄露试验压力 MPa(g)" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:TemplateField Width="130px" HeaderText="吹洗要求" HeaderTextAlign="Center"
TextAlign="Center" SortField="PCMedium">
<ItemTemplate>
<asp:Label ID="Label8" runat="server" Text='<%# ConvertPCMedium(Eval("PCMedium")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="160px" ColumnID="VacuumPressure" DataField="VacuumPressure" SortField="VacuumPressure"
FieldType="String" HeaderText="真空试验压力 KPa(a)" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:TemplateField Width="130px" HeaderText="材质" HeaderTextAlign="Center"
TextAlign="Center" SortField="MaterialId">
<ItemTemplate>
<asp:Label ID="Label9" runat="server" Text='<%# ConvertMaterial(Eval("MaterialId")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="100px" ColumnID="Remark" DataField="Remark" SortField="Remark"
FieldType="String" HeaderText="备注" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
</Columns>
</f:Grid>
</Items>
</f:Region>
</Regions>
</f:RegionPanel>
</Items>
</f:Tab>
</Tabs>
</f:TabStrip>
</form>
<f:Window ID="Window1" Title="管线信息维护" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Top" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="true"
Width="1000px" Height="600px">
</f:Window>
</body>
</html>

View File

@ -0,0 +1,786 @@
using BLL;
using Model;
using Newtonsoft.Json.Linq;
using Org.BouncyCastle.Asn1.Tsp;
using Spire.Pdf;
using Spire.Pdf.Utilities;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
namespace FineUIPro.Web.HJGL.DataIn
{
public partial class PipelineGrid : PageBase
{
public string fileUrl
{
get
{
return (string)ViewState["fileUrl"];
}
set
{
ViewState["fileUrl"] = value;
}
}
public string ckbSkipFirst
{
get
{
return (string)ViewState["ckbSkipFirst"];
}
set
{
ViewState["ckbSkipFirst"] = value;
}
}
private string IsPDMS
{
get
{
return (string)ViewState["IsPDMS"];
}
set
{
ViewState["IsPDMS"] = value;
}
}
public DataSet set
{
get
{
return (DataSet)ViewState["set"];
}
set
{
ViewState["set"] = value;
}
}
public DataSet setAfterProcess
{
get
{
return (DataSet)ViewState["setAfterProcess"];
}
set
{
ViewState["setAfterProcess"] = value;
}
}
public List<Model.HJGL_Pipeline> isoList
{
get
{
return (List<Model.HJGL_Pipeline>)Session["isoList"];
}
set
{
Session["isoList"] = value;
}
}
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
fileUrl = Request.Params["fileUrl"];
ckbSkipFirst = Request.Params["ckbSkipFirst"];
set = new DataSet();
setAfterProcess = new DataSet();
isoList = new List<HJGL_Pipeline>();
InitGrid();
}
}
#endregion
/// <summary>
/// 关闭弹出窗
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void InitGrid()
{
// 加载PDF文档
PdfDocument pdf = new PdfDocument();
if (!File.Exists(fileUrl))
{
return;
}
pdf.LoadFromFile(fileUrl);
PdfTableExtractor extractor = new PdfTableExtractor(pdf);
// 遍历每一页
int i = 0;
if (ckbSkipFirst == "1")
{
i = 1;
}
var getPipeline = from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId select x;
var getMedium = from x in Funs.DB.Base_Medium where x.ProjectId == this.CurrUser.LoginProjectId select x;//介质
var getPipeLineClass = from x in Funs.DB.Base_PipingClass where x.ProjectId == this.CurrUser.LoginProjectId select x;//管道等级
var getDetectionRate = from x in Funs.DB.Base_DetectionRate select x;//探伤比例
var getDetectionType = from x in Funs.DB.Base_DetectionType select x;//探伤类型
var getPressurePipingClass = from x in Funs.DB.Base_PressurePipingClass select x;//压力管道级别
var getTestMedium = from x in Funs.DB.Base_TestMedium where x.TestType == "1" select x;//压力试验介质
var getLeakMedium = from x in Funs.DB.Base_TestMedium where x.TestType == "2" select x;//泄露性试验介质
var getPurgeMethod = from x in Funs.DB.Base_PurgeMethod select x;
var getMaterial = from x in Funs.DB.Base_Material select x;
for (; i < pdf.Pages.Count; i++)
{
PdfPageBase page = pdf.Pages[i];
// 提取页面中的表格
PdfTable[] tables = extractor.ExtractTable(i);
// 输出找到的表格数量
Console.WriteLine($"第 {i + 1} 页找到 {tables.Length} 个表格");
// 遍历提取到的表格
for (int j = 0; j < tables.Length; j++)
{
PdfTable table = tables[j];
DataTable dtTemp = new DataTable();
for (int col = 0; col < table.GetColumnCount(); col++)
{
dtTemp.Columns.Add("col" + col);
}
// 遍历表格的行列
for (int row = 0; row < table.GetRowCount(); row++)
{
DataRow rowData = dtTemp.NewRow();
dtTemp.Rows.Add(rowData);
for (int col = 0; col < table.GetColumnCount(); col++)
{
string text = table.GetText(row, col);
rowData[col] = table.GetText(row, col);
Console.Write($"{text}\t");
}
Console.WriteLine(); // 换行
}
if (dtTemp.Rows.Count > 0 && dtTemp.Columns.Count > 1)
{// 2. 转换为CSV
string csvContent = ConvertDataTableToCsv(dtTemp);
Console.WriteLine("生成的CSV内容");
Console.WriteLine(csvContent);
// 3. 上传到服务器
string uploadUrl = "http://localhost:8000/api/table/clean"; // 替换为实际上传地址
string fileName = $"data_{DateTime.Now:yyyyMMddHHmmss}.csv";
//"管线号", "公称直径", "管道等级", "管道材料", "主要介质", "起止点", "操作参数温度", "操作参数压力", "设计参数温度", "设计参数压力", "隔热工程代号", "隔热材料", "厚度", "介质", "压力", "比例", "方法", "合格等级", "PID尾号", "压力管道类别", "应力分析题号", "备注"
try
{
Grid grid = new Grid();
grid.ShowGridHeader = true;
grid.Title = dtTemp.TableName;
grid.AllowColumnLocking = true;
grid.DataKeyNames = new string[] { "Id" };
foreach (DataColumn dc in dtTemp.Columns)
{
grid.Columns.Add(new BoundField() { DataField = dc.ColumnName, HeaderText = dc.ColumnName });
}
grid.DataSource = dtTemp;
grid.DataBind();
Region2.Items.Add(grid);
set.Tables.Add(dtTemp);
string response = UploadCsvFile(csvContent, uploadUrl, fileName);
Grid grid1 = new Grid();
grid1.ShowGridHeader = true;
grid1.Title = dtTemp.TableName;
grid1.AllowColumnLocking = true;
grid1.DataKeyNames = new string[] { "Id" };
JObject dynamicObj = JObject.Parse(response);
DataTable dtAfterProcess = new DataTable();
foreach (JToken employeeToken in dynamicObj["headers"])
{
dtAfterProcess.Columns.Add(employeeToken.ToString());
grid1.Columns.Add(new BoundField() { DataField = employeeToken.ToString(), HeaderText = employeeToken.ToString() });
}
dtAfterProcess.Columns.Add("Id");
foreach (JToken rowData in dynamicObj["rows"])
{
// int index = 0;
var row = dtAfterProcess.NewRow();
var datas = rowData.ToList();
row["Id"] = Guid.NewGuid().ToString();
foreach(DataRow row1 in dtTemp.Rows)
{
if (datas[0].ToString() == row1[0].ToString())
{
for(int index = 0; index < dtTemp.Columns.Count; index++)
{
row[index] = row1[index];
}
}
}
//foreach (var d in datas)
//{
// row[index] = d.ToString(); index++;
//}
dtAfterProcess.Rows.Add(row);
}
grid1.DataSource = dtAfterProcess;
grid1.DataBind();
Region1.Items.Add(grid1);
setAfterProcess.Tables.Add(dtAfterProcess);
string urlHeaderCorrespondence = "http://localhost:8000/api/table/head";
string data = @"{
""source_headers"": " + dynamicObj["headers"].ToString() + @" ,
""target_fields"": [
""线"",
"""",
""线"",
"""",
"""",
"""",
"""",
"""",
"""",
"""",
"""",
"""",
""线"",
"""",
"""",
"""",
"""",
"""",
""""
],
""extra_instructions"": ""线线 Main Fluid ,""
}
";
string resHeaderCorrespondence = HeaderCorrespondence(urlHeaderCorrespondence, data, "POST", "application/json;charset=utf-8");
if (!string.IsNullOrEmpty(resHeaderCorrespondence))
{
JObject dynamicHeaderCorrespondence = JObject.Parse(resHeaderCorrespondence);
Dictionary<string, string> headerCorrespondenceDic = new Dictionary<string, string>();
foreach (JToken employeeToken in dynamicHeaderCorrespondence["mapping"])
{
headerCorrespondenceDic.Add(employeeToken["source_header"].ToString(), employeeToken["target_field"].ToString());
}
foreach (DataRow row in dtAfterProcess.Rows)
{
HJGL_Pipeline isoInfo = new HJGL_Pipeline();
isoInfo.PipelineId = Guid.NewGuid().ToString();
isoInfo.ProjectId = CurrUser.LoginProjectId;
foreach (DataColumn dataColumn in dtAfterProcess.Columns)
{
if (headerCorrespondenceDic.ContainsKey(dataColumn.ColumnName))
switch (headerCorrespondenceDic[dataColumn.ColumnName])
{
case "管线号":
isoInfo.PipelineCode = row[dataColumn.ColumnName].ToString();
break;
case "单线图号":
isoInfo.PipelineCode = row[dataColumn.ColumnName].ToString();
break;
case "介质名称":
isoInfo.MediumId = getMedium.Where(x => x.MediumName == row[dataColumn.ColumnName].ToString() || x.MediumCode == row[dataColumn.ColumnName].ToString()).Select(x => x.MediumId).FirstOrDefault();
break;
case "管道等级":
isoInfo.PipingClassId = getPipeLineClass.Where(x => x.PipingClassCode == row[dataColumn.ColumnName].ToString() || x.PipingClassName == row[dataColumn.ColumnName].ToString()).Select(x => x.PipingClassId).FirstOrDefault();
break;
case "探伤比例":
isoInfo.DetectionRateId = getDetectionRate.Where(x => x.DetectionRateCode == row[dataColumn.ColumnName].ToString() ).Select(x => x.DetectionRateId).FirstOrDefault();
break;
case "探伤类型":
isoInfo.DetectionType = getDetectionType.Where(x => x.DetectionTypeName == row[dataColumn.ColumnName].ToString() || x.DetectionTypeCode == row[dataColumn.ColumnName].ToString()).Select(x => x.DetectionTypeId).FirstOrDefault();
break;
case "设计温度":
isoInfo.DesignTemperature = row[dataColumn.ColumnName].ToString() ;
break;
case "设计压力":
isoInfo.DesignPress = row[dataColumn.ColumnName].ToString();
break;
case "压力试验介质":
isoInfo.TestMedium = getTestMedium.Where(x => x.MediumCode == row[dataColumn.ColumnName].ToString() || x.MediumName == row[dataColumn.ColumnName].ToString()).Select(x => x.TestMediumId).FirstOrDefault(); ;
break;
case "压力试验压力":
isoInfo.TestPressure = row[dataColumn.ColumnName].ToString();
break;
case "压力管道级别":
isoInfo.PressurePipingClassId = getPressurePipingClass.Where(x => x.PressurePipingClassCode == row[dataColumn.ColumnName].ToString() ).Select(x => x.PressurePipingClassId).FirstOrDefault(); ;
break;
case "管线长度":
isoInfo.PipeLenth = Funs.GetNewDecimal(row[dataColumn.ColumnName].ToString());
break;
case "泄露试验介质":
isoInfo.LeakMedium = getLeakMedium.Where(x => x.MediumCode == row[dataColumn.ColumnName].ToString() || x.MediumName == row[dataColumn.ColumnName].ToString()).Select(x => x.TestMediumId).FirstOrDefault(); ;
break;
case "泄露试验压力":
isoInfo.LeakPressure = row[dataColumn.ColumnName].ToString() ;
break;
case "吹洗要求":
isoInfo.PCMedium = getPurgeMethod.Where(x => x.PurgeMethodCode == row[dataColumn.ColumnName].ToString()).Select(x => x.PurgeMethodId).FirstOrDefault(); ;
break;
case "真空试验压力":
isoInfo.VacuumPressure = row[dataColumn.ColumnName].ToString();
break;
case "材质":
isoInfo.MediumId = getMaterial.Where(x => x.MaterialCode == row[dataColumn.ColumnName].ToString()).Select(x => x.MaterialId).FirstOrDefault();
break;
case "备注":
isoInfo.Remark = row[dataColumn.ColumnName].ToString();
break;
}
}
isoList.Add(isoInfo);
}
}
}
catch (Exception e11)
{
}
}
Console.WriteLine($"\n--- 表格 {j + 1} ---");
}
}
this.IsoGrid.DataSource = this.isoList;
this.IsoGrid.DataBind();
}
/// <summary>
/// 将DataTable转换为标准CSV格式字符串
/// </summary>
/// <param name="dt">待转换的DataTable</param>
/// <returns>CSV格式字符串</returns>
public static string ConvertDataTableToCsv(DataTable dt)
{
if (dt == null || dt.Rows.Count == 0)
throw new ArgumentNullException(nameof(dt), "DataTable不能为空或无数据");
StringBuilder csvBuilder = new StringBuilder();
// 1. 写入表头(列名)
for (int i = 0; i < dt.Columns.Count; i++)
{
// 处理表头中的特殊字符
csvBuilder.Append(EscapeCsvValue(dt.Columns[i].ColumnName));
if (i < dt.Columns.Count - 1)
csvBuilder.Append(",");
}
csvBuilder.AppendLine();
// 2. 写入数据行
foreach (DataRow row in dt.Rows)
{
for (int i = 0; i < dt.Columns.Count; i++)
{
// 处理单元格中的特殊字符
string cellValue = row[i] == DBNull.Value ? "" : row[i].ToString();
csvBuilder.Append(EscapeCsvValue(cellValue));
if (i < dt.Columns.Count - 1)
csvBuilder.Append(",");
}
csvBuilder.AppendLine();
}
return csvBuilder.ToString();
}
/// <summary>
/// 转义CSV中的特殊字符处理逗号、换行、引号
/// </summary>
/// <param name="value">原始值</param>
/// <returns>转义后的值</returns>
private static string EscapeCsvValue(string value)
{
if (string.IsNullOrEmpty(value))
return "";
// 如果包含逗号、换行符、双引号,需要用双引号包裹,并将内部双引号替换为两个双引号
if (value.Contains(",") || value.Contains("\n") || value.Contains("\r") || value.Contains("\""))
{
return "\"" + value.Replace("\"", "\"\"") + "\"";
}
return value;
}
/// <summary>
/// 将CSV字符串保存为临时文件并上传到指定服务器
/// </summary>
/// <param name="csvContent">CSV内容</param>
/// <param name="uploadUrl">服务器上传接口地址</param>
/// <param name="fileName">上传的文件名</param>
/// <param name="timeout">超时时间毫秒默认30秒</param>
/// <returns>服务器返回的响应内容</returns>
public static string UploadCsvFile(string csvContent, string uploadUrl, string fileName, int timeout = 300000)
{
string boundary = "----WebKitFormBoundary" + Guid.NewGuid().ToString("N");
using (MemoryStream ms = new MemoryStream())
{
void WriteString(string text)
{
byte[] bytes = Encoding.UTF8.GetBytes(text);
ms.Write(bytes, 0, bytes.Length);
}
// 构建请求体
WriteString($"--{boundary}\r\n");
WriteString($"Content-Disposition: form-data; name=\"file\"; filename=\"{fileName}\"\r\n");
WriteString("Content-Type: text/csv\r\n");
WriteString("\r\n");
WriteString(csvContent);
WriteString("\r\n");
WriteString($"--{boundary}\r\n");
WriteString("Content-Disposition: form-data; name=\"extra_instructions\"\r\n");
WriteString("\r\n");
WriteString($"注意数据不要少列\r\n");
WriteString($"--{boundary}--\r\n");
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uploadUrl);
request.Method = "POST";
request.ContentType = $"multipart/form-data; boundary={boundary}";
request.ContentLength = ms.Length;
request.Accept = "application/json";
request.Timeout = timeout;
try
{
// 发送数据
using (Stream requestStream = request.GetRequestStream())
{
ms.Position = 0;
ms.CopyTo(requestStream);
}
// 获取响应
using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
using (StreamReader reader = new StreamReader(response.GetResponseStream(), Encoding.UTF8))
{
string responseText = reader.ReadToEnd();
return responseText;
}
}
catch (WebException ex)
{
// 处理HTTP错误
if (ex.Response != null)
{
using (StreamReader reader = new StreamReader(ex.Response.GetResponseStream(), Encoding.UTF8))
{
string errorText = reader.ReadToEnd();
throw new Exception($"HTTP错误: {errorText}", ex);
}
}
throw new Exception($"网络错误: {ex.Message}", ex);
}
}
}
public static string HeaderCorrespondence(string uploadUrl, string data, string method, string contenttype)
{
// 5. 创建HTTP请求
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uploadUrl);
request.Method = string.IsNullOrEmpty(method) ? "GET" : method;
request.ContentType = string.IsNullOrEmpty(contenttype) ? "application/json;charset=utf-8" : contenttype;
if (uploadUrl.IndexOf("https") >= 0)
{
request.ProtocolVersion = HttpVersion.Version10;
}
if (!string.IsNullOrEmpty(data))
{
Stream RequestStream = request.GetRequestStream();
byte[] bytes = Encoding.UTF8.GetBytes(data);
RequestStream.Write(bytes, 0, bytes.Length);
RequestStream.Close();
}
HttpWebResponse response = null;
Stream ResponseStream = null;
StreamReader StreamReader = null;
try
{
response = (HttpWebResponse)request.GetResponse();
ResponseStream = response.GetResponseStream();
StreamReader = new StreamReader(ResponseStream, Encoding.GetEncoding("utf-8"));
string re = StreamReader.ReadToEnd();
StreamReader.Close();
ResponseStream.Close();
return re;
}
catch (WebException ex)
{
response = (HttpWebResponse)ex.Response;
ResponseStream = response.GetResponseStream();
StreamReader = new StreamReader(ResponseStream, Encoding.GetEncoding("utf-8"));
string re = StreamReader.ReadToEnd();
return re;
}
finally
{
if (StreamReader != null)
{
StreamReader.Close();
}
if (ResponseStream != null)
{
ResponseStream.Close();
}
if (response != null)
{
response.Close();
}
}
}
protected void IsoGrid_RowDoubleClick(object sender, GridRowClickEventArgs e)
{
HJGL_Pipeline iso = null;
foreach (var item in isoList)
{
if (item.PipelineId == IsoGrid.SelectedRowID)
{
iso = item;
break;
}
}
if (PipelineInEdit.dic.ContainsKey(IsoGrid.SelectedRowID))
{
PipelineInEdit.dic[IsoGrid.SelectedRowID] = iso;
}
else
{
PipelineInEdit.dic.Add(IsoGrid.SelectedRowID, iso);
}
hdIds.Text = "";
PageContext.RegisterStartupScript(Window1.GetSaveStateReference(hdIds.ClientID) + Window1.GetShowReference(String.Format("PipelineInEdit.aspx?PipelineId={0}", IsoGrid.SelectedRowID, "编辑 - ")));
}
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
if (!string.IsNullOrEmpty(hdIds.Text))
{
HJGL_Pipeline iso = null;
foreach (var item in isoList)
{
if (item.PipelineId == hdIds.Text)
{
iso = item;
break;
}
}
for (int i = 0; i < isoList.Count; i++)
{
isoList[i].PipingClassId = iso.PipingClassId;
isoList[i].MediumId = iso.MediumId;
isoList[i].DetectionRateId = iso.DetectionRateId;
isoList[i].DetectionType = iso.DetectionType;
isoList[i].DesignPress = iso.DesignPress;
isoList[i].DesignTemperature = iso.DesignTemperature;
isoList[i].TestPressure = iso.TestPressure;
isoList[i].TestMedium = iso.TestMedium;
isoList[i].PipeLenth = iso.PipeLenth;
isoList[i].PressurePipingClassId = iso.PressurePipingClassId;
isoList[i].LeakPressure = iso.LeakPressure;
isoList[i].LeakMedium = iso.LeakMedium;
isoList[i].VacuumPressure = iso.VacuumPressure;
isoList[i].PCMedium = iso.PCMedium;
isoList[i].PCtype = iso.PCtype;
isoList[i].Remark = iso.Remark;
isoList[i].MaterialId = iso.MaterialId;
isoList[i].IsFinished = iso.IsFinished;
isoList[i].PlanStartDate = iso.PlanStartDate;
isoList[i].PlanEndDate = iso.PlanEndDate;
isoList[i].ActStartDate = iso.ActStartDate;
isoList[i].ActEndDate = iso.ActEndDate;
isoList[i].WBSId = iso.WBSId;
isoList[i].State = iso.State;
isoList[i].FlowingSection = iso.FlowingSection;
isoList[i].UnitId = iso.UnitId;
isoList[i].UnitWorkId = iso.UnitWorkId;
isoList[i].PipelineCode = iso.PipelineCode;
isoList[i].SingleName = iso.SingleName;
isoList[i].SingleNumber = iso.SingleNumber;
isoList[i].PipingClassId = iso.PipingClassId;
}
}
this.IsoGrid.DataSource = this.isoList;
this.IsoGrid.DataBind();
}
public static string ConvertDetectionType(object DetectionTypeId)
{
if (DetectionTypeId != null)
{
var steel= Funs.DB.Base_DetectionType.FirstOrDefault(x => x.DetectionTypeId == DetectionTypeId.ToString());
if (steel != null)
{
return steel.DetectionTypeCode;
}
}
return null;
}
public static string ConvertDetectionRate(object DetectionRateId)
{
if (DetectionRateId != null)
{
var detectionRate = Funs.DB.Base_DetectionRate.FirstOrDefault(x => x.DetectionRateId == DetectionRateId.ToString());
if (detectionRate != null)
{
return detectionRate.DetectionRateCode;
}
}
return null;
}
public static string ConvertMedium(object MediumId)
{
if (MediumId != null)
{
var materialStandard = Funs.DB.Base_Medium.FirstOrDefault(x => x.MediumId == MediumId.ToString());
if (materialStandard != null)
{
return materialStandard.MediumCode;
}
}
return null;
}
public static string ConvertPipingClass(object PipingClassId)
{
if (PipingClassId != null)
{
var service = Funs.DB.Base_PipingClass.FirstOrDefault(x => x.PipingClassId == PipingClassId.ToString());
if (service != null)
{
return service.PipingClassCode;
}
}
return null;
}
public static string ConvertTestMedium(object TestMediumId)
{
if (TestMediumId != null)
{
var isoClass = Funs.DB.Base_TestMedium.FirstOrDefault(x => x.TestMediumId == TestMediumId.ToString());
if (isoClass != null)
{
return isoClass.MediumName;
}
}
return null;
}
public static string ConvertPressurePipingClass(object PressurePipingClassId)
{
if (PressurePipingClassId != null)
{
var isoClass = Funs.DB.Base_PressurePipingClass.FirstOrDefault(x => x.PressurePipingClassId == PressurePipingClassId.ToString());
if (isoClass != null)
{
return isoClass.PressurePipingClassCode;
}
}
return null;
}
public static string ConvertPCMedium(object PurgeMethodId)
{
if (PurgeMethodId != null)
{
var isoClass = Funs.DB.Base_PurgeMethod.FirstOrDefault(x => x.PurgeMethodId == PurgeMethodId.ToString());
if (isoClass != null)
{
return isoClass.PurgeMethodCode;
}
}
return null;
}
public static string ConvertMaterial(object MaterialId)
{
if (MaterialId != null)
{
var isoClass = Funs.DB.Base_Material.FirstOrDefault(x => x.MaterialId == MaterialId.ToString());
if (isoClass != null)
{
return isoClass.MaterialCode;
}
}
return null;
}
protected void btnImport_Click(object sender, EventArgs e)
{
try
{
if (isoList.Count() > 0)
{
Funs.DB.HJGL_Pipeline.InsertAllOnSubmit(isoList);
Funs.DB.SubmitChanges();
}
isoList.Clear();
this.IsoGrid.DataSource = this.isoList;
this.IsoGrid.DataBind();
Alert.ShowInTop("导入成功!", MessageBoxIcon.Success);
}
catch (SqlException ex)
{
throw;
}
}
}
}

View File

@ -0,0 +1,233 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HJGL.DataIn
{
public partial class PipelineGrid
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// hdIds 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdIds;
/// <summary>
/// TabStrip1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TabStrip TabStrip1;
/// <summary>
/// RegionPanel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.RegionPanel RegionPanel1;
/// <summary>
/// Region2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Region Region2;
/// <summary>
/// RegionPanel2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.RegionPanel RegionPanel2;
/// <summary>
/// Region1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Region Region1;
/// <summary>
/// RegionPanel3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.RegionPanel RegionPanel3;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// HiddenField2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField HiddenField2;
/// <summary>
/// btnImport 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnImport;
/// <summary>
/// Region4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Region Region4;
/// <summary>
/// IsoGrid 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid IsoGrid;
/// <summary>
/// Label1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label1;
/// <summary>
/// Label2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label2;
/// <summary>
/// Label3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label3;
/// <summary>
/// Label4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label4;
/// <summary>
/// Label5 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label5;
/// <summary>
/// Label6 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label6;
/// <summary>
/// Label7 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label7;
/// <summary>
/// Label8 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label8;
/// <summary>
/// Label9 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label9;
/// <summary>
/// Window1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
}
}

View File

@ -0,0 +1,148 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PipelineInEdit.aspx.cs" Inherits="FineUIPro.Web.HJGL.DataIn.PipelineInEdit" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>编辑管线信息</title>
<style type="text/css">
.customlabel span
{
color: red;
font-weight: bold;
}
</style>
</head>
<body>
<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="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="管线信息"
TitleToolTip="管线信息" AutoScroll="true">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ValidateForms="SimpleForm1"
OnClick="btnSave_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Items>
<f:Form ID="SimpleForm1" ShowBorder="true" ShowHeader="false" AutoScroll="true" BodyPadding="10px"
runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Rows>
<f:FormRow>
<Items>
<f:TextBox ID="txtPipelineCode" Label="管线号" ShowRedStar="true"
Required="true" runat="server" FocusOnPageLoad="true" LabelWidth="120px">
</f:TextBox>
<f:DropDownList runat="server" ID="drpUnit" Label ="单位名称"></f:DropDownList>
<%--<f:TextBox ID="txtUnitName" Label="单位名称" Readonly="true"
runat="server" LabelWidth="140px">
</f:TextBox>--%>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtSingleName" Label="图纸名称"
runat="server" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtSingleNumber" Label="单线图号" runat="server"
LabelWidth="140px">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpMedium" Label="介质名称" runat="server"
ShowRedStar="true" Required="true" EnableEdit="true" LabelWidth="120px">
</f:DropDownList>
<f:DropDownList ID="drpPipingClass" Label="管道等级" runat="server"
ShowRedStar="true" Required="true" EnableEdit="true" LabelWidth="140px" >
</f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpDetectionRate" Label="探伤比例" runat="server"
ShowRedStar="true" Required="true" EnableEdit="true" LabelWidth="120px">
</f:DropDownList>
<f:DropDownList ID="drpDetectionType" Label="探伤类型" runat="server" EnableCheckBoxSelect="true" EnableMultiSelect="true"
ShowRedStar="true" Required="true" EnableEdit="true" LabelWidth="140px" AutoSelectFirstItem="false">
</f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="numDesignTemperature" Label="设计温度℃" runat="server" LabelWidth="120px"></f:TextBox>
<f:TextBox ID="numDesignPress" Label="设计压力 MPa(g)" runat="server" LabelWidth="140px">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpTestMedium" Label="压力试验介质" runat="server"
EnableEdit="true" LabelWidth="120px">
</f:DropDownList>
<f:TextBox ID="numTestPressure" Label="压力试验压力 MPa(g)" runat="server" LabelWidth="140px"></f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpPressurePipingClass" Label="压力管道级别" runat="server"
EnableEdit="true" LabelWidth="120px">
</f:DropDownList>
<f:NumberBox ID="numPipeLenth" Label="管线长度(m)" runat="server" LabelWidth="140px"></f:NumberBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpLeakMedium" Label="泄露试验介质" runat="server"
EnableEdit="true" LabelWidth="120px">
</f:DropDownList>
<f:TextBox ID="numLeakPressure" Label="泄露试验压力 MPa(g)" runat="server" LabelWidth="140px"></f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpPCMedium" Label="吹洗要求" runat="server"
EnableEdit="true" LabelWidth="120px">
</f:DropDownList>
<f:TextBox ID="numVacuumPressure" Label="真空试验压力 KPa(a)" runat="server" LabelWidth="140px"></f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpMaterial" Label="材质"
runat="server" EnableEdit="true" LabelWidth="120px" LabelAlign="Right">
</f:DropDownList>
<f:TextBox ID="txtRemark" Label="备注" runat="server" LabelWidth="140px">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:CheckBox ID="ckAll" runat="server" Checked="true" Text="是否批量修改"></f:CheckBox>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</Items>
</f:Panel>
</Items>
</f:Panel>
</form>
<script type="text/javascript">
function reloadGrid() {
__doPostBack(null, 'reloadGrid');
}
</script>
</body>
</html>

View File

@ -0,0 +1,357 @@
using BLL;
using Model;
using System;
using System.Collections.Generic;
namespace FineUIPro.Web.HJGL.DataIn
{
public partial class PipelineInEdit : PageBase
{
#region
/// <summary>
/// 管线主键
/// </summary>
///
public static Dictionary<string, HJGL_Pipeline> dic = new Dictionary<string, HJGL_Pipeline>();
public string PipelineId
{
get
{
return (string)ViewState["PipelineId"];
}
set
{
ViewState["PipelineId"] = value;
}
}
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
/// <summary>
/// 单位主键
/// </summary>
public string UnitId
{
get
{
return (string)ViewState["UnitId"];
}
set
{
ViewState["UnitId"] = value;
}
}
/// <summary>
/// 单位工程
/// </summary>
public string UnitWorkId
{
get
{
return (string)ViewState["UnitWorkId"];
}
set
{
ViewState["UnitWorkId"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.PipelineId = Request.Params["PipelineId"];
Base_MediumService.InitMediumDropDownList(this.drpMedium, this.CurrUser.LoginProjectId, true);
Base_TestMediumService.InitMediumDropDownList(this.drpTestMedium, "1", true);
Base_PipingClassService.InitPipingClassDropDownList(this.drpPipingClass, this.CurrUser.LoginProjectId, true, "-请选择-");
Base_DetectionRateService.InitDetectionRateDropDownList(drpDetectionRate, true);
Base_DetectionTypeService.InitDetectionTypeDropDownList(drpDetectionType, false, string.Empty);
Base_PressurePipingClassService.InitPressurePipingClassDropDownList(drpPressurePipingClass, true, "-请选择-");
Base_TestMediumService.InitMediumDropDownList(this.drpLeakMedium, "2", true);
Base_PurgeMethodService.InitPurgeMethodDropDownList(this.drpPCMedium, true, "-请选择-");
BLL.Base_MaterialService.InitMaterialDropDownList(this.drpMaterial, true, "请选择");//材质1
Model.Project_Sys_Set pressUnit = BLL.Project_SysSetService.GetSysSetBySetId("8", this.CurrUser.LoginProjectId);
if (pressUnit != null && pressUnit.SetValue == "2")
{
this.numDesignPress.Label = "设计压力 kPa(g)";
this.numTestPressure.Label = "压力试验压力 kPa(g)";
this.numLeakPressure.Label = "泄露试验压力 kPa(g)";
this.numVacuumPressure.Label = "真空试验压力 kPa(a)";
}
if (!string.IsNullOrEmpty(this.PipelineId))
{
Model.HJGL_Pipeline pipeline =dic[this.PipelineId];
BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList1(this.drpUnit,CurrUser.LoginProjectId, true);//单位
this.ProjectId = pipeline.ProjectId;
this.UnitId = pipeline.UnitId;
this.UnitWorkId = pipeline.UnitWorkId;
this.txtPipelineCode.Text = pipeline.PipelineCode;
//this.txtUnitName.Text = pipeline.UnitName;
drpUnit.SelectedValue = pipeline.UnitId;
this.txtSingleName.Text = pipeline.SingleName;
if (!string.IsNullOrEmpty(pipeline.MediumId))
{
this.drpMedium.SelectedValue = pipeline.MediumId;
}
if (!string.IsNullOrEmpty(pipeline.PipingClassId))
{
this.drpPipingClass.SelectedValue = pipeline.PipingClassId;
}
if (!string.IsNullOrEmpty(pipeline.DetectionRateId))
{
drpDetectionRate.SelectedValue = pipeline.DetectionRateId;
}
if (!string.IsNullOrEmpty(pipeline.DetectionType))
{
string[] dtype = pipeline.DetectionType.Split('|');
drpDetectionType.SelectedValueArray = dtype;
}
if (!string.IsNullOrEmpty(pipeline.TestMedium))
{
drpTestMedium.SelectedValue = pipeline.TestMedium;
}
this.txtSingleNumber.Text = pipeline.SingleNumber;
if (pipeline.DesignPress != null)
{
numDesignPress.Text = pipeline.DesignPress;
}
if (pipeline.DesignTemperature != null)
{
numDesignTemperature.Text = pipeline.DesignTemperature;
}
if (pipeline.TestPressure != null)
{
numTestPressure.Text = pipeline.TestPressure;
}
if (pipeline.PressurePipingClassId != null)
{
drpPressurePipingClass.SelectedValue = pipeline.PressurePipingClassId;
}
if (pipeline.PipeLenth != null)
{
numPipeLenth.Text = pipeline.PipeLenth.Value.ToString();
}
this.txtRemark.Text = pipeline.Remark;
this.UnitWorkId = pipeline.UnitWorkId;
if (!string.IsNullOrEmpty(pipeline.LeakPressure))
{
this.numLeakPressure.Text = pipeline.LeakPressure;
}
if (!string.IsNullOrEmpty(pipeline.LeakMedium))
{
drpLeakMedium.SelectedValue = pipeline.LeakMedium;
}
if (!string.IsNullOrEmpty(pipeline.VacuumPressure))
{
this.numVacuumPressure.Text = pipeline.VacuumPressure;
}
if (!string.IsNullOrEmpty(pipeline.PCMedium))
{
drpPCMedium.SelectedValue = pipeline.PCMedium;
}
if (!string.IsNullOrEmpty(pipeline.MaterialId))
{
drpMaterial.SelectedValue = pipeline.MaterialId;
}
}
else
{
this.UnitWorkId = Request.Params["UnitWorkId"];
Model.WBS_UnitWork workArea = BLL.UnitWorkService.getUnitWorkByUnitWorkId(this.UnitWorkId);
BLL.UnitService.InitUnitDropDownListByUnitIds(this.drpUnit, workArea.UnitId, false);//单位
if (workArea != null)
{
this.ProjectId = workArea.ProjectId;
//this.InstallationId = workArea.InstallationId;
}
}
}
}
#endregion
#region 线
/// <summary>
/// 管线信息保存
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_PipelineMenuId, Const.BtnSave))
{
if (BLL.PipelineService.IsExistPipelineCode(this.txtPipelineCode.Text.Trim(), this.UnitWorkId, this.PipelineId))
{
Alert.ShowInTop("该管线号已存在!", MessageBoxIcon.Warning);
return;
}
else
{
SaveData(true);
// 关闭本窗体,然后回发父窗体
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
}
else
{
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
return;
}
}
private void SaveData(bool b)
{
Model.HJGL_Pipeline pipeline = dic[this.PipelineId];
pipeline.ProjectId = this.ProjectId;
//pipeline.InstallationId = this.InstallationId;
pipeline.UnitId = drpUnit.SelectedValue;
pipeline.UnitWorkId = this.UnitWorkId;
pipeline.PipelineCode = this.txtPipelineCode.Text.Trim();
if (this.drpDetectionRate.SelectedValue != BLL.Const._Null)
{
pipeline.DetectionRateId = this.drpDetectionRate.SelectedValue;
}
else
{
Alert.ShowInTop("请选择探伤比例!");
return;
}
if (this.drpMedium.SelectedValue != BLL.Const._Null)
{
pipeline.MediumId = this.drpMedium.SelectedValue;
}
else
{
Alert.ShowInTop("请选择介质!");
return;
}
if (this.drpPipingClass.SelectedValue != BLL.Const._Null)
{
pipeline.PipingClassId = this.drpPipingClass.SelectedValue;
}
else
{
Alert.ShowInTop("请选择管线等级!");
return;
}
if (this.drpTestMedium.SelectedValue != BLL.Const._Null)
{
pipeline.TestMedium = drpTestMedium.SelectedValue;
}
pipeline.SingleName = this.txtSingleName.Text.Trim();
pipeline.SingleNumber = this.txtSingleNumber.Text.Trim();
if (!string.IsNullOrEmpty(numDesignPress.Text))
{
pipeline.DesignPress = numDesignPress.Text;
}
if (!string.IsNullOrEmpty(numDesignTemperature.Text))
{
pipeline.DesignTemperature = numDesignTemperature.Text;
}
if (!string.IsNullOrEmpty(numTestPressure.Text))
{
pipeline.TestPressure = numTestPressure.Text;
}
if (this.drpDetectionType.SelectedValue != BLL.Const._Null)
{
pipeline.DetectionType = String.Join("|", drpDetectionType.SelectedValueArray);
}
if (this.drpPressurePipingClass.SelectedValue != BLL.Const._Null)
{
pipeline.PressurePipingClassId = drpPressurePipingClass.SelectedValue;
}
if (numPipeLenth.Text != string.Empty)
{
pipeline.PipeLenth = Convert.ToDecimal(numPipeLenth.Text.Trim());
}
if (!string.IsNullOrEmpty(numLeakPressure.Text))
{
pipeline.LeakPressure = numLeakPressure.Text;
}
if (this.drpLeakMedium.SelectedValue != BLL.Const._Null)
{
pipeline.LeakMedium = drpLeakMedium.SelectedValue;
}
if (!string.IsNullOrEmpty(numVacuumPressure.Text))
{
pipeline.VacuumPressure = numVacuumPressure.Text;
}
if (this.drpPCMedium.SelectedValue != BLL.Const._Null)
{
pipeline.PCMedium = drpPCMedium.SelectedValue;
var getTestMediun = Base_TestMediumService.GetTestMediumById(drpPCMedium.SelectedValue);
if (getTestMediun != null)
{
if (getTestMediun.TestType == "4")//判断当前吹洗要求是吹扫还是清洗
{
pipeline.PCtype = "1";
}
else if (getTestMediun.TestType == "5")
{
pipeline.PCtype = "2";
}
}
}
if (this.drpMaterial.SelectedValue != BLL.Const._Null)
{
pipeline.MaterialId = this.drpMaterial.SelectedValue;
}
pipeline.Remark = this.txtRemark.Text.Trim();
dic.Remove(this.PipelineId);
ShowNotify("保存成功!", MessageBoxIcon.Success);
if (ckAll.Checked)
{
PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(PipelineId) + ActiveWindow.GetHidePostBackReference());
}
else
{
PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference("") + ActiveWindow.GetHidePostBackReference());
}
}
#endregion
}
}

View File

@ -0,0 +1,278 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HJGL.DataIn
{
public partial class PipelineInEdit
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// panelCenterRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelCenterRegion;
/// <summary>
/// Toolbar2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// txtPipelineCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtPipelineCode;
/// <summary>
/// drpUnit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpUnit;
/// <summary>
/// txtSingleName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSingleName;
/// <summary>
/// txtSingleNumber 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSingleNumber;
/// <summary>
/// drpMedium 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpMedium;
/// <summary>
/// drpPipingClass 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpPipingClass;
/// <summary>
/// drpDetectionRate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpDetectionRate;
/// <summary>
/// drpDetectionType 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpDetectionType;
/// <summary>
/// numDesignTemperature 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox numDesignTemperature;
/// <summary>
/// numDesignPress 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox numDesignPress;
/// <summary>
/// drpTestMedium 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpTestMedium;
/// <summary>
/// numTestPressure 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox numTestPressure;
/// <summary>
/// drpPressurePipingClass 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpPressurePipingClass;
/// <summary>
/// numPipeLenth 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox numPipeLenth;
/// <summary>
/// drpLeakMedium 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpLeakMedium;
/// <summary>
/// numLeakPressure 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox numLeakPressure;
/// <summary>
/// drpPCMedium 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpPCMedium;
/// <summary>
/// numVacuumPressure 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox numVacuumPressure;
/// <summary>
/// drpMaterial 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpMaterial;
/// <summary>
/// txtRemark 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtRemark;
/// <summary>
/// ckAll 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBox ckAll;
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
.menu-item[data-v-6090802b]:hover{background-color:#f3f4f6!important}.annotation-detail-panel[data-v-6090802b]{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;margin-bottom:16px;overflow:hidden}.panel-header[data-v-6090802b]{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;background:#334155;color:#fff}.close-btn[data-v-6090802b]{background:transparent;border:none;color:#fff;font-size:18px;cursor:pointer;padding:0 4px;line-height:1}.close-btn[data-v-6090802b]:hover{color:#fca5a5}.detail-content[data-v-6090802b]{padding:12px}.detail-row[data-v-6090802b]{display:flex;align-items:center;gap:8px;margin-bottom:10px}.detail-row label[data-v-6090802b]{min-width:70px;font-size:12px;color:#64748b}.detail-row.readonly[data-v-6090802b]{color:#94a3b8;font-size:12px}.detail-row.readonly span[data-v-6090802b]{color:#475569}.label-preview[data-v-6090802b]{flex:1;padding:6px 10px;background:#1e293b;color:#f1f5f9;border-radius:4px;font-family:monospace;font-size:13px;text-align:center}.detail-input[data-v-6090802b]{flex:1;padding:6px 8px;border:1px solid #d1d5db;border-radius:4px;font-size:12px}.detail-input[data-v-6090802b]:focus{outline:none;border-color:#3b82f6;box-shadow:0 0 0 2px #3b82f633}.detail-textarea[data-v-6090802b]{flex:1;padding:6px 8px;border:1px solid #d1d5db;border-radius:4px;font-size:12px;min-height:60px;resize:vertical;font-family:inherit}.detail-textarea[data-v-6090802b]:focus{outline:none;border-color:#3b82f6;box-shadow:0 0 0 2px #3b82f633}.detail-divider[data-v-6090802b]{height:1px;background:#e2e8f0;margin:12px 0}.detail-actions[data-v-6090802b]{display:flex;gap:8px;margin-top:12px}.detail-actions .btn-primary[data-v-6090802b]{flex:1;padding:8px;background:#3b82f6;color:#fff;border:none;border-radius:4px;cursor:pointer;font-size:12px}.detail-actions .btn-primary[data-v-6090802b]:hover{background:#2563eb}.detail-actions .btn-danger[data-v-6090802b]{padding:8px 12px;background:#fee2e2;color:#dc2626;border:1px solid #fecaca;border-radius:4px;cursor:pointer;font-size:12px}.detail-actions .btn-danger[data-v-6090802b]:hover{background:#fecaca}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
.viewer-container[data-v-0899ee83]{display:flex;height:100vh;padding:12px;box-sizing:border-box}.viewer-main[data-v-0899ee83]{flex:1;display:flex;flex-direction:column;border:1px solid var(--border);border-radius:10px;background:var(--panel);box-shadow:0 10px 30px -18px #00000059;padding:8px;box-sizing:border-box}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,3 @@
àRCopyright 1990-2009 Adobe Systems Incorporated.
All rights reserved.
See ./LICENSEáCNS2-H

View File

@ -0,0 +1,3 @@
àRCopyright 1990-2009 Adobe Systems Incorporated.
All rights reserved.
See ./LICENSEá ETen-B5-H` ^

Some files were not shown because too many files have changed in this diff Show More