# Business Logic — JKKSvkeiShosaClCC.editMapShokai2() [217 LOC]

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

## 1. Role

### JKKSvkeiShosaClCC.editMapShokai2()

This method performs a **second-pass mapping process** for service inquiry (shokai) results in a telecom service contract management system. It takes pre-fetched inquiry result data (`rsltShokai`) — produced by an initial round of one-of and list inquiry (shokai) operations — and maps each result into a displayable format for UI presentation. The method is invoked by `runSvkeiShosaCl()` within `JKKSvkeiShosaClCC`, which orchestrates the overall service inquiry workflow.

The method handles **nine distinct service categories** through a routing/dispatch pattern: it retrieves work arrays from the input result map, iterates over each item, applies conditional business filters (e.g., service status checks), invokes a `shokaiMapper` to transform data into display-ready format, applies common message editing, and collects results into categorized output maps. Each service category has its own map key in the result.

The method implements a **batch mapping dispatch pattern**: it processes multiple inquiry result sets sequentially (no parallelism), where each set follows the same retrieve-filter-transform-aggregate template but with different service codes, filter conditions, and mapper methods. This is a shared utility called by the screen inquiry CBS (Business Logic Component) to assemble display data across all service types (FTTH, ISP, TV, phone, optional services, etc.).

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["editMapShokai2 starts"])

    S1["Initialize result containers and work arrays"] --> S2["Retrieve 8 work arrays from rsltShokai via getWorkParentData"]

    S2 --> B1["Block1: 申込一意照会"]
    B1 --> C1{workEKK0021A010
!= null?}
    C1 -->|true| L1["Loop: editInMsgEKK0011A010 -> editInMsgCmn -> add to wkMapArray"]
    C1 -->|false| B1_END["Put empty wkMapArray, key=EKK0011A010"]
    L1 --> B1_END

    B1_END --> B2["Block2: オプション契約サポート"]
    B2 --> C2{workEKK0351B002
!= null?}
    C2 -->|true| L2["Loop: check isChkSvcKeiStat(OP_SVC_KEI_STAT)"]
    C2 -->|false| B2_END["Put empty wkMapArray, key=EKK0391A010"]
    L2 --> C2A{svc kei stat
valid?}
    C2A -->|true| L2A["editInMsgEKK0391A010 -> editInMsgCmn -> add"]
    C2A -->|false| L2NEXT["next item"]
    L2A --> L2NEXT
    L2NEXT --> B2_END

    B2_END --> B3["Block3: 機器提供サービス契約一覧"]
    B3 --> C3{workEKK0341B002
!= null?}
    C3 -->|true| L3["Loop: check isChkSvcKeiStat(KKTK_SVC_KEI_STAT)"]
    C3 -->|false| B3A["Set takinoGetFlg=false"]
    L3 --> C3A{svc kei stat
valid?}
    C3A -->|true| L3A["editInMsgEKK0341A010 -> editInMsgCmn -> add"]
    C3A -->|false| L3NEXT["next item"]
    L3A --> L3NEXT
    L3NEXT --> B3A
    C3 -->|false| B3A

    B3A --> B3B["Fetch eKK0341B504CBSMSG1list from MAP_KEY_KAISEN_KKTK"]
    B3B --> C3B{eKK0341B504CBSMSG1list
!= null?}
    C3B -->|true| L3B["Loop: get kktk_svc_cd, check C024/C025, set takinoGetFlg, check svc kei stat"]
    C3B -->|false| B3C["Fetch kktkSvcKeiNoList"]
    L3B --> B3C

    B3C --> B3D{workEKK2811B011
!= null?}
    B3D -->|true| L3D["Loop: check no duplicate AND takinoGetFlg==false"]
    B3D -->|false| B3_DONE["Put wkMapArray, key=EKK0341A010"]
    L3D --> C3D{no dup AND
flg is false?}
    C3D -->|true| L3DA["editInMsgEKK0341A010 -> editInMsgCmn -> add -> track kktkSvcKeiNo"]
    C3D -->|false| L3DNEXT["next item"]
    L3DA --> L3DNEXT
    L3DNEXT --> B3_DONE

    B3_DONE --> B4["Block4: サブオプション契約"]
    B4 --> C4{workEKK0351B002
!= null?}
    C4 -->|true| L4["Loop: check isChkSvcKeiStat(OP_SVC_KEI_STAT)"]
    C4 -->|false| B4_END["Put wkMapArray, key=EKK0401B001"]
    L4 --> C4A{svc kei stat
valid?}
    C4A -->|true| L4A["editInMsgEKK0401B001 -> editInMsgCmn -> add"]
    C4A -->|false| L4NEXT["next item"]
    L4A --> L4NEXT
    L4NEXT --> B4_END

    B4_END --> B5["Block5: 割引サービス契約"]
    B5 --> C5{workEKK0451B001
!= null?}
    C5 -->|true| L5["Loop: check isChkWribSvcKeiStat(WRIB_SVC_KEI_STAT)"]
    C5 -->|false| B5_END["Put wkMapArray, key=EKK0451A010"]
    L5 --> C5A{wrib svc kei
valid?}
    C5A -->|true| L5A["editInMsgEKK0451A010 -> editInMsgCmn -> add"]
    C5A -->|false| L5NEXT["next item"]
    L5A --> L5NEXT
    L5NEXT --> B5_END

    B5_END --> B6["Block6: サービス契約回線内訳"]
    B6 --> C6{workEKK0241B001
!= null?}
    C6 -->|true| L6["Loop: check isChkSvcKeiKaisenStat(SVC_KEI_KAISEN_UCWK_STAT)"]
    C6 -->|false| B6_END["Put wkMapArray, key=EKK0251A010"]
    L6 --> C6A{kaisen stat
valid?}
    C6A -->|true| L6A["editInMsgEKK0251A010 -> editInMsgCmn -> add"]
    C6A -->|false| L6NEXT["next item"]
    L6A --> L6NEXT
    L6NEXT --> B6_END

    B6_END --> B7["Retrieve workEKK0081A010, extract idoDiv"]
    B7 --> B7C["Block7: 進展一覧照会 - editInMsgEKK1091B001 -> editInMsgCmn"]
    B7C --> B7_DONE["Put wkMapArray, key=EKK1091B001"]

    B7_DONE --> B8["Block8: 割引契約一意照会"]
    B8 --> C8{workEKK2541B004
!= null?}
    C8 -->|true| L8["Loop: editInMsgEKK2541A010 -> editInMsgCmn -> add"]
    C8 -->|false| B8_END["Put empty wkMapArray"]
    L8 --> B8_END

    B8_END --> END(["Return rsltShokaiMap"])

    START --> S1
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `param` | `IRequestParameterReadOnly` | Request parameter object containing the model group and control map for the inquiry screen. Carries user session data, screen context, and business data references. |
| 2 | `fixedText` | `String` | User-specified arbitrary string used as a filter or display label during inquiry mapping. Passed through to mapper methods. |
| 3 | `userDataIndex` | `int` | Index into the business data array within `param`. Selects which specific business data record to process (e.g., which service contract line item). |
| 4 | `rsltShokai` | `HashMap<String, Object>` | Pre-populated map containing results from prior (first-round) one-of and list inquiry operations. Each key maps to a `CAANMsg[]` array of inquiry results. Acts as the source data from which this method extracts and re-maps data. |

**Instance fields / external state read:**
- `shokaiMapper` (`JKKSvkeiShosaClShokaiMapperCC`): Injection-injected mapper component used to transform inquiry template data into display-ready messages.
- No other instance fields are directly read within this method.

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `JKKSvkeiShosaClCC.getWorkParentData` | (internal) | rsltShokai | Reads 8 work arrays (service inquiry results) from the pre-populated `rsltShokai` map using map keys |
| R | `CAANMsg.getString` (multiple) | - | - | Extracts individual field values from `CAANMsg` inquiry result objects (e.g., `OP_SVC_KEI_STAT`, `KKTK_SVC_KEI_STAT`, `KKTK_SVC_CD`, `IDO_DIV`, etc.) |
| U | `JKKSvkeiShosaClCC.editInMsgCmn` | - | - | Applies common message editing/transformation to each mapped inquiry result |
| R | `JKKSvkeiShosaClCC.isChkSvcKeiStat` | - | - | Service status validation: checks if a service detail status code is valid (used for most service categories) |
| R | `JKKSvkeiShosaClCC.isChkWribSvcKeiStat` | - | - | Discount service status validation: checks waiver/discount service detail status |
| R | `JKKSvkeiShosaClCC.isChkSvcKeiKaisenStat` | - | - | Inquiry (revised/changed) service line status validation: checks revised line status |
| U | `JKKSvkeiShosaClShokaiMapperCC.editInMsgEKK0011A010` | EKK0011A010SC | - | Maps application detail one-of inquiry results (申込明細一意照会) |
| U | `JKKSvkeiShosaClShokaiMapperCC.editInMsgEKK0391A010` | EKK0391A010SC | - | Maps optional service contract <support> one-of inquiry results (オプションサービス契約<サポート>一意照会) |
| U | `JKKSvkeiShosaClShokaiMapperCC.editInMsgEKK0341A010` | EKK0341A010SC | - | Maps equipment provider service contract one-of inquiry results (機器提供サービス契約一意照会) |
| U | `JKKSvkeiShosaClShokaiMapperCC.editInMsgEKK0401B001` | EKK0401B001SC | - | Maps sub-optional service contract list inquiry results (サブオプションサービス契約一覧照会) |
| U | `JKKSvkeiShosaClShokaiMapperCC.editInMsgEKK0451A010` | EKK0451A010SC | - | Maps discount service contract one-of inquiry results (割引サービス契約一意照会) |
| U | `JKKSvkeiShosaClShokaiMapperCC.editInMsgEKK0251A010` | EKK0251A010SC | - | Maps service contract line detail one-of inquiry results (サービス契約回線内訳一意照会) |
| U | `JKKSvkeiShosaClShokaiMapperCC.editInMsgEKK1091B001` | EKK1091B001SC | - | Maps progress list inquiry results (進展一覧照会) |
| U | `JKKSvkeiShosaClShokaiMapperCC.editInMsgEKK2541A010` | EKK2541A010SC | - | Maps discount contract one-of inquiry results (割引契約一意照会) |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | CBS: JKKSvkeiShosaClCC.runSvkeiShosaCl | `runSvkeiShosaCl()` -> `editMapShokai2(param, fixedText, userDataIndex, rsltShokai)` | `editInMsgCmn [U]`, `editInMsgEKK2541A010 [U]`, `editInMsgEKK1091B001 [U]`, `editInMsgEKK0251A010 [U]`, `editInMsgEKK0451A010 [U]`, `editInMsgEKK0401B001 [U]`, `editInMsgEKK0341A010 [U]`, `editInMsgEKK0391A010 [U]`, `editInMsgEKK0011A010 [U]`, `getWorkParentData [R]`, `getString [R]`, `isChkSvcKeiStat [R]`, `isChkWribSvcKeiStat [R]`, `isChkSvcKeiKaisenStat [R]` |

## 6. Per-Branch Detail Blocks

**Block 1** — [VARIABLE INITIALIZATION] (L3719)

Initializes all local variables and declares work arrays for each service inquiry type.

| # | Type | Code |
|---|------|------|
| 1 | SET | `rsltShokaiMap = new HashMap()` |
| 2 | SET | `rslt = null` |
| 3 | SET | `wkCaanMsgList = null` |
| 4 | SET | `wkMapArray = null` |
| 5 | SET | `workEKK0021A010 = null` /* 申込明細一意照会 (Application Detail One-of Inquiry) */ |
| 6 | SET | `workEKK0351B002 = null` /* オプションサービス契約一覧照会 (Optional Service Contract List Inquiry) */ |
| 7 | SET | `workEKK0341B002 = null` /* 機器提供サービス契約一覧照会 (Equipment Provider Service Contract List Inquiry) */ |
| 8 | SET | `workEKK0451B001 = null` /* 割引サービス契約一覧照会 (Discount Service Contract List Inquiry) */ |
| 9 | SET | `workEKK0241B001 = null` /* サービス契約回線内訳一覧照会 (Service Contract Line Detail List Inquiry) */ |
| 10 | SET | `workEKK2541B004 = null` /* 割引契約一覧照会(サービス契約番号) (Discount Contract List Inquiry - Service Contract No.) */ |
| 11 | SET | `workEKK2811B011 = null` /* 機器オプションサービス照会 (Equipment Optional Service Inquiry) */ |

**Block 2** — [DATA RETRIEVAL] (L3734)

Retrieves 8 work arrays from the pre-populated `rsltShokai` map using `getWorkParentData`. Each call uses a specific CBS message constant and map key.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `getWorkParentData(EKK0021A010CBSMsg.EKK0021A010CBSMSG1LIST, rsltShokai, "EKK0021A010")` [-> MAP_KEY_EKK0021A010="EKK0021A010"] |
| 2 | CALL | `getWorkParentData(EKK0351B002CBSMsg.EKK0351B002CBSMSG1LIST, rsltShokai, "EKK0351B002")` [-> MAP_KEY_EKK0351B002="EKK0351B002"] |
| 3 | CALL | `getWorkParentData(EKK0341B002CBSMsg.EKK0341B002CBSMSG1LIST, rsltShokai, "EKK0341B002")` [-> MAP_KEY_EKK0341B002="EKK0341B002"] |
| 4 | CALL | `getWorkParentData(EKK0451B001CBSMsg.EKK0451B001CBSMSG1LIST, rsltShokai, "EKK0451B001")` [-> MAP_KEY_EKK0451B001="EKK0451B001"] |
| 5 | CALL | `getWorkParentData(EKK0241B001CBSMsg.EKK0241B001CBSMSG1LIST, rsltShokai, "EKK0241B001")` [-> MAP_KEY_EKK0241B001="EKK0241B001"] |
| 6 | CALL | `getWorkParentData(EKK2541B004CBSMsg.EKK2541B004CBSMSG1LIST, rsltShokai, "EKK2541B004")` [-> MAP_KEY_EKK2541B004="EKK2541B004"] |
| 7 | CALL | `getWorkParentData(EKK2811B011CBSMsg.EKK2811B011CBSMSG1LIST, rsltShokai, "EKK2811B011")` [-> MAP_KEY_EKK2811B011="EKK2811B011"] |

**Block 3** — [IF] (workEKK0021A010 != null) (L3739) /* 申込一意照会 (Application One-of Inquiry) */

Processes application detail one-of inquiry results. No conditional filtering — iterates all items.

| # | Type | Code |
|---|------|------|
| 1 | SET | `wkMapArray = new ArrayList()` |
| 2 | EXEC | `for (int i = 0; i < workEKK0021A010.length; i++)` |
| 3 | SET | `childTemplate = workEKK0021A010[i]` |
| 4 | CALL | `shokaiMapper.editInMsgEKK0011A010(param, fixedText, userDataIndex, childTemplate)` |
| 5 | EXEC | `rslt = editInMsgCmn(param, wkCaanMsgList.get(0))` |
| 6 | EXEC | `wkMapArray.add(rslt)` |
| 7 | SET | `rsltShokaiMap.put("EKK0011A010", wkMapArray)` [-> MAP_KEY_EKK0011A010="EKK0011A010"] |

**Block 4** — [IF] (workEKK0351B002 != null) (L3749) /* オプションサービス契約<サポート>一意照会 (Optional Service Contract <Support> One-of Inquiry) */

Iterates optional service contract results, filtering by service status using `isChkSvcKeiStat`.

| # | Type | Code |
|---|------|------|
| 1 | SET | `wkMapArray = new ArrayList()` |
| 2 | EXEC | `for (int i = 0; i < workEKK0351B002.length; i++)` |
| 3 | SET | `childTemplate = workEKK0351B002[i]` |
| 4 | EXEC | `childTemplate.getString(EKK0351B002CBSMsg1List.OP_SVC_KEI_STAT)` |
| 5 | CALL | `isChkSvcKeiStat(...)` [filters by service status] |
| 6 | CALL | `shokaiMapper.editInMsgEKK0391A010(param, fixedText, userDataIndex, childTemplate)` [only if valid] |
| 7 | EXEC | `rslt = editInMsgCmn(param, wkCaanMsgList.get(0))` |
| 8 | EXEC | `wkMapArray.add(rslt)` |
| 9 | SET | `rsltShokaiMap.put("EKK0391A010", wkMapArray)` [-> MAP_KEY_EKK0391A010="EKK0391A010"] |

**Block 5** — [IF] (workEKK0341B002 != null) (L3763) /* 機器提供サービス契約一意照会(サービス契約番号) (Equipment Provider Service Contract One-of Inquiry - Service Contract Number) */

Iterates equipment provider service contract results, filtering by `KKTK_SVC_KEI_STAT` status.

| # | Type | Code |
|---|------|------|
| 1 | SET | `wkMapArray = new ArrayList()` |
| 2 | EXEC | `for (int i = 0; i < workEKK0341B002.length; i++)` |
| 3 | SET | `childTemplate = workEKK0341B002[i]` |
| 4 | EXEC | `childTemplate.getString(EKK0341B002CBSMsg1List.KKTK_SVC_KEI_STAT)` |
| 5 | CALL | `isChkSvcKeiStat(...)` [filters by equipment provider service status] |
| 6 | CALL | `shokaiMapper.editInMsgEKK0341A010(param, fixedText, userDataIndex, childTemplate)` [only if valid] |
| 7 | EXEC | `rslt = editInMsgCmn(param, wkCaanMsgList.get(0))` |
| 8 | EXEC | `wkMapArray.add(rslt)` |
| 9 | SET | `rsltShokaiMap.put("EKK0341A010", wkMapArray)` [-> MAP_KEY_EKK0341A010="EKK0341A010"] |

**Block 5.1** — [NESTED: 多機能ルータ取得済フラグ] (Nested multi-function router fetch-flag logic) (L3776)

Additional processing for equipment provider service from a separate inquiry result (revision data). Introduces deduplication logic via `takinoGetFlg` and `kktkSvcKeiNoList`.

> Block 5.1a — [SET] (L3776) Initialize the multi-function router fetch-flag.

| # | Type | Code |
|---|------|------|
| 1 | SET | `takinoGetFlg = false` |

> Block 5.1b — [IF] (eKK0341B504CBSMSG1list from MAP_KEY_KAISEN_KKTK != null) (L3779) [-> MAP_KEY_KAISEN_KKTK="BUTURYU_EKK0341B504_RSLT"]

Iterates revised/changed equipment provider service data. Checks for multi-function router service codes ("C024" / "C025") and sets the `takinoGetFlg` to prevent duplicate mapping.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `eKK0341B504CBSMSG1list = (CAANMsg[]) rsltShokai.get("BUTURYU_EKK0341B504_RSLT")` |
| 2 | EXEC | `for (int i = 0; null != eKK0341B504CBSMSG1list && i < eKK0341B504CBSMSG1list.length; i++)` |
| 3 | SET | `childTemplate = eKK0341B504CBSMSG1list[i]` |
| 4 | EXEC | `kktk_svc_cd = childTemplate.getString(EKK0341B504CBSMsg1List.KKTK_SVC_CD)` |
| 5 | IF | `"C024".equals(kktk_svc_cd) || "C025".equals(kktk_svc_cd)` [-> multi-function router service code] |
| 6 | SET | `takinoGetFlg = true` /* Multi-function router was already fetched; skip duplicate mapping here */ |
| 7 | CALL | `isChkSvcKeiStat(childTemplate.getString(EKK0341B504CBSMsg1List.KKTK_SVC_KEI_STAT))` |
| 8 | CALL | `shokaiMapper.editInMsgEKK0341A010(param, fixedText, userDataIndex, childTemplate)` [only if valid] |
| 9 | EXEC | `rslt = editInMsgCmn(param, wkCaanMsgList.get(0))` |
| 10 | EXEC | `wkMapArray.add(rslt)` |

> Block 5.1c — [NESTED: 機器オプションサービス照会] (L3797)

When the multi-function router fetch-flag is off (`takinoGetFlg == false`), this block processes equipment optional service inquiry results (from line routes), avoiding duplicates.

| # | Type | Code |
|---|------|------|
| 1 | SET | `kktkSvcKeiNoList = new ArrayList<String>()` |
| 2 | EXEC | `for (int i = 0; i < workEKK2811B011.length; i++)` |
| 3 | SET | `childTemplate = workEKK2811B011[i]` |
| 4 | EXEC | `kktkSvcKeiNo = childTemplate.getString(EKK2811B011CBSMsg1List.KKTK_SVC_KEI_NO)` |
| 5 | IF | `!kktkSvcKeiNoList.contains(kktkSvcKeiNo) && takinoGetFlg == false` [dedup: no duplicate AND multi-function router not already fetched] |
| 6 | CALL | `shokaiMapper.editInMsgEKK0341A010(param, fixedText, userDataIndex, childTemplate)` |
| 7 | EXEC | `rslt = editInMsgCmn(param, wkCaanMsgList.get(0))` |
| 8 | EXEC | `wkMapArray.add(rslt)` |
| 9 | EXEC | `kktkSvcKeiNoList.add(kktkSvcKeiNo)` [track to prevent future duplicates] |

**Block 6** — [IF] (workEKK0351B002 != null) (L3807) /* サブオプションサービス契約一覧照会 (Sub-Optional Service Contract List Inquiry) */

Reuses `workEKK0351B002` (optional service contract data). Filters by `OP_SVC_KEI_STAT` using `isChkSvcKeiStat`.

| # | Type | Code |
|---|------|------|
| 1 | SET | `wkMapArray = new ArrayList()` |
| 2 | EXEC | `for (int i = 0; i < workEKK0351B002.length; i++)` |
| 3 | SET | `childTemplate = workEKK0351B002[i]` |
| 4 | EXEC | `childTemplate.getString(EKK0351B002CBSMsg1List.OP_SVC_KEI_STAT)` |
| 5 | CALL | `isChkSvcKeiStat(...)` |
| 6 | CALL | `shokaiMapper.editInMsgEKK0401B001(param, fixedText, userDataIndex, childTemplate)` |
| 7 | EXEC | `rslt = editInMsgCmn(param, wkCaanMsgList.get(0))` |
| 8 | EXEC | `wkMapArray.add(rslt)` |
| 9 | SET | `rsltShokaiMap.put("EKK0401B001", wkMapArray)` [-> MAP_KEY_EKK0401B001="EKK0401B001"] |

**Block 7** — [IF] (workEKK0451B001 != null) (L3821) /* 割引サービス契約一覧照会 (Discount Service Contract List Inquiry) */

Processes discount service contract results. Filters by `WRIB_SVC_KEI_STAT` using `isChkWribSvcKeiStat` (a specialized check for discount/waiver status).

| # | Type | Code |
|---|------|------|
| 1 | SET | `wkMapArray = new ArrayList()` |
| 2 | EXEC | `for (int i = 0; i < workEKK0451B001.length; i++)` |
| 3 | SET | `childTemplate = workEKK0451B001[i]` |
| 4 | EXEC | `childTemplate.getString(EKK0451B001CBSMsg1List.WRIB_SVC_KEI_STAT)` |
| 5 | CALL | `isChkWribSvcKeiStat(...)` |
| 6 | CALL | `shokaiMapper.editInMsgEKK0451A010(param, fixedText, userDataIndex, childTemplate)` |
| 7 | EXEC | `rslt = editInMsgCmn(param, wkCaanMsgList.get(0))` |
| 8 | EXEC | `wkMapArray.add(rslt)` |
| 9 | SET | `rsltShokaiMap.put("EKK0451A010", wkMapArray)` [-> MAP_KEY_EKK0451A010="EKK0451A010"] |

**Block 8** — [IF] (workEKK0241B001 != null) (L3835) /* サービス契約回線内訳一意照会 (Service Contract Line Detail One-of Inquiry) */

Processes service contract line detail results. Filters by `SVC_KEI_KAISEN_UCWK_STAT` using `isChkSvcKeiKaisenStat` (checks revised/changed line status).

| # | Type | Code |
|---|------|------|
| 1 | SET | `wkMapArray = new ArrayList()` |
| 2 | EXEC | `for (int i = 0; i < workEKK0241B001.length; i++)` |
| 3 | SET | `childTemplate = workEKK0241B001[i]` |
| 4 | EXEC | `childTemplate.getString(EKK0241B001CBSMsg1List.SVC_KEI_KAISEN_UCWK_STAT)` |
| 5 | CALL | `isChkSvcKeiKaisenStat(...)` |
| 6 | CALL | `shokaiMapper.editInMsgEKK0251A010(param, fixedText, userDataIndex, childTemplate)` |
| 7 | EXEC | `rslt = editInMsgCmn(param, wkCaanMsgList.get(0))` |
| 8 | EXEC | `wkMapArray.add(rslt)` |
| 9 | SET | `rsltShokaiMap.put("EKK0251A010", wkMapArray)` [-> MAP_KEY_EKK0251A010="EKK0251A010"] |

**Block 9** — [DATA RETRIEVAL + BLOCK 7: 進展一覧照会] (L3844) /* Progress List Inquiry (ST2-2012-0000185) */

Retrieves progress inquiry data and maps it unconditionally (no filtering). Uses `idoDiv` (division code) instead of a child template.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `getWorkParentData(EKK0081A010CBSMsg.EKK0081A010CBSMSG1LIST, rsltShokai, "EKK0081A010")` [-> MAP_KEY_EKK0081A010="EKK0081A010"] |
| 2 | EXEC | `idoDiv = workEKK0081A010[0].getString(EKK0081A010CBSMsg1List.IDO_DIV)` |
| 3 | SET | `wkMapArray = new ArrayList()` |
| 4 | CALL | `shokaiMapper.editInMsgEKK1091B001(param, fixedText, userDataIndex, idoDiv)` |
| 5 | EXEC | `rslt = editInMsgCmn(param, wkCaanMsgList.get(0))` |
| 6 | EXEC | `wkMapArray.add(rslt)` |
| 7 | SET | `rsltShokaiMap.put("EKK1091B001", wkMapArray)` [-> MAP_KEY_EKK1091B001="EKK1091B001"] |

**Block 10** — [IF] (workEKK2541B004 != null) (L3856) /* 割引契約一意照会 (Discount Contract One-of Inquiry) */

Processes discount contract results. No filtering — iterates all items.

| # | Type | Code |
|---|------|------|
| 1 | SET | `wkMapArray = new ArrayList()` |
| 2 | EXEC | `for (int i = 0; i < workEKK2541B004.length; i++)` |
| 3 | SET | `childTemplate = workEKK2541B004[i]` |
| 4 | CALL | `shokaiMapper.editInMsgEKK2541A010(param, fixedText, userDataIndex, childTemplate)` |
| 5 | EXEC | `rslt = editInMsgCmn(param, wkCaanMsgList.get(0))` |
| 6 | EXEC | `wkMapArray.add(rslt)` |
| 7 | SET | `rsltShokaiMap.put("EKK2541A010", wkMapArray)` [-> MAP_KEY_EKK2541A010="EKK2541A010"] |

**Block 11** — [RETURN] (L3867)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return rsltShokaiMap` |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `editMapShokai2` | Method | Second-pass mapping for service inquiry results (2回目) — maps pre-fetched inquiry data into display-ready format |
| `shokai` | Japanese term | Inquiry/search — refers to data retrieval operations (one-of/inquiry, list inquiry) in the telecom system |
| `一意照会` | Japanese term | One-of inquiry — single-record lookup by key |
| `一覧照会` | Japanese term | List inquiry — multi-record list lookup |
| `rsltShokai` | Field | Result of prior inquiry operations — contains `CAANMsg[]` arrays indexed by map key |
| `wkCaanMsgList` | Field | Working variable holding a list of `CAANMsg` (common message) objects from a mapper call |
| `wkMapArray` | Field | Working variable (ArrayList) collecting mapped result entries for one service category |
| `childTemplate` | Local variable | A single `CAANMsg` inquiry result row, used as input template for the mapper |
| `takinoGetFlg` | Field | Multi-function router fetch-flag — prevents duplicate mapping when multi-function router data was already fetched from a prior inquiry |
| `IDO_DIV` | Field | Division code (移動区分) — indicates the type of progress/status transition for a service contract |
| `OP_SVC_KEI_STAT` | Field | Optional service detail status — indicates the status of an optional service contract line item |
| `KKTK_SVC_KEI_STAT` | Field | Equipment provider service detail status — indicates the status of an equipment provider service contract line item |
| `KKTK_SVC_CD` | Field | Equipment provider service code — identifies the type of equipment service (e.g., "C024" = multi-function router) |
| `KKTK_SVC_KEI_NO` | Field | Equipment provider service contract number — used for deduplication across equipment optional service inquiries |
| `WRIB_SVC_KEI_STAT` | Field | Waiver/discount service detail status — indicates the status of a discount/waiver service contract line item |
| `SVC_KEI_KAISEN_UCWK_STAT` | Field | Service detail revision change work status — indicates the status of a revised/changed service contract line |
| `kaissen` | Japanese term | Revision/change — refers to modified versions of service contract line items (回線内訳変更) |
| `isChkSvcKeiStat` | Method | Validates general service detail status codes (service status check) |
| `isChkWribSvcKeiStat` | Method | Validates discount/waiver service detail status codes (waiver service status check) |
| `isChkSvcKeiKaisenStat` | Method | Validates revised/changed service line status codes (revision status check) |
| `MAP_KEY_EKK0011A010` | Constant | `"EKK0011A010"` — Application detail one-of inquiry result map key |
| `MAP_KEY_EKK0021A010` | Constant | `"EKK0021A010"` — Application detail one-of inquiry result data key |
| `MAP_KEY_EKK0351B002` | Constant | `"EKK0351B002"` — Optional service contract list inquiry result data key |
| `MAP_KEY_EKK0391A010` | Constant | `"EKK0391A010"` — Optional service contract <support> one-of inquiry result map key |
| `MAP_KEY_EKK0341B002` | Constant | `"EKK0341B002"` — Equipment provider service contract list inquiry result data key |
| `MAP_KEY_EKK0341A010` | Constant | `"EKK0341A010"` — Equipment provider service contract one-of inquiry result map key |
| `MAP_KEY_EKK0401B001` | Constant | `"EKK0401B001"` — Sub-optional service contract list inquiry result map key |
| `MAP_KEY_EKK0451A010` | Constant | `"EKK0451A010"` — Discount service contract one-of inquiry result map key |
| `MAP_KEY_EKK0241B001` | Constant | `"EKK0241B001"` — Service contract line detail list inquiry result data key |
| `MAP_KEY_EKK0251A010` | Constant | `"EKK0251A010"` — Service contract line detail one-of inquiry result map key |
| `MAP_KEY_EKK1091B001` | Constant | `"EKK1091B001"` — Progress list inquiry result map key |
| `MAP_KEY_EKK2541A010` | Constant | `"EKK2541A010"` — Discount contract one-of inquiry result map key |
| `MAP_KEY_EKK2541B004` | Constant | `"EKK2541B004"` — Discount contract list inquiry (service contract number) result data key |
| `MAP_KEY_EKK2811B011` | Constant | `"EKK2811B011"` — Equipment optional service inquiry (line route) result data key |
| `MAP_KEY_KAISEN_KKTK` | Constant | `"BUTURYU_EKK0341B504_RSLT"` — Revision data key for equipment provider service inquiry |
| CAANMsg | Class | Common message container — a data structure holding field-value pairs for inquiry results and display messages |
| shokaiMapper | Component | `JKKSvkeiShosaClShokaiMapperCC` — Mapper component that transforms inquiry template data into display-ready message format |
| editInMsgCmn | Method | Common message editing — applies standard transformation to a single mapped message result |
| getWorkParentData | Method | Retrieves a typed work array from the `rsltShokai` result map by CBS message constant and map key |
| editInMsgEKK0011A010 | Method | Maps application detail one-of inquiry results (申込明細) |
| editInMsgEKK0391A010 | Method | Maps optional service contract <support> one-of inquiry results |
| editInMsgEKK0341A010 | Method | Maps equipment provider service contract one-of inquiry results |
| editInMsgEKK0401B001 | Method | Maps sub-optional service contract list inquiry results |
| editInMsgEKK0451A010 | Method | Maps discount service contract one-of inquiry results |
| editInMsgEKK0251A010 | Method | Maps service contract line detail one-of inquiry results |
| editInMsgEKK1091B001 | Method | Maps progress list inquiry results (進展一覧) |
| editInMsgEKK2541A010 | Method | Maps discount contract one-of inquiry results |
| FTTH | Business term | Fiber To The Home — fiber-optic internet broadband service |
| ISP | Business term | Internet Service Provider — optional internet connectivity add-on service |
| 多機能ルータ | Japanese term | Multi-function router — a network equipment service (service code "C024" or "C025") |
| スサビ | Japanese term (implied) | Equipment/Device — refers to hardware/telecom equipment in service contracts |
