- 삭제 불가 상태 추가 (생산중/생산완료/출하중/출하완료)
- 작업지시/출하 존재 시 삭제 차단 + 에러 메시지
- order_item_components → order_items → order_nodes → order 순차 soft delete
- DB 트랜잭션으로 원자성 보장
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- TriggerAuditLogApi.php Swagger 파일 생성 (6개 엔드포인트 문서화)
- 목록 조회, 통계, 상세, 레코드 이력, 롤백 미리보기, 롤백 실행
- api_request_logs를 트리거 제외 테이블 목록에 추가
- Pint 포매팅 적용
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
동일 자재가 여러 작업지시 품목에 걸쳐 있을 때 StockLot이 중복 표시되던 문제 수정.
Phase 1(유니크 자재 수집) → Phase 2(로트 조회) 구조로 변경하여 중복 제거 및 필요수량 합산.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- ai_pricing_configs 테이블 마이그레이션 생성 (기본 시드 데이터 포함)
- AiPricingConfig 모델 추가 (캐시 적용 단가/환율 조회)
- AiReportService 하드코딩 단가를 DB 조회로 변경
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- POST /work-orders/{id}/items/{itemId}/inspection: 품목별 검사 데이터 저장
- GET /work-orders/{id}/inspection-data: 전체 품목 검사 데이터 조회
- GET /work-orders/{id}/inspection-report: 검사 성적서용 데이터 조회
- WorkOrderItem 모델에 getInspectionData/setInspectionData 헬퍼 추가
- StoreItemInspectionRequest FormRequest 생성
- work_order_items.options['inspection_data']에 검사 결과 저장
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- ai_token_usages 테이블 마이그레이션 생성
- AiTokenUsage 모델 생성
- AiReportService에 usageMetadata 추출 및 저장 로직 추가
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- numbering_rules 테이블: JSON 패턴 기반 채번 규칙 저장 (tenant별)
- numbering_sequences 테이블: MySQL UPSERT 기반 atomic 시퀀스 관리
- NumberingService: generate/preview/nextSequence 핵심 서비스
- QuoteNumberService: NumberingService 우선, 폴백 QT{YYYYMMDD}{NNNN}
- OrderService: NumberingService 우선 (pair_code 지원), 폴백 ORD{YYYYMMDD}{NNNN}
- StoreOrderRequest: pair_code 필드 추가
- NumberingRuleSeeder: tenant_id=287 견적(KD-PR)/수주(KD-{pairCode}) 규칙
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- getMaterials(): 품목당 1행 → StockLot(입고 로트)당 1행으로 변경
- ITEM-{id} 가짜 로트번호 → Receiving에서 생성된 실제 lot_no 반환
- registerMaterialInput(): material_ids → stock_lot_id+qty 로트별 수량 차감
- StockService::decreaseFromLot() 신규 추가 (특정 로트 지정 차감)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- QuoteService::show() - order_id가 null인 경우 Order.quote_id 역방향 탐색으로 연결된 수주 자동 보정
- QuoteService::update() - 역방향 참조 포함하여 syncFromQuote() 동기화 트리거 확장
- 수주에서 견적 수정 시 기존 수주에 자동 반영 + "수주 보기" 버튼 정상 표시
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- 견적확정 시 업체명/현장명/담당자/연락처 필수 검증 추가 (QuoteService)
- 작업지시 stats API에 by_process 공정별 카운트 반환 추가
- 작업지시 목록/상세 쿼리에 수주 개소(rootNodes) 연관 로딩
- 작업지시 품목에 sourceOrderItem.node 관계 추가
- 입고관리 완료건 수정 허용 및 재고 차이 조정
- work_order_step_progress 테이블 마이그레이션
- receivings 테이블 options 컬럼 추가
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- interview_categories, interview_templates, interview_questions 테이블 생성
- interview_sessions, interview_answers 테이블 생성
- InterviewCategory, InterviewTemplate, InterviewQuestion 모델 추가
- InterviewSession, InterviewAnswer 모델 추가
- 멀티테넌트(tenant_id) 지원, 감사 로깅(Auditable) 적용
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- convertToOrder: calculation_inputs.items[]로 OrderNode(location) 생성, order_items에 order_node_id 연결
- resolveLocationIndex() 헬퍼 추가 (formula_source/note 기반 개소 인덱스 매칭)
- syncFromQuote: 기존 nodes 삭제 후 재생성, 아이템 node 연결 동기화
- show(): rootNodes + withRecursiveChildren eager loading 추가
- createFromQuoteItem: order_node_id 매핑 추가
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- items:normalize-dimensions 커맨드 신규 생성
- 101_specification_1/2/3에서 thickness/width/length 자동 추출
- --dry-run(미리보기) / --execute(실행) 모드 지원
- 기존 값이 있는 경우 안전하게 스킵
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- barobill_bank_transaction_overrides 테이블 생성
- tenant_id + unique_key 복합 유니크 인덱스
- modified_summary, modified_cast 필드로 수정값 저장
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- OrderService: 생산지시 생성 로직 개선
- order_items.item_id → process_items 테이블에서 공정 자동 조회
- 공정별로 아이템 그룹화 (미지정 아이템은 별도 그룹)
- 각 공정별 작업지시 생성
- work_order_items에 해당 공정의 아이템들 자동 추가
- WorkOrderService: 목록 조회 시 관계 추가
- items 관계 추가 (틀수 계산용)
- process.department 필드 추가 (부서 표시용)
Co-Authored-By: Claude <noreply@anthropic.com>
- KyungdongFormulaHandler: 수식 계산 로직 리팩토링 및 확장
- OrderService: 수주 전환 시 BOM 품목 매핑 로직 추가
- QuoteService: 견적 상태 처리 개선
- FormulaEvaluatorService: 디버그 로깅 추가
- Quote 모델: 캐스팅 타입 수정
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- has_inspection_template 필드 추가 (수입검사 양식 연결 여부)
- getItemsWithInspectionTemplate() 헬퍼 메서드 추가
- name 필드에 코드 합치기 제거 (중복 표시 해결)
- exclude_process_id 파라미터 추가 (공정별 품목 선택 시 중복 방지)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- split_supply_amount (decimal 18,2, nullable) 컬럼 추가
- split_tax (decimal 18,2, nullable) 컬럼 추가
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Upsert API (POST /documents/upsert)
- ResolveRequest, UpsertRequest FormRequest 생성
- DocumentService에 resolve/upsert 로직 추가
- document_category common_codes 마이그레이션
- 에러/성공 메시지 i18n 추가
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- MySQL 64자 제한으로 자동생성 외래키명 실패
- foreignId()->constrained() → 수동 foreign() + 짧은 이름(bb_amount_log_trans_fk)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- modified_supply_amount, modified_tax 컬럼 추가 (사용자 수정 공급가액/부가세)
- barobill_card_transaction_amount_logs 이력 테이블 생성
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- 견적 참조 데이터(현장명, 부호) 조회 API 추가 (GET /quotes/reference-data)
- 수주 전환 시 floor_code/symbol_code를 quoteItem.note에서 파싱하도록 변경
- 수주 전환 시 note에 formula_category 저장
- 검사기준서 프리셋: standard + standard_criteria → text_with_criteria로 통합
- tolerance 컬럼 width 조정 (120px → 85px)
- LOGICAL_RELATIONSHIPS.md 문서 갱신
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- ExportItemMasterDataCommand: tenant_id=287 데이터를 JSON으로 추출
- KyungdongItemMasterSeeder: JSON 기반 DELETE+재삽입 시더
- Phase 1: item_pages/sections/fields + entity_relationships
- Phase 2: categories(depth순) + items(배치500건)
- Phase 3: item_details + prices
- ID 매핑으로 환경별 충돌 없음, 트랜잭션 안전
- 8개 JSON 데이터 파일 포함 (총 약 1.5MB)
- .gitignore에 시더 데이터 예외 추가
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>