From d22783f08fc4e67d231848f9925deb9c2b5d1830 Mon Sep 17 00:00:00 2001
From: wendy <408182087@qq.com>
Date: Fri, 13 Jun 2025 10:54:16 +0800
Subject: [PATCH] =?UTF-8?q?20250613=20=E8=AF=95=E5=8E=8B=E5=8C=85?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../版本日志/SGGLDB_V2025-06-10-001_bwj.sql | 26 +
SGGL/BLL/Common/Const.cs | 10 +-
.../TestPackage/TestPackageEditService.cs | 52 +-
SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 8 +
.../HJGL/TestPackage/TestPackageEdit.aspx | 2 +
.../HJGL/TestPackage/TestPackageEdit.aspx.cs | 30 +
.../TestPackageEdit.aspx.designer.cs | 9 +
.../HJGL/TestPackage/TestPackageImport.aspx | 154 ++++
.../TestPackage/TestPackageImport.aspx.cs | 761 ++++++++++++++++++
.../TestPackageImport.aspx.designer.cs | 161 ++++
SGGL/Model/Model.cs | 323 ++++++++
11 files changed, 1534 insertions(+), 2 deletions(-)
create mode 100644 DataBase/版本日志/SGGLDB_V2025-06-10-001_bwj.sql
create mode 100644 SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageImport.aspx
create mode 100644 SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageImport.aspx.cs
create mode 100644 SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageImport.aspx.designer.cs
diff --git a/DataBase/版本日志/SGGLDB_V2025-06-10-001_bwj.sql b/DataBase/版本日志/SGGLDB_V2025-06-10-001_bwj.sql
new file mode 100644
index 00000000..f2487412
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_V2025-06-10-001_bwj.sql
@@ -0,0 +1,26 @@
+CREATE VIEW View_TestPackage_PipelineList
+as
+/*********ѹϸ**********/
+select l.PT_PipeId,
+l.PTP_ID,
+l.PipelineId,
+l.TestPressure,
+t.ProjectId,
+t.TestPackageNo,
+t.TestPackageName,
+t.Remark,
+t.UnitWorkId,
+t.Tabler,
+t.TableDate,
+p.PipelineCode,
+uw.UnitWorkCode,
+uw.UnitWorkName,
+uw.UnitId,
+u.UnitCode,
+u.UnitName
+from PTP_PipelineList l
+left join PTP_TestPackage as t on t.PTP_ID=l.PTP_ID
+left join HJGL_Pipeline p on p.PipelineId = l.PipelineId
+left join WBS_UnitWork uw on uw.UnitWorkId = t.UnitWorkId
+left join Base_Unit u on u.UnitId =uw.UnitId
+go
diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs
index 00cd10f3..a7db9083 100644
--- a/SGGL/BLL/Common/Const.cs
+++ b/SGGL/BLL/Common/Const.cs
@@ -3504,6 +3504,11 @@ namespace BLL
/// 施工作业风险导出模板
///
public const string ConstructionRiskOutTemplateUrl = "File\\Excel\\DataOut\\每周施工作业风险动态管控表.xlsx";
+
+ ///
+ /// 试压包导入模板
+ ///
+ public const string TestPackageTemplateUrl = "File\\Excel\\DataIn\\试压包导入模版.xlsx";
#endregion
#region 初始化上传路径
@@ -4806,7 +4811,10 @@ namespace BLL
///
public const string HJGL_ProductionSchedulingPlanPath = "File\\Excel\\DataOut\\排产计划导出模板.xlsx";
-
+ ///
+ /// 试压包导入文件路径
+ ///
+ public static string TestPackageDataImportPath = "FileUpload\\TestPackageDataImport\\";
#region 焊接报表
///
/// 管道焊接工作记录
diff --git a/SGGL/BLL/HJGL/TestPackage/TestPackageEditService.cs b/SGGL/BLL/HJGL/TestPackage/TestPackageEditService.cs
index 4edc35dd..a3314e5e 100644
--- a/SGGL/BLL/HJGL/TestPackage/TestPackageEditService.cs
+++ b/SGGL/BLL/HJGL/TestPackage/TestPackageEditService.cs
@@ -1,4 +1,5 @@
-using System;
+using Model;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.UI.WebControls;
@@ -405,5 +406,54 @@ namespace BLL
return null;
}
+ ///
+ /// 根据试压包号、单位工程获取试压包信息
+ ///
+ ///
+ ///
+ ///
+ public static PTP_TestPackage GetTestPackageByNo(string testPackageNo, string unitWorkId)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.PTP_TestPackage q = null;
+ q = Funs.DB.PTP_TestPackage.FirstOrDefault(x => x.TestPackageNo == testPackageNo && x.UnitWorkId == unitWorkId);
+ return q;
+ }
+
+
+ public static List GetTestPackageByUnitWordId(string unitworkId)
+ {
+ var q = Funs.DB.PTP_TestPackage.Where(e => e.UnitWorkId == unitworkId).ToList();
+ return q;
+ }
+
+
+ public static void DeletePipelineListByUnitWorkId(string unitworkId)
+ {
+ var oldPipeline = GetTestPackageByUnitWordId(unitworkId);
+ if (oldPipeline != null)
+ {
+ foreach (var pipeline in oldPipeline)
+ {
+ DeletePipelineListByPTP_ID(pipeline.PTP_ID);
+ }
+
+ }
+ }
+
+ ///
+ /// 根据单位工程删除相关试压包
+ ///
+ ///
+ public static void DeleteTestPackageByUnitworkId(string unitworkId)
+ {
+ Model.SGGLDB db = Funs.DB;
+ var pipeline = db.PTP_TestPackage.Where(e => e.UnitWorkId == unitworkId);
+ if (pipeline != null)
+ {
+ db.PTP_TestPackage.DeleteAllOnSubmit(pipeline);
+ db.SubmitChanges();
+ }
+ }
}
}
diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
index 0fbcf266..b54734ff 100644
--- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
+++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
@@ -1590,6 +1590,7 @@
+
@@ -10810,6 +10811,13 @@
TestPackageEdit.aspx
+
+ TestPackageImport.aspx
+ ASPXCodeBehind
+
+
+ TestPackageImport.aspx
+
TestPackageItemEdit.aspx
ASPXCodeBehind
diff --git a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageEdit.aspx b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageEdit.aspx
index 9f590f08..7438d6ff 100644
--- a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageEdit.aspx
+++ b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageEdit.aspx
@@ -111,6 +111,8 @@