# Business Logic — JKKKojiChgPlaceNoCC.getKktkInfExecSvcKei() [115 LOC]

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

## 1. Role

### JKKKojiChgPlaceNoCC.getKktkInfExecSvcKei()

This method retrieves equipment provision service contract data for a line-change operation within the K-Opticom customer base system. It is invoked during a residential address change workflow (JKKKojiChgPlaceNoCC) to gather all active and reserved equipment contract records tied to a given service detail number (`svcKeiNo`). The method implements a two-pass routing pattern: it first queries the contract list for **cancellation** records (FUNC_CODE = "1", `2` in Japanese), deduplicates by equipment contract number, and fetches full equipment details; then it queries the same list for **generation** (new reservation) records (FUNC_CODE = "2", `3` in Japanese), applies a reservation check to filter only valid upcoming reservations, and performs duplicate detection against the already-collected records by comparing equipment model and serial number combinations. The method acts as a shared data aggregation component called from the `execute()` entry point of the line-change CBS, bridging service component lookups with downstream business logic that needs a unified view of both existing and pending equipment contracts.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["getKktkInfExecSvcKei handle, scCall, param, fixedText, svcKeiNo, baseYmd"])

    START --> INIT["Initialize outMap, kktkSvcKeiNo, geneAddDtm, mapCnt"]

    INIT --> BUILD1["Build inMsg for EKK0341B012 FUNC_CODE = 1 Cancellation"]

    BUILD1 --> CALL1["callSC EKK0341B012 to get equipment service contract list Cancellation"]

    CALL1 --> CHECK1["rsvMsgLst != null?"]

    CHECK1 -- No --> SECOND_LOOP["Build inMsg for EKK0341B012 FUNC_CODE = 2 Generation"]

    CHECK1 -- Yes --> LOOP1["For each CAANMsg in rsvMsgLst"]

    LOOP1 --> EXTRACT1["Extract kktkSvcKeiNo from msg"]

    EXTRACT1 --> DUPE1{"ctrlMap.containsKey kktkSvcKeiNo?"}

    DUPE1 -- Yes --> END_LOOP1["End iteration"]

    DUPE1 -- No --> CALL_GET["getKktkSvcKei kktkSvcKeiNo, null, baseYmd"]

    CALL_GET --> DATA1{"data != null?"}

    DATA1 -- No --> END_LOOP1

    DATA1 -- Yes --> PUT1["outMap.put mapCnt, data"]

    PUT1 --> INC1["mapCnt++"]

    INC1 --> CTRL1["ctrlMap.put kktkSvcKeiNo, kktkSvcKeiNo"]

    CTRL1 --> END_LOOP1

    END_LOOP1 --> SECOND_LOOP

    SECOND_LOOP --> CALL2["callSC EKK0341B012 to get equipment service contract list Generation"]

    CALL2 --> CHECK2["rsvMsgLst != null?"]

    CHECK2 -- No --> RETURN["Return outMap"]

    CHECK2 -- Yes --> LOOP2["For each CAANMsg in rsvMsgLst"]

    LOOP2 --> EXTRACT2["Extract kktkSvcKeiNo from msg"]

    EXTRACT2 --> RSV_CHK{"GeneAddDtmRsv null or empty?"}

    RSV_CHK -- Yes --> END_LOOP2["Skip iteration"]

    RSV_CHK -- No --> GENE["Extract geneAddDtm from msg"]

    GENE --> CALL_GET2["getKktkSvcKei kktkSvcKeiNo, geneAddDtm, null"]

    CALL_GET2 --> DUPE_CHK{"data != null AND isRsvKikiInfoAddChk passes?"}

    DUPE_CHK -- No --> END_LOOP2

    DUPE_CHK -- Yes --> PUT2["outMap.put mapCnt, data"]

    PUT2 --> INC2["mapCnt++"]

    INC2 --> END_LOOP2

    END_LOOP2 --> RETURN

    subgraph getKktkSvcKei
        GET_START["getKktkSvcKei kktkSvcKeiNo, geneAddDtm, baseYmd"]
        GET_START --> GENE_CHECK{"geneAddDtm == null?"}
        GENE_CHECK -- Yes --> INMSG_GEN["inMsg: FUNC_CODE 2, KEY_GENE_ADD_DTM empty, KEY_RSV_APLY_YMD = baseYmd"]
        GENE_CHECK -- No --> INMSG_USE["inMsg: FUNC_CODE 1, KEY_GENE_ADD_DTM = geneAddDtm, KEY_RSV_APLY_YMD empty"]
        INMSG_GEN --> SC_CALL1["callSC EKK0341A010 equipment info lookup"]
        INMSG_USE --> SC_CALL1
        SC_CALL1 --> STATUS_CHECK{"isKktkSvcKeiStat svcKeiStat?"}
        STATUS_CHECK -- No --> GET_RETURN["Return null"]
        STATUS_CHECK -- Yes --> MODEL_CHECK{"TAKNKIKI_MODEL_CD null?"}
        MODEL_CHECK -- Yes --> SET_SEIZO_NO["seizoNoUm = 1"]
        MODEL_CHECK -- No --> MODEL_LOOKUP["getTaknkikiModel modelCd"]
        SET_SEIZO_NO --> BUILD_OUT["Build outMap: 11 fields from curMsgLst"]
        MODEL_LOOKUP --> BUILD_OUT
        BUILD_OUT --> GET_RETURN
    end

    RETURN --> END_NODE(["Return HashMap<String, HashMap<String, String>>"])
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | Database session handle providing the transactional context for all CBS calls made during this method's execution. |
| 2 | `scCall` | `ServiceComponentRequestInvoker` | Service component request invoker used to dispatch CBS calls (e.g., EKK0341B012, EKK0341A010). |
| 3 | `param` | `IRequestParameterReadWrite` | Request parameter reader/writer used to pass data to and receive data from CBS calls. |
| 4 | `fixedText` | `String` | Fixed text / error message label used in CBS error handling to identify the calling context. |
| 5 | `svcKeiNo` | `String` | Service detail number (service contract line identifier) — uniquely identifies the service contract line item whose equipment contract records are being retrieved. This serves as the primary key for querying the equipment service contract list. |
| 6 | `baseYmd` | `String` | Base year-month-day date string (format YYYYMMDD) used as the reference date for reservation application checks. It determines whether a reserved service contract is considered valid (i.e., the reservation application date has not yet passed). |

**Instance fields / external state read:** None directly. The method is stateless and relies entirely on the passed-in parameters and the results of external CBS calls.

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `callSC` | EKK0341B012 | KK_T_KKTK_SVC_KEI (Equipment Provision Service Contract) | Calls CBS EKK0341B012 (Equipment Provision Service Contract List View) with FUNC_CODE="1" to retrieve cancellation records. |
| R | `callSC` | EKK0341B012 | KK_T_KKTK_SVC_KEI (Equipment Provision Service Contract) | Calls CBS EKK0341B012 with FUNC_CODE="2" to retrieve generation (new reservation) records. |
| R | `getKktkSvcKei` -> `callSC` | EKK0341A010 | KK_T_KKTK_SVC_KEI_ISP (Equipment Provision Service Contract Line Item) | Equipment info lookup — retrieves detailed equipment record for a given equipment contract number. FUNC_CODE="1" when geneAddDtm is provided (reservation path); FUNC_CODE="2" when querying by baseYmd. |
| R | `getKktkSvcKei` -> `getTaknkikiModel` | EKK0341A010 (or equivalent) | ZM_M_TAKNKIKI_MODEL_CD (Home Equipment Model Master) | Home equipment model code search — looks up the model description for an equipment serial number. Called when TAKNKIKI_MODEL_CD is not null. |
| R | `JKKKojiChgPlaceNoCC.getKktkSvcKei` | N/A | N/A | Internal private method that wraps EKK0341A010 call and constructs the output HashMap from the returned CAANMsg fields. |
| R | `JKKKojiChgPlaceNoCC.isRsvKikiInfoAddChk` | N/A | N/A | Internal private method that performs duplicate detection against already-collected equipment data by comparing serial numbers and model codes. |
| R | `CAANMsg.getString` | N/A | N/A | Extracts individual string fields from CAANMsg objects returned by CBS calls. |
| R | `CAANMsg.getCAANMsgList` | N/A | N/A | Extracts list arrays from CAANMsg response objects. |

### Full CRUD analysis:

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `EKK0341B012CBSMsg.getString` via callSC | EKK0341B012 | KK_T_KKTK_SVC_KEI (Equipment Provision Service Contract) | Reads the equipment provision service contract list with FUNC_CODE="1" (Cancellation) to get existing contracted equipment lines. |
| R | `EKK0341B012CBSMsg.getString` via callSC | EKK0341B012 | KK_T_KKTK_SVC_KEI (Equipment Provision Service Contract) | Reads the equipment provision service contract list with FUNC_CODE="2" (Generation) to get reserved/upcoming equipment lines. |
| R | `EKK0341A010CBSMsg.getString` via getKktkSvcKei -> callSC | EKK0341A010 | KK_T_KKTK_SVC_KEI_ISP (Equipment Provision Service Contract Line Item) | Equipment information lookup — retrieves detailed fields for a specific equipment contract number including serial number, model code, status, service code, and reservation data. |
| R | `getTaknkikiModel` -> callSC | EKK0341A010 (or related) | ZM_M_TAKNKIKI_MODEL_CD (Home Equipment Model Master) | Home equipment model code lookup — resolves the model code to a human-readable model identifier used for the "manufacturing number existence flag" (seizoNoUm). |

**How to classify:** All operations are Read (R) — this method performs only data retrieval. No creates, updates, or deletes occur within this method. The two CBS calls to EKK0341B012 fetch different views of the same contract table (cancellation vs. generation records), and the subsequent EKK0341A010 call enriches each equipment line with detailed attribute data.

## 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: `getString` [R], `getCAANMsgList` [R], `callSC [EKK0341B012]` [R], `callSC [EKK0341A010]` [R], `isKktkSvcKeiStat` [R], `getTaknkikiModel` [R], `isRsvKikiInfoAddChk` [R]

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | CBS:JKKKojiChgPlaceNoCC | `JKKKojiChgPlaceNoCC.execute()` -> `JKKKojiChgPlaceNoCC.getKktkInfExecSvcKei(handle, scCall, param, fixedText, svcKeiNo, baseYmd)` | `EKK0341B012 [R] KK_T_KKTK_SVC_KEI`, `EKK0341A010 [R] KK_T_KKTK_SVC_KEI_ISP`, `getTaknkikiModel [R] ZM_M_TAKNKIKI_MODEL_CD` |

**Call chain details:** The `execute()` method of the JKKKojiChgPlaceNoCC CBS is the primary entry point. It is invoked by a screen (typically the line-change screen) and delegates to this method to gather all relevant equipment contract data. From this method, the terminal database interactions reach the equipment provision service contract table (`KK_T_KKTK_SVC_KEI`) via CBS EKK0341B012, the equipment contract line item table (`KK_T_KKTK_SVC_KEI_ISP`) via CBS EKK0341A010, and the home equipment model master table (`ZM_M_TAKNKIKI_MODEL_CD`) through the `getTaknkikiModel` helper.

## 6. Per-Branch Detail Blocks

**Block 1** — [SET] Local variable initialization (L1350)

> Initializes all local variables and the output data structure before the main processing loop.

| # | Type | Code |
|---|------|------|
| 1 | SET | `outMap = new HashMap<String, HashMap<String, String>>()` // Output map keyed by sequential index |
| 2 | SET | `kktkSvcKeiNo = null` // Will hold equipment contract number extracted from each record |
| 3 | SET | `geneAddDtm = null` // Will hold generation timestamp for reservation records |
| 4 | SET | `mapCnt = 0` // Sequential counter for outMap insertion index |
| 5 | SET | `inMsg = null` // Temporary input message array for CBS calls |

**Block 2** — [IF-ELSE / v4.01.00 versioned code] Build inMsg for Cancellation query (L1357–1368)

> Constructs the input message array for the first CBS call. The code is version-controlled: the old EKK0341B025 path is commented out; the active path uses EKK0341B012 with FUNC_CODE = "1" (Cancellation).

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMsg = new Object[][]{...}` // Version-controlled: EKK0341B012 active, EKK0341B025 commented out [-> v4.01.00] |
| 2 | SET | `{EKK0341B012CBSMsg.TEMPLATEID, TEMPLATE_ID_EKK0341B012}` // [-> CONSTANT: "EKK0341B012"] |
| 3 | SET | `{EKK0341B012CBSMsg.FUNC_CODE, "1"}` // FUNC_CODE = "1" = Cancellation query |
| 4 | SET | `{EKK0341B012CBSMsg.KEY_SVC_KEI_NO, svcKeiNo}` // Primary key: service detail number |

**Block 3** — [CALL] First CBS invocation: Cancellation query (L1370)

> Calls CBS EKK0341B012 to retrieve the equipment provision service contract list for cancellation records.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `rsvMsg = callSC(handle, scCall, param, fixedText, inMsg)` // Invokes EKK0341B012 CBS |
| 2 | SET | `rsvMsgLst = rsvMsg.getCAANMsgList(EKK0341B012CBSMsg.EKK0341B012CBSMSG1LIST)` // Extract cancellation list |

**Block 4** — [IF] Non-null check on cancellation list (L1374–1399)

> Checks whether any cancellation records were returned. If null, skips the loop entirely. The `rsvMsgLst != null` guard was added via OM-2015-0000519.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (rsvMsgLst != null)` // Null guard for cancellation result list |

**Block 5** — [FOR] Iterate over cancellation records (L1378–1398)

> Processes each cancellation record. Extracts the equipment contract number, deduplicates using ctrlMap, and fetches full equipment details via `getKktkSvcKei`.

| # | Type | Code |
|---|------|------|
| 1 | FOR | `for (CAANMsg msg : rsvMsgLst)` // Iterate over cancellation records |
| 2 | SET | `kktkSvcKeiNo = msg.getString(EKK0341B012CBSMsg1List.KKTK_SVC_KEI_NO)` // Extract equipment contract number |
| 3 | IF | `if (!ctrlMap.containsKey(kktkSvcKeiNo))` // Dedup: skip if already processed |

**Block 6** — [IF-THEN] Fetch equipment details for new contract number (L1389–1397)

> When a new (non-duplicate) equipment contract number is encountered, fetches the full equipment information by calling `getKktkSvcKei` with FUNC_CODE="2" path (null geneAddDtm).

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (data != null)` // Check if equipment data was successfully retrieved |
| 2 | SET | `outMap.put(String.valueOf(mapCnt), data)` // Store in output map at sequential index |
| 3 | SET | `mapCnt++` // Increment counter |
| 4 | SET | `ctrlMap.put(kktkSvcKeiNo, kktkSvcKeiNo)` // Mark as processed for dedup |

**Block 7** — [SET] Build inMsg for Generation query (L1402–1412)

> Constructs the input message array for the second CBS call. Same CBS (EKK0341B012) but with FUNC_CODE = "2" (Generation) to retrieve new reservation records.

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMsg = new Object[][]{...}` // Rebuild for second call |
| 2 | SET | `{EKK0341B012CBSMsg.TEMPLATEID, TEMPLATE_ID_EKK0341B012}` // [-> CONSTANT: "EKK0341B012"] |
| 3 | SET | `{EKK0341B012CBSMsg.FUNC_CODE, "2"}` // FUNC_CODE = "2" = Generation query |
| 4 | SET | `{EKK0341B012CBSMsg.KEY_SVC_KEI_NO, svcKeiNo}` // Primary key: service detail number |

**Block 8** — [CALL] Second CBS invocation: Generation query (L1414–1415)

> Calls CBS EKK0341B012 again to retrieve generation (new reservation) records.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `rsvMsg = callSC(handle, scCall, param, fixedText, inMsg)` // Invokes EKK0341B012 CBS for generation |
| 2 | SET | `rsvMsgLst = rsvMsg.getCAANMsgList(EKK0341B012CBSMsg.EKK0341B012CBSMSG1LIST)` // Extract generation list |

**Block 9** — [IF] Non-null check on generation list (L1418–1450)

> Checks whether any generation records were returned. Guard added via OM-2015-0000519.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (rsvMsgLst != null)` // Null guard for generation result list |

**Block 10** — [FOR] Iterate over generation records (L1421–1449)

> Processes each generation record. Extracts equipment contract number and generation timestamp, applies reservation check, fetches equipment details, and performs duplicate detection.

| # | Type | Code |
|---|------|------|
| 1 | FOR | `for (CAANMsg msg : rsvMsgLst)` // Iterate over generation records |
| 2 | SET | `kktkSvcKeiNo = msg.getString(EKK0341B012CBSMsg1List.KKTK_SVC_KEI_NO)` // Extract equipment contract number |
| 3 | IF | `if (msg.getString(EKK0341B012CBSMsg1List.GENE_ADD_DTM_RSV) == null || "".equals(...))` // Reservation check: skip if no reservation timestamp |
| 4 | EXEC | `continue` // Skip this record |

**Block 11** — [IF-THEN] Reservation check passes: fetch details and dedup (L1433–1448)

> After the reservation check passes, extracts the generation timestamp, calls `getKktkSvcKei` with the timestamp (FUNC_CODE="1" path), and runs duplicate detection via `isRsvKikiInfoAddChk`.

| # | Type | Code |
|---|------|------|
| 1 | SET | `geneAddDtm = msg.getString(EKK0341B012CBSMsg1List.GENE_ADD_DTM_RSV)` // Extract reservation timestamp |
| 2 | CALL | `data = getKktkSvcKei(handle, scCall, param, fixedText, kktkSvcKeiNo, geneAddDtm, null)` // Fetch equipment details with reservation path |
| 3 | IF | `if (data != null && isRsvKikiInfoAddChk(data, outMap))` // Duplicate check: reject if equipment model + serial already exists |
| 4 | SET | `outMap.put(String.valueOf(mapCnt), data)` // Store non-duplicate record |
| 5 | SET | `mapCnt++` // Increment counter |

**Block 12** — [RETURN] Return accumulated data (L1452)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return outMap` // Returns all collected equipment contract data |

**Block 13** — [SUB-METHOD] `getKktkSvcKei` called from Blocks 6 and 11 (L1518–1577)

> Fetches detailed equipment information for a single equipment contract number. Branches based on whether geneAddDtm is null.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (geneAddDtm == null)` // Branch: base query vs reservation query |
| 2 | SET | `inMsg` with FUNC_CODE="2", KEY_GENE_ADD_DTM="", KEY_RSV_APLY_YMD=baseYmd // Base path: query by application date |
| 3 | ELSE | `inMsg` with FUNC_CODE="1", KEY_GENE_ADD_DTM=geneAddDtm, KEY_RSV_APLY_YMD="" // Reservation path: query by generation timestamp |
| 4 | CALL | `curMsg = callSC(handle, scCall, param, fixedText, inMsg)` // Invoke EKK0341A010 CBS |
| 5 | SET | `curMsgLst = curMsg.getCAANMsgList(EKK0341A010CBSMsg.EKK0341A010CBSMSG1LIST)` // Extract equipment list |
| 6 | IF | `if (isKktkSvcKeiStat(curMsgLst[0].getString(KKTK_SVC_KEI_STAT)))` // Status check: reject if status is "910" or "920" |
| 7 | IF | `if (curMsgLst[0].isNull(TAKNKIKI_MODEL_CD))` // Model code null check |
| 8 | SET | `seizoNoUm = "1"` // No model = manufacturing number not applicable |
| 9 | ELSE | `seizoNoUm = getTaknkikiModel(...)` // Lookup model code description |
| 10 | SET | `outMap` with 11 fields: kktk_svc_kei_no, kiki_seizo_no, kiki_chg_no, taknkiki_model_cd, seizoNoUm, kktk_svc_kei_stat, kktk_svc_cd, svc_kei_kaisen_ucwk_no, rsv_aply_cd, gene_add_dtm, kiki_stc_saki_nm, etc. |

**Block 14** — [SUB-METHOD] `isRsvKikiInfoAddChk` called from Block 11 (L1465–1515)

> Performs duplicate detection for generation records. First checks reservation application code, then iterates over existing outMap entries to compare equipment serial numbers and model codes.

| # | Type | Code |
|---|------|------|
| 1 | SET | `rsvAplyCd = data.get("rsv_aply_cd")` // Extract reservation application code |
| 2 | IF | `if (!"1".equals(rsvAplyCd) && !"2".equals(rsvAplyCd))` // Reject if reservation code is not "1" (valid) or "2" (tentative) |
| 3 | FOR | `for (int i = 0; i < outMap.size(); i++)` // Iterate existing records |
| 4 | SET | `mp = outMap.get(String.valueOf(i))` // Get existing record |
| 5 | IF | `if (mp.get("kiki_seizo_no") != null && mp.get("taknkiki_model_cd") != null)` // Compare both serial and model |
| 6 | IF | `if(mp.get("kiki_seizo_no").equals(data.get("kiki_seizo_no")) && mp.get("taknkiki_model_cd").equals(data.get("taknkiki_model_cd")))` // Exact match = duplicate |
| 7 | RETURN | `return false` // Duplicate found, reject |
| 8 | IF | `if (mp.get("kiki_seizo_no") == null && mp.get("taknkiki_model_cd") != null)` // Existing serial is null |
| 9 | IF | `if (data.get("kiki_seizo_no") == null && mp.get("taknkiki_model_cd").equals(data.get("taknkiki_model_cd")))` // Both null serial, matching model = duplicate |
| 10 | RETURN | `return false` // Duplicate found, reject |
| 11 | RETURN | `return true` // No duplicate found, accept |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `svcKeiNo` | Parameter | Service detail number — unique identifier for a service contract line item within K-Opticom's telecom service catalog. |
| `baseYmd` | Parameter | Base year-month-day — reference date (YYYYMMDD format) used for reservation validity checks. |
| `kktkSvcKeiNo` | Field | Equipment provision service contract number — unique identifier for an equipment-specific service contract. |
| `geneAddDtm` | Field | Generation addition date/time — timestamp indicating when a reservation record was generated (created). |
| `KKTK_SVC_KEI_NO` | Field | Equipment provision service contract number — field in CBS message used as primary key. |
| `KKTK_SVC_KEI_STAT` | Field | Equipment provision service contract status — indicates the lifecycle state of the contract. Values "910" (Cancelled) and "920" (Terminated) are filtered out by `isKktkSvcKeiStat`. |
| `KIKI_SEIZO_NO` | Field | Equipment manufacturing (serial) number — unique serial number of the home equipment unit. |
| `TAKNKIKI_MODEL_CD` | Field | Home equipment model code — code identifying the model/type of home equipment. |
| `seizoNoUm` | Field | Manufacturing number existence flag — "1" when model code is not determined; otherwise contains the resolved model description. |
| `KKTK_SVC_CD` | Field | Equipment provision service code — classifies the type of service (e.g., FTTH, Mail, ENUM). |
| `RSV_APLY_CD` | Field | Reservation application code — "1" = valid reservation, "2" = tentative reservation, other values = not reserved. |
| `GENE_ADD_DTM_RSV` | Field | Reservation generation date/time — timestamp of a reserved (not-yet-active) service contract line. |
| `KKTK_SVC_KEI_STAT` | Field | Equipment provision service contract status — lifecycle state of the equipment contract. |
| `kktk_svc_kei_stat` | Field | Equipment provision service contract status — lowercase key used in the output HashMap. |
| `kktk_svc_cd` | Field | Equipment provision service code — lowercase key for the service type code. |
| `kiki_seizo_no` | Field | Equipment manufacturing serial number — lowercase key for the serial number in output HashMap. |
| `taknkiki_model_cd` | Field | Home equipment model code — lowercase key for model code in output HashMap. |
| `kiki_chg_no` | Field | Equipment change number — identifier for an equipment change event. |
| `svc_kei_kaisen_ucwk_no` | Field | Service contract line modification work number — internal tracking ID for service line modification operations. |
| `kiki_stc_saki_nm` | Field | Equipment storage destination name — name of the location where equipment is stored. |
| `kiki_stc_saki_kana` | Field | Equipment storage destination name (katakana) — phonetic representation of the storage location. |
| `kiki_stc_sk_ksh_ad_sai_flg` | Field | Equipment storage address change flag — indicates whether the equipment address has been changed. |
| `FUNC_CODE` | Field | Function code — CBS input parameter. "1" = Cancellation query path; "2" = Generation query path (EKK0341B012). "1" = Reservation query (EKK0341A010); "2" = Base query (EKK0341A010). |
| EKK0341B012 | CBS | Equipment Provision Service Contract List View — CBS that returns equipment service contract records. Used with FUNC_CODE to select cancellation or generation data. |
| EKK0341A010 | CBS | Equipment Information Lookup — CBS that retrieves detailed equipment attributes for a single equipment contract number. |
| callSC | Method | Centralized service component call wrapper — dispatches CBS requests with error handling. |
| getKktkSvcKei | Method | Private helper — fetches detailed equipment data for a single contract number and enriches it with model lookup. |
| isKktkSvcKeiStat | Method | Private helper — returns false for status "910" (Cancelled) and "920" (Terminated), filtering out inactive contracts. |
| isRsvKikiInfoAddChk | Method | Private helper — duplicate detection for generation records by comparing serial numbers and model codes against existing data. |
| TEMPLATE_ID_EKK0341B012 | Constant | Template ID value "EKK0341B012" — used as the template identifier for CBS calls. |
| ctrlMap | Field | Deduplication map — tracks equipment contract numbers already processed in the cancellation loop to avoid duplicate data collection. |
| outMap | Field | Output map — hierarchical structure mapping sequential indices (String values "0", "1", "2"...) to equipment detail maps. |
| v4.01.00 | Version | Version tag for code modifications — replaced EKK0341B025 CBS call with EKK0341B012, added reservation timestamp check, and added rsv_aply_cd field extraction. |
| OM-2015-0000519 | Change ticket | Change ticket for null-check guard on rsvMsgLst and version 4.01.00 reservation timestamp fix. |
| Cancellation (カレント) | Business term | Current / active service contracts — records with FUNC_CODE="1" representing existing equipment contracts that are subject to cancellation. |
| Generation (世代) | Business term | New / reservation service contracts — records with FUNC_CODE="2" representing upcoming equipment contracts that are reserved but not yet active. |
| KK_T_KKTK_SVC_KEI | DB Table | Equipment Provision Service Contract — database table storing equipment service contract records. |
| KK_T_KKTK_SVC_KEI_ISP | DB Table | Equipment Provision Service Contract Line Item — database table storing equipment contract line item details. |
| ZM_M_TAKNKIKI_MODEL_CD | DB Table | Home Equipment Model Master — database table storing home equipment model codes and descriptions. |
