20250329 工作台

This commit is contained in:
2025-03-29 00:01:50 +08:00
parent 2d5e6785f1
commit 70169120e3
27 changed files with 770 additions and 795 deletions
@@ -238,7 +238,7 @@ SELECT InspectionPersonId AS DataId
,'../CQMS/Comprehensive/InspectionPersonEdit.aspx?ToDo=ToDo&InspectionPersonId='+Person.InspectionPersonId AS PCUrl
FROM Comprehensive_InspectionPerson AS Person
LEFT JOIN Sys_User AS users ON users.UserId =@userId
WHERE Person.ProjectId=@projectId and (Person.IsOnSite=1 or Person.DepartureTime is not null) and
WHERE Person.ProjectId=@projectId and Person.IsOnSite=1 and
dateadd(day,-15,Person.ValidityDate)<getdate() and getdate()<Person.ValidityDate
UNION ALL
SELECT InspectionPersonId AS DataId
@@ -252,7 +252,7 @@ SELECT InspectionPersonId AS DataId
,'../CQMS/Comprehensive/InspectionPersonEdit.aspx?ToDo=ToDo&InspectionPersonId='+Person.InspectionPersonId AS PCUrl
FROM Comprehensive_InspectionPerson AS Person
LEFT JOIN Sys_User AS users ON users.UserId =@userId
WHERE Person.ProjectId=@projectId and (Person.IsOnSite=1 or Person.DepartureTime is not null) and
WHERE Person.ProjectId=@projectId and Person.IsOnSite=1 and
Person.ValidityDate<getdate()
UNION ALL
SELECT InspectionMachineId AS DataId
@@ -266,7 +266,7 @@ SELECT InspectionMachineId AS DataId
,'../CQMS/Comprehensive/InspectionMachineEdit.aspx?ToDo=ToDo&InspectionMachineId='+Machine.InspectionMachineId AS PCUrl
FROM Comprehensive_InspectionMachine AS Machine
LEFT JOIN Sys_User AS users ON users.UserId =@userId
WHERE Machine.ProjectId=@projectId and (Machine.IsOnSite=1 or Machine.LeaveDate is not null) and
WHERE Machine.ProjectId=@projectId and Machine.IsOnSite=1 and
dateadd(day,-15,Machine.NextTestDate)<getdate() and getdate()<Machine.NextTestDate
UNION ALL
SELECT InspectionMachineId AS DataId
@@ -280,7 +280,7 @@ SELECT InspectionMachineId AS DataId
,'../CQMS/Comprehensive/InspectionMachineEdit.aspx?ToDo=ToDo&InspectionMachineId='+Machine.InspectionMachineId AS PCUrl
FROM Comprehensive_InspectionMachine AS Machine
LEFT JOIN Sys_User AS users ON users.UserId =@userId
WHERE Machine.ProjectId=@projectId and (Machine.IsOnSite=1 or Machine.LeaveDate is not null) and
WHERE Machine.ProjectId=@projectId and Machine.IsOnSite=1 and
Machine.NextTestDate<getdate()
UNION ALL
SELECT distinct Project.ProjectId AS DataId
@@ -9,7 +9,7 @@ BEGIN
SELECT HazardRegisterId AS DataId
,'B6BE5FE0-CB84-47FF-A6C3-5AD9E1CCE079' AS MenuId
,'安全巡检待整改' AS MenuName
,project.ProjectName
,project.ProjectCode
,register.RegisterDef AS Content
,users.UserId
,users.UserName
@@ -28,7 +28,7 @@ UNION ALL
SELECT HazardRegisterId AS DataId
,'B6BE5FE0-CB84-47FF-A6C3-5AD9E1CCE079' AS MenuId
,'安全巡检待确认' AS MenuName
,project.ProjectName
,project.ProjectCode
,register.RegisterDef AS Content
,users.UserId
,users.UserName
@@ -46,7 +46,7 @@ UNION ALL
SELECT CheckControlCode AS DataId
,'B3E99BD9-FDC7-4F15-8C3C-A7821AC9E306' AS MenuId
,'质量巡检待处理' AS MenuName
,project.ProjectName
,project.ProjectCode
,checkControl.QuestionDef AS Content
,users.UserId
,users.UserName
@@ -64,7 +64,7 @@ UNION ALL
SELECT GJSXID AS DataId
,'0BEA2126-7A48-40EB-8E21-99148E91A22B' AS MenuId
,'关键事项待处理' AS MenuName
,project.ProjectName
,project.ProjectCode
,GJSX.Detail AS Content
,users.UserId
,users.UserName
@@ -84,7 +84,7 @@ UNION ALL
SELECT ConstructSolutionId AS DataId
,'91C4BFDB-0A51-4992-99CC-EB4EC185593D' AS MenuId
,'施工方案待处理' AS MenuName
,project.ProjectName
,project.ProjectCode
,Solution.SolutionName AS Content
,users.UserId
,users.UserName
@@ -110,7 +110,7 @@ UNION ALL
SELECT InspectionId AS DataId
,'4781f467-35bf-4cf2-aaa4-7960a175eb61' AS MenuId
,'共检通知单待处理' AS MenuName
,project.ProjectName
,project.ProjectCode
,InspectionManagement.AcceptanceSite AS Content
,users.UserId
,users.UserName
@@ -127,7 +127,7 @@ UNION ALL
SELECT CheckSpecialId AS DataId
,'1B08048F-93ED-4E84-AE65-DB7917EA2DFB' AS MenuId
,'专项检查' AS MenuName
,project.ProjectName
,project.ProjectCode
,CheckItemSet.CheckItemName AS Content
,users.UserId
,users.UserName
@@ -146,7 +146,7 @@ UNION ALL
SELECT CheckColligationId AS DataId
,'C198EBA8-9E23-4654-92E1-09C61105C522' AS MenuId
,'综合检查待处理' AS MenuName
,project.ProjectName
,project.ProjectCode
,case CheckType when '0' then '周检' when '1' then '月检' else '其它' end AS Content
,users.UserId
,users.UserName
@@ -166,7 +166,7 @@ UNION ALL
SELECT PatrolPlanId AS DataId
,'D256E5C8-DC76-4F4D-BABE-A253418823F4' AS MenuId
,'风险巡检待处理' AS MenuName
,project.ProjectName
,project.ProjectCode
,HazardListItem.HazardItems AS Content
,users.UserId
,users.UserName
@@ -187,7 +187,7 @@ UNION ALL
SELECT PersonQuality.PersonId AS DataId
,'EBEA762D-1F46-47C5-9EAD-759E13D9B41C' AS MenuId
,'特种作业人员资质还有'+convert(nvarchar(6),DATEDIFF(day,getdate(),PersonQuality.LimitDate))+'天过期' AS MenuName
,project.ProjectName
,project.ProjectCode
,Person.PersonName AS Content
,users.UserId
,users.UserName
@@ -207,7 +207,7 @@ UNION ALL
SELECT PersonQuality.PersonId AS DataId
,'EBEA762D-1F46-47C5-9EAD-759E13D9B41C' AS MenuId
,'特种作业人员资质已过期'+convert(nvarchar(6),DATEDIFF(day,PersonQuality.LimitDate,getdate()))+'' AS MenuName
,project.ProjectName
,project.ProjectCode
,Person.PersonName AS Content
,users.UserId
,users.UserName
@@ -226,14 +226,14 @@ Person.ProjectId =projectUser.ProjectId
UNION ALL
SELECT InspectionPersonId AS DataId
,'8ed133de-5899-4687-878a-20b1f5280f18' AS MenuId
,'人员报验还有'+convert(nvarchar(6),DATEDIFF(day,getdate(),Person.ValidityDate))+'天过期 '+Person.PersonName AS MenuName
,project.ProjectName
,'人员报验还有'+convert(nvarchar(6),DATEDIFF(day,getdate(),Person.ValidityDate))+'天过期 ' AS MenuName
,project.ProjectCode
,Person.PersonName AS Content
,users.UserId
,users.UserName
,Person.ValidityDate AS DataTime
,CONVERT(varchar(100),Person.CompileDate, 23) AS DataTimeStr
,'CQMS/Comprehensive/InspectionPersonEdit.aspx?InspectionPersonId='+Person.InspectionPersonId AS PCUrl
,'CQMS/Comprehensive/InspectionPersonEdit.aspx?projectId='+project.ProjectId+'&InspectionPersonId='+Person.InspectionPersonId AS PCUrl
FROM Comprehensive_InspectionPerson AS Person
left join Project_ProjectUser as projectUser on projectUser.UserId=@userId
LEFT JOIN Sys_User AS users ON users.UserId = projectUser.UserId
@@ -246,14 +246,14 @@ and project.ProjectState='1'
UNION ALL
SELECT InspectionPersonId AS DataId
,'8ed133de-5899-4687-878a-20b1f5280f18' AS MenuId
,'人员报验已过期'+convert(nvarchar(6),DATEDIFF(day,Person.ValidityDate,getdate()))+''+Person.PersonName AS MenuName
,project.ProjectName
,'人员报验已过期'+convert(nvarchar(6),DATEDIFF(day,Person.ValidityDate,getdate()))+'' AS MenuName
,project.ProjectCode
,Person.PersonName AS Content
,users.UserId
,users.UserName
,Person.ValidityDate AS DataTime
,CONVERT(varchar(100),Person.CompileDate, 23) AS DataTimeStr
,'CQMS/Comprehensive/InspectionPersonEdit.aspx?InspectionPersonId='+Person.InspectionPersonId AS PCUrl
,'CQMS/Comprehensive/InspectionPersonEdit.aspx?projectId='+project.ProjectId+'&InspectionPersonId='+Person.InspectionPersonId AS PCUrl
FROM Comprehensive_InspectionPerson AS Person
left join Project_ProjectUser as projectUser on projectUser.UserId=@userId
LEFT JOIN Sys_User AS users ON users.UserId = projectUser.UserId
@@ -266,14 +266,14 @@ and project.ProjectState='1'
UNION ALL
SELECT InspectionMachineId AS DataId
,'aa55fad1-6c51-43f5-8c99-3c6aaae79118' AS MenuId
,'机具报验还有'+convert(nvarchar(6),DATEDIFF(day,getdate(),Machine.NextTestDate))+'天过期 '+Machine.InspectionMachineName AS MenuName
,project.ProjectName
,'机具报验还有'+convert(nvarchar(6),DATEDIFF(day,getdate(),Machine.NextTestDate))+'天过期 ' AS MenuName
,project.ProjectCode
,Machine.InspectionMachineName AS Content
,users.UserId
,users.UserName
,Machine.NextTestDate AS DataTime
,CONVERT(varchar(100),Machine.CompileDate, 23) AS DataTimeStr
,'CQMS/Comprehensive/InspectionMachineEdit.aspx?InspectionMachineId='+Machine.InspectionMachineId AS PCUrl
,'CQMS/Comprehensive/InspectionMachineEdit.aspx?projectId='+project.ProjectId+'&InspectionMachineId='+Machine.InspectionMachineId AS PCUrl
FROM Comprehensive_InspectionMachine AS Machine
left join Project_ProjectUser as projectUser on projectUser.UserId=@userId
LEFT JOIN Sys_User AS users ON users.UserId = projectUser.UserId
@@ -286,13 +286,13 @@ UNION ALL
SELECT InspectionMachineId AS DataId
,'aa55fad1-6c51-43f5-8c99-3c6aaae79118' AS MenuId
,'机具报验已过期'+convert(nvarchar(6),DATEDIFF(day,Machine.NextTestDate,getdate()))+'' AS MenuName
,project.ProjectName
,project.ProjectCode
,Machine.InspectionMachineName AS Content
,users.UserId
,users.UserName
,Machine.NextTestDate AS DataTime
,CONVERT(varchar(100),Machine.CompileDate, 23) AS DataTimeStr
,'CQMS/Comprehensive/InspectionMachineEdit.aspx?InspectionMachineId='+Machine.InspectionMachineId AS PCUrl
,'CQMS/Comprehensive/InspectionMachineEdit.aspx?projectId='+project.ProjectId+'&InspectionMachineId='+Machine.InspectionMachineId AS PCUrl
FROM Comprehensive_InspectionMachine AS Machine
left join Project_ProjectUser as projectUser on projectUser.UserId=@userId
LEFT JOIN Sys_User AS users ON users.UserId =projectUser.UserId
@@ -304,7 +304,7 @@ UNION ALL
SELECT distinct Project.ProjectId AS DataId
,'2AE9D982-A499-497F-8F54-ADDA5856887E' AS MenuId
,'本月工程量完成情况尚未填报' AS MenuName
,Project.ProjectName
,project.ProjectCode
,'' AS Content
,users.UserId
,users.UserName
@@ -321,7 +321,7 @@ UNION ALL
SELECT MonthPlan.MonthPlanId AS DataId
,'94287B92-7E96-4B90-BC6F-DAF30AE3B314' AS MenuId
,'月度计划尚未完成' AS MenuName
,project.ProjectName
,project.ProjectCode
,'' AS Content
,users.UserId
,users.UserName
@@ -337,7 +337,7 @@ DATENAME(year,GETDATE())=DATENAME(year,MonthPlan.PlanDate) and DATENAME(MONTH,GE
and MonthPlan.ProjectId = projectUser.ProjectId
and (@sType='1' or @sType='2')
--ORDER BY DataTime DESC
ORDER BY DataTime DESC
END