# Business Logic — JKKSvkeiShosaCC.editMapShosaOkAdsl() [271 LOC]

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

## 1. Role

### JKKSvkeiShosaCC.editMapShosaOkAdsl()

This method performs the **confirmation (OK) phase mapping processing for eoADSL service contracts**. Specifically, it takes pre-queried service contract review results (stored in `rsltShokai`) and maps them into structured output maps that the UI layer can display for customer confirmation. The method handles four distinct service contract types: (1) **eoADSL Service Contract** (EKK0141), (2) **eoADSL Service Contract Details** (EKK0221), (3) **Optional Service Contract — ISP** (EKK0361), and (4) **Sub-Optional Service Contract — ISP** (EKK0411). It implements a **dispatch-by-contract-type pattern** — iterating over each contract type's data array and delegating to the appropriate mapper (review or cancel) based on the `canCncSvcKei` flag. When `canCncSvcKei` is `false`, the method processes **review/confirmation** operations using the `shosaOkMapper` to format display data for the customer to verify. When `canCncSvcKei` is `true`, it processes **cancellation** operations using `JKKSvkeiShosaCncMapper` to format cancellation data. For Optional Service Contracts (EKK0361), it further classifies each optional service into **Email Optional (B001)** or **My Home Page Optional (B002)** for downstream integration linking. After all mapping is complete, it stores **linked data** (authentication IDs, POP IDs, and WEB IDs) into the parameter's joint-data area for cross-system correlation. This method serves as a **shared utility** called by `runSvkeiShosa()` during the service contract inquiry/confirmation workflow, specifically during the "OK" (acceptance) branch.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["editMapShosaOkAdsl(params)"])

    START --> INIT["Initialize: rsltShosaMap, work arrays from rsltShokai"]

    INIT --> PROCESS_EKK0141C010["Process EKK0141C010: Service Contract (eoADSL) Review"]

    PROCESS_EKK0141C010 --> CHECK_EKK0141["workEKK0141A010Array != null"]

    CHECK_EKK0141 -->|Yes| LOOP_EKK0141["For each record: getWorkData -> shosaOkMapper.editInMsgEKK0141C010 -> editInMsgCmn"]

    CHECK_EKK0141 -->|No| SKIP_EKK0141["Skip"]

    LOOP_EKK0141 --> STORE_EKK0141["rsltShosaMap.put(EKK0141C010)"]

    STORE_EKK0141 --> CHECK_CAN_CNC{"canCncSvcKei"}

    SKIP_EKK0141 --> CHECK_CAN_CNC

    CHECK_CAN_CNC -->|false| BRANCH_CONFIRM["Confirm: canCncSvcKei = false"]

    CHECK_CAN_CNC -->|true| BRANCH_CANCEL["Cancel: canCncSvcKei = true"]

    BRANCH_CONFIRM --> PROCESS_EKK0221["Process EKK0221C010: Service Contract Details (eoADSL) Review"]

    PROCESS_EKK0221 --> CHECK_EKK0221["workEKK0221A010Array != null"]

    CHECK_EKK0221 -->|Yes| LOOP_EKK0221["For each record: getWorkData -> shosaOkMapper.editInMsgEKK0221C010 -> editInMsgCmn"]

    CHECK_EKK0221 -->|No| SKIP_EKK0221["Skip"]

    LOOP_EKK0221 --> STORE_EKK0221["rsltShosaMap.put(EKK0221C010)"]

    STORE_EKK0221 --> PROCESS_EKK0361["Process EKK0361C010: Optional Service Contract (ISP) Review"]

    PROCESS_EKK0361 --> CHECK_EKK0361["workEKK0361A010Array != null"]

    CHECK_EKK0361 -->|Yes| LOOP_EKK0361["For each record: getWorkData -> shosaOkMapper.editInMsgEKK0361C010 -> editInMsgCmn"]

    CHECK_EKK0361 -->|No| SKIP_EKK0361["Skip"]

    LOOP_EKK0361 --> CHECK_OP_SVC["Determine op_svc_cd via getValuableData"]

    CHECK_OP_SVC --> SVC_B001["op_svc_cd = B001 (Email Optional)"]

    CHECK_OP_SVC --> SVC_B002["op_svc_cd = B002 (My Home Page Optional)"]

    SVC_B001 --> ADD_B001["opSvcKeiNoB001.add(opSvcKeiNo)"]

    SVC_B002 --> ADD_B002["opSvcKeiNoB002.add(opSvcKeiNo)"]

    ADD_B001 --> STORE_EKK0361["rsltShosaMap.put(EKK0361C010)"]

    ADD_B002 --> STORE_EKK0361

    STORE_EKK0361 --> PROCESS_EKK0411["Process EKK0411C020: Sub-Optional Service Contract (ISP) Review"]

    PROCESS_EKK0411 --> CHECK_EKK0411["workEKK0411A010Array != null"]

    CHECK_EKK0411 -->|Yes| LOOP_EKK0411["For each record: getWorkData -> shosaOkMapper.editInMsgEKK0411C020 -> editInMsgCmn"]

    CHECK_EKK0411 -->|No| SKIP_EKK0411["Skip"]

    LOOP_EKK0411 --> STORE_EKK0411["rsltShosaMap.put(EKK0411C020)"]

    STORE_EKK0411 --> LINK_DATA["Link Data: putAxMRenkeiDataKbn x3 (NINSHO_ID, POPID, WEBID)"]

    LINK_DATA --> END_NODE(["Return rsltShosaMap"])

    BRANCH_CANCEL --> PROCESS_EKK0141_CANCEL["Process EKK0141C020: Service Contract Cancel"]

    PROCESS_EKK0141_CANCEL --> LOOP_EKK0141C["For each record: getWorkData -> JKKSvkeiShosaCncMapper.editInMsgEKK0141C020"]

    LOOP_EKK0141C --> STORE_EKK0141C["rsltShosaMap.put(EKK0141C020)"]

    STORE_EKK0141C --> PROCESS_EKK0221_CANCEL["Process EKK0221C030: Service Contract Details Review+Cancel"]

    PROCESS_EKK0221_CANCEL --> LOOP_EKK0221C["For each record: getWorkData -> JKKSvkeiShosaCncMapper.editInMsgEKK0221C030"]

    LOOP_EKK0221C --> STORE_EKK0221C["rsltShosaMap.put(EKK0221C030)"]

    STORE_EKK0221C --> PROCESS_EKK0361_CANCEL["Process EKK0361C030: Optional Service Contract Review+Cancel"]

    PROCESS_EKK0361_CANCEL --> LOOP_EKK0361C["For each record: getWorkData -> shosaOkMapper.editInMsgEKK0361C030 -> editInMsgCmn"]

    LOOP_EKK0361C --> CHECK_OP_SVC_C["Determine op_svc_cd via getValuableData"]

    CHECK_OP_SVC_C --> SVC_B001_C["op_svc_cd = B001 (Email Optional)"]

    CHECK_OP_SVC_C --> SVC_B002_C["op_svc_cd = B002 (My Home Page Optional)"]

    SVC_B001_C --> ADD_B001_C["opSvcKeiNoB001.add(opSvcKeiNo)"]

    SVC_B002_C --> ADD_B002_C["opSvcKeiNoB002.add(opSvcKeiNo)"]

    ADD_B001_C --> STORE_EKK0361C["rsltShosaMap.put(EKK0361C030)"]

    ADD_B002_C --> STORE_EKK0361C

    STORE_EKK0361C --> PROCESS_EKK0411_CANCEL["Process EKK0411C040: Sub-Optional Review+Cancel"]

    PROCESS_EKK0411_CANCEL --> LOOP_EKK0411C["For each record: getWorkData -> shosaOkMapper.editInMsgEKK0411C040 -> editInMsgCmn"]

    LOOP_EKK0411C --> STORE_EKK0411C["rsltShosaMap.put(EKK0411C040)"]

    STORE_EKK0411C --> LINK_DATA
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `param` | `IRequestParameterReadWrite` | The request parameter object that carries the complete model group data, control maps, and serves as the output target for linked data (authentication IDs, POP IDs, WEB IDs) via `putAxMRenkeiDataKbn`. It is the primary data conduit between the UI layer and this business logic. |
| 2 | `userDataIndex` | `int` | The index within `param` that identifies which business data row / work item to process. Allows the same method to handle multiple data rows (e.g., multiple service contracts per order). |
| 3 | `rsltShokai` | `HashMap<String, Object>` | The result data map from a prior unique lookup or list inquiry (照会). Contains four pre-fetched arrays keyed by `MAP_KEY_EKK*` constants — each array holds `HashMap` records for a specific service contract type (EKK0141, EKK0221, EKK0361, EKK0411). |
| 4 | `idoDiv` | `String` | The **discrepancy flag / comparison division** (異同区分). Used by mapper methods to determine how to format field values during review mapping — whether to flag differences, highlights, or display standard values for customer comparison. |
| 5 | `canCncSvcKei` | `boolean` | The **cancel-service-contract flag**. When `false`, processes review/confirmation (照査) operations — displays service contract data for the customer to verify and accept. When `true`, processes cancellation (中止) operations — formats service contract data for cancellation submission. Toggled based on the user's selection (confirm vs. cancel). |

**Instance Fields / External State Read:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `shosaOkMapper` | Mapper object | The "OK review" mapper instance that dispatches to specific mapper methods (`editInMsgEKK0141C010`, `editInMsgEKK0221C010`, etc.) for each contract type. |
| `currentSysid` | `String` | The current system ID used as context when storing linked data via `putAxMRenkeiDataKbn`. |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `getWorkData(EKK0141A010CBSMsg.EKK0141A010CBSMSG1LIST, ...)` | - | - | Retrieves structured work templates (CAANMsg arrays) for eoADSL Service Contract from the inquiry result array. Used to build display templates for each contract record. |
| R | `getWorkData(EKK0221A010CBSMsg.EKK0221A010CBSMSG1LIST, ...)` | - | - | Retrieves structured work templates for eoADSL Service Contract Details. Extracts `svcKeiUcwkNo` (service detail work number) for linking. |
| R | `getWorkData(EKK0361A010CBSMsg.EKK0361A010CBSMSG1LIST, ...)` | - | - | Retrieves structured work templates for Optional Service Contract (ISP). Used to classify optional services (B001/B002) for linking. |
| R | `getWorkData(EKK0411A010CBSMsg.EKK0411A010CBSMSG1LIST, ...)` | - | - | Retrieves structured work templates for Sub-Optional Service Contract (ISP). |
| R | `getValuableData(rsltShokai, MAP_KEY_EKK0351B002, ...)` | - | - | Looks up the optional service code (op_svc_cd) by matching the optional service contract number (EKK0351B002 lookup key) to determine service type (B001/B002). |
| R | `JBSbatFUCaseFileRnkData.getString` | - | - | Reads string values from the business data model (case file ranking data). |
| R | `JBSbatFUMoveNaviData.getString` | - | - | Reads string values from navigation move data. |
| R | `JBSbatZMAdDataSet.getString` | - | - | Reads string values from ADSL set data. |
| U | `shosaOkMapper.editInMsgEKK0141C010(param, childTemplate, idoDiv)` | - | - | Formats eoADSL Service Contract display data for confirmation. Populates input message fields with review results. |
| U | `shosaOkMapper.editInMsgEKK0221C010(param, childTemplate, idoDiv)` | - | - | Formats eoADSL Service Contract Details display data for confirmation. |
| U | `shosaOkMapper.editInMsgEKK0361C010(param, childTemplate, idoDiv)` | - | - | Formats Optional Service Contract (ISP) display data for confirmation. |
| U | `shosaOkMapper.editInMsgEKK0411C020(param, childTemplate, idoDiv)` | - | - | Formats Sub-Optional Service Contract (ISP) display data for confirmation. |
| U | `shosaOkMapper.editInMsgEKK0361C030(param, childTemplate, idoDiv)` | - | - | Formats Optional Service Contract (ISP) display data for cancellation (review+cancel). |
| U | `shosaOkMapper.editInMsgEKK0411C040(param, childTemplate, idoDiv)` | - | - | Formats Sub-Optional Service Contract (ISP) display data for cancellation (review+cancel). |
| U | `JKKSvkeiShosaCncMapper.editInMsgEKK0141C020(param, wkTemplates[j], idoDiv)` | - | - | Formats eoADSL Service Contract cancellation data. Used when `canCncSvcKei=true` (cancel mode). |
| U | `JKKSvkeiShosaCncMapper.editInMsgEKK0221C030(param, wkTemplates[j], idoDiv)` | - | - | Formats eoADSL Service Contract Details cancellation data. |
| U | `JKKBpCommon.putAxMRenkeiDataKbn(param, SJISHO_MAP, RENKEI_DATA_KBN_NINSHO_ID, TRN_KBN_ADD, svcKeiUcwkNo[], currentSysid)` | - | - | Stores authentication ID info as linked data category for cross-system correlation. |
| U | `JKKBpCommon.putAxMRenkeiDataKbn(param, SJISHO_MAP, RENKEI_DATA_KBN_POPID, TRN_KBN_ADD, opSvcKeiNoB001[], currentSysid)` | - | - | Stores POP ID info (Email Optional service numbers) as linked data category. |
| U | `JKKBpCommon.putAxMRenkeiDataKbn(param, SJISHO_MAP, RENKEI_DATA_KBN_WEBID, TRN_KBN_ADD, opSvcKeiNoB002[], currentSysid)` | - | - | Stores WEB ID info (My Home Page Optional service numbers) as linked data category. |
| U | `JKKSvkeiShosaCC.editInMsgCmn(param, ...)` | - | - | Common input message editing — standardizes the formatted message data into the result map with consistent structure. |

### SC Code / Entity Classification (where inferable from the data):

The method primarily performs **mapping / formatting (U)** operations — converting inquiry results into display-ready maps. No direct database writes occur. The `putAxMRenkeiDataKbn` calls store linked data into the parameter object for downstream screen rendering.

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `getWorkData` (EKK0141A010CBSMsg) | EKK0141A010CBS | KK_T_SVC_CONTRACT_ADSL (inferred) | Retrieves eoADSL Service Contract records from inquiry results |
| R | `getWorkData` (EKK0221A010CBSMsg) | EKK0221A010CBS | KK_T_SVC_CONTRACT_DETAIL_ADSL (inferred) | Retrieves eoADSL Service Contract Details records |
| R | `getWorkData` (EKK0361A010CBSMsg) | EKK0361A010CBS | KK_T_OPT_SVC_CONTRACT_ISP (inferred) | Retrieves Optional Service Contract (ISP) records |
| R | `getWorkData` (EKK0411A010CBSMsg) | EKK0411A010CBS | KK_T_SUB_OPT_SVC_CONTRACT_ISP (inferred) | Retrieves Sub-Optional Service Contract (ISP) records |
| R | `getValuableData` (EKK0351B002) | EKK0351B002CBS | KK_T_OPT_SVC_MST (inferred) | Looks up optional service classification code (op_svc_cd) |
| U | `shosaOkMapper.editInMsgEKK0141C010` | EKK0141C010SC | - | Formats eoADSL Service Contract display data for confirmation |
| U | `shosaOkMapper.editInMsgEKK0221C010` | EKK0221C010SC | - | Formats eoADSL Service Contract Details display data for confirmation |
| U | `shosaOkMapper.editInMsgEKK0361C010` | EKK0361C010SC | - | Formats Optional Service Contract (ISP) display data for confirmation |
| U | `shosaOkMapper.editInMsgEKK0411C020` | EKK0411C020SC | - | Formats Sub-Optional Service Contract (ISP) display data for confirmation |
| U | `JKKSvkeiShosaCncMapper.editInMsgEKK0141C020` | EKK0141C020SC | - | Formats eoADSL Service Contract cancellation data |
| U | `JKKSvkeiShosaCncMapper.editInMsgEKK0221C030` | EKK0221C030SC | - | Formats eoADSL Service Contract Details cancellation data |
| U | `shosaOkMapper.editInMsgEKK0361C030` | EKK0361C030SC | - | Formats Optional Service Contract (ISP) display data for cancellation |
| U | `shosaOkMapper.editInMsgEKK0411C040` | EKK0411C040SC | - | Formats Sub-Optional Service Contract (ISP) display data for cancellation |
| U | `JKKBpCommon.putAxMRenkeiDataKbn` (x3) | SJISHO_MAP | Linked Data Area (parameter) | Stores authentication IDs, POP IDs, and WEB IDs for cross-system correlation |
| U | `editInMsgCmn` | Common | - | Standardizes formatted message into result map |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | `JKKSvkeiShosaCC.runSvkeiShosa()` | `runSvkeiShosa` → `editMapShosaOkAdsl` | `putAxMRenkeiDataKbn [U] Linked Data Area`, `editInMsgEKK0141C010 [U] EKK0141`, `editInMsgEKK0221C010 [U] EKK0221`, `editInMsgEKK0361C010 [U] EKK0361`, `editInMsgEKK0411C020 [U] EKK0411`, `editInMsgEKK0361C030 [U] EKK0361`, `editInMsgEKK0411C040 [U] EKK0411`, `editInMsgEKK0141C020 [U] EKK0141_Cnc`, `editInMsgEKK0221C030 [U] EKK0221_Cnc`, `editInMsgCmn [U] Common`, `getWorkData [R] WorkData`, `getString [R] JBSbat` |

**Analysis:**
- This method is called exclusively by `JKKSvkeiShosaCC.runSvkeiShosa()`, which is the main service contract inquiry/cancellation processing entry point.
- The terminal operations are all **mapping/update (U)** operations — formatting display data for confirmation and storing linked data — with **read (R)** operations pulling work data from inquiry results.
- No screen/batch entry points (KKSV*) were found within 8 hops; the caller `runSvkeiShosa()` is itself a CBS/common component that is invoked by a screen.

## 6. Per-Branch Detail Blocks

### Block 1 — [INIT] Initialize result map and work arrays (L9888)

Initializes the result map and extracts pre-queried data from `rsltShokai`.

| # | Type | Code |
|---|------|------|
| 1 | SET | `rsltShosaMap = new HashMap<>()` // Result map to build [-> HashMap] |
| 2 | SET | `rslt = null` // Temporary result holder |
| 3 | SET | `workEKK0141A010Array = (ArrayList)rsltShokai.get(MAP_KEY_EKK0141A010)` // Service Contract (eoADSL) review data [-> "EKK0141A010"] |
| 4 | SET | `workEKK0221A010Array = (ArrayList)rsltShokai.get(MAP_KEY_EKK0221A010)` // Service Contract Details (eoADSL) review data [-> "EKK0221A010"] |
| 5 | SET | `workEKK0361A010Array = (ArrayList)rsltShokai.get(MAP_KEY_EKK0361A010)` // Optional Service Contract (ISP) review data [-> "EKK0361A010"] |
| 6 | SET | `workEKK0411A010Array = (ArrayList)rsltShokai.get(MAP_KEY_EKK0411A010)` // Sub-Optional Service Contract (ISP) review data [-> "EKK0411A010"] |
| 7 | SET | `wkCaanMsgList = null` // CAAN message list buffer |
| 8 | SET | `wkMapArray = null` // Temporary map array buffer |
| 9 | SET | `opSvcKeiNoB001 = new ArrayList<>()` // Email optional service numbers [-> "B001"] |
| 10 | SET | `opSvcKeiNoB002 = new ArrayList<>()` // My Home Page optional service numbers [-> "B002"] |
| 11 | SET | `svcKeiUcwkNo = new ArrayList<>()` // Service detail work numbers [-> SVC_KEI_UCWK_NO] |

### Block 2 — [IF] Process EKK0141C010: eoADSL Service Contract Review (L9930)

Processes the eoADSL Service Contract (EKK0141) records for confirmation. Maps each record through the OK mapper and common editor.

**Block 2.1** — [IF] `workEKK0141A010Array != null` (L9932)

| # | Type | Code |
|---|------|------|
| 1 | SET | `wkMapArray = new ArrayList()` // Fresh map array for results |
| 2 | EXEC | `workEKK0141A010Array != null` // Guard: skip if no data |

**Block 2.1.1** — [FOR] `i = 0; i < workEKK0141A010Array.size()` (L9933)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `wkTemplates = getWorkData(EKK0141A010CBSMsg.EKK0141A010CBSMSG1LIST, (Map)workEKK0141A010Array.get(i))` // Extract work templates for this contract record |
| 2 | EXEC | Inner FOR loop over `wkTemplates.length` (L9935) |

**Block 2.1.1.1** — [FOR] `j = 0; j < wkTenplates.length` (L9935)

| # | Type | Code |
|---|------|------|
| 1 | SET | `childTemplate = wkTenplates[j]` // Individual CAANMsg template |
| 2 | CALL | `wkCaanMsgList = shosaOkMapper.editInMsgEKK0141C010(param, childTemplate, idoDiv)` // Format service contract display data for confirmation |
| 3 | CALL | `rslt = editInMsgCmn(param, wkCaanMsgList.get(0))` // Standardize result into map |
| 4 | EXEC | `wkMapArray.add(rslt)` // Collect result |

| # | Type | Code |
|---|------|------|
| 1 | EXEC | Loop over all EKK0141 records completed |
| 2 | SET | `rsltShosaMap.put(MAP_KEY_EKK0141C010, wkMapArray)` // Store review results [-> "EKK0141C010"] |

### Block 3 — [IF/ELSE] canCncSvcKei Branch (L9954)

**Main decision point**: `canCncSvcKei` determines whether to process confirmation (`false`) or cancellation (`true`).

---

**BRANCH A — `!canCncSvcKei` = `true` (CONFIRMATION MODE)** (L9956)

The customer is confirming service contracts. Uses `shosaOkMapper` to format display data.

### Block 3.1 — [IF] Process EKK0221C010: Service Contract Details Review (L9960)

Processes the eoADSL Service Contract Details (EKK0221) records. Also extracts `svcKeiUcwkNo` for linked data.

**Block 3.1.1** — [IF] `workEKK0221A010Array != null` (L9962)

| # | Type | Code |
|---|------|------|
| 1 | SET | `wkMapArray = new ArrayList()` // Fresh map array |

**Block 3.1.1.1** — [FOR] `i = 0; i < workEKK0221A010Array.size()` (L9963)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `wkTenplates = getWorkData(EKK0221A010CBSMsg.EKK0221A010CBSMSG1LIST, (Map)workEKK0221A010Array.get(i))` // Extract templates |
| 2 | EXEC | Inner FOR loop over `wkTenplates.length` (L9965) |

**Block 3.1.1.1.1** — [FOR] `j = 0; j < wkTenplates.length` (L9965)

| # | Type | Code |
|---|------|------|
| 1 | SET | `childTemplate = wkTenplates[j]` // Individual template |
| 2 | CALL | `wkCaanMsgList = shosaOkMapper.editInMsgEKK0221C010(param, childTemplate, idoDiv)` // Format contract details for confirmation |
| 3 | CALL | `rslt = editInMsgCmn(param, wkCaanMsgList.get(0))` // Standardize result |
| 4 | EXEC | `wkMapArray.add(rslt)` // Collect result |
| 5 | EXEC | `svcKeiUcwkNo.add(childTemplate.getString(EKK0171A010CBSMsg1List.SVC_KEI_UCWK_NO))` // Extract service detail work number for linking [-> SVC_KEI_UCWK_NO] |

| # | Type | Code |
|---|------|------|
| 1 | SET | `rsltShosaMap.put(MAP_KEY_EKK0221C010, wkMapArray)` // Store review results [-> "EKK0221C010"] |

### Block 3.2 — [IF] Process EKK0361C010: Optional Service Contract (ISP) Review (L9984)

Processes the ISP Optional Service Contract (EKK0361) records. Classifies each optional service by `op_svc_cd` for linked data storage.

**Block 3.2.1** — [IF] `workEKK0361A010Array != null` (L9986)

| # | Type | Code |
|---|------|------|
| 1 | SET | `wkMapArray = new ArrayList()` // Fresh map array |

**Block 3.2.1.1** — [FOR] `i = 0; i < workEKK0361A010Array.size()` (L9987)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `wkTenplates = getWorkData(EKK0361A010CBSMsg.EKK0361A010CBSMSG1LIST, (Map)workEKK0361A010Array.get(i))` // Extract templates |
| 2 | EXEC | Inner FOR loop over `wkTenplates.length` (L9989) |

**Block 3.2.1.1.1** — [FOR] `j = 0; j < wkTenplates.length` (L9989)

| # | Type | Code |
|---|------|------|
| 1 | SET | `childTemplate = wkTenplates[j]` // Individual template |
| 2 | CALL | `wkCaanMsgList = shosaOkMapper.editInMsgEKK0361C010(param, childTemplate, idoDiv)` // Format optional service contract data for confirmation |
| 3 | CALL | `rslt = editInMsgCmn(param, wkCaanMsgList.get(0))` // Standardize result |
| 4 | EXEC | `wkMapArray.add(rslt)` // Collect result |
| 5 | CALL | `op_svc_cd = getValuableData(rsltShokai, MAP_KEY_EKK0351B002, EKK0351B002CBSMsg.EKK0351B002CBSMSG1LIST, EKK0351B002CBSMsg1List.OP_SVC_KEI_NO, childTemplate.getString(EKK0361A010CBSMsg1List.OP_SVC_KEI_NO), EKK0351B002CBSMsg1List.OP_SVC_CD)` // Lookup optional service code [-> EKK0351B002] |

**Block 3.2.1.1.1.A** — [IF] `op_svc_cd == "B001"` (Email Optional) (L10011)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `opSvcKeiNoB001.add(childTemplate.getString(EKK0361A010CBSMsg1List.OP_SVC_KEI_NO))` // Collect Email optional service numbers [-> "B001"] |

**Block 3.2.1.1.1.B** — [ELSE-IF] `op_svc_cd == "B002"` (My Home Page Optional) (L10019)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `opSvcKeiNoB002.add(childTemplate.getString(EKK0361A010CBSMsg1List.OP_SVC_KEI_NO))` // Collect My Home Page optional service numbers [-> "B002"] |

| # | Type | Code |
|---|------|------|
| 1 | SET | `rsltShosaMap.put(MAP_KEY_EKK0361C010, wkMapArray)` // Store review results [-> "EKK0361C010"] |

### Block 3.3 — [IF] Process EKK0411C020: Sub-Optional Service Contract (ISP) Review (L10030)

Processes the ISP Sub-Optional Service Contract (EKK0411) records.

**Block 3.3.1** — [IF] `workEKK0411A010Array != null` (L10032)

| # | Type | Code |
|---|------|------|
| 1 | SET | `wkMapArray = new ArrayList()` // Fresh map array |

**Block 3.3.1.1** — [FOR] `i = 0; i < workEKK0411A010Array.size()` (L10033)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `wkTenplates = getWorkData(EKK0411A010CBSMsg.EKK0411A010CBSMSG1LIST, (Map)workEKK0411A010Array.get(i))` // Extract templates |
| 2 | EXEC | Inner FOR loop: `j = 0; null != wkTenplates && j < wkTenplates.length` (L10035) — includes null safety check |

**Block 3.3.1.1.1** — [FOR] `j = 0; null != wkTenplates && j < wkTenplates.length` (L10035)

| # |Type | Code |
|---|------|------|
| 1 | SET | `childTemplate = wkTenplates[j]` // Individual template |
| 2 | CALL | `wkCaanMsgList = shosaOkMapper.editInMsgEKK0411C020(param, childTemplate, idoDiv)` // Format sub-optional service contract data for confirmation |
| 3 | CALL | `rslt = editInMsgCmn(param, wkCaanMsgList.get(0))` // Standardize result |
| 4 | EXEC | `wkMapArray.add(rslt)` // Collect result |

| # | Type | Code |
|---|------|------|
| 1 | SET | `rsltShosaMap.put(MAP_KEY_EKK0411C020, wkMapArray)` // Store review results [-> "EKK0411C020"] |

---

**BRANCH B — `!canCncSvcKei` = `false` (CANCELLATION MODE)** (L10046)

The customer is cancelling service contracts. Uses `JKKSvkeiShosaCncMapper` for cancellation formatting.

### Block 3.B.1 — [IF] Process EKK0141C020: Service Contract Cancel (L10056)

**Block 3.B.1.1** — [IF] `workEKK0141A010Array != null` (L10057)

| # | Type | Code |
|---|------|------|
| 1 | SET | `wkMapArray = new ArrayList()` // Fresh map array |

**Block 3.B.1.1.1** — [FOR] `i = 0; i < workEKK0141A010Array.size()` (L10058)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `wkTemplates = getWorkData(EKK0141A010CBSMsg.EKK0141A010CBSMSG1LIST, (Map)workEKK0141A010Array.get(i))` // Extract templates |
| 2 | EXEC | Inner FOR loop (L10060) |

**Block 3.B.1.1.1.1** — [FOR] `j = 0; j < wkTemplates.length` (L10060)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `rslt = JKKSvkeiShosaCncMapper.editInMsgEKK0141C020(param, wkTemplates[j], idoDiv)` // Format service contract for cancellation |
| 2 | EXEC | `wkMapArray.add(rslt)` // Collect result |

| # | Type | Code |
|---|------|------|
| 1 | SET | `rsltShosaMap.put(MAP_KEY_EKK0141C020, wkMapArray)` // Store cancellation results [-> "EKK0141C020"] |

### Block 3.B.2 — [IF] Process EKK0221C030: Service Contract Details Review+Cancel (L10068)

**Block 3.B.2.1** — [IF] `workEKK0221A010Array != null` (L10069)

| # | Type | Code |
|---|------|------|
| 1 | SET | `wkMapArray = new ArrayList()` // Fresh map array |

**Block 3.B.2.1.1** — [FOR] `i = 0; i < workEKK0221A010Array.size()` (L10070)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `wkTemplates = getWorkData(EKK0221A010CBSMsg.EKK0221A010CBSMSG1LIST, (Map)workEKK0221A010Array.get(i))` // Extract templates |
| 2 | EXEC | Inner FOR loop (L10072) |

**Block 3.B.2.1.1.1** — [FOR] `j = 0; j < wkTemplates.length` (L10072)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `rslt = JKKSvkeiShosaCncMapper.editInMsgEKK0221C030(param, wkTemplates[j], idoDiv)` // Format contract details for cancellation |
| 2 | EXEC | `wkMapArray.add(rslt)` // Collect result |
| 3 | EXEC | `svcKeiUcwkNo.add(wkTemplates[j].getString(EKK0171A010CBSMsg1List.SVC_KEI_UCWK_NO))` // Extract service detail work number for linking [-> SVC_KEI_UCWK_NO] |

| # | Type | Code |
|---|------|------|
| 1 | SET | `rsltShosaMap.put(MAP_KEY_EKK0221C030, wkMapArray)` // Store cancellation results [-> "EKK0221C030"] |

### Block 3.B.3 — [IF] Process EKK0361C030: Optional Service Contract Review+Cancel (L10086)

**Block 3.B.3.1** — [IF] `workEKK0361A010Array != null` (L10087)

| # | Type | Code |
|---|------|------|
| 1 | SET | `wkMapArray = new ArrayList()` // Fresh map array |

**Block 3.B.3.1.1** — [FOR] `i = 0; i < workEKK0361A010Array.size()` (L10088)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `wkTenplates = getWorkData(EKK0361A010CBSMsg.EKK0361A010CBSMSG1LIST, (Map)workEKK0361A010Array.get(i))` // Extract templates |
| 2 | EXEC | Inner FOR loop (L10090) |

**Block 3.B.3.1.1.1** — [FOR] `j = 0; j < wkTenplates.length` (L10090)

| # | Type | Code |
|---|------|------|
| 1 | SET | `childTemplate = wkTenplates[j]` // Individual template |
| 2 | CALL | `wkCaanMsgList = shosaOkMapper.editInMsgEKK0361C030(param, childTemplate, idoDiv)` // Format optional service contract for cancellation (review+cancel) |
| 3 | CALL | `rslt = editInMsgCmn(param, wkCaanMsgList.get(0))` // Standardize result |
| 4 | EXEC | `wkMapArray.add(rslt)` // Collect result |
| 5 | CALL | `op_svc_cd = getValuableData(rsltShokai, MAP_KEY_EKK0351B002, EKK0351B002CBSMsg.EKK0351B002CBSMSG1LIST, EKK0351B002CBSMsg1List.OP_SVC_KEI_NO, childTemplate.getString(EKK0361A010CBSMsg1List.OP_SVC_KEI_NO), EKK0351B002CBSMsg1List.OP_SVC_CD)` // Lookup optional service code [-> EKK0351B002] |

**Block 3.B.3.1.1.1.A** — [IF] `op_svc_cd == "B001"` (Email Optional) (L10112)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `opSvcKeiNoB001.add(childTemplate.getString(EKK0361A010CBSMsg1List.OP_SVC_KEI_NO))` // Collect Email optional service numbers [-> "B001"] |

**Block 3.B.3.1.1.1.B** — [ELSE-IF] `op_svc_cd == "B002"` (My Home Page Optional) (L10120)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `opSvcKeiNoB002.add(childTemplate.getString(EKK0361A010CBSMsg1List.OP_SVC_KEI_NO))` // Collect My Home Page optional service numbers [-> "B002"] |

| # | Type | Code |
|---|------|------|
| 1 | SET | `rsltShosaMap.put(MAP_KEY_EKK0361C030, wkMapArray)` // Store cancellation results [-> "EKK0361C030"] |

### Block 3.B.4 — [IF] Process EKK0411C040: Sub-Optional Review+Cancel (L10130)

**Block 3.B.4.1** — [IF] `workEKK0411A010Array != null` (L10131)

| # | Type | Code |
|---|------|------|
| 1 | SET | `wkMapArray = new ArrayList()` // Fresh map array |

**Block 3.B.4.1.1** — [FOR] `i = 0; i < workEKK0411A010Array.size()` (L10132)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `wkTenplates = getWorkData(EKK0411A010CBSMsg.EKK0411A010CBSMSG1LIST, (Map)workEKK0411A010Array.get(i))` // Extract templates |
| 2 | EXEC | Inner FOR loop: `j = 0; null != wkTenplates && j < wkTenplates.length` (L10134) — includes null safety check |

**Block 3.B.4.1.1.1** — [FOR] `j = 0; null != wkTenplates && j < wkTenplates.length` (L10134)

| # | Type | Code |
|---|------|------|
| 1 | SET | `childTemplate = wkTenplates[j]` // Individual template |
| 2 | CALL | `wkCaanMsgList = shosaOkMapper.editInMsgEKK0411C040(param, childTemplate, idoDiv)` // Format sub-optional service contract for cancellation (review+cancel) |
| 3 | CALL | `rslt = editInMsgCmn(param, wkCaanMsgList.get(0))` // Standardize result |
| 4 | EXEC | `wkMapArray.add(rslt)` // Collect result |

| # | Type | Code |
|---|------|------|
| 1 | SET | `rsltShosaMap.put(MAP_KEY_EKK0411C040, wkMapArray)` // Store cancellation results [-> "EKK0411C040"] |

### Block 4 — [LINK DATA] Store Linked Data for Cross-System Correlation (L10147)

After all contract types are processed, stores three categories of linked data into the parameter's joint-data area (`SJISHO_MAP`) for cross-system correlation.

| # | Type | Code |
|---|------|------|
| 1 | SET | `v0 = new String[svcKeiUcwkNo.size()]` // Auth ID array buffer |
| 2 | CALL | `JKKBpCommon.putAxMRenkeiDataKbn(param, JKKSvkeiShosaConstCC.SJISHO_MAP, JKKAddSjishoConst.RENKEI_DATA_KBN_NINSHO_ID, JKKAddSjishoConst.TRN_KBN_ADD, svcKeiUcwkNo.toArray(v0), currentSysid)` // Store authentication IDs [-> "Authenticated ID Info", "Add"] |
| 3 | SET | `v1 = new String[opSvcKeiNoB001.size()]` // POP ID array buffer |
| 4 | SET | `v2 = new String[opSvcKeiNoB002.size()]` // WEB ID array buffer |
| 5 | CALL | `JKKBpCommon.putAxMRenkeiDataKbn(param, JKKSvkeiShosaConstCC.SJISHO_MAP, JKKAddSjishoConst.RENKEI_DATA_KBN_POPID, JKKAddSjishoConst.TRN_KBN_ADD, opSvcKeiNoB001.toArray(v1), currentSysid)` // Store POP IDs (Email Optional) [-> "POPID Info", "Add"] |
| 6 | CALL | `JKKBpCommon.putAxMRenkeiDataKbn(param, JKKSvkeiShosaConstCC.SJISHO_MAP, JKKAddSjishoConst.RENKEI_DATA_KBN_WEBID, JKKAddSjishoConst.TRN_KBN_ADD, opSvcKeiNoB002.toArray(v2), currentSysid)` // Store WEB IDs (My Home Page Optional) [-> "WEBID Info", "Add"] |

**Linked Data Categories:**
- `RENKEI_DATA_KBN_NINSHO_ID` = Authentication ID info — service detail work numbers used as authentication identifiers
- `RENKEI_DATA_KBN_POPID` = POP ID info — Email Optional service contract numbers (B001)
- `RENKEI_DATA_KBN_WEBID` = WEB ID info — My Home Page Optional service contract numbers (B002)
- `TRN_KBN_ADD` = Transaction type "Add" — indicates these are new entries being linked

### Block 5 — [RETURN] (L10156)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return rsltShosaMap` // Return the complete mapping result containing all six contract type maps |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `editMapShosaOkAdsl` | Method | Edit Map Confirmation (OK) for eoADSL — maps inquiry results into display-ready confirmation data for eoADSL service contracts |
| `canCncSvcKei` | Field | Cancel Service Contract Kind — flag indicating whether the operation is confirmation (`false`) or cancellation (`true`) |
| `idoDiv` | Field | Discrepancy Division (異同区分) — flag indicating how to format field values during review (standard vs. flagged differences) |
| `rsltShokai` | Field | Result Inquiry — pre-fetched inquiry data map containing arrays of service contract records for each contract type |
| `svcKeiUcwkNo` | Field | Service Kei (Kind) Work Number — internal tracking ID for service contract line items, used as authentication identifiers |
| `op_svc_cd` | Field | Optional Service Code — classification code for optional services (B001 = Email, B002 = My Home Page) |
| `opSvcKeiNoB001` | Field | Optional Service Kei Number B001 — list of service contract numbers for Email Optional services |
| `opSvcKeiNoB002` | Field | Optional Service Kei Number B002 — list of service contract numbers for My Home Page Optional services |
| EKK0141A010 | Contract Type | eoADSL Service Contract — the primary ADSL line service contract |
| EKK0221A010 | Contract Type | eoADSL Service Contract Details — detailed line information for the eoADSL service contract |
| EKK0361A010 | Contract Type | Optional Service Contract (ISP) — optional add-on services for the ISP connection |
| EKK0411A010 | Contract Type | Sub-Optional Service Contract (ISP) — sub-level optional services under the ISP optional service |
| EKK0171A010 | Contract Key | Service contract number key — reference to the service contract master data |
| EKK0351B002 | Contract Key | Optional service contract master — lookup table for optional service classification codes |
| EKK0141C010 | Display Key | Confirmation display map key for eoADSL Service Contract (OK/review mode) |
| EKK0141C020 | Display Key | Cancellation display map key for eoADSL Service Contract (cancel mode) |
| EKK0221C010 | Display Key | Confirmation display map key for eoADSL Service Contract Details (OK/review mode) |
| EKK0221C030 | Display Key | Review+Cancel display map key for eoADSL Service Contract Details (cancel mode) |
| EKK0361C010 | Display Key | Confirmation display map key for Optional Service Contract (OK/review mode) |
| EKK0361C030 | Display Key | Review+Cancel display map key for Optional Service Contract (cancel mode) |
| EKK0411C020 | Display Key | Confirmation display map key for Sub-Optional Service Contract (OK/review mode) |
| EKK0411C040 | Display Key | Review+Cancel display map key for Sub-Optional Service Contract (cancel mode) |
| B001 | Service Code | Email Optional — email service add-on for eoADSL customers |
| B002 | Service Code | My Home Page Optional — web hosting/page service add-on for eoADSL customers |
| eoADSL | Business Term | Electronic Opto-Asia Digital Subscriber Line — Fujitsu's branded ADSL internet service (now evolved into eo Hikari fiber) |
| ISP | Business Term | Internet Service Provider — the internet connectivity service bundled with eoADSL |
| SJISHO_MAP | Constant | Verification/Inquiry Map — the shared data area key in the parameter where linked data is stored for cross-screen correlation |
| RENKEI_DATA_KBN_NINSHO_ID | Constant | Linked Data Category - Authentication ID — stores service detail work numbers as authentication identifiers for linked systems |
| RENKEI_DATA_KBN_POPID | Constant | Linked Data Category - POP ID — stores Email Optional service contract numbers for linked systems |
| RENKEI_DATA_KBN_WEBID | Constant | Linked Data Category - WEB ID — stores My Home Page Optional service contract numbers for linked systems |
| TRN_KBN_ADD | Constant | Transaction Kind - Add — indicates a new entry is being added to the linked data area |
| CAANMsg | Technical Term | CAAN Message Object — a structured message template object used for form field mapping and display generation |
| shosaOkMapper | Instance | OK Review Mapper — mapper instance that dispatches to specific EKK-method mappers for confirmation/review display formatting |
| JKKSvkeiShosaCncMapper | Instance | Cancel Service Mapper — mapper instance for cancellation display formatting |
| editInMsgCmn | Method | Edit Input Message Common — standardizes formatted CAANMsg data into a consistent HashMap result structure |
| getWorkData | Method | Retrieves structured work templates (CAANMsg arrays) from inquiry result data based on CBS message list constants |
| getValuableData | Method | Looks up a value from `rsltShokai` by matching an optional service contract number to its classification code (op_svc_cd) |
| putAxMRenkeiDataKbn | Method | Puts associative map linked data — stores categorized linked data entries into the parameter's joint-data area for cross-system correlation |
| getWorkData (EKK*) | Method | Service Component data retriever — extracts structured templates from inquiry results for display processing |
| runSvkeiShosa | Method | Main service contract inquiry/cancellation processing — the entry point that calls this method during the confirmation workflow |
| IRequestParameterReadWrite | Interface | Request Parameter interface — the contract for the parameter object that carries model data, control maps, and linked data across the screen layer |
| MAP_KEY_EKK0141A010 | Constant | Map key "EKK0141A010" — identifier for eoADSL Service Contract data in the inquiry result map |
| MAP_KEY_EKK0221A010 | Constant | Map key "EKK0221A010" — identifier for eoADSL Service Contract Details data in the inquiry result map |
| MAP_KEY_EKK0361A010 | Constant | Map key "EKK0361A010" — identifier for Optional Service Contract (ISP) data in the inquiry result map |
| MAP_KEY_EKK0411A010 | Constant | Map key "EKK0411A010" — identifier for Sub-Optional Service Contract (ISP) data in the inquiry result map |
