From 74fb3ab43ae918f326cb210e7b3b8a062cc86bd5 Mon Sep 17 00:00:00 2001 From: sa0ChunLuyu Date: Sat, 1 Aug 2026 18:52:34 +0800 Subject: [PATCH] =?UTF-8?q?PACS=20=E8=B0=83=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/API/Third/CSharpController.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Laravel/app/Http/Controllers/API/Third/CSharpController.php b/Laravel/app/Http/Controllers/API/Third/CSharpController.php index 86c0d3d..5fd010f 100644 --- a/Laravel/app/Http/Controllers/API/Third/CSharpController.php +++ b/Laravel/app/Http/Controllers/API/Third/CSharpController.php @@ -205,6 +205,21 @@ public function SaveApply($orderNo) if ($entrust->user_sex == 1) $sex = 'M'; if ($entrust->user_sex == 2) $sex = 'F'; $hisiteminfo = collect($hisInfo['itemList']??[])->firstWhere('termCode', $entrust->entrust_code); + + // 获取顶级科室名称 + $deptName = ''; + if (!empty($entrust->department_id)) { + $execDept = DB::table('s_department')->where('id', $entrust->department_id)->where('is_del', 0)->first(); + if ($execDept) { + if ($execDept->pid == 0) { + $deptName = $execDept->department_name; + } else { + $topDept = DB::table('s_department')->where('id', $execDept->pid)->where('is_del', 0)->first(); + $deptName = $topDept->department_name ?? ''; + } + } + } + $send_data = [ 'Request' => [ 'Head' => [ @@ -257,7 +272,7 @@ public function SaveApply($orderNo) 'appoint_date' => $entrust->reservation_date . ' ' . substr($reservation_time, 0, 5), 'register_date' => $entrust->reservation_date . ' ' . substr($reservation_end_time, 0, 5), 'bodypartexamined' => $hisiteminfo['examPosiSmallName']??'', - 'dept_name' => '', + 'dept_name' => $deptName, 'studyclass1' => $hisInfo['requestTypeAlias']??'', 'studyclass1his' => $hisiteminfo['execDeptName']??'', 'studyclass1name' => $hisiteminfo['execDeptName']??'',