65 lines
2.9 KiB
Transact-SQL
65 lines
2.9 KiB
Transact-SQL
update WBS_ControlItemProject set Weights=b.Weights from WBS_ControlItemProject a, WBS_ControlItemInit b
|
|
where a.ControlItemCode=b.ControlItemCode
|
|
GO
|
|
|
|
update WBS_ControlItemAndCycle set Weights=b.Weights from WBS_ControlItemAndCycle a, WBS_ControlItemInit b
|
|
where a.InitControlItemCode=b.ControlItemCode
|
|
GO
|
|
|
|
|
|
ALTER VIEW [dbo].[View_WBS]
|
|
AS
|
|
select '1' as Id,'0' as SupId ,'JZ' as Code, '½¨Öþ¹¤³Ì' as Name,'ProjectType' as WBSType,null as PlanStartDate,null as PlanEndDate,null as RealEndDate,null as WBSCode,
|
|
ProjectId from dbo.WBS_UnitWork
|
|
Union
|
|
select '2' as Id,'0' as SupId ,'AZ' as Code, '°²×°¹¤³Ì' as Name,'ProjectType' as WBSType,null as PlanStartDate,null as PlanEndDate,null as RealEndDate,null as WBSCode,
|
|
ProjectId from dbo.WBS_UnitWork
|
|
Union
|
|
select UnitWorkId as Id,ProjectType as SupId ,UnitWorkCode as Code, isnull(WBSCode,'')+'-'+UnitWorkName as Name,'UnitWork' as WBSType,PlanStartDate, PlanEndDate,RealEndDate,WBSCode,
|
|
ProjectId from dbo.WBS_UnitWork
|
|
Union all
|
|
select WorkPackageId as id,UnitWorkId as SupId,WorkPackageCode as Code,isnull(WBSCode,'')+'-'+PackageContent as Name,'WorkPackage' as WBSType,PlanStartDate, PlanEndDate,RealEndDate,WBSCode,
|
|
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, isnull(WBSCode,'')+'-'+PackageContent as Name,'WorkPackage' as WBSType,PlanStartDate, PlanEndDate,RealEndDate,WBSCode,
|
|
ProjectId from dbo.WBS_WorkPackage w where IsApprove=1 and SuperWorkPackageId is not null
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GO
|
|
|
|
|
|
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
|
VALUES('8317C0F7-3A69-48AB-87E5-03E96C543B1C','×ÊÁÏÑéÊÕ','CQMS/Check/SpotDataCheck.aspx',20,'B8500D87-407E-458C-9915-FD54F0E81F36','Menu_CQMS',0,1,1)
|
|
GO
|
|
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
|
VALUES('9EAC9A0F-0E2E-4650-8318-3C9BC5EFC35D','8317C0F7-3A69-48AB-87E5-03E96C543B1C','±£´æ',1)
|
|
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
|
VALUES('BDAFA160-FC9D-4B2C-A887-178453E945FE','8317C0F7-3A69-48AB-87E5-03E96C543B1C','Ìá½»',2)
|
|
GO
|
|
|
|
delete from Sys_ButtonToMenu where MenuId='0B17549C-2749-4255-BFF4-574902E878FA'
|
|
delete from Sys_Menu where MenuId='0B17549C-2749-4255-BFF4-574902E878FA'
|
|
GO
|
|
|
|
alter table WBS_ControlItemAndCycle add PlanCost decimal(9,2) null
|
|
GO
|
|
|
|
|
|
alter table dbo.ActionPlan_MainContract drop constraint FK_ActionPlan_MainContract_Base_Project
|
|
alter table dbo.ActionPlan_MainContract drop constraint FK_ActionPlan_MainContract_Person_Persons_CompileMan
|
|
GO
|
|
|
|
alter table dbo.ActionPlan_MainContract alter column ProjectId nvarchar(500) null
|
|
GO
|
|
|
|
update dbo.ActionPlan_MainContract set ProjectId=b.ProjectName from ActionPlan_MainContract a, Base_Project b
|
|
where a.ProjectId=b.ProjectId
|
|
update dbo.ActionPlan_MainContract set CompileMan=b.PersonName from ActionPlan_MainContract a, Person_Persons b
|
|
where a.CompileMan=b.PersonId
|
|
GO |