fix(打卡+薪资统计): 调整打卡和薪资逻辑

master
yin5th 2023-01-13 16:18:38 +08:00
parent 1f9b6a8bd3
commit 79ca610e57
2 changed files with 19 additions and 16 deletions

View File

@ -593,7 +593,7 @@ class User extends Base
// 是否在打卡时间
if (!Worksite::checkSignTime($input['worksite_id'], $input['type'])) {
// return $this->json(4002, '不在打卡时间段!');
// return $this->json(4002, '不在打卡时间段!');
}
$data = [
@ -687,6 +687,7 @@ class User extends Base
'day' => $day,
'role' => $customer['role'],
'is_replenish' => ClockLog::COMMON_ON,
'need_statistic' => $customer['role'] == 1 ? ClockLog::COMMON_ON : ClockLog::COMMON_OFF,
'indexs' => $accountId.'-'.$input['worksite_id'].'-'.$day,
];
ClockLog::create($data);

View File

@ -65,6 +65,8 @@ class Pay
->leftJoin('pay_log pl', 'pl.indexs = l.indexs')
->where('l.is_statistic', ClockLog::COMMON_OFF)
->where('l.status', ClockLog::COMMON_ON)
->where('l.need_statistic', ClockLog::COMMON_ON)
->where('l.role', ClockLog::COMMON_ON)//工人
->where('a.pay', '>', 0)
->where('l.handle_count', '<=', 10) //查询处理次数10次以下
->where($where)