# Business Logic - JKKAdchgCancelHakkoSODCC.jdgIpv6() [276 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `com.fujitsu.futurity.bp.custom.common.JKKAdchgCancelHakkoSODCC` |
| Layer | CC/Common Component (Service component class within the Business Process layer) |
| Module | `common` (Package: `com.fujitsu.futurity.bp.custom.common`) |

## 1. Role

### JKKAdchgCancelHakkoSODCC.jdgIpv6()

The `jdgIpv6` method is the **IPV6 determination and dispatch** routine within Fujitsu's telecommunications order management platform. It evaluates whether a subscriber's equipment and service contract qualify for IPV6 Service Order Data (SOD) issuance - specifically for equipment provision services (BBR, code "C014") - and routes the subscriber through the appropriate IPV6 SOD creation flow.

This method implements a **filter-and-dispatch pattern**: it retrieves the equipment provision service contract list (restricted to BBR service code "C014"), iterates through each contract record, and applies a multi-layered filter chain (contract status, change category, equipment capability) to determine which contracts are eligible for IPV6 SOD issuance. For each qualifying contract, it populates instance fields with device identifiers, checks the equipment model's IPV6 support flag via `getTaknkikiM`, and ultimately invokes `hakkouIpv6` to trigger the actual IPV6 SOD creation - which branches into IPV6 registration (order content code "155") for new contracts, or router connection information update (order content code "163") for changes.

This is a **shared utility method** called from multiple upstream screens (KKSV0138, KKSV0191) during service change and cancellation processing flows, as well as from `jdgIpv6EKK0361A010` when processing option service contract <ISP> confirmation results. It plays a central role in the IPV6 service lifecycle management, determining which equipment-provisioned lines should have IPV6 order data created or updated.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["jdgIpv6 params"])
    START --> GET_IPV6["Retrieve ipv6AdIfid from eKK0361A010Info"]
    GET_IPV6 --> CHECK_IPV6_NULL{"ipv6AdIfid null or empty?"}
    CHECK_IPV6_NULL -->|false| SET_IPV6_ADDR["this.op_addr_ipv6 = ipv6AdIfid"]
    CHECK_IPV6_NULL -->|true| CLEAR_IPV6_ADDR["this.op_addr_ipv6 = null"]
    SET_IPV6_ADDR --> PREP_CALL["Create inHashKktk with SVC_KEI_NO"]
    CLEAR_IPV6_ADDR --> PREP_CALL
    PREP_CALL --> CALL_EKK0341B002["callEKK0341B002SC handle param inHashKktk"]
    CALL_EKK0341B002 --> CHECK_STATUS{"statusCode != 0?"}
    CHECK_STATUS -->|true| THROW_ERROR["throw CCException SCCallException"]
    CHECK_STATUS -->|false| GET_MSG["Get msgEKK0341B002SCList from resultHashKktk"]
    THROW_ERROR --> END_RETURN(["Return"])
    GET_MSG --> CHECK_MSG_NULL{"msgEKK0341B002SCList null?"}
    CHECK_MSG_NULL -->|true| END_RETURN
    CHECK_MSG_NULL -->|false| LOOP_START["Loop for each msg in msgEKK0341B002SCList"]
    LOOP_START --> EXTRACT_HASH["Get eKK0341B002Hash from msg"]
    EXTRACT_HASH --> EXTRACT_STAT["Get kktkStat = shkkaChr KKTK_SVC_KEI_STAT"]
    EXTRACT_STAT --> CHECK_SOD_PATTERN{"sod_pattern_ipv6 != 3?"}
    CHECK_SOD_PATTERN -->|true| CHECK_STAT_INVALID{"kktkStat not in 010 020 030 100?"}
    CHECK_SOD_PATTERN -->|false| CHECK_OP_KEY
    CHECK_STAT_INVALID -->|true| CONTINUE_LOOP["continue"]
    CHECK_STAT_INVALID -->|false| CHECK_OP_KEY
    CHECK_OP_KEY --> CHECK_IDO_DIV{"ido_div == IDO_DIV_NEW 00001?"}
    CHECK_IDO_DIV -->|true| EXTRACT_DEVICE["Extract kiki_seizo_no_ipv6 taknkiki_model_cd_ipv6"]
    CHECK_IDO_DIV -->|false| CHECK_IDO_IS_OPSETTE{"ido_div == IDO_DIV_OPSETTE 00031?"}
    CHECK_IDO_IS_OPSETTE -->|true| CHECK_OP_MATCH{"check_op_kei_no equals op_svc_kei_no_param?"}
    CHECK_IDO_IS_OPSETTE -->|false| EXTRACT_DEVICE
    CHECK_OP_MATCH -->|false| CONTINUE_LOOP
    CHECK_OP_MATCH -->|true| EXTRACT_DEVICE
    EXTRACT_DEVICE --> CHECK_BLANK{"isBlank kiki_seizo_no_ipv6 or taknkiki_model_cd_ipv6?"}
    CHECK_BLANK -->|true| CONTINUE_LOOP
    CHECK_BLANK -->|false| SET_DEVICE_FIELDS["Set ipv6_kktk_svc_kei_no and ipv6_kktk_svc_kei_gadtm"]
    SET_DEVICE_FIELDS --> SET_ARRAYS["Init kiki_seizo_no array and taknkiki_model_cd array"]
    SET_ARRAYS --> CALL_GET_TAK["getTaknkikiM handle param taknkiki_model_cd_ipv6"]
    CALL_GET_TAK --> CHECK_TAK_NULL{"taknkiki_model_m not null?"}
    CHECK_TAK_NULL -->|true| SET_IPV6_TAIO["Set kiki_ipv6_taio_flg from taknkiki_model_m"]
    CHECK_TAK_NULL -->|false| SET_OP_ADDR_KAKUTEI
    SET_IPV6_TAIO --> SET_OP_ADDR_KAKUTEI["Set op_addr_kakutei_ipv6 from isBlank op_addr_ipv6"]
    SET_OP_ADDR_KAKUTEI --> CHECK_SHUKKA{"not isBlank kiki_seizo_no_ipv6 and IPV6_TAIO_FLG_TAIO"}
    CHECK_SHUKKA -->|true| SET_SHUKKA_TRUE["kiki_shukka_sumi_ipv6 = true"]
    CHECK_SHUKKA -->|false| SET_SHUKKA_FALSE["kiki_shukka_sumi_ipv6 = false"]
    SET_SHUKKA_TRUE --> CHECK_SHUKKA_FLG{"kiki_shukka_sumi_ipv6?"}
    SET_SHUKKA_FALSE --> CHECK_SHUKKA_FLG
    CHECK_SHUKKA_FLG -->|false| LOOP_END
    CHECK_SHUKKA_FLG -->|true| CHECK_ADDR_KAKUTEI{"op_addr_kakutei_ipv6?"}
    CHECK_ADDR_KAKUTEI -->|true| ARRAY_SET_VALUES["Set kktk_svc_kei_no array and svc_kei_ucwk_no array"]
    CHECK_ADDR_KAKUTEI -->|false| LOOP_END
    ARRAY_SET_VALUES --> CALL_HAKKOU["hakkouIpv6 handle param eKK0361A010Info"]
    CALL_HAKKOU --> LOOP_END
    LOOP_END --> LOOP_START
    END_RETURN --> END_NODE(["Return"])
```

**Block descriptions:**

1. **IPv6 address retrieval** - Extract the IPv6 interface ID from the option service contract <ISP> inquiry result map (`eKK0361A010Info`). If present and non-empty, store it in `this.op_addr_ipv6`; otherwise null.
2. **Equipment provision service query** - Call `callEKK0341B002SC` with the service contract number and BBR service code "C014" to retrieve the list of equipment provision service contracts. If the status code is non-zero, throw an `CCException`.
3. **Contract status filtering** - Loop through each equipment provision service contract record. Filter by contract status: if `sod_pattern_ipv6 != 3` (not cancellation mode), only accept statuses "010" (Order Accepted), "020" (Reviewed), "030" (Contracted), and "100" (Service Providing).
4. **Change category filtering** - If the change category (`ido_div`) is not "00001" (New Contract), check whether it is "00031" (Option Setup). If so, only process contracts whose option service contract number matches `op_svc_kei_no_param`.
5. **Device information extraction** - Extract the equipment manufacturing number and domestic equipment model code from the query result. Skip if either is blank.
6. **Equipment model IPV6 support check** - Call `getTaknkikiM` to look up the equipment model manifest and determine if the equipment model supports IPV6.
7. **IPv6 address finalization and shipment readiness** - Determine whether the IPv6 address is confirmed and whether the equipment has been shipped (based on IPV6 support flag). If the equipment is IPV6-ready and the IPv6 address is confirmed, populate the service contract arrays and invoke `hakkouIpv6` to issue the IPV6 SOD.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | Session handle containing the database connection and context for service component calls. Used to execute remote SC/CBS method invocations. |
| 2 | `param` | `IRequestParameterReadWrite` | Request parameter object carrying the model group and control map. Used to exchange data with service components (e.g., setting fields like SVC_KEI_NO, KKTK_SVC_CD). |
| 3 | `kei_ucwk_no_param` | `String` | Service contract internal line item number. Used for filtering in non-new change categories (e.g., to match specific line items). Currently passed but the active branch uses `op_svc_kei_no_param` instead (option setup mode). |
| 4 | `op_svc_kei_no_param` | `String` | Option service contract number. Used as the matching key when the change category is "Option Setup" (IDO_DIV_OPSETTE="00031") to restrict processing to a specific option contract. |
| 5 | `eKK0361A010Info` | `HashMap<String, Object>` | One-to-one inquiry result of the Option Service Contract <ISP>. Contains the IPv6 interface ID (`IPV6_AD_IFID`) and the option service contract number (`OP_SVC_KEI_NO`). This is the primary source of IPv6 address information. |

**Instance fields read by this method:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `this.svc_kei_no1` | `String` | Service contract number - used as the query key when calling `callEKK0341B002SC` to retrieve equipment provision service contracts. |
| `this.sod_pattern_ipv6` | `int` | SOD emission pattern flag for IPV6. Value 1 = IPv6 registration (new), Value 3 = IPv6 cancellation. Controls the contract status filtering logic. |
| `this.ido_div` | `String` | Change category code. Determines whether this is a new contract, option setup, or other change type. Used to filter which contracts to process. |
| `this.op_addr_ipv6` | `String` | IPv6 address assigned to the option service (set at start, read at end for address confirmation check). |
| `this.kiki_seizo_no` | `String[]` | Equipment manufacturing number array - populated with the first entry's IPv6 device manufacturing number. |
| `this.taknkiki_model_cd` | `String[]` | Domestic equipment model code array - populated with the first entry's IPv6 equipment model code. |
| `this.ipv6_kktk_svc_kei_no` | `String` | Equipment provision service contract number for IPv6. |
| `this.ipv6_kktk_svc_kei_gadtm` | `String` | Equipment provision service contract generation registration datetime for IPv6. |
| `this.kiki_seizo_no_ipv6` | `String` | IPv6 equipment manufacturing number - extracted from the equipment provision service query result. |
| `this.taknkiki_model_cd_ipv6` | `String` | IPv6 domestic equipment model code - extracted from the equipment provision service query result. |
| `this.kiki_ipv6_taio_flg` | `String` | Equipment IPv6 support flag - obtained from `getTaknkikiM`, indicates whether the equipment model supports IPv6. |
| `this.op_addr_kakutei_ipv6` | `boolean` | IPv6 address determination flag - true if IPv6 address is confirmed (non-null/non-empty), false otherwise. |
| `this.kiki_shukka_sumi_ipv6` | `boolean` | Equipment shipment completion flag for IPv6 - true if equipment has a manufacturing number and supports IPv6, false otherwise. |
| `this.kktk_svc_kei_no` | `String[]` | Equipment provision service contract number array - populated when IPv6 SOD emission is triggered. |
| `this.kktk_svc_kei_gadtm` | `String[]` | Equipment provision service contract generation registration datetime array. |
| `this.svc_kei_ucwk_no` | `String[]` | Service contract internal line item number array. |
| `this.svc_kei_ucwk_gadtm` | `String[]` | Service contract internal line item generation registration datetime array. |
| `this.ipv6_svc_kei_ucwk_no` | `String` | IPv6 service contract internal line item number. |
| `this.ipv6_svc_kei_ucwk_gadtm` | `String` | IPv6 service contract internal line item generation registration datetime. |
| `this.taishouIdx` | `int` | Processing target index - used to count the number of processed items (currently commented out in this method). |

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `JKKAdchgCancelHakkoSODCC.callEKK0341B002SC` | EKK0341B002SC | KK_T_KKTK_SVC_KEI (Equipment Provision Service Contract) | Calls `callEKK0341B002SC` to query the equipment provision service contract list, filtered by service contract number and BBR service code "C014". Returns `CAANMsg[]` array of contract records. |
| R | `JKKAdchgCancelHakkoSODCC.getTaknkikiM` | (Internal method) | Equipment Model Manifest Table | Calls `getTaknkikiM(handle, param, taknkiki_model_cd_ipv6)` to retrieve the equipment model manifest for the given model code. Returns `HashMap` containing `IPV6_TAIO_FLG` (IPv6 support flag). |
| - | `JKKAdchgCancelHakkoSODCC.hakkouIpv6` | (Internal method) | Triggers SOD emission | Calls `hakkouIpv6(handle, param, eKK0361A010Info)` to issue the actual IPV6 SOD. Internally calls `tsuikabunAddSOD` with order content codes 155 (IPv6 Registration) and 163 (Router Connection Information Change). |
| - | `JKKAdchgCancelHakkoSODCC.isBlank` | (Utility) | - | Checks if a String value is null, empty, or blank. Used for null checks on manufacturing number, model code, and IPv6 address. |
| - | `JKKAdchgCancelHakkoSODCC.shkkaChr` | (Utility) | - | Safe string conversion - trims and handles null values. Used to extract string values from HashMap results. |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:KKSV0138 | `KKSV0138OPOperation.xxx` -> `jdgIpv6EKK0361A010` -> `jdgIpv6` | `hakkouIpv6 [C] SOD emission; callEKK0341B002SC [R] KK_T_KKTK_SVC_KEI` |
| 2 | Screen:KKSV0191 | `KKSV0191OPOperation.xxx` -> `jdgIpv6EKK0361A010` -> `jdgIpv6` | `hakkouIpv6 [C] SOD emission; callEKK0341B002SC [R] KK_T_KKTK_SVC_KEI` |
| 3 | CBS:JKKAdchgCancelHakkoSODCC | `jdgIpv6EKK0361A010` -> `jdgIpv6` | Same as above |

**Terminal operations from this method:**

| Terminal Method | Type | Entity/Description |
|----------------|------|-------------------|
| `callEKK0341B002SC` | R | Equipment Provision Service Contract List - queries KK_T_KKTK_SVC_KEI for service contract number + BBR code "C014" |
| `getTaknkikiM` | R | Equipment Model Manifest - looks up IPV6_TAIO_FLG for the given model code |
| `hakkouIpv6` | C | IPV6 SOD Issuance - internally calls `tsuikabunAddSOD` with ODR_NAIYO_CD_155 (IPv6 Registration) and ODR_NAIYO_CD_163 (Router Connection Info Change) |
| `isBlank` | - | Null/blank check utility |
| `shkkaChr` | - | Safe string conversion utility |

## 6. Per-Branch Detail Blocks

### Block 1 - [SET/IF-ELSE] IPv6 Address Retrieval (L18859)

> Retrieves the IPv6 interface ID from the option service contract <ISP> inquiry result. This is the IPv6 address assigned to the service, which will later determine whether the address is "confirmed" (kakutei).

| # | Type | Code |
|---|------|------|
| 1 | GET | `ipv6AdIfid = eKK0361A010Info.get(IPV6_AD_IFID)` |
| 2 | IF | `null != ipv6AdIfid && !"".equals(ipv6AdIfid.toString())` |
| 3 | SET | `this.op_addr_ipv6 = ipv6AdIfid.toString()` |
| 4 | SET | `this.op_addr_ipv6 = null` (else branch) |

### Block 2 - [SET] Initialize Processing Variables (L18879)

> Prepares the input and result hash maps for querying the equipment provision service contract list. Sets the service contract number and filters by BBR service code.

| # | Type | Code |
|---|------|------|
| 1 | SET | `inHashKktk = new HashMap<String, Object>()` |
| 2 | SET | `resultHashKktk = new HashMap<String, Object>()` |
| 3 | SET | `inHashKktk.put(SVC_KEI_NO, this.svc_kei_no1)` // Service contract number |
| 4 | SET | `inHashKktk.put(KKTK_SVC_CD, KKTK_SVC_CD_BBR="C014")` // Equipment provision service code - BBR |
| 5 | CALL | `statusCode = callEKK0341B002SC(param, handle, inHashKktk, resultHashKktk, FUNC_CODE_1="1")` |

### Block 3 - [IF-ELSE] Status Code Check (L18892)

> Validates the return status of the `callEKK0341B002SC` service component call. If non-zero, throws an exception.

| # | Type | Code |
|---|------|------|
| 1 | IF | `0 != statusCode` |
| 2 | THROW | `throw new CCException("", new SCCallException("", String.valueOf(statusCode), statusCode))` |
| 3 | GET | `msgEKK0341B002SCList = (CAANMsg[])resultHashKktk.get(TEMPLATE_ID_EKK0341B002="EKK0341B002")` (else branch) |

### Block 4 - [IF-ELSE] Message List Null Check (L18896)

> Checks whether the equipment provision service contract list was returned.

| # | Type | Code |
|---|------|------|
| 1 | IF | `null != msgEKK0341B002SCList` |
| 2 | FOR | `for(int i = 0; i < msgEKK0341B002SCList.length; i++)` |
| 3 | GET | `eKK0341B002Hash = msgEKK0341B002SCList[i].getMsgData()` (loop body) |

### Block 4.1 - [IF-ELSE] Contract Status Filtering (L18915)

> Filters equipment provision service contracts by their status. If `sod_pattern_ipv6 != 3` (not cancellation mode), only accepts active contract statuses.

| # | Type | Code |
|---|------|------|
| 1 | GET | `kktkStat = shkkaChr(eKK0341B002Hash.get(KKTK_SVC_KEI_STAT))` // Equipment provision service status |
| 2 | IF | `3 != this.sod_pattern_ipv6` (not cancellation mode) |
| 3 | IF | `kktkStat not in SVC_KEI_STAT_100="100"(Service Providing), SVC_KEI_STAT_010="010"(Order Accepted), SVC_KEI_STAT_020="020"(Reviewed), SVC_KEI_STAT_030="030"(Contracted)` |
| 4 | SKIP | `continue` // Skip non-active statuses |

> **Note**: When `sod_pattern_ipv6 == 3` (cancellation mode), all contracts pass through (no status filtering applied in active code; commented-out cancellation-specific filtering exists in the codebase).

### Block 4.2 - [IF-ELSE] Change Category Filtering (L18964)

> Restricts processing based on the change category (`ido_div`). For new contracts ("00001"), all records are processed. For other change categories, only option setup ("00031") processes records, and only if the option service contract number matches.

| # | Type | Code |
|---|------|------|
| 1 | GET | `check_op_kei_no = shkkaChr(eKK0361A010Info.get(OP_SVC_KEI_NO))` // Option service contract number from ISP inquiry |
| 2 | IF | `!IDO_DIV_NEW="00001"(New Contract).equals(this.ido_div)` |
| 3 | IF | `IDO_DIV_OPSETTE="00031"(Option Setup).equals(this.ido_div)` |
| 4 | IF | `!check_op_kei_no.equals(shkkaChr(op_svc_kei_no_param))` |
| 5 | SKIP | `continue` // Option number does not match - skip |

### Block 4.3 - [IF-ELSE] Device Information Extraction (L18985)

> Extracts the equipment manufacturing number and model code from the query result. Validates both are non-blank.

| # | Type | Code |
|---|------|------|
| 1 | GET | `temp_ipv6_kktk_svc_kei_no = shkkaChr(eKK0341B002Hash.get(KKTK_SVC_KEI_NO))` // Equipment provision service contract number |
| 2 | GET | `temp_ipv6_kktk_svc_kei_gadtm = shkkaChr(eKK0341B002Hash.get(GENE_ADD_DTM))` // Generation registration datetime |
| 3 | SET | `this.kiki_seizo_no_ipv6 = shkkaChr(eKK0341B002Hash.get(KIKI_SEIZO_NO))` // Equipment manufacturing number |
| 4 | SET | `this.taknkiki_model_cd_ipv6 = shkkaChr(eKK0341B002Hash.get(TAKNKIKI_MODEL_CD))` // Domestic equipment model code |
| 5 | IF | `isBlank(this.kiki_seizo_no_ipv6) || isBlank(this.taknkiki_model_cd_ipv6)` |
| 6 | SKIP | `continue` // Missing device info - skip |

### Block 4.4 - [SET] Device Field Population (L19002)

> Sets the IPv6-specific device fields into instance variables for later use in SOD emission.

| # | Type | Code |
|---|------|------|
| 1 | SET | `this.ipv6_kktk_svc_kei_no = temp_ipv6_kktk_svc_kei_no` |
| 2 | SET | `this.ipv6_kktk_svc_kei_gadtm = temp_ipv6_kktk_svc_kei_gadtm` |

### Block 4.5 - [IF-ELSE] Equipment Arrays Initialization (L19007)

> Initializes the equipment manufacturing number and model code arrays if they have not been set yet, then populates index [0] with the IPv6 values.

| # | Type | Code |
|---|------|------|
| 1 | IF | `null == this.kiki_seizo_no || 0 == this.kiki_seizo_no.length` |
| 2 | SET | `this.kiki_seizo_no = new String[3]` |
| 3 | SET | `this.kiki_seizo_no[0] = this.kiki_seizo_no_ipv6` |
| 4 | IF | `null == this.taknkiki_model_cd || 0 == this.taknkiki_model_cd.length` |
| 5 | SET | `this.taknkiki_model_cd = new String[3]` |
| 6 | SET | `this.taknkiki_model_cd[0] = this.taknkiki_model_cd_ipv6` |

### Block 4.6 - [IF-ELSE] Equipment Model IPv6 Support Check (L19017)

> Calls `getTaknkikiM` to retrieve the equipment model manifest and determine if the model supports IPv6.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `taknkiki_model_m = getTaknkikiM(handle, param, this.taknkiki_model_cd_ipv6)` // Equipment model manifest |
| 2 | IF | `null != taknkiki_model_m` |
| 3 | SET | `this.kiki_ipv6_taio_flg = shkkaChr(taknkiki_model_m.get(IPV6_TAIO_FLG))` // Equipment IPv6 support code |

### Block 4.7 - [IF-ELSE] IPv6 Address Finalization (L19024)

> Determines whether the IPv6 address has been confirmed (non-null/non-empty), which is a prerequisite for SOD emission.

| # | Type | Code |
|---|------|------|
| 1 | IF | `isBlank(this.op_addr_ipv6)` |
| 2 | SET | `this.op_addr_kakutei_ipv6 = false` // IPv6 address not confirmed |
| 3 | SET | `this.op_addr_kakutei_ipv6 = true` // IPv6 address confirmed |

### Block 4.8 - [IF-ELSE] Equipment Shipment Completion Flag (L19033)

> Determines whether the equipment has been shipped by checking if it has a manufacturing number AND supports IPv6 (IPV6_TAIO_FLG_TAIO="1").

| # | Type | Code |
|---|------|------|
| 1 | IF | `!isBlank(this.kiki_seizo_no_ipv6) && IPV6_TAIO_FLG_TAIO="1".equals(shkkaChr(this.kiki_ipv6_taio_flg))` |
| 2 | SET | `this.kiki_shukka_sumi_ipv6 = true` // IPv6 equipment shipped |
| 3 | SET | `this.kiki_shukka_sumi_ipv6 = false` // IPv6 equipment not shipped |

### Block 4.9 - [IF-ELSE] IPV6 SOD Emission Trigger (L19044)

> If the equipment is IPV6-ready (shipment complete) AND the IPv6 address is confirmed, populates the service contract arrays and issues the IPV6 SOD by calling `hakkouIpv6`.

| # | Type | Code |
|---|------|------|
| 1 | IF | `kiki_shukka_sumi_ipv6 == true` |
| 2 | IF | `op_addr_kakutei_ipv6 == true` (IPv6 address confirmed) |
| 3 | IF | `null == this.kktk_svc_kei_no || 1 > this.kktk_svc_kei_no.length` |
| 4 | SET | `this.kktk_svc_kei_no = new String[1]` |
| 5 | SET | `this.kktk_svc_kei_no[0] = this.ipv6_kktk_svc_kei_no` |
| 6 | IF | `null == this.kktk_svc_kei_gadtm || 1 > this.kktk_svc_kei_gadtm.length` |
| 7 | SET | `this.kktk_svc_kei_gadtm = new String[1]` |
| 8 | SET | `this.kktk_svc_kei_gadtm[0] = this.ipv6_kktk_svc_kei_gadtm` |
| 9 | IF | `null == this.svc_kei_ucwk_no || 1 > this.svc_kei_ucwk_no.length` |
| 10 | SET | `this.svc_kei_ucwk_no = new String[1]` |
| 11 | SET | `this.svc_kei_ucwk_no[0] = this.ipv6_svc_kei_ucwk_no` |
| 12 | IF | `null == this.svc_kei_ucwk_gadtm || 1 > this.svc_kei_ucwk_gadtm.length` |
| 13 | SET | `this.svc_kei_ucwk_gadtm = new String[1]` |
| 14 | SET | `this.svc_kei_ucwk_gadtm[0] = this.ipv6_svc_kei_ucwk_gadtm` |
| 15 | CALL | `hakkouIpv6(handle, param, eKK0361A010Info)` // Issue IPV6 SOD |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `sod_pattern_ipv6` | Field | SOD emission pattern flag for IPv6 - value 1 means IPv6 registration (new), value 3 means IPv6 cancellation. Controls which contract statuses are accepted. |
| `ido_div` | Field | Change category code - classifies the type of service change (new contract, option setup, cancellation, etc.). Determines filtering rules for which contracts to process. |
| `op_addr_ipv6` | Field | IPv6 address assigned to the option service - extracted from the ISP inquiry result and later checked for confirmation. |
| `op_addr_kakutei_ipv6` | Field | IPv6 address determination flag - true when the IPv6 address is confirmed (non-null, non-empty). |
| `kiki_shukka_sumi_ipv6` | Field | Equipment shipment completion flag for IPv6 - true when the equipment has a manufacturing number and supports IPv6. |
| `kiki_seizo_no` | Field | Equipment manufacturing number - unique identifier assigned to each piece of equipment by the manufacturer. |
| `taknkiki_model_cd` | Field | Domestic equipment model code - identifies the model type of the customer-premises equipment. |
| `kiki_ipv6_taio_flg` | Field | Equipment IPv6 support flag - obtained from the equipment model manifest, indicates whether the model supports IPv6. |
| `ipv6_kktk_svc_kei_no` | Field | Equipment provision service contract number for IPv6. |
| `ipv6_kktk_svc_kei_gadtm` | Field | Equipment provision service contract generation registration datetime for IPv6. |
| `svc_kei_ucwk_no` | Field | Service contract internal line item number - uniquely identifies a line item within a service contract. |
| `svc_kei_no1` | Field | Service contract number - the primary key for querying equipment provision service contracts. |
| SOD | Acronym | Service Order Data - the order data generated by the system for service provisioning, containing all necessary information for downstream fulfillment processes. |
| BBR | Business term | Equipment Provision Service - code "C014" denotes the broadband equipment provision service category (customer-premises equipment provided by the carrier). |
| KKTK_SVC_CD | Field | Equipment Provision Service Code - the service category code for equipment provision (e.g., "C014" for BBR, "C024" for MRT). |
| KKTK_SVC_KEI_STAT | Field | Equipment Provision Service Contract Status - the current status of an equipment provision service contract. |
| KKTK_SVC_KEI_NO | Field | Equipment Provision Service Contract Number - the unique identifier for an equipment provision service contract record. |
| IP | Acronym | Internet Protocol - network protocol version 6 (IPv6), the successor to IPv4, providing a vastly larger address space. |
| ISP | Acronym | Internet Service Provider - here refers to the option service contract <ISP> inquiry, which provides IPv6 address assignment information. |
| IPV6_AD_IFID | Field | IPv6 Address Interface ID - the interface identifier extracted from the option service contract <ISP> inquiry result. |
| KIKI_SEIZO_NO | Field | Equipment Manufacturing Number - the serial number assigned to equipment by the manufacturer. |
| TAKNKIKI_MODEL_CD | Field | Domestic Equipment Model Code - identifies the type/model of customer-premises equipment. |
| GENE_ADD_DTM | Field | Generation Registration Datetime - the timestamp when a service contract generation was registered. |
| OP_SVC_KEI_NO | Field | Option Service Contract Number - uniquely identifies an option service contract (e.g., IPv6 option, email option). |
| SVC_KEI_NO | Field | Service Contract Number - the primary contract identifier. |
| IDO_DIV_NEW | Constant | "00001" - Change Category: New Contract. |
| IDO_DIV_OPSETTE | Constant | "00031" - Change Category: Option Setup. |
| KKTK_SVC_CD_BBR | Constant | "C014" - Equipment Provision Service Code for BBR (broadband equipment). |
| SVC_KEI_STAT_010 | Constant | "010" - Contract Status: Order Accepted. |
| SVC_KEI_STAT_020 | Constant | "020" - Contract Status: Reviewed. |
| SVC_KEI_STAT_030 | Constant | "030" - Contract Status: Contracted. |
| SVC_KEI_STAT_100 | Constant | "100" - Contract Status: Service Providing. |
| SVC_KEI_STAT_910 | Constant | "910" - Contract Status: Cancelled. |
| SVC_KEI_STAT_920 | Constant | "920" - Contract Status: Terminated. |
| IPV6_TAIO_FLG_TAIO | Constant | "1" - IPv6 Support Flag: Supported. |
| YOKYU_SBT_CD_NEW | Constant | "02" - Request Type Code: New. |
| ODR_NAIYO_CD_155 | Constant | "155" - Order Content Code: IPv6 Registration. |
| ODR_NAIYO_CD_163 | Constant | "163" - Order Content Code: Router Connection Information Change. |
| FUNC_CODE_1 | Constant | "1" - Function Code. |
| TEMPLATE_ID_EKK0341B002 | Constant | "EKK0341B002" - Template ID for Equipment Provision Service Contract List inquiry. |
| EKK0341B002SC | SC Code | Equipment Provision Service Contract List Inquiry Service Component - queries equipment provision service contracts by service contract number and service code. |
| EKK0361A010CBSMsg1List | CBS | Option Service Contract <ISP> Inquiry - provides IPv6 address assignment information and option service contract details. |
| EKK0341B002CBSMsg1List | CBS | Equipment Provision Service Contract inquiry message list - fields include KKTK_SVC_KEI_STAT, KKTK_SVC_KEI_NO, KIKI_SEIZO_NO, TAKNKIKI_MODEL_CD, GENE_ADD_DTM. |
| EKK0351A010CBSMsg1List | CBS | Option Service Contract status inquiry - provides OP_SVC_KEI_STAT (option service contract status). |
| EZM0411A010CBSMsg1List | CBS | Equipment Model manifest message list - includes IPV6_TAIO_FLG field. |
| tsuikabunAddSOD | Method | Additional SOD issuance method - called by `hakkouIpv6` to create SOD records for IPv6 registration and router connection changes. |
| hakkouIpv6 | Method | IPV6 SOD issuance internal processing - sets the request type code and calls `tsuikabunAddSOD` with appropriate order content codes (155 for registration, 163 for change). |
| callEKK0341B002SC | Method | Service component call for Equipment Provision Service Contract List inquiry - returns `CAANMsg[]` array of contract records. |
| getTaknkikiM | Method | Equipment model manifest lookup - queries the equipment model table to retrieve model details including IPV6 support flag. |
| shkkaChr | Method | Safe string conversion - trims whitespace and handles null values. Used to safely extract string values from HashMap results. |
| isBlank | Method | Null/blank/empty string check - returns true if the string is null, empty, or contains only whitespace. |
| CCException | Exception | Common Component Exception - wraps underlying SCCallException when service component calls fail. |
| SCCallException | Exception | Service Component Call Exception - thrown when a service component returns a non-zero status code. |
| CAANMsg | Class | Contract Announcement Message - carries service component inquiry results as key-value data maps. |
| IRequestParameterReadWrite | Interface | Request parameter interface - provides read/write access to model group data and control maps between screens and service components. |
| SessionHandle | Class | Session handle - carries database connections and context information for service component invocation. |
| eKK0341B002Hash | Variable | Temporary HashMap holding a single equipment provision service contract record extracted from the inquiry result. |
| eKK0361A010Info | Parameter | Option Service Contract <ISP> one-to-one inquiry result HashMap - contains IPv6 address and option service contract number. |
| inHashKktk | Variable | Input HashMap for `callEKK0341B002SC` - contains service contract number and BBR service code filter. |
| resultHashKktk | Variable | Result HashMap for `callEKK0341B002SC` - contains the returned equipment provision service contract list. |
| `kktk_svc_kei_no` | Field | Equipment provision service contract number array - populated when IPv6 SOD emission is triggered. |
| `kktk_svc_kei_gadtm` | Field | Equipment provision service contract generation registration datetime array. |
| `svc_kei_ucwk_no` | Field | Service contract internal line item number array. |
| `svc_kei_ucwk_gadtm` | Field | Service contract internal line item generation registration datetime array. |
| `ipv6_svc_kei_ucwk_no` | Field | IPv6 service contract internal line item number. |
| `ipv6_svc_kei_ucwk_gadtm` | Field | IPv6 service contract internal line item generation registration datetime. |
| `taishouIdx` | Field | Processing target index - counts the number of processed items (currently commented out in this method). |
| FTTH | Business term | Fiber To The Home - fiber-optic internet service. |
| OLS | Acronym | Optical Line Terminal Service / Optical Line Terminal - the fiber-optic access network equipment managed by the operator. |