修改施工日志
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
VALUES('70282169-C09D-4D46-BAA3-9457535EAEA2','当前现场人员统计','HSSE/SitePerson/SitePersonNowStatistic.aspx',62,'EE260447-028F-46AF-8864-9A5DC9DAA5BD','Menu_HSSE',0,1,1)
|
||||
GO
|
||||
@@ -0,0 +1,96 @@
|
||||
ALTER TABLE HSSE_Hazard_HazardRegister ADD WorkPackageId NVARCHAR(2000) NULL
|
||||
GO
|
||||
ALTER TABLE HSSE_Hazard_HazardRegister ADD WorkPackageName NVARCHAR(2000) NULL
|
||||
GO
|
||||
|
||||
ALTER TABLE Check_CheckControl ADD WorkPackageId NVARCHAR(2000) NULL
|
||||
GO
|
||||
ALTER TABLE Check_CheckControl ADD WorkPackageName NVARCHAR(2000) NULL
|
||||
GO
|
||||
|
||||
|
||||
ALTER VIEW [dbo].[View_Hazard_HazardRegister]
|
||||
AS
|
||||
/**********°²È«Ñ²¼ìÊÓͼ*************/
|
||||
SELECT Registration.HazardRegisterId,
|
||||
Registration.HazardCode,
|
||||
Registration.RegisterDate,
|
||||
Registration.RegisterDef,
|
||||
Registration.Rectification,
|
||||
Registration.Place,
|
||||
Registration.ResponsibleUnit,
|
||||
Registration.Observer,
|
||||
Registration.RectifiedDate,
|
||||
Registration.ProjectId,
|
||||
Registration.states,
|
||||
Registration.IsEffective,
|
||||
Registration.ResponsibleMan,
|
||||
Registration.CheckManId,
|
||||
Registration.CheckTime,
|
||||
Registration.RectificationPeriod,
|
||||
(CASE WHEN Registration.ImageUrl IS NULL THEN at.AttachUrl ELSE Registration.ImageUrl END) AS ImageUrl,
|
||||
(CASE WHEN Registration.RectificationImageUrl IS NULL THEN at_r.AttachUrl ELSE Registration.RectificationImageUrl END) AS RectificationImageUrl,
|
||||
Registration.RectificationTime,
|
||||
Registration.ConfirmMan,
|
||||
Registration.ConfirmDate,
|
||||
Registration.HandleIdea,
|
||||
Registration.CutPayment,
|
||||
Registration.ProblemTypes,
|
||||
Registration.CheckSpecialId,
|
||||
Registration.CheckItemDetailId,
|
||||
Registration.SupCheckItemSetId,
|
||||
Registration.CheckItemSetId,
|
||||
Registration.SafeSupervisionId,
|
||||
Registration.SafeSupervisionIsOK,
|
||||
Project.ProjectName,
|
||||
Registration.CheckCycle,
|
||||
ISNULL(WorkArea.UnitWorkName,'') AS WorkAreaName,
|
||||
Unit.UnitName AS ResponsibilityUnitName,
|
||||
User1.PersonName AS ResponsibilityManName,
|
||||
ISNULL(User1.Telephone,'') AS ResponsibilityManTel,
|
||||
User2.PersonName AS CheckManName,
|
||||
ISNULL(User2.Telephone,'') AS CheckManTel,
|
||||
User2.UnitId AS SendUnitId,
|
||||
User3.PersonName AS ConfirmManName,
|
||||
ISNULL(User3.Telephone,'') AS ConfirmManTel,
|
||||
User4.PersonName AS ResponsibilityManName2,
|
||||
ISNULL(User4.Telephone,'') AS ResponsibilityMan2Tel,
|
||||
(CASE WHEN Registration.states='1' and (Registration.SafeSupervisionIsOK is null OR Registration.SafeSupervisionIsOK=0) THEN '´ýÕû¸Ä'
|
||||
WHEN Registration.states='1' and Registration.SafeSupervisionIsOK=1 THEN 'ºÏ¸ñ'
|
||||
WHEN Registration.states='2' THEN 'ÒÑÕû¸Ä'
|
||||
WHEN Registration.states='3' THEN 'Òѱջ·'
|
||||
ELSE 'ÒÑ×÷·Ï' END ) AS StatesStr,
|
||||
RegisterTypes.RegisterTypesId,
|
||||
RegisterTypes.RegisterTypesName,
|
||||
Registration.DIC_ID,
|
||||
Registration.CCManIds,
|
||||
CCManNames = STUFF(( SELECT ',' + PersonName FROM Person_Persons
|
||||
where PATINDEX('%,' + RTRIM(Person_Persons.PersonId) + ',%',',' + Registration.CCManIds + ',')>0
|
||||
ORDER BY PATINDEX('%,' + RTRIM(Registration.CCManIds) + ',%',',' + Registration.CCManIds + ',')
|
||||
FOR XML PATH('')), 1, 1,''),
|
||||
Registration.Requirements,
|
||||
Registration.HazardValue,
|
||||
Registration.RegisterTypes2Id ,
|
||||
RegisterTypes2.RegisterTypesName as RegisterTypes2Name,
|
||||
Registration.RegisterTypes3Id ,
|
||||
RegisterTypes3.RegisterTypesName as RegisterTypes3Name,
|
||||
Registration.RegisterTypes4Id ,
|
||||
RegisterTypes4.RegisterTypesName as RegisterTypes4Name,
|
||||
Registration.WorkPackageId,
|
||||
Registration.WorkPackageName
|
||||
FROM dbo.HSSE_Hazard_HazardRegister AS Registration
|
||||
LEFT JOIN dbo.Base_Project AS Project ON Project.ProjectId = Registration.ProjectId
|
||||
LEFT JOIN dbo.WBS_UnitWork AS WorkArea ON WorkArea.UnitWorkId = Registration.Place
|
||||
LEFT JOIN dbo.HSSE_Hazard_HazardRegisterTypes AS RegisterTypes ON RegisterTypes.RegisterTypesId = Registration.RegisterTypesId
|
||||
LEFT JOIN dbo.HSSE_Hazard_HazardRegisterTypes AS RegisterTypes2 ON RegisterTypes2.RegisterTypesId = Registration.RegisterTypes2Id
|
||||
LEFT JOIN dbo.HSSE_Hazard_HazardRegisterTypes AS RegisterTypes3 ON RegisterTypes3.RegisterTypesId = Registration.RegisterTypes3Id
|
||||
LEFT JOIN dbo.HSSE_Hazard_HazardRegisterTypes AS RegisterTypes4 ON RegisterTypes4.RegisterTypesId = Registration.RegisterTypes4Id
|
||||
LEFT JOIN dbo.Base_Unit AS Unit ON Unit.UnitId = Registration.ResponsibleUnit
|
||||
LEFT JOIN dbo.Person_Persons AS User1 ON User1.PersonId = Registration.ResponsibleMan
|
||||
LEFT JOIN dbo.Person_Persons AS User2 ON User2.PersonId = Registration.CheckManId
|
||||
LEFT JOIN dbo.Person_Persons AS User3 ON User3.PersonId = Registration.ConfirmMan
|
||||
LEFT JOIN dbo.Person_Persons AS User4 ON User4.PersonId = Registration.ResponsibleMan2
|
||||
LEFT JOIN dbo.AttachFile AS at ON at.ToKeyId = Registration.HazardRegisterId
|
||||
LEFT JOIN dbo.AttachFile AS at_r ON at_r.ToKeyId = Registration.HazardRegisterId+'-R'
|
||||
|
||||
GO
|
||||
@@ -340,7 +340,10 @@ GO
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
VALUES('7D36E853-CC79-48B9-9E7F-E34797B4E87E','现场人员考勤统计','HSSE/SitePerson/PersonStatistic.aspx',60,'EE260447-028F-46AF-8864-9A5DC9DAA5BD','Menu_HSSE',0,1,1)
|
||||
GO
|
||||
|
||||
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
VALUES('70282169-C09D-4D46-BAA3-9457535EAEA2','当前现场人员统计','HSSE/SitePerson/SitePersonNowStatistic.aspx',62,'EE260447-028F-46AF-8864-9A5DC9DAA5BD','Menu_HSSE',0,1,1)
|
||||
GO
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
VALUES('F291CAE4-2E53-48FC-BF44-382D42EA4DEC','现场岗位人工时统计','HSSE/SitePerson/WorkPostStatistic.aspx',65,'EE260447-028F-46AF-8864-9A5DC9DAA5BD','Menu_HSSE',0,1,1)
|
||||
GO
|
||||
|
||||
Reference in New Issue
Block a user