# Business Logic — JKKKikiDslAddCC.addSOD() [409 LOC]

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

## 1. Role

### JKKKikiDslAddCC.addSOD()

The `addSOD` method performs Service Order Data (SOD) registration for multi-function router-related order operations in the K-Opticom customer core system. Its primary responsibility is to register order issuance conditions (オーダ発行条件) and order information creation work (オーダ情報作成ワーク) into the system's order processing pipeline. The method follows a dispatch/routing design pattern, accepting an `orderNaiyoCd` parameter that determines which router service operation to process: router connection disconnection (149), router connection deletion (150), multi-function router setup/change (405), multi-function router return/disconnect (423), or multi-function router return/delete (424). For each branch, the method first gathers supplementary data from upstream service contracts — including service contract agreement lookup (EKK0081A010), optional service contract flowline agreement lookup (EKK0251A010), and multi-function specific device operation contract lookups (EKK2811B504, EKK2811A010) — then resets and re-populates a work map with operation-specific codes, and finally delegates to two downstream services: `executeOdrHakkoJokenAdd` (order issuance condition registration) and `executeOdrInfoSakseiWkAdd` (order information work creation). This method is a shared common component called exclusively by `JKKKikiDslAddCC.addKikiDsl()` when processing device disregistration scenarios for router services.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["addSOD method entry"])

    START --> INIT["Initialize ServiceComponentRequestInvoker"]
    INIT --> CHECK_MAP["inMap != null ?"]

    CHECK_MAP -->|null| END_RETURN["Return param"]
    CHECK_MAP -->|not null| GET_DATE["JCCBPCommon.getBatOpeDate()"]

    GET_DATE --> GET_SVC_NO["Get svc_kei_no_cc from inParamMap"]
    GET_SVC_NO --> CALL_EKK0081["callSC EKK0081A010<br/>Service Contract Agreement Lookup"]
    CALL_EKK0081 --> GET_GADTM["Get svckeiGenAddDtm"]

    GET_GADTM --> CHECK_KAISEN["svc_kei_kaisen_ucwk_no != null ?"]
    CHECK_KAISEN -->|null| GET_KKTK_SVC["Get kktk_svc_cd_cc"]
    CHECK_KAISEN -->|has value| CALL_EKK0251["callSC EKK0251A010<br/>Service Contract Flowline Agreement Lookup"]
    CALL_EKK0251 --> GET_KAISEN_DTM["Get kaisenUcwkGenAddDtm"]
    GET_KAISEN_DTM --> GET_KKTK_SVC

    GET_KKTK_SVC --> CHECK_C024{C024 check}
    CHECK_C024 -->|no| MAP_RESET["Map reset processing"]
    CHECK_C024 -->|yes| CALL_EKK2811B["callSC EKK2811B504<br/>Device Operation SC Agreement Lookup"]

    CALL_EKK2811B --> LOOP_START["Loop over results"]
    LOOP_START --> CHECK_G01{G01 check}
    CHECK_G01 -->|yes| CALL_EKK2811A_NET["callSC EKK2811A010 Net"]
    CHECK_G01 -->|no| CHECK_G02{G02 check}
    CHECK_G02 -->|yes| CALL_EKK2811A_TEL["callSC EKK2811A010 Tel"]
    CHECK_G02 -->|no| LOOP_NEXT["Next iteration"]
    CALL_EKK2811A_NET --> LOOP_NEXT
    CALL_EKK2811A_TEL --> LOOP_NEXT
    LOOP_NEXT --> LOOP_END["End of loop"]
    LOOP_END --> MAP_RESET

    MAP_RESET --> CHECK_149{149 check}
    CHECK_149 -->|yes| BLOCK_149_SETUP["Set workmap router disconnect"]
    CHECK_149 -->|no| CHECK_150{150 check}

    BLOCK_149_SETUP --> BLOCK_149_EXEC["executeOdrHakkoJokenAdd 1"]
    BLOCK_149_EXEC --> BLOCK_149_WORK["get trnDataMap from param"]
    BLOCK_149_WORK --> BLOCK_149_WORKMAP["Set workmap with issued order data"]
    BLOCK_149_WORKMAP --> BLOCK_149_EXEC2["executeOdrInfoSakseiWkAdd 2"]
    BLOCK_149_EXEC2 --> END_RETURN

    CHECK_150 -->|yes| BLOCK_150_SETUP["Set workmap router deletion"]
    CHECK_150 -->|no| CHECK_405{405 check}

    BLOCK_150_SETUP --> BLOCK_150_EXEC["executeOdrHakkoJokenAdd 1"]
    BLOCK_150_EXEC --> BLOCK_150_WORK["get trnDataMap from param"]
    BLOCK_150_WORK --> BLOCK_150_WORKMAP["Set workmap with issued order data"]
    BLOCK_150_WORKMAP --> BLOCK_150_EXEC2["executeOdrInfoSakseiWkAdd 2"]
    BLOCK_150_EXEC2 --> END_RETURN

    CHECK_405 -->|yes| BLOCK_405_SETUP["Set workmap multi-func router setup change"]
    BLOCK_405_SETUP --> BLOCK_405_EXEC["executeOdrHakkoJokenAdd 1"]
    BLOCK_405_EXEC --> BLOCK_405_WORK["get trnDataMap from param"]
    BLOCK_405_WORK --> BLOCK_405_WORKMAP["Set workmap with issued order data"]
    BLOCK_405_WORKMAP --> BLOCK_405_EXEC2["executeOdrInfoSakseiWkAdd 2"]
    BLOCK_405_EXEC2 --> END_RETURN

    CHECK_405 -->|no| CHECK_423{423 check}
    CHECK_423 -->|yes| BLOCK_423_SETUP["Set workmap multi-func router return disconnect"]
    BLOCK_423_SETUP --> BLOCK_423_EXEC["executeOdrHakkoJokenAdd 1"]
    BLOCK_423_EXEC --> BLOCK_423_WORK["get trnDataMap from param"]
    BLOCK_423_WORK --> BLOCK_423_WORKMAP["Set workmap with issued order data"]
    BLOCK_423_WORKMAP --> BLOCK_423_EXEC2["executeOdrInfoSakseiWkAdd 2"]
    BLOCK_423_EXEC2 --> END_RETURN

    CHECK_423 -->|no| CHECK_424{424 check}
    CHECK_424 -->|yes| BLOCK_424_SETUP["Set workmap multi-func router return delete"]
    BLOCK_424_SETUP --> BLOCK_424_EXEC["executeOdrHakkoJokenAdd 1"]
    BLOCK_424_EXEC --> BLOCK_424_WORK["get trnDataMap from param"]
    BLOCK_424_WORK --> BLOCK_424_WORKMAP["Set workmap with issued order data"]
    BLOCK_424_WORKMAP --> BLOCK_424_EXEC2["executeOdrInfoSakseiWkAdd 2"]
    BLOCK_424_EXEC2 --> END_RETURN

    CHECK_424 -->|no| NO_CASE["No matching order type"]
    NO_CASE --> END_RETURN
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | Session manager handle carrying database connection, transaction context, and security information for the current business operation |
| 2 | `param` | `IRequestParameterReadWrite` | Model group and control map container — holds the SOD work map (key: `HakkoSODCCWORK`) and provides `getData()`/`setData()` for passing work state between processing stages. Returned as the result containing updated data |
| 3 | `orderNaiyoCd` | `String` | Order content code that triggers different service registration branches. Valid values: `"149"` (router connection info disconnection), `"150"` (router connection info deletion), `"405"` (multi-function router setup/change), `"423"` (multi-function router return/disconnect), `"424"` (multi-function router return/delete) |
| 4 | `inParamMap` | `HashMap<String, Object>` | Input parameter map carrying business data from the caller — includes `svc_kei_no_cc` (service contract number), `svc_kei_kaisen_ucwk_no_cc` (service contract flowline internal work number), `kktk_svc_cd_cc` (device provision service code), `kktk_svc_kei_no_cc` (device provision service contract number), `taknkiki_model_cd` (home device model code), `kiki_seizo_no` (device serial number), `svc_kei_no` (service contract number), and `kktsvkei_gadtm` (device provision service contract generation registration datetime) |
| 5 | `fixedText` | `String` | Text identifier used as a key to retrieve user data from the `param` object. In practice, `fixedText` is `"HakkoSODCCWORK"` (from `HAKKOSODCCWORKMAP` constant), used to fetch the work map for SOD processing |

**Instance fields read:**
| No | Field Name | Type | Business Description |
|----|-----------|------|---------------------|
| 1 | `same_trn_no` | `String` | Same processing number — an internal transaction tracking identifier set by the caller (`addKikiDsl`) when OLS function is present, used to ensure atomicity across multiple SOD registrations |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `callSC(handle, scCall, param, fixedText, inMsg)` | EKK0081A010 | KK_T_SVC_KEI (Service Contract table) | Calls EKK0081A010 — Service Contract Agreement Lookup to retrieve the service contract generation registration datetime (GENE_ADD_DTM). Uses func_code "2" (single lookup) |
| R | `callSC(handle, scCall, param, fixedText, inMsg)` | EKK0251A010 | KK_T_SVC_KEI_UCWK (Service Contract Internal Work table) | Calls EKK0251A010 — Service Contract Flowline Agreement Lookup to retrieve the flowline agreement generation registration datetime. Only executed when svc_kei_kaisen_ucwk_no is present |
| R | `callSC(handle, scCall, param, fixedText, inMsg)` | EKK2811B504 | KK_T_KKOP_SVC_KEI (Device Operation Service Contract table) | Calls EKK2811B504 — Device Operation Service Contract Agreement Lookup (combined search). Retrieves multiple device operation service contracts for multi-function router (C024). Iterates results to identify G01 (router function) and G02 (telephone adapter function) |
| R | `callSC(handle, scCall, param, fixedText, inMsg)` | EKK2811A010 | KK_T_KKOP_SVC_KEI (Device Operation Service Contract table) | Calls EKK2811A010 — Device Operation Service Contract Agreement Lookup (single lookup). Used to get the latest generation registration datetime for both the router function (G01) and telephone adapter function (G02). Uses func_code "2" |
| C | `JKKKikiDslAddCC.executeOdrHakkoJokenAdd` | EKK1081D010CBS | KK_T_ODR_HAKKO_JOKEN (Order Issuance Condition table) | Order issuance condition registration — prepares input via `editInMsg_EKK1081D010CBS`, executes via `ServiceComponentRequestInvoker.run()`, and processes results via `editResultRP_EKK1081D010CBS`. Inserts a new order issuance condition record and returns the generated `odr_hakko_joken_no` |
| C | `JKKKikiDslAddCC.executeOdrInfoSakseiWkAdd` | EKK1551D010CBS | KK_T_ODR_INFO_SAKSEI_WK (Order Information Creation Work table) | Order information creation work registration — prepares input via `editInMsg_EKK1551D010CBS`, executes via `ServiceComponentRequestInvoker.run()`, and processes results via `editResultRP_EKK1551D010CBS`. Inserts a new order information creation work record |

## 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: `getData` [R], `getData` [R], `getString` [R], `getString` [R], `getString` [R], `getString` [R], `run` [C], `run` [C], `run` [R], `setData` [-], `setData` [-]

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | CC:JKKKikiDslAddCC.addKikiDsl | `JKKKikiDslAddCC.addKikiDsl` -> `addSOD(handle, param, orderNaiyoCd, inMap, fixedText)` | `executeOdrHakkoJokenAdd [C] KK_T_ODR_HAKKO_JOKEN`, `executeOdrInfoSakseiWkAdd [C] KK_T_ODR_INFO_SAKSEI_WK`, `callSC EKK0081A010 [R] KK_T_SVC_KEI`, `callSC EKK0251A010 [R] KK_T_SVC_KEI_UCWK`, `callSC EKK2811B504 [R] KK_T_KKOP_SVC_KEI`, `callSC EKK2811A010 [R] KK_T_KKOP_SVC_KEI` |

**Call Context:** `addKikiDsl` is the device disregistration common component. When processing router service disregistration (for non-C024 devices), it calls `addSOD` with orderNaiyoCd `"149"` (router connection disconnection) and `"150"` (router deletion). For C024 multi-function router devices, it calls `addSOD` with `"405"` (setup/change), `"423"` (return/disconnect), or `"424"` (return/delete) based on device status.

## 6. Per-Branch Detail Blocks

**Block 1** — [IF] `inMap != null` (L~322)

> The method first retrieves the work map. If null, it skips all processing and returns immediately.

| # | Type | Code |
|---|------|------|
| 1 | SET | `HashMap inMap = (HashMap)param.getData(JKKHakkoSODConstCC.HAKKOSODCCWORKMAP)` // `HAKKOSODCCWORKMAP = "HakkoSODCCWORK"` — retrieves SOD work map |
| 2 | SET | `ServiceComponentRequestInvoker scCall = new ServiceComponentRequestInvoker()` |
| 3 | IF | `null != inMap` — checks if work map exists; if null, jumps to Block 9 (return) |

**Block 1.1** — [nested inside IF: inMap is not null] (L~326)

> Batch operation date acquisition and supplementary data gathering.

| # | Type | Code |
|---|------|------|
| 1 | SET | `String opeDate = JCCBPCommon.getBatOpeDate(null)` // Batch operation date |
| 2 | SET | `String svcKeiNo = (String)inParamMap.get("svc_kei_no_cc")` // Service contract number |
| 3 | SET | `Object[][] ekk0081a010InMsg = {{TEMPLATE_ID_EKK0081A010, "EKK0081A010"}, {FUNC_CODE, "2"}, {KEY_SVC_KEI_NO, svcKeiNo}, {KEY_RSV_APLY_YMD, opeDate}}` // SC input message |
| 4 | CALL | `callSC(handle, scCall, param, fixedText, ekk0081a010InMsg).getCAANMsgList(EKK0081A010CBSMsg.EKK0081A010CBSMSG1LIST)` // SC: Service Contract Agreement Lookup |
| 5 | SET | `CAANMsg svcKeiMsg = ekk0081a010outMsg[0]` |
| 6 | SET | `String svckeiGenAddDtm = svcKeiMsg.getString(EKK0081A010CBSMsg1List.GENE_ADD_DTM)` // Service contract generation registration datetime |

**Block 1.2** — [IF] `svcKeiKaisenUcwkNo != null && !"".equals(...)` (L~346)

> Service contract flowline number is present — perform flowline agreement lookup.

| # | Type | Code |
|---|------|------|
| 1 | SET | `String svcKeiKaisenUcwkNo = (String)inParamMap.get("svc_kei_kaisen_ucwk_no_cc")` // Service contract flowline internal work number |
| 2 | SET | `String kaisenUcwkGenAddDtm = ""` |
| 3 | IF | `svcKeiKaisenUcwkNo != null && !"".equals(svcKeiKaisenUcwkNo)` — flowline number exists |

**Block 1.2.1** — [nested: flowline lookup] (L~350)

| # | Type | Code |
|---|------|------|
| 1 | SET | `Object[][] ekk0251a010InMsg = {{TEMPLATE_ID_EKK0251A010, "EKK0251A010"}, {FUNC_CODE, "2"}, {KEY_SVC_KEI_KAISEN_UCWK_NO, svcKeiKaisenUcwkNo}}` |
| 2 | CALL | `callSC(handle, scCall, param, fixedText, ekk0251a010InMsg).getCAANMsgList(EKK0251A010CBSMsg.EKK0251A010CBSMSG1LIST)` // SC: Service Contract Flowline Agreement Lookup |
| 3 | SET | `CAANMsg svcKeiKaisenUcwkMsg = ekk0251a010outMsg[0]` |
| 4 | SET | `kaisenUcwkGenAddDtm = svcKeiKaisenUcwkMsg.getString(EKK0251A010CBSMsg1List.GENE_ADD_DTM)` |

**Block 1.3** — (L~363)

> After flowline check (whether executed or skipped), retrieve device provision service code and prepare multi-function router specific variables.

| # | Type | Code |
|---|------|------|
| 1 | SET | `String kktkSvcCd = (String)inParamMap.get("kktk_svc_cd_cc")` // Device provision service code |
| 2 | SET | `String kkOpSvcKeiNoNet = ""` // Device operation service contract number 1 (Net/Router) |
| 3 | SET | `String kkOpSvcKeiNoTel = ""` // Device operation service contract number 2 (Tel/Telephone adapter) |
| 4 | SET | `String geneAddDtmNet = ""` // Generation registration datetime (Net) |
| 5 | SET | `String geneAddDtmTel = ""` // Generation registration datetime (Tel) |

**Block 1.4** — [IF] `C024 check` [kktk_svc_cd_cc = "C024"] (L~369)

> Multi-function router (C024 = 多機能ルータ). Performs device operation service contract lookup and iterates to find router (G01) and telephone adapter (G02) functions.

| # | Type | Code |
|---|------|------|
| 1 | IF | `"C024".equals(kktkSvcCd)` — multi-function router case |

**Block 1.4.1** — [nested: C024 branch] (L~372)

| # | Type | Code |
|---|------|------|
| 1 | SET | `String kktkSvcKeiNo = (String)inParamMap.get("kktk_svc_kei_no_cc")` // Device provision service contract number |
| 2 | SET | `Object[][] ekk2811B504InMsg = {{TEMPLATE_ID_EKK2811B504, "EKK2811B504"}, {FUNC_CODE, "1"}, {KEY_KKTK_SVC_KEI_NO, kktkSvcKeiNo}, {KEY_RSV_APLY_YMD, opeDate}}` |
| 3 | CALL | `callSC(handle, scCall, param, fixedText, ekk2811B504InMsg).getCAANMsgList(EKK2811B504CBSMsg.EKK2811B504CBSMSG1LIST)` // SC: Device Operation SC Agreement Lookup (combined search) |

**Block 1.4.2** — [FOR LOOP] Iterate over EKK2811B504 results (L~382)

| # | Type | Code |
|---|------|------|
| 1 | SET | `int i = 0; i < ekk2811B504outMsg.length; i++` |

**Block 1.4.2.1** — [IF] `G01 check` [kkop_svc_cd = "G01"] (L~385)

> Router function found — get the contract number and latest generation registration datetime.

| # | Type | Code |
|---|------|------|
| 1 | IF | `"G01".equals(ekk2811B504outMsg[i].getString(EKK2811B504CBSMsg1List.KKOP_SVC_CD))` — router function (ルータ機能) |
| 2 | SET | `kkOpSvcKeiNoNet = ekk2811B504outMsg[i].getString(EKK2811B504CBSMsg1List.KKOP_SVC_KEI_NO)` // Device operation service contract number 1 |
| 3 | SET | `Object[][] ekk2811A010InMsg = {{TEMPLATE_ID_EKK2811A010, "EKK2811A010"}, {FUNC_CODE, "2"}, {KEY_KKOP_SVC_KEI_NO, kkOpSvcKeiNoNet}, {KEY_RSV_APLY_YMD, opeDate}}` |
| 4 | CALL | `callSC(handle, scCall, param, fixedText, ekk2811A010InMsg).getCAANMsgList(EKK2811A010CBSMsg.EKK2811A010CBSMSG1LIST)` // SC: Device Operation Contract Agreement Lookup (Net) |
| 5 | SET | `CAANMsg kkOpSvcKeiMsg = ekk2811A010outMsg[0]` |
| 6 | SET | `geneAddDtmNet = kkOpSvcKeiMsg.getString(EKK2811A010CBSMsg1List.GENE_ADD_DTM)` // Latest generation registration datetime (router function) |

**Block 1.4.2.2** — [IF] `G02 check` [kkop_svc_cd = "G02"] (L~409)

> Telephone adapter function found — same lookup pattern for telephone adapter.

| # | Type | Code |
|---|------|------|
| 1 | IF | `"G02".equals(ekk2811B504outMsg[i].getString(EKK2811B504CBSMsg1List.KKOP_SVC_CD))` — telephone adapter function (電話アダプタ機能) |
| 2 | SET | `kkOpSvcKeiNoTel = ekk2811B504outMsg[i].getString(EKK2811B504CBSMsg1List.KKOP_SVC_KEI_NO)` // Device operation service contract number 2 |
| 3 | SET | `Object[][] ekk2811A010InMsg = {{TEMPLATE_ID_EKK2811A010, "EKK2811A010"}, {FUNC_CODE, "2"}, {KEY_KKOP_SVC_KEI_NO, kkOpSvcKeiNoTel}, {KEY_RSV_APLY_YMD, opeDate}}` |
| 4 | CALL | `callSC(handle, scCall, param, fixedText, ekk2811A010InMsg).getCAANMsgList(EKK2811A010CBSMsg.EKK2811A010CBSMSG1LIST)` // SC: Device Operation Contract Agreement Lookup (Tel) |
| 5 | SET | `CAANMsg kkOpSvcKeiMsg = ekk2811A010outMsg[0]` |
| 6 | SET | `geneAddDtmTel = kkOpSvcKeiMsg.getString(EKK2811A010CBSMsg1List.GENE_ADD_DTM)` // Latest generation registration datetime (telephone adapter) |

**Block 2** — [SEMI-COLON SEPARATED BLOCK] Map reset processing (L~442)

> Resets all SOD-related work map fields to empty string, clearing previous data before populating with new order-specific values. Service contract number (svc_kei_no) is NOT reset as it carries forward from the previous layer.

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMap.put("svc_kei_ucwk_no", "")` // Service contract internal work number |
| 2 | SET | `inMap.put("kktk_svc_kei_no", "")` // Device provision service contract number |
| 3 | SET | `inMap.put("op_svc_kei_no", "")` // Operation service contract number |
| 4 | SET | `inMap.put("sbop_svc_kei_no", "")` // Sub-operation service contract number |
| 5 | SET | `inMap.put("seiopsvc_kei_no", "")` // Billing operation service contract number |
| 6 | SET | `inMap.put("order_sbt_cd", "")` // Order type code |
| 7 | SET | `inMap.put("svc_order_cd", "")` // Service order code |
| 8 | SET | `inMap.put("yokyu_sbt_cd", "")` // Request type code |
| 9 | SET | `inMap.put("odr_hakko_joken_cd", "")` // Order issuance condition code |
| 10 | SET | `inMap.put("same_trn_no", "")` // Same processing number |
| 11 | SET | `inMap.put("taknkiki_model_cd", "")` // Home device model code |
| 12 | SET | `inMap.put("kiki_seizo_no", "")` // Device serial number |
| 13 | SET | `inMap.put("mlad", "")` // Mail address |
| 14 | SET | `inMap.put("spot_login_sysid", "")` // Spot login system ID |
| 15 | SET | `inMap.put("send_req_fin_dtm", "")` // Send request completion datetime |
| 16 | SET | `inMap.put("svc_kei_kaisen_ucwk_no", "")` // Service contract flowline internal work number |
| 17 | SET | `inMap.put("svckei_gadtm", "")` // Service contract generation registration datetime |
| 18 | SET | `inMap.put("odr_hakko_joken_no", "")` // Order issuance condition number |
| 19 | SET | `inMap.put("odr_naiyo_cd", "")` // Order content code |
| 20 | SET | `inMap.put("svkeiuw_gadtm", "")` // Service contract internal work generation registration datetime |
| 21 | SET | `inMap.put("kktsvkei_gadtm", "")` // Device provision service contract generation registration datetime |
| 22 | SET | `inMap.put("opsvkei_gadtm", "")` // Operation service contract generation registration datetime |
| 23 | SET | `inMap.put("sbopsvkei_gadtm", "")` // Sub-operation service contract generation registration datetime |
| 24 | SET | `inMap.put("seiopsvkei_gadtm", "")` // Billing operation service contract generation registration datetime |
| 25 | SET | `inMap.put("kkop_svc_kei_no_1", "")` // Device operation service contract number 1 |
| 26 | SET | `inMap.put("kkosvkei_gadtm_1", "")` // Device operation service contract generation registration datetime 1 |
| 27 | SET | `inMap.put("kkop_svc_kei_no_2", "")` // Device operation service contract number 2 |
| 28 | SET | `inMap.put("kkosvkei_gadtm_2", "")` // Device operation service contract generation registration datetime 2 |
| 29 | SET | `inMap.put("huka_inf_kei_no", "")` // Additional information contract number |
| 30 | SET | `inMap.put("huka_inf_kei_gadtm", "")` // Additional information contract generation registration datetime |
| 31 | SET | `inMap.put("chbf_svkei_gadtm", "")` // Pre-change service contract generation registration datetime |
| 32 | SET | `inMap.put("chbf_svkeiuw_gadtm", "")` // Pre-change service contract internal work generation registration datetime |
| 33 | SET | `inMap.put("chbf_kktsvkei_gadtm", "")` // Pre-change device provision service contract generation registration datetime |
| 34 | SET | `inMap.put("chbf_opsvkei_gadtm", "")` // Pre-change operation service contract generation registration datetime |
| 35 | SET | `inMap.put("chbf_sbopsvkei_gadtm", "")` // Pre-change sub-operation contract generation registration datetime |
| 36 | SET | `inMap.put("chbf_seiopsvkei_gadtm", "")` // Pre-change billing operation contract generation registration datetime |

**Block 3** — [IF] `orderNaiyoCd = "149"` [ODR_NAIYO_CD_149 = "149"] (L~485)

> Router connection info disconnection (ルータ向け接続情報・解除). Registers order issuance condition and creates order work for router service disconnection.

| # | Type | Code |
|---|------|------|
| 1 | IF | `JKKHakkoSODConstCC.ODR_NAIYO_CD_149.equals(orderNaiyoCd)` |

**Block 3.1** — [nested: 149 branch - Step (1) Order issuance condition registration] (L~492)

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMap.put("svc_kei_no", inParamMap.get("svc_kei_no"))` // Service contract number |
| 2 | SET | `inMap.put("svc_kei_ucwk_no", "")` // Service contract internal work number |
| 3 | SET | `inMap.put("kktk_svc_kei_no", inParamMap.get("kktk_svc_kei_no"))` // Device provision service contract number |
| 4 | SET | `inMap.put("order_sbt_cd", JKKHakkoSODConstCC.ORDER_SBT_CD_NET)` // `[-> ORDER_SBT_CD_NET = "1" (Net)]` — Order type code (net) |
| 5 | SET | `inMap.put("svc_order_cd", JKKHakkoSODConstCC.SVC_ORDER_CD_ROUTER)` // `[-> SVC_ORDER_CD_ROUTER = "0A" (Router connection info)]` — Service order code (router) |
| 6 | SET | `inMap.put("yokyu_sbt_cd", JKKHakkoSODConstCC.YOKYU_SBT_CD_DSL)` // `[-> YOKYU_SBT_CD_DSL = "03" (Disconnect)]` — Request type code (disconnect) |
| 7 | SET | `inMap.put("odr_hakko_joken_cd", JKKHakkoSODConstCC.ODR_HAKKO_JOKEN_CD_SOKJI_HAKKO)` // `[-> ODR_HAKKO_JOKEN_CD_SOKJI_HAKKO = "01" (Immediate issuance)]` — Order issuance condition code |
| 8 | SET | `inMap.put("taknkiki_model_cd", inParamMap.get("taknkiki_model_cd"))` // Home device model code |
| 9 | SET | `inMap.put("kiki_seizo_no", inParamMap.get("kiki_seizo_no"))` // Device serial number |
| 10 | SET | `inMap.put("same_trn_no", this.same_trn_no)` // Same processing number |
| 11 | SET | `inMap.put("svc_kei_kaisen_ucwk", svcKeiKaisenUcwkNo)` // Service contract flowline internal work number |
| 12 | EXEC | `param.setData(JKKHakkoSODConstCC.HAKKOSODCCWORKMAP, inMap)` |
| 13 | CALL | `executeOdrHakkoJokenAdd(handle, param)` // (1) Order issuance condition registration |

**Block 3.2** — [nested: 149 branch - Step (2) Order information work registration] (L~502)

| # | Type | Code |
|---|------|------|
| 1 | SET | `HashMap trnDataMap = (HashMap)param.getData(JKKHakkoSODConstCC.HAKKOSODCCWORKMAP)` |
| 2 | SET | `inMap.put("odr_hakko_joken_no", trnDataMap.get("odr_hakko_joken_no"))` // Order issuance condition number (from step 1 result) |
| 3 | SET | `inMap.put("odr_naiyo_cd", JKKHakkoSODConstCC.ODR_NAIYO_CD_149)` // Order content code (router disconnection) |
| 4 | SET | `inMap.put("svc_kei_no", inParamMap.get("svc_kei_no"))` // Service contract number |
| 5 | SET | `inMap.put("kktk_svc_kei_no", inParamMap.get("kktk_svc_kei_no"))` // Device provision service contract number |
| 6 | SET | `inMap.put("kktsvkei_gadtm", inParamMap.get("kktsvkei_gadtm"))` // Device provision service contract generation registration datetime |
| 7 | SET | `inMap.put("svckei_gadtm", svckeiGenAddDtm)` // Service contract generation registration datetime |
| 8 | SET | `inMap.put("huka_inf_kei_no", svcKeiKaisenUcwkNo)` // Additional information contract number |
| 9 | SET | `inMap.put("huka_inf_kei_gadtm", kaisenUcwkGenAddDtm)` // Additional information contract generation registration datetime |
| 10 | SET | `inMap.put("kkop_svc_kei_no_1", kkOpSvcKeiNoNet)` // Device operation service contract number 1 |
| 11 | SET | `inMap.put("kkosvkei_gadtm_1", geneAddDtmNet)` // Device operation service contract generation registration datetime 1 |
| 12 | SET | `inMap.put("kkop_svc_kei_no_2", kkOpSvcKeiNoTel)` // Device operation service contract number 2 |
| 13 | SET | `inMap.put("kkosvkei_gadtm_2", geneAddDtmTel)` // Device operation service contract generation registration datetime 2 |
| 14 | EXEC | `param.setData(JKKHakkoSODConstCC.HAKKOSODCCWORKMAP, inMap)` |
| 15 | CALL | `executeOdrInfoSakseiWkAdd(handle, param)` // (2) Order information work registration |

**Block 4** — [ELSE-IF] `orderNaiyoCd = "150"` [ODR_NAIYO_CD_150 = "150"] (L~528)

> Router connection info deletion (ルータ向け接続情報・消去). Same two-step pattern with different codes: deletion instead of disconnection.

| # | Type | Code |
|---|------|------|
| 1 | IF | `JKKHakkoSODConstCC.ODR_NAIYO_CD_150.equals(orderNaiyoCd)` |

**Block 4.1** — [nested: 150 branch - Step (1)] (L~535)

> Identical to Block 3.1 except: `yokyu_sbt_cd = JKKHakkoSODConstCC.YOKYU_SBT_CD_DEL` (Deletion = "08")

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMap.put("yokyu_sbt_cd", JKKHakkoSODConstCC.YOKYU_SBT_CD_DEL)` // `[-> YOKYU_SBT_CD_DEL = "08" (Deletion)]` — Different from Block 3 (YOKYU_SBT_CD_DSL = "03") |
| 2-13 | SET | Same field assignments as Block 3.1 |
| 14 | EXEC | `param.setData(JKKHakkoSODConstCC.HAKKOSODCCWORKMAP, inMap)` |
| 15 | CALL | `executeOdrHakkoJokenAdd(handle, param)` |

**Block 4.2** — [nested: 150 branch - Step (2)] (L~562)

> Identical to Block 3.2 except: `odr_naiyo_cd = JKKHakkoSODConstCC.ODR_NAIYO_CD_150` (150 = router deletion)

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMap.put("odr_naiyo_cd", JKKHakkoSODConstCC.ODR_NAIYO_CD_150)` // Order content code (router deletion) |
| 2-13 | SET | Same field assignments as Block 3.2 |
| 14 | EXEC | `param.setData(JKKHakkoSODConstCC.HAKKOSODCCWORKMAP, inMap)` |
| 15 | CALL | `executeOdrInfoSakseiWkAdd(handle, param)` |

**Block 5** — [ELSE-IF] `orderNaiyoCd = "405"` [ODR_NAIYO_CD_405 = "405"] (L~586)

> Multi-function router setup/change (multi-function router function/disconnect) (多機能ルータ設定・変更). Uses TEL order type and change request type.

| # | Type | Code |
|---|------|------|
| 1 | IF | `ODR_NAIYO_CD_405.equals(orderNaiyoCd)` |

**Block 5.1** — [nested: 405 branch - Step (1)] (L~593)

> Key differences from Blocks 3-4: `order_sbt_cd = ORDER_SBT_CD_TEL` ("2"), `svc_order_cd = "26"` (multi-function router), `yokyu_sbt_cd = YOKYU_SBT_CD_CHG` ("04" - Change)

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMap.put("order_sbt_cd", JKKHakkoSODConstCC.ORDER_SBT_CD_TEL)` // `[-> ORDER_SBT_CD_TEL = "2" (Tel)]` — Tel order type |
| 2 | SET | `inMap.put("svc_order_cd", "26")` // Service order code (multi-function router connection info) |
| 3 | SET | `inMap.put("yokyu_sbt_cd", JKKHakkoSODConstCC.YOKYU_SBT_CD_CHG)` // `[-> YOKYU_SBT_CD_CHG = "04" (Change)]` — Change request |
| 4 | SET | `inMap.put("odr_hakko_joken_cd", JKKHakkoSODConstCC.ODR_HAKKO_JOKEN_CD_SOKJI_HAKKO)` // `[-> "01" (Immediate issuance)]` |
| 5-11 | SET | Same field assignments as Block 3.1 |
| 12 | EXEC | `param.setData(JKKHakkoSODConstCC.HAKKOSODCCWORKMAP, inMap)` |
| 13 | CALL | `executeOdrHakkoJokenAdd(handle, param)` |

**Block 5.2** — [nested: 405 branch - Step (2)] (L~622)

> Sets `odr_naiyo_cd = ODR_NAIYO_CD_405`

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMap.put("odr_naiyo_cd", ODR_NAIYO_CD_405)` // Order content code (multi-func router setup/change) |
| 2-13 | SET | Same as Block 3.2 |
| 14 | EXEC | `param.setData(JKKHakkoSODConstCC.HAKKOSODCCWORKMAP, inMap)` |
| 15 | CALL | `executeOdrInfoSakseiWkAdd(handle, param)` |

**Block 6** — [ELSE-IF] `orderNaiyoCd = "423"` [ODR_NAIYO_CD_423 = "423"] (L~643)

> Multi-function router return/disconnect (multi-function router return) (多機能ルータ設定・解約（機器返却）). Uses TEL order type and disconnect request type.

| # | Type | Code |
|---|------|------|
| 1 | IF | `ODR_NAIYO_CD_423.equals(orderNaiyoCd)` |

**Block 6.1** — [nested: 423 branch - Step (1)] (L~650)

> Key differences: `order_sbt_cd = ORDER_SBT_CD_TEL` ("2"), `yokyu_sbt_cd = YOKYU_SBT_CD_DSL` ("03" - Disconnect)

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMap.put("order_sbt_cd", JKKHakkoSODConstCC.ORDER_SBT_CD_TEL)` // `[-> "2" (Tel)]` |
| 2 | SET | `inMap.put("svc_order_cd", "26")` // Multi-function router connection info |
| 3 | SET | `inMap.put("yokyu_sbt_cd", JKKHakkoSODConstCC.YOKYU_SBT_CD_DSL)` // `[-> "03" (Disconnect)]` |
| 4-11 | SET | Same field assignments as Block 3.1 |
| 12 | EXEC | `param.setData(JKKHakkoSODConstCC.HAKKOSODCCWORKMAP, inMap)` |
| 13 | CALL | `executeOdrHakkoJokenAdd(handle, param)` |

**Block 6.2** — [nested: 423 branch - Step (2)] (L~677)

> Sets `odr_naiyo_cd = ODR_NAIYO_CD_423`

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMap.put("odr_naiyo_cd", ODR_NAIYO_CD_423)` // Order content code (multi-func router return/disconnect) |
| 2-13 | SET | Same as Block 3.2 |
| 14 | EXEC | `param.setData(JKKHakkoSODConstCC.HAKKOSODCCWORKMAP, inMap)` |
| 15 | CALL | `executeOdrInfoSakseiWkAdd(handle, param)` |

**Block 7** — [ELSE-IF] `orderNaiyoCd = "424"` [ODR_NAIYO_CD_424 = "424"] (L~698)

> Multi-function router return/delete (多機能ルータ設定・消去（機器返却）). Uses TEL order type and deletion request type.

| # | Type | Code |
|---|------|------|
| 1 | IF | `ODR_NAIYO_CD_424.equals(orderNaiyoCd)` |

**Block 7.1** — [nested: 424 branch - Step (1)] (L~705)

> Key differences: `order_sbt_cd = ORDER_SBT_CD_TEL` ("2"), `yokyu_sbt_cd = YOKYU_SBT_CD_DEL` ("08" - Deletion)

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMap.put("order_sbt_cd", JKKHakkoSODConstCC.ORDER_SBT_CD_TEL)` // `[-> "2" (Tel)]` |
| 2 | SET | `inMap.put("svc_order_cd", "26")` // Multi-function router connection info |
| 3 | SET | `inMap.put("yokyu_sbt_cd", JKKHakkoSODConstCC.YOKYU_SBT_CD_DEL)` // `[-> "08" (Deletion)]` |
| 4-11 | SET | Same field assignments as Block 3.1 |
| 12 | EXEC | `param.setData(JKKHakkoSODConstCC.HAKKOSODCCWORKMAP, inMap)` |
| 13 | CALL | `executeOdrHakkoJokenAdd(handle, param)` |

**Block 7.2** — [nested: 424 branch - Step (2)] (L~732)

> Sets `odr_naiyo_cd = ODR_NAIYO_CD_424`

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMap.put("odr_naiyo_cd", ODR_NAIYO_CD_424)` // Order content code (multi-func router return/delete) |
| 2-13 | SET | Same as Block 3.2 |
| 14 | EXEC | `param.setData(JKKHakkoSODConstCC.HAKKOSODCCWORKMAP, inMap)` |
| 15 | CALL | `executeOdrInfoSakseiWkAdd(handle, param)` |

**Block 9** — [RETURN] (L~742)

> End of method — always returns the `param` object.

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

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| SOD | Acronym | Service Order Data — the telecom order fulfillment entity representing a service order that triggers downstream provisioning operations |
| `addSOD` | Method | Short for "Add Service Order Data" — registers order issuance conditions and creates order information work records |
| `orderNaiyoCd` | Field | Order content code — classifies the type of order operation (router disconnection, router deletion, multi-function router setup/change, etc.) |
| `svc_kei_no` | Field | Service contract number (サービス契約番号) — unique identifier for a customer's service contract (e.g., FTTH contract) |
| `svc_kei_no_cc` | Field | Service contract number — CC (Common Component) key used to pass the contract number into common processing |
| `svc_kei_ucwk_no` | Field | Service contract internal work number (サービス契約内訳番号) — internal tracking ID for service contract line items |
| `svc_kei_kaisen_ucwk_no` | Field | Service contract flowline internal work number (サービス契約回線内訳番号) — identifies a specific service contract flowline/branch |
| `svckei_gadtm` | Field | Service contract generation registration datetime (サービス契約世代登録年月日時分秒) — timestamp of the current version of the service contract |
| `kktk_svc_cd` | Field | Device provision service code (機器提供サービスコード) — classifies the type of device service: "C024" = multi-function router |
| `kktk_svc_kei_no` | Field | Device provision service contract number (機器提供サービス契約番号) — contract number for device provision services |
| `kkop_svc_kei_no` | Field | Device operation service contract number (機器オプションサービス契約番号) — contract number for device add-on services (router function, telephone adapter) |
| `kkop_svc_cd` | Field | Device operation service code (機器オプションサービスコード) — identifies the type of device option: "G01" = router function, "G02" = telephone adapter function |
| `kktsvkei_gadtm` | Field | Device provision service contract generation registration datetime (機器提供サービス契約世代登録年月日時分秒) |
| `taknkiki_model_cd` | Field | Home device model code (宅内機器型式コード) — identifies the model of the customer's home network device |
| `kiki_seizo_no` | Field | Device serial number (機器製造番号) — unique serial number of the physical device |
| `order_sbt_cd` | Field | Order type code (オーダ種類コード) — "1" = Net (インターネット), "2" = Tel (電話) |
| `svc_order_cd` | Field | Service order code (サービスオーダコード) — "0A" = router connection info, "26" = multi-function router connection info |
| `yokyu_sbt_cd` | Field | Request type code (要求種類コード) — "03" = disconnect (解除), "04" = change (変更), "08" = deletion (消去) |
| `odr_hakko_joken_cd` | Field | Order issuance condition code (オーダ発行条件コード) — "01" = immediate issuance (即時発行) |
| `odr_hakko_joken_no` | Field | Order issuance condition number (オーダ発行条件番号) — generated number returned by the order issuance condition registration SC |
| `odr_naiyo_cd` | Field | Order content code (オーダ内容コード) — identifies the specific order content type |
| `same_trn_no` | Field | Same processing number (同一処理番号) — transaction tracking ID to ensure atomicity across multiple SOD registrations in a single batch |
| 149 | Value | Router connection info disconnection (ルータ向け接続情報・解除) — removes router connection details |
| 150 | Value | Router connection info deletion (ルータ向け接続情報・消去) — permanently deletes router connection records |
| 405 | Value | Multi-function router setup/change (multi-function router function/disconnect) (多機能ルータ設定・変更（ルータ機能・解約）) — configures or changes a multi-function router service |
| 423 | Value | Multi-function router return/disconnect (multi-function router return) (多機能ルータ設定・解約（機器返却）) — disconnects and returns a multi-function router |
| 424 | Value | Multi-function router return/delete (multi-function router return) (多機能ルータ設定・消去（機器返却）) — permanently deletes and returns a multi-function router |
| FTTH | Business term | Fiber To The Home — fiber-optic broadband internet service |
| C024 | Value | Multi-function router (多機能ルータ) — device provision service code identifying the multi-function router device type |
| G01 | Value | Router function (ルータ機能) — identifies a router-only device option in the device operation results |
| G02 | Value | Telephone adapter function (電話アダプタ機能) — identifies a telephone adapter device option in the device operation results |
| EKK0081A010 | CBS | Service Contract Agreement Lookup (サービス契約同意照会) — retrieves service contract agreement details including generation registration datetime |
| EKK0251A010 | CBS | Service Contract Flowline Agreement Lookup (サービス契約回線内訳同意照会) — retrieves service contract flowline agreement details |
| EKK2811B504 | CBS | Device Operation Service Contract Agreement Lookup Combined Search (機器オプションサービス契約同意照会（複合検索）) — searches multiple device operation service contracts |
| EKK2811A010 | CBS | Device Operation Service Contract Agreement Lookup (機器オプションサービス契約同意照会) — retrieves a single device operation service contract |
| EKK1081D010 | CBS | Order Issuance Condition Registration (オーダ発行条件登録) — creates a new order issuance condition record |
| EKK1551D010 | CBS | Order Information Creation Work Registration (オーダ情報作成ワーク登録) — creates a new order information creation work record |
| `HakkoSODCCWORK` | Key | SOD work map key (発行SODCCワーク) — session key for passing SOD processing work data between method calls |
| `callSC` | Method | Service Component call wrapper — executes a CBS/SC call with input parameter preparation, SC invocation, and result mapping |
| `executeOdrHakkoJokenAdd` | Method | Order issuance condition registration processing (オーダ発行条件登録処理) — delegates to EKK1081D010CBS for order condition creation |
| `executeOdrInfoSakseiWkAdd` | Method | Order information work registration processing (オーダ情報作成ワーク登録処理) — delegates to EKK1551D010CBS for order work creation |
| `editInMsg_EKK1081D010CBS` | Method | Input message preparation for EKK1081D010CBS — transforms work map into SC input format |
| `editResultRP_EKK1081D010CBS` | Method | Result processing for EKK1081D010CBS — writes SC output back into the work map (e.g., extracted odr_hakko_joken_no) |
| `editInMsg_EKK1551D010CBS` | Method | Input message preparation for EKK1551D010CBS |
| `editResultRP_EKK1551D010CBS` | Method | Result processing for EKK1551D010CBS |
| KK_T_SVC_KEI | DB | Service Contract table (サービス契約テーブル) — stores service contract master data |
| KK_T_SVC_KEI_UCWK | DB | Service Contract Internal Work table (サービス契約内訳テーブル) — stores service contract line item details |
| KK_T_ODR_HAKKO_JOKEN | DB | Order Issuance Condition table (オーダ発行条件テーブル) — stores order issuance condition records |
| KK_T_ODR_INFO_SAKSEI_WK | DB | Order Information Creation Work table (オーダ情報作成ワークテーブル) — stores order information creation work records |
| KK_T_KKOP_SVC_KEI | DB | Device Operation Service Contract table (機器オプションサービス契約テーブル) — stores device add-on service contract records |
| SC | Acronym | Service Component — the Enterprise Service Bus pattern for service-to-service communication in this platform |
| CBS | Acronym | Common Business Service — a type of Service Component representing a shared business operation |
| CAANMsg | Type | Canonical Message — the standard message envelope used for SC request/response communication |
| ServiceComponentRequestInvoker | Type | Invoker class that executes SC/CBS calls with the framework's `run()` method |
| SessionHandle | Type | Session management handle carrying DB connection, transaction context, and security credentials |
| IRequestParameterReadWrite | Interface | Request parameter interface providing `getData()` and `setData()` for exchanging business data |
