From d28f7920d8c82ae74b3b4579a35df26704bc6372 Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Wed, 28 Feb 2024 16:45:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + .../SGGLDB_WH_2024-02-28-gaofei.sql | 164 +++ SGGL/BLL/BLL.csproj | 2 + SGGL/BLL/Common/Const.cs | 26 +- .../BLL/TestRun/DriverRun/DriverRunService.cs | 26 + .../TestRunConstructSolutionApproveService.cs | 488 +++++++ .../TestRunConstructSolutionService.cs | 423 ++++++ .../CQMS/Solution/ConstructSolution.aspx.cs | 4 +- SGGL/FineUIPro.Web/ErrLog.txt | 537 ++++++++ SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 8 + SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user | 2 +- SGGL/FineUIPro.Web/TestRun/DriverScheme.aspx | 197 +-- .../TestRun/DriverScheme.aspx.cs | 290 +++- .../TestRun/DriverScheme.aspx.designer.cs | 90 +- .../TestRun/DriverSchemeEdit.aspx | 324 ++++- .../TestRun/DriverSchemeEdit.aspx.cs | 1182 +++++++++++++++-- .../TestRun/DriverSchemeEdit.aspx.designer.cs | 326 ++++- .../TestRun/DriverSchemeView.aspx | 302 +++++ .../TestRun/DriverSchemeView.aspx.cs | 329 +++++ .../TestRun/DriverSchemeView.aspx.designer.cs | 294 ++++ SGGL/Model/Model.cs | 1067 +++++++++++++++ .../TestRun/DriverRunController.cs | 166 +++ SGGL/WebAPI/WebAPI.csproj | 1 + SGGL/WebAPI/WebAPI.csproj.user | 10 +- 24 files changed, 5866 insertions(+), 393 deletions(-) create mode 100644 DataBase/版本日志/SGGLDB_WH_2024-02-28-gaofei.sql create mode 100644 SGGL/BLL/TestRun/TestRunConstructSolutionApproveService.cs create mode 100644 SGGL/BLL/TestRun/TestRunConstructSolutionService.cs create mode 100644 SGGL/FineUIPro.Web/TestRun/DriverSchemeView.aspx create mode 100644 SGGL/FineUIPro.Web/TestRun/DriverSchemeView.aspx.cs create mode 100644 SGGL/FineUIPro.Web/TestRun/DriverSchemeView.aspx.designer.cs create mode 100644 SGGL/WebAPI/Controllers/TestRun/DriverRunController.cs diff --git a/.gitignore b/.gitignore index 9d3c75c0..7304681f 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,4 @@ /SGGL/FineUIPro.Web/ErrLog.txt /SGGL/FineUIPro.Web/FileUpload/TestRun/DriverSub/DriverSub/2024-02 /SGGL/FineUIPro.Web/FileUpload/TestRun/DriverRun +/SGGL/FineUIPro.Web/FileUpload/Solution/2024-02 diff --git a/DataBase/版本日志/SGGLDB_WH_2024-02-28-gaofei.sql b/DataBase/版本日志/SGGLDB_WH_2024-02-28-gaofei.sql new file mode 100644 index 00000000..792d3064 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_2024-02-28-gaofei.sql @@ -0,0 +1,164 @@ + +CREATE TABLE [dbo].[Solution_TestRunConstructSolution]( + [ConstructSolutionId] [nvarchar](50) NOT NULL, + [Code] [nvarchar](50) NULL, + [ProjectId] [nvarchar](50) NULL, + [UnitId] [nvarchar](50) NULL, + [SolutionName] [nvarchar](100) NULL, + [SolutionType] [nvarchar](50) NULL, + [UnitWorkIds] [nvarchar](2000) NULL, + [CNProfessionalCodes] [nvarchar](500) NULL, + [AttachUrl] [nvarchar](2000) NULL, + [CompileMan] [nvarchar](50) NULL, + [CompileDate] [datetime] NULL, + [State] [char](1) NULL, + [Edition] [int] NULL, + [SpecialSchemeTypeId] [nvarchar](50) NULL, + [Content] [nvarchar](2000) NULL, + CONSTRAINT [PK_Solution_TestRunConstructSolution] PRIMARY KEY CLUSTERED +( + [ConstructSolutionId] 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 + +SET ANSI_PADDING OFF +GO + +ALTER TABLE [dbo].[Solution_TestRunConstructSolution] WITH CHECK ADD CONSTRAINT [FK_Solution_TestRunConstructSolution_Base_Project] FOREIGN KEY([ProjectId]) +REFERENCES [dbo].[Base_Project] ([ProjectId]) +GO + +ALTER TABLE [dbo].[Solution_TestRunConstructSolution] CHECK CONSTRAINT [FK_Solution_TestRunConstructSolution_Base_Project] +GO + +ALTER TABLE [dbo].[Solution_TestRunConstructSolution] WITH CHECK ADD CONSTRAINT [FK_Solution_TestRunConstructSolution_Base_SpecialSchemeType] FOREIGN KEY([SpecialSchemeTypeId]) +REFERENCES [dbo].[Base_SpecialSchemeType] ([SpecialSchemeTypeId]) +GO + +ALTER TABLE [dbo].[Solution_TestRunConstructSolution] CHECK CONSTRAINT [FK_Solution_TestRunConstructSolution_Base_SpecialSchemeType] +GO + +ALTER TABLE [dbo].[Solution_TestRunConstructSolution] WITH CHECK ADD CONSTRAINT [FK_Solution_TestRunConstructSolution_Base_Unit] FOREIGN KEY([UnitId]) +REFERENCES [dbo].[Base_Unit] ([UnitId]) +GO + +ALTER TABLE [dbo].[Solution_TestRunConstructSolution] CHECK CONSTRAINT [FK_Solution_TestRunConstructSolution_Base_Unit] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_TestRunConstructSolution', @level2type=N'COLUMN',@level2name=N'ConstructSolutionId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_TestRunConstructSolution', @level2type=N'COLUMN',@level2name=N'Code' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_TestRunConstructSolution', @level2type=N'COLUMN',@level2name=N'ProjectId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʩλId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_TestRunConstructSolution', @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'Solution_TestRunConstructSolution', @level2type=N'COLUMN',@level2name=N'SolutionName' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'1-ʩ֯ƣ2-רʩ3-ʩ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_TestRunConstructSolution', @level2type=N'COLUMN',@level2name=N'SolutionType' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'λ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_TestRunConstructSolution', @level2type=N'COLUMN',@level2name=N'UnitWorkIds' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'רҵ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_TestRunConstructSolution', @level2type=N'COLUMN',@level2name=N'CNProfessionalCodes' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_TestRunConstructSolution', @level2type=N'COLUMN',@level2name=N'AttachUrl' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_TestRunConstructSolution', @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'Solution_TestRunConstructSolution', @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'Solution_TestRunConstructSolution', @level2type=N'COLUMN',@level2name=N'State' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_TestRunConstructSolution', @level2type=N'COLUMN',@level2name=N'SpecialSchemeTypeId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_TestRunConstructSolution', @level2type=N'COLUMN',@level2name=N'Content' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʩ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_TestRunConstructSolution' +GO + + + +CREATE TABLE [dbo].[Solution_TestRunConstructSolutionApprove]( + [ConstructSolutionApproveId] [nvarchar](50) NOT NULL, + [ConstructSolutionId] [nvarchar](50) NULL, + [ApproveMan] [nvarchar](50) NULL, + [ApproveDate] [datetime] NULL, + [IsAgree] [bit] NULL, + [ApproveIdea] [nvarchar](200) NULL, + [ApproveType] [char](1) NULL, + [AttachUrl] [nvarchar](200) NULL, + [SignType] [nvarchar](20) NULL, + [Edition] [int] NULL, + [order] [int] NULL, + CONSTRAINT [PK_Solution_TestRunConstructSolutionApprove] PRIMARY KEY CLUSTERED +( + [ConstructSolutionApproveId] 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 + +SET ANSI_PADDING OFF +GO + +ALTER TABLE [dbo].[Solution_TestRunConstructSolutionApprove] WITH CHECK ADD CONSTRAINT [FK_Solution_TestRunConstructSolutionApprove_Solution_TestRunConstructSolution] FOREIGN KEY([ConstructSolutionId]) +REFERENCES [dbo].[Solution_TestRunConstructSolution] ([ConstructSolutionId]) +GO + +ALTER TABLE [dbo].[Solution_TestRunConstructSolutionApprove] CHECK CONSTRAINT [FK_Solution_TestRunConstructSolutionApprove_Solution_TestRunConstructSolution] +GO + +ALTER TABLE [dbo].[Solution_TestRunConstructSolutionApprove] WITH CHECK ADD CONSTRAINT [FK_Solution_TestRunConstructSolutionApprove_Sys_User] FOREIGN KEY([ApproveMan]) +REFERENCES [dbo].[Sys_User] ([UserId]) +GO + +ALTER TABLE [dbo].[Solution_TestRunConstructSolutionApprove] CHECK CONSTRAINT [FK_Solution_TestRunConstructSolutionApprove_Sys_User] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_TestRunConstructSolutionApprove', @level2type=N'COLUMN',@level2name=N'ConstructSolutionApproveId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_TestRunConstructSolutionApprove', @level2type=N'COLUMN',@level2name=N'ConstructSolutionId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_TestRunConstructSolutionApprove', @level2type=N'COLUMN',@level2name=N'ApproveMan' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_TestRunConstructSolutionApprove', @level2type=N'COLUMN',@level2name=N'ApproveDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ƿͬ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_TestRunConstructSolutionApprove', @level2type=N'COLUMN',@level2name=N'IsAgree' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_TestRunConstructSolutionApprove', @level2type=N'COLUMN',@level2name=N'ApproveIdea' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_TestRunConstructSolutionApprove', @level2type=N'COLUMN',@level2name=N'ApproveType' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_TestRunConstructSolutionApprove', @level2type=N'COLUMN',@level2name=N'AttachUrl' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_TestRunConstructSolutionApprove', @level2type=N'COLUMN',@level2name=N'order' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʩ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_TestRunConstructSolutionApprove' +GO + + diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj index a1546ac2..adb575c2 100644 --- a/SGGL/BLL/BLL.csproj +++ b/SGGL/BLL/BLL.csproj @@ -771,6 +771,8 @@ + + diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index 07121580..ac17c992 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -4779,6 +4779,30 @@ namespace BLL /// 流程闭环 /// public static string DriverRun_Complete = "6"; + #endregion + + #region 开车方案流程定义 + + /// + /// 重报 + /// + public const string TestRunConstructSolution_ReCompile = "0"; + + /// + /// 编制 + /// + public static string TestRunConstructSolution_Compile = "1"; + + /// + /// 会签 + /// + public static string TestRunConstructSolution_Audit = "2"; + + /// + /// 审批完成 + /// + public static string TestRunConstructSolution_Complete = "3"; + #endregion #endregion @@ -5238,7 +5262,7 @@ namespace BLL /// /// 开车方案管理 /// - public const string DriverSchemeMenuId = "CAA63693-5D41-4018-9FF7-AAB311E6D8E0"; + public const string TestRunConstructSolutionMenuId = "CAA63693-5D41-4018-9FF7-AAB311E6D8E0"; /// /// 开车进度管理 diff --git a/SGGL/BLL/TestRun/DriverRun/DriverRunService.cs b/SGGL/BLL/TestRun/DriverRun/DriverRunService.cs index d90ec97e..878f18e1 100644 --- a/SGGL/BLL/TestRun/DriverRun/DriverRunService.cs +++ b/SGGL/BLL/TestRun/DriverRun/DriverRunService.cs @@ -49,6 +49,32 @@ namespace BLL Funs.DB.SubmitChanges(); } + public static void AddDriverRunForApi(Model.DriverRun_DriverRun driverRun) + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + Model.DriverRun_DriverRun newDriverRun = new Model.DriverRun_DriverRun(); + newDriverRun.DriverRunId = driverRun.DriverRunId; + newDriverRun.ProjectId = driverRun.ProjectId; + newDriverRun.Code = driverRun.Code; + newDriverRun.UnitId = driverRun.UnitId; + newDriverRun.Implement = driverRun.Implement; + newDriverRun.Descriptions = driverRun.Descriptions; + newDriverRun.InstallationId = driverRun.InstallationId; + newDriverRun.InstallationNames = driverRun.InstallationNames; + newDriverRun.Objective = driverRun.Objective; + newDriverRun.NeedCompletedDate = driverRun.NeedCompletedDate; + newDriverRun.CompileMan = driverRun.CompileMan; + newDriverRun.CompileDate = driverRun.CompileDate; + newDriverRun.AttachUrl = driverRun.AttachUrl; + newDriverRun.Remark = driverRun.Remark; + newDriverRun.State = driverRun.State; + + db.DriverRun_DriverRun.InsertOnSubmit(newDriverRun); + db.SubmitChanges(); + } + } + /// /// 修改开车保运管理 /// diff --git a/SGGL/BLL/TestRun/TestRunConstructSolutionApproveService.cs b/SGGL/BLL/TestRun/TestRunConstructSolutionApproveService.cs new file mode 100644 index 00000000..70130359 --- /dev/null +++ b/SGGL/BLL/TestRun/TestRunConstructSolutionApproveService.cs @@ -0,0 +1,488 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + public class TestRunConstructSolutionApproveService + { + public static Model.Solution_TestRunConstructSolutionApprove GetSee(string ConstructSolutionId, string userId) + { + Model.SGGLDB db = Funs.DB; + return db.Solution_TestRunConstructSolutionApprove.FirstOrDefault(x => x.ConstructSolutionId == ConstructSolutionId && x.ApproveType == "S" && x.ApproveMan == userId && x.ApproveDate == null); + } + + public static void See(string ConstructSolutionId, string userId) + { + using (var db = new Model.SGGLDB(Funs.ConnString)) + { + var res = db.Solution_TestRunConstructSolutionApprove.FirstOrDefault(x => x.ConstructSolutionId == ConstructSolutionId && x.ApproveType == "S" && x.ApproveMan == userId && x.ApproveDate == null); + if (res != null) + { + res.ApproveDate = DateTime.Now; + db.SubmitChanges(); + } + } + } + /// + /// 根据施工方案发布Id获取对应组会签人id集合信息 + /// + /// 施工方案发布Id + /// 施工方案审批集合 + public static List GetUserIdsApprovesBySignType(string ConstructSolutionId, string signType) + { + var edtion = GetUserIdsApprovesBySignTypeEditon(ConstructSolutionId); + return (from x in Funs.DB.Solution_TestRunConstructSolutionApprove where x.ConstructSolutionId == ConstructSolutionId && x.ApproveType != "S" && x.SignType == signType && x.Edition == edtion select x.ApproveMan).ToList(); + } + + public static int? GetUserIdsApprovesBySignTypeEditon(string ConstructSolutionId) + { + int edition = 0; + var solution = Funs.DB.Solution_TestRunConstructSolution.FirstOrDefault(p => p.ConstructSolutionId == ConstructSolutionId); + if (solution != null) + { + edition = Convert.ToInt32(solution.Edition); + } + return edition; + } + + /// + /// 修改施工方案审批信息 + /// + /// 施工方案审批实体 + public static void UpdateConstructSolutionApprove(Model.Solution_TestRunConstructSolutionApprove approve) + { + Model.SGGLDB db = Funs.DB; + Model.Solution_TestRunConstructSolutionApprove newApprove = db.Solution_TestRunConstructSolutionApprove.First(e => e.ConstructSolutionApproveId == approve.ConstructSolutionApproveId && e.ApproveDate == null); + newApprove.ConstructSolutionId = approve.ConstructSolutionId; + newApprove.ApproveMan = approve.ApproveMan; + newApprove.ApproveDate = approve.ApproveDate; + newApprove.ApproveIdea = approve.ApproveIdea; + newApprove.IsAgree = approve.IsAgree; + newApprove.ApproveType = approve.ApproveType; + newApprove.Edition = approve.Edition; + newApprove.Order = approve.Order; + db.SubmitChanges(); + } + /// + /// 根据施工方案发布Id获取所以对应施工方案审批信息(查询全部会签状态) + /// + /// 施工方案发布Id + /// 施工方案审批集合 + public static List GetHandleConstructSolutionApprovesByConstructSolutionId(string ConstructSolutionId, int edition) + { + var list = Funs.DB.Solution_TestRunConstructSolutionApprove.Where(p => p.ConstructSolutionId == ConstructSolutionId && p.ApproveType == Const.TestRunConstructSolution_Audit && p.Edition == edition).ToList(); + return list; + + } + + public static List GetHandleConstruct(string ConstructSolutionId, int edition) + { + var list = Funs.DB.Solution_TestRunConstructSolutionApprove.Where(p => p.ConstructSolutionId == ConstructSolutionId && p.ApproveType != "S" && p.ApproveDate != null && p.Edition == edition).ToList(); + return list; + + } + /// + /// 根据施工方案发布Id获取所以对应施工方案审批信息 + /// + /// 施工方案发布Id + /// 施工方案审批集合 + public static List GetConstructSolutionApprovesByConstructSolutionId(string ConstructSolutionId, string state) + { + Model.SGGLDB db = Funs.DB; + var reDate = (from x in db.Solution_TestRunConstructSolutionApprove where x.ConstructSolutionId == ConstructSolutionId && x.ApproveType == BLL.Const.TestRunConstructSolution_ReCompile orderby x.ApproveDate descending select x.ApproveDate).FirstOrDefault(); + if (reDate == null) + { + return (from x in db.Solution_TestRunConstructSolutionApprove where x.ConstructSolutionId == ConstructSolutionId && x.ApproveType == state select x).ToList(); + } + else + { + return (from x in db.Solution_TestRunConstructSolutionApprove where x.ConstructSolutionId == ConstructSolutionId && x.ApproveType == state && (x.ApproveDate == null || x.ApproveDate > reDate) select x).ToList(); + } + } + + /// + /// 获取施工方案模板列表 + /// + /// + /// + /// + public static IList getListData(string ConstructSolutionId) + { + Model.SGGLDB db = Funs.DB; + var res = from x in db.Solution_TestRunConstructSolutionApprove + where x.ConstructSolutionId == ConstructSolutionId && x.ApproveDate != null && x.ApproveType != "S" + orderby x.ApproveDate + select x; + + //select new + //{ + // x.ConstructSolutionApproveId, + // x.ConstructSolutionId, + // x.ApproveMan, + // x.ApproveDate, + // x.IsAgree, + // x.ApproveIdea, + // x.ApproveType, + // x.SignType, + // //= x.IsAgree == true ? "是" : "否", + //}; + return res.ToList(); + } + + /// + /// 获取未代办的记录数量 + /// + /// + /// + /// + public static int getListSolutionApproveCount(string constructSolutionId, string man, string signType) + { + + var res = (from x in Funs.DB.Solution_TestRunConstructSolutionApprove + where x.ConstructSolutionId == constructSolutionId && x.ApproveDate == null && x.ApproveType != "S" && x.ApproveMan.Equals(man) && x.SignType == signType + orderby x.ApproveDate + select x).Count(); + return res; + } + public static IList getListSolutionApprove(string constructSolutionId, string man) + { + + var res = (from x in Funs.DB.Solution_TestRunConstructSolutionApprove + where x.ConstructSolutionId == constructSolutionId && x.ApproveDate == null && x.ApproveType != "S" && x.ApproveMan.Equals(man) + orderby x.ApproveDate + select x).ToList(); + return res; + } + /// + /// 删除未代办的记录 + /// + /// + public static void delSolutionApprove(string constructSolutionId, string man) + { + Model.SGGLDB db = Funs.DB; + var q = (from x in Funs.DB.Solution_TestRunConstructSolutionApprove where x.ConstructSolutionId == constructSolutionId && x.ApproveType != "S" && x.ApproveMan.Equals(man) && x.ApproveDate == null select x).ToList(); + db.Solution_TestRunConstructSolutionApprove.DeleteAllOnSubmit(q); + db.SubmitChanges(); + + } + + + /// + /// 根据施工方案编号删除对应的所有施工方案审批信息 + /// + /// 施工方案编号 + public static void DeleteConstructSolutionApprovesByConstructSolutionId(string ConstructSolutionId) + { + Model.SGGLDB db = Funs.DB; + var q = (from x in Funs.DB.Solution_TestRunConstructSolutionApprove where x.ConstructSolutionId == ConstructSolutionId select x).ToList(); + db.Solution_TestRunConstructSolutionApprove.DeleteAllOnSubmit(q); + db.SubmitChanges(); + } + /// + /// 根据施工方案编号获取一个施工方案审批信息 + /// + /// 施工方案编号 + /// 一个施工方案审批实体 + public static Model.Solution_TestRunConstructSolutionApprove GetConstructSolutionApproveByApproveMan(string ConstructSolutionId, string approveMan) + { + + return Funs.DB.Solution_TestRunConstructSolutionApprove.FirstOrDefault(x => x.ConstructSolutionId == ConstructSolutionId && x.ApproveMan == approveMan && x.ApproveType != "S" && x.ApproveDate == null); + } + public static Model.Solution_TestRunConstructSolutionApprove GetConstructSoluAppByApproveMan(string ConstructSolutionId, string approveMan, int edtion) + { + + return Funs.DB.Solution_TestRunConstructSolutionApprove.FirstOrDefault(x => x.ConstructSolutionId == ConstructSolutionId && x.Edition == edtion && x.ApproveMan == approveMan && x.ApproveType != "S" && x.ApproveDate == null); + } + + public static Model.Solution_TestRunConstructSolutionApprove GetConstructSolApproveByApproveMan(string ConstructSolutionId, string approveMan) + { + return Funs.DB.Solution_TestRunConstructSolutionApprove.FirstOrDefault(x => x.ConstructSolutionId == ConstructSolutionId && x.ApproveMan == approveMan && x.ApproveType != "S" && x.ApproveDate == null); + } + + + /// + /// 增加施工方案审批信息 + /// + /// 施工方案审批实体 + public static void AddConstructSolutionApprove(Model.Solution_TestRunConstructSolutionApprove approve) + { + var db = Funs.DB; + Model.Solution_TestRunConstructSolutionApprove newApprove = new Model.Solution_TestRunConstructSolutionApprove(); + if (string.IsNullOrWhiteSpace(approve.ConstructSolutionApproveId)) + { + newApprove.ConstructSolutionApproveId = SQLHelper.GetNewID(typeof(Model.Solution_TestRunConstructSolutionApprove)); + } + else + { + newApprove.ConstructSolutionApproveId = approve.ConstructSolutionApproveId; + } + newApprove.ConstructSolutionId = approve.ConstructSolutionId; + newApprove.ApproveMan = approve.ApproveMan; + newApprove.ApproveDate = approve.ApproveDate; + newApprove.ApproveIdea = approve.ApproveIdea; + newApprove.IsAgree = approve.IsAgree; + newApprove.ApproveType = approve.ApproveType; + newApprove.SignType = approve.SignType; + newApprove.Edition = approve.Edition; + newApprove.Order = GetMaxOrderByConstructSolutionId(approve.ConstructSolutionId); + db.Solution_TestRunConstructSolutionApprove.InsertOnSubmit(newApprove); + db.SubmitChanges(); + } + + public static int GetMaxOrderByConstructSolutionId(string constructSolutionId) + { + int order = 0; + var q = (from x in Funs.DB.Solution_TestRunConstructSolutionApprove + where x.ConstructSolutionId == constructSolutionId + select x).ToList().Count(); + order = q + 1; + return order; + } + /// + /// 获取当前办理人 + /// + /// + /// + public static Model.Solution_TestRunConstructSolutionApprove GetThisApproveByConstructSolutionId(string constructSolutionId) + { + var q = (from x in Funs.DB.Solution_TestRunConstructSolutionApprove + where x.ConstructSolutionId == constructSolutionId && x.ApproveDate == null + orderby x.Order + select x).FirstOrDefault(); + return q; + } + public static string GetThisApproveNameByConstructSolutionId(object constructSolutionId) + { + string name = ""; + var q = (from x in Funs.DB.Solution_TestRunConstructSolutionApprove + where x.ConstructSolutionId == constructSolutionId.ToString() && x.ApproveDate == null + orderby x.Order + select x).FirstOrDefault(); + if (q != null) + { + name = UserService.GetUserNameByUserId(q.ApproveMan); + } + return name; + } + /// + /// 推送待办给下一步办理人 + /// + /// + public static void PushMessageToNextMan(string constructSolutionId) + { + var approve = GetThisApproveByConstructSolutionId(constructSolutionId); + if (approve != null) + { + + APICommonService.SendSubscribeMessage(approve.ApproveMan, "施工方案待办理", UserService.GetUserNameByUserId(approve.ApproveMan), string.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now)); + + } + + } + + public static void AddConstructSolutionApproveForApi(Model.Solution_TestRunConstructSolutionApprove approve) + { + using (var db = new Model.SGGLDB(Funs.ConnString)) + { + Model.Solution_TestRunConstructSolutionApprove newApprove = new Model.Solution_TestRunConstructSolutionApprove(); + if (string.IsNullOrWhiteSpace(approve.ConstructSolutionApproveId)) + { + newApprove.ConstructSolutionApproveId = SQLHelper.GetNewID(typeof(Model.Solution_TestRunConstructSolutionApprove)); + } + else + { + newApprove.ConstructSolutionApproveId = approve.ConstructSolutionApproveId; + } + newApprove.ConstructSolutionId = approve.ConstructSolutionId; + newApprove.ApproveMan = approve.ApproveMan; + newApprove.ApproveDate = approve.ApproveDate; + newApprove.ApproveIdea = approve.ApproveIdea; + newApprove.IsAgree = approve.IsAgree; + newApprove.ApproveType = approve.ApproveType; + newApprove.SignType = approve.SignType; + newApprove.Edition = approve.Edition; + newApprove.Order = approve.Order; + db.Solution_TestRunConstructSolutionApprove.InsertOnSubmit(newApprove); + db.SubmitChanges(); + } + } + public static List getListDataForApi(string ConstructSolutionId, int edition) + { + using (var db = new Model.SGGLDB(Funs.ConnString)) + { + var q = from x in db.Solution_TestRunConstructSolutionApprove + where x.ConstructSolutionId == ConstructSolutionId && x.Edition == edition && x.ApproveDate != null && x.ApproveType != "S" + orderby x.ApproveDate + select new + { + x.ConstructSolutionApproveId, + x.ConstructSolutionId, + x.ApproveMan, + ApproveManName = (from y in db.Sys_User where y.UserId == x.ApproveMan select y.UserName).First(), + x.ApproveDate, + x.IsAgree, + x.ApproveIdea, + x.ApproveType, + x.SignType, + }; + var list = q.ToList(); + List res = new List(); + foreach (var item in list) + { + Model.Solution_TestRunConstructSolutionApprove ap = new Model.Solution_TestRunConstructSolutionApprove(); + ap.ConstructSolutionApproveId = item.ConstructSolutionApproveId; + ap.ConstructSolutionId = item.ConstructSolutionId; + ap.ApproveMan = item.ApproveMan + "$" + item.ApproveManName; + ap.ApproveDate = item.ApproveDate; + ap.IsAgree = item.IsAgree; + ap.ApproveIdea = item.ApproveIdea; + ap.ApproveType = item.ApproveType; + ap.SignType = item.SignType; + ap.AttachUrl = AttachFileService.getFileUrl(ap.ConstructSolutionApproveId); + res.Add(ap); + } + return res; + } + } + public static List getListDataForApi(string ConstructSolutionId) + { + using (var db = new Model.SGGLDB(Funs.ConnString)) + { + var q = from x in db.Solution_TestRunConstructSolutionApprove + where x.ConstructSolutionId == ConstructSolutionId && x.ApproveDate != null && x.ApproveType != "S" + orderby x.ApproveDate + select new + { + x.ConstructSolutionApproveId, + x.ConstructSolutionId, + x.ApproveMan, + ApproveManName = (from y in db.Sys_User where y.UserId == x.ApproveMan select y.UserName).First(), + x.ApproveDate, + x.IsAgree, + x.ApproveIdea, + x.ApproveType, + x.SignType, + }; + var list = q.ToList(); + List res = new List(); + foreach (var item in list) + { + Model.Solution_TestRunConstructSolutionApprove ap = new Model.Solution_TestRunConstructSolutionApprove(); + ap.ConstructSolutionApproveId = item.ConstructSolutionApproveId; + ap.ConstructSolutionId = item.ConstructSolutionId; + ap.ApproveMan = item.ApproveMan + "$" + item.ApproveManName; + ap.ApproveDate = item.ApproveDate; + ap.IsAgree = item.IsAgree; + ap.ApproveIdea = item.ApproveIdea; + ap.ApproveType = item.ApproveType; + ap.SignType = item.SignType; + ap.AttachUrl = AttachFileService.getFileUrl(ap.ConstructSolutionApproveId); + res.Add(ap); + } + return res; + } + } + public static Model.Solution_TestRunConstructSolutionApprove getCurrApproveForApi(string ConstructSolutionId, string approveMan, int edition) + { + using (var db = new Model.SGGLDB(Funs.ConnString)) + { + Model.Solution_TestRunConstructSolutionApprove newApprove = db.Solution_TestRunConstructSolutionApprove.FirstOrDefault(e => e.ConstructSolutionId == ConstructSolutionId && e.ApproveMan == approveMan && e.Edition == edition && e.ApproveType != "S" && e.ApproveDate == null); + if (newApprove != null) + { + Model.Sys_User user = BLL.UserService.GetUserByUserId(newApprove.ApproveMan); + if (user != null) + { + newApprove.ApproveIdea = user.UserName; + } + } + return newApprove; + } + } + public static List getConApproveForApi(string ConstructSolutionId, int edition) + { + using (var db = new Model.SGGLDB(Funs.ConnString)) + { + List res = new List(); + var newApproves = db.Solution_TestRunConstructSolutionApprove.Where(e => e.ConstructSolutionId == ConstructSolutionId && e.Edition == edition && e.ApproveType == "2").ToList(); + if (newApproves != null) + { + foreach (Model.Solution_TestRunConstructSolutionApprove newApprove in newApproves) + { + Model.Solution_TestRunConstructSolutionApprove a = new Model.Solution_TestRunConstructSolutionApprove(); + a.ConstructSolutionApproveId = newApprove.ConstructSolutionApproveId; + a.ConstructSolutionId = newApprove.ConstructSolutionId; + a.ApproveDate = newApprove.ApproveDate; + a.ApproveMan = newApprove.ApproveMan; + a.ApproveType = newApprove.ApproveType; + a.Edition = newApprove.Edition; + a.IsAgree = newApprove.IsAgree; + Model.Sys_User user = BLL.UserService.GetUserByUserId(newApprove.ApproveMan); + if (user != null) + { + a.ApproveMan = a.ApproveMan + "$" + user.UserName; + } + a.AttachUrl = AttachFileService.getFileUrl(a.ConstructSolutionApproveId); + res.Add(a); + } + } + return res; + } + } + public static List getConApprovesForApi(string ConstructSolutionId, int edition) + { + using (var db = new Model.SGGLDB(Funs.ConnString)) + { + List res = new List(); + var newApproves = db.Solution_TestRunConstructSolutionApprove.Where(e => e.ConstructSolutionId == ConstructSolutionId && e.Edition == edition).ToList(); + if (newApproves != null) + { + foreach (Model.Solution_TestRunConstructSolutionApprove newApprove in newApproves) + { + Model.Solution_TestRunConstructSolutionApprove a = new Model.Solution_TestRunConstructSolutionApprove(); + a.ConstructSolutionApproveId = newApprove.ConstructSolutionApproveId; + a.ConstructSolutionId = newApprove.ConstructSolutionId; + a.ApproveDate = newApprove.ApproveDate; + a.ApproveMan = newApprove.ApproveMan; + a.ApproveType = newApprove.ApproveType; + a.Edition = newApprove.Edition; + a.IsAgree = newApprove.IsAgree; + Model.Sys_User user = BLL.UserService.GetUserByUserId(newApprove.ApproveMan); + if (user != null) + { + a.ApproveMan = a.ApproveMan + "$" + user.UserName; + } + a.AttachUrl = AttachFileService.getFileUrl(a.ConstructSolutionApproveId); + res.Add(a); + } + } + return res; + } + } + public static Model.Solution_TestRunConstructSolutionApprove UpdateConstructSolutionApproveForApi(Model.Solution_TestRunConstructSolutionApprove approve) + { + using (var db = new Model.SGGLDB(Funs.ConnString)) + { + Model.Solution_TestRunConstructSolutionApprove newApprove = db.Solution_TestRunConstructSolutionApprove.First(e => e.ConstructSolutionApproveId == approve.ConstructSolutionApproveId); + if (!string.IsNullOrEmpty(approve.ConstructSolutionId)) + newApprove.ConstructSolutionId = approve.ConstructSolutionId; + if (!string.IsNullOrEmpty(approve.ApproveMan)) + newApprove.ApproveMan = approve.ApproveMan; + if (approve.ApproveDate.HasValue) + newApprove.ApproveDate = approve.ApproveDate; + if (!string.IsNullOrEmpty(approve.ApproveIdea)) + newApprove.ApproveIdea = approve.ApproveIdea; + if (approve.IsAgree.HasValue) + newApprove.IsAgree = approve.IsAgree; + if (!string.IsNullOrEmpty(approve.ApproveType)) + newApprove.ApproveType = approve.ApproveType; + + db.SubmitChanges(); + AttachFileService.updateAttachFile(approve.AttachUrl, newApprove.ConstructSolutionApproveId, Const.TestRunConstructSolutionMenuId); + return newApprove; + } + } + } +} diff --git a/SGGL/BLL/TestRun/TestRunConstructSolutionService.cs b/SGGL/BLL/TestRun/TestRunConstructSolutionService.cs new file mode 100644 index 00000000..f6942a90 --- /dev/null +++ b/SGGL/BLL/TestRun/TestRunConstructSolutionService.cs @@ -0,0 +1,423 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Web.UI.WebControls; + +namespace BLL +{ + public class TestRunConstructSolutionService + { + public static string IsAgree(Object type, Object res) + { + string result = string.Empty; + if (type.ToString().Equals(Const.TestRunConstructSolution_ReCompile) || type.ToString().Equals(Const.TestRunConstructSolution_Compile)) + { + res = null; + } + if (res != null) + { + if (Convert.ToBoolean(res)) + { + result = "是"; + } + else + { + result = "否"; + } + } + return result; + } + + /// + /// 根据方案审查Id删除一个方案审查信息 + /// + /// 方案审查Id + public static void DeleteConstructSolution(string constructSolutionId) + { + Model.SGGLDB db = Funs.DB; + Model.Solution_TestRunConstructSolution constructSolution = db.Solution_TestRunConstructSolution.First(e => e.ConstructSolutionId == constructSolutionId); + + db.Solution_TestRunConstructSolution.DeleteOnSubmit(constructSolution); + db.SubmitChanges(); + } + + /// + /// 增加方案审查信息 + /// + /// 方案审查实体 + public static void AddConstructSolution(Model.Solution_TestRunConstructSolution constructSolution) + { + Model.SGGLDB db = Funs.DB; + Model.Solution_TestRunConstructSolution newConstructSolution = new Model.Solution_TestRunConstructSolution(); + newConstructSolution.ConstructSolutionId = constructSolution.ConstructSolutionId; + newConstructSolution.Code = constructSolution.Code; + newConstructSolution.ProjectId = constructSolution.ProjectId; + newConstructSolution.UnitId = constructSolution.UnitId; + newConstructSolution.SolutionName = constructSolution.SolutionName; + newConstructSolution.SolutionType = constructSolution.SolutionType; + newConstructSolution.UnitWorkIds = constructSolution.UnitWorkIds; + newConstructSolution.CNProfessionalCodes = constructSolution.CNProfessionalCodes; + newConstructSolution.AttachUrl = constructSolution.AttachUrl; + newConstructSolution.CompileMan = constructSolution.CompileMan; + newConstructSolution.CompileDate = constructSolution.CompileDate; + newConstructSolution.State = constructSolution.State; + newConstructSolution.Edition = constructSolution.Edition; + newConstructSolution.SpecialSchemeTypeId = constructSolution.SpecialSchemeTypeId; + newConstructSolution.Content = constructSolution.Content; + db.Solution_TestRunConstructSolution.InsertOnSubmit(newConstructSolution); + db.SubmitChanges(); + } + /// + /// 修改方案审查信息 + /// + /// 方案审查实体 + public static void UpdateConstructSolution(Model.Solution_TestRunConstructSolution constructSolution) + { + Model.SGGLDB db = Funs.DB; + Model.Solution_TestRunConstructSolution newConstructSolution = db.Solution_TestRunConstructSolution.First(e => e.ConstructSolutionId == constructSolution.ConstructSolutionId); + newConstructSolution.Code = constructSolution.Code; + newConstructSolution.UnitId = constructSolution.UnitId; + newConstructSolution.SolutionName = constructSolution.SolutionName; + newConstructSolution.SolutionType = constructSolution.SolutionType; + newConstructSolution.UnitWorkIds = constructSolution.UnitWorkIds; + newConstructSolution.CNProfessionalCodes = constructSolution.CNProfessionalCodes; + newConstructSolution.AttachUrl = constructSolution.AttachUrl; + newConstructSolution.State = constructSolution.State; + newConstructSolution.Edition = constructSolution.Edition; + newConstructSolution.SpecialSchemeTypeId = constructSolution.SpecialSchemeTypeId; + newConstructSolution.Content = constructSolution.Content; + db.SubmitChanges(); + } + + + /// + /// 把状态转换代号为文字形式 + /// + /// + /// + /// + public static string ConvertState(object state) + { + if (state != null) + { + if (state.ToString() == BLL.Const.TestRunConstructSolution_ReCompile) + { + return "重报"; + } + else if (state.ToString() == BLL.Const.TestRunConstructSolution_Compile) + { + return "编制"; + } + else if (state.ToString() == BLL.Const.TestRunConstructSolution_Audit) + { + return "会签"; + } + else if (state.ToString() == BLL.Const.TestRunConstructSolution_Complete) + { + return "审批完成"; + } + } + return ""; + } + /// + /// 获取单位信息中的常用工程类型信息 + /// + /// + public static ListItem[] GetSolutionType() + { + ListItem[] list = new ListItem[13]; + list[0] = new ListItem("01 开车文件编制计划", "01"); + list[1] = new ListItem("02 单机试车方案", "02"); + list[2] = new ListItem("03 冲洗吹扫方案", "03"); + list[3] = new ListItem("04 气密试验方案", "04"); + list[4] = new ListItem("05 化洗清洗方案", "05"); + list[5] = new ListItem("06 烘炉方案", "06"); + list[6] = new ListItem("07 催化剂装填方案", "07"); + list[7] = new ListItem("08 联动试车方案", "08"); + list[8] = new ListItem("09 投料试车方案", "09"); + list[9] = new ListItem("10 性能考核方案", "10"); + list[10] = new ListItem("11 其他方案(如:真空试验、升温还原、煮炉、预冷、预热等)", "11"); + list[11] = new ListItem("12 总体试车方案", "12"); + list[12] = new ListItem("13 方案审查记录", "13"); + return list; + } + + + /// + /// 根据方案审查Id获取一个方案审查信息 + /// + /// 方案审查Id + /// 一个方案审查实体 + public static Model.Solution_TestRunConstructSolution GetConstructSolutionByConstructSolutionId(string constructSolutionId) + { + return Funs.DB.Solution_TestRunConstructSolution.FirstOrDefault(x => x.ConstructSolutionId == constructSolutionId); + } + public static Model.Solution_TestRunConstructSolution GetConstructSolutionByConstructSolutionIdForApi(string constructSolutionId) + { + using (var db = new Model.SGGLDB(Funs.ConnString)) + { + Model.Solution_TestRunConstructSolution solution = db.Solution_TestRunConstructSolution.FirstOrDefault(x => x.ConstructSolutionId == constructSolutionId); + solution.AttachUrl = AttachFileService.getFileUrl(solution.ConstructSolutionId); + solution.CNProfessionalCodes = solution.CNProfessionalCodes + "$" + GetProfessionalName(solution.CNProfessionalCodes); + solution.UnitWorkIds = solution.UnitWorkIds + "$" + GetUnitWorkName(solution.UnitWorkIds); + var unit = BLL.UnitService.GetUnitByUnitId(solution.UnitId); + solution.UnitId = solution.UnitId + "$" + (unit != null ? unit.UnitName : ""); + solution.CompileMan = solution.CompileMan + "$" + UserService.GetUserNameByUserId(solution.CompileMan); + return solution; + } + + } + /// + /// 获取方案类别 + /// + /// + /// + public static string ConvertSolutionType(object solutionType) + { + if (solutionType != null) + { + ListItem[] list = GetSolutionType(); + var item = list.FirstOrDefault(x => x.Value == solutionType.ToString()); + if (item != null) + { + return item.Text.Substring(3); + } + } + return ""; + } + public static string GetProfessionalName(string cNProfessionalCodes) + { + string professionalName = string.Empty; + if (!string.IsNullOrEmpty(cNProfessionalCodes)) + { + string[] strs = cNProfessionalCodes.Split(','); + foreach (var item in strs) + { + var cn = BLL.CNProfessionalService.GetCNProfessional(item); + if (cn != null) + { + professionalName += cn.ProfessionalName + ","; + } + } + if (!string.IsNullOrEmpty(professionalName)) + { + professionalName = professionalName.Substring(0, professionalName.LastIndexOf(",")); + } + } + return professionalName; + } + public static string GetUnitWorkName(string unitWorkIds) + { + string unitWorkName = string.Empty; + if (!string.IsNullOrEmpty(unitWorkIds)) + { + string[] strs = unitWorkIds.Split(','); + foreach (var item in strs) + { + var un = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(item); + if (un != null) + { + unitWorkName += un.UnitWorkName + BLL.UnitWorkService.GetProjectType(un.ProjectType) + ","; + } + } + if (!string.IsNullOrEmpty(unitWorkName)) + { + unitWorkName = unitWorkName.Substring(0, unitWorkName.LastIndexOf(",")); + } + } + return unitWorkName; + } + public static List getListDataForApi(string name, string unitId, string unitWork, string cNProfessionalCodes, string solutionType, string state, string projectId, int startRowIndex, int maximumRows) + { + using (var db = new Model.SGGLDB(Funs.ConnString)) + { + IQueryable q = db.Solution_TestRunConstructSolution; + + if (!string.IsNullOrEmpty(projectId)) + { + q = q.Where(e => e.ProjectId == projectId); + } + if (!string.IsNullOrEmpty(unitId) && unitId != "undefined") + { + q = q.Where(e => e.UnitId == unitId); + } + if (!string.IsNullOrEmpty(unitWork) && unitWork != "undefined") + { + q = q.Where(e => e.UnitWorkIds.Contains(unitWork)); + } + if (!string.IsNullOrEmpty(cNProfessionalCodes) && cNProfessionalCodes != "undefined") + { + q = q.Where(e => e.CNProfessionalCodes.Contains(cNProfessionalCodes)); + } + if (!string.IsNullOrEmpty(solutionType) && solutionType != "undefined") + { + q = q.Where(e => e.SolutionType == solutionType); + } + if (!string.IsNullOrEmpty(state) && state != "undefined") + { + if ("已闭合" == state) + { + q = q.Where(e => e.State == "3"); + } + else if ("未闭合" == state) + { + q = q.Where(e => e.State != "3"); + + } + } + if (!string.IsNullOrEmpty(name)) + { + List ids = new List(); + var qunit = from u in Funs.DB.Base_Unit + where u.UnitName.Contains(name) + select u.UnitId; + ids = qunit.ToList(); + q = q.Where(e => e.SolutionName.Contains(name) || ids.Contains(e.UnitId)); + } + + + var qlist = from x in q + orderby x.Code descending + + select new + { + x.ConstructSolutionId, + x.Code, + x.ProjectId, + x.UnitId, + UnitName = (from y in db.Base_Unit where y.UnitId == x.UnitId select y.UnitName).First(), + x.SolutionName, + x.SolutionType, + x.UnitWorkIds, + UnitWorkName = GetUnitWorkName(x.UnitWorkIds), + x.CNProfessionalCodes, + ProfessionalName = GetProfessionalName(x.CNProfessionalCodes), + x.AttachUrl, + x.CompileMan, + x.CompileDate, + x.State, + x.Edition, + CompileManName = (from y in db.Sys_User where y.UserId == x.CompileMan select y.UserName).First(), + }; + + List res = new List(); + var qres = qlist.Skip(startRowIndex * maximumRows).Take(maximumRows).ToList(); + foreach (var item in qres) + { + Model.Solution_TestRunConstructSolution cs = new Model.Solution_TestRunConstructSolution(); + cs.ConstructSolutionId = item.ConstructSolutionId; + cs.Code = item.Code; + cs.ProjectId = item.ProjectId; + cs.UnitId = item.UnitId + "$" + item.UnitName; + cs.SolutionName = item.SolutionName; + cs.SolutionType = item.SolutionType; + cs.UnitWorkIds = item.UnitWorkIds + "$" + item.UnitWorkName; + cs.CNProfessionalCodes = item.CNProfessionalCodes + "$" + item.ProfessionalName; + cs.AttachUrl = item.AttachUrl; + cs.CompileMan = item.CompileMan + "$" + item.CompileManName; + cs.CompileDate = item.CompileDate; + cs.State = item.State; + cs.Edition = item.Edition; + + res.Add(cs); + } + return res; + } + } + public static List getListDataForApi(string name, string projectId, int startRowIndex, int maximumRows) + { + var db = Funs.DB; + IQueryable q = db.Solution_TestRunConstructSolution; + + if (!string.IsNullOrEmpty(projectId)) + { + q = q.Where(e => e.ProjectId == projectId); + } + if (!string.IsNullOrEmpty(name)) + { + List ids = new List(); + var qunit = from u in Funs.DB.Base_Unit + where u.UnitName.Contains(name) + select u.UnitId; + ids = qunit.ToList(); + q = q.Where(e => e.SolutionName.Contains(name) || ids.Contains(e.UnitId)); + } + + + var qlist = from x in q + orderby x.Code descending + + select new + { + x.ConstructSolutionId, + x.Code, + x.ProjectId, + x.UnitId, + UnitName = (from y in db.Base_Unit where y.UnitId == x.UnitId select y.UnitName).First(), + x.SolutionName, + x.SolutionType, + x.UnitWorkIds, + UnitWorkName = GetUnitWorkName(x.UnitWorkIds), + x.CNProfessionalCodes, + ProfessionalName = GetProfessionalName(x.CNProfessionalCodes), + x.AttachUrl, + x.CompileMan, + x.CompileDate, + x.State, + x.Edition, + CompileManName = (from y in db.Sys_User where y.UserId == x.CompileMan select y.UserName).First(), + }; + + List res = new List(); + var qres = qlist.Skip(startRowIndex * maximumRows).Take(maximumRows).ToList(); + foreach (var item in qres) + { + Model.Solution_TestRunConstructSolution cs = new Model.Solution_TestRunConstructSolution(); + cs.ConstructSolutionId = item.ConstructSolutionId; + cs.Code = item.Code; + cs.ProjectId = item.ProjectId; + cs.UnitId = item.UnitId + "$" + item.UnitName; + cs.SolutionName = item.SolutionName; + cs.SolutionType = item.SolutionType; + cs.UnitWorkIds = item.UnitWorkIds + "$" + item.UnitWorkName; + cs.CNProfessionalCodes = item.CNProfessionalCodes + "$" + item.ProfessionalName; + cs.AttachUrl = AttachFileService.getFileUrl(item.ConstructSolutionId); + cs.CompileMan = item.CompileMan + "$" + item.CompileManName; + cs.CompileDate = item.CompileDate; + cs.State = item.State; + cs.Edition = item.Edition; + + res.Add(cs); + } + return res; + } + public static void UpdateConstructSolutionForApi(Model.Solution_TestRunConstructSolution constructSolution) + { + using (var db = new Model.SGGLDB(Funs.ConnString)) + { + Model.Solution_TestRunConstructSolution newConstructSolution = db.Solution_TestRunConstructSolution.First(e => e.ConstructSolutionId == constructSolution.ConstructSolutionId); + if (!string.IsNullOrEmpty(constructSolution.Code)) + newConstructSolution.Code = constructSolution.Code; + if (!string.IsNullOrEmpty(constructSolution.UnitId)) + newConstructSolution.UnitId = constructSolution.UnitId; + if (!string.IsNullOrEmpty(constructSolution.SolutionName)) + newConstructSolution.SolutionName = constructSolution.SolutionName; + if (!string.IsNullOrEmpty(constructSolution.SolutionType)) + newConstructSolution.SolutionType = constructSolution.SolutionType; + if (!string.IsNullOrEmpty(constructSolution.UnitWorkIds)) + newConstructSolution.UnitWorkIds = constructSolution.UnitWorkIds; + if (!string.IsNullOrEmpty(constructSolution.CNProfessionalCodes)) + newConstructSolution.CNProfessionalCodes = constructSolution.CNProfessionalCodes; + if (!string.IsNullOrEmpty(constructSolution.AttachUrl)) + newConstructSolution.AttachUrl = constructSolution.AttachUrl; + if (!string.IsNullOrEmpty(constructSolution.State)) + newConstructSolution.State = constructSolution.State; + if (constructSolution.Edition.HasValue) + newConstructSolution.Edition = constructSolution.Edition; + db.SubmitChanges(); + } + } + } +} diff --git a/SGGL/FineUIPro.Web/CQMS/Solution/ConstructSolution.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Solution/ConstructSolution.aspx.cs index ccc4619b..28f40e5f 100644 --- a/SGGL/FineUIPro.Web/CQMS/Solution/ConstructSolution.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Solution/ConstructSolution.aspx.cs @@ -179,7 +179,7 @@ namespace FineUIPro.Web.CQMS.Solution { var list = ChecklistData(); Grid1.RecordCount = list.Rows.Count; - var CNProfessional = CNProfessionalService.GetCNProfessionalItem(); + var CNProfessional = CNProfessionalService.GetList(); var uniWork = UnitWorkService.GetUnitWorkLists(CurrUser.LoginProjectId); if (list.Rows.Count > 0) { @@ -188,7 +188,7 @@ namespace FineUIPro.Web.CQMS.Solution if (list.Rows[i]["CNProfessionalCodes"] != null) { var code = list.Rows[i]["CNProfessionalCodes"].ToString().Split(','); - var listf = CNProfessional.Where(p => code.Contains(p.Value)).Select(p => p.Text).ToArray(); + var listf = CNProfessional.Where(p => code.Contains(p.CNProfessionalId)).Select(p => p.ProfessionalName).ToArray(); list.Rows[i]["CNProfessionalCodes"] = string.Join(",", listf); } if (list.Rows[i]["UnitWorkIds"] != null) diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt index a1fa493f..356ed484 100644 --- a/SGGL/FineUIPro.Web/ErrLog.txt +++ b/SGGL/FineUIPro.Web/ErrLog.txt @@ -634,3 +634,540 @@ IP地址:::1 出错时间:02/21/2024 13:01:51 出错时间:02/21/2024 13:01:51 + +错误信息开始=====> +错误类型:ArgumentException +错误信息:提供的 URI 方案“http”无效,应为“https”。 +参数名: via +错误堆栈: + 在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannelInternal() + 在 System.ServiceModel.ClientBase`1.get_Channel() + 在 BLL.CNCECHSSEWebService.getSupervise_SubUnitReport() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 2180 +出错时间:02/27/2024 13:07:14 +出错时间:02/27/2024 13:07:14 + + +错误信息开始=====> +错误类型:ArgumentException +错误信息:提供的 URI 方案“http”无效,应为“https”。 +参数名: via +错误堆栈: + 在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannelInternal() + 在 System.ServiceModel.ClientBase`1.get_Channel() + 在 BLL.CNCECHSSEWebService.getCheck_CheckInfo_Table8Item() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 2045 +出错时间:02/27/2024 13:07:14 +出错时间:02/27/2024 13:07:14 + + +错误信息开始=====> +错误类型:ArgumentException +错误信息:提供的 URI 方案“http”无效,应为“https”。 +参数名: via +错误堆栈: + 在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannelInternal() + 在 System.ServiceModel.ClientBase`1.get_Channel() + 在 BLL.CNCECHSSEWebService.getCheck_CheckRectify() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 1941 +出错时间:02/27/2024 13:07:14 +出错时间:02/27/2024 13:07:14 + + +错误信息开始=====> +错误类型:ArgumentException +错误信息:提供的 URI 方案“http”无效,应为“https”。 +参数名: via +错误堆栈: + 在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannelInternal() + 在 System.ServiceModel.ClientBase`1.get_Channel() + 在 BLL.CNCECHSSEWebService.getInformation_UrgeReport() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 1883 +出错时间:02/27/2024 13:07:14 +出错时间:02/27/2024 13:07:14 + + +错误信息开始=====> +错误类型:ArgumentException +错误信息:提供的 URI 方案“http”无效,应为“https”。 +参数名: via +错误堆栈: + 在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannelInternal() + 在 System.ServiceModel.ClientBase`1.get_Channel() + 在 BLL.CNCECHSSEWebService.getSupervise_SubUnitReport() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 2180 +出错时间:02/27/2024 16:43:58 +出错时间:02/27/2024 16:43:58 + + +错误信息开始=====> +错误类型:ArgumentException +错误信息:提供的 URI 方案“http”无效,应为“https”。 +参数名: via +错误堆栈: + 在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannelInternal() + 在 System.ServiceModel.ClientBase`1.get_Channel() + 在 BLL.CNCECHSSEWebService.getCheck_CheckInfo_Table8Item() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 2045 +出错时间:02/27/2024 16:43:58 +出错时间:02/27/2024 16:43:58 + + +错误信息开始=====> +错误类型:ArgumentException +错误信息:提供的 URI 方案“http”无效,应为“https”。 +参数名: via +错误堆栈: + 在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannelInternal() + 在 System.ServiceModel.ClientBase`1.get_Channel() + 在 BLL.CNCECHSSEWebService.getCheck_CheckRectify() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 1941 +出错时间:02/27/2024 16:43:58 +出错时间:02/27/2024 16:43:58 + + +错误信息开始=====> +错误类型:ArgumentException +错误信息:提供的 URI 方案“http”无效,应为“https”。 +参数名: via +错误堆栈: + 在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannelInternal() + 在 System.ServiceModel.ClientBase`1.get_Channel() + 在 BLL.CNCECHSSEWebService.getInformation_UrgeReport() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 1883 +出错时间:02/27/2024 16:43:58 +出错时间:02/27/2024 16:43:58 + + +错误信息开始=====> +错误类型:SqlException +错误信息:无法绑定由多个部分组成的标识符 "s.SolutionTempleteTypeName"。 +错误堆栈: + 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) + 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) + 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) + 在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) + 在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() + 在 System.Data.SqlClient.SqlDataReader.get_MetaData() + 在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) + 在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) + 在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) + 在 System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) + 在 BLL.SQLHelper.GetDataTableRunText(String strSql, SqlParameter[] parameters) 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\SQLHelper.cs:行号 311 + 在 FineUIPro.Web.TestRun.DriverScheme.BindGrid() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\TestRun\DriverScheme.aspx.cs:行号 112 + 在 FineUIPro.Web.TestRun.DriverScheme.tvDataTypeInit_NodeCommand(Object sender, TreeCommandEventArgs e) 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\TestRun\DriverScheme.aspx.cs:行号 91 + 在 FineUIPro.Tree.OnNodeCommand(TreeCommandEventArgs e) + 在 (Tree , TreeCommandEventArgs ) + 在 FineUIPro.Tree.RaisePostBackEvent(String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) + 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +出错时间:02/28/2024 11:22:39 +出错文件:http://localhost:8579/TestRun/DriverScheme.aspx +IP地址:::1 +操作人员:JT + +出错时间:02/28/2024 11:22:39 + + +错误信息开始=====> +错误类型:SqlException +错误信息:无法绑定由多个部分组成的标识符 "s.SolutionTempleteTypeName"。 +错误堆栈: + 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) + 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) + 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) + 在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) + 在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() + 在 System.Data.SqlClient.SqlDataReader.get_MetaData() + 在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) + 在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) + 在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) + 在 System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) + 在 BLL.SQLHelper.GetDataTableRunText(String strSql, SqlParameter[] parameters) 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\SQLHelper.cs:行号 311 + 在 FineUIPro.Web.TestRun.DriverScheme.BindGrid() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\TestRun\DriverScheme.aspx.cs:行号 112 + 在 FineUIPro.Web.TestRun.DriverScheme.tvDataTypeInit_NodeCommand(Object sender, TreeCommandEventArgs e) 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\TestRun\DriverScheme.aspx.cs:行号 91 + 在 FineUIPro.Tree.OnNodeCommand(TreeCommandEventArgs e) + 在 (Tree , TreeCommandEventArgs ) + 在 FineUIPro.Tree.RaisePostBackEvent(String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) + 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +出错时间:02/28/2024 11:23:13 +出错文件:http://localhost:8579/TestRun/DriverScheme.aspx +IP地址:::1 +操作人员:JT + +出错时间:02/28/2024 11:23:13 + + +错误信息开始=====> +错误类型:SqlException +错误信息:无法绑定由多个部分组成的标识符 "s.SolutionTempleteTypeName"。 +错误堆栈: + 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) + 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) + 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) + 在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) + 在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() + 在 System.Data.SqlClient.SqlDataReader.get_MetaData() + 在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) + 在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) + 在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) + 在 System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) + 在 BLL.SQLHelper.GetDataTableRunText(String strSql, SqlParameter[] parameters) 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\SQLHelper.cs:行号 311 + 在 FineUIPro.Web.TestRun.DriverScheme.BindGrid() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\TestRun\DriverScheme.aspx.cs:行号 112 + 在 FineUIPro.Web.TestRun.DriverScheme.Window1_Close(Object sender, WindowCloseEventArgs e) 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\TestRun\DriverScheme.aspx.cs:行号 179 + 在 FineUIPro.Window.OnClose(WindowCloseEventArgs e) + 在 (Window , WindowCloseEventArgs ) + 在 FineUIPro.Window.RaisePostBackEvent(String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) + 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +出错时间:02/28/2024 11:23:58 +出错文件:http://localhost:8579/TestRun/DriverScheme.aspx +IP地址:::1 +操作人员:JT + +出错时间:02/28/2024 11:23:58 + + +错误信息开始=====> +错误类型:SqlException +错误信息:无法绑定由多个部分组成的标识符 "s.SolutionTempleteTypeName"。 +错误堆栈: + 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) + 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) + 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) + 在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) + 在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() + 在 System.Data.SqlClient.SqlDataReader.get_MetaData() + 在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) + 在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) + 在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) + 在 System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) + 在 BLL.SQLHelper.GetDataTableRunText(String strSql, SqlParameter[] parameters) 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\SQLHelper.cs:行号 311 + 在 FineUIPro.Web.TestRun.DriverScheme.BindGrid() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\TestRun\DriverScheme.aspx.cs:行号 112 + 在 FineUIPro.Web.TestRun.DriverScheme.tvDataTypeInit_NodeCommand(Object sender, TreeCommandEventArgs e) 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\TestRun\DriverScheme.aspx.cs:行号 91 + 在 FineUIPro.Tree.OnNodeCommand(TreeCommandEventArgs e) + 在 (Tree , TreeCommandEventArgs ) + 在 FineUIPro.Tree.RaisePostBackEvent(String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) + 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +出错时间:02/28/2024 11:24:01 +出错文件:http://localhost:8579/TestRun/DriverScheme.aspx +IP地址:::1 +操作人员:JT + +出错时间:02/28/2024 11:24:01 + + +错误信息开始=====> +错误类型:SqlException +错误信息:无法绑定由多个部分组成的标识符 "s.SolutionTempleteTypeName"。 +错误堆栈: + 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) + 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) + 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) + 在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) + 在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() + 在 System.Data.SqlClient.SqlDataReader.get_MetaData() + 在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) + 在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) + 在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) + 在 System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) + 在 BLL.SQLHelper.GetDataTableRunText(String strSql, SqlParameter[] parameters) 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\SQLHelper.cs:行号 311 + 在 FineUIPro.Web.TestRun.DriverScheme.BindGrid() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\TestRun\DriverScheme.aspx.cs:行号 112 + 在 FineUIPro.Web.TestRun.DriverScheme.tvDataTypeInit_NodeCommand(Object sender, TreeCommandEventArgs e) 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\TestRun\DriverScheme.aspx.cs:行号 91 + 在 FineUIPro.Tree.OnNodeCommand(TreeCommandEventArgs e) + 在 (Tree , TreeCommandEventArgs ) + 在 FineUIPro.Tree.RaisePostBackEvent(String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) + 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +出错时间:02/28/2024 11:24:04 +出错文件:http://localhost:8579/TestRun/DriverScheme.aspx +IP地址:::1 +操作人员:JT + +出错时间:02/28/2024 11:24:04 + + +错误信息开始=====> +错误类型:SqlException +错误信息:无法绑定由多个部分组成的标识符 "s.SolutionTempleteTypeName"。 +错误堆栈: + 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) + 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) + 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) + 在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) + 在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() + 在 System.Data.SqlClient.SqlDataReader.get_MetaData() + 在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) + 在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) + 在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) + 在 System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) + 在 BLL.SQLHelper.GetDataTableRunText(String strSql, SqlParameter[] parameters) 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\SQLHelper.cs:行号 311 + 在 FineUIPro.Web.TestRun.DriverScheme.BindGrid() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\TestRun\DriverScheme.aspx.cs:行号 112 + 在 FineUIPro.Web.TestRun.DriverScheme.tvDataTypeInit_NodeCommand(Object sender, TreeCommandEventArgs e) 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\TestRun\DriverScheme.aspx.cs:行号 91 + 在 FineUIPro.Tree.OnNodeCommand(TreeCommandEventArgs e) + 在 (Tree , TreeCommandEventArgs ) + 在 FineUIPro.Tree.RaisePostBackEvent(String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) + 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +出错时间:02/28/2024 11:24:05 +出错文件:http://localhost:8579/TestRun/DriverScheme.aspx +IP地址:::1 +操作人员:JT + +出错时间:02/28/2024 11:24:05 + + +错误信息开始=====> +错误类型:SqlException +错误信息:无法绑定由多个部分组成的标识符 "s.SolutionTempleteTypeName"。 +错误堆栈: + 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) + 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) + 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) + 在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) + 在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() + 在 System.Data.SqlClient.SqlDataReader.get_MetaData() + 在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) + 在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) + 在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) + 在 System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) + 在 BLL.SQLHelper.GetDataTableRunText(String strSql, SqlParameter[] parameters) 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\SQLHelper.cs:行号 311 + 在 FineUIPro.Web.TestRun.DriverScheme.BindGrid() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\TestRun\DriverScheme.aspx.cs:行号 112 + 在 FineUIPro.Web.TestRun.DriverScheme.tvDataTypeInit_NodeCommand(Object sender, TreeCommandEventArgs e) 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\TestRun\DriverScheme.aspx.cs:行号 91 + 在 FineUIPro.Tree.OnNodeCommand(TreeCommandEventArgs e) + 在 (Tree , TreeCommandEventArgs ) + 在 FineUIPro.Tree.RaisePostBackEvent(String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) + 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +出错时间:02/28/2024 11:24:05 +出错文件:http://localhost:8579/TestRun/DriverScheme.aspx +IP地址:::1 +操作人员:JT + +出错时间:02/28/2024 11:24:05 + + +错误信息开始=====> +错误类型:SqlException +错误信息:无法绑定由多个部分组成的标识符 "s.SolutionTempleteTypeName"。 +错误堆栈: + 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) + 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) + 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) + 在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) + 在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() + 在 System.Data.SqlClient.SqlDataReader.get_MetaData() + 在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) + 在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) + 在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) + 在 System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) + 在 BLL.SQLHelper.GetDataTableRunText(String strSql, SqlParameter[] parameters) 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\SQLHelper.cs:行号 311 + 在 FineUIPro.Web.TestRun.DriverScheme.BindGrid() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\TestRun\DriverScheme.aspx.cs:行号 112 + 在 FineUIPro.Web.TestRun.DriverScheme.tvDataTypeInit_NodeCommand(Object sender, TreeCommandEventArgs e) 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\TestRun\DriverScheme.aspx.cs:行号 91 + 在 FineUIPro.Tree.OnNodeCommand(TreeCommandEventArgs e) + 在 (Tree , TreeCommandEventArgs ) + 在 FineUIPro.Tree.RaisePostBackEvent(String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) + 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +出错时间:02/28/2024 11:24:06 +出错文件:http://localhost:8579/TestRun/DriverScheme.aspx +IP地址:::1 +操作人员:JT + +出错时间:02/28/2024 11:24:06 + + +错误信息开始=====> +错误类型:NullReferenceException +错误信息:未将对象引用设置到对象的实例。 +错误堆栈: + 在 FineUIPro.Web.TestRun.DriverSchemeView.Page_Load(Object sender, EventArgs e) 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\TestRun\DriverSchemeView.aspx.cs:行号 49 + 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) + 在 System.EventHandler.Invoke(Object sender, EventArgs e) + 在 System.Web.UI.Control.OnLoad(EventArgs e) + 在 System.Web.UI.Control.LoadRecursive() + 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +出错时间:02/28/2024 15:37:39 +出错文件:http://localhost:8579/TestRun/DriverSchemeView.aspx?constructSolutionId=0d62a778-7fbc-4fec-ba0f-ff10dab34db2 +IP地址:::1 +操作人员:JT + +出错时间:02/28/2024 15:37:39 + + +错误信息开始=====> +错误类型:HttpCompileException +错误信息:e:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\TestRun\DriverSchemeView.aspx(199): error CS1061: “ASP.testrun_driverschemeview_aspx”不包含“trOne_NodeCheck”的定义,并且找不到可接受类型为“ASP.testrun_driverschemeview_aspx”的第一个参数的扩展方法“trOne_NodeCheck”(是否缺少 using 指令或程序集引用?) +错误堆栈: + 在 System.Web.Compilation.BuildManager.PostProcessFoundBuildResult(BuildResult result, Boolean keyFromVPP, VirtualPath virtualPath) + 在 System.Web.Compilation.BuildManager.GetBuildResultFromCacheInternal(String cacheKey, Boolean keyFromVPP, VirtualPath virtualPath, Int64 hashCode, Boolean ensureIsUpToDate) + 在 System.Web.Compilation.BuildManager.GetVPathBuildResultFromCacheInternal(VirtualPath virtualPath, Boolean ensureIsUpToDate) + 在 System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) + 在 System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) + 在 System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound) + 在 System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp) + 在 System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) + 在 System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String virtualPath, String path) + 在 System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() + 在 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) + 在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +出错时间:02/28/2024 16:18:39 +出错文件:http://localhost:8579/TestRun/DriverSchemeView.aspx?constructSolutionId=0d62a778-7fbc-4fec-ba0f-ff10dab34db2 +IP地址:::1 + +出错时间:02/28/2024 16:18:39 + diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index e17af7a3..97fdc4db 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -1756,6 +1756,7 @@ + @@ -15841,6 +15842,13 @@ DriverSchemeEdit.aspx + + DriverSchemeView.aspx + ASPXCodeBehind + + + DriverSchemeView.aspx + DriverSub.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user index 63ca13cc..9e91deff 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user @@ -1,7 +1,7 @@  - Release|Any CPU + Debug|Any CPU true false diff --git a/SGGL/FineUIPro.Web/TestRun/DriverScheme.aspx b/SGGL/FineUIPro.Web/TestRun/DriverScheme.aspx index 96236b06..23c4cac0 100644 --- a/SGGL/FineUIPro.Web/TestRun/DriverScheme.aspx +++ b/SGGL/FineUIPro.Web/TestRun/DriverScheme.aspx @@ -4,95 +4,120 @@ - + 开车方案管理
- - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + + + + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -
private void GetButtonPower() { - var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.DriverSchemeMenuId); + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.TestRunConstructSolutionMenuId); if (buttonList.Count() > 0) { if (buttonList.Contains(BLL.Const.BtnAdd)) diff --git a/SGGL/FineUIPro.Web/TestRun/DriverScheme.aspx.designer.cs b/SGGL/FineUIPro.Web/TestRun/DriverScheme.aspx.designer.cs index 79065460..47fd3969 100644 --- a/SGGL/FineUIPro.Web/TestRun/DriverScheme.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/TestRun/DriverScheme.aspx.designer.cs @@ -39,6 +39,33 @@ namespace FineUIPro.Web.TestRun { /// protected global::FineUIPro.Panel Panel1; + /// + /// Panel2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel2; + + /// + /// tvDataTypeInit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Tree tvDataTypeInit; + + /// + /// Panel4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel4; + /// /// Grid1 控件。 /// @@ -57,33 +84,6 @@ namespace FineUIPro.Web.TestRun { /// protected global::FineUIPro.Toolbar ToolSearch; - /// - /// drpUnitWorkId 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList drpUnitWorkId; - - /// - /// txtSchemeName 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtSchemeName; - - /// - /// btnSearch 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnSearch; - /// /// btnNew 控件。 /// @@ -93,6 +93,33 @@ namespace FineUIPro.Web.TestRun { /// protected global::FineUIPro.Button btnNew; + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + /// /// ToolbarSeparator1 控件。 /// @@ -156,6 +183,15 @@ namespace FineUIPro.Web.TestRun { /// protected global::FineUIPro.MenuButton btnMenuModify; + /// + /// btnMenuView 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuView; + /// /// btnMenuDel 控件。 /// diff --git a/SGGL/FineUIPro.Web/TestRun/DriverSchemeEdit.aspx b/SGGL/FineUIPro.Web/TestRun/DriverSchemeEdit.aspx index dd617486..fdfef7b6 100644 --- a/SGGL/FineUIPro.Web/TestRun/DriverSchemeEdit.aspx +++ b/SGGL/FineUIPro.Web/TestRun/DriverSchemeEdit.aspx @@ -6,102 +6,316 @@ 编辑开车方案管理 + + - - - - - - - - - - - - - - - - - - - - - - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + - + + + + + + + + + + + + + + + + + <%-- + --%> + + + + + + + + + + + + + + + + + <%----%> + + + + + + + + + <%----%> + + + + + + + + + <%----%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + --%> + + + - + + diff --git a/SGGL/FineUIPro.Web/TestRun/DriverSchemeEdit.aspx.cs b/SGGL/FineUIPro.Web/TestRun/DriverSchemeEdit.aspx.cs index b88888e6..951445f0 100644 --- a/SGGL/FineUIPro.Web/TestRun/DriverSchemeEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/TestRun/DriverSchemeEdit.aspx.cs @@ -1,140 +1,1134 @@ -using BLL; -using System; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using BLL; +using FineUIPro.Web.HSSE.Solution; +using Model; +using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.TestRun { public partial class DriverSchemeEdit : PageBase { - #region 加载 + #region 定义变量 + /// - /// 页面加载 + /// 方案审查主键 /// - /// - /// + public string ConstructSolutionId + { + get => (string)ViewState["ConstructSolutionId"]; + set => ViewState["ConstructSolutionId"] = value; + } + + #endregion + + public int ContactImg + { + get => Convert.ToInt32(ViewState["ContactImg"]); + set => ViewState["ContactImg"] = value; + } + protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { - BLL.UnitService.InitUnitDownList(this.drpApprovalUnitId, this.CurrUser.LoginProjectId, true); - BLL.UnitService.InitUnitDownList(this.drpExaminationUnitId, this.CurrUser.LoginProjectId, true); - BLL.UnitWorkService.InitUnitWorkDropDownList(this.drpUnitWorkId, this.CurrUser.LoginProjectId, true); - BLL.UserService.InitUserDropDownList(this.drpCompileMan, this.CurrUser.LoginProjectId, true); + InitDropDownList(); //加载下拉框 + BindZYRole(); + BindAQRole(); + BindSGRole(); + ContactImg = 0; + txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + ConstructSolutionId = Request.Params["constructSolutionId"]; - string id = Request.Params["id"]; - if (!string.IsNullOrEmpty(id)) + txtProjectName.Text = ProjectService.GetProjectByProjectId(CurrUser.LoginProjectId).ProjectName; + + if (!string.IsNullOrWhiteSpace(ConstructSolutionId)) { - Model.Driver_DriverScheme data = BLL.DriverSchemeService.GetDriverSchemeById(id); - if (data != null) + bindApprove(); + + #region 初始化表单 + + HFConstructSolutionId.Text = ConstructSolutionId; + var constructSolution = + TestRunConstructSolutionService.GetConstructSolutionByConstructSolutionId(ConstructSolutionId); + txtCode.Text = constructSolution.Code; + if (!string.IsNullOrEmpty(constructSolution.UnitId)) { - this.hdId.Text = id; - this.txtCode.Text = data.Code; - if (!string.IsNullOrEmpty(data.UnitWorkId)) + drpUnit.SelectedValue = constructSolution.UnitId; + } + + if (!string.IsNullOrEmpty(constructSolution.SolutionType)) + { + this.hdSolutionType.Text = constructSolution.SolutionType; + this.txtSolutionType.Text = TestRunConstructSolutionService.ConvertSolutionType(constructSolution.SolutionType); + } + + if (!string.IsNullOrEmpty(constructSolution.SpecialSchemeTypeId) && + !string.IsNullOrEmpty(constructSolution.SolutionType)) + { + drpSpecialType.SelectedValue = constructSolution.SpecialSchemeTypeId; + } + + if (constructSolution.CompileDate != null) + { + txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", constructSolution.CompileDate); + } + + if (!string.IsNullOrEmpty(constructSolution.UnitWorkIds) && + constructSolution.UnitWorkIds.Length > 0) + { + txtUnitWork.Values = constructSolution.UnitWorkIds.Split(','); + } + + if (!string.IsNullOrEmpty(constructSolution.CNProfessionalCodes) && + constructSolution.CNProfessionalCodes.Length > 0) + { + txtCNProfessional.Values = constructSolution.CNProfessionalCodes.Split(','); + } + + if (constructSolution.Edition != null) + { + txtEdition.Text = constructSolution.Edition.ToString(); + } + + txtSolutionName.Text = constructSolution.SolutionName; + txtDocContent.Text = HttpUtility.HtmlDecode(constructSolution.Content); + + #endregion + + #region 检查树节点 + + var zyUserIds = + TestRunConstructSolutionApproveService.GetUserIdsApprovesBySignType(ConstructSolutionId, "ZY"); + if (zyUserIds.Count > 0) + { + SetCheck(trOne, zyUserIds); + } + + var aqUserIds = + TestRunConstructSolutionApproveService.GetUserIdsApprovesBySignType(ConstructSolutionId, "AQ"); + if (aqUserIds.Count > 0) + { + SetCheck(trThree, aqUserIds); + } + + var sgUserIds = + TestRunConstructSolutionApproveService.GetUserIdsApprovesBySignType(ConstructSolutionId, "SG"); + if (sgUserIds.Count > 0) + { + SetCheck(trFive, sgUserIds); + } + + #endregion + + + if (constructSolution.State == Const.TestRunConstructSolution_ReCompile) + { + agree.Hidden = true; + options.Hidden = true; + optio.Hidden = true; + } + + if (constructSolution.State == Const.TestRunConstructSolution_Audit) + { + txtProjectName.Enabled = false; + txtCode.Enabled = false; + drpUnit.Enabled = false; + //txtSolutionType.Enabled = false; + drpSpecialType.Enabled = false; + txtCompileDate.Enabled = false; + txtSolutionName.Enabled = false; + txtCNProfessional.Enabled = false; + txtUnitWork.Enabled = false; + ContactImg = -2; + Panel2.Enabled = false; + Panel2.Hidden = true; + btnSave.Hidden = true; + txtDocContent.Readonly = true; + } + + ////提交版本人多次修改 + //if (constructSolution.CompileMan.Equals(CurrUser.UserId)) + //{ + // txtProjectName.Enabled = true; + // txtCode.Enabled = true; + // drpUnit.Enabled = true; + // drpModelType.Enabled = true; + // drpSpecialType.Enabled = true; + // txtCompileDate.Enabled = true; + // txtSolutionName.Enabled = true; + // txtCNProfessional.Enabled = true; + // txtUnitWork.Enabled = true; + // ContactImg = 0; + // Panel2.Enabled = true; + // rblIsAgree.Hidden = true; + // rblIsAgree.Required = false; + // options.Hidden = true; + // txtOptions.Required = false; + // optio.Hidden = true; + //} + + // if (drpModelType.SelectedItem.Text == "施工组织设计") drpSpecialType.Enabled = false; + } + else + { + agree.Hidden = true; + txtEdition.Text = "0"; + options.Hidden = true; + optio.Hidden = true; + plApprove2.Hidden = true; + txtCode.Text = SQLHelper.RunProcNewId2("SpGetNewCode3ByProjectId", + "dbo.Solution_TestRunConstructSolution", "Code", CurrUser.LoginProjectId); + this.txtSolutionType.Text = TestRunConstructSolutionService.ConvertSolutionType(Request.Params["SolutionType"]); + this.hdSolutionType.Text = Request.Params["SolutionType"]; + } + AddAttachTab(); + } + } + + /// + /// 向tab增加 + /// + private void AddAttachTab() + { + if (string.IsNullOrEmpty(HFConstructSolutionId.Text)) //新增记录 + HFConstructSolutionId.Text = SQLHelper.GetNewID(typeof(Solution_TestRunConstructSolution)); + PageContext.RegisterStartupScript(TabStrip1.GetAddTabReference("dynamic_tab2", + string.Format( + "../AttachFile/webuploader.aspx?type={0}&toKeyId={1}&path=FileUpload/Solution&menuId={2}", + ContactImg, HFConstructSolutionId.Text, Const.TestRunConstructSolutionMenuId), "附件", + IconHelper.GetIconUrl(Icon.Attach), false)); + + // PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/DocManage&menuId={1}", hdDocId.Text, Const.DocManageMenuId))); + } + + private void InitDropDownList() + { + var unitWork = UnitWorkService.GetUnitWorkLists(CurrUser.LoginProjectId); + var unitWorks = from x in unitWork + select + new + { + x.UnitWorkId, + UnitWorkName = x.UnitWorkCode + "-" + x.UnitWorkName + + UnitWorkService.GetProjectType(x.ProjectType) + }; + gvUnitWork.DataSource = unitWorks; + gvUnitWork.DataBind(); + var gvCNProfessional = CNProfessionalService.GetList(); + gvCNPro.DataSource = gvCNProfessional; + gvCNPro.DataBind(); + //SolutionTempleteTypeService.InitSolutionTempleteDropDownList(drpModelType, false); + SpecialSchemeTypeService.InitSpecialSchemeTypeDropDownList(drpSpecialType, false); + UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpUnit, CurrUser.LoginProjectId, + Const.ProjectUnitType_2, false); + } + + /// + /// 审批列表 + /// + private void bindApprove() + { + var list = TestRunConstructSolutionApproveService.getListData(ConstructSolutionId); + gvApprove.DataSource = list; + gvApprove.DataBind(); + } + + public string man(object man) + { + var appman = string.Empty; + if (UserService.GetUserByUserId(man.ToString()) != null) + appman = UserService.GetUserByUserId(man.ToString()).UserName; + return appman; + } + + private void Save(string saveType) + { + var constructSolution = new Solution_TestRunConstructSolution(); + if (!string.IsNullOrEmpty(ConstructSolutionId)) + { + constructSolution = + TestRunConstructSolutionService.GetConstructSolutionByConstructSolutionId(ConstructSolutionId); + } + constructSolution.Code = txtCode.Text.Trim(); + constructSolution.ProjectId = CurrUser.LoginProjectId; + if (drpUnit.SelectedValue != "0") + { + constructSolution.UnitId = drpUnit.SelectedValue; + } + constructSolution.SolutionType = this.hdSolutionType.Text.Trim(); + + if (drpSpecialType.SelectedValue != "0") + { + constructSolution.SpecialSchemeTypeId = drpSpecialType.SelectedValue; + } + + constructSolution.SolutionName = txtSolutionName.Text.Trim(); + if (!string.IsNullOrEmpty(txtCompileDate.Text.Trim())) + { + constructSolution.CompileDate = Convert.ToDateTime(txtCompileDate.Text.Trim()); + } + + if (txtUnitWork.Values.Length > 0) + { + constructSolution.UnitWorkIds = string.Join(",", txtUnitWork.Values); + } + + if (txtCNProfessional.Values.Length > 0) + { + constructSolution.CNProfessionalCodes = string.Join(",", txtCNProfessional.Values); + } + + constructSolution.Edition = Convert.ToInt32(txtEdition.Text); + constructSolution.ConstructSolutionId = HFConstructSolutionId.Text; + constructSolution.Content = txtDocContent.Text.Trim(); + + if (!string.IsNullOrEmpty(ConstructSolutionId)) + { + TestRunConstructSolutionService.UpdateConstructSolution(constructSolution); + if (string.IsNullOrEmpty(constructSolution.State)) + { + constructSolution.State = Const.TestRunConstructSolution_Compile; + } + + LogService.AddSys_Log(CurrUser, constructSolution.Code, ConstructSolutionId, + Const.TestRunConstructSolutionMenuId, "修改施工方案"); + } + else + { + constructSolution.CompileMan = CurrUser.UserId; + constructSolution.State = Const.TestRunConstructSolution_Compile; + TestRunConstructSolutionService.AddConstructSolution(constructSolution); + LogService.AddSys_Log(CurrUser, constructSolution.Code, ConstructSolutionId, + Const.TestRunConstructSolutionMenuId, "添加施工方案"); + } + if (constructSolution.State == Const.TestRunConstructSolution_Compile && saveType == "submit") + { + countersign(constructSolution.ConstructSolutionId); + constructSolution.State = Const.TestRunConstructSolution_Audit; + TestRunConstructSolutionService.UpdateConstructSolution(constructSolution); + + var approve = new Solution_TestRunConstructSolutionApprove(); + approve.ConstructSolutionId = constructSolution.ConstructSolutionId; + approve.ApproveDate = DateTime.Now; + approve.ApproveMan = CurrUser.UserId; + approve.ApproveType = Const.TestRunConstructSolution_Compile; + approve.Edition = Convert.ToInt32(txtEdition.Text); + TestRunConstructSolutionApproveService.AddConstructSolutionApprove(approve); + } + else if (constructSolution.State == Const.TestRunConstructSolution_ReCompile && saveType == "submit") + { + countersign(constructSolution.ConstructSolutionId); + constructSolution.State = Const.TestRunConstructSolution_Audit; + TestRunConstructSolutionService.UpdateConstructSolution(constructSolution); + + var approve = TestRunConstructSolutionApproveService.GetThisApproveByConstructSolutionId(ConstructSolutionId); + if (approve.ApproveMan == this.CurrUser.UserId && approve.ApproveType == Const.TestRunConstructSolution_ReCompile) + { + approve.ApproveDate = DateTime.Now; + approve.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue); + TestRunConstructSolutionApproveService.UpdateConstructSolutionApprove(approve); + } + + } + else if (constructSolution.State == Const.TestRunConstructSolution_Audit && saveType == "submit") + { + UpdateApprove(); + } + } + /// + /// 修改审批意见 + /// + private void UpdateApprove() + { + var approve = TestRunConstructSolutionApproveService.GetThisApproveByConstructSolutionId(ConstructSolutionId); + if (approve.ApproveMan == this.CurrUser.UserId) + { + approve.ApproveDate = DateTime.Now; + approve.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue); + approve.ApproveIdea = txtOptions.Text.Trim(); + approve.Edition = Convert.ToInt32(txtEdition.Text); + TestRunConstructSolutionApproveService.UpdateConstructSolutionApprove(approve); + CheckIsAllAgree(); + } + + } + /// + /// 判断是否全部同意 + /// + private void CheckIsAllAgree() + { + var edtion = Convert.ToInt32(txtEdition.Text); + var constructSolution = + TestRunConstructSolutionService.GetConstructSolutionByConstructSolutionId(ConstructSolutionId); + var allApproves = TestRunConstructSolutionApproveService.GetHandleConstructSolutionApprovesByConstructSolutionId(ConstructSolutionId, + constructSolution.Edition == null ? 0 : Convert.ToInt32(constructSolution.Edition)); + + var needApporveCount = allApproves.Where(x => x.ApproveDate == null).Count(); + if (needApporveCount > 0) return; //判断是否最后一个审批 + + var count = allApproves.Where(p => + p.ApproveDate != null && p.IsAgree != null && Convert.ToBoolean(p.IsAgree)).Count(); //查询会签同意的 + var fcount = allApproves.Where(p => + p.ApproveDate != null && p.IsAgree != null && !Convert.ToBoolean(p.IsAgree)).Count(); //查询会签不同意的 + if (count == allApproves.Count)//全部同意 + { + var cons = + TestRunConstructSolutionService.GetConstructSolutionByConstructSolutionId( + ConstructSolutionId); + cons.State = Const.TestRunConstructSolution_Complete; + cons.CompileDate = DateTime.Now; + TestRunConstructSolutionService.UpdateConstructSolution(cons); + } + + //有不同意意见,打回重新编制 + if (fcount > 0) + { + var cons = + TestRunConstructSolutionService.GetConstructSolutionByConstructSolutionId( + ConstructSolutionId); + var reApprove = new Solution_TestRunConstructSolutionApprove(); + reApprove.ConstructSolutionId = constructSolution.ConstructSolutionId; + reApprove.ApproveMan = cons.CompileMan; + reApprove.ApproveType = Const.TestRunConstructSolution_ReCompile; + edtion++; + reApprove.Edition = edtion; + TestRunConstructSolutionApproveService.AddConstructSolutionApprove(reApprove); + + cons.State = Const.TestRunConstructSolution_ReCompile; + cons.CompileDate = DateTime.Now; + cons.Edition = edtion; + constructSolution.State = Const.TestRunConstructSolution_ReCompile; + TestRunConstructSolutionService.UpdateConstructSolution(cons); + LogService.AddSys_Log(CurrUser, constructSolution.Code, ConstructSolutionId, + Const.TestRunConstructSolutionMenuId, "修改施工方案"); + } + } + + /// + /// 保存验证 + /// + /// + /// + public void validate(string buttonName, string tip) + { + if (CommonService.GetAllButtonPowerList(CurrUser.LoginProjectId, CurrUser.UserId, + Const.TestRunConstructSolutionMenuId, buttonName)) + { + var err = string.Empty; + if (!AttachFileService.Getfile(HFConstructSolutionId.Text, Const.TestRunConstructSolutionMenuId)) + err += "请上传附件,"; + var list = new List(); + list.Add(trOne); + list.Add(trThree); + list.Add(trFive); + var res = false; + foreach (var item in list) + if (nodesCheckd(item)) + { + res = true; + break; + } + + if (!res) err += "请选择总包会签人员,"; + if (!string.IsNullOrWhiteSpace(err)) + { + err = err.Substring(0, err.LastIndexOf(",")); + err += "!"; + } + + if (!string.IsNullOrWhiteSpace(err)) + { + Alert.ShowInTop(err, MessageBoxIcon.Warning); + return; + } + + if (!string.IsNullOrWhiteSpace(ConstructSolutionId)) + { + //更新时操作 + if (tip == "save") + EditConstructSol("save"); + else + EditConstructSol("submit"); + } + else + { + if (tip == "save") + SaveTestRunConstructSolution("save"); + else + SaveTestRunConstructSolution("submit"); + //添加时操作 + } + + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + if (tip == "save") + { + tip = "保存成功!"; + } + else + { + tip = "提交成功!"; + TestRunConstructSolutionApproveService.PushMessageToNextMan(ConstructSolutionId); + } + + Alert.ShowInTop(tip, MessageBoxIcon.Success); + } + else + { + Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + } + } + #region 添加时候的保存 + + /// + /// 保存方案审查 + /// + /// 保存类型 + private void SaveTestRunConstructSolution(string saveType) + { + var constructSolution = new Solution_TestRunConstructSolution(); + constructSolution.Code = txtCode.Text.Trim(); + constructSolution.ProjectId = CurrUser.LoginProjectId; + if (drpUnit.SelectedValue != "0") + { + constructSolution.UnitId = drpUnit.SelectedValue; + } + + constructSolution.SolutionType = this.hdSolutionType.Text.Trim(); + + if (drpSpecialType.SelectedValue != "0") + { + constructSolution.SpecialSchemeTypeId = drpSpecialType.SelectedValue; + } + + constructSolution.SolutionName = txtSolutionName.Text.Trim(); + if (!string.IsNullOrEmpty(txtCompileDate.Text.Trim())) + { + constructSolution.CompileDate = Convert.ToDateTime(txtCompileDate.Text.Trim()); + } + + if (txtUnitWork.Values.Length > 0) + { + constructSolution.UnitWorkIds = string.Join(",", txtUnitWork.Values); + } + + if (txtCNProfessional.Values.Length > 0) + { + constructSolution.CNProfessionalCodes = string.Join(",", txtCNProfessional.Values); + } + + if (saveType == "submit") + { + constructSolution.State = Const.TestRunConstructSolution_Audit; + } + else + { + constructSolution.State = Const.TestRunConstructSolution_Compile; + } + + constructSolution.CompileMan = CurrUser.UserId; + constructSolution.Edition = Convert.ToInt32(txtEdition.Text); + constructSolution.ConstructSolutionId = HFConstructSolutionId.Text; + constructSolution.Content = txtDocContent.Text.Trim(); + if (!string.IsNullOrEmpty(ConstructSolutionId)) + { + TestRunConstructSolutionService.UpdateConstructSolution(constructSolution); + } + else + { + TestRunConstructSolutionService.AddConstructSolution(constructSolution); + } + + + if (saveType == "submit") + { + var approve1 = new Solution_TestRunConstructSolutionApprove(); + approve1.ConstructSolutionId = constructSolution.ConstructSolutionId; + approve1.ApproveDate = DateTime.Now; + approve1.ApproveMan = CurrUser.UserId; + approve1.ApproveType = Const.TestRunConstructSolution_Compile; + approve1.Edition = Convert.ToInt32(txtEdition.Text); + TestRunConstructSolutionApproveService.AddConstructSolutionApprove(approve1); + } + + + LogService.AddSys_Log(CurrUser, constructSolution.Code, ConstructSolutionId, + Const.TestRunConstructSolutionMenuId, "添加施工方案"); + + //} + + //提交 + if (saveType == "submit") + { + countersign(constructSolution.ConstructSolutionId); + } + + LogService.AddSys_Log(CurrUser, constructSolution.Code, ConstructSolutionId, + Const.TestRunConstructSolutionMenuId, "编制方案审查"); + } + + #endregion + + /// + /// 删除未选择的代办记录 + /// + /// + private void delSolutionApprove(string constructSolutionId, string man, string signType) + { + var count = TestRunConstructSolutionApproveService.getListSolutionApproveCount(constructSolutionId, man, + signType); + if (count > 0) TestRunConstructSolutionApproveService.delSolutionApprove(constructSolutionId, man); + } + + + /// + /// 会签 + /// + private void countersign(string constructSolutionId) + { + var solution = TestRunConstructSolutionService.GetConstructSolutionByConstructSolutionId(ConstructSolutionId); + + if (trOne.Nodes[0].Nodes.Count > 0) + foreach (var tn in trOne.Nodes[0].Nodes) + if (tn.Checked) + { + var approve = new Solution_TestRunConstructSolutionApprove(); + approve.ConstructSolutionId = constructSolutionId; + approve.ApproveMan = tn.NodeID; + approve.ApproveType = Const.TestRunConstructSolution_Audit; + approve.SignType = "ZY"; + var edtion = Convert.ToInt32(txtEdition.Text); + //if (solution != null) edtion++; + approve.Edition = edtion; + delSolutionApprove(constructSolutionId, tn.NodeID, "ZY"); + TestRunConstructSolutionApproveService.AddConstructSolutionApprove(approve); + //APICommonService.SendSubscribeMessage(approve.ApproveMan, "施工方案待办理", this.CurrUser.UserName, string.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now)); + } + else + { + delSolutionApprove(constructSolutionId, tn.NodeID, "ZY"); + } + + if (trThree.Nodes[0].Nodes.Count > 0) + foreach (var tn in trThree.Nodes[0].Nodes) + if (tn.Checked) + { + var approve = new Solution_TestRunConstructSolutionApprove(); + approve.ConstructSolutionId = constructSolutionId; + approve.ApproveMan = tn.NodeID; + approve.ApproveType = Const.TestRunConstructSolution_Audit; + approve.SignType = "AQ"; + var edtion = Convert.ToInt32(txtEdition.Text); + // if (solution != null) edtion++; + approve.Edition = edtion; + delSolutionApprove(constructSolutionId, tn.NodeID, "AQ"); + TestRunConstructSolutionApproveService.AddConstructSolutionApprove(approve); + //APICommonService.SendSubscribeMessage(approve.ApproveMan, "施工方案待办理", this.CurrUser.UserName, string.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now)); + } + else + { + delSolutionApprove(constructSolutionId, tn.NodeID, "AQ"); + } + + if (trFive.Nodes[0].Nodes.Count > 0) + foreach (var tn in trFive.Nodes[0].Nodes) + if (tn.Checked) + { + var approve = new Solution_TestRunConstructSolutionApprove(); + approve.ConstructSolutionId = constructSolutionId; + approve.ApproveMan = tn.NodeID; + approve.ApproveType = Const.TestRunConstructSolution_Audit; + approve.SignType = "SG"; + var edtion = Convert.ToInt32(txtEdition.Text); + // if (solution != null) edtion++; + approve.Edition = edtion; + delSolutionApprove(constructSolutionId, tn.NodeID, "SG"); + TestRunConstructSolutionApproveService.AddConstructSolutionApprove(approve); + // APICommonService.SendSubscribeMessage(approve.ApproveMan, "施工方案待办理", this.CurrUser.UserName, string.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now)); + } + else + { + delSolutionApprove(constructSolutionId, tn.NodeID, "SG"); + } + } + + //protected void imgBtnFile_Click(object sender, EventArgs e) + //{ + // if (string.IsNullOrEmpty(HFConstructSolutionId.Text)) //新增记录 + // HFConstructSolutionId.Text = SQLHelper.GetNewID(typeof(Solution_TestRunConstructSolution)); + // PageContext.RegisterStartupScript(WindowAtt.GetShowReference( + // string.Format( + // "../AttachFile/webuploader.aspx?type={0}&toKeyId={1}&path=FileUpload/Solution&menuId={2}", + // ContactImg, HFConstructSolutionId.Text, Const.TestRunConstructSolutionMenuId))); + //} + + protected void btnapprove_Click(object sender, EventArgs e) + { + //HFConstructSolutionId.Text + var approve = + TestRunConstructSolutionApproveService.GetConstructSolutionApproveByApproveMan(HFConstructSolutionId.Text, + CurrUser.UserId); + if (approve != null) + { + var approveId = approve.ConstructSolutionApproveId; + PageContext.RegisterStartupScript(WindowAtt.GetShowReference( + string.Format( + "../AttachFile/webuploader.aspx?type={0}&toKeyId={1}&path=FileUpload/Solution&menuId={2}", + 0, approveId, Const.TestRunConstructSolutionMenuId))); + } + } + + + protected void gvApprove_RowCommand(object sender, GridCommandEventArgs e) + { + var keys = gvApprove.DataKeys[e.RowIndex]; + var fileId = string.Empty; + if (keys == null) + return; + fileId = keys[0].ToString(); + PageContext.RegisterStartupScript(WindowAtt.GetShowReference( + string.Format( + "../AttachFile/webuploader.aspx?type={0}&toKeyId={1}&path=FileUpload/Solution&menuId={2}", + -1, fileId, Const.TestRunConstructSolutionMenuId))); + } + + #region 保存/提交 + + protected void btnSave_Click(object sender, EventArgs e) + { + //validate(Const.BtnSave, "save"); + if (CommonService.GetAllButtonPowerList(CurrUser.LoginProjectId, CurrUser.UserId, + Const.TestRunConstructSolutionMenuId, Const.BtnSave)) + { + // SaveTestRunConstructSolution("save"); + Save("save"); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + Alert.ShowInTop("保存成功!", MessageBoxIcon.Success); + } + else + { + Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + } + } + + protected void btnSubmit_Click(object sender, EventArgs e) + { + // validate(Const.BtnSubmit, "submmit"); + //if (!CommonService.GetAllButtonPowerList(CurrUser.LoginProjectId, CurrUser.UserId, + // Const.TestRunConstructSolutionMenuId, Const.BtnSubmit)) + //{ + // Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + // return; + //} + var err = string.Empty; + if (!AttachFileService.Getfile(HFConstructSolutionId.Text, Const.TestRunConstructSolutionMenuId)) + err += "请上传附件,"; + var list = new List(); + list.Add(trOne); + list.Add(trThree); + list.Add(trFive); + var res = false; + foreach (var item in list) + if (nodesCheckd(item)) + { + res = true; + break; + } + + if (!res) err += "请选择总包会签人员,"; + if (!string.IsNullOrWhiteSpace(err)) + { + err = err.Substring(0, err.LastIndexOf(",")); + err += "!"; + } + + if (!string.IsNullOrWhiteSpace(err)) + { + Alert.ShowInTop(err, MessageBoxIcon.Warning); + return; + } + + Save("submit"); + TestRunConstructSolutionApproveService.PushMessageToNextMan(ConstructSolutionId); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + Alert.ShowInTop("提交成功!", MessageBoxIcon.Success); + } + + + /// + /// 编辑时候保存 + /// + private void EditConstructSol(string saveType) + { + var constructSolution = new Solution_TestRunConstructSolution(); + constructSolution.Code = txtCode.Text.Trim(); + constructSolution.ProjectId = CurrUser.LoginProjectId; + if (drpUnit.SelectedValue != "0") + { + constructSolution.UnitId = drpUnit.SelectedValue; + } + + constructSolution.SolutionType = this.hdSolutionType.Text.Trim(); + + if (drpSpecialType.SelectedValue != "0") + { + constructSolution.SpecialSchemeTypeId = drpSpecialType.SelectedValue; + } + + constructSolution.SolutionName = txtSolutionName.Text.Trim(); + var edtion = Convert.ToInt32(txtEdition.Text); + constructSolution.Edition = edtion; + if (!string.IsNullOrEmpty(txtCompileDate.Text.Trim())) + { + constructSolution.CompileDate = Convert.ToDateTime(txtCompileDate.Text.Trim()); + } + + if (txtUnitWork.Values.Length > 0) + { + constructSolution.UnitWorkIds = string.Join(",", txtUnitWork.Values); + } + + if (txtCNProfessional.Values.Length > 0) + { + constructSolution.CNProfessionalCodes = string.Join(",", txtCNProfessional.Values); + } + + if (!string.IsNullOrEmpty(ConstructSolutionId)) + { + constructSolution.ConstructSolutionId = ConstructSolutionId; + + var constructSolution1 = + TestRunConstructSolutionService.GetConstructSolutionByConstructSolutionId(ConstructSolutionId); + if (saveType == "submit") + { + if (CurrUser.UserId != constructSolution1.CompileMan) //办理人不是编制人,提示查看审批信息 + { + if (constructSolution1.State == Const.TestRunConstructSolution_Audit) { - this.drpUnitWorkId.SelectedValue = data.UnitWorkId; + constructSolution.State = constructSolution1.State; } - this.txtSchemeName.Text = data.SchemeName; - this.txtSchemeCode.Text = data.SchemeCode; - if (!string.IsNullOrEmpty(data.CompileMan)) + else { - this.drpCompileMan.SelectedValue = data.CompileMan; + constructSolution.State = Const.TestRunConstructSolution_Audit; } - if (!string.IsNullOrEmpty(data.ApprovalUnitId)) + } + else + { + countersign(constructSolution.ConstructSolutionId); + constructSolution.State = constructSolution1.State; + } + + if (!CurrUser.UserId.Equals(constructSolution1.CompileMan)) + { + var approve = TestRunConstructSolutionApproveService.GetConstructSoluAppByApproveMan( + ConstructSolutionId, CurrUser.UserId, Convert.ToInt32(constructSolution1.Edition)); + if (saveType == "submit") { - this.drpApprovalUnitId.SelectedValue = data.ApprovalUnitId; + approve.ApproveDate = DateTime.Now; } - if (!string.IsNullOrEmpty(data.ExaminationUnitId)) + + approve.Edition = Convert.ToInt32(edtion); + approve.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue); + approve.ApproveIdea = txtOptions.Text.Trim(); + TestRunConstructSolutionApproveService.UpdateConstructSolutionApprove(approve); + } + else + { + if (saveType == "submit") { - this.drpExaminationUnitId.SelectedValue = data.ExaminationUnitId; + if (constructSolution1.State == Const.TestRunConstructSolution_Audit) //==会签状态升级版本 + { + var reApprove = new Solution_TestRunConstructSolutionApprove(); + reApprove.ConstructSolutionId = constructSolution.ConstructSolutionId; + reApprove.ApproveDate = DateTime.Now; + reApprove.ApproveMan = constructSolution1.CompileMan; + reApprove.ApproveType = Const.TestRunConstructSolution_ReCompile; + edtion++; + reApprove.Edition = edtion; + TestRunConstructSolutionApproveService.AddConstructSolutionApprove(reApprove); + } + else + { + var approves = + TestRunConstructSolutionApproveService.GetConstructSolApproveByApproveMan( + ConstructSolutionId, constructSolution1.CompileMan); + approves.ApproveDate = DateTime.Now; + TestRunConstructSolutionApproveService.UpdateConstructSolutionApprove(approves); + } } - this.txtPlanCompileDate.Text = data.PlanCompileDate.HasValue ? string.Format("{0:yyyy-MM-dd}", data.PlanCompileDate) : ""; - this.txtActualCompileDate.Text = data.ActualCompileDate.HasValue ? string.Format("{0:yyyy-MM-dd}", data.ActualCompileDate) : ""; - this.txtSubmitDate.Text = data.SubmitDate.HasValue ? string.Format("{0:yyyy-MM-dd}", data.SubmitDate) : ""; - this.txtApprovalCompletionDate.Text = data.ApprovalCompletionDate.HasValue ? string.Format("{0:yyyy-MM-dd}", data.ApprovalCompletionDate) : ""; - this.txtRemark.Text = data.Remark; } } else { - this.drpCompileMan.SelectedValue = this.CurrUser.UserId; + constructSolution.State = constructSolution1.State; + } + + //提交时候,更新提交版本 + if (CurrUser.UserId.Equals(constructSolution1.CompileMan)) + { + if (constructSolution1.State != Const.TestRunConstructSolution_Audit) + { + edtion++; + } + + constructSolution.Edition = Convert.ToInt32(edtion); + constructSolution.State = Const.TestRunConstructSolution_Audit; + } + + TestRunConstructSolutionService.UpdateConstructSolution(constructSolution); + //判断状态,全部会签同意,则审批完成 + if (saveType == "submit") + { + var allApproves = + TestRunConstructSolutionApproveService.GetHandleConstructSolutionApprovesByConstructSolutionId( + ConstructSolutionId, + constructSolution.Edition == null ? 0 : Convert.ToInt32(constructSolution.Edition)); + var count = allApproves.Where(p => + p.ApproveDate != null && p.IsAgree != null && Convert.ToBoolean(p.IsAgree)).Count(); //查询会签同意的 + var fcount = allApproves.Where(p => + p.ApproveDate != null && p.IsAgree != null && !Convert.ToBoolean(p.IsAgree)).Count(); //查询会签不同意的 + if (count + fcount == allApproves.Count) + { + if (count == allApproves.Count) + { + var cons = + TestRunConstructSolutionService.GetConstructSolutionByConstructSolutionId( + ConstructSolutionId); + cons.State = Const.TestRunConstructSolution_Complete; + cons.CompileDate = DateTime.Now; + TestRunConstructSolutionService.UpdateConstructSolution(cons); + } + + //有不同意意见,打回重新编制 + if (fcount > 0) + { + var cons = + TestRunConstructSolutionService.GetConstructSolutionByConstructSolutionId( + ConstructSolutionId); + var reApprove = new Solution_TestRunConstructSolutionApprove(); + reApprove.ConstructSolutionId = constructSolution.ConstructSolutionId; + reApprove.ApproveMan = cons.CompileMan; + reApprove.ApproveType = Const.TestRunConstructSolution_ReCompile; + edtion++; + reApprove.Edition = edtion; + TestRunConstructSolutionApproveService.AddConstructSolutionApprove(reApprove); + + cons.State = Const.TestRunConstructSolution_ReCompile; + cons.CompileDate = DateTime.Now; + constructSolution.State = Const.TestRunConstructSolution_ReCompile; + TestRunConstructSolutionService.UpdateConstructSolution(cons); + } + } + } + + LogService.AddSys_Log(CurrUser, constructSolution.Code, ConstructSolutionId, + Const.TestRunConstructSolutionMenuId, "修改施工方案"); + } + } + + #endregion + + #region 动态加载角色树 + + /// + /// 设置树的节点选择 + /// + /// + /// + private void SetCheck(Tree tree, List userIds) + { + foreach (var tn in tree.Nodes[0].Nodes) + { + if (userIds.Contains(tn.NodeID)) + { + tn.Checked = true; + txtCopyMan.Text += tn.Text; } } } - #endregion - #region 附件上传 - /// - /// 附件上传 + /// 加载角色树:动态加载 /// - /// - /// - protected void btnAttach_Click(object sender, EventArgs e) + private void BindZYRole() { - if (string.IsNullOrEmpty(this.hdId.Text)) //新增记录 + var rootNode = new TreeNode(); //定义根节点 + rootNode.Text = "专业工程师"; + rootNode.NodeID = "0"; + rootNode.Expanded = true; + rootNode.EnableCheckEvent = true; + trOne.Nodes.Add(rootNode); + trOne.EnableCheckBox = true; + using (var db = new SGGLDB(Funs.ConnString)) { - this.hdId.Text = SQLHelper.GetNewID(typeof(Model.Driver_DriverScheme)); + var userList = from x in db.Sys_User + join y in db.Project_ProjectUnit + on x.UnitId equals y.UnitId + join p in db.Project_ProjectUser + on x.UserId equals p.UserId + where p.RoleId.Contains(Const.ZBCNEngineer) + && y.UnitType == Const.ProjectUnitType_1 && p.ProjectId == CurrUser.LoginProjectId && + y.ProjectId == CurrUser.LoginProjectId + select x; + //var ss = LINQToDataTable(userList); + foreach (var u in userList) + { + var Node = new TreeNode(); + Node.Text = u.UserName; + Node.NodeID = u.UserId; + Node.EnableCheckEvent = true; + rootNode.Nodes.Add(Node); + } } - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/TestRun/DriverScheme&menuId={1}", this.hdId.Text, BLL.Const.DriverSchemeMenuId))); } + + /// + /// 判断是否有选择 + /// + /// + /// + public bool nodesCheckd(Tree node) + { + var res = false; + if (node.Nodes[0].Nodes.Count > 0) + foreach (var item in node.Nodes[0].Nodes) + if (item.Checked) + { + res = true; + break; + } + + return res; + } + + private void BindAQRole() + { + var rootNode = new TreeNode(); //定义根节点 + rootNode.Text = "HSE组"; + rootNode.NodeID = "0"; + rootNode.Expanded = true; + rootNode.EnableCheckEvent = true; + trThree.Nodes.Add(rootNode); + trThree.EnableCheckBox = true; + using (var db = new SGGLDB(Funs.ConnString)) + { + var userList = from x in db.Sys_User + join y in db.Project_ProjectUnit + on x.UnitId equals y.UnitId + join p in db.Project_ProjectUser + on x.UserId equals p.UserId + where (p.RoleId.Contains(Const.HSSEManager) || p.RoleId.Contains(Const.HSSEEngineer)) + && y.UnitType == Const.ProjectUnitType_1 && p.ProjectId == CurrUser.LoginProjectId && + y.ProjectId == CurrUser.LoginProjectId + orderby x.UserCode + select x; + foreach (var u in userList) + { + var roleNode = new TreeNode(); + roleNode.Text = u.UserName; + roleNode.NodeID = u.UserId; + rootNode.Nodes.Add(roleNode); + } + } + } + + private void BindSGRole() + { + var rootNode = new TreeNode(); //定义根节点 + rootNode.Text = "施工经理"; + rootNode.NodeID = "0"; + rootNode.Expanded = true; + rootNode.EnableCheckEvent = true; + trFive.Nodes.Add(rootNode); + trFive.EnableCheckBox = true; + using (var db = new SGGLDB(Funs.ConnString)) + { + var userList = from x in db.Sys_User + join y in db.Project_ProjectUnit + on x.UnitId equals y.UnitId + join p in db.Project_ProjectUser + on x.UserId equals p.UserId + where (p.RoleId.Contains(Const.ConstructionManager) || + p.RoleId.Contains(Const.ConstructionAssistantManager)) + && y.UnitType == Const.ProjectUnitType_1 && p.ProjectId == CurrUser.LoginProjectId && + y.ProjectId == CurrUser.LoginProjectId + orderby x.UserCode + select x; + foreach (var u in userList) + { + var roleNode = new TreeNode(); + roleNode.Text = u.UserName; + roleNode.NodeID = u.UserId; + rootNode.Nodes.Add(roleNode); + } + } + } + #endregion - #region 保存 - /// - /// 保存按钮 - /// - /// - /// - protected void btnSave_Click(object sender, EventArgs e) + #region 树结构的全选 + + protected void trOne_NodeCheck(object sender, TreeCheckEventArgs e) { - if (this.drpUnitWorkId.SelectedValue == BLL.Const._Null) + if (e.Checked) + trOne.CheckAllNodes(e.Node.Nodes); + else + trOne.UncheckAllNodes(e.Node.Nodes); + } + + protected void trTwo_NodeCheck(object sender, TreeCheckEventArgs e) + { + /*if (e.Checked) { - Alert.ShowInTop("请选择装置/工序!", MessageBoxIcon.Warning); - return; - } - string id = Request.Params["id"]; - Model.Driver_DriverScheme newData = new Model.Driver_DriverScheme(); - newData.Code = this.txtCode.Text.Trim(); - newData.SchemeName = this.txtSchemeName.Text.Trim(); - newData.SchemeCode = this.txtSchemeCode.Text.Trim(); - newData.UnitWorkId = this.drpUnitWorkId.SelectedValue; - if (this.drpCompileMan.SelectedValue!=BLL.Const._Null) - { - newData.CompileMan = this.drpCompileMan.SelectedValue; - } - if (this.drpApprovalUnitId.SelectedValue != BLL.Const._Null) - { - newData.ApprovalUnitId = this.drpApprovalUnitId.SelectedValue; - } - if (this.drpExaminationUnitId.SelectedValue != BLL.Const._Null) - { - newData.ExaminationUnitId = this.drpExaminationUnitId.SelectedValue; - } - newData.PlanCompileDate = Funs.GetNewDateTime(this.txtPlanCompileDate.Text.Trim()); - newData.ActualCompileDate = Funs.GetNewDateTime(this.txtActualCompileDate.Text.Trim()); - newData.SubmitDate = Funs.GetNewDateTime(this.txtSubmitDate.Text.Trim()); - newData.ApprovalCompletionDate = Funs.GetNewDateTime(this.txtApprovalCompletionDate.Text.Trim()); - newData.Remark = this.txtRemark.Text.Trim(); - newData.ProjectId = this.CurrUser.LoginProjectId; - if (!string.IsNullOrEmpty(id)) - { - newData.DriverSchemeId = id; - BLL.DriverSchemeService.UpdateDriverScheme(newData); + trTwo.CheckAllNodes(e.Node.Nodes); } else { - if (!string.IsNullOrEmpty(this.hdId.Text)) - { - newData.DriverSchemeId = this.hdId.Text.Trim(); - } - else - { - newData.DriverSchemeId = SQLHelper.GetNewID(typeof(Model.Driver_DriverScheme)); - this.hdId.Text = newData.DriverSchemeId; - } - BLL.DriverSchemeService.AddDriverScheme(newData); - } - ShowNotify("保存成功!", MessageBoxIcon.Success); - PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + trTwo.UncheckAllNodes(e.Node.Nodes); + }*/ } + + protected void trThree_NodeCheck(object sender, TreeCheckEventArgs e) + { + if (e.Checked) + trThree.CheckAllNodes(e.Node.Nodes); + else + trThree.UncheckAllNodes(e.Node.Nodes); + } + + protected void trFour_NodeCheck(object sender, TreeCheckEventArgs e) + { + /*if (e.Checked) + { + trFour.CheckAllNodes(e.Node.Nodes); + } + else + { + trFour.UncheckAllNodes(e.Node.Nodes); + }*/ + } + + protected void trFive_NodeCheck(object sender, TreeCheckEventArgs e) + { + if (e.Checked) + trFive.CheckAllNodes(e.Node.Nodes); + else + trFive.UncheckAllNodes(e.Node.Nodes); + } + + protected void trSixe_NodeCheck(object sender, TreeCheckEventArgs e) + { + /*if (e.Checked) + { + trSixe.CheckAllNodes(e.Node.Nodes); + } + else + { + trSixe.UncheckAllNodes(e.Node.Nodes); + }*/ + } + #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/TestRun/DriverSchemeEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/TestRun/DriverSchemeEdit.aspx.designer.cs index 628508fb..f7e3d2d2 100644 --- a/SGGL/FineUIPro.Web/TestRun/DriverSchemeEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/TestRun/DriverSchemeEdit.aspx.designer.cs @@ -39,51 +39,6 @@ namespace FineUIPro.Web.TestRun { /// protected global::FineUIPro.Form SimpleForm1; - /// - /// Toolbar1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Toolbar Toolbar1; - - /// - /// ToolbarFill1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.ToolbarFill ToolbarFill1; - - /// - /// btnSave 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnSave; - - /// - /// hdAttachUrl 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.HiddenField hdAttachUrl; - - /// - /// hdId 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.HiddenField hdId; - /// /// ContentPanel2 控件。 /// @@ -102,6 +57,69 @@ namespace FineUIPro.Web.TestRun { /// protected global::FineUIPro.Form Form2; + /// + /// txtProjectName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProjectName; + + /// + /// txtSolutionName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSolutionName; + + /// + /// drpUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnit; + + /// + /// txtSolutionType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtSolutionType; + + /// + /// txtUnitWork 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownBox txtUnitWork; + + /// + /// gvUnitWork 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid gvUnitWork; + + /// + /// drpSpecialType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpSpecialType; + /// /// txtCode 控件。 /// @@ -112,130 +130,292 @@ namespace FineUIPro.Web.TestRun { protected global::FineUIPro.TextBox txtCode; /// - /// drpUnitWorkId 控件。 + /// txtEdition 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.DropDownList drpUnitWorkId; + protected global::FineUIPro.NumberBox txtEdition; /// - /// txtSchemeName 控件。 + /// txtCNProfessional 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextBox txtSchemeName; + protected global::FineUIPro.DropDownBox txtCNProfessional; /// - /// txtSchemeCode 控件。 + /// gvCNPro 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextBox txtSchemeCode; + protected global::FineUIPro.Grid gvCNPro; /// - /// drpCompileMan 控件。 + /// txtCompileDate 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.DropDownList drpCompileMan; + protected global::FineUIPro.DatePicker txtCompileDate; /// - /// drpApprovalUnitId 控件。 + /// TabStrip1 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.DropDownList drpApprovalUnitId; + protected global::FineUIPro.TabStrip TabStrip1; /// - /// drpExaminationUnitId 控件。 + /// SimpleForm2 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.DropDownList drpExaminationUnitId; + protected global::FineUIPro.SimpleForm SimpleForm2; /// - /// txtPlanCompileDate 控件。 + /// txtDocContent 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.DatePicker txtPlanCompileDate; + protected global::FineUIPro.HtmlEditor txtDocContent; /// - /// txtActualCompileDate 控件。 + /// txtCopyMan 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.DatePicker txtActualCompileDate; + protected global::FineUIPro.TextBox txtCopyMan; /// - /// txtSubmitDate 控件。 + /// Panel2 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.DatePicker txtSubmitDate; + protected global::FineUIPro.Panel Panel2; /// - /// txtApprovalCompletionDate 控件。 + /// Panel1 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.DatePicker txtApprovalCompletionDate; + protected global::FineUIPro.Panel Panel1; /// - /// txtRemark 控件。 + /// trOne 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextArea txtRemark; + protected global::FineUIPro.Tree trOne; /// - /// Panel3 控件。 + /// Panel4 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Panel Panel3; + protected global::FineUIPro.Panel Panel4; /// - /// lblAttach 控件。 + /// trThree 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Label lblAttach; + protected global::FineUIPro.Tree trThree; /// - /// btnAttach 控件。 + /// Panel6 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Button btnAttach; + protected global::FineUIPro.Panel Panel6; + + /// + /// trFive 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Tree trFive; + + /// + /// agree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow agree; + + /// + /// rblIsAgree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rblIsAgree; + + /// + /// options 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow options; + + /// + /// txtOptions 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtOptions; + + /// + /// optio 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow optio; + + /// + /// btnapprove 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnapprove; + + /// + /// plApprove2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow plApprove2; + + /// + /// gvApprove 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid gvApprove; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label3; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// HFConstructSolutionId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField HFConstructSolutionId; + + /// + /// hdSolutionType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdSolutionType; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnSubmit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSubmit; /// /// WindowAtt 控件。 diff --git a/SGGL/FineUIPro.Web/TestRun/DriverSchemeView.aspx b/SGGL/FineUIPro.Web/TestRun/DriverSchemeView.aspx new file mode 100644 index 00000000..4b5c0887 --- /dev/null +++ b/SGGL/FineUIPro.Web/TestRun/DriverSchemeView.aspx @@ -0,0 +1,302 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DriverSchemeView.aspx.cs" Inherits="FineUIPro.Web.TestRun.DriverSchemeView" %> + + + + + + 开车方案 + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + + + + --%> + + + + + + + + + + + + + + <%-- + --%> + + + + + + + + + + + + + + + + + <%-- + + + + --%> + + + + + + + <%-- + + + + --%> + + + + + + + + + + + + + + + + + + + + <%-- + + + + + + + + + + + + + + + + --%> + + + + + + + + + + + + + + + + + <%----%> + + + + + + + + + <%----%> + + + + + + + + + <%----%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/TestRun/DriverSchemeView.aspx.cs b/SGGL/FineUIPro.Web/TestRun/DriverSchemeView.aspx.cs new file mode 100644 index 00000000..7b0ae68e --- /dev/null +++ b/SGGL/FineUIPro.Web/TestRun/DriverSchemeView.aspx.cs @@ -0,0 +1,329 @@ +using BLL; +using Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using AspNet = System.Web.UI.WebControls; + +namespace FineUIPro.Web.TestRun +{ + public partial class DriverSchemeView : PageBase + { + public string ConstructSolutionId + { + get + { + return (string)ViewState["ConstructSolutionId"]; + } + set + { + ViewState["ConstructSolutionId"] = value; + } + } + protected void imgBtnFile_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference( + String.Format("../AttachFile/webuploader.aspx?type={0}&toKeyId={1}&path=FileUpload/Solution&menuId={2}", + -1, ConstructSolutionId, Const.TestRunConstructSolutionMenuId))); + } + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + + ConstructSolutionId = Request.Params["constructSolutionId"]; + if (!string.IsNullOrWhiteSpace(ConstructSolutionId)) + { + txtProjectName.Text = ProjectService.GetProjectByProjectId(CurrUser.LoginProjectId).ProjectName; + Model.Solution_TestRunConstructSolution constructSolution = TestRunConstructSolutionService.GetConstructSolutionByConstructSolutionId(ConstructSolutionId); + txtCode.Text = constructSolution.Code; + if (!string.IsNullOrEmpty(constructSolution.UnitId)) + { + drpUnit.Text = UnitService.GetUnitNameByUnitId(constructSolution.UnitId); + } + if (!string.IsNullOrEmpty(constructSolution.SolutionType)) + { + drpModelType.Text = TestRunConstructSolutionService.ConvertSolutionType(constructSolution.SolutionType); + } + if (!string.IsNullOrEmpty(constructSolution.SpecialSchemeTypeId)) + { + txtSpecialType.Text = BLL.SpecialSchemeTypeService.GetSpecialSchemeTypeById(constructSolution.SpecialSchemeTypeId).SpecialSchemeTypeName; + } + if (constructSolution.CompileDate != null) + { + txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", constructSolution.CompileDate); + } + txtSolutionName.Text = constructSolution.SolutionName; + if (!string.IsNullOrWhiteSpace(constructSolution.UnitWorkIds)) + { + txtUnitWork.Text = UnitWorkService.GetUnitWorkName(constructSolution.UnitWorkIds); + + } + if (!string.IsNullOrWhiteSpace(constructSolution.CNProfessionalCodes)) + { + txtCNProfessional.Text = TestRunConstructSolutionService.GetProfessionalName(constructSolution.CNProfessionalCodes); + } + if (constructSolution.Edition != null) + { + txtEdition.Text = constructSolution.Edition.ToString(); + } + txtDocContent.Text = HttpUtility.HtmlDecode(constructSolution.Content); + + bindApprove(); + BindZYRole(); + BindAQRole(); + BindSGRole(); + //BindXMRole(); + var zyUserIds = TestRunConstructSolutionApproveService.GetUserIdsApprovesBySignType(ConstructSolutionId, "ZY"); + if (zyUserIds.Count > 0) + { + SetCheck(trOne, zyUserIds); + } + var aqUserIds = TestRunConstructSolutionApproveService.GetUserIdsApprovesBySignType(ConstructSolutionId, "AQ"); + if (aqUserIds.Count > 0) + { + SetCheck(trThree, aqUserIds); + } + var sgUserIds = TestRunConstructSolutionApproveService.GetUserIdsApprovesBySignType(ConstructSolutionId, "SG"); + if (sgUserIds.Count > 0) + { + SetCheck(trFive, sgUserIds); + } + //var xmUserIds = TestRunConstructSolutionApproveService.GetUserIdsApprovesBySignType(ConstructSolutionId, "XM"); + //if (xmUserIds.Count > 0) + //{ + // SetCheck(trSixe, xmUserIds); + //} + if (!string.IsNullOrEmpty(Request.Params["see"])) + { + Model.Solution_TestRunConstructSolutionApprove approve = BLL.TestRunConstructSolutionApproveService.GetSee(ConstructSolutionId, this.CurrUser.UserId); + if (approve != null) + { + approve.ApproveDate = DateTime.Now; + BLL.TestRunConstructSolutionApproveService.UpdateConstructSolutionApprove(approve); + } + } + + AddAttachTab(); + } + } + } + + #region 动态加载角色树 + + /// + /// 设置树的节点选择 + /// + /// + /// + private void SetCheck(Tree tree, List userIds) + { + foreach (TreeNode tn in tree.Nodes[0].Nodes) + { + if (userIds.Contains(tn.NodeID)) + { + tn.Checked = true; + } + } + } + + /// 加载角色树:动态加载 + ///
+ private void BindZYRole() + { + + TreeNode rootNode = new TreeNode();//定义根节点 + rootNode.Text = "专业工程师"; + rootNode.NodeID = "0"; + rootNode.Expanded = true; + rootNode.EnableCheckEvent = true; + trOne.Nodes.Add(rootNode); + trOne.EnableCheckBox = true; + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + var userList = from x in db.Sys_User + join y in db.Project_ProjectUnit + on x.UnitId equals y.UnitId + join p in db.Project_ProjectUser + on x.UserId equals p.UserId + where p.RoleId.Contains(Const.ZBCNEngineer) + && y.UnitType == Const.ProjectUnitType_1 && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId + select x; + //var ss = LINQToDataTable(userList); + foreach (var u in userList) + { + TreeNode Node = new TreeNode(); + Node.Text = u.UserName; + Node.NodeID = u.UserId; + Node.EnableCheckEvent = true; + rootNode.Nodes.Add(Node); + } + } + + } + + /// + /// 判断是否有选择 + /// + /// + /// + public Boolean nodesCheckd(Tree node) + { + bool res = false; + if (node.Nodes[0].Nodes.Count > 0) + { + foreach (var item in node.Nodes[0].Nodes) + { + if (item.Checked) + { + res = true; + break; + } + } + } + return res; + } + + private void BindAQRole() + { + TreeNode rootNode = new TreeNode();//定义根节点 + rootNode.Text = "HSE组"; + rootNode.NodeID = "0"; + rootNode.Expanded = true; + rootNode.EnableCheckEvent = true; + trThree.Nodes.Add(rootNode); + trThree.EnableCheckBox = true; + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + var userList = from x in db.Sys_User + join y in db.Project_ProjectUnit + on x.UnitId equals y.UnitId + join p in db.Project_ProjectUser + on x.UserId equals p.UserId + where (p.RoleId.Contains(Const.HSSEManager) || p.RoleId.Contains(Const.HSSEEngineer)) + && y.UnitType == Const.ProjectUnitType_1 && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId + orderby x.UserCode + select x; + foreach (var u in userList) + { + TreeNode roleNode = new TreeNode(); + roleNode.Text = u.UserName; + roleNode.NodeID = u.UserId; + rootNode.Nodes.Add(roleNode); + } + } + } + + private void BindSGRole() + { + + TreeNode rootNode = new TreeNode();//定义根节点 + rootNode.Text = "施工经理"; + rootNode.NodeID = "0"; + rootNode.Expanded = true; + rootNode.EnableCheckEvent = true; + trFive.Nodes.Add(rootNode); + trFive.EnableCheckBox = true; + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + var userList = from x in db.Sys_User + join y in db.Project_ProjectUnit + on x.UnitId equals y.UnitId + join p in db.Project_ProjectUser + on x.UserId equals p.UserId + where (p.RoleId.Contains(Const.ConstructionManager) || p.RoleId.Contains(Const.ConstructionAssistantManager)) + && y.UnitType == Const.ProjectUnitType_1 && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId + orderby x.UserCode + select x; + foreach (var u in userList) + { + TreeNode roleNode = new TreeNode(); + roleNode.Text = u.UserName; + roleNode.NodeID = u.UserId; + rootNode.Nodes.Add(roleNode); + } + } + } + + //private void BindXMRole() + //{ + + // TreeNode rootNode = new TreeNode();//定义根节点 + // rootNode.Text = "项目经理"; + // rootNode.NodeID = "0"; + // rootNode.Expanded = true; + // rootNode.EnableCheckEvent = true; + // trSixe.Nodes.Add(rootNode); + // trSixe.EnableCheckBox = true; + // using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + // { + // var userList = from x in db.Sys_User + // join y in db.Project_ProjectUnit + // on x.UnitId equals y.UnitId + // join p in db.Project_ProjectUser + // on x.UserId equals p.UserId + // where p.RoleId.Contains(Const.ProjectManager) + // && y.UnitType == Const.ProjectUnitType_1 && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId + // orderby x.UserCode + // select x; + // foreach (var u in userList) + // { + // TreeNode roleNode = new TreeNode(); + // roleNode.Text = u.UserName; + // roleNode.NodeID = u.UserId; + // rootNode.Nodes.Add(roleNode); + // } + // } + //} + #endregion + /// + /// 审批列表 + /// + private void bindApprove() + { + var list = TestRunConstructSolutionApproveService.getListData(ConstructSolutionId); + //var user = UserService.GetAllUserList(CurrUser.LoginProjectId); + gvApprove.DataSource = list; + gvApprove.DataBind(); + } + private void AddAttachTab() + { + PageContext.RegisterStartupScript(TabStrip1.GetAddTabReference("dynamic_tab2", + String.Format("../AttachFile/webuploader.aspx?type={0}&toKeyId={1}&path=FileUpload/Solution&menuId={2}", + -1, ConstructSolutionId, Const.TestRunConstructSolutionMenuId), "附件", + IconHelper.GetIconUrl(Icon.Attach), false)); + + // PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/DocManage&menuId={1}", hdDocId.Text, Const.DocManageMenuId))); + } + + public string man(Object man) + { + string appman = string.Empty; + if (UserService.GetUserByUserId(man.ToString()) != null) + { + appman = UserService.GetUserByUserId(man.ToString()).UserName; + } + return appman; + } + + protected void gvApprove_RowCommand(object sender, GridCommandEventArgs e) + { + object[] keys = gvApprove.DataKeys[e.RowIndex]; + string fileId = string.Empty; + if (keys == null) + { + return; + } + else + { + fileId = keys[0].ToString(); + } + PageContext.RegisterStartupScript(WindowAtt.GetShowReference( + String.Format("../AttachFile/webuploader.aspx?type={0}&toKeyId={1}&path=FileUpload/Solution&menuId={2}", + -1, fileId, Const.TestRunConstructSolutionMenuId))); + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/TestRun/DriverSchemeView.aspx.designer.cs b/SGGL/FineUIPro.Web/TestRun/DriverSchemeView.aspx.designer.cs new file mode 100644 index 00000000..e84ba748 --- /dev/null +++ b/SGGL/FineUIPro.Web/TestRun/DriverSchemeView.aspx.designer.cs @@ -0,0 +1,294 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.TestRun { + + + public partial class DriverSchemeView { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// ContentPanel2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ContentPanel ContentPanel2; + + /// + /// Form2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form Form2; + + /// + /// txtProjectName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProjectName; + + /// + /// txtCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCode; + + /// + /// drpUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox drpUnit; + + /// + /// txtSolutionName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSolutionName; + + /// + /// drpModelType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox drpModelType; + + /// + /// txtSpecialType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSpecialType; + + /// + /// txtCompileDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCompileDate; + + /// + /// txtEdition 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtEdition; + + /// + /// txtCNProfessional 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCNProfessional; + + /// + /// txtUnitWork 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtUnitWork; + + /// + /// TabStrip1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TabStrip TabStrip1; + + /// + /// SimpleForm2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.SimpleForm SimpleForm2; + + /// + /// txtDocContent 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HtmlEditor txtDocContent; + + /// + /// Panel2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel2; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// trOne 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Tree trOne; + + /// + /// Panel4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel4; + + /// + /// trThree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Tree trThree; + + /// + /// Panel6 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel6; + + /// + /// trFive 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Tree trFive; + + /// + /// plApprove2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow plApprove2; + + /// + /// gvApprove 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid gvApprove; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label3; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + } +} diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 837df833..02253850 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -2084,6 +2084,12 @@ namespace Model partial void InsertSolution_SolutionTemplate(Solution_SolutionTemplate instance); partial void UpdateSolution_SolutionTemplate(Solution_SolutionTemplate instance); partial void DeleteSolution_SolutionTemplate(Solution_SolutionTemplate instance); + partial void InsertSolution_TestRunConstructSolution(Solution_TestRunConstructSolution instance); + partial void UpdateSolution_TestRunConstructSolution(Solution_TestRunConstructSolution instance); + partial void DeleteSolution_TestRunConstructSolution(Solution_TestRunConstructSolution instance); + partial void InsertSolution_TestRunConstructSolutionApprove(Solution_TestRunConstructSolutionApprove instance); + partial void UpdateSolution_TestRunConstructSolutionApprove(Solution_TestRunConstructSolutionApprove instance); + partial void DeleteSolution_TestRunConstructSolutionApprove(Solution_TestRunConstructSolutionApprove instance); partial void InsertSupervise_SubUnitCheckRectify(Supervise_SubUnitCheckRectify instance); partial void UpdateSupervise_SubUnitCheckRectify(Supervise_SubUnitCheckRectify instance); partial void DeleteSupervise_SubUnitCheckRectify(Supervise_SubUnitCheckRectify instance); @@ -8056,6 +8062,22 @@ namespace Model } } + public System.Data.Linq.Table Solution_TestRunConstructSolution + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Solution_TestRunConstructSolutionApprove + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Supervise_SubUnitCheckRectify { get @@ -26002,6 +26024,8 @@ namespace Model private EntitySet _Solution_SolutionTemplate; + private EntitySet _Solution_TestRunConstructSolution; + private EntitySet _Supervise_SuperviseCheckRectify; private EntitySet _Supervise_SuperviseCheckReport; @@ -26412,6 +26436,7 @@ namespace Model this._Solution_LargerHazardList = new EntitySet(new Action(this.attach_Solution_LargerHazardList), new Action(this.detach_Solution_LargerHazardList)); this._Solution_LargerHazard = new EntitySet(new Action(this.attach_Solution_LargerHazard), new Action(this.detach_Solution_LargerHazard)); this._Solution_SolutionTemplate = new EntitySet(new Action(this.attach_Solution_SolutionTemplate), new Action(this.detach_Solution_SolutionTemplate)); + this._Solution_TestRunConstructSolution = new EntitySet(new Action(this.attach_Solution_TestRunConstructSolution), new Action(this.detach_Solution_TestRunConstructSolution)); this._Supervise_SuperviseCheckRectify = new EntitySet(new Action(this.attach_Supervise_SuperviseCheckRectify), new Action(this.detach_Supervise_SuperviseCheckRectify)); this._Supervise_SuperviseCheckReport = new EntitySet(new Action(this.attach_Supervise_SuperviseCheckReport), new Action(this.detach_Supervise_SuperviseCheckReport)); this._Sys_CodeRecords = new EntitySet(new Action(this.attach_Sys_CodeRecords), new Action(this.detach_Sys_CodeRecords)); @@ -30726,6 +30751,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Solution_TestRunConstructSolution_Base_Project", Storage="_Solution_TestRunConstructSolution", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] + public EntitySet Solution_TestRunConstructSolution + { + get + { + return this._Solution_TestRunConstructSolution; + } + set + { + this._Solution_TestRunConstructSolution.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Supervise_SuperviseCheckRectify_Base_Project", Storage="_Supervise_SuperviseCheckRectify", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] public EntitySet Supervise_SuperviseCheckRectify { @@ -34267,6 +34305,18 @@ namespace Model entity.Base_Project = null; } + private void attach_Solution_TestRunConstructSolution(Solution_TestRunConstructSolution entity) + { + this.SendPropertyChanging(); + entity.Base_Project = this; + } + + private void detach_Solution_TestRunConstructSolution(Solution_TestRunConstructSolution entity) + { + this.SendPropertyChanging(); + entity.Base_Project = null; + } + private void attach_Supervise_SuperviseCheckRectify(Supervise_SuperviseCheckRectify entity) { this.SendPropertyChanging(); @@ -36591,6 +36641,8 @@ namespace Model private EntitySet _Solution_CQMSConstructSolution; + private EntitySet _Solution_TestRunConstructSolution; + private EntitySet _Technique_SpecialScheme; #region 可扩展性方法定义 @@ -36613,6 +36665,7 @@ namespace Model { this._Base_SolutionTempleteType = default(EntityRef); this._Solution_CQMSConstructSolution = new EntitySet(new Action(this.attach_Solution_CQMSConstructSolution), new Action(this.detach_Solution_CQMSConstructSolution)); + this._Solution_TestRunConstructSolution = new EntitySet(new Action(this.attach_Solution_TestRunConstructSolution), new Action(this.detach_Solution_TestRunConstructSolution)); this._Technique_SpecialScheme = new EntitySet(new Action(this.attach_Technique_SpecialScheme), new Action(this.detach_Technique_SpecialScheme)); OnCreated(); } @@ -36768,6 +36821,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Solution_TestRunConstructSolution_Base_SpecialSchemeType", Storage="_Solution_TestRunConstructSolution", ThisKey="SpecialSchemeTypeId", OtherKey="SpecialSchemeTypeId", DeleteRule="NO ACTION")] + public EntitySet Solution_TestRunConstructSolution + { + get + { + return this._Solution_TestRunConstructSolution; + } + set + { + this._Solution_TestRunConstructSolution.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Technique_SpecialScheme_Base_SpecialSchemeType", Storage="_Technique_SpecialScheme", ThisKey="SpecialSchemeTypeId", OtherKey="SpecialSchemeTypeId", DeleteRule="NO ACTION")] public EntitySet Technique_SpecialScheme { @@ -36813,6 +36879,18 @@ namespace Model entity.Base_SpecialSchemeType = null; } + private void attach_Solution_TestRunConstructSolution(Solution_TestRunConstructSolution entity) + { + this.SendPropertyChanging(); + entity.Base_SpecialSchemeType = this; + } + + private void detach_Solution_TestRunConstructSolution(Solution_TestRunConstructSolution entity) + { + this.SendPropertyChanging(); + entity.Base_SpecialSchemeType = null; + } + private void attach_Technique_SpecialScheme(Technique_SpecialScheme entity) { this.SendPropertyChanging(); @@ -38428,6 +38506,8 @@ namespace Model private EntitySet _Solution_LargerHazardListItem; + private EntitySet _Solution_TestRunConstructSolution; + private EntitySet _Supervise_SubUnitCheckRectify; private EntitySet _Supervise_SubUnitReportItem; @@ -38675,6 +38755,7 @@ namespace Model this._Solution_ConstructSolution = new EntitySet(new Action(this.attach_Solution_ConstructSolution), new Action(this.detach_Solution_ConstructSolution)); this._Solution_CQMSConstructSolution = new EntitySet(new Action(this.attach_Solution_CQMSConstructSolution), new Action(this.detach_Solution_CQMSConstructSolution)); this._Solution_LargerHazardListItem = new EntitySet(new Action(this.attach_Solution_LargerHazardListItem), new Action(this.detach_Solution_LargerHazardListItem)); + this._Solution_TestRunConstructSolution = new EntitySet(new Action(this.attach_Solution_TestRunConstructSolution), new Action(this.detach_Solution_TestRunConstructSolution)); this._Supervise_SubUnitCheckRectify = new EntitySet(new Action(this.attach_Supervise_SubUnitCheckRectify), new Action(this.detach_Supervise_SubUnitCheckRectify)); this._Supervise_SubUnitReportItem = new EntitySet(new Action(this.attach_Supervise_SubUnitReportItem), new Action(this.detach_Supervise_SubUnitReportItem)); this._Supervise_SuperviseCheckRectify = new EntitySet(new Action(this.attach_Supervise_SuperviseCheckRectify), new Action(this.detach_Supervise_SuperviseCheckRectify)); @@ -41260,6 +41341,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Solution_TestRunConstructSolution_Base_Unit", Storage="_Solution_TestRunConstructSolution", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] + public EntitySet Solution_TestRunConstructSolution + { + get + { + return this._Solution_TestRunConstructSolution; + } + set + { + this._Solution_TestRunConstructSolution.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Supervise_SubUnitCheckRectify_Base_Unit", Storage="_Supervise_SubUnitCheckRectify", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] public EntitySet Supervise_SubUnitCheckRectify { @@ -43383,6 +43477,18 @@ namespace Model entity.Base_Unit = null; } + private void attach_Solution_TestRunConstructSolution(Solution_TestRunConstructSolution entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = this; + } + + private void detach_Solution_TestRunConstructSolution(Solution_TestRunConstructSolution entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = null; + } + private void attach_Supervise_SubUnitCheckRectify(Supervise_SubUnitCheckRectify entity) { this.SendPropertyChanging(); @@ -325467,6 +325573,939 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Solution_TestRunConstructSolution")] + public partial class Solution_TestRunConstructSolution : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _ConstructSolutionId; + + private string _Code; + + private string _ProjectId; + + private string _UnitId; + + private string _SolutionName; + + private string _SolutionType; + + private string _UnitWorkIds; + + private string _CNProfessionalCodes; + + private string _AttachUrl; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private string _State; + + private System.Nullable _Edition; + + private string _SpecialSchemeTypeId; + + private string _Content; + + private EntityRef _Base_Project; + + private EntityRef _Base_SpecialSchemeType; + + private EntityRef _Base_Unit; + + private EntitySet _Solution_TestRunConstructSolutionApprove; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnConstructSolutionIdChanging(string value); + partial void OnConstructSolutionIdChanged(); + partial void OnCodeChanging(string value); + partial void OnCodeChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnUnitIdChanging(string value); + partial void OnUnitIdChanged(); + partial void OnSolutionNameChanging(string value); + partial void OnSolutionNameChanged(); + partial void OnSolutionTypeChanging(string value); + partial void OnSolutionTypeChanged(); + partial void OnUnitWorkIdsChanging(string value); + partial void OnUnitWorkIdsChanged(); + partial void OnCNProfessionalCodesChanging(string value); + partial void OnCNProfessionalCodesChanged(); + partial void OnAttachUrlChanging(string value); + partial void OnAttachUrlChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + partial void OnStateChanging(string value); + partial void OnStateChanged(); + partial void OnEditionChanging(System.Nullable value); + partial void OnEditionChanged(); + partial void OnSpecialSchemeTypeIdChanging(string value); + partial void OnSpecialSchemeTypeIdChanged(); + partial void OnContentChanging(string value); + partial void OnContentChanged(); + #endregion + + public Solution_TestRunConstructSolution() + { + this._Base_Project = default(EntityRef); + this._Base_SpecialSchemeType = default(EntityRef); + this._Base_Unit = default(EntityRef); + this._Solution_TestRunConstructSolutionApprove = new EntitySet(new Action(this.attach_Solution_TestRunConstructSolutionApprove), new Action(this.detach_Solution_TestRunConstructSolutionApprove)); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructSolutionId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string ConstructSolutionId + { + get + { + return this._ConstructSolutionId; + } + set + { + if ((this._ConstructSolutionId != value)) + { + this.OnConstructSolutionIdChanging(value); + this.SendPropertyChanging(); + this._ConstructSolutionId = value; + this.SendPropertyChanged("ConstructSolutionId"); + this.OnConstructSolutionIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Code", DbType="NVarChar(50)")] + public string Code + { + get + { + return this._Code; + } + set + { + if ((this._Code != value)) + { + this.OnCodeChanging(value); + this.SendPropertyChanging(); + this._Code = value; + this.SendPropertyChanged("Code"); + this.OnCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + if (this._Base_Project.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + if (this._Base_Unit.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnUnitIdChanging(value); + this.SendPropertyChanging(); + this._UnitId = value; + this.SendPropertyChanged("UnitId"); + this.OnUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SolutionName", DbType="NVarChar(100)")] + public string SolutionName + { + get + { + return this._SolutionName; + } + set + { + if ((this._SolutionName != value)) + { + this.OnSolutionNameChanging(value); + this.SendPropertyChanging(); + this._SolutionName = value; + this.SendPropertyChanged("SolutionName"); + this.OnSolutionNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SolutionType", DbType="NVarChar(50)")] + public string SolutionType + { + get + { + return this._SolutionType; + } + set + { + if ((this._SolutionType != value)) + { + this.OnSolutionTypeChanging(value); + this.SendPropertyChanging(); + this._SolutionType = value; + this.SendPropertyChanged("SolutionType"); + this.OnSolutionTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitWorkIds", DbType="NVarChar(2000)")] + public string UnitWorkIds + { + get + { + return this._UnitWorkIds; + } + set + { + if ((this._UnitWorkIds != value)) + { + this.OnUnitWorkIdsChanging(value); + this.SendPropertyChanging(); + this._UnitWorkIds = value; + this.SendPropertyChanged("UnitWorkIds"); + this.OnUnitWorkIdsChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CNProfessionalCodes", DbType="NVarChar(500)")] + public string CNProfessionalCodes + { + get + { + return this._CNProfessionalCodes; + } + set + { + if ((this._CNProfessionalCodes != value)) + { + this.OnCNProfessionalCodesChanging(value); + this.SendPropertyChanging(); + this._CNProfessionalCodes = value; + this.SendPropertyChanged("CNProfessionalCodes"); + this.OnCNProfessionalCodesChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttachUrl", DbType="NVarChar(2000)")] + public string AttachUrl + { + get + { + return this._AttachUrl; + } + set + { + if ((this._AttachUrl != value)) + { + this.OnAttachUrlChanging(value); + this.SendPropertyChanging(); + this._AttachUrl = value; + this.SendPropertyChanged("AttachUrl"); + this.OnAttachUrlChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this.OnCompileDateChanging(value); + this.SendPropertyChanging(); + this._CompileDate = value; + this.SendPropertyChanged("CompileDate"); + this.OnCompileDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_State", DbType="Char(1)")] + public string State + { + get + { + return this._State; + } + set + { + if ((this._State != value)) + { + this.OnStateChanging(value); + this.SendPropertyChanging(); + this._State = value; + this.SendPropertyChanged("State"); + this.OnStateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Edition", DbType="Int")] + public System.Nullable Edition + { + get + { + return this._Edition; + } + set + { + if ((this._Edition != value)) + { + this.OnEditionChanging(value); + this.SendPropertyChanging(); + this._Edition = value; + this.SendPropertyChanged("Edition"); + this.OnEditionChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SpecialSchemeTypeId", DbType="NVarChar(50)")] + public string SpecialSchemeTypeId + { + get + { + return this._SpecialSchemeTypeId; + } + set + { + if ((this._SpecialSchemeTypeId != value)) + { + if (this._Base_SpecialSchemeType.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnSpecialSchemeTypeIdChanging(value); + this.SendPropertyChanging(); + this._SpecialSchemeTypeId = value; + this.SendPropertyChanged("SpecialSchemeTypeId"); + this.OnSpecialSchemeTypeIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Content", DbType="NVarChar(2000)")] + public string Content + { + get + { + return this._Content; + } + set + { + if ((this._Content != value)) + { + this.OnContentChanging(value); + this.SendPropertyChanging(); + this._Content = value; + this.SendPropertyChanged("Content"); + this.OnContentChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Solution_TestRunConstructSolution_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] + public Base_Project Base_Project + { + get + { + return this._Base_Project.Entity; + } + set + { + Base_Project previousValue = this._Base_Project.Entity; + if (((previousValue != value) + || (this._Base_Project.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Project.Entity = null; + previousValue.Solution_TestRunConstructSolution.Remove(this); + } + this._Base_Project.Entity = value; + if ((value != null)) + { + value.Solution_TestRunConstructSolution.Add(this); + this._ProjectId = value.ProjectId; + } + else + { + this._ProjectId = default(string); + } + this.SendPropertyChanged("Base_Project"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Solution_TestRunConstructSolution_Base_SpecialSchemeType", Storage="_Base_SpecialSchemeType", ThisKey="SpecialSchemeTypeId", OtherKey="SpecialSchemeTypeId", IsForeignKey=true)] + public Base_SpecialSchemeType Base_SpecialSchemeType + { + get + { + return this._Base_SpecialSchemeType.Entity; + } + set + { + Base_SpecialSchemeType previousValue = this._Base_SpecialSchemeType.Entity; + if (((previousValue != value) + || (this._Base_SpecialSchemeType.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_SpecialSchemeType.Entity = null; + previousValue.Solution_TestRunConstructSolution.Remove(this); + } + this._Base_SpecialSchemeType.Entity = value; + if ((value != null)) + { + value.Solution_TestRunConstructSolution.Add(this); + this._SpecialSchemeTypeId = value.SpecialSchemeTypeId; + } + else + { + this._SpecialSchemeTypeId = default(string); + } + this.SendPropertyChanged("Base_SpecialSchemeType"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Solution_TestRunConstructSolution_Base_Unit", Storage="_Base_Unit", ThisKey="UnitId", OtherKey="UnitId", IsForeignKey=true)] + public Base_Unit Base_Unit + { + get + { + return this._Base_Unit.Entity; + } + set + { + Base_Unit previousValue = this._Base_Unit.Entity; + if (((previousValue != value) + || (this._Base_Unit.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Unit.Entity = null; + previousValue.Solution_TestRunConstructSolution.Remove(this); + } + this._Base_Unit.Entity = value; + if ((value != null)) + { + value.Solution_TestRunConstructSolution.Add(this); + this._UnitId = value.UnitId; + } + else + { + this._UnitId = default(string); + } + this.SendPropertyChanged("Base_Unit"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Solution_TestRunConstructSolutionApprove_Solution_TestRunConstructSolution", Storage="_Solution_TestRunConstructSolutionApprove", ThisKey="ConstructSolutionId", OtherKey="ConstructSolutionId", DeleteRule="NO ACTION")] + public EntitySet Solution_TestRunConstructSolutionApprove + { + get + { + return this._Solution_TestRunConstructSolutionApprove; + } + set + { + this._Solution_TestRunConstructSolutionApprove.Assign(value); + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + + private void attach_Solution_TestRunConstructSolutionApprove(Solution_TestRunConstructSolutionApprove entity) + { + this.SendPropertyChanging(); + entity.Solution_TestRunConstructSolution = this; + } + + private void detach_Solution_TestRunConstructSolutionApprove(Solution_TestRunConstructSolutionApprove entity) + { + this.SendPropertyChanging(); + entity.Solution_TestRunConstructSolution = null; + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Solution_TestRunConstructSolutionApprove")] + public partial class Solution_TestRunConstructSolutionApprove : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _ConstructSolutionApproveId; + + private string _ConstructSolutionId; + + private string _ApproveMan; + + private System.Nullable _ApproveDate; + + private System.Nullable _IsAgree; + + private string _ApproveIdea; + + private string _ApproveType; + + private string _AttachUrl; + + private string _SignType; + + private System.Nullable _Edition; + + private System.Nullable _Order; + + private EntityRef _Solution_TestRunConstructSolution; + + private EntityRef _Sys_User; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnConstructSolutionApproveIdChanging(string value); + partial void OnConstructSolutionApproveIdChanged(); + partial void OnConstructSolutionIdChanging(string value); + partial void OnConstructSolutionIdChanged(); + partial void OnApproveManChanging(string value); + partial void OnApproveManChanged(); + partial void OnApproveDateChanging(System.Nullable value); + partial void OnApproveDateChanged(); + partial void OnIsAgreeChanging(System.Nullable value); + partial void OnIsAgreeChanged(); + partial void OnApproveIdeaChanging(string value); + partial void OnApproveIdeaChanged(); + partial void OnApproveTypeChanging(string value); + partial void OnApproveTypeChanged(); + partial void OnAttachUrlChanging(string value); + partial void OnAttachUrlChanged(); + partial void OnSignTypeChanging(string value); + partial void OnSignTypeChanged(); + partial void OnEditionChanging(System.Nullable value); + partial void OnEditionChanged(); + partial void OnOrderChanging(System.Nullable value); + partial void OnOrderChanged(); + #endregion + + public Solution_TestRunConstructSolutionApprove() + { + this._Solution_TestRunConstructSolution = default(EntityRef); + this._Sys_User = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructSolutionApproveId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string ConstructSolutionApproveId + { + get + { + return this._ConstructSolutionApproveId; + } + set + { + if ((this._ConstructSolutionApproveId != value)) + { + this.OnConstructSolutionApproveIdChanging(value); + this.SendPropertyChanging(); + this._ConstructSolutionApproveId = value; + this.SendPropertyChanged("ConstructSolutionApproveId"); + this.OnConstructSolutionApproveIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructSolutionId", DbType="NVarChar(50)")] + public string ConstructSolutionId + { + get + { + return this._ConstructSolutionId; + } + set + { + if ((this._ConstructSolutionId != value)) + { + if (this._Solution_TestRunConstructSolution.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnConstructSolutionIdChanging(value); + this.SendPropertyChanging(); + this._ConstructSolutionId = value; + this.SendPropertyChanged("ConstructSolutionId"); + this.OnConstructSolutionIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveMan", DbType="NVarChar(50)")] + public string ApproveMan + { + get + { + return this._ApproveMan; + } + set + { + if ((this._ApproveMan != value)) + { + if (this._Sys_User.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnApproveManChanging(value); + this.SendPropertyChanging(); + this._ApproveMan = value; + this.SendPropertyChanged("ApproveMan"); + this.OnApproveManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveDate", DbType="DateTime")] + public System.Nullable ApproveDate + { + get + { + return this._ApproveDate; + } + set + { + if ((this._ApproveDate != value)) + { + this.OnApproveDateChanging(value); + this.SendPropertyChanging(); + this._ApproveDate = value; + this.SendPropertyChanged("ApproveDate"); + this.OnApproveDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsAgree", DbType="Bit")] + public System.Nullable IsAgree + { + get + { + return this._IsAgree; + } + set + { + if ((this._IsAgree != value)) + { + this.OnIsAgreeChanging(value); + this.SendPropertyChanging(); + this._IsAgree = value; + this.SendPropertyChanged("IsAgree"); + this.OnIsAgreeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(200)")] + public string ApproveIdea + { + get + { + return this._ApproveIdea; + } + set + { + if ((this._ApproveIdea != value)) + { + this.OnApproveIdeaChanging(value); + this.SendPropertyChanging(); + this._ApproveIdea = value; + this.SendPropertyChanged("ApproveIdea"); + this.OnApproveIdeaChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveType", DbType="Char(1)")] + public string ApproveType + { + get + { + return this._ApproveType; + } + set + { + if ((this._ApproveType != value)) + { + this.OnApproveTypeChanging(value); + this.SendPropertyChanging(); + this._ApproveType = value; + this.SendPropertyChanged("ApproveType"); + this.OnApproveTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttachUrl", DbType="NVarChar(200)")] + public string AttachUrl + { + get + { + return this._AttachUrl; + } + set + { + if ((this._AttachUrl != value)) + { + this.OnAttachUrlChanging(value); + this.SendPropertyChanging(); + this._AttachUrl = value; + this.SendPropertyChanged("AttachUrl"); + this.OnAttachUrlChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SignType", DbType="NVarChar(20)")] + public string SignType + { + get + { + return this._SignType; + } + set + { + if ((this._SignType != value)) + { + this.OnSignTypeChanging(value); + this.SendPropertyChanging(); + this._SignType = value; + this.SendPropertyChanged("SignType"); + this.OnSignTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Edition", DbType="Int")] + public System.Nullable Edition + { + get + { + return this._Edition; + } + set + { + if ((this._Edition != value)) + { + this.OnEditionChanging(value); + this.SendPropertyChanging(); + this._Edition = value; + this.SendPropertyChanged("Edition"); + this.OnEditionChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Name="order", Storage="_Order", DbType="Int")] + public System.Nullable Order + { + get + { + return this._Order; + } + set + { + if ((this._Order != value)) + { + this.OnOrderChanging(value); + this.SendPropertyChanging(); + this._Order = value; + this.SendPropertyChanged("Order"); + this.OnOrderChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Solution_TestRunConstructSolutionApprove_Solution_TestRunConstructSolution", Storage="_Solution_TestRunConstructSolution", ThisKey="ConstructSolutionId", OtherKey="ConstructSolutionId", IsForeignKey=true)] + public Solution_TestRunConstructSolution Solution_TestRunConstructSolution + { + get + { + return this._Solution_TestRunConstructSolution.Entity; + } + set + { + Solution_TestRunConstructSolution previousValue = this._Solution_TestRunConstructSolution.Entity; + if (((previousValue != value) + || (this._Solution_TestRunConstructSolution.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Solution_TestRunConstructSolution.Entity = null; + previousValue.Solution_TestRunConstructSolutionApprove.Remove(this); + } + this._Solution_TestRunConstructSolution.Entity = value; + if ((value != null)) + { + value.Solution_TestRunConstructSolutionApprove.Add(this); + this._ConstructSolutionId = value.ConstructSolutionId; + } + else + { + this._ConstructSolutionId = default(string); + } + this.SendPropertyChanged("Solution_TestRunConstructSolution"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Solution_TestRunConstructSolutionApprove_Sys_User", Storage="_Sys_User", ThisKey="ApproveMan", OtherKey="UserId", IsForeignKey=true)] + public Sys_User Sys_User + { + get + { + return this._Sys_User.Entity; + } + set + { + Sys_User previousValue = this._Sys_User.Entity; + if (((previousValue != value) + || (this._Sys_User.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Sys_User.Entity = null; + previousValue.Solution_TestRunConstructSolutionApprove.Remove(this); + } + this._Sys_User.Entity = value; + if ((value != null)) + { + value.Solution_TestRunConstructSolutionApprove.Add(this); + this._ApproveMan = value.UserId; + } + else + { + this._ApproveMan = default(string); + } + this.SendPropertyChanged("Sys_User"); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Supervise_SubUnitCheckRectify")] public partial class Supervise_SubUnitCheckRectify : INotifyPropertyChanging, INotifyPropertyChanged { @@ -336267,6 +337306,8 @@ namespace Model private EntitySet _Solution_SolutionTemplate; + private EntitySet _Solution_TestRunConstructSolutionApprove; + private EntitySet _Sys_FlowOperate; private EntitySet _Sys_Log; @@ -336753,6 +337794,7 @@ namespace Model this._Solution_LargerHazardList = new EntitySet(new Action(this.attach_Solution_LargerHazardList), new Action(this.detach_Solution_LargerHazardList)); this._Solution_LargerHazard = new EntitySet(new Action(this.attach_Solution_LargerHazard), new Action(this.detach_Solution_LargerHazard)); this._Solution_SolutionTemplate = new EntitySet(new Action(this.attach_Solution_SolutionTemplate), new Action(this.detach_Solution_SolutionTemplate)); + this._Solution_TestRunConstructSolutionApprove = new EntitySet(new Action(this.attach_Solution_TestRunConstructSolutionApprove), new Action(this.detach_Solution_TestRunConstructSolutionApprove)); this._Sys_FlowOperate = new EntitySet(new Action(this.attach_Sys_FlowOperate), new Action(this.detach_Sys_FlowOperate)); this._Sys_Log = new EntitySet(new Action(this.attach_Sys_Log), new Action(this.detach_Sys_Log)); this._Sys_RoleItem = new EntitySet(new Action(this.attach_Sys_RoleItem), new Action(this.detach_Sys_RoleItem)); @@ -341755,6 +342797,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Solution_TestRunConstructSolutionApprove_Sys_User", Storage="_Solution_TestRunConstructSolutionApprove", ThisKey="UserId", OtherKey="ApproveMan", DeleteRule="NO ACTION")] + public EntitySet Solution_TestRunConstructSolutionApprove + { + get + { + return this._Solution_TestRunConstructSolutionApprove; + } + set + { + this._Solution_TestRunConstructSolutionApprove.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Sys_FlowOperate_Sys_User", Storage="_Sys_FlowOperate", ThisKey="UserId", OtherKey="OperaterId", DeleteRule="NO ACTION")] public EntitySet Sys_FlowOperate { @@ -345964,6 +347019,18 @@ namespace Model entity.Sys_User = null; } + private void attach_Solution_TestRunConstructSolutionApprove(Solution_TestRunConstructSolutionApprove entity) + { + this.SendPropertyChanging(); + entity.Sys_User = this; + } + + private void detach_Solution_TestRunConstructSolutionApprove(Solution_TestRunConstructSolutionApprove entity) + { + this.SendPropertyChanging(); + entity.Sys_User = null; + } + private void attach_Sys_FlowOperate(Sys_FlowOperate entity) { this.SendPropertyChanging(); diff --git a/SGGL/WebAPI/Controllers/TestRun/DriverRunController.cs b/SGGL/WebAPI/Controllers/TestRun/DriverRunController.cs new file mode 100644 index 00000000..2fda6d5a --- /dev/null +++ b/SGGL/WebAPI/Controllers/TestRun/DriverRunController.cs @@ -0,0 +1,166 @@ +using System.Web.Http; +using Model; +using System.Collections.Generic; +using System; +using BLL; + +namespace WebAPI.Controllers.TestRun +{ + public class DriverRunController : ApiController + { + // + // 质量巡检 + // GET: /Draw/ + [HttpGet] + public ResponseData> Index(string projectId, int index, int page, string state) + { + ResponseData> res = new ResponseData>(); + + res.successful = true; + res.resultValue = BLL.DriverRunService.GetListDataForApi(state, projectId, index, page); + return res; + } + + [HttpGet] + public ResponseData> Search(string state, string projectId, int index, int page) + { + ResponseData> res = new ResponseData>(); + + res.successful = true; + res.resultValue = BLL.DriverRunService.GetListDataForApi(state, projectId, index, page); + return res; + } + + /// + /// 根据code获取详情 + /// + /// + /// + public ResponseData GetDriverRun(string code) + { + ResponseData res = new ResponseData(); + DriverRun_DriverRun DriverRun = BLL.DriverRunService.GetDriverRunForApi(code); + res.successful = true; + res.resultValue = BeanUtil.CopyOjbect(DriverRun, true); + return res; + } + /// + /// 根据code获取 审核记录 + /// + /// + /// + public ResponseData> GetApproveByCode(string code) + { + ResponseData> res = new ResponseData>(); + + res.successful = true; + res.resultValue = BLL.DriverRunApproveService.GetListDataByCodeForApi(code); + return res; + } + public ResponseData GetCurrApproveByCode(string code) + { + ResponseData res = new ResponseData(); + + res.successful = true; + res.resultValue = BeanUtil.CopyOjbect(BLL.DriverRunApproveService.getCurrApproveForApi(code), true); + return res; + } + [HttpPost] + public ResponseData AddDriverRun([FromBody]Model.DriverRun_DriverRun DriverRun) + { + ResponseData res = new ResponseData(); + try + { + if (string.IsNullOrEmpty(DriverRun.DriverRunId)) + { + DriverRun.DriverRunId = Guid.NewGuid().ToString(); + BLL.DriverRunService.AddDriverRunForApi(DriverRun); + SaveAttachFile(DriverRun.DriverRunId, BLL.Const.CheckListMenuId, DriverRun.AttachUrl); + res.resultValue = DriverRun.DriverRunId; + } + else + { + BLL.DriverRunService.UpdateDriverRunForApi(DriverRun); + SaveAttachFile(DriverRun.DriverRunId, BLL.Const.CheckListMenuId, DriverRun.AttachUrl); + res.resultValue = DriverRun.DriverRunId; + } + + res.successful = true; + + } + catch (Exception e) + { + res.resultHint = e.StackTrace; + res.successful = false; + } + return res; + + } + + /// + /// + /// + public static void SaveAttachFile(string dataId, string menuId, string url) + { + Model.ToDoItem toDoItem = new Model.ToDoItem + { + MenuId = menuId, + DataId = dataId, + UrlStr = url, + }; + APIUpLoadFileService.SaveAttachUrl(toDoItem); + } + + [HttpPost] + public ResponseData AddApprove([FromBody]Model.DriverRun_DriverRunApprove approve) + { + ResponseData res = new ResponseData(); + try + { + + Model.DriverRun_DriverRun DriverRun = new Model.DriverRun_DriverRun(); + DriverRun.DriverRunId = approve.DriverRunId; + DriverRun.State = approve.ApproveType; + BLL.DriverRunService.UpdateDriverRunForApi(DriverRun); + res.resultValue = BLL.DriverRunApproveService.AddDriverRunApproveForApi(approve); + res.successful = true; + + } + catch (Exception e) + { + res.resultHint = e.StackTrace; + res.successful = false; + } + return res; + + } + [HttpPost] + public ResponseData UpdateApprove([FromBody]Model.DriverRun_DriverRunApprove approve) + { + ResponseData res = new ResponseData(); + try + { + approve.ApproveDate = DateTime.Now; + BLL.DriverRunApproveService.UpdateDriverRunApproveForApi(approve); + res.successful = true; + + } + catch (Exception e) + { + res.resultHint = e.StackTrace; + res.successful = false; + } + return res; + + } + // GET: /Draw/ + [HttpGet] + public ResponseData see(string dataId, string userId) + { + ResponseData res = new ResponseData(); + res.successful = true; + BLL.DriverRunApproveService.See(dataId, userId); + return res; + } + } +} diff --git a/SGGL/WebAPI/WebAPI.csproj b/SGGL/WebAPI/WebAPI.csproj index baa3a8a3..d162082b 100644 --- a/SGGL/WebAPI/WebAPI.csproj +++ b/SGGL/WebAPI/WebAPI.csproj @@ -210,6 +210,7 @@ + diff --git a/SGGL/WebAPI/WebAPI.csproj.user b/SGGL/WebAPI/WebAPI.csproj.user index 4edb5e0f..5fe155da 100644 --- a/SGGL/WebAPI/WebAPI.csproj.user +++ b/SGGL/WebAPI/WebAPI.csproj.user @@ -1,7 +1,7 @@  - Release|Any CPU + Debug|Any CPU true @@ -10,6 +10,14 @@ FolderProfile + ApiControllerEmptyScaffolder + root/Controller + 600 + True + False + True + + False