feat: расчёт стоимости платного тестирования/аренды GPU-серверов

Новая вкладка «Аренда» в конфигураторе (доступна для проектов с флагом
rental_enabled): расчёт по методичке "Регламент расчёта стоимости
платного тестирования и аренды GPU-серверов" — Разовый + Еженедельный
платёж по каждому компоненту (New/БУ чекбоксом), с аплифтом к Estimate.

Заодно: поддержка (support_code) в Base-вкладке теперь добавляется как
обычный LOT в спеку (SVC_{срок}y{уровень}_{платформа}) через
autocomplete-пикер вместо выпадающего списка — партномер собирается
тем же lot_name-based механизмом, что и для GPU/CPU/памяти, справочная
цена по регламенту техподдержки хранится в qt_settings.support_pricing.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Mikhail Chusavitin
2026-07-22 13:34:07 +03:00
co-authored by Claude Sonnet 5
parent b48436de93
commit 7edb80e498
25 changed files with 1052 additions and 71 deletions
+36
View File
@@ -134,10 +134,46 @@ func (h *ComponentHandler) GetConfiguratorSettings(c *gin.Context) {
if len(s.RequiredCategories) == 0 {
s.RequiredCategories = map[string][]string{"server": {"CPU", "MEM", "BB"}}
}
if s.SupportPricing == nil {
s.SupportPricing = defaultSupportPricing()
}
c.JSON(http.StatusOK, s)
}
// defaultSupportPricing mirrors "Регламент расчёта стоимости технической
// поддержки серверов" (BASE/STANDARD/PREMIUM tiers, x86 % of sale price /
// HGX fixed multi-year price by chip generation). Used only when the
// qt_settings "support_pricing" key is absent so it can be edited in
// MariaDB without a QuoteForge release.
func defaultSupportPricing() *localdb.SupportPricingTable {
return &localdb.SupportPricingTable{
X86Percent: map[string]map[string]float64{
"W": {"3": 0.06},
"B": {"1": 0.05, "3": 0.10, "5": 0.14},
"S": {"1": 0.07, "3": 0.13, "5": 0.18},
"P": {"1": 0.12, "3": 0.20, "5": 0.45},
},
HGXPrice: map[string]map[string]map[string]float64{
"HGX-H200": {
"B": {"1": 20000, "3": 55000, "5": 80000},
"S": {"1": 28000, "3": 70000, "5": 100000},
"P": {"1": 63000, "3": 105000},
},
"HGX-B200": {
"B": {"1": 40000, "3": 100000, "5": 145000},
"S": {"1": 55000, "3": 130000, "5": 185000},
"P": {"1": 101000, "3": 176000},
},
"HGX-B300": {
"B": {"1": 40000, "3": 100000, "5": 145000},
"S": {"1": 55000, "3": 130000, "5": 185000},
"P": {"1": 112000, "3": 187000},
},
},
}
}
func defaultConfigTypes() []localdb.ConfigTypeDef {
return []localdb.ConfigTypeDef{
{