386 Commits

Author SHA1 Message Date
8be54c3b8b feat(WEB): 절곡품 선생산→재고적재 Phase 1 - 생산입고 기반 구축
- StockTransaction: REASON_PRODUCTION_OUTPUT 상수 및 '생산입고' 라벨 추가
- StockLot: work_order_id FK 컬럼 마이그레이션 + 모델 fillable/casts/relation 추가
- StockService: increaseFromProduction() 메서드 구현 (increaseFromReceiving 기반)
- WorkOrderService: 완료 시 sales_order_id 유무에 따라 출하/재고입고 분기
  - stockInFromProduction(): 품목별 양품 재고 입고 처리
  - shouldStockIn(): items.options 기반 입고 대상 판단

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 04:19:47 +09:00
김보곤
83ddfabd7c fix: [card] 카드 상세 수정/저장 누락 필드 9개 보강
- 마이그레이션: card_type, alias, cvc_encrypted, payment_day, total_limit, used_amount, remaining_limit, is_manual, memo 컬럼 추가
- Card 모델: $fillable, $casts, $hidden 확장 + CVC 암호화/복호화 메서드 추가
- CardService: store(), update() 메서드에 9개 필드 처리 로직 추가
- StoreCardRequest, UpdateCardRequest: 9개 필드 검증 규칙 추가
2026-02-21 17:19:18 +09:00
김보곤
ee72af10b4 feat:홈택스 세금계산서 거래처 상세정보 컬럼 추가 (종사업장번호, 주소, 업태, 종목, 이메일)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 10:51:12 +09:00
edb81a1041 feat: work_orders 테이블에 options JSON 컬럼 추가
- 마이그레이션: work_orders.options JSON nullable 컬럼 추가
- WorkOrder 모델: $fillable, $casts에 options 추가
- bending_info 등 작업지시 레벨 추가 옵션 저장용

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 10:50:23 +09:00
김보곤
e3d5303167 feat:법인카드 결제 항목(items) JSON 컬럼 추가 마이그레이션
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 10:32:55 +09:00
김보곤
7472264364 feat:barobill_bank_transactions에 거래처코드(client_code, client_name) 컬럼 추가
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 21:18:22 +09:00
김보곤
8dbe5dffe4 feat:바로빌 계좌 거래 동기화 상태 테이블 마이그레이션 추가
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 21:00:47 +09:00
김보곤
f1dc2d8bbe feat:sales_tenant_managements 테이블에 handover_at 컬럼 추가
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 16:31:20 +09:00
1f848ad291 fix:트리거 감사로그 created_at 단독 인덱스 추가
- ORDER BY created_at DESC 쿼리 성능 개선
- 기존 복합 인덱스만으로는 단독 정렬에 활용 불가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 13:34:37 +09:00
6ac3f0c860 feat: 트리거 감사로그 operation_id 컬럼 추가 및 요청별 UUID 설정
- trigger_audit_logs 테이블에 operation_id(VARCHAR 36) 컬럼 추가
- ix_trig_operation 인덱스 생성 (일괄 롤백 조회용)
- SetAuditSessionVariables 미들웨어에서 요청마다 @sam_operation_id UUID 설정

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 11:22:08 +09:00
김보곤
cc5fe61fcd fix:거래처 업태/종목 컬럼 크기 확장 (varchar 20/50 → 100)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 10:00:55 +09:00
김보곤
c290c99cc4 feat:tutorial_videos 테이블 마이그레이션 추가
사용자 매뉴얼 영상 자동 생성 기능을 위한 DB 테이블 생성

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 15:56:28 +09:00
김보곤
6874754b92 feat:video_generations 테이블에 gcs_path 컬럼 추가
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 11:11:09 +09:00
김보곤
d97130fc3a feat:video_generations 테이블 마이그레이션 추가 (YouTube Shorts AI)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 08:46:34 +09:00
김보곤
f3ab7525e2 feat:단체(그룹) 수당 체계 지원을 위한 마이그레이션 추가
sales_partners에 referrer_partner_id, sales_commissions에 유치수당 관련 컬럼 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 19:42:38 +09:00
김보곤
9f3a743988 feat:esign_contracts 테이블에 send_method, sms_fallback 컬럼 추가
- send_method: 발송 방식 (alimtalk/email/both), 기본값 alimtalk
- sms_fallback: SMS 대체발송 여부, 기본값 true

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 16:13:24 +09:00
김보곤
80c1e4aeae feat:sales_partners 테이블에 상호/사업자등록번호/주소 컬럼 추가
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 16:13:24 +09:00
김보곤
2dacefd14f feat:E-Sign 필드 text_align 컬럼 추가 (좌/중/우 정렬 지원)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 16:13:24 +09:00
김보곤
9c19536423 feat:거래처 테이블에 매출/매입 구분(trade_type) 컬럼 추가
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 11:27:37 +09:00
김보곤
6d4e5b740b feat:거래처 테이블에 대표자(ceo), 주소(address) 컬럼 추가
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 11:22:29 +09:00
김보곤
cd20f8d73f feat:E-Sign 템플릿 변수 시스템 추가 (마이그레이션+모델)
- field_variable, metadata, variables 컬럼 마이그레이션 추가
- EsignContract 모델에 metadata (JSON cast) 추가
- EsignSignField 모델에 field_variable 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 11:22:28 +09:00
김보곤
ef23b9dda6 feat:E-Sign 필드에 font_size 컬럼 추가
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 11:22:28 +09:00
김보곤
c7c9c3838d feat:E-Sign 필드 템플릿 PDF 파일 컬럼 추가
- esign_field_templates 테이블에 file_path, file_name, file_hash, file_size 컬럼 추가
- 템플릿에 PDF 파일을 포함할 수 있도록 스키마 확장

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 11:22:28 +09:00
4ecf16d387 fix:quote_revisions 조회 시 MySQL Out of sort memory 에러 해결
- quote_revisions(quote_id, tenant_id, revision_number) 복합 인덱스 추가
- previous_data JSON 대용량 컬럼 포함 정렬 시 filesort OOM 방지

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 09:29:43 +09:00
f28bbc2a74 fix:quotes 목록 조회 시 MySQL Out of sort memory 에러 해결
- quotes(tenant_id, registration_date, id) 복합 인덱스 추가
- ORDER BY registration_date DESC, id DESC 정렬 시 filesort 제거

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 09:23:50 +09:00
5eaa65cc9c Merge remote-tracking branch 'origin/develop' into develop 2026-02-13 03:44:34 +09:00
fc4fad6e75 refactor:공정 단계 completion_type 한글→영문 코드 전환
- completion_type 값을 한글(클릭 시 완료)에서 영문 코드(click_complete)로 변환
- FormRequest에 in 검증 규칙 추가 (click_complete, selection_complete, inspection_complete)
- 기존 데이터 마이그레이션 포함

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 03:41:41 +09:00
e4c53c7b17 feat:개소별 자재 투입 관리 API 추가
- work_order_material_inputs 테이블 신규 생성 (개소별 자재 투입 추적)
- 개소별 자재 조회/투입/이력/삭제/수정 API 5개 추가
- StockService.increaseToLot: LOT 수량 복원 메서드 추가
- WorkOrderService에 개소별 자재 투입 비즈니스 로직 구현
- WorkOrder, WorkOrderItem 모델에 materialInputs 관계 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 03:41:35 +09:00
김보곤
a13e694174 feat:E-Sign 필드 템플릿 category 컬럼 추가 마이그레이션
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 18:54:58 +09:00
김보곤
57879f7673 feat:E-Sign 필드 템플릿 테이블 마이그레이션 추가
- esign_field_templates: 필드 배치 템플릿 저장
- esign_field_template_items: 템플릿 내 개별 필드 정보

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 18:02:25 +09:00
김보곤
6958be1fd8 feat:E-Sign 전자계약 서명 솔루션 백엔드 구현
- 마이그레이션 4개 (esign_contracts, esign_signers, esign_sign_fields, esign_audit_logs)
- 모델 4개 (EsignContract, EsignSigner, EsignSignField, EsignAuditLog)
- 서비스 4개 (EsignContractService, EsignSignService, EsignPdfService, EsignAuditService)
- 컨트롤러 2개 (EsignContractController, EsignSignController)
- FormRequest 4개 (ContractStore, FieldConfigure, SignSubmit, SignReject)
- Mail 1개 (EsignRequestMail + 이메일 템플릿)
- API 라우트 (인증 계약 관리 + 토큰 기반 서명 프로세스)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 07:02:39 +09:00
김보곤
818f764aa5 fix:사진대지 감사 로그 트리거 재생성 (삭제된 컬럼 참조 제거)
컬럼 삭제 후 트리거가 before_photo_path 등을 참조하여 UPDATE 시 에러 발생 수정

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 19:28:24 +09:00
김보곤
eade587135 feat:공사현장 사진대지 멀티행 테이블 마이그레이션
construction_site_photo_rows 테이블 생성 + 기존 데이터 마이그레이션 + 부모 테이블 사진 컬럼 삭제

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 18:05:06 +09:00
a3a4e18e8a feat(API): 문서 템플릿 기본필드 field_key $fillable 추가
- DocumentTemplateBasicField 모델에 field_key 필드 추가
- Mass Assignment 보호로 field_key 저장 누락 방지

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 15:58:37 +09:00
8b78d62068 feat(API): 공정 options JSON 컬럼 마이그레이션
- needs_work_log 개별 컬럼 → options JSON 구조로 전환
- StoreProcessRequest, UpdateProcessRequest 유효성 규칙 갱신
- Process 모델 $fillable, $casts 갱신

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 15:58:35 +09:00
12053386f6 Merge remote-tracking branch 'origin/develop' into develop 2026-02-11 11:03:58 +09:00
김보곤
bf3ee24314 feat:법인카드 선불결제 테이블 마이그레이션 추가
corporate_card_prepayments 테이블 생성 (tenant_id, year_month, amount, memo)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 10:24:28 +09:00
1d7ef66d19 feat: 작업일지/중간검사 설정을 ProcessStep → Process 레벨로 이동
- Process 모델에 document_template_id, needs_work_log, work_log_template_id 추가
- ProcessStep에서 해당 필드 제거
- WorkOrderService의 검사 관련 3개 메서드(getInspectionTemplate, resolveInspectionDocument, createInspectionDocument) 공정 레벨 참조로 변경
- ProcessService eager loading에 documentTemplate, workLogTemplateRelation 추가
- FormRequest 검증 규칙 이동 (ProcessStep → Process)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 09:51:35 +09:00
김보곤
d0418eeb85 feat:journal_entries에 source_type, source_key 컬럼 추가
- 원본 거래 추적용 source_type(bank_transaction, hometax_invoice, manual) 컬럼 추가
- 원본 거래 고유키 source_key 컬럼 추가
- tenant_id + source_type + source_key 복합 인덱스 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 17:58:20 +09:00
d8fd221278 Merge remote-tracking branch 'origin/develop' into develop 2026-02-10 10:27:26 +09:00
김보곤
ac83d0bddc Merge branch 'develop' of http://114.203.209.83:3000/SamProject/sam-api into develop 2026-02-10 10:02:16 +09:00
김보곤
6c186c91ab feat:회의록 테이블 마이그레이션 추가 (meeting_minutes, meeting_minute_segments)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 09:50:14 +09:00
e885b1ca45 feat(API): 중간검사 문서 템플릿 동적 연동 - process_steps ↔ document_templates 연결
- process_steps 테이블에 document_template_id FK 추가 (migration)
- ProcessStep 모델에 documentTemplate BelongsTo 관계 추가
- ProcessStepService에서 documentTemplate eager loading
- StoreProcessStepRequest/UpdateProcessStepRequest에 document_template_id 유효성 검증
- WorkOrderService에 getInspectionTemplate(), createInspectionDocument() 메서드 추가
- WorkOrderController에 inspection-template/inspection-document 엔드포인트 추가
- DocumentService.formatTemplateForReact() 접근자 public으로 변경
- i18n 메시지 키 추가 (inspection_document_created, no_inspection_template)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 08:35:57 +09:00
7adfc6d536 Merge remote-tracking branch 'origin/develop' into develop 2026-02-09 21:32:54 +09:00
김보곤
4c02ff64f1 feat:공사현장 사진대지 테이블 마이그레이션 추가
construction_site_photos 테이블 생성 (현장명, 작업일자, 작업전/작업중/작업후 사진 GCS 경로)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 21:25:03 +09:00
61c70b6fd1 Merge remote-tracking branch 'origin/develop' into develop 2026-02-09 18:03:59 +09:00
김보곤
0bd470a6f8 feat:홈택스 세금계산서 분개 테이블 마이그레이션 추가
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 17:13:26 +09:00
9bae7fccae feat: 트리거 감사 로그 Swagger 문서 추가 및 api_request_logs 제외
- TriggerAuditLogApi.php Swagger 파일 생성 (6개 엔드포인트 문서화)
  - 목록 조회, 통계, 상세, 레코드 이력, 롤백 미리보기, 롤백 실행
- api_request_logs를 트리거 제외 테이블 목록에 추가
- Pint 포매팅 적용

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 16:55:34 +09:00
f9de25257f Merge remote-tracking branch 'origin/develop' into develop 2026-02-09 10:46:09 +09:00
김보곤
e9faac5c9d feat:AI 토큰 단가 설정 기능 추가 (DB 기반)
- ai_pricing_configs 테이블 마이그레이션 생성 (기본 시드 데이터 포함)
- AiPricingConfig 모델 추가 (캐시 적용 단가/환율 조회)
- AiReportService 하드코딩 단가를 DB 조회로 변경

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 09:33:49 +09:00