# Business Logic — JKKKikiIchiranCancelCC.executeDsl() [242 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `com.fujitsu.futurity.bp.custom.common.JKKKikiIchiranCancelCC` |
| Layer | Common Component / CC (Cross-cutting business logic controller) |
| Module | `common` (Package: `com.fujitsu.futurity.bp.custom.common`) |

## 1. Role

### JKKKikiIchiranCancelCC.executeDsl()

This method orchestrates the **equipment provider service contract cancellation** (機器提供サービス解約) process within the telecom order fulfillment system. It serves as the core cancellation engine that handles the complete lifecycle of canceling one or more services associated with a customer's equipment contract.

The method implements a **routing/dispatch design pattern**, branching based on the cancellation target type: DSL broadband, STB (Set-Top Box) / B-CAS / C-CAS devices, multi-function routers (Takino / HGW), and optional services. It coordinates multiple specialized cancellation handlers in sequence — first stopping fee-related operations, then canceling service agreements, confirming cancellations, handling return-of-equipment for applicable devices, processing main-sub line replacements for future-dated cancellations, and finally executing discount recalculations and progress registration.

The method acts as a **shared utility** within the `JKKKikiIchiranCancelCC` class, called by the screen integration method `updKktkSvcCancel` during the service cancellation flow. It processes both single-agreement cancellations (non-STB) and multi-agreement cancellations (STB with B-CAS/C-CAS sub-lines), making it the central dispatch point for all cancellation-related service component calls.

The method also includes a version-controlled conditional branch that only activates when `func_code = "1"`, which gates the primary cancellation processing to a specific operational mode.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["executeDsl(params)"])
    START --> RETRIEVE["Retrieve CBS messages and ccMsg from temporaryData/param"]

    RETRIEVE --> CHECK_RESV["judge_RsvBbr(temporaryData)"]
    CHECK_RESV -->|true| EXEC_C170["execEKK0341C170: Equipment provider service contract fee code change stop"]
    EXEC_C170 --> CHECK_FUNC["func_code = \"1\""]
    CHECK_RESV -->|false| CHECK_FUNC
    CHECK_FUNC -->|true| CHECK_DSL_RESV["judge_Dsl || judge_RsvBbr"]
    CHECK_FUNC -->|false| CHECK_HMPIN["judge_HmpinKikiUk"]

    CHECK_DSL_RESV -->|true| CHECK_STB1["judge_Stb"]
    CHECK_STB1 -->|true| LOOP_CANCEL["Loop ekk0341b501cbsMsg: execEKK0341C340 (cancel per device)"]
    LOOP_CANCEL --> CHECK_DSL_NO_CANCEL["judge_Dsl AND func_code != \"1\""]
    CHECK_STB1 -->|false| SINGLE_CANCEL["execEKK0341C340 (single agreement cancel)"]
    SINGLE_CANCEL --> CHECK_DSL_NO_CANCEL

    CHECK_DSL_NO_CANCEL -->|true| CHECK_STB_CONFIRM["judge_Stb"]
    CHECK_STB_CONFIRM -->|true| LOOP_CONFIRM["Loop ekk0341b501cbsMsg: execEKK0341C350 (cancel confirmation)"]
    CHECK_STB_CONFIRM -->|false| SINGLE_CONFIRM["execEKK0341C350 (single confirmation)"]
    LOOP_CONFIRM --> CHECK_ROUTER["judgeTakinoRouter"]
    SINGLE_CONFIRM --> CHECK_ROUTER

    CHECK_ROUTER -->|true| EXEC_KKOP["execKkopSvcKeiDel: multi-function router option cancellation"]
    CHECK_ROUTER -->|false| CHECK_STB_SVC["judge_Stb && judge_Dsl && judge_SvcKeiUcwkNo"]
    EXEC_KKOP --> CHECK_STB_SVC

    CHECK_STB_SVC -->|true| EXEC_C180["execEKK0161C180: Service contract details cancel"]
    EXEC_C180 --> EXEC_C190["execEKK0161C190: Service contract details cancel confirmation"]
    EXEC_C190 --> DSL_OPTION["dslOptionChannel"]
    DSL_OPTION --> SVC_RESV_DEL["execSvcKeiUcwRsvDel: Service contract detail reservation cancel"]
    SVC_RESV_DEL --> CHECK_FUTURE1["isFutureDateDsl(ccMsg)"]

    CHECK_FUTURE1 -->|true| MAIN_SUB["execMainSubKeiJudgeCC: Main-sub replacement"]
    CHECK_FUTURE1 -->|false| CHECK_HMPIN
    MAIN_SUB --> CHECK_HMPIN

    CHECK_STB_SVC -->|false| CHECK_HMPIN
    CHECK_HMPIN -->|true| CHECK_STB_HMPIN["judge_Stb"]
    CHECK_STB_HMPIN -->|true| LOOP_HMPIN["Loop ekk0341b501cbsMsg: isCurHmpinKiki + execEDK0301D010stb"]
    CHECK_STB_HMPIN -->|false| SINGLE_HMPIN["isCurHmpinKiki + execEDK0301D010"]
    LOOP_HMPIN --> CHECK_ORDER_SET["isOrderSetJaj(work_ido_div)"]
    SINGLE_HMPIN --> CHECK_ORDER_SET

    CHECK_ORDER_SET -->|true| SET_ODR["temporaryData.put(TEMPLATE_ID_EKK0341A010_ODR)"]
    SET_ODR --> EXEC_ORDER["executeOrderSet"]
    EXEC_ORDER --> CHECK_ROUTESVC["kktkSvcCd = C024 (Takino) OR C025 (HGW)"]
    CHECK_ROUTESVC -->|true| OPT_CANCEL["execKikiOptSvcKeiDslController: Option service cancel"]
    CHECK_ROUTESVC -->|false| EXEC_PROGRESS["execEKK1091D010: Progress registration"]
    OPT_CANCEL --> EXEC_PROGRESS
    CHECK_ORDER_SET -->|false| EXEC_PROGRESS

    EXEC_PROGRESS --> CHECK_FUTURE2["isFutureDateDsl(ccMsg)"]
    CHECK_FUTURE2 -->|true| EXEC_WARI["execKktkSvcKeiDslWariCC: Discount processing"]
    CHECK_FUTURE2 -->|false| END_NODE(["Return"])
    EXEC_WARI --> END_NODE
```

**Key conditional branches and their business meanings:**

| Condition | Branch Meaning |
|-----------|---------------|
| `judge_RsvBbr(temporaryData) = true` | Reservation-based cancellation — stops fee code changes before proceeding |
| `func_code = "1"` | Primary cancellation mode — gates all cancellation processing (FTTH DSL, STB, router, options) |
| `judge_Dsl(temporaryData) = true` | DSL service cancellation flag — triggers DSL agreement cancellation and confirmation |
| `judge_Stb(temporaryData) = true` | STB device cancellation — iterates over multiple device records (B-CAS/C-CAS) instead of single agreement |
| `judgeTakinoRouter(temporaryData) = true` | Multi-function router detected — requires separate option service cancellation (`execKkopSvcKeiDel`) |
| `judge_Stb && judge_Dsl && judge_SvcKeiUcwkNo` | STB with valid service detail work number — triggers service agreement cancellation and main-sub replacement |
| `isFutureDateDsl(ccMsg) = true` | Future-dated cancellation — triggers main-sub line replacement and discount recalculation |
| `judge_HmpinKikiUk(temporaryData, ccMsg) = true` | Return-of-equipment cancellation — processes return receipt for eligible devices |
| `isOrderSetJaj(work_ido_div) = true` | Non-return or (non-STB + router) case — processes order set and option service cancellation for Takino/HGW |

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | Database session handle for executing CBS (Component Business Service) calls and maintaining transaction context throughout the cancellation lifecycle. |
| 2 | `scCall` | `ServiceComponentRequestInvoker` | Service component request invoker used to dispatch calls to downstream CBS endpoints (e.g., `execEKK0341C340`, `execEKK0341C350`). Enables service-level communication with the business logic layer. |
| 3 | `param` | `IRequestParameterReadWrite` | Request parameter interface carrying the cancellation request data map (`ccMsg`) via `getData(dataMapKey)`. Contains fields like `func_code`, `ido_div`, and other screen-level items. |
| 4 | `dataMapKey` | `String` | The map key used to retrieve the cancellation request data (`ccMsg`) from the parameter interface. Acts as the identifier for the active data context within the request scope. |
| 5 | `temporaryData` | `HashMap<String, Object>` | Temporary storage holding CBS messages retrieved before cancellation. Contains `TEMPLATE_ID_EKK0341A010` (equipment provider service contract agreement result) and `TEMPLATE_ID_EKK0341B501` (service contract list per service line). Also holds judgment flags (DSL, STB, reservation-based, return-of-equipment). |

**Instance fields / external state:**

| Field | Usage |
|-------|-------|
| `KKTK_SVC_CD_TAKINO_RUTAR` (constant: `"C024"`) | Service code constant identifying the Takino multi-function router. Used to detect whether the cancelled service is a router-type service requiring option cancellation. |
| `KKTK_SVC_CD_HGW` (constant from `JKKStrConst`: `"C025"`) | Service code constant identifying the HGW (Home Gateway) router. Added in v20.00.00 alongside Takino for the same option cancellation logic. |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| C | `JBSbatDKNyukaFinAdd.getData` | - | - | Calls `getData` in `JBSbatDKNyukaFinAdd` (data retrieval) |
| R | `JBSbatFUCaseFileRnkData.getString` | - | - | Calls `getString` in `JBSbatFUCaseFileRnkData` (data retrieval) |
| R | `JBSbatFUMoveNaviData.getString` | - | - | Calls `getString` in `JBSbatFUMoveNaviData` (data retrieval) |
| R | `JBSbatZMAdDataSet.getString` | - | - | Calls `getString` in `JBSbatZMAdDataSet` (data retrieval) |
| R | `JFUeoTelOpTransferCC.getData` | - | - | Calls `getData` in `JFUeoTelOpTransferCC` (data retrieval) |
| R | `JFUTransferCC.getData` | - | - | Calls `getData` in `JFUTransferCC` (data retrieval) |
| R | `JFUTransferListToListCC.getData` | - | - | Calls `getData` in `JFUTransferListToListCC` (data retrieval) |
| U | `JKKKikiIchiranCancelCC.execEKK0341C170` | EKK0341C170 | Equipment provider service contract fee data | Stops equipment provider service contract fee code changes (contract fee code change stop processing) |
| C | `JKKKikiIchiranCancelCC.execEKK0341C340` | EKK0341C340 | Service contract cancellation records | Executes equipment provider service contract cancellation (STB and B-CAS/C-CAS) — cancels one or more service agreements |
| C | `JKKKikiIchiranCancelCC.execEKK0341C350` | EKK0341C350 | Service contract cancellation confirmation | Executes equipment provider service contract cancellation confirmation — finalizes the cancellation |
| U | `JKKKikiIchiranCancelCC.execKkopSvcKeiDel` | - | Router option service records | Cancels multi-function router (Takino/HGW) option services |
| U | `JKKKikiIchiranCancelCC.execEKK0161C180` | EKK0161C180 | Service contract detail records | Cancels service contract details (for STB with valid work number) |
| U | `JKKKikiIchiranCancelCC.execEKK0161C190` | EKK0161C190 | Service contract detail confirmation | Confirms service contract detail cancellation |
| R | `JKKKikiIchiranCancelCC.dslOptionChannel` | - | - | Routes option channel processing for DSL cancellation |
| C | `JKKKikiIchiranCancelCC.execEDK0301D010` | EDK0301D010 | Return-of-eipment receipt records | Processes return-of-equipment receipt (non-STB) |
| C | `JKKKikiIchiranCancelCC.execEDK0301D010stb` | EDK0301D010stb | Return-of-equipment receipt records (STB) | Processes return-of-equipment receipt for STB device |
| C | `JKKKikiIchiranCancelCC.execSvcKeiUcwRsvDel` | - | Service contract detail reservation records | Cancels service contract detail reservations |
| U | `JKKKikiIchiranCancelCC.execMainSubKeiJudgeCC` | - | Main-sub service line replacement | Handles main-sub service line replacement for future-dated cancellations |
| U | `JKKKikiIchiranCancelCC.executeOrderSet` | - | Order set records | Re-processes order set after contract details cancellation |
| U | `JKKKikiIchiranCancelCC.execKikiOptSvcKeiDslController` | - | Option service records | Cancels option services for Takino/HGW routers |
| R | `JKKKikiIchiranCancelCC.getNullToStr` | - | - | Null-safe string conversion utility |
| D | `JKKKikiIchiranCancelCC.execEKK1091D010` | EKK1091D010 | Progress / registration records | Registers cancellation progress (final step — progress registration) |
| U | `JKKKikiIchiranCancelCC.execKktkSvcKeiDslWariCC` | - | Discount calculation records | Executes discount processing for equipment provider service contract cancellation |

**How SC Codes were inferred:**
- `EKK0341C170`, `EKK0341C340`, `EKK0341C350`: SC Codes derived from method name patterns (`execEKK0341C170` → `EKK0341C170`) and confirmed by the EKK0341 domain (equipment provider service contract cancellation).
- `EKK0161C180`, `EKK0161C190`: Same pattern from EKK0161 domain (service contract details cancel/confirmation).
- `EKK1091D010`: Same pattern from EKK1091 domain (progress registration).
- `EDK0301D010`: From EDK0301 domain (return-of-equipment receipt).

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | CBS: `JKKKikiIchiranCancelCC.updKktkSvcCancel` | `JKKKikiIchiranCancelCC.updKktkSvcCancel` → `JKKKikiIchiranCancelCC.executeDsl` | `execEKK0341C170 [U]`, `execEKK0341C340 [C]`, `execEKK0341C350 [C]`, `execKkopSvcKeiDel [U]`, `execEKK0161C180 [U]`, `execEKK0161C190 [U]`, `execEDK0301D010 [C]`, `execEDK0301D010stb [C]`, `executeOrderSet [U]`, `execKikiOptSvcKeiDslController [U]`, `execEKK1091D010 [D]`, `execKktkSvcKeiDslWariCC [U]` |
| 2 | Screen: `KKSV0401` (KKSV0401OPOperation) | `KKSV0401OPOperation.run` → `CCRequestBroker.updKktkSvcCancel` → `JKKKikiIchiranCancelCC.updKktkSvcCancel` → `JKKKikiIchiranCancelCC.executeDsl` | Same terminal operations as Row 1 |

**Notes:**
- KKSV0401 is the cancellation screen that initiates the service contract cancellation flow via the BPM operation `KKSV0401OPOperation`.
- `updKktkSvcCancel` creates a `ServiceComponentRequestInvoker` and `temporaryData` HashMap, then delegates to `executeDsl` as the core cancellation engine.
- Additional callers include: `JKKKikiIchiranIkkatsuCC`, `JKKOnuPlanKknKjIktAddCC`, `JKKKikiIchiranKishuChgCC` (which all invoke `updKktkSvcCancel` → `executeDsl`).

## 6. Per-Branch Detail Blocks

### Block 1 — RETRIEVE (L1223)

> Retrieve CBS messages and request data from the parameter and temporary data structures.

| # | Type | Code |
|---|------|------|
| 1 | SET | `e kk0341a010cbsMsg = (CAANMsg)temporaryData.get(TEMPLATE_ID_EKK0341A010)` // Equipment provider service contract agreement result |
| 2 | SET | `ekk0341b501cbsMsg = (CAANMsg[])temporaryData.get(TEMPLATE_ID_EKK0341B501)` // Service contract list per service line |
| 3 | SET | `ccMsg = (HashMap<String, Object>)param.getData(dataMapKey)` // Request data map |
| 4 | SET | `work_ido_div = (String)ccMsg.get("ido_div")` // Migration type discriminator |

### Block 2 — IF [judge_RsvBbr] (L1232) [CONSTANT: reservation-based cancellation check]

> If this is a reservation-based cancellation, stop fee code changes first.

| # | Type | Code |
|---|------|------|
| 1 | IF | `judge_RsvBbr(temporaryData)` |
| 1.1 | EXEC | `execEKK0341C170(handle, scCall, param, dataMapKey, temporaryData)` // Equipment provider service contract fee code change stop |

### Block 3 — IF [func_code = "1"] (L1238)

> Primary cancellation processing — only executed when `func_code` equals `"1"`. This is the main cancellation entry point.

| # | Type | Code |
|---|------|------|
| 1 | SET | `func_code = (String)ccMsg.get("func_code")` // Service function code |
| 2 | IF | `"1".equals(func_code)` |

#### Block 3.1 — IF [judge_Dsl \|\| judge_RsvBbr] (L1264)

> DSL cancellation or reservation-based cancellation: execute contract cancellation.

| # | Type | Code |
|---|------|------|
| 1 | IF | `judge_Dsl(temporaryData) \|\| judge_RsvBbr(temporaryData)` |

##### Block 3.1.1 — IF [judge_Stb] (STB: device loop) (L1271)

> For STB devices, loop through all device records (B-CAS, C-CAS sub-lines) and cancel each one individually. Skip records already cancelled (status 910 or 920).

| # | Type | Code |
|---|------|------|
| 1 | FOR | `i = 0; i < ekk0341b501cbsMsg.length; i++` |
| 1.1 | IF | `"910".equals(msg[i].KKTK_SVC_KEI_STAT) \|\| "920".equals(msg[i].KKTK_SVC_KEI_STAT)` // Skip already-cancelled records |
| 1.1.1 | EXEC | `continue` |
| 1.2 | CALL | `execEKK0341C340(handle, scCall, param, dataMapKey, temporaryData, ekk0341b501cbsMsg[i])` // Cancel per device |

##### Block 3.1.2 — ELSE (single agreement) (L1287)

> For non-STB services, cancel the single service agreement.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `execEKK0341C340(handle, scCall, param, dataMapKey, temporaryData, ekk0341a010cbsMsg)` // Single agreement cancel |

#### Block 3.2 — IF [judge_Dsl AND func_code != "1"] (L1297)

> DSL cancellation confirmation: finalize all cancellations. Also check for multi-function router option cancellation.

| # | Type | Code |
|---|------|------|
| 1 | IF | `judge_Dsl(temporaryData) && ! "1".equals(getNullToStr(ccMsg.get("kkop_svc_kei_dsl")))` |

##### Block 3.2.1 — IF [judge_Stb] (STB confirmation loop) (L1304)

> For STB, loop through devices and confirm each cancellation. Skip cancelled records (status 910/920).

| # | Type | Code |
|---|------|------|
| 1 | FOR | `i = 0; i < ekk0341b501cbsMsg.length; i++` |
| 1.1 | IF | `"910".equals(msg[i].KKTK_SVC_KEI_STAT) \|\| "920".equals(msg[i].KKTK_SVC_KEI_STAT)` |
| 1.1.1 | EXEC | `continue` |
| 1.2 | CALL | `execEKK0341C350(handle, scCall, param, dataMapKey, temporaryData, ekk0341b501cbsMsg[i])` // Confirm cancel per device |

##### Block 3.2.2 — ELSE (single confirmation) (L1320)

> Confirm single agreement cancellation.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `execEKK0341C350(handle, scCall, param, dataMapKey, temporaryData, ekk0341a010cbsMsg)` // Single confirmation |

##### Block 3.2.3 — IF [judgeTakinoRouter] (L1327)

> Multi-function router (Takino/HGW) detected — cancel the router's option services separately.

| # | Type | Code |
|---|------|------|
| 1 | IF | `judgeTakinoRouter(temporaryData)` |
| 1.1 | CALL | `execKkopSvcKeiDel(handle, scCall, param, dataMapKey, temporaryData)` // Router option service cancellation |

#### Block 3.3 — IF [judge_Stb && judge_Dsl && judge_SvcKeiUcwkNo] (L1336)

> STB with valid service detail work number — execute full service agreement cancellation flow including main-sub replacement for future-dated cancellations.

| # | Type | Code |
|---|------|------|
| 1 | IF | `judge_Stb(temporaryData) && judge_Dsl(temporaryData) && judge_SvcKeiUcwkNo(temporaryData)` |
| 1.1 | CALL | `execEKK0161C180(handle, scCall, param, dataMapKey, temporaryData)` // Service contract details cancel |
| 1.2 | CALL | `execEKK0161C190(handle, scCall, param, dataMapKey, temporaryData)` // Service contract details cancel confirmation |
| 1.3 | CALL | `dslOptionChannel(handle, scCall, param, dataMapKey, temporaryData)` // Option channel routing |
| 1.4 | CALL | `execSvcKeiUcwRsvDel(handle, scCall, param, dataMapKey, temporaryData)` // Service detail reservation cancel |
| 1.5 | IF | `isFutureDateDsl(ccMsg)` // Future-dated cancellation |
| 1.5.1 | CALL | `execMainSubKeiJudgeCC(handle, scCall, param, dataMapKey)` // Main-sub line replacement |

### Block 4 — IF [judge_HmpinKikiUk] (L1351)

> Return-of-equipment cancellation processing. Handles return receipt for eligible devices (current return-of-equipment check).

| # | Type | Code |
|---|------|------|
| 1 | IF | `judge_HmpinKikiUk(temporaryData, ccMsg)` |

#### Block 4.1 — IF [judge_Stb] (STB return processing) (L1356)

> For STB devices, loop through all records and process return-of-equipment receipt with a current-equipment check guard.

| # | Type | Code |
|---|------|------|
| 1 | FOR | `i = 0; i < ekk0341b501cbsMsg.length; i++` |
| 1.1 | IF | `"910".equals(msg[i].KKTK_SVC_KEI_STAT) \|\| "920".equals(msg[i].KKTK_SVC_KEI_STAT)` // Skip cancelled records |
| 1.1.1 | EXEC | `continue` |
| 1.2 | IF | `isCurHmpinKiki(handle, scCall, param, dataMapKey, temporaryData, msg[i])` // Current return-of-equipment check |
| 1.2.1 | CALL | `execEDK0301D010stb(handle, scCall, param, dataMapKey, temporaryData, msg[i])` // Return receipt (STB) |

#### Block 4.2 — ELSE (single return) (L1378)

> For non-STB, process return-of-equipment with current-equipment check guard.

| # | Type | Code |
|---|------|------|
| 1 | IF | `isCurHmpinKiki(handle, scCall, param, dataMapKey, temporaryData, ekk0341a010cbsMsg)` |
| 1.1 | CALL | `execEDK0301D010(handle, scCall, param, dataMapKey, temporaryData)` // Return receipt (non-STB) |

### Block 5 — IF [isOrderSetJaj] (L1393)

> Non-return case or (non-STB + router) case — re-process the order set. Updated in v4.06.00: the condition changed from `IDO_DIV_00030` (return-of-equipment cancellation) to `isOrderSetJaj(work_ido_div, temporaryData)` covering non-return processing and (non-STB + router) processing.

| # | Type | Code |
|---|------|------|
| 1 | IF | `isOrderSetJaj(work_ido_div, temporaryData)` |
| 1.1 | SET | `temporaryData.put(TEMPLATE_ID_EKK0341A010_ODR, ekk0341a010cbsMsg)` // Re-assign agreement result |
| 1.2 | CALL | `executeOrderSet(handle, scCall, param, dataMapKey, temporaryData)` // Re-process order set |
| 1.3 | SET | `kktkSvcCd = getNullToStr(ekk0341a010cbsMsg.getString(KKTK_SVC_CD))` // Get service code |
| 1.4 | IF | `kktkSvcCd = "C024" (KKTK_SVC_CD_TAKINO_RUTAR) \|\| "C025" (KKTK_SVC_CD_HGW)` |
| 1.4.1 | CALL | `execKikiOptSvcKeiDslController(handle, scCall, param, dataMapKey, temporaryData)` // Option service cancel |

### Block 6 — EXEC [execEKK1091D010] (L1406)

> Final step: register cancellation progress regardless of which branch was taken.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `execEKK1091D010(handle, scCall, param, dataMapKey, temporaryData)` // Progress registration |

### Block 7 — IF [isFutureDateDsl] (L1413)

> Execute discount processing for equipment provider service contract cancellation. Changed in v4.01.00: from always executing to conditionally executing only for future-dated cancellations.

| # | Type | Code |
|---|------|------|
| 1 | IF | `isFutureDateDsl(ccMsg)` |
| 1.1 | CALL | `execKktkSvcKeiDslWariCC(handle, scCall, param, dataMapKey, temporaryData)` // Discount processing |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `executeDsl` | Method | Execute DSL — the core method for equipment provider service contract cancellation processing |
| `updKktkSvcCancel` | Method | Update KKTK Service Cancel — screen integration method that sets up context and delegates to `executeDsl` |
| KKTK | Acronym | Kiki Teiku Kyoyaku (Equipment Provider Service) — Fujitsu telecom domain term for equipment-related service contracts |
| Kiki | Japanese term | 機器 (equipment) — refers to customer-provided or provider-leased telecommunications equipment (STB, router, etc.) |
| Ichiran | Japanese term | 一覧 (list) — refers to the screen/context where multiple service records are displayed for cancellation |
| Cancel | Business term | Service contract cancellation — the process of terminating an equipment provider service agreement |
| DSL | Business term | Digital Subscriber Line — broadband internet service over telephone lines (FTTH) |
| STB | Acronym | Set-Top Box — set-top device for cable/satellite television and IPTV services |
| B-CAS | Acronym | B-CAS Card — Japanese broadcast content encryption smart card used in digital TV broadcasting |
| C-CAS | Acronym | CAS-related sub-line — content access service card sub-line associated with STB equipment |
| `func_code` | Field | Service function code — discriminator that determines whether primary cancellation processing is enabled (`"1"` = active) |
| `ido_div` | Field | Migration type discriminator — classifies the type of cancellation/migration (e.g., `00030` for return-of-equipment cancellation) |
| `kkop_svc_kei_dsl` | Field | KK Option Service DSL — flag indicating whether the DSL service has optional service components |
| `kktk_svc_cd` | Field | KKTK Service Code — identifies the type of service (e.g., `"C024"` = Takino router, `"C025"` = HGW) |
| Takino | Business term | Takino multi-function router — a Fujitsu-branded multi-function router requiring option service cancellation |
| HGW | Acronym | Home Gateway — home network gateway device (service code `"C025"`) |
| `pnlty_hassei_um` | Field | Penalty occurrence amount — breach-of-contract fee amount (commented-out code from v5.01.00) |
| `svc_kei_ucwk_no` | Field | Service Detail Work Number — internal tracking ID for service contract line items |
| KKTK_SVC_KEI_STAT | Field | KKTK Service Contract Status — cancellation status code where `910`/`920` indicate already-cancelled |
| EKK0341C170 | SC Code | Equipment provider service contract fee code change stop service component |
| EKK0341C340 | SC Code | Equipment provider service contract cancellation service component (create) |
| EKK0341C350 | SC Code | Equipment provider service contract cancellation confirmation service component (create) |
| EKK0161C180 | SC Code | Service contract details cancel service component |
| EKK0161C190 | SC Code | Service contract details cancel confirmation service component |
| EKK1091D010 | SC Code | Progress registration service component |
| EDK0301D010 | SC Code | Return-of-equipment receipt service component (non-STB) |
| EDK0301D010stb | SC Code | Return-of-equipment receipt service component (STB) |
| TEMPLATE_ID_EKK0341A010 | Constant | CBS message template key for equipment provider service contract agreement result |
| TEMPLATE_ID_EKK0341A010_ODR | Constant | CBS message template key for re-assigned order result |
| TEMPLATE_ID_EKK0341B501 | Constant | CBS message template key for service contract list per service line (array) |
| judge_RsvBbr | Method | Judgment method — checks if this is a reservation-based cancellation (returns true for reservation-type cancellations) |
| judge_Dsl | Method | Judgment method — checks if the service being cancelled is a DSL service |
| judge_Stb | Method | Judgment method — checks if the equipment being cancelled is an STB device |
| judge_HmpinKikiUk | Method | Judgment method — checks if return-of-equipment cancellation processing is applicable |
| judge_SvcKeiUcwkNo | Method | Judgment method — checks if a valid service detail work number exists |
| judgeTakinoRouter | Method | Judgment method — checks if the service is a Takino multi-function router |
| isCurHmpinKiki | Method | Current return-of-equipment judgment — determines if the equipment is currently eligible for return processing |
| isFutureDateDsl | Method | Future-dated DSL cancellation judgment — checks if the cancellation date is in the future (after the operational date) |
| isOrderSetJaj | Method | Order set judgment — determines if order re-processing is needed (non-return or router case) |
| execEKK0341C170 | Method | Execute EKK0341C170 — stops fee code change processing for equipment provider service contracts |
| execEKK0341C340 | Method | Execute EKK0341C340 — executes equipment provider service contract cancellation |
| execEKK0341C350 | Method | Execute EKK0341C350 — confirms equipment provider service contract cancellation |
| execKkopSvcKeiDel | Method | Execute KK Option Service Contract Delete — cancels multi-function router option services |
| execEKK0161C180 | Method | Execute EKK0161C180 — cancels service contract details |
| execEKK0161C190 | Method | Execute EKK0161C190 — confirms service contract detail cancellation |
| execEDK0301D010 | Method | Execute EDK0301D010 — processes return-of-equipment receipt |
| execEDK0301D010stb | Method | Execute EDK0301D010stb — processes return-of-equipment receipt for STB |
| execSvcKeiUcwRsvDel | Method | Execute Service Contract Detail Reservation Delete — cancels service contract detail reservations |
| execMainSubKeiJudgeCC | Method | Execute Main-Sub Service Line Judgment Controller — handles main-sub line replacement for future-dated cancellations |
| executeOrderSet | Method | Execute order set processing — re-processes the order set after contract details cancellation |
| execKikiOptSvcKeiDslController | Method | Execute Equipment Option Service Contract DSL Controller — cancels option services for DSL (Takino/HGW) |
| execEKK1091D010 | Method | Execute EKK1091D010 — registers cancellation progress (final step) |
| execKktkSvcKeiDslWariCC | Method | Execute KKTK Service Contract DSL Discount Controller — recalculates discounts after cancellation |
| dslOptionChannel | Method | DSL Option Channel — routes option channel processing for DSL cancellation |
| getNullToStr | Method | Null-safe string conversion utility |
| CAANMsg | Type | Contract Agreement ANalysis Message — CBS response message wrapper holding service data |
| `910` / `920` | Value | Service contract status codes indicating already-cancelled / cancel-completed records (filtered from cancellation loops) |
