---
title: "DD48 — JDKCommon08CC.kikiTeikyoCds()"
layer: "CC/Common Component"
module: "common"
package: "com.fujitsu.futurity.bp.custom.common"
---

# (DD48) Business Logic — JDKCommon08CC.kikiTeikyoCds() [31 LOC]

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

## 1. Role

### JDKCommon08CC.kikiTeikyoCds()

This method is a filtering utility used during the return product (返品, hampin) approval workflow. It iterates over a list of equipment entries embedded in the request parameters and extracts only those items that are designated as "check targets" — specifically, equipment marked as cancellation (キャンセル) or rental (レンタル) returns. The filter enforces three criteria: the service detail number (`key_kktk_svc_kei_no`) must be non-empty, the equipment sub-type code (`tk_sbt_cd`) must be non-empty, and the return product classification (`key_hmpin_kbn`) must be a value included in the predefined `HMPIN_KBN` set (`""`, `"1"`, `"2"`). The result is a compact mapping from service detail number to equipment sub-type code, which is used by the caller method `approve()` for subsequent input validation against contract status. The method implements a straightforward filtering/dispatch pattern: read, filter, extract key-value pairs, and return.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["kikiTeikyoCds param"])
    START --> INIT["Initialize empty result Map"]
    INIT --> GETDATA["Retrieve inMap from param.getData DKSV008101CC"]
    GETDATA --> EXTRACT["Extract key_hmpin_kiki_list from inMap"]
    EXTRACT --> LOOP["Iterate over list items"]
    LOOP --> CHECK_SVC["Check if key_kktk_svc_kei_no is empty"]
    CHECK_SVC -->|yes| SKIP["Continue to next item"]
    CHECK_SVC -->|no| CHECK_TK["Check if tk_sbt_cd is empty"]
    CHECK_TK -->|yes| SKIP
    CHECK_TK -->|no| CHECK_KBN["Check if key_hmpin_kbn is in HMPIN_KBN set"]
    CHECK_KBN -->|no| SKIP
    CHECK_KBN -->|yes| PUT["Put key_kktk_svc_kei_no to tk_sbt_cd into result Map"]
    PUT --> LOOP
    SKIP --> LOOP
    LOOP --> RETURN["Return result Map<String, String>"]
    RETURN --> END(["kikiTeikyoCds end"])
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `param` | `IRequestParameterReadWrite` | Request parameter container carrying the approval workflow state. It holds the equipment list under the key `"key_hmpin_kiki_list"` (返機機器一覧, return product equipment list), retrieved via `param.getData(DKSV008101CC)`. This list contains all equipment items being processed in the return product approval, each with fields for service number, equipment type code, and return classification. |

**Key constant used internally:**

| Constant | Value | Source Location |
|----------|-------|-----------------|
| `HMPIN_KBN` | `Set<String>` containing `""`, `"1"`, `"2"` | `JDKCommon08CC.java:204-211` |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `param.getData(DKSV008101CC)` | DKSV008101CC | - | Reads the work parameter list from the request containing the return product equipment list (`key_hmpin_kiki_list`) |

**How to classify:**
- **R** (Read): `param.getData(DKSV008101CC)` retrieves the pre-populated equipment list from the request context. No database or external SC calls are made — this method operates purely on in-memory data passed via the request parameter.

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `param.getData(DKSV008101CC)` | DKSV008101CC | - | Reads the key_hmpin_kiki_list from the inMap to extract return product equipment items |

## 5. Dependency Trace

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

No screen/batch entry points found within 8 hops. Direct callers found: 1 methods.
Terminal operations from this method: `getData` [R]

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Common: JDKCommon08CC | `approve()` -> `kikiTeikyoCds(param)` | `param.getData [R] DKSV008101CC` |

**Instructions:**
- `kikiTeikyoCds` is called internally by the `approve()` method within the same class `JDKCommon08CC` (at source line 287).
- No external screen (KKSV*) or batch entry points directly call this method.
- The caller `approve()` is invoked from screen `DKSV0081` for return product approval processing, but the call chain from that screen goes through other intermediate methods before reaching `kikiTeikyoCds`.
- The terminal operation from this method is `getData` on `DKSV008101CC`, which reads the return product equipment list from the request parameter context.

## 6. Per-Branch Detail Blocks

**Block 1** — [SET] `(L820)` Initialize the result map

| # | Type | Code |
|---|------|------|
| 1 | SET | `map = new HashMap<String, String>()` // Create empty result map to hold service number -> equipment type code pairs |

**Block 2** — [SET] `(L822)` Retrieve the inMap from request parameters

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `inMap = (HashMap)param.getData(DKSV008101CC)` // Get the work parameter data map from DKSV008101CC key [-> DKSV008101CC] |

**Block 3** — [SET] `(L824)` Extract the equipment list

| # | Type | Code |
|---|------|------|
| 1 | SET | `list = (List)inMap.get("key_hmpin_kiki_list")` // Extract the return product equipment list from inMap [-> "key_hmpin_kiki_list" = "返機機器一覧" (return product equipment list)] |

**Block 4** — [FOR] `(L826)` Iterate over list items

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `for (Map data : list)` // Loop over each equipment entry in the return product list |

**Block 4.1** — [IF] `(L828)` Check if service detail number is empty — skip if so

> Business Description: Filter out entries where the service detail number (`key_kktk_svc_kei_no`) is blank. These are incomplete records and should not be processed.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `"".equals(data.get("key_kktk_svc_kei_no"))` // Check if service detail number is empty [-> "key_kktk_svc_kei_no" = "契約設備 Detail 番号" (contract equipment detail number)] |
| 2 | EXEC | `continue` // Skip to next iteration |

**Block 4.2** — [IF] `(L833)` Check if equipment sub-type code is empty — skip if so

> Business Description: Filter out entries where the equipment sub-type code (`tk_sbt_cd`) is blank. A valid equipment type code is required for the mapping.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `"".equals(data.get("tk_sbt_cd"))` // Check if equipment sub-type code is empty [-> "tk_sbt_cd" = "機器サブタイプコード" (equipment sub-type code)] |
| 2 | EXEC | `continue` // Skip to next iteration |

**Block 4.3** — [IF] `(L838)` Check if return product classification is a check target

> Business Description: The core filter — retain only items whose return product classification (`key_hmpin_kbn`) matches one of the predefined values in the `HMPIN_KBN` set. Per the Japanese comment 「ここでチェック対象のキャンセル、レンタル品以外を読み飛ばしておく」 ("At this point, skip over anything other than check targets: cancellations and rental items"), this ensures only return products marked as cancellation or rental are included. `HMPIN_KBN` contains `""`, `"1"`, and `"2"`.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `!HMPIN_KBN.contains(data.get("key_hmpin_kbn"))` // Check if NOT a check target [-> HMPIN_KBN = Set{"" , "1", "2"} (返品区分 / return product classification)] |
| 2 | EXEC | `continue` // Skip to next iteration |

**Block 4.4** — [SET] `(L842)` Add valid entry to result map

> Business Description: For entries passing all three filters, store the service detail number as the key and the equipment sub-type code as the value. This creates a lookup map keyed by service number.

| # | Type | Code |
|---|------|------|
| 1 | SET | `map.put(data.get("key_kktk_svc_kei_no"), data.get("tk_sbt_cd"))` // Put service number -> equipment type code into result |

**Block 5** — [RETURN] `(L846)` Return the filtered mapping

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return map` // Return map of service detail number to equipment sub-type code for check-target items only |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `hampin` (返品) | Business term | Return product — equipment returned by the customer for cancellation or exchange |
| `key_hmpin_kiki_list` | Field | Return product equipment list — the list of equipment items being returned, stored in the request parameters |
| `key_hmpin_kbn` | Field | Return product classification — categorizes the type of return (e.g., cancellation, rental). Valid check target values are `""`, `"1"`, `"2"` as defined in the `HMPIN_KBN` set |
| `key_kktk_svc_kei_no` | Field | Contract equipment service detail number — internal identifier for a service contract line item associated with specific equipment |
| `tk_sbt_cd` | Field | Equipment sub-type code — the classification code for the equipment type (e.g., GPON vs EPON device type) |
| `HMPIN_KBN` | Constant | Return product classification set — predefined set of valid return product types that should be processed as check targets |
| `DKSV008101CC` | Constant/CC | DKSV0081 work parameter common component — the key used to retrieve the work parameter data map from the request |
| `approve()` | Method | Return product approval processing — the parent method that calls `kikiTeikyoCds()` as part of the input validation flow for return product approval |
| Cancel (キャンセル) | Business term | Equipment cancellation — a return product type where the service is being cancelled |
| Rental (レンタル) | Business term | Rental equipment — a return product type involving returned rental equipment |
| Input Check (入力チェック) | Business term | Input validation — the process of verifying entered data against business rules before committing changes |
