fix(接口): 用户打卡记录修改逻辑
parent
c70ae0ab83
commit
1ae1cbc429
|
@ -377,15 +377,11 @@ class User extends Base
|
|||
}
|
||||
|
||||
$where = [];
|
||||
// $where[] = ['cl.created_at', '>', date($day.' 00:00:00')];
|
||||
// $where[] = ['cl.created_at', '<', date($day.' 23:59:59')];
|
||||
|
||||
$dayInt = str_replace('-', '', $day);
|
||||
$where[] = ['cl.day', '=', $dayInt];
|
||||
$where[] = ['cl.account_id', '=', $accountId];
|
||||
if ($worksiteId) {
|
||||
$where[] = ['cl.worksite_id', '=', $worksiteId];
|
||||
}
|
||||
$where[] = ['cl.worksite_id', '=', $worksiteId ?: $account['worksite_id']];
|
||||
|
||||
$where[] = ['cl.role', '=', $account['role']];
|
||||
$limit = $account['role'] == Account::ROLE_NORMAL ? 4 : 0;//普通用户只展示最新4条 其他不限制
|
||||
|
@ -505,7 +501,7 @@ class User extends Base
|
|||
$where[] = ['cl.day', 'like', $ym.'%'];
|
||||
$where[] = ['cl.account_id', '=', $accountId];
|
||||
$where[] = ['cl.role', '=', $account['role']];
|
||||
$where[] = ['cl.worksite_id', '=', $worksiteId];
|
||||
$where[] = ['cl.worksite_id', '=', $worksiteId ?: $accountId['worksite_id']];
|
||||
$list = \app\model\ClockLog::alias('cl')
|
||||
->where($where)
|
||||
->select();
|
||||
|
|
Loading…
Reference in New Issue