From 35a9470383d7effbe4722560b6e75473f4cedfde Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Thu, 3 Apr 2025 13:19:05 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=9B=E5=B0=BE=20=E5=9F=B9=E8=AE=AD?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Tiobon.Core.Services/Ghre/Ghre_RequestServices.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Tiobon.Core.Services/Ghre/Ghre_RequestServices.cs b/Tiobon.Core.Services/Ghre/Ghre_RequestServices.cs index 98ce9c97..feea8bfe 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_RequestServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_RequestServices.cs @@ -739,9 +739,13 @@ INSERT INTO [120.26.205.42].[GhrUshio].[dbo].Ghre_GHR50Plan (PlanID, '', C.DeptNo, C.DeptName, - A.[Year], - A.Month, - A.CourseId, + A.[Year], + '['+STUFF(( + SELECT ',' + '""'+CONCAT(Year, '-', RIGHT('0' + JsonData.TrainStaffId, 2)) +'""' + FROM OPENJSON(A.Month) WITH (TrainStaffId varchar '$') AS JsonData + -- INNER JOIN Ghra_Staff S ON JsonData.TrainStaffId = S.StaffID + FOR XML PATH(''), TYPE).value('.', 'NVARCHAR(MAX)'), 1, 1, '')+']' AS Month, + A.CourseId, ISNULL (E.CourseName, A.CourseName), A.TrainDays, STUFF((