From f85ef3801f5e97960f864c7a32bf418a7acd30e9 Mon Sep 17 00:00:00 2001 From: wucongxing <815046773@qq.com> Date: Fri, 15 Dec 2023 09:39:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E8=81=8C=E4=B8=9A=E3=80=81?= =?UTF-8?q?=E6=B0=91=E6=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/PatientCaseService.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/app/Services/PatientCaseService.php b/app/Services/PatientCaseService.php index ec4b972..ed8fcdd 100644 --- a/app/Services/PatientCaseService.php +++ b/app/Services/PatientCaseService.php @@ -3,6 +3,8 @@ namespace App\Services; use App\Constants\HttpEnumCode; +use App\Model\BasicJob; +use App\Model\BasicNation; use App\Model\DetectionProject; use App\Model\InquiryCaseProduct; use App\Model\OrderDetection; @@ -564,6 +566,32 @@ class PatientCaseService extends BaseService if ($order_inquiry_case[$key] == null){ $order_inquiry_case_data[$key] = $value; } + + // 处理职业 + if ($key == "job_id"){ + if ($order_inquiry_case["job_name"] == null){ + // 获取职业数据 + $params = array(); + $params['job_id'] = $value; + $basic_job = BasicJob::getOne($params); + if (!empty($basic_job)){ + $order_inquiry_case_data["job_name"] = $basic_job['job_name']; + } + } + } + + // 处理民族 + if ($key == "nation_id"){ + if ($order_inquiry_case["nation_name"] == null){ + // 获取职业数据 + $params = array(); + $params['nation_id'] = $value; + $basic_nation = BasicNation::getOne($params); + if (!empty($basic_nation)){ + $order_inquiry_case_data["nation_name"] = $basic_nation['nation_name']; + } + } + } } $case_fields[$key] = $value;