diff --git a/DataBase/版本日志/SGGLDB_WH_2024-05-11-gaofei.sql b/DataBase/版本日志/SGGLDB_WH_2024-05-11-gaofei.sql
new file mode 100644
index 00000000..c12f4b7d
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_WH_2024-05-11-gaofei.sql
@@ -0,0 +1,112 @@
+ INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+ VALUES('56A54B4B-BBA3-4249-9FFC-3A60DAC79059','ܽȼƻ','JDGL/Check/WeekPlan.aspx',52,'0','Menu_JDGL',0,1,1)
+ GO
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('9371CFCF-E162-49FD-BC48-CE178E153F51','56A54B4B-BBA3-4249-9FFC-3A60DAC79059','',1)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('DC978D83-FC78-4A7E-888A-581082F0F70D','56A54B4B-BBA3-4249-9FFC-3A60DAC79059','',2)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('BE4B07C7-EFE7-47F1-BBF9-A60930F70BDD','56A54B4B-BBA3-4249-9FFC-3A60DAC79059','ɾ',3)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('A8102F40-6E06-49EB-9471-3FF4DC745226','56A54B4B-BBA3-4249-9FFC-3A60DAC79059','',4)
+ GO
+
+
+CREATE TABLE [dbo].[JDGL_WeekPlan](
+ [WeekPlanId] [nvarchar](50) NOT NULL,
+ [ProjectId] [nvarchar](50) NULL,
+ [WeekNo] [nvarchar](50) NULL,
+ [StartDate] [datetime] NULL,
+ [EndDate] [datetime] NULL,
+ [UnitWork] [nvarchar](50) NULL,
+ [Major] [nvarchar](50) NULL,
+ [WorkContent] [nvarchar](500) NULL,
+ [UnitId] [nvarchar](50) NULL,
+ [DutyPerson] [nvarchar](50) NULL,
+ [PlanDate] [datetime] NULL,
+ [IsOK] [bit] NULL,
+ [Remark] [nvarchar](200) NULL,
+ [CompileMan] [nvarchar](50) NULL,
+ [CompileDate] [datetime] NULL,
+ [SortIndex] [int] NULL,
+ CONSTRAINT [PK_JDGL_WeekPlan] PRIMARY KEY CLUSTERED
+(
+ [WeekPlanId] 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].[JDGL_WeekPlan] WITH CHECK ADD CONSTRAINT [FK_JDGL_WeekPlan_Base_Project] FOREIGN KEY([ProjectId])
+REFERENCES [dbo].[Base_Project] ([ProjectId])
+GO
+
+ALTER TABLE [dbo].[JDGL_WeekPlan] CHECK CONSTRAINT [FK_JDGL_WeekPlan_Base_Project]
+GO
+
+ALTER TABLE [dbo].[JDGL_WeekPlan] WITH CHECK ADD CONSTRAINT [FK_JDGL_WeekPlan_Base_Unit] FOREIGN KEY([UnitId])
+REFERENCES [dbo].[Base_Unit] ([UnitId])
+GO
+
+ALTER TABLE [dbo].[JDGL_WeekPlan] CHECK CONSTRAINT [FK_JDGL_WeekPlan_Base_Unit]
+GO
+
+ALTER TABLE [dbo].[JDGL_WeekPlan] WITH CHECK ADD CONSTRAINT [FK_JDGL_WeekPlan_Sys_User] FOREIGN KEY([DutyPerson])
+REFERENCES [dbo].[Sys_User] ([UserId])
+GO
+
+ALTER TABLE [dbo].[JDGL_WeekPlan] CHECK CONSTRAINT [FK_JDGL_WeekPlan_Sys_User]
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'WeekPlanId'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'ProjectId'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ܺ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'WeekNo'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʼ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'StartDate'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'EndDate'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'/λ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'UnitWork'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'רҵ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'Major'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'WorkContent'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ελ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'UnitId'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'廷' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'DutyPerson'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ƻʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'PlanDate'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'״̬' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'IsOK'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'Remark'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'CompileMan'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'CompileDate'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'SortIndex'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ܽȼƻ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan'
+GO
+
+
diff --git a/DataBase/菜单初始化脚本/1-4进度管理(Menu_JDGL).sql b/DataBase/菜单初始化脚本/1-4进度管理(Menu_JDGL).sql
index 5cacfbb3..b592cf6f 100644
--- a/DataBase/菜单初始化脚本/1-4进度管理(Menu_JDGL).sql
+++ b/DataBase/菜单初始化脚本/1-4进度管理(Menu_JDGL).sql
@@ -104,6 +104,19 @@ go
VALUES('F136D1B4-A988-42E7-AD7C-4A246B440D03','94287B92-7E96-4B90-BC6F-DAF30AE3B314','保存',4)
GO
+ INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+ VALUES('56A54B4B-BBA3-4249-9FFC-3A60DAC79059','周进度计划','JDGL/Check/WeekPlan.aspx',52,'0','Menu_JDGL',0,1,1)
+ GO
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('9371CFCF-E162-49FD-BC48-CE178E153F51','56A54B4B-BBA3-4249-9FFC-3A60DAC79059','增加',1)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('DC978D83-FC78-4A7E-888A-581082F0F70D','56A54B4B-BBA3-4249-9FFC-3A60DAC79059','修改',2)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('BE4B07C7-EFE7-47F1-BBF9-A60930F70BDD','56A54B4B-BBA3-4249-9FFC-3A60DAC79059','删除',3)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('A8102F40-6E06-49EB-9471-3FF4DC745226','56A54B4B-BBA3-4249-9FFC-3A60DAC79059','保存',4)
+ GO
+
--INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
--VALUES('27C1D718-2DC0-42A5-96C0-F7A2D0DBC5F6','进度测量标志(权重)设置','',20,'0','Menu_JDGL',0,0,1)
--GO
diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj
index 073bd892..6ef3d483 100644
--- a/SGGL/BLL/BLL.csproj
+++ b/SGGL/BLL/BLL.csproj
@@ -587,6 +587,7 @@
+
diff --git a/SGGL/BLL/BoSheng/BOSHENGMonitorService.cs b/SGGL/BLL/BoSheng/BOSHENGMonitorService.cs
index 30bf9248..bc5b5f4d 100644
--- a/SGGL/BLL/BoSheng/BOSHENGMonitorService.cs
+++ b/SGGL/BLL/BoSheng/BOSHENGMonitorService.cs
@@ -47,7 +47,7 @@ namespace BLL
{
try
{
- var getDataList = (from x in Funs.DB.Sys_DataExchange where x.IsUpdate == false select x).Take(100).ToList();
+ var getDataList = (from x in Funs.DB.Sys_DataExchange where x.IsUpdate == false select x).Take(500).ToList();
if (getDataList.Count() > 0)
{
var getDataList0 = getDataList.Where(x => x.MessageText.Contains("\"Type\":0")).ToList();
diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs
index 1aa5cf7a..bae108bb 100644
--- a/SGGL/BLL/Common/Const.cs
+++ b/SGGL/BLL/Common/Const.cs
@@ -3152,6 +3152,10 @@ namespace BLL
///
public const string MonthPlanTemplateUrl = "File\\Excel\\DataIn\\月度计划情况导入模板.xls";
///
+ /// 周进度计划导入模版文件原始的虚拟路径
+ ///
+ public const string WeekPlanTemplateUrl = "File\\Excel\\DataIn\\周进度计划导入模板.xls";
+ ///
/// 仪表索引
///
public const string InstrumentUrl = "File\\Excel\\TestRun\\仪表索引模板.xlsx";
@@ -5767,10 +5771,15 @@ namespace BLL
public const string RectificationMeasureMenuId = "0629BAB1-DB1C-42CE-A333-49F3813617D7";
///
- /// 工程量完成情况
+ /// 月度计划情况
///
public const string MonthPlanMenuId = "94287B92-7E96-4B90-BC6F-DAF30AE3B314";
+ ///
+ /// 周进度计划
+ ///
+ public const string WeekPlanMenuId = "56A54B4B-BBA3-4249-9FFC-3A60DAC79059";
+
///
/// 进度完成情况
///
diff --git a/SGGL/BLL/JDGL/Check/WeekPlanService.cs b/SGGL/BLL/JDGL/Check/WeekPlanService.cs
new file mode 100644
index 00000000..12deb96d
--- /dev/null
+++ b/SGGL/BLL/JDGL/Check/WeekPlanService.cs
@@ -0,0 +1,122 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BLL
+{
+ ///
+ /// 周计划情况
+ ///
+ public class WeekPlanService
+ {
+ public static Model.SGGLDB db = Funs.DB;
+
+ ///
+ /// 根据主键获取周计划情况
+ ///
+ ///
+ ///
+ public static Model.JDGL_WeekPlan GetWeekPlanById(string WeekPlanId)
+ {
+ return Funs.DB.JDGL_WeekPlan.FirstOrDefault(e => e.WeekPlanId == WeekPlanId);
+ }
+
+ ///
+ /// 根据主键获取周计划情况
+ ///
+ ///
+ ///
+ public static List GetWeekPlansByWeeks(string projectId, string weekNo)
+ {
+ return (from x in Funs.DB.JDGL_WeekPlan where x.ProjectId == projectId && x.WeekNo == weekNo select x).ToList();
+ }
+
+ ///
+ /// 添加周计划情况
+ ///
+ ///
+ public static void AddWeekPlan(Model.JDGL_WeekPlan WeekPlan)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.JDGL_WeekPlan newWeekPlan = new Model.JDGL_WeekPlan
+ {
+ WeekPlanId = WeekPlan.WeekPlanId,
+ ProjectId = WeekPlan.ProjectId,
+ WeekNo = WeekPlan.WeekNo,
+ StartDate = WeekPlan.StartDate,
+ EndDate = WeekPlan.EndDate,
+ UnitWork = WeekPlan.UnitWork,
+ Major = WeekPlan.Major,
+ WorkContent = WeekPlan.WorkContent,
+ UnitId = WeekPlan.UnitId,
+ DutyPerson = WeekPlan.DutyPerson,
+ PlanDate = WeekPlan.PlanDate,
+ IsOK = WeekPlan.IsOK,
+ Remark = WeekPlan.Remark,
+ CompileMan = WeekPlan.CompileMan,
+ CompileDate = WeekPlan.CompileDate,
+ SortIndex = WeekPlan.SortIndex,
+ };
+ db.JDGL_WeekPlan.InsertOnSubmit(newWeekPlan);
+ db.SubmitChanges();
+ }
+
+ ///
+ /// 修改周计划情况
+ ///
+ ///
+ public static void UpdateWeekPlan(Model.JDGL_WeekPlan WeekPlan)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.JDGL_WeekPlan newWeekPlan = db.JDGL_WeekPlan.FirstOrDefault(e => e.WeekPlanId == WeekPlan.WeekPlanId);
+ if (newWeekPlan != null)
+ {
+ newWeekPlan.UnitWork = WeekPlan.UnitWork;
+ newWeekPlan.Major = WeekPlan.Major;
+ newWeekPlan.WorkContent = WeekPlan.WorkContent;
+ newWeekPlan.UnitId = WeekPlan.UnitId;
+ newWeekPlan.DutyPerson = WeekPlan.DutyPerson;
+ newWeekPlan.PlanDate = WeekPlan.PlanDate;
+ newWeekPlan.IsOK = WeekPlan.IsOK;
+ newWeekPlan.Remark = WeekPlan.Remark;
+ newWeekPlan.CompileMan = WeekPlan.CompileMan;
+ newWeekPlan.CompileDate = WeekPlan.CompileDate;
+ newWeekPlan.SortIndex = WeekPlan.SortIndex;
+
+ db.SubmitChanges();
+ }
+ }
+
+ ///
+ /// 根据主键删除周计划情况
+ ///
+ ///
+ public static void DeleteWeekPlanByWeekPlanId(string WeekPlanId)
+ {
+ Model.SGGLDB db = Funs.DB;
+ var q = (from x in db.JDGL_WeekPlan where x.WeekPlanId == WeekPlanId select x).FirstOrDefault();
+ if (q != null)
+ {
+ db.JDGL_WeekPlan.DeleteOnSubmit(q);
+ db.SubmitChanges();
+ }
+ }
+
+ ///
+ /// 根据主键删除周计划情况
+ ///
+ ///
+ public static void DeleteAllWeekPlan(string projectId, string weekNo)
+ {
+ Model.SGGLDB db = Funs.DB;
+ var q = from x in db.JDGL_WeekPlan where x.ProjectId == projectId && x.WeekNo == weekNo select x;
+ if (q != null)
+ {
+ db.JDGL_WeekPlan.DeleteAllOnSubmit(q);
+ db.SubmitChanges();
+ }
+ }
+ }
+}
diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/周进度计划导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/周进度计划导入模板.xls
new file mode 100644
index 00000000..7d83766c
Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/DataIn/周进度计划导入模板.xls differ
diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
index d76f0f88..dacec2ee 100644
--- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
+++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
@@ -1403,6 +1403,8 @@
+
+
@@ -13922,6 +13924,20 @@
UndergroundPipeCompletionIn.aspx
+
+ WeekPlan.aspx
+ ASPXCodeBehind
+
+
+ WeekPlan.aspx
+
+
+ WeekPlanIn.aspx
+ ASPXCodeBehind
+
+
+ WeekPlanIn.aspx
+
EarnedValueCurve.aspx
ASPXCodeBehind
diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user
index 9e91deff..63ca13cc 100644
--- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user
+++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user
@@ -1,7 +1,7 @@
- Debug|Any CPU
+ Release|Any CPU
true
false
diff --git a/SGGL/FineUIPro.Web/JDGL/Check/WeekPlan.aspx b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlan.aspx
new file mode 100644
index 00000000..3d59cd90
--- /dev/null
+++ b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlan.aspx
@@ -0,0 +1,114 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WeekPlan.aspx.cs" Inherits="FineUIPro.Web.JDGL.Check.WeekPlan" %>
+
+
+
+
+
+ 周进度计划
+
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/JDGL/Check/WeekPlan.aspx.cs b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlan.aspx.cs
new file mode 100644
index 00000000..2484cb80
--- /dev/null
+++ b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlan.aspx.cs
@@ -0,0 +1,177 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Data;
+using System.Data.SqlClient;
+using BLL;
+using Newtonsoft.Json.Linq;
+
+namespace FineUIPro.Web.JDGL.Check
+{
+ public partial class WeekPlan : PageBase
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ GetButtonPower();
+ btnNew.OnClientClick = Window1.GetShowReference("WeekPlanEdit.aspx") + "return false;";
+ this.txtWeeks.Text = string.Format("{0:yyyy-MM}", DateTime.Now);
+ BindGrid();
+ }
+ }
+
+ #region 获取按钮权限
+ ///
+ /// 获取按钮权限
+ ///
+ ///
+ ///
+ private void GetButtonPower()
+ {
+ if (Request.Params["value"] == BLL.Const._Null)
+ {
+ return;
+ }
+ var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.WeekPlanMenuId);
+ if (buttonList.Count() > 0)
+ {
+ if (buttonList.Contains(BLL.Const.BtnSave))
+ {
+ this.btnNew.Hidden = false;
+ this.btnModify.Hidden = false;
+ this.btnMenuDel.Hidden = false;
+ }
+ }
+ }
+ #endregion
+
+ protected void btnModify_Click(object sender, EventArgs e)
+ {
+ Window1.Title = "录入";
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("WeekPlanEdit.aspx?Weeks={0}", this.txtWeeks.Text, "编辑 - ")));
+ }
+
+ ///
+ /// 加载Grid
+ ///
+ private void BindGrid()
+ {
+ string strSql = @"select mp.*,u.UnitName,us.UserName as DutyPersonName,uw.UnitWorkName,cn.ProfessionalName,case mp.IsOK when 1 then '已完成' when 0 then '未完成' else '' end as IsOKStr from [dbo].[JDGL_WeekPlan] mp
+left join Base_Unit u on u.UnitId=mp.UnitId
+left join Sys_User us on us.UserId=mp.DutyPerson
+left join WBS_UnitWork uw on uw.UnitWorkId=mp.UnitWork
+left join Base_CNProfessional cn on cn.CNProfessionalId=mp.Major
+where mp.ProjectId=@ProjectId and mp.WeekNo=@WeekNo order by mp.SortIndex";
+ List listStr = new List();
+ listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
+ listStr.Add(new SqlParameter("@WeekNo", string.Format("{0:yyyy-MM-dd}", Convert.ToDateTime(this.txtWeeks.Text.Trim() + "-01"))));
+ SqlParameter[] parameter = listStr.ToArray();
+ DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
+ Grid1.RecordCount = tb.Rows.Count;
+ //tb = GetFilteredTable(Grid1.FilteredData, tb);
+ var table = this.GetPagedDataTable(Grid1, tb);
+ Grid1.DataSource = table;
+ Grid1.DataBind();
+ }
+
+ #region 月份选择事件
+ ///
+ /// 月份选择事件
+ ///
+ ///
+ ///
+ protected void txtWeeks_TextChanged(object sender, EventArgs e)
+ {
+ BindGrid();
+ }
+ #endregion
+
+ #region 保存按钮
+ ///
+ /// 保存按钮
+ ///
+ ///
+ ///
+ protected void btnSave_Click(object sender, EventArgs e)
+ {
+ if (this.Grid1.Rows.Count > 0)
+ {
+ JArray mergedData = Grid1.GetMergedData();
+ foreach (JObject mergedRow in mergedData)
+ {
+ JObject values = mergedRow.Value("values");
+ int i = mergedRow.Value("index");
+ Model.JDGL_WeekPlan WeekPlan = BLL.WeekPlanService.GetWeekPlanById(this.Grid1.Rows[i].RowID);
+ if (WeekPlan != null)
+ {
+ WeekPlan.CompileMan = this.CurrUser.UserId;
+ WeekPlan.CompileDate = DateTime.Now;
+ BLL.WeekPlanService.UpdateWeekPlan(WeekPlan);
+ }
+ }
+ Alert.ShowInTop("保存成功!", MessageBoxIcon.Success);
+ }
+ else
+ {
+ Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
+ return;
+ }
+ }
+ #endregion
+
+ protected void btnMenuDel_Click(object sender, EventArgs e)
+ {
+ if (Grid1.SelectedRowIndexArray.Length > 0)
+ {
+ foreach (int rowIndex in Grid1.SelectedRowIndexArray)
+ {
+ string rowID = Grid1.DataKeys[rowIndex][0].ToString();
+ BLL.WeekPlanService.DeleteWeekPlanByWeekPlanId(rowID);
+ }
+
+ BindGrid();
+ ShowNotify("删除数据成功!", MessageBoxIcon.Success);
+ }
+ }
+
+ #region 导入
+ ///
+ /// 导入按钮
+ ///
+ ///
+ ///
+ protected void btnImport_Click(object sender, EventArgs e)
+ {
+ Window1.Title = "导入";
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("WeekPlanIn.aspx?ProjectId={0}", this.CurrUser.LoginProjectId, "导入 - ")));
+ }
+
+ ///
+ /// 关闭导入弹出窗口
+ ///
+ ///
+ ///
+ protected void Window1_Close(object sender, WindowCloseEventArgs e)
+ {
+ BindGrid();
+ }
+ #endregion
+
+ #region 统计
+ ///
+ /// 统计分析
+ ///
+ ///
+ ///
+ protected void BtnAnalyse_Click(object sender, EventArgs e)
+ {
+ Window1.Title = "统计";
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("WeekPlanStatisc.aspx", "统计 - ")));
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/JDGL/Check/WeekPlan.aspx.designer.cs b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlan.aspx.designer.cs
new file mode 100644
index 00000000..3e7ac331
--- /dev/null
+++ b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlan.aspx.designer.cs
@@ -0,0 +1,150 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.JDGL.Check {
+
+
+ public partial class WeekPlan {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// Panel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel1;
+
+ ///
+ /// Grid1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid1;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// txtWeeks 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtWeeks;
+
+ ///
+ /// btnSave 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSave;
+
+ ///
+ /// BtnAnalyse 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button BtnAnalyse;
+
+ ///
+ /// btnNew 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnNew;
+
+ ///
+ /// btnModify 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnModify;
+
+ ///
+ /// btnImport 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnImport;
+
+ ///
+ /// lblPageIndex 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label lblPageIndex;
+
+ ///
+ /// Window1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window Window1;
+
+ ///
+ /// Menu1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Menu Menu1;
+
+ ///
+ /// btnMenuDel 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnMenuDel;
+ }
+}
diff --git a/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx
new file mode 100644
index 00000000..d13ca509
--- /dev/null
+++ b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx
@@ -0,0 +1,125 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WeekPlanIn.aspx.cs" Inherits="FineUIPro.Web.JDGL.Check.WeekPlanIn" %>
+
+
+
+
+
+ 导入信息
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx.cs b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx.cs
new file mode 100644
index 00000000..fbaf8fb4
--- /dev/null
+++ b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx.cs
@@ -0,0 +1,735 @@
+using BLL;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.OleDb;
+using System.IO;
+using System.Linq;
+using System.Web.UI;
+
+namespace FineUIPro.Web.JDGL.Check
+{
+ public partial class WeekPlanIn : PageBase
+ {
+ #region 定义变量
+ ///
+ /// 上传预设的虚拟路径
+ ///
+ private string initPath = Const.ExcelUrl;
+
+ ///
+ /// 人员集合
+ ///
+ public static List WeekPlans = new List();
+
+ ///
+ /// 错误集合
+ ///
+ public static string errorInfos = string.Empty;
+
+ ///
+ /// 项目ID
+ ///
+ public string ProjectId
+ {
+ get
+ {
+ return (string)ViewState["ProjectId"];
+ }
+ set
+ {
+ ViewState["ProjectId"] = value;
+ }
+ }
+ #endregion
+
+ #region 加载页面
+ ///
+ /// 加载页面
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ this.hdFileName.Text = string.Empty;
+ this.hdCheckResult.Text = string.Empty;
+ if (WeekPlans != null)
+ {
+ WeekPlans.Clear();
+ }
+ errorInfos = string.Empty;
+ this.ProjectId = Request.Params["ProjectId"];
+ }
+ }
+ #endregion
+
+ #region 审核
+ ///
+ /// 审核
+ ///
+ ///
+ ///
+ protected void btnAudit_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ if (this.fuAttachUrl.HasFile == false)
+ {
+ ShowNotify("请您选择Excel文件!", MessageBoxIcon.Warning);
+ return;
+ }
+ string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower();
+ if (IsXls != ".xls")
+ {
+ ShowNotify("只可以选择Excel文件!", MessageBoxIcon.Warning);
+ return;
+ }
+ if (WeekPlans != null)
+ {
+ WeekPlans.Clear();
+ }
+ if (!string.IsNullOrEmpty(errorInfos))
+ {
+ errorInfos = string.Empty;
+ }
+ string rootPath = Server.MapPath("~/");
+ string initFullPath = rootPath + initPath;
+ if (!Directory.Exists(initFullPath))
+ {
+ Directory.CreateDirectory(initFullPath);
+ }
+
+ this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls;
+ string filePath = initFullPath + this.hdFileName.Text;
+ this.fuAttachUrl.PostedFile.SaveAs(filePath);
+ //PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PersonDataAudit.aspx?FileName={0}&ProjectId={1}", this.hdFileName.Text, Request.Params["ProjectId"], "审核 - ")));
+ ImportXlsToData(rootPath + initPath + this.hdFileName.Text);
+ }
+ catch (Exception ex)
+ {
+ ShowNotify("'" + ex.Message + "'", MessageBoxIcon.Warning);
+ }
+ }
+
+ #region 读Excel提取数据
+ ///
+ /// 从Excel提取数据--》Dataset
+ ///
+ /// Excel文件路径名
+ private void ImportXlsToData(string fileName)
+ {
+ try
+ {
+ string oleDBConnString = String.Empty;
+ oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
+ oleDBConnString += "Data Source=";
+ oleDBConnString += fileName;
+ oleDBConnString += ";Extended Properties=Excel 8.0;";
+ OleDbConnection oleDBConn = null;
+ OleDbDataAdapter oleAdMaster = null;
+ DataTable m_tableName = new DataTable();
+ DataSet ds = new DataSet();
+
+ oleDBConn = new OleDbConnection(oleDBConnString);
+ oleDBConn.Open();
+ m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
+
+ if (m_tableName != null && m_tableName.Rows.Count > 0)
+ {
+
+ m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim();
+
+ }
+ string sqlMaster;
+ sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
+ oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
+ oleAdMaster.Fill(ds, "m_tableName");
+ oleAdMaster.Dispose();
+ oleDBConn.Close();
+ oleDBConn.Dispose();
+
+ AddDatasetToSQL(ds.Tables[0], 8);
+ }
+ catch (Exception ex)
+ {
+ throw ex;
+ }
+ }
+ #endregion
+
+ #region 将Dataset的数据导入数据库
+ ///
+ /// 将Dataset的数据导入数据库
+ ///
+ /// 数据集
+ /// 数据集行数
+ ///
+ private bool AddDatasetToSQL(DataTable pds, int Cols)
+ {
+ string result = string.Empty;
+ int ic, ir;
+ ic = pds.Columns.Count;
+ if (ic < Cols)
+ {
+ Alert.ShowInTop("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "行", MessageBoxIcon.Warning);
+ }
+ ir = pds.Rows.Count;
+ Model.SGGLDB db = Funs.DB;
+ var projectUnits = from x in db.Project_ProjectUnit
+ join y in db.Base_Unit on x.UnitId equals y.UnitId
+ where x.ProjectId == this.CurrUser.LoginProjectId
+ select new { x.UnitId, y.UnitName };
+ var cns = from x in db.Base_CNProfessional select x;
+ var unitWorks = from x in db.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId select x;
+ var projectUsers = from x in db.Project_ProjectUser
+ join y in db.Sys_User on x.UserId equals y.UserId
+ where x.ProjectId == this.CurrUser.LoginProjectId
+ select new { x.UserId, y.UserName };
+ if (pds != null && ir > 0)
+ {
+ for (int i = 0; i < ir; i++)
+ {
+ string col0 = pds.Rows[i][0].ToString().Trim();
+ if (string.IsNullOrEmpty(col0))
+ {
+ result += "第" + (i + 2).ToString() + "行," + "工序/单位工程" + "," + "此项为必填项!" + "|";
+ }
+ else
+ {
+ var unitWork = unitWorks.FirstOrDefault(e => e.UnitWorkName == col0);
+ if (unitWork == null)
+ {
+ result += "第" + (i + 2).ToString() + "行," + "工序/单位工程" + "," + "[" + col0 + "]不在项目单位工程中!" + "|";
+ }
+ }
+
+ string col1 = pds.Rows[i][1].ToString().Trim();
+ if (string.IsNullOrEmpty(col1))
+ {
+ result += "第" + (i + 2).ToString() + "行," + "专业" + "," + "此项为必填项!" + "|";
+ }
+ else
+ {
+ var cn = cns.FirstOrDefault(e => e.ProfessionalName == col1);
+ if (cn == null)
+ {
+ result += "第" + (i + 2).ToString() + "行," + "专业" + "," + "[" + col1 + "]不在专业信息中!" + "|";
+ }
+ }
+
+ string col2 = pds.Rows[i][2].ToString().Trim();
+ if (string.IsNullOrEmpty(col2))
+ {
+ result += "第" + (i + 2).ToString() + "行," + "工作项" + "," + "此项为必填项!" + "|";
+ }
+
+ string col3 = pds.Rows[i][3].ToString().Trim();
+ if (string.IsNullOrEmpty(col3))
+ {
+ result += "第" + (i + 2).ToString() + "行," + "责任单位" + "," + "此项为必填项!" + "|";
+ }
+ else
+ {
+ var unit = projectUnits.FirstOrDefault(e => e.UnitName == col3);
+ if (unit == null)
+ {
+ result += "第" + (i + 2).ToString() + "行," + "责任单位" + "," + "[" + col3 + "]不在项目单位中!" + "|";
+ }
+ }
+
+ string col4 = pds.Rows[i][4].ToString().Trim();
+ if (string.IsNullOrEmpty(col4))
+ {
+ result += "第" + (i + 2).ToString() + "行," + "五环责任人" + "," + "此项为必填项!" + "|";
+ }
+ else
+ {
+ var user = projectUsers.FirstOrDefault(e => e.UserName == col4);
+ if (user == null)
+ {
+ result += "第" + (i + 2).ToString() + "行," + "五环责任人" + "," + "[" + col4 + "]不在项目用户信息中!" + "|";
+ }
+ }
+
+ string col5 = pds.Rows[i][5].ToString().Trim();
+ if (!string.IsNullOrEmpty(col5))
+ {
+ try
+ {
+ DateTime dec = Convert.ToDateTime(col5);
+ }
+ catch (Exception)
+ {
+ result += "第" + (i + 2).ToString() + "行," + "计划完成时间" + "," + "[" + col5 + "]错误!" + "|";
+ }
+ }
+ else
+ {
+ result += "第" + (i + 2).ToString() + "行," + "计划完成时间" + "," + "此项为必填项!" + "|";
+ }
+
+ string col6 = pds.Rows[i][6].ToString().Trim();
+ if (!string.IsNullOrEmpty(col6))
+ {
+ if (col6 != "已完成" && col6 != "未完成")
+ {
+ result += "第" + (i + 2).ToString() + "行," + "完成状态" + "," + "[" + col6 + "]错误!" + "|";
+ }
+ }
+ }
+ if (!string.IsNullOrEmpty(result))
+ {
+ result = result.Substring(0, result.LastIndexOf("|"));
+ errorInfos = result;
+ Alert alert = new Alert
+ {
+ Message = result,
+ Target = Target.Self
+ };
+ alert.Show();
+
+
+ }
+ else
+ {
+ errorInfos = string.Empty;
+ ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success);
+ }
+ }
+ else
+ {
+ ShowNotify("导入数据为空!", MessageBoxIcon.Warning);
+ }
+ return true;
+ }
+ #endregion
+ #endregion
+
+ #region 导入
+ ///
+ /// 导入
+ ///
+ ///
+ ///
+ protected void btnImport_Click(object sender, EventArgs e)
+ {
+ if (string.IsNullOrEmpty(errorInfos))
+ {
+ if (!string.IsNullOrEmpty(this.hdFileName.Text))
+ {
+ string rootPath = Server.MapPath("~/");
+ ImportXlsToData2(rootPath + initPath + this.hdFileName.Text);
+ }
+ else
+ {
+ ShowNotify("请先审核要导入的文件!", MessageBoxIcon.Warning);
+ }
+ }
+ else
+ {
+ Alert.ShowInTop("请先将错误数据修正,再重新导入保存!", MessageBoxIcon.Warning);
+ }
+ }
+
+ #region Excel提取数据
+ ///
+ /// 从Excel提取数据--》Dataset
+ ///
+ /// Excel文件路径名
+ private void ImportXlsToData2(string fileName)
+ {
+ try
+ {
+ string oleDBConnString = String.Empty;
+ oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
+ oleDBConnString += "Data Source=";
+ oleDBConnString += fileName;
+ oleDBConnString += ";Extended Properties=Excel 8.0;";
+ OleDbConnection oleDBConn = null;
+ OleDbDataAdapter oleAdMaster = null;
+ DataTable m_tableName = new DataTable();
+ DataSet ds = new DataSet();
+
+ oleDBConn = new OleDbConnection(oleDBConnString);
+ oleDBConn.Open();
+ m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
+
+ if (m_tableName != null && m_tableName.Rows.Count > 0)
+ {
+
+ m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim();
+
+ }
+ string sqlMaster;
+ sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
+ oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
+ oleAdMaster.Fill(ds, "m_tableName");
+ oleAdMaster.Dispose();
+ oleDBConn.Close();
+ oleDBConn.Dispose();
+
+ AddDatasetToSQL2(ds.Tables[0], 8);
+ }
+ catch (Exception ex)
+ {
+ throw ex;
+ }
+ }
+ #endregion
+
+ #region 将Dataset的数据导入数据库
+ ///
+ /// 将Dataset的数据导入数据库
+ ///
+ /// 数据集
+ /// 数据集列数
+ ///
+ private bool AddDatasetToSQL2(DataTable pds, int Cols)
+ {
+ int ic, ir;
+ WeekPlans.Clear();
+ ic = pds.Columns.Count;
+ if (ic < Cols)
+ {
+ Alert.ShowInTop("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning);
+ }
+
+ ir = pds.Rows.Count;
+ Model.SGGLDB db = Funs.DB;
+ var projectUnits = from x in db.Project_ProjectUnit
+ join y in db.Base_Unit on x.UnitId equals y.UnitId
+ where x.ProjectId == this.CurrUser.LoginProjectId
+ select new { x.UnitId, y.UnitName };
+ var projectUsers = from x in db.Project_ProjectUser
+ join y in db.Sys_User on x.UserId equals y.UserId
+ where x.ProjectId == this.CurrUser.LoginProjectId
+ select new { x.UserId, y.UserName };
+ var cns = from x in db.Base_CNProfessional select x;
+ var unitWorks = from x in db.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId select x;
+ string weekNo = this.txtWeekNo.Text.Trim();
+ DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
+ DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
+ if (pds != null && ir > 0)
+ {
+ for (int i = 0; i < ir; i++)
+ {
+ Model.JDGL_WeekPlan WeekPlan = new Model.JDGL_WeekPlan();
+ string col0 = pds.Rows[i][0].ToString().Trim();
+ string col1 = pds.Rows[i][1].ToString().Trim();
+ string col2 = pds.Rows[i][2].ToString().Trim();
+ string col3 = pds.Rows[i][3].ToString().Trim();
+ string col4 = pds.Rows[i][4].ToString().Trim();
+ string col5 = pds.Rows[i][5].ToString().Trim();
+ string col6 = pds.Rows[i][6].ToString().Trim();
+ string col7 = pds.Rows[i][7].ToString().Trim();
+ WeekPlan.WeekNo = weekNo;
+ WeekPlan.StartDate = startDate;
+ WeekPlan.EndDate = endDate;
+ if (!string.IsNullOrEmpty(col0))//单位工程
+ {
+ var unitWork = unitWorks.FirstOrDefault(x => x.UnitWorkName == col0);
+ if (unitWork != null)
+ {
+ WeekPlan.UnitWork = unitWork.UnitWorkId;
+ }
+ }
+ if (!string.IsNullOrEmpty(col1))//专业
+ {
+ var cn = cns.FirstOrDefault(x => x.ProfessionalName == col1);
+ if (cn != null)
+ {
+ WeekPlan.Major = cn.CNProfessionalId;
+ }
+ }
+ if (!string.IsNullOrEmpty(col2))//工作项
+ {
+ WeekPlan.WorkContent = col2;
+ }
+ if (!string.IsNullOrEmpty(col3))//责任单位
+ {
+ var projectUnit = projectUnits.FirstOrDefault(x => x.UnitName == col3);
+ if (projectUnit != null)
+ {
+ WeekPlan.UnitId = projectUnit.UnitId;
+ }
+ }
+ if (!string.IsNullOrEmpty(col4))//五环责任人
+ {
+ var projectUser = projectUsers.FirstOrDefault(x => x.UserName == col4);
+ if (projectUser != null)
+ {
+ WeekPlan.DutyPerson = projectUser.UserId;
+ }
+ }
+ if (!string.IsNullOrEmpty(col5))//计划完成时间
+ {
+ WeekPlan.PlanDate = Funs.GetNewDateTime(col5);
+
+ }
+ if (!string.IsNullOrEmpty(col6))//完成状态
+ {
+ WeekPlan.IsOK = col6 == "已完成" ? true : false;
+ }
+ if (!string.IsNullOrEmpty(col7))//备注
+ {
+ WeekPlan.Remark = col7;
+ }
+ int num = (from x in Funs.DB.JDGL_WeekPlan where x.WeekNo == weekNo && x.ProjectId == this.CurrUser.LoginProjectId select x).Count();
+ WeekPlan.SortIndex = num + 1;
+ WeekPlan.WeekPlanId = SQLHelper.GetNewID(typeof(Model.JDGL_WeekPlan));
+ WeekPlans.Add(WeekPlan);
+ }
+ if (WeekPlans.Count > 0)
+ {
+ this.Grid1.Hidden = false;
+ this.Grid1.DataSource = WeekPlans;
+ this.Grid1.DataBind();
+ }
+ }
+ else
+ {
+ ShowNotify("导入数据为空!", MessageBoxIcon.Warning);
+ }
+ return true;
+ }
+ #endregion
+ #endregion
+
+ #region 保存
+ ///
+ /// 保存
+ ///
+ ///
+ ///
+ protected void btnSave_Click(object sender, EventArgs e)
+ {
+ if (string.IsNullOrEmpty(this.txtWeekNo.Text.Trim()))
+ {
+ ShowNotify("请选择周号!", MessageBoxIcon.Warning);
+ return;
+ }
+ if (string.IsNullOrEmpty(errorInfos))
+ {
+ var WeekPlanLists = from x in Funs.DB.JDGL_WeekPlan where x.ProjectId == this.ProjectId select x;
+ string quantityListId = string.Empty;
+ int a = WeekPlans.Count();
+ string weekNo = this.txtWeekNo.Text.Trim();
+
+ for (int i = 0; i < a; i++)
+ {
+ var oldWeekPlan = WeekPlanLists.FirstOrDefault(x => x.ProjectId == this.ProjectId && x.WeekNo == weekNo && x.UnitId == WeekPlans[i].UnitId && x.WorkContent == WeekPlans[i].WorkContent);
+ if (oldWeekPlan == null)
+ {
+ Model.JDGL_WeekPlan newWeekPlan = new Model.JDGL_WeekPlan();
+ newWeekPlan.WeekPlanId = SQLHelper.GetNewID(typeof(Model.JDGL_WeekPlan));
+ newWeekPlan.ProjectId = this.ProjectId;
+ newWeekPlan.WeekNo = weekNo;
+ newWeekPlan.StartDate= WeekPlans[i].StartDate;
+ newWeekPlan.EndDate = WeekPlans[i].EndDate;
+ newWeekPlan.UnitWork = WeekPlans[i].UnitWork;
+ newWeekPlan.Major = WeekPlans[i].Major;
+ newWeekPlan.WorkContent = WeekPlans[i].WorkContent;
+ newWeekPlan.UnitId = WeekPlans[i].UnitId;
+ newWeekPlan.DutyPerson = WeekPlans[i].DutyPerson;
+ newWeekPlan.PlanDate = WeekPlans[i].PlanDate;
+ newWeekPlan.IsOK = WeekPlans[i].IsOK;
+ newWeekPlan.Remark = WeekPlans[i].Remark;
+ newWeekPlan.SortIndex = WeekPlans[i].SortIndex;
+ newWeekPlan.CompileMan = this.CurrUser.UserId;
+ newWeekPlan.CompileDate = DateTime.Now;
+ BLL.WeekPlanService.AddWeekPlan(newWeekPlan);
+ }
+ else
+ {
+ oldWeekPlan.UnitWork = WeekPlans[i].UnitWork;
+ oldWeekPlan.Major = WeekPlans[i].Major;
+ oldWeekPlan.WorkContent = WeekPlans[i].WorkContent;
+ oldWeekPlan.UnitId = WeekPlans[i].UnitId;
+ oldWeekPlan.DutyPerson = WeekPlans[i].DutyPerson;
+ oldWeekPlan.PlanDate = WeekPlans[i].PlanDate;
+ oldWeekPlan.IsOK = WeekPlans[i].IsOK;
+ oldWeekPlan.Remark = WeekPlans[i].Remark;
+ BLL.WeekPlanService.UpdateWeekPlan(oldWeekPlan);
+ }
+ }
+ string rootPath = Server.MapPath("~/");
+ string initFullPath = rootPath + initPath;
+ string filePath = initFullPath + this.hdFileName.Text;
+ if (filePath != string.Empty && System.IO.File.Exists(filePath))
+ {
+ System.IO.File.Delete(filePath);//删除上传的XLS文件
+ }
+ ShowNotify("导入成功!", MessageBoxIcon.Success);
+ PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
+ }
+ else
+ {
+ Alert.ShowInTop("请先将错误数据修正,再重新导入保存!", MessageBoxIcon.Warning);
+ }
+ }
+ #endregion
+
+ #region 导出错误提示
+ ///
+ /// 导出错误提示
+ ///
+ ///
+ ///
+ protected void btnOut_Click(object sender, EventArgs e)
+ {
+ //string strFileName = DateTime.Now.ToString("yyyyMMdd-hhmmss");
+ //System.Web.HttpContext HC = System.Web.HttpContext.Current;
+ //HC.Response.Clear();
+ //HC.Response.Buffer = true;
+ //HC.Response.ContentEncoding = System.Text.Encoding.UTF8;//设置输出流为简体中文
+
+ ////---导出为Excel文件
+ //HC.Response.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(strFileName, System.Text.Encoding.UTF8) + ".xls");
+ //HC.Response.ContentType = "application/ms-excel";//设置输出文件类型为excel文件。
+
+ //System.IO.StringWriter sw = new System.IO.StringWriter();
+ //System.Web.UI.HtmlTextWriter htw = new System.Web.UI.HtmlTextWriter(sw);
+ //this.gvErrorInfo.RenderControl(htw);
+ //HC.Response.Write(sw.ToString());
+ //HC.Response.End();
+ }
+
+ ///
+ /// 重载VerifyRenderingInServerForm方法,否则运行的时候会出现如下错误提示:“类型“GridView”的控件“GridView1”必须放在具有 runat=server 的窗体标记内”
+ ///
+ ///
+ public override void VerifyRenderingInServerForm(Control control)
+ {
+ }
+ #endregion
+
+ #region 下载模板
+ ///
+ /// 下载模板按钮
+ ///
+ ///
+ ///
+ protected void btnDownLoad_Click(object sender, EventArgs e)
+ {
+ PageContext.RegisterStartupScript(Confirm.GetShowReference("确定下载导入模板吗?", String.Empty, MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), PageManager1.GetCustomEventReference("Confirm_Cancel")));
+ }
+
+ ///
+ /// 下载导入模板
+ ///
+ ///
+ ///
+ protected void PageManager1_CustomEvent(object sender, CustomEventArgs e)
+ {
+ if (e.EventArgument == "Confirm_OK")
+ {
+ string rootPath = Server.MapPath("~/");
+ string uploadfilepath = rootPath + Const.WeekPlanTemplateUrl;
+ string filePath = Const.WeekPlanTemplateUrl;
+ string fileName = Path.GetFileName(filePath);
+ FileInfo info = new FileInfo(uploadfilepath);
+ long fileSize = info.Length;
+ Response.ClearContent();
+ Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
+ Response.ContentType = "excel/plain";
+ Response.ContentEncoding = System.Text.Encoding.UTF8;
+ Response.AddHeader("Content-Length", fileSize.ToString().Trim());
+ Response.TransmitFile(uploadfilepath, 0, fileSize);
+ Response.End();
+ }
+ }
+ #endregion
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ protected string ConvertUnitName(object UnitId)
+ {
+ string name = string.Empty;
+ if (UnitId != null)
+ {
+ name = BLL.UnitService.GetUnitNameByUnitId(UnitId.ToString());
+ }
+ return name;
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ protected string ConvertDutyPersonName(object DutyPerson)
+ {
+ string name = string.Empty;
+ if (DutyPerson != null)
+ {
+ name = BLL.UserService.GetUserNameByUserId(DutyPerson.ToString());
+ }
+ return name;
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ protected string ConvertUnitWorkName(object UnitWork)
+ {
+ string name = string.Empty;
+ if (UnitWork != null)
+ {
+ Model.WBS_UnitWork uw = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(UnitWork.ToString());
+ if (uw != null)
+ {
+ name = uw.UnitWorkName;
+ }
+ }
+ return name;
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ protected string ConvertProfessionalName(object Major)
+ {
+ string name = string.Empty;
+ if (Major != null)
+ {
+ Model.Base_CNProfessional major = BLL.CNProfessionalService.GetCNProfessional(Major.ToString());
+ if (major != null)
+ {
+ name = major.ProfessionalName;
+ }
+ }
+ return name;
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ protected string ConvertIsOK(object IsOK)
+ {
+ string name = string.Empty;
+ if (IsOK != null)
+ {
+ if (IsOK.ToString() == "True")
+ {
+ name = "已完成";
+ }
+ else
+ {
+ name = "未完成";
+ }
+ }
+ return name;
+ }
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx.designer.cs b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx.designer.cs
new file mode 100644
index 00000000..f23fddd1
--- /dev/null
+++ b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx.designer.cs
@@ -0,0 +1,204 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.JDGL.Check {
+
+
+ public partial class WeekPlanIn {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// SimpleForm1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form SimpleForm1;
+
+ ///
+ /// Toolbar2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar2;
+
+ ///
+ /// txtWeekNo 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtWeekNo;
+
+ ///
+ /// txtStartDate 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtStartDate;
+
+ ///
+ /// txtEndDate 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtEndDate;
+
+ ///
+ /// btnAudit 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnAudit;
+
+ ///
+ /// btnImport 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnImport;
+
+ ///
+ /// btnSave 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSave;
+
+ ///
+ /// btnDownLoad 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnDownLoad;
+
+ ///
+ /// fuAttachUrl 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.FileUpload fuAttachUrl;
+
+ ///
+ /// Grid1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid1;
+
+ ///
+ /// Label2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label2;
+
+ ///
+ /// Label3 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label3;
+
+ ///
+ /// Label4 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label4;
+
+ ///
+ /// lbImageUrl 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label lbImageUrl;
+
+ ///
+ /// Label1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label1;
+
+ ///
+ /// Label5 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label5;
+
+ ///
+ /// hdFileName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.HiddenField hdFileName;
+
+ ///
+ /// hdCheckResult 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.HiddenField hdCheckResult;
+ }
+}
diff --git a/SGGL/FineUIPro.Web/Web.config b/SGGL/FineUIPro.Web/Web.config
index 9fc55c34..eafda425 100644
--- a/SGGL/FineUIPro.Web/Web.config
+++ b/SGGL/FineUIPro.Web/Web.config
@@ -77,7 +77,7 @@
-
+
diff --git a/SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx.cs
index 8968a929..f926ddf3 100644
--- a/SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx.cs
+++ b/SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx.cs
@@ -250,15 +250,12 @@ namespace FineUIPro.Web.ZHGL.InspectionSummary
}).ToList();
//一次共检合格数
- var list20 = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
- join y in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals y.InspectionId
- where y.IsOnceQualified == true && y.InspectionDate != null
- select new { y.ProjectId,y.InspectionDate,y.IsOnceQualified,x.InspectionId, Isid= y.InspectionId }).ToList();
+ var list20 = (from x in Funs.DB.ProcessControl_InspectionManagement
+ where x.IsOnceQualified == true
+ select new { x.ProjectId,x.CompileDate,x.IsOnceQualified,x.InspectionId, Isid= x.InspectionId }).ToList();
////总数
- var list21 = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
- join y in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals y.InspectionId
- where y.InspectionDate != null
- select new { y.ProjectId, x.InspectionId, Isid = y.InspectionId,y.InspectionDate }).ToList();
+ var list21 = (from x in Funs.DB.ProcessControl_InspectionManagement
+ select new { x.ProjectId, x.InspectionId, Isid = x.InspectionId,x.CompileDate }).ToList();
//关键事项
var list22 = (from x in Funs.DB.GJSX
@@ -639,7 +636,7 @@ namespace FineUIPro.Web.ZHGL.InspectionSummary
if (hgs>0)
{
//验收日期
- model.CompileDate = list20.Where(x => x.ProjectId == pid).OrderByDescending(x => x.InspectionDate).FirstOrDefault().InspectionDate;
+ model.CompileDate = list20.Where(x => x.ProjectId == pid).OrderByDescending(x => x.CompileDate).FirstOrDefault().CompileDate;
}
model.SummeryResult = hgs.ToString();
allList.Add(model);
diff --git a/SGGL/FineUIPro.Web/common/Menu_JDGL.xml b/SGGL/FineUIPro.Web/common/Menu_JDGL.xml
index 2fac288a..b34c5503 100644
--- a/SGGL/FineUIPro.Web/common/Menu_JDGL.xml
+++ b/SGGL/FineUIPro.Web/common/Menu_JDGL.xml
@@ -11,6 +11,7 @@
+
diff --git a/SGGL/FineUIPro.Web/common/mainMenu_CQMS.aspx b/SGGL/FineUIPro.Web/common/mainMenu_CQMS.aspx
index 4e1a7268..e209644b 100644
--- a/SGGL/FineUIPro.Web/common/mainMenu_CQMS.aspx
+++ b/SGGL/FineUIPro.Web/common/mainMenu_CQMS.aspx
@@ -291,9 +291,9 @@
var one1 =<%=One1 %>
var one2 =<%=One2 %>
var one3 =<%=One3 %>
- category_One('one1', "质量验收一次合格率", one1, one1 + "%")
+ category_One('one1', "施工质量一次共检合格率", one1, one1 + "%")
category_One('one2', "焊接一次拍片合格率", one2, one2 + "%")
- category_One('one3', "质量问题整改完成率", one3, one3 + "%")
+ category_One('one3', "质量巡检问题整改率", one3, one3 + "%")