20230831 WBS

This commit is contained in:
2023-08-31 16:37:09 +08:00
parent d9f8be1463
commit ba6774dbae
44 changed files with 1349 additions and 235 deletions
@@ -0,0 +1,38 @@
alter table [dbo].[WBS_WorkPackage] add PlanCost decimal(18,2) null
GO
alter table [dbo].[WBS_WorkPackage] add JDWeights decimal(9,2) null
GO
alter table [dbo].[WBS_WorkPackage] add PreWorkCode nvarchar(50) null
GO
alter table [dbo].[WBS_UnitWork] add PlanCost decimal(18,2) null
GO
alter table [dbo].[WBS_UnitWork] add JDWeights decimal(9,2) null
GO
alter table [dbo].[WBS_ControlItemAndCycle] add RealEndDate datetime null
GO
ALTER VIEW [dbo].[View_WBS]
AS
select '1' as Id,'0' as SupId ,'JZ' as Code, '½¨Öþ¹¤³Ì' as Name,'ProjectType' as WBSType,
ProjectId from dbo.WBS_UnitWork
Union
select '2' as Id,'0' as SupId ,'AZ' as Code, '°²×°¹¤³Ì' as Name,'ProjectType' as WBSType,
ProjectId from dbo.WBS_UnitWork
Union
select UnitWorkId as Id,ProjectType as SupId ,UnitWorkCode as Code, UnitWorkCode+'-'+UnitWorkName as Name,'UnitWork' as WBSType,
ProjectId from dbo.WBS_UnitWork
Union all
select WorkPackageId as id,UnitWorkId as SupId,WorkPackageCode as Code,WorkPackageCode+'-'+PackageContent as Name,'WorkPackage' as WBSType,
ProjectId from dbo.WBS_WorkPackage w where IsApprove=1 and SuperWorkPackageId is null
Union all
select WorkPackageId as id,SuperWorkPackageId as SupId,WorkPackageCode as Code, WorkPackageCode+'-'+PackageContent as Name,'WorkPackage' as WBSType,
ProjectId from dbo.WBS_WorkPackage w where IsApprove=1 and SuperWorkPackageId is not null
GO