| xqd
@@ -234,7 +234,7 @@ class OrderController extends AuthController
|
|
|
|
|
|
//检查号源
|
|
|
if ($product_type == 3) {
|
|
|
- $schedulePeriod = SchedulePeriod::where('docter_id', $req['docter_id'])->where('time_period_id', $req['time_period_id'])->where('schedule_date', date('schedule_date'))->where('schedule_type', 1)->first();
|
|
|
+ $schedulePeriod = SchedulePeriod::where('docter_id', $req['docter_id'])->where('time_period_id', $req['time_period_id'])->where('schedule_date', $req['schedule_date'])->where('schedule_type', 1)->first();
|
|
|
if (empty($schedulePeriod)) {
|
|
|
return out(null, 10012, '医生无该时间段的排班');
|
|
|
}
|
| xqd
@@ -245,7 +245,7 @@ class OrderController extends AuthController
|
|
|
}
|
|
|
elseif (in_array($product_type, [4,5])) {
|
|
|
$schedule_type_map = [4 => 2, 5 => 3];
|
|
|
- $schedulePeriod = SchedulePeriod::where('time_period_id', $req['time_period_id'])->where('schedule_date', date('schedule_date'))->where('organization_id', $req['organization_id'])->where('schedule_type', $schedule_type_map[$product_type])->first();
|
|
|
+ $schedulePeriod = SchedulePeriod::where('time_period_id', $req['time_period_id'])->where('schedule_date', $req['schedule_date'])->where('organization_id', $req['organization_id'])->where('schedule_type', $schedule_type_map[$product_type])->first();
|
|
|
if (empty($schedulePeriod)) {
|
|
|
return out(null, 10013, '机构无该时间段的排班');
|
|
|
}
|