| 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);
|
|
|
}
|
|
|
//获取时间段
|