# Business Logic — JKKAdchgHakkoSODCC.hakkoSODNet() [352 LOC]

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

## 1. Role

### JKKAdchgHakkoSODCC.hakkoSODNet()

This method performs **optical FTTH (Fiber-To-The-Home) service order issuance processing** (光ネット サービスオーダー発行処理) for address change (住所変更) scenarios in K-Opticom's customer core system. It acts as a **routing/dispatch coordinator** that evaluates the change classification determined by `adchgSvcKeiDivJdgNet` and dispatches to specialized order control sub-processes based on two orthogonal dimensions: the change registration method (ADD, KEEP, MODIFY, SLRE_WITH_ADD) and the order issuance trigger (AD_CHG, DSL_END, NEW_END).

The method handles four service type categories:
- **ADD (追加)** — New service addition during address change registration, invoking `svcAddOdrCtrl` to register the added service.
- **KEEP (継続)** — Continuation of existing service through address change, issuing cancellation (DSL end) orders for equipment contract changes.
- **MODIFY (変更)** — Service modification during address change, optionally issuing course change orders (`courseChgeOdrCtrl`) when ISP identity changes but the router remains the same, or issuing continuation/cancellation orders.
- **SLRE_WITH_ADD (解約/新規)** — Simultaneous cancellation and new registration during address change, handling relocation email registration (`svcAddMailOdrCtrl`), location change orders, and multi-function router inheritance logic (contract cancellation, re-registration, or modification at the new address).

As a **shared utility** called from `hakkoSOD` during batch SOD emission, it processes both device-based (kiki) and opt-in (opt) target data lists for each service contract in the order issuance queue. It also manages multi-function router (多機能ルーター) service contract transfers, including cancellation of the old router order and registration of the new one, or modification if the router function already exists.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["hakkoSODNet starts"])

    Jdg["jdgChgDivNet = adchgSvcKeiDivJdgNet"]

    Jdg --> Branch1{Is ADD branch}

    Branch1 -->|"Yes"| AddBlock["Add Branch"]
    Branch1 -->|"No"| Branch2{Is KEEP branch}

    AddBlock --> AddOdrDiv{Is Ad Chg trigger}
    AddOdrDiv -->|"Yes"| AddSvc["setParamSvcAddOdr + svcAddOdrCtrl"]
    AddOdrDiv -->|"No"| AddEmpty["No operation"]

    Branch2 -->|"Yes"| KeepBlock["Keep Branch"]
    Branch2 -->|"No"| Branch3{Is MODIFY branch}

    KeepBlock --> KeepOdrDiv{Is DSL END trigger}
    KeepOdrDiv -->|"Yes"| KeepSvc["opSetOdrCtrl + kikiDslOdrCtrl"]
    KeepOdrDiv -->|"No"| KeepEmpty["No operation"]

    Branch3 -->|"Yes"| ModifyBlock["Modify Branch"]
    Branch3 -->|"No"| Branch4{Is SLRE_WITH_ADD branch}

    ModifyBlock --> ModOdrDiv1{Is Ad Chg trigger}
    ModOdrDiv1 -->|"Yes"| ModCrs{"crsChgJdgNet"}
    ModOdrDiv1 -->|"No"| ModOdrDiv2{Is DSL END trigger}
    ModOdrDiv2 -->|"Yes"| ModKeepSvc["opSetOdrCtrl + kikiDslOdrCtrl"]
    ModOdrDiv2 -->|"No"| ModOdrDiv3{Is NEW END trigger}
    ModOdrDiv3 -->|"Yes"| ModNewEnd["No operation"]

    ModCrs -->|"Yes"| ModCrsSvc["setParamCourseChgeOdr + courseChgeOdrCtrl"]
    ModCrs -->|"No"| ModCrsElse["No operation"]

    Branch4 -->|"Yes"| SlreBlock["Slre+Add Branch"]
    Branch4 -->|"No"| SlreEmpty["No operation"]

    SlreBlock --> SlreOdrDiv1{Is Ad Chg trigger}
    SlreOdrDiv1 -->|"Yes"| Slre1a["ChgPlaceOdr + adchgOdrCtrl + opSetOdrCtrl + svcAddMailOdrCtrl"]
    SlreOdrDiv1 -->|"No"| SlreOdrDiv2{Is DSL END trigger}
    SlreOdrDiv2 -->|"Yes"| Slre2a["ChgPlaceOdr001 + adchgOdrCtrl + opDslOdrCtrl"]
    SlreOdrDiv2 -->|"No"| SlreOdrDiv3{Is NEW END trigger}
    SlreOdrDiv3 -->|"Yes"| Slre3a["setParamOpSetOdr003 + isMansHhsSwchflg branch"]

    Slre3a --> RouterCheck{isRouterHikiZumi?}
    RouterCheck -->|"No"| RouterCheck2{VA func exists?}
    RouterCheck2 -->|"No"| RouterDel["addSOD 419 + addSOD 420"]
    RouterCheck2 -->|"Yes"| RouterMod["addSOD 405 + addSodBbrFuncToMfr"]
    RouterDel --> RegRouter["addSOD 401 + isRouterHikiZumi true"]
    RouterMod --> RegRouter2["runEKK0251A010 + isRouterHikiZumi true"]

    AddEmpty --> END2(("Return param"))
    AddSvc --> END2
    KeepEmpty --> END2
    KeepSvc --> END2
    ModNewEnd --> END2
    ModCrsSvc --> END2
    ModCrsElse --> END2
    ModKeepSvc --> END2
    Slre1a --> END2
    Slre2a --> END2
    Slre3a --> END2
    SlreEmpty --> END2
    RouterDel --> END2
    RouterMod --> END2
    RegRouter --> END2
    RegRouter2 --> END2
    RouterCheck2 -->|"VA null or canceled"| RouterDel
```

**Constant Resolutions:**

| Constant | Value | Business Meaning |
|----------|-------|-----------------|
| `AD_CHG_CMT_ADD` | `"0"` | Change registration method: Add (追加) |
| `AD_CHG_CMT_KEEP` | `"1"` | Change registration method: Continue (継続) |
| `AD_CHG_CMT_MODIFY` | `"2"` | Change registration method: Modify (変更) |
| `AD_CHG_CMT_SLRE_WITH_ADD` | `"4"` | Change registration method: Cancel/New (解約/新規) |
| `ODR_EXEC_DIV_AD_CHG` | `"1"` | Order issuance trigger: Address change registration (住所変更登録) |
| `ODR_EXEC_DIV_DSL_END` | `"2"` | Order issuance trigger: Removal completed (撤去完了) |
| `ODR_EXEC_DIV_NEW_END` | `"3"` | Order issuance trigger: New installation completed (新設完了) |
| `ODR_NAIYO_CD_401` | `"401"` | Multi-function router setup/registration (router function registration) |
| `ODR_NAIYO_CD_405` | `"405"` | Multi-function router setup/change (router function change) |
| `ODR_NAIYO_CD_419` | `"419"` | Multi-function router setup/cancellation (router function cancellation) |
| `ODR_NAIYO_CD_420` | `"420"` | Multi-function router setup/deletion (router function deletion) |
| `KKOP_SVC_CD_BBR` | `"G01"` | Device operation service code: Router function |
| `KKOP_SVC_CD_VA` | `"G02"` | Device operation service code: VA function |
| `SVC_ORDER_CD_MRT` | `"26"` | Service order code for MRT (multi-line router) |
| `FUNC_CODE_1` | `"1"` | Function code 1 (data query/read operations) |
| `FUNC_CODE_2` | `"2"` | Function code 2 (write/update operations) |
| `INFO_SAKI_SVC_KEI_NO` | `"saki_svc_kei_no"` | Previous service contract number (prior to transfer) |

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | Session handle containing session management context (database connections, transaction state). Used for all service component calls and data access operations throughout the method. |
| 2 | `param` | `IRequestParameterReadWrite` | Request parameter object containing the model group and control map. Carries business data between layers and is returned with updated SOD (Service Order Data) information after processing. |
| 3 | `sodMap` | `HashMap<String, Object>` | Service Order Data map containing service contract details, service detail information, router settings, order content codes, and transfer-related fields. The central data structure transformed by this method. |
| 4 | `fixedText` | `String` | User-defined arbitrary character string used for passing fixed text data through the processing chain (e.g., operator ID, reference notes). |
| 5 | `use_svc_chg_div` | `String` | Used service change classification — determines whether the service is being added, continued, modified, or cancelled. This is a primary dimension of the routing decision, evaluated after the internal `adchgSvcKeiDivJdgNet` judgment. |
| 6 | `odr_exec_div` | `String` | Order issuance trigger classification — indicates the business event that triggered order emission. Valid values: `"1"` (address change registration), `"2"` (removal completed), `"3"` (new installation completed). This is the secondary dimension of the routing decision. |
| 7 | `adchg_mskm_dtl_no` | `String` | Address change statement detail number — internal tracking ID for the address change application record. Used for referencing specific change details during continuation order processing. |

**Instance fields read by this method:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `isRouterHikiZumi` | `boolean` | Router inheritance execution flag — tracks whether multi-function router transfer has already been processed to prevent duplicate order emission. Default: `false`. |
| `same_trn_no` | `String` | Unified processing number — shared transaction number used to correlate related order operations. |
| `kiki_seizo_no` | `String[1]` | Device manufacturing number — factory serial number of the router equipment. |
| `taknkiki_model_cd` | `String[1]` | Indoor equipment model code — product model identifier for the customer router. |
| `kktk_svc_kei_no` | `String[1]` | KKTk service contract number — the service contract number associated with the multi-function router. |
| `kktk_svc_kei_gadtm` | `String[1]` | KKTk service contract generation registration date/time. |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `JCCBPCommon.getOpeDate` | JCCBPCommon | `KK_T_OPE_DATE` | Retrieves current operational date from system settings |
| R | `JFUEoTvCngAddStbCC.getOpeDate` | JFUEoTvCngAddStbCC | `KK_T_OPE_DATE` | Retrieves operational date (fallback reference) |
| R | `JFUHikkosiNaviRelAddCC.getOpeDate` | JFUHikkosiNaviRelAddCC | `KK_T_OPE_DATE` | Retrieves operational date (fallback reference) |
| C | `JKKAdchgHakkoSODCC.addSOD` | JKKAdchgHakkoSODCC | `KK_T_SVC_ORDER`, `KK_T_SVC_ORDER_DTL` | Registers a service order line item with specified order content code (419, 420, 401, 405) |
| C | `JKKAdchgHakkoSODCC.addSodBbrFuncToMfr` | JKKAdchgHakkoSODCC | `KK_T_SVC_ORDER`, `KK_T_SVC_ORDER_DTL` | Registers service order for multi-function router function change (brand/vendor mapping) |
| R | `JKKAdchgHakkoSODCC.callEKK0341A010SC` | EKK0341A010SC | `KK_T_KIKI_SVC_KEI_ITAI` | Executes "Device Provision Service Contract Agreement (Cache Retrieval)" — queries cached router service contract consent records |
| R | `JKKAdchgHakkoSODCC.callEKK0161B004SC` | EKK0161B004SC | `KK_T_SVC_KEI_UCWK` | Executes "Service Detail Information Acquisition" — queries service detail (contract line item) records for given service contract number |
| R | `JKKAdchgHakkoSODCC.getEKK0251B001SC` | EKK0251B001SC | `KK_T_SVC_KEI_KAISEN_UCWK` | Executes "Service Line Detail Information (Transfer Source) Retrieval" — queries service line detail for the previous (transfer source) contract |
| R | `JKKAdchgHakkoSODCC.runEKK0251A010` | EKK0251A010SC | `KK_T_SVC_KEI_KAISEN_UCWK` | Executes "Service Line Detail Information Agreement (Router Function)" — performs agreement inquiry for the new address service line |
| R | `JKKAdchgHakkoSODCC.runEKK2811B010` | EKK2811B010SC | `KK_T_KKOP_SVC_KEI` | Executes "Device Operation Service Contract Agreement List (Device Provision SVC)" — retrieves list of device operation service contracts including router/VA |
| R | `JKKAdchgHakkoSODCC.getKkOpSvcRec` | EKK2811B010CBS | `KK_T_KKOP_SVC_KEI` | Filters device operation service contract list by service code (G01=Router, G02=VA) |
| R | `JKKAdchgHakkoSODCC.getSame_trn_no` | JKKAdchgHakkoSODCC | `KK_T_SAME_TRN_NO` | Acquires a unified processing number (transaction correlation ID) for order grouping |
| C | `JKKAdchgHakkoSODCC.setParamChgPlaceOdr` | JKKAdchgHakkoSODCC | — | Sets parameters for location change order processing |
| R | `JKKAdchgHakkoSODCC.adchgOdrCtrl` | JKKAdchgHakkoSODCC | Various | Location change order control — processes address change orders (both regular and DSL end variants) |
| C | `JKKAdchgHakkoSODCC.opSetOdrCtrl` | JKKAdchgHakkoSODCC | `KK_T_SVC_ORDER` | Operation setting order control — processes continuation orders for operation service contracts |
| C | `JKKAdchgHakkoSODCC.kikiDslOdrCtrl` | JKKAdchgHakkoSODCC | `KK_T_SVC_ORDER` | Equipment contract change (cancellation) order control — issues device contract cancellation orders |
| R | `JKKAdchgHakkoSODCC.isMansHhsSwchflg` | JKKAdchgHakkoSODCC | `KK_T_*` | Multi-function router change flag detection — checks if migration wiring substitution is registered |
| R | `JKKAdchgHakkoSODCC.isDslOrderExist2` | JKKAdchgHakkoSODCC | `KK_T_SVC_ORDER` | Checks if existing DSL cancellation orders exist to avoid duplicate issuance |
| R | `JKKAdchgHakkoSODCC.isBlank` | JKKAdchgHakkoSODCC | — | Null/empty string utility check for same_trn_no validation |
| C | `JKKAdchgHakkoSODCC.setParamSvcAddOdr` | JKKAdchgHakkoSODCC | — | Sets parameters for service addition order |
| C | `JKKAdchgHakkoSODCC.svcAddOdrCtrl` | JKKAdchgHakkoSODCC | `KK_T_SVC_ORDER` | Service addition order control — registers new services during address change |
| C | `JKKAdchgHakkoSODCC.setParamCourseChgeOdr` | JKKAdchgHakkoSODCC | — | Sets parameters for course change order |
| C | `JKKAdchgHakkoSODCC.courseChgeOdrCtrl` | JKKAdchgHakkoSODCC | `KK_T_SVC_ORDER` | Course change order control — handles ISP identity changes with router unchanged |
| C | `JKKAdchgHakkoSODCC.crsChgJdgNet` | JKKAdchgHakkoSODCC | — | Course change judgment for FTTH — determines if course (ISP) change is required |
| C | `JKKAdchgHakkoSODCC.setParamOpSetOdr001` | JKKAdchgHakkoSODCC | — | Sets parameters for continuation operation setting order (type 001) |
| C | `JKKAdchgHakkoSODCC.setParamOpSetOdr` | JKKAdchgHakkoSODCC | — | Sets parameters for operation setting order |
| C | `JKKAdchgHakkoSODCC.setParamChgPlaceOdr001` | JKKAdchgHakkoSODCC | — | Sets parameters for location change order (variant 001) |
| C | `JKKAdchgHakkoSODCC.setParamOpDslOdr` | JKKAdchgHakkoSODCC | — | Sets parameters for cancellation operation setting order |
| C | `JKKAdchgHakkoSODCC.opDslOdrCtrl` | JKKAdchgHakkoSODCC | `KK_T_SVC_ORDER` | Cancellation operation setting order control — processes DSL end with operation cancellation |
| R | `JKKAdchgHakkoSODCC.shkkaMap` | JKKAdchgHakkoSODCC | — | Service contract information transfer — maps service contract data for transfer source/destination |
| C | `JKKAdchgHakkoSODCC.setParamOpSetOdr003` | JKKAdchgHakkoSODCC | — | Sets parameters for operation setting order (variant 003) — checks Global IP Address assignment |
| C | `JKKAdchgHakkoSODCC.setParamItenmFixipadDslOrder` | JKKAdchgHakkoSODCC | — | Sets parameters for fixed Global IP Address cancellation order at relocation source |
| C | `JKKAdchgHakkoSODCC.setParamItensFixipadAddOrder` | JKKAdchgHakkoSODCC | — | Sets parameters for fixed Global IP Address registration order at relocation destination |
| C | `JKKAdchgHakkoSODCC.svcAddMailOdrCtrl` | JKKAdchgHakkoSODCC | `KK_T_SVC_ORDER` | Service addition email order control — registers email order at relocation destination |
| C | `JKKAdchgHakkoSODCC.svcAddMailOdr` | JKKAdchgHakkoSODCC | `KK_T_SVC_ORDER` | Registers email service order for relocation destination |

## 5. Dependency Trace

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

No screen/batch entry points found within 8 hops. Direct callers found: 2 methods (both within `JKKAdchgHakkoSODCC`).

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Method: `JKKAdchgHakkoSODCC.hakkoSOD()` | `hakkoSOD(handle, param, fixedText)` -> iterates `kiki_trgt_data_list` and `opt_trgt_data_list` -> `hakkoSODNet(handle, param, kiki_sodMap, ...)` | `addSOD [C] KK_T_SVC_ORDER`, `runEKK2811B010 [R] KK_T_KKOP_SVC_KEI`, `setData [C] HAKKOSODCC_WORKMAP`, `addSodBbrFuncToMfr [C] KK_T_SVC_ORDER`, `isDslOrderExist2 [R] KK_T_SVC_ORDER`, `getKkOpSvcRec [R] KK_T_KKOP_SVC_KEI` |
| 2 | Method: `JKKAdchgCancelHakkoSODCC.hakkoSODNet()` (different overload) | Calls `hakkoSODNet(param, sodMap, fixedText, use_svc_chg_div, odr_exec_div)` — 5-parameter variant in the cancel class | Same terminal operations as above (delegation to addSOD, service component calls) |

**Terminal operations from this method (deepest reach):**
- `addSOD(handle, param, ODR_NAIYO_CD_401)` [C] — Multi-function router registration (router function)
- `addSOD(handle, param, ODR_NAIYO_CD_405)` [C] — Multi-function router change (router function)
- `addSOD(handle, param, ODR_NAIYO_CD_419)` [C] — Multi-function router cancellation (router function)
- `addSOD(handle, param, ODR_NAIYO_CD_420)` [C] — Multi-function router deletion (router function)
- `addSodBbrFuncToMfr(handle, param)` [C] — Multi-function router brand/vendor function mapping
- `runEKK2811B010(...)` [R] — Device operation service contract list query
- `callEKK0341A010SC(...)` [R] — Router service contract agreement cache query
- `callEKK0161B004SC(...)` [R] — Service detail information retrieval
- `getEKK0251B001SC(...)` [R] — Service line detail (transfer source) retrieval
- `runEKK0251A010(...)` [R] — Service line detail agreement (router function) query
- `getKkOpSvcRec(...)` [R] — Device operation service record filter
- `isDslOrderExist2(...)` [R] — DSL order existence check
- `getSame_trn_no(...)` [R] — Unified processing number acquisition
- `JCCBPCommon.getOpeDate(null)` [R] — Current operational date retrieval

## 6. Per-Branch Detail Blocks

**Block 1** — [IF] `AD_CHG_CMT_ADD = "0"` (AD_CHG_CMT_ADD check) (L23586)

> ADD (追加) branch: Handles new service addition during address change registration. Determines whether the trigger is address change registration and dispatches to service addition order control.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `jdgChgDivNet = adchgSvcKeiDivJdgNet(param, use_svc_chg_div, sodMap)` // Change classification judgment (line 23582-23584) |
| 2 | IF | `AD_CHG_CMT_ADD.equals(jdgChgDivNet)` [AD_CHG_CMT_ADD = "0"] (line 23587) |

**Block 1.1** — [IF] `ODR_EXEC_DIV_AD_CHG = "1"` (Add branch: address change registration trigger) (L23593)

> Service addition order processing: Sets parameters and dispatches to service addition order control.

| # | Type | Code |
|---|------|------|
| 1 | SET | `jdgChgDivNet = null` → result of `adchgSvcKeiDivJdgNet` (line 23583) |
| 2 | SET | `od_r_exec_div` = value from calling context |
| 3 | EXEC | `setParamSvcAddOdr(param, sodMap)` // Set parameters for service addition order (line 23596) |
| 4 | CALL | `param = svcAddOdrCtrl(keepSesHandle.get(), param, sodMap)` // Service addition order control (line 23598) |
| 5 | ELSE | No operation — any other trigger value is silently ignored (line 23601) |

**Block 2** — [ELSE-IF] `AD_CHG_CMT_KEEP = "1"` (KEEP branch) (L23608)

> KEEP (継続) branch: Handles continuation of existing service through address change. When the trigger is DSL removal completion, it issues continuation operation setting orders and equipment contract cancellation orders.

| # | Type | Code |
|---|------|------|
| 1 | IF | `AD_CHG_CMT_KEEP.equals(jdgChgDivNet)` [AD_CHG_CMT_KEEP = "1"] (line 23608) |

**Block 2.1** — [IF] `ODR_EXEC_DIV_DSL_END = "2"` (Keep branch: DSL end trigger) (L23614)

> Continuation order processing for DSL removal completion. Sets up operation setting order parameters, processes the continuation order, then issues equipment contract cancellation orders.

| # | Type | Code |
|---|------|------|
| 1 | IF | `setParamOpSetOdr001(handle, param, fixedText, sodMap, adchg_mskm_dtl_no)` returns true (line 23617) |
| 2 | CALL | `param = opSetOdrCtrl(keepSesHandle.get(), param, fixedText, sodMap)` // Continuation operation setting order control (line 23619) |
| 3 | EXEC | `setParamKikiDslOdr(param, sodMap)` // Set parameters for equipment contract change (cancellation) order (line 23624) |
| 4 | CALL | `param = kikiDslOdrCtrl(keepSesHandle.get(), param, fixedText, sodMap)` // Equipment contract change (cancellation) order control (line 23627) |
| 5 | ELSE | No operation — any other trigger in KEEP branch is ignored |

**Block 3** — [ELSE-IF] `AD_CHG_CMT_MODIFY = "2"` (MODIFY branch) (L23634)

> MODIFY (変更) branch: Handles service modification during address change. Supports course change (ISP identity change with router unchanged), continuation orders for DSL end, and a no-operation path for new installation completion.

| # | Type | Code |
|---|------|------|
| 1 | IF | `AD_CHG_CMT_MODIFY.equals(jdgChgDivNet)` [AD_CHG_CMT_MODIFY = "2"] (line 23634) |

**Block 3.1** — [IF] `ODR_EXEC_DIV_AD_CHG = "1"` (Modify branch: address change registration trigger) (L23640)

> Course change order processing when ISP identity changes but router remains the same.

| # | Type | Code |
|---|------|------|
| 1 | IF | `crsChgJdgNet(param, sodMap, fixedText)` returns true (line 23643) |
| 2 | CALL | `setParamCourseChgeOdr(param, sodMap)` // Set parameters for course change order (line 23645) |
| 3 | CALL | `param = courseChgeOdrCtrl(keepSesHandle.get(), param, fixedText, sodMap)` // Course change order control (line 23647) |
| 4 | ELSE | No operation — course change judgment determined no ISP change needed |

**Block 3.2** — [ELSE-IF] `ODR_EXEC_DIV_DSL_END = "2"` (Modify branch: DSL end trigger) (L23653)

> Continuation + equipment cancellation processing when service is being modified and old service is being removed.

| # | Type | Code |
|---|------|------|
| 1 | IF | `setParamOpSetOdr001(handle, param, fixedText, sodMap, adchg_mskm_dtl_no)` returns true (line 23656) |
| 2 | CALL | `param = opSetOdrCtrl(keepSesHandle.get(), param, fixedText, sodMap)` // Continuation operation setting order control (line 23658) |
| 3 | EXEC | `setParamKikiDslOdr(param, sodMap)` // Set equipment contract change (cancellation) order parameters (line 23663) |
| 4 | CALL | `param = kikiDslOdrCtrl(keepSesHandle.get(), param, fixedText, sodMap)` // Equipment contract change (cancellation) order control (line 23666) |

**Block 3.3** — [ELSE-IF] `ODR_EXEC_DIV_NEW_END = "3"` (Modify branch: new installation completed trigger) (L23670)

> No operation: New installation completion does not require any processing in the MODIFY context.

| # | Type | Code |
|---|------|------|
| 1 | — | No operation — silently ignored (line 23673) |

**Block 4** — [ELSE-IF] `AD_CHG_CMT_SLRE_WITH_ADD = "4"` (SLRE_WITH_ADD branch) (L23677)

> SLRE_WITH_ADD (解約/新規) branch: The most complex path. Handles simultaneous cancellation and new registration during address change. Processes location change orders, operation setting orders, relocation destination email registration, and multi-function router inheritance logic (contract transfer at new address).

| # | Type | Code |
|---|------|------|
| 1 | IF | `AD_CHG_CMT_SLRE_WITH_ADD.equals(jdgChgDivNet)` [AD_CHG_CMT_SLRE_WITH_ADD = "4"] (line 23677) |

**Block 4.1** — [IF] `ODR_EXEC_DIV_AD_CHG = "1"` (Slre+Add branch: address change registration trigger) (L23684)

> Location change order processing with continuation operation setting and relocation destination email registration.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `setParamChgPlaceOdr(param, sodMap)` // Set parameters for location change order (line 23687) |
| 2 | CALL | `param = adchgOdrCtrl(keepSesHandle.get(), param, sodMap, odr_exec_div)` // Location change order control (line 23689) |
| 3 | EXEC | `setParamOpSetOdr(param, sodMap)` // Set parameters for operation setting order (line 23691) |
| 4 | CALL | `param = opSetOdrCtrl(keepSesHandle.get(), param, fixedText, sodMap)` // Operation setting order control (line 23693) |
| 5 | IF | `!isSakiMailOdr` — if relocation destination email registration has not been performed (line 23696) |
| 6 | CALL | `param = svcAddMailOdrCtrl(handle, param, sodMap)` // Relocation destination email registration order control (line 23699) |

**Block 4.2** — [ELSE-IF] `ODR_EXEC_DIV_DSL_END = "2"` (Slre+Add branch: DSL end trigger) (L23708)

> Location change + cancellation processing: processes location change order, then handles operation cancellation for DSL end.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `setParamChgPlaceOdr001(handle, param, fixedText, sodMap)` // Set parameters for location change order (variant 001) (line 23715) |
| 2 | CALL | `param = adchgOdrCtrl(keepSesHandle.get(), param, sodMap, odr_exec_div)` // Location change order control (line 23717) |
| 3 | IF | `setParamOpDslOdr(handle, param, fixedText, sodMap)` returns true (line 23726) |
| 4 | CALL | `param = opDslOdrCtrl(keepSesHandle.get(), param, fixedText, sodMap)` // Cancellation operation setting order control (line 23728) |

**Block 4.3** — [ELSE-IF] `ODR_EXEC_DIV_NEW_END = "3"` (Slre+Add branch: new installation completed trigger) (L23735)

> Complex multi-function router inheritance processing for new installation at relocation destination. Checks if migration wiring substitution is registered and if router transfer has already been executed. If not, performs router contract cancellation at source, router registration at destination, or router modification if VA function already exists.

| # | Type | Code |
|---|------|------|
| 1 | IF | `setParamOpSetOdr003(handle, param, sodMap)` returns true — checks if Global IP Address is assigned to operation service contract (line 23750) |
| 2 | SET | `sodMapTemp = (HashMap<String, Object>) sodMap.clone()` // Clone for separate relocation source processing (line 23756) |
| 3 | IF | `setParamItenmFixipadDslOrder(handle, param, sodMapTemp)` returns true — checks if fixed Global IP Address cancellation order is needed for relocation source (line 23759) |
| 4 | CALL | `param = opSetOdrCtrl(keepSesHandle.get(), param, fixedText, sodMapTemp)` // Operation setting order control with cloned map (line 23761) |
| 5 | SET | `sodMapTemp = (HashMap<String, Object>) sodMap.clone()` // Second clone for relocation destination (line 23765) |
| 6 | IF | `setParamItensFixipadAddOrder(handle, param, sodMapTemp)` returns true — checks if fixed Global IP Address registration order is needed for destination (line 23768) |
| 7 | CALL | `param = opSetOdrCtrl(keepSesHandle.get(), param, fixedText, sodMapTemp)` // Operation setting order control with cloned map (line 23770) |
| 8 | EXEC | `chbf_kktsvkei_no = isMansHhsSwchflg(handle, param, sodMap)` // Detect if multi-function router change flag is registered (line 23777) |
| 9 | IF | `!"".equals(chbf_kktsvkei_no) && !isRouterHikiZumi` — if router change is registered AND router transfer has not been executed yet (line 23778) |

**Block 4.3.1** — [IF] Router change flag set and transfer not done — Cache query, data acquisition (L23780)

> Sets up cache query condition map and retrieves router service contract agreement data, service contract details, and transfer-related service information.

| # | Type | Code |
|---|------|------|
| 1 | SET | `condMap = new HashMap<String, Object>()` (line 23783) |
| 2 | SET | `condMap.put(KKTK_SVC_KEI_NO, chbf_kktsvkei_no)` (line 23784) |
| 3 | SET | `condMap.put(OPE_DATE, JCCBPCommon.getOpeDate(null))` (line 23785) |
| 4 | SET | `resultMap = new HashMap<String, Object>()` (line 23786) |
| 5 | CALL | `statusCode = callEKK0341A010SC(param, handle, condMap, resultMap, FUNC_CODE_2)` // Device provision service contract agreement (cache retrieval) (line 23789) |
| 6 | IF | `0 != statusCode` — error check (line 23790) |
| 7 | THROW | `throw new CCException("", new SCCallException("", String.valueOf(statusCode), statusCode))` (line 23792) |
| 8 | SET | `ekk0341a010Map = resultMap.get(TemplateID_EKK0341A010)` (line 23794) |
| 9 | SET | `svc_kei_info_Map = shkkaMap((HashMap) sodMap.get(SVC_KEI_INFO))` // Map service contract info (line 23797) |
| 10 | SET | `svc_kei_ucwk_info_Map = shkkaMap((HashMap) sodMap.get(SVC_KEI_UCWK_INFO))` // Map service detail info (line 23798) |
| 11 | SET | `svc_kei_no = svc_kei_info_Map.get(INFO_SVC_KEI_NO)` // Previous service contract number (line 23799) |
| 12 | SET | `svc_kei_gene_add_dtm = svc_kei_info_Map.get(INFO_CHBF_SVC_KEI_GENE_ADD_DTM)` (line 23800) |
| 13 | SET | `saki_svc_kei_no = svc_kei_info_Map.get(INFO_SAKI_SVC_KEI_NO)` // Prior service contract number (line 23801) |
| 14 | SET | `saki_svc_kei_gene_add_dtm = svc_kei_info_Map.get(INFO_CHAF_SVC_KEI_GENE_ADD_DTM)` (line 23802) |
| 15 | CALL | `eKK0251B001Hash = getEKK0251B001SC(param, handle, svc_kei_no, FUNC_CODE_1)` // Service line detail (transfer source) retrieval (line 23803) |
| 16 | CALL | `ekk0161B004map = callEKK0161B004SC(handle, param, svc_kei_no)` // Service detail info for transfer source (line 23806) |
| 17 | SET | `svc_kei_uw_no = ekk0161B004map.get(SVC_KEI_UCWK_NO)` // Transfer source service detail number (line 23807) |
| 18 | SET | `svc_kei_uw_gene_add_dtm = ekk0161B004map.get(GENE_ADD_DTM)` // Transfer source detail registration date (line 23808) |
| 19 | CALL | `sakiEkk0161B004map = callEKK0161B004SC(handle, param, saki_svc_kei_no)` // Service detail info for prior contract (line 23811) |
| 20 | SET | `saki_svc_kei_uw_no = sakiEkk0161B004map.get(SVC_KEI_UCWK_NO)` // Prior service detail number (line 23812) |
| 21 | SET | `saki_svc_kei_uw_gene_add_dtm = sakiEkk0161B004map.get(GENE_ADD_DTM)` (line 23813) |
| 22 | SET | `kiki_seizo_no[0] = ekk0341a010Map.get(KIKI_SEIZO_NO)` // Device manufacturing number (line 23816) |
| 23 | SET | `taknkiki_model_cd[0] = ekk0341a010Map.get(TAKNKIKI_MODEL_CD)` // Indoor equipment model code (line 23818) |
| 24 | IF | `isBlank(this.same_trn_no)` — if unified processing number is not yet assigned (line 23821) |
| 25 | SET | `sameTrnNo = new String[1]` (line 23823) |
| 26 | CALL | `getSame_trn_no(param, handle, null, sameTrnNo)` // Acquire unified processing number (line 23824) |
| 27 | SET | `this.same_trn_no = sameTrnNo[0]` (line 23825) |
| 28 | SET | `dataMap = new HashMap<String, Object>()` (line 23826) |
| 29 | SET | `dataMap.put("svc_kei_no", svc_kei_no)` (line 23827) |
| 30 | SET | `dataMap.put("svkei_gadtm", svc_kei_gene_add_dtm)` (line 23828) |
| 31 | EXEC | `param.setData(HAKKOSODCC_WORKMAP, dataMap)` // Store data in work map (line 23829) |

**Block 4.3.2** — [IF] Router function exists at device operation service (L23841)

> Checks whether router (G01) function exists in the device operation service. If so, determines whether VA (G02) function also exists and its status.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `msgList = runEKK2811B010(param, handle, FUNC_CODE_1, chbf_kktsvkei_no)` // Device operation SVC contract agreement list (line 23837) |
| 2 | CALL | `ekk2811b010Map = getKkOpSvcRec(msgList, KKOP_SVC_CD_BBR, false)` // Router function (G01) (line 23839) |
| 3 | IF | `ekk2811b010Map != null` — router function exists (line 23840) |

**Block 4.3.2.1** — [IF] Router function exists — Set router contract numbers (L23843)

> Extracts router contract number, generation date from the device operation service contract list. Also checks for VA function status.

| # | Type | Code |
|---|------|------|
| 1 | SET | `kkop_svc_kei_router[0] = ekk2811b010Map.get(KKOP_SVC_KEI_NO)` // Router contract number (line 23846) |
| 2 | SET | `kkop_svc_kei_router_gadtm[0] = ekk2811b010Map.get(GENE_ADD_DTM)` // Router contract generation date (line 23848) |
| 3 | SET | `kkop_svc_kei_va[0] = ""` // Initialize VA contract number to empty (line 23850) |
| 4 | SET | `kkop_svc_kei_va_gadtm[0] = ""` // Initialize VA generation date to empty (line 23852) |
| 5 | CALL | `ekk2811b010MapVa = getKkOpSvcRec(msgList, KKOP_SVC_CD_VA, false)` // VA function (G02) (line 23855) |
| 6 | IF | VA function is null OR in acceptance/completed/cancelled state (line 23857-23861) |

**Block 4.3.2.1.1** — [IF] VA not active — Router cancellation at source, registration at destination (L23864)

> No cancellation/deletion orders exist in the order settings. Check if existing DSL cancellation orders exist. If not, issue router cancellation orders at source, then router registration at destination.

| # | Type | Code |
|---|------|------|
| 1 | IF | `!isDslOrderExist2(param, handle, SVC_ORDER_CD_MRT, kktk_svc_kei_no[0], taknkiki_model_cd[0], kiki_seizo_no[0])` — no existing DSL cancellation orders (line 23864) |
| 2 | CALL | `param = addSOD(handle, param, ODR_NAIYO_CD_419)` // Multi-function router cancellation (router function cancellation) (line 23867) |
| 3 | CALL | `param = addSOD(handle, param, ODR_NAIYO_CD_420)` // Multi-function router deletion (router function deletion) (line 23868) |
| 4 | SET | `dataMap.put("svc_kei_no", saki_svc_kei_no)` // Set prior service contract number (line 23871) |
| 5 | SET | `dataMap.put("svkei_gadtm", saki_svc_kei_gene_add_dtm)` // Set prior contract registration date (line 23872) |
| 6 | EXEC | `param.setData(HAKKOSODCC_WORKMAP, dataMap)` // Update work map (line 23873) |
| 7 | SET | `svc_kei_ucwk_no[0] = saki_svc_kei_uw_no` // Transfer destination service detail number (line 23874) |
| 8 | SET | `svc_kei_ucwk_gadtm[0] = saki_svc_kei_uw_gene_add_dtm` (line 23875) |
| 9 | SET | `svc_kei_kaisen_ucwk_no = ekk0341a010Map.get(SVC_KEI_KAISEN_UCWK_NO)` // Transfer destination service line detail number (line 23876) |
| 10 | CALL | `ekk0251a010Map = runEKK0251A010(param, handle, svc_kei_kaisen_ucwk_no)` // Service line detail agreement (router function) (line 23878) |
| 11 | SET | `svc_kei_kaisen_ucwk_gadtm = ekk0251a010Map.get(GENE_ADD_DTM)` (line 23879) |
| 12 | CALL | `param = addSOD(handle, param, ODR_NAIYO_CD_401)` // Multi-function router registration (router function registration) (line 23880) |
| 13 | SET | `isRouterHikiZumi = true` // Mark router transfer as executed (line 23881) |

**Block 4.3.2.1.2** — [ELSE] VA function exists — Router modification (L23884)

> VA function exists AND phone multi-function exists in order settings. Change multi-function router function.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `param = addSOD(handle, param, ODR_NAIYO_CD_405)` // Multi-function router change (router function change) (line 23888) |
| 2 | SET | `dataMap.put("svc_kei_no", saki_svc_kei_no)` (line 23891) |
| 3 | SET | `dataMap.put("svkei_gadtm", saki_svc_kei_gene_add_dtm)` (line 23892) |
| 4 | EXEC | `param.setData(HAKKOSODCC_WORKMAP, dataMap)` |
| 5 | SET | `svc_kei_ucwk_no[0] = saki_svc_kei_uw_no` (line 23894) |
| 6 | SET | `svc_kei_ucwk_gadtm[0] = saki_svc_kei_uw_gene_add_dtm` (line 23895) |
| 7 | SET | `svc_kei_kaisen_ucwk_no = ekk0341a010Map.get(SVC_KEI_KAISEN_UCWK_NO)` (line 23896) |
| 8 | CALL | `ekk0251a010Map = runEKK0251A010(param, handle, svc_kei_kaisen_ucwk_no)` (line 23898) |
| 9 | SET | `svc_kei_kaisen_ucwk_gadtm = ekk0251a010Map.get(GENE_ADD_DTM)` (line 23899) |
| 10 | CALL | `param = addSodBbrFuncToMfr(handle, param)` // Multi-function router brand/vendor function mapping (line 23900) |
| 11 | SET | `isRouterHikiZumi = true` // Mark router transfer as executed (line 23901) |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|-----------------|
| `use_svc_chg_div` | Field | Used service change classification — primary dimension for determining how to process the address change (add, continue, modify, cancel/new) |
| `odr_exec_div` | Field | Order issuance trigger classification — secondary dimension indicating the business event: address change registration (1), removal completed (2), new installation completed (3) |
| `adchg_mskm_dtl_no` | Field | Address change statement detail number — internal tracking reference for the address change application record |
| `jdgChgDivNet` | Field | FTTH change classification judgment result — computed value from `adchgSvcKeiDivJdgNet` that determines the change registration method (ADD, KEEP, MODIFY, SLRE_WITH_ADD) |
| `sodMap` | Field | Service Order Data map — contains all service contract details, service line details, router configuration, and transfer-related data for the current order processing iteration |
| `sodMapTemp` | Field | Temporary cloned SOD map — separate HashMap used to process relocation source and relocation destination independently with different SOD data |
| `isRouterHikiZumi` | Field | Router inheritance execution flag — prevents duplicate multi-function router transfer orders by tracking whether the router has already been transferred |
| `isSakiMailOdr` | Field | Relocation destination email order flag — tracks whether email registration order at the new address has already been issued |
| `isMansHhsSwchflg` | Field | Multi-function router change flag detection — checks if migration wiring substitution (multi-function router change) is registered in the system |
| SOD | Acronym | Service Order Data — the core order entity in K-Opticom's fulfillment system containing service contract lines and order content codes |
| FTTH | Business term | Fiber To The Home — fiber-optic broadband internet service offered by K-Opticom |
| 住所変更 (Jusho Henkou) | Business term | Address change — the overarching business process being handled, where a customer moves and their service contracts must be updated |
| 追加 (Tsuika) | Business term | Add — service addition during address change, where a new service line is registered at the new address |
| 継続 (Keizoku) | Business term | Continue — service continuation through address change, preserving existing service while updating the location |
| 変更 (Henkou) | Business term | Modify — service modification during address change, potentially involving ISP contract changes or course upgrades |
| 解約/新規 (Kaiyaku/Shin-Ki) | Business term | Cancel/New — simultaneous cancellation of old service and registration of new service during address change |
| 住所変更登録 (Jusho Henroku Toukyoku) | Business term | Address change registration — the order trigger (ODR_EXEC_DIV_AD_CHG) indicating an address change has been registered |
| 撤去完了 (Tekko Kanryou) | Business term | Removal completed — the order trigger (ODR_EXEC_DIV_DSL_END) indicating old equipment at the previous address has been removed |
| 新設完了 (Shinsetsu Kanryou) | Business term | New installation completed — the order trigger (ODR_EXEC_DIV_NEW_END) indicating new installation at the relocation destination is finalized |
| 多機能ルーター (Taki Nou Router) | Business term | Multi-function router — K-Opticom's residential router offering, which can include router, VA (Value Added), and other functions |
| ルーター機能 (Router Nou) | Business term | Router function — service code G01 for the base router capability of the multi-function router |
| VA機能 (VA Nou) | Business term | VA (Value Added) function — service code G02 for additional value-added services on the multi-function router |
| カレント取得 (Karentu Shuutoku) | Business term | Cache retrieval — process of acquiring cached device provision service contract consent records via EKK0341A010SC |
| 転送元 (Ten'ou Moto) | Business term | Transfer source — the previous (old) address/service contract being cancelled during relocation |
| 転送先 (Ten'ou Saki) | Business term | Transfer destination — the new (relocation) address/service contract being registered during relocation |
| 機器提供サービス (Kiki Teikyou Service) | Business term | Device provision service — the service category encompassing router and other device-related services |
| 機器操作サービス (Kiki Sousa Service) | Business term | Device operation service — the operational service category (KKOP_SVC_KEI) managing device contracts |
| 回線内訳番号 (Kaisen Uchiwaku Bangou) | Field | Service line detail number — internal tracking ID for a specific service line (contract line item) within a service contract |
| 回線内訳世代登録日時 (Kaisen Uchiwaku Seda Tourokunijits) | Field | Service line detail generation registration date/time — timestamp when a service line detail record was created or regenerated |
| KKTK_SVC_KEI_NO | Constant | KKTk service contract number — key used to identify the multi-function router service contract in condition maps |
| KKOP_SVC_CD_BBR | Constant | `G01` — device operation service code for router function |
| KKOP_SVC_CD_VA | Constant | `G02` — device operation service code for VA (Value Added) function |
| EKK0341A010SC | SC Code | Device Provision Service Contract Agreement (Cache Retrieval) — service component that queries cached router contract consent records |
| EKK0161B004SC | SC Code | Service Detail Information Acquisition — service component that queries service detail (contract line item) records |
| EKK0251B001SC | SC Code | Service Line Detail Information (Transfer Source) Retrieval — service component that queries service line detail for transfer source contracts |
| EKK0251A010SC | SC Code | Service Line Detail Information Agreement (Router Function) — service component that performs agreement inquiry for service line detail |
| EKK2811B010SC | SC Code | Device Operation Service Contract Agreement List (Device Provision SVC) — service component that retrieves device operation service contract lists |
| ODR_NAIYO_CD_401 | Constant | `401` — order content code for multi-function router setup/registration (router function registration) |
| ODR_NAIYO_CD_405 | Constant | `405` — order content code for multi-function router setup/change (router function change) |
| ODR_NAIYO_CD_419 | Constant | `419` — order content code for multi-function router setup/cancellation (router function cancellation) |
| ODR_NAIYO_CD_420 | Constant | `420` — order content code for multi-function router setup/deletion (router function deletion) |
| FUNC_CODE_1 | Constant | `1` — function code for data query/read operations |
| FUNC_CODE_2 | Constant | `2` — function code for write/update operations |
| KK_T_SVC_ORDER | Table | Service Order master table — stores service order records in the K-Opticom database |
| KK_T_SVC_ORDER_DTL | Table | Service Order detail table — stores line items within service orders |
| KK_T_KKOP_SVC_KEI | Table | Device Operation Service Contract table — stores device operation service contracts including router and VA |
| KK_T_SVC_KEI_UCWK | Table | Service Detail Information table — stores service contract line item (detail) records |
| KK_T_KIKI_SVC_KEI_ITAI | Table | Device Provision Service Contract Agreement table — stores device provision service contract consent/cached records |
| KK_T_SVC_KEI_KAISEN_UCWK | Table | Service Line Detail Information table — stores service line detail records used for transfer source/destination operations |
