jingyuzhi 4 years ago
parent
commit
0ecd5ef440

+ 11 - 1
app/Community/Controllers/ApiController.php

xqd xqd xqd
@@ -138,6 +138,7 @@ class ApiController extends Controller
         $first_day = strtotime($all_time[0]);
 //        DB::enableQueryLog();
         $sche_dule = Schedule::whereBetween('schedule_day',[$start_time,$end_time])
+            ->where(['docter_id'=>$docter_id])
             ->pluck('id')
             ->toArray();
 //        echo '<pre>';
@@ -197,9 +198,17 @@ class ApiController extends Controller
             for ($i = 0; $i<6; $i++){
                 $str_time =  date('Y-m-d',($first_day + $i * 86400));
                 for($j=0;$j<3;$j++){
+
+                    //dd($sche_dule);
+//                 DB::enableQueryLog();
+
                     //检测上午
                     $is_mo_have = SchedulePeriod::whereIn('schedule_id',$sche_dule)->where('schedule_date',$str_time)->whereIn('time_period_id',$times[$j])
                         ->where('docter_id','!=',$docter_id)->count();
+//                    echo '<pre>';
+//                    print_r(DB::getQueryLog());
+//                    echo '</pre>';
+//                    dd($is_mo_have);
                     $is_self = SchedulePeriod::whereIn('schedule_id',$sche_dule)->where('schedule_date',$str_time)->whereIn('time_period_id',$times[$j])
                         ->where('docter_id',$docter_id)->count();
                     if($is_self){
@@ -218,11 +227,12 @@ class ApiController extends Controller
             for ($i=0; $i<=6; $i++){
                 $str_time =  date('Y-m-d',($first_day + $i * 86400));
                 for($j=0;$j<=2;$j++){
-                    //检测上午
+
                     $is_mo_have = SchedulePeriod::whereIn('schedule_id',$sche_dule)->where('schedule_date',$str_time)->whereIn('time_period_id',$times[$j])
                         ->where('organization_id','!=',$org_id)->where('docter_id','=',$docter_id)->count();
                     $is_mo_self = SchedulePeriod::whereIn('schedule_id',$sche_dule)->where('schedule_date',$str_time)->whereIn('time_period_id',$times[$j])
                         ->where('organization_id',$org_id)->where('docter_id',$docter_id)->count();
+
                     if($is_mo_self){
                         $sche_dule_arr[$j][$week_arr[$i]] = true;
                     }

File diff suppressed because it is too large
+ 0 - 0
public/assets/css/app.1ef7a076.css


BIN
public/assets/img/close001.2835da4d.jpg


BIN
public/assets/img/close002.e38ad856.jpg


BIN
public/assets/img/close003.f9dff833.jpg


BIN
public/assets/img/face002.c9f88acd.jpg


BIN
public/assets/img/face003.5df92cea.jpg


BIN
public/assets/img/face004.4a1731fa.jpg


BIN
public/assets/img/face005.d5784a4b.jpg


File diff suppressed because it is too large
+ 0 - 0
public/assets/js/app.a700b62e.js


File diff suppressed because it is too large
+ 0 - 0
public/assets/js/app.a700b62e.js.map


File diff suppressed because it is too large
+ 0 - 0
public/assets/js/chunk-vendors.95e2f2c7.js


File diff suppressed because it is too large
+ 0 - 0
public/assets/js/chunk-vendors.95e2f2c7.js.map


File diff suppressed because it is too large
+ 0 - 0
public/cdms/static/js/app.306dc37f.js


File diff suppressed because it is too large
+ 0 - 0
public/cdms/static/js/app.306dc37f.js.map


Some files were not shown because too many files changed in this diff