fix(打卡+薪资统计): 调整打卡和薪资逻辑
parent
1f9b6a8bd3
commit
79ca610e57
|
@ -593,7 +593,7 @@ class User extends Base
|
||||||
|
|
||||||
// 是否在打卡时间
|
// 是否在打卡时间
|
||||||
if (!Worksite::checkSignTime($input['worksite_id'], $input['type'])) {
|
if (!Worksite::checkSignTime($input['worksite_id'], $input['type'])) {
|
||||||
// return $this->json(4002, '不在打卡时间段!');
|
// return $this->json(4002, '不在打卡时间段!');
|
||||||
}
|
}
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
|
@ -687,6 +687,7 @@ class User extends Base
|
||||||
'day' => $day,
|
'day' => $day,
|
||||||
'role' => $customer['role'],
|
'role' => $customer['role'],
|
||||||
'is_replenish' => ClockLog::COMMON_ON,
|
'is_replenish' => ClockLog::COMMON_ON,
|
||||||
|
'need_statistic' => $customer['role'] == 1 ? ClockLog::COMMON_ON : ClockLog::COMMON_OFF,
|
||||||
'indexs' => $accountId.'-'.$input['worksite_id'].'-'.$day,
|
'indexs' => $accountId.'-'.$input['worksite_id'].'-'.$day,
|
||||||
];
|
];
|
||||||
ClockLog::create($data);
|
ClockLog::create($data);
|
||||||
|
|
|
@ -65,6 +65,8 @@ class Pay
|
||||||
->leftJoin('pay_log pl', 'pl.indexs = l.indexs')
|
->leftJoin('pay_log pl', 'pl.indexs = l.indexs')
|
||||||
->where('l.is_statistic', ClockLog::COMMON_OFF)
|
->where('l.is_statistic', ClockLog::COMMON_OFF)
|
||||||
->where('l.status', ClockLog::COMMON_ON)
|
->where('l.status', ClockLog::COMMON_ON)
|
||||||
|
->where('l.need_statistic', ClockLog::COMMON_ON)
|
||||||
|
->where('l.role', ClockLog::COMMON_ON)//工人
|
||||||
->where('a.pay', '>', 0)
|
->where('a.pay', '>', 0)
|
||||||
->where('l.handle_count', '<=', 10) //查询处理次数10次以下
|
->where('l.handle_count', '<=', 10) //查询处理次数10次以下
|
||||||
->where($where)
|
->where($where)
|
||||||
|
|
Loading…
Reference in New Issue