Commit Graph

13 Commits

Author SHA1 Message Date
7543fd2256 feat(WEB): 작업지시/출근부 기능 개선 및 마이그레이션 추가
- 작업지시 우선순위 필드 추가 (priority 마이그레이션)
- 수주-작업지시 품목 연동 source_order_item_id 컬럼 추가
- 수주 테이블에 account_code 필드 추가
- 작업지시 StoreRequest/UpdateRequest 우선순위 검증 추가
- WorkOrder 모델 priority fillable 추가
- 출근부 StoreRequest/UpdateRequest 검증 규칙 개선
- Employee Request 검증 규칙 수정
- SaleService/ItemService 수정
- WorkResultService 결과 처리 개선
- BankTransactionService 수정
- routes/api.php 엔드포인트 업데이트
- error.php 에러 메시지 추가

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 15:38:52 +09:00
b82f9c786b fix: 품목관리 API 응답 및 라우팅 오류 수정
- ItemsController: show/destroy 메서드 파라미터 타입 수정 (int → 동적 캐스팅)
- ItemsController: store/update에서 product_type → item_type 변환 로직 추가
- ItemService: 정렬 순서 수정 (최신 품목이 먼저 표시되도록 desc 추가)
- ItemService: code 키를 item_code로 변경 (ApiResponse::handle의 HTTP 상태 코드 충돌 방지)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-14 20:04:29 +09:00
ba5f402cd8 fix(API): Controller 타입 및 코드 정리
- FcmController, EstimateController, ItemsController 개선
- LoanController, PositionController 수정
- ReceivablesController, SalaryController 수정
- StructureReviewController 수정

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-13 19:49:00 +09:00
65c5de2db1 feat(api): Items API 멀티 item_type 지원 및 파라미터 일관성 개선
- ItemService: 콤마 구분 멀티 item_type 지원 (예: type=FG,PT)
  - parseItemTypes(): 콤마 구분 문자열을 배열로 파싱
  - validateItemTypesInSameGroup(): 같은 group_id 검증
  - index(), search() 메서드에 멀티 타입 로직 적용

- ItemsController: type/item_type 파라미터 일관성
  - show(), showByCode(), destroy() 메서드에서 type 파라미터 지원
  - 모든 엔드포인트에서 type 또는 item_type 둘 다 허용

- ItemBatchDeleteRequest: prepareForValidation()으로 type→item_type 매핑

- i18n: item_types_must_be_same_group 에러 메시지 추가 (ko/en)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 01:10:38 +09:00
2862015605 feat: Items show() API 개선 - files 로딩 및 item_type 선택적 처리
- Item 모델 files() 관계를 document_id/document_type 기반으로 변경
- show() 메서드에 files 로딩 및 field_key별 그룹화 추가
- item_type 파라미터 선택적 처리 (ID만으로 조회 가능)
- showWithPrice() 메서드 반환 타입 변경에 맞게 수정
2025-12-15 19:27:36 +09:00
b1bcad3be6 feat: Items API에 group_id 파라미터 지원 추가
- common_codes에 item_group 추가 및 item_type parent_id 연결
- /api/v1/items?type=RM → 단일 품목 유형 조회
- /api/v1/items?group_id=103 → 그룹 전체 품목 조회 (FG,PT,SM,RM,CS)
- ItemService에 getItemTypesByGroupId(), newQueryForTypes() 메서드 추가
- 에러 메시지 추가 (item_type_or_group_required, invalid_group_id)
2025-12-15 14:47:04 +09:00
d1afa6e05e feat: ItemService 동적 테이블 라우팅 구현
- item_type → ItemPage.source_table → Model 클래스 동적 라우팅
- getModelInfoByItemType(): item_type으로 Model 정보 조회 (캐싱)
- newQuery(): 동적 Query Builder 생성
- 모든 CRUD 메서드 item_type 필수 파라미터로 변경
- ItemsController item_type 전달 로직 수정
- 에러 메시지 추가 (item_type_required, invalid_source_table)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-13 23:28:06 +09:00
d5ab522902 feat: Items API is_active 필터/반환 및 동적 필드 지원
- 목록 조회에 is_active 필드 반환 및 필터 파라미터 추가
- 상세 조회에서 options 동적 필드 플랫 전개
- 생성/수정 시 동적 필드 options 저장 지원
2025-12-11 09:56:01 +09:00
cde89b2fb3 feat: Items API item_type 기반 통합 조회/삭제 개선
- ItemTypeHelper를 활용한 item_type(FG/PT/SM/RM/CS) → source_table 매핑
- getItem: item_type 파라미터로 products/materials 테이블 자동 결정
- deleteItem: item_type 필수 파라미터 추가
- batchDeleteItems: item_type별 일괄 삭제 지원
- 목록 조회 시 attributes 플랫 전개
- Swagger 문서 업데이트
2025-12-09 21:51:46 +09:00
0ea8c719d7 feat: [items] 품목 생성/조회 개선
- 중복 코드 자동 증가 기능 추가 (P-001 → P-002, ABC → ABC-001)
- soft delete 항목 조회 파라미터 추가 (include_deleted)
- ValidationException 응답 포맷 수정 (공통 에러 형식)
- batch delete 라우트 순서 수정 (/{id} 보다 /batch 먼저)
- is_active 기본값 true 설정
2025-12-01 14:22:50 +09:00
f09fa3791c feat: [items] 아이템 API 기능 개선
- ItemsController, ItemsBomController, ItemsFileController 수정
- ItemBatchDeleteRequest 추가
- ItemsService 개선
- ItemsApi Swagger 문서 업데이트
2025-11-30 21:05:44 +09:00
a23b727557 feat: Items API CRUD 기능 추가 (BP-MES Phase 1 Day 3-5)
- ItemsController 및 ItemsService CRUD 메서드 구현
- FormRequest 검증 클래스 추가 (ItemStoreRequest, ItemUpdateRequest)
- Swagger 문서 완성 (ItemsApi.php)
- 품목 생성/조회/수정/삭제 엔드포인트 추가
- i18n 메시지 키 추가 (message.item)
- Code 기반 라우팅 적용
- Hybrid 구조 지원 (고정 필드 + attributes JSON)
2025-11-17 11:22:49 +09:00
ddc4bb99a0 feat: 통합 품목 조회 API 및 가격 통합 시스템 구현
- 통합 품목 조회 API (materials + products UNION)
  - ItemsService, ItemsController, Swagger 문서 생성
  - 타입 필터링 (FG/PT/SM/RM/CS), 검색, 카테고리 지원
  - Collection merge 방식으로 UNION 쿼리 안정화

- 품목-가격 통합 조회
  - PricingService.getPriceByType() 추가 (SALE/PURCHASE 지원)
  - 단일 품목 조회 시 판매가/매입가 선택적 포함
  - 고객그룹 가격 우선순위 적용 및 시계열 조회

- 자재 타입 명시적 관리
  - materials.material_type 컬럼 추가 (SM/RM/CS)
  - 기존 데이터 344개 자동 변환 (RAW→RM, SUB→SM)
  - 인덱스 추가로 조회 성능 최적화

- DB 데이터 정규화
  - products.product_type: 760개 정규화 (PRODUCT→FG, PART/SUBASSEMBLY→PT)
  - 타입 코드 표준화로 API 일관성 확보

최종 데이터: 제품 760개(FG 297, PT 463), 자재 344개(SM 215, RM 129)
2025-11-11 11:30:17 +09:00