# Business Logic — JFUTelOptSvcMskmCmpCC.setSODMapping() [179 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `com.fujitsu.futurity.bp.custom.common.JFUTelOptSvcMskmCmpCC` |
| Layer | CC/Common Component (Package: `com.fujitsu.futurity.bp.custom.common`) |
| Module | `common` (Package: `com.fujitsu.futurity.bp.custom.common`) |

## 1. Role

### JFUTelOptSvcMskmCmpCC.setSODMapping()

This method is the core **SOD (Service Order Data) mapping processor** for the eo Optical Phone Pack Application (AP) Submission/Cancellation CMP (Composite) component. Its primary business purpose is to construct a structured `HashMap` containing all the service contract, operation service, and equipment-provided service data required by downstream SOD registration screens (e.g., KKSV0194).

The method handles **two service categories**: (1) **eo Optical Phone Agreement Consent** (EKK0191A010) — a service contract inquiry service for FTTH/eo optical phone agreements; and (2) **Equipment-Provided Service Contract Search** (EKK0341A010) — a search for service contracts tied to specific customer-provided equipment (VA/Value-Added equipment or multi-function routers). The method implements a **routing/dispatch pattern**: it first queries agreement and equipment information from the system, then dispatches a nested loop over the caller's data list to produce the final SOD-ready data map.

Its role in the larger system is that of a **shared data transformer** called by top-level operation pack processing classes (e.g., `JFUSetOptPackMskmCC` and `JFUTelOptSvcMskmCC`) during both submission and cancellation flows. It normalizes raw operation service data into a standardized SOD structure (`hakkoSODMap`) containing: SOD basic info (with system ID and interlocking division code), service contract info, service contract detail info, operation service info (before-and-after for both main and sub-operation services), and equipment-provided service info (before-and-after). The method also performs an **equipment verification step**: if a VA equipment change number exists, it validates that the equipment-provided service contract matches the VA record and skips mismatches to prevent inconsistent SOD registration.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["setSODMapping Start"])
    START --> LOG1["outDebugLog: setSODDataMapping Start"]
    LOG1 --> GET_INMAP["inMap = param.getData(fixedText)"]
    GET_INMAP --> PARENT_INIT["parentMap = new HashMap()"]
    PARENT_INIT --> FUNC_CODE["parentMap.put('func_code', FUNC_CD_1 = '1')"]
    FUNC_CODE --> GET_UPDATE["updateSODMap = getUpdateSODMap(inMap)"]
    GET_UPDATE --> CREATE_LIST["arrayList = new ArrayList<HashMap<String, Object>>()"]
    CREATE_LIST --> GET_KIKI["kikiDataList = getKikiDataList(handle, param, fixedText)"]
    GET_KIKI --> INIT_EKK0191["JFUBPCommon.initData(param, fixedText, IN_COL_LIST_EKK0191A010)"]
    INIT_EKK0191 --> MAP_EKK0191["setInMapEKK0191A010(param, fixedText, inMap)"]
    MAP_EKK0191 --> EXEC_EKK0191["JFUBPCommon.executeSC(handle, param, fixedText, TEMP_ID_EKK0191A010, TEMP_ID_DTL_EKK0191A010, ...)"]
    EXEC_EKK0191 --> GET_SVC_INFO["svcKeiUcwkInfoTelMap = JFUBPCommon.getTemplateListMap(inMap, getKey(inMap, TEMP_TEMP_KEY_EKK0191A010), ...)"]
    GET_SVC_INFO --> GET_VA_KIKI["vaKikiChgNo = svcKeiUcwkInfoTelMap.get(VA_KIKI_CHG_NO)"]
    GET_VA_KIKI --> KIKI_LOOP["for each kikiMap in kikiDataList"]
    KIKI_LOOP --> CHECK_VA["is vaKikiChgNo != null?"]
    CHECK_VA -->|Yes| GET_KKT_SVC["kktkSvcKeiNo = kikiMap.get(KKTK_SVC_KEI_NO)"]
    CHECK_VA -->|No| SKIP_INNER["skip inner dataList loop"]
    GET_KKT_SVC --> INIT_EKK0341["JFUBPCommon.initData(param, fixedText, IN_COLUMN_LIST_EKK0341A010)"]
    INIT_EKK0341 --> IGNORE_ERR["JFUBPCommon.ignoreSearchError(param, fixedText)"]
    IGNORE_ERR --> MAP_EKK0341["setInMapKktkSvcKeiUqSearch(param, fixedText, kktkSvcKeiNo)"]
    MAP_EKK0341 --> EXEC_EKK0341["JFUBPCommon.executeSC(handle, param, fixedText, EKK0341A010, ...)"]
    EXEC_EKK0341 --> GET_KKT_INFO["kktkInfoMap = JFUBPCommon.getTemplateListMap(inMap, getKey(...), ...)"]
    GET_KKT_INFO --> GET_KIKI_CHG["kikiChgNo = kktkInfoMap.get(KIKI_CHG_NO)"]
    GET_KIKI_CHG --> CHG_COMPARE["vaKikiChgNo != kikiChgNo OR kikiChgNoSet contains kikiChgNo?"]
    CHG_COMPARE -->|True| SKIP_INNER
    CHG_COMPARE -->|False| ADD_TO_SET["vaKikiChgNoSet.add(kikiChgNo)"]
    ADD_TO_SET --> INNER_LOOP["for each dtlMap in dataList"]
    SKIP_INNER --> INNER_LOOP
    INNER_LOOP --> CHILD_MAP["childMap = new HashMap()"]
    CHILD_MAP --> SOD_KIHON["sodKihonInfo: sysid + ido_div = CD00576_00031 = '00031'"]
    SOD_KIHON --> SVC_KAI["svcKeiInfo: svc_kei_no from dtlMap"]
    SVC_KAI --> SVC_UCWK["svcKeiUcwkInfo: svc_kei_ucwk_no + chaf_svc_kei_ucwk_gene_add_dtm"]
    SVC_UCWK --> OPSVKEI["opsvkeiInfo: chbf_opsvkei_no + chbf_opsvkei_gene_add_dtm + chbf_sbopsvkei_no + chbf_sbopsvkei_gene_add_dtm"]
    OPSVKEI --> UPDATE_CHECK["updateSODOpMap = updateSODMap.get(dtlMap.get('op_svc_cd')) != null?"]
    UPDATE_CHECK -->|Yes| UPDATE_OPSV["put chaf_opsvkei_no + chaf_opsvkei_gene_add_dtm from updateSODOpMap"]
    UPDATE_CHECK -->|No| DEFAULT_OPSV["put chaf_opsvkei_no + chaf_opsvkei_gene_add_dtm from dtlMap"]
    UPDATE_OPSV --> SBOP_CHECK["updateSODSbopMap = updateSODMap.get(dtlMap.get('sbop_svc_cd')) != null?"]
    DEFAULT_OPSV --> SBOP_CHECK
    SBOP_CHECK -->|Yes| UPDATE_SBOP["put chaf_sbopsvkei_no + chaf_sbopsvkei_gene_add_dtm from updateSODSbopMap"]
    SBOP_CHECK -->|No| DEFAULT_SBOP["put chaf_sbopsvkei_no + chaf_sbopsvkei_gene_add_dtm from dtlMap"]
    UPDATE_SBOP --> KKT_INFO["kktsvkeiInfo: chaf_kktsvkei_no + chaf_kktsvkei_gene_add_dtm from kikiMap"]
    DEFAULT_SBOP --> KKT_INFO
    KKT_INFO --> ADD_CHILD["arrayList.add(childMap)"]
    ADD_CHILD --> OUTER_END["end kiki loop"]
    OUTER_END --> PUT_LIST["parentMap.put('trgt_data_list', arrayList)"]
    PUT_LIST --> SET_DATA["param.setData('hakkoSODMap', parentMap)"]
    SET_DATA --> END_LOG["outDebugLog: setSODDataMapping End"]
    END_LOG --> END_NODE(["Return / Next"])
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | Database session handle carrying the current user's session context, transaction state, and connection information for service component execution. |
| 2 | `param` | `IRequestParameterReadWrite` | Request parameter object used to pass data between CC layers and service components. Used to get/set input data (`getData`, `setData`) and to initialize/invoke service IF calls. |
| 3 | `fixedText` | `String` | Fixed text identifier (template ID prefix) used as a key namespace within `param` for distinguishing data templates across different screens/contexts. Determines which data bucket `param.getData(fixedText)` retrieves. |
| 4 | `dataList` | `ArrayList<HashMap>` | The caller's source data list containing operation service records to be mapped into SOD format. Each `HashMap` in the list represents one operation service item with fields: `sysid`, `svc_kei_no`, `svc_kei_ucwk_no`, `chaf_svc_kei_ucwk_gene_add_dtm`, `chbf_opsvkei_no`, `chbf_opsvkei_gene_add_dtm`, `chbf_sbopsvkei_no`, `chbf_sbopsvkei_gene_add_dtm`, `chaf_opsvkei_no`, `chaf_opsvkei_gene_add_dtm`, `op_svc_cd` (service code), and `sbop_svc_cd` (sub-operation service code). |

**Constants read from source:**

| Constant | Resolved Value | Business Meaning |
|----------|---------------|------------------|
| `FUNC_CD_1` | `"1"` | Function code — indicates the current function context (standard processing mode). Defined in `JPCModelConstant`. |
| `OP_SVC_CD` | `"op_svc_cd"` | Key name for the operation service code within a `HashMap`, used to look up updated operation data in `updateSODMap`. |
| `CD00576_00031` | `"00031"` | Interlocking division code — set as `ido_div` (異動区分) for all SOD records, indicating a standard (non-cancelled, non-modified) movement type. Defined in `JFUStrConst`. |

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| I | `JFUBPCommon.initData` | - | - | Initializes input column data for EKK0191A010 service IF |
| I | `JFUBPCommon.ignoreSearchError` | - | - | Disables search error checking for EKK0341A010 equipment-provided service contract query |
| R | `JFUBPCommon.executeSC` (EKK0191A010) | EKK0191A010SC | KK_T_SVC_KEI_UCWK / KK_T_SVC_KEI | Queries eo optical phone agreement consent (service contract detail) for the current context |
| R | `JFUBPCommon.executeSC` (EKK0341A010) | EKK0341A010SC | KK_T_KKTK_SVC_KEI | Searches equipment-provided service contract by equipment-provided service contract number |
| R | `JFUBPCommon.getTemplateListMap` | - | - | Retrieves processed template data from the inMap after SC execution |
| R | `JFUBPCommon.getMaxTempTempleteKey` | - | - | Gets the maximum temporary template key for template list access |
| - | `getUpdateSODMap` | - | - | In-memory: Derives updated SOD operation mapping from the input map |
| R | `getKikiDataList` | - | - | In-memory/SC: Retrieves equipment data list for VA (Value-Added) equipment or multi-function router |
| - | `setInMapEKK0191A010` | - | - | In-memory: Maps input data into parameter for EKK0191A010 service |
| - | `setInMapKktkSvcKeiUqSearch` | - | - | In-memory: Maps equipment-provided service contract number into parameter for EKK0341A010 query |
| I | `param.setData` | - | - | Writes the final `hakkoSODMap` (SOD registration data map) back to the request parameter |

**How to classify:**
- **I** (Invoke/Input): Methods that initialize or configure service component parameters, without returning data
- **R** (Read): Service component calls (`executeSC`) that query data from the database (EKK0191A010 and EKK0341A010 SCs)
- **I** (Invoke/Input): `param.setData` writes the result back to the request

## 5. Dependency Trace

### Direct callers:

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Component: JFUSetOptPackMskmCC | `JFUSetOptPackMskmCC.process` -> `setSODMapping(handle, param, fixedText, opSvcMskmList)` | `executeSC(EKK0191A010SC) [R] KK_T_SVC_KEI_UCWK`, `executeSC(EKK0341A010SC) [R] KK_T_KKTK_SVC_KEI`, `setData('hakkoSODMap') [I]` |
| 2 | Component: JFUTelOptSvcMskmCC | `JFUTelOptSvcMskmCC.process` -> `setSODMapping(handle, param, fixedText, opSvcMskmList)` | `executeSC(EKK0191A010SC) [R] KK_T_SVC_KEI_UCWK`, `executeSC(EKK0341A010SC) [R] KK_T_KKTK_SVC_KEI`, `setData('hakkoSODMap') [I]` |

**Notes on callers:**
- **JFUSetOptPackMskmCC** (Line 1044): Called during the eo optical phone pack application submission/cancellation flow, after device data preparation and before the SOD mapping is sent to registration screens. This caller handles the general opt-pack (option pack) registration cancellation composite process.
- **JFUTelOptSvcMskmCC** (Line 577): Has its own overloaded `setSODMapping` method that delegates to or mirrors the same logic for telephone option service mapping. The shared component method is the canonical implementation.

## 6. Per-Branch Detail Blocks

**Block 1** — [PROCESSING] Initialize SOD mapping context (L2684)

> Opens the method, logs debug info, retrieves the input map, and prepares the parent mapping structure.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `outDebugLog("----- setSODDataMapping Start -----")` | // Debug log entry |
| 2 | CALL | `inMap = (HashMap)param.getData(fixedText)` | // Retrieves the input data map using fixedText as key |
| 3 | SET | `parentMap = new HashMap()` | // Creates the parent mapping structure |
| 4 | SET | `parentMap.put("func_code", JPCModelConstant.FUNC_CD_1)` | // func_code = "1" (standard function code) [-> FUNC_CD_1="1"] |
| 5 | CALL | `updateSODMap = getUpdateSODMap(inMap)` | // Gets updated SOD operation mapping from input |
| 6 | SET | `arrayList = new ArrayList<HashMap<String, Object>>()` | // Creates target data list for final SOD output |
| 7 | CALL | `kikiDataList = getKikiDataList(handle, param, fixedText)` | // Retrieves equipment data list (VA equipment/multi-function routers) |
| 8 | CALL | `JFUBPCommon.initData(param, fixedText, IN_COL_LIST_EKK0191A010)` | // Initializes input columns for EKK0191A010 service IF |

**Block 2** — [PROCESSING] EKK0191A010 Service Contract Detail Inquiry (L2698)

> Executes the eo optical phone agreement consent (service contract detail) service IF to retrieve the current service contract information, including the VA (Value-Added) equipment change number.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setInMapEKK0191A010(param, fixedText, inMap)` | // Maps input data for EKK0191A010 service |
| 2 | CALL | `JFUBPCommon.executeSC(handle, param, fixedText, TEMP_ID_EKK0191A010, TEMP_ID_DTL_EKK0191A010, IN_COL_LIST_EKK0191A010, ERR_COL_EKK0191A010)` | // Executes SC for service contract detail |
| 3 | CALL | `svcKeiUcwkInfoTelMap = JFUBPCommon.getTemplateListMap(inMap, JFUBPCommon.getMaxTempTempleteKey(inMap, TEMP_TEMP_KEY_EKK0191A010), TEMP_ID_DTL_EKK0191A010, 0)` | // Gets service contract detail data from template |
| 4 | SET | `vaKikiChgNo = (String)svcKeiUcwkInfoTelMap.get(EKK0191A010CBSMsg1List.VA_KIKI_CHG_NO)` | // Extracts VA equipment change number |

**Block 3** — [FOR LOOP] Equipment Data Iteration — VA Equipment Verification (L2705)

> Iterates over each equipment record. If a VA equipment change number exists, queries the equipment-provided service contract to verify consistency before processing.

| # | Type | Code |
|---|------|------|
| 1 | SET | `vaKikiChgNoSet = new HashSet<String>()` | // Tracks processed VA equipment change numbers for deduplication |
| 2 | FOR | `for (HashMap kikiMap : kikiDataList)` | // Iterates over equipment data list |

**Block 3.1** — [IF] VA Equipment Change Number Exists (L2707)

> If a VA equipment change number is present in the service contract detail, perform equipment-provided service contract verification.

| # | Type | Code |
|---|------|------|
| 1 | IF | `!JFUBPCommon.isNull(vaKikiChgNo)` | // VA equipment change number exists |
| 2 | SET | `kktkSvcKeiNo = (String)kikiMap.get(EKK0341B002CBSMsg1List.KKTK_SVC_KEI_NO)` | // Equipment-provided service contract number |
| 3 | CALL | `JFUBPCommon.initData(param, fixedText, IN_COLUMN_LIST_EKK0341A010)` | // Initializes input columns for EKK0341A010 |
| 4 | CALL | `JFUBPCommon.ignoreSearchError(param, fixedText)` | // Disables search error for equipment query |
| 5 | CALL | `setInMapKktkSvcKeiUqSearch(param, fixedText, kktkSvcKeiNo)` | // Maps equipment contract number for search |
| 6 | CALL | `JFUBPCommon.executeSC(handle, param, fixedText, TEMPLATE_ID_EKK0341A010, TEMPLATE_ID_EKK0341A010_DETAIL, IN_COLUMN_LIST_EKK0341A010, ERROR_COLUMN_EKK0341A010)` | // Executes equipment-provided service contract search SC |
| 7 | CALL | `kktkInfoMap = JFUBPCommon.getTemplateListMap(inMap, JFUBPCommon.getMaxTempTempleteKey(inMap, TEMP_TEMPLATE_KEY_EKK0341A010), TEMPLATE_ID_EKK0341A010_DETAIL, 0)` | // Gets equipment-provided service contract info |
| 8 | SET | `kikiChgNo = (String)kktkInfoMap.get(EKK0341A010CBSMsg1List.KIKI_CHG_NO)` | // Equipment change number from equipment-provided contract |

**Block 3.2** — [IF] Equipment Change Number Mismatch or Duplicate (L2723)

> If the equipment change number from the equipment-provided contract differs from the VA equipment change number, or if this change number was already processed, skip this record to prevent inconsistent SOD data.

| # | Type | Code |
|---|------|------|
| 1 | IF | `!vaKikiChgNo.equals(kikiChgNo) \|\| vaKikiChgNoSet.contains(kikiChgNo)` | // Equipment change number mismatch OR duplicate |
| 2 | EXEC | `continue` | // Skip this equipment record — VA and equipment contract numbers do not match, or already processed |

**Block 3.3** — [ELSE] Equipment Change Number Match (L2726)

> Record the verified equipment change number for deduplication tracking.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `vaKikiChgNoSet.add(kikiChgNo)` | // Add to processed set to prevent duplicate SOD entries |

**Block 4** — [FOR LOOP] Inner Loop — SOD Data Mapping (L2733)

> Nested loop over the caller's `dataList`. For each operation service data item, constructs a complete SOD mapping containing basic info, service contract info, service contract detail info, operation service info (before and after), and equipment-provided service info.

| # | Type | Code |
|---|------|------|
| 1 | FOR | `for (HashMap dtlMap : dataList)` | // Iterates over operation service data list |

**Block 4.1** — [PROCESSING] SOD Basic Information (L2736)

> Creates the SOD basic info structure with system ID and interlocking division code.

| # | Type | Code |
|---|------|------|
| 1 | SET | `childMap = new HashMap<String, Object>()` | // Creates child map for this operation service |
| 2 | SET | `sodKihonInfo = new HashMap<String, Object>()` | // Creates SOD basic info structure |
| 3 | SET | `sodKihonInfo.put("sysid", dtlMap.get("sysid"))` | // System ID from operation service data |
| 4 | SET | `sodKihonInfo.put("ido_div", JFUStrConst.CD00576_00031)` | // ido_div = "00031" (standard movement type) [-> CD00576_00031="00031"] |
| 5 | SET | `childMap.put("sod_kihon_info", sodKihonInfo)` | // Adds basic info to child map |

**Block 4.2** — [PROCESSING] Service Contract Info (L2741)

> Maps service contract number from the operation service data.

| # | Type | Code |
|---|------|------|
| 1 | SET | `svcKeiInfo = new HashMap<String, Object>()` | // Creates service contract info structure |
| 2 | SET | `svcKeiInfo.put("svc_kei_no", dtlMap.get("svc_kei_no"))` | // Service contract number |
| 3 | SET | `childMap.put("svc_kei_info", svcKeiInfo)` | // Adds to child map |

**Block 4.3** — [PROCESSING] Service Contract Detail Info (L2747)

> Maps service contract detail information including the change-previous service contract detail registration date/time.

| # | Type | Code |
|---|------|------|
| 1 | SET | `svcKeiUcwkInfo = new HashMap<String, Object>()` | // Creates service contract detail info structure |
| 2 | SET | `svcKeiUcwkInfo.put("svc_kei_ucwk_no", dtlMap.get("svc_kei_ucwk_no"))` | // Service contract detail number |
| 3 | SET | `svcKeiUcwkInfo.put("chaf_svc_kei_ucwk_gene_add_dtm", dtlMap.get("chaf_svc_kei_ucwk_gene_add_dtm"))` | // Change-previous service contract detail registration datetime |
| 4 | SET | `childMap.put("svc_kei_ucwk_info", svcKeiUcwkInfo)` | // Adds to child map |

**Block 4.4** — [PROCESSING] Operation Service Info (Before) (L2755)

> Maps before-change (change-previous) operation service and sub-operation service contract information. These fields contain the state before any modification, used for audit trail and rollback comparison.

| # | Type | Code |
|---|------|------|
| 1 | SET | `opsvkeiInfo = new HashMap<String, Object>()` | // Creates operation service info structure |
| 2 | SET | `opsvkeiInfo.put("chbf_opsvkei_no", dtlMap.get("chbf_opsvkei_no"))` | // Change-previous operation service contract number |
| 3 | SET | `opsvkeiInfo.put("chbf_opsvkei_gene_add_dtm", dtlMap.get("chbf_opsvkei_gene_add_dtm"))` | // Change-previous operation service contract registration datetime |
| 4 | SET | `opsvkeiInfo.put("chbf_sbopsvkei_no", dtlMap.get("chbf_sbopsvkei_no"))` | // Change-previous sub-operation service contract number |
| 5 | SET | `opsvkeiInfo.put("chbf_sbopsvkei_gene_add_dtm", dtlMap.get("chbf_sbopsvkei_gene_add_dtm"))` | // Change-previous sub-operation service contract registration datetime |

**Block 4.5** — [IF] After-Change Operation Service Exists (L2766)

> Checks if there is an updated (after-change) operation service mapping in `updateSODMap`. If the update mapping exists, uses the updated values; otherwise falls back to the original data.

| # | Type | Code |
|---|------|------|
| 1 | IF | `updateSODOpMap = updateSODMap.get(dtlMap.get(OP_SVC_CD)) != null` | // `OP_SVC_CD` = "op_svc_cd" — checks if updated operation service mapping exists |
| 2 | SET | `opsvkeiInfo.put("chaf_opsvkei_no", updateSODOpMap.get("chaf_opsvkei_no"))` | // After-change operation service contract number from update map |
| 3 | SET | `opsvkeiInfo.put("chaf_opsvkei_gene_add_dtm", updateSODOpMap.get("chaf_opsvkei_gene_add_dtm"))` | // After-change operation service contract registration datetime from update map |
| 4 | ELSE | (else branch) | |
| 5 | SET | `opsvkeiInfo.put("chaf_opsvkei_no", dtlMap.get("chaf_opsvkei_no"))` | // After-change operation service contract number from original data |
| 6 | SET | `opsvkeiInfo.put("chaf_opsvkei_gene_add_dtm", dtlMap.get("chaf_opsvkei_gene_add_dtm"))` | // After-change operation service contract registration datetime from original data |

**Block 4.6** — [IF] After-Change Sub-Operation Service Exists (L2778)

> Same pattern as Block 4.5 but for sub-operation service contract data. Checks the update map for the sub-operation service code key.

| # | Type | Code |
|---|------|------|
| 1 | IF | `updateSODSbopMap = updateSODMap.get(dtlMap.get("sbop_svc_cd")) != null` | // Checks if updated sub-operation service mapping exists |
| 2 | SET | `opsvkeiInfo.put("chaf_sbopsvkei_no", updateSODSbopMap.get("chaf_sbopsvkei_no"))` | // After-change sub-operation service contract number from update map |
| 3 | SET | `opsvkeiInfo.put("chaf_sbopsvkei_gene_add_dtm", updateSODSbopMap.get("chaf_sbopsvkei_gene_add_dtm"))` | // After-change sub-operation service contract registration datetime from update map |
| 4 | ELSE | (else branch) | |
| 5 | SET | `opsvkeiInfo.put("chaf_sbopsvkei_no", dtlMap.get("chaf_sbopsvkei_no"))` | // After-change sub-operation service contract number from original data |
| 6 | SET | `opsvkeiInfo.put("chaf_sbopsvkei_gene_add_dtm", dtlMap.get("chaf_sbopsvkei_gene_add_dtm"))` | // After-change sub-operation service contract registration datetime from original data |

**Block 4.7** — [PROCESSING] Add Operation Service Info (L2790)

> Finalizes the operation service info section and attaches it to the child map.

| # | Type | Code |
|---|------|------|
| 1 | SET | `childMap.put("opsvkei_info", opsvkeiInfo)` | // Adds operation service info to child map |

**Block 4.8** — [PROCESSING] Equipment-Provided Service Info (After) (L2793)

> Maps the after-change equipment-provided service contract information from the verified equipment data (`kikiMap`). This data comes from the equipment-provided service contract query (Block 3.1) that was validated against the VA equipment change number.

| # | Type | Code |
|---|------|------|
| 1 | SET | `kktsvkeiInfo = new HashMap<String, Object>()` | // Creates equipment-provided service info structure |
| 2 | SET | `kktsvkeiInfo.put("chaf_kktsvkei_no", kikiMap.get("kktk_svc_kei_no"))` | // After-change equipment-provided service contract number |
| 3 | SET | `kktsvkeiInfo.put("chaf_kktsvkei_gene_add_dtm", kikiMap.get("gene_add_dtm"))` | // After-change equipment-provided service contract registration datetime |
| 4 | SET | `childMap.put("kktsvkei_info", kktsvkeiInfo)` | // Adds equipment info to child map |

**Block 4.9** — [PROCESSING] Add to Result List (L2800)

> Adds the completed SOD mapping child map to the target data list.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `arrayList.add(childMap)` | // Adds the complete SOD record to the target list |

**Block 5** — [PROCESSING] Finalize and Write SOD Mapping (L2806)

> Attaches the target data list to the parent map under `trgt_data_list` key, then writes the complete SOD mapping (`hakkoSODMap`) back to the request parameter.

| # | Type | Code |
|---|------|------|
| 1 | SET | `parentMap.put("trgt_data_list", arrayList)` | // Adds the complete SOD data list to parent map |
| 2 | CALL | `param.setData("hakkoSODMap", parentMap)` | // Writes the full SOD registration data map to the request parameter |
| 3 | EXEC | `outDebugLog("----- setSODDataMapping End -----")` | // Debug log exit |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| SOD | Acronym | Service Order Data — structured data entity used for telecom service order registration and fulfillment in the eo optical phone system |
| `hakkoSODMap` | Field | SOD registration data map — the final output map containing all SOD-structured data to be written to the request parameter |
| `ido_div` | Field | Interlocking division code (異動区分) — classifies the type of data movement (e.g., registration, cancellation, modification). Set to "00031" for standard processing |
| `svc_kei_no` | Field | Service contract number (サービス契約番号) — unique identifier for a service contract line item |
| `svc_kei_ucwk_no` | Field | Service contract detail number (サービス契約内訳番号) — unique identifier for a service contract detail/line item |
| `chaf_` | Field Prefix | Change-After (変更後) — prefix for fields containing after-change/post-modification values (e.g., `chaf_opsvkei_no` = after-change operation service contract number) |
| `chbf_` | Field Prefix | Change-Before (変更前) — prefix for fields containing before-change/pre-modification values (e.g., `chbf_opsvkei_no` = before-change operation service contract number) |
| `gene_add_dtm` | Field | Gene registration datetime (世代登録年月日時分秒) — timestamp when a service contract data version was registered |
| `opsvkei` | Field | Operation service (オペレーションサービス) — optional/add-on services attached to a base service contract |
| `sbopsvkei` | Field | Sub-operation service (サブオペレーションサービス) — secondary add-on services within an operation service |
| `kktsvkei` / `kktk` | Field | Equipment-provided service (機器提供サービス) — services related to customer-provided equipment (e.g., VA equipment, multi-function routers) |
| `vaKikiChgNo` | Field | VA equipment change number (VA機器変更番号) — tracks changes to Value-Added equipment associated with a service contract |
| `kikiChgNo` | Field | Equipment change number (機器変更番号) — change number for equipment-provided service contracts |
| `func_code` | Field | Function code — indicates the processing function context. Value "1" represents standard processing mode |
| `trgt_data_list` | Field | Target data list — the list of SOD-mapped records to be registered |
| FTTH | Business term | Fiber To The Home — fiber-optic broadband internet service offered by eo Optical Phone |
| EKK0191A010 | SC Code | Service component for eo optical phone agreement consent (サービス契約内訳<eo光電話>同意照会) — queries service contract detail consent information |
| EKK0341A010 | SC Code | Service component for equipment-provided service contract search (機器提供サービス契約照会) — searches equipment-provided service contract data by contract number |
| `op_svc_cd` | Field | Operation service code (オペレーションサービスコード) — classifies the type of operation service (e.g., B001 for Mail addition, B004 for IP addition, etc.) |
| `sbop_svc_cd` | Field | Sub-operation service code (サブオペレーションサービスコード) — classifies the type of sub-operation service |
| CMP | Acronym | Composite Component — a combined processing unit handling both submission and cancellation for a single business scenario |
| VA | Acronym | Value-Added — refers to specialized Value-Added equipment (e.g., multi-function routers) connected to the eo optical phone service |
| IN_COL_LIST_EKK0191A010 | Constant | Input column list for EKK0191A010 service initialization — defines which database columns to query |
| IN_COLUMN_LIST_EKK0341A010 | Constant | Input column list for EKK0341A010 service initialization — defines which database columns to query in equipment-provided service contract search |
| KKSV0194 | Screen | KKSV0194 screen — the SOD registration screen that consumes the `hakkoSODMap` output from this method |
