feat: CEO 대시보드 API 구현 및 DB 컬럼 오류 수정
- StatusBoardService: 현황판 8개 항목 집계 API - CalendarService: 캘린더 일정 조회 API (작업지시/계약/휴가) - TodayIssueService: 오늘의 이슈 리스트 API - VatService: 부가세 신고 현황 API - EntertainmentService: 접대비 현황 API - WelfareService: 복리후생 현황 API 버그 수정: - orders 테이블 status → status_code 컬럼명 수정 - users 테이블 department 관계 → tenantProfile.department로 수정 - Swagger 문서 및 라우트 추가
This commit is contained in:
39
app/Http/Controllers/Api/V1/EntertainmentController.php
Normal file
39
app/Http/Controllers/Api/V1/EntertainmentController.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Api\V1;
|
||||
|
||||
use App\Helpers\ApiResponse;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\EntertainmentService;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
/**
|
||||
* 접대비 현황 컨트롤러
|
||||
*
|
||||
* CEO 대시보드용 접대비 현황 데이터를 제공합니다.
|
||||
*/
|
||||
class EntertainmentController extends Controller
|
||||
{
|
||||
public function __construct(
|
||||
private readonly EntertainmentService $entertainmentService
|
||||
) {}
|
||||
|
||||
/**
|
||||
* 접대비 현황 요약 조회
|
||||
*
|
||||
* @param Request $request
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function summary(Request $request): JsonResponse
|
||||
{
|
||||
$limitType = $request->query('limit_type', 'quarterly');
|
||||
$companyType = $request->query('company_type', 'medium');
|
||||
$year = $request->query('year') ? (int) $request->query('year') : null;
|
||||
$quarter = $request->query('quarter') ? (int) $request->query('quarter') : null;
|
||||
|
||||
$data = $this->entertainmentService->getSummary($limitType, $companyType, $year, $quarter);
|
||||
|
||||
return ApiResponse::handle($data, __('message.fetched'));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user