feat: 공통 모듈 추가 (엑셀 내보내기, 계정과목 일괄변경)
Phase 0 - 공통 모듈: - ExportService.php 생성 (Maatwebsite/Excel 기반 엑셀 내보내기) - BulkUpdateAccountCodeRequest.php 생성 (계정과목 일괄변경 유효성 검사) Phase 1 - 계정과목 일괄변경: - WithdrawalController/Service: bulkUpdateAccountCode 메서드 추가 - DepositController/Service: bulkUpdateAccountCode 메서드 추가 - POST /v1/withdrawals/bulk-update-account-code - POST /v1/deposits/bulk-update-account-code Phase 2 - 엑셀 내보내기: - AttendanceController/Service: export, getExportData 메서드 추가 - SalaryController/Service: export, getExportData 메서드 추가 - GET /v1/attendances/export - GET /v1/salaries/export Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -179,6 +179,27 @@ public function destroy(int $id): bool
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 계정과목 일괄 변경
|
||||
*
|
||||
* @param array<int, int> $ids 변경할 출금 ID 목록
|
||||
* @param string $accountCode 새 계정과목 코드
|
||||
* @return int 변경된 레코드 수
|
||||
*/
|
||||
public function bulkUpdateAccountCode(array $ids, string $accountCode): int
|
||||
{
|
||||
$tenantId = $this->tenantId();
|
||||
$userId = $this->apiUserId();
|
||||
|
||||
return Withdrawal::query()
|
||||
->where('tenant_id', $tenantId)
|
||||
->whereIn('id', $ids)
|
||||
->update([
|
||||
'account_code' => $accountCode,
|
||||
'updated_by' => $userId,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 출금 요약 (기간별 합계)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user