From 40efed17ad774861f40762da61dc539a6ff01ec0 Mon Sep 17 00:00:00 2001 From: sa0ChunLuyu Date: Thu, 30 Jul 2026 03:28:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E5=86=99=E6=9B=B4=E6=96=B0slist?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E7=A7=91=E5=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/Admin/YeWu/PlanListService.php | 29 ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/Laravel/app/Services/Admin/YeWu/PlanListService.php b/Laravel/app/Services/Admin/YeWu/PlanListService.php index c6ec407..2cd235c 100644 --- a/Laravel/app/Services/Admin/YeWu/PlanListService.php +++ b/Laravel/app/Services/Admin/YeWu/PlanListService.php @@ -1953,7 +1953,34 @@ private function notifyHisAfterYuYue($oldMainInfos, $planInfo) ]; try { - HisController::Post('/roc/api/v1/qhd/common/yjyy/updateExecDept', $body); + $hisRes = HisController::Post('/roc/api/v1/qhd/common/yjyy/updateExecDept', $body); + if ($hisRes['code'] == 200) { + // 记录变更前的旧值 + $oldDeptCode = $mainInfo->RISRAcceptDeptCode ?? ''; + $oldDeptName = $mainInfo->implement_department ?? ''; + + DB::table('s_list') + ->where('id', $mainInfo->id) + ->update([ + 'RISRAcceptDeptCode' => $execDeptCode, + 'implement_department' => $execDeptName, + ]); + + DB::table('s_list_log')->insert([ + 'list_id' => $mainInfo->id, + 'reg_num' => $mainInfo->reg_num, + 'old_status' => $mainInfo->list_status, + 'new_status' => $mainInfo->list_status, + 'create_user' => 'sys_auto', + 'note' => 'HIS回写更新执行科室', + 'data' => json_encode([ + 'old_RISRAcceptDeptCode' => $oldDeptCode, + 'new_RISRAcceptDeptCode' => $execDeptCode, + 'old_implement_department' => $oldDeptName, + 'new_implement_department' => $execDeptName, + ], JSON_UNESCAPED_UNICODE), + ]); + } } catch (\Exception $e) { Log::error('HIS 回写接口请求异常', [ 'body' => $body,