...
|
...
|
@@ -1103,10 +1103,7 @@ class SecondController extends RestBaseController |
|
|
}
|
|
|
$config=cmf_get_option('site_info');
|
|
|
$adminStartTime=strtotime("$date $activity[start_clock_time]");
|
|
|
// dump("$date $activity[start_clock_time]");
|
|
|
// dump($adminStartTime-$config['before_start_time']*60);
|
|
|
// dump($config['before_start_time']);
|
|
|
// dump($config);
|
|
|
|
|
|
|
|
|
$now=time();
|
|
|
|
...
|
...
|
@@ -1120,7 +1117,7 @@ class SecondController extends RestBaseController |
|
|
}
|
|
|
$update['status']=1;
|
|
|
$update['user_start']=time();
|
|
|
$result=db('clock')->where('id',$data['id'])->update(['user_start'=>$now]);
|
|
|
$result=db('clock')->where('id',$data['id'])->update(['user_start'=>$now,'status'=>'1']);
|
|
|
$this->success('打卡成功!');
|
|
|
}
|
|
|
|
...
|
...
|
@@ -1162,7 +1159,7 @@ class SecondController extends RestBaseController |
|
|
}
|
|
|
$update['status']=2;
|
|
|
$update['user_end']=time();
|
|
|
$result=db('clock')->where('id',$data['id'])->update(['user_end'=>$now]);
|
|
|
$result=db('clock')->where('id',$data['id'])->update(['user_end'=>$now,'status'=>'2']);
|
|
|
if ($result==1){
|
|
|
|
|
|
}
|
...
|
...
|
@@ -1199,6 +1196,16 @@ class SecondController extends RestBaseController |
|
|
$config['distinct']=500;
|
|
|
}
|
|
|
$info['distance']=$config['distinct'];
|
|
|
if (!empty($info['user_start'])){
|
|
|
$info['start_status']='已打卡';
|
|
|
}else{
|
|
|
$info['start_status']='未打卡';
|
|
|
}
|
|
|
if (!empty($info['user_end'])){
|
|
|
$info['end_status']='已打卡';
|
|
|
}else{
|
|
|
$info['end_status']='未打卡';
|
|
|
}
|
|
|
|
|
|
$this->success('',$info);
|
|
|
}
|
...
|
...
|
|