# Business Logic — JKKAdchgHakkoSODCC.opDslOdrCtrl() [235 LOC]

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

## 1. Role

### JKKAdchgHakkoSODCC.opDslOdrCtrl()

This method is the **option settings cancellation (desolution) order controller** (`オプション設定オーダ制御処理`). It orchestrates the generation of Service Order Data (SOD) commands needed to cancel various optional add-on services attached to a telecom subscriber's contract. The method operates within the broader "option setting desolution order" workflow, which is triggered after the main new-construction or modification process completes (as determined by the `ODR_EXEC_DIV` flag set to `ODR_EXEC_DIV_OPDSL` in the calling method `adchgOdrCtrl`).

The method implements a **routing/dispatch pattern**: it reads the optional service code (`op_svc_cd`) to determine which service type was active, then generates one or more cancellation orders specific to that service. It handles five optional service types: E-Mail cancellation, WEB/Home Page cancellation, Mailing List cancellation, Multisection (multi-section) cancellation, and Femtocell cancellation. For the multisection service specifically, it performs a pause state judgment — if the service is currently paused, it generates additional orders for FTTH authentication pause release, static multisection cancellation, and FTTH one-time pause, ensuring proper state transitions.

Its role in the larger system is that of a **centralized SOD dispatcher** for optional service cancellations. It extracts pre- and post-change optional service information from the SOD map, queries the system for the latest service consent data via service components (SCs), and delegates order creation to `addSOD`. Instance fields are set to store previous record values for audit trail purposes (`mae_recode_chbf_op_svc_kei_no`, `mae_recode_chbf_op_svc_kei_gene_add_dtm`).

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["opDslOdrCtrl"])
    INIT["Initialize SOD maps: sod_kihon, svc_kei, svc_kei_ucwk, opsvkei"]
    SHKKA["shkkaMap on all 4 maps"]
    CHBF_GET["Extract chbf_opsvkei_no and chbf_opsvkei_gene_add_dtm"]
    SHRCHR["shkkaChr trim on both fields"]
    COND_HAS_NO{"chbf_opsvkei_no not blank?"}
    INIT2["Initialize result hash variables to null"]
    CHBF_IN["Build input: OP_SVC_KEI_NO, GENE_ADD_DTM"]
    CALL_0351["callEKK0351A010SC"]
    STATUS_CHK{statusCode != 0?}
    THROW["Throw CCException with SCCallException"]
    GET_TEMPLATE["Get TEMPLATE_ID_EKK0351A010 from result"]
    GET_OP_SVC_CD["Get OP_SVC_CD from template"]
    GENE_FIX{"gene_add_dtm null or length lt 17?"}
    GENE_SET["Set gene_add_dtm from EKK0351 result"]
    JDG_OP["jdgOpSvcKind opSvcCd"]
    IS_NULL_OP{"opSvcKind null?"}
    RETURN_EARLY["Return param"]
    IS_NET{"opSvcKind0 eq SVC_KIND_NET = 1?"}
    NET_IN["Build input for EKK0361A010"]
    CALL_0361["callEKK0361A010SC"]
    GET_0361["Get TEMPLATE_ID_EKK0361A010 from result"]
    COND_EMAIL{"opSvcCd eq OP_SVC_CD_EMAIL = B001?"}
    EMAIL_BLOCK["Set email keys same_trn_no empty addSOD 116 EMail cancel"]
    COND_HP{"opSvcCd eq OP_SVC_CD_HP = B002?"}
    HP_BLOCK["Set HP keys Get URL domain and account"]
    HP_URL_CHK{"URL domain and account both set?"}
    HP_ADD["same_trn_no empty addSOD 126 WEB cancel"]
    COND_MLIST{"opSvcCd eq OP_SVC_CD_MLIST = B003?"}
    MLIST_BLOCK["Set mlist keys same_trn_no empty addSOD 131 ML cancel"]
    COND_MLTISE{"opSvcCd eq OP_SVC_CD_MLTISE = B015?"}
    MLTISE_BLOCK["Set mltise keys Get svc_kei_no"]
    PAUSE_JDG["pauseJdg for multisection pause check"]
    PAUSE_1{"pause_jdg_cd eq PAUSE_JDG_CD_1 = 1?"}
    UCWK_IN["Build inHashUcwk with SVC_KEI_NO"]
    CALL_0161["callEKK0161B004SC service detail list"]
    GET_UCWK["Get SVC_KEI_UCWK_NO and GENE_ADD_DTM"]
    OLD_VRSB["getOldVrsbIdgSvcDtlCd for old VR identification"]
    GET_TRN1["getSame_trn_no same transaction number"]
    ADD_107["addSOD 107 FTTH auth pause release"]
    ADD_145_1["addSOD 145 Multisection static cancel"]
    ADD_106["addSOD 106 FTTH auth one-time pause"]
    PAUSE_0{"pause_jdg_cd eq PAUSE_JDG_CD_0 = 0?"}
    ADD_145_0["addSOD 145 Multisection static cancel"]
    COND_FMTCEL{"opSvcCd eq OP_SVC_CD_FMTCEL = B075?"}
    FMTCEL_BLOCK["Set femtocell keys getSame_trn_no"]
    ADD_166["addSOD 166 Femtocell cancel"]
    ADD_167["addSOD 167 Femtocell delete"]
    FINAL_SET["Set mae_recode_chbf_op_svc_kei_no and gene_add_dtm"]
    RETURN_FINAL["Return param"]
    START --> INIT --> INIT2 --> SHKKA --> CHBF_GET --> SHRCHR
    SHRCHR --> COND_HAS_NO
    COND_HAS_NO -- true --> CHBF_IN
    COND_HAS_NO -- false --> RETURN_FINAL
    CHBF_IN --> CALL_0351
    CALL_0351 --> STATUS_CHK
    STATUS_CHK -- true --> THROW
    STATUS_CHK -- false --> GET_TEMPLATE
    GET_TEMPLATE --> GET_OP_SVC_CD
    GET_OP_SVC_CD --> GENE_FIX
    GENE_FIX -- true --> GENE_SET
    GENE_SET --> JDG_OP
    GENE_FIX -- false --> JDG_OP
    JDG_OP --> IS_NULL_OP
    IS_NULL_OP -- true --> RETURN_EARLY
    IS_NULL_OP -- false --> IS_NET
    IS_NET -- true --> NET_IN
    IS_NET -- false --> COND_EMAIL
    NET_IN --> CALL_0361
    CALL_0361 --> GET_0361
    GET_0361 --> COND_EMAIL
    COND_EMAIL -- true --> EMAIL_BLOCK
    EMAIL_BLOCK --> FINAL_SET
    COND_EMAIL -- false --> COND_HP
    COND_HP -- true --> HP_BLOCK
    COND_HP -- false --> COND_MLIST
    HP_BLOCK --> HP_URL_CHK
    HP_URL_CHK -- true --> HP_ADD
    HP_ADD --> FINAL_SET
    HP_URL_CHK -- false --> FINAL_SET
    COND_MLIST -- true --> MLIST_BLOCK
    MLIST_BLOCK --> FINAL_SET
    COND_MLIST -- false --> COND_MLTISE
    COND_MLTISE -- true --> MLTISE_BLOCK
    MLTISE_BLOCK --> PAUSE_JDG
    COND_MLTISE -- false --> COND_FMTCEL
    PAUSE_JDG --> PAUSE_1
    PAUSE_1 -- true --> UCWK_IN
    PAUSE_1 -- false --> PAUSE_0
    UCWK_IN --> CALL_0161
    CALL_0161 --> GET_UCWK
    GET_UCWK --> OLD_VRSB
    OLD_VRSB --> GET_TRN1
    GET_TRN1 --> ADD_107
    ADD_107 --> ADD_145_1
    ADD_145_1 --> ADD_106
    ADD_106 --> FINAL_SET
    PAUSE_0 -- true --> ADD_145_0
    ADD_145_0 --> FINAL_SET
    PAUSE_0 -- false --> FINAL_SET
    COND_FMTCEL -- true --> FMTCEL_BLOCK
    FMTCEL_BLOCK --> ADD_166
    ADD_166 --> ADD_167
    ADD_167 --> FINAL_SET
    COND_FMTCEL -- false --> FINAL_SET
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | Session manager handle carrying session context (e.g., transaction session, authentication token) used for all SC calls and service operations |
| 2 | `param` | `IRequestParameterReadWrite` | Parameter object containing the model group and control map; carries the SOD order data being built throughout the method. Modified and returned with accumulated cancellation orders |
| 3 | `fixedText` | `String` | User-defined arbitrary string; reserved for future use (current implementation does not reference this parameter) |
| 4 | `sodMap` | `HashMap<String, Object>` | Service Order Data map containing four sub-maps: `SOD_KIHON_INFO` (SOD basic information), `SVC_KEI_INFO` (service contract information), `SVC_KEI_UCWK_INFO` (service contract details), and `OPSVKEI_INFO` (optional service contract information). These sub-maps carry the pre-change optional service number and generation timestamp |

**Instance fields read by the method:**
- `pplan_cd` — Price plan code, used when calling `getOldVrsbIdgSvcDtlCd` for old VR identification judgment

**Instance fields written by the method:**
- `op_svc_kei_no_ml` — Optional service contract number for E-Mail (set when `opSvcCd == "B001"`)
- `op_gadtm_ml` — Optional service generation timestamp for E-Mail
- `mlad` — Mail Address, extracted from EKK0361A010 result
- `same_trn_no` — Same transaction number (reset per service type, used for FTTH/Multisection/Femtocell)
- `op_svc_kei_no_hp` — Optional service contract number for Home Page
- `op_gadtm_hp` — Optional service generation timestamp for Home Page
- `op_svc_kei_no_mlist` — Optional service contract number for Mailing List
- `op_gadtm_mlist` — Optional service generation timestamp for Mailing List
- `op_svc_kei_no_mltise` — Optional service contract number for Multisection
- `op_gadtm_mltise` — Optional service generation timestamp for Multisection
- `svc_kei_ucwk_no` — Service contract detail number (set during pause judgment branch for multisection)
- `svc_kei_ucwk_gadtm` — Service contract detail generation timestamp
- `old_vrsb_jdg_svc_dtl_cd` — Old VR identification service detail code (ANK-2765-00-00 addition)
- `mae_recode_chbf_op_svc_kei_no` — Previous record pre-change optional service contract number
- `mae_recode_chbf_op_svc_kei_gene_add_dtm` — Previous record pre-change optional service contract generation timestamp

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `callEKK0351A010SC` | EKK0351A010SC | Optional Service Contract Consent | Fetches pre-change optional service contract consent information using the optional service number and generation timestamp |
| R | `callEKK0361A010SC` | EKK0361A010SC | Optional Service Contract (ISP) Consent | Fetches optional service contract (ISP) agreement details for FTTH service type, including mail address, URL domain, and URL account |
| R | `callEKK0161B004SC` | EKK0161B004SC | Service Contract Detail List | Retrieves service contract detail list (SYSID) to obtain service contract detail number and generation timestamp during multisection pause state processing |
| R | `getOldVrsbIdgSvcDtlCd` | - | - | Determines the old VR (version) identification service detail code for the service — legacy version migration support (ANK-2765-00-00) |
| R | `getSame_trn_no` | EKK1081C011 (template) | Same Transaction Number | Acquires a shared transaction number for grouping related cancellation orders |
| C | `addSOD` | - | SOD (Service Order Data) | Creates and registers a new Service Order Data cancellation entry with the resolved order content code. Called repeatedly to accumulate multiple cancellation orders |
| - | `JBSbatInterface.trim` | JBSbatInterface | - | Utility trim on string values (called via shkkaChr) |
| - | `JZMBatCommon.trim` | JZMBatCommon | - | Utility trim on string values |
| - | `JBSbatKKBmpKaihkPrdChokNoDel.trim` | JBSbatKKBmpKaihkPrdChokNoDel | - | Utility trim on string values |
| - | `JBSbatKKSodSendReqBase.trim` | JBSbatKKSodSendReqBase | - | Utility trim on string values |
| - | `JBSbatKKTchishoDelete.trim` | JBSbatKKTchishoDelete | - | Utility trim on string values |
| - | `isBlank` | JKKAdchgHakkoSODCC | - | Checks if a string is null or blank |
| - | `jdgOpSvcKind` | JKKAdchgHakkoSODCC | - | Judges and returns the service type classification (e.g., NET, TEL, MOB) for the optional service code |
| - | `pauseJdg` | JKKAdchgHakkoSODCC | - | Judgment pause state of the service (whether the service is currently paused) |
| - | `shkkaChr` | JKKAdchgHakkoSODCC | - | Trim and null-check helper method (wraps trim utilities) |
| - | `shkkaMap` | JKKAdchgHakkoSODCC | - | Map sanitization helper — cleans/validates the SOD sub-maps |

## 5. Dependency Trace

This method is **private** and called exclusively from within the same class `JKKAdchgHakkoSODCC`. The caller is:

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | CBS: `JKKAdchgHakkoSODCC.adchgOdrCtrl` | `adchgOdrCtrl` → (after `setParamOpDslOdr` returns true, with `ODR_EXEC_DIV_OPDSL`) → `opDslOdrCtrl` | `addSOD [C] SOD`, `getSame_trn_no [R] SAME_TRN_NO`, `getOldVrsbIdgSvcDtlCd [R] SVC_KEI_UCWK`, `callEKK0161B004SC [R] SVC_KEI_UCWK`, `callEKK0351A010SC [R] OPSVKEI_CONSENT`, `callEKK0361A010SC [R] OPSVKEI_ISP_CONSENT` |

**Terminal operations from this method** (all CRUD endpoints reached):

| Terminal | Type | Description |
|----------|------|-------------|
| `addSOD [C] SOD` | Create | Creates SOD cancellation order entries for each optional service type |
| `getSame_trn_no [R] SAME_TRN_NO` | Read | Acquires same transaction number for order grouping |
| `getOldVrsbIdgSvcDtlCd [R] SVC_KEI_UCWK` | Read | Retrieves old VR identification service detail code |
| `callEKK0161B004SC [R] SVC_KEI_UCWK` | Read | Fetches service contract detail list (for multisection) |
| `callEKK0351A010SC [R] OPSVKEI_CONSENT` | Read | Fetches optional service contract consent |
| `callEKK0361A010SC [R] OPSVKEI_ISP_CONSENT` | Read | Fetches optional service contract ISP consent |

## 6. Per-Branch Detail Blocks

### Block 1 — [SET] SOD Map Initialization (L11298)

Extracts and sanitizes four sub-maps from the `sodMap` parameter.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `sod_kihon_info_Map = (HashMap)sodMap.get(SOD_KIHON_INFO)` | SOD basic information map |
| 2 | SET | `svc_kei_info_Map = (HashMap)sodMap.get(SVC_KEI_INFO)` | Service contract information map |
| 3 | SET | `svc_kei_ucwk_info_Map = (HashMap)sodMap.get(SVC_KEI_UCWK_INFO)` | Service contract details map |
| 4 | SET | `opsvkei_info_Map = (HashMap)sodMap.get(OPSVKEI_INFO)` | Optional service contract information map |
| 5 | EXEC | `sod_kihon_info_Map = shkkaMap(sod_kihon_info_Map)` | Sanitize SOD basic info map |
| 6 | EXEC | `svc_kei_info_Map = shkkaMap(svc_kei_info_Map)` | Sanitize service contract info map |
| 7 | EXEC | `svc_kei_ucwk_info_Map = shkkaMap(svc_kei_ucwk_info_Map)` | Sanitize service contract details map |
| 8 | EXEC | `opsvkei_info_Map = shkkaMap(opsvkei_info_Map)` | Sanitize optional service contract info map |
| 9 | SET | `chbfEKK0351A010SCHash = null` | Pre-change optional service contract consent hash (EKK0351A010 result) |
| 10 | SET | `chbfEKK0361A010SCHash = null` | Pre-change optional service contract ISP consent hash (EKK0361A010 result) |

### Block 2 — [SET, CALL] Pre-Change Optional Service Information Retrieval (L11310)

Extracts the pre-change optional service number and generation timestamp.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `chbf_opsvkei_no = (String)opsvkei_info_Map.get(INFO_CHBF_OPSVKEI_NO)` | Pre-change optional service contract number |
| 2 | SET | `chbf_opsvkei_gene_add_dtm = (String)opsvkei_info_Map.get(INFO_CHBF_OPSVKEI_GENE_ADD_DTM)` | Pre-change optional service contract generation timestamp |
| 3 | EXEC | `chbf_opsvkei_no = shkkaChr(chbf_opsvkei_no)` | Trim the service number |
| 4 | EXEC | `chbf_opsvkei_gene_add_dtm = shkkaChr(chbf_opsvkei_gene_add_dtm)` | Trim the generation timestamp |

### Block 3 — [IF] Optional Service Number Exists — Main Processing (L11314)

Entry point: Only processes if there is an existing optional service to cancel (`chbf_opsvkei_no` is not blank).

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `chbfInHash = new HashMap` | Input hash for EKK0351A010 |
| 2 | SET | `chbfResultHash = new HashMap` | Output hash for EKK0351A010 result |
| 3 | SET | `chbfInHash.put(OP_SVC_KEI_NO, chbf_opsvkei_no)` | Set optional service number in input |
| 4 | SET | `chbfInHash.put(GENE_ADD_DTM, chbf_opsvkei_gene_add_dtm)` | Set generation timestamp in input |
| 5 | SET | `funcCode = (17 == gene_add_dtm.trim().length()) ? FUNC_CODE_1 : FUNC_CODE_2` | Choose function code based on timestamp length |
| 6 | CALL | `callEKK0351A010SC(param, handle, chbfInHash, chbfResultHash, funcCode)` | Execute optional service contract consent (EKK0351A010) |

#### Block 3.1 — [IF] EKK0351A010 Error Check (L11331)

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `0 != statusCode` | Check for SC call error (non-zero status) |
| 2 | EXEC | `throw new CCException("", new SCCallException("", statusCode, statusCode))` | Throw composite exception with status code |

#### Block 3.2 — [SET, GET] Extract EKK0351A010 Results (L11337)

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `chbfEKK0351A010SCHash = (HashMap)chbfResultHash.get(TEMPLATE_ID_EKK0351A010)` | Extract template result hash |
| 2 | SET | `opSvcCd = (String)chbfEKK0351A010SCHash.get(OP_SVC_CD)` | Extract optional service code |
| 3 | IF | `gene_add_dtm null or length < 17` (Block 3.3) | Check if generation timestamp needs fix-up |

#### Block 3.3 — [IF] Generation Timestamp Fix-Up (L11339)

If the generation timestamp was missing or truncated, replenish it from the SC result.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `chbf_opsvkei_gene_add_dtm = (String)chbfEKK0351A010SCHash.get(GENE_ADD_DTM)` | Replenish gene_add_dtm from EKK0351 result |

#### Block 3.4 — [CALL, IF] Service Type Judgment (L11345)

Classify the optional service code into a service type (NET, TEL, etc.).

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | CALL | `opSvcKind = jdgOpSvcKind(opSvcCd)` | Judge service type from optional service code |
| 2 | IF | `opSvcKind == null` | Not an SOD target — return early |
| 3 | RETURN | `return param` | Return param unchanged (no further processing) |

#### Block 3.5 — [IF] Service Type is NET (SVC_KIND_NET = "1") (L11347)

For FTTH/network services, also fetch the ISP consent details.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `chbfInHashNet = new HashMap` | Input hash for EKK0361A010 |
| 2 | SET | `chbfResultHashNet = new HashMap` | Output hash for EKK0361A010 |
| 3 | SET | `chbfInHashNet.put(OP_SVC_KEI_NO, chbf_opsvkei_no)` | Set service number for ISP query |
| 4 | SET | `chbfInHashNet.put(GENE_ADD_DTM, chbf_opsvkei_gene_add_dtm)` | Set generation timestamp for ISP query |
| 5 | SET | `funcCode = (17 == gene_add_dtm.trim().length()) ? FUNC_CODE_1 : FUNC_CODE_2` | Choose function code for ISP query |
| 6 | CALL | `callEKK0361A010SC(param, handle, chbfInHashNet, chbfResultHashNet, funcCode)` | Execute optional service contract ISP consent (EKK0361A010) |
| 7 | SET | `chbfEKK0361A010SCHash = (HashMap)chbfResultHashNet.get(TEMPLATE_ID_EKK0361A010)` | Extract ISP consent template result |

#### Block 3.6 — [IF] Service Type = E-Mail (OP_SVC_CD_EMAIL = "B001") (L11367)

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `this.op_svc_kei_no_ml = chbf_opsvkei_no` | Store optional service number for E-Mail |
| 2 | SET | `this.op_gadtm_ml = chbf_opsvkei_gene_add_dtm` | Store generation timestamp for E-Mail |
| 3 | SET | `this.mlad = (String)chbfEKK0361A010SCHash.get(MLAD)` | Extract mail address from ISP result |
| 4 | SET | `this.same_trn_no = ""` | Clear same transaction number |
| 5 | SET | `selectOdrNaiyoCd = ODR_NAIYO_CD_116 = "116"` | E-Mail cancellation order content code |
| 6 | CALL | `param = addSOD(handle, param, selectOdrNaiyoCd)` | Create SOD: E-Mail cancellation |

#### Block 3.7 — [IF] Service Type = Home Page (OP_SVC_CD_HP = "B002") (L11378)

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `this.op_svc_kei_no_hp = chbf_opsvkei_no` | Store optional service number for Home Page |
| 2 | SET | `this.op_gadtm_hp = chbf_opsvkei_gene_add_dtm` | Store generation timestamp for Home Page |
| 3 | SET | `chbfUrlDomain = (String)chbfEKK0361A010SCHash.get(URL_DOMAIN)` | Extract pre-change URL domain |
| 4 | SET | `chbfUrlAccount = (String)chbfEKK0361A010SCHash.get(URL_ACCOUNT)` | Extract pre-change URL account |

##### Block 3.7.1 — [IF] URL Both Set (L11388)

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `this.same_trn_no = ""` | Clear same transaction number |
| 2 | SET | `selectOdrNaiyoCd = ODR_NAIYO_CD_126 = "126"` | WEB cancellation order content code |
| 3 | CALL | `param = addSOD(handle, param, selectOdrNaiyoCd)` | Create SOD: WEB cancellation |

#### Block 3.8 — [IF] Service Type = Mailing List (OP_SVC_CD_MLIST = "B003") (L11397)

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `this.op_svc_kei_no_mlist = chbf_opsvkei_no` | Store optional service number for Mailing List |
| 2 | SET | `this.op_gadtm_mlist = chbf_opsvkei_gene_add_dtm` | Store generation timestamp for Mailing List |
| 3 | SET | `this.same_trn_no = ""` | Clear same transaction number |
| 4 | SET | `selectOdrNaiyoCd = ODR_NAIYO_CD_131 = "131"` | Mailing List cancellation order content code |
| 5 | CALL | `param = addSOD(handle, param, selectOdrNaiyoCd)` | Create SOD: Mailing List cancellation |

#### Block 3.9 — [IF] Service Type = Multisection (OP_SVC_CD_MLTISE = "B015") (L11417)

The most complex branch. Handles multisection (multi-section) service cancellation with pause state judgment.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `this.op_svc_kei_no_mltise = chbf_opsvkei_no` | Store optional service number for Multisection |
| 2 | SET | `this.op_gadtm_mltise = chbf_opsvkei_gene_add_dtm` | Store generation timestamp for Multisection |
| 3 | SET | `svc_kei_no = (String)svc_kei_info_Map.get("svc_kei_no")` | Get service contract number |
| 4 | SET | `pause_jdg_cd = new String[1]` | Pause judgment code array |
| 5 | CALL | `param = pauseJdg(param, handle, null, svc_kei_no, pause_jdg_cd)` | Judge pause state of the service |

##### Block 3.9.1 — [IF] Service is Paused (PAUSE_JDG_CD_1 = "1") (L11433)

When the service is currently paused, generate FTTH authentication pause release, multisection static cancellation, and FTTH one-time pause orders.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `inHashUcwk = new HashMap` | Input hash for service contract detail |
| 2 | SET | `resultHashUcwk = new HashMap` | Output hash for service contract detail result |
| 3 | SET | `inHashUcwk.put(SVC_KEI_NO, svc_kei_no)` | Set service contract number |
| 4 | CALL | `callEKK0161B004SC(param, handle, inHashUcwk, resultHashUcwk, FUNC_CODE_1)` | Fetch service contract detail list |
| 5 | SET | `msgListUcwk = (CAANMsg[])resultHashUcwk.get(TEMPLATE_ID_EKK0161B004)` | Extract result message list |
| 6 | SET | `retHash = msgListUcwk[0].getMsgData()` | Extract message data from first record |
| 7 | SET | `this.svc_kei_ucwk_no = new String[1]` | Initialize service contract detail number array |
| 8 | SET | `this.svc_kei_ucwk_no[0] = (String)retHash.get(SVC_KEI_UCWK_NO)` | Extract service contract detail number |
| 9 | SET | `this.svc_kei_ucwk_gadtm = new String[1]` | Initialize service contract detail timestamp array |
| 10 | SET | `this.svc_kei_ucwk_gadtm[0] = (String)retHash.get(GENE_ADD_DTM)` | Extract service contract detail timestamp |
| 11 | CALL | `this.old_vrsb_jdg_svc_dtl_cd = getOldVrsbIdgSvcDtlCd(handle, param, svc_kei_no, svc_kei_ucwk_no[0], pplan_cd)` | Get old VR identification service detail code (ANK-2765-00-00) |
| 12 | SET | `sameTrnNo = new String[1]` | Initialize same transaction number array |
| 13 | CALL | `getSame_trn_no(param, handle, null, sameTrnNo)` | Acquire same transaction number |
| 14 | SET | `this.same_trn_no = sameTrnNo[0]` | Store same transaction number |
| 15 | SET | `selectOdrNaiyoCd = ODR_NAIYO_CD_107 = "107"` | FTTH authentication / pause release order |
| 16 | CALL | `param = addSOD(handle, param, selectOdrNaiyoCd)` | Create SOD: FTTH auth pause release |
| 17 | SET | `selectOdrNaiyoCd = ODR_NAIYO_CD_145 = "145"` | Multisection (static) cancellation order |
| 18 | CALL | `param = addSOD(handle, param, selectOdrNaiyoCd)` | Create SOD: Multisection static cancel |
| 19 | SET | `selectOdrNaiyoCd = ODR_NAIYO_CD_106 = "106"` | FTTH authentication / one-time pause order |
| 20 | CALL | `param = addSOD(handle, param, selectOdrNaiyoCd)` | Create SOD: FTTH auth one-time pause |

##### Block 3.9.2 — [IF] Service is NOT Paused (PAUSE_JDG_CD_0 = "0") (L11478)

When the service is active, only generate the multisection static cancellation.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `selectOdrNaiyoCd = ODR_NAIYO_CD_145 = "145"` | Multisection (static) cancellation order |
| 2 | CALL | `param = addSOD(handle, param, selectOdrNaiyoCd)` | Create SOD: Multisection static cancel |

#### Block 3.10 — [IF] Service Type = Femtocell (OP_SVC_CD_FMTCEL = "B075") (L11491)

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `this.op_svc_kei_no_fmtcel = chbf_opsvkei_no` | Store optional service number for Femtocell |
| 2 | SET | `this.op_gadtm_fmtcel = chbf_opsvkei_gene_add_dtm` | Store generation timestamp for Femtocell |
| 3 | SET | `sameTrnNo = new String[1]` | Initialize same transaction number array |
| 4 | CALL | `getSame_trn_no(param, handle, null, sameTrnNo)` | Acquire same transaction number |
| 5 | SET | `this.same_trn_no = sameTrnNo[0]` | Store same transaction number |
| 6 | SET | `selectOdrNaiyoCd = ODR_NAIYO_CD_166 = "166"` | Femtocell cancellation order content code |
| 7 | CALL | `param = addSOD(handle, param, selectOdrNaiyoCd)` | Create SOD: Femtocell cancel |
| 8 | SET | `selectOdrNaiyoCd = ODR_NAIYO_CD_167 = "167"` | Femtocell deletion order content code |
| 9 | CALL | `param = addSOD(handle, param, selectOdrNaiyoCd)` | Create SOD: Femtocell delete |

### Block 4 — [SET] Finalize Previous Record Values (L11508)

After all conditional processing within the main block, store the pre-change optional service number and timestamp as the previous record values.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `this.mae_recode_chbf_op_svc_kei_no = new String(chbf_opsvkei_no)` | Save pre-change optional service number as previous record value |
| 2 | SET | `this.mae_recode_chbf_op_svc_kei_gene_add_dtm = new String(chbf_opsvkei_gene_add_dtm)` | Save pre-change generation timestamp as previous record value |

### Block 5 — [RETURN] Return Result (L11512)

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | RETURN | `return param` | Return the updated parameter with all accumulated SOD orders |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `opDslOdrCtrl` | Method | Option Settings Order Control — orchestrates SOD cancellation for optional services |
| SOD | Acronym | Service Order Data — the central order fulfillment entity in the eOpticom system |
| `chbf_opsvkei_no` | Field | Pre-change optional service contract number — the optional service being cancelled |
| `chbf_opsvkei_gene_add_dtm` | Field | Pre-change optional service contract generation timestamp (YYYYMMDDHHmmss) — version tracking |
| `op_svc_kei_no` | Field | Optional service contract number — internal identifier for the optional service line item |
| `op_svc_cd` | Field | Optional service code — classifies the type of optional service (e.g., B001 = E-Mail, B002 = Home Page) |
| `OP_SVC_CD_EMAIL` | Constant | "B001" — E-Mail optional service code |
| `OP_SVC_CD_HP` | Constant | "B002" — Home Page (WEB) optional service code |
| `OP_SVC_CD_MLIST` | Constant | "B003" — Mailing List optional service code |
| `OP_SVC_CD_MLTISE` | Constant | "B015" — Multisection (multi-section) optional service code |
| `OP_SVC_CD_FMTCEL` | Constant | "B075" — Femtocell optional service code |
| `OP_SVC_CD_FIXIPAD` | Constant | "B004" — Fixed Global IP Address optional service code (not handled in this method) |
| `OP_SVC_CD_IPV6` | Constant | "B070" — IPv6 Address optional service code (not handled in this method) |
| `SVC_KIND_NET` | Constant | "1" — Service type: eOpticom Net (FTTH) |
| `ODR_NAIYO_CD` | Field | Order content code — classifies what kind of order is being placed (registration, cancellation, pause, etc.) |
| `ODR_NAIYO_CD_106` | Constant | "106" — FTTH Authentication / One-Time Pause |
| `ODR_NAIYO_CD_107` | Constant | "107" — FTTH Authentication / Pause Release |
| `ODR_NAIYO_CD_116` | Constant | "116" — E-Mail / Cancellation |
| `ODR_NAIYO_CD_126` | Constant | "126" — WEB / Cancellation |
| `ODR_NAIYO_CD_131` | Constant | "131" — Mailing List / Cancellation |
| `ODR_NAIYO_CD_145` | Constant | "145" — Multisection (static) / Cancellation |
| `ODR_NAIYO_CD_166` | Constant | "166" — Femtocell / Cancellation |
| `ODR_NAIYO_CD_167` | Constant | "167" — Femtocell / Deletion |
| `same_trn_no` | Field | Same transaction number — shared transaction ID used to group related SOD orders |
| `FUNC_CODE_1` | Constant | "1" — Function code for primary/inquiry mode |
| `FUNC_CODE_2` | Constant | "2" — Function code for secondary/update mode |
| `PAUSE_JDG_CD_0` | Constant | "0" — Pause judgment: not paused (service is active) |
| `PAUSE_JDG_CD_1` | Constant | "1" — Pause judgment: paused (service is suspended) |
| `EKK0351A010SC` | SC Code | Optional Service Contract Consent — service component for fetching optional service contract consent data |
| `EKK0361A010SC` | SC Code | Optional Service Contract (ISP) Consent — service component for fetching optional service contract ISP details |
| `EKK0161B004SC` | SC Code | Service Contract Detail List (SYSID) — service component for fetching service contract detail information |
| `EKK1081C011` | Template | Same Transaction Number — template for acquiring shared transaction number |
| `TEMPLATE_ID_EKK0351A010` | Constant | "EKK0351A010" — Template ID key for EKK0351A010 result hash |
| `TEMPLATE_ID_EKK0361A010` | Constant | "EKK0361A010" — Template ID key for EKK0361A010 result hash |
| `TEMPLATE_ID_EKK0161B004` | Constant | "EKK0161B004" — Template ID key for EKK0161B004 result hash |
| `MLAD` | Constant | "mlad" — Mail Address field key in EKK0361A010 result |
| `URL_DOMAIN` | Constant | Key for pre-change URL domain in EKK0361A010 result |
| `URL_ACCOUNT` | Constant | Key for pre-change URL account in EKK0361A010 result |
| `shkkaMap` | Method | Map sanitization — cleans and validates SOD sub-maps before use |
| `shkkaChr` | Method | String trim and null-check wrapper — trims whitespace and handles null |
| `jdgOpSvcKind` | Method | Service type judgment — classifies optional service code into NET/TEL/MOB/ELSE |
| `pauseJdg` | Method | Pause state judgment — determines if the service is currently suspended |
| `addSOD` | Method | Service Order Data creation — registers a new SOD order entry with the given order content code |
| `getSame_trn_no` | Method | Same transaction number acquisition — retrieves a shared transaction ID for grouping |
| `getOldVrsbIdgSvcDtlCd` | Method | Old VR identification — determines the legacy version service detail code for the service (ANK-2765-00-00) |
| `mae_recode_chbf_op_svc_kei_no` | Field | Previous record pre-change optional service number — audit trail for the cancelled service |
| `mae_recode_chbf_op_svc_kei_gene_add_dtm` | Field | Previous record pre-change optional service generation timestamp — audit trail version |
| `old_vrsb_jdg_svc_dtl_cd` | Field | Old VR identification service detail code — legacy version migration support (ANK-2765-00-00) |
| FTTH | Business term | Fiber To The Home — fiber-optic broadband internet service (eo Hikari Net) |
| ISP | Business term | Internet Service Provider — the network access service layer |
| Multisection | Business term | Multi-section service — bundled service package (e.g., FTTH + voice + optional add-ons) |
| Static Multisection | Business term | Non-dynamic multisection — multisection service where the bundle is fixed (not dynamically adjustable) |
| `svc_order_cd` | Field | Service order code — classifies the order type (e.g., 12 = Cancellation, 13 = One-time pause, 14 = Pause release) |
| YOKYU_SBT_CD_DSL | Constant | "03" — Request type: Cancellation |
| eOpticom | Business term | K-Opticom's broadband internet service brand (eo Hikari, eo Mobile, eo Mail, etc.) |
| CC | Acronym | Common Component — shared business logic layer in the K-Opticom system |
| SC | Acronym | Service Component — service layer component handling data access and business operations |
| CBS | Acronym | Common Business Service — component-based service for data retrieval and operations |
