update
This commit is contained in:
parent
f52132acf0
commit
ab267c1760
@ -103,6 +103,13 @@ class OaScheduleController extends BaseAdminController
|
||||
$result = OaScheduleLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
public function calendar(){
|
||||
$params = (new OaScheduleValidate())->get()->goCheck('calendar');
|
||||
$params['admin_id'] = $this->adminId;
|
||||
$result = OaScheduleLogic::calendar($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -119,4 +119,21 @@ class OaScheduleLogic extends BaseLogic
|
||||
$data['labor_type_text'] = $data->labor_type_text;
|
||||
return $data->toArray();
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 获取工作记录日历
|
||||
* @param $params
|
||||
* @return array
|
||||
* @author likeadmin
|
||||
* @date 2024/05/23 11:53
|
||||
*/
|
||||
public static function calendar($params){
|
||||
$where[] = [
|
||||
['admin_id','=',$params['admin_id']],
|
||||
['start_time','>=',strtotime($params['start_time'])],
|
||||
['end_time','<=',strtotime($params['end_time'])]
|
||||
];
|
||||
$data = OaSchedule::where($where)->select()->toArray();
|
||||
return $data;
|
||||
}
|
||||
}
|
@ -100,5 +100,10 @@ class OaScheduleValidate extends BaseValidate
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
public function sceneCalendar()
|
||||
{
|
||||
return $this->only(['start_time','end_time']);
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user