diff --git a/DataBase/版本日志/SGGLDB_V2023-06-29.sql b/DataBase/版本日志/SGGLDB_V2023-06-29.sql index 7a3cb6c6..c631dd5e 100644 --- a/DataBase/版本日志/SGGLDB_V2023-06-29.sql +++ b/DataBase/版本日志/SGGLDB_V2023-06-29.sql @@ -209,3 +209,51 @@ INSERT INTO ProjectSupervision_CheckTemplate(ID,SortIndex,CheckItem,CheckStandar INSERT INTO ProjectSupervision_CheckTemplate(ID,SortIndex,CheckItem,CheckStandard,CheckMethod,BaseScore,Type,Indexs) VALUES (NEWID(),35,'ÁÙ½¨ÉèÊ©','ÁÙ½¨ÉèÊ©²»·ûºÏÏû·À¡¢Óõç¹ÜÀíÒªÇ󣬿Û2·Ö£»','ÏÖ³¡²éÑé',10,1,193); INSERT INTO ProjectSupervision_CheckTemplate(ID,SortIndex,CheckItem,CheckStandard,CheckMethod,BaseScore,Type,Indexs) VALUES (NEWID(),36,'ÁÙ½¨ÉèÊ©','°ì¹«Çø¡¢Éú»îÇø¡¢Éú²úÇøÎ´¶ÀÁ¢ÉèÖ㬿Û1·Ö¡£','ÏÖ³¡²éÑé',10,1,194); INSERT INTO ProjectSupervision_CheckTemplate(ID,SortIndex,CheckItem,CheckStandard,CheckMethod,BaseScore,Type,Indexs) VALUES (NEWID(),34,'ÆäËû','·¢ÏÖÆäËû²»·ûºÏ°²È«Éú²ú·¨ÂÉ¡¢·¨¹æ¡¢±ê×¼¡¢¹æ·¶ÒÔ¼°Éϼ¶ÒªÇóµÈÊÂÏÿÏî¿Û2·Ö¡£','ÏÖ³¡²éÑé',10,1,195); + + + +--»ñÈ¡µ±Ç°ÈËÏîÄ¿¼¶´ý°ìÊÂÏî +ALTER PROCEDURE [dbo].[Sp_Project_GetToDoItems] + @projectId NVARCHAR(50)=NULL, + @personId NVARCHAR(200)=NULL +AS +/*»ñÈ¡µ±Ç°È˱¾²¿´ý°ìÊÂÏî*/ +BEGIN +SELECT CostManageId AS DataId + ,'HSE·ÑÓÃÉêÇë' AS MenuName + ,('HSE·ÑÓÃÉêÇë'+ CONVERT(varchar(100),CostManage.CostManageDate, 23)+'´ý´¦Àí¡£') AS Content + ,PersonId + ,persons.PersonName + ,CostManage.CostManageDate AS DataTime + ,CONVERT(varchar(100),CostManage.CostManageDate, 23) AS DataTimeStr + ,(CASE WHEN CostManage.States = '0' THEN '../HSSE/CostGoods/CostManageEdit.aspx?CostManageId='+CostManageId + ELSE '../HSSE/CostGoods/CostManageAudit.aspx?CostManageId='+CostManageId END)AS PCUrl +FROM CostGoods_CostManage AS CostManage +LEFT JOIN Person_Persons AS persons ON CostManage.NextManId= persons.PersonId +WHERE CostManage.ProjectId=@projectId AND (CostManage.States = '0' or CostManage.States='1' ) + AND CostManage.NextManId =@personId + +UNION ALL +SELECT ActionPlan.ActionPlanListId AS DataId + ,'°²È«ÊµÊ©¼Æ»®' AS MenuName + ,('°²È«ÊµÊ©¼Æ»®'+ CONVERT(varchar(100),ActionPlan.CompileDate, 23)+'´ý´¦Àí¡£')+'´ý´¦Àí' AS Content + ,approve.ApproveMan AS PersonId + ,persons.PersonName + ,CompileDate AS DataTime + ,CONVERT(varchar(100),CompileDate, 23) AS DataTimeStr + ,'../HSSE/ActionPlanListEdit.aspx?ActionPlanListId='+ActionPlan.ActionPlanListId AS PCUrl +FROM ActionPlan_ActionPlanList AS ActionPlan +LEFT JOIN ActionPlan_ActionPlanListApprove as approve on ActionPlan.ActionPlanListId=approve.ActionPlanListId and ApproveType!='S' and approve.ApproveMan='2dabba4e-19e3-4ccd-8382-7393d9084894' +LEFT JOIN Person_Persons AS persons ON persons.PersonId =approve.ApproveMan +WHERE ActionPlan.ProjectId=@projectId and ActionPlan.ActionPlanListId in (select ActionPlanListId from dbo.ActionPlan_ActionPlanListApprove + where PersonId=@PersonId and ApproveDate is null and ApproveType!='S') + + + +ORDER BY DataTime DESC +END + + +GO + +