diff --git a/DataBase/版本日志/SUBQHSE_V2026-07-15-xiaj(数据治理项目申请预立项).sql b/DataBase/版本日志/SUBQHSE_V2026-07-15-xiaj(数据治理项目申请预立项).sql new file mode 100644 index 0000000..30e5a2d --- /dev/null +++ b/DataBase/版本日志/SUBQHSE_V2026-07-15-xiaj(数据治理项目申请预立项).sql @@ -0,0 +1,121 @@ + +--˾ĿԤ +IF NOT EXISTS (SELECT * FROM Sys_Menu WHERE MenuId = '204ACA82-15B4-4C80-AE9F-ACF25CE79876') +BEGIN + INSERT INTO dbo.Sys_Menu (MenuId, MenuName,Url, SortIndex, SuperMenu, MenuType, IsOffice, IsEnd, IsUsed) + VALUES (N'204ACA82-15B4-4C80-AE9F-ACF25CE79876', N'ĿԤ', N'ProjectData/PreProjectApplyList.aspx', 81, 'C2297533-B7C0-441E-B29F-ADE87C6F8978', 'Menu_SysSet', 1,1, 1); +END +GO + +----˾ĿԤ +--IF NOT EXISTS (SELECT * FROM Sys_Menu WHERE MenuId = '204ACA82-15B4-4C80-AE9F-ACF25CE79876') +--BEGIN +-- INSERT INTO dbo.Sys_Menu (MenuId, MenuName,Url, SortIndex, SuperMenu, MenuType, IsOffice, IsEnd, IsUsed) +-- VALUES (N'204ACA82-15B4-4C80-AE9F-ACF25CE79876', N'ĿԤ', N'ProjectData/PreProjectApplyList.aspx', 41, N'0', N'Menu_System_Hsse_S_SysSet', 1,1, 1); +--END +--GO + + +--ĿԤ +IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'DataGovernance_PreProjectApply') AND type = N'U') +BEGIN +CREATE TABLE [dbo].[DataGovernance_PreProjectApply]( + [Id] [nvarchar](50) NOT NULL, + [UnitId] [nvarchar](200) NOT NULL, + [UnitName] [nvarchar](200) NOT NULL, + [ProjectName] [nvarchar](200) NOT NULL, + [ApplyType] [nvarchar](50) NOT NULL, + [ApplyUserId] [nvarchar](50) NOT NULL, + [ApplyUserName] [nvarchar](200) NOT NULL, + [ApplyDescription] [nvarchar](200) NULL, + [ApplyDate] [datetime] NOT NULL, + [ApproverUserId] [nvarchar](50) NULL, + [ApproverUserName] [nvarchar](200) NULL, + [ApprovalDescription] [nvarchar](200) NULL, + [ApprovalDate] [datetime] NULL, + [State] [int] NOT NULL, + CONSTRAINT [PK_DataGovernance_PreProjectApply] 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].[DataGovernance_PreProjectApply] ADD CONSTRAINT [DF_DataGovernance_PreProjectApply_ApplyDate] DEFAULT (getdate()) FOR [ApplyDate] +ALTER TABLE [dbo].[DataGovernance_PreProjectApply] ADD CONSTRAINT [DF_DataGovernance_PreProjectApply_ApplyState] DEFAULT ((0)) FOR [State] +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DataGovernance_PreProjectApply', @level2type=N'COLUMN',@level2name=N'Id' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'λId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DataGovernance_PreProjectApply', @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'DataGovernance_PreProjectApply', @level2type=N'COLUMN',@level2name=N'UnitName' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ŀ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DataGovernance_PreProjectApply', @level2type=N'COLUMN',@level2name=N'ProjectName' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DataGovernance_PreProjectApply', @level2type=N'COLUMN',@level2name=N'ApplyType' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DataGovernance_PreProjectApply', @level2type=N'COLUMN',@level2name=N'ApplyUserId' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DataGovernance_PreProjectApply', @level2type=N'COLUMN',@level2name=N'ApplyUserName' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'˵' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DataGovernance_PreProjectApply', @level2type=N'COLUMN',@level2name=N'ApplyDescription' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DataGovernance_PreProjectApply', @level2type=N'COLUMN',@level2name=N'ApplyDate' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DataGovernance_PreProjectApply', @level2type=N'COLUMN',@level2name=N'ApproverUserId' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DataGovernance_PreProjectApply', @level2type=N'COLUMN',@level2name=N'ApproverUserName' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'˵' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DataGovernance_PreProjectApply', @level2type=N'COLUMN',@level2name=N'ApprovalDescription' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DataGovernance_PreProjectApply', @level2type=N'COLUMN',@level2name=N'ApprovalDate' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'״̬0ˣ1ͨ2ͨ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DataGovernance_PreProjectApply', @level2type=N'COLUMN',@level2name=N'State' +END + +GO + + + +/*************************************Ŀܱ********************************************************/ + +--Ŀܱáδر +IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Project_MasterDataAnalysis' AND COLUMN_NAME = 'BuYongBuShiYong') +BEGIN + --벻á + ALTER TABLE Project_MasterDataAnalysis ADD BuYongBuShiYong int DEFAULT ((0)); + 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'BuYongBuShiYong' + + --δ+ͣ+ + ALTER TABLE Project_MasterDataAnalysis ADD WeiShangXian int DEFAULT ((0)); + 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'WeiShangXian' + + --ر깤/+ + ALTER TABLE Project_MasterDataAnalysis ADD ShenQingGuanBi int DEFAULT ((0)); + 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'ShenQingGuanBi' + +END +GO + + +--ɾѹĿдԭ +delete from Project_MasterDataUsage +where pro_id in (select distinct MasterSysId from Base_Project) +GO +delete Project_MasterDataUsage +where is_relate=1 +GO +delete Project_MasterDataUsage +where projectid is not null and projectid!='' +GO +update Project_MasterDataUsage set ReasonType='깤/' where ReasonType='깤' +GO +update Project_MasterDataUsage set ReasonType='ͣ' where ReasonType='ͣ' +GO +update Project_MasterDataUsage set ReasonType='' where ReasonType in ('ҵͳ','ڶ/ģС','') +GO +update Project_MasterDataUsage set ReasonType='' where ReasonType in ('','ԭ') +GO + + + +ALTER VIEW [dbo].[View_Project_MasterDataAnalysis] AS +WITH LastData AS ( + SELECT ReportDate, MAX(DataDate) AS LatestDate + FROM dbo.Project_MasterDataAnalysis AS tba + GROUP BY tba.ReportDate +),RankedData AS ( + SELECT tbb.* + FROM dbo.Project_MasterDataAnalysis tbb + INNER JOIN LastData AS ld ON tbb.DataDate = ld.LatestDate +) +SELECT + rd.* +FROM RankedData AS rd + +GO \ No newline at end of file diff --git a/SUBQHSE/BLL/BLL.csproj b/SUBQHSE/BLL/BLL.csproj index 8b1155d..9800c5b 100644 --- a/SUBQHSE/BLL/BLL.csproj +++ b/SUBQHSE/BLL/BLL.csproj @@ -69,8 +69,8 @@ ..\packages\SharpZipLib.1.3.3\lib\net45\ICSharpCode.SharpZipLib.dll - - ..\packages\Microsoft.Bcl.AsyncInterfaces.6.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll + + ..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll ..\packages\Microsoft.Extensions.Logging.Abstractions.6.0.0\lib\net461\Microsoft.Extensions.Logging.Abstractions.dll @@ -471,6 +471,7 @@ + diff --git a/SUBQHSE/BLL/DataGovernance/PreProjectApplyService.cs b/SUBQHSE/BLL/DataGovernance/PreProjectApplyService.cs new file mode 100644 index 0000000..52cb1d3 --- /dev/null +++ b/SUBQHSE/BLL/DataGovernance/PreProjectApplyService.cs @@ -0,0 +1,128 @@ +using Model; +using System.Linq; +namespace BLL +{ + /// + /// 项目申请预立项 + /// + public static class PreProjectApplyService + { + /// + /// 根据主键Id查询申请预立项数据 + /// + /// + /// + public static Model.DataGovernance_PreProjectApply GetPreProjectApplyById(string Id) + { + return Funs.DB.DataGovernance_PreProjectApply.FirstOrDefault(e => e.Id == Id); + } + + /// + /// 根据项目名称查询申请预立项数据 + /// + /// + /// + public static Model.DataGovernance_PreProjectApply GetPreProjectApplyByProjectName(string projectName) + { + return Funs.DB.DataGovernance_PreProjectApply.FirstOrDefault(e => e.ProjectName == projectName); + } + + /// + /// 删除申请 + /// + /// + public static void DeletePreProjectApply(string Id) + { + using (Model.SUBQHSEDB db = new Model.SUBQHSEDB(Funs.ConnString)) + { + DataGovernance_PreProjectApply apply = db.DataGovernance_PreProjectApply.FirstOrDefault(e => e.Id == Id); + if (apply != null) + { + db.DataGovernance_PreProjectApply.DeleteOnSubmit(apply); + db.SubmitChanges(); + } + } + } + + /// + /// 添加项目申请预立项 + /// + /// + public static void AddPreProjectApply(Model.DataGovernance_PreProjectApply model) + { + Model.SUBQHSEDB db = Funs.DB; + Model.DataGovernance_PreProjectApply newModel = new Model.DataGovernance_PreProjectApply(); + newModel.Id = model.Id; + newModel.UnitId = model.UnitId; + newModel.UnitName = model.UnitName; + newModel.ProjectName = model.ProjectName; + newModel.ApplyType = model.ApplyType; + newModel.ApplyUserId = model.ApplyUserId; + newModel.ApplyUserName = model.ApplyUserName; + newModel.ApplyDescription = model.ApplyDescription; + newModel.ApplyDate = model.ApplyDate; + newModel.ApproverUserId = model.ApproverUserId; + newModel.ApproverUserName = model.ApproverUserName; + //newModel.ApprovalDescription = model.ApprovalDescription; + //newModel.ApprovalDate = model.ApprovalDate; + newModel.State = model.State; + + db.DataGovernance_PreProjectApply.InsertOnSubmit(newModel); + db.SubmitChanges(); + } + + /// + /// 修改项目申请预立项 + /// + /// + public static void UpdatePreProjectApply(Model.DataGovernance_PreProjectApply model) + { + using (var db = new Model.SUBQHSEDB(Funs.ConnString)) + { + Model.DataGovernance_PreProjectApply newModel = db.DataGovernance_PreProjectApply.First(e => e.Id == model.Id); + newModel.UnitId = model.UnitId; + newModel.UnitName = model.UnitName; + newModel.ProjectName = model.ProjectName; + newModel.ApplyType = model.ApplyType; + newModel.ApplyUserId = model.ApplyUserId; + newModel.ApplyUserName = model.ApplyUserName; + newModel.ApplyDescription = model.ApplyDescription; + //newModel.ApplyDate = model.ApplyDate; + newModel.ApproverUserId = model.ApproverUserId; + newModel.ApproverUserName = model.ApproverUserName; + //newModel.ApprovalDescription = model.ApprovalDescription; + //newModel.ApprovalDate = model.ApprovalDate; + newModel.State = model.State; + + db.SubmitChanges(); + } + } + + /// + /// 审核 + /// + /// + public static void ApprovalPreProjectApply(Model.DataGovernance_PreProjectApply model) + { + using (var db = new Model.SUBQHSEDB(Funs.ConnString)) + { + Model.DataGovernance_PreProjectApply newModel = db.DataGovernance_PreProjectApply.First(e => e.Id == model.Id); + //newModel.UnitId = model.UnitId; + //newModel.UnitName = model.UnitName; + //newModel.ProjectName = model.ProjectName; + //newModel.ApplyType = model.ApplyType; + //newModel.ApplyUserId = model.ApplyUserId; + //newModel.ApplyUserName = model.ApplyUserName; + //newModel.ApplyDescription = model.ApplyDescription; + //newModel.ApplyDate = model.ApplyDate; + newModel.ApproverUserId = model.ApproverUserId; + newModel.ApproverUserName = model.ApproverUserName; + newModel.ApprovalDescription = model.ApprovalDescription; + newModel.ApprovalDate = model.ApprovalDate; + newModel.State = model.State; + + db.SubmitChanges(); + } + } + } +} \ No newline at end of file diff --git a/SUBQHSE/BLL/ProjectData/ProjectMasterDataAnalysisService.cs b/SUBQHSE/BLL/ProjectData/ProjectMasterDataAnalysisService.cs index ab587dd..0f6e130 100644 --- a/SUBQHSE/BLL/ProjectData/ProjectMasterDataAnalysisService.cs +++ b/SUBQHSE/BLL/ProjectData/ProjectMasterDataAnalysisService.cs @@ -54,11 +54,13 @@ namespace BLL Id = model.Id, CollCropCode = model.CollCropCode, UnitId = model.UnitId, + Total = model.Total, YiShangXian = model.YiShangXian, + WeiShangXian = model.WeiShangXian, + ShenQingGuanBi = model.ShenQingGuanBi, OnlineRate = model.OnlineRate, ReportDate = model.ReportDate, DataDate = model.DataDate, - Total = model.Total, MasterTotal = model.MasterTotal, QHSETotal = model.QHSETotal, ZhengChang = model.ZhengChang, @@ -66,9 +68,9 @@ namespace BLL BuYong = model.BuYong, BuYongYiWanGong = model.BuYongYiWanGong, BuYongTingHuanJian = model.BuYongTingHuanJian, + BuYongBuShiYong = model.BuYongBuShiYong, BuYongTJShouXian = model.BuYongTJShouXian, YuLiXiang = model.YuLiXiang, - //ZiJian = model.ZiJian, CreateUser = model.CreateUser, ThisMonActiveUserNum = model.ThisMonActiveUserNum, DailyAvg = model.DailyAvg, @@ -93,9 +95,11 @@ namespace BLL //newModel.UnitId = model.UnitId; //newModel.ReportDate = model.ReportDate; //newModel.DataDate = model.DataDate; - newModel.YiShangXian = model.YiShangXian; - newModel.OnlineRate = model.OnlineRate; newModel.Total = model.Total; + newModel.YiShangXian = model.YiShangXian; + newModel.WeiShangXian = model.WeiShangXian; + newModel.ShenQingGuanBi = model.ShenQingGuanBi; + newModel.OnlineRate = model.OnlineRate; newModel.MasterTotal = model.MasterTotal; newModel.QHSETotal = model.QHSETotal; newModel.ZhengChang = model.ZhengChang; @@ -104,8 +108,8 @@ namespace BLL newModel.BuYongYiWanGong = model.BuYongYiWanGong; newModel.BuYongTingHuanJian = model.BuYongTingHuanJian; newModel.BuYongTJShouXian = model.BuYongTJShouXian; + newModel.BuYongBuShiYong = model.BuYongBuShiYong; newModel.YuLiXiang = model.YuLiXiang; - //newModel.ZiJian = model.ZiJian; newModel.ThisMonActiveUserNum = model.ThisMonActiveUserNum; newModel.DailyAvg = model.DailyAvg; newModel.TianBao = model.TianBao; @@ -177,7 +181,7 @@ namespace BLL 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 == ""))) + where pro == null && (use == null || (use != null && use.ReasonType == null)) select x).Count(); //3、申请不用 var buYongList = (from x in masterProDatas @@ -185,24 +189,31 @@ namespace BLL 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.Is_use == false && use.Reason != null && use.Reason != "" + where pro == null && use != null && use.Is_use == false && use.ReasonType != null select new { reason = use.Reason, reasonType = use.ReasonType }).ToList(); //申请不用总数 int buYong = buYongList.Count(); //申请不用——已完工 - int buYongYiWanGong = buYongList.Where(x => x.reasonType == "已完工").Count(); + int buYongYiWanGong = buYongList.Where(x => x.reasonType == "已完工/撤场").Count(); //申请不用——停缓建 int buYongTingHuanJian = buYongList.Where(x => x.reasonType == "停缓建").Count(); + //申请不用——不适用 + int buYongBuShiYong = buYongList.Where(x => x.reasonType == "不适用").Count(); //申请不用——条件受限(其他) - int buYongTJShouXian = buYong - buYongYiWanGong - buYongTingHuanJian; + int buYongTJShouXian = buYongList.Where(x => x.reasonType == "条件受限").Count(); + //int buYongTJShouXian = buYong - buYongYiWanGong - buYongTingHuanJian - buYongBuShiYong; //4、预立项 int yuLiXiang = (from x in projects where x.MasterSysId == null select x).Count(); - //应使用项目数=主数据项目+预立项-已完工-停缓建 - int beUsedProNum = masterTotal + yuLiXiang - buYongYiWanGong - buYongTingHuanJian; - //已上线项目=已关联+预立项; + //应使用项目数:主数据项目+预立项-已完工-不适用 + int beUsedProNum = masterTotal + yuLiXiang - buYongYiWanGong - buYongBuShiYong; + //已上线项目:已关联+预立项; int yiShangXian = zhengChang + yuLiXiang; + //未上线总数:待上线+停缓建+条件受限; + int weiShangXian = daiJian + buYongTingHuanJian + buYongTJShouXian; + //申请关闭总数:已完工/撤场+不适用; + int shenQingGuanBi = buYongYiWanGong + buYongBuShiYong; //上线率=100*已上线/应使用项目数 var onlineRate = (decimal)Math.Round((100.0 * yiShangXian / beUsedProNum), 2); onlineRate = onlineRate > 100 ? 100 : onlineRate; @@ -238,7 +249,9 @@ namespace BLL UnitId = thisUnit.UnitId, ReportDate = now.Date, DataDate = now, - YiShangXian= yiShangXian, + YiShangXian = yiShangXian, + WeiShangXian = weiShangXian, + ShenQingGuanBi = shenQingGuanBi, OnlineRate = onlineRate, Total = beUsedProNum, MasterTotal = masterTotal, @@ -248,6 +261,7 @@ namespace BLL BuYong = buYong, BuYongYiWanGong = buYongYiWanGong, BuYongTingHuanJian = buYongTingHuanJian, + BuYongBuShiYong = buYongBuShiYong, BuYongTJShouXian = buYongTJShouXian, YuLiXiang = yuLiXiang, CreateUser = userName, diff --git a/SUBQHSE/FineUIPro.Web/FineUIPro.Web.csproj b/SUBQHSE/FineUIPro.Web/FineUIPro.Web.csproj index 4b300fc..c1f0799 100644 --- a/SUBQHSE/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SUBQHSE/FineUIPro.Web/FineUIPro.Web.csproj @@ -1170,6 +1170,8 @@ + + @@ -12685,7 +12687,9 @@ MasterProjectDataAnalysis.aspx - + + ASPXCodeBehind + MasterProjectDataUsage.aspx @@ -12694,6 +12698,10 @@ MasterProjectDataUsage.aspx + + + + ProjectDevices.aspx ASPXCodeBehind diff --git a/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectData.aspx b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectData.aspx index e6db891..50942a2 100644 --- a/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectData.aspx +++ b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectData.aspx @@ -83,6 +83,13 @@ + + + + + + @@ -162,6 +169,9 @@ --%> + + diff --git a/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectData.aspx.cs b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectData.aspx.cs index 7d5bd85..1f1dff9 100644 --- a/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectData.aspx.cs +++ b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectData.aspx.cs @@ -88,6 +88,13 @@ namespace FineUIPro.Web.ProjectData Reason = use != null ? use.Reason : "", //Situation = use != null ? use.Situation : "", //Remark = use != null ? use.Remark : "", + HandleMan = use != null ? use.HandleMan : "", + //HandleManName = use != null ? use.HandleManName : "", + //HandleState = use != null ? use.HandleState != null ? int.Parse(use.HandleState) : -1 : -1, + //0:不通过、1:通过,-1:未审核 + HandleState = use != null && use.HandleMan != null ? use.HandleState != null ? int.Parse(use.HandleState) : -1 : -2, + //HandleStateStr = use != null ? use.HandleMan != null ? $"{use.HandleManName}[{(int.Parse(use.HandleState) == 1 ? "通过" : int.Parse(use.HandleState) == 0 ? "不通过" : "未审核")}]{()}" : "" : "", + HandleStr = ConvertHandleStr(use), }).ToList(); string startDate = this.txtStartTime.Text.Trim(); @@ -134,6 +141,9 @@ namespace FineUIPro.Web.ProjectData Reason = "", //Situation = use != null ? use.Situation : "", //Remark = use != null ? use.Remark : "", + HandleMan = "", + HandleState = -2, + HandleStr = "" }); } @@ -141,6 +151,23 @@ namespace FineUIPro.Web.ProjectData string proCode = this.txtProCode.Text.Trim(); string projectName = this.txtProjectName.Text.Trim(); string projectCode = this.txtProjectCode.Text.Trim(); + + //0:不通过、1:通过,-1:未审核 + int auditWait = int.Parse(this.rblAuditWait.SelectedValue); + if (auditWait == 1) + {//已审核 + list = list.Where(x => x.HandleState == 1 || x.HandleState == 0).ToList(); + } + else if (auditWait == 2) + {//待审核 + list = list.Where(x => x.HandleState == -1 && !string.IsNullOrWhiteSpace(x.HandleMan)).ToList(); + } + else if (auditWait == 3) + {//待本人审核 + list = list.Where(x => x.HandleState == -1 && !string.IsNullOrWhiteSpace(x.HandleMan) && x.HandleMan == this.CurrUser.UserId).ToList(); + } + + int relate = int.Parse(this.rblIsRelate.SelectedValue); if (!string.IsNullOrEmpty(proName)) @@ -215,6 +242,30 @@ namespace FineUIPro.Web.ProjectData Grid1.SummaryData = summary; } + /// + /// 审核信息 + /// + /// + /// + protected string ConvertHandleStr(Project_MasterDataUsage use) + { + string result = string.Empty; + if (use != null && !string.IsNullOrWhiteSpace(use.HandleManName)) + { + //result = $"{use.HandleManName};{(int.Parse(use.HandleState) == 1 ? "通过" : int.Parse(use.HandleState) == 0 ? "不通过" : "未审核")};{(use.HandleState != null ? ((DateTime)use.HandleDate).ToString("yyyy-MM-dd HH:mm") : "")}"; + if (use.HandleState != null) + { + result = $"{use.HandleManName};{(int.Parse(use.HandleState) == 1 ? "通过" : int.Parse(use.HandleState) == 0 ? "不通过" : "未审核")};{(use.HandleState != null ? ((DateTime)use.HandleDate).ToString("yyyy-MM-dd HH:mm") : "")}"; + } + else + { + result = $"{use.HandleManName};未审核"; + } + } + return result; + } + + /// /// 合同额(亿) /// @@ -286,7 +337,7 @@ namespace FineUIPro.Web.ProjectData string startDate = obj[13].ToString().Trim(); string lblState = (Grid1.SelectedRow.FindControl("lblState") as AspNet.Label).Text.Trim(); - if (!string.IsNullOrWhiteSpace(pro_id)) + if (!string.IsNullOrWhiteSpace(pro_id) && string.IsNullOrWhiteSpace(projectId)) { var masterUsage = Funs.DB.Project_MasterDataUsage.Where(x => x.Pro_id == pro_id).FirstOrDefault(); if (masterUsage != null) @@ -425,7 +476,7 @@ namespace FineUIPro.Web.ProjectData 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) + (x.LicensesNum ?? 0) + DataMetricsSum = (x.JoinConstructionPersonNum ?? 0) + (x.GeneralClosedNum ?? 0) + (x.GeneralNotClosedNum ?? 0) + (x.SafeWorkingHour ?? 0) + (x.LicensesNum ?? 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) diff --git a/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectData.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectData.aspx.designer.cs index acdb82d..4996def 100644 --- a/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectData.aspx.designer.cs +++ b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectData.aspx.designer.cs @@ -149,6 +149,15 @@ namespace FineUIPro.Web.ProjectData /// protected global::FineUIPro.TextBox txtProjectName; + /// + /// rblAuditWait 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rblAuditWait; + /// /// btnOut 控件。 /// diff --git a/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataAnalysis.aspx b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataAnalysis.aspx index 423b562..9ca17c0 100644 --- a/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataAnalysis.aspx +++ b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataAnalysis.aspx @@ -32,79 +32,13 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + EnableTextSelection="True" AllowColumnLocking="true"> @@ -138,14 +72,13 @@ - + + FieldType="String" HeaderText="分类" HeaderTextAlign="Center" TextAlign="Center" Locked="true"> @@ -196,13 +129,84 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + EnableTextSelection="True" AllowColumnLocking="true"> @@ -226,20 +230,19 @@ - + + FieldType="String" HeaderText="分类" HeaderTextAlign="Center" TextAlign="Center" Locked="true"> - + + FieldType="String" HeaderText="项目编号" HeaderTextAlign="Center" TextAlign="Left" Locked="true"> @@ -275,7 +278,7 @@ EnableCollapse="true" runat="server" BoxFlex="1" EnableColumnLines="true" EnableSummary="false" SummaryPosition="Bottom" DataKeyNames="Id" DataIDField="Id" AllowSorting="true" SortField="ReportDate DESC,DataDate" SortDirection="DESC" OnSort="Grid9_Sort" AllowPaging="false" IsDatabasePaging="false" PageSize="1000000" OnPageIndexChange="Grid9_PageIndexChange" - EnableTextSelection="True"> + EnableTextSelection="True" AllowColumnLocking="true"> @@ -294,62 +297,64 @@ - + - + - + + + + + - - - <%-- - - - --%> - - - - - - - + + <%-- + --%> + + + + + + FieldType="String" HeaderText="待上线" HeaderTextAlign="Center" TextAlign="Center"> - + --%> + + + - + - - + - - - + @@ -359,7 +364,7 @@ - + @@ -369,7 +374,7 @@ - diff --git a/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataAnalysis.aspx.cs b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataAnalysis.aspx.cs index 757d477..3d65648 100644 --- a/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataAnalysis.aspx.cs +++ b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataAnalysis.aspx.cs @@ -6,7 +6,6 @@ using System.Collections.Generic; using System.Data; using System.Linq; using System.Text; -using System.Web.UI.DataVisualization.Charting; using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.ProjectData @@ -50,17 +49,17 @@ namespace FineUIPro.Web.ProjectData { if (TabStrip1.ActiveTabIndex == 0) { - this.Panel1.Title = "未使用项目"; - this.BindGrid2(); + this.Panel1.Title = "已上线项目"; + this.BindGrid(); } else if (TabStrip1.ActiveTabIndex == 1) { - this.Panel1.Title = "已使用项目"; - this.BindGrid(); + this.Panel1.Title = "未上线项目"; + this.BindGrid2(); } else if (TabStrip1.ActiveTabIndex == 2) { - this.Panel1.Title = "申请不用项目"; + this.Panel1.Title = "申请关闭项目"; this.BindGrid3(); } else if (TabStrip1.ActiveTabIndex == 3) @@ -102,132 +101,7 @@ namespace FineUIPro.Web.ProjectData return result; } - #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_Classify = "待建", - 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_Classify", totalNum); - 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 已上线项目——已关联和待关联(预立项)项目 #region 绑定数据 @@ -278,7 +152,7 @@ namespace FineUIPro.Web.ProjectData { Pid = x.ProjectId, ProjectId = x.ProjectId, - Pro_Classify = "预立项", + Pro_Classify = "待关联", ProjectName = x.ProjectName, ProjectCode = x.ProjectCode, StartDate = x.StartDate, @@ -327,7 +201,7 @@ namespace FineUIPro.Web.ProjectData //} int yiGuanLianNum = list.Where(x => x.Pro_Classify == "已关联").Count(); - int yuLiXiangNum = list.Where(x => x.Pro_Classify == "预立项").Count(); + int yuLiXiangNum = list.Where(x => x.Pro_Classify == "待关联").Count(); DataTable tb = Funs.LINQToDataTable(list); Grid1.RecordCount = tb.Rows.Count; @@ -339,7 +213,7 @@ namespace FineUIPro.Web.ProjectData JObject summary = new JObject(); summary.Add("tfNumber", "合计"); summary.Add("Pro_Classify", totalNum); - summary.Add("Pro_name", $"已关联:{yiGuanLianNum};预立项:{yuLiXiangNum}"); + summary.Add("Pro_name", $"已关联:{yiGuanLianNum};待关联:{yuLiXiangNum}"); Grid1.SummaryData = summary; } @@ -395,7 +269,7 @@ namespace FineUIPro.Web.ProjectData { Response.ClearContent(); string filename = Funs.GetNewFileName(); - Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("集团主数据在建项目数据分析(已使用项目)" + filename, System.Text.Encoding.UTF8) + ".xls"); + 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; @@ -408,7 +282,138 @@ namespace FineUIPro.Web.ProjectData #endregion - #region 申请不用数据 + + #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.ReasonType == null || use.ReasonType == "停缓建" || use.ReasonType == "条件受限"))) + 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_Classify = (use == null || (use != null && (use.ReasonType == null))) ? "待上线" : use.ReasonType, + 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.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(); + int daiShangXianNum = list.Where(x => x.Pro_Classify == "待上线").Count(); + int tingHuanJianNum = list.Where(x => x.Pro_Classify == "停缓建").Count(); + int tiaoJianShouXianNum = list.Where(x => x.Pro_Classify == "条件受限").Count(); + JObject summary = new JObject(); + summary.Add("tfPageIndex", "合计"); + summary.Add("Pro_Classify", totalNum); + summary.Add("Pro_name", $"待上线:{daiShangXianNum};停缓建:{tingHuanJianNum};条件受限:{tiaoJianShouXianNum}"); + + 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 绑定数据 @@ -424,14 +429,15 @@ namespace FineUIPro.Web.ProjectData 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.Is_use == false && use.Reason != null && use.Reason != "" + where pro == null && use != null && use.Is_use == false && use.ReasonType != null && use.ReasonType != "停缓建" && use.ReasonType != "条件受限" 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_Classify = use != null ? (use.ReasonType == "已完工" ? "已完工" : use.ReasonType == "停缓建" ? "停缓建" : "条件受限") : "", + //Pro_Classify = use != null ? (use.ReasonType == "已完工/撤场" ? "已完工/撤场" : use.ReasonType == "停缓建" ? "停缓建" : use.ReasonType == "不适用" ? "不适用" : "条件受限") : "", + Pro_Classify = use != null ? use.ReasonType : "", Pro_name = x.Pro_name, Pro_code = x.Pro_code, Start_date = x.Start_date, @@ -469,9 +475,6 @@ namespace FineUIPro.Web.ProjectData list = list.Where(x => x.Pro_code.Contains(proCode)).ToList(); } - int yiWanGongNum = list.Where(x => x.Pro_Classify == "已完工").Count(); - int tingHuanJianNum = list.Where(x => x.Pro_Classify == "停缓建").Count(); - int tiaoJianShouXianNum = list.Where(x => x.Pro_Classify == "条件受限").Count(); DataTable tb = Funs.LINQToDataTable(list); Grid3.RecordCount = tb.Rows.Count; @@ -480,10 +483,13 @@ namespace FineUIPro.Web.ProjectData Grid3.DataBind(); int totalNum = list.Count(); + int yiWanGongNum = list.Where(x => x.Pro_Classify == "已完工/撤场").Count(); + int buShiYong = list.Where(x => x.Pro_Classify == "不适用").Count(); + JObject summary = new JObject(); summary.Add("tfPageNo", "合计"); summary.Add("Pro_Classify", totalNum); - summary.Add("Pro_name", $"已完工:{yiWanGongNum};停缓建:{tingHuanJianNum};条件受限:{tiaoJianShouXianNum}"); + summary.Add("Pro_name", $"已完工/撤场:{yiWanGongNum};不适用:{buShiYong};"); Grid3.SummaryData = summary; } diff --git a/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataAnalysis.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataAnalysis.aspx.designer.cs index 31afe1d..495b5f7 100644 --- a/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataAnalysis.aspx.designer.cs +++ b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataAnalysis.aspx.designer.cs @@ -50,87 +50,6 @@ namespace FineUIPro.Web.ProjectData /// protected global::FineUIPro.TabStrip TabStrip1; - /// - /// 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; - /// /// Grid1 控件。 /// @@ -248,6 +167,87 @@ namespace FineUIPro.Web.ProjectData /// 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 控件。 /// diff --git a/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataUsage.aspx b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataUsage.aspx index fca31a4..ebaa9fd 100644 --- a/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataUsage.aspx +++ b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataUsage.aspx @@ -25,6 +25,12 @@ color: #FF7575; background-image: none; } + + .customlabel span { + margin-left: 40px; + color: red; + font-weight: bold; + } @@ -63,6 +69,7 @@ + <%-- @@ -71,17 +78,29 @@ + + + --%> + <%-- + + + + + + + + + + --%> - - - - - + + + - + @@ -161,6 +180,21 @@ + + + + + + + + + + + + + + + @@ -175,7 +209,6 @@ - diff --git a/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataUsage.aspx.cs b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataUsage.aspx.cs index edc9cb1..efca208 100644 --- a/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataUsage.aspx.cs +++ b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataUsage.aspx.cs @@ -161,6 +161,27 @@ namespace FineUIPro.Web.ProjectData #endregion + /// + /// 已完工和停缓建必选审批人 + /// + /// + /// + protected void rblReasonType_SelectedIndexChanged(object sender, EventArgs e) + { + string reasonType = this.rblReasonType.SelectedValue; + if (reasonType == "已完工/撤场" || reasonType == "停缓建") + { + this.cbNext.SelectedValue = "1"; + this.cbNext.Readonly = true; + } + else + { + this.cbNext.SelectedValue = "0"; + this.cbNext.Readonly = false; + } + cbNext_SelectedIndexChanged(sender, e); + } + /// /// 是否使用触发事件 /// diff --git a/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataUsage.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataUsage.aspx.designer.cs index 2017d64..b511a80 100644 --- a/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataUsage.aspx.designer.cs +++ b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataUsage.aspx.designer.cs @@ -203,6 +203,33 @@ namespace FineUIPro.Web.ProjectData /// protected global::FineUIPro.Label Label1; + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label2; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label3; + + /// + /// Label4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label4; + /// /// Toolbar1 控件。 /// diff --git a/SUBQHSE/FineUIPro.Web/ProjectData/PreProjectApply.aspx b/SUBQHSE/FineUIPro.Web/ProjectData/PreProjectApply.aspx new file mode 100644 index 0000000..e2afe21 --- /dev/null +++ b/SUBQHSE/FineUIPro.Web/ProjectData/PreProjectApply.aspx @@ -0,0 +1,126 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PreProjectApply.aspx.cs" Inherits="FineUIPro.Web.ProjectData.PreProjectApply" %> + + + + + + + + +
+ + + + + + + + + + + + + + + + <%-- + + + + + + + + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SUBQHSE/FineUIPro.Web/ProjectData/PreProjectApply.aspx.cs b/SUBQHSE/FineUIPro.Web/ProjectData/PreProjectApply.aspx.cs new file mode 100644 index 0000000..af91d10 --- /dev/null +++ b/SUBQHSE/FineUIPro.Web/ProjectData/PreProjectApply.aspx.cs @@ -0,0 +1,319 @@ +using BLL; +using FineUIPro.Web.HSSE.License; +using Model; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.ProjectData +{ + public partial class PreProjectApply : PageBase + { + /// + /// 主键 + /// + public string Id + { + get + { + return (string)ViewState["Id"]; + } + set + { + ViewState["Id"] = value; + } + } + /// + /// 项目名称 + /// + public string ProjectName + { + get + { + return (string)ViewState["ProjectName"]; + } + set + { + ViewState["ProjectName"] = value; + } + } + + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); + UnitService.InitBranchUnitDropDownList(this.drpUnit, true, true); + BindGrid(); + var now = DateTime.Now; + this.Id = Request.QueryString["Id"]; + this.ProjectName = Request.QueryString["ProjectName"]; + if (!string.IsNullOrEmpty(this.Id)) + { + var model = BLL.PreProjectApplyService.GetPreProjectApplyById(this.Id); + if (model != null) + { + //申请信息 + this.drpUnit.SelectedValue = model.UnitId; + this.txtProjectName.Text = model.ProjectName.ToString(); + //this.rblApplyType.SelectedValue = model.ApplyType.ToString(); + this.txtApplyDescription.Text = model.ApplyDescription.ToString(); + this.txtApplyUserName.Text = model.ApplyUserName.ToString(); + this.txtApplyDate.Text = string.Format("{0:yyyy-MM-dd}", model.ApplyDate); + + //审批信息 + this.drpApprover.Value = model.ApproverUserId; + this.drpApprover.Text = model.ApproverUserName; + if (model.ApprovalDate != null) + { + this.txtApprovalDate.Text = string.Format("{0:yyyy-MM-dd}", model.ApprovalDate); + } + if (model.State == 0) + {//待审核 + this.drpUnit.Readonly = true; + this.txtProjectName.Readonly = true; + this.txtApplyDescription.Readonly = true; + this.txtApplyDate.Readonly = true; + this.drpApprover.Readonly = true; + this.txtApplyDate.Readonly = true; + bool isAuditer = model.ApproverUserId == this.CurrUser.UserId || this.CurrUser.UserId == Const.hfnbdId || this.CurrUser.UserId == Const.sysglyId; + if (isAuditer) + { + this.btnApproval.Hidden = false; + this.btnSave.Hidden = true; + this.Audit.Hidden = false; + this.AuditDesc.Hidden = false; + this.rblState.SelectedValue = "1"; + this.txtApprovalDate.Text = string.Format("{0:yyyy-MM-dd}", now); + } + else + { + this.btnApproval.Hidden = true; + this.btnSave.Hidden = false; + this.Audit.Hidden = true; + this.AuditDesc.Hidden = true; + this.Toolbar1.Hidden = true; + } + } + else + { //已审核 + this.Audit.Hidden = false; + this.AuditDesc.Hidden = false; + this.Toolbar1.Hidden = true; + this.rblState.SelectedValue = model.State.ToString(); + this.txtApprovalDescription.Text = model.ApprovalDescription.ToString(); + } + + //if (!string.IsNullOrWhiteSpace(model.ApproverUserId)) + //{ + // //this.cbNext.SelectedValue = "1"; + + // bool isAuditer = model.ApproverUserId == this.CurrUser.UserId || this.CurrUser.UserId == Const.hfnbdId || this.CurrUser.UserId == Const.sysglyId; + // if (model.State == 0) + // { + // if (isAuditer) + // { + // this.Audit.Hidden = false; + // this.rblState.SelectedValue = "1"; + // } + // else + // { + // this.Toolbar1.Hidden = true; + // } + // } + // else + // { + // this.Toolbar1.Hidden = true; + // } + //} + + } + } + else + { + this.btnApproval.Hidden = true; + this.txtApprovalDate.Hidden = true; + if (!string.IsNullOrWhiteSpace(ProjectName.Trim())) + { + this.txtProjectName.Text = ProjectName.Trim(); + } + this.txtApplyUserName.Text = this.CurrUser.UserName; + this.txtApplyDate.Text = string.Format("{0:yyyy-MM-dd}", now); + //this.txtApprovalDate.Text = string.Format("{0:yyyy-MM-dd}", now); + } + } + } + + + #region 人员下拉框绑定数据 + /// + /// 绑定数据 + /// + private void BindGrid() + { + string unitId = CommonService.GetThisUnitId(); + string strSql = @"SELECT UserId,UserName,UserCode,role.RoleName" + + @" FROM Sys_User AS users LEFT JOIN Sys_Role AS role ON users.RoleId= role.RoleId" + + @" WHERE users.IsPost=1 AND role.IsAuditFlow=1 AND users.IsOffice =1 AND UnitId ='" + unitId + "'"; + List listStr = new List(); + if (!string.IsNullOrEmpty(this.txtUserName.Text.Trim())) + { + strSql += " AND (UserName LIKE @Name OR UserCode LIKE @Name OR role.RoleName LIKE @Name)"; + listStr.Add(new SqlParameter("@Name", "%" + this.txtUserName.Text.Trim() + "%")); + } + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + + #region 查询 + /// + /// 下拉框查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.drpApprover.Values = null; + this.BindGrid(); + } + #endregion + + #endregion + + + /// + /// 保存数据 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + string unitId = this.drpUnit.SelectedValue; + string unitName = this.drpUnit.SelectedText; + string projectName = this.txtProjectName.Text.Trim(); + //string applyType = this.rblApplyType.SelectedValue; + string applyType = "预立项"; + string applyDescription = this.txtApplyDescription.Text.Trim(); + string approverUserId = this.drpApprover.Value; + string approverUserName = this.drpApprover.Text; + if (string.IsNullOrWhiteSpace(unitId) || unitId == BLL.Const._Null) + { + Alert.ShowInTop("请选择所属单位!", MessageBoxIcon.Warning); + return; + } + if (string.IsNullOrWhiteSpace(projectName)) + { + Alert.ShowInTop("请输入项目名称!", MessageBoxIcon.Warning); + return; + } + if (string.IsNullOrWhiteSpace(applyDescription)) + { + Alert.ShowInTop("请输入申请说明!", MessageBoxIcon.Warning); + return; + } + if (string.IsNullOrWhiteSpace(approverUserId)) + { + Alert.ShowInTop("请选择审批人!", MessageBoxIcon.Warning); + return; + } + var project = ProjectService.GetProjectByProjectName(projectName); + if (project != null) + { + Alert.ShowInTop($"系统中已存在同名项目,{project.ProjectName}({project.ProjectCode}),无需申请!", MessageBoxIcon.Warning); + return; + } + var applyPro = PreProjectApplyService.GetPreProjectApplyByProjectName(projectName); + if (applyPro != null) + { + string auditStr = applyPro.State == 1 ? $"审核已通过,可以直接新增同名项目" : applyPro.State == 2 ? $"不通过[{applyPro.ApprovalDescription}]" : "待审核"; + Alert.ShowInTop($"{projectName},{applyPro.ApplyUserName}于{applyPro.ApplyDate.ToString("yyyy-MM-dd")}已申请过。{auditStr};审核人:{applyPro.ApproverUserName}!", MessageBoxIcon.Warning); + return; + } + + DataGovernance_PreProjectApply apply = new DataGovernance_PreProjectApply(); + apply.Id = SQLHelper.GetNewID(typeof(Model.DataGovernance_PreProjectApply)); + apply.UnitId = unitId; + apply.UnitName = unitName; + apply.ProjectName = projectName; + apply.ApplyType = applyType; + apply.ApplyDescription = applyDescription; + apply.ApplyUserId = this.CurrUser.UserId; + apply.ApplyUserName = this.CurrUser.UserName; + apply.ApplyDate = DateTime.Now; + apply.State = 0;//申请状态(0:待审核,1:通过,2:不通过) + apply.ApproverUserId = approverUserId; + apply.ApproverUserName = approverUserName; + PreProjectApplyService.AddPreProjectApply(apply); + + ShowNotify("申请成功!", MessageBoxIcon.Success); + // 2. 关闭本窗体,然后回发父窗体 + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + + /// + /// 不通过必填审核说明 + /// + /// + /// + protected void rblState_SelectedIndexChanged(object sender, EventArgs e) + { + string state = this.rblState.SelectedValue; + if (state == "2" ) + { + this.txtApprovalDescription.Required = true; + this.txtApprovalDescription.ShowRedStar = true; + } + else + { + this.txtApprovalDescription.Required = false; + this.txtApprovalDescription.ShowRedStar = false; + } + } + + /// + /// 审批 + /// + /// + /// + protected void btnApproval_Click(object sender, EventArgs e) + { + string state = this.rblState.SelectedValue; + string approvalDescription = this.txtApprovalDescription.Text.Trim(); + if (string.IsNullOrWhiteSpace(state)) + { + Alert.ShowInTop("请选择审核结果!", MessageBoxIcon.Warning); + return; + } + if (!string.IsNullOrWhiteSpace(this.Id)) + { + DataGovernance_PreProjectApply apply = new DataGovernance_PreProjectApply(); + apply.Id = this.Id; + apply.State = int.Parse(state); + apply.ApprovalDescription = approvalDescription; + apply.ApproverUserId = this.CurrUser.UserId; + apply.ApproverUserName = this.CurrUser.UserName; + apply.ApprovalDate = DateTime.Now; + PreProjectApplyService.ApprovalPreProjectApply(apply); + } + + ShowNotify("审核成功!", MessageBoxIcon.Success); + // 2. 关闭本窗体,然后回发父窗体 + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + } +} \ No newline at end of file diff --git a/SUBQHSE/FineUIPro.Web/ProjectData/PreProjectApply.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/ProjectData/PreProjectApply.aspx.designer.cs new file mode 100644 index 0000000..3bd12e0 --- /dev/null +++ b/SUBQHSE/FineUIPro.Web/ProjectData/PreProjectApply.aspx.designer.cs @@ -0,0 +1,206 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ProjectData +{ + + + public partial class PreProjectApply + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// drpUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnit; + + /// + /// txtProjectName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProjectName; + + /// + /// txtApplyDescription 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtApplyDescription; + + /// + /// txtApplyUserName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtApplyUserName; + + /// + /// txtApplyDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtApplyDate; + + /// + /// drpApprover 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownBox drpApprover; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// txtUserName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtUserName; + + /// + /// txtApprovalDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtApprovalDate; + + /// + /// Audit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow Audit; + + /// + /// rblState 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rblState; + + /// + /// AuditDesc 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow AuditDesc; + + /// + /// txtApprovalDescription 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtApprovalDescription; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnApproval 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnApproval; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + } +} diff --git a/SUBQHSE/FineUIPro.Web/ProjectData/PreProjectApplyList.aspx b/SUBQHSE/FineUIPro.Web/ProjectData/PreProjectApplyList.aspx new file mode 100644 index 0000000..0a06ecb --- /dev/null +++ b/SUBQHSE/FineUIPro.Web/ProjectData/PreProjectApplyList.aspx @@ -0,0 +1,129 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PreProjectApplyList.aspx.cs" Inherits="FineUIPro.Web.ProjectData.PreProjectApplyList" %> + + + + + + 项目申请 + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + + + + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SUBQHSE/FineUIPro.Web/ProjectData/PreProjectApplyList.aspx.cs b/SUBQHSE/FineUIPro.Web/ProjectData/PreProjectApplyList.aspx.cs new file mode 100644 index 0000000..494612d --- /dev/null +++ b/SUBQHSE/FineUIPro.Web/ProjectData/PreProjectApplyList.aspx.cs @@ -0,0 +1,287 @@ +using Aspose.Words.Lists; +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.ProjectData +{ + public partial class PreProjectApplyList : PageBase + { + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + ////权限按钮方法 + //this.GetButtonPower(); + + this.btnApply.Hidden = false; + this.btnMenuEdit.Hidden = false; + this.btnMenuDelete.Hidden = false; + + Funs.DropDownPageSize(this.ddlPageSize); + // 绑定表格 + this.BindGrid(); + } + } + + /// + /// 项目预立项申请 + /// + /// + /// + protected void btnApply_Click(object sender, EventArgs e) + { + string projectName = this.txtProjectName.Text.Trim(); + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PreProjectApply.aspx?ProjectName={0}", projectName, "项目预立项申请"))); + } + + #endregion + + #region 绑定数据 + + /// + /// 查询 + /// + /// + /// + protected void btnSearch_Click(object sender, EventArgs e) + { + BindGrid(); + } + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = @"SELECT (CASE State WHEN 1 THEN '通过' WHEN 2 THEN '不通过' ELSE '待审核' END) AS StateStr,* FROM DataGovernance_PreProjectApply WHERE 1=1 "; + List listStr = new List(); + string unitName = this.txtUnitName.Text.Trim(); + string projectName = this.txtProjectName.Text.Trim(); + if (!string.IsNullOrEmpty(unitName)) + { + strSql += " AND UnitName LIKE @UnitName"; + listStr.Add(new SqlParameter("@UnitName", "%" + unitName + "%")); + } + if (!string.IsNullOrEmpty(projectName)) + { + strSql += " AND ProjectName LIKE @ProjectName"; + listStr.Add(new SqlParameter("@ProjectName", "%" + projectName + "%")); + } + int state = int.Parse(this.rblState.SelectedValue); + if (state >= 0) + { + strSql += " AND State = @State"; + listStr.Add(new SqlParameter("@State", state)); + } + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + Grid1.DataSource = this.GetPagedDataTable(Grid1, tb); + Grid1.DataBind(); + } + #endregion + + #region 操作 Events + + /// + /// 右键删除事件 + /// + /// + /// + protected void btnMenuDelete_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length > 0) + { + foreach (int rowIndex in Grid1.SelectedRowIndexArray) + { + string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + BLL.PreProjectApplyService.DeletePreProjectApply(rowID); + } + BindGrid(); + ShowNotify("操作完成!", MessageBoxIcon.Success); + } + } + + #endregion + + /// + /// + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + BindGrid(); + } + + /// + /// 双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + this.EditData(); + } + + /// + /// 右键编辑事件 + /// + /// + /// + protected void btnMenuEdit_Click(object sender, EventArgs e) + { + this.EditData(); + } + + /// + /// 编辑数据方法 + /// + private void EditData() + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + + var apply = BLL.PreProjectApplyService.GetPreProjectApplyById(Grid1.SelectedRowID); + if (apply != null) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PreProjectApply.aspx?Id={0}", apply.Id, "项目预立项申请"))); + } + } + + /// + /// 查看 + /// + /// + /// + protected void btnView_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(Grid1.SelectedRowID)) + { PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectSetMap.aspx?projectId={0}&value=0", Grid1.SelectedRowID, "查看 - "))); } + } + + #region 获取按钮权限 + ///// + ///// 获取按钮权限 + ///// + ///// + ///// + //private void GetButtonPower() + //{ + // if (Request.Params["value"] == "0") + // { + // return; + // } + // string menuId = Const.SeverProjectSetMenuId; + // if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId)) + // { + // menuId = BLL.Const.ProjectSetMenuId; + // } + // var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, menuId); + // if (buttonList.Count() > 0) + // { + // if (buttonList.Contains(BLL.Const.BtnAdd)) + // { + // this.btnApply.Hidden = false; + // } + // if (buttonList.Contains(BLL.Const.BtnModify) || buttonList.Contains(BLL.Const.BtnSave)) + // { + // this.btnMenuEdit.Hidden = false; + // } + // if (buttonList.Contains(BLL.Const.BtnDelete)) + // { + // this.btnMenuDelete.Hidden = false; + // } + // } + //} + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs 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 = 500; + this.BindGrid(); + Response.Write(GetGridTableHtml(Grid1)); + Response.End(); + } + #endregion + + protected void Grid1_RowCommand(object sender, GridCommandEventArgs e) + { + object[] keys = Grid1.DataKeys[e.RowIndex]; + string fileId = string.Empty; + if (keys == null) + { + return; + } + else + { + fileId = keys[0].ToString(); + } + if (e.CommandName == "ProjectUnit") + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectUnit.aspx?projectId={0}&type=project", fileId))); + } + else if (e.CommandName == "ProjectUser") + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectUser.aspx?projectId={0}&type=project", fileId))); + } + } + + } +} \ No newline at end of file diff --git a/SUBQHSE/FineUIPro.Web/ProjectData/PreProjectApplyList.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/ProjectData/PreProjectApplyList.aspx.designer.cs new file mode 100644 index 0000000..ac795fe --- /dev/null +++ b/SUBQHSE/FineUIPro.Web/ProjectData/PreProjectApplyList.aspx.designer.cs @@ -0,0 +1,179 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ProjectData +{ + + + public partial class PreProjectApplyList + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// txtUnitName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtUnitName; + + /// + /// txtProjectName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProjectName; + + /// + /// rblState 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rblState; + + /// + /// btnSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSearch; + + /// + /// btnApply 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnApply; + + /// + /// lblNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuEdit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuEdit; + + /// + /// btnMenuDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDelete; + } +} diff --git a/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetSave.aspx b/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetSave.aspx index 52a756a..58377fc 100644 --- a/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetSave.aspx +++ b/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetSave.aspx @@ -21,8 +21,8 @@ - + + + @@ -263,6 +265,10 @@ Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px" Height="500px"> + diff --git a/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.cs b/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.cs index 5d2f65c..0eadf65 100644 --- a/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.cs +++ b/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.cs @@ -314,12 +314,45 @@ namespace FineUIPro.Web.ProjectData string masterSysId = this.drpMasterBox1.Value; if (!string.IsNullOrWhiteSpace(masterSysId)) { + //var obj = Grid1.SelectedRow.Values; var relatePro = Funs.DB.Base_Project.FirstOrDefault(x => x.MasterSysId == masterSysId && (x.ProjectId != this.ProjectId || (this.ProjectId == null && x.ProjectId != null))); if (relatePro != null) { ShowNotify($"已存在关联此主数据的项目:({relatePro.ProjectCode}){relatePro.ProjectName}!", MessageBoxIcon.Warning); } } + else + { + string projectName = Regex.Replace(this.txtProjectName.Text, @"\s", ""); + if (!string.IsNullOrWhiteSpace(projectName)) + { + var applyPro = PreProjectApplyService.GetPreProjectApplyByProjectName(projectName); + if (applyPro != null) + { + if (applyPro.State == 1) + {//预立项审核通过 + + } + else + { + string preStr = applyPro.State == 0 ? $"{projectName}正在预立项审核中,等待{applyPro.ApproverUserName}审核!" : $"审核不通过,{applyPro.ApproverUserName}:{applyPro.ApprovalDescription}!"; + ShowNotify(preStr, MessageBoxIcon.Warning); + return; + } + } + else + { + ShowNotify($"请选择关联集团主数据项目!", MessageBoxIcon.Warning); + return; + } + } + else + { + ShowNotify($"请选择关联集团主数据项目!", MessageBoxIcon.Warning); + return; + } + } + // else // { // ShowNotify($"请选择关联集团主数据项目!", MessageBoxIcon.Warning); @@ -458,6 +491,10 @@ namespace FineUIPro.Web.ProjectData if (getProject != null) { project.FromProjectId = getProject.FromProjectId; + if (string.IsNullOrWhiteSpace(project.MasterSysId) && !string.IsNullOrWhiteSpace(getProject.MasterSysId)) + { + project.MasterSysId = getProject.MasterSysId; + } } project.ProjectId = this.ProjectId; ProjectService.UpdateProject(project); @@ -1132,6 +1169,17 @@ namespace FineUIPro.Web.ProjectData } #endregion + /// + /// 项目预立项申请 + /// + /// + /// + protected void btnApply_Click(object sender, EventArgs e) + { + string projectName = this.txtProjectName.Text.Trim(); + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PreProjectApply.aspx?ProjectName={0}", projectName, "项目预立项申请"))); + } + } } \ No newline at end of file diff --git a/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.designer.cs index be401dd..8c9a358 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; + /// + /// btnApply control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Button btnApply; + /// /// rbIsCNCECShow control. /// @@ -508,5 +517,14 @@ namespace FineUIPro.Web.ProjectData /// To modify move field declaration from designer file to code-behind file. /// protected global::FineUIPro.Window WindowAtt; + + /// + /// Window1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Window Window1; } } diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReportSaveZJ.aspx.cs b/SUBQHSE/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReportSaveZJ.aspx.cs index 25fc3c0..ef2d0dd 100644 --- a/SUBQHSE/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReportSaveZJ.aspx.cs +++ b/SUBQHSE/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReportSaveZJ.aspx.cs @@ -53,7 +53,7 @@ namespace FineUIPro.Web.ZHGL.Information { if (!IsPostBack) { - IsThisUnit = this.CurrUser.Base_Unit.IsThisUnit != null ? (bool)this.CurrUser.Base_Unit.IsThisUnit : false; + IsThisUnit = this.CurrUser.Base_Unit != null ? (bool)this.CurrUser.Base_Unit.IsThisUnit : false; //是否是分公司 IsBranch = this.CurrUser.Base_Unit != null ? (bool)this.CurrUser.Base_Unit.IsBranch : false; 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 4780bdf..a7e49cb 100644 --- a/SUBQHSE/Model/APIItem/CNCEC/Ads_pms_pro_info_build.cs +++ b/SUBQHSE/Model/APIItem/CNCEC/Ads_pms_pro_info_build.cs @@ -147,6 +147,23 @@ namespace Model /// public string Con_mode_desc { get; set; } + /// + /// 审核人Id + /// + public string HandleMan { get; set; } + /// + /// 审核人 + /// + public string HandleManName { get; set; } + /// + /// 审核状态 + /// + public int? HandleState { get; set; } + /// + /// 审核信息 + /// + public string HandleStr { get; set; } + #endregion #region QHSE项目信息 diff --git a/SUBQHSE/Model/Model.cs b/SUBQHSE/Model/Model.cs index 4c0053a..3c73b9d 100644 --- a/SUBQHSE/Model/Model.cs +++ b/SUBQHSE/Model/Model.cs @@ -833,6 +833,9 @@ namespace Model partial void InsertDataGovernance_MetricData(DataGovernance_MetricData instance); partial void UpdateDataGovernance_MetricData(DataGovernance_MetricData instance); partial void DeleteDataGovernance_MetricData(DataGovernance_MetricData instance); + partial void InsertDataGovernance_PreProjectApply(DataGovernance_PreProjectApply instance); + partial void UpdateDataGovernance_PreProjectApply(DataGovernance_PreProjectApply instance); + partial void DeleteDataGovernance_PreProjectApply(DataGovernance_PreProjectApply instance); partial void InsertDataIdMove(DataIdMove instance); partial void UpdateDataIdMove(DataIdMove instance); partial void DeleteDataIdMove(DataIdMove instance); @@ -5199,6 +5202,14 @@ namespace Model } } + public System.Data.Linq.Table DataGovernance_PreProjectApply + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table DataIdMove { get @@ -141471,6 +141482,380 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.DataGovernance_PreProjectApply")] + public partial class DataGovernance_PreProjectApply : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _Id; + + private string _UnitId; + + private string _UnitName; + + private string _ProjectName; + + private string _ApplyType; + + private string _ApplyUserId; + + private string _ApplyUserName; + + private string _ApplyDescription; + + private System.DateTime _ApplyDate; + + private string _ApproverUserId; + + private string _ApproverUserName; + + private string _ApprovalDescription; + + private System.Nullable _ApprovalDate; + + private int _State; + + #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 OnUnitIdChanging(string value); + partial void OnUnitIdChanged(); + partial void OnUnitNameChanging(string value); + partial void OnUnitNameChanged(); + partial void OnProjectNameChanging(string value); + partial void OnProjectNameChanged(); + partial void OnApplyTypeChanging(string value); + partial void OnApplyTypeChanged(); + partial void OnApplyUserIdChanging(string value); + partial void OnApplyUserIdChanged(); + partial void OnApplyUserNameChanging(string value); + partial void OnApplyUserNameChanged(); + partial void OnApplyDescriptionChanging(string value); + partial void OnApplyDescriptionChanged(); + partial void OnApplyDateChanging(System.DateTime value); + partial void OnApplyDateChanged(); + partial void OnApproverUserIdChanging(string value); + partial void OnApproverUserIdChanged(); + partial void OnApproverUserNameChanging(string value); + partial void OnApproverUserNameChanged(); + partial void OnApprovalDescriptionChanging(string value); + partial void OnApprovalDescriptionChanged(); + partial void OnApprovalDateChanging(System.Nullable value); + partial void OnApprovalDateChanged(); + partial void OnStateChanging(int value); + partial void OnStateChanged(); + #endregion + + public DataGovernance_PreProjectApply() + { + 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="_UnitId", DbType="NVarChar(200) 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="_UnitName", DbType="NVarChar(200) NOT NULL", CanBeNull=false)] + public string UnitName + { + get + { + return this._UnitName; + } + set + { + if ((this._UnitName != value)) + { + this.OnUnitNameChanging(value); + this.SendPropertyChanging(); + this._UnitName = value; + this.SendPropertyChanged("UnitName"); + this.OnUnitNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectName", DbType="NVarChar(200) NOT NULL", CanBeNull=false)] + public string ProjectName + { + get + { + return this._ProjectName; + } + set + { + if ((this._ProjectName != value)) + { + this.OnProjectNameChanging(value); + this.SendPropertyChanging(); + this._ProjectName = value; + this.SendPropertyChanged("ProjectName"); + this.OnProjectNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApplyType", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string ApplyType + { + get + { + return this._ApplyType; + } + set + { + if ((this._ApplyType != value)) + { + this.OnApplyTypeChanging(value); + this.SendPropertyChanging(); + this._ApplyType = value; + this.SendPropertyChanged("ApplyType"); + this.OnApplyTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApplyUserId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string ApplyUserId + { + get + { + return this._ApplyUserId; + } + set + { + if ((this._ApplyUserId != value)) + { + this.OnApplyUserIdChanging(value); + this.SendPropertyChanging(); + this._ApplyUserId = value; + this.SendPropertyChanged("ApplyUserId"); + this.OnApplyUserIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApplyUserName", DbType="NVarChar(200) NOT NULL", CanBeNull=false)] + public string ApplyUserName + { + get + { + return this._ApplyUserName; + } + set + { + if ((this._ApplyUserName != value)) + { + this.OnApplyUserNameChanging(value); + this.SendPropertyChanging(); + this._ApplyUserName = value; + this.SendPropertyChanged("ApplyUserName"); + this.OnApplyUserNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApplyDescription", DbType="NVarChar(200)")] + public string ApplyDescription + { + get + { + return this._ApplyDescription; + } + set + { + if ((this._ApplyDescription != value)) + { + this.OnApplyDescriptionChanging(value); + this.SendPropertyChanging(); + this._ApplyDescription = value; + this.SendPropertyChanged("ApplyDescription"); + this.OnApplyDescriptionChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApplyDate", DbType="DateTime NOT NULL")] + public System.DateTime ApplyDate + { + get + { + return this._ApplyDate; + } + set + { + if ((this._ApplyDate != value)) + { + this.OnApplyDateChanging(value); + this.SendPropertyChanging(); + this._ApplyDate = value; + this.SendPropertyChanged("ApplyDate"); + this.OnApplyDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproverUserId", DbType="NVarChar(50)")] + public string ApproverUserId + { + get + { + return this._ApproverUserId; + } + set + { + if ((this._ApproverUserId != value)) + { + this.OnApproverUserIdChanging(value); + this.SendPropertyChanging(); + this._ApproverUserId = value; + this.SendPropertyChanged("ApproverUserId"); + this.OnApproverUserIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproverUserName", DbType="NVarChar(200)")] + public string ApproverUserName + { + get + { + return this._ApproverUserName; + } + set + { + if ((this._ApproverUserName != value)) + { + this.OnApproverUserNameChanging(value); + this.SendPropertyChanging(); + this._ApproverUserName = value; + this.SendPropertyChanged("ApproverUserName"); + this.OnApproverUserNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApprovalDescription", DbType="NVarChar(200)")] + public string ApprovalDescription + { + get + { + return this._ApprovalDescription; + } + set + { + if ((this._ApprovalDescription != value)) + { + this.OnApprovalDescriptionChanging(value); + this.SendPropertyChanging(); + this._ApprovalDescription = value; + this.SendPropertyChanged("ApprovalDescription"); + this.OnApprovalDescriptionChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApprovalDate", DbType="DateTime")] + public System.Nullable ApprovalDate + { + get + { + return this._ApprovalDate; + } + set + { + if ((this._ApprovalDate != value)) + { + this.OnApprovalDateChanging(value); + this.SendPropertyChanging(); + this._ApprovalDate = value; + this.SendPropertyChanged("ApprovalDate"); + this.OnApprovalDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_State", DbType="Int NOT NULL")] + public int State + { + get + { + return this._State; + } + set + { + if ((this._State != value)) + { + this.OnStateChanging(value); + this.SendPropertyChanging(); + this._State = value; + this.SendPropertyChanged("State"); + this.OnStateChanged(); + } + } + } + + 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.DataIdMove")] public partial class DataIdMove : INotifyPropertyChanging, INotifyPropertyChanged { @@ -328258,6 +328643,12 @@ namespace Model private System.Nullable _DailyAvg; + private System.Nullable _BuYongBuShiYong; + + private System.Nullable _WeiShangXian; + + private System.Nullable _ShenQingGuanBi; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -328304,6 +328695,12 @@ namespace Model partial void OnThisMonActiveUserNumChanged(); partial void OnDailyAvgChanging(System.Nullable value); partial void OnDailyAvgChanged(); + partial void OnBuYongBuShiYongChanging(System.Nullable value); + partial void OnBuYongBuShiYongChanged(); + partial void OnWeiShangXianChanging(System.Nullable value); + partial void OnWeiShangXianChanged(); + partial void OnShenQingGuanBiChanging(System.Nullable value); + partial void OnShenQingGuanBiChanged(); #endregion public Project_MasterDataAnalysis() @@ -328731,6 +329128,66 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BuYongBuShiYong", DbType="Int")] + public System.Nullable BuYongBuShiYong + { + get + { + return this._BuYongBuShiYong; + } + set + { + if ((this._BuYongBuShiYong != value)) + { + this.OnBuYongBuShiYongChanging(value); + this.SendPropertyChanging(); + this._BuYongBuShiYong = value; + this.SendPropertyChanged("BuYongBuShiYong"); + this.OnBuYongBuShiYongChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeiShangXian", DbType="Int")] + public System.Nullable WeiShangXian + { + get + { + return this._WeiShangXian; + } + set + { + if ((this._WeiShangXian != value)) + { + this.OnWeiShangXianChanging(value); + this.SendPropertyChanging(); + this._WeiShangXian = value; + this.SendPropertyChanged("WeiShangXian"); + this.OnWeiShangXianChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ShenQingGuanBi", DbType="Int")] + public System.Nullable ShenQingGuanBi + { + get + { + return this._ShenQingGuanBi; + } + set + { + if ((this._ShenQingGuanBi != value)) + { + this.OnShenQingGuanBiChanging(value); + this.SendPropertyChanging(); + this._ShenQingGuanBi = value; + this.SendPropertyChanged("ShenQingGuanBi"); + this.OnShenQingGuanBiChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -506696,6 +507153,12 @@ namespace Model private System.Nullable _DailyAvg; + private System.Nullable _BuYongBuShiYong; + + private System.Nullable _WeiShangXian; + + private System.Nullable _ShenQingGuanBi; + public View_Project_MasterDataAnalysis() { } @@ -507035,6 +507498,54 @@ namespace Model } } } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BuYongBuShiYong", DbType="Int")] + public System.Nullable BuYongBuShiYong + { + get + { + return this._BuYongBuShiYong; + } + set + { + if ((this._BuYongBuShiYong != value)) + { + this._BuYongBuShiYong = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeiShangXian", DbType="Int")] + public System.Nullable WeiShangXian + { + get + { + return this._WeiShangXian; + } + set + { + if ((this._WeiShangXian != value)) + { + this._WeiShangXian = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ShenQingGuanBi", DbType="Int")] + public System.Nullable ShenQingGuanBi + { + get + { + return this._ShenQingGuanBi; + } + set + { + if ((this._ShenQingGuanBi != value)) + { + this._ShenQingGuanBi = value; + } + } + } } [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_ProjectAccident_AccidentAnalysis")]