回写更新slist执行科室

main
鹿和sa0ChunLuyu 7 days ago
parent d5dd1b5e79
commit 40efed17ad

@ -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,

Loading…
Cancel
Save