Commit Graph

881 Commits

Author SHA1 Message Date
김보곤
2b5ac4c54d feat:법인카드 거래내역(card_transactions) 마이그레이션 추가
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 07:44:09 +09:00
김보곤
00470b7d30 feat:일일자금일보 마이그레이션 추가 (daily_fund_transactions, daily_fund_memos)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 07:43:55 +09:00
김보곤
422bad7dfc feat:부가세 관리 vat_records 테이블 마이그레이션 추가
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 06:14:18 +09:00
e364239572 feat: 견적 참조 데이터 API, 수주 전환 로직 개선, 검사기준서 필드 통합
- 견적 참조 데이터(현장명, 부호) 조회 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>
2026-02-04 23:07:08 +09:00
김보곤
9c276ed8c3 fix:기존 테이블 충돌 방지를 위한 hasTable 체크 추가 (sales_records, purchases, subscriptions)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 22:53:02 +09:00
김보곤
343d7f6256 feat:고객/매출/매입/정산 등 재무 관련 8개 테이블 마이그레이션 추가
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 22:50:44 +09:00
fa07e5b58a feat: 경동기업 품목 기준 데이터 배포용 시더 구현
- 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>
2026-02-04 22:47:03 +09:00
a6fc537a02 Merge remote-tracking branch 'origin/develop' into develop 2026-02-04 22:40:58 +09:00
김보곤
0d1b088463 feat:환불/해지 관리 테이블 마이그레이션 추가
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 22:37:35 +09:00
김보곤
cee37b3e20 feat:미지급금(payables) 테이블 마이그레이션 추가
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 22:27:13 +09:00
김보곤
0e9f8be423 feat:미수금(receivables) 테이블 마이그레이션 추가
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 22:22:20 +09:00
김보곤
c7029f9eef feat:거래처(trading_partners) 테이블 마이그레이션 추가
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 22:13:26 +09:00
a7975f7270 fix: ItemService update 시 attributes 머지 로직 추가
- 기존: attributes 전체 덮어쓰기 → 수정: 기존 값 보존 후 새 값만 머지
- 품목 수정 시 레거시 속성(sales_price, legacy 정보 등) 유실 방지

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 20:30:07 +09:00
d27061bbdc Merge remote-tracking branch 'origin/develop' into develop 2026-02-04 20:26:01 +09:00
af42c115ae feat:검사 기준서 동적화 + 외부 키 매핑 동적화
- 템플릿별 동적 필드 정의 (document_template_section_fields)
- 외부 키 매핑 동적화 (document_template_links + link_values)
- 문서 레벨 연결 (document_links)
- 시스템 프리셋 (document_template_field_presets)
- section_items에 field_values JSON 컬럼 추가
- 기존 고정 필드 → 동적 field_values 데이터 마이그레이션
- search_api → source_table 전환 마이그레이션

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 08:37:55 +09:00
김보곤
d012be69eb feat:차량정비이력 테이블 마이그레이션 추가 2026-02-03 19:56:38 +09:00
3d20c6979d feat: 공정 단계(ProcessStep) CRUD API 구현
- process_steps 테이블 마이그레이션 생성 (step_code, sort_order, boolean 플래그 등)
- ProcessStep 모델 생성 (child entity 패턴, HasFactory만 사용)
- ProcessStepService: CRUD + reorder + STP-001 자동채번
- ProcessStepController: DI + ApiResponse::handle 패턴
- FormRequest 3개: Store, Update, Reorder
- Process 모델에 steps() HasMany 관계 추가
- ProcessService eager-load에 steps 추가 (5곳)
- Nested routes: /processes/{processId}/steps

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 18:59:12 +09:00
김보곤
83f0f69643 feat:홈택스 세금계산서 로컬 저장 테이블 추가
- hometax_invoices 테이블 생성 마이그레이션
- 국세청승인번호 기준 중복 방지 인덱스
- 매출/매입 구분, 금액정보, 거래처정보 저장
- 메모/분류/확인여부 등 자체 관리 필드

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 17:13:04 +09:00
김보곤
529c587023 feat:차량일지 구분 유형 확장 및 라벨 수정
- 구분 유형 추가: 출퇴근용(왕복), 업무용(왕복), 비업무용(왕복)
- 비업무 라벨을 '비업무용(개인)'으로 변경
- 출발지/도착지 장소명 라벨 수정 (장소명 → 출발지명/도착지명)
- 새 유형별 색상 추가

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-03 13:27:34 +09:00
김보곤
6c2e74d6ce feat:차량일지(운행기록부) 테이블 마이그레이션 추가
- vehicle_logs 테이블 생성
- 운행 정보 (날짜, 부서, 운전자, 구분)
- 출발지/도착지 정보 (분류, 장소명, 주소)
- 주행거리, 비고

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 11:32:27 +09:00
2779caed6e feat:문서양식 결재라인 user_id 및 연결 필드 마이그레이션 추가
- document_template_approval_lines에 user_id 컬럼 추가
- document_templates에 linked_item_ids(JSON), linked_process_id 컬럼 추가

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 10:33:37 +09:00
e35b167b63 fix: mysqldump 비밀번호 경고 제거 (defaults-extra-file 방식)
- 커맨드라인 --user/--password → 임시 .my.cnf 파일 방식으로 변경
- mysqldump 실행 전 임시 파일 생성, 완료 후 삭제
- "Using a password on the command line interface" 경고 해소

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 10:32:56 +09:00
60e2286cec Merge remote-tracking branch 'origin/develop' into develop 2026-02-03 10:10:50 +09:00
김보곤
fe4303f807 feat:바로빌 회원사 마지막 수집 시간 컬럼 추가
- last_sales_fetch_at: 마지막 매출 조회 시간
- last_purchases_fetch_at: 마지막 매입 조회 시간

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 09:12:30 +09:00
김보곤
c2c19249d7 feat:barobill_members 테이블에 server_mode 컬럼 추가
회원사별로 바로빌 테스트/운영 서버를 개별 설정할 수 있도록 컬럼 추가
- server_mode: enum('test', 'production'), 기본값 'test'

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 07:47:56 +09:00
김보곤
c9970d65fd feat:법인차량관리 테이블 생성 (corporate_vehicles)
- 기본 정보: 차량번호, 모델, 종류, 구분, 연식, 운전자, 상태, 주행거리, 메모
- 법인차량 전용: 취득일, 취득가
- 렌트/리스 전용: 계약일자, 회사명, 연락처, 기간, 약정운행거리, 차량가격, 잔존가액, 보증금, 월 렌트료(공급가/세액), 보험사 정보

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 21:47:54 +09:00
da100ed5ad Merge remote-tracking branch 'origin/develop' into develop 2026-02-02 20:48:01 +09:00
6001df27f2 feat:검사항목 frequency_n/c, standard_criteria 컬럼 추가
- frequency_n(측정횟수), frequency_c(합격판정기준) TINYINT 추가
- standard_criteria JSON 컬럼 추가 (구조화된 검사기준 비교용)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 20:36:57 +09:00
김보곤
7b06644f23 fix:gcs_uri 마이그레이션 컬럼 존재 체크 추가 2026-02-02 20:16:12 +09:00
김보곤
502e34d88e feat:수당 지급 추적 컬럼 추가 마이그레이션
- 1차/2차 납입완료일, 수당지급일 컬럼 추가
- 매니저 수당 관련 컬럼 추가 (첫 구독료, 지급일)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 19:56:09 +09:00
f701e0636e feat:검사기준서 탭 개선 - tolerance, measurement_type 컬럼 및 inspection_method 공통코드 추가
- document_template_section_items에 tolerance(공차), measurement_type(측정유형) 컬럼 추가
- common_codes에 inspection_method 그룹 6개 코드 삽입
- DocumentTemplateSectionItem 모델 $fillable 업데이트

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 16:29:39 +09:00
김보곤
c90077bd51 feat:sales_consultations 테이블에 gcs_uri 컬럼 추가
음성 녹음 파일의 GCS URI 저장용

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 10:30:22 +09:00
김보곤
28ed5d9da7 Merge branch 'develop' of http://114.203.209.83:3000/SamProject/sam-api into develop 2026-02-02 09:54:31 +09:00
김보곤
dc2dee0c0b chore:api docs update 2026-02-02 09:54:31 +09:00
김보곤
9cc73f4688 fix:sales_contract_products.tenant_id nullable 허용
가망고객 단계에서는 아직 테넌트가 생성되지 않으므로
tenant_id가 null일 수 있음

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 09:53:35 +09:00
ce59cdfe81 Merge remote-tracking branch 'origin/develop' into develop 2026-02-01 20:37:46 +09:00
a3c7f83dfb chore:Serena 프로젝트 설정 및 문서 업데이트
- .serena/project.yml 설정 업데이트
- DB 백업 상태 메모리 추가
- LOGICAL_RELATIONSHIPS.md 수정

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 20:37:06 +09:00
김보곤
32392ef4de fix:sales_contract_products.tenant_id nullable 변경
- 가망고객(prospect) 모드에서 계약상품 저장 지원
- tenant_id가 없어도 management_id로 연결 가능

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 20:44:18 +09:00
김보곤
fd3dbb75af feat:sales_consultations 테이블에 tenant_prospect_id 컬럼 추가
- 가망고객(prospect) 상담 기록 지원을 위해 tenant_prospect_id 컬럼 추가
- tenant_id를 nullable로 변경 (가망고객일 경우 null)
- tenant_prospect_id 인덱스 추가

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 19:50:37 +09:00
김보곤
3a2eeb299c Merge branch 'develop' of http://114.203.209.83:3000/SamProject/sam-api into develop 2026-01-31 19:35:27 +09:00
김보곤
6db428ccc5 feat:영업 관리 테이블에 tenant_prospect_id 컬럼 추가
- sales_tenant_managements에 tenant_prospect_id 추가
- sales_scenario_checklists에 tenant_prospect_id 추가
- 가망고객 단계에서도 영업/매니저 체크리스트 사용 가능

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 19:35:00 +09:00
fb06975d97 feat:문서관리 Phase 4.1 - DocumentTemplate API + 결재 워크플로우 활성화
- DocumentTemplate 모델 6개 생성 (Template, ApprovalLine, BasicField, Section, SectionItem, Column)
- DocumentTemplateService (list/show) + DocumentTemplateController (index/show)
- GET /v1/document-templates, GET /v1/document-templates/{id} 라우트
- DocumentTemplateApi.php Swagger (7개 스키마, 2개 엔드포인트)
- Document 결재 워크플로우 4개 엔드포인트 활성화 (submit/approve/reject/cancel)
- ApproveRequest, RejectRequest FormRequest 생성
- DocumentApi.php Swagger에 결재 엔드포인트 4개 추가
- Document.template() 참조 경로 수정 (DocumentTemplate → Documents 네임스페이스)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 09:39:55 +09:00
fb0155624f feat: DB 백업 시스템 구축 (Phase 1,2,4)
- Phase 1: backup.conf.example + sam-db-backup.sh 백업 스크립트
- Phase 2: BackupCheckCommand + StatMonitorService.recordBackupFailure()
- Phase 2: routes/console.php에 db:backup-check 05:00 스케줄 등록
- Phase 4: SlackNotificationService 생성 (웹훅 알림)
- Phase 4: BackupCheckCommand/StatMonitorService에 Slack 알림 연동

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 08:33:19 +09:00
57d9ac2d7f fix: 가이드레일 세트가격 계산을 5130과 동일하게 수정
- 벽면형/측면형: 단가×2 세트가격 후 round(세트가격×길이)×QTY
- 혼합형: (벽면단가+측면단가) 합산 후 단일 항목으로 계산
- 기존: round(단가×길이)×2×QTY → 수정: round(단가×2×길이)×QTY
- 검증: EGI 84/84 + SUS 44/44 + 가이드타입 36/36 = 164/164 ALL PASS

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 00:29:55 +09:00
e5a293ab12 fix(API): 공통코드 조회 DB::table → CommonCode 모델 전환
- DB::table() 직접 쿼리 → CommonCode 모델 사용으로 변경
- SoftDeletes 자동 적용되어 삭제된 레코드 제외
- getComeCode()도 모델 전환 (TenantScope 자동 적용)
- index()는 TenantScope 해제 후 테넌트/글로벌 폴백 직접 처리

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 00:10:36 +09:00
9bd585bdf3 fix: 견적 반올림 순서를 5130과 동일하게 수정 (단건→수량 곱셈)
- 케이스, 케이스용 연기차단재, 가이드레일, 레일용 연기차단재:
  round(단가 × 길이 × QTY) → round(단가 × 길이) × QTY
- 5130 레거시와 동일한 반올림 순서 적용
- 검증: 스크린 44건 + 슬랫 32건 + 가이드타입 21건 = 97건 ALL PASS
- 사이즈 범위: 3000×1500 ~ 12000×4000, QTY 1~5

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 23:52:02 +09:00
f4a902fceb fix: FormulaEvaluatorService 슬랫 통합 및 면적/중량 공식 수정
- FormulaEvaluatorService: 슬랫 면적 공식 분리 (W0×(H0+50) vs W1×(H1+550))
- FormulaEvaluatorService: MOTOR_CAPACITY/BRACKET_SIZE 입력값 우선 처리
- KyungdongFormulaHandler: calculateDynamicItems 면적/중량 제품타입별 분기
- KyungdongFormulaHandler: normalizeGuideType() 추가 (벽면↔벽면형 호환)
- KyungdongFormulaHandler: guide_rail_spec 파라미터 별칭 지원
- 검증: 스크린/슬랫 5치수×3수량 전체 5130 정합성 확인 (±1원 이내)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 22:39:53 +09:00
e9639d1011 feat: 슬랫(철재) 견적 계산 지원 추가 및 5130 정합성 검증
- calculateSlatPrice() 메서드 추가 (면적 = W0×(H0+50), 원자재 단가 '방화')
- calculateDynamicItems() 주자재 분기 (screen→실리카, slat→방화)
- 레일용 연기차단재: 슬랫 ×1 / 스크린 ×2 분기 처리
- 절곡품: 슬랫일 때 L바/보강평철/환봉 제외 (5130 동일)
- 부자재 앵글: 슬랫은 앵글4T, 스크린은 앵글3T
- 모터 받침용 앵글: 슬랫 기본 비활성 (bracket_angle_enabled 파라미터)
- 조인트바: 슬랫 전용 항목 추가 (joint_bar_qty 파라미터)

검증: 치수 5종 × 수량 3종 모두 5130과 완벽 일치

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 22:04:04 +09:00
86ec5c4185 fix: 5130 견적 금액 정합성 수정 (5항목)
- guide_type 매핑: installation_type → guide_type 파라미터 전달 추가 (측면형/혼합형 가이드레일 가격 반영)
- 제어기/뒷박스 수량: QTY 곱셈 제거 (5130 동일: col15/col16/col17은 고정 수량)
- 샤프트 규격 매핑: W0 기반 임의 길이 → 5130 고정 제품(5인치: 6/7/8.2m)으로 매핑
- 환봉/앵글 이중 곱셈 수정: 자동계산에 이미 QTY 포함, 추가 곱셈 제거
- 모터/브라켓 입력값 우선: MOTOR_CAPACITY/BRACKET_SIZE 입력 시 자동계산 대신 사용

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 21:31:22 +09:00
06552ad64e fix: 스크린 면적 계산을 5130 공식과 동일하게 수정
- 기존: (W0+160) × (H0+350+550) / 1,000,000 (W1×H1 기반)
- 수정: W0 × (H0+550) / 1,000,000 (5130 공식과 동일)
- 전 모델 10개 조합 검증 완료 (SAM = 5130 정확 일치)
  KSS01/02, KSE01, KTE01, KWE01, KQTS01, KDSS01
  SUS마감/EGI마감 모두 확인

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 21:06:55 +09:00