From 2a21adb88c8f81ba728be90bdd9406a6d98f20c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A4=E5=85=B0?= Date: Wed, 30 Apr 2025 15:07:26 +0800 Subject: [PATCH] =?UTF-8?q?StaffGroup=E5=A2=9E=E5=8A=A0=E8=AF=A6=E7=BB=86?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Ghra/Ghra_StaffGroupServices.cs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Tiobon.Core.Services/Ghra/Ghra_StaffGroupServices.cs b/Tiobon.Core.Services/Ghra/Ghra_StaffGroupServices.cs index 702f5b31..dacbd1d3 100644 --- a/Tiobon.Core.Services/Ghra/Ghra_StaffGroupServices.cs +++ b/Tiobon.Core.Services/Ghra/Ghra_StaffGroupServices.cs @@ -88,12 +88,14 @@ namespace Tiobon.Core.Services { var result = await base.QueryFilterPage(filter, condition, IsEnable); - //var a = await _StaffGroupDetailServices.Query(); - //result.result.DT_TableDataT1.ForEach(async x => - //{ - // x.DetailInfo = (await _StaffGroupDetailServices.Query(a => a.StaffGroupID == x.Id)) - // .Select(a => a.StaffField).ToString(); - //}); + + result.result.DT_TableDataT1.ForEach(async x => + { + x.DetailInfo = Db.Ado.SqlQuerySingle($@"select stuff((select distinct ',' + (select top 1 dbo.FLangKeyToValue(MKey,1,StaffInfoColumnName) from Ghra_StaffInfoColumn where IsEnable=1 and StaffInfoGroupId = 1 and IsRelease = 1 and StaffInfoColumnNo=a.StaffField) + from Ghra_StaffGroupDetail a + where StaffGroupID = {x.Id} + for XML path(''),type).value('.','nvarchar(max)'),1,1,'')"); + }); return result; }