# Business Logic — FUW05401SFLogic.setFUSV003202CC() [100 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.FUW05401SF.FUW05401SFLogic` |
| Layer | Service Component / Common Component (CC) |
| Module | `FUW05401SF` (Package: `eo.web.webview.FUW05401SF`) |

## 1. Role

### FUW05401SFLogic.setFUSV003202CC()

This method performs the **upper-level (up-stream) data mapping** for the Service Order Data (SOD) emission request. Its Javadoc states "上りマッピングをする。" (Perform up-stream mapping), meaning it transforms inbound web form data from the customer's data bean (X31SDataBeanAccess) into a structured HashMap hierarchy suitable for downstream CBS/SC processing. The method iterates over a list of device provision service contracts ("機器提供サービス契約リスト") stored at index `BEAN_SSO_1` (the "eo Light Phone Option Service Application/Cancellation" bean at array index 1) and constructs a nested SOD payload containing: (1) basic SOD information (SYSID, change reason code), (2) service contract information (contract number), (3) service contract detail information (detail number, pre-change option service contract registration datetime), (4) option service contract information (pre-change contract number, registration datetimes for option and sub-option contracts — only when the transaction flag indicates "cancellation/restoration" or the sub-option processing flag indicates "before change"), and (5) post-change device provision service information (contract number, registration datetime). It implements a **batch mapping / collection builder pattern**, assembling each iteration's child map into an array list that becomes the "request target data list". The method is called by two callers — `callSvcFUSV0032()` (with `tran_flg=false`, i.e., "application") and `callSvcFUSV0033()` (with `tran_flg=true`, i.e., "cancellation/restoration") — making it a **shared CC (Common Component) utility** invoked by the service order issuance workflow for both application and cancellation screen paths.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["setFUSV003202CC bean, outputMap, func_code, tran_flg"])

    DEBUG1["DEBUG: Start log"]
    CREATE_PARENT["parentMap = new HashMap"]
    PUT_FUNC["parentMap.put FUNC_CODE, func_code"]
    CREATE_ARRAY["arrayList = new ArrayList"]
    GET_SBOP["sbop_tran_flg = getDataBeanItemByPath bean[1], SBOP_TRAN_FLG"]

    LOOP_START{for i = 0 to KKTK_SVC_KEI_LIST.getCount}

    CREATE_CHILD["childMap = new HashMap"]
    CREATE_SOD_KIHON["sodKihonInfo = new HashMap"]
    PUT_SYSID["sodKihonInfo.put SYSID, sendMessageString SYSID"]
    PUT_IDO["sodKihonInfo.put IDO_DIV, CD00576_00031"]
    PUT_SOD_TO_CHILD["childMap.put SOD_KIHON_INFO, sodKihonInfo"]

    CREATE_SVC_KEI["svcKeiInfo = new HashMap"]
    PUT_SVC_KEI_NO["svcKeiInfo.put SVC_KEI_NO, sendMessageString SVC_KEI_NO"]
    PUT_SVC_TO_CHILD["childMap.put SVC_KEI_INFO, svcKeiInfo"]

    CREATE_SVC_UCWK["svcKeiUcwkInfo = new HashMap"]
    PUT_SVC_UCWK_NO["svcKeiUcwkInfo.put SVC_KEI_UCWK_NO, sendMessageString SVC_KEI_UCWK_NO"]
    PUT_CHAF_DTM["svcKeiUcwkInfo.put CHAF_SVC_KEI_UCWK_GENE_ADD_DTM, getDataBeanItemByPath"]
    PUT_UCWK_TO_CHILD["childMap.put SVC_KEI_UCWK_INFO, svcKeiUcwkInfo"]

    CREATE_OPSVKEI["opsvkeiInfo = new HashMap"]

    COND_FLG{IF tran_flg equals true OR sbop_tran_flg equals 1}

    PUT_CHBF_OPSVKEI_NO["opsvkeiInfo.put CHBF_OPSVKEI_NO, sendMessageString OP_SVC_KEI_NO"]
    CALL_GET_TRAN["tranTrgtRecOpArray = getTranTrgtRecOp bean[1]"]
    GET_EXT_K0351["extK0351 = getDataBeanItemByPath tranTrgtRecOpArray[0], KK0351_GENE_ADD_DTM_01"]
    PUT_CHBF_OPSVKEI_DTM["opsvkeiInfo.put CHBF_OPSVKEI_GENE_ADD_DTM, extK0351"]
    PUT_CHBF_SBOP_NO["opsvkeiInfo.put CHBF_SBOPSVKEI_NO, sendMessageString SBOP_SVC_KEI_NO"]
    GET_EXT_K0401["extK0401 = getDataBeanItemByPath tranTrgtRecOpArray[0], KK0401_GENE_ADD_DTM_01"]
    PUT_CHBF_SBOP_DTM["opsvkeiInfo.put CHBF_SBOPSVKEI_GENE_ADD_DTM, extK0401"]

    PUT_OPSVKEI_TO_CHILD["childMap.put OPSVKEI_INFO, opsvkeiInfo"]

    CREATE_KKTSVKEI["kktsvkeiInfo = new HashMap"]
    PUT_KKTSVKEI_NO["kktsvkeiInfo.put CHAF_KKTSVKEI_NO, getDataBeanItemByPath KKTK path i"]
    PUT_KKTSVKEI_DTM["kktsvkeiInfo.put CHAF_KKTSVKEI_GENE_ADD_DTM, getDataBeanItemByPath KKTK path i"]
    PUT_KKTSVKEI_TO_CHILD["childMap.put KKTSVKEI_INFO, kktsvkeiInfo"]

    ADD_TO_ARRAY["arrayList.add childMap"]

    PUT_ARRAY_TO_PARENT["parentMap.put REQ_TRGT_DATA_LIST, arrayList"]
    PUT_PARENT_TO_OUTPUT["outputMap.put HAKKO_SOD_MAP, parentMap"]

    DEBUG2["DEBUG: End log"]
    RETURN["Return outputMap"]
    END(["End"])

    START --> DEBUG1
    DEBUG1 --> CREATE_PARENT
    CREATE_PARENT --> PUT_FUNC
    PUT_FUNC --> CREATE_ARRAY
    CREATE_ARRAY --> GET_SBOP
    GET_SBOP --> LOOP_START
    LOOP_START --> CREATE_CHILD
    CREATE_CHILD --> CREATE_SOD_KIHON
    CREATE_SOD_KIHON --> PUT_SYSID
    PUT_SYSID --> PUT_IDO
    PUT_IDO --> PUT_SOD_TO_CHILD
    PUT_SOD_TO_CHILD --> CREATE_SVC_KEI
    CREATE_SVC_KEI --> PUT_SVC_KEI_NO
    PUT_SVC_KEI_NO --> PUT_SVC_TO_CHILD
    PUT_SVC_TO_CHILD --> CREATE_SVC_UCWK
    CREATE_SVC_UCWK --> PUT_SVC_UCWK_NO
    PUT_SVC_UCWK_NO --> PUT_CHAF_DTM
    PUT_CHAF_DTM --> PUT_UCWK_TO_CHILD
    PUT_UCWK_TO_CHILD --> CREATE_OPSVKEI
    CREATE_OPSVKEI --> COND_FLG
    COND_FLG -->|True| PUT_CHBF_OPSVKEI_NO
    COND_FLG -->|False| PUT_OPSVKEI_TO_CHILD
    PUT_CHBF_OPSVKEI_NO --> CALL_GET_TRAN
    CALL_GET_TRAN --> GET_EXT_K0351
    GET_EXT_K0351 --> PUT_CHBF_OPSVKEI_DTM
    PUT_CHBF_OPSVKEI_DTM --> PUT_CHBF_SBOP_NO
    PUT_CHBF_SBOP_NO --> GET_EXT_K0401
    GET_EXT_K0401 --> PUT_CHBF_SBOP_DTM
    PUT_CHBF_SBOP_DTM --> PUT_OPSVKEI_TO_CHILD
    PUT_OPSVKEI_TO_CHILD --> CREATE_KKTSVKEI
    CREATE_KKTSVKEI --> PUT_KKTSVKEI_NO
    PUT_KKTSVKEI_NO --> PUT_KKTSVKEI_DTM
    PUT_KKTSVKEI_DTM --> PUT_KKTSVKEI_TO_CHILD
    PUT_KKTSVKEI_TO_CHILD --> ADD_TO_ARRAY
    ADD_TO_ARRAY --> LOOP_START
    LOOP_START -.->|Loop ends| PUT_ARRAY_TO_PARENT
    PUT_ARRAY_TO_PARENT --> PUT_PARENT_TO_OUTPUT
    PUT_PARENT_TO_OUTPUT --> DEBUG2
    DEBUG2 --> RETURN
    RETURN --> END
```

**Constant Resolution:**
- `CD00001_1 = "1"` (JFUStrConst — indicates "before change" / "yes") — used in `sbop_tran_flg` comparison: "if sub-option processing flag equals 1"
- `CD00576_00031 = "00031"` (JFUStrConst — standard change reason code, "addition" 追加) — hardcoded as the `IDO_DIV` value in SOD basic info
- `SBOP_TRAN_FLG = "サブオプション処理フラグ"` (Sub-option processing flag) — field key used to retrieve from bean[1]
- `FUNC_CODE = "機能コード"` (Function code) — business meaning: the screen/feature identifier passed through to the SOD payload
- `HAKKO_SOD_MAP = "hakkoSODMap"` — the key under which the full parentMap is placed in the outputMap

**Conditional Branch Logic:**
- The condition `if (tran_flg || JFUStrConst.CD00001_1.equals(sbop_tran_flg))` branches on two criteria:
  - **True path (pre-change data population):** When `tran_flg` is `true` (cancellation/restoration transaction) OR when `sbop_tran_flg` equals `"1"` (sub-option processing flag indicates a "before change" state, i.e., a sub-option application scenario). In this case, the method retrieves pre-change option/sub-option contract numbers and their registration datetimes from the data bean via `getTranTrgtRecOp()`.
  - **False path (skip pre-change data):** When neither condition holds (standard application flow with no sub-option before-change state). The `opsvkeiInfo` map is created but remains empty — only its key is placed in `childMap`.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `bean` | `X31SDataBeanAccess[]` | Array of shared form data beans. Index `[0]` holds the common form bean; index `[1]` holds the "eo Light Phone Option Service Application/Cancellation" bean (申込) — this is where all source data (contract numbers, flags, datetime fields) is extracted from. The loop iterates over the "device provision service contract list" at path `KKTK_SVC_KEI_LIST` within `bean[1]`. |
| 2 | `outputMap` | `HashMap<String, Object>` | Result storage map — the method populates this with the fully constructed SOD mapping payload under the key `HAKKO_SOD_MAP` ("hakkoSODMap"). This map is consumed by the calling CBS/service method for downstream processing. |
| 3 | `func_code` | `String` | Function code — identifies the specific screen or business feature invoking this mapping. It is stored in the `parentMap` under the `FUNC_CODE` key and flows through to the downstream SOD emission request as an identifier of the originating transaction. |
| 4 | `tran_flg` | `boolean` | Transaction flag — `true` indicates "cancellation/restoration" (解約・回復) processing; `false` indicates "application" (申込). This flag controls whether pre-change option service contract data is populated in the SOD payload (see Block 4 branching logic). |

**External/Instance Fields Read:**
| Field | Type | Business Description |
|-------|------|---------------------|
| `DEBUG_LOG` | Logger | Debug logger instance (used for trace logging at method start/end) |
| `BEAN_SSO_1` | `int = 1` | Static constant indicating the array index of the "eo Light Phone Option Service Application/Cancellation" bean within the `bean` array |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `OneStopDataBeanAccessArray.getCount` | OneStopDataBeanAccessArray | - | Calls `getCount` in `OneStopDataBeanAccessArray` — retrieves the number of device provision service contract records to iterate over |
| R | `OneStopDataBeanAccess.getDataBeanArray` | OneStopDataBeanAccess | - | Calls `getDataBeanArray` to obtain the sub-list of device provision service contracts from the source bean |
| R | `OneStopDataBeanAccess.sendMessageString` | OneStopDataBeanAccess | - | Calls `sendMessageString` with `DATABEAN_GET_VALUE` to extract scalar field values (SYSID, SVC_KEI_NO, SVC_KEI_UCWK_NO, OP_SVC_KEI_NO, SBOP_SVC_KEI_NO) from the data bean |
| R | `OneStopDataBeanAccess.getDataBeanItemByPath` (via JFUWebCommon) | JFUWebCommon | - | Calls `getDataBeanItemByPath` to read nested path-based values: SBOP_TRAN_FLG, CHAF_SVC_KEI_UCWK_GENE_ADD_DTM, CHAF_KKTSVKEI_NO, CHAF_KKTSVKEI_GENE_ADD_DTM, KK0351_GENE_ADD_DTM_01, KK0401_GENE_ADD_DTM_01 |
| R | `OneStopDataBeanAccess.getDataBeanItemByPath` (via JFUDataBeanAccessHelper) | JFUDataBeanAccessHelper | - | Calls `getDataBeanItemByPath` within `getTranTrgtRecOp` to read OP_SVC_CD and construct filter conditions |
| R | `FUW05401SFLogic.getTranTrgtRecOp` | FUW05401SFLogic | - | Internal method that filters the service contract info list by option service code to return matching record array for pre-change data extraction |

All operations in this method are **Read (R)** operations. The method does not write to any database or invoke any CBS/SC for persistence. It is purely a **data transformation/mapping method** that reads from the data bean and writes to an in-memory HashMap structure.

## 5. Dependency Trace

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

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Internal: `FUW05401SFLogic.callSvcFUSV0032` | `callSvcFUSV0032` → `setFUSV003202CC(paramBean, inputMap, funcCd, false)` | `sendMessageString [R] X31SDataBeanAccess` (multiple) |
| 2 | Internal: `FUW05401SFLogic.callSvcFUSV0033` | `callSvcFUSV0033` → `setFUSV003202CC(paramBean, inputMap, funcCd, true)` | `sendMessageString [R] X31SDataBeanAccess` (multiple) |

**Caller Details:**
- `callSvcFUSV0032()` (L2096): Invokes `setFUSV003202CC` with `tran_flg=false` ("application" / 申込). Part of the "service order issuance" (サービスオーダ発行) workflow — specifically for the FTTH Auth Registration (FTTH Auth 登録) service order path.
- `callSvcFUSV0033()` (L2285): Invokes `setFUSV003202CC` with `tran_flg=true` ("cancellation/restoration" / 解約・回復). Part of the cancellation/restoration service order issuance flow.

**Terminal operations from this method:**
`getDataBeanItemByPath` [R] × 12 occurrences, `sendMessageString` [R] × 6 occurrences, `getTranTrgtRecOp` [R] — all read from in-memory data beans (X31SDataBeanAccess). No database writes.

## 6. Per-Branch Detail Blocks

### Block 1 — SETUP: Initialize parent map and iteration target (L2143–L2154)

> Sets up the top-level mapping structure, extracts the sub-option processing flag, and initializes the data list for iteration.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `DEBUG_LOG.info("----- FUW5401 setFUSV003202CC Start -----")` // Debug trace log |
| 2 | SET | `parentMap = new HashMap<String, Object>()` // Top-level map builder |
| 3 | SET | `parentMap.put(FUNC_CODE, func_code)` // [-> FUNC_CODE="機能コード"] Store function code in parent map |
| 4 | SET | `arrayList = new ArrayList<HashMap<String, Object>>()` // [-> REQ_TRGT_DATA_LIST="trgt_data_list"] Iteration target list |
| 5 | SET | `sbop_tran_flg = JFUWebCommon.getDataBeanItemByPath(bean[1], FUW05401SFConst.SBOP_TRAN_FLG)` // [-> SBOP_TRAN_FLG="サブオプション処理フラグ"] Extract sub-option processing flag from bean[1] |

### Block 2 — FOR LOOP: Iterate over device provision service contract records (L2155–L2231)

> Loops over each record in the "device provision service contract list" (機器提供サービス契約リスト) and constructs a child map containing all SOD-related data for that record.

| # | Type | Code |
|---|------|------|
| 1 | SET | `i = 0; i < bean[BEAN_SSO_1].getDataBeanArray(FUW05401SFConst.KKTK_SVC_KEI_LIST).getCount()` // [-> KKTK_SVC_KEI_LIST="機器提供サービス契約リスト"] Loop over service contract list |
| 2 | SET | `childMap = new HashMap<String, Object>()` // Per-record payload map |

#### Block 2.1 — SOD Basic Info Sub-map (L2161–L2169)

> Constructs the SOD basic information sub-map containing SYSID and the change reason division code.

| # | Type | Code |
|---|------|------|
| 1 | SET | `sodKihonInfo = new HashMap<String, Object>()` // SOD basic info sub-map |
| 2 | SET | `sodKihonInfo.put(SYSID, bean[BEAN_SSO_1].sendMessageString(FUW05401SFConst.SYSID, X31CWebConst.DATABEAN_GET_VALUE))` // [-> SYSID="SYSID"] Extract SYSID from bean[1] |
| 3 | SET | `sodKihonInfo.put(IDO_DIV, JFUStrConst.CD00576_00031)` // [-> IDO_DIV="異動区分"] [-> CD00576_00031="00031"] Hardcoded change reason: "addition" (追加) |
| 4 | SET | `childMap.put(SOD_KIHON_INFO, sodKihonInfo)` // [-> SOD_KIHON_INFO="SOD基本情報"] Add to child map |

#### Block 2.2 — Service Contract Info Sub-map (L2171–L2176)

> Constructs the service contract information sub-map containing the contract number.

| # | Type | Code |
|---|------|------|
| 1 | SET | `svcKeiInfo = new HashMap<String, Object>()` // Service contract info sub-map |
| 2 | SET | `svcKeiInfo.put(SVC_KEI_NO, bean[BEAN_SSO_1].sendMessageString(FUW05401SFConst.SVC_KEI_NO, X31CWebConst.DATABEAN_GET_VALUE))` // [-> SVC_KEI_NO="サービス契約番号"] Extract contract number from bean[1] |
| 3 | SET | `childMap.put(SVC_KEI_INFO, svcKeiInfo)` // [-> SVC_KEI_INFO="サービス契約情報"] Add to child map |

#### Block 2.3 — Service Contract Detail Info Sub-map (L2178–L2186)

> Constructs the service contract detail information sub-map containing the detail number and pre-change option service contract registration datetime.

| # | Type | Code |
|---|------|------|
| 1 | SET | `svcKeiUcwkInfo = new HashMap<String, Object>()` // Service contract detail info sub-map |
| 2 | SET | `svcKeiUcwkInfo.put(SVC_KEI_UCWK_NO, bean[BEAN_SSO_1].sendMessageString(FUW05401SFConst.SVC_KEI_UCWK_NO, X31CWebConst.DATABEAN_GET_VALUE))` // [-> SVC_KEI_UCWK_NO="サービス契約内訳番号"] Extract detail number from bean[1] |
| 3 | SET | `svcKeiUcwkInfo.put(CHAF_SVC_KEI_UCWK_GENE_ADD_DTM, JFUWebCommon.getDataBeanItemByPath(bean[BEAN_SSO_1], FUW05401SFConst.SVC_KEI_INFO_LIST + "/" + FUW05401SFConst.KK0161_GENE_ADD_DTM_01))` // [-> CHAF_SVC_KEI_UCWK_GENE_ADD_DTM="変更前オプションサービス契約世代登録年月日時分秒"] Extract registration datetime from nested path SVC_KEI_INFO_LIST/KK0161_GENE_ADD_DTM_01 |
| 4 | SET | `childMap.put(SVC_KEI_UCWK_INFO, svcKeiUcwkInfo)` // [-> SVC_KEI_UCWK_INFO="サービス契約内訳情報"] Add to child map |

#### Block 2.4 — Option Service Contract Info Sub-map (L2188–L2210)

> Constructs the option service contract information sub-map. Always creates the map. If the transaction flag indicates cancellation/restoration or sub-option "before change" state, populates pre-change data.

| # | Type | Code |
|---|------|------|
| 1 | SET | `opsvkeiInfo = new HashMap<String, Object>()` // Option service contract info sub-map (empty by default) |

##### Block 2.4.1 — [IF] Pre-change data population (L2192–L2208)

> Condition: `tran_flg || JFUStrConst.CD00001_1.equals(sbop_tran_flg)` — [CD00001_1="1"] Populate pre-change option contract data when transaction is cancellation/restoration OR sub-option processing flag equals "1" (before change).

| # | Type | Code |
|---|------|------|
| 1 | SET | `opsvkeiInfo.put(CHBF_OPSVKEI_NO, bean[BEAN_SSO_1].sendMessageString(FUW05401SFConst.OP_SVC_KEI_NO, X31CWebConst.DATABEAN_GET_VALUE))` // [-> CHBF_OPSVKEI_NO="変更前オプションサービス契約番号"] Extract pre-change option contract number |
| 2 | SET | `tranTrgtRecOpArray = getTranTrgtRecOp(bean[BEAN_SSO_1])` // [CD00001_1="1"] Call internal method to filter service contracts by option service code |
| 3 | SET | `extK0351 = JFUWebCommon.getDataBeanItemByPath(tranTrgtRecOpArray[0], FUW05401SFConst.KK0351_GENE_ADD_DTM_01)` // [-> KK0351_GENE_ADD_DTM_01="世代登録年月日時分秒（オプションサービス契約）"] Extract pre-change option contract registration datetime from filtered record |
| 4 | SET | `opsvkeiInfo.put(CHBF_OPSVKEI_GENE_ADD_DTM, extK0351)` // [-> CHBF_OPSVKEI_GENE_ADD_DTM="変更前オプションサービス契約世代登録年月日時分秒"] Store in map |
| 5 | SET | `opsvkeiInfo.put(CHBF_SBOPSVKEI_NO, bean[BEAN_SSO_1].sendMessageString(FUW05401SFConst.SBOP_SVC_KEI_NO, X31CWebConst.DATABEAN_GET_VALUE))` // [-> CHBF_SBOPSVKEI_NO="変更前サブオプションサービス契約番号"] Extract pre-change sub-option contract number |
| 6 | SET | `extK0401 = JFUWebCommon.getDataBeanItemByPath(tranTrgtRecOpArray[0], FUW05401SFConst.KK0401_GENE_ADD_DTM_01)` // [-> KK0401_GENE_ADD_DTM_01="世代登録年月日時分秒（サブオプションサービス契約）"] Extract pre-change sub-option contract registration datetime |
| 7 | SET | `opsvkeiInfo.put(CHBF_SBOPSVKEI_GENE_ADD_DTM, extK0401)` // [-> CHBF_SBOPSVKEI_GENE_ADD_DTM="変更前サブオプションサービス契約世代登録年月日時分秒"] Store in map |

##### Block 2.4.2 — [ELSE] Skip pre-change data (implicit)

> When both `tran_flg` is `false` AND `sbop_tran_flg` is not "1", `opsvkeiInfo` remains empty.

##### Block 2.4.3 — Add option sub-map to child map

| # | Type | Code |
|---|------|------|
| 1 | SET | `childMap.put(OPSVKEI_INFO, opsvkeiInfo)` // [-> OPSVKEI_INFO="オプションサービス契約情報"] Add to child map (may be empty) |

#### Block 2.5 — Device Provision Service Info Sub-map (L2212–L2225)

> Constructs the device (machine) provision service information sub-map containing post-change contract number and registration datetime.

| # | Type | Code |
|---|------|------|
| 1 | SET | `kktsvkeiInfo = new HashMap<String, Object>()` // Device provision service info sub-map |
| 2 | SET | `kktsvkeiInfo.put(CHAF_KKTSVKEI_NO, JFUWebCommon.getDataBeanItemByPath(bean[BEAN_SSO_1], FUW05401SFConst.KKTK_SVC_KEI_LIST + "/" + i + "/" + FUW05401SFConst.KKTK_SVC_KEI_NO_02))` // [-> CHAF_KKTSVKEI_NO="変更後機器提供サービス契約番号"] Extract post-change device provision contract number from path KKTK_SVC_KEI_LIST[i]/KKTK_SVC_KEI_NO_02 |
| 3 | SET | `kktsvkeiInfo.put(CHAF_KKTSVKEI_GENE_ADD_DTM, JFUWebCommon.getDataBeanItemByPath(bean[BEAN_SSO_1], FUW05401SFConst.KKTK_SVC_KEI_LIST + "/" + i + "/" + FUW05401SFConst.GENE_ADD_DTM_02))` // [-> CHAF_KKTSVKEI_GENE_ADD_DTM="変更後機器提供サービス契約世代登録年月日時分秒"] Extract post-change device provision registration datetime from path KKTK_SVC_KEI_LIST[i]/GENE_ADD_DTM_02 |
| 4 | SET | `childMap.put(KKTSVKEI_INFO, kktsvkeiInfo)` // [-> KKTSVKEI_INFO="機器提供サービス内訳情報"] Add to child map |

#### Block 2.6 — Add child map to array list (L2228–L2231)

| # | Type | Code |
|---|------|------|
| 1 | SET | `arrayList.add(childMap)` // Add the fully constructed child map to the iteration target list |

### Block 3 — FINALIZE: Assemble top-level payload (L2234–L2237)

> Attaches the array list to the parent map and stores the parent map in the output map, completing the SOD payload structure.

| # | Type | Code |
|---|------|------|
| 1 | SET | `parentMap.put(REQ_TRGT_DATA_LIST, arrayList)` // [-> REQ_TRGT_DATA_LIST="trgt_data_list"] Attach the list of child maps to the parent |
| 2 | SET | `outputMap.put(HAKKO_SOD_MAP, parentMap)` // [-> HAKKO_SOD_MAP="hakkoSODMap"] Store in output map under "hakkoSODMap" key |
| 3 | EXEC | `DEBUG_LOG.info("----- FUW5401 setFUSV003202CC End -----")` // Debug trace log |
| 4 | RETURN | `return outputMap` // Return the populated output map |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `SOD` | Acronym | Service Order Data — the data structure representing a service order emission request sent to downstream CBS processing |
| `bean[BEAN_SSO_1]` | Field | Shared form data bean at index 1 — contains "eo Light Phone Option Service Application/Cancellation" data (eo光電話オプションサービス申込解約) |
| `KKTK_SVC_KEI_LIST` | Constant | "Device provision service contract list" (機器提供サービス契約リスト) — path/key for the list of device provision service records to iterate over |
| `SVC_KEI_NO` | Field | Service contract number (サービス契約番号) — the unique identifier for a service contract line item |
| `SVC_KEI_UCWK_NO` | Field | Service contract detail number (サービス契約内訳番号) — internal tracking ID for a service contract sub-item |
| `KK0161_GENE_ADD_DTM_01` | Constant | "Registration datetime (service contract detail)" (世代登録年月日時分秒（サービス契約内訳）) — timestamp of when the service contract detail was registered |
| `OP_SVC_KEI_NO` | Field | Option service contract number (オプションサービス契約番号) — identifier for an option service (e.g., phone option) contract line |
| `SBOP_SVC_KEI_NO` | Field | Sub-option service contract number (サブオプションサービス契約番号) — identifier for a sub-option contract line |
| `KK0351_GENE_ADD_DTM_01` | Constant | "Registration datetime (option service contract)" (世代登録年月日時分秒（オプションサービス契約）) — timestamp of when an option service contract was registered |
| `KK0401_GENE_ADD_DTM_01` | Constant | "Registration datetime (sub-option service contract)" (世代登録年月日時分秒（サブオプションサービス契約）) — timestamp of when a sub-option service contract was registered |
| `CHBF_*` | Prefix | "Before change" (変更前) — indicates pre-change state data, populated only during cancellation/restoration or sub-option application |
| `CHAF_*` | Prefix | "After change" (変更後) — indicates post-change state data |
| `IDO_DIV` | Field | Change reason division (異動区分) — code indicating the type of contract change |
| `CD00576_00031` | Constant | Standard change reason code "00031" — represents "addition" (追加) |
| `SBOP_TRAN_FLG` | Constant | "Sub-option processing flag" (サブオプション処理フラグ) — indicates whether this is a sub-option application where pre-change data is relevant |
| `CD00001_1` | Constant | Standard value "1" — indicates "before change" state (変更前) |
| `tran_flg` | Parameter | Transaction flag — true = cancellation/restoration (解約・回復), false = application (申込) |
| `HAKKO_SOD_MAP` | Constant | "hakkoSODMap" — the output map key under which the full SOD payload is stored |
| `FUNC_CODE` | Constant | "機能コード" — function code identifying the invoking screen or feature |
| `REQ_TRGT_DATA_LIST` | Constant | "trgt_data_list" — key for the request target data list in the parent map |
| `CALL_SVC_*` | Method pattern | Service component call method naming convention (callSvcFUSV0032, callSvcFUSV0033) — indicates the CBS invocation path |
| FTTH | Business term | Fiber To The Home — fiber-optic internet service offered by K-Opticom |
| `X31SDataBeanAccess` | Type | Shared form data bean class — the framework class holding screen-form data for the web tier |
| `sendMessageString` | Method | Framework method to extract a scalar String value from a data bean by field name |
| `getDataBeanItemByPath` | Method | Framework method to read a value from a nested data bean structure using a dot/ slash-delimited path |
| `getTranTrgtRecOp` | Method | Internal filtering method — returns the array of service contract records matching the option service code, used to populate pre-change data |
