# Business Logic — JKKAdchgHakkoSODCC.hakkoSODTel() [271 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `com.fujitsu.futurity.bp.custom.common.JKKAdchgHakkoSODCC` |
| Layer | CC/Common Component — shared service order dispatch component |
| Module | `common` (Package: `com.fujitsu.futurity.bp.custom.common`) |

## 1. Role

### JKKAdchgHakkoSODCC.hakkoSODTel()

This method orchestrates the **optical telephone (光電話) service order issuance processing** for Fujitsu's K-Opticom eo customer core system. It handles the creation and dispatch of service orders when a subscriber's optical telephone service status changes — covering scenarios such as service addition, contract termination, number addition, and number porting (BMP).

The method acts as a **routing and dispatch hub** that first determines the nature of the service change via `adchgSvcKeiDivJdgTel` (which classifies the change as add, keep, modify, cancel, or hold), then branches into specialized sub-processes based on both the **change type** and the **order issuance trigger** (`odr_exec_div`). Three trigger categories drive distinct behaviors: `ODR_EXEC_DIV_AD_CHG="1"` (address change registration), `ODR_EXEC_DIV_NEW_END="3"` (new construction completion), and `ODR_EXEC_DIV_DSL_END="2"` (withdrawal completion).

The method implements the **delegation pattern** — it does not directly manipulate data but instead calls 13+ specialized methods within `JKKAdchgHakkoSODCC` to set up parameters and execute control logic for each specific order type (service add, DSL withdrawal, number add, BMP switch, VLAN cancellation). A deduplication guard at the entry prevents duplicate orders for the same service detail by checking a cached list of already-processed service identifiers.

This is a **shared utility** called by the broader `hakoSOD` family of methods across both `JKKAdchgHakkoSODCC` (service change context) and `JKKAdchgCancelHakkoSODCC` (cancellation context), serving as the primary entry point for any optical telephone-related service order creation.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["hakkoSODTel start"])
    
    START --> EXTRACT["Extract svc_kei_ucwk_info from sodMap"]
    EXTRACT --> CONCAT["Concat: svc_kei_ucwk_no + saki_svc_kei_ucwk_no + timestamps"]
    CONCAT --> CHECK_EMPTY{svc_kei_ucwk_no_info empty?}
    
    CHECK_EMPTY -->|No| DUPE_CHECK{Check svc_kei_ucwk_no_list
for duplicate}
    CHECK_EMPTY -->|Yes| LOAD_MOTO["Load moto fields:
moto_svc_kei_ucwk_no + moto_svc_kei_ucwk_gene_add_dtm"]
    LOAD_MOTO --> DUPE_CHECK
    
    DUPE_CHECK -->|Found and not isAdd| RETURN["Return param early
Duplicate detected"]
    DUPE_CHECK -->|Not found or isAdd| RESET["Reset flags: bmpJisshiFlg=false,
telDslExe=false"]
    
    RESET --> JDG["Call adchgSvcKeiDivJdgTel
to determine change type"]
    JDG --> ADD_CHECK{Change type ==
AD_CHG_CMT_ADD?}
    ADD_CHECK -->|No| KEEP_CHECK{Change type ==
AD_CHG_CMT_KEEP?}
    KEEP_CHECK -->|No| MODIFY_CHECK{Change type ==
AD_CHG_CMT_MODIFY?}
    MODIFY_CHECK -->|No| CACHE_RETURN["Add svc_kei_ucwk_no_info to list
Return param"]
    
    ADD_CHECK -->|Yes| ODR_EXEC{odr_exec_div ==
ODR_EXEC_DIV_AD_CHG?}
    ODR_EXEC -->|No| ADD_SKIP["No additional processing"]
    ODR_EXEC -->|Yes| IS_ADD_CHECK{isAdd?}
    IS_ADD_CHECK -->|Yes| ADD_SKIP
    IS_ADD_CHECK -->|No| TEL_ADD{telAddExe and
!isBlank svc_kei_ucwk_no?}
    TEL_ADD -->|Yes| SVC_ADD["setParamSvcAddOdr
call svcAddOdrCtrl"]
    TEL_ADD -->|No| ADD_SKIP
    SVC_ADD --> ADD_SKIP
    
    ADD_SKIP --> CACHE_RETURN
    
    KEEP_CHECK -->|Yes| KEEP_ODR{odr_exec_div ==
ODR_EXEC_DIV_AD_CHG?}
    KEEP_ODR -->|Yes| KEEP_AD["No-op: address change skipped"]
    KEEP_ODR -->|No| KEEP_NEW{odr_exec_div ==
ODR_EXEC_DIV_NEW_END?}
    KEEP_NEW -->|No| KEEP_DSL{odr_exec_div ==
ODR_EXEC_DIV_DSL_END?}
    KEEP_DSL -->|No| CACHE_RETURN
    KEEP_DSL -->|Yes| KEEP_DSL_ADD{isAdd?}
    KEEP_DSL_ADD -->|Yes| CACHE_RETURN
    KEEP_DSL_ADD -->|No| KEEP_DSL_PROC["setParamHtelNoDslOdr002
htelNoDslOdrCtrl002
htelNoDslOdrCtrl
vlanOrderUk conditional"]
    KEEP_DSL_PROC --> CACHE_RETURN
    KEEP_NEW -->|Yes| KEEP_NEW_ADD{isAdd?}
    KEEP_NEW_ADD -->|Yes| KEEP_NEW_ADD_PROC["setParamHtelNoAddOdr
htelNoAddOdrCtrl"]
    KEEP_NEW_ADD -->|No| KEEP_NEW_PROC["setParamHtelNoDslOdr003
htelNoDslOdrCtrl002
setParamHtelNoDslOdr001
htelNoDslOdrCtrl
setParamBmpSwitchOdr if BMP
updBmpKojiStat if BMP"]
    KEEP_NEW_PROC --> CACHE_RETURN
    KEEP_NEW_ADD_PROC --> CACHE_RETURN
    KEEP_AD --> CACHE_RETURN
    
    MODIFY_CHECK -->|Yes| MOD_ODR{odr_exec_div ==
ODR_EXEC_DIV_AD_CHG?}
    MOD_ODR -->|Yes| MOD_AD["No-op: address change skipped"]
    MOD_ODR -->|No| MOD_NEW{odr_exec_div ==
ODR_EXEC_DIV_NEW_END?}
    MOD_NEW -->|No| MOD_DSL{odr_exec_div ==
ODR_EXEC_DIV_DSL_END?}
    MOD_DSL -->|No| CACHE_RETURN
    MOD_DSL -->|Yes| MOD_DSL_ADD{isAdd?}
    MOD_DSL_ADD -->|Yes| CACHE_RETURN
    MOD_DSL_ADD -->|No| MOD_DSL_PROC["setParamHtelNoDslOdr004
htelNoDslOdrCtrl002
setParamHtelNoDslOdr002
htelNoDslOdrCtrl
vlanOrderUk conditional"]
    MOD_DSL_PROC --> CACHE_RETURN
    MOD_NEW -->|Yes| MOD_NEW_ADD{isAdd?}
    MOD_NEW_ADD -->|Yes| MOD_NEW_ADD_PROC["setParamHtelNoAddOdr
htelNoAddOdrCtrl"]
    MOD_NEW_ADD -->|No| MOD_NEW_PROC["setParamHtelNoDslOdr003
htelNoDslOdrCtrl002
setParamHtelNoDslOdr001
htelNoDslOdrCtrl
setParamBmpSwitchOdr if BMP
updBmpKojiStat if BMP"]
    MOD_NEW_PROC --> CACHE_RETURN
    MOD_NEW_ADD_PROC --> CACHE_RETURN
    MOD_AD --> CACHE_RETURN
    
    CACHE_RETURN --> END(["Return param end"])
```

### Constant Resolution Reference

| Constant | Actual Value | Business Meaning |
|----------|-------------|-----------------|
| `JKKAdchgHakkoSODConstCC.AD_CHG_CMT_ADD` | `"0"` | Address change registration method: Add |
| `JKKAdchgHakkoSODConstCC.AD_CHG_CMT_KEEP` | `"1"` | Address change registration method: Keep (continue) |
| `JKKAdchgHakkoSODConstCC.AD_CHG_CMT_MODIFY` | `"2"` | Address change registration method: Modify (change) |
| `JKKAdchgHakkoSODConstCC.ODR_EXEC_DIV_AD_CHG` | `"1"` | Order issuance trigger: Address change registration |
| `JKKAdchgHakkoSODConstCC.ODR_EXEC_DIV_NEW_END` | `"3"` | Order issuance trigger: New construction completion |
| `JKKAdchgHakkoSODConstCC.ODR_EXEC_DIV_DSL_END` | `"2"` | Order issuance trigger: Withdrawal completion |
| `JKKHakkoSODConstCC.SVC_KEI_UCWK_INFO` | `"svc_kei_ucwk_info"` | Map key for service detail information |

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `param` | `IRequestParameterReadWrite` | The model group and control map containing all request/response parameters for the service order screen. Used to read and write business data throughout processing. |
| 2 | `sodMap` | `HashMap<String, Object>` | Service Order Data map — carries the complete service order context including service detail info (`svc_kei_ucwk_info`), service info (`svc_kei_info`), and other order-specific attributes. Key source for deduplication logic. |
| 3 | `fixedText` | `String` | User-defined arbitrary string — free-text field that may be included in order headers for reference or traceability (e.g., work order number, customer note). |
| 4 | `use_svc_chg_div` | `String` | Use service change classification — indicates whether the service is being added, modified, or cancelled. Used as input to `adchgSvcKeiDivJdgTel` to determine the change type branch (add/keep/modify/cancel). Values include `"0"` (Add), `"1"` (Keep), `"2"` (Modify), `"3"` (Cancel). |
| 5 | `odr_exec_div` | `String` | Order issuance trigger classification — determines what business event initiated this order. Values: `"1"` = address change registration, `"2"` = withdrawal completion, `"3"` = new construction completion. Drives the inner conditional branching. |
| 6 | `isAdd` | `boolean` | OM-2013-000XXXX emergency case flag (小倉部長緊急案件対応). When `true`, processing is bypassed for duplicate-check and some DSL order paths — used to handle urgent customer escalation scenarios. When `false`, normal order issuance logic applies. |

### Instance fields read by the method

| Field | Type | Business Description |
|-------|------|---------------------|
| `svc_kei_ucwk_no_list` | `List<String>` | Cache list of processed service detail identifiers — used to prevent duplicate order issuance for the same service contract line item. |
| `bmpJisshiFlg` | `boolean` | BMP (Number Portability) execution flag — reset to `false` at the start of processing to initialize the portability state for this order cycle. |
| `telDslExe` | `boolean` | Telephone DSL execution flag — reset to `false` at the start; relates to DSL service execution state (IKK-2013-0001085). |
| `telAddExe` | `boolean` | Telephone addition execution flag — checked when deciding whether to process service addition orders under the add branch. |
| `svc_kei_no_list` | `List<String>` | Service number tracking list — checked before VLAN cancellation to prevent duplicate VLAN order issuance for the same service number. |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `JKKAdchgHakkoSODCC.adchgSvcKeiDivJdgTel` | JKKAdchgHakkoSODCC | - | Calls `adchgSvcKeiDivJdgTel` in `JKKAdchgHakkoSODCC` to determine the service change type (add/keep/modify/cancel/hold). Returns a classification code used for routing. |
| - | `JKKAdchgHakkoSODCC.htelNoAddOdrCtrl` | JKKAdchgHakkoSODCC | - | Calls `htelNoAddOdrCtrl` in `JKKAdchgHakkoSODCC` — Optical telephone number addition order control processing. Executes the number addition flow for new services. |
| - | `JKKAdchgHakkoSODCC.htelNoDslOdrCtrl` | JKKAdchgHakkoSODCC | - | Calls `htelNoDslOdrCtrl` in `JKKAdchgHakkoSODCC` — Optical telephone DSL withdrawal order control processing. Handles contract termination orders. ANK-2561-00-00 updated to pass `odr_exec_div` as 5th parameter. |
| - | `JKKAdchgHakkoSODCC.htelNoDslOdrCtrl002` | JKKAdchgHakkoSODCC | - | Calls `htelNoDslOdrCtrl002` in `JKKAdchgHakkoSODCC` — DSL withdrawal order control (050 process specialized). A specialized variant of DSL withdrawal used for new construction completion and withdrawal completion paths. |
| - | `JKKAdchgHakkoSODCC.isBlank` | JKKAdchgHakkoSODCC | - | Calls `isBlank` in `JKKAdchgHakkoSODCC` — Utility check for null/empty/whitespace-only strings. Used to guard service addition processing. |
| - | `JKKAdchgHakkoSODCC.isBmp` | JKKAdchgHakkoSODCC | - | Calls `isBmp` in `JKKAdchgHakkoSODCC` — Checks whether the current order involves a BMP (Business Mobile Portability / number portability) transaction. Returns boolean. |
| - | `JKKAdchgHakkoSODCC.setParamBmpSwitchOdr` | JKKAdchgHakkoSODCC | - | Calls `setParamBmpSwitchOdr` in `JKKAdchgHakkoSODCC` — Sets up parameters for the number portability switch order. Prepares BMP order data in the parameter map. |
| - | `JKKAdchgHakkoSODCC.setParamHtelNoAddOdr` | JKKAdchgHakkoSODCC | - | Calls `setParamHtelNoAddOdr` in `JKKAdchgHakkoSODCC` — Sets up parameters for the optical telephone number addition order. |
| - | `JKKAdchgHakkoSODCC.setParamHtelNoDslOdr001` | JKKAdchgHakkoSODCC | - | Calls `setParamHtelNoDslOdr001` in `JKKAdchgHakkoSODCC` — Sets up parameters for the optical telephone DSL withdrawal order (standard path). |
| - | `JKKAdchgHakkoSODCC.setParamHtelNoDslOdr002` | JKKAdchgHakkoSODCC | - | Calls `setParamHtelNoDslOdr002` in `JKKAdchgHakkoSODCC` — Sets up parameters for the optical telephone DSL withdrawal order (DSL_END / withdrawal completion path). |
| - | `JKKAdchgHakkoSODCC.setParamHtelNoDslOdr003` | JKKAdchgHakkoSODCC | - | Calls `setParamHtelNoDslOdr003` in `JKKAdchgHakkoSODCC` — Sets up parameters for the optical telephone DSL withdrawal order (050 process specialized, NEW_END path). Conditional return determines whether `htelNoDslOdrCtrl002` is invoked. |
| - | `JKKAdchgHakkoSODCC.setParamHtelNoDslOdr004` | JKKAdchgHakkoSODCC | - | Calls `setParamHtelNoDslOdr004` in `JKKAdchgHakkoSODCC` — Sets up parameters for the optical telephone DSL withdrawal order (DSL_END specialized path). Conditional return controls `htelNoDslOdrCtrl002` invocation. |
| - | `JKKAdchgHakkoSODCC.setParamSvcAddOdr` | JKKAdchgHakkoSODCC | - | Calls `setParamSvcAddOdr` in `JKKAdchgHakkoSODCC` — Sets up parameters for the service addition order. Prepares data for new service registration. |
| - | `JKKAdchgHakkoSODCC.svcAddOdrCtrl` | JKKAdchgHakkoSODCC | - | Calls `svcAddOdrCtrl` in `JKKAdchgHakkoSODCC` — Service addition order control processing. Executes the complete service registration flow after parameters are set. |
| - | `JKKAdchgHakkoSODCC.updBmpKojiStat` | JKKAdchgHakkoSODCC | - | Calls `updBmpKojiStat` in `JKKAdchgHakkoSODCC` — Updates the BMP construction status (番工ステータス更新処理). Records the number portability work status in the system (OM-2013-0002465). |
| - | `JKKAdchgHakkoSODCC.vlanOrderUk` | JKKAdchgHakkoSODCC | - | Calls `vlanOrderUk` in `JKKAdchgHakkoSODCC` — VLAN cancellation order issuance. Issues a VLAN contract cancellation order for the service (ST2-2013-0001404). Guards against duplicates using `svc_kei_no_list`. |

**CRUD Classification Summary:**

| CRUD | Method | Business Description |
|------|--------|---------------------|
| C | `setParamSvcAddOdr` + `svcAddOdrCtrl` | Create: Service addition order for new optical telephone registration |
| C | `setParamHtelNoAddOdr` + `htelNoAddOdrCtrl` | Create: Optical telephone number addition order |
| C | `setParamHtelNoDslOdr001/002/003/004` + `htelNoDslOdrCtrl/002` | Create: Optical telephone DSL withdrawal order (4 specialized paths) |
| C | `vlanOrderUk` | Create: VLAN cancellation order |
| U | `setParamBmpSwitchOdr` | Update: Prepare number portability switch order parameters |
| U | `updBmpKojiStat` | Update: Update number portability construction status table (OM-2013-0002465) |
| R | `adchgSvcKeiDivJdgTel` | Read: Determine service change classification |
| R | `isBlank` | Read: Null/empty string check utility |
| R | `isBmp` | Read: Check if current order involves number portability |

## 5. Dependency Trace

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

No screen/batch entry points found within 8 hops. Direct callers found: 6 methods.

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | CBS: `JKKAdchgHakkoSODCC` | `hakoSOD` → iterates `kiki_trgt_data_list` / `opt_trgt_data_list` → calls `hakkoSODTel` for each TEL service | `vlanOrderUk [C]`, `htelNoDslOdrCtrl [C]`, `htelNoDslOdrCtrl002 [C]`, `htelNoAddOdrCtrl [C]`, `svcAddOdrCtrl [C]`, `updBmpKojiStat [U]` |
| 2 | CBS: `JKKAdchgHakkoSODCC` | `hakoSOD` → processes `kiki_trgt_data_list` (primary target) → `svcKeiJdg` → `hakkoSODTel(..., false)` | `vlanOrderUk [C]`, `htelNoDslOdrCtrl [C]`, `htelNoDslOdrCtrl002 [C]`, `htelNoAddOdrCtrl [C]`, `svcAddOdrCtrl [C]` |
| 3 | CBS: `JKKAdchgHakkoSODCC` | `hakoSOD` → processes `opt_trgt_data_list` (option target) → `svcKeiJdg` → `hakkoSODTel(..., false)` | `vlanOrderUk [C]`, `htelNoDslOdrCtrl [C]`, `htelNoDslOdrCtrl002 [C]`, `htelNoAddOdrCtrl [C]`, `svcAddOdrCtrl [C]` |
| 4 | CBS: `JKKAdchgHakkoSODCC` | `hakoSOD` → OM-2013-000XXXX path → processes `opt_trgt_data_list` again with `isAdd=true` | `htelNoDslOdrCtrl [C]`, `htelNoDslOdrCtrl002 [C]`, `htelNoAddOdrCtrl [C]` |
| 5 | CBS: `JKKAdchgCancelHakkoSODCC` | `hakoSOD` → iterates target lists → `svcKeiJdg` → `hakkoSODTel(...)` (overloaded 5-param version) | `vlanOrderUk [C]`, `htelNoDslOdrCtrl [C]`, `htelNoDslOdrCtrl002 [C]`, `htelNoAddOdrCtrl [C]`, `svcAddOdrCtrl [C]` |
| 6 | CBS: `JKKAdchgCancelHakkoSODCC` | `hakoSOD` → processes `kiki_trgt_data_list` and `opt_trgt_data_list` in cancellation context | `vlanOrderUk [C]`, `htelNoDslOdrCtrl [C]`, `htelNoDslOdrCtrl002 [C]` |

**Terminal operations reachable from this method:**
`vlanOrderUk [C]`, `htelNoDslOdrCtrl [C]`, `setParamHtelNoDslOdr002 [U]`, `htelNoDslOdrCtrl002 [C]`, `setParamHtelNoDslOdr004 [U]`, `htelNoAddOdrCtrl [C]`, `setParamHtelNoAddOdr [U]`, `updBmpKojiStat [U]`, `setParamBmpSwitchOdr [U]`, `isBmp [R]`, `isBlank [R]`, `setParamHtelNoDslOdr001 [U]`, `setParamHtelNoDslOdr003 [U]`, `vlanOrderUk [C]`, `svcAddOdrCtrl [C]`, `setParamSvcAddOdr [U]`

## 6. Per-Branch Detail Blocks

### Block 1 — [SET/EXTRACT] Extract service detail info (L23946)

The method begins by extracting the service detail information map from `sodMap` and pulling key identifiers for deduplication.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `svc_kei_ucwk_info_Map = (HashMap)sodMap.get(JKKHakkoSODConstCC.SVC_KEI_UCWK_INFO)` — Extracts service detail info map from SOD map [-> `SVC_KEI_UCWK_INFO` = `"svc_kei_ucwk_info"`] |
| 2 | EXEC | `svc_kei_ucwk_no = (String)svc_kei_ucwk_info_Map.get("svc_kei_ucwk_no")` — Service detail number |
| 3 | EXEC | `saki_svc_kei_ucwk_no = (String)svc_kei_ucwk_info_Map.get("saki_svc_kei_ucwk_no")` — Prior service detail number (for number changes) |
| 4 | EXEC | `chbf_svc_kei_ucwk_gene_add_dtm = (String)svc_kei_ucwk_info_Map.get("chbf_svc_kei_ucwk_gene_add_dtm")` — Change-before service detail registration datetime |
| 5 | EXEC | `chaf_svc_kei_ucwk_gene_add_dtm = (String)svc_kei_ucwk_info_Map.get("chaf_svc_kei_ucwk_gene_add_dtm")` — Change-after service detail registration datetime |

### Block 2 — [SET] Concatenate deduplication key (L23953)

| # | Type | Code |
|---|------|------|
| 1 | SET | `svc_kei_ucwk_no_info = svc_kei_ucwk_no + saki_svc_kei_ucwk_no + chbf_svc_kei_ucwk_gene_add_dtm + chaf_svc_kei_ucwk_gene_add_dtm` — Creates unique service detail signature for duplicate detection |

### Block 3 — [IF] IKK-2013-0001085: Load moto fields if info is empty (L23955)

> If the concatenated key is empty (recorded record not yet stored), load the original (moto) service fields. This handles cases where the service detail was created from a prior contract (e.g., port-in scenario).

| # | Type | Code |
|---|------|------|
| 1 | SET | `moto_svc_kei_ucwk_no = (String)svc_kei_ucwk_info_Map.get("moto_svc_kei_ucwk_no")` |
| 2 | SET | `moto_svc_kei_ucwk_gene_add_dtm = (String)svc_kei_ucwk_info_Map.get("moto_svc_kei_ucwk_gene_add_dtm")` |
| 3 | SET | `svc_kei_ucwk_no_info = svc_kei_ucwk_no_info + moto_svc_kei_ucwk_no + moto_svc_kei_ucwk_gene_add_dtm` |

### Block 4 — [IF] OM-2013-000XXXX: Duplicate check (L23963)

> If the service detail signature is already in the processed list AND `isAdd` is `false`, skip all processing and return early. This prevents duplicate order issuance. Note: The original `isAdd` condition was removed in the emergency case fix (OM-2013-000XXXX) so that `isAdd=true` cases always proceed.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `svc_kei_ucwk_no_list.contains(svc_kei_ucwk_no_info)` — Check if this service detail was already processed |
| 2 | RETURN | `return param;` — Early return; duplicate detected, no further processing |

### Block 5 — [SET] Reset execution flags (L23968)

> Initialize execution state flags for this processing cycle. IKK-2013-0001085 added `telDslExe` reset.

| # | Type | Code |
|---|------|------|
| 1 | SET | `bmpJisshiFlg = false;` — Reset BMP execution flag |
| 2 | SET | `telDslExe = false;` — Reset telephone DSL execution flag (IKK-2013-0001085) |

### Block 6 — [CALL] Determine change classification (L23973)

> Calls the change type classifier to determine whether this is an add, keep, modify, cancel, or hold scenario.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `jdgChgDivTel = adchgSvcKeiDivJdgTel(param, use_svc_chg_div, sodMap)` — Returns one of AD_CHG_CMT_ADD/KEEP/MODIFY/SLRE/HOLD constants |

### Block 7 — [IF] AD_CHG_CMT_ADD = "0" (Address change: Add) (L23975)

> The service is being newly added. Under this branch, processing is further gated by `odr_exec_div`.

#### Block 7.1 — [IF] ODR_EXEC_DIV_AD_CHG = "1" (Address change registration) (L23978)

> For address change registration with add type, process only when `isAdd` is `false` (OM-2013-000XXXX).

##### Block 7.1.1 — [IF] isAdd (OM-2013-000XXXX emergency gate) (L23982)

> When `isAdd` is true, skip the service addition processing entirely (emergency case path).

##### Block 7.1.2 — [IF] telAddExe && !isBlank(svc_kei_ucwk_no) (L23987)

> Only process service addition if the telephone addition execution flag is set and the service detail number exists.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setParamSvcAddOdr(param, sodMap)` — Set up service addition order parameters |
| 2 | CALL | `svcAddOdrCtrl(keepSesHandle.get(), param, sodMap)` — Execute service addition order control |
| 3 | SET | `telAddExe = false;` — Reset the addition execution flag |

### Block 8 — [IF] AD_CHG_CMT_KEEP = "1" (Address change: Keep) (L23998)

> The service change type is "keep" — the service contract continues with the same essential attributes. The address change registration path is a no-op here.

#### Block 8.1 — [IF] ODR_EXEC_DIV_AD_CHG = "1" (L24001)

> No processing ("なにもしない"). Address change registration is skipped for keep type.

#### Block 8.2 — [IF] ODR_EXEC_DIV_NEW_END = "3" (New construction completion) (L2404)

> When new construction is complete, issue DSL withdrawal orders and/or number addition orders depending on `isAdd`.

##### Block 8.2.1 — [IF] !isAdd (DSL withdrawal path) (L2406)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setParamHtelNoDslOdr003(...)` — Set DSL withdrawal order params (050 process specialized) — conditional return controls next step |
| 2 | EXEC | `htelNoDslOdrCtrl002(...)` — Execute DSL withdrawal (only if setParam returns true) |
| 3 | CALL | `setParamHtelNoDslOdr001(param, sodMap)` — Set standard DSL withdrawal order parameters |
| 4 | CALL | `htelNoDslOdrCtrl(keepSesHandle.get(), param, fixedText, sodMap, odr_exec_div)` — Execute DSL withdrawal order control [ANK-2561-00-00: 5-param variant] |
| 5 | IF | `!isBlank(svc_kei_ucwk_no) && isBmp(...)` — If BMP is involved, set up and update portability work status |
| 6 | CALL | `setParamBmpSwitchOdr(param, sodMap)` — Set up BMP switch order parameters |
| 7 | CALL | `updBmpKojiStat(param, sodMap)` — Update BMP construction status [OM-2013-0002465] |

##### Block 8.2.2 — [ELSE IF] isAdd (Number addition path) (L24058)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setParamHtelNoAddOdr(param, sodMap)` — Set up optical telephone number addition order parameters |
| 2 | CALL | `htelNoAddOdrCtrl(keepSesHandle.get(), param, sodMap)` — Execute number addition order control |

#### Block 8.3 — [IF] ODR_EXEC_DIV_DSL_END = "2" (Withdrawal completion) (L24066)

> When withdrawal is complete, issue DSL withdrawal orders and potentially VLAN cancellation.

##### Block 8.3.1 — [IF] !isAdd (Withdrawal path) (L24068)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setParamHtelNoDslOdr004(...)` — Set DSL withdrawal order params (DSL_END specialized) |
| 2 | EXEC | `htelNoDslOdrCtrl002(...)` — Execute DSL withdrawal (conditional) |
| 3 | CALL | `setParamHtelNoDslOdr002(param, sodMap)` — Set DSL withdrawal order parameters (DSL_END path) |
| 4 | CALL | `htelNoDslOdrCtrl(keepSesHandle.get(), param, fixedText, sodMap, odr_exec_div)` — Execute DSL withdrawal |
| 5 | EXEC | `svc_kei_info = (HashMap)sodMap.get("svc_kei_info")` — Extract service info for VLAN check |
| 6 | IF | `!svc_kei_no_list.contains(svc_kei_info.get("svc_kei_no"))` — Guard VLAN order issuance against duplicates |
| 7 | CALL | `vlanOrderUk(keepSesHandle.get(), param, sodMap, fixedText)` — Issue VLAN cancellation order [ST2-2013-0001404] |
| 8 | EXEC | `svc_kei_no_list.add((String)svc_kei_info.get("svc_kei_no"))` — Track service number as processed |

### Block 9 — [IF] AD_CHG_CMT_MODIFY = "2" (Address change: Modify) (L24080)

> The service is being modified. The branching structure mirrors Block 8 (KEEP) exactly — same `odr_exec_div` sub-paths with identical sub-operations. This is because modify and keep both use the same DSL withdrawal and number addition order control paths.

#### Block 9.1 — [IF] ODR_EXEC_DIV_AD_CHG = "1" (L24082)

> No processing ("なにもしない"). Same as the keep branch.

#### Block 9.2 — [IF] ODR_EXEC_DIV_NEW_END = "3" (L24086)

> Identical to Block 8.2. Processes DSL withdrawal (for !isAdd) or number addition (for isAdd), with BMP handling in the withdrawal path.

#### Block 9.3 — [IF] ODR_EXEC_DIV_DSL_END = "2" (L24110)

> Identical to Block 8.3. Processes DSL withdrawal with VLAN cancellation, using the specialized `setParamHtelNoDslOdr004` and `setParamHtelNoDslOdr002` paths.

### Block 10 — [EXEC] Cache and return (L24134)

> After all conditional branches complete, add the service detail signature to the deduplication list and return the parameter object.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `svc_kei_ucwk_no_list.add(svc_kei_ucwk_no_info)` — Record this service detail as processed to prevent future duplicate orders |
| 2 | RETURN | `return param;` — Return the updated parameter object |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `svc_kei_ucwk_no` | Field | Service detail number — internal tracking ID for a service contract line item (e.g., an individual FTTH or telephone line under a customer account) |
| `svc_kei_ucwk_info` | Field | Service detail information map key — used to access the service detail sub-map within `sodMap` |
| `saki_svc_kei_ucwk_no` | Field | Prior service detail number — the service detail number before a change (e.g., before number porting or contract succession) |
| `moto_svc_kei_ucwk_no` | Field | Original/old service detail number — the service detail number of the source contract in port-in or succession scenarios |
| `chbf_svc_kei_ucwk_gene_add_dtm` | Field | Change-before service detail registration datetime — timestamp when the prior service detail was registered |
| `chaf_svc_kei_ucwk_gene_add_dtm` | Field | Change-after service detail registration datetime — timestamp when the new service detail was registered |
| `moto_svc_kei_ucwk_gene_add_dtm` | Field | Original service detail registration datetime — registration timestamp of the source contract |
| `svc_kei_ucwk_no_list` | Field | Processed service detail number cache list — prevents duplicate order issuance for the same service contract line item |
| `svc_kei_no_list` | Field | Service number tracking list — used to guard VLAN cancellation order issuance against duplicates |
| `bmpJisshiFlg` | Field | BMP execution flag — indicates whether number portability work is being performed in this cycle |
| `telDslExe` | Field | Telephone DSL execution flag — relates to DSL service execution state (IKK-2013-0001085) |
| `telAddExe` | Field | Telephone addition execution flag — indicates whether telephone addition processing should occur |
| `isBmp` | Field | Number portability check — determines if the current order involves a BMP (number portability) transaction |
| SOD | Acronym | Service Order Data — the core telecom order fulfillment entity that carries order information through the system |
| SODマップ | Field | SOD map — a HashMap carrying the complete service order context including service detail, service info, and order attributes |
| SOD品向対応 | Business term | SOD product expansion対応 (対応 = countermeasure/response) — feature enhancements to support new SOD order types |
| FTTH | Business term | Fiber To The Home — fiber-optic broadband internet service offered by K-Opticom |
| 光電話 | Business term | Optical telephone — K-Opticom's fiber-optic telephone service (as distinct from traditional copper PSTN) |
| サービスオーダー | Business term | Service Order — an internal work order dispatched to field operations or partner systems for service activation, modification, or cancellation |
| オーダ発行契機区分 | Field | Order issuance trigger classification (`odr_exec_div`) — determines the business event that initiated order creation |
| 利用サービス変更区分 | Field | Use service change classification (`use_svc_chg_div`) — indicates whether the service is being added, modified, or cancelled |
| BMP | Business term | Business Mobile Portability (番号ポータビリティ) — mobile/fixed telephone number portability service allowing customers to retain their phone number when switching providers |
| VLAN | Technical term | Virtual LAN — virtual network segmentation used in K-Opticom's broadband service architecture |
| 番ポ | Abbreviation | Short for 番号ポータビリティ (Number Portability) — commonly abbreviated as "番ポ" in K-Opticom documentation |
| 工事ステータス | Business term | Construction/work status (Koji status) — tracks the progress of field work orders related to service installation or modification |
| 住所変更登録 | Business term | Address change registration — one of the three order issuance triggers; triggered when a customer's registered address changes |
| 新設完了 | Business term | New construction completion — triggered when new building infrastructure is completed and services can be activated |
| 撤去完了 | Business term | Withdrawal completion — triggered when a service is being decommissioned/removed |
| ユーザ任意文字列 | Field | User-defined arbitrary string (`fixedText`) — free-text field included in order documentation for traceability |
| AD_CHG_CMT_ADD | Constant | Address change registration method: Add = `"0"` |
| AD_CHG_CMT_KEEP | Constant | Address change registration method: Keep (continue) = `"1"` |
| AD_CHG_CMT_MODIFY | Constant | Address change registration method: Modify (change) = `"2"` |
| AD_CHG_CMT_SLRE | Constant | Address change registration method: Cancel = `"3"` |
| AD_CHG_CMT_SLRE_WITH_ADD | Constant | Address change registration method: Cancel with new = `"4"` |
| AD_CHG_CMT_HOLD | Constant | Address change registration method: Hold = `"5"` |
| ODR_EXEC_DIV_AD_CHG | Constant | Order issuance trigger: Address change registration = `"1"` |
| ODR_EXEC_DIV_DSL_END | Constant | Order issuance trigger: Withdrawal completion = `"2"` |
| ODR_EXEC_DIV_NEW_END | Constant | Order issuance trigger: New construction completion = `"3"` |
| 小倉部長緊急案件対応 | Business term | OM-2013-000XXXX (Okura Department Manager Emergency Case) — a special handling path (`isAdd` flag) for urgent customer escalations |
| IKK-2013-0001085 | JIRA ID | Enhancement adding `telDslExe` field reset and moto field fallback in the deduplication check |
| ANK-2561-00-00 | JIRA ID | Update to `htelNoDslOdrCtrl` to pass `odr_exec_div` as a 5th parameter |
| ST2-2013-0001404 | JIRA ID | Addition of VLAN cancellation order issuance (`vlanOrderUk`) in the DSL_END withdrawal path |
| OM-2013-0002465 | JIRA ID | Addition of BMP construction status update (`updBmpKojiStat`) in the keep/modify-new_end path |