# Business Logic — JKKCancelSvcKeiCC.getKktkSvcKeiData() [269 LOC]

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

## 1. Role

### JKKCancelSvcKeiCC.getKktkSvcKeiData()

This method retrieves and processes equipment-provided (KKT) service contract agreement information for all service contracts associated with a given service detail number during a service cancellation flow. It serves as a shared data-retrieval component (CC) called within `JKKCancelSvcKeiCC.getKktkSvcKeiAllData()` (line 1143) as part of the broader service cancellation processing pipeline.

The method handles three distinct service type categories based on the pricing group code: **TV services** (pricing group codes 11/12/13 — K-CAT, KCN, Resend/SSS), **network services** (price codes in `PCRS_NET_CDS` array), and **phone services** (price codes `PCRS_TEL_CDS`: A31/A32). For TV services, it performs unconditional cancellation on V-ONU (C013) equipment since TV contracts do not share hardware with other service contracts. For non-TV services, it implements a mutual-dependency check: when cancelling a network service, it queries which phone services remain active (and vice versa); if no other active services exist, all ONU equipment is marked for cancellation; if other active services exist, multifunction routers (C024 — "Takino") and home gateways (C025 — HGW) are cancelled independently while other ONU devices are handed over to the construction case CC for processing.

The method uses a **routing/dispatch pattern** combined with **delegation** — it delegates low-level data retrieval to multiple service components (SCs) and then applies business-specific filtering logic. Its return value (`statusCode = 0` for normal, non-zero on error) feeds back into the caller's status-checking flow.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["getKktkSvcKeiData(params)"])
    INIT["Initialize: eKK0081A010Hash=null, statusCode=STAT_NORMAL(0)"]
    MAP_GET["Get eKK0081A010Hash from workField[SVC_KEI(\"svc_kei\")]"]
    EXTRACT["Extract svcKeiNo, prcGrpCd, pcrsCd from eKK0081A010Hash"]
    CALL_LIST["callEKK0341B011SC - Query service contract details by svc_kei_no"]
    INIT_LIST["Initialize: eKK0341A010HashList, eKK0341A010HashListKojiak"]
    LOOP_KKT["Loop: eKK0341B011HashList (each svc_kei_no)"]
    KKT_CALL["callEKK0341A010SC - Service contract agreement for each service"]
    ADD_LIST["Add result to eKK0341A010HashList"]
    GET_LINE["Get line details: eKK0251A010HashList from workField[SVKEI_KAISEN_UW]"]
    INIT_EX["Initialize: exSvkeiKaisenUw list, put to workField[WORK_FIELD_EX_SVKEI_KAISEN_UW]"]
    LOOP_LINE["Loop: eKK0251A010HashList (per line)"]
    CALL_VONU["callEKK0341B504SC - Query KKT service contract details by line"]
    CALL_ACTIVE["callEKK0081B007SC - Query active service contracts for line"]
    CHECK_MULTI["eKK0081B007ResultList.size() > 1?"]
    ADD_EX["Add svc_kei_kaisen_ucwk_no to exSvkeiKaisenUw"]
    CHECK_TV["prcGrpCd = PRC_GRP_CD_TV_KCAT(11) or PRC_GRP_CD_TV_SSS(13) or PRC_GRP_CD_TV_KCN(12)?"]
    FILTER_VONU["Filter eKK0341B504ResultList: only KKTK_SVC_CD_VONU(C013) -> vonuArray"]
    LOOP_VONU["Loop: vonuArray"]
    VONU_AGREE["callEKK0341A010SC - Agreement for each V-ONU"]
    VONU_ADD["Add to eKK0341A010HashList"]
    FILTER_OTHER["Filter eKK0341B504ResultList: exclude V-ONU -> onuArray"]
    LOOP_ONU["Loop: onuArray"]
    CHECK_STAT["kktkSvcKeiStat = STAT_DSL_ZUMI(910) or STAT_CNCL_ZUMI(920)?"]
    SKIP_ONU["Continue to next iteration"]
    ONU_AGREE["callEKK0341A010SC - Agreement for each non-V-ONU"]
    CHECK_NET["pcrsCd in PCRS_NET_CDS[]?"]
    CALL_ENABLE["getEnableService - Get active network services (when cancelling phone)"]
    CHECK_TEL["pcrsCd in PCRS_TEL_CDS[]?"]
    CALL_ENABLE_TEL["getEnableService - Get active phone services (when cancelling network)"]
    CHECK_EMPTY["enableServices != null and size == 0?"]
    ADD_CANCEL["Add to eKK0341A010HashList (cancel)"]
    CHECK_HGW["kktkSvcCd = KKTK_SVC_CD_TAKINO(C024) or KKTK_SVC_CD_HGW(C025)?"]
    ADD_KOJIAK["Add to eKK0341A010HashListKojiak (work case handover)"]
    PUT_ENABLE["Put enableServices to workField[WORK_FIELD_ENABLE_SERVICES]"]
    STORE_RESULT["Put eKK0341A010HashList to workField[KKTK_SVC_KEI(\"kktk_svc_kei\")]"]
    STORE_KOJIAK["Put eKK0341A010HashListKojiak to workField[KKTK_SVC_KEI_KOJIAK(\"kktk_svc_kei_kojiak\")]"]
    RETURN["Return statusCode"]

    START --> INIT
    INIT --> MAP_GET
    MAP_GET --> EXTRACT
    EXTRACT --> CALL_LIST
    CALL_LIST --> INIT_LIST
    INIT_LIST --> LOOP_KKT
    LOOP_KKT --> KKT_CALL
    KKT_CALL --> ADD_LIST
    ADD_LIST --> LOOP_KKT
    LOOP_KKT --> GET_LINE
    GET_LINE --> INIT_EX
    INIT_EX --> LOOP_LINE
    LOOP_LINE --> CALL_VONU
    CALL_VONU --> CALL_ACTIVE
    CALL_ACTIVE --> CHECK_MULTI
    CHECK_MULTI -- "True" --> ADD_EX
    CHECK_MULTI -- "False" --> CHECK_TV
    ADD_EX --> CHECK_TV
    CHECK_TV -- "True (TV)" --> FILTER_VONU
    CHECK_TV -- "False (Non-TV)" --> FILTER_OTHER
    FILTER_VONU --> LOOP_VONU
    LOOP_VONU --> VONU_AGREE
    VONU_AGREE --> VONU_ADD
    VONU_ADD --> LOOP_VONU
    LOOP_VONU --> FILTER_OTHER
    FILTER_OTHER --> LOOP_ONU
    LOOP_ONU --> CHECK_STAT
    CHECK_STAT -- "True (cancelled)" --> SKIP_ONU
    CHECK_STAT -- "False (active)" --> ONU_AGREE
    SKIP_ONU --> LOOP_ONU
    ONU_AGREE --> CHECK_NET
    CHECK_NET -- "True" --> CALL_ENABLE
    CALL_ENABLE --> CHECK_TEL
    CHECK_NET -- "False" --> CHECK_TEL
    CHECK_TEL -- "True" --> CALL_ENABLE_TEL
    CHECK_TEL -- "False" --> CHECK_EMPTY
    CALL_ENABLE_TEL --> CHECK_EMPTY
    CHECK_EMPTY -- "True (no other active)" --> ADD_CANCEL
    CHECK_EMPTY -- "False (other active exists)" --> CHECK_HGW
    ADD_CANCEL --> LOOP_ONU
    CHECK_HGW -- "True (TAKINO or HGW)" --> ADD_CANCEL
    CHECK_HGW -- "False (other device)" --> ADD_KOJIAK
    ADD_KOJIAK --> LOOP_ONU
    LOOP_ONU --> PUT_ENABLE
    PUT_ENABLE --> STORE_RESULT
    STORE_RESULT --> STORE_KOJIAK
    STORE_KOJIAK --> RETURN
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `param` | `IRequestParameterReadWrite` | Request parameter object carrying incoming screen/batch input data. Provides access to call pattern number, service contract number, movement classification, progress status, work case cancellation YMD and reason, NG data judgment flag, work reference memo, movement reason code, application form number, etc. |
| 2 | `handle` | `SessionHandle` | Database session handle used for all SC (Service Component) calls. Manages the database transaction context and connection for the duration of the service cancellation processing. |
| 3 | `trgt_data` | `HashMap<String, Object>` | Application-specific input parameters map. Carries the primary request data from the calling screen/CBS, including target data keys used by SC calls such as service contract number. |
| 4 | `workField` | `HashMap<String, Object>` | Result acquisition area — a shared working data map passed between processing steps. Pre-populated by prior methods with `SVC_KEI` (service contract agreement result), `SVKEI_KAISEN_UW` (service contract line details). This method reads from it to extract service numbers and pricing codes, and writes results back as `KKTK_SVC_KEI` (KKT service contract agreement result), `KKTK_SVC_KEI_KOJIAK` (KKT service contract agreement result for work cases), and `WORK_FIELD_ENABLE_SERVICES` (enabled other services list). |

**External state / constants read by this method:**

| Constant | Resolved Value | Business Meaning |
|----------|---------------|------------------|
| `SVC_KEI` | `"svc_kei"` | Work field key for service contract agreement result |
| `SVKEI_KAISEN_UW` | `"svkei_kaisen_uw"` | Work field key for service contract line details |
| `PRC_GRP_CD_TV_KCAT` | `"11"` | Pricing group code for eo光TV (K-CAT) |
| `PRC_GRP_CD_TV_SSS` | `"13"` | Pricing group code for eo光TV (Resend/SSS) |
| `PRC_GRP_CD_TV_KCN` | `"12"` | Pricing group code for eo光TV (KCN) |
| `KKTK_SVC_CD_VONU` | `"C013"` | Equipment code for V-ONU (fiber-optic terminal) |
| `KKTK_SVC_CD_TAKINO` | `"C024"` | Equipment code for multifunction router (Takino) |
| `KKTK_SVC_CD_HGW` | `"C025"` | Equipment code for Home Gateway |
| `STAT_DSL_ZUMI` | `"910"` | Status: Contract terminated (completed) |
| `STAT_CNCL_ZUMI` | `"920"` | Status: Cancellation completed |
| `KKTK_SVC_KEI` | `"kktk_svc_kei"` | Work field key for all KKT service contract agreement results |
| `KKTK_SVC_KEI_KOJIAK` | `"kktk_svc_kei_kojiak"` | Work field key for KKT results to hand over to construction case CC |
| `PCRS_NET_CDS` | Array of 39 price codes (A03-A74, A83-A99, AA0-AA4, AB0-AB4) | Network pricing code values — broadband service cost plans |
| `PCRS_TEL_CDS` | `["A31", "A32"]` | Phone pricing code values — telephone service cost plans |

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `callEKK0341B011SC` | `EKK0341B011SC` | `KK_T_OPSVKEI_ISP` (and related service contract tables) | Query service contract details list by service contract number (svc_kei_no) — retrieves the list of service detail items to process |
| R | `callEKK0341A010SC` | `EKK0341A010SC` | `KK_T_OPSVKEI_ISP`, `KK_T_ODR_HAKKO_JOKEN` (service contract and order disclosure tables) | Service contract agreement — retrieves and discloses detailed agreement data for a single equipment-provided service contract (called for each line item, each V-ONU, and each non-V-ONU ONU) |
| R | `callEKK0341B504SC` | `EKK0341B504SC` | `KK_T_OPSVKEI_ISP` (equipment-provided service contract line items) | Query equipment-provided service contract details list by line work number (svc_kei_kaisen_ucwk_no) — retrieves all KKT equipment associated with a given line |
| R | `callEKK0081B007SC` | `EKK0081B007SC` | `KK_T_OPSVKEI_ISP`, `KK_T_SVC_KEI` (active service contract tables) | Query active service contracts list for a line — retrieves service contracts currently in use on the same line, used to determine mutual service dependencies |
| R | `getEnableService` | (local method) | (filters `eKK0081B007ResultList` in memory) | In-memory filtering of active service contracts — extracts only those contracts that differ from the source service and match a target price code set (network or phone), used for dependency checking |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | CBS:JKKCancelSvcKeiCC | `getKktkSvcKeiAllData` (line 1143) -> `getKktkSvcKeiData` | `callEKK0341B011SC [R]`, `callEKK0341A010SC [R]`, `callEKK0341B504SC [R]`, `callEKK0081B007SC [R]` |

**Terminal operations reached FROM this method:**

| Method | Type | Description |
|--------|------|-------------|
| `callEKK0341A010SC` | R | Service contract agreement — reads service contract detail data (called per service line, per V-ONU device, per non-V-ONU ONU device) |
| `callEKK0341B011SC` | R | Service contract detail list query by service contract number |
| `callEKK0341B504SC` | R | Equipment-provided service contract line detail query by line number |
| `callEKK0081B007SC` | R | Active service contracts list query for a given line |
| `getEnableService` | R | In-memory filtered view of active service contract results |

## 6. Per-Branch Detail Blocks

**Block 1** — [SET/INIT] Initialize variables (L2403)

> Initialize working variables and set normal status code.

| # | Type | Code |
|---|------|------|
| 1 | SET | `eKK0081A010Hash = null` |
| 2 | SET | `prcGrpCd = null` |
| 3 | SET | `pcrsCd = null` |
| 4 | SET | `svcKeiNo = null` |
| 5 | SET | `statusCode = STAT_NORMAL (0)` // Status code: normal termination |

**Block 2** — [EXEC] Map extraction from workField (L2414–L2423)

> Retrieve the service contract agreement hash from workField using the `SVC_KEI` key, then extract three critical business values: the service contract number, pricing group code, and pricing course code.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `eKK0081A010Hash = (HashMap) workField.get(SVC_KEI ("svc_kei"))` // Service contract agreement result map |
| 2 | SET | `svcKeiNo = eKK0081A010Hash.get(EKK0081A010CBSMsg1List.SVC_KEI_NO)` // Service contract number |
| 3 | SET | `prcGrpCd = eKK0081A010Hash.get(EKK0081A010CBSMsg1List.PRC_GRP_CD)` // Pricing group code |
| 4 | SET | `pcrsCd = eKK0081A010Hash.get(EKK0081A010CBSMsg1List.PCRS_CD)` // Pricing course code |

**Block 3** — [SET] Initialize result collection lists (L2425–L2437)

> Create ArrayLists for collecting service contract agreement results. `eKK0341A010HashList` collects all results, while `eKK0341A010HashListKojiak` is reserved for results to be handed over to the construction case CC (added later in Block 8).

| # | Type | Code |
|---|------|------|
| 1 | SET | `eKK0341B011HashList = new ArrayList<>()` // Service contract detail list (by svc_kei_no) |
| 2 | SET | `eKK0341A010Hash = new HashMap<>()` // Service contract agreement result (single) |
| 3 | SET | `eKK0341A010HashList = new ArrayList<>()` // All service contract agreement results |
| 4 | SET | `eKK0341A010HashListKojiak = new ArrayList<>()` // KKT results for work case handover |

**Block 4** — [CALL] Query service contract detail list (L2440)

> Invoke the SC to retrieve service contract details for the given service contract number.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `callEKK0341B011SC(param, handle, trgt_data, eKK0341B011HashList)` // Query service contract details |

**Block 5** — [FOR] Loop over service contract details — call agreement (L2442–L2450)

> For each service detail item from the list, call the service contract agreement SC to retrieve agreement data, and accumulate results.

| # | Type | Code |
|---|------|------|
| 1 | SET | `eKK0341A010Hash = new HashMap<>()` // Reset for each iteration |
| 2 | CALL | `callEKK0341A010SC(param, handle, SVC_KEI ("svc_kei"), eKK0341B011HashList.get(i), eKK0341A010Hash)` // Service contract agreement |
| 3 | EXEC | `eKK0341A010HashList.add(eKK0341A010Hash)` // Accumulate result |

**Block 6** — [EXEC] Get line details and initialize exclusion list (L2453–L2461)

> Retrieve line detail data from workField and initialize an exclusion list for lines that have multiple active service contracts.

| # | Type | Code |
|---|------|------|
| 1 | SET | `eKK0251A010HashList = (ArrayList) workField.get(SVKEI_KAISEN_UW ("svkei_kaisen_uw"))` // Service contract line details |
| 2 | SET | `exSvkeiKaisenUw = new ArrayList<String>()` // Exclusion list |
| 3 | EXEC | `workField.put(WORK_FIELD_EX_SVKEI_KAISEN_UW, exSvkeiKaisenUw)` // Store exclusion list in workField |

**Block 7** — [FOR] Loop over line items — process each line (L2463–L2677)

> Iterate over each service contract line. For each line, query KKT equipment and active service contracts, then apply TV vs. non-TV business logic.

| # | Type | Code |
|---|------|------|
| 1 | SET | `eKK0251A010HashListElement = eKK0251A010HashList.get(i)` // Current line element |
| 2 | SET | `eKK0341B504ResultList = new ArrayList<>()` // KKT service results for this line |
| 3 | CALL | `callEKK0341B504SC(param, handle, eKK0251A010HashListElement.get(EKK0251A010CBSMsg1List.SVC_KEI_KAISEN_UCWK), eKK0341B504ResultList)` // Query KKT service contract details |
| 4 | SET | `eKK0081B007ResultList = new ArrayList<>()` // Active service contract results |
| 5 | CALL | `callEKK0081B007SC(param, handle, eKK0251A010HashListElement.get(EKK0251A010CBSMsg1List.SVC_KEI_KAISEN_UCWK), eKK0081B007ResultList)` // Query active service contracts |

**Block 7.1** — [IF] Multiple active service contracts detection (L2480–L2485)

> When a line has more than one active service contract, record the line's work number in the exclusion list. This identifies lines where other services coexist, affecting equipment cancellation decisions.

| # | Type | Code |
|---|------|------|
| 1 | SET | (condition: `eKK0081B007ResultList != null && eKK0081B007ResultList.size() > 1`) |
| 2 | EXEC | `exSvkeiKaisenUw.add(eKK0251A010HashListElement.get(EKK0251A010CBSMsg1List.SVC_KEI_KAISEN_UCWK))` // Add to exclusion list |

**Block 8** — [IF/ELSE] TV vs. Non-TV service branch (L2488–L2673) `[PRC_GRP_CD_TV_KCAT="11" / PRC_GRP_CD_TV_SSS="13" / PRC_GRP_CD_TV_KCN="12"]`

> The core business logic branch: TV services are handled differently from network/phone services due to hardware sharing rules.

**Block 8.1** — [IF] TV service branch: `PRC_GRP_CD_TV_KCAT("11") \|\| PRC_GRP_CD_TV_SSS("13") \|\| PRC_GRP_CD_TV_KCN("12")` (L2488–L2550)

> TV services do not share hardware with other service contracts, so V-ONU equipment is cancelled unconditionally.

| # | Type | Code |
|---|------|------|
| 1 | SET | `vonuArray = new ArrayList<>()` // V-ONU filtered list |
| 2 | FOR | Loop `k=0` to `eKK0341B504ResultList.size()`: filter for `KKTK_SVC_CD_VONU("C013")` only |
| 3 | FOR | Loop `j=0` to `vonuArray.size()`: per V-ONU device |
| 4 | SET | `onuArrayElement = vonuArray.get(j)` // Current V-ONU element |
| 5 | SET | `eKK0341A010Result = new HashMap<>()` // Reset |
| 6 | CALL | `callEKK0341A010SC(param, handle, SVC_KEI, onuArrayElement.get(EKK0341B504CBSMsg1List.KKTK_SVC_KEI_NO), eKK0341A010Result)` // V-ONU agreement |
| 7 | EXEC | `eKK0341A010HashList.add(eKK0341A010Result)` // Add to all-results list |

**Block 8.2** — [ELSE] Non-TV service branch (L2551–L2673)

> For non-TV services (network and phone), the method performs dependency checking between network and phone services before deciding equipment cancellation scope.

**Block 8.2.1** — [FOR] Network pricing course check (L2559–L2569)

> If the current pricing course matches a network code, query which phone services are still active. This is used when the user is cancelling a network service.

| # | Type | Code |
|---|------|------|
| 1 | FOR | Loop `j=0` to `PCRS_NET_CDS.length (39)`: check if `pcrsCd.equals(PCRS_NET_CDS[j])` |
| 2 | EXEC | `enableServices = getEnableService(pcrsCd, svcKeiNo, PCRS_TEL_CDS, eKK0081B007ResultList)` // Get active phone services |
| 3 | EXEC | `break` |

**Block 8.2.2** — [FOR] Phone pricing course check (L2573–L2583)

> If the current pricing course matches a phone code, query which network services are still active. This is used when the user is cancelling a phone service.

| # | Type | Code |
|---|------|------|
| 1 | FOR | Loop `j=0` to `PCRS_TEL_CDS.length (2)`: check if `pcrsCd.equals(PCRS_TEL_CDS[j])` |
| 2 | EXEC | `enableServices = getEnableService(pcrsCd, svcKeiNo, PCRS_NET_CDS, eKK0081B007ResultList)` // Get active network services |
| 3 | EXEC | `break` |

**Block 8.2.3** — [FOR] Non-V-ONU device loop (L2588–L2663)

> Filter out V-ONU devices (already handled in Block 8.1 for TV, or not needed for non-TV), then process each remaining ONU device.

| # | Type | Code |
|---|------|------|
| 1 | SET | `onuArray = new ArrayList<>()` // Non-V-ONU filtered list |
| 2 | FOR | Loop `k=0` to `eKK0341B504ResultList.size()`: filter where `!KKTK_SVC_CD_VONU("C013").equals(kktkSvcCd)` |
| 3 | FOR | Loop `j=0` to `onuArray.size()`: per ONU device |
| 4 | SET | `onuArrayElement = onuArray.get(j)` // Current element |

**Block 8.2.3.1** — [IF] Already-cancelled device check (L2603–L2608) `[STAT_DSL_ZUMI="910" / STAT_CNCL_ZUMI="920"]`

> Skip devices that already have terminated or cancelled status — they are not processing targets.

| # | Type | Code |
|---|------|------|
| 1 | SET | `kktkSvcKeiStat = onuArrayElement.get(EKK0341B504CBSMsg1List.KKTK_SVC_KEI_STAT)` |
| 2 | SET | (condition: `STAT_DSL_ZUMI("910").equals(kktkSvcKeiStat) \|\| STAT_CNCL_ZUMI("920").equals(kktkSvcKeiStat)`) |
| 3 | EXEC | `continue` // Skip this device |

**Block 8.2.3.2** — [EXEC] Service contract agreement for the device (L2611–L2617)

| # | Type | Code |
|---|------|------|
| 1 | SET | `eKK0341A010Result = new HashMap<>()` // Reset |
| 2 | CALL | `callEKK0341A010SC(param, handle, SVC_KEI, onuArrayElement.get(EKK0341B504CBSMsg1List.KKTK_SVC_KEI_NO), eKK0341A010Result)` // Device agreement |

**Block 8.2.3.3** — [IF] No other active services branch (L2621–L2625)

> When no other active services exist besides the current one, all ONU equipment is marked for cancellation.

| # | Type | Code |
|---|------|------|
| 1 | SET | `kktkSvcCd = onuArrayElement.get(EKK0341B504CBSMsg1List.KKTK_SVC_CD)` |
| 2 | SET | (condition: `enableServices != null && enableServices.size() == 0`) |
| 3 | EXEC | `eKK0341A010HashList.add(eKK0341A010Result)` // Add to cancel list |

**Block 8.2.3.4** — [ELSE] Other active services exist (L2626–L2656)

> When other active services exist, only multifunction routers (Takino/HGW) are cancelled independently. Other ONU devices are handed over to the construction case CC because the customer retains other services that depend on them.

| # | Type | Code |
|---|------|------|
| 1 | SET | (condition: `KKTK_SVC_CD_TAKINO("C024").equals(kktkSvcCd) \|\| KKTK_SVC_CD_HGW("C025").equals(kktkSvcCd)`) |
| 2 | EXEC (True) | `eKK0341A010HashList.add(eKK0341A010Result)` // Add to cancel list (router/HGW) |
| 3 | EXEC (False) | `eKK0341A010HashListKojiak.add(eKK0341A010Result)` // Hand over to construction case CC |

**Block 9** — [EXEC] Store enableServices in workField (L2670–L2671)

> Persist the enabled services list to the workField for downstream processing.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `workField.put(WORK_FIELD_ENABLE_SERVICES, enableServices)` // Enabled other services list |

**Block 10** — [EXEC] Store final results to workField (L2675–L2679)

> Write the accumulated agreement results back to the workField for the caller to consume.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `workField.put(KKTK_SVC_KEI ("kktk_svc_kei"), eKK0341A010HashList)` // All agreement results |
| 2 | EXEC | `workField.put(KKTK_SVC_KEI_KOJIAK ("kktk_svc_kei_kojiak"), eKK0341A010HashListKojiak)` // Work case handover results |

**Block 11** — [RETURN] Return status code (L2681)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return statusCode` // STAT_NORMAL (0) |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `svc_kei_no` | Field | Service contract number — unique identifier for a service contract line item in the eo customer base system |
| `prc_grp_cd` | Field | Pricing group code — classifies the service tier (e.g., Home type "02", Mezon type "03", Mansion type "04", TV K-CAT "11") |
| `pcrs_cd` | Field | Pricing course code — specific pricing plan code (e.g., "A03" 100M course, "A05" 1Giga course, "A31" Phone Course 1) |
| `svc_kei_ucwk_no` | Field | Service detail work number — internal tracking ID for service contract line items |
| `svc_kei_kaisen_ucwk_no` | Field | Service contract line work number — identifier for a specific line within a service contract |
| `kktk_svc_cd` | Field | Equipment-provided service code — identifies the type of customer-provided equipment (V-ONU "C013", Router "C024", HGW "C025") |
| `kktk_svc_kei_no` | Field | Equipment-provided service contract number — links a service contract to specific equipment |
| `kktk_svc_kei_stat` | Field | Equipment-provided service contract status — indicates whether the equipment is active, terminated ("910"), or cancelled ("920") |
| STAT_NORMAL | Constant | Status code 0 — normal termination |
| STAT_DSL_ZUMI | Constant | Status code "910" — contract terminated (completed) |
| STAT_CNCL_ZUMI | Constant | Status code "920" — cancellation completed |
| SVC_KEI | Constant | Map key "svc_kei" — service contract agreement result |
| KKTK_SVC_KEI | Constant | Map key "kktk_svc_kei" — all KKT service contract agreement results |
| KKTK_SVC_KEI_KOJIAK | Constant | Map key "kktk_svc_kei_kojiak" — KKT results to be handed over to the construction case CC |
| SVKEI_KAISEN_UW | Constant | Map key "svkei_kaisen_uw" — service contract line details |
| V-ONU | Business term | Virtual Optical Network Unit — fiber-optic terminal equipment provided by K-Opticom for eoひかり (fiber internet) service |
| TAKINO | Business term | Multifunction router (equipment code C024) — combines router, Wi-Fi, and phone functions |
| HGW | Business term | Home Gateway (equipment code C025) — Fujitsu home gateway equipment for eo home services |
| K-CAT | Business term | eoひかりTV K-CAT pricing group — TV service tier with K-CAT package (pricing group code "11") |
| KCN | Business term | eoひかりTV KCN pricing group — TV service tier with KCN package (pricing group code "12") |
| SSS | Business term | eoひかりTV Resend/SSS pricing group — TV service tier with resend capability (pricing group code "13") |
| KKT | Acronym | 機器提供 — Kiki Teikyo (Equipment Provision) — equipment-provided services where K-Opticom provides hardware |
| SC | Acronym | Service Component — a low-level data access/business logic component in the Fuj.bp framework (e.g., EKK0341A010SC) |
| CC | Acronym | Common Component — a shared business logic component in the Fuj.bp framework (e.g., JKKCancelSvcKeiCC) |
| Kojiak | Abbreviation | 工事案件 — Koji Anken (Construction Case) — work case records that track installation/maintenance activities |
| PCRS_NET_CDS | Field/Constant | Array of 39 network pricing course codes — all broadband service cost plan identifiers |
| PCRS_TEL_CDS | Field/Constant | Array `["A31", "A32"]` — phone pricing course codes |
| exSvkeiKaisenUw | Field | Excluded service line work numbers — lines where multiple active service contracts coexist |
| enableServices | Field | Enabled other services — filtered list of active services on a line, excluding the current service |
