# Business Logic — JKKKikiIchiranKkOpKyUpdCC.setTempSvcKeiData() [206 LOC]

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

## 1. Role

### JKKKikiIchiranKkOpKyUpdCC.setTempSvcKeiData()

This method retrieves and prepares service contract data for display within the same screen context during customer information inquiry/edit operations. Its primary business purpose is to populate `temporaryData` with relevant service contract details (Internet or telephone) based on the current processing service code (`genShoriSvcCd`), enabling subsequent screen rendering with correct contract numbers and service-type-specific data.

The method implements a **routing/dispatch pattern**: it inspects the service code of the primary contract (`genShoriSvcCd`) and swaps the lookup target — if the current contract is Internet (SVC_CD_NET = "01"), it searches for the telephone service contract, and vice versa. This bidirectional routing supports the "same-location multi-service contract" (同一箇所サービス契約情報照会) use case where a customer may have both Internet and telephone services registered under one address, and the screen needs to display the paired service's contract details.

In v12.00.00, the method was extended to handle **work company delivery** (工事会社配送) scenarios — specifically, when delivery is performed by a contracted work company (`haisoWayCd == "2"`), the method searches for associated address change records to identify any pending or confirmed address changes, and retrieves the alternative service contract numbers tied to those address changes. This ensures that during an address change in progress, the screen correctly reflects the service contracts affected by the pending change.

The method also applies **business filtering** in its final loop: it skips service contracts that are in draft (DSL / `CD00037_DSL_ZM = "910"`) or cancelled (`CD00037_CANCEL_ZM = "920"`) status, limits results to Internet/telephone service types only, and for network service contracts, validates that the processing group code (`prcGrpCd`) corresponds to valid broadband types (FTTH Home Type 02, FTTH Metro Type 03, or FTTH Manhattan Type 04) via the `isOtherSvcKeiNetPrcGrpCd` helper.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["setTempSvcKeiData start"])
    A["Retrieve ekk0081a010cbsMsg from temporaryData
by TEMPLATE_ID_EKK0081A010"] --> B["Get genShoriSvcCd from cbsMsg
SVC_CD field"]
    B --> C["Store genShoriSvcCd into temporaryData
as GEN_SHORI_SVC_CD"]
    C --> D{"genShoriSvcCd ==
SVC_CD_NET 01?"}
    D -->|Yes| E["Store cbsMsg as NET_SVC_KEI_NO_HOJI_KEY
Set searchSvcCd = SVC_CD_TEL 02"]
    D -->|No| F{"genShoriSvcCd ==
SVC_CD_TEL 02?"}
    E --> F
    F -->|Yes| G["Store cbsMsg as TEL_SVC_KEI_NO_HOJI_KEY
Set searchSvcCd = SVC_CD_NET 01"]
    F -->|No| H["Set searchSvcCd = empty"]
    G --> I["Fetch ccMsg HashMap from param
dataMapKey"]
    H --> I
    I --> J["Get kjakNo = work case number
Get haisoWayCd = delivery method code"]
    J --> K{"haisoWayCd == 2
AND kjakNo not empty?"}
    K -->|Yes| L["Call EKK2101B002CBS with func 2
search address change detail subtype 06"]
    L --> M{"EKK2101B002 result not null?"}
    M -->|Yes| N["Get adChgNo from result list[0]
ADCHG_NO field"]
    N --> O["Call EKK2101B001CBS with func 1
search address change detail by adChgNo"]
    O --> P{"EKK2101B001 result valid?"}
    P -->|Yes| Q["Loop through each detail record"]
    Q --> R{"ADCHG_DTL_SBT_CD == 08?"}
    R -->|Yes| S["Store CHAF_SKBT_NO as adChgFixYmd
replacement implementation date"]
    R -->|No| T{"ADCHG_DTL_SBT_CD == 01?"}
    S --> Q
    T -->|Yes| U{"svcKeiNo differs from current?"}
    U -->|Yes| V["Add adChgSvcKeiNo to svcKeiNoMap"]
    U -->|No| Q
    V --> Q
    T -->|No| Q
    Q --> W["End loop through details"]
    P -->|No| X["Skip address change lookup"]
    M -->|No| X
    K -->|No| X
    X --> Y["Initialize same-location contract lists"]
    W --> Y
    Y --> Z{"adChgNo not empty
AND adChgFixYmd empty
AND haisoWayCd == 2?"}
    Z -->|Yes| AA["For each svcKeiNo in svcKeiNoMap:
Call execEKK0081A010_2 with svcKeiNo"]
    AA --> AB["Store results in ekk0081b009cbsMsg1list"]
    AB --> AC["Call execEKK0081B009 for same-location contracts"]
    Z -->|No| AC
    AC --> AD{"Result list empty?"}
    AD -->|Yes| AE["Return early"]
    AD -->|No| AF["Loop through each contract record"]
    AE --> END(["setTempSvcKeiData end"])
    AF --> AG{"svcKeiStat in
910 920?"}
    AG -->|Yes| AH["Continue - skip cancelled/draft"]
    AG -->|No| AI{"svcCd in
01 02?"}
    AH --> AF
    AI -->|No| AF
    AI -->|Yes| AJ{"searchSvcCd == 01
network?"}
    AJ -->|Yes| AK{"isOtherSvcKeiNetPrcGrpCd returns true?"}
    AK -->|Yes| AL["Call execEKK0081A010 with svcKeiNo
Store result as NET_SVC_KEI_NO_HOJI_KEY"]
    AK -->|No| AH
    AL --> AF
    AJ -->|No| AM["Call execEKK0081A010 with svcKeiNo
Store result as TEL_SVC_KEI_NO_HOJI_KEY"]
    AM --> AF
    AF --> AE
    AE --> END
```

**Key business constants resolved from source code:**

| Constant | Actual Value | Business Meaning |
|----------|-------------|------------------|
| `SVC_CD_NET` | "01" | Internet service code (Fujitsu Internet) |
| `SVC_CD_TEL` | "02" | Telephone service code |
| `CD00037_DSL_ZM` | "910" | DSL processing-completed status (draft/interim state) |
| `CD00037_CANCEL_ZM` | "920" | Cancellation processing-completed status |
| `FUNC_CODE_1` | "1" | Function code for primary search in address change CBS |
| `FUNC_CODE_2` | "2" | Function code for detail-list search in address change CBS |
| `GEN_SHORI_SVC_CD` | "GEN_SHORI_SVC_CD" | Temporary data key for storing the current processing service code |
| `SEARCH_SVC_CD` | "SEARCH_SVC_CD" | Temporary data key for storing the search target service code |
| `NET_SVC_KEI_NO_HOJI_KEY` | "NET_SVC_KEI_NO_HOJI_KEY" | Key for storing Internet service contract number in temporary data |
| `TEL_SVC_KEI_NO_HOJI_KEY` | "TEL_SVC_KEI_NO_HOJI_KEY" | Key for storing telephone service contract number in temporary data |
| `TEMPLATE_ID_EKK0081A010` | "EKK0081A010" | Template ID for service contract detail inquiry |
| `TEMPLATE_ID_EKK2101B001` | "EKK2101B001" | Template ID for address change detail search (key-based) |
| `TEMPLATE_ID_EKK2101B002` | "EKK2101B002" | Template ID for address change detail list search |

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | Database session handle used to execute CBS (Common Business Service) calls. Carries the transaction context, connection pool reference, and user session metadata for all data retrieval operations performed within this method. |
| 2 | `scCall` | `ServiceComponentRequestInvoker` | Service Component request invoker that dispatches CBS calls (e.g., EKK0081B009, EKK2101B002, EKK2101B001). Responsible for routing service requests to the appropriate CBS handler and returning response messages. |
| 3 | `param` | `IRequestParameterReadWrite` | Parameter read/write interface that provides access to screen input data and the `dataMapKey`-mapped HashMap containing work case details (工事案件詳細). Used to retrieve `kjakNo` (work case number) and `haisoWayCd` (delivery method code). |
| 4 | `dataMapKey` | `String` | The map key used within `param` to retrieve the `ccMsg` HashMap. This key identifies the data map containing the work case delivery context, including the work case number (`kjakNo`) and delivery method code (`haisoWayCd`). |
| 5 | `temporaryData` | `HashMap<String, Object>` | Shared transient data store passed across method calls within the same screen operation. Used to: (a) retrieve the primary service contract CBS message (`EKK0081A010`), (b) store the current processing service code (`GEN_SHORI_SVC_CD`), (c) store the search target service code (`SEARCH_SVC_CD`), (d) store net/telephone service contract CBS messages (`NET_SVC_KEI_NO_HOJI_KEY`, `TEL_SVC_KEI_NO_HOJI_KEY`), and (e) store resolved service contract numbers for each service type. |

**Instance fields read by this method:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `GEN_SHORI_SVC_CD` | `String` | Constant key for storing the current processing service code in temporaryData. |
| `SEARCH_SVC_CD` | `String` | Constant key for storing the search target service code. |
| `NET_SVC_KEI_NO_HOJI_KEY` | `String` | Constant key for storing Internet service contract CBS data. |
| `TEL_SVC_KEI_NO_HOJI_KEY` | `String` | Constant key for storing telephone service contract CBS data. |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `callSC` (EKK2101B002CBS) | EKK2101B002CBS | Address change detail list (`adchg_dtl_sbt_cd = "06"`) | Calls `callSC` with EKK2101B002 to retrieve the list of address change detail records associated with a work case number (keyed by `kojiak_no`). Used in work company delivery scenario to find pending address changes. |
| R | `callSC` (EKK2101B001CBS) | EKK2101B001CBS | Address change detail (`adchg_no`) | Calls `callSC` with EKK2101B001 to retrieve address change detail records by address change number (`adChgNo`). Used to determine the replacement implementation date (`chaf_skbt_no`) and any alternate service contract numbers (`chaf_skbt_no` with `adchg_dtl_sbt_cd = "01"`). |
| C/R | `execEKK0081A010_2` | EKK0081A010SC | Service contract detail table | For each alternate service contract number found during address change lookup, invokes `execEKK0081A010_2` to retrieve the full service contract data. Results are stored in the same-location contract list. |
| R | `execEKK0081B009` | EKK0081B009SC | Same-location service contract table | Calls the same-location multi-service contract inquiry CBS to retrieve all service contracts registered under the same address. This is the default path when not in a work company delivery address-change scenario. |
| R | `execEKK0081A010` | EKK0081A010SC | Service contract detail table | Called for each qualifying service contract record from `execEKK0081B009`. Retrieves detailed service contract information and stores the result in `temporaryData` under the appropriate net or telephone key. |
| R | `isOtherSvcKeiNetPrcGrpCd` | Internal CC | N/A | Internal helper method that validates whether the processing group code corresponds to a valid broadband type (FTTH Home Type 02, FTTH Metro Type 03, or FTTH Manhattan Type 04). Used to filter network service contract results. |
| R | `getNullToStr` | Internal CC | N/A | Utility method that safely converts any object (including null and CAANMsg fields) to a non-null String, preventing NullPointerExceptions throughout the method. |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | `JKKKikiIchiranKkOpKyUpdCC.execKikiOptKeiCreUpd` | `execKikiOptKeiCreUpd` → `setTempSvcKeiData` | `execEKK0081A010 [R] service contract`, `execEKK0081B009 [R] same-location service contract`, `isOtherSvcKeiNetPrcGrpCd [R] prc_grp_cd filter` |

**Notes:**
- `execKikiOptKeiCreUpd` is the sole direct caller identified. It is part of the same `JKKKikiIchiranKkOpKyUpdCC` class and handles customer information inquiry screen operations for creating/editing service options.
- This method does not appear to be directly invoked by any screen entry point (KKSV*) within 8 hops; it operates as an internal helper within the CBS/CC layer.
- Terminal operations from this method resolve to read-only CBS calls: service contract detail retrieval (`EKK0081A010`), same-location contract inquiry (`EKK0081B009`), and address change detail searches (`EKK2101B002`, `EKK2101B001`). No create/update/delete operations are performed.

## 6. Per-Branch Detail Blocks

**Block 1** — [ASSIGN] Retrieve primary service contract CBS message (L4739)

> Obtains the primary service contract data (`EKK0081A010`) from the shared `temporaryData` map. This data was previously populated by an upstream method and represents the service contract being displayed/edited on the screen.

| # | Type | Code |
|---|------|------|
| 1 | SET | `ekk0081a010cbsMsg = (CAANMsg)temporaryData.get(TEMPLATE_ID_EKK0081A010)` // Retrieve primary service contract message from temporary data |
| 2 | SET | `genShoriSvcCd = getNullToStr(ekk0081a010cbsMsg.getString(EKK0081A010CBSMsg1List.SVC_CD))` // Get the service code of the primary contract (e.g., "01" for Internet, "02" for telephone) |
| 3 | EXEC | `temporaryData.put(GEN_SHORI_SVC_CD, genShoriSvcCd)` // Store genShoriSvcCd as "GEN_SHORI_SVC_CD" for downstream consumers [-> GEN_SHORI_SVC_CD="GEN_SHORI_SVC_CD"] |

**Block 2** — [IF/ELSE-IF] Route search target by service type (L4747–L4771)

> Determines the **search target service code** (`searchSvcCd`) based on the primary contract's service code. Implements bidirectional routing: if the primary contract is Internet ("01"), it searches for the telephone contract ("02"), and vice versa. This supports the same-location multi-service use case.

| # | Type | Code |
|---|------|------|
| 1 | SET | `searchSvcCd = ""` // Initialize search target service code |
| 2 | IF | `SVC_CD_NET.equals(genShoriSvcCd)` [SVC_CD_NET="01"] — primary contract is Internet |
|   | 2.1 | EXEC | `temporaryData.put(NET_SVC_KEI_NO_HOJI_KEY, ekk0081a010cbsMsg)` // Store primary Internet contract CBS message [-> NET_SVC_KEI_NO_HOJI_KEY="NET_SVC_KEI_NO_HOJI_KEY"] |
|   | 2.2 | SET | `searchSvcCd = SVC_CD_TEL` [-> SVC_CD_TEL="02"] // Search for the telephone contract |
|   | 2.3 | EXEC | `temporaryData.put(SEARCH_SVC_CD, searchSvcCd)` // Store search target for downstream [-> SEARCH_SVC_CD="SEARCH_SVC_CD"] |
| 3 | ELSE-IF | `SVC_CD_TEL.equals(genShoriSvcCd)` [SVC_CD_TEL="02"] — primary contract is telephone |
|   | 3.1 | EXEC | `temporaryData.put(TEL_SVC_KEI_NO_HOJI_KEY, ekk0081a010cbsMsg)` // Store primary telephone contract CBS message [-> TEL_SVC_KEI_NO_HOJI_KEY="TEL_SVC_KEI_NO_HOJI_KEY"] |
|   | 3.2 | SET | `searchSvcCd = SVC_CD_NET` [-> SVC_CD_NET="01"] // Search for the Internet contract |
|   | 3.3 | EXEC | `temporaryData.put(SEARCH_SVC_CD, searchSvcCd)` // Store search target for downstream [-> SEARCH_SVC_CD="SEARCH_SVC_CD"] |

**Block 3** — [IF/ELSE-IF] Work company delivery address change lookup (L4773–L4862)

> In v12.00.00, this block was added to handle **work company delivery** (工事会社配送) scenarios. When the delivery method code is "2" (work company delivery) and a work case number exists, the method searches for address change records to identify pending or confirmed address changes and any alternate service contracts tied to those changes.

| # | Type | Code |
|---|------|------|
| 1 | SET | `ccMsg = (HashMap<String, Object>)param.getData(dataMapKey)` // Retrieve the work case data map |
| 2 | SET | `kjakNo = getNullToStr((String)ccMsg.get("kojiak_no"))` // Work case number (工事案件番号) |
| 3 | SET | `haisoWayCd = getNullToStr((String)ccMsg.get("haiso_way_cd"))` // Delivery method code (配送方法区分) |
| 4 | SET | `adChgNo = ""` // Address change number (住所変更番号) — initialized empty |
| 5 | SET | `adChgFixYmd = ""` // Replacement implementation date (切替実施日) — initialized empty |
| 6 | SET | `svcKeiNoMap = new HashMap<String, String>()` // Map for alternate service contract numbers found during address change lookup |
| 7 | IF | `haisoWayCd == "2" AND kjakNo not empty` — work company delivery mode |
|   | 7.1 | SET | `ekk2101b002IN` = `{{TEMPLATEID, "EKK2101B002"}, {FUNC_CODE, "2"}, {KEY_ADCHG_DTL_SBT_CD, "06"}, {KEY_CHAF_SKBT_NO, kjakNo}}` // Prepare CBS input for address change detail list search [-> FUNC_CODE_2="2"] |
|   | 7.2 | CALL | `ekk2101b002cbsMsg = callSC(handle, scCall, param, dataMapKey, ekk2101b002IN)` // Search address change detail list by work case number |
|   | 7.3 | IF | `ekk2101b002cbsMsg != null` — address change record found |
|   |   | 7.3.1 | SET | `ekk2101b002cbsMsg1list = ekk2101b002cbsMsg.getCAANMsgList(EKK2101B002CBSMsg.EKK2101B002CBSMSG1LIST)` // Get the address change detail list |
|   |   | 7.3.2 | IF | `ekk2101b002cbsMsg1list != null AND length > 0` — at least one detail record |
|   |   |   | 7.3.2.1 | SET | `adChgNo = getNullToStr(ekk2101b002cbsMsg1list[0].getString(EKK2101B002CBSMsg1List.ADCHG_NO))` // Get address change number from first record |
|   |   |   | 7.3.2.2 | SET | `ekk2101b001IN` = `{{TEMPLATEID, "EKK2101B001"}, {FUNC_CODE, "1"}, {KEY_ADCHG_NO, adChgNo}}` // Prepare CBS input for detailed address change search [-> FUNC_CODE_1="1"] |
|   |   |   | 7.3.2.3 | CALL | `ekk2101b001cbsMsg = callSC(handle, scCall, param, dataMapKey, ekk2101b001IN)` // Search address change detail by address change number |
|   |   |   | 7.3.2.4 | IF | `ekk2101b001cbsMsg != null AND result list not empty` — address change detail found |
|   |   |   |   | 7.3.2.4.1 | SET | `ekk2101b001cbsMsg1List = ekk2101b001cbsMsg.getCAANMsgList(EKK2101B001CBSMsg.EKK2101B001CBSMSG1LIST)` // Get the detail list |
|   |   |   |   | 7.3.2.4.2 | FOR | `for i = 0 to ekk2101b001cbsMsg1List.length - 1` — iterate through detail records |
|   |   |   |   |   | 7.3.2.4.2.1 | IF | `getNullToStr(...getString(EKK2101B001CBSMsg1List.ADCHG_DTL_SBT_CD)) == "08"` — replacement implementation date subtype |
|   |   |   |   |   |   | 7.3.2.4.2.1.1 | SET | `adChgFixYmd = getNullToStr(ekk2101b001cbsMsg1List[i].getString(EKK2101B001CBSMsg1List.CHAF_SKBT_NO))` // Store the implementation date — if this is set, address change is confirmed |
|   |   |   |   |   | 7.3.2.4.2.2 | ELSE-IF | `== "01"` — service contract number subtype |
|   |   |   |   |   |   | 7.3.2.4.2.2.1 | IF | `getNullToStr(ccMsg.get("svc_kei_no")) != getNullToStr(...getString(EKK2101B001CBSMsg1List.CHAF_SKBT_NO))` — alternate service contract number differs from current |
|   |   |   |   |   |   |   | 7.3.2.4.2.2.1.1 | SET | `adChgSvcKeiNo = getNullToStr(...getString(EKK2101B001CBSMsg1List.CHAF_SKBT_NO))` // Extract the alternate service contract number |
|   |   |   |   |   |   |   | 7.3.2.4.2.2.1.2 | IF | `adChgSvcKeiNo not empty` — valid alternate number exists |
|   |   |   |   |   |   |   |   | 7.3.2.4.2.2.1.2.1 | EXEC | `svcKeiNoMap.put(adChgSvcKeiNo, adChgSvcKeiNo)` // Add to map for later retrieval |
|   |   |   |   | END | — end for loop |
|   |   |   | END | — end if (EKK2101B001 valid) |
|   |   | END | — end if (EKK2101B002 list valid) |
|   | END | — end if (EKK2101B002 not null) |
| 8 | ELSE | — work company delivery not active or no work case number; skip address change lookup |

**Block 4** — [ASSIGN/IF] Prepare same-location service contract list (L4864–L4896)

> Determines how to populate the same-location service contract list. In the work company delivery scenario where an address change is in progress (`adChgNo` not empty but `adChgFixYmd` is empty, meaning the change is pending), it retrieves contract data for each alternate service number found during address change lookup. Otherwise, it calls the standard `execEKK0081B009` to retrieve all same-location contracts.

| # | Type | Code |
|---|------|------|
| 1 | SET | `ekk0081b009cbsMsg1list = null` // Initialize same-location contract list |
| 2 | SET | `ekk0081a010cbsMsg1list = null` // Initialize temporary list for alternate service lookups |
| 3 | IF | `adChgNo not empty AND adChgFixYmd empty AND haisoWayCd == "2"` — work company delivery with pending address change |
|   | 3.1 | SET | `size = svcKeiNoMap.size()` // Count of alternate service contract numbers found |
|   | 3.2 | SET | `ekk0081b009cbsMsg1list = new CAANMsg[size]` // Allocate result array |
|   | 3.3 | SET | `roopCount = 0` // Iterator index |
|   | 3.4 | FOR | `for (ent : svcKeiNoMap.entrySet())` — iterate alternate service contract numbers |
|   |   | 3.4.1 | SET | `svcKeiNo = svcKeiNoMap.get(ent.getKey())` // Get service contract number |
|   |   | 3.4.2 | SET | `ekk0081a010cbsMsg1list = execEKK0081A010_2(handle, scCall, param, dataMapKey, svcKeiNo)` // Retrieve full service contract data for this alternate number |
|   |   | 3.4.3 | IF | `ekk0081a010cbsMsg1list != null AND length > 0` — contract found |
|   |   |   | 3.4.3.1 | SET | `ekk0081b009cbsMsg1list[roopCount] = ekk0081a010cbsMsg1list[0]` // Store in result list |
|   |   |   | 3.4.3.2 | SET | `roopCount++` // Advance index |
|   | 3.5 | ELSE | — standard path: call `execEKK0081B009(handle, scCall, param, dataMapKey)` for same-location contract inquiry [v12.00.00 addition] |

**Block 5** — [IF] Early return if no contracts found (L4898–L4900)

> If no same-location service contracts were retrieved (neither from alternate lookup nor from `execEKK0081B009`), the method returns early. There is no data to display or process.

| # | Type | Code |
|---|------|------|
| 1 | IF | `ekk0081b009cbsMsg1list == null OR length == 0` — no contracts found |
|   | 1.1 | RETURN | `return;` — exit method |

**Block 6** — [FOR] Process each same-location service contract record (L4901–L4936)

> Iterates through all same-location service contracts and applies business filtering rules. This is the core processing loop that populates `temporaryData` with filtered service contract details. Four data fields are extracted from each record: service contract status (`svcKeiStat`), processing group code (`prcGrpCd`), service contract number (`svcKeiNo`), and service code (`svcCd`).

| # | Type | Code |
|---|------|------|
| 1 | SET | `ekk0081b009cbsMsg = null` // Current contract message |
| 2 | SET | `svcKeiStat = ""` // Service contract status |
| 3 | SET | `svcCd = ""` // Service code |
| 4 | SET | `prcGrpCd = ""` // Processing group code |
| 5 | SET | `svcKeiNo = ""` // Service contract number |
| 6 | FOR | `for i = 0 to ekk0081b009cbsMsg1list.length - 1` |
|   | 6.1 | SET | `ekk0081b009cbsMsg = ekk0081b009cbsMsg1list[i]` // Current record |
|   | 6.2 | SET | `svcKeiStat = getNullToStr(ekk0081b009cbsMsg.getString(EKK0081B009CBSMsg1List.SVC_KEI_STAT))` // Service contract status |
|   | 6.3 | SET | `prcGrpCd = getNullToStr(ekk0081b009cbsMsg.getString(EKK0081B009CBSMsg1List.PRC_GRP_CD))` // Processing group code |
|   | 6.4 | SET | `svcKeiNo = getNullToStr(ekk0081b009cbsMsg.getString(EKK0081B009CBSMsg1List.SVC_KEI_NO))` // Service contract number |
|   | 6.5 | SET | `svcCd = getNullToStr(ekk0081b009cbsMsg.getString(EKK0081B009CBSMsg1List.SVC_CD))` // Service code |
|   | 6.6 | IF | `svcKeiStat == CD00037_DSL_ZM ("910") OR svcKeiStat == CD00037_CANCEL_ZM ("920")` — draft or cancelled status |
|   |   | 6.6.1 | EXEC | `continue` — skip this record, do not process draft/cancelled contracts |
|   | 6.7 | IF | `!SVC_CD_NET.equals(svcCd) AND !SVC_CD_TEL.equals(svcCd)` [! "01" AND ! "02"] — not Internet or telephone |
|   |   | 6.7.1 | EXEC | `continue` — skip non-network/telephone services; this method only handles Internet and telephone service contracts |
|   | 6.8 | IF | `SVC_CD_NET.equals(searchSvcCd)` [== "01"] — searching for Internet service |
|   |   | 6.8.1 | IF | `!isOtherSvcKeiNetPrcGrpCd(prcGrpCd)` — processing group is NOT a valid broadband type |
|   |   |   | 6.8.1.1 | EXEC | `continue` — skip this contract; the network service must be FTTH Home Type 02, FTTH Metro Type 03, or FTTH Manhattan Type 04 |
|   |   | 6.8.2 | EXEC | `temporaryData.put(NET_SVC_KEI_NO_HOJI_KEY, execEKK0081A010(handle, scCall, param, dataMapKey, svcKeiNo))` // Retrieve and store Internet service contract detail [-> NET_SVC_KEI_NO_HOJI_KEY="NET_SVC_KEI_NO_HOJI_KEY"] |
|   | 6.9 | ELSE-IF | `SVC_CD_TEL.equals(searchSvcCd)` [== "02"] — searching for telephone service |
|   |   | 6.9.1 | EXEC | `temporaryData.put(TEL_SVC_KEI_NO_HOJI_KEY, execEKK0081A010(handle, scCall, param, dataMapKey, svcKeiNo))` // Retrieve and store telephone service contract detail [-> TEL_SVC_KEI_NO_HOJI_KEY="TEL_SVC_KEI_NO_HOJI_KEY"] |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `genShoriSvcCd` | Field | Current processing service code — the service type of the contract currently being displayed/edited on the screen ("01" = Internet, "02" = telephone) |
| `searchSvcCd` | Field | Search target service code — the service type of the **paired** contract to retrieve (swaps from the primary to show the other service at the same address) |
| `svc_kei_stat` | Field | Service contract status — lifecycle status of a service contract (e.g., "910" = DSL interim/draft, "920" = cancellation interim) |
| `prc_grp_cd` | Field | Processing group code — classifies the broadband service type within network services (e.g., "02" = FTTH Home Type, "03" = FTTH Metro Type, "04" = FTTH Manhattan Type) |
| `svc_kei_no` | Field | Service contract number — unique identifier for a service contract line item |
| `svc_cd` | Field | Service code — classifies the service type ("01" = Internet, "02" = telephone) |
| `kjak_no` | Field | Work case number (工事案件番号) — identifies a work project/case initiated by a contracted work company for service installation or changes |
| `haiso_way_cd` | Field | Delivery method code (配送方法区分) — indicates how service activation is delivered ("2" = work company delivery, performed by a contracted installation company rather than self-setup) |
| `ad_chg_no` | Field | Address change number (住所変更番号) — identifier for a pending address change request |
| `ad_chg_fix_ymd` | Field | Replacement implementation date (切替実施日) — the scheduled or actual date when the address change takes effect; empty means the change is still pending |
| `adchg_dtl_sbt_cd` | Field | Address change detail subtype code (住所変更明細サブタイプコード) — classifies the type of address change detail ("01" = service contract number, "06" = work case key, "08" = replacement implementation date) |
| `chaf_skbt_no` | Field | Replacement execution number (切替実行番号) — in the address change context, this field holds either the implementation date (for subtype "08") or an alternate service contract number (for subtype "01") |
| SVC_CD_NET | Constant | Service code "01" — Internet service (Fujitsu Hikari / インターネットサービス) |
| SVC_CD_TEL | Constant | Service code "02" — Telephone service (Fujitsu Flets Phone / 電話サービス) |
| CD00037_DSL_ZM | Constant | Status code "910" — DSL processing-completed (DSL処理済み); indicates a draft or interim DSL state where the service is provisioned but not yet fully activated |
| CD00037_CANCEL_ZM | Constant | Status code "920" — Cancellation processing-completed (取消処理済み); indicates a service contract that has been cancelled but the cancellation is still being processed |
| EKK0081A010 | CBS | Service contract detail inquiry — retrieves detailed information for a specific service contract by its service contract number |
| EKK0081B009 | CBS | Same-location multi-service contract inquiry — retrieves all service contracts registered under the same address for a given customer |
| EKK2101B001 | CBS | Address change detail search (key-based) — searches address change detail records by address change number |
| EKK2101B002 | CBS | Address change detail list search — searches address change detail records by work case number and detail subtype |
| FTTH | Business term | Fiber To The Home — fiber-optic broadband internet service offered by NTT Fujitsu |
| Work company delivery | Business term | 工事会社配送 — a delivery/activation method where a contracted work company performs the service installation rather than the customer self-installing; used for services requiring professional setup |
| Same-location multi-service | Business concept | 同一箇所サービス契約情報照会 — the capability to view all service contracts (Internet, telephone, etc.) registered under a single address, supporting cross-service operations |
| Temporary data | Technical term | `temporaryData` — a shared `HashMap<String, Object>` used to pass transient data between methods within a single screen operation, avoiding repeated database queries |
