Mike 4 years ago
parent
commit
66ed149948
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/Community/Controllers/ApiController.php

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

xqd
@@ -484,7 +484,7 @@ class ApiController extends Controller
 
         //删除 Schedule里面SchedulePeriod 没有的日期
         foreach ($schedule as $date) {
-            $c = SchedulePeriod::where(['docter_id'=>$docterId,'organization_id'=>$orgId])->where('schedule_date',$date)->count();
+            $c = SchedulePeriod::where(['docter_id'=>$docterId,'organization_id'=>$orgId,'schedule_type'=> $sType])->where('schedule_date',$date)->count();
             if($c==0) Schedule::where('schedule_date',$date)->delete();
         }
         return apiReturn('200','ok');