12345678910111213141516171819202122232425262728293031323334 |
- <?php
- namespace app\api\controller\v1;
- use app\api\controller\Base;
- use app\hander\HelpHander;
- class AttendanceRecord extends Base
- {
- //手机打卡
- public function save(){
- $data = [
- 'lat' => input('lat','','trim'),
- 'lng' => input('lng','','trim'),
- 'address' => input('address','','trim'),
- 'device_sn' => input('deviceSn','','trim'),
- 'signtime' => date('Y-m-d H:i:s'),
- 'user_id' => input('userId/d',0),
- 'org_id' => input('orgId/d',0),
- 'remark' => input('remark','','trim'),
- ];
- model('AttendanceRecord')->sjsign($data);
- HelpHander::success([],'操作成功');
- }
- // 绑定设备
- public function bundleDevice(){
- $deviceSn = input('deviceSn','','trim');
- model('AttendanceRecord')->bundleDevice($this->userId,$deviceSn);
- HelpHander::success([],'操作成功');
- }
- }
|