# Business Logic — JKKKyoseiDslRunCC.svcCtlKyoKaiReq() [332 LOC]

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

## 1. Role

### JKKKyoseiDslRunCC.svcCtlKyoKaiReq()

This method executes the forced cancellation request processing for DSL service contracts (強制解約要求処理), serving as the central orchestrator for the complete lifecycle of a forced service cancellation (強制解約) within the K-Opticom customer backbone system. It coordinates a multi-stage pipeline that retrieves the customer's consent and service information, processes cancellation details specific to telephone services, executes service-specific option pack operations, runs discount auto-application checks, processes advance registration (進捗登録), creates work cases, applies logistics control, issues a Service Order Data document (SOD発行), conditionally updates phone number records tied to the DSL cancellation list, and finally registers smart valve and firmware cell movement information.

The method implements a **pipeline/dispatch design pattern**: it sequences a well-defined chain of step-by-step processing stages, branching at two key decision points — the price group code (`prc_grp_cd`) to determine whether the customer is on the "eo Optical Telephone" plan (code "10"), and the service code (`svc_cd`) to trigger telephone selection option pack processing. Each stage checks for errors and short-circuits via early return if any call fails, following the fail-fast principle.

The method receives a DSL cancellation phone number list (`dslTelnoList`) from an instance field set by the caller, and uses it to conditionally update phone number status records for customers whose DSL line was terminated as part of the forced cancellation. The return value is a status code: `0` for success, non-zero for failure at any stage.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["svcCtlKyoKaiReq"])
    END_RETURN(["Return 0"])

    START --> GET_EKK0081["Get eKK0081A010Hash from resultHash"]
    GET_EKK0081 --> CALL_ECK0011["callECK0011A010SC"]
    CALL_ECK0011 --> CHK_ECK0011{statusCode != 0}
    CHK_ECK0011 -->|yes| EARLY_RETURN["Return statusCode"]
    CHK_ECK0011 -->|no| GET_PRC_GRP["Get prc_grp_cd from eKK0081A010Hash"]

    GET_PRC_GRP --> CHK_PRC_GRP{prc_grp_cd equals PRC_GRP_CD_TEL}
    CHK_PRC_GRP -->|yes| CALL_EKK0241["callEKK0241B001SC"]
    CHK_PRC_GRP -->|no| GET_SVC_CD

    CALL_EKK0241 --> CHK_EKK0241{statusCode != 0}
    CHK_EKK0241 -->|yes| RETURN_EKK0241["Return statusCode"]
    CHK_EKK0241 -->|no| GET_EKK0241_LIST["Get eKK0241B001HashList"]

    GET_EKK0241_LIST --> CHK_EKK0241_LIST{eKK0241B001HashList != null}
    CHK_EKK0241_LIST -->|yes| LOOP_KAISEN["Loop eKK0241B001HashList get svcKeiKaisenUcwkNo"]
    CHK_EKK0241_LIST -->|no| GET_SVC_CD

    LOOP_KAISEN --> CALL_EKU0081["callEKU0081B020SC"]
    CALL_EKU0081 --> CHK_EKU0081{statusCode != 0}
    CHK_EKU0081 -->|yes| RETURN_EKU0081["Return statusCode"]
    CHK_EKU0081 -->|no| GET_EKU0081_LIST["Get eKU0081B020HashList"]

    GET_EKU0081_LIST --> CHK_EKU0081_LIST{eKU0081B020HashList != null}
    CHK_EKU0081_LIST -->|yes| LOOP_KOJIAK["Loop eKU0081B020HashList get kojiankNo"]
    CHK_EKU0081_LIST -->|no| GET_SVC_CD

    LOOP_KOJIAK --> CHK_KOJIAK{kojiankNo not null and not empty}
    CHK_KOJIAK -->|yes| CALL_ESC0021["callESC0021D010SC"]
    CHK_KOJIAK -->|no| NEXT_KOJIAK["next iteration"]
    CALL_ESC0021 --> CHK_ESC0021{statusCode != 0}
    CHK_ESC0021 -->|yes| RETURN_ESC0021["Return statusCode"]
    CHK_ESC0021 -->|no| NEXT_KOJIAK

    GET_SVC_CD --> GET_SVC_CD_FROM["Get svc_cd from eKK0081A010Hash"]
    GET_SVC_CD_FROM --> CHK_SVC_CD{svc_cd equals SVC_CD_TEL}
    CHK_SVC_CD -->|yes| GET_EKK0161["Get eKK0161B004HashList"]
    CHK_SVC_CD -->|no| EXEC_WRIB

    GET_EKK0161 --> LOOP_SVC_KEI["Loop eKK0161B004HashList get svc_kei_ucwk_no"]
    LOOP_SVC_KEI --> CALL_TEL_SELECT["executeTelSelectOpPackOperateCC"]
    CALL_TEL_SELECT --> CHK_TEL_SELECT{statusCode != 0}
    CHK_TEL_SELECT -->|yes| RETURN_TEL_SELECT["Return statusCode"]
    CHK_TEL_SELECT -->|no| NEXT_SVC_KEI["next iteration"]

    EXEC_WRIB --> EXEC_WRIB_CALL["executeWribAutoAplyCC"]
    EXEC_WRIB_CALL --> CHK_WRIB{statusCode != 0}
    CHK_WRIB -->|yes| RETURN_WRIB["Return statusCode"]
    CHK_WRIB -->|no| EXEC_PROGRESS["executeButuryuCtrlCC"]

    EXEC_PROGRESS --> CHK_PROGRESS{statusCode != 0}
    CHK_PROGRESS -->|yes| RETURN_PROGRESS["Return statusCode"]
    CHK_PROGRESS -->|no| EXEC_HAKKO_SOD["executeHakkoSodCC"]

    EXEC_HAKKO_SOD --> CHK_HAKKO{statusCode != 0}
    CHK_HAKKO -->|yes| RETURN_HAKKO["Return statusCode"]
    CHK_HAKKO -->|no| CHK_NTTORS{nttOrsDiv is null}
    CHK_NTTORS -->|yes| EXEC_KOJIAKEN["executeKojiAnkenCC"]
    CHK_NTTORS -->|no| EXEC_BUTURYU

    EXEC_KOJIAKEN --> CHK_KOJIAKEN{statusCode != 0}
    CHK_KOJIAKEN -->|yes| RETURN_KOJIAKEN["Return statusCode"]
    CHK_KOJIAKEN -->|no| EXEC_BUTURYU

    EXEC_BUTURYU --> EXEC_BUTURYU_CALL["executeButuryuCtrlCC"]
    EXEC_BUTURYU_CALL --> CHK_BUTURYU{statusCode != 0}
    CHK_BUTURYU -->|yes| RETURN_BUTURYU["Return statusCode"]
    CHK_BUTURYU -->|no| EXEC_HAKKO_SOD_2["executeHakkoSodCC"]

    EXEC_HAKKO_SOD_2 --> CHK_HAKKO_2{statusCode != 0}
    CHK_HAKKO_2 -->|yes| RETURN_HAKKO_2["Return statusCode"]
    CHK_HAKKO_2 -->|no| CHK_PRC_GRP_TEL2{prc_grp_cd equals PRC_GRP_CD_TEL}

    CHK_PRC_GRP_TEL2 -->|yes| CALL_ETU0051["callETU0051B010SC"]
    CHK_PRC_GRP_TEL2 -->|no| EXEC_SMTVL

    CALL_ETU0051 --> CHK_ETU0051{statusCode != 0}
    CHK_ETU0051 -->|yes| RETURN_ETU0051["Return statusCode"]
    CHK_ETU0051 -->|no| GET_JISHA_CD["Get jishaCd from eETU0051B010HashList"]

    GET_JISHA_CD --> CHK_DSL_LIST{dslTelnoList not null and not empty}
    CHK_DSL_LIST -->|yes| LOOP_TELNO["Loop dslTelnoList"]
    CHK_DSL_LIST -->|no| EXEC_SMTVL

    LOOP_TELNO --> CHK_TELNO{telno not null and not empty}
    CHK_TELNO -->|yes| CALL_EZM_A["callEZM0121A010SC"]
    CHK_TELNO -->|no| NEXT_TELNO
    CALL_EZM_A --> CHK_EZM_A{statusCode != 0}
    CHK_EZM_A -->|yes| RETURN_EZM_A["Return statusCode"]
    CHK_EZM_A -->|no| SET_MONAI_BMP["Set telnoMonaiBmpUm from SHK_KOJIN_HOJIN_TLN_TAI_CD"]

    SET_MONAI_BMP --> CHK_MONAI{MONAIBMPUM_ARI and jishaCd matches TLN_STKU_TSJGS_CD}
    CHK_MONAI -->|yes| CALL_EZM_C["callEZM0121C010SC"]
    CHK_MONAI -->|no| NEXT_TELNO
    CALL_EZM_C --> CHK_EZM_C{statusCode != 0}
    CHK_EZM_C -->|yes| RETURN_EZM_C["Return statusCode"]
    CHK_EZM_C -->|no| NEXT_TELNO

    NEXT_TELNO --> LOOP_TELNO_END{More telno}
    LOOP_TELNO_END -->|yes| LOOP_TELNO
    LOOP_TELNO_END -->|no| EXEC_SMTVL

    EXEC_SMTVL --> EXEC_SMTVL_CALL["executeSmtvlIdoInfAddCC"]
    EXEC_SMTVL_CALL --> CHK_SMTVL{statusCode != 0}
    CHK_SMTVL -->|yes| RETURN_SMTVL["Return statusCode"]
    CHK_SMTVL -->|no| EXEC_FMTC["executeFmtcelIdoInfAddCC"]

    EXEC_FMTC --> CHK_FMTC{statusCode != 0}
    CHK_FMTC -->|yes| RETURN_FMTC["Return statusCode"]
    CHK_FMTC -->|no| END_RETURN

    EARLY_RETURN --> END_RETURN
    RETURN_ECK0011 --> END_RETURN
    RETURN_EKK0241 --> END_RETURN
    RETURN_EKU0081 --> END_RETURN
    RETURN_ESC0021 --> END_RETURN
    RETURN_TEL_SELECT --> END_RETURN
    RETURN_WRIB --> END_RETURN
    RETURN_PROGRESS --> END_RETURN
    RETURN_KOJIAKEN --> END_RETURN
    RETURN_BUTURYU --> END_RETURN
    RETURN_HAKKO_SOD --> END_RETURN
    RETURN_HAKKO_2 --> END_RETURN
    RETURN_ETU0051 --> END_RETURN
    RETURN_EZM_A --> END_RETURN
    RETURN_EZM_C --> END_RETURN
    RETURN_SMTVL --> END_RETURN
    RETURN_FMTC --> END_RETURN
```

**Constant resolution key:**
- `PRC_GRP_CD_TEL = "10"` — Price group code for eo Optical Telephone (eo光電話)
- `SVC_CD_TEL = "02"` — Service code for Telephone service
- `MONAIBMPUM_ARI = "1"` — Presence of unused network number (網内番号有)
- `JKKStrConst.CD00410_HOJIN` — Legal entity code (法人) for individual/legal entity phone category
- `JKKStrConst.CD00002_UMU_1 = "1"` — Presence flag (有)
- `JKKStrConst.CD00002_UMU_0 = "0"` — Absence flag (無)

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | Session handle containing session manager and other context needed for DB/SC invocations throughout the cancellation pipeline. Carries transaction and authentication context. |
| 2 | `param` | `IRequestParameterReadWrite` | Parameter object containing model group and control map. Used to pass request/response data across all called service components and to store intermediate results (e.g., cancellation detail lists, work case lists). |
| 3 | `requestParam` | `HashMap<String, Object>` | Request parameters map carrying input data for the cancellation request — includes identifiers for the target customer, service, and cancellation reason. Passed to all service calls that require request context. |
| 4 | `resultHash` | `HashMap<String, Object>` | Output result map — used to store and retrieve intermediate processing results by template ID keys (e.g., `TEMPLATE_ID_EKK0081A010`, `TEMPLATE_ID_EKK0241B001`, `TEMPLATE_ID_EKU0081B020`). Acts as the shared data exchange channel across all pipeline stages. |
| 5 | `fixedText` | `String` | Fixed text parameter passed through to `executeKojiAnkenCC` (Work Case processing). Likely contains standardized message text or reason codes for work case creation during the cancellation flow. |

**Instance fields read:**
| Field | Type | Business Description |
|-------|------|---------------------|
| `dslTelnoList` | `ArrayList<String>` | DSL phone number list — the list of telephone numbers that became subjects of this cancellation. Set by the caller before invoking this method. Used in the phone number update section to determine which numbers need status updates. |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `JKKKyoseiDslRunCC.callECK0011A010SC` | ECK0011A010SC | Customer consent/agreement data (KK_T_CUSTOMER, KK_T_SVC_CONSENT) | Calls `callECK0011A010SC` to retrieve customer consent and agreement result — obtains service contract details including price group code and service code |
| R | `JKKKyoseiDslRunCC.callEKK0241B001SC` | EKK0241B001SC | Service contract cancellation details (KK_T_SVC_KEI_UCWK, KK_T_SVC_KEI) | Calls `callEKK0241B001SC` to retrieve the list of service contract cancellation line details for the telephone price group customer |
| R | `JKKKyoseiDslRunCC.callEKU0081B020SC` | EKU0081B020SC | Service contract work cases (KK_T_SVC_KEI_UCWK_CASE, KK_T_KOJIAK) | Calls `callEKU0081B020SC` to retrieve the list of work cases associated with each service contract cancellation detail |
| R | `JKKKyoseiDslRunCC.callESC0021D010SC` | ESC0021D010SC | VLAN service configuration (KK_T_VLAN, KK_T_SVC_KEI_UCWK_CASE) | Calls `callESC0021D010SC` — Telephone VLAN Service IF — invokes the VLAN service interface for each valid work case number |
| R | `JKKKyoseiDslRunCC.callETU0051B010SC` | ETU0051B010SC | Telecom operator master (KK_T_TSJGS_MAST, KK_T_TELNO) | Calls `callETU0051B010SC` to retrieve telecom operator code (自社コード = own company code) for phone number update processing |
| R | `JKKKyoseiDslRunCC.callEZM0121A010SC` | EZM0121A010SC | Phone number agreement/master data (KK_T_TELNO, KK_T_EZM_TELNO_AGR) | Calls `callEZM0121A010SC` — Phone Number Agreement Result inquiry — for each DSL cancellation phone number to determine individual vs. legal entity type |
| U | `JKKKyoseiDslRunCC.callEZM0121C010SC` | EZM0121C010SC | Phone number master (KK_T_TELNO, KK_T_EZM_TELNO_AGR) | Calls `callEZM0121C010SC` — Phone Number Update — updates the "Individual/Legal Entity Phone Number Category Code" to "2" (Legal) for numbers that are within-network and match the operator |
| - | `JKKKyoseiDslRunCC.executeButuryuCtrlCC` | - | Logistics control business logic | Calls `executeButuryuCtrlCC` — Logistics Control CC — processes logistics-related operations for the forced cancellation |
| C | `JKKKyoseiDslRunCC.executeFmtcelIdoInfAddCC` | - | Firmware/cell movement information table (KK_T_FMW_CELL_IDO_INF) | Calls `executeFmtcelIdoInfAddCC` — Firmware Cell Movement Information Registration CC — registers movement information for firmware cell changes |
| - | `JKKKyoseiDslRunCC.executeHakkoSodCC` | - | SOD (Service Order Data) entity | Calls `executeHakkoSodCC` — SOD Issuance CC — issues a Service Order Data document recording the forced cancellation order |
| - | `JKKKyoseiDslRunCC.executeKojiAnkenCC` | - | Work case entity (KK_T_KOJIAK, KK_T_KOJIAK_DETAIL) | Calls `executeKojiAnkenCC` — Work Case CC — creates a work case record when NTT division is not set (i.e., non-NTT withdrawal scenarios) |
| C | `JKKKyoseiDslRunCC.executeSmtvlIdoInfAddCC` | - | Smart valve movement information table (KK_T_SMTVL_IDO_INF) | Calls `executeSmtvlIdoInfAddCC` — Smart Valve Movement Information Registration CC — registers smart valve movement information |
| - | `JKKKyoseiDslRunCC.executeTelSelectOpPackOperateCC` | - | Telephone selection option pack contracts (KK_T_OP_SVC_KEI, KK_T_SVC_KEI_UCWK) | Calls `executeTelSelectOpPackOperateCC` — Telephone Selection Option Pack Operation CC — processes option pack operations for telephone service contract details |
| - | `JKKKyoseiDslRunCC.executeWribAutoAplyCC` | - | Discount/service auto-application business logic | Calls `executeWribAutoAplyCC` — Discount Service Auto-Apply CC — applies automatic discounts to the service contract |
| - | `JKKAddSjishoCC.isNullEmpty` | - | String utility | Calls `isNullEmpty` in `JKKAddSjishoCC` for null/empty checking |
| - | `JKKAddSjishoCCMapper.isNullEmpty` | - | String utility | Calls `isNullEmpty` in `JKKAddSjishoCCMapper` for null/empty checking |
| - | `JCNStringUtil.isNullEmpty` | - | String utility | Calls `isNullEmpty` in `JCNStringUtil` for null/empty checking |
| - | `JKKStringUtil.isNullEmpty` | - | String utility | Calls `isNullEmpty` in `JKKStringUtil` for null/empty checking (used for `nttOrsDiv` check) |
| - | `FUW12201SFLogic.isNullEmpty` | - | String utility | Calls `isNullEmpty` in `FUW12201SFLogic` for null/empty checking |

## 5. Dependency Trace

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

No screen/batch entry points found within 8 hops. Direct callers found: 4 methods.
Terminal operations from this method: `executeFmtcelIdoInfAddCC` [C], `executeSmtvlIdoInfAddCC` [C], `callEZM0121C010SC` [R], `callEZM0121A010SC` [R], `callETU0051B010SC` [R], `executeHakkoSodCC` [-], `executeButuryuCtrlCC` [-], `executeKojiAnkenCC` [-], `isNullEmpty` [-], `isNullEmpty` [-], `isNullEmpty` [-], `isNullEmpty` [-], `isNullEmpty` [-], `callEKK1091D010SC` [R], `executeWribAutoAplyCC` [-], `executeTelSelectOpPackOperateCC` [-], `callESC0021D010SC` [R], `callEKU0081B020SC` [R], `callEKK0241B001SC` [R], `callECK0011A010SC` [R]

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | `JKKKyoseiDslRunCC.executeKyoseiDslProc()` | `executeKyoseiDslProc` -> `svcCtlKyoKaiReq` | `executeFmtcelIdoInfAddCC [C] KK_T_FMW_CELL_IDO_INF`, `executeSmtvlIdoInfAddCC [C] KK_T_SMTVL_IDO_INF`, `callEZM0121C010SC [U] KK_T_TELNO`, `callEZM0121A010SC [R] KK_T_TELNO`, `callETU0051B010SC [R] KK_T_TSJGS_MAST`, `executeHakkoSodCC [-] SOD`, `executeButuryuCtrlCC [-] logistics`, `executeKojiAnkenCC [-] KK_T_KOJIAK`, `callEKK1091D010SC [R] progress registration`, `executeWribAutoAplyCC [-] discount`, `executeTelSelectOpPackOperateCC [-] KK_T_OP_SVC_KEI`, `callESC0021D010SC [R] KK_T_VLAN`, `callEKU0081B020SC [R] KK_T_KOJIAK`, `callEKK0241B001SC [R] KK_T_SVC_KEI_UCWK`, `callECK0011A010SC [R] KK_T_CUSTOMER` |

## 6. Per-Branch Detail Blocks

### Block 1 — Initialization (L3632)

Initialize status code and retrieve service contract consent results.

| # | Type | Code |
|---|------|------|
| 1 | SET | `statusCode = 0` // Initialize return code |
| 2 | SET | `eKK0081A010Hash = null` // Service contract consent result map |
| 3 | SET | `eKK0081A010Hash = (HashMap)resultHash.get(TEMPLATE_ID_EKK0081A010)` // Get consent results from resultHash [-> TEMPLATE_ID_EKK0081A010 = "EKK0081A010"] |

> **Business description:** Retrieves the service contract agreement result map that was previously populated by an earlier stage. This map contains the customer's consent data including the price group code and service code needed for branching.

### Block 2 — Customer Consent Processing (L3637–L3642)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `statusCode = callECK0011A010SC(param, handle, eKK0081A010Hash, resultHash)` // [-> ECK0011A010SC] Customer consent/agreement retrieval |
| 2 | IF | `statusCode != 0` [L3640] |
| 2.1 | RETURN | `return statusCode` // Early return on error |

> **Business description:** Invokes the service component to retrieve the customer consent result. If the call fails, the entire pipeline aborts immediately.

### Block 3 — Extract Price Group Code and NTT Division (L3645–L3649)

| # | Type | Code |
|---|------|------|
| 1 | SET | `prc_grp_cd = (String)eKK0081A010Hash.get(EKK0081A010CBSMsg1List.PRC_GRP_CD)` // Extract price group code |
| 2 | SET | `nttOrsDiv = (String)eKK0081A010Hash.get(EKK0081A010CBSMsg1List.NTTORS_DIV)` // NTT division (NTT卸区分) [ANK-4427-48-00 2025/01/30 Add] |

> **Business description:** Extracts the price group code to determine which service category the customer belongs to. Also extracts the NTT division flag (introduced for NTT withdrawal support per ANK-4427-48-00) used later to conditionally skip work case processing for NTT-remote cases.

### Block 4 — Telephone Price Group Branch: Service Contract Cancellation Details (L3653–L3691)

**Condition:** `PRC_GRP_CD_TEL.equals(prc_grp_cd)` [-> `PRC_GRP_CD_TEL = "10"` (eo Optical Telephone)]

#### Block 4.1 — Call EKK0241B001SC (L3656–L3664)

| # | Type | Code |
|---|------|------|
| 1 | SET | `eKK0241B001HashList = new ArrayList<HashMap<String, Object>>()` // Initialize cancellation detail list |
| 2 | CALL | `statusCode = callEKK0241B001SC(param, handle, requestParam, resultHash)` // [-> EKK0241B001SC] Service contract cancellation details list |
| 3 | IF | `statusCode != 0` [L3662] |
| 3.1 | RETURN | `return statusCode` |

#### Block 4.2 — Extract and Loop Cancellation Details (L3667–L3691)

| # | Type | Code |
|---|------|------|
| 1 | SET | `eKK0241B001HashList = (ArrayList<HashMap<String, Object>>)resultHash.get(TEMPLATE_ID_EKK0241B001)` // [-> TEMPLATE_ID_EKK0241B001 = "EKK0241B001"] |
| 2 | IF | `eKK0241B001HashList != null` [L3669] |
| 2.1 | FOR | `for(int i = 0; i < eKK0241B001HashList.size(); i++)` // Loop over each service contract cancellation detail |

##### Block 4.2.1 — Extract svcKeiKaisenUcwkNo and Call EKU0081B020SC (L3673–L3690)

| # | Type | Code |
|---|------|------|
| 1 | SET | `eKK0241B001Hash = eKK0241B001HashList.get(i)` // Get current detail |
| 2 | SET | `svcKeiKaisenUcwkNo = (String)eKK0241B001Hash.get(EKK0241B001CBSMsg1List.SVC_KEI_KAISEN_UCWK_NO)` // Service contract cancellation work number |
| 3 | CALL | `statusCode = callEKU0081B020SC(param, handle, requestParam, resultHash, svcKeiKaisenUcwkNo)` // [-> EKU0081B020SC] Service contract work cases |
| 4 | IF | `statusCode != 0` [L3682] |
| 4.1 | RETURN | `return statusCode` |

### Block 5 — Telephone Selection Option Pack Pack Processing (L3703–L3730)

**Condition:** `SVC_CD_TEL.equals(svc_cd)` [-> `SVC_CD_TEL = "02"` (Telephone service)]

> **Business description:** For telephone service customers, processes the optical telephone selection option pack operations. This section is tagged as ANK-2056-00-00.

| # | Type | Code |
|---|------|------|
| 1 | SET | `svc_cd = (String)eKK0081A010Hash.get(EKK0081A010CBSMsg1List.SVC_CD)` // Extract service code |
| 2 | SET | `eKK0161B004HashList = (ArrayList<HashMap<String, Object>>)resultHash.get(TEMPLATE_ID_EKK0161B004)` // [-> TEMPLATE_ID_EKK0161B004 = "EKK0161B004"] |
| 3 | FOR | `for(int idx_su = 0; idx_su < eKK0161B004HashList.size(); idx_su++)` // Loop over service contract details |

#### Block 5.1 — Loop Body: Process Each Contract Detail (L3714–L3729)

| # | Type | Code |
|---|------|------|
| 1 | SET | `eKK0161B004Hash = eKK0161B004HashList.get(idx_su)` |
| 2 | SET | `svc_kei_ucwk_no = (String)eKK0161B004Hash.get(EKK0161A010CBSMsg1List.SVC_KEI_UCWK_NO)` // Service contract detail number |
| 3 | CALL | `statusCode = executeTelSelectOpPackOperateCC(param, handle, requestParam, resultHash, svc_kei_ucwk_no, eKK0081A010Hash)` // Telephone selection option pack operation |
| 4 | IF | `statusCode != 0` [L3724] |
| 4.1 | RETURN | `return statusCode` |

### Block 6 — Discount Service Auto-Apply (L3737–L3743)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `statusCode = executeWribAutoAplyCC(param, handle, requestParam, resultHash)` // Discount service auto-apply |
| 2 | IF | `statusCode != 0` [L3740] |
| 2.1 | RETURN | `return statusCode` |

### Block 7 — Progress Registration (L3749–L3755)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `statusCode = callEKK1091D010SC(param, handle, requestParam, resultHash)` // [-> EKK1091D010SC] Progress registration processing |
| 2 | IF | `statusCode != 0` [L3752] |
| 2.1 | RETURN | `return statusCode` |

### Block 8 — Work Case Processing (ANK-2801-01-00 Modified) (L3764–L3778)

**Condition:** `JKKStringUtil.isNullEmpty(nttOrsDiv)` — executes work case creation only when NTT division is NOT set (i.e., non-NTT withdrawal)

> **Business description:** The original condition `chkMansPayHoshiki(param, handle, resultHash)` was removed (ANK-2801-01-00 DEL). Now, work case processing is executed based solely on the `nttOrsDiv` value — when it is null or empty (non-NTT withdrawal case), the work case is created. When `nttOrsDiv` is set (NTT withdrawal), work case processing is skipped.

| # | Type | Code |
|---|------|------|
| 1 | IF | `JKKStringUtil.isNullEmpty(nttOrsDiv)` [-> ANK-4427-48-00 2025/01/30 Add] |
| 1.1 | CALL | `statusCode = executeKojiAnkenCC(handle, param, requestParam, resultHash, fixedText)` // Work case creation |
| 1.2 | IF | `statusCode != 0` [L3774] |
| 1.2.1 | RETURN | `return statusCode` |

### Block 9 — Logistics Control CC (L3788–L3794)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `statusCode = executeButuryuCtrlCC(handle, param, requestParam, resultHash)` // Logistics control |
| 2 | IF | `statusCode != 0` [L3791] |
| 2.1 | RETURN | `return statusCode` |

### Block 10 — SOD Issuance (L3804–L3810)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `statusCode = executeHakkoSodCC(handle, param, requestParam, resultHash)` // SOD issuance |
| 2 | IF | `statusCode != 0` [L3807] |
| 2.1 | RETURN | `return statusCode` |

### Block 11 — Phone Number Update Section (ANK-4494-00-00) (L3818–L3902)

**Condition:** `PRC_GRP_CD_TEL.equals(prc_grp_cd)` [-> `"10"` (eo Optical Telephone)]

> **Business description:** For telephone price group customers, updates phone number records associated with DSL cancellation. Introduced in ANK-4494-00-00 (Two-way banpo support). The section first retrieves the telecom operator code via ETU0051B010SC, then iterates over the DSL phone number list to determine if each number should have its individual/legal entity category updated to "2" (Legal).

#### Block 11.1 — Call ETU0051B010SC and Extract Operator Code (L3826–L3834)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `statusCode = callETU0051B010SC(param, handle, resultHash)` // [-> ETU0051B010SC] Phone number update SC |
| 2 | IF | `statusCode != 0` [L3830] |
| 2.1 | RETURN | `return statusCode` |
| 3 | SET | `eETU0051B010HashList = (HashMap<String, Object>)resultHash.get(TEMPLATE_ID_ETU0051B010)` // [-> TEMPLATE_ID_ETU0051B010 = "ETU0051B010"] |
| 4 | SET | `jishaCd = (String)eETU0051B010HashList.get(ETU0051B010CBSMsg1List.TSJGS_CD)` // Telecom operator code (自社コード) |

#### Block 11.2 — DSL Phone Number List Check (L3836–L3838)

**Condition:** `this.dslTelnoList != null && this.dslTelnoList.size() != 0`

| # | Type | Code |
|---|------|------|
| 1 | FOR | `for(String telno : dslTelnoList)` // Loop over each DSL cancellation phone number |

##### Block 11.2.1 — Phone Number Null/Empty Check (L3840–L3842)

**Condition:** `telno != null && !"".equals(telno)`

| # | Type | Code |
|---|------|------|
| 1 | CALL | `statusCode = callEZM0121A010SC(param, handle, telno, resultHash)` // [-> EZM0121A010SC] Phone agreement result inquiry |
| 2 | IF | `statusCode != 0` [L3852] |
| 2.1 | RETURN | `return statusCode` |
| 3 | SET | `eZM0121A010HashList = (HashMap<String, Object>)resultHash.get(TEMPLATE_ID_EZM0121A010)` // [-> TEMPLATE_ID_EZM0121A010 = "EZM0121A010"] |
| 4 | SET | `telnoMonaiBmpUm = JKKStrConst.CD00410_HOJIN.equals(eZM0121A010HashList.get(EZM0121A010CBSMsg1List.SHK_KOJIN_HOJIN_TLN_TAI_CD)) ? JKKStrConst.CD00002_UMU_1 : JKKStrConst.CD00002_UMU_0` // Determine presence of unused network number based on individual/legal entity phone category |

> **Business description:** The presence of an unused network number (網内番号有無) is determined by checking whether the customer's initial individual/legal entity phone category code (`SHK_KOJIN_HOJIN_TLN_TAI_CD`) equals the legal entity code (`CD00410_HOJIN = "法人"`). If legal entity, set to "1" (有/present); otherwise "0" (無/absent).

##### Block 11.2.2 — Phone Number Update Condition (ANK-4685-00-00) (L3858–L3870)

**Condition:** `JKKTelnoStatJudgeConstCC.MONAIBMPUM_ARI.equals(telnoMonaiBmpUm) && jishaCd != null && jishaCd.equals(eZM0121A010HashList.get(EZM0121A010CBSMsg1List.TLN_STKU_TSJGS_CD))`

> **Business description:** Updated in ANK-4685-00-00 to add an additional check: the telecom operator code from the current inquiry (`TLN_STKU_TSJGS_CD`) must match the operator code retrieved earlier (`jishaCd`). Only when both conditions are met — unused network number present AND operator code matches — is the phone number's individual/legal entity category updated to "2" (Legal).

| # | Type | Code |
|---|------|------|
| 1 | CALL | `statusCode = callEZM0121C010SC(param, handle, resultHash, KOJIN_HOJIN_TLN_TAI_CD, eZM0121A010HashList)` // [-> EZM0121C010SC] Phone number update — sets KOJIN_HOJIN_TLN_TAI_CD to "2" (Legal) |
| 2 | IF | `statusCode != 0` [L3865] |
| 2.1 | RETURN | `return statusCode` |

### Block 12 — Smart Valve Movement Information Registration (L3909–L3915)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `statusCode = executeSmtvlIdoInfAddCC(handle, param, requestParam, resultHash)` // Smart valve movement info registration (ANK-0406-00-0007) |
| 2 | IF | `statusCode != 0` [L3912] |
| 2.1 | RETURN | `return statusCode` |

### Block 13 — Firmware Cell Movement Information Registration (L3925–L3931)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `statusCode = executeFmtcelIdoInfAddCC(handle, param, requestParam, resultHash)` // Firmware cell movement info registration (ANK-0035-00-0007) |
| 2 | IF | `statusCode != 0` [L3928] |
| 2.1 | RETURN | `return statusCode` |

### Block 14 — Normal Return (L3944)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return 0` // Normal completion |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `svcCtlKyoKaiReq` | Method | Service contract forced cancellation request processing — the core pipeline method for forced service cancellation |
| 強制解約 (Kyosei Kaiai) | Japanese term | Forced cancellation — termination of a service contract by the provider, typically due to non-payment or policy violation |
| `prc_grp_cd` | Field | Price group code — classifies the customer's billing plan type (e.g., "10" for eo Optical Telephone) |
| `PRC_GRP_CD_TEL` | Constant | Price group code "10" — eo Optical Telephone (eo光電話) plan |
| `svc_cd` | Field | Service code — identifies the service type ("02" = Telephone, "01" = Network/Internet) |
| `SVC_CD_TEL` | Constant | Service code "02" — Telephone service |
| `NTTORS_DIV` | Field | NTT withdrawal/division flag — indicates whether the cancellation involves NTT withdrawal (NTT卸); added in ANK-4427-48-00 |
| `kojiankNo` | Field | Work case number (工事案件番号) — identifier for a field work case related to service cancellation |
| `svc_kei_ucwk_no` | Field | Service contract detail work number (サービス契約内訳番号) — internal tracking ID for service contract line items |
| `svcKeiKaisenUcwkNo` | Field | Service contract cancellation work number (サービス契約取消内訳番号) — work number for service contract cancellation details |
| `telnoMonaiBmpUm` | Field | Presence of unused network number (網内番号有無) — "1" if present, "0" if absent; used to determine phone number update logic |
| `KOJIN_HOJIN_TLN_TAI_CD` | Constant/Field | Individual/Legal Entity phone number category code (個人法人電話番号帯コード) — indicates whether a phone number is assigned to an individual ("1") or legal entity ("2") |
| `SHK_KOJIN_HOJIN_TLN_TAI_CD` | Field | Initial individual/legal entity phone number category code — the original assignment category from the initial registration |
| `CD00410_HOJIN` | Constant | Legal entity code (法人) for phone number individual/legal entity category |
| `CD00002_UMU_1` | Constant | Presence flag "1" (有) |
| `CD00002_UMU_0` | Constant | Absence flag "0" (無) |
| `MONAIBMPUM_ARI` | Constant | Presence of unused network number (網内番号有) — value "1" |
| `jishaCd` | Field | Telecom operator code for self/company (通信事業者コード〈自社〉) — the operator's own company identifier |
| `TSJGS_CD` | Field | Telecom service provider code (通信事業者コード) — code identifying the telecom service provider |
| `TLN_STKU_TSJGS_CD` | Field | Phone number current status telecom provider code (電話番号現状通信事業者コード) — operator code at time of current phone status inquiry |
| `dslTelnoList` | Instance field | DSL phone number list — telephone numbers subject to cancellation, set by the caller before invoking this method |
| SOD | Acronym | Service Order Data (発行SOD) — a business document recording the order for telecom service changes; issued during forced cancellation |
| VLAN | Acronym | Virtual Local Area Network — used for isolating traffic for DSL/FTTH services |
| NTT卸 (NTT Orshi) | Business term | NTT wholesale — NTT's wholesale telecom service division; NTTORS_DIV flag indicates involvement in NTT wholesale cancellation |
| 網内番号 (Mounai Bangou) | Japanese term | Within-network number — a phone number usable for calls within the same carrier's network; often associated with specific number blocks |
| 進捗登録 (Shinroku Touroku) | Japanese term | Progress registration — recording the current processing progress of the service cancellation in the system |
| 物流制御 (Buturyu Seigyo) | Japanese term | Logistics control — processing logistics-related operations for the service cancellation (e.g., equipment return, line disconnection) |
| スマートバルブ (Smart Valve) | Japanese term | Smart Valve — a remote service control mechanism for telecommunications; movement information tracks state changes |
| ファームセル (Firmware Cell) | Japanese term | Firmware cell — firmware-related change tracking entity; movement information records firmware updates or changes |
| 割引サービス自動適用 (Wrib Jidou Tekiyo) | Japanese term | Discount service auto-apply — automatic application of discounts to service contracts during cancellation processing |
| 電話セレクトオプションパック (Denwa Seleku Opushon Pakku) | Japanese term | Telephone selection option pack — optional add-on services for telephone lines that can be operated/managed |
| 工事案件 (Koji Anken) | Japanese term | Work case / construction case — a field work order created for service installation or cancellation tasks |
| 料金グループコード (Ryokin Gurupu Koedo) | Japanese term | Price group code — classifies the billing plan category for a customer's service |
| eo光電話 (eo Hikari Denwa) | Business term | eo Optical Telephone — K-Opticom's fiber-optic telephone service bundle |
| ECK/EKK/EKU/ESC/ETU/EZM | SC Code prefix | Service Component code prefixes — ECK=Customer/Consent, EKK=Service Contract, EKU=Service Contract Update, ESC=Service/Contract, ETU=Telecom/Update, EZM=Phone/Message |
