2026-10-04 15:04:16 +00:00
|
|
|
|
CREATE OR ALTER PROCEDURE [dbo].[Hr_S_PerformanceFeedbackOpen]
|
|
|
|
|
|
@FeedbackId uniqueidentifier,
|
|
|
|
|
|
@ActorId uniqueidentifier = NULL
|
|
|
|
|
|
AS
|
|
|
|
|
|
BEGIN
|
|
|
|
|
|
SET NOCOUNT ON;
|
|
|
|
|
|
|
|
|
|
|
|
DECLARE @ReviewId uniqueidentifier, @ReviewerId uniqueidentifier;
|
|
|
|
|
|
|
|
|
|
|
|
SELECT @ReviewId = ReviewId, @ReviewerId = ReviewerId
|
|
|
|
|
|
FROM Hr_T_PerformanceFeedback
|
|
|
|
|
|
WHERE Id = @FeedbackId AND IsDeleted = 0;
|
|
|
|
|
|
|
|
|
|
|
|
IF @ReviewId IS NULL
|
|
|
|
|
|
RETURN;
|
|
|
|
|
|
|
|
|
|
|
|
-- Değerlendirici, değerlendirmenin yetkinlikleri üzerinden puan verir; satırlar burada açılır.
|
|
|
|
|
|
INSERT INTO Hr_T_PerformanceFeedbackScore (Id, TenantId, FeedbackId, SkillId, IsActive, CreationTime, CreatorId, IsDeleted)
|
|
|
|
|
|
SELECT NEWID(), c.TenantId, @FeedbackId, c.SkillId, 1, GETUTCDATE(), @ActorId, 0
|
|
|
|
|
|
FROM Hr_T_PerformanceCompetency c
|
|
|
|
|
|
WHERE c.ReviewId = @ReviewId AND c.IsDeleted = 0
|
|
|
|
|
|
AND NOT EXISTS (
|
|
|
|
|
|
SELECT 1 FROM Hr_T_PerformanceFeedbackScore s
|
|
|
|
|
|
WHERE s.FeedbackId = @FeedbackId AND s.SkillId = c.SkillId AND s.IsDeleted = 0);
|
|
|
|
|
|
|
|
|
|
|
|
EXEC dbo.Hr_S_PerformanceNotify @ReviewId, @ReviewerId, N'Performans360Talebi',
|
2026-10-19 14:35:08 +00:00
|
|
|
|
N'Hr.Performance.Notification.Feedback.Subject', N'Hr.Performance.Notification.Feedback.Message', @ActorId;
|
2026-10-04 15:04:16 +00:00
|
|
|
|
END
|
|
|
|
|
|
GO
|