From d0f1e205e971ce7c8ab8b776ad1de92b78688aac Mon Sep 17 00:00:00 2001 From: yanzai Date: Sat, 26 Jul 2025 21:47:30 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=8F=AF=E7=94=A8=E5=8F=B7?= =?UTF-8?q?=E6=BA=90=E6=97=B6=EF=BC=8C=E5=90=8C=E6=97=B6=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=8D=A0=E4=BD=8D=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Laravel/app/Services/Admin/YeWu/PlanListService.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Laravel/app/Services/Admin/YeWu/PlanListService.php b/Laravel/app/Services/Admin/YeWu/PlanListService.php index 4de4bf5..a7451c5 100644 --- a/Laravel/app/Services/Admin/YeWu/PlanListService.php +++ b/Laravel/app/Services/Admin/YeWu/PlanListService.php @@ -18,14 +18,15 @@ class PlanListService $allDevice = [];//所有医嘱检查项目绑定的设备id $commPatientType = [];//所有医嘱共同的病人类型 + $zhanweiCount=0;//勾选的检查项目共计占多少名额 foreach ($entrustids as $key => $entrustid) { // $info = DB::table('s_list')->where(['reg_num' => $regnum, 'entrust_id' => $entrustid, 'episodeid' => $episodeid, 'is_nullify' => 0])->first(); $info = DB::table('s_list')->where(['entrust_id' => $entrustid, 'is_nullify' => 0])->first(); if (!$info) return \Yz::echoError1('没有找到对应医嘱信息:'.$entrustid); $itemInfo = DB::table('s_check_item')->where(['item_name' => $info->entrust, 'status' => 1, "is_del" => 0])->get(); if (count($itemInfo) == 0) return \Yz::echoError1('没有找到可用的检查项目信息'); - $itemInfo = $itemInfo[0]; + $zhanweiCount+=isset($itemInfo->use_seats)?$itemInfo->use_seats:0; $qudaos = explode(',', $itemInfo->reservation_method); //只判断主渠道,如果主渠道支持,则子渠道默认也支持,即使项目没绑定子渠道 if (!in_array($appointment_type, $qudaos)) return \Yz::echoError1('此检查项目不支持在当前渠道预约'); @@ -142,7 +143,7 @@ WHERE $planPatientType = explode(",", $p->patient_type); if (!empty(array_diff($commPatientType, $planPatientType))) { continue; - } + } //过期的排在后面 $time = $p->date . ' ' . $p->end_time; if ($time > $nowtime) { @@ -153,7 +154,7 @@ WHERE } $pp = array_merge($pl1, $pl2); - return \Yz::Return(true, '查询完成', ['today_date' => date("Y-m-d"), 'appointment_date' => $appointment_date, 'weekname' => Tools::GetWeekName($appointment_date), 'mainInfo' => $info, 'plan_list' => $pp]); + return \Yz::Return(true, '查询完成', ['today_date' => date("Y-m-d"), 'appointment_date' => $appointment_date, 'weekname' => Tools::GetWeekName($appointment_date), 'mainInfo' => $info, 'plan_list' => $pp,'zhanWeiCount'=>$zhanweiCount]); } //开始预约占用名额