# Business Logic — FUW02101SFLogic.createOptionData() [131 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.FUW02101SF.FUW02101SFLogic` |
| Layer | Service Component (SC) — web business logic class extending `JCCWebBusinessLogic` |
| Module | `FUW02101SF` (Package: `eo.web.webview.FUW02101SF`) |

## 1. Role

### FUW02101SFLogic.createOptionData()

This method generates the **contract capacity addition option** data for the K-Opticom fiber broadband email box capacity upgrade screen (FUW02101SF). Its Javadoc states: "契約容量追加オプションボタン用のデータを作成します" (Create data for the contract capacity addition option button). The method takes the user's current email box capacity from the data bean, then iteratively computes a list of optional capacity tiers, where each tier represents adding a fixed increment of capacity (`追加容量増分値`) up to a defined maximum. For each tier, it calculates the corresponding monthly charge using a fixed unit price (`料金プラン固定金額`), applying free-tier logic where the first portion of added capacity falls within the user's free quota (`無料容量`) and is billed at zero. The final combined capacity for each tier is formatted with human-readable units (MB or GB) and the associated price is formatted with thousand separators. The resulting list of option rows — each containing the optional capacity label, the price, and the total capacity after addition — is packaged into a nested map structure and placed into the `outputMap` under the key `SC_TITLE_FUSV005102` (FUSV005102SC). This data is subsequently consumed by `JFUWebCommon.setPrcInfoArea()` to render a price information area on the web UI, enabling the user to select a capacity addition plan. The method implements a **loop-until-cap** pattern with conditional pricing logic, routing each iteration through three distinct price calculation branches based on whether the user's free quota is exhausted.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["createOptionData bean, outputMap"])

    START --> S1["S1: Get baseValue from NOW_MLBOX_CAPA"]

    S1 --> GB["GB: new BigDecimal(1024)"]

    GB --> COND1{baseValue < 1024}

    COND1 -->|Yes| MB["nowCapaText = formatNumber(baseValue) + 'MB'"]
    MB --> SET_MB["Set NOW_MLBOX_CAPA bean value with nowCapaText"]

    COND1 -->|No| SET_NULL["Set NOW_MLBOX_CAPA bean value with null (GB path commented out)"]

    SET_MB --> GET_FREE["Get freeValue from MRYO_CAPA"]
    SET_NULL --> GET_FREE

    GET_FREE --> GET_ADD["Get addValue from ADD_CAPA_ZOUBUN_VALUE"]
    GET_ADD --> GET_END["Get endValue from ADD_CAPA_ZOUBUN_UPPL_VALUE"]
    GET_END --> GET_TANKA["Get tanka from PPLAN_KOTEI_AMNT"]
    GET_TANKA --> GET_TANI["Get tani from PPLAN_KOTEI_TANI_CD_NM"]

    GET_TANI --> LIST_INIT["List dataList = new ArrayList"]
    LIST_INIT --> IDX["idx = 1"]
    IDX --> GGET["Get gamenListArray from bean (ADD_CAPA_LIST)"]
    GGET --> CLEAR["clearArray gamenListArray"]
    CLEAR --> ADDBEAN["addDataBean gamenListArray"]

    ADDBEAN --> LOOP{while true}

    LOOP --> L_CALC["Calculate addCapa = addValue * idx"]
    L_CALC --> L_CALC2["Calculate goukeiCapa = baseValue + addCapa"]
    L_CALC2 --> FREE_DATA["freeData = false"]

    FREE_DATA --> COND_FREE{goukeiCapa <= freeValue}

    COND_FREE -->|Yes| FREE_SET["addMoney = 0, freeData = true"]
    FREE_SET --> SET_PRC["Set ADD_PRC_01 with addMoney"]

    COND_FREE -->|No| COND_BASE{baseValue >= freeValue}

    COND_BASE -->|Yes| CALC1["addMoney = tanka * (goukeiCapa - baseValue) / addValue"]
    COND_BASE -->|No| CALC2["addMoney = tanka * (goukeiCapa - freeValue) / addValue"]
    CALC1 --> SET_PRC
    CALC2 --> SET_PRC

    SET_PRC --> CAPA_CHECK{addCapa < 1024 and goukeiCapa >= 1024}

    CAPA_CHECK -->|Yes| FORMAT1["addgoukeiText = addCapa MB + (goukeiCapa GB)"]
    FORMAT1 --> SET_ADDCAPA1["Set ADD_CAPA_01 with addgoukeiText"]

    CAPA_CHECK -->|No| CAPA_CHECK2{addCapa > 1024 and goukeiCapa >= 1024}

    CAPA_CHECK2 -->|Yes| FORMAT2["addgoukeiText = addCapa GB + (goukeiCapa GB)"]
    FORMAT2 --> SET_ADDCAPA2["Set ADD_CAPA_01 with addgoukeiText"]

    CAPA_CHECK2 -->|No| SET_ADDCAPA3["Set ADD_CAPA_01 with null"]
    SET_ADDCAPA3 --> SET_GKEI["Set GOKEI_CAPA_01 with goukeiCapa"]

    SET_ADDCAPA1 --> SET_GKEI
    SET_ADDCAPA2 --> SET_GKEI

    SET_GKEI --> CHILD_MAP["childMap = new HashMap"]
    CHILD_MAP --> PRICE_SET["koteiAmountText = addMoney as String"]

    PRICE_SET --> COND_IDX{idx == 0}

    COND_IDX -->|Yes| ZERO_PRICE["koteiAmountText = PRICE_ZERO = 0"]
    ZERO_PRICE --> ZERO_PUT["childMap put PPLAN_KOTEI_TANI_CD_NM = tani"]

    COND_IDX -->|No| COND_FREE2{freeData == true or addCapa == 0}

    COND_FREE2 -->|Yes| FREE_LABEL["koteiAmountText = FREE_LABEL = 無料"]
    FREE_LABEL --> FREE_PUT["childMap put PPLAN_KOTEI_TANI_CD_NM = empty"]

    COND_FREE2 -->|No| CHARGE_PUT["childMap put PPLAN_KOTEI_TANI_CD_NM = tani"]

    ZERO_PUT --> DATA_ADD["childMap put PPLAN_KOTEI_AMNT"]
    FREE_PUT --> DATA_ADD
    CHARGE_PUT --> DATA_ADD

    DATA_ADD --> DATA_LIST_ADD["dataList add childMap"]

    DATA_LIST_ADD --> BREAK_CHECK{endValue <= goukeiCapa}

    BREAK_CHECK -->|Yes| BREAK["break loop"]
    BREAK_CHECK -->|No| INC["idx++"]
    INC --> LOOP

    BREAK --> MAP_RESULT["dataMap = new HashMap"]
    MAP_RESULT --> MAP_PUT["dataMap.put(EKK0601B001_LIST, dataList)"]

    MAP_PUT --> OUTPUT_PUT["outputMap.put(SC_TITLE_FUSV005102, dataMap)"]

    OUTPUT_PUT --> END(["Return / Next"])
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `bean` | `X31SDataBeanAccess` | The screen's working data bean holding all user-facing and backend values. It carries the current email box capacity (`NOW_MLBOX_CAPA` = "現在のメールボックス容量"), the free quota (`MRYO_CAPA` = "無料容量"), the capacity addition increment value (`ADD_CAPA_ZOUBUN_VALUE` = "追加容量増分値"), the maximum addition limit (`ADD_CAPA_ZOUBUN_UPPL_VALUE` = "追加容量増分上限値"), the fixed plan price (`PPLAN_KOTEI_AMNT` = "料金プラン固定金額"), and the price unit name (`PPLAN_KOTEI_TANI_CD_NM` = "料金プラン固定単位コード名"). The method also writes back the formatted current capacity string and builds the optional capacity tier list (`ADD_CAPA_LIST` = "追加容量リスト") on this bean. |
| 2 | `outputMap` | `HashMap<String, Object>` | The screen's output map that carries structured data to the next screen mapping layer (SC: `FUSV005102SC`). This method places a nested map under the key `EKK0601B001_LIST` = `"EKK0601B001CBSMsg1List"`, which in turn holds the `dataList` of price info rows. The output map is also keyed externally by `SC_TITLE_FUSV005102` = `"FUSV005102SC"` for routing to the correct screen mapper. |

**Read from instance fields / external state:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `EKK0601B001_LIST` | `private static final String` | Map key constant = `"EKK0601B001CBSMsg1List"` — identifies the list of pricing info rows for CBS message mapping. |
| `SC_TITLE_FUSV005102` | `private static final String` | Screen title key = `"FUSV005102SC"` — identifies the target screen's output mapping route. |
| `PPLAN_KOTEI_TANI_CD_NM` | `private static final String` | Field name = `"pplan_kotei_tani_cd_nm"` — used as a key in the `childMap` price info rows. |
| `PRICE_ZERO` | `private static final String` | Resolved value = `"0"` — displayed when the price is zero at idx=0. |
| `TANI_MB` | `private static final String` | Resolved value = `"MB"` — unit suffix for capacities below 1024. |
| `TANI_GB` | `private static final String` | Resolved value = `"GB"` — unit suffix for capacities at or above 1024. |
| `WEB_CAPA_TANI_MAE` | `private static final String` | Resolved value = `" (合計メールボックス容量"` — left part of capacity label prefix meaning "(total email box capacity". |
| `WEB_CAPA_TANI_ATO` | `private static final String` | Resolved value = `"MB)"` — right suffix for MB display format. |
| `WEB_CAPA_TANI_ATO_GB` | `private static final String` | Resolved value = `"GB)"` — right suffix for GB display format. |

## 4. CRUD Operations / Called Services

### Pre-computed evidence from code analysis graph:

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `JFUWebCommon.formatNumber` | JFUWebCommon | - | Formats numbers with thousand separators for display (used for `baseValue` and `addCapa` display strings). |
| R | `X31SDataBeanAccess.sendMessageString` | (bean) | - | Reads string values from the data bean — gets `NOW_MLBOX_CAPA` for current email box capacity. |
| R | `X31SDataBeanAccess.sendMessageLong` | (bean) | - | Reads long values from the data bean — gets `MRYO_CAPA`, `ADD_CAPA_ZOUBUN_VALUE`, `ADD_CAPA_ZOUBUN_UPPL_VALUE`, `PPLAN_KOTEI_AMNT`. |
| R | `X31SDataBeanAccess.getDataBeanArray` | (bean) | - | Gets the `ADD_CAPA_LIST` array for building the optional capacity tier list. |
| - | `OneStopDataBeanAccessArray.clearArray` | OneStopDataBeanAccessArray | - | Clears the capacity list array before populating new data. |
| C | `OneStopDataBeanAccessArray.addDataBean` | OneStopDataBeanAccessArray | - | Allocates a new data bean slot in the capacity list array for each tier. |
| - | `OneStopDataBeanAccess.sendMessageString` | (data bean) | - | Sets tier-level fields: `ADD_PRC_01` (optional price), `ADD_CAPA_01` (optional capacity label), `GOKEI_CAPA_01` (post-addition total capacity). |
| - | `OneStopDataBeanAccess.sendMessageString` | (bean) | - | Writes back formatted `NOW_MLBOX_CAPA` display string to the bean. |
| - | `Map.put` | HashMap | - | Populates `childMap` with `PPLAN_KOTEI_TANI_CD_NM` and `PPLAN_KOTEI_AMNT` for price info rows. |
| - | `List.add` | ArrayList | - | Appends each `childMap` price info row to `dataList`. |
| - | `HashMap.put` | HashMap | - | Places `EKK0601B001_LIST` key pointing to `dataList` in `dataMap`. |
| - | `HashMap.put` | HashMap | - | Places `SC_TITLE_FUSV005102` key pointing to `dataMap` in the outer `outputMap`. |

**Note:** This method is purely in-memory data preparation. It performs **no database reads, writes, or CBS/SC calls**. All operations are local bean reads, data structure mutations, and string/numeric computations. The output is handed off to the screen mapping layer (`FUSV005102SC`) for subsequent processing.

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | `FUW02101SFLogic.init()` | `FUW02101SFLogic.init()` -> `createOptionData(bean, outputMap)` | `sendMessageString [R] NOW_MLBOX_CAPA`, `sendMessageString [R] MRYO_CAPA`, `sendMessageString [R] ADD_CAPA_ZOUBUN_VALUE`, `sendMessageString [R] ADD_CAPA_ZOUBUN_UPPL_VALUE`, `sendMessageString [R] PPLAN_KOTEI_AMNT`, `sendMessageString [R] PPLAN_KOTEI_TANI_CD_NM`, `addDataBean [C] ADD_CAPA_LIST`, `sendMessageString [R] ADD_PRC_01`, `sendMessageString [R] ADD_CAPA_01`, `sendMessageString [R] GOKEI_CAPA_01`, `formatNumber [-] display formatting` |

The method is called exclusively from `FUW02101SFLogic.init()`, which is the screen initialization logic for the FUW02101SF (Contract Capacity Addition Option) screen. The call chain is a single direct invocation — no intermediate screen or CBS layer sits between the entry point and this method.

## 6. Per-Branch Detail Blocks

**Block 1** — [SET] (L590-591)

> Retrieve the current email box capacity from the bean and prepare a GB threshold constant.

| # | Type | Code |
|---|------|------|
| 1 | GET | `baseValue = bean.sendMessageString(FUW02101SFConst.NOW_MLBOX_CAPA, X31CWebConst.DATABEAN_GET_VALUE)` |
| 2 | SET | `baseValue = Long.valueOf(...).intValue()` // Convert current mail box capacity to integer |
| 3 | SET | `nowCapaText = null` // Initialize display text variable |
| 4 | SET | `gbDecimal = new BigDecimal(1024)` // GB threshold constant |

**Block 2** — [IF/ELSE] `(baseValue < 1024)` [L593]

> Format the current capacity display string. If capacity is below 1024, show as MB. The GB path is commented out.

| # | Type | Code |
|---|------|------|
| 1 | SET | `nowCapaText = JFUWebCommon.formatNumber(String.valueOf(baseValue)) + TANI_MB` // TANI_MB = "MB" [-> "MB"] |
| 2 | EXEC | `bean.sendMessageString(FUW02101SFConst.NOW_MLBOX_CAPA, X31CWebConst.DATABEAN_SET_VALUE, nowCapaText)` // Write formatted capacity back to bean |

**Block 2.1** — [ELSE, commented out] `(baseValue >= 1024)` [L596-597]

> GB display path — currently disabled. Would convert to GB with 1 decimal place.

| # | Type | Code |
|---|------|------|
| 1 | SET | `nowCapaText = baseValueDecimal.divide(gbDecimal, 1, BigDecimal.ROUND_UP) + TANI_GB` // COMMENTED OUT — TANI_GB = "GB" |
| 2 | EXEC | `bean.sendMessageString(FUW02101SFConst.NOW_MLBOX_CAPA, X31CWebConst.DATABEAN_SET_VALUE, nowCapaText)` // COMMENTED OUT |

**Block 3** — [SET] (L599-609)

> Read all pricing and capacity configuration values from the bean into local variables.

| # | Type | Code |
|---|------|------|
| 1 | SET | `freeValue = bean.sendMessageLong(FUW02101SFConst.MRYO_CAPA, X31CWebConst.DATABEAN_GET_VALUE).intValue()` // MRYO_CAPA = "無料容量" — Free quota |
| 2 | SET | `addValue = bean.sendMessageLong(FUW02101SFConst.ADD_CAPA_ZOUBUN_VALUE, X31CWebConst.DATABEAN_GET_VALUE).intValue()` // ADD_CAPA_ZOUBUN_VALUE = "追加容量増分値" — Capacity increment step |
| 3 | SET | `endValue = bean.sendMessageLong(FUW02101SFConst.ADD_CAPA_ZOUBUN_UPPL_VALUE, X31CWebConst.DATABEAN_GET_VALUE).intValue()` // ADD_CAPA_ZOUBUN_UPPL_VALUE = "追加容量増分上限値" — Max addition limit |
| 4 | SET | `tanka = bean.sendMessageLong(FUW02101SFConst.PPLAN_KOTEI_AMNT, X31CWebConst.DATABEAN_GET_VALUE).intValue()` // PPLAN_KOTEI_AMNT = "料金プラン固定金額" — Fixed plan price |
| 5 | SET | `tani = bean.sendMessageString(FUW02101SFConst.PPLAN_KOTEI_TANI_CD_NM, X31CWebConst.DATABEAN_GET_VALUE)` // PPLAN_KOTEI_TANI_CD_NM = "料金プラン固定単位コード名" — Price unit name |

**Block 4** — [SET] (L611-617)

> Initialize the list, iteration index, and capacity tier list array on the bean.

| # | Type | Code |
|---|------|------|
| 1 | SET | `dataList = new ArrayList<Map<String, Object>>()` // List of price info rows |
| 2 | SET | `idx = 1` // Iteration counter for capacity tiers |
| 3 | SET | `gamenListArray = bean.getDataBeanArray(FUW02101SFConst.ADD_CAPA_LIST)` // ADD_CAPA_LIST = "追加容量リスト" |
| 4 | EXEC | `gamenListArray.clearArray()` // Clear existing tier data |
| 5 | SET | `addCapaListDataType = gamenListArray.addDataBean()` // Allocate bean slot for current tier |

**Block 5** — [WHILE TRUE loop] (L619)

> Main loop that iterates through each optional capacity tier until reaching the maximum limit.

| # | Type | Code |
|---|------|------|
| 1 | SET | `addCapa = addValue * idx` // Current tier's added capacity |
| 2 | SET | `goukeiCapa = baseValue + addCapa` // Total capacity after addition |
| 3 | SET | `addMoney = 0` // Initialize price for this tier |

**Block 5.1** — [IF/ELSE] `(goukeiCapa <= freeValue)` [L625]

> Check if the total capacity (base + added) falls entirely within the user's free quota.

| # | Type | Code |
|---|------|------|
| 1 | SET | `freeData = false` // Flag indicating if this tier is free |
| 2 | SET | `addMoney = 0` // No charge — within free quota |
| 3 | SET | `freeData = true` // Mark as free data |

**Block 5.1.1** — [ELSE] `(goukeiCapa > freeValue)` [L630]

> Total capacity exceeds the free quota — calculate the charge.

**Block 5.1.1.1** — [IF] `(baseValue >= freeValue)` [L631]

> The user's base capacity already exceeds the free quota. Charge starts from the base.

| # | Type | Code |
|---|------|------|
| 1 | SET | `addMoney = tanka * (goukeiCapa - baseValue) / addValue` // Price = unit price * (total - base) / increment |

**Block 5.1.1.2** — [ELSE] `(baseValue < freeValue)` [L635]

> The user has remaining free capacity that covers part of the base. Charge only for the portion beyond the free quota.

| # | Type | Code |
|---|------|------|
| 1 | SET | `addMoney = tanka * (goukeiCapa - freeValue) / addValue` // Price = unit price * (total - free) / increment |

**Block 6** — [EXEC] (L642)

> Write the calculated price for this tier back to the tier data bean.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `addCapaListDataType.sendMessageString(FUW02101SFConst.ADD_PRC_01, X31CWebConst.DATABEAN_ADD_VALUE, String.valueOf(addMoney))` // ADD_PRC_01 = "追加料金" — Optional price |

**Block 7** — [SET] (L646)

> Prepare capacity display formatting.

| # | Type | Code |
|---|------|------|
| 1 | SET | `addgoukeiText = null` // Initialize display text for capacity label |
| 2 | SET | `addCapaDecimal = new BigDecimal(addCapa)` // BigDecimal for addCapa |
| 3 | SET | `goukeiCapaDecimal = new BigDecimal(goukeiCapa)` // BigDecimal for goukeiCapa |

**Block 8** — [IF/ELSE-IF] `(addCapa < 1024 && goukeiCapa >= 1024)` [L657] / `(addCapa > 1024 && goukeiCapa >= 1024)` [L665]

> Format the combined capacity label with unit conversion. Three branches handle: (a) addition is MB but total reaches GB, (b) both addition and total are in GB, (c) neither branch matches (text remains null).

**Block 8.1** — [IF] `(addCapa < 1024 && goukeiCapa >= 1024)` [L657]

> The added capacity is in MB but the total crosses into GB. Display as: `"{addCapa}MB (goukeiCapa GB)"`.

| # | Type | Code |
|---|------|------|
| 1 | SET | `capaDecimal = goukeiCapaDecimal.divide(gbDecimal)` // Convert total to GB |
| 2 | SET | `capaDecimal = capaDecimal.setScale(2, BigDecimal.ROUND_DOWN)` // Round down to 2 decimal places |
| 3 | SET | `capaDecimal = capaDecimal.setScale(1, BigDecimal.ROUND_UP)` // Round up to 1 decimal place |
| 4 | SET | `addgoukeiText = formatNumber(addCapa) + "MB" + " (合計メールボックス容量" + capaDecimal + "GB)"` // Format: "{addCapa}MB (total GB)GB)" |
| 5 | EXEC | `addCapaListDataType.sendMessageString(FUW02101SFConst.ADD_CAPA_01, X31CWebConst.DATABEAN_ADD_VALUE, addgoukeiText)` // ADD_CAPA_01 = "追加容量" — Optional capacity label |

**Block 8.2** — [ELSE-IF] `(addCapa > 1024 && goukeiCapa >= 1024)` [L665]

> Both addition and total are in GB. Display as: `"{addCapa GB} (total GB GB)"`.

| # | Type | Code |
|---|------|------|
| 1 | SET | `capaDecimal = addCapaDecimal.divide(gbDecimal)` // Convert addCapa to GB |
| 2 | SET | `capaDecimal = capaDecimal.setScale(2, BigDecimal.ROUND_DOWN)` // Round down to 2 decimal places |
| 3 | SET | `capaDecimal = capaDecimal.setScale(1, BigDecimal.ROUND_UP)` // Round up to 1 decimal place |
| 4 | SET | `addgoukeiText = capaDecimal + "GB" + " (合計メールボックス容量" + goukeiCapaDecimal.divide(gbDecimal, 1, BigDecimal.ROUND_UP) + "GB)"` // Format: "{addCapa GB} (total GB)GB)" |
| 5 | EXEC | `addCapaListDataType.sendMessageString(FUW02101SFConst.ADD_CAPA_01, X31CWebConst.DATABEAN_ADD_VALUE, addgoukeiText)` // Set capacity label |

**Block 9** — [EXEC] (L675)

> Write the total capacity value as a raw number for each tier.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `addCapaListDataType.sendMessageString(FUW02101SFConst.GOKEI_CAPA_01, X31CWebConst.DATABEAN_ADD_VALUE, String.valueOf(goukeiCapa))` // GOKEI_CAPA_01 = "追加後合計容量" — Post-addition total capacity |

**Block 10** — [IF/ELSE-IF/ELSE] Price info row construction [L679-694]

> Build a `childMap` representing the pricing details for this tier. Three branches based on iteration context: zero iteration, free/discounted tier, or standard chargeable tier.

**Block 10.1** — [IF] `(idx == 0)` [L682] — Note: idx starts at 1 in this loop, so this branch is unreachable.

> When iteration is zero, set price to the literal zero string.

| # | Type | Code |
|---|------|------|
| 1 | SET | `koteiAmountText = PRICE_ZERO` // PRICE_ZERO = "0" |
| 2 | SET | `childMap.put(PPLAN_KOTEI_TANI_CD_NM, tani)` // PPLAN_KOTEI_TANI_CD_NM = "pplan_kotei_tani_cd_nm" |

**Block 10.2** — [ELSE-IF] `(freeData == true || addCapa == 0)` [L686]

> When the tier is free (within free quota) or the added capacity is zero, display the free label.

| # | Type | Code |
|---|------|------|
| 1 | SET | `koteiAmountText = JFUStrConst.FREE_LABEL` // JFUStrConst.FREE_LABEL = "無料" |
| 2 | SET | `childMap.put(PPLAN_KOTEI_TANI_CD_NM, JFUStrConst.EMPTY)` // Empty unit name for free tiers |

**Block 10.3** — [ELSE] [L691]

> Standard chargeable tier — keep the unit name.

| # | Type | Code |
|---|------|------|
| 1 | SET | `childMap.put(PPLAN_KOTEI_TANI_CD_NM, tani)` // Set price unit name from plan config |

**Block 10.4** — [Shared end] (L695-696)

> Finalize and add the childMap to dataList.

| # | Type | Code |
|---|------|------|
| 1 | SET | `childMap.put(PPLAN_KOTEI_AMNT, koteiAmountText)` // PPLAN_KOTEI_AMNT = "料金プラン固定金額" |
| 2 | EXEC | `dataList.add(childMap)` // Add price info row to list |

**Block 11** — [IF/ELSE] `(endValue <= goukeiCapa)` [L699]

> Check if the total capacity has reached or exceeded the maximum addition limit. If so, exit the loop.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `break` // Exit the while loop — all tiers generated |
| 2 | SET | `idx++` // Increment iteration counter for next tier |

**Block 12** — [SET] (L704-710)

> Assemble the final result structure and place it in the output map.

| # | Type | Code |
|---|------|------|
| 1 | SET | `dataMap = new HashMap<String, Object>()` // Outer container map |
| 2 | SET | `dataMap.put(EKK0601B001_LIST, dataList)` // EKK0601B001_LIST = "EKK0601B001CBSMsg1List" — CBS message list key |
| 3 | EXEC | `outputMap.put(SC_TITLE_FUSV005102, dataMap)` // SC_TITLE_FUSV005102 = "FUSV005102SC" — Route to screen mapper |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `NOW_MLBOX_CAPA` | Field | Current Mail Box Capacity — the subscriber's existing email storage capacity in MB, retrieved from the data bean. |
| `MRYO_CAPA` | Field | Free Capacity — the amount of email storage included free of charge in the subscriber's plan. |
| `ADD_CAPA_ZOUBUN_VALUE` | Field | Capacity Addition Increment — the fixed amount of capacity (in MB) added per optional tier step. |
| `ADD_CAPA_ZOUBUN_UPPL_VALUE` | Field | Capacity Addition Increment Upper Limit — the maximum total capacity (base + additions) allowed for this option. |
| `PPLAN_KOTEI_AMNT` | Field | Plan Fixed Amount — the fixed monthly charge per increment step for optional capacity additions. |
| `PPLAN_KOTEI_TANI_CD_NM` | Field | Plan Fixed Unit Code Name — the currency/unit label for the plan price (e.g., "円" for Japanese Yen). |
| `ADD_CAPA_LIST` | Field | Capacity Addition List — the data bean array holding the optional capacity tier rows for the screen. |
| `ADD_PRC_01` | Field | Optional Price — the monthly charge for a specific capacity addition tier. |
| `ADD_CAPA_01` | Field | Optional Capacity — the human-readable capacity label for a tier (e.g., "1024MB (合計メールボックス容量 2.0GB)"). |
| `GOKEI_CAPA_01` | Field | Post-Addition Total Capacity — the combined capacity (base + added) as a raw number for a specific tier. |
| `freeData` | Variable | Free Data Flag — indicates whether the tier's total capacity falls entirely within the free quota, so no charge applies. |
| `addValue` | Variable | Addition Increment Value — the per-tier capacity step in MB, loaded from the plan configuration. |
| `goukeiCapa` | Variable | Total Capacity — base capacity plus the added capacity for the current tier (baseValue + addCapa). |
| `tanka` | Variable | Unit Price — the fixed monthly charge per increment step, loaded from the plan. |
| `tani` | Variable | Unit Name — the currency/unit label (e.g., "円") for display alongside the price. |
| `EKK0601B001_LIST` | Constant | CBS Message List Key = `"EKK0601B001CBSMsg1List"` — identifies the pricing info row list for the CBS mapping layer. |
| `SC_TITLE_FUSV005102` | Constant | Screen Title Key = `"FUSV005102SC"` — routes the output data to the FUSV005102 screen mapping module. |
| `PRICE_ZERO` | Constant | Resolved value = `"0"` — string used to represent zero price in the pricing display. |
| `TANI_MB` | Constant | Resolved value = `"MB"` — unit suffix for capacities below 1024 MB. |
| `TANI_GB` | Constant | Resolved value = `"GB"` — unit suffix for capacities at or above 1024 MB. |
| `WEB_CAPA_TANI_MAE` | Constant | Resolved value = `" (合計メールボックス容量"` — left label prefix meaning "(total email box capacity". |
| `WEB_CAPA_TANI_ATO` | Constant | Resolved value = `"MB)"` — right label suffix for MB display format. |
| `WEB_CAPA_TANI_ATO_GB` | Constant | Resolved value = `"GB)"` — right label suffix for GB display format. |
| `FREE_LABEL` | Constant | Resolved value = `"無料"` — Japanese word for "free", displayed when a tier costs nothing. |
| FUSV005102SC | SC Code | Pricing Information Display Screen — the downstream screen module that renders the price info area using the prepared data. |
| `X31SDataBeanAccess` | Class | K-Opticom screen data bean — the central data exchange object carrying all values between the screen, logic layer, and CBS layer. |
| `OneStopDataBeanAccessArray` | Class | Data bean array wrapper — manages a list of `X31SDataBeanAccess` objects for multi-row data like tier lists. |
| `JFUWebCommon.formatNumber` | Method | Number formatting utility — adds thousand separators to numeric strings for display. |
