This commit is contained in:
weiz 2024-01-24 10:47:03 +08:00
parent 1bf59b138a
commit 44ba741552

View File

@ -65,12 +65,13 @@ class ProjectAttendanceRecordLists extends BaseAdminDataLists implements ListsSe
$project = Project::field('name,project_code')->where('id',$item['project_id'])->findOrEmpty();
$item['project_name'] = $project['name'];
$item['project_code'] = $project['project_code'];
$item['work_record_num_total'] = ProjectAttendanceDetail::field('id')->where('attendance_id',$item['id'])->sum('work_record_num');
$item['daily_salary_total'] = ProjectAttendanceDetail::field('id')->where('attendance_id',$item['id'])->sum('daily_salary');
$item['daily_living_total'] = ProjectAttendanceDetail::field('id')->where('attendance_id',$item['id'])->sum('daily_living');
$item['daily_subsidy_total'] = ProjectAttendanceDetail::field('id')->where('attendance_id',$item['id'])->sum('daily_subsidy');
$item['daily_other_total'] = ProjectAttendanceDetail::field('id')->where('attendance_id',$item['id'])->sum('daily_other');
$item['daily_income_total'] = ProjectAttendanceDetail::field('id')->where('attendance_id',$item['id'])->sum('daily_income');
$item['work_record_num_total'] = ProjectAttendanceDetail::field('id')->where('attendance_id',$item['id'])->where('attendance_date',$item['attendance_date'])->sum('work_record_num');
$item['daily_salary_total'] = ProjectAttendanceDetail::field('id')->where('attendance_id',$item['id'])->where('attendance_date',$item['attendance_date'])->sum('daily_salary');
$item['daily_living_total'] = ProjectAttendanceDetail::field('id')->where('attendance_id',$item['id'])->where('attendance_date',$item['attendance_date'])->sum('daily_living');
$item['daily_subsidy_total'] = ProjectAttendanceDetail::field('id')->where('attendance_id',$item['id'])->where('attendance_date',$item['attendance_date'])->sum('daily_subsidy');
$item['daily_other_total'] = ProjectAttendanceDetail::field('id')->where('attendance_id',$item['id'])->where('attendance_date',$item['attendance_date'])->sum('daily_other');
$item['daily_income_total'] = ProjectAttendanceDetail::field('id')->where('attendance_id',$item['id'])->where('attendance_date',$item['attendance_date'])->sum('daily_income');
$item['cqrs'] = ProjectAttendanceDetail::field('id')->where('attendance_id',$item['id'])->where('attendance_date',$item['attendance_date'])->count();
return $item;
})
->toArray();