Commit Graph

818 Commits

Author SHA1 Message Date
c637dd38eb docs(WEB): 수주 Swagger 문서 추가 - bulkDestroy, revertProductionOrder
- OrderBulkDeleteRequest 스키마 추가 (ids, force)
- OrderRevertProductionRequest 스키마 추가 (force, reason)
- DELETE /api/v1/orders/bulk 엔드포인트 문서 추가
- POST /api/v1/orders/{id}/revert-production 엔드포인트 문서 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 04:19:47 +09:00
37424b9cef feat(WEB): 수주 Bulk Delete API + 작업지시 Revert Force 통합
- 수주 일괄 삭제 API 추가 (DELETE /orders/bulk)
  - OrderBulkDeleteRequest (ids, force 검증)
  - force=true: hard delete (운영환경 차단), force=false: soft delete
  - 삭제 불가 건(상태/작업지시/출하) skip 처리 + skipped_ids 반환

- 작업지시 되돌리기 force/운영 모드 분기
  - force=true (개발): 기존 hard delete 로직 유지
  - force=false (운영): 작업지시 cancelled 상태 변경, options에 취소정보 기록, 자재 투입분 재고 역분개, 데이터 보존
  - reason 필수 (운영 모드)

- WorkOrder 모델에 STATUS_CANCELLED 상수 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 04:19:47 +09:00
d7ca8cfa00 refactor:견적 converted 상태를 데이터 기반(order_id)으로 변경
- Quote 모델에 getStatusAttribute() accessor 추가: order_id 존재 시 자동으로 'converted' 반환
- scopeConverted() → whereNotNull('order_id') 변경
- QuoteService/OrderService에서 status='converted' 직접 세팅 제거, order_id만 세팅
- 상태 필터 쿼리: converted는 order_id IS NOT NULL 기반
- 통계 쿼리: status='converted' → order_id IS NOT NULL
- 수주 직접 등록 시에도 자동으로 수주전환 상태 반영

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 04:19:47 +09:00
a2dbdae14b fix(WEB): 입고 등록 검증 실패 수정 - Store 규칙 보완 및 상태값 정합성
- StoreReceivingRequest에 receiving_qty, receiving_date, lot_no 규칙 추가
- UpdateReceivingRequest status에 inspection_completed 허용 추가
- ReceivingService store()에 receiving_qty/date/lot_no 저장 처리
- order_qty null 안전 처리, 기본 status를 receiving_pending으로 변경

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 04:19:47 +09:00
5cc43828d3 fix(WEB): 철재 면적 공식 레거시 일치 (W1×H1)
- FormulaEvaluatorService: steel 면적 W1×(H1+550) → W1×H1

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 04:19:47 +09:00
김보곤
3ae3a1dcda feat: [tax-invoice] 공급자 설정 Tenant Fallback 로직 추가
- BarobillSetting 미설정 시 Tenant 정보를 기본값으로 반환
- corp_num/corp_name이 비어있으면 Fallback 동작
- Tenant 필드 매핑: business_num, company_name, ceo_name, address, phone
- Tenant options 매핑: business_type, business_category, tax_invoice_contact, tax_invoice_email
2026-02-21 17:19:18 +09:00
김보곤
ef33540940 fix: [tax-invoice] ApiResponse::handle() 호출 방식 수정
- named parameter(data:, message:) → callable 콜백 패턴으로 전환
- ApiResponse::handle(fn () => ..., '제목') 형식 적용
- 기존 scaffold 코드의 잘못된 호출 방식 전체 수정
2026-02-21 17:19:18 +09:00
김보곤
3b116c980b feat: [tax-invoice] 바로빌 SOAP 연동 및 공급자 설정 API 추가
- BarobillService HTTP→SOAP 전환 (MNG EtaxController 포팅)
- TI SOAP 클라이언트, callSoap(), buildTaxInvoiceData MNG 형식 적용
- issueTaxInvoice/cancelTaxInvoice/checkNtsSendStatus SOAP 방식
- 공급자 설정 조회/저장 API (GET/PUT /supplier-settings)
- 생성+즉시발행 통합 API (POST /issue-direct)
- SaveSupplierSettingsRequest FormRequest 추가
2026-02-21 17:19:18 +09:00
김보곤
cdbb825fbe fix: [permission] Role::users() 반환 타입 선언 추가
- Spatie Role::users(): BelongsToMany 시그니처와 호환되도록 수정
- FatalError: Declaration must be compatible 에러 해결
2026-02-21 17:19:18 +09:00
김보곤
295f7b7ee9 fix: [card] CSV(CVC) 복호화 값을 API 응답에 포함
- $appends에 csv 추가, getCsvAttribute accessor 생성
- cvc_encrypted는 $hidden 유지 (암호문 노출 방지)
2026-02-21 17:19:18 +09:00
김보곤
03e3e84066 fix: [card] store/update 응답에 관계(assignedUser) 포함
- fresh() → show() 재사용으로 관계 로딩 보장
2026-02-21 17:19:18 +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
김보곤
961ab47bac feat: [corporate-card] 법인카드 관리 API 7개 엔드포인트 구현
- CorporateCard 모델 (corporate_cards 테이블)
- CorporateCardService (CRUD + 토글 + 활성 목록)
- CorporateCardController (ApiResponse 패턴)
- Store/Update FormRequest 검증
- 라우트: /api/v1/corporate-cards (index, store, show, update, destroy, toggle, active)
2026-02-21 17:19:18 +09:00
김보곤
fdea1d0244 fix: [bank-account] 계좌 관리 API 누락 필드 8개 보강
- account_type, balance, currency, opened_at, branch_name, memo, sort_order, last_transaction_at 추가
- Model: fillable, casts, hidden, scopes, accessors를 MNG 모델 기준으로 통일
- Service: store/update에 누락 필드 반영
- FormRequest: Store/Update에 검증 규칙 추가
2026-02-21 17:19:18 +09:00
김보곤
0692eda282 chore: [config] MNG 연구 설정을 API 백엔드로 통합
- Claude AI, Google Cloud (STT/GCS), Vertex AI 서비스 설정 추가
- config/gcs.php 생성 (Google Cloud Storage 설정)
- .env에 바로빌, AI, Google Cloud 환경변수 추가
2026-02-21 17:19:18 +09:00
김보곤
b576fe97e8 feat: [barobill] 바로빌 연동 관리 API 7개 엔드포인트 구현
- SOAP 기반 BarobillSoapService 생성 (MNG 코드 포팅)
- BarobillMember, BarobillConfig 모델 생성
- BarobillController 7개 메서드 (login, signup, status, URL 조회)
- FormRequest 검증 클래스 3개 생성
- 라우트 등록 (POST /barobill/login, /signup, GET /status 등)
- i18n 메시지 키 추가 (ko/en)
- config/services.php에 barobill 설정 추가
2026-02-21 17:19:18 +09:00
김보곤
1dd9057540 refactor: [authz] 역할/권한 API 품질 개선
- Validator::make를 FormRequest로 분리 (6개 생성)
- 하드코딩 한글 문자열을 i18n 키로 교체
- RoleMenuPermission 데드코드 제거
- Role 모델 SpatieRole 상속으로 일원화
- 권한 변경 후 캐시 무효화 추가 (AccessService::bumpVersion)
- 미문서화 8개 Swagger 엔드포인트 추가
- 역할/권한 라우트에 perm.map+permission 미들웨어 추가
2026-02-21 17:19:17 +09:00
555fd196f5 chore(WEB): .gitignore에 Serena MCP 메모리 디렉토리 추가
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 01:06:33 +09:00
400adb7c58 fix(WEB): 방화유리 수량 폴백 제거 및 수주→작업지시 파이프라인 개선
- OrderService: glass_qty에서 quantity 폴백 제거 (투시창 선택 시에만 유효)
- OrderService: createProductionOrder()에서 절곡 공정 bending_info 자동 생성
- OrderService: formula_source 없는 레거시 데이터의 sort_order 기반 개소 분배
- OrderService: note 파싱에서 '-' 단독값 무시 처리
- FormulaEvaluatorService: 철재 W1 계산 (W0+160 → W0+110) 레거시 일치
- WorkOrderService: store()에서 order_node_id null 품목용 rootNodes fallback 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 01:02:23 +09:00
3ab4f24bb4 fix(WEB): 철재 모터용량/셔터박스 계산 레거시 일치 수정
- FormulaHandler: 철재 면적 공식 W1×(H1+550) → W1×H1 (레거시 Slat_updateCol12and13 동일)
- FormulaHandler: 샤프트 인치 자동계산 추가 (레거시 Slat_updateCol22 동일)
- BendingInfoBuilder: 셔터박스 크기를 모터용량→브라켓→박스 매핑으로 결정
  (BOM 원자재 코드 BD-케이스-500*380 대신 조립 크기 650*550 등 사용)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 00:34:01 +09:00
602702b891 feat(WEB): 절곡 공정 BendingInfoBuilder 추가
- 수주→작업지시 시 bending_info JSON 자동 생성 서비스
- 가이드레일: qty×2 적용, baseDimension 벽면형 135*80 / 측면형 135*130
- 하단마감재: 범위별 3000/4000mm 배분 로직
- 셔터박스: coverQty/finCoverQty 계산, 조합배분 로직
- 연기차단재: W50(open_height+250 범위별), W80(floor 공식)
- 레거시(viewBendingWork_slat.php) 수식 기반 구현

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 23:52:08 +09:00
71dc5fae68 refactor: KyungdongFormulaHandler 삭제 (Tenant287/FormulaHandler로 이동 완료)
- b0547c4에서 Tenant287/FormulaHandler.php 신규 생성 완료
- 원본 KyungdongFormulaHandler.php 삭제 (중복 제거)
- Strategy + Factory 패턴 전환의 마지막 정리 작업

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 18:02:29 +09:00
b0547c425f fix:FG 수식 산출 시 제품모델/설치타입/마감타입 올바르게 적용
- parseFgCode() 추가: FG 코드에서 모델/설치타입/마감타입 파싱
- calculateTenantBom() 폴백 순서: 입력값 > FG코드 파싱 > 기본값(KSS01/벽면형/SUS)
- KQTS01 제품이 KSS01 가이드레일 규격(120*70)으로 잘못 산출되던 문제 해결

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 15:41:21 +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
6ae82b7057 fix: 작업지시 단건조회(show)에 materialInputs eager loading 추가
- show() 메서드에 items.materialInputs, items.materialInputs.stockLot 누락
- 목록조회에만 있고 단건조회에 빠져서 프론트 입고 LOT NO 표시 안됨

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 10:50:23 +09:00
2fedc3a712 fix: 조인트바 자동 계산 추가 (레거시 5130 공식 적용)
- KyungdongFormulaHandler: joint_bar_qty 미전달 시 자동 계산
  공식: (2 + floor((제작가로 - 500) / 1000)) × 셔터수량
- OrderService.extractSlatInfoFromBom(): 동일 폴백 추가
- OrderService.createWorkOrders(): slat_info.joint_bar 0일 때 width 기반 계산
- CURRENT_WORKS.md 업데이트

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 10:50:23 +09:00
1429f22f11 fix: 견적 산출 가이드레일 혼합형(mixed) validation 허용
- QuoteBomBulkCalculateRequest: guideRailType, GT에 mixed 추가
- QuoteBomCalculateRequest: GT에 mixed 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 10:50:23 +09:00
89344c0755 fix: 견적 산출 모터 전압/가이드레일 설치유형 매핑 누락 수정
- MP(single/three) → motor_voltage(220V/380V) 매핑 추가
- GT(wall/floor/mixed) → installation_type(벽면형/측면형/혼합형) 매핑 추가
- 기존: 프론트 선택값이 BOM 계산에 반영되지 않던 버그

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 10:50:23 +09:00
74a83e6711 fix: 슬랫 작업일지 데이터 파이프라인 구축
- OrderService.createFromQuote: BOM 결과에서 slat_info(조인트바/방화유리 수량) 추출하여 OrderNode.options에 저장
- OrderService.createWorkOrders: nodeOptions에 slat_info 없을 때 bom_result에서 fallback 추출
- OrderService.syncFromQuote: 동일하게 slat_info 추출 추가
- WorkOrderService: salesOrder eager loading에 client_contact, options 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 10:50:23 +09:00
10b1b26c1b fix: 경동 BOM 계산 수정 및 품목-공정 매핑
- KyungdongFormulaHandler: product_type 자동 추론(item_category 기반), 철재 주자재 EGI코일로 변경, 조인트바 steel 공통 지원
- FormulaEvaluatorService: FG item_category에서 product_type 자동 판별
- MapItemsToProcesses: 경동 품목-공정 매핑 커맨드 정비
- KyungdongItemMasterSeeder: BOM child_item_id code 기반 재매핑
- ItemsBomController: ghost ID 유효성 검증 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 10:50:21 +09:00
55270198d4 fix: 견적→수주 변환 시 담당자 정보 누락 수정
- Order::createFromQuote() 잘못된 필드명 수정 (contact_person→contact, delivery_date→completion_date)
- 견적 담당자(manager)를 orders.options.manager_name에 저장
- StoreOrderRequest/UpdateOrderRequest에 options.manager_name 유효성 검증 추가
- WorkOrderService show()에서 salesOrder.options 컬럼 포함하여 담당자 표시

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 10:50:13 +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
유병철
6f456f2cfd fix: 급여 수당/공제 상세 벨리데이션 규칙 수정 (array → numeric)
- StoreSalaryRequest, UpdateSalaryRequest의 allowance_details.*, deduction_details.* 벨리데이션을 array에서 numeric으로 변경
- 수당/공제 항목은 {항목명: 금액} 구조이므로 값은 숫자가 올바름

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 17:34:57 +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
59cd8cf4fe feat: 수주 목록 rootNodes 수량 합계 조회 추가
- OrderService index()에 withSum('rootNodes', 'quantity') 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 11:22:08 +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
adfccc9af0 fix:생산지시 생성 시 다중 담당자(assignee_ids) 저장 누락 수정
- CreateProductionOrderRequest에 assignee_ids 배열 validation 추가
- OrderService::createProductionOrder에 work_order_assignees 저장 로직 추가
- 담당자 유무에 따른 status 분기 (pending/unassigned) 적용

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 15:57:39 +09:00
김보곤
9c19536423 feat:거래처 테이블에 매출/매입 구분(trade_type) 컬럼 추가
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 11:27:37 +09:00