From 716c838be0fae6de5b89495def7beaf5d4cf86d0 Mon Sep 17 00:00:00 2001 From: geh <1923421292@qq.com> Date: Thu, 11 Jun 2026 09:52:30 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E4=B8=BB=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...6-06-08-xiaj(集团主数据在建项目数据分析).sql | 77 ++ SUBQHSE/BLL/BLL.csproj | 1 + .../ServerCheck/DCGLCheckRectifyService.cs | 16 + .../ProjectMasterDataAnalysisService.cs | 244 +++++ SUBQHSE/BLL/ProjectData/ProjectService.cs | 23 +- SUBQHSE/BLL/WebService/CNCECHSSEWebService.cs | 3 +- SUBQHSE/BLL/ZHGL/DataSync/BaseDataService.cs | 6 +- .../UnitHazardRegisterItemService.cs | 43 +- .../Supervise/UnitHazardRegisterService.cs | 32 + SUBQHSE/FineUIPro.Web/FineUIPro.Web.csproj | 1 + .../ProjectData/MasterProjectData.aspx | 57 +- .../ProjectData/MasterProjectData.aspx.cs | 127 ++- .../MasterProjectDataAnalysis.aspx | 390 ++++++++ .../MasterProjectDataAnalysis.aspx.cs | 857 ++++++++++++++++++ ...MasterProjectDataAnalysis.aspx.designer.cs | 494 ++++++++++ .../ProjectData/MasterProjectDataUsage.aspx | 5 +- .../MasterProjectDataUsage.aspx.cs | 1 - .../FineUIPro.Web/ProjectData/ProjectSet.aspx | 7 + .../ProjectData/ProjectSet.aspx.cs | 13 +- .../ProjectData/ProjectSet.aspx.designer.cs | 9 + .../ProjectData/ProjectSetSave.aspx | 8 +- .../ProjectData/ProjectSetSave.aspx.cs | 10 +- .../ProjectSetSave.aspx.designer.cs | 9 + .../ProjectData/ProjectSetView.aspx | 6 +- .../ProjectData/ProjectSetView.aspx.cs | 9 +- .../ProjectSetView.aspx.designer.cs | 293 +++--- .../APIItem/CNCEC/Ads_pms_pro_info_build.cs | 16 +- SUBQHSE/Model/Model.cs | 385 ++++++++ .../WebAPI/Controllers/CommonController.cs | 27 + 29 files changed, 2957 insertions(+), 212 deletions(-) create mode 100644 DataBase/版本日志/SUBQHSE_V2026-06-08-xiaj(集团主数据在建项目数据分析).sql create mode 100644 SUBQHSE/BLL/ProjectData/ProjectMasterDataAnalysisService.cs create mode 100644 SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataAnalysis.aspx create mode 100644 SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataAnalysis.aspx.cs create mode 100644 SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataAnalysis.aspx.designer.cs diff --git a/DataBase/版本日志/SUBQHSE_V2026-06-08-xiaj(集团主数据在建项目数据分析).sql b/DataBase/版本日志/SUBQHSE_V2026-06-08-xiaj(集团主数据在建项目数据分析).sql new file mode 100644 index 0000000..e083016 --- /dev/null +++ b/DataBase/版本日志/SUBQHSE_V2026-06-08-xiaj(集团主数据在建项目数据分析).sql @@ -0,0 +1,77 @@ + + +--˾ڽĿݷ +IF NOT EXISTS (SELECT * FROM Sys_Menu WHERE MenuId = '204ACA82-15B4-4C80-AE9F-ACF25CE79888') +BEGIN + INSERT INTO dbo.Sys_Menu (MenuId, MenuName,Url, SortIndex, SuperMenu, MenuType, IsOffice, IsEnd, IsUsed) + VALUES (N'204ACA82-15B4-4C80-AE9F-ACF25CE79888', N'ڽĿݷ', N'ProjectData/MasterProjectDataAnalysis.aspx', 46, 'C2297533-B7C0-441E-B29F-ADE87C6F8978', 'Menu_SysSet', 1,1, 1); +END +GO + +--Ŀ䣺չʾ(͸ҳ) +IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Base_Project' AND COLUMN_NAME = 'IsCNCECShow') +BEGIN + ALTER TABLE Base_Project ADD IsCNCECShow bit ; + --ALTER TABLE Base_Project ADD IsCNCECShow bit default 1 NOT NULL; +END +GO + +UPDATE Base_Project SET IsCNCECShow=1 WHERE IsCNCECShow IS NULL; +GO + + + --ɾѹĿдԭ +delete from Project_MasterDataUsage +where pro_id in (select distinct MasterSysId from Base_Project) +GO + +--drop table Project_MasterDataAnalysis +--GO + +--ڽĿݷ +IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'Project_MasterDataAnalysis') AND type = N'U') +BEGIN + CREATE TABLE [dbo].[Project_MasterDataAnalysis]( + [Id] [nvarchar](50) NOT NULL, + [CollCropCode] [nvarchar](100) NOT NULL, + [UnitId] [nvarchar](50) NOT NULL, + [ReportDate] [datetime] NOT NULL, + [DataDate] [datetime] NOT NULL, + [Total] [int] NOT NULL, + [MasterTotal] [int] NOT NULL, + [QHSETotal] [int] NOT NULL, + [ZhengChang] [int] NOT NULL, + [DaiJian] [int] NOT NULL, + [BuYong] [int] NOT NULL, + [YuLiXiang] [int] NOT NULL, + [CreateUser] [nvarchar](200) NOT NULL, + CONSTRAINT [PK_Project_MasterDataAnalysis] PRIMARY KEY CLUSTERED + ( + [Id] ASC + )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + ) ON [PRIMARY] + ALTER TABLE [dbo].[Project_MasterDataAnalysis] ADD CONSTRAINT [DF_Project_MasterDataAnalysis_DataDate] DEFAULT (getdate()) FOR [DataDate] + ALTER TABLE [dbo].[Project_MasterDataAnalysis] ADD CONSTRAINT [DF_Project_MasterDataAnalysis_Total] DEFAULT ((0)) FOR [Total] + ALTER TABLE [dbo].[Project_MasterDataAnalysis] ADD CONSTRAINT [DF_Project_MasterDataAnalysis_MasterTotal] DEFAULT ((0)) FOR [MasterTotal] + ALTER TABLE [dbo].[Project_MasterDataAnalysis] ADD CONSTRAINT [DF_Project_MasterDataAnalysis_QHSETotal] DEFAULT ((0)) FOR [QHSETotal] + ALTER TABLE [dbo].[Project_MasterDataAnalysis] ADD CONSTRAINT [DF_Project_MasterDataAnalysis_ZhengChang] DEFAULT ((0)) FOR [ZhengChang] + ALTER TABLE [dbo].[Project_MasterDataAnalysis] ADD CONSTRAINT [DF_Project_MasterDataAnalysis_DaiJian] DEFAULT ((0)) FOR [DaiJian] + ALTER TABLE [dbo].[Project_MasterDataAnalysis] ADD CONSTRAINT [DF_Project_MasterDataAnalysis_BuYong] DEFAULT ((0)) FOR [BuYong] + ALTER TABLE [dbo].[Project_MasterDataAnalysis] ADD CONSTRAINT [DF_Project_MasterDataAnalysis_YuLiXiang] DEFAULT ((0)) FOR [YuLiXiang] + EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_MasterDataAnalysis', @level2type=N'COLUMN',@level2name=N'Id' + EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'λô' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_MasterDataAnalysis', @level2type=N'COLUMN',@level2name=N'CollCropCode' + EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'λId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_MasterDataAnalysis', @level2type=N'COLUMN',@level2name=N'UnitId' + EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ϱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_MasterDataAnalysis', @level2type=N'COLUMN',@level2name=N'ReportDate' + EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ݻ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_MasterDataAnalysis', @level2type=N'COLUMN',@level2name=N'DataDate' + EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'++Ԥ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_MasterDataAnalysis', @level2type=N'COLUMN',@level2name=N'Total' + EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ڽĿ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_MasterDataAnalysis', @level2type=N'COLUMN',@level2name=N'MasterTotal' + EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ҵڽĿ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_MasterDataAnalysis', @level2type=N'COLUMN',@level2name=N'QHSETotal' + EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_MasterDataAnalysis', @level2type=N'COLUMN',@level2name=N'ZhengChang' + EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_MasterDataAnalysis', @level2type=N'COLUMN',@level2name=N'DaiJian' + EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'벻' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_MasterDataAnalysis', @level2type=N'COLUMN',@level2name=N'BuYong' + EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ԥ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_MasterDataAnalysis', @level2type=N'COLUMN',@level2name=N'YuLiXiang' +END +GO + + + diff --git a/SUBQHSE/BLL/BLL.csproj b/SUBQHSE/BLL/BLL.csproj index 1036de3..1af08be 100644 --- a/SUBQHSE/BLL/BLL.csproj +++ b/SUBQHSE/BLL/BLL.csproj @@ -848,6 +848,7 @@ + diff --git a/SUBQHSE/BLL/DCGL/ServerCheck/DCGLCheckRectifyService.cs b/SUBQHSE/BLL/DCGL/ServerCheck/DCGLCheckRectifyService.cs index 01b1c0a..640c34a 100644 --- a/SUBQHSE/BLL/DCGL/ServerCheck/DCGLCheckRectifyService.cs +++ b/SUBQHSE/BLL/DCGL/ServerCheck/DCGLCheckRectifyService.cs @@ -18,6 +18,22 @@ namespace BLL return Funs.DB.DCGL_Check_CheckRectify.FirstOrDefault(e => e.CheckRectifyId == checkRectifyId); } + /// + /// 根据主表ID撤回整改 + /// + /// 主表ID + public static void RevokeByRectifyId(string checkRectifyId) + { + var items = (from x in Funs.DB.DCGL_Check_CheckRectify + where x.CheckRectifyId == checkRectifyId && x.HandleState == "3" + select x).ToList(); + foreach (var item in items) + { + item.HandleState = "2"; + Funs.DB.SubmitChanges(); + } + } + /// /// 添加督查检查整改 /// diff --git a/SUBQHSE/BLL/ProjectData/ProjectMasterDataAnalysisService.cs b/SUBQHSE/BLL/ProjectData/ProjectMasterDataAnalysisService.cs new file mode 100644 index 0000000..c05a898 --- /dev/null +++ b/SUBQHSE/BLL/ProjectData/ProjectMasterDataAnalysisService.cs @@ -0,0 +1,244 @@ + +using Model; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; + +namespace BLL +{ + /// + /// 集团主数据在建项目数据分析 + /// + public static class ProjectMasterDataAnalysisService + { + /// + /// 根据主键获取分析数据 + /// + /// + /// + public static Model.Project_MasterDataAnalysis GetProjectMasterDataAnalysisById(string Id) + { + return Funs.DB.Project_MasterDataAnalysis.FirstOrDefault(e => e.Id == Id); + } + + /// + /// 根据CollCropCode获取分析数据【取最近一条】 + /// + /// + /// + public static Model.Project_MasterDataAnalysis GetProjectMasterDataAnalysisByCollCropCode(string CollCropCode) + { + return Funs.DB.Project_MasterDataAnalysis.OrderByDescending(x => x.DataDate).FirstOrDefault(e => e.CollCropCode == CollCropCode); + } + + /// + /// 获取分析数据【取最近一条】 + /// + /// + public static Model.Project_MasterDataAnalysis GetLastProjectMasterDataAnalysis() + { + return Funs.DB.Project_MasterDataAnalysis.OrderByDescending(x => x.DataDate).FirstOrDefault(); + } + + /// + /// 添加分析数据 + /// + /// + public static void AddProjectMasterDataAnalysis(Model.Project_MasterDataAnalysis model) + { + Model.SUBQHSEDB db = Funs.DB; + Model.Project_MasterDataAnalysis newModel = new Model.Project_MasterDataAnalysis + { + Id = model.Id, + CollCropCode = model.CollCropCode, + UnitId = model.UnitId, + ReportDate = model.ReportDate, + DataDate = model.DataDate, + Total = model.Total, + MasterTotal = model.MasterTotal, + QHSETotal = model.QHSETotal, + ZhengChang = model.ZhengChang, + DaiJian = model.DaiJian, + BuYong = model.BuYong, + YuLiXiang = model.YuLiXiang, + //ZiJian = model.ZiJian, + CreateUser = model.CreateUser, + }; + db.Project_MasterDataAnalysis.InsertOnSubmit(newModel); + db.SubmitChanges(); + } + + /// + /// 修改分析数据 + /// + /// + public static void UpdateProjectMasterDataAnalysis(Model.Project_MasterDataAnalysis model) + { + Model.SUBQHSEDB db = Funs.DB; + Model.Project_MasterDataAnalysis newModel = db.Project_MasterDataAnalysis.FirstOrDefault(e => e.Id == model.Id); + if (newModel != null) + { + //newModel.Id = model.Id; + //newModel.CollCropCode = model.CollCropCode; + //newModel.UnitId = model.UnitId; + //newModel.ReportDate = model.ReportDate; + //newModel.DataDate = model.DataDate; + newModel.Total = model.Total; + newModel.MasterTotal = model.MasterTotal; + newModel.QHSETotal = model.QHSETotal; + newModel.ZhengChang = model.ZhengChang; + newModel.DaiJian = model.DaiJian; + newModel.BuYong = model.BuYong; + newModel.YuLiXiang = model.YuLiXiang; + //newModel.ZiJian = model.ZiJian; + db.SubmitChanges(); + } + } + + /// + /// 根据主键删除分析数据 + /// + /// + public static void DeleteProjectMasterDataAnalysisById(string Id) + { + Model.SUBQHSEDB db = Funs.DB; + Model.Project_MasterDataAnalysis model = db.Project_MasterDataAnalysis.FirstOrDefault(e => e.Id == Id); + if (model != null) + { + db.Project_MasterDataAnalysis.DeleteOnSubmit(model); + db.SubmitChanges(); + } + } + + /// + /// 获取最近的汇总记录【近一小时】 + /// + /// + public static List GetRecentHourAnalysisReportList() + { + var list = (from x in Funs.DB.Project_MasterDataAnalysis + where x.DataDate > DateTime.Now.AddHours(-1) + orderby x.DataDate descending + select x).ToList(); + return list; + } + + #region 汇总上报 + + /// + /// 集团主数据在建项目使用情况上报 + /// + /// + /// + /// + public static string ReportProjectMasterDataAnalysis(string userName,ref string message) + { + string code = "0"; + using (Model.SUBQHSEDB db = new Model.SUBQHSEDB(Funs.ConnString)) + { + #region 汇总数据 + + //获取集团在建主数据 + List masterProDatas = ProjectService.GetMasterProjectDataInfos(); + //获取集团在建主数据 + List projects = ProjectService.GetProjectWorkList(); + + int masterTotal = masterProDatas.Count(); + int qhseTotal = projects.Count(); + + //1、正常 + int zhengChang = (from x in masterProDatas + join pro in db.Base_Project on x.Pro_id equals pro.MasterSysId into proGroup + from pro in proGroup.DefaultIfEmpty() + where pro != null && pro.MasterSysId != null + //&& pro.ProjectState == Const.ProjectState_1 + select x).Count(); + //2、待建 + int daiJian = (from x in masterProDatas + join pro in db.Base_Project on x.Pro_id equals pro.MasterSysId into proGroup + from pro in proGroup.DefaultIfEmpty() + join use in db.Project_MasterDataUsage on x.Pro_id equals use.Pro_id into useGroup + from use in useGroup.DefaultIfEmpty() + where pro == null && (use == null || (use != null && (use.Reason == null || use.Reason == ""))) + select x).Count(); + //3、申请不用 + int buYong = (from x in masterProDatas + join pro in db.Base_Project on x.Pro_id equals pro.MasterSysId into proGroup + from pro in proGroup.DefaultIfEmpty() + join use in db.Project_MasterDataUsage on x.Pro_id equals use.Pro_id into useGroup + from use in useGroup.DefaultIfEmpty() + where pro == null && use != null && use.Reason != null && use.Reason != "" + select x).Count(); + //4、预立项 + int yuLiXiang = (from x in projects where x.MasterSysId == null select x).Count(); + + var thisUnit = CommonService.GetIsThisUnit(); + var now = DateTime.Now; + //保存汇总数据 + Model.Project_MasterDataAnalysis analysis = new Project_MasterDataAnalysis + { + Id = SQLHelper.GetNewID(typeof(Model.Project_MasterDataAnalysis)), + CollCropCode = thisUnit.CollCropCode, + UnitId = thisUnit.UnitId, + ReportDate = now.Date, + DataDate = now, + Total = zhengChang + daiJian + yuLiXiang, + MasterTotal = masterTotal, + QHSETotal = qhseTotal, + ZhengChang = zhengChang, + DaiJian = daiJian, + BuYong = buYong, + YuLiXiang = yuLiXiang, + CreateUser = userName + }; + + #endregion + + #region 上报数据 + + string filePath = Funs.SGGLUrl; + try + { + //var upReport = GetLastProjectMasterDataAnalysis(); + var upReport = analysis; + + string baseurl = SysConstSetService.CNCECPath + "/api/Common/ProjectMasterDataAnalysis"; + string contenttype = "application/json;charset=unicode"; + Hashtable newToken = new Hashtable + { + { "token", ServerService.GetToken().Token } + }; + var pushContent = JsonConvert.SerializeObject(upReport); + + //ErrLogInfo.WriteLog($"【集团主数据在建项目使用情况上报】:{pushContent}"); + var strJosn = APIGetHttpService.Http(baseurl, "Post", contenttype, newToken, pushContent); + if (!string.IsNullOrEmpty(strJosn)) + { + //ErrLogInfo.WriteLog($"【集团主数据在建项目使用情况上报】:{strJosn}"); + JObject obj = JObject.Parse(strJosn); + code = obj["code"].ToString(); + message = obj["message"].ToString(); + + if (code == "1") + { + AddProjectMasterDataAnalysis(upReport); + } + } + } + catch (Exception ex) + { + ErrLogInfo.WriteLog("【集团主数据在建项目使用情况上报】上传到服务器", ex); + } + + #endregion + + return code; + } + } + + #endregion + } +} diff --git a/SUBQHSE/BLL/ProjectData/ProjectService.cs b/SUBQHSE/BLL/ProjectData/ProjectService.cs index 04c77fb..ec5e9eb 100644 --- a/SUBQHSE/BLL/ProjectData/ProjectService.cs +++ b/SUBQHSE/BLL/ProjectData/ProjectService.cs @@ -197,6 +197,7 @@ SubjectProject = project.SubjectProject, SubjectUnitApiUrl = project.SubjectUnitApiUrl, SubjectUnitWebUrl = project.SubjectUnitWebUrl, + IsCNCECShow = project.IsCNCECShow, }; db.Base_Project.InsertOnSubmit(newProject); @@ -252,12 +253,26 @@ newProject.SubjectProject = project.SubjectProject; newProject.SubjectUnitApiUrl = project.SubjectUnitApiUrl; newProject.SubjectUnitWebUrl = project.SubjectUnitWebUrl; - + newProject.IsCNCECShow = project.IsCNCECShow; db.SubmitChanges(); //Project_HSSEData_HSSEService.StatisticalData(project.ProjectId, Project_HSSEData_HSSEService.HSSEDateType.ProjectInformation); HSEDataCollectService.ProjectHSEDataCollectSubmission(newProject); } } + + /// + /// 获取施工中项目集合 + /// + /// + public static List GetCNCECShowProjectList() + { + var list = (from x in Funs.DB.Base_Project + where x.IsCNCECShow == true + orderby x.ProjectCode descending + select x).ToList(); + return list; + } + /// /// 根据项目Id删除一个项目信息 @@ -282,9 +297,9 @@ public static List GetProjectWorkList() { var list = (from x in Funs.DB.Base_Project - where (x.ProjectState == null || x.ProjectState == BLL.Const.ProjectState_1) && (x.IsDelete == null || x.IsDelete == false) - orderby x.ProjectCode descending - select x).ToList(); + where x.IsCNCECShow == true && (x.ProjectState == null || x.ProjectState == BLL.Const.ProjectState_1) + orderby x.ProjectCode descending + select x).ToList(); return list; } diff --git a/SUBQHSE/BLL/WebService/CNCECHSSEWebService.cs b/SUBQHSE/BLL/WebService/CNCECHSSEWebService.cs index ff53c17..6a056e9 100644 --- a/SUBQHSE/BLL/WebService/CNCECHSSEWebService.cs +++ b/SUBQHSE/BLL/WebService/CNCECHSSEWebService.cs @@ -7334,7 +7334,8 @@ //查询所有在建项目 var upReport = (from x in db.Base_Project where (x.ProjectState == "1" || x.ProjectState == null) && (x.IsDelete == null || x.IsDelete == false) - select new Model.BaseProjectItem + && x.IsCNCECShow == true + select new Model.BaseProjectItem { ProjectId = x.ProjectId, MasterSysId = x.MasterSysId, diff --git a/SUBQHSE/BLL/ZHGL/DataSync/BaseDataService.cs b/SUBQHSE/BLL/ZHGL/DataSync/BaseDataService.cs index a6e6652..dce08de 100644 --- a/SUBQHSE/BLL/ZHGL/DataSync/BaseDataService.cs +++ b/SUBQHSE/BLL/ZHGL/DataSync/BaseDataService.cs @@ -25,6 +25,7 @@ namespace BLL join sysConst in Funs.DB.Sys_Const on new { ProjectState2 = project.ProjectState2, GroupId = BLL.ConstValue.GroupId_ProjectState } equals new { ProjectState2 = sysConst.ConstValue, GroupId = sysConst.GroupId } into sysConstJoin from sysConst in sysConstJoin.DefaultIfEmpty() where (project.ProjectAttribute == "GONGCHENG" || project.ProjectAttribute == null) && (project.IsDelete == null || project.IsDelete == false) && project.ProjectState == "1" + && project.IsCNCECShow == true select new ProjectOutput { ProjectId = project.ProjectId, @@ -71,6 +72,7 @@ namespace BLL join sysConst in Funs.DB.Sys_Const on new { ProjectState2 = project.ProjectState2, GroupId = BLL.ConstValue.GroupId_ProjectState } equals new { ProjectState2 = sysConst.ConstValue, GroupId = sysConst.GroupId } into sysConstJoin from sysConst in sysConstJoin.DefaultIfEmpty() where (project.ProjectAttribute == "GONGCHENG" || project.ProjectAttribute == null) && (project.IsDelete == null || project.IsDelete == false) && project.ProjectState == "2" + && project.IsCNCECShow == true select new ProjectOutput { ProjectId = project.ProjectId, @@ -116,6 +118,7 @@ namespace BLL join sysConst in Funs.DB.Sys_Const on new { ProjectState2 = project.ProjectState2, GroupId = BLL.ConstValue.GroupId_ProjectState } equals new { ProjectState2 = sysConst.ConstValue, GroupId = sysConst.GroupId } into sysConstJoin from sysConst in sysConstJoin.DefaultIfEmpty() where (project.ProjectAttribute == "GONGCHENG" || project.ProjectAttribute == null) && (project.IsDelete == null || project.IsDelete == false) && project.ProjectState == "3" + && project.IsCNCECShow == true select new ProjectOutput { ProjectId = project.ProjectId, @@ -153,7 +156,8 @@ namespace BLL join sysConst in Funs.DB.Sys_Const on new { ProjectState2 = project.ProjectState2, GroupId = BLL.ConstValue.GroupId_ProjectState } equals new { ProjectState2 = sysConst.ConstValue, GroupId = sysConst.GroupId } into sysConstJoin from sysConst in sysConstJoin.DefaultIfEmpty() where (project.ProjectAttribute == "GONGCHENG" || project.ProjectAttribute == null) && (project.IsDelete == null || project.IsDelete == false) - select new ProjectOutput + && project.IsCNCECShow == true + select new ProjectOutput { ProjectId = project.ProjectId, ProjectCode = project.ProjectCode, diff --git a/SUBQHSE/BLL/ZHGL/Supervise/UnitHazardRegisterItemService.cs b/SUBQHSE/BLL/ZHGL/Supervise/UnitHazardRegisterItemService.cs index 713f877..24edb29 100644 --- a/SUBQHSE/BLL/ZHGL/Supervise/UnitHazardRegisterItemService.cs +++ b/SUBQHSE/BLL/ZHGL/Supervise/UnitHazardRegisterItemService.cs @@ -1,7 +1,8 @@ -using System; using Model; +using System; using System.Collections.Generic; using System.Linq; +using static BLL.UnitHazardRegisterService; namespace BLL { @@ -38,6 +39,46 @@ namespace BLL } } + /// + /// 根据主表ID驳回所有明细 + /// + /// 主表ID + public static void RejectItemsByRegisterId(string registerId) + { + var items = (from x in Funs.DB.Supervise_UnitHazardRegisterItem + where x.UnitHazardRegisterId == registerId && x.CompleteStatus == 1 + select x).ToList(); + foreach (var item in items) + { + item.CompleteStatus = 0; + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据ItemID驳回明细整改 + /// + /// 主表ID + public static void RejectItemByRegisterItemId(string ItemId) + { + var item = (from x in Funs.DB.Supervise_UnitHazardRegisterItem + where x.UnitHazardRegisterItemId == ItemId && x.CompleteStatus == 1 + select x).FirstOrDefault(); + if (item != null) + { + item.CompleteStatus = 0; + Funs.DB.SubmitChanges(); + var obj = (from x in Funs.DB.Supervise_UnitHazardRegister + where x.UnitHazardRegisterId == item.UnitHazardRegisterId && x.States == (int)StateInt.已闭环 + select x).FirstOrDefault(); + if (obj != null) + { + obj.States = (int)StateInt.部分整改; + Funs.DB.SubmitChanges(); + } + } + } + /// /// 删除明细记录 /// diff --git a/SUBQHSE/BLL/ZHGL/Supervise/UnitHazardRegisterService.cs b/SUBQHSE/BLL/ZHGL/Supervise/UnitHazardRegisterService.cs index 0fbe91e..c5fcba8 100644 --- a/SUBQHSE/BLL/ZHGL/Supervise/UnitHazardRegisterService.cs +++ b/SUBQHSE/BLL/ZHGL/Supervise/UnitHazardRegisterService.cs @@ -103,6 +103,22 @@ namespace BLL } } } + /// + /// 驳回企业级检查记录 + /// + /// 检查记录ID + public static void RejectUnitHazardRegisterById(string registerId) + { + using (Model.SUBQHSEDB db = new Model.SUBQHSEDB(Funs.ConnString)) + { + var register = db.Supervise_UnitHazardRegister.FirstOrDefault(e => e.UnitHazardRegisterId == registerId); + if (register != null) + { + register.States = (int)StateInt.待整改; + db.SubmitChanges(); + } + } + } /// /// 根据项目和时间段获取检查数量 @@ -149,6 +165,22 @@ namespace BLL return register.States <= (int)StateInt.待提交; } + /// + /// 判断是否可以驳回检查记录整改结果 + /// + /// 检查记录ID + /// true=可以驳回,false=不能驳回 + public static bool CanRejectRegister(string registerId) + { + var register = GetUnitHazardRegisterById(registerId); + if (register == null) + { + return false; + } + // 只有"已闭环"和"部分整改"状态可以撤回,其他状态不能撤回 + return register.States == (int)StateInt.已闭环 || register.States == (int)StateInt.部分整改; + } + /// /// 获取企业级检查列表(使用input对象,返回总数) /// diff --git a/SUBQHSE/FineUIPro.Web/FineUIPro.Web.csproj b/SUBQHSE/FineUIPro.Web/FineUIPro.Web.csproj index b61febc..ce5849d 100644 --- a/SUBQHSE/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SUBQHSE/FineUIPro.Web/FineUIPro.Web.csproj @@ -1167,6 +1167,7 @@ + diff --git a/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectData.aspx b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectData.aspx index 043d0d9..e6db891 100644 --- a/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectData.aspx +++ b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectData.aspx @@ -17,9 +17,20 @@ font-weight: bold !important; color: red !important; } - + + .ThreeMonthPause { + background-color: blueviolet; + } + .MonthPause { + background-color: red; + } + .WeekPause { + background-color: deeppink; + } + .DayPause { + background-color: hotpink; + } .Pause { - /*background-color: darkgray;*/ background-color: red; } @@ -154,9 +165,9 @@ - + <%-- - + --%> @@ -173,9 +184,9 @@ + EnableTextSelection="True"> @@ -224,13 +235,29 @@ - - + --%> + + + + + + + + + + + + - + <%-- - + --%> @@ -256,11 +283,11 @@ __doPostBack(null, 'reloadGrid'); } - function onGridDataLoad(event) { - this.mergeColumns(['Pro_name', 'Pro_code', 'Start_date', 'Pro_status'], { - depends: true - }); - } + // function onGridDataLoad(event) { + // this.mergeColumns(['Pro_name', 'Pro_code', 'Start_date', 'Pro_status'], { + // depends: true + // }); + // } diff --git a/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectData.aspx.cs b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectData.aspx.cs index 14551ad..106bfc6 100644 --- a/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectData.aspx.cs +++ b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectData.aspx.cs @@ -1,13 +1,9 @@ using BLL; -using FineUIPro.Web.BaseInfo; -using FineUIPro.Web.DataShow; using Model; -using Model.Customization; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Data; -using System.Data.SqlClient; using System.Linq; using AspNet = System.Web.UI.WebControls; @@ -87,7 +83,7 @@ namespace FineUIPro.Web.ProjectData Relate = pro != null && pro.MasterSysId != null ? 1 : 2, RelateName = pro != null && pro.MasterSysId != null ? "已关联" : "未关联", UseId = use != null ? use.Id : null, - //Use = use == null ? "" : (use != null && use.Is_use == true) ? "已使用" : "未使用", + //Use = use == null ? "" : (use != null && use.Is_use == true) ? "已使用" : "未使用", ReasonType = use != null ? use.ReasonType : "", Reason = use != null ? use.Reason : "", //Situation = use != null ? use.Situation : "", @@ -281,14 +277,14 @@ namespace FineUIPro.Web.ProjectData var obj = Grid1.SelectedRow.Values; string num = obj[0].ToString(); - string pro_name = obj[2].ToString(); - string pro_code = obj[3].ToString(); - string startdate = obj[7].ToString(); - string prostatus = obj[9].ToString(); - string projectName = obj[11].ToString(); - string projectCode = obj[12].ToString(); - string startDate = obj[13].ToString(); - string lblState = (Grid1.SelectedRow.FindControl("lblState") as AspNet.Label).Text; + string pro_name = obj[2].ToString().Trim(); + string pro_code = obj[3].ToString().Trim(); + string startdate = obj[7].ToString().Trim(); + string prostatus = obj[9].ToString().Trim(); + string projectName = obj[11].ToString().Trim(); + string projectCode = obj[12].ToString().Trim(); + string startDate = obj[13].ToString().Trim(); + string lblState = (Grid1.SelectedRow.FindControl("lblState") as AspNet.Label).Text.Trim(); if (!string.IsNullOrWhiteSpace(pro_id)) { @@ -304,7 +300,7 @@ namespace FineUIPro.Web.ProjectData model.Id = useId; model.Pro_id = pro_id; model.Pro_code = pro_code; - model.Pro_name = pro_name; + model.Pro_name = pro_name.Replace("·", ".").Replace("×", "/").Replace("&", "").Replace("#", "").Replace(";", ""); model.Is_relate = !string.IsNullOrWhiteSpace(projectId); model.Is_use = !string.IsNullOrWhiteSpace(projectId); model.Projectid = projectId; @@ -417,37 +413,63 @@ namespace FineUIPro.Web.ProjectData } var dateNow = DateTime.Now.Date;//现在 - var dateMonthAgo = dateNow.AddMonths(-1);//一个月前 + var dateDays = dateNow.AddDays(-3);//三天前 + var dateWeek = dateNow.AddDays(-7);//一周前 + var dateMonth = dateNow.AddMonths(-1);//一个月前 + var dateThreeMonth = dateNow.AddMonths(-3);//三个月前 var datas = (from x in db.Project_HSSEData_HSSE - where x.ReportDate == dateNow || x.ReportDate == dateMonthAgo + where x.ReportDate == dateNow || x.ReportDate == dateDays || x.ReportDate == dateWeek || x.ReportDate == dateMonth || x.ReportDate == dateThreeMonth select new QHSEProjectHSSEData { ProjectId = x.ProjectId, ReportDate = x.ReportDate, - DataMetricsSum = (x.JoinConstructionPersonNum ?? 0) + (x.GeneralClosedNum ?? 0) + (x.GeneralNotClosedNum ?? 0) + (x.SafeWorkingHour ?? 0) + //DataMetricsSum = (x.JoinConstructionPersonNum ?? 0) + (x.GeneralClosedNum ?? 0) + (x.GeneralNotClosedNum ?? 0) + (x.SafeWorkingHour ?? 0) + DataMetricsSum = (x.JoinConstructionPersonNum ?? 0) + (x.GeneralClosedNum ?? 0) + (x.GeneralNotClosedNum ?? 0) + (x.SafeWorkingHour ?? 0) + (x.LicensesNum ?? 0) + (x.SpecialTrainNum ?? 0) + + (x.SpecialTrainNum ?? 0) + (x.SpecialOperationTrainNum ?? 0) + (x.ProjectSafetyLeadingGroupMeetingNum ?? 0) + (x.ProjectSafetyMeetingNum ?? 0) + + (x.GeneralRiskNum ?? 0) + (x.LowRiskNum ?? 0) + (x.MediumRiskNum ?? 0) + (x.HighRiskNum ?? 0) + + (x.TrainPersonNum ?? 0) + (x.SuperTrainPersonNum ?? 0) + (x.OperativesNum ?? 0) + (x.SuperOperativesNum ?? 0) + (x.ProjectDrillPersonNum ?? 0) }).ToList(); foreach (var pro in getProjects) { - string result = "正常"; + string threeMonResult = ""; + string monResult = ""; + string dayResult = ""; + string weekResult = ""; var nowData = datas.Where(x => x.ProjectId == pro.ProjectId && x.ReportDate == dateNow).FirstOrDefault(); - var monthAgoData = datas.Where(x => x.ProjectId == pro.ProjectId && x.ReportDate == dateMonthAgo).FirstOrDefault(); - if (nowData != null && monthAgoData != null) + var daysData = datas.Where(x => x.ProjectId == pro.ProjectId && x.ReportDate == dateDays).FirstOrDefault(); + var weekData = datas.Where(x => x.ProjectId == pro.ProjectId && x.ReportDate == dateWeek).FirstOrDefault(); + var monthData = datas.Where(x => x.ProjectId == pro.ProjectId && x.ReportDate == dateMonth).FirstOrDefault(); + var threeMonthData = datas.Where(x => x.ProjectId == pro.ProjectId && x.ReportDate == dateThreeMonth).FirstOrDefault(); + if (nowData != null && daysData != null) {//两个时间点都有指标数据 - if (nowData.DataMetricsSum == monthAgoData.DataMetricsSum) + if (nowData.DataMetricsSum == daysData.DataMetricsSum) { - result = "异常"; + dayResult = "数据无变化"; + } + } + if (nowData != null && weekData != null) + {//两个时间点都有指标数据 + if (nowData.DataMetricsSum == weekData.DataMetricsSum) + { + weekResult = "数据无变化"; + } + } + if (nowData != null && monthData != null) + {//两个时间点都有指标数据 + if (nowData.DataMetricsSum == monthData.DataMetricsSum) + { + monResult = "数据无变化"; + } + } + if (nowData != null && threeMonthData != null) + {//两个时间点都有指标数据 + if (nowData.DataMetricsSum == threeMonthData.DataMetricsSum) + { + threeMonResult = "数据无变化"; } } - //else if (nowData != null) - //{//现在有指标数据,一个月前没有 - // result = "正常"; - //} - //else if (monthAgoData != null) - //{//现在没有指标数据,一个月前有 - // result = "正常"; - //} list.Add(new QHSEProjectDataInfo { @@ -458,7 +480,10 @@ namespace FineUIPro.Web.ProjectData StartDate = pro.StartDate, EndDate = pro.EndDate, ProjectState = pro.ProjectState, - Usage = result + UsageDays = dayResult, + UsageWeek = weekResult, + UsageMonth = monResult, + UsageThreeMonth = threeMonResult, }); } @@ -468,19 +493,39 @@ namespace FineUIPro.Web.ProjectData Grid2.DataSource = table; Grid2.DataBind(); - int exNum = 0; + int exDayNum = 0; + int exWeekNum = 0; + int exMonNum = 0; + int exThreeMonNum = 0; int allQhseNum = 0; - //int allQhseNum = list.Count(); try { for (int i = 0; i < Grid2.Rows.Count; i++) { allQhseNum++; - var usage = table.Rows[i]["Usage"].ToString().Trim(); - if (usage == "异常") + var usageDays = table.Rows[i]["UsageDays"].ToString().Trim(); + var usageWeek = table.Rows[i]["UsageWeek"].ToString().Trim(); + var usageMonth = table.Rows[i]["UsageMonth"].ToString().Trim(); + var usageThreeMonth = table.Rows[i]["UsageThreeMonth"].ToString().Trim(); + if (usageDays == "数据无变化") { - Grid2.Rows[i].RowCssClass = "Pause"; - exNum++; + Grid2.Rows[i].RowCssClass = "DayPause"; + exDayNum++; + } + if (usageWeek == "数据无变化") + { + Grid2.Rows[i].RowCssClass = "WeekPause"; + exWeekNum++; + } + if (usageMonth == "数据无变化") + { + Grid2.Rows[i].RowCssClass = "MonthPause"; + exMonNum++; + } + if (usageThreeMonth == "数据无变化") + { + Grid2.Rows[i].RowCssClass = "ThreeMonthPause"; + exThreeMonNum++; } } } @@ -489,8 +534,12 @@ namespace FineUIPro.Web.ProjectData JObject summary = new JObject(); summary.Add("tfNumber", "合计"); - summary.Add("ProjectCode", allQhseNum); - summary.Add("Usage", $"异常:{exNum}"); + summary.Add("Abbreviation", allQhseNum); + summary.Add("StartDate", "数据无变化"); + summary.Add("UsageDays", exDayNum); + summary.Add("UsageWeek", exWeekNum); + summary.Add("UsageMonth", exMonNum); + summary.Add("UsageThreeMonth", exThreeMonNum); Grid2.SummaryData = summary; } diff --git a/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataAnalysis.aspx b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataAnalysis.aspx new file mode 100644 index 0000000..f66137c --- /dev/null +++ b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataAnalysis.aspx @@ -0,0 +1,390 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MasterProjectDataAnalysis.aspx.cs" Inherits="FineUIPro.Web.ProjectData.MasterProjectDataAnalysis" %> + + + + + + 集团在建项目清单 + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + + + --%> + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataAnalysis.aspx.cs b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataAnalysis.aspx.cs new file mode 100644 index 0000000..e9c6111 --- /dev/null +++ b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataAnalysis.aspx.cs @@ -0,0 +1,857 @@ +using BLL; +using Model; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Text; +using AspNet = System.Web.UI.WebControls; + +namespace FineUIPro.Web.ProjectData +{ + public partial class MasterProjectDataAnalysis : PageBase + { + /// + /// 集团在建主数据 + /// + public static List masterProDatas = new List(); + ///// + ///// QHSE施工中项目集合 + ///// + //public static List getProjects = new List(); + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + //获取集团在建主数据 + masterProDatas = ProjectService.GetMasterProjectDataInfos(); + ////获取QHSE施工中项目集合 + //getProjects = ProjectService.GetProjectWorkList(); + + TabStrip1_TabIndexChanged(null, null); + } + } + + /// + /// 页签切换事件 + /// + /// + /// + protected void TabStrip1_TabIndexChanged(object sender, EventArgs e) + { + if (TabStrip1.ActiveTabIndex == 0) + { + this.Panel1.Title = "已关联"; + this.BindGrid(); + } + else if (TabStrip1.ActiveTabIndex == 1) + { + this.Panel1.Title = "待建"; + this.BindGrid2(); + } + else if (TabStrip1.ActiveTabIndex == 2) + { + this.Panel1.Title = "申请不用"; + this.BindGrid3(); + } + else if (TabStrip1.ActiveTabIndex == 3) + { + this.Panel1.Title = "预立项"; + this.BindGrid4(); + } + else if (TabStrip1.ActiveTabIndex == 4) + { + this.Panel1.Title = "数据汇总"; + this.BindGrid9(); + } + //else if (TabStrip1.ActiveTabIndex == 4) + //{ + // this.Panel1.Title = "自建"; + // //this.BindGrid5(); + //} + } + + #endregion + + #region 已关联数据 + + + #region 绑定数据 + /// + /// 绑定数据 + /// + private void BindGrid() + { + var list = new List(); + var db = Funs.DB; + var query = (from x in masterProDatas + join pro in db.Base_Project on x.Pro_id equals pro.MasterSysId into proGroup + from pro in proGroup.DefaultIfEmpty() + //join use in db.Project_MasterDataUsage on x.Pro_id equals use.Pro_id into useGroup + //from use in useGroup.DefaultIfEmpty() + where pro != null && pro.MasterSysId != null + //&& pro.ProjectState == Const.ProjectState_1 + select new MasterProjectDataInfo + { + //Pid = $"{x.Pro_id}|{(pro != null ? $"{pro.ProjectId}" : "")}|{(use != null ? use.Id : "")}", + Pid = $"{x.Pro_id}|{(pro != null ? $"{pro.ProjectId}" : "")}", + Pro_id = x.Pro_id, + Pro_name = x.Pro_name, + Pro_code = x.Pro_code, + Start_date = x.Start_date, + Con_mode_desc = x.Con_mode_desc, + Pro_nature = x.Pro_nature, + Pro_status = x.Pro_status, + Org_name = x.Org_name, + Amount = ConvertAmount(x.Ori_amt_sum_vat_fc, x.Amt_add_sum_vat_fc_local), + ProjectId = pro != null ? pro.ProjectId : null, + ProjectName = pro != null ? pro.ProjectName : "", + ProjectCode = pro != null ? pro.ProjectCode : "", + StartDate = pro != null ? pro.StartDate : null, + ProjectState = pro != null ? pro.ProjectState : "", + Relate = pro != null && pro.MasterSysId != null ? 1 : 2, + RelateName = pro != null && pro.MasterSysId != null ? "已关联" : "未关联", + }).ToList(); + + string startDate = this.txtStartTime.Text.Trim(); + string endDate = this.txtEndTime.Text.Trim(); + if (!string.IsNullOrWhiteSpace(startDate)) + { + query = query.Where(x => Funs.GetNewDateTime(x.Start_date) >= Funs.GetNewDateTime(startDate)).ToList(); + } + if (!string.IsNullOrWhiteSpace(endDate)) + { + query = query.Where(x => Funs.GetNewDateTime(x.Start_date) <= Funs.GetNewDateTime(endDate)).ToList(); + } + query = query.OrderByDescending(x => x.StartDate).ToList(); + list.AddRange(query); + + + ////// 获取施工中的项目 + //getProjects = getProjects.Where(x => x.MasterSysId == null).OrderByDescending(x => x.StartDate).ToList(); + //foreach (var pro in getProjects) + //{ + // list.Add(new MasterProjectDataInfo + // { + // Pid = $"|{pro.ProjectId}", + // Pro_id = "", + // Pro_name = "", + // Pro_code = "", + // Start_date = "", + // Con_mode_desc = "", + // Pro_nature = "", + // Pro_status = "", + // Org_name = "", + // Amount = "", + // ProjectId = pro != null ? pro.ProjectId : null, + // ProjectName = pro != null ? pro.ProjectName : "", + // ProjectCode = pro != null ? pro.ProjectCode : "", + // StartDate = pro != null ? pro.StartDate : null, + // ProjectState = pro != null ? pro.ProjectState : "", + // Relate = 3, + // RelateName = "未对应", + // UseId = null, + // //Use = use == null ? "" : (use != null && use.Is_use == true) ? "已使用" : "未使用", + // ReasonType = "", + // Reason = "", + // //Situation = use != null ? use.Situation : "", + // //Remark = use != null ? use.Remark : "", + // }); + //} + + string proName = this.txtProName.Text.Trim(); + string proCode = this.txtProCode.Text.Trim(); + string projectName = this.txtProjectName.Text.Trim(); + string projectCode = this.txtProjectCode.Text.Trim(); + //int relate = int.Parse(this.rblIsRelate.SelectedValue); + + if (!string.IsNullOrEmpty(proName)) + { + list = list.Where(x => x.Pro_name.Contains(proName)).ToList(); + } + if (!string.IsNullOrEmpty(proCode)) + { + list = list.Where(x => x.Pro_code.Contains(proCode)).ToList(); + } + if (!string.IsNullOrEmpty(projectName)) + { + list = list.Where(x => x.ProjectName.Contains(projectName)).ToList(); + } + if (!string.IsNullOrEmpty(projectCode)) + { + list = list.Where(x => x.ProjectCode.Contains(projectCode)).ToList(); + } + //if (relate > 0) + //{ + // list = list.Where(x => x.Relate == relate).ToList(); + //} + + DataTable tb = Funs.LINQToDataTable(list); + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + + int totalNum = list.Count(); + JObject summary = new JObject(); + summary.Add("tfNumber", "合计"); + summary.Add("Pro_name", totalNum); + + Grid1.SummaryData = summary; + } + + /// + /// 合同额(亿) + /// + /// 合同含税金额原始存档(元) + /// 增补合同本币含税金额(元) + /// + protected string ConvertAmount(decimal? Ori_amt, decimal? Amt_add) + { + string result = string.Empty; + Ori_amt = Ori_amt == null ? 0 : Ori_amt; + Amt_add = Amt_add == null ? 0 : Amt_add; + decimal? all = Amt_add + Ori_amt; + if (all != null) + { + double amount = all == null ? 0 : (Math.Round((double)(all / 100000000m), 2)); + result = amount.ToString(); + } + return result; + } + + /// + /// 项目状态 + /// + /// + /// + protected string ConvertProjectState(object state) + { + string result = string.Empty; + string stateStr = state.ToString(); + if (state != null && !string.IsNullOrWhiteSpace(stateStr)) + { + result = stateStr == "2" ? "暂停中" : stateStr == "3" ? "已完工" : "施工中"; + } + return result; + } + #endregion + + #region Grid + + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + + /// + /// + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + this.BindGrid(); + } + + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 导出按钮 + + /// + /// 导出按钮 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("集团主数据在建项目数据分析(正常)" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + this.Grid1.PageSize = this.Grid1.RecordCount; + this.BindGrid(); + Response.Write(GetGridMultiHeaderTableHtml2(Grid1)); + //Response.Write(GetGridTableHtml(Grid1)); + Response.End(); + } + #endregion + + #endregion + + #region 待建数据 + + + #region 绑定数据 + /// + /// 绑定数据 + /// + private void BindGrid2() + { + var list = new List(); + var db = Funs.DB; + var query = (from x in masterProDatas + join pro in db.Base_Project on x.Pro_id equals pro.MasterSysId into proGroup + from pro in proGroup.DefaultIfEmpty() + join use in db.Project_MasterDataUsage on x.Pro_id equals use.Pro_id into useGroup + from use in useGroup.DefaultIfEmpty() + where pro == null && (use == null || (use != null && (use.Reason == null || use.Reason == ""))) + select new MasterProjectDataInfo + { + //Pid = $"{x.Pro_id}|{(pro != null ? $"{pro.ProjectId}" : "")}|{(use != null ? use.Id : "")}", + //Pid = $"{x.Pro_id}|{(pro != null ? $"{pro.ProjectId}" : "")}", + Pid = x.Pro_id, + Pro_id = x.Pro_id, + Pro_name = x.Pro_name, + Pro_code = x.Pro_code, + Start_date = x.Start_date, + Con_mode_desc = x.Con_mode_desc, + Pro_nature = x.Pro_nature, + Pro_status = x.Pro_status, + Org_name = x.Org_name, + Amount = ConvertAmount(x.Ori_amt_sum_vat_fc, x.Amt_add_sum_vat_fc_local) + }).ToList(); + + string startDate = this.txtStartTime2.Text.Trim(); + string endDate = this.txtEndTime2.Text.Trim(); + if (!string.IsNullOrWhiteSpace(startDate)) + { + query = query.Where(x => Funs.GetNewDateTime(x.Start_date) >= Funs.GetNewDateTime(startDate)).ToList(); + } + if (!string.IsNullOrWhiteSpace(endDate)) + { + query = query.Where(x => Funs.GetNewDateTime(x.Start_date) <= Funs.GetNewDateTime(endDate)).ToList(); + } + query = query.OrderByDescending(x => x.StartDate).ToList(); + list.AddRange(query); + + string proName = this.txtProName2.Text.Trim(); + string proCode = this.txtProCode2.Text.Trim(); + + if (!string.IsNullOrEmpty(proName)) + { + list = list.Where(x => x.Pro_name.Contains(proName)).ToList(); + } + if (!string.IsNullOrEmpty(proCode)) + { + list = list.Where(x => x.Pro_code.Contains(proCode)).ToList(); + } + + DataTable tb = Funs.LINQToDataTable(list); + Grid2.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid2, tb); + Grid2.DataSource = table; + Grid2.DataBind(); + + int totalNum = list.Count(); + JObject summary = new JObject(); + summary.Add("tfPageIndex", "合计"); + summary.Add("Pro_name", totalNum); + + Grid2.SummaryData = summary; + } + + #endregion + + #region Grid + + protected void TextBox2_TextChanged(object sender, EventArgs e) + { + this.BindGrid2(); + } + + /// + /// + /// + /// + /// + protected void Grid2_PageIndexChange(object sender, GridPageEventArgs e) + { + this.BindGrid2(); + } + + + protected void Grid2_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + this.BindGrid2(); + } + #endregion + + #region 导出按钮 + + /// + /// 导出按钮 + /// + /// + /// + protected void btnOut2_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("集团主数据在建项目数据分析(待建)" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + this.Grid2.PageSize = this.Grid2.RecordCount; + this.BindGrid2(); + Response.Write(GetGridMultiHeaderTableHtml2(Grid2)); + //Response.Write(GetGridTableHtml(Grid2)); + Response.End(); + } + #endregion + + #endregion + + #region 申请不用数据 + + + #region 绑定数据 + /// + /// 绑定数据 + /// + private void BindGrid3() + { + var list = new List(); + var db = Funs.DB; + var query = (from x in masterProDatas + join pro in db.Base_Project on x.Pro_id equals pro.MasterSysId into proGroup + from pro in proGroup.DefaultIfEmpty() + join use in db.Project_MasterDataUsage on x.Pro_id equals use.Pro_id into useGroup + from use in useGroup.DefaultIfEmpty() + where pro == null && use != null && use.Reason != null && use.Reason != "" + select new MasterProjectDataInfo + { + //Pid = $"{x.Pro_id}|{(pro != null ? $"{pro.ProjectId}" : "")}|{(use != null ? use.Id : "")}", + //Pid = $"{x.Pro_id}|{(pro != null ? $"{pro.ProjectId}" : "")}", + Pid = x.Pro_id, + Pro_id = x.Pro_id, + Pro_name = x.Pro_name, + Pro_code = x.Pro_code, + Start_date = x.Start_date, + Con_mode_desc = x.Con_mode_desc, + Pro_nature = x.Pro_nature, + Pro_status = x.Pro_status, + Org_name = x.Org_name, + Amount = ConvertAmount(x.Ori_amt_sum_vat_fc, x.Amt_add_sum_vat_fc_local), + ReasonType = use != null ? use.ReasonType : "", + Reason = use != null ? use.Reason : "", + }).ToList(); + + string startDate = this.txtStartTime3.Text.Trim(); + string endDate = this.txtEndTime3.Text.Trim(); + if (!string.IsNullOrWhiteSpace(startDate)) + { + query = query.Where(x => Funs.GetNewDateTime(x.Start_date) >= Funs.GetNewDateTime(startDate)).ToList(); + } + if (!string.IsNullOrWhiteSpace(endDate)) + { + query = query.Where(x => Funs.GetNewDateTime(x.Start_date) <= Funs.GetNewDateTime(endDate)).ToList(); + } + //query = query.OrderByDescending(x => x.StartDate).ToList(); + list.AddRange(query); + + string proName = this.txtProName3.Text.Trim(); + string proCode = this.txtProCode3.Text.Trim(); + + if (!string.IsNullOrEmpty(proName)) + { + list = list.Where(x => x.Pro_name.Contains(proName)).ToList(); + } + if (!string.IsNullOrEmpty(proCode)) + { + list = list.Where(x => x.Pro_code.Contains(proCode)).ToList(); + } + + DataTable tb = Funs.LINQToDataTable(list); + Grid3.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid3, tb); + Grid3.DataSource = table; + Grid3.DataBind(); + + int totalNum = list.Count(); + JObject summary = new JObject(); + summary.Add("tfPageNo", "合计"); + summary.Add("Pro_name", totalNum); + + Grid3.SummaryData = summary; + } + + #endregion + + #region Grid + + protected void TextBox3_TextChanged(object sender, EventArgs e) + { + this.BindGrid3(); + } + + /// + /// + /// + /// + /// + protected void Grid3_PageIndexChange(object sender, GridPageEventArgs e) + { + this.BindGrid3(); + } + + + protected void Grid3_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + this.BindGrid3(); + } + #endregion + + #region 导出按钮 + + /// + /// 导出按钮 + /// + /// + /// + protected void btnOut3_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("集团主数据在建项目数据分析(申请不用)" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + this.Grid3.PageSize = this.Grid3.RecordCount; + this.BindGrid3(); + Response.Write(GetGridMultiHeaderTableHtml2(Grid3)); + //Response.Write(GetGridTableHtml(Grid3)); + Response.End(); + } + #endregion + + #endregion + + #region 预立项数据 + + #region 绑定数据 + /// + /// 绑定数据 + /// + private void BindGrid4() + { + //var list = new List(); + var db = Funs.DB; + var projects = ProjectService.GetProjectWorkList(); + var list = (from x in projects + where x.MasterSysId == null + select new MasterProjectDataInfo + { + Pid = x.ProjectId, + ProjectId = x.ProjectId, + ProjectName = x.ProjectName, + ProjectCode = x.ProjectCode, + StartDate = x.StartDate, + ProjectState = x.ProjectState, + }).ToList(); + + string projectName = this.txtProjectName4.Text.Trim(); + string projectCode = this.txtProjectCode4.Text.Trim(); + if (!string.IsNullOrEmpty(projectName)) + { + list = list.Where(x => x.ProjectName.Contains(projectName)).ToList(); + } + if (!string.IsNullOrEmpty(projectCode)) + { + list = list.Where(x => x.ProjectCode.Contains(projectCode)).ToList(); + } + string startDate = this.txtStartTime4.Text.Trim(); + string endDate = this.txtEndTime4.Text.Trim(); + if (!string.IsNullOrWhiteSpace(startDate)) + { + list = list.Where(x => x.StartDate >= Funs.GetNewDateTime(startDate)).ToList(); + } + if (!string.IsNullOrWhiteSpace(endDate)) + { + list = list.Where(x => x.StartDate <= Funs.GetNewDateTime(endDate)).ToList(); + } + //list = list.OrderByDescending(x => x.StartDate).ToList(); + //list.AddRange(query); + + DataTable tb = Funs.LINQToDataTable(list); + Grid4.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid4, tb); + Grid4.DataSource = table; + Grid4.DataBind(); + + int totalNum = list.Count(); + JObject summary = new JObject(); + summary.Add("tfPageNum", "合计"); + summary.Add("ProjectCode", totalNum); + + Grid4.SummaryData = summary; + } + + #endregion + + #region Grid + + protected void TextBox4_TextChanged(object sender, EventArgs e) + { + this.BindGrid4(); + } + + /// + /// + /// + /// + /// + protected void Grid4_PageIndexChange(object sender, GridPageEventArgs e) + { + this.BindGrid4(); + } + + + protected void Grid4_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + this.BindGrid4(); + } + #endregion + + #region 导出按钮 + + /// + /// 导出按钮 + /// + /// + /// + protected void btnOut4_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("集团主数据在建项目数据分析(预立项)" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + this.Grid4.PageSize = this.Grid4.RecordCount; + this.BindGrid4(); + Response.Write(GetGridMultiHeaderTableHtml2(Grid4)); + //Response.Write(GetGridTableHtml(Grid4)); + Response.End(); + } + #endregion + + #endregion + + #region 数据汇总 + + #region 绑定数据 + /// + /// 绑定数据 + /// + private void BindGrid9() + { + var db = Funs.DB; + var list = (from x in db.Project_MasterDataAnalysis + orderby x.ReportDate descending,x.DataDate descending + select x).ToList().Take(30); + + string startDate = this.txtStartTime9.Text.Trim(); + string endDate = this.txtEndTime9.Text.Trim(); + if (!string.IsNullOrWhiteSpace(startDate)) + { + list = list.Where(x => x.ReportDate >= Funs.GetNewDateTime(startDate)).ToList(); + } + if (!string.IsNullOrWhiteSpace(endDate)) + { + list = list.Where(x => x.ReportDate <= Funs.GetNewDateTime(endDate)).ToList(); + } + + DataTable tb = Funs.LINQToDataTable(list); + Grid9.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid9, tb); + Grid9.DataSource = table; + Grid9.DataBind(); + } + + #endregion + + #region Grid + + protected void TextBox9_TextChanged(object sender, EventArgs e) + { + this.BindGrid9(); + } + + /// + /// + /// + /// + /// + protected void Grid9_PageIndexChange(object sender, GridPageEventArgs e) + { + this.BindGrid9(); + } + + + protected void Grid9_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + this.BindGrid9(); + } + #endregion + + #region 导出按钮 + + /// + /// 导出按钮 + /// + /// + /// + protected void btnOut9_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("集团主数据在建项目数据分析(数据汇总)" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + this.Grid9.PageSize = this.Grid9.RecordCount; + this.BindGrid9(); + Response.Write(GetGridMultiHeaderTableHtml2(Grid9)); + //Response.Write(GetGridTableHtml(Grid9)); + Response.End(); + } + #endregion + + + #region 汇总上报 + + /// + /// 汇总上报 + /// + /// + /// + protected void btnReport_Click(object sender, EventArgs e) + { + var reportList = ProjectMasterDataAnalysisService.GetRecentHourAnalysisReportList(); + if (reportList.Any()) + { + Alert.ShowInTop("近一小时内已汇总上报,请勿频繁上报!", MessageBoxIcon.Warning); + return; + } + else + { + string message = string.Empty; + string code = ProjectMasterDataAnalysisService.ReportProjectMasterDataAnalysis(this.CurrUser.UserName,ref message); + if (code == "1") + { + this.BindGrid9(); + ShowNotify(message, MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + return; + } + else + { + Alert.ShowInParent(message, MessageBoxIcon.Error); + } + } + } + + #endregion + + #endregion + + #region 多表头导出方法 + /// + /// 多表头导出方法 + /// + /// + /// + public string GetGridMultiHeaderTableHtml2(Grid grid) + { + StringBuilder sb = new StringBuilder(); + sb.Append(""); + sb.Append(""); + MultiHeaderTable mht = new MultiHeaderTable(); + mht.ResolveMultiHeaderTable(grid.Columns); + + foreach (List rows in mht.MultiTable) + { + sb.Append(""); + foreach (object[] cell in rows) + { + int rowspan = Convert.ToInt32(cell[0]); + int colspan = Convert.ToInt32(cell[1]); + GridColumn column = cell[2] as GridColumn; + if (column.Hidden == false) + { + sb.AppendFormat("{3}", + rowspan != 1 ? " rowspan=\"" + rowspan + "\"" : "", + colspan != 1 ? " colspan=\"" + colspan + "\"" : "", + colspan != 1 ? " style=\"text-align:center;\"" : "", + column.HeaderText); + } + } + sb.Append(""); + } + foreach (GridRow row in grid.Rows) + { + sb.Append(""); + //if (row.Grid.gr.Hidden == false) { + foreach (GridColumn column in mht.Columns) + { + if (column.ColumnID != "ckbIsSelected" && column.ColumnID != "Punish" && column.ColumnID != "Del") + { + string html = row.Values[column.ColumnIndex].ToString(); + if (column.ColumnID == "tfNumber") + { + html = (row.FindControl("lblNumber") as AspNet.Label).Text; + } + else if (column.ColumnID == "tfPageIndex") + { + html = (row.FindControl("lblPageIndex") as AspNet.Label).Text; + } + else if (column.ColumnID == "tfPageNo") + { + html = (row.FindControl("lblPageNo") as AspNet.Label).Text; + } + else if (column.ColumnID == "tfPageNum") + { + html = (row.FindControl("lblPageNum") as AspNet.Label).Text; + } + else if (column.ColumnID == "tfNum") + { + html = (row.FindControl("lblNum") as AspNet.Label).Text; + } + else if (column.ColumnID == "tfState") + { + html = (row.FindControl("lblState") as AspNet.Label).Text; + } + else if (column.ColumnID == "tfProState") + { + html = (row.FindControl("lblProState") as AspNet.Label).Text; + } + else if (column.ColumnID == "tfStatus") + { + html = (row.FindControl("lblStatus") as AspNet.Label).Text; + } + sb.AppendFormat("", html); + } + } + //} + sb.Append(""); + } + + sb.Append("
{0}
"); + + return sb.ToString(); + } + + + #endregion + } +} \ No newline at end of file diff --git a/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataAnalysis.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataAnalysis.aspx.designer.cs new file mode 100644 index 0000000..b62f413 --- /dev/null +++ b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataAnalysis.aspx.designer.cs @@ -0,0 +1,494 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ProjectData +{ + + + public partial class MasterProjectDataAnalysis + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// TabStrip1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TabStrip TabStrip1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// txtProCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProCode; + + /// + /// txtProName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProName; + + /// + /// txtStartTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartTime; + + /// + /// Label5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label5; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// txtProjectCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProjectCode; + + /// + /// txtProjectName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProjectName; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// lblNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblNumber; + + /// + /// lblState 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblState; + + /// + /// Grid2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid2; + + /// + /// Toolbar3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar3; + + /// + /// txtProCode2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProCode2; + + /// + /// txtProName2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProName2; + + /// + /// txtStartTime2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartTime2; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label1; + + /// + /// txtEndTime2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime2; + + /// + /// btnOut2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut2; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + + /// + /// Grid3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid3; + + /// + /// Toolbar4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar4; + + /// + /// txtProCode3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProCode3; + + /// + /// txtProName3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProName3; + + /// + /// txtStartTime3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartTime3; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label2; + + /// + /// txtEndTime3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime3; + + /// + /// btnOut3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut3; + + /// + /// lblPageNo 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageNo; + + /// + /// Grid4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid4; + + /// + /// Toolbar5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar5; + + /// + /// txtProjectCode4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProjectCode4; + + /// + /// txtProjectName4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProjectName4; + + /// + /// txtStartTime4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartTime4; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label3; + + /// + /// txtEndTime4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime4; + + /// + /// btnOut4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut4; + + /// + /// lblPageNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageNum; + + /// + /// lblProState 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblProState; + + /// + /// Grid9 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid9; + + /// + /// Toolbar6 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar6; + + /// + /// txtStartTime9 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartTime9; + + /// + /// Label4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label4; + + /// + /// txtEndTime9 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime9; + + /// + /// btnReport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnReport; + + /// + /// btnOut9 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut9; + + /// + /// lblNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblNum; + } +} diff --git a/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataUsage.aspx b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataUsage.aspx index e1ce527..fca31a4 100644 --- a/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataUsage.aspx +++ b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataUsage.aspx @@ -76,6 +76,7 @@ + @@ -106,7 +107,7 @@ --%> - + @@ -153,7 +154,7 @@
private void BindGrid() { - string strSql = "SELECT Project.ProjectId,Project.ProjectCode,Project.ProjectName,unit.UnitName,Project.StartDate,Project.EndDate,Project.ProjectAddress,ProjectType.ProjectTypeName AS ProjectTypeName,ShortName, " + string strSql = "SELECT Project.ProjectId,Project.IsCNCECShow,Project.ProjectCode,Project.ProjectName,unit.UnitName,Project.StartDate,Project.EndDate,Project.ProjectAddress,ProjectType.ProjectTypeName AS ProjectTypeName,ShortName, " + @" (CASE WHEN ProjectState='" + BLL.Const.ProjectState_2 + "' THEN '暂停中' WHEN ProjectState='" + BLL.Const.ProjectState_3 + "' THEN '已完工' ELSE '施工中' END) AS ProjectStateName,Project.ProjectState,sysConst.ConstText as ProjectStateName2,(case ProjectAttribute when 'GONGCHENG' then '工程' when 'SHIYE' then '实业' else '' end) as ProjectAttributeName" + @" FROM Base_Project AS Project LEFT JOIN Base_Unit as unit on unit.UnitId=Project.UnitId" + @" LEFT JOIN Base_ProjectType AS ProjectType ON Project.ProjectType =ProjectType.ProjectTypeId" @@ -156,6 +156,11 @@ namespace FineUIPro.Web.ProjectData listStr.Add(new SqlParameter("@UnitId", this.CurrUser.UnitId)); listStr.Add(new SqlParameter("@UserId", this.CurrUser.UserId)); } + if (this.rbIsCNCECShow.Checked) + { + strSql += " AND IsCNCECShow=1 "; + } + if (this.ckState.SelectedValue != "0") { if (this.ckState.SelectedValue == "1") @@ -687,5 +692,11 @@ namespace FineUIPro.Web.ProjectData } } #endregion + + protected void rbIsCNCECShow_CheckedChanged(object sender, CheckedEventArgs e) + { + this.BindGrid(); + } + } } \ No newline at end of file diff --git a/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSet.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSet.aspx.designer.cs index 44493e4..24ff440 100644 --- a/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSet.aspx.designer.cs +++ b/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSet.aspx.designer.cs @@ -131,6 +131,15 @@ namespace FineUIPro.Web.ProjectData /// protected global::FineUIPro.TextBox txtProjectName; + /// + /// rbIsCNCECShow control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.CheckBox rbIsCNCECShow; + /// /// btnSearch control. /// diff --git a/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetSave.aspx b/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetSave.aspx index 3136027..52a756a 100644 --- a/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetSave.aspx +++ b/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetSave.aspx @@ -22,7 +22,7 @@ + EnableMultiSelect="false" MatchFieldWidth="false" OnTextChanged="MasterData_Changed"> + + + + + + diff --git a/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.cs b/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.cs index d60c151..5d2f65c 100644 --- a/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.cs +++ b/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.cs @@ -99,6 +99,14 @@ namespace FineUIPro.Web.ProjectData { this.txtEndDate.Text = string.Format("{0:yyyy-MM-dd}", project.EndDate); } + if (project.IsCNCECShow == true) + { + this.rbIsCNCECShow.SelectedValue = "True"; + } + else + { + this.rbIsCNCECShow.SelectedValue = "False"; + } this.txtShortName.Text = project.ShortName; if (!string.IsNullOrEmpty(project.ProjectType)) @@ -349,7 +357,7 @@ namespace FineUIPro.Web.ProjectData Remark = this.txtRemark.Text.Trim(), Telephone = this.txtTelephone.Text.Trim(), ProjectInsurance = this.txtProjectInsurance.Text.Trim(), - + IsCNCECShow = Convert.ToBoolean(this.rbIsCNCECShow.SelectedValue), City = this.txtCity.Text.Trim(), EnglishRemark = this.txtEnglishRemark.Text.Trim(), Progress = Funs.GetNewDecimal(this.txtProgress.Text), diff --git a/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.designer.cs index c623582..be401dd 100644 --- a/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.designer.cs +++ b/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.designer.cs @@ -113,6 +113,15 @@ namespace FineUIPro.Web.ProjectData /// protected global::System.Web.UI.WebControls.Label lblProaddtype; + /// + /// rbIsCNCECShow control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.RadioButtonList rbIsCNCECShow; + /// /// txtProjectName control. /// diff --git a/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetView.aspx b/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetView.aspx index e44d8bd..a9b4975 100644 --- a/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetView.aspx +++ b/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetView.aspx @@ -15,7 +15,11 @@ - + + + + + diff --git a/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetView.aspx.cs b/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetView.aspx.cs index 396c212..489f8c4 100644 --- a/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetView.aspx.cs +++ b/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetView.aspx.cs @@ -54,7 +54,14 @@ namespace FineUIPro.Web.ProjectData { this.txtEndDate.Text = string.Format("{0:yyyy-MM-dd}", project.EndDate); } - + if (project.IsCNCECShow == true) + { + this.rbIsCNCECShow.SelectedValue = "True"; + } + else + { + this.rbIsCNCECShow.SelectedValue = "False"; + } this.txtShortName.Text = project.ShortName; var projectType = ProjectTypeService.GetProjectTypeById(project.ProjectType); if (projectType != null) diff --git a/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetView.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetView.aspx.designer.cs index 6370696..3d7b0a6 100644 --- a/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetView.aspx.designer.cs +++ b/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetView.aspx.designer.cs @@ -1,311 +1,322 @@ //------------------------------------------------------------------------------ -// <自动生成> -// 此代码由工具生成。 +// +// This code was generated by a tool. // -// 对此文件的更改可能导致不正确的行为,如果 -// 重新生成代码,则所做更改将丢失。 -// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// //------------------------------------------------------------------------------ -namespace FineUIPro.Web.ProjectData { - - - public partial class ProjectSetView { - +namespace FineUIPro.Web.ProjectData +{ + + + public partial class ProjectSetView + { + /// - /// form1 控件。 + /// form1 control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// - /// PageManager1 控件。 + /// PageManager1 control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.PageManager PageManager1; - + /// - /// SimpleForm1 控件。 + /// SimpleForm1 control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.Form SimpleForm1; - + /// - /// txtProjectName 控件。 + /// txtProjectName control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextBox txtProjectName; - + /// - /// txtProjectCode 控件。 + /// rbIsCNCECShow control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.RadioButtonList rbIsCNCECShow; + + /// + /// txtProjectCode control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextBox txtProjectCode; - + /// - /// txtShortName 控件。 + /// txtShortName control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextBox txtShortName; - + /// - /// txtProjectType 控件。 + /// txtProjectType control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextBox txtProjectType; - + /// - /// txtProjectState 控件。 + /// txtProjectState control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextBox txtProjectState; - + /// - /// txtProjectState2 控件。 + /// txtProjectState2 control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextBox txtProjectState2; - + /// - /// txtStartDate 控件。 + /// txtStartDate control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextBox txtStartDate; - + /// - /// txtEndDate 控件。 + /// txtEndDate control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextBox txtEndDate; - + /// - /// txtDuration 控件。 + /// txtDuration control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextBox txtDuration; - + /// - /// txtProjectManager 控件。 + /// txtProjectManager control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextBox txtProjectManager; - + /// - /// txtConstructionManager 控件。 + /// txtConstructionManager control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextBox txtConstructionManager; - + /// - /// txtHSSEManager 控件。 + /// txtHSSEManager control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextBox txtHSSEManager; - + /// - /// txtProjectAddress 控件。 + /// txtProjectAddress control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextBox txtProjectAddress; - + /// - /// txtUnitName 控件。 + /// txtUnitName control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextBox txtUnitName; - + /// - /// txtWorkRange 控件。 + /// txtWorkRange control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextArea txtWorkRange; - + /// - /// txtRemark 控件。 + /// txtRemark control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextArea txtRemark; - + /// - /// txtProjectMoney 控件。 + /// txtProjectMoney control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextBox txtProjectMoney; - + /// - /// txtConstructionMoney 控件。 + /// txtConstructionMoney control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextBox txtConstructionMoney; - + /// - /// txtTelephone 控件。 + /// txtTelephone control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextBox txtTelephone; - + /// - /// txtCountry 控件。 + /// txtCountry control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextBox txtCountry; - + /// - /// txtProvince 控件。 + /// txtProvince control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextBox txtProvince; - + /// - /// txtCity 控件。 + /// txtCity control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextBox txtCity; - + /// - /// ckbIsForeign 控件。 + /// ckbIsForeign control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.CheckBox ckbIsForeign; - + /// - /// txtMapCoordinates 控件。 + /// txtMapCoordinates control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextBox txtMapCoordinates; - + /// - /// txtEnglishRemark 控件。 + /// txtEnglishRemark control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.TextBox txtEnglishRemark; - + /// - /// txtProgress 控件。 + /// txtProgress control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.NumberBox txtProgress; - + /// - /// Toolbar1 控件。 + /// Toolbar1 control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.Toolbar Toolbar1; - + /// - /// btnAttachUrl 控件。 + /// btnAttachUrl control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.Button btnAttachUrl; - + /// - /// btnClose 控件。 + /// btnClose control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.Button btnClose; - + /// - /// WindowAtt 控件。 + /// WindowAtt control. /// /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.Window WindowAtt; } diff --git a/SUBQHSE/Model/APIItem/CNCEC/Ads_pms_pro_info_build.cs b/SUBQHSE/Model/APIItem/CNCEC/Ads_pms_pro_info_build.cs index e0a91f1..5ff0050 100644 --- a/SUBQHSE/Model/APIItem/CNCEC/Ads_pms_pro_info_build.cs +++ b/SUBQHSE/Model/APIItem/CNCEC/Ads_pms_pro_info_build.cs @@ -185,9 +185,21 @@ namespace Model #endregion /// - /// 使用情况 + /// 使用情况(近三天) /// - public string Usage { get; set; } + public string UsageDays { get; set; } + /// + /// 使用情况(近一周) + /// + public string UsageWeek { get; set; } + /// + /// 使用情况(近一月) + /// + public string UsageMonth { get; set; } + /// + /// 使用情况(近三个月) + /// + public string UsageThreeMonth { get; set; } } diff --git a/SUBQHSE/Model/Model.cs b/SUBQHSE/Model/Model.cs index 3ea6226..f2c817a 100644 --- a/SUBQHSE/Model/Model.cs +++ b/SUBQHSE/Model/Model.cs @@ -2021,6 +2021,9 @@ namespace Model partial void InsertProject_Installation(Project_Installation instance); partial void UpdateProject_Installation(Project_Installation instance); partial void DeleteProject_Installation(Project_Installation instance); + partial void InsertProject_MasterDataAnalysis(Project_MasterDataAnalysis instance); + partial void UpdateProject_MasterDataAnalysis(Project_MasterDataAnalysis instance); + partial void DeleteProject_MasterDataAnalysis(Project_MasterDataAnalysis instance); partial void InsertProject_MasterDataUsage(Project_MasterDataUsage instance); partial void UpdateProject_MasterDataUsage(Project_MasterDataUsage instance); partial void DeleteProject_MasterDataUsage(Project_MasterDataUsage instance); @@ -8385,6 +8388,14 @@ namespace Model } } + public System.Data.Linq.Table Project_MasterDataAnalysis + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Project_MasterDataUsage { get @@ -28048,6 +28059,8 @@ namespace Model private string _YunMouGroupId; + private System.Nullable _IsCNCECShow; + private EntitySet _Accident_AccidentHandle; private EntitySet _Accident_AccidentPersonRecord; @@ -28812,6 +28825,8 @@ namespace Model partial void OnIsYunMouChanged(); partial void OnYunMouGroupIdChanging(string value); partial void OnYunMouGroupIdChanged(); + partial void OnIsCNCECShowChanging(System.Nullable value); + partial void OnIsCNCECShowChanged(); #endregion public Base_Project() @@ -30062,6 +30077,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsCNCECShow", DbType="Bit")] + public System.Nullable IsCNCECShow + { + get + { + return this._IsCNCECShow; + } + set + { + if ((this._IsCNCECShow != value)) + { + this.OnIsCNCECShowChanging(value); + this.SendPropertyChanging(); + this._IsCNCECShow = value; + this.SendPropertyChanged("IsCNCECShow"); + this.OnIsCNCECShowChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Accident_AccidentHandle_Base_Project", Storage="_Accident_AccidentHandle", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] public EntitySet Accident_AccidentHandle { @@ -327902,6 +327937,356 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Project_MasterDataAnalysis")] + public partial class Project_MasterDataAnalysis : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _Id; + + private string _CollCropCode; + + private string _UnitId; + + private System.DateTime _ReportDate; + + private System.DateTime _DataDate; + + private int _Total; + + private int _MasterTotal; + + private int _QHSETotal; + + private int _ZhengChang; + + private int _DaiJian; + + private int _BuYong; + + private int _YuLiXiang; + + private string _CreateUser; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnIdChanging(string value); + partial void OnIdChanged(); + partial void OnCollCropCodeChanging(string value); + partial void OnCollCropCodeChanged(); + partial void OnUnitIdChanging(string value); + partial void OnUnitIdChanged(); + partial void OnReportDateChanging(System.DateTime value); + partial void OnReportDateChanged(); + partial void OnDataDateChanging(System.DateTime value); + partial void OnDataDateChanged(); + partial void OnTotalChanging(int value); + partial void OnTotalChanged(); + partial void OnMasterTotalChanging(int value); + partial void OnMasterTotalChanged(); + partial void OnQHSETotalChanging(int value); + partial void OnQHSETotalChanged(); + partial void OnZhengChangChanging(int value); + partial void OnZhengChangChanged(); + partial void OnDaiJianChanging(int value); + partial void OnDaiJianChanged(); + partial void OnBuYongChanging(int value); + partial void OnBuYongChanged(); + partial void OnYuLiXiangChanging(int value); + partial void OnYuLiXiangChanged(); + partial void OnCreateUserChanging(string value); + partial void OnCreateUserChanged(); + #endregion + + public Project_MasterDataAnalysis() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string Id + { + get + { + return this._Id; + } + set + { + if ((this._Id != value)) + { + this.OnIdChanging(value); + this.SendPropertyChanging(); + this._Id = value; + this.SendPropertyChanged("Id"); + this.OnIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CollCropCode", DbType="NVarChar(100) NOT NULL", CanBeNull=false)] + public string CollCropCode + { + get + { + return this._CollCropCode; + } + set + { + if ((this._CollCropCode != value)) + { + this.OnCollCropCodeChanging(value); + this.SendPropertyChanging(); + this._CollCropCode = value; + this.SendPropertyChanged("CollCropCode"); + this.OnCollCropCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + this.OnUnitIdChanging(value); + this.SendPropertyChanging(); + this._UnitId = value; + this.SendPropertyChanged("UnitId"); + this.OnUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReportDate", DbType="DateTime NOT NULL")] + public System.DateTime ReportDate + { + get + { + return this._ReportDate; + } + set + { + if ((this._ReportDate != value)) + { + this.OnReportDateChanging(value); + this.SendPropertyChanging(); + this._ReportDate = value; + this.SendPropertyChanged("ReportDate"); + this.OnReportDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DataDate", DbType="DateTime NOT NULL")] + public System.DateTime DataDate + { + get + { + return this._DataDate; + } + set + { + if ((this._DataDate != value)) + { + this.OnDataDateChanging(value); + this.SendPropertyChanging(); + this._DataDate = value; + this.SendPropertyChanged("DataDate"); + this.OnDataDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Total", DbType="Int NOT NULL")] + public int Total + { + get + { + return this._Total; + } + set + { + if ((this._Total != value)) + { + this.OnTotalChanging(value); + this.SendPropertyChanging(); + this._Total = value; + this.SendPropertyChanged("Total"); + this.OnTotalChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MasterTotal", DbType="Int NOT NULL")] + public int MasterTotal + { + get + { + return this._MasterTotal; + } + set + { + if ((this._MasterTotal != value)) + { + this.OnMasterTotalChanging(value); + this.SendPropertyChanging(); + this._MasterTotal = value; + this.SendPropertyChanged("MasterTotal"); + this.OnMasterTotalChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QHSETotal", DbType="Int NOT NULL")] + public int QHSETotal + { + get + { + return this._QHSETotal; + } + set + { + if ((this._QHSETotal != value)) + { + this.OnQHSETotalChanging(value); + this.SendPropertyChanging(); + this._QHSETotal = value; + this.SendPropertyChanged("QHSETotal"); + this.OnQHSETotalChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ZhengChang", DbType="Int NOT NULL")] + public int ZhengChang + { + get + { + return this._ZhengChang; + } + set + { + if ((this._ZhengChang != value)) + { + this.OnZhengChangChanging(value); + this.SendPropertyChanging(); + this._ZhengChang = value; + this.SendPropertyChanged("ZhengChang"); + this.OnZhengChangChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DaiJian", DbType="Int NOT NULL")] + public int DaiJian + { + get + { + return this._DaiJian; + } + set + { + if ((this._DaiJian != value)) + { + this.OnDaiJianChanging(value); + this.SendPropertyChanging(); + this._DaiJian = value; + this.SendPropertyChanged("DaiJian"); + this.OnDaiJianChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BuYong", DbType="Int NOT NULL")] + public int BuYong + { + get + { + return this._BuYong; + } + set + { + if ((this._BuYong != value)) + { + this.OnBuYongChanging(value); + this.SendPropertyChanging(); + this._BuYong = value; + this.SendPropertyChanged("BuYong"); + this.OnBuYongChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_YuLiXiang", DbType="Int NOT NULL")] + public int YuLiXiang + { + get + { + return this._YuLiXiang; + } + set + { + if ((this._YuLiXiang != value)) + { + this.OnYuLiXiangChanging(value); + this.SendPropertyChanging(); + this._YuLiXiang = value; + this.SendPropertyChanged("YuLiXiang"); + this.OnYuLiXiangChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreateUser", DbType="NVarChar(200) NOT NULL", CanBeNull=false)] + public string CreateUser + { + get + { + return this._CreateUser; + } + set + { + if ((this._CreateUser != value)) + { + this.OnCreateUserChanging(value); + this.SendPropertyChanging(); + this._CreateUser = value; + this.SendPropertyChanged("CreateUser"); + this.OnCreateUserChanged(); + } + } + } + + 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.Project_MasterDataUsage")] public partial class Project_MasterDataUsage : INotifyPropertyChanging, INotifyPropertyChanged { diff --git a/SUBQHSE/WebAPI/Controllers/CommonController.cs b/SUBQHSE/WebAPI/Controllers/CommonController.cs index 958de0e..6c76702 100644 --- a/SUBQHSE/WebAPI/Controllers/CommonController.cs +++ b/SUBQHSE/WebAPI/Controllers/CommonController.cs @@ -3,6 +3,7 @@ using Newtonsoft.Json.Linq; using System; using System.Linq; using System.Web.Http; +using Model; using Newtonsoft.Json; using WebAPI.Filter; @@ -234,6 +235,32 @@ namespace WebAPI.Controllers return responeData; } + #region 上报集团主数据在建项目数据分析 + + /// + /// 汇总上报集团主数据在建项目数据分析 + /// + /// + [HttpPost] + public ReturnData PushProjectMasterDataAnalysisData() + { + Model.ReturnData responeData = new Model.ReturnData(); + string message = string.Empty; + string code = ProjectMasterDataAnalysisService.ReportProjectMasterDataAnalysis("定时任务",ref message); + if (code == "1") + { + responeData.code = 1; + } + else + { + responeData.code = 0; + } + responeData.message = message; + return responeData; + } + + #endregion + } }