Commit Graph

910 Commits

Author SHA1 Message Date
df69cabdc3 docs:논리적 관계 문서 갱신 (esign, materialInputs 추가)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 03:41:45 +09:00
89c19b869d chore:조인트바 품목 options 데이터 추가 (lot_managed, consumption_method 등)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 03:41:43 +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
d730c2d91a feat:FQC 제품검사 문서 일괄생성 API 추가
- POST /v1/documents/bulk-create-fqc: 수주 개소별 제품검사 문서 일괄생성
- GET /v1/documents/fqc-status: 수주별 FQC 진행현황 조회
- BulkCreateFqcRequest FormRequest 추가
- error.php에 no_order_items, already_created 메시지 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 03:41:27 +09:00
441359f5fd fix:FQC 문서 기본필드 키 형식 수정 (bf_라벨 → bf_ID)
- 제품검사 문서 생성 시 bf_납품명 형식 → bf_{field->id} 형식으로 변경
- 템플릿 basicFields를 로드하여 field_key 기반 매핑
- mng show.blade.php와 키 형식 통일

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 00:32:41 +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
9af48a15af feat: 내화실 품목 마스터 데이터 업데이트
- code: 80019 → 내화실-WY-MA12
- name: 실 → 내화실
- unit: m → 콘
- attributes.spec: WY-MA12
- options: lot_managed, consumption_method(manual), production_source(purchased), material 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 15:24:49 +09:00
32cbb1071d Merge remote-tracking branch 'origin/develop' into develop 2026-02-12 14:16:32 +09:00
45dd18dbab feat(API): 작업일지 생성/조회 API 추가
- WorkOrderService: getWorkLogTemplate, getWorkLog, createWorkLog 메서드 추가
- WorkOrderController: 작업일지 3개 엔드포인트 추가
- 라우트: GET work-log-template, GET/POST work-log
- WorkOrder 모델: documents() MorphMany 관계 추가
- i18n: work_log_saved, no_work_log_template 메시지 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 09:39:48 +09:00
김보곤
fa6d2082c8 feat:E-Sign 전자계약 i18n 메시지 키 추가
- message.esign: 12개 (created, cancelled, sent, reminded, fields_configured, otp_sent, otp_verified, signed, rejected, completed, verified, downloaded)
- error.esign: 16개 (invalid_token, token_expired, contract_not_signable, already_completed, already_cancelled, already_signed, invalid_status_for_send, no_sign_fields, cannot_remind, fields_only_in_draft, not_verified, otp_max_attempts, otp_not_sent, otp_expired, otp_invalid, file_not_found)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 07:15:42 +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
911c8a36ad feat(API):문서 데이터 정규화 커맨드 추가
- NormalizeDocumentData: 기존 document_data를 정규화 형식으로 일괄 변환

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 00:01:30 +09:00
376348a491 feat(API):자재 투입 LOT 조회 API 및 중간검사 데이터 정규화
- materialInputLots: stock_transactions 기반 투입 LOT 조회 엔드포인트 추가
- createInspectionDocument: 정규화 형식(section_id/column_id/field_key) 지원
- 레거시 형식(section_X_item_Y) 자동 변환 로직 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 00:01:25 +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
8d1ed6c096 docs(API): LOGICAL_RELATIONSHIPS 문서 업데이트
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 15:58:43 +09:00
de10441275 fix(API): 경동 견적 수식 핸들러 개선
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 15:58:42 +09:00
bcad646ea6 feat(API): 수주 서비스 기능 개선
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 15:58:40 +09:00
51aad4e522 feat(API): 검사 문서/성적서 연동 개선
- DocumentService: formatTemplateForReact 필드명 정합성 수정 (column_type, sub_labels, section title/image_path)
- WorkOrderService: process.options 로딩, 검사데이터 document_data 변환 로직 추가
- StoreItemInspectionRequest: templateValues 유효성 규칙 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 15:58:39 +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
bb457d4ca8 Merge remote-tracking branch 'origin/develop' into develop 2026-02-11 08:51:11 +09:00
2d68e5e669 fix: 수주 삭제 시 견적 연결 해제 + 생산지시 공정 매핑 보완
- OrderService::destroy()에서 견적 order_id/status 초기화
- StoreOrderRequest/UpdateOrderRequest에 floor_code, symbol_code, item_code 추가
- createProductionOrder()에 item_code fallback 공정 매핑 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 19:03:22 +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
6733a431bb feat:중간검사 API 다중단계/resolve/upsert 지원 (Phase 5.1.3)
- getInspectionTemplate: 전체 검사 단계 templates[] 반환 (기존 첫번째만→다중)
- resolveInspectionDocument 신규: step_id 기반 기존 문서 조회 또는 템플릿 반환
- createInspectionDocument 개선: step_id 파라미터, 기존 DRAFT/REJECTED 문서 update 지원
- GET inspection-resolve 라우트 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 16:55:29 +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
072d0c0ae1 docs: LOGICAL_RELATIONSHIPS.md 모델 관계 업데이트
- OrderNode 모델 관계 추가 (parent, order, children, items)
- Order.nodes/rootNodes, OrderItem.node 관계 추가
- WorkOrder.stepProgress, WorkOrderStepProgress 관계 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 21:31:25 +09:00
be572678db fix: 수주 삭제 로직 강화 - 연관 데이터 cascade soft delete
- 삭제 불가 상태 추가 (생산중/생산완료/출하중/출하완료)
- 작업지시/출하 존재 시 삭제 차단 + 에러 메시지
- order_item_components → order_items → order_nodes → order 순차 soft delete
- DB 트랜잭션으로 원자성 보장

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 21:31:19 +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
5eaa5f036b fix(API): 자재투입 모달 중복 로트 버그 수정
동일 자재가 여러 작업지시 품목에 걸쳐 있을 때 StockLot이 중복 표시되던 문제 수정.
Phase 1(유니크 자재 수집) → Phase 2(로트 조회) 구조로 변경하여 중복 제거 및 필요수량 합산.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 16:47:50 +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
d07bad16df feat:DB 트리거 기반 데이터 변경 추적 시스템 구현
Phase 1: DB 기반 구축
- trigger_audit_logs 테이블 (RANGE 파티셔닝 15개, 3개 인덱스)
- 789개 MySQL AFTER 트리거 (263 테이블 × INSERT/UPDATE/DELETE)
- SetAuditSessionVariables 미들웨어 (@sam_actor_id, @sam_session_info)

Phase 2: 복구 메커니즘
- TriggerAuditLog 모델, TriggerAuditLogService, AuditRollbackService
- 6개 API 엔드포인트 (index, show, stats, history, rollback-preview, rollback)
- FormRequest 검증 (TriggerAuditLogIndexRequest, TriggerAuditRollbackRequest)

Phase 3: 관리 도구
- v_unified_audit VIEW (APP + TRIGGER 통합, COLLATE 처리)
- audit:partitions 커맨드 (파티션 추가/삭제, dry-run)
- audit:triggers 커맨드 (트리거 재생성, 테이블별/전체)
- 월 1회 파티션 자동 관리 스케줄러 등록

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 09:17:15 +09:00
ee6794be1a feat: [생산관리] 중간검사 데이터 저장/조회 API 구현
- 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>
2026-02-09 09:00:57 +09:00
김보곤
b9137c93b0 feat:AI 음성녹음 테이블 마이그레이션 및 모델 추가
- ai_voice_recordings 테이블 마이그레이션 생성
- AiVoiceRecording 모델 추가 (Tenants 네임스페이스)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 12:52:28 +09:00
김보곤
f45f91967f feat:AI 토큰 사용량 추적 기능 추가
- ai_token_usages 테이블 마이그레이션 생성
- AiTokenUsage 모델 생성
- AiReportService에 usageMetadata 추출 및 저장 로직 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 10:27:20 +09:00
78851ec04a feat: 테넌트별 채번 규칙 시스템 구현
- 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>
2026-02-07 09:50:52 +09:00
6318474b6f fix: [자재투입] 입고 로트번호 기반으로 자재 목록 변경
- 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>
2026-02-07 05:06:28 +09:00