# Business Logic — JKKKisnUwHmdkAddCC.execJKKHakkoSODCC() [67 LOC]

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

## 1. Role

### JKKKisnUwHmdkAddCC.execJKKHakkoSODCC()

This method assembles a complete Service Order Data (SOD) payload for a **home telephone number information change** business operation — specifically for FTTH (Fiber To The Home) service contract line item modifications where the home telephone number associated with a subscriber account needs updating. It acts as a **builder-delegation** pattern: constructing nested business data structures (SOD basic info, service contract info, service contract detail info) from a mixture of the caller's message context (`ccMsg`), an incoming CBS response message (`ekk0161Msg`), and an optional external timestamp parameter (`geneAddDtm`). Once assembled, the method delegates the actual order issuance to `JKKHakkoSODCC.hakkoSOD()`, which handles the downstream CBS invocation and persistence. This is a **shared utility method** called by `execKisnHeigo()` (a consolidation/integration CBS handler), serving as the bridge between the high-level business transaction flow and the SOD issuance engine. The method has one conditional branch: when `geneAddDtm` is null or empty, it falls back to reading the gene registration timestamp from the CBS message instead of using the explicitly provided value.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["execJKKHakkoSODCC"])
    STEP1["Set usertxt = JKKHakkoSODCC"]
    STEP2["param.setData usertxt, new HashMap"]
    STEP3["outMap = param.getData usertxt"]
    STEP4["datalist = new ArrayList"]
    STEP5["sod_map = new HashMap"]
    STEP6["sod_kihon_info = new HashMap"]
    STEP7["sod_kihon_info put SYSID from ccMsg"]
    STEP8["sod_kihon_info put INFO_IDO_DIV HTELNOINFOCHGE"]
    STEP9["svc_kei_info = new HashMap"]
    STEP10["svc_kei_info put SVC_KEI_NO from ccMsg"]
    STEP11["svc_kei_ucwk_info = new HashMap"]
    STEP12["svc_kei_ucwk_info put SVC_KEI_UCWK_NO from ekk0161Msg"]
    STEP13["svc_kei_ucwk_info put INFO_CHBF_GENE_ADD_DTM from ekk0161Msg"]
    COND1{"geneAddDtm == null or empty?"}
    STEP14A["Use ekk0161Msg GENE_ADD_DTM"]
    STEP14B["Use geneAddDtm param"]
    STEP15["sod_map put SOD_KIHON_INFO sod_kihon_info"]
    STEP16["sod_map put SVC_KEI_INFO svc_kei_info"]
    STEP17["sod_map put SVC_KEI_UCWK_INFO svc_kei_ucwk_info"]
    STEP18["datalist add sod_map"]
    STEP19["outMap put FUNC_CODE from ccMsg"]
    STEP20["outMap put TRGT_DATA_LIST datalist"]
    STEP21["new JKKHakkoSODCC"]
    STEP22["hakkoSOD handle, param, usertxt"]
    END(["Return void"])

    START --> STEP1 --> STEP2 --> STEP3 --> STEP4 --> STEP5 --> STEP6 --> STEP7 --> STEP8 --> STEP9 --> STEP10 --> STEP11 --> STEP12 --> STEP13 --> COND1
    COND1 -->|true| STEP14A --> STEP15
    COND1 -->|false| STEP14B --> STEP15
    STEP15 --> STEP16 --> STEP17 --> STEP18 --> STEP19 --> STEP20 --> STEP21 --> STEP22 --> END
```

**Constant Resolution:**

| Constant | Actual Value | Business Meaning |
|----------|-------------|------------------|
| `JKKHakkoSODConstCC.SYSID` | `"sysid"` | SOD system ID — identifies the issuing system |
| `JKKHakkoSODConstCC.INFO_IDO_DIV` | `"ido_div"` | Movement classification — distinguishes type of order change |
| `JKKSvcConst.IDO_DIV_HTELNOINFOCHGE` | `"00048"` | Home Telephone Number Information Change — the specific movement type this method handles |
| `JKKHakkoSODConstCC.SVC_KEI_NO` | `"svc_kei_no"` | Service contract number |
| `JKKHakkoSODConstCC.SVC_KEI_UCWK_NO` | `"svc_kei_ucwk_no"` | Service contract detail number |
| `JKKHakkoSODConstCC.INFO_CHBF_SVC_KEI_UCWK_GENE_ADD_DTM` | `"chbf_svc_kei_ucwk_gene_add_dtm"` | Pre-change service contract detail gene registration timestamp |
| `JKKHakkoSODConstCC.INFO_CHAF_SVC_KEI_UCWK_GENE_ADD_DTM` | `"chaf_svc_kei_ucwk_gene_add_dtm"` | Post-change service contract detail gene registration timestamp |
| `JKKHakkoSODConstCC.SOD_KIHON_INFO` | `"sod_kihon_info"` | SOD basic information map key |
| `JKKHakkoSODConstCC.SVC_KEI_INFO` | `"svc_kei_info"` | Service contract information map key |
| `JKKHakkoSODConstCC.SVC_KEI_UCWK_INFO` | `"svc_kei_ucwk_info"` | Service contract detail information map key |
| `JKKHakkoSODConstCC.TRGT_DATA_LIST` | `"trgt_data_list"` | Target data list — the container passed to hakkoSOD |
| `JCMConstants.FUNC_CODE_KEY` | `"func_code"` | Function code key for routing the service request |

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | Database session handle used for transaction management and persistence operations during the SOD issuance process |
| 2 | `param` | `IRequestParameterReadWrite` | Request parameter carrier — acts as a shared data context where the assembled SOD payload is stored via `setData`/`getData` for downstream consumption by `hakkoSOD` |
| 3 | `ccMsg` | `HashMap<String, Object>` | Custom control message carrying the caller-provided business data, including `sysid` (system identifier) and `svc_kei_no` (service contract number). This is the primary input source for static contract metadata |
| 4 | `ekk0161Msg` | `CAANMsg` | CBS response message from the EKK0161A010CBS (Home Telephone Number Info Change CBS) — provides the service contract detail number (`svc_kei_ucwk_no`) and the original gene registration timestamp (`gene_add_dtm`) for change-before tracking |
| 5 | `geneAddDtm` | `String` | Optional externally-supplied gene registration timestamp representing the post-change record creation date. If null or empty, the method falls back to using the timestamp from `ekk0161Msg`. This enables callers to override the timestamp when performing cross-service coordination (e.g., when a new gene record should be generated at a specific time) |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `JBSbatAKKshkmRsltInfoTukiawsday.setData` | - | - | Calls `setData` in `JBSbatAKKshkmRsltInfoTukiawsday` (passed via `param`) |
| - | `JBSbatAKKshkmRsltInfoTukiaws.setData` | - | - | Calls `setData` in `JBSbatAKKshkmRsltInfoTukiaws` (passed via `param`) |
| - | `JBSbatAKKshkmRsltInfoTukiawsRealSkh.setData` | - | - | Calls `setData` in `JBSbatAKKshkmRsltInfoTukiawsRealSkh` (passed via `param`) |
| - | `JBSbatAKKshkmRsltInfTkCvsNCnsl.setData` | - | - | Calls `setData` in `JBSbatAKKshkmRsltInfTkCvsNCnsl` (passed via `param`) |
| - | `JBSbatDKNyukaFinAdd.setData` | - | - | Calls `setData` in `JBSbatDKNyukaFinAdd` (passed via `param`) |
| R | `JBSbatDKNyukaFinAdd.getData` | - | - | Calls `getData` in `JBSbatDKNyukaFinAdd` (passed via `param`) |
| R | `JBSbatFUCaseFileRnkData.getString` | - | - | Calls `getString` in `JBSbatFUCaseFileRnkData` (passed via `param`) |
| R | `JBSbatFUMoveNaviData.getString` | - | - | Calls `getString` in `JBSbatFUMoveNaviData` (passed via `param`) |
| - | `JBSbatKKGetCTITelno.setData` | - | - | Calls `setData` in `JBSbatKKGetCTITelno` (passed via `param`) |
| R | `JBSbatZMAdDataSet.getString` | - | - | Calls `getString` in `JBSbatZMAdDataSet` (passed via `param`) |
| R | `JFUeoTelOpTransferCC.getData` | - | - | Calls `getData` in `JFUeoTelOpTransferCC` (passed via `param`) |
| R | `JFUTransferCC.getData` | - | - | Calls `getData` in `JFUTransferCC` (passed via `param`) |
| R | `JFUTransferListToListCC.getData` | - | - | Calls `getData` in `JFUTransferListToListCC` (passed via `param`) |
| C | `JKKHakkoSODCC.hakkoSOD` | JKKHakkoSODCC | SOD issuance | Issues the Service Order Data (SOD) — the primary CREATE operation that triggers CBS order processing |
| R | `JESC0101B010TPMA.getString` | - | - | Calls `getString` in `JESC0101B010TPMA` (passed via `param`) |
| R | `JESC0101B020TPMA.getString` | - | - | Calls `getString` in `JESC0101B020TPMA` (passed via `param`) |
| R | `KKW12701SFLogic.getData` | - | - | Calls `getData` in `KKW12701SFLogic` (passed via `param`) |

**Direct operations within this method:**

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| EXEC | `IRequestParameterReadWrite.setData` | - | - | Creates a new HashMap as the target data container keyed by `usertxt` ("JKKHakkoSODCC") in the request parameter |
| EXEC | `IRequestParameterReadWrite.getData` | - | - | Retrieves the HashMap stored under `usertxt` to serve as the output map (`outMap`) |
| R | `ccMsg.get("sysid")` | - | - | Reads the system ID from the caller's custom control message |
| R | `ccMsg.get("svc_kei_no")` | - | - | Reads the service contract number from the caller's custom control message |
| R | `ekk0161Msg.getString(SVC_KEI_UCWK_NO)` | EKK0161A010CBS | - | Reads the service contract detail number from the CBS response message |
| R | `ekk0161Msg.getString(GENE_ADD_DTM)` | EKK0161A010CBS | - | Reads the gene registration timestamp from the CBS response message (pre-change backup) |
| C | `JKKHakkoSODCC.hakkoSOD` | JKKHakkoSODCC | SOD tables | Creates and issues the Service Order — delegates to the SOD issuance engine with the assembled payload |

**CRUD Classification:**
- **C** (Create): `hakkoSOD` — the core SOD issuance operation that creates service order records in the CBS system
- **EXEC** (Execute/Transform): `param.setData` / `param.getData` — data preparation and retrieval; these manipulate in-memory data structures within the request parameter context
- **R** (Read): `ccMsg.get()` / `ekk0161Msg.getString()` — reads input values from the caller's message and the CBS response

## 5. Dependency Trace

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

No screen/batch entry points found within 8 hops. Direct callers found: 1 methods.
Terminal operations from this method: `hakkoSOD` [-], `setData` [-], `setData` [-], `setData` [-], `setData` [-], `getData` [-], `getString` [-], `getString` [-], `getString` [-], `getString` [-], `getString` [-], `getString` [-], `getString` [-], `getString` [-], `getString` [-], `getString` [-], `getData` [-], `getData` [-], `getData` [-]

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | CBS: `JKKKisnUwHmdkAddCC.execKisnHeigo` | `execKisnHeigo` -> `execJKKHakkoSODCC` | `hakkoSOD [C] SOD issuance, `setData` [EXEC] target data list, `getString` [R] CBS message fields |

**Notes:**
- `JKKKisnUwHmdkAddCC.execKisnHeigo()` is a consolidation/integration CBS handler that processes combined service order operations. It invokes `execJKKHakkoSODCC()` to issue an SOD for the home telephone number information change portion of a consolidated transaction.
- No direct screen entry points are found within 8 hops — this method is exclusively called from CBS-level consolidation logic.

## 6. Per-Branch Detail Blocks

**Block 1** — [SET/INIT] `(L2149)`

Initialize the user context and output data container.

| # | Type | Code |
|---|------|------|
| 1 | SET | `usertxt = "JKKHakkoSODCC"` // User identifier for the SOD issuance context |
| 2 | EXEC | `param.setData(usertxt, new HashMap<String, Object>())` // Creates a new HashMap target data container in param keyed by usertxt // [-> usertxt="JKKHakkoSODCC"] |
| 3 | EXEC | `outMap = (HashMap<String, Object>)param.getData(usertxt)` // Retrieves the HashMap just stored, used as the output carrier for SOD payload and function code |

**Block 2** — [SET/INIT] `(L2154-2158)`

Initialize SOD data structures for the target data list and the SOD map hierarchy.

| # | Type | Code |
|---|------|------|
| 1 | SET | `datalist = new ArrayList()` // Target data list — holds the assembled SOD maps // [-> TRGT_DATA_LIST="trgt_data_list"] |
| 2 | SET | `sod_map = new HashMap<String, Object>()` // SOD map — aggregates sod_kihon_info, svc_kei_info, svc_kei_ucwk_info |
| 3 | SET | `sod_kihon_info = new HashMap<String, Object>()` // SOD basic information map |

**Block 3** — [SET] `(L2160-2163)`

Set SOD basic information: system ID and movement classification.

| # | Type | Code |
|---|------|------|
| 1 | SET | `sod_kihon_info.put(JKKHakkoSODConstCC.SYSID, ccMsg.get("sysid"))` // Sets the system ID from ccMsg // [-> SYSID="sysid"] |
| 2 | SET | `sod_kihon_info.put(JKKHakkoSODConstCC.INFO_IDO_DIV, JKKSvcConst.IDO_DIV_HTELNOINFOCHGE)` // Sets the movement classification to Home Telephone Number Info Change // [-> INFO_IDO_DIV="ido_div", IDO_DIV_HTELNOINFOCHGE="00048"] |

**Block 4** — [SET/INIT] `(L2166-2168)`

Initialize service contract info and set the service contract number.

| # | Type | Code |
|---|------|------|
| 1 | SET | `svc_kei_info = new HashMap<String, Object>()` // Service contract information map |
| 2 | SET | `svc_kei_info.put(JKKHakkoSODConstCC.SVC_KEI_NO, ccMsg.get("svc_kei_no"))` // Sets the service contract number from ccMsg // [-> SVC_KEI_NO="svc_kei_no"] |

**Block 5** — [SET/INIT] `(L2171-2174)`

Initialize service contract detail info and populate change-before fields.

| # | Type | Code |
|---|------|------|
| 1 | SET | `svc_kei_ucwk_info = new HashMap<String, Object>()` // Service contract detail information map |
| 2 | SET | `svc_kei_ucwk_info.put(JKKHakkoSODConstCC.SVC_KEI_UCWK_NO, ekk0161Msg.getString(EKK0161A010CBSMsg1List.SVC_KEI_UCWK_NO))` // Reads service contract detail number from CBS response // [-> SVC_KEI_UCWK_NO="svc_kei_ucwk_no"] |
| 3 | SET | `svc_kei_ucwk_info.put(JKKHakkoSODConstCC.INFO_CHBF_SVC_KEI_UCWK_GENE_ADD_DTM, ekk0161Msg.getString(EKK0161A010CBSMsg1List.GENE_ADD_DTM))` // Sets pre-change gene registration timestamp from CBS response // [-> INFO_CHBF_SVC_KEI_UCWK_GENE_ADD_DTM="chbf_svc_kei_ucwk_gene_add_dtm"] |

**Block 6** — [IF/ELSE] `(geneAddDtm == null || "".equals(geneAddDtm))` `(L2175)`

Determine the post-change gene registration timestamp. If the caller did not provide a non-empty timestamp, fall back to the CBS response value.

> Business purpose: The post-change gene registration timestamp (INFO_CHAF_SVC_KEI_UCWK_GENE_ADD_DTM) determines when the new version of the service contract detail record is created. When called as part of a single-service operation, the CBS message timestamp is used. When called from a consolidated operation, the caller may supply an override timestamp to synchronize the gene record across multiple services.

**Block 6.1** — [IF] `(geneAddDtm == null || "".equals(geneAddDtm))` `(L2175)`

When `geneAddDtm` is null or empty — use the CBS message timestamp.

| # | Type | Code |
|---|------|------|
| 1 | SET | `svc_kei_ucwk_info.put(JKKHakkoSODConstCC.INFO_CHAF_SVC_KEI_UCWK_GENE_ADD_DTM, ekk0161Msg.getString(EKK0161A010CBSMsg1List.GENE_ADD_DTM))` // Post-change gene timestamp from CBS response (fallback) // [-> INFO_CHAF_SVC_KEI_UCWK_GENE_ADD_DTM="chaf_svc_kei_ucwk_gene_add_dtm"] |

**Block 6.2** — [ELSE] `(else)` `(L2178)`

When `geneAddDtm` has a non-empty value — use the caller-supplied timestamp.

| # | Type | Code |
|---|------|------|
| 1 | SET | `svc_kei_ucwk_info.put(JKKHakkoSODConstCC.INFO_CHAF_SVC_KEI_UCWK_GENE_ADD_DTM, geneAddDtm)` // Post-change gene timestamp from parameter override // [-> INFO_CHAF_SVC_KEI_UCWK_GENE_ADD_DTM="chaf_svc_kei_ucwk_gene_add_dtm"] |

**Block 7** — [SET] `(L2183-2188)`

Assemble the SOD map by nesting the three sub-maps (basic info, service contract info, service contract detail info) and add it to the target data list.

| # | Type | Code |
|---|------|------|
| 1 | SET | `sod_map.put(JKKHakkoSODConstCC.SOD_KIHON_INFO, sod_kihon_info)` // Nest basic info // [-> SOD_KIHON_INFO="sod_kihon_info"] |
| 2 | SET | `sod_map.put(JKKHakkoSODConstCC.SVC_KEI_INFO, svc_kei_info)` // Nest service contract info // [-> SVC_KEI_INFO="svc_kei_info"] |
| 3 | SET | `sod_map.put(JKKHakkoSODConstCC.SVC_KEI_UCWK_INFO, svc_kei_ucwk_info)` // Nest service contract detail info // [-> SVC_KEI_UCWK_INFO="svc_kei_ucwk_info"] |
| 4 | SET | `datalist.add(sod_map)` // Add the assembled SOD map to the target data list |

**Block 8** — [SET] `(L2190-2192)`

Set the function code and target data list into the output map, then delegate to SOD issuance.

| # | Type | Code |
|---|------|------|
| 1 | SET | `outMap.put(JCMConstants.FUNC_CODE_KEY, (String)ccMsg.get("func_code"))` // Sets the function code for SOD routing // [-> FUNC_CODE_KEY="func_code"] |
| 2 | SET | `outMap.put(JKKHakkoSODConstCC.TRGT_DATA_LIST, datalist)` // Sets the target data list containing the assembled SOD // [-> TRGT_DATA_LIST="trgt_data_list"] |
| 3 | SET | `jkkHakkosod = new JKKHakkoSODCC()` // Instantiates the SOD issuance controller |
| 4 | CALL | `jkkHakkosod.hakkoSOD(handle, param, usertxt)` // Issues the SOD — delegates to the SOD issuance engine // [-> hakkoSOD creates SOD records in CBS] |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `sod_kihon_info` | Field | SOD basic information — the root-level map containing system ID and movement classification for the service order |
| `svc_kei_info` | Field | Service contract information — contains the service contract number (e.g., `svc_kei_no`) |
| `svc_kei_ucwk_info` | Field | Service contract detail information — contains the contract detail number and gene registration timestamps for change-before/after tracking |
| `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 specific service contract detail record (change line item) |
| `gene_add_dtm` | Field | Gene registration date-time — the timestamp when a record was created/registered in the system; used for version tracking in service contract changes |
| `chbf_svc_kei_ucwk_gene_add_dtm` | Field | Pre-change service contract detail gene registration timestamp — when the original (before-change) record was created |
| `chaf_svc_kei_ucwk_gene_add_dtm` | Field | Post-change service contract detail gene registration timestamp — when the new (after-change) record is created; source may be parameter override or CBS fallback |
| `ido_div` | Field | Movement classification — a code that specifies the type of order change being performed |
| `ido_div_htelnoinfochg` | Constant | Home Telephone Number Information Change — movement type code "00048", indicating a telephone number update for a FTTH subscriber |
| `sysid` | Field | System ID — identifies the originating system component that created the SOD |
| SOD | Acronym | Service Order Data — the central telecom order fulfillment entity that carries service contract change instructions to the CBS system |
| SOD issuance | Business term | The process of creating and submitting a Service Order Data record to trigger CBS order processing |
| CBS | Acronym | Central Business System — the core telecom billing and provisioning system |
| EKK0161A010CBS | SC | Home Telephone Number Information Change CBS — the CBS service component that handles telephone number updates for FTTH service contracts |
| `func_code` | Field | Function code — determines the specific business operation/function to be executed by the downstream SOD engine |
| `trgt_data_list` | Field | Target data list — the container that holds the assembled SOD payload maps, passed to `hakkoSOD` for issuance |
| FTTH | Business term | Fiber To The Home — fiber-optic broadband internet service |
| `hakkoSOD` | Method | SOD issuance method — the core method in `JKKHakkoSODCC` that processes and persists the Service Order Data |
| `execKisnHeigo` | Method | Consolidation/integration processing — the parent CBS handler that combines multiple service changes into a single transaction and calls `execJKKHakkoSODCC` for the SOD issuance step |
| `usertxt` | Local var | User text — an internal identifier ("JKKHakkoSODCC") used as a key to store/retrieve the SOD payload in the parameter context |
