0f7901c19f11d19afc92f3f20665c8f819c657ae
Chunk 2/5 — wire 2 field mới (BudgetManualName + BudgetManualAmount) qua tất cả
CQRS commands + handlers + DTOs cho cả PE và HĐ. Mirror logic per Q3 user.
Files sửa:
~ Application/PurchaseEvaluations/PurchaseEvaluationFeatures.cs
- CreatePurchaseEvaluationCommand record +2 param
- Validator: MaximumLength(200) + GreaterThanOrEqualTo(0)
- Handler: wire entity
- UpdatePurchaseEvaluationDraftCommand record +2 param + handler wire
- GetPurchaseEvaluationQuery → DTO mapping +2 field
~ Application/PurchaseEvaluations/Dtos/PurchaseEvaluationDtos.cs
- PurchaseEvaluationDetailBundleDto +2 field (BudgetManualName/Amount)
~ Application/PurchaseEvaluations/CreateContractFromEvaluationFeatures.cs
- Carry forward pe.BudgetManualName/Amount → contract khi gen HĐ từ phiếu
~ Application/Contracts/ContractFeatures.cs
- CreateContractCommand record +2 param + Validator + Handler
- UpdateContractDraftCommand record +2 param + Handler (diff log thêm 2 field)
- ContractDetailDto mapping +2 field
~ Application/Contracts/Dtos/ContractDtos.cs
- ContractDetailDto +2 field
Validation Q2 chốt: cả 2 cùng null OK. Manual amount có thể null hoặc >= 0.
KHÔNG XOR với BudgetId (BE prefer link BudgetId nếu set, manual fallback only).
Controllers KHÔNG đụng (FromBody bind JSON → record record optional fields gen
auto null cho legacy callers — backward compat).
Verify: dotnet build pass · dotnet test SolutionErp.slnx 83 pass.
Next: Chunk 3 FE-Admin toggle + 2 fields PeHeaderForm + ContractHeaderForm.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
SOLUTION_ERP
Hệ thống quản lý Hợp đồng Nhà cung cấp / Thầu phụ / Tổ đội cho Công ty TNHH Xây dựng Solutions.
📘 AI context:
CLAUDE.md(pointer) →docs/CLAUDE.md(full)
Quick start (dev)
Yêu cầu: .NET 10 SDK, Node 20+, SQL Server (local hoặc qua Docker).
# 1. DB — chạy SQL Server qua Docker (nếu chưa có local)
docker compose up -d
# 2. Backend — migration + run Api (port 5443)
dotnet ef database update --project src/Backend/SolutionErp.Infrastructure --startup-project src/Backend/SolutionErp.Api
dotnet run --project src/Backend/SolutionErp.Api
# 3. Frontend admin (port 8082) — terminal mới
cd fe-admin
npm install
npm run dev
# 4. Frontend user (port 8080) — terminal mới
cd fe-user
npm install
npm run dev
Admin mặc định (sẽ seed sau Phase 1): admin@solutionerp.local / Admin@123456
Architecture
fe-admin (:8082) fe-user (:8080)
│ │
└────── /api proxy ──────┘
▼
SolutionErp.Api (:5443)
│
┌──────────────┼──────────────┐
▼ ▼ ▼
Application Domain Infrastructure ── SQL Server
Tech stack
- Backend: .NET 10 + Clean Architecture + CQRS (MediatR) + FluentValidation + AutoMapper + EF Core + ASP.NET Identity + JWT
- Frontend: React 18 + Vite + TypeScript + Tailwind + shadcn/ui + TanStack Query
- DB: SQL Server 2022
- Deploy: Windows Server + IIS
Roadmap
| Phase | Tuần | Focus |
|---|---|---|
| 0 Draft | T1 | Scaffold, parse FORM + QUY_TRINH |
| 1 Alpha Core | T2-4 | Auth, Permission, CRUD master |
| 2 Form Engine | T5-6 | Render template docx/xlsx |
| 3 Workflow | T7-9 | State machine 9 phase |
| 4 Report + Polish | T10-11 | Dashboard + Excel export |
| 5 Production | T12-13 | CI/CD IIS, UAT, go-live |
Chi tiết ở docs/changelog/migration-todos.md.
License
Proprietary — Công ty TNHH Xây dựng Solutions.
Description
Languages
C#
55%
TypeScript
42.7%
PowerShell
1.3%
JavaScript
0.3%
CSS
0.3%
Other
0.3%