# Business Logic — JKKKikiIchiranKkOpKyUpdCC.getEkk1551d010Map() [129 LOC]

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

## 1. Role

### JKKKikiIchiranKkOpKyUpdCC.getEkk1551d010Map()

This method serves as a **CBS message assembly utility** that constructs a `HashMap<String, String>` containing all fields required by the `EKK1551D010CBS` service. Its core business purpose is to gather order content codes, service contract identifiers, and option service contract lifecycle data from the request's temporary data store and parameter objects, then assemble them into a flat key-value map that downstream CBS (Component-Based Service) consumers can consume directly.

The method implements a **conditional routing pattern** based on the `sodShoriKbn` (SOD Processing Classification) parameter, which determines which order content code (`odr_naiyo_cd`) to emit. Three processing types are supported: **new registration** (Create), **cross-change** (Update/Wireless-Wired Change), and **cancellation** (DSL Cancellation) for the Multi-Function Router service. The method uses the **builder pattern** internally — it initializes an empty map, populates it field-by-field via sequential `put()` calls, and returns the fully assembled map.

The method is called exclusively from `JKKKikiIchiranKkOpKyUpdCC.execSodHakkoCreate()` (line 3685), meaning it is a **supporting method within the SOD (Service Order Data) creation workflow**. It does not perform any database queries or service component calls directly — instead, it reads pre-populated data from `temporaryData` (populated by earlier steps in the calling chain) and from `param.getData()` (the current screen/transaction's in-flight data).

**Note:** The method no longer branches on `shoriTgKikiOptSvcCd` (processing target option service code) — v7.00.05 removed the router-vs-VA discrimination. All three processing types (Create, Update, DSL) now follow the same post-order branch path, always extracting router post-change data (`KIKI_OPT_SVC_KEI_RUTAR_AF`). The VA (Value Add) path was moved to the separate `getEkk1551d010MapVa()` method (line 5518).

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["getEkk1551d010Map"])
    INIT["Create ekk1551d010Map HashMap"]
    GET_DATA["param.getData dataMapKey -> ccMsg"]
    INIT_VARS["Initialize: ekk2811a010Msg_af=null, ordNaiyoCd=empty, kkopSvcKeiNo_1=empty, etc."]

    START --> INIT
    INIT --> GET_DATA
    GET_DATA --> INIT_VARS

    COND["sodShoriKbn == SOD_SHORI_KBN_CREATE"]
    COND_UPD["sodShoriKbn == SOD_SHORI_KBN_UPDATE"]
    COND_DSL["sodShoriKbn == SOD_SHORI_KBN_DSL"]

    INIT_VARS --> COND

    BLOCK_CREATE["ordNaiyoCd = ODR_NAIYO_CD_402 = 402 FTTH Router Registration"]
    BLOCK_UPD["ordNaiyoCd = ODR_NAIYO_CD_418 = 418 FTTH Router Wireless Wired Change"]
    BLOCK_DSL["ordNaiyoCd = ODR_NAIYO_CD_405 = 405 FTTH Router Cancellation"]

    COND -- true --> BLOCK_CREATE
    COND -- false --> COND_UPD
    COND_UPD -- true --> BLOCK_UPD
    COND_UPD -- false --> COND_DSL
    COND_DSL -- true --> BLOCK_DSL
    COND_DSL -- false --> MERGE_1

    GET_AF["temporaryData.get KIKI_OPT_SVC_KEI_RUTAR_AF"]
    GET_KKOP1["getString KKOP_SVC_KEI_NO -> kkopSvcKeiNo_1"]
    GET_GADTM1["getString GENE_ADD_DTM -> kkoSvcKeiGadtm_1"]

    MERGE_1["Merge"]
    GET_AF --> GET_KKOP1
    GET_KKOP1 --> GET_GADTM1
    BLOCK_CREATE --> MERGE_1
    BLOCK_UPD --> MERGE_1
    BLOCK_DSL --> MERGE_1

    GET_SVC_LIST["temporaryData.get NET_SVC_KEI_UCWK_NO_HOJI_KEY -> svcKeiUcwkList"]

    GET_GADTM1 --> GET_SVC_LIST

    COND_SVC["svcKeiUcwkList != null AND size > 0"]

    GET_SVC_LIST --> COND_SVC

    BLOCK_SVC["Get first list item svcKeiUcwkNo = getString SVC_KEI_UCWK_NO svcUcwkNoGadtm = getString GENE_ADD_DTM"]

    COND_SVC -- true --> BLOCK_SVC
    COND_SVC -- false --> MERGE_2

    MERGE_2["Merge"]
    BLOCK_SVC --> MERGE_2

    MAP_PUT1["put ODR_NAIYO_CD ordNaiyoCd"]
    MAP_PUT2["put SVC_KEI_NO ccMsg get svc_kei_no"]
    MAP_PUT3["put KKOP_SVC_KEI_NO_1 kkopSvcKeiNo_1"]
    MAP_PUT4["put KKOSVKEI_GADTM_1 kkoSvcKeiGadtm_1"]
    MAP_PUT5["put CHBF_KKOSVKEI_GADTM_1 empty"]
    MAP_PUT6["put KKOP_SVC_KEI_NO_2 kkopSvcKeiNo_2"]
    MAP_PUT7["put KKOSVKEI_GADTM_2 kkoSvcKeiGadtm_2"]
    MAP_PUT8["put CHBF_KKOSVKEI_GADTM_2 empty"]
    MAP_PUT9["put SVC_KEI_UCWK_NO svcUcwkNo"]
    MAP_PUT10["put SVKEIUW_GADTM svcUcwkNoGadtm"]

    MERGE_2 --> MAP_PUT1
    MAP_PUT1 --> MAP_PUT2
    MAP_PUT2 --> MAP_PUT3
    MAP_PUT3 --> MAP_PUT4
    MAP_PUT4 --> MAP_PUT5
    MAP_PUT5 --> MAP_PUT6
    MAP_PUT6 --> MAP_PUT7
    MAP_PUT7 --> MAP_PUT8
    MAP_PUT8 --> MAP_PUT9
    MAP_PUT9 --> MAP_PUT10

    RETURN(["Return ekk1551d010Map"])
    MAP_PUT10 --> RETURN
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | Database session handle for the current user session. Provides the transactional context needed for any potential DB operations (not used directly in this method, but passed through for consistency with the calling chain). |
| 2 | `scCall` | `ServiceComponentRequestInvoker` | Service Component invocation bridge. Allows calling downstream CBS services (not used directly in this method; passed through as part of the standard method signature from `execSodHakkoCreate`). |
| 3 | `param` | `IRequestParameterReadWrite` | Request parameter object that holds in-flight screen data. Used to retrieve `ccMsg` (central communication message) via `getData(dataMapKey)`, which contains the current service contract number (`svc_kei_no`). |
| 4 | `dataMapKey` | `String` | Key used to look up the `ccMsg` HashMap within `param.getData()`. Identifies which data map within the request holds the current screen/transaction's core contract data. |
| 5 | `temporaryData` | `HashMap<String, Object>` | Shared data store populated across processing steps. Holds pre-loaded messages including: (a) router post-change option contract data (`KIKI_OPT_SVC_KEI_RUTAR_AF`), and (b) retained service contract internal detail list (`NET_SVC_KEI_UCWK_NO_HOJI_KEY`). |
| 6 | `sodShoriKbn` | `String` | SOD Processing Classification — determines the order operation type. Values: `"1"` = New Registration (Create), `"2"` = Cross-Change (Update), `"3"` = Cancellation (DSL). Drives which `odr_naiyo_cd` code is emitted and is the primary branching condition. |

**External state / instance fields read:** None. This method is purely stateless — it reads only from its parameters and local variables.

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `JBSbatDKNyukaFinAdd.getData` | JBSbatDKNyukaFinAdd | - | Calls `getData` in `JBSbatDKNyukaFinAdd` |
| R | `JBSbatFUCaseFileRnkData.getString` | JBSbatFUCaseFileRnkData | - | Calls `getString` in `JBSbatFUCaseFileRnkData` |
| R | `JBSbatFUMoveNaviData.getString` | JBSbatFUMoveNaviData | - | Calls `getString` in `JBSbatFUMoveNaviData` |
| R | `JBSbatZMAdDataSet.getString` | JBSbatZMAdDataSet | - | Calls `getString` in `JBSbatZMAdDataSet` |
| R | `JFUeoTelOpTransferCC.getData` | JFUeoTelOpTransferCC | - | Calls `getData` in `JFUeoTelOpTransferCC` |
| R | `JFUTransferCC.getData` | JFUTransferCC | - | Calls `getData` in `JFUTransferCC` |
| R | `JFUTransferListToListCC.getData` | JFUTransferListToListCC | - | Calls `getData` in `JFUTransferListToListCC` |
| R | `JESC0101B010TPMA.getString` | JESC0101B010TPMA | - | Calls `getString` in `JESC0101B010TPMA` |
| R | `JESC0101B020TPMA.getString` | JESC0101B020TPMA | - | Calls `getString` in `JESC0101B020TPMA` |
| R | `KKW12701SFLogic.getData` | KKW12701SFLogic | - | Calls `getData` in `KKW12701SFLogic` |

### Method-specific operations (within `getEkk1551d010Map`):

This method performs **no direct service component calls, database queries, or entity operations**. It operates purely on data already loaded into `temporaryData` and `param`. All reads are from in-memory HashMap lookups and `CAANMsg.getString()` calls on pre-fetched message objects.

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | CC:JKKKikiIchiranKkOpKyUpdCC.execSodHakkoCreate | `execSodHakkoCreate` (line 3685) -> `getEkk1551d010Map` | None (pure memory reads: `getString` x10, `getData` x1, `get` x3) |

**Caller context:** `execSodHakkoCreate` is called by screens `KKSV0004` (Order Information Creation — Router/VA Selection Screen), which handles the initial SOD creation flow where users select the processing type (Create / Update / Cancel). The call chain is:

```
KKSV0004 -> execSodHakkoCreate -> getEkk1551d010Map
```

**Terminal operations:** This method performs zero CRUD operations. All terminal operations are in-memory reads (`getString`, `getData`, `get` on HashMaps). The `SVC_KEI_UCWK_NO` and `SVKEIUW_GADTM` fields (Service Contract Internal Detail Number and Registration Timestamp) were added in v7.00.05 and sourced from `NET_SVC_KEI_UCWK_NO_HOJI_KEY`, which is populated by earlier processing steps (not within this method's scope).

## 6. Per-Branch Detail Blocks

**Block 1** — [METHOD INITIALIZATION] (L3799-3809)

> Initialize the result map, extract ccMsg from param, and declare local variables. The method creates an empty HashMap for output, retrieves the screen data map via `param.getData(dataMapKey)`, and initializes local variables for the router post-change message and service contract numbers.

| # | Type | Code |
|---|------|------|
| 1 | SET | `ekk1551d010Map = new HashMap<String, String>()` |
| 2 | EXEC | `ccMsg = (HashMap<String, Object>)param.getData(dataMapKey)` // Retrieve screen message data |
| 3 | SET | `ekk2811a010Msg_af = null` // Router post-change message reference |
| 4 | SET | `ordNaiyoCd = ""` |
| 5 | SET | `kkopSvcKeiNo_1 = ""` |
| 6 | SET | `kkoSvcKeiGadtm_1 = ""` |
| 7 | SET | `kkopSvcKeiNo_2 = ""` |
| 8 | SET | `kkoSvcKeiGadtm_2 = ""` |

**Block 2** — [IF / ELSE-IF / ELSE-IF] `(sodShoriKbn branch: order content code selection)` (L3860-3873)

> Based on the SOD processing classification (`sodShoriKbn`), determine the order content code (`ordNaiyoCd`). This is the primary branching point. Since v7.00.05, all three branches converge to the same data path — the `e2811a010Msg_af` retrieval always uses `KIKI_OPT_SVC_KEI_RUTAR_AF` (router post-change) regardless of the branch taken. The old code (commented out, L3813-3855) previously discriminated between router (`KIKI_OPT_SVC_CD_RUTAR`) and VA (`KIKI_OPT_SVC_CD_VA`) paths.

**Block 2.1** — [IF] `sodShoriKbn == SOD_SHORI_KBN_CREATE` `[SOD_SHORI_KBN_CREATE = "1"]` (L3860-3864)

> New registration for Multi-Function Router. Sets order content code to "402" (FTTH Router Registration). Also extracts router post-change option contract data from temporaryData (note: this assignment is overwritten at line 3875 by the unconditional fetch below).

| # | Type | Code |
|---|------|------|
| 1 | SET | `ordNaiyoCd = ODR_NAIYO_CD_402` `[-> ODR_NAIYO_CD_402 = "402"]` |
| 2 | SET | `e2811a010Msg_af = (CAANMsg)temporaryData.get(KIKI_OPT_SVC_KEI_RUTAR_AF)` `[-> KIKI_OPT_SVC_KEI_RUTAR_AF = "KIKI_OPT_SVC_KEI_RUTAR_AF"]` |

**Block 2.2** — [ELSE-IF] `sodShoriKbn == SOD_SHORI_KBN_UPDATE` `[SOD_SHORI_KBN_UPDATE = "2"]` (L3866-3868)

> Cross-change (wireless/wired change) for Multi-Function Router. Sets order content code to "418" (FTTH Router Wireless/Wired Change). Does not extract router data here — the data extraction is performed unconditionally after the if-else chain.

| # | Type | Code |
|---|------|------|
| 1 | SET | `ordNaiyoCd = ODR_NAIYO_CD_418` `[-> ODR_NAIYO_CD_418 = "418"]` |

**Block 2.3** — [ELSE-IF] `sodShoriKbn == SOD_SHORI_KBN_DSL` `[SOD_SHORI_KBN_DSL = "3"]` (L3870-3872)

> Cancellation for Multi-Function Router. Sets order content code to "405" (FTTH Router Cancellation). Does not extract router data here — the data extraction is performed unconditionally after the if-else chain.

| # | Type | Code |
|---|------|------|
| 1 | SET | `ordNaiyoCd = ODR_NAIYO_CD_405` `[-> ODR_NAIYO_CD_405 = "405"]` |

**Block 3** — [UNCONDITIONAL] (L3875-3877)

> After the if-else branches, always extract the router post-change option contract data. This is the same data path used regardless of which branch was taken. Retrieves the post-change message and extracts the option service contract number and generation registration timestamp.

| # | Type | Code |
|---|------|------|
| 1 | SET | `e2811a010Msg_af = (CAANMsg)temporaryData.get(KIKI_OPT_SVC_KEI_RUTAR_AF)` |
| 2 | SET | `kkopSvcKeiNo_1 = e2811a010Msg_af.getString(EKK2811A010CBSMsg1List.KKOP_SVC_KEI_NO)` |
| 3 | SET | `kkoSvcKeiGadtm_1 = e2811a010Msg_af.getString(EKK2811A010CBSMsg1List.GENE_ADD_DTM)` |

**Block 4** — [IF / ELSE] `(svcKeiUcwkList conditional: service contract internal detail data retrieval)` (L3881-3893)

> Attempt to retrieve retained service contract internal detail data from temporaryData. The list is loaded by earlier processing steps (not in this method). If the list is non-empty, extract the first entry's service contract internal detail number and registration timestamp. If the list is null or empty, the fields remain as empty strings.

**Block 4.1** — [IF] `svcKeiUcwkList != null && svcKeiUcwkList.size() > 0` (L3883-3892)

> Service contract internal detail list is available. Extract the first entry (index 0) and read its service contract internal detail number and generation registration timestamp.

| # | Type | Code |
|---|------|------|
| 1 | SET | `svcKeiUcwkList = (ArrayList<CAANMsg>)temporaryData.get(NET_SVC_KEI_UCWK_NO_HOJI_KEY)` `[-> NET_SVC_KEI_UCWK_NO_HOJI_KEY = "NET_SVC_KEI_UCWK_NO_HOJI_KEY"]` |
| 2 | SET | `svcUcwkNo = ""` |
| 3 | SET | `svcUcwkNoGadtm = ""` |
| 4 | SET | `ekk0161b004Msg = svcKeiUcwkList.get(0)` |
| 5 | SET | `svcUcwkNo = ekk0161b004Msg.getString(EKK0161B004CBSMsg1List.SVC_KEI_UCWK_NO)` |
| 6 | SET | `svcUcwkNoGadtm = ekk0161b004Msg.getString(EKK0161B004CBSMsg1List.GENE_ADD_DTM)` |

**Block 5** — [MAP BUILDING] (L3897-3913)

> Assemble the final CBS message map. All 10 fields are populated sequentially. The `kkopSvcKeiNo_2`, `kkoSvcKeiGadtm_2` fields are set from the (unused in this method) local variable initialized to `""` — these would only be populated if the old router-vs-VA discriminating code were active. The `chbf_kkosvkei_gadtm_1` and `chbf_kkosvkei_gadtm_2` fields (pre-change option contract registration timestamps) are always set to empty strings, serving as placeholder fields for future use or downstream consumption.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `ekk1551d010Map.put(EKK1551D010CBSMsg.ODR_NAIYO_CD, ordNaiyoCd)` | Order Content Code — set by the if-else branch |
| 2 | SET | `ekk1551d010Map.put(EKK1551D010CBSMsg.SVC_KEI_NO, (String)ccMsg.get("svc_kei_no"))` | Service Contract Number — from screen data |
| 3 | SET | `ekk1551d010Map.put(EKK1551D010CBSMsg.KKOP_SVC_KEI_NO_1, kkopSvcKeiNo_1)` | Option Service Contract Number 1 — router post-change |
| 4 | SET | `ekk1551d010Map.put(EKK1551D010CBSMsg.KKOSVKEI_GADTM_1, kkoSvcKeiGadtm_1)` | Option Service Contract Registration Timestamp 1 |
| 5 | SET | `ekk1551d010Map.put(EKK1551D010CBSMsg.CHBF_KKOSVKEI_GADTM_1, "")` | Pre-change Option Contract Registration Timestamp 1 (empty placeholder) |
| 6 | SET | `ekk1551d010Map.put(EKK1551D010CBSMsg.KKOP_SVC_KEI_NO_2, kkopSvcKeiNo_2)` | Option Service Contract Number 2 (empty — VA path removed) |
| 7 | SET | `ekk1551d010Map.put(EKK1551D010CBSMsg.KKOSVKEI_GADTM_2, kkoSvcKeiGadtm_2)` | Option Service Contract Registration Timestamp 2 (empty) |
| 8 | SET | `ekk1551d010Map.put(EKK1551D010CBSMsg.CHBF_KKOSVKEI_GADTM_2, "")` | Pre-change Option Contract Registration Timestamp 2 (empty placeholder) |
| 9 | SET | `ekk1551d010Map.put(EKK1551D010CBSMsg.SVC_KEI_UCWK_NO, svcUcwkNo)` | Service Contract Internal Detail Number (added v7.00.05) |
| 10 | SET | `ekk1551d010Map.put(EKK1551D010CBSMsg.SVKEIUW_GADTM, svcUcwkNoGadtm)` | Service Contract Internal Detail Registration Timestamp (added v7.00.05) |

**Block 6** — [RETURN] (L3915)

> Return the fully assembled CBS message map to the caller.

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

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `sod_shori_kbn` | Field | SOD Processing Classification — determines the operation type: "1" = Create (new registration), "2" = Update (cross-change), "3" = DSL (cancellation). Drives the primary branching logic. |
| `odr_naiyo_cd` | Field | Order Content Code — classifies the type of order being processed. Value "402" = FTTH Router Registration, "418" = FTTH Router Wireless/Wired Change, "405" = FTTH Router Cancellation. |
| `kkop_svc_kei_no` | Field | Option Service Contract Number — identifies a specific option service contract line item (e.g., router rental contract). |
| `gene_add_dtm` | Field | Generation Registration Timestamp — the datetime when the option service contract was originally registered/created. |
| `svc_kei_ucwk_no` | Field | Service Contract Internal Detail Number — internal tracking ID for service contract line items. Populated from retained data added in v7.00.05. |
| `svkeiuw_gadtm` | Field | Service Contract Internal Detail Generation Registration Timestamp — the datetime when the service contract internal detail was registered. Added in v7.00.05. |
| `kkosvkei_gadtm` | Field | Option Service Contract Generation Registration Timestamp — datetime of registration for the option service contract. |
| `chbf_kkosvkei_gadtm` | Field | Pre-change Option Contract Registration Timestamp — placeholder field for the option contract's registration timestamp before a change. Always empty in this method. |
| `net_svc_kei_ucwk_no_hoji_key` | Constant | Key string `"NET_SVC_KEI_UCWK_NO_HOJI_KEY"` used to retrieve the service contract internal detail data list from `temporaryData`. |
| `kiki_opt_svc_kei_rutar_af` | Constant | Key string `"KIKI_OPT_SVC_KEI_RUTAR_AF"` used to retrieve the router post-change option contract message from `temporaryData`. "AF" means "after update". |
| `SOD_SHORI_KBN_CREATE` | Constant | Value `"1"` — indicates a new SOD (Service Order Data) registration operation. |
| `SOD_SHORI_KBN_UPDATE` | Constant | Value `"2"` — indicates a cross-change SOD operation (e.g., wireless/wired plan change). |
| `SOD_SHORI_KBN_DSL` | Constant | Value `"3"` — indicates a DSL (cancellation) SOD operation. "DSL" here refers to the contract cancellation path, not necessarily DSL technology. |
| `ODR_NAIYO_CD_402` | Constant | Value `"402"` — Order Content Code for Multi-Function Router Setup/Change (Router Function · Registration). |
| `ODR_NAIYO_CD_418` | Constant | Value `"418"` — Order Content Code for Multi-Function Router Setup/Change (Router Function · Wireless/Wired Change). |
| `ODR_NAIYO_CD_405` | Constant | Value `"405"` — Order Content Code for Multi-Function Router Setup/Change (Router Function · Cancellation). |
| ODR | Acronym | Order — refers to service order records in the telecommunications billing/fulfillment system. |
| SOD | Acronym | Service Order Data — the core order fulfillment entity in the telecom OSS/BSS domain. |
| CBS | Acronym | Component-Based Service — the service layer that handles business logic and data access via service components. |
| CC | Acronym | Common Component — a shared utility/helper class used across multiple screens and business processes. |
| CAANMsg | Technical | CAAN Message — a message wrapper class used throughout the system for passing typed data between components. |
| SC | Acronym | Service Component — a fine-grained service module that handles a specific business operation (e.g., data retrieval, CRUD). |
| FTTH | Business term | Fiber To The Home — fiber-optic broadband internet service. The Multi-Function Router is the router device provisioned for FTTH service. |
| VA | Business term | Value Add — value-added service options that can be bundled with FTTH (e.g., security, backup, IPTV). Distinct from the router service. |
| `ccMsg` | Field | Central Communication Message — the HashMap containing current screen/transaction data, including the service contract number (`svc_kei_no`). |
| `kkop_svc_kei_no_1` / `kkop_svc_kei_no_2` | Field | Option Service Contract Numbers for two contract lines. In this method, only `_1` is populated (router post-change); `_2` is always empty since the VA path was moved to `getEkk1551d010MapVa()`. |
