فهرست منبع

自定义排班数据写入

whj 4 سال پیش
والد
کامیت
6ee6ea9350
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      app/Community/Controllers/ApiController.php

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

xqd
@@ -1052,11 +1052,11 @@ class ApiController extends Controller
 
                 if ($v['status'] == true) { //设置
                     $num_date = intval(date('Ymd', strtotime($today)));
-                    $sche_data = ['docter_id' => intval($docter_id), 'schedule_type' => $sType, 'schedule_date' => $today, 'schedule_day' => $num_date];
+                    $sche_data = ['docter_id' => intval($docter_id), 'schedule_type' => $sType, 'schedule_date' => $today,'schedule_day' => $num_date];
+                    if ($sType != 1) $sche_data['organization_id'] = intval($org_id);
                     //判断是否有排班信息
                     $s_id = Schedule::where($sche_data)->value('id');
                     if (!$s_id) {
-                        if ($sType != 1) $scheduleData['organization_id'] = $org_id;
                         $s_id = Schedule::insertGetId($sche_data);
                     }
                     //获取时间段