Files
sam-manage/app/Console/Commands/MarkAbsentEmployees.php
김보곤 adc587292f feat: [attendance] 근태관리 2차 고도화 8개 기능 구현
- 월간 캘린더 뷰 (사원별 필터, 날짜 클릭 등록, HTMX 월 이동)
- 일괄 등록 (다수 사원 체크박스 선택 후 일괄 등록, upsert 처리)
- 사원별 월간 요약 (상태별 카운트 + 총 근무시간 집계 테이블)
- 초과근무 알림 (주 48h 경고 / 52h 위험 배너)
- 근태 승인 워크플로우 (신청→승인→근태 레코드 자동 생성)
- 자동 결근 처리 (매일 23:50 스케줄러, 주말 제외)
- 연차 관리 연동 (휴가 등록 시 leave_balances 자동 차감)
- GPS 출퇴근 UI (테이블 GPS 아이콘 + 상세 모달)
- 탭 네비게이션 (목록/캘린더/요약/승인) HTMX 기반 전환
2026-02-26 21:29:25 +09:00

31 lines
882 B
PHP

<?php
namespace App\Console\Commands;
use App\Services\HR\AttendanceService;
use Illuminate\Console\Command;
class MarkAbsentEmployees extends Command
{
protected $signature = 'attendance:mark-absent {--date= : 대상 날짜 (YYYY-MM-DD), 기본값: 오늘}';
protected $description = '영업일에 출근 기록이 없는 사원을 자동 결근 처리';
public function handle(AttendanceService $service): int
{
$date = $this->option('date') ?: now()->toDateString();
$this->info("자동 결근 처리 시작: {$date}");
$count = $service->markAbsentees($date);
if ($count > 0) {
$this->info("{$count}명 결근 처리 완료");
} else {
$this->info('결근 처리 대상이 없습니다 (주말이거나 모든 사원에 기록이 있음)');
}
return self::SUCCESS;
}
}