From ffa50f752f793712b73a62a3aab65dbd01d5f7e8 Mon Sep 17 00:00:00 2001
From: fly-l <1420031550@qq.com>
Date: Thu, 9 Mar 2023 15:02:06 +0800
Subject: [PATCH] =?UTF-8?q?2023-03-09=20=E5=90=88=E5=90=8C=E5=BD=92?=
=?UTF-8?q?=E6=A1=A3=E4=BF=AE=E6=94=B9=EF=BC=8C=E5=AE=89=E5=85=A8=E9=A6=96?=
=?UTF-8?q?=E9=A1=B5=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
DataBase/版本日志/SUBQHSE_V2023-03-09.sql | 4 +
.../ContractCompile/ContractReviewService.cs | 78 ++++-
.../PHTGL/Filing/ContractFile.aspx | 10 +-
.../PHTGL/Filing/ContractFile.aspx.cs | 8 +
.../Filing/ContractFile.aspx.designer.cs | 4 +-
SGGL/FineUIPro.Web/PHTGL/Filing/Files.aspx | 60 ++--
SGGL/FineUIPro.Web/PHTGL/Filing/Files.aspx.cs | 119 ++++++-
.../PHTGL/Filing/Files.aspx.designer.cs | 17 +-
.../ZHGL/DataSync/HSSEData_HSSE.aspx | 8 +-
.../ZHGL/DataSync/HSSEData_HSSEEdit.aspx | 9 +-
.../ZHGL/DataSync/HSSEData_HSSEEdit.aspx.cs | 306 ++++++++++++++++-
.../HSSEData_HSSEEdit.aspx.designer.cs | 265 +++++++--------
SGGL/FineUIPro.Web/common/Menu_HJGL.xml | 1 -
SGGL/FineUIPro.Web/common/Menu_ZHGL.xml | 1 +
SGGL/FineUIPro.Web/common/mainMenu_HSSE2.aspx | 22 +-
.../common/mainMenu_HSSE2.aspx.cs | 18 +-
.../common/mainMenu_HSSE2.aspx.designer.cs | 10 +-
SGGL/Model/APIItem/HSSEItem.cs | 313 ++++++++++++++++++
SGGL/Model/Model.cs | 24 +-
SGGL/Model/Model.csproj | 1 +
SGGL/Model/ZHGL/DataSync/HSSEDataItem.cs | 6 +-
21 files changed, 1042 insertions(+), 242 deletions(-)
create mode 100644 DataBase/版本日志/SUBQHSE_V2023-03-09.sql
create mode 100644 SGGL/Model/APIItem/HSSEItem.cs
diff --git a/DataBase/版本日志/SUBQHSE_V2023-03-09.sql b/DataBase/版本日志/SUBQHSE_V2023-03-09.sql
new file mode 100644
index 00000000..a511fe18
--- /dev/null
+++ b/DataBase/版本日志/SUBQHSE_V2023-03-09.sql
@@ -0,0 +1,4 @@
+alter table [dbo].[HSSEData_HSSE] alter column [TotalEnergyConsumption] decimal(18,4) null
+alter table [dbo].[HSSEData_HSSE] alter column [IncomeComprehensiveEnergyConsumption] decimal(18,4) null
+alter table [dbo].[HSSEData_HSSE] alter column [NewWaterConsumption] decimal(18,4) null
+go
diff --git a/SGGL/BLL/PHTGL/ContractCompile/ContractReviewService.cs b/SGGL/BLL/PHTGL/ContractCompile/ContractReviewService.cs
index 0275bc1f..9b4b4a14 100644
--- a/SGGL/BLL/PHTGL/ContractCompile/ContractReviewService.cs
+++ b/SGGL/BLL/PHTGL/ContractCompile/ContractReviewService.cs
@@ -618,34 +618,94 @@ namespace BLL
}
- public static void PrintApprovalForm(string ContractReviewId)
+ public static void PrintFileByDocument(Document doc,string name)
+ {
+ string rootPath = Funs.RootPath;
+
+ string newUrl = string.Empty;
+ newUrl = rootPath + "File\\Word\\PHTGL\\合同评审.docx";
+ newUrl = newUrl.Replace(".docx", string.Format("{0:yyyy-MM}", DateTime.Now) + ".docx");
+ if (File.Exists(newUrl))
+ {
+ File.Delete(newUrl);
+ }
+ doc.Save(newUrl);
+ //生成PDF文件
+ string pdfUrl = newUrl.Replace(".docx", ".pdf");
+ Document doc1 = new Aspose.Words.Document(newUrl);
+ //验证参数
+ if (doc1 == null) { throw new Exception("Word文件无效"); }
+ doc1.Save(pdfUrl, Aspose.Words.SaveFormat.Pdf);//还可以改成其它格式
+ string fileName = Path.GetFileName(pdfUrl).Replace("合同评审", name );
+ FileInfo info = new FileInfo(pdfUrl);
+ long fileSize = info.Length;
+ System.Web.HttpContext.Current.Response.Clear();
+ System.Web.HttpContext.Current.Response.ContentType = "application/x-zip-compressed";
+ System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
+ System.Web.HttpContext.Current.Response.AddHeader("Content-Length", fileSize.ToString());
+ System.Web.HttpContext.Current.Response.TransmitFile(pdfUrl, 0, fileSize);
+ System.Web.HttpContext.Current.Response.Flush();
+ System.Web.HttpContext.Current.Response.Close();
+ File.Delete(newUrl);
+ File.Delete(pdfUrl);
+
+ }
+
+ public static void PrintApprovalForm(string ContractReviewId)
{
var ReviewModel = BLL.PHTGL_ContractReviewService.GetPHTGL_ContractReviewById(ContractReviewId);
var getFireWork = BLL.ContractService.GetContractById(ReviewModel.ContractId);
+ Document doc=new Document();
switch (getFireWork.ConfirmWay)
{
case "1":
+ doc = PrintApprovalFormType_SetSub(ContractReviewId);
break;
case "2":
+ doc = PrintApprovalFormType_SetSub(ContractReviewId);
+
break;
case "3":
+ doc = PrintApprovalFormType_SetSub(ContractReviewId);
+
break;
case "4":
+ doc = PrintApprovalFormType_Act(ContractReviewId);
+
break;
case "5":
+ doc = PrintApprovalFormType_Act(ContractReviewId);
+
break;
+ default :
+ doc = PrintApprovalFormType__Con(ContractReviewId);
+ break;
}
+ PrintFileByDocument(doc, getFireWork.ContractNum+ getFireWork.ContractName+ "-合同管理资料");
}
///
/// ConfirmWay 4,5
///
- public static void PrintApprovalFormType_Act()
- {
+ public static Document PrintApprovalFormType_Act(string ContractReviewId)
+ {
+ Model.PHTGL_Contract Contract = new Model.PHTGL_Contract(); //合同信息
+ Model.PHTGL_ActionPlanFormation ActPlan = new Model.PHTGL_ActionPlanFormation(); //实施计划编制信息
+
+ var ReviewModel = BLL.PHTGL_ContractReviewService.GetPHTGL_ContractReviewById(ContractReviewId);
+ Contract = BLL.ContractService.GetContractById(ReviewModel.ContractId);
+ ActPlan = BLL.PHTGL_ActionPlanFormationService.GetPHTGL_ActionPlanFormationByCode(Contract.ActionPlanCode);
+
+
+ var Doc_ActPlan = PHTGL_ActionPlanFormationService.Print(ActPlan.ActionPlanID);
+ var Doc_Contract = Print(ContractReviewId);
+ Doc_ActPlan.AppendDocument(Doc_Contract, ImportFormatMode.UseDestinationStyles);
+
+ return Doc_ActPlan;
}
///
/// ConfirmWay 1,2,3
///
- public static void PrintApprovalFormType_SetSub(string ContractReviewId)
+ public static Document PrintApprovalFormType_SetSub(string ContractReviewId)
{
Model.PHTGL_Contract Contract =new Model.PHTGL_Contract(); //合同信息
@@ -671,10 +731,16 @@ namespace BLL
Doc_ActPlan.AppendDocument(Doc_ApproveUser, ImportFormatMode.UseDestinationStyles);
Doc_ActPlan.AppendDocument(Doc_SetSub, ImportFormatMode.UseDestinationStyles);
Doc_ActPlan.AppendDocument(Doc_Contract, ImportFormatMode.UseDestinationStyles);
-
+ return Doc_ActPlan;
}
- public static void PrintApprovalFormType__Con()
+ public static Document PrintApprovalFormType__Con(string ContractReviewId)
{
+ Model.PHTGL_Contract Contract = new Model.PHTGL_Contract(); //合同信息
+ var ReviewModel = BLL.PHTGL_ContractReviewService.GetPHTGL_ContractReviewById(ContractReviewId);
+ Contract = BLL.ContractService.GetContractById(ReviewModel.ContractId);
+
+ var Doc_Contract = Print(ContractReviewId);
+ return Doc_Contract;
}
///
/// 分包合同协议书
diff --git a/SGGL/FineUIPro.Web/PHTGL/Filing/ContractFile.aspx b/SGGL/FineUIPro.Web/PHTGL/Filing/ContractFile.aspx
index e3d443f1..d4811688 100644
--- a/SGGL/FineUIPro.Web/PHTGL/Filing/ContractFile.aspx
+++ b/SGGL/FineUIPro.Web/PHTGL/Filing/ContractFile.aspx
@@ -23,14 +23,8 @@
-
-
-
-
-
-
-
-
+
+
diff --git a/SGGL/FineUIPro.Web/PHTGL/Filing/ContractFile.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/Filing/ContractFile.aspx.cs
index 4a5ff4d8..439cb7fb 100644
--- a/SGGL/FineUIPro.Web/PHTGL/Filing/ContractFile.aspx.cs
+++ b/SGGL/FineUIPro.Web/PHTGL/Filing/ContractFile.aspx.cs
@@ -20,6 +20,8 @@ namespace FineUIPro.Web.PHTGL.Filing
if (!IsPostBack)
{
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
+ BLL.DepartService.InitDepartDropDownList(this.drpDepartId, false);
+
BindGrid();
}
}
@@ -105,6 +107,12 @@ namespace FineUIPro.Web.PHTGL.Filing
strSql += " AND Con.ContractName LIKE @ContractName";
listStr.Add(new SqlParameter("@ContractName", "%" + this.txtContractName.Text.Trim() + "%"));
}
+ if (!string.IsNullOrEmpty(drpDepartId.SelectedValue))
+ {
+ strSql += " AND Con.DepartId = @DepartId";
+ listStr.Add(new SqlParameter("@DepartId", drpDepartId.SelectedValue));
+
+ }
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count;
diff --git a/SGGL/FineUIPro.Web/PHTGL/Filing/ContractFile.aspx.designer.cs b/SGGL/FineUIPro.Web/PHTGL/Filing/ContractFile.aspx.designer.cs
index 2a972cc1..a06b4836 100644
--- a/SGGL/FineUIPro.Web/PHTGL/Filing/ContractFile.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/PHTGL/Filing/ContractFile.aspx.designer.cs
@@ -60,13 +60,13 @@ namespace FineUIPro.Web.PHTGL.Filing
protected global::FineUIPro.Toolbar Toolbar2;
///
- /// DropDownList1 控件。
+ /// drpDepartId 控件。
///
///
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::FineUIPro.DropDownList DropDownList1;
+ protected global::FineUIPro.DropDownList drpDepartId;
///
/// txtContractName 控件。
diff --git a/SGGL/FineUIPro.Web/PHTGL/Filing/Files.aspx b/SGGL/FineUIPro.Web/PHTGL/Filing/Files.aspx
index 79563de6..ced6c6ab 100644
--- a/SGGL/FineUIPro.Web/PHTGL/Filing/Files.aspx
+++ b/SGGL/FineUIPro.Web/PHTGL/Filing/Files.aspx
@@ -13,9 +13,9 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
-
+
-
-
-
+
+
+
+
+
+
-
+
-
-
-
-
-
+
+
+
+
+ <%--
+
+ --%>
-
+
@@ -81,10 +85,10 @@
Target="Parent" EnableResize="false" runat="server" IsModal="true"
Width="700px" Height="500px">
-
+
+
+