From 22e86caec349a55c06adb29008500b45aacefd99 Mon Sep 17 00:00:00 2001
From: wendy <408182087@qq.com>
Date: Tue, 23 Apr 2024 16:41:21 +0800
Subject: [PATCH] =?UTF-8?q?20240423=20=E7=BB=BC=E5=90=88=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=E5=AF=BC=E5=85=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../版本日志/SGGLDB_WH_2024-04-23-bwj.sql | 12 +
.../Comprehensive/DesignDetailsService.cs | 1 +
.../GeneralPlanApprovalService.cs | 1 +
.../SiteVisaManagementService.cs | 1 +
.../Comprehensive/TrainingRecordsService.cs | 3 +-
SGGL/BLL/Common/Const.cs | 22 +-
.../DataReceivingDocDataIn.aspx.cs | 9 +-
.../CQMS/Comprehensive/DesignDetails.aspx | 6 +
.../CQMS/Comprehensive/DesignDetails.aspx.cs | 16 +
.../DesignDetails.aspx.designer.cs | 68 +-
.../Comprehensive/DesignDetailsDataIn.aspx | 68 +
.../Comprehensive/DesignDetailsDataIn.aspx.cs | 484 +++++++
.../DesignDetailsDataIn.aspx.designer.cs | 123 ++
.../Comprehensive/GeneralPlanApproval.aspx | 6 +
.../Comprehensive/GeneralPlanApproval.aspx.cs | 16 +
.../GeneralPlanApproval.aspx.designer.cs | 18 +
.../GeneralPlanApprovalDataIn.aspx | 68 +
.../GeneralPlanApprovalDataIn.aspx.cs | 476 +++++++
...GeneralPlanApprovalDataIn.aspx.designer.cs | 123 ++
.../Comprehensive/InspectionTestPlan.aspx | 6 +
.../Comprehensive/InspectionTestPlan.aspx.cs | 16 +-
.../InspectionTestPlan.aspx.designer.cs | 64 +-
.../InspectionTestPlanDataIn.aspx | 68 +
.../InspectionTestPlanDataIn.aspx.cs | 441 ++++++
.../InspectionTestPlanDataIn.aspx.designer.cs | 123 ++
.../CQMS/Comprehensive/ReviewDrawings.aspx | 2 +
.../CQMS/Comprehensive/ReviewDrawings.aspx.cs | 16 +-
.../ReviewDrawings.aspx.designer.cs | 63 +-
.../Comprehensive/ReviewDrawingsDataIn.aspx | 68 +
.../ReviewDrawingsDataIn.aspx.cs | 483 +++++++
.../ReviewDrawingsDataIn.aspx.designer.cs | 123 ++
.../SiteVisaManagementDataIn.aspx.cs | 21 +-
.../Comprehensive/TrainingRecordsDataIn.aspx | 193 +--
.../TrainingRecordsDataIn.aspx.cs | 766 +++++-----
.../TrainingRecordsDataIn.aspx.designer.cs | 180 +--
.../Excel/DataIn/图纸会审记录导入模板.xls | Bin 0 -> 19968 bytes
.../File/Excel/DataIn/培训记录导入模板.xls | Bin 0 -> 19456 bytes
.../File/Excel/DataIn/培训记录导入模板.xlsx | Bin 10425 -> 0 bytes
.../DataIn/施工组织设计及施工方案导入模板.xls | Bin 0 -> 19456 bytes
.../Excel/DataIn/检验试验计划导入模板.xls | Bin 0 -> 19456 bytes
.../Excel/DataIn/现场签证管理导入模板.xls | Bin 19456 -> 19968 bytes
.../File/Excel/DataIn/设计交底导入模板.xls | Bin 0 -> 19456 bytes
SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 32 +
SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user | 2 +-
SGGL/FineUIPro.Web/Web.config | 4 +-
SGGL/Model/Model.cs | 1262 +++++++++++------
SGGL/WebAPI/WebAPI.csproj.user | 2 +-
47 files changed, 4187 insertions(+), 1269 deletions(-)
create mode 100644 DataBase/版本日志/SGGLDB_WH_2024-04-23-bwj.sql
create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsDataIn.aspx
create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsDataIn.aspx.cs
create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsDataIn.aspx.designer.cs
create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalDataIn.aspx
create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalDataIn.aspx.cs
create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalDataIn.aspx.designer.cs
create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlanDataIn.aspx
create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlanDataIn.aspx.cs
create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlanDataIn.aspx.designer.cs
create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsDataIn.aspx
create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsDataIn.aspx.cs
create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsDataIn.aspx.designer.cs
create mode 100644 SGGL/FineUIPro.Web/File/Excel/DataIn/图纸会审记录导入模板.xls
create mode 100644 SGGL/FineUIPro.Web/File/Excel/DataIn/培训记录导入模板.xls
delete mode 100644 SGGL/FineUIPro.Web/File/Excel/DataIn/培训记录导入模板.xlsx
create mode 100644 SGGL/FineUIPro.Web/File/Excel/DataIn/施工组织设计及施工方案导入模板.xls
create mode 100644 SGGL/FineUIPro.Web/File/Excel/DataIn/检验试验计划导入模板.xls
create mode 100644 SGGL/FineUIPro.Web/File/Excel/DataIn/设计交底导入模板.xls
diff --git a/DataBase/版本日志/SGGLDB_WH_2024-04-23-bwj.sql b/DataBase/版本日志/SGGLDB_WH_2024-04-23-bwj.sql
new file mode 100644
index 00000000..226ed803
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_WH_2024-04-23-bwj.sql
@@ -0,0 +1,12 @@
+alter table Comprehensive_TrainingRecords add RemarkCode nvarchar(50)
+alter table Comprehensive_SiteVisaManagement add RemarkCode nvarchar(50)
+alter table Comprehensive_DesignDetails add RemarCode nvarchar(50)
+alter table Inspection_Test_Plan add RemarkCode nvarchar(50)
+alter table Comprehensive_ReviewDrawings add RemarkCode nvarchar(50)
+alter table Comprehensive_GeneralPlanApproval add RemarkCode nvarchar(50)
+alter table Comprehensive_MajorPlanApproval add RemarkCode nvarchar(50)
+alter table Comprehensive_SpecialEquipment add RemarkCode nvarchar(50)
+alter table Comprehensive_PressurePipe add RemarkCode nvarchar(50)
+alter table Comprehensive_QualityAccident add RemarkCode nvarchar(50)
+go
+
diff --git a/SGGL/BLL/CQMS/Comprehensive/DesignDetailsService.cs b/SGGL/BLL/CQMS/Comprehensive/DesignDetailsService.cs
index 0e5ef697..bbb685b6 100644
--- a/SGGL/BLL/CQMS/Comprehensive/DesignDetailsService.cs
+++ b/SGGL/BLL/CQMS/Comprehensive/DesignDetailsService.cs
@@ -141,6 +141,7 @@ namespace BLL
newDesignDetails.Status = designDetails.Status;
newDesignDetails.AuditMan = designDetails.AuditMan;
newDesignDetails.JoinPersonNum = designDetails.JoinPersonNum;
+ newDesignDetails.RemarCode = designDetails.RemarCode;
db.Comprehensive_DesignDetails.InsertOnSubmit(newDesignDetails);
db.SubmitChanges();
diff --git a/SGGL/BLL/CQMS/Comprehensive/GeneralPlanApprovalService.cs b/SGGL/BLL/CQMS/Comprehensive/GeneralPlanApprovalService.cs
index 42c58e2e..649bb780 100644
--- a/SGGL/BLL/CQMS/Comprehensive/GeneralPlanApprovalService.cs
+++ b/SGGL/BLL/CQMS/Comprehensive/GeneralPlanApprovalService.cs
@@ -117,6 +117,7 @@ namespace BLL
newGeneralPlanApproval.CompileMan = generalPlanApproval.CompileMan;
newGeneralPlanApproval.CompileDate = generalPlanApproval.CompileDate;
newGeneralPlanApproval.UnitWorkId = generalPlanApproval.UnitWorkId;
+ newGeneralPlanApproval.RemarkCode = generalPlanApproval.RemarkCode;
db.Comprehensive_GeneralPlanApproval.InsertOnSubmit(newGeneralPlanApproval);
db.SubmitChanges();
}
diff --git a/SGGL/BLL/CQMS/Comprehensive/SiteVisaManagementService.cs b/SGGL/BLL/CQMS/Comprehensive/SiteVisaManagementService.cs
index e30fe577..caf2ce27 100644
--- a/SGGL/BLL/CQMS/Comprehensive/SiteVisaManagementService.cs
+++ b/SGGL/BLL/CQMS/Comprehensive/SiteVisaManagementService.cs
@@ -135,6 +135,7 @@ namespace BLL
newSiteVisaManagement.AuditMan = siteVisaMangement.AuditMan;
newSiteVisaManagement.Remark = siteVisaMangement.Remark;
newSiteVisaManagement.Status = siteVisaMangement.Status;
+ newSiteVisaManagement.RemarkCode = siteVisaMangement.RemarkCode;
db.Comprehensive_SiteVisaManagement.InsertOnSubmit(newSiteVisaManagement);
db.SubmitChanges();
}
diff --git a/SGGL/BLL/CQMS/Comprehensive/TrainingRecordsService.cs b/SGGL/BLL/CQMS/Comprehensive/TrainingRecordsService.cs
index 5131de34..1a13a283 100644
--- a/SGGL/BLL/CQMS/Comprehensive/TrainingRecordsService.cs
+++ b/SGGL/BLL/CQMS/Comprehensive/TrainingRecordsService.cs
@@ -48,7 +48,8 @@ namespace BLL
TrainingAddress = trainingRecords.TrainingAddress,
Hours = trainingRecords.Hours,
KeynoteSpeaker = trainingRecords.KeynoteSpeaker,
- Remark = trainingRecords.Remark
+ Remark = trainingRecords.Remark,
+ RemarkCode = trainingRecords.RemarkCode
};
Funs.DB.Comprehensive_TrainingRecords.InsertOnSubmit(newTraining);
Funs.DB.SubmitChanges();
diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs
index 69a4d707..d6385fae 100644
--- a/SGGL/BLL/Common/Const.cs
+++ b/SGGL/BLL/Common/Const.cs
@@ -3249,12 +3249,32 @@ namespace BLL
///
/// 培训记录导入模板原始虚拟路径
///
- public const string CQMS_TrainingRecordsTemplateUrl= "File\\Excel\\DataIn\\培训记录导入模板.xlsx";
+ public const string CQMS_TrainingRecordsTemplateUrl= "File\\Excel\\DataIn\\培训记录导入模板.xls";
///
/// 质量专项检查模板文件原始虚拟路径
///
public const string JointCheckTempUrl = "File\\Excel\\CQMS\\质量专项检查模版.xlsx";
+
+ ///
+ /// 设计交底导入模板文件原始虚拟路径
+ ///
+ public const string DesignDetailsTemplateUrl = "File\\Excel\\DataIn\\设计交底导入模板.xls";
+
+ ///
+ /// 图纸会审记录导入模板文件原始虚拟路径
+ ///
+ public const string ReviewDrawingsTemplateUrl = "File\\Excel\\DataIn\\图纸会审记录导入模板.xls";
+
+ ///
+ /// 检验试验计划导入模板文件原始虚拟路径
+ ///
+ public const string InspectionTestPlanTemplateUrl = "File\\Excel\\DataIn\\检验试验计划导入模板.xls";
+
+ ///
+ /// 施工组织设计及施工方案导入模板文件原始虚拟路径
+ ///
+ public const string GeneralPlanApprovalTemplateUrl = "File\\Excel\\DataIn\\施工组织设计及施工方案导入模板.xls";
#endregion
#region 绩效考核模板文件路径
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocDataIn.aspx.cs
index bf26116c..3f9394bb 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocDataIn.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocDataIn.aspx.cs
@@ -292,9 +292,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
}
string row12 = pds.Rows[i][12].ToString().Trim();
- if (row12 != "是" && row12 != "否")
+ if (!string.IsNullOrEmpty(row12))
{
- result += (i + 2).ToString() + "," + "是否需回复" + "," + "错误!" + "|";
+ if (row12 != "是" && row12 != "否")
+ {
+ result += (i + 2).ToString() + "," + "是否需回复" + "," + "错误!" + "|";
+ }
}
string row13 = pds.Rows[i][13].ToString().Trim();
@@ -602,7 +605,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
string rootPath = Server.MapPath("~/");
string uploadfilepath = rootPath + Const.CQMS_DataReceivingDocTempUrl;
- string filePath = Const.NCRManagementDataInUrl;
+ string filePath = Const.CQMS_DataReceivingDocTempUrl;
string fileName = Path.GetFileName(filePath);
FileInfo info = new FileInfo(uploadfilepath);
long fileSize = info.Length;
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx
index ba23f186..57482e4c 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx
@@ -26,6 +26,8 @@
+
+
@@ -92,6 +94,10 @@
+
+
+ /// 导入按钮
+ ///
+ ///
+ ///
+ protected void btnImport_Click(object sender, EventArgs e)
+ {
+ PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("DesignDetailsDataIn.aspx", "导入 - ")));
+ }
+ #endregion
}
}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx.designer.cs
index 5e43fac6..aabbb362 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx.designer.cs
@@ -7,13 +7,11 @@
// 自动生成>
//------------------------------------------------------------------------------
-namespace FineUIPro.Web.Comprehensive
-{
-
-
- public partial class DesignDetails
- {
-
+namespace FineUIPro.Web.Comprehensive {
+
+
+ public partial class DesignDetails {
+
///
/// form1 控件。
///
@@ -22,7 +20,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
-
+
///
/// PageManager1 控件。
///
@@ -31,7 +29,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.PageManager PageManager1;
-
+
///
/// Panel1 控件。
///
@@ -40,7 +38,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Panel Panel1;
-
+
///
/// Grid1 控件。
///
@@ -49,7 +47,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Grid Grid1;
-
+
///
/// ToolSearch 控件。
///
@@ -58,7 +56,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Toolbar ToolSearch;
-
+
///
/// sdrpCNProfessionalId 控件。
///
@@ -67,7 +65,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList sdrpCNProfessionalId;
-
+
///
/// btnSearch 控件。
///
@@ -76,7 +74,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnSearch;
-
+
///
/// btnNew 控件。
///
@@ -85,7 +83,16 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnNew;
-
+
+ ///
+ /// btnImport 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnImport;
+
///
/// lblPageIndex 控件。
///
@@ -94,7 +101,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.WebControls.Label lblPageIndex;
-
+
///
/// Label2 控件。
///
@@ -103,7 +110,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.WebControls.Label Label2;
-
+
///
/// Label1 控件。
///
@@ -112,7 +119,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.WebControls.Label Label1;
-
+
///
/// txtStatus 控件。
///
@@ -121,7 +128,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.WebControls.Label txtStatus;
-
+
///
/// lbtnFileUrl 控件。
///
@@ -130,7 +137,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.WebControls.LinkButton lbtnFileUrl;
-
+
///
/// ToolbarText1 控件。
///
@@ -139,7 +146,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.ToolbarText ToolbarText1;
-
+
///
/// ddlPageSize 控件。
///
@@ -148,7 +155,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList ddlPageSize;
-
+
///
/// Window1 控件。
///
@@ -157,7 +164,16 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Window Window1;
-
+
+ ///
+ /// Window2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window Window2;
+
///
/// WindowAtt 控件。
///
@@ -166,7 +182,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Window WindowAtt;
-
+
///
/// Menu1 控件。
///
@@ -175,7 +191,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Menu Menu1;
-
+
///
/// btnMenuModify 控件。
///
@@ -184,7 +200,7 @@ namespace FineUIPro.Web.Comprehensive
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.MenuButton btnMenuModify;
-
+
///
/// btnMenuDel 控件。
///
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsDataIn.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsDataIn.aspx
new file mode 100644
index 00000000..706e6379
--- /dev/null
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsDataIn.aspx
@@ -0,0 +1,68 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DesignDetailsDataIn.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.DesignDetailsDataIn" %>
+
+
+
+
+
+
+ 导入设计交底管理
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsDataIn.aspx.cs
new file mode 100644
index 00000000..6538174f
--- /dev/null
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsDataIn.aspx.cs
@@ -0,0 +1,484 @@
+using BLL;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.OleDb;
+using System.IO;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace FineUIPro.Web.CQMS.Comprehensive
+{
+ public partial class DesignDetailsDataIn : PageBase
+ {
+ #region 定义变量
+ ///
+ /// 上传预设的虚拟路径
+ ///
+ private string initPath = Const.ExcelUrl;
+
+
+ ///
+ /// 错误集合
+ ///
+ public static List errorInfos = new List();
+ #endregion
+
+ #region 加载
+ ///
+ /// 加载页面
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ this.hdCheckResult.Text = string.Empty;
+ this.hdFileName.Text = string.Empty;
+ if (errorInfos != null)
+ {
+ errorInfos.Clear();
+ }
+ }
+ }
+ #endregion
+
+ #region 审核
+ ///
+ /// 审核
+ ///
+ ///
+ ///
+ protected void btnAudit_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (this.fuAttachUrl.HasFile == false)
+ {
+ ShowNotify("请您选择Excel文件!", MessageBoxIcon.Warning);
+ return;
+ }
+ string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower();
+ if (IsXls != ".xls")
+ {
+ ShowNotify("只可以选择Excel文件!", MessageBoxIcon.Warning);
+ return;
+ }
+ if (errorInfos != null)
+ {
+ errorInfos.Clear();
+ }
+ string rootPath = Server.MapPath("~/");
+ string initFullPath = rootPath + initPath;
+ if (!Directory.Exists(initFullPath))
+ {
+ Directory.CreateDirectory(initFullPath);
+ }
+
+ this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls;
+ string filePath = initFullPath + this.hdFileName.Text;
+ this.fuAttachUrl.PostedFile.SaveAs(filePath);
+ ImportXlsToData(rootPath + initPath + this.hdFileName.Text);
+ }
+ catch (Exception ex)
+ {
+ ShowNotify("'" + ex.Message + "'", MessageBoxIcon.Warning);
+ }
+ }
+
+ #region 读Excel提取数据
+ ///
+ /// 从Excel提取数据--》Dataset
+ ///
+ /// Excel文件路径名
+ private void ImportXlsToData(string fileName)
+ {
+ try
+ {
+ string oleDBConnString = String.Empty;
+ oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
+ oleDBConnString += "Data Source=";
+ oleDBConnString += fileName;
+ oleDBConnString += ";Extended Properties=Excel 8.0;";
+ OleDbConnection oleDBConn = null;
+ OleDbDataAdapter oleAdMaster = null;
+ DataTable m_tableName = new DataTable();
+ DataSet ds = new DataSet();
+
+ oleDBConn = new OleDbConnection(oleDBConnString);
+ oleDBConn.Open();
+ m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
+
+ if (m_tableName != null && m_tableName.Rows.Count > 0)
+ {
+
+ m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim();
+
+ }
+ string sqlMaster;
+ sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
+ oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
+ oleAdMaster.Fill(ds, "m_tableName");
+ oleAdMaster.Dispose();
+ oleDBConn.Close();
+ oleDBConn.Dispose();
+
+ AddDatasetToSQL(ds.Tables[0], 8);
+ hdCheckResult.Text = "1";
+ }
+ catch (Exception exc)
+ {
+ Response.Write(exc);
+ //return null;
+ // return dt;
+ }
+ finally
+ {
+ }
+ }
+ #endregion
+
+ #region 将Dataset的数据导入数据库
+ ///
+ /// 将Dataset的数据导入数据库
+ ///
+ /// 数据集
+ /// 数据集行数
+ ///
+ private bool AddDatasetToSQL(DataTable pds, int Cols)
+ {
+ string result = string.Empty;
+ int ic, ir;
+ ic = pds.Columns.Count;
+ if (ic < Cols)
+ {
+ ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning);
+ return false;
+ }
+
+ ir = pds.Rows.Count;
+ if (pds != null && ir > 0)
+ {
+ var oldViewInfos = from x in Funs.DB.Comprehensive_DesignDetails
+ where x.ProjectId == this.CurrUser.LoginProjectId
+ select x;
+
+ var units = from x in Funs.DB.Base_Unit
+ join y in Funs.DB.Project_ProjectUnit on x.UnitId equals y.UnitId
+ where y.ProjectId == this.CurrUser.LoginProjectId
+ select x;
+
+ var cns = from x in Funs.DB.Base_CNProfessional select x;
+
+ var unitWorks = from x in Funs.DB.WBS_UnitWork
+ where x.ProjectId == this.CurrUser.LoginProjectId
+ && x.SuperUnitWork == null
+ select x;
+
+ for (int i = 0; i < ir; i++)
+ {
+ string row0 = pds.Rows[i][0].ToString();
+ if (!string.IsNullOrEmpty(row0))
+ {
+ var cn = cns.Where(x => x.ProfessionalName == row0.Trim()).FirstOrDefault();
+ if (cn == null)
+ {
+ result += (i + 2).ToString() + "," + "专业名称" + "," + "[" + row0 + "]不存在!" + "|";
+ }
+ }
+
+ string row1 = pds.Rows[i][1].ToString();
+ if (string.IsNullOrEmpty(row1))
+ {
+ result += (i + 2).ToString() + "," + "编号" + "," + "此项为必填项!" + "|";
+ }
+
+ string row3 = pds.Rows[i][3].ToString();
+ if (!string.IsNullOrEmpty(row3))
+ {
+ try
+ {
+ DateTime date = Convert.ToDateTime(row3.Trim());
+ }
+ catch (Exception)
+ {
+ result += (i + 2).ToString() + "," + "交底日期" + "," + "[" + row3 + "]错误!" + "|";
+ }
+ }
+
+ string row4 = pds.Rows[i][4].ToString();
+ if (!string.IsNullOrEmpty(row4))
+ {
+ string[] reunit = row4.Split(',');
+ foreach (string unitWork in reunit)
+ {
+ var u = unitWorks.Where(x => x.UnitWorkName == unitWork.Trim()).FirstOrDefault();
+ if (u == null)
+ {
+ result += (i + 2).ToString() + "," + "单位工程名称" + "," + "[" + unitWork.Trim() + "]不存在!" + "|";
+ }
+ }
+ }
+
+ string row5 = pds.Rows[i][5].ToString();
+ if (!string.IsNullOrEmpty(row5))
+ {
+ string[] reunit = row5.Split(',');
+ foreach (string unit in reunit)
+ {
+ var u = units.Where(x => x.UnitName == unit.Trim()).FirstOrDefault();
+ if (u == null)
+ {
+ result += (i + 2).ToString() + "," + "参加单位" + "," + "[" + unit.Trim() + "]不存在!" + "|";
+ }
+ }
+ }
+
+ string row6 = pds.Rows[i][6].ToString();
+ if (!string.IsNullOrEmpty(row6))
+ {
+ try
+ {
+ int d = Convert.ToInt32(row6);
+ }
+ catch (Exception)
+ {
+ result += (i + 2).ToString() + "," + "参加人数" + "," + "[" + row3 + "]错误!" + "|";
+ }
+ }
+
+ string row7 = pds.Rows[i][7].ToString();
+ if (string.IsNullOrEmpty(row7))
+ {
+ result += (i + 2).ToString() + "," + "标志编号" + "," + "此项为必填项!" + "|";
+ }
+ }
+ if (!string.IsNullOrEmpty(result))
+ {
+ result = result.Substring(0, result.LastIndexOf("|"));
+ }
+ errorInfos.Clear();
+ if (!string.IsNullOrEmpty(result))
+ {
+ string results = result;
+ List errorInfoList = results.Split('|').ToList();
+ foreach (var item in errorInfoList)
+ {
+ string[] errors = item.Split(',');
+ Model.ErrorInfo errorInfo = new Model.ErrorInfo();
+ errorInfo.Row = errors[0];
+ errorInfo.Column = errors[1];
+ errorInfo.Reason = errors[2];
+ errorInfos.Add(errorInfo);
+ }
+ if (errorInfos.Count > 0)
+ {
+ this.gvErrorInfo.DataSource = errorInfos;
+ this.gvErrorInfo.DataBind();
+ }
+ }
+ else
+ {
+ ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success);
+ }
+ }
+ else
+ {
+ ShowNotify("导入数据为空!", MessageBoxIcon.Warning);
+ }
+ return true;
+ }
+ #endregion
+ #endregion
+
+ #region 导入
+ ///
+ /// 导入
+ ///
+ ///
+ ///
+ protected void btnImport_Click(object sender, EventArgs e)
+ {
+ if (!string.IsNullOrEmpty(hdCheckResult.Text))
+ {
+ if (errorInfos.Count <= 0)
+ {
+ string rootPath = Server.MapPath("~/");
+ ImportXlsToData2(rootPath + initPath + this.hdFileName.Text);
+ hdCheckResult.Text = string.Empty;
+ ShowNotify("导入成功!", MessageBoxIcon.Success);
+ PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
+ }
+ else
+ {
+ ShowNotify("请先将错误数据修正,再重新导入提交!", MessageBoxIcon.Warning);
+ }
+ }
+ else
+ {
+ ShowNotify("请先审核要导入的文件!", MessageBoxIcon.Warning);
+ }
+ }
+
+ #region Excel提取数据
+ ///
+ /// 从Excel提取数据--》Dataset
+ ///
+ /// Excel文件路径名
+ private void ImportXlsToData2(string fileName)
+ {
+ try
+ {
+ string oleDBConnString = String.Empty;
+ oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
+ oleDBConnString += "Data Source=";
+ oleDBConnString += fileName;
+ oleDBConnString += ";Extended Properties=Excel 8.0;";
+ OleDbConnection oleDBConn = null;
+ OleDbDataAdapter oleAdMaster = null;
+ DataTable m_tableName = new DataTable();
+ DataSet ds = new DataSet();
+
+ oleDBConn = new OleDbConnection(oleDBConnString);
+ oleDBConn.Open();
+ m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
+
+ if (m_tableName != null && m_tableName.Rows.Count > 0)
+ {
+
+ m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim();
+
+ }
+ string sqlMaster;
+ sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
+ oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
+ oleAdMaster.Fill(ds, "m_tableName");
+ oleAdMaster.Dispose();
+ oleDBConn.Close();
+ oleDBConn.Dispose();
+
+ AddDatasetToSQL2(ds.Tables[0], 8);
+ }
+ catch (Exception ex)
+ {
+ throw ex;
+ }
+ }
+ #endregion
+
+ #region 将Dataset的数据导入数据库
+ ///
+ /// 将Dataset的数据导入数据库
+ ///
+ /// 数据集
+ /// 数据集列数
+ ///
+ private bool AddDatasetToSQL2(DataTable pds, int Cols)
+ {
+ int ic, ir;
+ ic = pds.Columns.Count;
+ if (ic < Cols)
+ {
+ ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning);
+ }
+ string result = string.Empty;
+ ir = pds.Rows.Count;
+ if (pds != null && ir > 0)
+ {
+ var oldViewInfos = from x in Funs.DB.Comprehensive_DesignDetails
+ where x.ProjectId == this.CurrUser.LoginProjectId
+ select x;
+
+ var units = from x in Funs.DB.Base_Unit
+ join y in Funs.DB.Project_ProjectUnit on x.UnitId equals y.UnitId
+ where y.ProjectId == this.CurrUser.LoginProjectId
+ select x;
+
+ var cns = from x in Funs.DB.Base_CNProfessional select x;
+
+ var unitWorks = from x in Funs.DB.WBS_UnitWork
+ where x.ProjectId == this.CurrUser.LoginProjectId
+ && x.SuperUnitWork == null
+ select x;
+
+ for (int i = 0; i < ir; i++)
+ {
+ Model.Comprehensive_DesignDetails oldViewInfo = new Model.Comprehensive_DesignDetails();
+ string row0 = pds.Rows[i][0].ToString().Trim();
+ var cn = cns.Where(y => y.ProfessionalName == row0).FirstOrDefault();
+
+ oldViewInfo = oldViewInfos.Where(x => x.RemarCode == pds.Rows[i][7].ToString().Trim()
+ ).FirstOrDefault();
+ if (oldViewInfo == null)
+ {
+ Model.Comprehensive_DesignDetails des = new Model.Comprehensive_DesignDetails();
+ des.DesignDetailsId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DesignDetails));
+ des.ProjectId = this.CurrUser.LoginProjectId;
+ des.CNProfessionalId = cn.CNProfessionalId;
+ des.DesignDetailsCode = pds.Rows[i][1].ToString().Trim();
+ des.DetailsMan = pds.Rows[i][2].ToString().Trim();
+ des.DetailsDate = Funs.GetNewDateTime(pds.Rows[i][3].ToString().Trim());
+ if (!string.IsNullOrEmpty(pds.Rows[i][4].ToString().Trim()))
+ {
+ des.UnitWorkId = BLL.UnitWorkService.GetUnitWorkIdsByUnitWorkNames(this.CurrUser.LoginProjectId, pds.Rows[i][4].ToString().Trim());
+ }
+ if (!string.IsNullOrEmpty(pds.Rows[i][5].ToString().Trim()))
+ {
+ des.UnitName = BLL.UnitService.GetUnitIds(pds.Rows[i][5].ToString().Trim());
+ }
+ des.JoinPersonNum = Funs.GetNewInt(pds.Rows[i][6].ToString().Trim());
+ des.RemarCode = pds.Rows[i][7].ToString().Trim();
+ BLL.DesignDetailsService.AddDesignDetails(des);
+ }
+ }
+ }
+ else
+ {
+ ShowNotify("导入数据为空!", MessageBoxIcon.Warning);
+ }
+ return true;
+ }
+ #endregion
+ #endregion
+
+ #region 下载模板
+ ///
+ /// 下载模板按钮
+ ///
+ ///
+ ///
+ protected void btnDownLoad_Click(object sender, EventArgs e)
+ {
+ PageContext.RegisterStartupScript(Confirm.GetShowReference("确定下载导入模板吗?", String.Empty, MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), PageManager1.GetCustomEventReference("Confirm_Cancel")));
+ }
+
+ ///
+ /// 下载导入模板
+ ///
+ ///
+ ///
+ protected void PageManager1_CustomEvent(object sender, CustomEventArgs e)
+ {
+ if (e.EventArgument == "Confirm_OK")
+ {
+ string rootPath = Server.MapPath("~/");
+ string uploadfilepath = rootPath + Const.DesignDetailsTemplateUrl;
+ string filePath = Const.DesignDetailsTemplateUrl;
+ string fileName = Path.GetFileName(filePath);
+ FileInfo info = new FileInfo(uploadfilepath);
+ long fileSize = info.Length;
+ Response.ClearContent();
+ Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
+ Response.ContentType = "excel/plain";
+ Response.ContentEncoding = System.Text.Encoding.UTF8;
+ Response.AddHeader("Content-Length", fileSize.ToString().Trim());
+ Response.TransmitFile(uploadfilepath, 0, fileSize);
+ Response.End();
+ }
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsDataIn.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsDataIn.aspx.designer.cs
new file mode 100644
index 00000000..423c4e66
--- /dev/null
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsDataIn.aspx.designer.cs
@@ -0,0 +1,123 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.CQMS.Comprehensive {
+
+
+ public partial class DesignDetailsDataIn {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// SimpleForm1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form SimpleForm1;
+
+ ///
+ /// Toolbar2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar2;
+
+ ///
+ /// hdFileName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.HiddenField hdFileName;
+
+ ///
+ /// btnAudit 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnAudit;
+
+ ///
+ /// btnImport 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnImport;
+
+ ///
+ /// btnDownLoad 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnDownLoad;
+
+ ///
+ /// hdCheckResult 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.HiddenField hdCheckResult;
+
+ ///
+ /// fuAttachUrl 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.FileUpload fuAttachUrl;
+
+ ///
+ /// gvErrorInfo 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid gvErrorInfo;
+
+ ///
+ /// lblPageIndex 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label lblPageIndex;
+ }
+}
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApproval.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApproval.aspx
index ac33c112..b7f30a56 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApproval.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApproval.aspx
@@ -32,6 +32,8 @@
+
+
@@ -98,6 +100,10 @@
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
Width="900px" Height="420px">
+
+