This commit is contained in:
mkm 2024-01-16 14:04:31 +08:00
parent 3cf07b733c
commit 1451ade02a

View File

@ -617,6 +617,9 @@ class Project extends BasicApi
}
/**
* 获取当前定位人员
*/
public function positioning_member(){
$code=Request::post('code');
$date=Request::post('date');
@ -624,7 +627,9 @@ class Project extends BasicApi
$this->error('参数错误');
}
if($date==''){
$select=Db::name('positioning')->where(['member_code'=>$code])->whereTime('date','today')->column('positioning');
$date=date('Y-m-d H:i:s');
$end=date('Y-m-d H:i:s',time()-300);
$select=Db::name('positioning')->where(['member_code'=>$code])->whereTime('date',[$end,$date])->column('positioning');
}else{
$select=Db::name('positioning')->where(['member_code'=>$code])->whereBetweenTime('date',$date)->column('positioning');
}