# Business Logic — JKKSvkeiShosaClCC.updKktkSvcTbltHYBRID() [195 LOC]

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

## 1. Role

### JKKSvkeiShosaClCC.updKktkSvcTbltHYBRID()

This method performs **delivery suspension cancellation (tablet terminal and cradle device) for eo Mobile (Hybrid 42M)** — the core business operation for processing cancellation of device-level delivery stops when a customer cancels a service contract involving a tablet or tablet cradle provided as part of an eo Mobile Hybrid 42M service. The Javadoc explicitly states: "配送抑止取消（タブレット端末、タブレット用クレードル機器） eoモバイル（ハイブリッド 42M）の場合" (Delivery suspension cancellation — for tablet terminals and tablet cradle devices — when using eo Mobile (Hybrid 42M)).

The method implements a **routing/dispatch pattern** combined with **delegation**. It reads delivery-pending device service contracts from the EKK0341B028 screen, identifies whether the contract includes a tablet (device code `C021`) or a tablet cradle (device code `C022`), and then proceeds with a multi-stage validation: (a) skip if a delivery requested date is already set; (b) cross-check other service contracts in the same request to verify the presence of an eo Mobile Hybrid 42M (PCRS_CD = `A60`) contract with a non-terminal status; (c) load delivery information and update contract data via EKK0341C230; and finally (d) execute delivery stop processing on the relevant device(s).

Its role in the larger system is as a **shared utility** called exclusively by `updateTbltKei()` (the tablet contract update path), providing a specialized branch within the broader service contract cancellation workflow. It handles the specific case where a customer's tablet or tablet cradle was placed on delivery suspension and needs to have that suspension lifted during a contract cancellation flow — but only when the order qualifies as eo Mobile Hybrid 42M.

The method has multiple early-return conditions that serve as business guardrails: if a delivery requested date is already set on any device in the group, if no tablet or cradle contract was found, if the eo Mobile Hybrid 42M check fails (wrong service type or contract already in terminal state — received/010, cancelled/920, terminated/910), or if no delivery record matches the tablet or cradle serial number.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["updKktkSvcTbltHYBRID"])
    START --> INIT["Initialize maps, arrays, kktkSvcKEyStat"]
    INIT --> MSG_EKK0341B028["editInMsgEKK0341B028 - Build input message"]
    MSG_EKK0341B028 --> RUN_EKK0341B028["runShokai - Load EKK0341B028"]
    RUN_EKK0341B028 --> LOOP1{workEKK0341B028Array != null?}
    LOOP1 -->|No| EXIT_1["Return early - skip processing"]
    LOOP1 -->|Yes| FOR_M["for m: each delivery-pending device entry"]
    FOR_M --> EARLY1{hisReqshiteiYmd is NOT null?}
    EARLY1 -->|Yes| SKIP_1["Skip - return from loop iteration"]
    EARLY1 -->|No| FIND_DEV{Device type?}
    FIND_DEV -->|C021 Tablet| SAVE_TBLT["Save kktkSvcKeiNoTblt, tbltTemplate"]
    FIND_DEV -->|C022 Cradle| SAVE_CRDL["Save kktkSvcKeiNoCrdl, crdlTemplate"]
    SAVE_TBLT --> BOTH_NULL{Both null?}
    SAVE_CRDL --> BOTH_NULL
    BOTH_NULL -->|Yes| SKIP_2["Skip - return"]
    BOTH_NULL -->|No| CHECK_OTHER["Check other service contracts"]
    CHECK_OTHER --> FOR_P{"for p: each contract entry"}
    FOR_P --> SKIP_PC{eKK0341BSvcKeiNo matches svcKeiNo?}
    SKIP_PC -->|Yes| CONT_P["Continue p loop"]
    SKIP_PC -->|No| LOAD_EKK0081A010["Load EKK0081A010 - Service Agreement Details"]
    LOAD_EKK0081A010 --> RUN_EKK0081A010["runShokai EKK0081A010"]
    RUN_EKK0081A010 --> CHECK_A60{PCRS_CD == A60 Hybrid 42M?}
    CHECK_A60 -->|No| CONT_P2["Continue p loop"]
    CHECK_A60 -->|Yes| CHECK_STAT{svcStat not in 010, 920, 910?}
    CHECK_STAT -->|Yes| SKIP_3["Skip - return"]
    CHECK_STAT -->|No| CONT_P3["Continue p loop"]
    CONT_P --> FOR_P
    CONT_P2 --> FOR_P
    CONT_P3 --> FOR_P
    FOR_P --> DEL_INFO["Load delivery info list"]
    DEL_INFO --> SEARCH_HAISo["searchHaisoInfo for netSvcKei"]
    SEARCH_HAISo --> FOR_L{"for l: each delivery record"}
    FOR_L --> MATCH_T{kktkSvcKeiNoTblt match?}
    MATCH_T -->|Yes| STAT_T{HAISO_STAT == 001?}
    STAT_T -->|Yes| EDIT_TBLT["editInMsgEKK0341C230, editInMsgCmn"]
    STAT_T -->|No| CONT_L["Continue l loop"]
    EDIT_TBLT --> CONT_L
    MATCH_T -->|No| MATCH_C{kktkSvcKeiNoCrdl match?}
    MATCH_C -->|Yes| STAT_C{HAISO_STAT == 001?}
    STAT_C -->|Yes| EDIT_CRDL["editInMsgEKK0341C230, editInMsgCmn"]
    STAT_C -->|No| CONT_L2["Continue l loop"]
    EDIT_CRDL --> CONT_L2
    MATCH_C -->|No| CONT_L2
    CONT_L --> FOR_L
    CONT_L2 --> FOR_L
    FOR_L --> BOTH_DEL_NULL{Both haisoNo null?}
    BOTH_DEL_NULL -->|Yes| SKIP_4["Skip - return"]
    BOTH_DEL_NULL -->|No| SHOSA["runShosaKktsTblt - Update service contract"]
    SHOSA --> STO_TBLT{haisoNoTblt not null?}
    STO_TBLT -->|Yes| STOP_TBLT["updateHaisoStp - Tablet delivery stop"]
    STO_TBLT -->|No| STO_CRDL{haisoNoCrdl not null?}
    STO_CRDL -->|Yes| STOP_CRDL["updateHaisoStp - Cradle delivery stop"]
    STO_CRDL -->|No| EXIT_2["Return - Next"]
    STOP_TBLT --> STO_CRDL
    STOP_CRDL --> EXIT_2
    SKIP_1 --> FOR_M
    SKIP_2 --> FOR_M
    SKIP_3 --> FOR_M
    SKIP_4 --> FOR_M
```

**Processing Summary:**

1. **Initialization and message building**: Initializes local maps and arrays, then builds an input message (`editInMsgEKK0341B028`) using status codes `020` (Inspecting complete / 照枋済) and `030` (Billing complete / 締結済) for the device service contract status.

2. **Load delivery-pending device contracts**: Calls `runShokai` to load the same-request delivery-pending device service contract list (EKK0341B028).

3. **Device classification loop**: For each delivery-pending device entry, checks if a delivery requested date is already set (skip if yes). Identifies whether the device is a tablet (`C021`) or cradle (`C022`), storing the contract number and template for each matched device type.

4. **eo Mobile Hybrid 42M validation**: Iterates through all service contracts in the request to verify at least one other contract (not the target one) is an eo Mobile Hybrid 42M service (`A60`) with a non-terminal status (not `010` Received, `920` Cancelled, `910` Terminated).

5. **Delivery information processing**: Loads delivery info for the tablet's network service contract. For each delivery record matching the tablet or cradle contract number with status `001` (Not Delivered), updates the contract message via `editInMsgEKK0341C230`.

6. **Contract update and delivery stop**: Calls `runShosaKktsTblt` to update the service contract information, then executes `updateHaisoStp` (delivery stop) for each device that has a delivery number.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | Database session handle used for transactional operations throughout the method. Provides the persistence context for all SC/DB calls. |
| 2 | `param` | `IRequestParameterReadWrite` | Request parameter object carrying screen input data, work maps, and message templates. Used to build and exchange CAANMsg objects for screen-to-SC data transfers. |
| 3 | `pcrsCd` | `String` | Provider code — identifies the service provider or network type. Passed through for context but not directly used in this method's conditional logic (the `A60` check is read from loaded data, not from this parameter). |
| 4 | `svcSbtCd` | `int` | Service subtype code — classifies the broad service category (e.g., eo Light Network = `1`, eo Light TV = `2`, eo Light Telephone = `3`). Passed into the method but not referenced in the conditional logic of this specific branch; likely used by callers. |
| 5 | `svcKeiNo` | `String` | Service contract number — the primary service contract identifier being cancelled. Used to exclude this contract from the cross-check loop (the loop skips entries matching this contract number). |
| 6 | `fixedText` | `String` | Fixed text value passed through to called methods (e.g., `searchHaisoInfo`, `runShosaKktsTblt`, `updateHaisoStp`) for message formatting or screen display purposes. |
| 7 | `userDataIndex` | `int` | User data index used to build input messages with `editInMsgEKK0341B028`. Determines which user-level data slice is accessed when constructing screen messages. |

**Instance fields read by the method:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `shokaiMapper` | `JKKSvkeiShosaClShokaiMapperCC` | Screen display and message-building helper used to construct input CAANMsg objects and load screen data (EKK0341B028, EKK0081A010). |
| `shosaClMapper` | `JKKSvkeiShosaShosaClMapperCC` | Processing-side screen mapping helper used to build update messages (EKK0341C230) for service contract cancellation processing. |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `JKKBpCommon.searchHaisoInfo` | EDK0011B080SC | EDK0011 (Delivery Information) | Searches for delivery records matching the tablet's network service contract number with status "001" (Not Delivered). Returns EDK0011B080CBSMsg records containing delivery numbers and status per device. |
| U | `JKKBpCommon.updateHaisoStp` | EDK0011C090CBS | EDK0011 (Delivery Information) | Updates delivery status to "delivery suspended" for the tablet and/or cradle delivery numbers. This is the terminal write operation that marks the delivery as stopped. |
| U | `JKKSvkeiShosaClCC.editInMsgCmn` | EKK0341C230SC | EKK0341 (Service Contract Cancellation) | Common message builder that processes CAANMsg records and prepares update data. Called for tablet and cradle delivery updates via EKK0341C230. |
| R | `JKKSvkeiShosaClCC.getWorkData` | EKK0341B028SC | EKK0341 (Service Contract Cancellation) | Retrieves work data from the EKK0341B028 map — the delivery-pending device service contract list (tablet + cradle templates). |
| R | `JKKSvkeiShosaClCC.getWorkParentData` | EKK0081A010SC | EKK0081 (Service Agreement Details) | Retrieves service agreement details for cross-checking other contracts in the same request. Used to load PCRS_CD and svcKeiStat for each alternate contract. |
| U | `JKKSvkeiShosaClCC.editInMsgCmn` | EKK0081A010SC | EKK0081 (Service Agreement Details) | Common message builder that processes the EKK0081A010 agreement details loaded from the screen display helper. |
| - | `JKKSvkeiShosaClCC.isNull` | Utility | - | Null-check utility called frequently throughout the method to guard against null string values. Not a database operation. |
| - | `JKKSvkeiShosaClCC.runShokai` | Screen Display | - | Screen data loading utility that invokes the display-side SC and returns map results. Called for EKK0341B028 and EKK0081A010. |
| - | `JKKSvkeiShosaClCC.runShosaKktsTblt` | EKK0341C230CBS | EKK0341 (Service Contract Cancellation) | Service contract update execution for tablet. Persists the updated service contract information after message building. |
| U | `JKKSvkeiShosaClShokaiMapperCC.editInMsgEKK0341B028` | EKK0341B028SC | EKK0341 (Service Contract Cancellation) | Builds the input message for loading delivery-pending device service contracts. Sets status codes 020 (Inspecting complete) and 030 (Billing complete). |
| U | `JKKSvkeiShosaClShokaiMapperCC.editInMsgEKK0081A010_2` | EKK0081A010SC | EKK0081 (Service Agreement Details) | Builds the input message for loading service agreement details of alternate contracts. Used in the cross-check validation loop. |
| U | `JKKSvkeiShosaShosaClMapperCC.editInMsgEKK0341C230` | EKK0341C230SC | EKK0341 (Service Contract Cancellation) | Builds the update message for the tablet or cradle service contract cancellation data. Called once per matched device (tablet first, then cradle). |
| R | `JESC0101B010TPMA.getString` / `JESC0101B020TPMA.getString` | TPMA | - | Screen data accessors used to read values from the CAANMsg objects loaded by the screen display helper. |

## 5. Dependency Trace

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

No screen/batch entry points found within 8 hops. Direct callers found: 1 method.
Terminal operations from this method: `updateHaisoStp` [U], `updateHaisoStp` [U], `isNull` [-], `updateHaisoStp` [U], `updateHaisoStp` [U], `isNull` [-], `runShosaKktsTblt` [-], `isNull` [-], `isNull` [-], `editInMsgCmn` [U], `editInMsgCmn` [U], `editInMsgEKK0341C230` [U], `getString` [R], `getString` [R], `getString` [R], `getString` [R], `getString` [R], `getString` [R], `getString` [R], `getString` [R]

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | `JKKSvkeiShosaClCC.updateTbltKei()` | `updateTbltKei()` -> `updKktkSvcTbltHYBRID()` | `updateHaisoStp [U] EDK0011 (Delivery Info)`, `runShosaKktsTblt [-] EKK0341`, `editInMsgEKK0341C230 [U] EKK0341` |

**Analysis:** The method has a single direct caller: `JKKSvkeiShosaClCC.updateTbltKei()`, which handles the tablet contract update path within the service contract cancellation workflow. There are no screen (KKSV*) or batch (KKBV*) entry points found within 8 hops, meaning this method is an internal utility method called exclusively as part of the tablet-specific contract cancellation processing branch.

## 6. Per-Branch Detail Blocks

### Block 1 — INIT `(variable declarations)` (L2461)

Initialize local working variables: result maps, arrays, and status key array.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `rsltShosaMap = new HashMap()` | Result map for service cancellation processing data |
| 2 | SET | `wkCaanMsgList = null` | Working CAAN message list variable (later assigned) |
| 3 | SET | `rslt = null` | Generic result variable |
| 4 | SET | `wkMapArray = new ArrayList<HashMap>()` | Working map array to accumulate processed records |
| 5 | SET | `wkRsltShokaiMap = new HashMap()` | Map for shokai (screen display) results |
| 6 | SET | `wkRsltShokai = new HashMap()` | Result map from shokai calls |

### Block 2 — SET `(status key initialization)` (L2470-L2471)

Set the device service contract status keys for the query filter.

| # | Type | Code | Code |
|---|------|------|------|
| 1 | SET | `kktkSvcKEyStat[0] = JKKSvcConst.SVC_KEI_STAT_020` | Status 020: Inspecting complete (照枋済) |
| 2 | SET | `kktkSvcKEyStat[0] = JKKSvcConst.SVC_KEI_STAT_030` | Status 030: Billing complete (締結済) — **overwrites** line 1; only "030" is the effective value used in the query |

### Block 3 — CALL `(message build + screen load)` (L2472-L2479)

Build the input message for loading delivery-pending device service contracts and execute the screen display load.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | CALL | `shokaiMapper.editInMsgEKK0341B028(param, userDataIndex, kktkSvcKEyStat, SVC_STA_JI_HIS_TG_SKCD_SKSIZM="2")` | Build input message for EKK0341B028 — same-request delivery-pending device service contract list |
| 2 | EXEC | `wkMapArray.add(editInMsgCmn(param, wkCaanMsgList2.get(0)))` | Process the CAANMsg through common message builder and add to working array |
| 3 | SET | `wkRsltShokaiMap.put(MAP_KEY_EKK0341B028, wkMapArray)` | Put processed data under key "EKK0341B028" |
| 4 | CALL | `runShokai(handle, wkRsltShokaiMap, new String[]{MAP_KEY_EKK0341B028})` | Execute screen display SC to load data |
| 5 | SET | `workEKK0341B028Array = (ArrayList)wkRsltShokai.get(MAP_KEY_EKK0341B028)` | Extract loaded device contract list |

### Block 4 — IF `workEKK0341B028Array != null` (L2481)

Outer guard: only proceed if the delivery-pending device contract list was loaded.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `workEKK0341B028Array != null` | Proceed only if delivery-pending device contracts exist |

#### Block 4.1 — FOR_M `(for m loop: iterate over device entries)` (L2483)

Iterate over each delivery-pending device entry to classify tablet vs. cradle.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `kktkSvcKEiNoTblt = ""` | Tablet contract number (default empty) |
| 2 | SET | `kktkSvcKeiNoCrdl = ""` | Cradle contract number (default empty) |
| 3 | FOR | `for (int k=0; k < workEKK0341B028.length; k++)` | Iterate over child templates within the entry |

##### Block 4.1.1 — SET `(extract child template)` (L2489)

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `childTemplate = workEKK0341B028[k]` | Get the k-th child template from the device entry |

##### Block 4.1.2 — SET `(extract delivery requested date)` (L2492)

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `hisReqshiteiYmd = childTemplate.getString(EKK0341B028CBSMsg1List.HAISO_REQ_SHITEI_YMD)` | Extract the delivery requested date (配送依頼指定年月日) |

##### Block 4.1.3 — IF `hisReqshiteiYmd is NOT null` (L2495) [hisReqshiteiYmd]

If a delivery requested date is already set, skip all further processing for this entry.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | RETURN | `return` | Skip processing — delivery date already assigned. The delivery has already been scheduled. |

##### Block 4.1.4 — SET `(extract device service code)` (L2498)

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `kktkSvcCd = childTemplate.getString(EKK0341B028CBSMsg1List.KKTK_SVC_CD)` | Extract the device-provided service code (機器提供サービスコード) |

##### Block 4.1.5 — IF `kktkSvcCd == C021 (Tablet)` (L2501) [KKTK_SVC_CD_TABLET="C021"]

If the device is a tablet, save its contract number and template.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `kktkSvcKeiNoTblt = childTemplate.getString(EKK0341B028CBSMsg1List.KKTK_SVC_KEI_NO)` | Save tablet contract number (タブレット端末機器提供サービス契約番号) |
| 2 | SET | `tbltTemplate = childTemplate` | Save the tablet template for later use |

##### Block 4.1.6 — IF `kktkSvcCd == C022 (Cradle)` (L2507) [KKTK_SVC_CD_CRADLE="C022"]

If the device is a tablet cradle, save its contract number and template.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `kktkSvcKeiNoCrdl = childTemplate.getString(EKK0341B028CBSMsg1List.KKTK_SVC_KEI_NO)` | Save cradle contract number (タブレット用クレードル機器提供サービス契約番号) |
| 2 | SET | `crdlTemplate = childTemplate` | Save the cradle template for later use |

##### Block 4.1.7 — IF `both kktkSvcKeiNoTblt and kktkSvcKeiNoCrdl are null` (L2517) [isNull]

If neither a tablet nor cradle contract was found in this entry, skip processing.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | RETURN | `return` | No tablet or cradle device found in this entry — skip to next iteration. |

### Block 5 — FOR_P `(for p loop: cross-check other service contracts)` (L2522)

Iterate through all service contracts to validate the presence of an eo Mobile Hybrid 42M contract.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `wkRsltShokaiMap2 = new HashMap()` | Result map for EKK0081A010 screen load |
| 2 | SET | `wkRsltShokai2 = new HashMap()` | Shokai result holder |
| 3 | FOR | `for (int p=0; p < workEKK0341B028.length; p++)` | Iterate over all contract entries |

#### Block 5.1 — SET `(extract contract number)` (L2528)

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `workEKK0341B = workEKK0341B028[p]` | Get the p-th contract entry |
| 2 | SET | `eKK0341BSvcKeiNo = workEKK0341B.getString(EKK0341B028CBSMsg1List.SVC_KEI_NO)` | Extract the service contract number |

#### Block 5.2 — IF `eKK0341BSvcKeiNo matches target svcKeiNo` (L2531)

Skip the contract being cancelled (the target contract itself) during the cross-check.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `isNull(eKK0341BSvcKeiNo) || svcKeiNo.equals(eKK0341BSvcKeiNo)` | Skip if contract number is null or matches the target contract |
| 2 | EXEC | `continue` | Skip to next contract in the loop |

#### Block 5.3 — CALL `(load alternate contract details)` (L2540-L2556)

Load service agreement details for a non-target contract.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `wkMapArray81A010 = new ArrayList()` | Working array for EKK0081A010 data |
| 2 | CALL | `shokaiMapper.editInMsgEKK0081A010_2(param, fixedText, eKK0341BSvcKeiNo)` | Build input message for EKK0081A010 (Service Agreement Details) for the alternate contract |
| 3 | EXEC | `wkMapArray81A010.add(editInMsgCmn(param, wkCaanMsgList81A010.get(0)))` | Process CAANMsg through common builder |
| 4 | SET | `wkRsltShokaiMap2.put(MAP_KEY_EKK0081A010, wkMapArray)` | Put data under key "EKK0081A010" |
| 5 | CALL | `runShokai(handle, wkRsltShokaiMap2, new String[]{MAP_KEY_EKK0081A010})` | Execute screen display SC |
| 6 | SET | `workEKK0081A010 = getWorkParentData(EKK0081A010CBSMsg.EKK0081A010CBSMSG1LIST, wkRsltShokai2, MAP_KEY_EKK0081A010)` | Retrieve service agreement details |

##### Block 5.3.1 — IF `workEKK0081A010 is not null` (L2558)

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `caanEKK0081A010 = workEKK0081A010[0]` | Get the first (and likely only) agreement detail record |

###### Block 5.3.1.1 — IF `PCRS_CD == A60 (eo Mobile Hybrid 42M)` (L2563) [PCRS_CD_3G_42M_HYBRID="A60"]

Check if this alternate contract is an eo Mobile Hybrid 42M service.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `svcStat = caanEKK0081A010.getString(EKK0081A010CBSMsg1List.SVC_KEI_STAT)` | Extract the service contract status |

####### Block 5.3.1.1.1 — IF `svcStat is not in terminal states 010, 920, 910` (L2568) [SVC_KEI_STAT_010="010", SVC_KEI_STAT_920="920", SVC_KEI_STAT_910="910"]

If the eo Mobile Hybrid 42M contract is in a non-terminal status (not Received, Cancelled, or Terminated), the validation fails and we skip.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | RETURN | `return` | The eo Mobile Hybrid 42M contract is not in a valid state for cancellation — skip processing. A contract in "Received", "Cancelled", or "Terminated" status should not have tablet/cradle delivery suspension cancelled. |

### Block 6 — CALL `(load delivery information)` (L2580-L2584)

Load the delivery information list for the tablet's network service contract number.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `netSvcKei = tbltTemplate.getString(EKK0341B028CBSMsg1List.SVC_KEI_NO)` | Extract the network service contract number from the tablet template |
| 2 | SET | `workEDK0011B080Rslt = new HashMap()` | Result map for delivery info query |
| 3 | SET | `haisoStatList = new ArrayList<String>()` | Delivery status filter list |
| 4 | SET | `haisoStatList.add(HAISO_STAT_001)` | Filter: only "001" (Not Delivered / 配達予定) — deliverable only |
| 5 | CALL | `JKKBpCommon.searchHaisoInfo(param, handle, netSvcKei, null, null, null, haisoStatList, workEDK0011B080Rslt, fixedText)` | Search delivery info for the tablet's network service contract |

#### Block 6.1 — SET `(extract delivery records)` (L2586)

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `eDK0011B080CBSMSG1LIST = (CAANMsg[])workEDK0011B080Rslt.get(EDK0011B080CBSMsg.EDK0011B080CBSMSG1LIST)` | Extract delivery records from result map |
| 2 | SET | `haisoNoTblt = ""` | Tablet delivery number (default empty) |
| 3 | SET | `haisoNoCrdl = ""` | Cradle delivery number (default empty) |

### Block 7 — FOR_L `(for l loop: iterate delivery records)` (L2588)

Iterate over each delivery record to find matching tablet and cradle entries.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `childTemplate = eDK0011B080CBSMSG1LIST[l]` | Get the l-th delivery record |

#### Block 7.1 — IF `kktkSvcKeiNoTblt matches delivery record` (L2594)

Check if this delivery record matches the tablet's contract number.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `kktkSvcKeiNoTblt.equals(childTemplate.getString(EDK0011B080CBSMsg1List.KKTK_SVC_KEI_NO))` | Match against tablet contract number |

##### Block 7.1.1 — IF `HAISO_STAT == 001 (Not Delivered)` (L2598) [HAISO_STAT_001="001"]

Only process delivery records with "Not Delivered" status — if already delivered, skip the update.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | CALL | `wkCaanMsgList = shosaClMapper.editInMsgEKK0341C230(param, tbltTemplate, "", null)` | Build update message for tablet service contract cancellation data |
| 2 | EXEC | `rslt = editInMsgCmn(param, wkCaanMsgList.get(0))` | Process the CAANMsg through common message builder |
| 3 | EXEC | `wkMapArray.add(rslt)` | Add processed record to the working array for later persistence |

#### Block 7.2 — IF `kktkSvcKeiNoCrdl matches delivery record` (L2606)

Check if this delivery record matches the cradle's contract number.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `kktkSvcKeiNoCrdl.equals(childTemplate.getString(EDK0011B080CBSMsg1List.KKTK_SVC_KEI_NO))` | Match against cradle contract number |

##### Block 7.2.1 — IF `HAISO_STAT == 001 (Not Delivered)` (L2610) [HAISO_STAT_001="001"]

Only process delivery records with "Not Delivered" status.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | CALL | `wkCaanMsgList = shosaClMapper.editInMsgEKK0341C230(param, crdlTemplate, "", null)` | Build update message for cradle service contract cancellation data |
| 2 | EXEC | `rslt = editInMsgCmn(param, wkCaanMsgList.get(0))` | Process the CAANMsg through common message builder |
| 3 | EXEC | `wkMapArray.add(rslt)` | Add processed record to the working array |

### Block 8 — IF `both haisoNoTblt and haisoNoCrdl are null` (L2618) [isNull]

If no delivery record was matched for either device type, skip all remaining processing.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | RETURN | `return` | No delivery number found for either tablet or cradle — skip processing. This typically means neither device had a "Not Delivered" delivery record in the system. |

### Block 9 — SET + CALL `(contract update)` (L2624-L2625)

Persist the updated service contract data and execute the cancellation processing.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `rsltShosaMap.put(MAP_KEY_EKK0341C230, wkMapArray)` | Put processed records under key "EKK0341C230" |
| 2 | CALL | `runShosaKktsTblt(handle, param, fixedText, userDataIndex, rsltShosaMap)` | Execute service contract cancellation update for tablet devices |

### Block 10 — IF `haisoNoTblt is not null` (L2628)

Execute delivery stop processing for the tablet if a delivery number was identified.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `eDK0011C090Hash = new HashMap<String, Object>()` | Hash map for delivery stop result (not used as input) |
| 2 | CALL | `JKKBpCommon.updateHaisoStp(param, handle, haisoNoTblt, eDK0011C090Hash, fixedText)` | Update delivery status to "delivery stopped" for the tablet delivery number |

### Block 11 — IF `haisoNoCrdl is not null` (L2632)

Execute delivery stop processing for the cradle if a delivery number was identified.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `eDK0011C090Hash = new HashMap<String, Object>()` | Hash map for delivery stop result (not used as input) |
| 2 | CALL | `JKKBpCommon.updateHaisoStp(param, handle, haisoNoCrdl, eDK0011C090Hash, fixedText)` | Update delivery status to "delivery stopped" for the cradle delivery number |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `updKktkSvcTbltHYBRID` | Method | Update Tablet Device Service — handles delivery suspension cancellation for tablet/cradle devices in eo Mobile Hybrid 42M service contracts |
| `hybrid` | Business term | eo Mobile Hybrid 42M — a bundled mobile data plan combining 3G and LTE (42Mbps) services offered by K-Opticom/eo |
| `pcrsCd` | Field | Provider code — identifies the service provider or network type in the system |
| `svcSbtCd` | Field | Service subtype code — numeric classification of the broad service category (1=eo Light Network, 2=eo Light TV, 3=eo Light Telephone) |
| `svcKeiNo` | Field | Service contract number — unique identifier for a service contract line item |
| `kktkSvcCd` | Field | Device-provided service code — code identifying the type of equipment provided by the operator (e.g., C021 = Tablet, C022 = Cradle) |
| `kktkSvcKeiNoTblt` | Field | Tablet terminal device service contract number — internal contract ID for the tablet device |
| `kktkSvcKeiNoCrdl` | Field | Tablet cradle device service contract number — internal contract ID for the tablet cradle |
| `hisReqshiteiYmd` | Field | Delivery requested date (配送依頼指定年月日) — the date a delivery has been scheduled/requested for the device |
| `kktkSvcKEyStat` | Field | Device service contract status key array — holds status codes used to filter device service contract queries |
| `HAISO_STAT_001` | Constant | "001" — Delivery status "Not Delivered" / 配達予定 — indicates the device has not yet been delivered |
| `KKTK_SVC_CD_TABLET` | Constant | "C021" — Device service code for tablet terminal (タブレット端末) |
| `KKTK_SVC_CD_CRADLE` | Constant | "C022" — Device service code for tablet cradle (タブレット用クレードル) |
| `SVC_KEI_STAT_010` | Constant | "010" — Contract status "Received/Ordered" (受付済) — initial order acceptance state |
| `SVC_KEI_STAT_020` | Constant | "020" — Contract status "Inspecting complete" (照枋済) — post-inspection, pre-billing state |
| `SVC_KEI_STAT_030` | Constant | "030" — Contract status "Billing complete" (締結済) — billing finalized, service active state |
| `SVC_KEI_STAT_910` | Constant | "910" — Contract status "Terminated" (解除済) — contract permanently ended |
| `SVC_KEI_STAT_920` | Constant | "920" — Contract status "Cancelled" (キャンセル済) — order cancelled |
| `PCRS_CD_3G_42M_HYBRID` | Constant | "A60" — Provider/service code for eo Mobile Hybrid 42M (eoモバイル・ハイブリッド 42M) |
| `SVC_STA_JI_HIS_TG_SKCD_SKSIZM` | Constant | "2" — Screen status flag used in message building for EKK0341B028 |
| `MAP_KEY_EKK0341B028` | Constant | "EKK0341B028" — Map key for same-request delivery-pending device service contract data |
| `MAP_KEY_EKK0081A010` | Constant | "EKK0081A010" — Map key for service agreement details data |
| `MAP_KEY_EKK0341C230` | Constant | "EKK0341C230" — Map key for service contract cancellation processing data |
| `EKK0341B028` | Screen | Same-request delivery-pending device service contract list screen — displays device contracts pending delivery within the same service request |
| `EKK0081A010` | Screen | Service agreement details screen — displays detailed service contract information |
| `EKK0341C230` | Screen | Service contract cancellation update screen — used to update service contract data during cancellation |
| `EDK0011B080` | Screen | Delivery information list screen — displays delivery status and delivery numbers |
| `EDK0011C090` | CBS | Delivery status update CBS — business service component for updating delivery status |
| `runShokai` | Method | Screen data loading utility — invokes display-side Service Components to retrieve screen data |
| `runShosaKktsTblt` | Method | Service cancellation processing for tablet — executes the actual service contract update |
| `searchHaisoInfo` | Method | Delivery information search — queries delivery records by service contract number |
| `updateHaisoStp` | Method | Delivery stop update — sets delivery status to "delivery suspended/stopped" |
| `editInMsgEKK0341B028` | Method | Input message builder for EKK0341B028 screen data loading |
| `editInMsgEKK0081A010_2` | Method | Input message builder for EKK0081A010 (alternate contract) agreement details |
| `editInMsgEKK0341C230` | Method | Input message builder for EKK0341C230 service contract cancellation update |
| `editInMsgCmn` | Method | Common message processor — processes CAANMsg records through the common message transformation pipeline |
| `getWorkData` | Method | Retrieves work data from a screen map by key |
| `getWorkParentData` | Method | Retrieves parent-level work data from a screen map by key |
| `isNull` | Method | Null-check utility — returns true if a String is null or empty |
| CAANMsg | Type | Canonical message object — the framework's standard data transfer object for passing structured data between screen layers, SCs, and CBSs |
| SessionHandle | Type | Database session handle — provides transaction context and persistence operations |
| IRequestParameterReadWrite | Type | Request parameter interface — provides read/write access to screen input parameters and work data |
| FTTH | Business term | Fiber To The Home — fiber-optic broadband service (referenced in similar methods in the class) |
| eo Mobile | Business term | K-Opticom's mobile data service brand offering 3G and LTE plans |
| Hybrid 42M | Business term | eo Mobile Hybrid 42M plan — a 3G/LTE bundled mobile data plan supporting up to 42Mbps download speeds |
