---
# Business Logic — JBSbatKKMiStcKikiInfStku.isTaknkikiIdoCd() [20 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.business.service.JBSbatKKMiStcKikiInfStku` |
| Layer | Service (Batch Service) |
| Module | `service` (Package: `eo.business.service`) |

## 1. Role

### JBSbatKKMiStcKikiInfStku.isTaknkikiIdoCd()

This method performs a **business validation check** to determine whether the indoor equipment movement code (宅内機器異動コード, *takunai kiki idou code*) matches the specific service type **"Add Cancellation"** (追加キャンセル, *tsuika kyari). In Japanese telecom operations, when an indoor device (such as aONU, set-top box, or router) is provisioned and later needs to be uninstalled as part of a service cancellation workflow, this flag identifies that scenario. The method acts as a **predicate/utility** within the `JBSbatKKMiStcKikiInfStku` service class, which handles indoor equipment information processing for the KOPT batch processing system. It is called from the class's own `execute()` method, serving as a conditional gate that influences subsequent batch processing decisions — for example, determining whether special cancellation handling, refund logic, or device return workflows should be triggered. This is a shared decision-making method used by the batch orchestration layer.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["isTaknkikiIdoCd in_map ido_key"])
    READ["Read ido_cd from in_map.getString"]
    CHECK_NULL{"ido_cd is null or empty"}
    RET_FALSE_1(["Return false"])
    CHECK_CODE{"ido_cd equals \"06\""}
    RET_FALSE_2(["Return false"])
    RET_TRUE(["Return true"])

    START --> READ
    READ --> CHECK_NULL
    CHECK_NULL -->|"Yes"| RET_FALSE_1
    CHECK_NULL -->|"No"| CHECK_CODE
    CHECK_CODE -->|"No"| RET_FALSE_2
    CHECK_CODE -->|"Yes"| RET_TRUE
```

**Constant Resolution:**
- `JBSbatKKConst.CD00562_TAKNKIKI_IDO_CD_06 = "06"` — Business meaning: **Add Cancellation** (追加キャンセル, *tsuika kyari*). This code indicates that a previously added indoor device is being cancelled/removed.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `in_map` | `JBSbatServiceInterfaceMap` | The input message container that carries batch processing data. It is a map-like structure used throughout the KOPT batch framework to pass structured business data between processing steps. The `getString(key)` method extracts string-typed values by key. |
| 2 | `ido_key` | `String` | The lookup key used to retrieve the indoor equipment movement code from `in_map`. This key identifies which field in the message contains the movement code to validate. Typical values correspond to field names defined in constant classes (e.g., `TAKNKIKI_IDO_CD`). |

**Instance fields / external state read:** None. This method is purely functional — it reads only its parameters and performs a stateless comparison.

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `JBSbatServiceInterfaceMap.getString` | JBSbatServiceInterfaceMap | - | Reads the indoor equipment movement code value from the input message map using the provided key |

**Analysis:** This method performs **no database CRUD operations**. It is a pure in-memory validation/predicate method. The only operation is a **Read** from the input message map (`JBSbatServiceInterfaceMap.getString`), which retrieves the pre-loaded indoor equipment movement code from the batch input data. There are no service component (SC) or CBS calls, and no entity/table access.

## 5. Dependency Trace

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

Direct callers found: 1 methods. Terminal operations from this method: `getString` [R].

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Batch: `JBSbatKKMiStcKikiInfStku` | `execute()` -> `isTaknkikiIdoCd(in_map, ido_key)` | `getString [R] (in_map)` |

**Instructions:**
- The method is called exclusively from the `execute()` method within the same class (`JBSbatKKMiStcKikiInfStku`).
- It is a private utility method, not exposed to screens or external entry points.
- It participates in the KOPT batch processing flow for indoor equipment information handling.
- The terminal operation is a single map-read (`getString`), with no downstream database or external service calls.

## 6. Per-Branch Detail Blocks

**Block 1** — [SET] `(extract movement code from input map)` (L756)

> Extracts the indoor equipment movement code value from the input message map using the provided key.

| # | Type | Code |
|---|------|------|
| 1 | SET | `String ido_cd = in_map.getString(ido_key);` // Retrieve the movement code value from the input message map |

**Block 2** — [IF] `(null/empty check)` (L759)

> Checks whether the extracted movement code is null or empty. This is a defensive validation — if the code is missing, the method returns false to indicate the condition is not met.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (null == ido_cd || 0 == ido_cd.length())` // NULL, empty string check (NULL、空文字チェック) |
| 2 | RETURN | `return false;` // Movement code is absent, condition not satisfied |

**Block 3** — [IF] `(movement code match)` (L764)

> Compares the extracted code against the constant `CD00562_TAKNKIKI_IDO_CD_06 = "06"`. This constant represents the "Add Cancellation" (追加キャンセル) service type. Note: The old code used a generic `TAKNKIKI_IDO_CD` constant (commented out in v22.00.00 migration), which was replaced with the specific code value "06". If the code does NOT match "06", the method returns false.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (!JBSbatKKConst.CD00562_TAKNKIKI_IDO_CD_06.equals(ido_cd))` // Check if code equals "06" (追加キャンセル) [-> CD00562_TAKNKIKI_IDO_CD_06="06"] |
| 2 | RETURN | `return false;` // Code does not match "06", condition not satisfied |

**Block 4** — [RETURN] `(match confirmed)` (L768)

> If all prior checks pass — the code is present AND equals "06" — the method returns true, confirming this is an Add Cancellation scenario for indoor equipment.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return true;` // Movement code is "06" (Add Cancellation) — condition satisfied |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `ido_cd` | Field | Indoor equipment movement code — a coded value indicating the type of indoor device change operation (add, remove, replace, cancel) |
| `ido_key` | Parameter | The lookup key string used to retrieve the movement code from the batch input message map |
| `in_map` | Parameter | Batch input message container — a map-structured object carrying all input data for a batch processing step |
| CD00562_TAKNKIKI_IDO_CD_06 | Constant | Service code "06" — represents **Add Cancellation** (追加キャンセル), meaning a previously provisioned indoor device is being cancelled |
| 宅内機器異動コード (Takunai Kiki Idou Code) | Business term | Indoor Equipment Movement Code — identifies the type of change operation performed on indoor telecom equipment (e.g., ONU, set-top box, router) |
| 追加キャンセル (Tsuika Kyari) | Business term | Add Cancellation — a service operation where a newly added indoor device is cancelled/removed, as opposed to a standard device removal |
| TAKNKIKI | Abbreviation | 宅内機器 (Takunai Kiki) — Indoor Equipment, referring to customer premises telecom devices |
| JBSbatKKConst | Class | KOPT Batch Constants — a central constant definition class for the batch processing framework |
| KOPT Batch | System | Key Operations Processing System — Fujitsu's batch processing framework used for telecom service order fulfillment |
