diff --git a/Laravel/app/Http/Controllers/API/Admin/YeWu/PlanListController.php b/Laravel/app/Http/Controllers/API/Admin/YeWu/PlanListController.php index 8c7ecc3..8a293ca 100644 --- a/Laravel/app/Http/Controllers/API/Admin/YeWu/PlanListController.php +++ b/Laravel/app/Http/Controllers/API/Admin/YeWu/PlanListController.php @@ -371,7 +371,12 @@ public function GetUsedList() $qudaoid = request('qudaoid'); $list = DB::table('s_list') ->leftJoin('s_department_resources', 's_list.reservation_sources', '=', 's_department_resources.id') - ->select('s_list.*', 's_department_resources.department_resources_name') + ->leftJoin('s_check_item', function($join) { + $join->on('s_list.entrust', '=', 's_check_item.item_name') + ->where('s_check_item.is_del', 0) + ->where('s_check_item.status', 1); + }) + ->select('s_list.*', 's_department_resources.department_resources_name', 's_check_item.use_seats', 's_check_item.is_share_slot') ->where(['s_list.roster_id' => $planid, 's_list.is_del' => 0, 's_list.is_nullify' => 0])->whereIn('s_list.list_status', [1, 2, 3]); if (!empty($qudaoid)) { $list = $list->where(['s_list.appointment_type_id' => $qudaoid]); diff --git a/Laravel/app/Services/Admin/YeWu/PlanListService.php b/Laravel/app/Services/Admin/YeWu/PlanListService.php index 1256632..5f47e19 100644 --- a/Laravel/app/Services/Admin/YeWu/PlanListService.php +++ b/Laravel/app/Services/Admin/YeWu/PlanListService.php @@ -364,7 +364,7 @@ public function GetEnablePlan($regnum, $entrustids, $episodeid, $appointment_typ $debugPassed[] = $p->resources_id; //过期的排在后面 - $time = $p->date . ' ' . $p->end_time; + $time = $p->date . ' ' . $p->end_reservation_time; $remaining = ($p->count ?? 0) - ($p->used_count ?? 0); $existingMax = $existingSharedAtPlan[$p->id] ?? 0; $needed = $zhanweiCount - min($newSharedMax, $existingMax); @@ -430,7 +430,7 @@ public function GetEnablePlan($regnum, $entrustids, $episodeid, $appointment_typ // 收集 earliest:仅 status=1 且 remaining>0 且未过期 if (($plan->status ?? 1) == 1 && $remaining > 0) { - $endDateTime = $plan->date . ' ' . ($plan->end_time ?? '23:59:59'); + $endDateTime = $plan->date . ' ' . ($plan->end_reservation_time ?? '23:59:59'); if (strtotime($endDateTime) > $nowTimestamp) { $startDateTime = $plan->date . ' ' . ($plan->begin_time ?? '00:00:00'); $ts = strtotime($startDateTime); @@ -933,7 +933,7 @@ private function getAvailablePlansForDate($regnum, $entrustids, $episodeid, $app $nowtime = date('Y-m-d H:i:s'); $availablePlans = []; foreach ($planList as $plan) { - $planEndTime = $plan->date . ' ' . $plan->end_time; + $planEndTime = $plan->date . ' ' . $plan->end_reservation_time; if ($planEndTime > $nowtime && $plan->plan_enable) { $availablePlans[] = $plan; } @@ -1074,7 +1074,7 @@ public function YuYue($planid, $appointment_type, $mainlistids, $do_type,$is_eme $date = new DateTime($entrust_time); $date->modify("+" . $item->check_begin_time . " minutes"); $enableCheckTime = $date;//到此时间后可进行预约 - $plan_dateTime = $planInfo->date . ' ' . $planInfo->end_time; + $plan_dateTime = $planInfo->date . ' ' . $planInfo->end_reservation_time; $plan_dateTime = new DateTime($plan_dateTime); if ($plan_dateTime < $enableCheckTime and $item->check_begin_time>0) return \Yz::echoError1($item->item_name . " 已设置只能预约医嘱开具后" . $item->check_begin_time . "分钟后的时间,请预约" . $enableCheckTime->format("Y-m-d H:i:s") . "之后的时间"); diff --git a/YiJi-admin/src/views/AppointmentMngr/PlanList.vue b/YiJi-admin/src/views/AppointmentMngr/PlanList.vue index 50eb666..f56ab44 100644 --- a/YiJi-admin/src/views/AppointmentMngr/PlanList.vue +++ b/YiJi-admin/src/views/AppointmentMngr/PlanList.vue @@ -209,7 +209,7 @@ - +
{{selectedPlanRow.department_resources_name}} @@ -217,15 +217,6 @@ :class="(item.status==1 && item.is_del==0) ? '':'hongzi'">{{ item.device_name }}
- - - - - - - +
{{selectedPlanRow.department_resources_name}} @@ -217,15 +217,6 @@ :class="(item.status==1 && item.is_del==0) ? '':'hongzi'">{{ item.device_name }}
- - - - - -