Commit Graph

569 Commits

Author SHA1 Message Date
e06b0637fa feat: 문서 관리 시스템 Route 및 Swagger 구현 (Phase 1.8)
- Document API Route 등록 (CRUD 5개 엔드포인트)
- Swagger 문서 작성 (Document, DocumentApproval, DocumentData, DocumentAttachment 스키마)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-28 21:29:10 +09:00
9bceaab8a3 feat: 문서 관리 시스템 FormRequest 구현 (Phase 1.7)
- IndexRequest: 목록 조회 필터/페이징 검증
- StoreRequest: 문서 생성 검증 (템플릿, 데이터, 첨부파일)
- UpdateRequest: 문서 수정 검증

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-28 21:14:30 +09:00
b7f8157548 feat: 문서 관리 시스템 Controller 구현 (Phase 1.6)
- DocumentController CRUD 엔드포인트 구현
- 결재 워크플로우는 기존 시스템 연동을 위해 보류

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-28 21:11:40 +09:00
94612e3b50 refactor: Attendance store() 메서드를 Upsert 패턴으로 변경
- 같은 날 같은 사용자의 기록이 있으면 업데이트, 없으면 생성
- 기존 Create Only 패턴에서 Upsert 패턴으로 변경
- Swagger 문서 업데이트 (409 응답 제거, 설명 변경)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-28 21:09:53 +09:00
bacc42da73 feat: 문서 관리 시스템 Service 구현 (Phase 1.5)
- DocumentService 생성 (CRUD + 결재 워크플로우)
- 순차 결재 로직 구현 (submit/approve/reject/cancel)
- Multi-tenancy 및 DB 트랜잭션 지원

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-28 20:41:31 +09:00
2bce30056d feat: 문서 관리 시스템 모델 생성 (Phase 1.2)
- Document 모델 (상태 관리, 다형성 연결, 결재 처리)
- DocumentApproval 모델 (결재 단계, 상태 처리)
- DocumentData 모델 (EAV 패턴 데이터 저장)
- DocumentAttachment 모델 (파일 첨부 연결)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 19:57:22 +09:00
a96499a66d feat: API 라우터 분리 및 버전 폴백 시스템 구현
- api.php를 13개 도메인별 파일로 분리 (1,479줄 → 61줄)
- ApiVersionMiddleware 생성 (헤더/쿼리 기반 버전 선택)
- v2 요청 시 v2 없으면 v1으로 자동 폴백
- 지원 헤더: Accept-Version, X-API-Version, api_version 쿼리

분리된 도메인:
auth, admin, users, tenants, hr, finance, sales,
inventory, production, design, files, boards, common

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 17:30:19 +09:00
f74767563f feat: FCM 사용자별 타겟 알림 발송 기능 추가
- today_issues 테이블에 target_user_id 컬럼 추가 (마이그레이션)
- TodayIssue 모델: target_user_id 필드, targetUser 관계, forUser/targetedTo 스코프 추가
- TodayIssue 모델: 기안 상태 뱃지 상수 추가 (BADGE_DRAFT_APPROVED/REJECTED/COMPLETED)
- TodayIssueObserverService: createIssueWithFcm, sendFcmNotification, getEnabledUserTokens에 targetUserId 파라미터 추가
- TodayIssueObserverService: handleApprovalStepChange - 결재자에게만 발송
- TodayIssueObserverService: handleApprovalStatusChange 추가 - 기안자에게만 발송
- ApprovalIssueObserver 신규 생성 및 AppServiceProvider에 등록
- i18n: 기안 승인/반려/완료 알림 메시지 추가

결재요청은 결재자(ApprovalStep.user_id)에게만,
기안 승인/반려는 기안자(Approval.drafter_id)에게만 FCM 발송

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 13:57:46 +09:00
518ae4657e fix: 오늘의 이슈 뱃지 타입 source_type 기반 매핑
- TodayIssue 모델에 SOURCE_TO_BADGE 매핑 상수 추가
- TodayIssueService에서 source_type 기반 badge 매핑 적용
- 입금/출금 소스 타입 및 뱃지 상수 추가

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 22:40:54 +09:00
3917ea3831 fix: 거래처 연체/악성채권 저장 버그 수정
- ClientUpdateRequest, ClientStoreRequest에 is_overdue 필드 추가
  - FormRequest rules에 누락되어 프론트엔드 값이 필터링됨
- ClientService.update()에 bad_debt 토글 연동 로직 추가
  - bad_debt=true → BadDebt 레코드 생성 (status: collecting)
  - bad_debt=false → BadDebt 레코드 종료 (status: recovered)
- ClientService의 has_bad_debt 판단 로직 수정
  - 기존: sum(debt_amount) > 0
  - 변경: exists() - 금액과 무관하게 레코드 존재 여부로 판단

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 22:39:04 +09:00
51b23adcfe fix: 오늘의 이슈 오늘 날짜만 표시하도록 수정
- TodayIssue 모델에 scopeToday() 스코프 추가
- TodayIssueService::summary()에 오늘 날짜 필터 적용
- 전체 개수 계산에도 오늘 날짜 필터 적용

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-27 21:10:50 +09:00
a9cdf004e3 fix: 게시판 코드 기반 조회 라우트 추가
- BoardController에 showByCode(string $code) 메서드 추가
- GET /api/v1/boards/{code} 라우트 등록
- 기존 ID 기반 조회와 코드 기반 조회 분리

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-27 15:24:35 +09:00
8a1e78ec72 feat: 견적 V2 동적 카테고리 시스템 구현
- CategoryService: tree 메서드에 code_group 필터 지원 추가
- FormulaEvaluatorService: 하드코딩된 process_type을 동적 카테고리로 변경
  - groupItemsByProcess(): item_category 필드 기반 그룹화
  - getItemCategoryTree(): DB에서 카테고리 트리 조회
  - buildCategoryMapping(): BENDING 하위 카테고리 처리
  - addProcessGroupToItems(): category_code 필드 추가 (레거시 호환 유지)
- QuoteItemCategorySeeder: 품목 카테고리 초기 데이터 시더 추가
  - BODY, BENDING(하위 3개), MOTOR_CTRL, ACCESSORY

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-27 15:17:30 +09:00
유병철
4c22b74b27 feat: 출퇴근 설정에 자동 출퇴근 사용 여부 필드 추가
- attendance_settings 테이블에 use_auto 컬럼 추가
- AttendanceSetting 모델에 use_auto 필드 추가 (fillable, casts, attributes)
- UpdateAttendanceSettingRequest에 use_auto 유효성 검사 추가

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 14:47:39 +09:00
22f7e9d94a fix: FULLTEXT 검색을 LIKE 검색으로 롤백
- 개발 서버에 FULLTEXT 인덱스 미설치로 500 에러 발생
- 기존 LIKE 검색 방식으로 복원

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 13:55:12 +09:00
3ff3c65ade feat: 품목 조회 시 BOM 유무 필터 및 코드+이름 형식 지원
- has_bom 파라미터 추가 (1: BOM 있는 품목만, 0: BOM 없는 품목만)
- JSON_LENGTH 활용한 BOM 유무 필터링 구현
- name 필드를 "코드 이름" 형식으로 반환 (일시적 변경)
- FULLTEXT 인덱스 활용 검색 개선 (BOOLEAN MODE)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 12:47:38 +09:00
6d05ab815f feat:테넌트설정 API 및 다수 서비스 개선
- TenantSetting CRUD API 추가
- Calendar, Entertainment, VAT 서비스 개선
- 5130 BOM 계산 로직 수정
- quote_items에 item_type 컬럼 추가
- tenant_settings 테이블 마이그레이션
- Swagger 문서 업데이트
2026-01-26 20:29:22 +09:00
f2da990771 fix: 견적 V2 BOM 계산 오류 수정
- ItemService.php: has_bom 계산 필드 추가 (BOM 필터링용)
- FormulaEvaluatorService.php: process_group 필드 추가 (공정별 그룹핑)

관련: 견적 V2 자동 견적 산출 4가지 오류 수정

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 16:12:45 +09:00
09db0da43b feat(API): 부실채권, 재고, 입고 기능 개선
- BadDebt 컨트롤러/서비스 기능 확장
- StockService 재고 조회 로직 개선
- ProcessReceivingRequest 검증 규칙 수정
- Item, Order, CommonCode, Shipment 모델 업데이트
- TodayIssueObserverService 개선

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 21:32:23 +09:00
5104a6641c fix(API): 입고처리 receiving_location 필드 null 처리
- nullable 필드 접근 시 undefined array key 에러 수정
- null 병합 연산자 적용

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 21:30:45 +09:00
758ce2b988 feat(api): 특정 IP에서 발생하는 예외 슬랙/로그 제외 기능
- EXCEPTION_IGNORED_IPS 환경변수로 무시할 IP 목록 관리
- 해당 IP에서 '회원정보 정보 없음' 예외 발생 시 슬랙/로그 건너뜀
- 사무실/개발자 IP에서 발생하는 불필요한 알림 방지

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-23 21:08:52 +09:00
131c0fc5dc feat(api): 예상비용 동기화 커맨드 및 서비스 개선
- SyncExpectedExpensesCommand 추가
- ExpectedExpenseService 로직 개선
- LOGICAL_RELATIONSHIPS 문서 업데이트

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 15:38:32 +09:00
8c77d1b32b feat: 신규거래처 알림 메시지 간소화 및 신용평가 모달 경로 수정
- 알림 메시지: "신규 거래처 :name 등록 완료" → ":name 등록"
- 모달 파라미터: openModal=credit → modal=credit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-23 14:11:02 +09:00
222880479d fix: 신규 거래처 알림 클릭 시 신용평가 모달 자동 오픈
- TodayIssueObserverService에서 신규 거래처 알림 경로에 ?openModal=credit 파라미터 추가
- 알림 클릭 시 거래처 상세 페이지로 이동하면서 신용분석 모달 자동 오픈

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-23 13:11:52 +09:00
a7dcdd2469 fix: 헤더 알람 경로를 상세 페이지로 수정
- 입금: /accounting/deposit-management → /accounting/deposits/{id}
- 출금: /accounting/withdrawal-management → /accounting/withdrawals/{id}
- 수주: /sales/order-management-sales → /sales/order-management-sales/{id}
- 미수금: /accounting/receivables-status → /accounting/bad-debt-collection/{id}
- 재고: /material/stock-status → /material/stock-status/{id}
- 신규거래처: /accounting/vendors → /accounting/vendors/{id}

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-23 11:22:13 +09:00
fa210b91c2 feat: 예상 지출 자동 동기화 Observer 구현
- expected_expenses 테이블에 source_type, source_id 컬럼 추가
- PurchaseExpenseSyncObserver: 매입 → 예상 지출 동기화
- WithdrawalExpenseSyncObserver: 카드결제만 → 예상 지출 동기화
- BillExpenseSyncObserver: 발행어음만 → 예상 지출 동기화
- 생성/수정/삭제/복원/강제삭제 이벤트 모두 처리
- 조건 변경 시 자동 동기화 해제 (카드→현금, 발행→수취)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-23 11:06:06 +09:00
73e49f2736 fix(API): FCM 알림 채널 매핑 수정
- TodayIssue IMPORTANT_NOTIFICATIONS에서 deposit, withdrawal 제거
- notification_type별 채널 매핑 메서드 추가
  - new_vendor → push_urgent (긴급/신규업체)
  - approval_request → push_payment (결재)
  - sales_order → push_sales_order (수주)
  - purchase_order → push_purchase_order (발주)
  - contract → push_contract (계약)
  - 나머지 → push_default (일반)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-23 10:14:35 +09:00
d75f6f5bd1 feat(API): 입금/출금 알림 Observer 추가 및 LoanController 수정
- DepositIssueObserver, WithdrawalIssueObserver 신규 추가
- TodayIssueObserverService에 입금/출금 핸들러 및 디버그 로그 추가
- TodayIssue 모델에 입금/출금 상수 추가
- AppServiceProvider에 Observer 등록
- ApprovalService에 기존 결재선 사용 시 수동 알림 트리거 추가
- LoanController ApiResponse::handle() → ApiResponse::success() 수정

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-23 10:05:50 +09:00
fabf302e1f fix(API): 당월 매입 상세 API 응답 필드명 수정
- summary.current_month_total → current_month_amount 변경
- summary.previous_month_total → previous_month_amount 변경
- monthly_trend[].month → label 변경 ("2025-07" → "7월")
- by_type[].label → type_label 변경
- by_type[].color 필드 추가 (차트 색상)
- items[].date → purchase_date 변경

프론트엔드 transformer와 API 응답 구조 일치

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-23 09:08:37 +09:00
871db32e04 feat(API): 결재함 및 대시보드 관련 개선
- ApprovalService: inbox 쿼리에 결재자 상세 정보 추가 (직책, 부서)
- PurchaseController: dashboardDetail 엔드포인트 추가
- CardTransactionService: 당월 이용 건수 추가
- SaleService: 대시보드 조회 개선
- LOGICAL_RELATIONSHIPS.md 업데이트

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 23:19:05 +09:00
5ac83399b3 feat(API): CEO 대시보드 지출내역 상세 조회 API 추가
- BillService: 발행어음 대시보드 상세 조회 (me3 모달용)
- WelfareService: 직원 수/급여 총액 조회 로직 개선 (salaries 테이블 기반)
- BillApi/ExpectedExpenseApi: Swagger 스키마 추가

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 23:18:33 +09:00
a994f27696 fix: 당월 예상 지출 모달 데이터 불일치 수정
- dashboardDetail() 메서드에 transaction_type 파라미터 추가
- 카드별 필터링 지원 (purchase, card, bill, null=전체)
- 카드 금액과 모달 금액이 동일한 데이터 소스 사용하도록 개선

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-22 23:16:49 +09:00
f089843e1e feat: 세금 시뮬레이션 API 개발 (Phase 1.3)
- LoanService에 taxSimulation() 메서드 추가
- LoanController에 taxSimulation() 액션 추가
- GET /api/v1/loans/tax-simulation 라우트 등록
- Swagger LoanTaxSimulation 스키마 및 엔드포인트 문서화
- 법인세/소득세 비교 분석 데이터 제공

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-22 22:47:59 +09:00
7162fc2b46 feat: 매입관리 품의서/지출결의서 연동 기능 추가
- purchases 테이블에 approval_id 컬럼 추가 (마이그레이션)
- Purchase 모델에 approval 관계 정의
- PurchaseService에서 approval 데이터 eager loading 구현
- FormRequest에 approval_id 유효성 검증 추가
- Swagger 문서에 approval 관련 스키마 추가

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 22:47:25 +09:00
9197fe66f7 feat: 가지급금 대시보드 API 개발 (Phase 1.2)
- LoanService.dashboard() 메서드 추가 (요약 + 목록)
- LoanController.dashboard() 액션 추가
- GET /api/v1/loans/dashboard 라우트 등록
- Swagger LoanDashboard 스키마 및 엔드포인트 문서화

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-22 22:40:00 +09:00
161b353b1c feat(API): 복리후생비 상세 API 추가 (/welfare/detail)
- WelfareService: getDetail() 메서드 및 헬퍼 메서드 추가
  - getAccountBalance(), getMonthlyUsageTrend()
  - getCategoryDistribution(), getTransactions()
  - getQuarterlyStatus()
- WelfareController: detail() 액션 추가
- routes/api.php: /welfare/detail 라우트 등록
- Swagger: WelfareDetailResponse 및 관련 스키마 7개 추가

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-22 22:35:20 +09:00
857192e8ac feat(API): 카드 거래 대시보드 API 신규 추가
- GET /api/v1/card-transactions/dashboard 엔드포인트 추가
- 월별 추이, 사용자별 비율, 최근 거래 목록 포함
- CEO 대시보드 cm1 모달용 데이터 제공

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-22 22:28:41 +09:00
f85e070913 feat(API): 카드 거래 등록/수정/삭제 API 추가
- CardTransactionService: store, update, destroy 메서드 추가
- CardTransactionController: store, update, destroy 메서드 추가
- routes/api.php: POST, PUT/{id}, DELETE/{id} 라우트 추가

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 20:49:29 +09:00
57229b3cc6 fix: API 에러 코드 표시 및 오늘의 이슈 시간 포맷 수정
- ApiResponse::error() 메시지에 상태 코드 포함 ([{code}] {message})
- TodayIssueService 시간 포맷을 상대시간에서 실제시간으로 변경
  - 오늘: "14:30"
  - 어제: "어제 14:30"
  - 그 외: "1/22 14:30"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 20:48:43 +09:00
6477cd8f78 feat: 수주확정 시 매출 자동 생성 기능 구현
- updateStatus 메서드에서 CONFIRMED 전환 시 매출 자동 생성
- sales_recognition = 'on_order_confirm' 설정된 수주만 해당
- createSaleFromOrder() 메서드 추가 (수주→매출 변환)
- generateSaleNumber() 메서드 추가 (SAL-YYYYMM-NNNN 형식)
- 생성된 매출은 order.sale_id에 자동 연결

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 19:17:34 +09:00
15e2c4b788 fix: 수주확정 되돌리기 시 매출 연동 해지 처리
- revertOrderConfirmation 메서드에 매출 연동 해지 로직 추가
- 수주확정 시 생성된 매출(source_type=order_confirm, status=draft)만 삭제
- 이미 확정된 매출은 연결만 해지하고 삭제하지 않음
- DB 트랜잭션으로 원자성 보장

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 18:46:39 +09:00
c8d7990313 feat: 수주(Order) ↔ 매출(Sale) 연동 스키마 구현
- sales 테이블: order_id, shipment_id, source_type 컬럼 추가
- orders 테이블: sales_recognition, sale_id 컬럼 추가
- Sale 모델: order(), shipment() 관계 및 createFromOrder/Shipment 팩토리 메서드
- Order 모델: sale(), sales() 관계 및 shouldCreateSaleOnConfirm/Shipment 헬퍼
- 매출 인식 시점: 수주확정 시 / 출하완료 시 / 수동 선택 가능

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 17:23:36 +09:00
d186a0c111 오늘 이슈(TodayIssue) 기능 구현
- TodayIssue 모델 및 마이그레이션 추가
- TodayIssueController, TodayIssueService 구현
- TodayIssueObserverService 및 Observer 패턴 적용
- DailyReportService 연동
- Swagger API 문서 업데이트
- 라우트 추가
2026-01-22 09:47:29 +09:00
289fd3744c feat: Schedule 테이블 및 글로벌 일정 시스템 구현
- schedules 테이블 마이그레이션 추가 (tenant_id NULL 허용)
- Schedule 모델 생성 (type/recurrence 상수, forTenant 스코프)
- CalendarService에 getGeneralSchedules 메서드 추가
- StatusBoardService 하드코딩된 부가세 마감일 → Schedule 조회로 변경
- TaxScheduleSeeder 추가 (분기별 부가세 신고 마감일)
- i18n tax_no_schedule 키 추가
2026-01-21 20:46:53 +09:00
e0dc8291fa fix: EntertainmentService Python 스타일 포맷팅 수정
- {:.0f}% → round() 함수 사용으로 변경
- PHP 문법에 맞는 문자열 보간 적용
2026-01-21 10:43:06 +09:00
ef6b1330fc fix: EntertainmentService order_date → received_at 컬럼 수정 2026-01-21 10:39:54 +09:00
b6de7fc722 feat: expense_accounts 테이블 및 모델 생성 (복리후생비/접대비용) 2026-01-21 10:39:17 +09:00
ebc1794b56 fix: ApiResponse::handle() 호출 패턴 수정 (callable 사용) 2026-01-21 10:29:59 +09:00
ca833406a3 fix: ApiResponse import 경로 수정 (Http/Responses → Helpers) 2026-01-21 10:26:54 +09:00
f7850e43a7 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 문서 및 라우트 추가
2026-01-21 10:25:18 +09:00