diff --git a/DataBase/版本日志/SGGLDB_WH_2024-04-16-bwj.sql b/DataBase/版本日志/SGGLDB_WH_2024-04-16-bwj.sql
new file mode 100644
index 00000000..1ebd5691
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_WH_2024-04-16-bwj.sql
@@ -0,0 +1,84 @@
+
+CREATE TABLE [dbo].[Sys_DataInTemp](
+ [TempId] [nvarchar](50) NOT NULL,
+ [ProjectId] [nvarchar](50) NULL,
+ [UserId] [nvarchar](50) NULL,
+ [Time] [datetime] NULL,
+ [RowNo] [int] NULL,
+ [Value1] [nvarchar](100) NULL,
+ [Value2] [nvarchar](100) NULL,
+ [Value3] [nvarchar](100) NULL,
+ [Value4] [nvarchar](100) NULL,
+ [Value5] [nvarchar](100) NULL,
+ [Value6] [nvarchar](100) NULL,
+ [Value7] [nvarchar](100) NULL,
+ [Value8] [nvarchar](100) NULL,
+ [Value9] [nvarchar](100) NULL,
+ [Value10] [nvarchar](100) NULL,
+ [Value11] [nvarchar](100) NULL,
+ [Value12] [nvarchar](100) NULL,
+ [Value13] [nvarchar](100) NULL,
+ [Value14] [nvarchar](100) NULL,
+ [Value15] [nvarchar](100) NULL,
+ [Value16] [nvarchar](100) NULL,
+ [Value17] [nvarchar](100) NULL,
+ [Value18] [nvarchar](100) NULL,
+ [Value19] [nvarchar](100) NULL,
+ [Value20] [nvarchar](100) NULL,
+ [Value21] [nvarchar](100) NULL,
+ [Value22] [nvarchar](100) NULL,
+ [Value23] [nvarchar](100) NULL,
+ [Value24] [nvarchar](100) NULL,
+ [Value25] [nvarchar](100) NULL,
+ [Value26] [nvarchar](100) NULL,
+ [Value27] [nvarchar](100) NULL,
+ [Value28] [nvarchar](100) NULL,
+ [Value29] [nvarchar](100) NULL,
+ [Value30] [nvarchar](100) NULL,
+ [Value31] [nvarchar](100) NULL,
+ [Value32] [nvarchar](100) NULL,
+ [Value33] [nvarchar](100) NULL,
+ [Value34] [nvarchar](100) NULL,
+ [Value35] [nvarchar](100) NULL,
+ [Value36] [nvarchar](100) NULL,
+ [Value37] [nvarchar](100) NULL,
+ [Value38] [nvarchar](100) NULL,
+ [Value39] [nvarchar](100) NULL,
+ [Value40] [nvarchar](100) NULL,
+ [Value41] [nvarchar](100) NULL,
+ [Value42] [nvarchar](100) NULL,
+ [Value43] [nvarchar](100) NULL,
+ [Value44] [nvarchar](100) NULL,
+ [Value45] [nvarchar](100) NULL,
+ [Value46] [nvarchar](100) NULL,
+ [Value47] [nvarchar](100) NULL,
+ [Value48] [nvarchar](100) NULL,
+ [Value49] [nvarchar](100) NULL,
+ [Value50] [nvarchar](100) NULL,
+ [ToopValue] [nvarchar](4000) NULL,
+ [Type] [nvarchar](50) NULL,
+ CONSTRAINT [PK_Sys_DataInTemp] PRIMARY KEY CLUSTERED
+(
+ [TempId] ASC
+)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [dbo].[Sys_DataInTemp] WITH CHECK ADD CONSTRAINT [FK_Sys_DataInTemp_Base_Project] FOREIGN KEY([ProjectId])
+REFERENCES [dbo].[Base_Project] ([ProjectId])
+GO
+
+ALTER TABLE [dbo].[Sys_DataInTemp] CHECK CONSTRAINT [FK_Sys_DataInTemp_Base_Project]
+GO
+
+ALTER TABLE [dbo].[Sys_DataInTemp] WITH CHECK ADD CONSTRAINT [FK_Sys_DataInTemp_Sys_User] FOREIGN KEY([UserId])
+REFERENCES [dbo].[Sys_User] ([UserId])
+GO
+
+ALTER TABLE [dbo].[Sys_DataInTemp] CHECK CONSTRAINT [FK_Sys_DataInTemp_Sys_User]
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Sys_DataInTemp'
+GO
+
+
diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj
index ff413696..a2279f0b 100644
--- a/SGGL/BLL/BLL.csproj
+++ b/SGGL/BLL/BLL.csproj
@@ -181,6 +181,7 @@
+
diff --git a/SGGL/BLL/CQMS/Comprehensive/DataReceivingDocService.cs b/SGGL/BLL/CQMS/Comprehensive/DataReceivingDocService.cs
index 6068958e..9dac14b5 100644
--- a/SGGL/BLL/CQMS/Comprehensive/DataReceivingDocService.cs
+++ b/SGGL/BLL/CQMS/Comprehensive/DataReceivingDocService.cs
@@ -21,6 +21,17 @@ namespace BLL
return Funs.DB.Comprehensive_DataReceivingDoc.FirstOrDefault(e => e.DataReceivingDocId == dataReceivingDocId);
}
+ ///
+ /// 根据编号和名称获取资料收发文登记记录
+ ///
+ ///
+ ///
+ ///
+ public static Model.Comprehensive_DataReceivingDoc GetDataReceivingDocByCodeAndName(string fileCode, string fileName)
+ {
+ return Funs.DB.Comprehensive_DataReceivingDoc.FirstOrDefault(e => e.FileCode == fileCode && e.FileName == fileName);
+ }
+
///
/// 添加资料收发文登记记录
///
diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs
index c42c8498..6d133b12 100644
--- a/SGGL/BLL/Common/Const.cs
+++ b/SGGL/BLL/Common/Const.cs
@@ -3240,6 +3240,11 @@ namespace BLL
/// 新项目质量月报模板文件原始虚拟路径
///
public const string MonthReportNewTemplateUrl = "File\\Word\\CQMS\\项目质量月报.doc";
+
+ ///
+ /// 资料收发文登记记录导入模板原始虚拟路径
+ ///
+ public const string CQMS_DataReceivingDocTempUrl = "File\\Excel\\DataIn\\资料收发文登记记录导入模板.xlsx";
#endregion
#region 绩效考核模板文件路径
diff --git a/SGGL/BLL/Common/Sys_DataTempService.cs b/SGGL/BLL/Common/Sys_DataTempService.cs
new file mode 100644
index 00000000..1b09aa07
--- /dev/null
+++ b/SGGL/BLL/Common/Sys_DataTempService.cs
@@ -0,0 +1,266 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BLL
+{
+ ///
+ /// 导入到临时表
+ ///
+ public class Sys_DataTempService
+ {
+ ///
+ /// 根据主键获取导入临时表信息
+ ///
+ /// Id
+ ///
+ public static Model.Sys_DataInTemp GetDataInTempByTempId(string tempId)
+ {
+ return Funs.DB.Sys_DataInTemp.FirstOrDefault(x => x.TempId == tempId);
+ }
+
+ ///
+ /// 增加导入临时表记录
+ ///
+ /// 委托实体
+ public static void AddDataInTemp(Model.Sys_DataInTemp dataInTemp)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.Sys_DataInTemp newDataInTemp = new Model.Sys_DataInTemp();
+ newDataInTemp.TempId = dataInTemp.TempId;
+ newDataInTemp.ProjectId = dataInTemp.ProjectId;
+ newDataInTemp.UserId = dataInTemp.UserId;
+ newDataInTemp.Time = dataInTemp.Time;
+ newDataInTemp.RowNo = dataInTemp.RowNo;
+ newDataInTemp.Type = dataInTemp.Type;
+ newDataInTemp.Value1 = dataInTemp.Value1;
+ newDataInTemp.Value2 = dataInTemp.Value2;
+ newDataInTemp.Value3 = dataInTemp.Value3;
+ newDataInTemp.Value4 = dataInTemp.Value4;
+ newDataInTemp.Value5 = dataInTemp.Value5;
+ newDataInTemp.Value6 = dataInTemp.Value6;
+ newDataInTemp.Value7 = dataInTemp.Value7;
+ newDataInTemp.Value8 = dataInTemp.Value8;
+ newDataInTemp.Value9 = dataInTemp.Value9;
+ newDataInTemp.Value10 = dataInTemp.Value10;
+ newDataInTemp.Value11 = dataInTemp.Value11;
+ newDataInTemp.Value12 = dataInTemp.Value12;
+ newDataInTemp.Value13 = dataInTemp.Value13;
+ newDataInTemp.Value14 = dataInTemp.Value14;
+ newDataInTemp.Value15 = dataInTemp.Value15;
+ newDataInTemp.Value16 = dataInTemp.Value16;
+ newDataInTemp.Value17 = dataInTemp.Value17;
+ newDataInTemp.Value18 = dataInTemp.Value18;
+ newDataInTemp.Value19 = dataInTemp.Value19;
+ newDataInTemp.Value20 = dataInTemp.Value20;
+ newDataInTemp.Value21 = dataInTemp.Value21;
+ newDataInTemp.Value22 = dataInTemp.Value22;
+ newDataInTemp.Value23 = dataInTemp.Value23;
+ newDataInTemp.Value24 = dataInTemp.Value24;
+ newDataInTemp.Value25 = dataInTemp.Value25;
+ newDataInTemp.Value26 = dataInTemp.Value26;
+ newDataInTemp.Value27 = dataInTemp.Value27;
+ newDataInTemp.Value28 = dataInTemp.Value28;
+ newDataInTemp.Value29 = dataInTemp.Value29;
+ newDataInTemp.Value30 = dataInTemp.Value30;
+ newDataInTemp.Value31 = dataInTemp.Value31;
+ newDataInTemp.Value32 = dataInTemp.Value32;
+ newDataInTemp.Value33 = dataInTemp.Value33;
+ newDataInTemp.Value34 = dataInTemp.Value34;
+ newDataInTemp.Value35 = dataInTemp.Value35;
+ newDataInTemp.Value36 = dataInTemp.Value36;
+ newDataInTemp.Value37 = dataInTemp.Value37;
+ newDataInTemp.Value38 = dataInTemp.Value38;
+ newDataInTemp.Value39 = dataInTemp.Value39;
+ newDataInTemp.Value40 = dataInTemp.Value40;
+ newDataInTemp.Value41 = dataInTemp.Value41;
+ newDataInTemp.Value42 = dataInTemp.Value42;
+ newDataInTemp.Value43 = dataInTemp.Value43;
+ newDataInTemp.Value44 = dataInTemp.Value44;
+ newDataInTemp.Value45 = dataInTemp.Value45;
+ newDataInTemp.Value46 = dataInTemp.Value46;
+ newDataInTemp.Value47 = dataInTemp.Value47;
+ newDataInTemp.Value48 = dataInTemp.Value48;
+ newDataInTemp.Value49 = dataInTemp.Value49;
+ newDataInTemp.Value50 = dataInTemp.Value50;
+
+
+ newDataInTemp.ToopValue = dataInTemp.ToopValue;
+ db.Sys_DataInTemp.InsertOnSubmit(newDataInTemp);
+ db.SubmitChanges();
+ }
+
+
+ public static void AddDataInTemp(List dataInTemps)
+ {
+ Model.SGGLDB db = Funs.DB;
+ foreach (var dataInTemp in dataInTemps)
+ {
+ Model.Sys_DataInTemp newDataInTemp = new Model.Sys_DataInTemp();
+ newDataInTemp.TempId = dataInTemp.TempId;
+ newDataInTemp.ProjectId = dataInTemp.ProjectId;
+ newDataInTemp.UserId = dataInTemp.UserId;
+ newDataInTemp.Time = dataInTemp.Time;
+ newDataInTemp.RowNo = dataInTemp.RowNo;
+ newDataInTemp.Type = dataInTemp.Type;
+ newDataInTemp.Value1 = dataInTemp.Value1;
+ newDataInTemp.Value2 = dataInTemp.Value2;
+ newDataInTemp.Value3 = dataInTemp.Value3;
+ newDataInTemp.Value4 = dataInTemp.Value4;
+ newDataInTemp.Value5 = dataInTemp.Value5;
+ newDataInTemp.Value6 = dataInTemp.Value6;
+ newDataInTemp.Value7 = dataInTemp.Value7;
+ newDataInTemp.Value8 = dataInTemp.Value8;
+ newDataInTemp.Value9 = dataInTemp.Value9;
+ newDataInTemp.Value10 = dataInTemp.Value10;
+ newDataInTemp.Value11 = dataInTemp.Value11;
+ newDataInTemp.Value12 = dataInTemp.Value12;
+ newDataInTemp.Value13 = dataInTemp.Value13;
+ newDataInTemp.Value14 = dataInTemp.Value14;
+ newDataInTemp.Value15 = dataInTemp.Value15;
+ newDataInTemp.Value16 = dataInTemp.Value16;
+ newDataInTemp.Value17 = dataInTemp.Value17;
+ newDataInTemp.Value18 = dataInTemp.Value18;
+ newDataInTemp.Value19 = dataInTemp.Value19;
+ newDataInTemp.Value20 = dataInTemp.Value20;
+ newDataInTemp.Value21 = dataInTemp.Value21;
+ newDataInTemp.Value22 = dataInTemp.Value22;
+ newDataInTemp.Value23 = dataInTemp.Value23;
+ newDataInTemp.Value24 = dataInTemp.Value24;
+ newDataInTemp.Value25 = dataInTemp.Value25;
+ newDataInTemp.Value26 = dataInTemp.Value26;
+ newDataInTemp.Value27 = dataInTemp.Value27;
+ newDataInTemp.Value28 = dataInTemp.Value28;
+ newDataInTemp.Value29 = dataInTemp.Value29;
+ newDataInTemp.Value30 = dataInTemp.Value30;
+ newDataInTemp.Value31 = dataInTemp.Value31;
+ newDataInTemp.Value32 = dataInTemp.Value32;
+ newDataInTemp.Value33 = dataInTemp.Value33;
+ newDataInTemp.Value34 = dataInTemp.Value34;
+ newDataInTemp.Value35 = dataInTemp.Value35;
+ newDataInTemp.Value36 = dataInTemp.Value36;
+ newDataInTemp.Value37 = dataInTemp.Value37;
+ newDataInTemp.Value38 = dataInTemp.Value38;
+ newDataInTemp.Value39 = dataInTemp.Value39;
+ newDataInTemp.Value40 = dataInTemp.Value40;
+ newDataInTemp.Value41 = dataInTemp.Value41;
+ newDataInTemp.Value42 = dataInTemp.Value42;
+ newDataInTemp.Value43 = dataInTemp.Value43;
+ newDataInTemp.Value44 = dataInTemp.Value44;
+ newDataInTemp.Value45 = dataInTemp.Value45;
+ newDataInTemp.Value46 = dataInTemp.Value46;
+ newDataInTemp.Value47 = dataInTemp.Value47;
+ newDataInTemp.Value48 = dataInTemp.Value48;
+ newDataInTemp.Value49 = dataInTemp.Value49;
+ newDataInTemp.Value50 = dataInTemp.Value50;
+
+ newDataInTemp.ToopValue = dataInTemp.ToopValue;
+ db.Sys_DataInTemp.InsertOnSubmit(newDataInTemp);
+ }
+ db.SubmitChanges();
+ }
+
+
+
+ ///
+ /// 修改导入临时表记录
+ ///
+ /// 焊接实体
+ public static void UpdateDataInTemp(Model.Sys_DataInTemp dataInTemp)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.Sys_DataInTemp newDataInTemp = db.Sys_DataInTemp.FirstOrDefault(e => e.TempId == dataInTemp.TempId);
+ if (newDataInTemp != null)
+ {
+ newDataInTemp.UserId = dataInTemp.UserId;
+ newDataInTemp.Time = dataInTemp.Time;
+ newDataInTemp.Value1 = dataInTemp.Value1;
+ newDataInTemp.Value2 = dataInTemp.Value2;
+ newDataInTemp.Value3 = dataInTemp.Value3;
+ newDataInTemp.Value4 = dataInTemp.Value4;
+ newDataInTemp.Value5 = dataInTemp.Value5;
+ newDataInTemp.Value6 = dataInTemp.Value6;
+ newDataInTemp.Value7 = dataInTemp.Value7;
+ newDataInTemp.Value8 = dataInTemp.Value8;
+ newDataInTemp.Value9 = dataInTemp.Value9;
+ newDataInTemp.Value10 = dataInTemp.Value10;
+ newDataInTemp.Value11 = dataInTemp.Value11;
+ newDataInTemp.Value12 = dataInTemp.Value12;
+ newDataInTemp.Value13 = dataInTemp.Value13;
+ newDataInTemp.Value14 = dataInTemp.Value14;
+ newDataInTemp.Value15 = dataInTemp.Value15;
+ newDataInTemp.Value16 = dataInTemp.Value16;
+ newDataInTemp.Value17 = dataInTemp.Value17;
+ newDataInTemp.Value18 = dataInTemp.Value18;
+ newDataInTemp.Value19 = dataInTemp.Value19;
+ newDataInTemp.Value20 = dataInTemp.Value20;
+ newDataInTemp.Value21 = dataInTemp.Value21;
+ newDataInTemp.Value22 = dataInTemp.Value22;
+ newDataInTemp.Value23 = dataInTemp.Value23;
+ newDataInTemp.Value24 = dataInTemp.Value24;
+ newDataInTemp.Value25 = dataInTemp.Value25;
+ newDataInTemp.Value26 = dataInTemp.Value26;
+ newDataInTemp.Value27 = dataInTemp.Value27;
+ newDataInTemp.Value28 = dataInTemp.Value28;
+ newDataInTemp.Value29 = dataInTemp.Value29;
+ newDataInTemp.Value30 = dataInTemp.Value30;
+ newDataInTemp.Value31 = dataInTemp.Value31;
+ newDataInTemp.Value32 = dataInTemp.Value32;
+ newDataInTemp.Value33 = dataInTemp.Value33;
+ newDataInTemp.Value34 = dataInTemp.Value34;
+ newDataInTemp.Value35 = dataInTemp.Value35;
+ newDataInTemp.Value36 = dataInTemp.Value36;
+ newDataInTemp.Value37 = dataInTemp.Value37;
+ newDataInTemp.Value38 = dataInTemp.Value38;
+ newDataInTemp.Value39 = dataInTemp.Value39;
+ newDataInTemp.Value40 = dataInTemp.Value40;
+ newDataInTemp.Value41 = dataInTemp.Value41;
+ newDataInTemp.Value42 = dataInTemp.Value42;
+ newDataInTemp.Value43 = dataInTemp.Value43;
+ newDataInTemp.Value44 = dataInTemp.Value44;
+ newDataInTemp.Value45 = dataInTemp.Value45;
+ newDataInTemp.Value46 = dataInTemp.Value46;
+ newDataInTemp.Value47 = dataInTemp.Value47;
+ newDataInTemp.Value48 = dataInTemp.Value48;
+ newDataInTemp.Value49 = dataInTemp.Value49;
+ newDataInTemp.Value50 = dataInTemp.Value50;
+ newDataInTemp.ToopValue = dataInTemp.ToopValue;
+ newDataInTemp.Type = dataInTemp.Type;
+ db.SubmitChanges();
+ }
+ }
+
+ ///
+ /// 根据主键删除导入临时表记录
+ ///
+ /// 委托主键
+ public static void DeleteDataInTempByDataInTempID(string tempId)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.Sys_DataInTemp dataInTemp = db.Sys_DataInTemp.FirstOrDefault(e => e.TempId == tempId);
+ if (dataInTemp != null)
+ {
+ db.Sys_DataInTemp.DeleteOnSubmit(dataInTemp);
+ db.SubmitChanges();
+ }
+ }
+
+ ///
+ /// 根据项目用户主键删除导入临时表记录
+ ///
+ ///
+ ///
+ public static void DeleteDataInTempByProjectIdUserId(string projectId, string userId, string type)
+ {
+ Model.SGGLDB db = Funs.DB;
+ var dataInTemp = from x in db.Sys_DataInTemp where x.ProjectId == projectId && x.UserId == userId && x.Type == type select x;
+ if (dataInTemp.Count() > 0)
+ {
+ db.Sys_DataInTemp.DeleteAllOnSubmit(dataInTemp);
+ db.SubmitChanges();
+ }
+ }
+ }
+}
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDoc.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDoc.aspx
index 19171c07..02d5d8a7 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDoc.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDoc.aspx
@@ -32,8 +32,8 @@
- <%--
- --%>
+
+
@@ -154,10 +154,10 @@
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
Width="1024px" Height="550px">
- <%--
- --%>
+ Width="1024px" Height="560px">
+
<%--
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDoc.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDoc.aspx.cs
index 097e7a42..ca189fce 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDoc.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDoc.aspx.cs
@@ -210,12 +210,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
///
///
///
- //protected void btnImport_Click(object sender, EventArgs e)
- //{
- // PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("DataReceivingDocDataIn.aspx", "导入 - ")));
- //}
+ protected void btnImport_Click(object sender, EventArgs e)
+ {
+ PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("DataReceivingDocDataIn.aspx", "导入 - ")));
+ }
#endregion
-
+
#region 格式化字符串
///
/// 获取单位名称
@@ -313,10 +313,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
this.btnMenuDel.Hidden = false;
}
- //if (buttonList.Contains(BLL.Const.BtnSave))
- //{
- // this.btnImport.Hidden = false;
- //}
+ if (buttonList.Contains(BLL.Const.BtnSave))
+ {
+ this.btnImport.Hidden = false;
+ }
}
}
#endregion
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDoc.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDoc.aspx.designer.cs
index 37d92463..f68eca34 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDoc.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDoc.aspx.designer.cs
@@ -93,6 +93,15 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
///
protected global::FineUIPro.Button btnNew;
+ ///
+ /// btnImport 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnImport;
+
///
/// lblPageIndex 控件。
///
@@ -156,6 +165,15 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
///
protected global::FineUIPro.Window Window1;
+ ///
+ /// Window2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window Window2;
+
///
/// Menu1 控件。
///
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocDataIn.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocDataIn.aspx
new file mode 100644
index 00000000..d8c41fa8
--- /dev/null
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocDataIn.aspx
@@ -0,0 +1,205 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DataReceivingDocDataIn.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.DataReceivingDocDataIn" %>
+
+
+
+
+
+
+ 导入资料收发文登记记录
+
+
+
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocDataIn.aspx.cs
new file mode 100644
index 00000000..dc38a99d
--- /dev/null
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocDataIn.aspx.cs
@@ -0,0 +1,695 @@
+using BLL;
+using Model;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.SqlClient;
+using System.IO;
+using System.Linq;
+using System.Threading;
+
+namespace FineUIPro.Web.CQMS.Comprehensive
+{
+ public partial class DataReceivingDocDataIn : PageBase
+ {
+ #region 定义项
+ ///
+ /// 上传预设的虚拟路径
+ ///
+ private string initPath = Const.ExcelUrl;
+
+ ///
+ /// 错误集合
+ ///
+ public static string errorInfos = string.Empty;
+
+ #endregion
+
+ #region 加载
+ ///
+ /// 加载页面
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ if (percent == null)
+ {
+ percent = new Dictionary();
+ }
+ this.id.Text = this.CurrUser.UserId;
+ this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
+ // 绑定表格
+ this.BindGrid();
+ }
+ else if (GetRequestEventArgument() == "reloadGrid")
+ {
+ BindGrid();
+ }
+ }
+ #endregion
+
+ #region 绑定数据
+ ///
+ /// 绑定数据
+ ///
+ private void BindGrid()
+ {
+ string strSql = @"SELECT TempId,ProjectId,UserId,Time,RowNo,ToopValue,Value1,Value2,Value3,Value4,Value5,Value6,Value7,Value8,Value9,Value10"
+ + @" ,Value11,Value12,Value13,Value14,Value15,Value16,Value17,Value18,Value19,Value20,Value21,Value22,Value23,Value24,Value25,Value26,Value27,Value28,Value29,Value30"
+ + @" ,Value31,Value32,Value33,Value34,Value35,Value36,Value37,Value38,Value39,Value40,Value41,Value42,Value43,Value44,Value45,Value46,Value47,Value48,Value49,Value50,ToopValue,Type"
+ + @" FROM Sys_DataInTemp "
+ + @" WHERE ProjectId=@ProjectId AND UserId=@UserId AND Type=@Type";
+ List listStr = new List();
+ listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
+ listStr.Add(new SqlParameter("@UserId", this.CurrUser.UserId));
+ listStr.Add(new SqlParameter("@Type", "DataReceivingDoc"));//资料收发文登记记录
+ SqlParameter[] parameter = listStr.ToArray();
+ DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
+ Grid1.RecordCount = tb.Rows.Count;
+ var table = this.GetPagedDataTable(Grid1, tb);
+ Grid1.DataSource = table;
+ Grid1.DataBind();
+
+ var dataInTempAll = from x in Funs.DB.Sys_DataInTemp
+ where x.ProjectId == this.CurrUser.LoginProjectId && x.UserId == this.CurrUser.UserId && x.Type == "DataReceivingDoc"
+ select x;
+ for (int i = 0; i < Grid1.Rows.Count; i++)
+ {
+ var dataInTemp = dataInTempAll.FirstOrDefault(x => x.TempId == Grid1.Rows[i].DataKeys[0].ToString());
+ if (dataInTemp != null)
+ {
+ if (!string.IsNullOrEmpty(dataInTemp.ToopValue))
+ {
+ Grid1.Rows[i].RowCssClass = "red";
+ }
+ }
+ }
+ var errData = from x in dataInTempAll where x.ToopValue != null select x;
+ this.lbDataCout.Text = errData.Count().ToString();
+ }
+ #endregion
+
+ #region 双击事件
+ ///
+ /// Grid行双击事件
+ ///
+ ///
+ ///
+ 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.UserId, Const.DataReceivingDocMenuId, Const.BtnSave))
+ {
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DataReceivingDocDataInEdit.aspx?TempId={0}", Grid1.SelectedRowID, "维护 - ")));
+ }
+ else
+ {
+ ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
+ }
+ }
+ #endregion
+
+ #region 导入信息 维护
+ ///
+ /// 导入信息编辑
+ ///
+ ///
+ ///
+ protected void btnMenuEdit_Click(object sender, EventArgs e)
+ {
+ if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.DataReceivingDocMenuId, BLL.Const.BtnSave))
+ {
+ if (Grid1.SelectedRowIndexArray.Length == 0)
+ {
+ Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
+ return;
+ }
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DataReceivingDocDataInEdit.aspx?TempId={0}", Grid1.SelectedRowID, "维护 - ")));
+ }
+ else
+ {
+ ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
+ }
+ }
+
+ ///
+ /// 删除按钮
+ ///
+ ///
+ ///
+ protected void btnMenuDelete_Click(object sender, EventArgs e)
+ {
+ if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.DataReceivingDocMenuId, Const.BtnSave))
+ {
+ if (Grid1.SelectedRowIndexArray.Length == 0)
+ {
+ Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
+ return;
+ }
+ foreach (int rowIndex in Grid1.SelectedRowIndexArray)
+ {
+ string rowID = Grid1.DataKeys[rowIndex][0].ToString();
+ BLL.Sys_DataTempService.DeleteDataInTempByDataInTempID(rowID);
+ }
+ ShowNotify("删除成功!", MessageBoxIcon.Success);
+ this.BindGrid();
+ }
+ else
+ {
+ Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
+ return;
+ }
+ }
+ #endregion
+
+ #region 分页 排序
+ ///
+ /// 分页
+ ///
+ ///
+ ///
+ protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
+ {
+ BindGrid();
+ }
+
+ ///
+ /// 分页显示条数下拉框
+ ///
+ ///
+ ///
+ protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
+ BindGrid();
+ }
+
+ ///
+ /// 排序
+ ///
+ ///
+ ///
+ protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
+ {
+ BindGrid();
+ }
+ #endregion
+
+ #region 删除所有数据事件
+ ///
+ /// 删除所有数据事件
+ ///
+ ///
+ ///
+ protected void btnAllDelete_Click(object sender, EventArgs e)
+ {
+ if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.DataReceivingDocMenuId, Const.BtnSave))
+ {
+ //先删除临时表中 该人员以前导入的数据
+ BLL.Sys_DataTempService.DeleteDataInTempByProjectIdUserId(this.CurrUser.LoginProjectId, this.CurrUser.UserId, "DataReceivingDoc");
+ this.BindGrid();
+ ShowNotify("删除成功!", MessageBoxIcon.Success);
+ this.lbDataCout.Text = string.Empty;
+ }
+ else
+ {
+ Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
+ return;
+ }
+ }
+ #endregion
+
+ #region 下载模板
+ ///
+ /// 下载模板
+ ///
+ ///
+ ///
+ protected void imgbtnUpload_Click(object sender, EventArgs e)
+ {
+ this.TemplateUpload(BLL.Const.CQMS_DataReceivingDocTempUrl);
+ }
+
+ protected void TemplateUpload(string initTemplatePath)
+ {
+ string rootPath = Server.MapPath("~/");
+ string uploadfilepath = rootPath + initTemplatePath;
+ string filePath = Const.CQMS_DataReceivingDocTempUrl;
+ 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();
+ }
+
+ ///
+ /// 导入说明
+ ///
+ ///
+ ///
+ //protected void lkAchievements_Click(object sender, EventArgs e)
+ //{
+ // this.TemplateUpload(Const.CQMS_DataReceivingDocTempUrl);
+ //}
+ #endregion
+
+ #region 进度条
+ public static Dictionary percent { get; set; }
+ public static Dictionary url { get; set; }
+
+ [System.Web.Services.WebMethod]
+ public static int getPercent(string id)
+ {
+ return percent[id];
+ }
+ #endregion
+
+ #region 文件上传
+ ///
+ /// 文件上传
+ ///
+ ///
+ ///
+ protected void imgbtnImport_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (this.FileExcel.HasFile == false)
+ {
+ ShowNotify("请选择Excel文件!", MessageBoxIcon.Warning);
+ return;
+ }
+ string IsXls = Path.GetExtension(this.FileExcel.FileName).ToString().Trim().ToLower();
+ if (IsXls != ".xls" && IsXls != ".xlsx")
+ {
+ ShowNotify("只能选择Excel文件!", MessageBoxIcon.Warning);
+ return;
+ }
+ 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.FileExcel.PostedFile.SaveAs(filePath);
+ //文件上传服务器后的名称
+ string fileName = rootPath + initPath + this.hdfileName.Text;
+ //读取Excel
+ DataSet ds = NPOIHelper.ExcelToDataSet(fileName, out errorInfos, true);
+ //验证Excel读取是否有误
+ if (!string.IsNullOrEmpty(errorInfos))
+ {
+ ShowNotify(errorInfos, MessageBoxIcon.Warning);
+ return;
+ }
+
+ if (ds.Tables.Count > 0)
+ {
+ for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
+ {
+ Sys_DataInTemp newDataInTemp = new Sys_DataInTemp();
+ newDataInTemp.TempId = SQLHelper.GetNewID(typeof(Model.Sys_DataInTemp));
+ newDataInTemp.ProjectId = this.CurrUser.LoginProjectId;
+ newDataInTemp.UserId = this.CurrUser.UserId;
+ newDataInTemp.Time = System.DateTime.Now;
+ newDataInTemp.Type = "DataReceivingDoc";
+ newDataInTemp.RowNo = i + 2;
+ newDataInTemp.Value1 = ds.Tables[0].Rows[i]["日期"].ToString().Trim();
+ newDataInTemp.Value2 = ds.Tables[0].Rows[i]["文件号"].ToString().Trim();
+ newDataInTemp.Value3 = ds.Tables[0].Rows[i]["文件名称"].ToString().Trim();
+ newDataInTemp.Value4 = ds.Tables[0].Rows[i]["文件类别"].ToString().Trim();
+ newDataInTemp.Value5 = ds.Tables[0].Rows[i]["专业"].ToString().Trim();
+ newDataInTemp.Value6 = ds.Tables[0].Rows[i]["发件单位"].ToString().Trim();
+ newDataInTemp.Value7 = ds.Tables[0].Rows[i]["发件人"].ToString().Trim();
+ newDataInTemp.Value8 = ds.Tables[0].Rows[i]["份数"].ToString().Trim();
+ newDataInTemp.Value9 = ds.Tables[0].Rows[i]["文件处理人"].ToString().Trim();
+ newDataInTemp.Value10 = ds.Tables[0].Rows[i]["发出日期"].ToString().Trim();
+ newDataInTemp.Value11 = ds.Tables[0].Rows[i]["接收单位"].ToString().Trim();
+ newDataInTemp.Value12 = ds.Tables[0].Rows[i]["接收人"].ToString().Trim();
+ newDataInTemp.Value13 = ds.Tables[0].Rows[i]["是否需回复"].ToString().Trim();
+ newDataInTemp.Value14 = ds.Tables[0].Rows[i]["返回五环日期"].ToString().Trim();
+ newDataInTemp.Value15 = ds.Tables[0].Rows[i]["返回五环份数"].ToString().Trim();
+ newDataInTemp.Value16 = ds.Tables[0].Rows[i]["下发至单位"].ToString().Trim();
+ newDataInTemp.Value17 = ds.Tables[0].Rows[i]["下发份数"].ToString().Trim();
+ newDataInTemp.Value18 = ds.Tables[0].Rows[i]["下发单位接收人"].ToString().Trim();
+ newDataInTemp.Value19 = ds.Tables[0].Rows[i]["是否存档"].ToString().Trim();
+
+ BLL.Sys_DataTempService.AddDataInTemp(newDataInTemp);
+ }
+ this.BindGrid();
+ ShowNotify("数据已导入临时表!", MessageBoxIcon.Success);
+ }
+ else
+ {
+ ShowNotify("无数据!", MessageBoxIcon.Warning);
+ return;
+ }
+ }
+ catch (Exception ex)
+ {
+ Alert.ShowInTop("'" + ex.Message + "'", MessageBoxIcon.Warning);
+ }
+ }
+ #endregion
+
+ #region 保存审核事件
+ ///
+ /// 保存审核事件
+ ///
+ ///
+ ///
+ protected void btnSave_Click(object sender, EventArgs e)
+ {
+ Thread t = new Thread(new ThreadStart(() => { btnSaveMethod(this.CurrUser.LoginProjectId, this.CurrUser.UserId); }));
+ t.Start();
+ if (percent.ContainsKey(this.CurrUser.UserId))
+ {
+ percent[CurrUser.UserId] = 0;
+ }
+ else
+ {
+ percent.Add(CurrUser.UserId, 0);
+ }
+ PageContext.RegisterStartupScript("printX()");
+ }
+ protected void btnRefresh_Click(object sender, EventArgs e)
+ {
+ this.BindGrid();
+ }
+
+ protected void btnSaveMethod(string LoginProjectId, string UserId)
+ {
+ 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 == LoginProjectId
+ select x;
+ var cNProfessionals = from x in Funs.DB.Base_CNProfessional select x;//专业
+
+ var dataInTemp = from x in Funs.DB.Sys_DataInTemp
+ where x.ProjectId == LoginProjectId && x.UserId == UserId && x.Type == "DataReceivingDoc"
+ select x;
+ int okCount = 0;
+ int i = 0;
+ int ir = dataInTemp.Count();
+ string erreMessage = "";
+ foreach (var tempData in dataInTemp)
+ {
+ if (tempData != null)
+ {
+ i++;
+ percent[UserId] = (int)(100 * i / ir);
+ string errInfo = string.Empty;
+ var isExitValue = Funs.DB.Comprehensive_DataReceivingDoc.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.FileCode == tempData.Value2
+ && x.FileName == tempData.Value3);
+ if (isExitValue == null || this.ckUpdate.Checked)
+ {
+ Model.Comprehensive_DataReceivingDoc newData = new Model.Comprehensive_DataReceivingDoc();
+ if (!string.IsNullOrEmpty(tempData.Value1.Trim()))
+ {
+ try
+ {
+ newData.ReceiveDate = Funs.GetNewDateTime(tempData.Value1.Trim());
+ }
+ catch (Exception)
+ {
+ errInfo += "日期格式不正确;";
+ }
+ }
+ else
+ {
+ errInfo += "日期为必填项;";
+ }
+
+ if (!string.IsNullOrEmpty(tempData.Value2.Trim()))
+ {
+ newData.FileCode = tempData.Value2.Trim();
+ }
+ else
+ {
+ errInfo += "文件号为必填项;";
+ }
+ if (!string.IsNullOrEmpty(tempData.Value3.Trim()))
+ {
+ newData.FileName = tempData.Value3.Trim();
+ }
+ else
+ {
+ errInfo += "文件名称为必填项;";
+ }
+ if (!string.IsNullOrEmpty(tempData.Value4.Trim()))
+ {
+ newData.FileType = tempData.Value4.Trim();
+ }
+ else
+ {
+ errInfo += "文件类别为必填项;";
+ }
+ if (!string.IsNullOrEmpty(tempData.Value5.Trim()))
+ {
+ var professional = cNProfessionals.FirstOrDefault(e => e.ProfessionalName == tempData.Value5.Trim());
+ if (professional != null)
+ {
+ newData.CNProfessionalId = professional.CNProfessionalId;
+ }
+ else
+ {
+ errInfo += "专业不存在;";
+ }
+ }
+ else
+ {
+ errInfo += "专业为必填项;";
+ }
+ if (!string.IsNullOrEmpty(tempData.Value6.Trim()))
+ {
+ var unit = units.FirstOrDefault(e => e.UnitName == tempData.Value6.Trim());
+ if (unit != null)
+ {
+ newData.SendUnit = unit.UnitId;
+ }
+ else
+ {
+ errInfo += "发件单位不存在;";
+ }
+ }
+ else
+ {
+ errInfo += "发件单位为必填项;";
+ }
+ if (!string.IsNullOrEmpty(tempData.Value7.Trim()))//发件人
+ {
+ newData.SendMan = tempData.Value7.Trim();
+ }
+ else
+ {
+ errInfo += "发件人为必填项;";
+ }
+ if (!string.IsNullOrEmpty(tempData.Value8.Trim()))//份数
+ {
+ try
+ {
+ newData.Copies = Funs.GetNewInt(tempData.Value8.Trim());
+ }
+ catch (Exception)
+ {
+ errInfo += "份数格式不正确;";
+ }
+ }
+ else
+ {
+ errInfo += "份数为必填项;";
+ }
+ if (!string.IsNullOrEmpty(tempData.Value9.Trim())) //文件处理人
+ {
+ newData.DocumentHandler = tempData.Value9.Trim();
+ }
+ if (!string.IsNullOrEmpty(tempData.Value10.Trim())) //发出日期
+ {
+ try
+ {
+ newData.SendDate = Funs.GetNewDateTime(tempData.Value10.Trim());
+ }
+ catch (Exception)
+ {
+ errInfo += "发出日期格式不正确;";
+ }
+ }
+ if (!string.IsNullOrEmpty(tempData.Value11.Trim()))//接收单位
+ {
+ string unitList = string.Empty;
+ List lists = tempData.Value11.Trim().Split(',').ToList();
+ if (lists.Count > 0)
+ {
+ foreach (var item in lists)
+ {
+ var unit = units.FirstOrDefault(x => x.UnitName == item.Trim());
+ if (unit != null)
+ {
+ unitList += unit.UnitId + ",";
+ }
+ else
+ {
+ errInfo += "接收单位不存在;";
+ }
+ }
+ if (!string.IsNullOrEmpty(unitList))
+ {
+ newData.ReceiveUnit = unitList.Substring(0, unitList.LastIndexOf(","));
+ }
+ }
+ }
+ if (!string.IsNullOrEmpty(tempData.Value12.Trim()))//接收人
+ {
+ newData.ReceiveMan = tempData.Value12.Trim();
+ }
+ if (tempData.Value13.Trim() == "是") //是否需回复
+ {
+ newData.IsReply = true;
+ }
+ else
+ {
+ newData.IsReply = false;
+ }
+ if (!string.IsNullOrEmpty(tempData.Value14.Trim())) //返回五环日期
+ {
+ try
+ {
+ newData.ReturnWuhuangDate = Funs.GetNewDateTime(tempData.Value14.Trim());
+ }
+ catch (Exception)
+ {
+ errInfo += "返回五环日期格式不正确;";
+ }
+ }
+ if (!string.IsNullOrEmpty(tempData.Value15.Trim()))//返回五环份数
+ {
+ try
+ {
+ newData.RetrunWuhuangCopies = Funs.GetNewInt(tempData.Value15.Trim());
+ }
+ catch (Exception)
+ {
+ errInfo += "返回五环份数格式不正确;";
+ }
+ }
+ if (!string.IsNullOrEmpty(tempData.Value16.Trim()))//下发至单位
+ {
+ string unitLists = string.Empty;
+ List lists = tempData.Value16.Trim().Split(',').ToList();
+ if (lists.Count > 0)
+ {
+ foreach (var item in lists)
+ {
+ var unit = units.FirstOrDefault(x => x.UnitName == item.Trim());
+ if (unit != null)
+ {
+ unitLists += unit.UnitId + ",";
+ }
+ else
+ {
+ errInfo += "下发至单位不存在;";
+ }
+ }
+ if (!string.IsNullOrEmpty(unitLists))
+ {
+ newData.IssueToUnit = unitLists.Substring(0, unitLists.LastIndexOf(","));
+ }
+ }
+ }
+ if (!string.IsNullOrEmpty(tempData.Value17.Trim())) //下发份数
+ {
+ try
+ {
+ newData.IssueCopies = Funs.GetNewInt(tempData.Value17.Trim());
+ }
+ catch (Exception)
+ {
+ errInfo += "下发份数格式不正确;";
+ }
+ }
+ if (!string.IsNullOrEmpty(tempData.Value18.Trim()))//下发单位接收人
+ {
+ newData.IssueUnitReceiver = tempData.Value18.Trim();
+ }
+ if (!string.IsNullOrEmpty(tempData.Value19.Trim())) //是否存档
+ {
+ if (tempData.Value19.Trim() == "是")
+ {
+ newData.IsOnFile = true;
+ }
+ else
+ {
+ newData.IsOnFile = false;
+ }
+ }
+ if (string.IsNullOrEmpty(errInfo)) ////所有信息正确的话 这插入管线焊口
+ {
+ newData.ProjectId = this.CurrUser.LoginProjectId;
+
+ var data = BLL.DataReceivingDocService.GetDataReceivingDocByCodeAndName(newData.FileCode, newData.FileName);
+ if (data == null)
+ {
+ newData.DataReceivingDocId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DataReceivingDoc));
+ BLL.DataReceivingDocService.AddDataReceivingDoc(newData);
+ }
+ else
+ {
+ newData.DataReceivingDocId = data.DataReceivingDocId;
+ BLL.DataReceivingDocService.UpdateDataReceivingDoc(newData);
+ }
+
+ BLL.Sys_DataTempService.DeleteDataInTempByDataInTempID(tempData.TempId);
+ okCount++;
+ }
+ }
+ else
+ {
+ errInfo = "该条记录已存在于资料收发文登记记录表中。";
+ }
+
+ if (!string.IsNullOrEmpty(errInfo))
+ {
+ tempData.ToopValue = errInfo;
+ BLL.Sys_DataTempService.UpdateDataInTemp(tempData);
+ erreMessage += errInfo + ";";
+ }
+ }
+ }
+ }
+ #endregion
+
+ #region 导出按钮
+ /// 导出按钮
+ ///
+ ///
+ ///
+ protected void btnOut_Click(object sender, EventArgs e)
+ {
+ Response.ClearContent();
+ string filename = Funs.GetNewFileName();
+ Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("资料收发文登记记录导入模板" + filename, System.Text.Encoding.UTF8) + ".xlsx");
+ Response.ContentType = "application/excel";
+ Response.ContentEncoding = System.Text.Encoding.UTF8;
+ Response.Write(GetGridTableHtml(Grid1));
+ Response.End();
+ }
+ #endregion
+ }
+}
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocDataIn.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocDataIn.aspx.designer.cs
new file mode 100644
index 00000000..f0af2d6c
--- /dev/null
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocDataIn.aspx.designer.cs
@@ -0,0 +1,267 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.CQMS.Comprehensive {
+
+
+ public partial class DataReceivingDocDataIn {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// id 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.HiddenField id;
+
+ ///
+ /// Panel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel1;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// hdfileName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.HiddenField hdfileName;
+
+ ///
+ /// FileExcel 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.FileUpload FileExcel;
+
+ ///
+ /// imgbtnImport 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button imgbtnImport;
+
+ ///
+ /// ToolbarFill1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarFill ToolbarFill1;
+
+ ///
+ /// ckUpdate 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.CheckBox ckUpdate;
+
+ ///
+ /// btnSave 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSave;
+
+ ///
+ /// btnRefresh 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnRefresh;
+
+ ///
+ /// btnAllDelete 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnAllDelete;
+
+ ///
+ /// btnOut 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnOut;
+
+ ///
+ /// imgbtnUpload 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button imgbtnUpload;
+
+ ///
+ /// Grid1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid1;
+
+ ///
+ /// lblPageIndex 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label lblPageIndex;
+
+ ///
+ /// ToolbarSeparator1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
+
+ ///
+ /// ToolbarText1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarText ToolbarText1;
+
+ ///
+ /// ddlPageSize 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList ddlPageSize;
+
+ ///
+ /// lbDataCout 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label lbDataCout;
+
+ ///
+ /// Window1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window Window1;
+
+ ///
+ /// Window2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window Window2;
+
+ ///
+ /// ContentPanel3 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ContentPanel ContentPanel3;
+
+ ///
+ /// Menu1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Menu Menu1;
+
+ ///
+ /// btnMenuEdit 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnMenuEdit;
+
+ ///
+ /// btnMenuDelete 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnMenuDelete;
+
+ ///
+ /// ScriptManager2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.ScriptManager ScriptManager2;
+ }
+}
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocDataInEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocDataInEdit.aspx
new file mode 100644
index 00000000..3eb9f78e
--- /dev/null
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocDataInEdit.aspx
@@ -0,0 +1,94 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DataReceivingDocDataInEdit.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.DataReceivingDocDataInEdit" %>
+
+
+
+
+
+
+ 编辑导入资料收发文登记记录
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocDataInEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocDataInEdit.aspx.cs
new file mode 100644
index 00000000..01bab778
--- /dev/null
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocDataInEdit.aspx.cs
@@ -0,0 +1,347 @@
+using BLL;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace FineUIPro.Web.CQMS.Comprehensive
+{
+ public partial class DataReceivingDocDataInEdit : PageBase
+ {
+ #region 定义项
+ ///
+ /// 临时表主键
+ ///
+ public string TempId
+ {
+ get
+ {
+ return (string)ViewState["TempId"];
+ }
+ set
+ {
+ ViewState["TempId"] = value;
+ }
+ }
+ #endregion
+
+ #region 加载页面
+ ///
+ /// 加载页面
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ this.TempId = Request.Params["TempId"];
+ this.txtValue1.Focus();
+ var dataInTemp = BLL.Sys_DataTempService.GetDataInTempByTempId(this.TempId);
+ if (dataInTemp != null)
+ {
+ this.txtValue1.Text = dataInTemp.Value1;
+ this.txtValue2.Text = dataInTemp.Value2;
+ this.txtValue3.Text = dataInTemp.Value3;
+ this.txtValue4.Text = dataInTemp.Value4;
+ this.txtValue5.Text = dataInTemp.Value5;
+ this.txtValue6.Text = dataInTemp.Value6;
+ this.txtValue7.Text = dataInTemp.Value7;
+ this.txtValue8.Text = dataInTemp.Value8;
+ this.txtValue9.Text = dataInTemp.Value9;
+ this.txtValue10.Text = dataInTemp.Value10;
+ this.txtValue11.Text = dataInTemp.Value11;
+ this.txtValue12.Text = dataInTemp.Value12;
+ this.txtValue13.Text = dataInTemp.Value13;
+ this.txtValue14.Text = dataInTemp.Value14;
+ this.txtValue15.Text = dataInTemp.Value15;
+ this.txtValue16.Text = dataInTemp.Value16;
+ this.txtValue17.Text = dataInTemp.Value17;
+ this.txtValue18.Text = dataInTemp.Value18;
+ this.txtValue19.Text = dataInTemp.Value19;
+
+ this.lbErrCout.Text = dataInTemp.ToopValue;
+ }
+ }
+ }
+ #endregion
+
+ #region 保存按钮
+ ///
+ /// 保存按钮
+ ///
+ ///
+ ///
+ protected void btnSave_Click(object sender, EventArgs e)
+ {
+ var dataInTemp = BLL.Sys_DataTempService.GetDataInTempByTempId(this.TempId);
+ if (this.ckAll.Checked)
+ {
+ var allDataInTemp = from x in Funs.DB.Sys_DataInTemp where x.ProjectId == this.CurrUser.LoginProjectId && x.UserId == this.CurrUser.UserId select x;
+ if (dataInTemp.Value1 != this.txtValue1.Text.Trim())
+ {
+ var tempValue1 = allDataInTemp.Where(x => x.Value1 == dataInTemp.Value1 || (x.Value1 == null && dataInTemp.Value1 == null));
+ if (tempValue1 != null)
+ {
+ foreach (var item in tempValue1)
+ {
+ item.Value1 = this.txtValue1.Text.Trim();
+ Funs.DB.SubmitChanges();
+ }
+ }
+ }
+ if (dataInTemp.Value2 != this.txtValue2.Text.Trim())
+ {
+ var tempValue2 = allDataInTemp.Where(x => x.Value2 == dataInTemp.Value2 || (x.Value2 == null && dataInTemp.Value2 == null));
+ if (tempValue2 != null)
+ {
+ foreach (var item in tempValue2)
+ {
+ item.Value2 = this.txtValue2.Text.Trim();
+ Funs.DB.SubmitChanges();
+ }
+ }
+ }
+ if (dataInTemp.Value3 != this.txtValue3.Text.Trim())
+ {
+ var tempValue3 = allDataInTemp.Where(x => x.Value3 == dataInTemp.Value3 || (x.Value3 == null && dataInTemp.Value3 == null));
+ if (tempValue3 != null)
+ {
+ foreach (var item in tempValue3)
+ {
+ item.Value3 = this.txtValue3.Text.Trim();
+ Funs.DB.SubmitChanges();
+ }
+ }
+ }
+ if (dataInTemp.Value5 != this.txtValue5.Text.Trim())
+ {
+ var tempValue5 = allDataInTemp.Where(x => x.Value5 == dataInTemp.Value5 || (x.Value5 == null && dataInTemp.Value5 == null));
+ if (tempValue5 != null)
+ {
+ foreach (var item in tempValue5)
+ {
+ item.Value5 = this.txtValue5.Text.Trim();
+ Funs.DB.SubmitChanges();
+ }
+ }
+ }
+ if (dataInTemp.Value6 != this.txtValue6.Text.Trim())
+ {
+ var tempValue6 = allDataInTemp.Where(x => x.Value6 == dataInTemp.Value6 || (x.Value6 == null && dataInTemp.Value6 == null));
+ if (tempValue6 != null)
+ {
+ foreach (var item in tempValue6)
+ {
+ item.Value6 = this.txtValue6.Text.Trim();
+ Funs.DB.SubmitChanges();
+ }
+ }
+ }
+ if (dataInTemp.Value7 != this.txtValue7.Text.Trim())
+ {
+ var tempValue7 = allDataInTemp.Where(x => x.Value7 == dataInTemp.Value7 || (x.Value7 == null && dataInTemp.Value7 == null));
+ if (tempValue7 != null)
+ {
+ foreach (var item in tempValue7)
+ {
+ item.Value7 = this.txtValue7.Text.Trim();
+ Funs.DB.SubmitChanges();
+ }
+ }
+ }
+ if (dataInTemp.Value8 != this.txtValue8.Text.Trim())
+ {
+ var tempValue8 = allDataInTemp.Where(x => x.Value8 == dataInTemp.Value8 || (x.Value8 == null && dataInTemp.Value8 == null));
+ if (tempValue8 != null)
+ {
+ foreach (var item in tempValue8)
+ {
+ item.Value8 = this.txtValue8.Text.Trim();
+ Funs.DB.SubmitChanges();
+ }
+ }
+ }
+ if (dataInTemp.Value9 != this.txtValue9.Text.Trim())
+ {
+ var tempValue9 = allDataInTemp.Where(x => x.Value9 == dataInTemp.Value9 || (x.Value9 == null && dataInTemp.Value9 == null));
+ if (tempValue9 != null)
+ {
+ foreach (var item in tempValue9)
+ {
+ item.Value9 = this.txtValue9.Text.Trim();
+ Funs.DB.SubmitChanges();
+ }
+ }
+ }
+ if (dataInTemp.Value10 != this.txtValue10.Text.Trim())
+ {
+ var tempValue10 = allDataInTemp.Where(x => x.Value10 == dataInTemp.Value10 || (x.Value10 == null && dataInTemp.Value10 == null));
+ if (tempValue10 != null)
+ {
+ foreach (var item in tempValue10)
+ {
+ item.Value10 = this.txtValue10.Text.Trim();
+ Funs.DB.SubmitChanges();
+ }
+ }
+ }
+ if (dataInTemp.Value11 != this.txtValue11.Text.Trim())
+ {
+ var tempValue11 = allDataInTemp.Where(x => x.Value11 == dataInTemp.Value11 || (x.Value11 == null && dataInTemp.Value11 == null));
+ if (tempValue11 != null)
+ {
+ foreach (var item in tempValue11)
+ {
+ item.Value11 = this.txtValue11.Text.Trim();
+ Funs.DB.SubmitChanges();
+ }
+ }
+ }
+ if (dataInTemp.Value12 != this.txtValue12.Text.Trim())
+ {
+ var tempValue12 = allDataInTemp.Where(x => x.Value12 == dataInTemp.Value12 || (x.Value12 == null && dataInTemp.Value12 == null));
+ if (tempValue12 != null)
+ {
+ foreach (var item in tempValue12)
+ {
+ item.Value12 = this.txtValue12.Text.Trim();
+ Funs.DB.SubmitChanges();
+ }
+ }
+ }
+ if (dataInTemp.Value13 != this.txtValue13.Text.Trim())
+ {
+ var tempValue13 = allDataInTemp.Where(x => x.Value13 == dataInTemp.Value13 || (x.Value13 == null && dataInTemp.Value13 == null));
+ if (tempValue13 != null)
+ {
+ foreach (var item in tempValue13)
+ {
+ item.Value13 = this.txtValue13.Text.Trim();
+ Funs.DB.SubmitChanges();
+ }
+ }
+ }
+ if (dataInTemp.Value14 != this.txtValue14.Text.Trim())
+ {
+ var tempValue14 = allDataInTemp.Where(x => x.Value14 == dataInTemp.Value14 || (x.Value14 == null && dataInTemp.Value14 == null));
+ if (tempValue14 != null)
+ {
+ foreach (var item in tempValue14)
+ {
+ item.Value14 = this.txtValue14.Text.Trim();
+ Funs.DB.SubmitChanges();
+ }
+ }
+ }
+ if (dataInTemp.Value15 != this.txtValue15.Text.Trim())
+ {
+ var tempValue15 = allDataInTemp.Where(x => x.Value15 == dataInTemp.Value15 || (x.Value15 == null && dataInTemp.Value15 == null));
+ if (tempValue15 != null)
+ {
+ foreach (var item in tempValue15)
+ {
+ item.Value15 = this.txtValue15.Text.Trim();
+ Funs.DB.SubmitChanges();
+ }
+ }
+ }
+ if (dataInTemp.Value16 != this.txtValue16.Text.Trim())
+ {
+ var tempValue16 = allDataInTemp.Where(x => x.Value16 == dataInTemp.Value16 || (x.Value16 == null && dataInTemp.Value16 == null));
+ if (tempValue16 != null)
+ {
+ foreach (var item in tempValue16)
+ {
+ item.Value16 = this.txtValue16.Text.Trim();
+ Funs.DB.SubmitChanges();
+ }
+ }
+ }
+ if (dataInTemp.Value17 != this.txtValue17.Text.Trim())
+ {
+ var tempValue17 = allDataInTemp.Where(x => x.Value17 == dataInTemp.Value17 || (x.Value17 == null && dataInTemp.Value17 == null));
+ if (tempValue17 != null)
+ {
+ foreach (var item in tempValue17)
+ {
+ item.Value17 = this.txtValue17.Text.Trim();
+ Funs.DB.SubmitChanges();
+ }
+ }
+ }
+ if (dataInTemp.Value18 != this.txtValue18.Text.Trim())
+ {
+ var tempValue18 = allDataInTemp.Where(x => x.Value18 == dataInTemp.Value18 || (x.Value18 == null && dataInTemp.Value18 == null));
+ if (tempValue18 != null)
+ {
+ foreach (var item in tempValue18)
+ {
+ item.Value18 = this.txtValue18.Text.Trim();
+ Funs.DB.SubmitChanges();
+ }
+ }
+ }
+ if (dataInTemp.Value19 != this.txtValue19.Text.Trim())
+ {
+ var tempValue19 = allDataInTemp.Where(x => x.Value19 == dataInTemp.Value19 || (x.Value19 == null && dataInTemp.Value19 == null));
+ if (tempValue19 != null)
+ {
+ foreach (var item in tempValue19)
+ {
+ item.Value19 = this.txtValue19.Text.Trim();
+ Funs.DB.SubmitChanges();
+ }
+ }
+ }
+ var toopValue = allDataInTemp.Where(x => x.ToopValue == dataInTemp.ToopValue);
+ if (toopValue != null)
+ {
+ foreach (var item in toopValue)
+ {
+ item.ToopValue = null;
+ Funs.DB.SubmitChanges();
+ }
+ }
+ }
+ else
+ {
+ Model.Sys_DataInTemp newDataInTemp = new Model.Sys_DataInTemp();
+ newDataInTemp.ProjectId = this.CurrUser.LoginProjectId;
+ newDataInTemp.UserId = this.CurrUser.UserId;
+ newDataInTemp.Time = System.DateTime.Now;
+ newDataInTemp.Type = dataInTemp.Type;
+ newDataInTemp.Value1 = this.txtValue1.Text.Trim();
+ newDataInTemp.Value2 = this.txtValue2.Text.Trim();
+ newDataInTemp.Value3 = this.txtValue3.Text.Trim();
+ newDataInTemp.Value4 = this.txtValue4.Text.Trim();
+ newDataInTemp.Value5 = this.txtValue5.Text.Trim();
+ newDataInTemp.Value6 = this.txtValue6.Text.Trim();
+ newDataInTemp.Value7 = this.txtValue7.Text.Trim();
+ newDataInTemp.Value8 = this.txtValue8.Text.Trim();
+ newDataInTemp.Value9 = this.txtValue9.Text.Trim();
+ newDataInTemp.Value10 = this.txtValue10.Text.Trim();
+ newDataInTemp.Value11 = this.txtValue11.Text.Trim();
+ newDataInTemp.Value12 = this.txtValue12.Text.Trim();
+ newDataInTemp.Value13 = this.txtValue13.Text.Trim();
+ newDataInTemp.Value14 = this.txtValue14.Text.Trim();
+ newDataInTemp.Value15 = this.txtValue15.Text.Trim();
+ newDataInTemp.Value16 = this.txtValue16.Text.Trim();
+ newDataInTemp.Value17 = this.txtValue17.Text.Trim();
+ newDataInTemp.Value18 = this.txtValue18.Text.Trim();
+ newDataInTemp.Value19 = this.txtValue19.Text.Trim();
+ if (!string.IsNullOrEmpty(this.TempId))
+ {
+ newDataInTemp.TempId = this.TempId;
+ newDataInTemp.ToopValue = null;
+ BLL.Sys_DataTempService.UpdateDataInTemp(newDataInTemp);
+ }
+ }
+ ShowNotify("信息修改完成!", MessageBoxIcon.Success);
+ PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocDataInEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocDataInEdit.aspx.designer.cs
new file mode 100644
index 00000000..a3820a97
--- /dev/null
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocDataInEdit.aspx.designer.cs
@@ -0,0 +1,258 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.CQMS.Comprehensive {
+
+
+ public partial class DataReceivingDocDataInEdit {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// SimpleForm1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form SimpleForm1;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// ToolbarFill1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarFill ToolbarFill1;
+
+ ///
+ /// btnSave 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSave;
+
+ ///
+ /// txtValue1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtValue1;
+
+ ///
+ /// txtValue2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtValue2;
+
+ ///
+ /// txtValue3 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtValue3;
+
+ ///
+ /// txtValue4 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtValue4;
+
+ ///
+ /// txtValue5 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtValue5;
+
+ ///
+ /// txtValue6 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtValue6;
+
+ ///
+ /// txtValue7 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtValue7;
+
+ ///
+ /// txtValue8 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtValue8;
+
+ ///
+ /// txtValue9 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtValue9;
+
+ ///
+ /// txtValue10 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtValue10;
+
+ ///
+ /// txtValue11 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtValue11;
+
+ ///
+ /// txtValue12 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtValue12;
+
+ ///
+ /// txtValue13 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtValue13;
+
+ ///
+ /// txtValue14 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtValue14;
+
+ ///
+ /// txtValue15 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtValue15;
+
+ ///
+ /// txtValue16 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtValue16;
+
+ ///
+ /// txtValue17 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtValue17;
+
+ ///
+ /// txtValue18 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtValue18;
+
+ ///
+ /// txtValue19 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtValue19;
+
+ ///
+ /// ckAll 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.CheckBox ckAll;
+
+ ///
+ /// lbErrCout 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextArea lbErrCout;
+ }
+}
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx
index c75baf46..653c6db2 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx
@@ -65,7 +65,12 @@
-
+
+
+
+
+
+
@@ -83,7 +88,7 @@
-
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.cs
index 5abfa10e..0b4321f5 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.cs
@@ -83,12 +83,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
this.ddlProblem.SelectedValue = nCRManagement.Problem;
}
- this.txtMeasure.Text = nCRManagement.Measure;
+ this.txtMeasure.Text = nCRManagement.Measure;
+
this.txtResponsibleMan.Text = nCRManagement.ResponsibleMan;
- this.txtImplementationFrontState.Text = nCRManagement.ImplementationFrontState;
-
-
+ //this.txtImplementationFrontState.Text = nCRManagement.ImplementationFrontState;
+ this.ddlImplementationFrontState.SelectedValue = nCRManagement.ImplementationFrontState;
+
var currApprove = NCRManagementApproveService.GetCurrentApprove(nCRManagement.NCRManagementId);
if (currApprove != null)
{
@@ -142,7 +143,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
this.txtCompleteDate.Readonly = true;
this.drpCNProfessionalId.Readonly = true;
this.txtContents.Readonly = true;
- this.txtImplementationFrontState.Readonly = true;
+ this.ddlImplementationFrontState.Readonly = true;
this.txtIssuedDate.Readonly = true;
this.txtNCRCode.Readonly = true;
this.txtResponsibleMan.Readonly = true;
@@ -237,7 +238,9 @@ namespace FineUIPro.Web.CQMS.Comprehensive
nCRManagement.CompleteDate = Convert.ToDateTime(this.txtCompleteDate.Text);
}
nCRManagement.ResponsibleMan = this.txtResponsibleMan.Text.Trim();
- nCRManagement.ImplementationFrontState = this.txtImplementationFrontState.Text.Trim();
+ nCRManagement.ImplementationFrontState = this.ddlImplementationFrontState.SelectedValue.Trim();
+
+
string ids = string.Empty;
var lists = this.drpUnitWorkIds.SelectedValueArray;
foreach (var item in lists)
@@ -272,6 +275,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
nCRManagement.NCRManagementId = SQLHelper.GetNewID(typeof(Model.Comprehensive_NCRManagement));
this.hdAttachUrl.Text = nCRManagement.NCRManagementId;
}
+ var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == nCRManagement.NCRManagementId);
+ if (sour == null || string.IsNullOrEmpty(sour.AttachUrl))
+ {
+ Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning);
+ return;
+ }
nCRManagement.CompileMan = this.CurrUser.UserId;
nCRManagement.Status = BLL.Const.Comprehensive_Compile;
BLL.NCRManagementService.AddNCRManagement(nCRManagement);
@@ -279,6 +288,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
else
{
nCRManagement.NCRManagementId = this.NCRManagementId;
+ var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.NCRManagementId);
+ if (sour == null || string.IsNullOrEmpty(sour.AttachUrl))
+ {
+ Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning);
+ return;
+ }
var model = Funs.DB.Comprehensive_NCRManagement.Where(u => u.NCRManagementId == this.NCRManagementId).FirstOrDefault();
if (model != null)
{
@@ -344,7 +359,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
nCRManagement.CompleteDate = Convert.ToDateTime(this.txtCompleteDate.Text);
}
nCRManagement.ResponsibleMan = this.txtResponsibleMan.Text.Trim();
- nCRManagement.ImplementationFrontState = this.txtImplementationFrontState.Text.Trim();
+ nCRManagement.ImplementationFrontState = this.ddlImplementationFrontState.SelectedValue.Trim();
string ids = string.Empty;
var lists = this.drpUnitWorkIds.SelectedValueArray;
foreach (var item in lists)
@@ -379,6 +394,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
nCRManagement.NCRManagementId = SQLHelper.GetNewID(typeof(Model.Comprehensive_NCRManagement));
this.hdAttachUrl.Text = nCRManagement.NCRManagementId;
}
+ var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == nCRManagement.NCRManagementId);
+ if (sour == null || string.IsNullOrEmpty(sour.AttachUrl))
+ {
+ Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning);
+ return;
+ }
nCRManagement.CompileMan = this.CurrUser.UserId;
nCRManagement.Status = BLL.Const.Comprehensive_Audit;
BLL.NCRManagementService.AddNCRManagement(nCRManagement);
@@ -386,6 +407,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
else
{
nCRManagement.NCRManagementId = this.NCRManagementId;
+ var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.NCRManagementId);
+ if (sour == null || string.IsNullOrEmpty(sour.AttachUrl))
+ {
+ Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning);
+ return;
+ }
//BLL.NCRManagementService.UpdateNCRManagement(nCRManagement);
var oldNCRManagement = Funs.DB.Comprehensive_NCRManagement.Where(u => u.NCRManagementId == this.NCRManagementId).FirstOrDefault();
if (oldNCRManagement == null) //数据库没有记录 直接点提交 当前状态为 审核状态
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.designer.cs
index f844bd96..9d5d8213 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.designer.cs
@@ -121,13 +121,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
protected global::FineUIPro.DropDownList drpUnitIds;
///
- /// txtImplementationFrontState 控件。
+ /// ddlImplementationFrontState 控件。
///
///
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::FineUIPro.TextBox txtImplementationFrontState;
+ protected global::FineUIPro.DropDownList ddlImplementationFrontState;
///
/// txtResponsibleMan 控件。
diff --git a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReport.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReport.aspx.cs
index 273ab42f..996ae474 100644
--- a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReport.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReport.aspx.cs
@@ -152,7 +152,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
* @param doc Document对象
* @return
*/
- public static Cell CreateCell(String value, Document doc, double cellWidth, string cellMerge = "")
+ public static Cell CreateCell(String value, Document doc, double cellWidth, string cellMerge = "",string CenterPage="")
{
Cell cell = new Cell(doc);
Paragraph p = new Paragraph(doc);
@@ -172,6 +172,12 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
cell.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None;
}
+ if (!string.IsNullOrEmpty(CenterPage))
+ {
+ //序号
+ value = " " + value;
+ }
+
p.AppendChild(new Run(doc, value));
@@ -211,8 +217,10 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
var endDate = Convert.ToDateTime(weekModel.EndDate);
//获取project
var pModel = db.Base_Project.FirstOrDefault(x => x.ProjectId == weekModel.ProjectId);
+ var urlHz = startDate.ToString("yyyyMMdd")+"-"
+ + endDate.ToString("yyyyMMdd");
- newUrl = uploadfilepath.Replace("项目质量月报", pModel.ShortName + "项目质量月报(第"+ weekModel.SortId + "期)");
+ newUrl = uploadfilepath.Replace("项目质量月报", pModel.ShortName + "项目质量月报(第"+ weekModel.SortId + "期)"+ urlHz);
if (File.Exists(newUrl))
{
@@ -268,14 +276,19 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
bkmark = doc.Range.Bookmarks["quamanagername"];
if (bkmark != null) {
- var zlName = "";
- //根据项目获取质量经理
- var puserList = db.Project_ProjectUser.Where(x => x.ProjectId == weekModel.ProjectId && x.RoleId.Contains(BLL.Const.QAManager)).ToList();
- foreach (var item in puserList)
- {
- zlName+= db.Sys_User.FirstOrDefault(x => x.UserId == item.UserId).UserName+",";
- }
- bkmark.Text = zlName;
+ //var zlName = "";
+ ////根据项目获取质量经理
+ //var puserList = db.Project_ProjectUser.Where(x => x.ProjectId == weekModel.ProjectId && x.RoleId.Contains(BLL.Const.QAManager)).ToList();
+ //foreach (var item in puserList)
+ //{
+ // zlName+= db.Sys_User.FirstOrDefault(x => x.UserId == item.UserId).UserName+",";
+ //}
+
+ var getPUser = Funs.DB.Project_ProjectUser.Where(x => x.ProjectId == weekModel.ProjectId);
+ ////质量经理
+ var qa = getPUser.FirstOrDefault(x => x.RoleId.Contains(BLL.Const.QAManager));
+
+ bkmark.Text = db.Sys_User.FirstOrDefault(x => x.UserId == qa.UserId).UserName;
}
bkmark = doc.Range.Bookmarks["reportAlldate"];
@@ -325,7 +338,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
//创建行
Row row = new Row(doc);
- row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width));
+ row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width,"","1"));
row.Cells.Add(CreateCell(item.ProStage, doc, table.FirstRow.Cells[1].CellFormat.Width));
row.Cells.Add(CreateCell(item.ProDescribe, doc, table.FirstRow.Cells[2].CellFormat.Width));
row.Cells.Add(CreateCell(item.TargetValue, doc, table.FirstRow.Cells[3].CellFormat.Width));
@@ -399,7 +412,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
//创建行
Row row = new Row(doc);
- row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width));
+ row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width, "", "1"));
row.Cells.Add(CreateCell(item.UnitOrMajor, doc, table.FirstRow.Cells[1].CellFormat.Width));
row.Cells.Add(CreateCell(item.Quantity1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
row.Cells.Add(CreateCell(item.Quantity2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
@@ -451,7 +464,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
//创建行
Row row = new Row(doc);
- row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width));
+ row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width, "", "1"));
row.Cells.Add(CreateCell(item.UnitOrMajor, doc, table.FirstRow.Cells[1].CellFormat.Width));
row.Cells.Add(CreateCell(item.Quantity1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
row.Cells.Add(CreateCell(item.Quantity2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
@@ -507,7 +520,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
//创建行
Row row = new Row(doc);
- row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width));
+ row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width, "", "1"));
row.Cells.Add(CreateCell(item.UnitOrMajor, doc, table.FirstRow.Cells[1].CellFormat.Width));
row.Cells.Add(CreateCell(item.Quantity1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
row.Cells.Add(CreateCell(item.Quantity2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
@@ -562,7 +575,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
//创建行
Row row = new Row(doc);
- row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width));
+ row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width, "", "1"));
row.Cells.Add(CreateCell(item.UnitOrMajor, doc, table.FirstRow.Cells[1].CellFormat.Width));
row.Cells.Add(CreateCell(item.Quantity1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
row.Cells.Add(CreateCell(item.Quantity2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
@@ -615,7 +628,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
//创建行
Row row = new Row(doc);
- row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width));
+ row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width, "", "1"));
row.Cells.Add(CreateCell(item.UnitOrMajor, doc, table.FirstRow.Cells[1].CellFormat.Width));
row.Cells.Add(CreateCell(item.Quantity1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
row.Cells.Add(CreateCell(item.Quantity2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
@@ -706,7 +719,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
//创建行
Row row = new Row(doc);
- row.Cells.Add(CreateCell((numberIndex-1).ToString(), doc, table.Rows[0].Cells[0].CellFormat.Width));
+ row.Cells.Add(CreateCell((numberIndex-1).ToString(), doc, table.Rows[0].Cells[0].CellFormat.Width, "", "1"));
row.Cells.Add(CreateCell(item.WorkName, doc, table.Rows[0].Cells[1].CellFormat.Width));
row.Cells.Add(CreateCell(item.CheckNum.ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
row.Cells.Add(CreateCell(item.TotalCheckNum.ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width));
@@ -846,7 +859,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
//创建行
Row row = new Row(doc);
- row.Cells.Add(CreateCell((numberIndex - 1).ToString(), doc, table.Rows[0].Cells[0].CellFormat.Width));
+ row.Cells.Add(CreateCell((numberIndex - 1).ToString(), doc, table.Rows[0].Cells[0].CellFormat.Width, "", "1"));
row.Cells.Add(CreateCell(item.UnitName, doc, table.Rows[0].Cells[1].CellFormat.Width));
row.Cells.Add(CreateCell(item.PipeMountGuard.ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
@@ -911,7 +924,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
//创建行
Row row = new Row(doc);
- row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width));
+ row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width, "", "1"));
row.Cells.Add(CreateCell(item.UnitOrMajor, doc, table.FirstRow.Cells[1].CellFormat.Width));
row.Cells.Add(CreateCell(item.Quantity1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
row.Cells.Add(CreateCell(item.Quantity2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
@@ -1118,21 +1131,29 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
numberIndex = 1;
//需要插入的table
var Unitname = "";
+ int pageCount = 1;
foreach (var item in NondestructiveTestlist)
{
//创建行
Row row = new Row(doc);
- row.Cells.Add(CreateCell((numberIndex).ToString(), doc, table.Rows[0].Cells[0].CellFormat.Width));
+
//如果是第一列,或者
if (numberIndex == 1 || Unitname != item.CreateMan)
{
+ if (Unitname != item.CreateMan && numberIndex != 1)
+ {
+ pageCount += 1;
+ }
+ row.Cells.Add(CreateCell((pageCount).ToString(), doc, table.Rows[0].Cells[0].CellFormat.Width, "0", "1"));
row.Cells.Add(CreateCell(item.CreateMan, doc, table.Rows[0].Cells[1].CellFormat.Width, "0"));
+
Unitname = item.CreateMan;
}
else
{
+ row.Cells.Add(CreateCell((pageCount).ToString(), doc, table.Rows[0].Cells[0].CellFormat.Width, "1", "1"));
row.Cells.Add(CreateCell(item.CreateMan, doc, table.Rows[0].Cells[1].CellFormat.Width, "1"));
Unitname = item.CreateMan;
}
@@ -1147,6 +1168,11 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
table.Rows.Insert(numberIndex, row);
numberIndex += 1;
+ if (Unitname != item.CreateMan)
+ {
+ pageCount += 1;
+ }
+
}
//自动设置表格样式
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
@@ -1199,7 +1225,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
//创建行
Row row = new Row(doc);
- row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width));
+ row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width, "", "1"));
row.Cells.Add(CreateCell(item.UnitOrMajor, doc, table.FirstRow.Cells[1].CellFormat.Width));
row.Cells.Add(CreateCell(item.Quantity1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
row.Cells.Add(CreateCell(item.Quantity2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
@@ -2235,18 +2261,21 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
}
numberIndex = 1;
int? num1 = 0, num2 = 0;
+ int MonthsCountstring = 0, ProjectCountstring = 0;
foreach (var item in InspectionDataInspection)
{
+ MonthsCountstring = Convert.ToInt32(item.RectificationRate.Replace("%", ""));
+ ProjectCountstring = Convert.ToInt32(item.TotationRate.Replace("%", ""));
//创建行
Row row = new Row(doc);
row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width));
row.Cells.Add(CreateCell(item.ContentName, doc, table.FirstRow.Cells[1].CellFormat.Width));
- row.Cells.Add(CreateCell(item.MonthsCount.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
- row.Cells.Add(CreateCell(item.ProjectCount.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
+ row.Cells.Add(CreateCell(item.RectificationRate.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
+ row.Cells.Add(CreateCell(item.TotationRate.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
row.Cells.Add(CreateCell(item.Remarks, doc, table.FirstRow.Cells[4].CellFormat.Width));
table.Rows.Insert(numberIndex, row);
- num1 += item.MonthsCount;
- num2 += item.ProjectCount;
+ num1 += MonthsCountstring;
+ num2 += ProjectCountstring;
numberIndex += 1;
}
//自动设置表格样式
@@ -2256,8 +2285,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
Row rowhj = new Row(doc);
rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[0].CellFormat.Width));
rowhj.Cells.Add(CreateCell("合计", doc, table.FirstRow.Cells[1].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
- rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
+ rowhj.Cells.Add(CreateCell(num1.ToString() + "%", doc, table.FirstRow.Cells[2].CellFormat.Width));
+ rowhj.Cells.Add(CreateCell(num2.ToString() + "%", doc, table.FirstRow.Cells[3].CellFormat.Width));
rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[4].CellFormat.Width));
table.Rows.Insert(numberIndex, rowhj);
@@ -2994,6 +3023,12 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
//总页数
table.Rows[4].Cells[5].FirstParagraph.Runs[0].Text = doc.PageCount.ToString();
+ bkmark = doc.Range.Bookmarks["CountPage"];
+ if (bkmark != null)
+ {
+ bkmark.Text = doc.PageCount.ToString();
+ }
+
//页眉是第二个表
//tableIndex—要移动的表的索引。
//rowIndex - 表中行的索引。
diff --git a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx
index 51b7f5fe..7c94fc41 100644
--- a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx
@@ -869,7 +869,7 @@
- <%--9.计量器具报验管理情况--%>
+ <%--9.计量器具报验管理情况--%>
@@ -1302,15 +1302,15 @@
-
-
-
-
+
diff --git a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx.cs
index 643d5945..6acde988 100644
--- a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx.cs
@@ -1499,11 +1499,19 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
var db = Funs.DB;
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
- var list = new List();
+ var list = new List();
int i = 1;
- int Quantity1Sum = 0;
- int Quantity2Sum = 0;
+ int CheckNum = 0;//本月检查点数
+ int TotalCheckNum = 0;//累计检查点数
+
+ int OKNum = 0;//本月检查合格点数
+ int TotalOKNum = 0;//累计检查合格点数
+
+ string Quantity1Sum = String.Empty;//本月检查合格点数/本月检查点数
+ string Quantity2Sum = String.Empty;//累计检查合格点数/累计检查点数
+
+
//加载所有单位
var units = from x in Funs.DB.Project_ProjectUnit
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
@@ -1521,43 +1529,85 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
c.CheckDate,
c.ProjectId,
u.UnitId,
- u.UnitName
+ u.UnitName,
+ c.IsOnceQualified
};
var AllList = query.ToList();
var monethCount = query
.Where(x => (x.CheckDate >= Convert.ToDateTime(startDate) && x.CheckDate <= Convert.ToDateTime(endDate)));
- Model.Report_CQMS_MonthReportItem model = new Model.Report_CQMS_MonthReportItem();
- model.Id = Guid.NewGuid().ToString();
- model.ContentName = item.UnitName;
- model.MonthsCount = monethCount.Count();
- model.ProjectCount = AllList.Count();
- model.ReportId = ReportId;
+
+
+ Model.CheckStatisc checkStatisc = new Model.CheckStatisc();
+ checkStatisc.Id = Guid.NewGuid().ToString();
+ checkStatisc.ReportId = ReportId;
+ checkStatisc.WorkName = item.UnitName;
+ checkStatisc.CheckNum = monethCount.Count();
+ checkStatisc.TotalCheckNum = AllList.Count();
+ checkStatisc.OKNum = monethCount.Count(x => x.IsOnceQualified == true);
+ checkStatisc.TotalOKNum = AllList.Count(x => x.IsOnceQualified == true);
+
+ if (checkStatisc.CheckNum != 0)//被除数不能为零
+ {
+ checkStatisc.OneOKRate = Math.Round((double)checkStatisc.OKNum / (double)checkStatisc.CheckNum * 100, 2) + "%";//保留两位小数、后四舍五入
+ }
+ else
+ {
+ checkStatisc.OneOKRate = "0%";
+ }
+
+ if (checkStatisc.TotalCheckNum != 0)//被除数不能为零
+ {
+ checkStatisc.TotalOneOKRate = Math.Round((double)checkStatisc.TotalOKNum / (double)checkStatisc.TotalCheckNum * 100, 2) + "%";//保留两位小数、后四舍五入
+ }
+ else
+ {
+ checkStatisc.TotalOneOKRate = "0%";
+ }
//如果是修改,查询表中数据
if (objType == "1")
{
var NewModel = db.Report_CQMS_MonthReportItem.FirstOrDefault(x => x.ReportId == ReportId && x.ContentName == item.UnitName && x.ReType == "10");
if (NewModel != null)
{
- model.RectificationRate = NewModel.RectificationRate;
- model.Remarks = NewModel.Remarks;
+ checkStatisc.Remarks = NewModel.Remarks;
}
}
- list.Add(model);
+ list.Add(checkStatisc);
+
+ CheckNum += checkStatisc.CheckNum;
+ TotalCheckNum += checkStatisc.TotalCheckNum;
+
+ OKNum += checkStatisc.OKNum;
+ TotalOKNum += checkStatisc.TotalOKNum;
- Quantity1Sum += monethCount.Count();
- Quantity2Sum += AllList.Count();
i++;
}
gvInspectionDataInspection.DataSource = list;
gvInspectionDataInspection.DataBind();
+ if (CheckNum != 0)//被除数不能为零
+ {
+ Quantity1Sum = Math.Round((double)OKNum / (double)CheckNum * 100, 2) + "%";//保留两位小数、后四舍五入
+ }
+ else
+ {
+ Quantity1Sum = "0%";
+ }
+ if (TotalCheckNum != 0)//被除数不能为零
+ {
+ Quantity2Sum = Math.Round((double)TotalOKNum / (double)TotalCheckNum * 100, 2) + "%";//保留两位小数、后四舍五入
+ }
+ else
+ {
+ Quantity2Sum = "0%";
+ }
//合计
JObject summary = new JObject();
- summary.Add("ContentName", "合计");
- summary.Add("MonthsCount", Quantity1Sum.ToString());
- summary.Add("ProjectCount", Quantity2Sum.ToString());
+ summary.Add("WorkName", "合计");
+ summary.Add("OneOKRate", Quantity1Sum.ToString());
+ summary.Add("TotalOneOKRate", Quantity2Sum.ToString());
gvInspectionDataInspection.SummaryData = summary;
#endregion
@@ -1647,7 +1697,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
}
else
{
- OneOKRate = "0%";
+ OneOKRate = "0";
}
if (TotalCheckNum != 0)//被除数不能为零
{
@@ -1655,7 +1705,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
}
else
{
- TotalOneOKRate = "0%";
+ TotalOneOKRate = "0";
}
//检验批统计:土建
@@ -2071,7 +2121,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
u.UnitId,
u.UnitName,
c.IssuedDate,
- c.Status
+ c.Status,
+ c.ImplementationFrontState,
};
var AllList = query.ToList();
@@ -2083,8 +2134,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
NCRStatisc.WorkName = item.UnitName;
//NCRStatisc.CurrentPeriodOkNum = unitNCRStatic.Count(x => x.Status == "3");
//NCRStatisc.OKNum = AllList.Count(x => x.Status == "3");
- NCRStatisc.CurrentPeriodOkNum = unitNCRStatic.Count();
- NCRStatisc.OKNum = AllList.Count();
+ NCRStatisc.CurrentPeriodOkNum = unitNCRStatic.Where(x => x.ImplementationFrontState.Trim().Equals("已闭合")).Count();
+ NCRStatisc.OKNum = AllList.Where(x => x.ImplementationFrontState.Trim().Equals("已闭合")).Count();
NCRStatisc.CheckNum = AllList.Count();
@@ -3427,10 +3478,10 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
ReportId = ReportId,
ReType = "10",
- ContentName = values.Value("ContentName"),
- MonthsCount = values.Value("MonthsCount"),
- ProjectCount = values.Value("ProjectCount"),
- //RectificationRate = values.Value("RectificationRate"),
+ ContentName = values.Value("WorkName"),
+ RectificationRate = values.Value("OneOKRate"),
+ TotationRate = values.Value("TotalOneOKRate"),
+
Remarks = values.Value("Remarks"),
};
if (gvInspectionDataInspection.Rows[rowIndex].DataKeys.Length > 0)
diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx
index 9ced3062..e41e3da7 100644
--- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx
@@ -13,20 +13,24 @@
-
-
+
+
+
+
+
+ LabelAlign="right">
-
+
diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx.cs
index 681a183f..e197618a 100644
--- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx.cs
@@ -21,8 +21,19 @@ namespace FineUIPro.Web.CQMS.ProcessControl
{
if (!IsPostBack)
{
- BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessional, true);//专业
- BindGvInspectionManagement(null);
+ if (drpZhType.SelectedValue.Equals("1"))
+ {
+ BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessional, false);//专业
+ drpCNProfessional.Items.Insert(0, new FineUIPro.ListItem("- 请选择专业 -", BLL.Const._Null));
+ }
+ else
+ {
+ BLL.UnitService.InitUnitDownList(this.drpCNProfessional, this.CurrUser.LoginProjectId, false);//施工分包商
+ drpCNProfessional.Items.Insert(0, new FineUIPro.ListItem("- 请选择单位名称 -", BLL.Const._Null));
+ }
+ BindGvInspectionManagement(this.drpZhType.SelectedValue, this.drpCNProfessional.SelectedValue);
+
+
}
}
#region 绑定GridView
@@ -30,7 +41,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 绑定
///
///
- public void BindGvInspectionManagement(string cNProfessionalId)
+ public void BindGvInspectionManagement(string ZyType, string cNProfessionalId)
{
if (string.IsNullOrEmpty(this.txtStartTime.Text.Trim()) && string.IsNullOrEmpty(this.txtEndTime.Text.Trim())) //未选择日期,统计项目开始起的每月数据
{
@@ -49,10 +60,22 @@ namespace FineUIPro.Web.CQMS.ProcessControl
{
if (DateTime.Now < NewDate)
{
- //统计所给时间段的全部数量
- List managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, false);
- //统计所给时间段的合格数量
- List managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true);
+ List managementListSunNumber = new List();
+ List managementListOneNumber = new List();
+ if (ZyType == "1")
+ {
+ //统计所给时间段的全部数量
+ managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, false);
+ //统计所给时间段的合格数量
+ managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true);
+ }
+ else
+ {
+ //统计所给时间段的全部数量
+ managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, false);
+ //统计所给时间段的合格数量
+ managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true);
+ }
Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", DateTime.Now);
Statistics.SunNumber = managementListSunNumber.Count();
@@ -70,12 +93,24 @@ namespace FineUIPro.Web.CQMS.ProcessControl
}
else
{
+ List managementListSunNumber = new List();
+ List managementListOneNumber = new List();
NextDate = Convert.ToDateTime(StartDate.Year + "-" + StartDate.Month + "-25");
- //统计所给事件段的全部数量
- List managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NextDate, false);
- //统计所给事件段的合格数量
- List managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NextDate, true);
+ if (ZyType == "1")
+ {
+ //统计所给事件段的全部数量
+ managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NextDate, false);
+ //统计所给事件段的合格数量
+ managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NextDate, true);
+ }
+ else
+ {
+ //统计所给事件段的全部数量
+ managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NextDate, false);
+ //统计所给事件段的合格数量
+ managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NextDate, true);
+ }
Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", NextDate);
Statistics.SunNumber = managementListSunNumber.Count();
Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
@@ -93,10 +128,25 @@ namespace FineUIPro.Web.CQMS.ProcessControl
{
if (DateTime.Now < NewDate)
{
- //统计所给事件段的全部数量
- List managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, false);
- //统计所给事件段的合格数量
- List managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true);
+ List managementListSunNumber = new List();
+ List managementListOneNumber = new List();
+ if (ZyType == "1")
+ {
+ //统计所给事件段的全部数量
+ managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, false);
+ //统计所给事件段的合格数量
+ managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true);
+
+ }
+ else
+ {
+ //统计所给事件段的全部数量
+ managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, false);
+ //统计所给事件段的合格数量
+ managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true);
+
+ }
+
Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", DateTime.Now);
Statistics.SunNumber = managementListSunNumber.Count();
@@ -115,10 +165,22 @@ namespace FineUIPro.Web.CQMS.ProcessControl
}
else
{
- //统计所给事件段的全部数量
- List managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, false);
- //统计所给事件段的合格数量
- List managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, true);
+ List managementListSunNumber = new List();
+ List managementListOneNumber = new List();
+ if (ZyType == "1")
+ {
+ //统计所给事件段的全部数量
+ managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, false);
+ //统计所给事件段的合格数量
+ managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, true);
+ }
+ else
+ {
+ //统计所给事件段的全部数量
+ managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, false);
+ //统计所给事件段的合格数量
+ managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, true);
+ }
Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", NewDate);
Statistics.SunNumber = managementListSunNumber.Count();
Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
@@ -151,11 +213,23 @@ namespace FineUIPro.Web.CQMS.ProcessControl
NewDate = Convert.ToDateTime(NextDate.Year + "-" + NextDate.Month + "-25");
if (DateTime.Now < NewDate)
{
- //统计所给事件段的全部数量
- List managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, false);
- //统计所给事件段的合格数量
- List managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true);
+ List managementListSunNumber = new List();
+ List managementListOneNumber = new List();
+ if (ZyType == "1")
+ {
+ //统计所给事件段的全部数量
+ managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, false);
+ //统计所给事件段的合格数量
+ managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true);
+ }
+ else
+ {
+ //统计所给事件段的全部数量
+ managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, false);
+ //统计所给事件段的合格数量
+ managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true);
+ }
Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", DateTime.Now);
Statistics.SunNumber = managementListSunNumber.Count();
Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
@@ -173,10 +247,21 @@ namespace FineUIPro.Web.CQMS.ProcessControl
}
else
{
- //统计所给事件段的全部数量
- List managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, false);
- //统计所给事件段的合格数量
- List managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, true);
+ List managementListSunNumber = new List();
+ List managementListOneNumber = new List();
+ if (ZyType == "1")
+ {
+ //统计所给事件段的全部数量
+ managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, false);
+ //统计所给事件段的合格数量
+ managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, true);
+ }
+ else
+ { //统计所给事件段的全部数量
+ managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, false);
+ //统计所给事件段的合格数量
+ managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, true);
+ }
Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", NewDate);
Statistics.SunNumber = managementListSunNumber.Count();
Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
@@ -231,10 +316,25 @@ namespace FineUIPro.Web.CQMS.ProcessControl
EndDate = Convert.ToDateTime(this.txtEndTime.Text.Trim());
}
Model.InspectionManagementStatistics Statistics = new Model.InspectionManagementStatistics();
- //统计所给时间段的全部数量
- List managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, EndDate, false);
- //统计所给时间段的合格数量
- List managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, EndDate, true);
+
+
+ List managementListSunNumber = new List();
+ List managementListOneNumber = new List();
+ if (ZyType == "1")
+ {
+ //统计所给时间段的全部数量
+ managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, EndDate, false);
+ //统计所给时间段的合格数量
+ managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, EndDate, true);
+
+ }
+ else
+ {
+ //统计所给时间段的全部数量
+ managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, EndDate, false);
+ //统计所给时间段的合格数量
+ managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, EndDate, true);
+ }
Statistics.CheckDate = string.Format("{0:yyyy-MM-dd}", StartDate) + " 至 " + string.Format("{0:yyyy-MM-dd}", EndDate);
Statistics.SunNumber = managementListSunNumber.Count();
Statistics.OneStatisticsSunNumber = managementListOneNumber.Count();
@@ -255,14 +355,16 @@ namespace FineUIPro.Web.CQMS.ProcessControl
protected void btnSearch_Click(object sender, EventArgs e)
{
- if (this.drpCNProfessional.SelectedValue != BLL.Const._Null)
- {
- BindGvInspectionManagement(this.drpCNProfessional.SelectedValue);
- }
- else
- {
- BindGvInspectionManagement(null);
- }
+ BindGvInspectionManagement(this.drpZhType.SelectedValue, this.drpCNProfessional.SelectedValue);
+
+ //if (this.drpCNProfessional.SelectedValue != BLL.Const._Null)
+ //{
+ // BindGvInspectionManagement(this.drpCNProfessional.SelectedValue);
+ //}
+ //else
+ //{
+ // BindGvInspectionManagement(null);
+ //}
}
@@ -274,16 +376,38 @@ namespace FineUIPro.Web.CQMS.ProcessControl
Response.ContentType = "application/excel";
Response.ContentEncoding = Encoding.UTF8;
this.Grid1.PageSize = Grid1.RecordCount;
- if (this.drpCNProfessional.SelectedValue != BLL.Const._Null)
- {
- BindGvInspectionManagement(this.drpCNProfessional.SelectedValue);
- }
- else
- {
- BindGvInspectionManagement(null);
- }
+ //if (this.drpCNProfessional.SelectedValue != BLL.Const._Null)
+ //{
+ // BindGvInspectionManagement(this.drpCNProfessional.SelectedValue);
+ //}
+ //else
+ //{
+ // BindGvInspectionManagement(null);
+ //}
+ BindGvInspectionManagement(this.drpZhType.SelectedValue, this.drpCNProfessional.SelectedValue);
Response.Write(GetGridTableHtml2(Grid1));
Response.End();
}
+
+ ///
+ ///下拉动态加载数据信息
+ ///
+ ///
+ ///
+ protected void drpZhType_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ this.drpCNProfessional.Items.Clear();
+ if (drpZhType.SelectedValue.Equals("1"))
+ {
+ BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessional, false);//专业
+ drpCNProfessional.Items.Insert(0, new FineUIPro.ListItem("- 请选择专业 -", BLL.Const._Null));
+ }
+ else
+ {
+ BLL.UnitService.InitUnitDownList(this.drpCNProfessional, this.CurrUser.LoginProjectId, false);//施工分包商
+ drpCNProfessional.Items.Insert(0, new FineUIPro.ListItem("- 请选择单位 -", BLL.Const._Null));
+ }
+ this.drpCNProfessional.SelectedIndex = 0;
+ }
}
}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx.designer.cs
index 1414cd3e..d39c7ade 100644
--- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx.designer.cs
@@ -57,6 +57,15 @@ namespace FineUIPro.Web.CQMS.ProcessControl {
///
protected global::FineUIPro.Toolbar ToolSearch;
+ ///
+ /// drpZhType 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpZhType;
+
///
/// drpCNProfessional 控件。
///
diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/资料收发文登记记录导入模板.xlsx b/SGGL/FineUIPro.Web/File/Excel/DataIn/资料收发文登记记录导入模板.xlsx
new file mode 100644
index 00000000..9b6ff15a
Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/DataIn/资料收发文登记记录导入模板.xlsx differ
diff --git a/SGGL/FineUIPro.Web/File/Word/CQMS/项目质量月报.doc b/SGGL/FineUIPro.Web/File/Word/CQMS/项目质量月报.doc
index d01d9b3e..cc08e3a8 100644
--- a/SGGL/FineUIPro.Web/File/Word/CQMS/项目质量月报.doc
+++ b/SGGL/FineUIPro.Web/File/Word/CQMS/项目质量月报.doc
@@ -3,8 +3,8 @@ PK
z58v+5#"- ٲm͌h}>hkVy9yFV*ne(M+{kp1
6:QcȒ T$dL40J?#
Gik/4Gshppqz g4G.vQ a#ȩmବnjRŴ=Ϊz/&WS