# Business Logic — KKW04202SFLogic.setKKSV0098() [3987 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKW04202SF.KKW04202SFLogic` |
| Layer | Web / Business Logic (Controller-adjacent Service Logic) |
| Module | `KKW04202SF` (Package: `eo.web.webview.KKW04202SF`) |

## 1. Role

### KKW04202SFLogic.setKKSV0098()

The `setKKSV0098` method is the **upper-mapping (上りマッピング) method for the Address Change Registration Confirmation screen (KKSV0098)**. Its business purpose is to **transform raw screen data submitted by a call center operator (via `X31SDataBeanAccess[]` beans) into a structured `parentMap` of business-ready data objects** that will be passed downstream to the address change registration processing logic. This is a data aggregation and normalization step — it does not execute any database or external service operations itself; instead it collects, validates, and maps over **200+ screen fields** spanning multiple sub-sections.

The method handles the following **service types and categories**: (1) **eo Hikari NET** (fiber internet service), (2) **eo Hikari Telephone** (landline voice service), (3) **eo Hikari TV** (digital television service), (4) **Equipment/Install Services** (rented STB set-top boxes, PLC modems, VA routers, BBR devices), (5) **Option Services** (add-on subscriptions for each service line), (6) **Removal Work** (teardown/拆除工事 of existing equipment at the old address), (7) **Cable/Delivery Address Change** (billing statement address modification for same-tenant buildings), (8) **Telephony Number Changes** (number portability, same-number transfer/同番移転, BMP/番号ポータビリティ), (9) **Construction Work Orders** (new installation and removal work scheduling), (10) **Emergency Notification Contract** (emergency call routing to designated addresses).

The method implements a **Builder + Aggregation pattern**: it creates multiple intermediate HashMaps (`tppv_map`, `rykk_tppv_map`, `op_tppv_map`, `stb_tppv_map`, `va_tppv_map`, `tln_tppv_map`, `shs_tppv_map`, `adchg_map`) — each representing a logical sub-entity in the address change registration — and populates them by iterating over nested `X31SDataBeanAccessArray` structures extracted from the screen bean. A **delegation pattern** is used for checkbox values (`getCheckBoxValue`, `getCheckBoxBoolean`) and pulldown selections (`getPdnSelectedCd`, `getConvert_KojiScopeCd`).

It is called **within `KKW04202SFLogic` itself** (private method) as part of a larger screen processing flow, serving as the **central data gathering and transformation hub** for the KKSV0098 (Address Change Registration Confirmation) screen. All extracted data is placed into `outputMap` under key `KKSV009800CC` for downstream consumption by the confirmation and registration CBS layer.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["setKKSV0098(bean, outputMap)"])
    START --> VALIDATE["Validate bean != null and bean.length == 1"]
    VALIDATE --> FAIL{"bean valid?"}
    FAIL -->|No| RETURN_NULL["return null"]
    FAIL -->|Yes| INIT["Create parentMap"]
    INIT --> FUNC_CD["Map func_cd (1=Check+Register, 2=Check only)"]
    FUNC_CD --> BASIC_INFO["Map basic info: sysid, ido_div, chg_rsv_ymd, ope_date, mskm_sbt_cd"]
    BASIC_INFO --> MANSION_INFO["Map mansion mapping info"]
    MANSION_INFO --> DTL_LIST["Map mskm_dtl_list (submission details)"]
    DTL_LIST --> SVC_TERMINATION["Map service termination dates (net, tel, tv)"]
    SVC_TERMINATION --> CONTACT_INFO["Map contact info: phone, email, appointment"]
    CONTACT_INFO --> MOVED_ADDR["Map moved-to address fields"]
    MOVED_ADDR --> MANSHION_TYPE["Map mskmsho_sbt_cd from mansion type"]
    MANSHION_TYPE --> TPPV_MAP["Create tppv_map (address change temp save main)"]
    TPPV_MAP --> TPPV_INFO["Map tppv fields: switching way, services, IDO reason, etc."]
    TPPV_INFO --> TPPV_MOVED_ADDR["Map tppv moved-to address"]
    TPPV_MOVED_ADDR --> TPPV_EOH_NET["Map tppv eo net service fields"]
    TPPV_EOH_NET --> TPPV_EOH_TEL["Map tppv eo telephone service fields"]
    TPPV_EOH_TEL --> TPPV_EOH_TV["Map tppv eo tv service fields"]
    TPPV_EOH_TV --> RYKK_MAP["Create rykk_tppv_map_list (equipment temp save)"]
    RYKK_MAP --> RYKK_INFO["Map rykk fields per equipment item"]
    RYKK_INFO --> OP_MAP["Create op_tppv_map_list (option temp save)"]
    OP_MAP --> OP_NET["Map eo net option temp save"]
    OP_NET --> OP_TEL["Map eo telephone option temp save"]
    OP_TEL --> OP_TV["Map eo tv option temp save"]
    OP_TV --> STB_MAP["Create stb_tppv_map_list (STB temp save)"]
    STB_MAP --> STB_INFO["Map STB fields: ID, maker, course, B-CAS, CCAS, HDD"]
    STB_INFO --> STB_KOKAN["Create stb_tppv_kokan_sk_map_list (STB exchange)"]
    STB_KOKAN --> STB_KOKAN_INFO["Map STB exchange fields (taknkiki_ido_cd=99)"]
    STB_KOKAN_INFO --> VA_MAP["Create va_tppv_map (VA temp save)"]
    VA_MAP --> VA_INFO["Map VA fields: model, serial, port count"]
    VA_INFO --> TLN_MAP["Create tln_tppv_map_list (telephone temp save)"]
    TLN_MAP --> TLN_INFO["Map telephone fields: DSL, BMP, port, dobaniten, emergency, toki"]
    TLN_INFO --> SHS_MAP["Create shs_tppv_map_list (delivery address temp save)"]
    SHS_MAP --> SHS_SKS["Map SHS SKS type (cable delivery)"]
    SHS_SKS --> SHS_GUIDE["Map SHS guide type"]
    SHS_GUIDE --> ADCHG_MAP["Create adchg_map (address change main info)"]
    ADCHG_MAP --> ADCHG_INFO["Map adchg fields: adchg_no, status, switch way, etc."]
    ADCHG_INFO --> ADCHG_DTL_SVC["Create adchg_dtl_map_svc_kei list (service contract details)"]
    ADCHG_DTL_SVC --> ADCHG_DTL_NET["Add net service detail"]
    ADCHG_DTL_NET --> ADCHG_DTL_TEL["Add tel service detail"]
    ADCHG_DTL_TEL --> ADCHG_DTL_TV["Add tv service detail"]
    ADCHG_DTL_TV --> ADCHG_DTL_UCWK["Create adchg_dtl_list_svc_kei_ucwk (contract details)"]
    ADCHG_DTL_UCWK --> ADCHG_NET_UCWK["Map net contract details before/after"]
    ADCHG_NET_UCWK --> ADCHG_TEL_UCWK["Map telephone contract details before/after"]
    ADCHG_TEL_UCWK --> ADCHG_TV_UCWK["Map TV contract details before/after"]
    ADCHG_TV_UCWK --> ADCHG_DTL_KIKI["Create adchg_dtl_list_kktk_svc_kei (equipment service details)"]
    ADCHG_DTL_KIKI --> ADCHG_KIKI_LOOP["Loop equipment items: service no, before/after no"]
    ADCHG_KIKI_LOOP --> ADCHG_STB_DTL["Loop STB items: STB/B-CAS/CCAS details"]
    ADCHG_STB_DTL --> ADCHG_DTL_OP["Create adchg_dtl_list_op_svc_kei (option contract details)"]
    ADCHG_DTL_OP --> ADCHG_OP_NET["Map net option details"]
    ADCHG_OP_NET --> ADCHG_OP_TEL["Map tel option details"]
    ADCHG_OP_TEL --> ADCHG_OP_TV["Map tv option details"]
    ADCHG_OP_TV --> ADCHG_DTL_SEI["Create adchg_dtl_map_sei_kei (billing contract detail)"]
    ADCHG_DTL_SEI --> ADCHG_DTL_KOJI["Create adchg_dtl_list_kojiak (construction order details)"]
    ADCHG_DTL_KOJI --> ADCHG_KOJI_NET["Add net/tel construction order detail"]
    ADCHG_KOJI_NET --> ADCHG_KOJI_TV["Add tv construction order detail"]
    ADCHG_KOJI_TV --> FINAL_FIELDS["Map final parent fields: ksh_ad_flg, tens_nm, coords, coordinates"]
    FINAL_FIELDS --> SVC_GRP["Create svc_kei_grp_list (service group list)"]
    SVC_GRP --> KOJI_SCOPE["Map koji_scope_cd via getConvert_KojiScopeCd"]
    KOJI_SCOPE --> FINAL_MAP["Map final fields: tel_rrk, koui, kepco, ad_chg_fix_dtm"]
    FINAL_MAP --> PUT_OUTPUT["Put KKSV009800CC into outputMap"]
    PUT_OUTPUT --> END(["return outputMap"])
    RETURN_NULL --> END

    style START fill:#e1f5e1
    style END fill:#e1f5e1
    style RETURN_NULL fill:#f5e1e1
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `bean` | `X31SDataBeanAccess[]` | Array of screen item data beans carrying all form field values from the KKSV0098 address change registration confirmation screen. `bean[0]` is the main bean containing all top-level and nested data (addresses, service contracts, equipment, options, etc.). |
| 2 | `outputMap` | `HashMap<String, Object>` | Output mapping storage where the method places its result under the key `"KKSV009800CC"`. Downstream CBS layers read this map to perform the actual registration. |

**Instance fields / external state read by the method:**

| Field | Description |
|-------|-------------|
| `isKojiMansion4Itenm` | Flag indicating whether the construction work involves a mansion at the moved-to address (used in `getConvert_KojiScopeCd`) |

## 4. CRUD Operations / Called Services

This method performs **pure data mapping/aggregation**. It reads from the screen `X31SDataBeanAccess` beans (which themselves may pull from cached/DB data populated by earlier screen processing) but does **not** directly invoke any SC/CBS layer methods or perform any database CRUD operations. The method is a **Read-only data transformer**.

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `JCCWebCommon.getOpeDate(this, null)` | - | - | Reads the current operational date |
| R | `JCCWebCommon.getOpeDateTimeStamp(this, null)` | - | - | Reads the current operational date-time stamp |
| R | `bean[0].sendMessageString(...)` | - | - | Reads screen form field values |
| R | `bean[0].sendMessage(...)` | - | - | Reads screen form field counts |
| R | `bean[0].getDataBeanArray(...)` | - | - | Reads nested bean sub-lists (equipment, options, STB, etc.) |
| R | `KKW04202SFLogic.getCheckBoxValue(...)` | - | - | Local method: reads checkbox state from bean |
| R | `KKW04202SFLogic.getCheckBoxBoolean(...)` | - | - | Local method: reads checkbox as boolean |
| R | `KKW04202SFLogic.getPdnSelectedCd(...)` | - | - | Local method: reads pulldown selection code |
| R | `KKW04202SFLogic.getConvert_KojiScopeCd(bean, kojifuyoflg)` | - | - | Local method: converts construction scope code |

**Note:** This method is entirely a **data mapping/transform** step. It does not call any external SC (Service Component) or CBS (Business Service) methods. All service-related logic is deferred to downstream methods that consume the `KKSV009800CC` map placed in `outputMap`.

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:KKW04202SFLogic | `KKW04202SFLogic` (private method, called within the same class) -> `setKKSV0098` | N/A (pure data mapping, no terminal CRUD) |

The method is `private` and is called internally within `KKW04202SFLogic` as part of the address change registration processing flow for the KKSV0098 screen. It is the **upper-mapping** step — it maps incoming screen data into a format suitable for the **lower-mapping** (`getKKSV0098`) and subsequent CBS registration methods.

## 6. Per-Branch Detail Blocks

### Block 1 — IF (Input validation) (L10775)

Validates the input `bean` array. If null or length != 1, returns null early.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | CHECK | `bean == null || bean.length != 1` | Validate input array has exactly one element |
| 2 | RETURN | `return null` | Early exit on invalid input |
| 3 | EXEC | `HashMap parentMap = new HashMap<>()` | Initialize output container |

### Block 2 — IF/ELSE (Function code determination) (L10786)

Determines whether the operation is "Check+Register" or "Check only" based on the screen's operation pattern.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | CHECK | `"2".equals(bean[0].sendMessageString(CTRL_AD_CHG_ADD_PTN, DATABEAN_GET_VALUE))` | [CTRL_AD_CHG_ADD_PTN] Check operation pattern |
| 2 | SET | `parentMap.put("func_cd", "1")` | func_cd = "1" = Check + Register (full operation) [-> func_cd="1"] |
| 3 | SET | `parentMap.put("func_cd", "2")` | func_cd = "2" = Check only |

### Block 3 — Sequential SET (Basic info mapping) (L10795–10808)

Maps common/identification fields to the parent map.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `parentMap.put("sysid", bean[0].sendMessageString(CMN_SYSID, ...))` | System ID from screen |
| 2 | SET | `parentMap.put("ido_div", bean[0].sendMessageString(CMN_IDO_DIV, ...))` | Migration/Change division code |
| 3 | SET | `parentMap.put("chg_rsv_ymd", JCCWebCommon.getOpeDate(this, null))` | Planned change date = current operational date |
| 4 | SET | `parentMap.put("ope_date", JCCWebCommon.getOpeDate(this, null))` | Operational date = current operational date |

### Block 4 — Sequential SET (Mansion mapping & submission info) (L10810–10819)

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `parentMap.put("mskm_sbt_cd", "00017")` | [Fixed] Submission type code = "00017" (Address change application) |
| 2 | SET | `parentMap.put("mskm_form_cd", bean[0].sendMessageString(MSKM_DIV, ...))` | Submission form code |
| 3 | SET | `parentMap.put("mskm_uk_tnt_user_id", bean[0].sendMessageString(MSKM_UK_THTSHA_CD, ...))` | Submission receiver user ID |
| 4 | SET | `parentMap.put("mskm_ymd", bean[0].sendMessageString(MSKM_YMD, ...))` | Submission date |
| 5 | SET | `parentMap.put("mskm_uk_tntsha_skbt_cd", bean[0].sendMessageString(MSKM_UK_TNTSHA_DIV, ...))` | [v3.00.00] Receiver identification code |

### Block 5 — Sequential SET (Control/restore pattern) (L10822–10824)

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `parentMap.put("ctrl_rvs_pat", bean[0].sendMessageString(CTRL_RVS_PAT, ...))` | Control restore pattern (UI residual field) |

### Block 6 — FOR (Submission detail list mapping) (L10828–10834)

Iterates over submission detail numbers from the screen and builds a detail list.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `mskmDtlCount = bean[0].sendMessage(MSKM_DTL_NO_BF, DATABEAN_GET_COUNT)` | Get count of submission detail items |
| 2 | SET | `mskmDtlArray = new ArrayList<>()` | Initialize detail list |
| 3 | FOR | `for (int i = 0; i < mskmDtlCount; i++)` | Loop over each detail |
| 4 | SET | `mskmDtlMap.put("mskm_dtl_no", bean[0].sendMessageString(MSKM_DTL_NO_BF, ..., i))` | Get detail number at index i |
| 5 | EXEC | `mskmDtlArray.add(mskmDtlMap)` | Add to list |
| 6 | SET | `parentMap.put("mskm_dtl_list", mskmDtlArray)` | Store detail list in parent map |

### Block 7 — Sequential SET (Engineering case number & service termination dates) (L10835–10846)

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `parentMap.put("kojiak_no", bean[0].sendMessageString(MSKM_KJ_ANKEN_NO, ...))` | [IDO_DIV="Address change/confirmation"] Engineering case number |
| 2 | SET | `parentMap.put("rsv_aply_ymd_nt", bean[0].sendMessageString(EOH_NET_SVC_USE_STA_KIBO_YMD, ...))` | Service end date (Net) |
| 3 | SET | `parentMap.put("rsv_aply_ymd_tl", bean[0].sendMessageString(EOH_TEL_SVC_USE_STA_KIBO_YMD, ...))` | Service end date (Telephone) |
| 4 | SET | `parentMap.put("rsv_aply_ymd_tv", "20991231")` | Service end date (TV) = far future (no change) [-> "20991231"] |

### Block 8 — Sequential SET (Contact info & moved-to address header) (L10848–10862)

Maps contact phone, email, and appointment preferences plus the initial moved-to address header fields.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `parentMap.put("mskm_ariv_ymd", JCCWebCommon.getOpeDate(this, null))` | Submission document arrival date |
| 2 | SET | `parentMap.put("kepco_custinfo_juju_doi_um", "1")` | [Hardcoded] Kansai Electric customer info consent = Yes |
| 3 | SET | `parentMap.put("mskm_rrks_telno", bean[0].sendMessageString(TEKKYO_AD_KJ_RRKS_TLN, ...))` | Submission contact phone number |
| 4 | SET | `parentMap.put("tel_rrk_kibod_sbt_cd", "3")` | [Fixed] Phone contact preference = Anytime |
| 5–20 | SET | Various phone/address fields | Moved-to address header (code, postal, prefecture, city, oaztsu, azcho, bnchigo, building, room, phone) |

### Block 9 — IF/ELSE/ELSE/ELSE (Mansion submission type determination) (L10895–10914)

Determines the submission form type based on the mansion property code.

| # | Type | Code | Condition | Business Description |
|---|------|------|-----------|---------------------|
| 1 | CHECK | `"\"\"".equals(val_mansion_bukken_cd)` | Mansion code is empty | House type = Home |
| 2 | SET | `parentMap.put("mskmsho_sbt_cd", MSKMSHO_SBT_CD_HOME)` | [-> "1"] Submission type: Home |
| 3 | CHECK | `MANSION_BUKKEN_CD_MANSION.equals(val_mansion_bukken_cd)` | [-> "001"] Mansion code = Mansion |
| 4 | SET | `parentMap.put("mskmsho_sbt_cd", MSKMSHO_SBT_CD_MANSION)` | [-> "2"] Submission type: Mansion |
| 5 | CHECK | `MANSION_BUKKEN_CD_MEZON.equals(val_mansion_bukken_cd)` | [-> "002"] Mansion code = Maison |
| 6 | SET | `parentMap.put("mskmsho_sbt_cd", MSKMSHO_SBT_CD_MEZON)` | [-> "3"] Submission type: Maison |
| 7 | SET | `parentMap.put("mskmsho_sbt_cd", "")` | Otherwise, empty (unknown type) |

### Block 10 — Sequential SET (Temporary save main map creation) (L10918–10933)

Creates `tppv_map` for address change temporary save main information.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `tppv_map = new HashMap<>()` | Initialize temp save main map |
| 2 | SET | `parentMap.put("tppv_map", tppv_map)` | Attach to parent map |
| 3 | SET | `tppv_map.put("tppv_adchtppv_no", bean[0].sendMessageString(CTRL_AD_CHG_MSKM_KARI_ADD_NO, ...))` | Temp save number |
| 4 | SET | `tppv_map.put("tppv_upd_dtm_bef", bean[0].sendMessageString(CTRL_AD_CHG_MSKM_KARI_ADD_NO_UPD_DTM, ...))` | Temp save update datetime (before) |
| 5 | SET | `tppv_map.put("tppv_ad_switch_way_cd", bean[0].sendMessageString(CMN_AD_SWCH_DIV, ...))` | Address switching method code (Auto/Manual) [IT Bug No.73] |

### Block 11 — Sequential SET (eo Hikari NET service fields in tppv) (L10934–10945)

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1–4 | SET | `tppv_eohnt_svkei_no`, `tppv_eohtl_svkei_no`, `tppv_eohtv_svkei_no`, `tppv_svc_kei_kaisen_ucwk_no` | Contract numbers for NET, TEL, TV services and pre-change circuit detail number |

### Block 12 — Sequential SET (IDO reason, construction re-delegation, temporary save address) (L10946–10960)

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `tppv_itnsad_mi_fix_flg = getCheckBoxValue(bean[0], ITENS_AD_FIX_DIV)` | Moved-to address unconfirmed flag (checkbox) |
| 2 | SET | `tppv_mansion_id_pid`, `tppv_mansion_nm` | Mansion ID, P-ID, mansion name |
| 3–5 | SET | Full moved-to address in tppv | Address code, postal, prefecture, city, oaztsu, azcho, bnchigo, building, room |
| 6 | SET | `tppv_itens_tou_info` | [ANK-3885-00-00] Moved-to building info |
| 7 | SET | `tppv_itens_telno`, `tppv_itnsad_lgtd`, `tppv_itnsad_lttd`, `tppv_itnsad_nyukyo_rsv_ymd` | Moved-to phone, longitude, latitude, move-in date |

### Block 13 — Sequential SET (Equipment delivery address) (L10973–11004)

Maps equipment delivery address fields: code, postal, prefecture, city, oaztsu, azcho, bnchigo, building, room, phone, name, kana.

### Block 14 — Sequential SET (Moved-to address form & additional fields) (L11005–11026)

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `tppv_itens_ad_form_cd = getPdnSelectedCd(bean[0], NEWESTA_AD_FORM_DIV)` | Moved-to address form code (pulldown) |
| 2 | SET | `tppv_itens_dmps_anken_no` | Telecommunication disaster case number |
| 3 | SET | `tppv_itens_nyukyo_flr_cnt_cd`, `tppv_itens_shunko_rsv_ymd` | Moved-to floor count, construction reservation date |
| 4 | SET | `tppv_itens_menkaihat_anken_no`, `tppv_itens_mnkht_cmp_aply_cd` | Face development case number, application code |
| 5 | SET | `tppv_itens_doji_ksh_adchg_um = getCheckBoxValue(...)` | Simultaneous tenant address change flag |
| 6 | SET | `tppv_newesta_kijiran` | Moved-to notes (Net/Tel) [Fixed] |
| 7 | SET | `tppv_newesta_kijiran_tv` | Moved-to notes (TV) [Fixed] |

### Block 15 — Sequential SET (Removal work fields) (L11027–11122)

Maps removal work (拆除工事) fields: scope code, KEPCO consent, desired date, cancellation date, transfer code, STB count, STB flag, mansion ID, contact method, case notes, customer name, PON type, new building flag, recovery case flag, appointment deadline, etc.

### Block 16 — Sequential SET (eo NET service change details) (L11127–11142)

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `eohnt_use_svc_chg_div` | eo Net service change division code |
| 2 | SET | `tppv_eohnt_svc_kei_ido_sbt_cd` | eo Net service change type code |
| 3–7 | SET | Price group, course, plan, add code, discount flags | NET billing details including rapid discount (ANK-3412-08-00) |
| 8 | SET | `tppv_eohnt_svc_uest_kibo_ymd` | NET service start preference date |

### Block 17 — Sequential SET (eo Telephone service change details) (L11153–11177)

Similar structure to NET but for Telephone: division, change type, price group, course, plan, number pre-notification (pulldown), start day code, start preference date, start preference time, penalty division.

### Block 18 — Sequential SET (eo TV service change details) (L11179–11194)

Similar structure for TV: division, change type, price group, course, plan, STB shipping method, STB count, penalty division.

### Block 19 — FOR (Equipment temporary save map list) (L11198–11230)

Iterates over `TEKKYO_AD_USE_KIKI_LIST` data bean array, extracts equipment information per item.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `bean_rykk_tppv_map_list = bean[0].getDataBeanArray(TEKKYO_AD_USE_KIKI_LIST)` | Get equipment list from screen |
| 2 | FOR | `for (int i = 0; i < getCount(); i++)` | Loop each equipment item |
| 3 | CHECK | `bean_rykk_tppv_map == null` | Skip null entries |
| 4–10 | SET | rykk_tppv fields | Update datetime, service contract no, removal type, equipment type, home equipment type, model, service start date, contract status, service code, registration datetime |

### Block 20 — FOR (Option temporary save map list - eo NET) (L11234–11260)

Iterates over `EOH_NET_OP_HKTGI_LIST` data bean array for NET option services.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `bean_nt_op_tppv_map_list = bean[0].getDataBeanArray(EOH_NET_OP_HKTGI_LIST)` | Get NET option list |
| 2 | FOR | Loop each NET option item | |
| 3–5 | SET | op_tppv fields | Option number, update datetime, service type="1" (NET), contract detail no, option service contract no, option service continuation |

### Block 21 — FOR (Option temporary save - eo TEL) (Nested loop) (L11261–11292)

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `bean_tl_op_tppv_map_list_list = bean[0].getDataBeanArray(EOH_TEL_OP_HKTGI_LIST)` | Get TEL option list |
| 2 | FOR | Outer loop over TEL option items | |
| 3 | SET | `bean_tl_op_tppv_map_list = getDataBeanArray(TEL_OP_HKTGI_LIST_09)` | Get nested TEL detail list |
| 4 | FOR | Inner loop | |
| 5 | SET | `op_tppv_adchm_svc_tab_sbt_cd = "2"` | Service type = 2 (Telephone) |
| 6 | SET | `op_tppv_op_svc_hktgi_um = getPdnSelectedCd(..., OP_HKTGI_EOHTL_TRN_PDN)` | TEL option continuation (pulldown) |

### Block 22 — FOR (Option temporary save - eo TV) (Nested loop) (L11293–11324)

Same structure as Block 21 but for TV options with `svc_tab_sbt_cd = "3"`.

### Block 23 — FOR (STB temporary save map list) (L11328–11418)

Iterates over `EOH_TV_STB_TV_COURSE_LIST` for STB items.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1–4 | SET | stb_tppv fields | STB number, update datetime |
| 5 | CHECK | `stbIdoDiv.equals(TAKNKIKI_IDO_STB_TSUIKA)` | [STB addition?] Check if STB is being added |
| 6 | SET | `stb_tppv_kktk_svc_kei_add_seq` | [Incrementing] Equipment add sequence number (formatted to 2 digits) |
| 7–17 | SET | Full STB details | Service contract detail no, equipment service contract no, desired maker, STB ID, price course, B-CAS card no, CCAS card no, home equipment model, STB type, home equipment change code, HDD capacity, registration datetime, BCAS service no & datetime, CCAS service no & datetime |

### Block 24 — FOR (STB temporary save - Exchange) (L11424–11498)

Iterates over `EOH_TV_STB_TV_COURSE_LIST_KOKAN_SK` for STB exchange items. Key difference: `taknkiki_ido_cd` is hardcoded to `"99"`, and `kktk_svc_kei_add_seq` is empty.

### Block 25 — FOR (VA temporary save map) (L11502–11530)

Iterates over `EOH_TEL_VA_CHOICE_PDN` for VA (Virtual Appliance) items. Limited to 1 iteration.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1–6 | SET | va_tppv fields | Update datetime, equipment service contract no, home equipment model, serial no, port count |

### Block 26 — FOR (Telephone temporary save map list) (L11534–11667)

Iterates over `EOH_TEL_TLN_LIST` for telephone number items. Maps extensive fields including:

- Telephone temp save number, update datetime, contract detail no, DSL flag
- BMP (Number Portability) fields: BMP work flag, contractor kana/name, application telecom operator code, telecom operator base point code, BMP work desired date/time, BMP work confirmed date/time, BMP work completion date
- Telephone number, same-number transfer fields (kana, name, phone, address details)
- VA port number (pulldown)
- Same-number transfer investigation results (number division, NTT acceptance office, possibility, request date)
- Emergency notification fields (contractor kana/name, address supplement)
- Pre-opening toki (interim key) fields: before/after codes, dates, phone numbers, content
- Post-opening toki fields: same structure as before

### Block 27 — FOR (Delivery address temporary save - SKS) (L11671–11706)

Iterates over `ITENS_SAME_AD_CHG_SKS_SHS_LIST` for same-tenant building delivery address changes (SKS = Shihatsu Same).

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1–6 | SET | shs_tppv fields | Delivery address temp save number, update datetime, SHS type="1" (SKS), delivery address change flag, billing contract no, option service contract no, NET presence, TEL presence, TV presence |

### Block 28 — FOR (Delivery address temporary save - Guide) (L11707–11739)

Same structure as Block 27 but with `ITENS_SAME_AD_CHG_GUIDE_SHS_LIST` and `shs_sbt_cd = "2"` (Guide type). NET/TEL/TV fields are hardcoded to empty strings.

### Block 29 — Sequential SET (Address change main info) (L11742–11760)

Creates `adchg_map` for the address change main information.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `adchg_map = new HashMap<>()` | Initialize address change map |
| 2 | SET | `parentMap.put("adchg_map", adchg_map)` | Attach to parent |
| 3 | SET | `adchg_adchg_no` | Address change number (from 2-week update) |
| 4 | SET | `adchg_upd_dtm_bef` | Address change update datetime (before) |
| 5–10 | SET | Full adchg fields | Submission number, pre/after circuit detail no, IDO division, status, switching way, tenant address change flag |

### Block 30 — FOR (Address change detail - Guide SHS checkbox) (L11767–11784)

Checks if guide SHS (cable delivery) address change is requested.

| # | Type | Code | Condition | Business Description |
|---|------|------|-----------|---------------------|
| 1 | CHECK | `getCheckBoxBoolean(bean, SHS_AD_GUIDE_CHOICE_DIV_04)` | [ANK-2012-0001222] Guide SHS change checkbox checked |
| 2 | SET | `adchg_guidemg_shs_chg_um = "1"` | Guide mail delivery change = Yes |
| 3 | SET | `adchg_guidemg_shs_chg_um = "0"` | Guide mail delivery change = No |

### Block 31 — Sequential SET (Address change detail - Service contract) (L11790–11833)

Creates `adchg_dtl_svc_kei_list` with three service entries (NET, Telephone, TV).

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `adchg_dtl_map_svc_kei_net` | NET service detail map |
| 2 | SET | `adchg_dtl_chbf_skbt_no = bean[0].sendMessageString(EOH_NET_SVKEI_NO_BF, ...)` | Pre-change service contract no (NET) |
| 3 | SET | `adchg_dtl_chaf_skbt_no = bean[0].sendMessageString(EOH_NET_SVKEI_NO_AF, ...)` | Post-change service contract no (NET) |
| 4 | SET | `adchg_dtl_svc_kei_ido_sbt_cd = bean[0].sendMessageString(EOH_NET_USE_SVC_CHG_DIV, ...)` | NET service change type code |
| 5–7 | SET | Same for Telephone (svc_cd = JKKCommonConst.SVC_CD_02) | |
| 8–10 | SET | Same for TV (svc_cd = JKKCommonConst.SVC_CD_TV) | |

### Block 32 — FOR (Address change detail - Service contract detail/UCWK) (L11838–12024)

Iterates over service contract detail numbers (before and after) for NET, TEL, and TV, mapping each detail entry with before/after service contract numbers.

For NET: loops over `EOH_NET_SVKEI_UW_NO_BF` and `EOH_NET_SVKEI_UW_NO_AF`. Handles mismatched counts between before and after.

For Telephone: loops over `EOH_TEL_TLN_LIST`. If after number is empty: checks if DSL cancellation or pending — if so, sets chaf_skbt_no to empty; otherwise keeps pre-change number.

For TV: loops over `EOH_TV_STB_TV_COURSE_LIST`. Similar logic: if after number is empty, checks service change division (DSL/PENDING → empty; otherwise keeps before number).

### Block 33 — FOR (Address change detail - Equipment service contract) (L12026–12179)

Iterates over `TEKKYO_AD_USE_KIKI_LIST` for equipment service contract details. Each equipment item produces a detail entry with chbf/chaf service numbers. Then iterates over `EOH_TV_STB_TV_COURSE_LIST` for STB items — each STB generates 3 detail entries (STB, B-CAS, CCAS) with `taknkiki_sbt_cd` = "A0", "B0", "C0" respectively. STB IDO division `"03"` maps to `tkkiki_tekkyo_sbt_cd = "1"` (partial removal → removal).

### Block 34 — FOR (Address change detail - Option service contract) (L12181–12361)

Iterates over option service lists (NET, TEL, TV). Each option item produces a detail entry. If after option contract number is empty and the option is being cancelled (`op_svc_hktgi_um` = DSL), sets chaf_skbt_no to empty; otherwise keeps before number. Special handling for TV guide SHS matching (IT2-2012-0001222): if the TV option's service contract matches a guide SHS contract and the TV service continuation, uses the SHS contract number.

### Block 35 — FOR (Address change detail - Billing contract) (L12363–12395)

Iterates over `ITENS_SAME_AD_CHG_SKS_SHS_LIST` (max 1 item) for billing delivery address change details. Checks SKS checkbox to set `sks_shs_chg_um` (billing delivery address change flag).

### Block 36 — IF (Address change detail - Construction work order) (L12399–12462)

Two separate IF conditions based on whether construction work detail numbers exist:

| # | Type | Code | Condition | Business Description |
|---|------|------|-----------|---------------------|
| 1 | CHECK | `!StringUtils.isEmpty(ad_chg_kojiak_dtl_no)` | Net/Tel construction work order exists |
| 2 | SET | `adchg_dtl_kojiak` with `koji_svc_sbt = "Net_Tel"` | Net/Tel construction order detail |
| 3 | CHECK | `!StringUtils.isEmpty(ad_chg_tv_kojiak_dtl_no)` | TV construction work order exists |
| 4 | SET | `adchg_dtl_kojiak` with `koji_svc_sbt = "Tv"` | TV construction order detail |

### Block 37 — Sequential SET (Final parent fields) (L12465–12519)

Maps remaining top-level parent fields: moved-to unconfirmed flag, simultaneous tenant address change flag, moved-to name/kana/form, mansion property no, floor count, construction reservation date, face development case number, coordinates (X, Y, longitude, latitude), coordinate correction flag (fixed to "0"), circuit code, provision method contract numbers (NET/TEL/TV), owner contract number, KEPCO business office code, X/Y coordinates (alternative fields), removal work contact method notes, STC router, penalty divisions for all services, and notes fields.

### Block 38 — Sequential SET (Equipment delivery address final) (L12521–12550)

Maps equipment delivery address fields to parent level: name, kana, address code, postal, prefecture, city, oaztsu, azcho, bnchigo, building, room, phone.

### Block 39 — Sequential SET (Work schedule & contact) (L12552–12567)

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `kj_kibo_ymd`, `kj_dsl_ymd`, `kj_kibo_apo_kigen_ymd` | Work desired date, cancellation date, appointment deadline |
| 2 | SET | `kj_tel_rrk_kibo_time`, `kj_apo_rrks`, `kj_rrks_tln`, `kj_rrks_mlad` | Contact preferences |

### Block 40 — Sequential SET (Service change & contract info) (L12569–12615)

Maps NET/TEL/TV service change division, price group, course, plan, and service numbers with logic: if after number exists and differs from before, use after; otherwise use before. Also maps update datetimes with the same before/after logic.

### Block 41 — Sequential SET (Service contract detail list) (L12617–12648)

Creates `eoh_nt_svc_kei_ucwk_list` by iterating over `EOH_NET_SVKEI_UW_NO_BF` count. If count is 0 and service change division = "Add" (SVC_KEI_IDO_SBT_TSUIKA), inserts an empty detail entry.

### Block 42 — FOR (Telephone service contract detail list) (L12651–12764)

Iterates over `EOH_TEL_TLN_LIST` for telephone contract details. Maps service contract no (prefers after over before), update datetimes, old/new phone numbers, VA port number, NTT contractor address info, and toki (interim key) before/after fields.

### Block 43 — Sequential SET (Service group list) (L14690–14716)

Creates `svc_kei_grp_list` with group division determination: if the control service contract number matches the NET service contract no (before), group_div = "00" (same group); otherwise "01" (different group).

### Block 44 — Sequential SET (Construction scope conversion & finalization) (L14718–14733)

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | CALL | `afKojiScopeCd = getConvert_KojiScopeCd(bean, kojifuyoflg)` | Convert construction scope code |
| 2 | SET | `parentMap.put("koji_scope_cd", afKojiScopeCd)` | Store converted scope code |
| 3–4 | SET | Final tel_rrk, koui, kepco, ad_chg_fix_dtm | Final contact and timestamp fields |

### Block 45 — Sequential SET (Contract processing division) (L14736–14742)

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1–3 | SET | `eoh_nt_kei_trn_div`, `eoh_tl_kei_trn_div`, `eoh_tv_kei_trn_div` | Contract processing division for NET, TEL, TV |

### Block 46 — Sequential SET (Final output) (L14744–14753)

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `outputMap.put("KKSV009800CC", parentMap)` | Store complete mapping in output map |
| 2 | RETURN | `return outputMap` | Return the populated output map |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| KKSV0098 | Screen | Address Change Registration Confirmation screen — used to confirm and submit address change requests |
| KKW04202SF | Module | Address Change Registration module — encompasses screens KKSV0098 through KKSV0010 for the address change workflow |
| 上りマッピング | Pattern | Upper-mapping — transforms screen data into a structured map for downstream CBS processing |
| 住所変更登録 | Business process | Address Change Registration — the end-to-end business process of updating a customer's registered address |
| 住所変更・確定 | Business state | Address change confirmation — the state where an address change is being confirmed before final registration |
| mskm_sbt_cd | Field | Submission type code — "00017" represents Address change application |
| mskmsho_sbt_cd | Field | Submission form type code — "1"=Home, "2"=Mansion, "3"=Maison (building type) |
| func_cd | Field | Function code — "1"=Check+Register (full), "2"=Check only |
| id_div | Field | Migration/Change division — classifies the type of address change |
| tppv | Abbreviation | Temporary save (仮保存) — intermediate save data for address change registration |
| tp (仮) | Abbreviation | Temporary save map — intermediate HashMap storing address change fields |
| rykk (解約) | Abbreviation | Cancellation (解約) — equipment removal/cancellation data |
| op (オプション) | Abbreviation | Option — add-on subscription service data |
| stb | Abbreviation | Set-Top Box — digital television receiver equipment |
| VA | Abbreviation | Virtual Appliance — network device (router) for telephone service |
| BMP | Abbreviation | Number Portability (番号ポータビリティ) — allows keeping phone number when switching providers |
| 同番移転 | Business term | Same-number transfer — transferring a phone number to a new address while keeping the same number |
| 同番移転調査 | Business process | Same-number transfer investigation — inquiry to NTT about number availability for transfer |
| toki (中途キー) | Field | Interim key — interim access key for pre/post opening period |
| 工事案件 | Business term | Engineering/Construction case — work order case number for installation/removal |
| 撤去工事 | Business term | Removal work (拆除工事) — work to remove existing equipment at the old address |
| 工事事業者 | Business term | Contractor/Service provider — the entity performing construction work |
| SKS | Abbreviation | Shihatsu Same (発送先) — delivery address for billing statements |
| 請求書発送先変更 | Business term | Billing statement delivery address change — changing where bills are sent |
| 契約処理区分 | Field | Contract processing division — classifies contract as continuation, change, cancellation, or new |
| eo光NET | Business term | eo Hikari NET — fiber optic internet service by K-Opticom |
| eo光電話 | Business term | eo Hikari Telephone — landline telephone service by K-Opticom |
| eo光テレビ | Business term | eo Hikari TV — digital television service by K-Opticom |
| B-CAS | Abbreviation | Broadcast Program Protection Organization — Japanese smart card for broadcast rights |
| CCAS | Abbreviation | Common Card for Advanced Services — alternative smart card standard |
| STB | Abbreviation | Set-Top Box — set-top box equipment for digital TV |
| PON | Abbreviation | Passive Optical Network — fiber optic access network technology |
| KEPCO | Abbreviation | Kansai Electric Power Company — regional utility; customer info consent required for address changes |
| mskm | Abbreviation | Moshikomi (申し込み) — application/submission |
| mskm_dtl_no | Field | Submission detail number — individual line item within a submission |
| kojiak_no | Field | Engineering case number — work order case identifier |
| rsv_aply_ymd | Field | Reservation application year/month/date — desired service end date |
| tens (転送先) | Abbreviation | Transferred/Forwarded-to address — the destination address |
| koji_apo_rrks | Field | Work appointment contact — contact preferences for construction appointments |
| itens_ad_form_cd | Field | Moved-to address form code — format type of the destination address |
| adchg | Abbreviation | Address Change (アドレス変更) — the core address change operation |
| adchg_no | Field | Address change number — unique identifier for the address change request |
| adchg_stat | Field | Address change status — current state of the address change request |
| adchg_dtl | Abbreviation | Address change detail — line-level data for service/equipment/option changes |
| svc_kei_ucwk_no | Field | Service contract detail number — unique identifier for a service contract line item |
| chbf_skbt_no | Field | Before-change service contract number — original contract number |
| chaf_skbt_no | Field | After-change service contract number — updated contract number |
| keisha_pcd | Field | Contractor postal code — postal code of the service provider's registered address |
| ntt_keisha | Field | NTT contractor address — NTT subscriber's registered address for number portability |
| 照会対応 | Business term | Inquiry response — feature for handling address change service termination date inquiries |
| 品向好き | Business term | Quality improvement / bug fix — JIRA-style issue tracking prefix (e.g., No.74, No.77) |
| IT2-2012-0000371 | Issue ID | Feature: Service termination date inquiry support |
| IT1-2012-0000297 | Issue ID | Bug fix: Address change detail creation when data is insufficient |
| ANK-3885-00-00 | Issue ID | Feature: Auto-design for light-concrete mansion buildings |
| ANK-3412-08-00 | Issue ID | Feature: Rapid discount and billing simulation improvement |
| MSKMSHO_SBT_CD_HOME | Constant | Submission type "1" (Home) — residential house |
| MSKMSHO_SBT_CD_MANSION | Constant | Submission type "2" (Mansion) — apartment-style building |
| MSKMSHO_SBT_CD_MEZON | Constant | Submission type "3" (Maison) — maisonette-style building |
| MANSION_BUKKEN_CD_MANSION | Constant | "001" — mansion property code for mansion-type buildings |
| MANSION_BUKKEN_CD_MEZON | Constant | "002" — mansion property code for maisonette-type buildings |
| TAKNKIKI_IDO_STB_TSUIKA | Constant | STB addition indicator — when STB change division equals this, it's an addition |
| SVC_KEI_IDO_SBT_TSUIKA | Constant | Service change type "Add" — adding a new service contract |
| SVC_KEI_IDO_SBT_DSL | Constant | Service change type "Cancel" — cancelling a service contract |
| SVC_KEI_IDO_SBT_PDING | Constant | Service change type "Pending" — service in pending state |
| SVC_KEI_IDO_SBT_KEIZOKU | Constant | Service change type "Continuation" — continuing an existing service |
