# Business Logic — JKKAdInfChgCC.setplaceAdUpdChk() [131 LOC]

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

## 1. Role

### JKKAdInfChgCC.setplaceAdUpdChk()

This method performs the **Usage Location Address Update Check and Processing** operation (利用住所住所変更チェック処理) within the K-Opticom eo Customer Core System's address information change workflow. It is invoked as part of the broader `adUpdBfChk` (Pre-address-update check) flow, specifically when the system detects that a usage location address has been modified (i.e., `setplace_upd_um` flag is true). The method handles two sequential business domains: (1) the **Service Contract Circuit Detail Agreement** (EKK0251A010 / EKK0251C030) and (2) the **Emergency Notification Destination Update** (EKK0161A010 / EKK0191A010 / EKK0191C060). It implements a **delegation pattern** by routing all data operations through a mapper (`JKKAdInfChgMapperCC`) and a service component invoker (`ServiceComponentRequestInvoker`), ensuring that the business logic remains decoupled from the underlying CBS (Core Business System) calls. As a shared utility method, it is called exclusively from `adUpdBfChk` within the same class and is ultimately triggered by the commit entry point `adInfChgCommit` during the address change submission lifecycle.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["setplaceAdUpdChk(params)"])

    START --> PREP["Prepare: condMap, paramMap, setplace_list"]
    PREP --> CHECK_LIST{"setplace_list has items?"}

    CHECK_LIST -->|No| END_RETURN(["Return / Next"])
    CHECK_LIST -->|Yes| LOOP["Iterate setplace_list (for each cur_setplace)"]

    LOOP --> BLOCK1_START["Block 1 - Service Contract Circuit Detail Agreement (EKK0251A010)"]
    BLOCK1_START --> B1_COND1["CondMap: SVC_KEI_KAIS_UCWK_NO + OPE_DATE"]
    B1_COND1 --> B1_SET["mapper.setEKK0251A010(param, fixedText, condMap)"]
    B1_SET --> B1_RUN["scCall.run(reqMap, keepSesHandle.get())"]
    B1_RUN --> B1_GET["mapper.getEKK0251A010(param, fixedText, resMap)"]
    B1_GET --> B1_CHK["mapper.scResultCheck(param)"]

    B1_CHK --> B1_UPD["kk0251_a010_map.put(UPD_DT_KEI_KAIS_UCWK_UPD_DTM_BEF)"]
    B1_UPD --> B1_MAN["Put manual input flag from cur_setplace"]
    B1_MAN --> B1_KAISAN["executeEKKA0020002_Kaisen(param, fixedText, kk0251_a010_map)"]
    B1_KAISAN --> B1_KAIS_CHECK{"setPlaceNo is not empty?"}
    B1_KAIS_CHECK -->|Yes| B1_PUT_KAIS["kk0251_a010_map.put(KAISEN_PLACE_NO, setPlaceNo)"]
    B1_KAIS_CHECK -->|No| B1_NEXT1["Continue to next block"]
    B1_PUT_KAIS --> B1_NEXT1

    B1_NEXT1 --> BLOCK2_START["Block 2 - Service Contract Circuit Detail Content Update (EKK0251C030)"]
    BLOCK2_START --> B2_SET["mapper.setEKK0251C030_func2(param, fixedText, kk0251_a010_map)"]
    B2_SET --> B2_RUN["scCall.run(reqMap, keepSesHandle.get())"]
    B2_RUN --> B2_GET["mapper.getEKK0251C030(param, fixedText, resMap)"]
    B2_GET --> B2_CHK["mapper.scResultCheck(param)"]

    B2_CHK --> EMG_EXTRACT["Extract emg_list from cur_setplace"]
    EMG_EXTRACT --> EMG_CHECK{"emg_list has items?"}

    EMG_CHECK -->|No| LOOP_END["End emg_list iteration"]
    EMG_CHECK -->|Yes| EMG_LOOP["Iterate emg_list (for each cur_emg)"]

    EMG_LOOP --> BLOCK3_START["Block 3.1 - Service Contract Agreement (EKK0161A010)"]
    BLOCK3_START --> B31_COND["CondMap: SVC_KEI_UCWK_NO + OPE_DATE"]
    B31_COND --> B31_SET["mapper.setEKK0161A010(param, fixedText, condMap)"]
    B31_SET --> B31_RUN["scCall.run(reqMap, keepSesHandle.get())"]
    B31_RUN --> B31_GET["mapper.getEKK0161A010(param, fixedText, resMap)"]
    B31_GET --> B31_CHK["mapper.scResultCheck(param)"]

    B31_CHK --> B31_UPD1["kk0161_a010_map.put(RSV_APLY_YMD, OPE_DATE)"]
    B31_UPD1 --> B31_UPD2["kk0161_a010_map.put(IDO_DIV, paramData)"]

    B31_UPD2 --> B31_STAT_CHECK{"svc_kei_ucwk_stat == 010 (Received)?"}
    B31_STAT_CHECK -->|Yes| B31_STAT_SKIP["Skip MSKM_DTL_NO update"]
    B31_STAT_CHECK -->|No| B31_DTL_CHECK{"mskm_dtl_no not empty?"}
    B31_STAT_SKIP --> B31_UPD_LAST["kk0161_a010_map.put(LAST_UPD_DTM_BEF)"]
    B31_DTL_CHECK -->|Yes| B31_PUT_DTL["kk0161_a010_map.put(MSKM_DTL_NO, paramData)"]
    B31_DTL_CHECK -->|No| B31_UPD_LAST
    B31_PUT_DTL --> B31_UPD_LAST
    B31_UPD_LAST --> B31_EMG_PUT["kk0161_a010_map.put(EMG_LAST_UPD_DTM_BEF)"]

    B31_EMG_PUT --> BLOCK4_START["Block 3.2 - eo Optical Phone Agreement (EKK0191A010)"]
    BLOCK4_START --> B4_COND["CondMap: SVC_KEI_UCWK_NO + OPE_DATE"]
    B4_COND --> B4_SET["mapper.setEKK0191A010(param, fixedText, condMap)"]
    B4_SET --> B4_RUN["scCall.run(reqMap, keepSesHandle.get())"]
    B4_RUN --> B4_GET["mapper.getEKK0191A010(param, fixedText, resMap)"]
    B4_GET --> B4_CHK["mapper.scResultCheck(param)"]

    B4_CHK --> B4_EMG_ADDR["Put emergency address fields into kk0191_a010_map"]
    B4_EMG_ADDR --> B4_FLG["Put NTT KSH_AD_SAI_FLG and EMG_AD_CHK_LV"]

    B4_FLG --> BLOCK5_START["Block 3.3 - eo Optical Phone Info Update (EKK0191C060)"]
    BLOCK5_START --> B5_SET["mapper.setEKK0191C060_func2(param, fixedText, kk0161_a010_map, kk0191_a010_map)"]
    B5_SET --> B5_RUN["scCall.run(reqMap, keepSesHandle.get())"]
    B5_RUN --> B5_GET["mapper.getEKK0191C060(param, fixedText, resMap)"]
    B5_GET --> B5_CHK["mapper.scResultCheck(param)"]

    B5_CHK --> LOOP_END
    LOOP_END --> LOOP_BACK{"More setplace_list?"}
    LOOP_BACK -->|Yes| LOOP
    LOOP_BACK -->|No| TRY_CHK{"Exception?"}

    TRY_CHK -->|Yes| CATCH["Catch: throw CCException(ERR_STR_RESULT_CD)"]
    TRY_CHK -->|No| END_RETURN

    CATCH --> END_NODE(["End"])
    END_RETURN --> END_NODE
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `param` | `IRequestParameterReadWrite` | The request parameter object carrying the full model group and control map for the address change screen. Contains usage location address list (`setplace_ad_list`), operation date (`ope_date`), request discrimination code (`ido_div`), application detail number (`mskm_dtl_no`), and other address-related fields needed for processing. |
| 2 | `fixedText` | `String` | User-specified arbitrary string used as a data key to retrieve the parameter map (`param.getData(fixedText)`). It identifies which data block within the request to operate on — typically a screen-specific key. |

**Instance fields / external state read:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `keepSesHandle` | `ThreadLocal<SessionHandle>` | Thread-local session handle storing the session context (e.g., session manager) for CBS invocations. Provides the connection context passed to `scCall.run()`. |

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| C | `setEKK0251A010` + `scCall.run` | EKK0251A010SC | K-Opticom Service Contract Circuit Detail Agreement | Retrieves existing circuit detail agreement data for the usage location service contract, used as a baseline for update processing. |
| R | `getEKK0251A010` | EKK0251A010SC | Service Contract Circuit Detail Agreement | Extracts the agreement data returned from the CBS response map into a working HashMap. |
| - | `scResultCheck` | - | - | Checks CBS execution result for errors; throws on failure. |
| - | `executeEKKA0020002_Kaisen` | EKKA0020002 | Installation Place Number (Setting Location) | Obtains the installation/place number for the circuit detail, integrating with the home equipment management system. |
| C | `setEKK0251C030_func2` + `scCall.run` | EKK0251C030SC | Service Contract Circuit Detail Content | Updates the service contract circuit detail content with the new address information. |
| R | `getEKK0251C030` | EKK0251C030SC | Service Contract Circuit Detail Content | Retrieves the updated circuit detail content from the CBS response. |
| - | `scResultCheck` | - | - | Checks CBS execution result for errors. |
| C | `setEKK0161A010` + `scCall.run` | EKK0161A010SC | Service Contract Agreement | Retrieves the service contract agreement for the emergency notification destination. |
| R | `getEKK0161A010` | EKK0161A010SC | Service Contract Agreement | Extracts the agreement data for populating updated fields. |
| - | `scResultCheck` | - | - | Checks CBS execution result for errors. |
| C | `setEKK0191A010` + `scCall.run` | EKK0191A010SC | Service Contract Agreement: eo Optical Phone | Retrieves the eo Optical Phone service contract agreement for the emergency notification destination. |
| R | `getEKK0191A010` | EKK0191A010SC | Service Contract Agreement: eo Optical Phone | Extracts the agreement data for populating emergency address fields. |
| - | `scResultCheck` | - | - | Checks CBS execution result for errors. |
| C | `setEKK0191C060_func2` + `scCall.run` | EKK0191C060SC | Service Contract Agreement: eo Optical Phone Info Update | Updates the eo Optical Phone service contract information with the new emergency address. |
| R | `getEKK0191C060` | EKK0191C060SC | Service Contract Agreement: eo Optical Phone Info Update | Retrieves the updated information from the CBS response. |
| - | `scResultCheck` | - | - | Checks CBS execution result for errors. |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:KKSV* (address change screen) | `adInfChgCommit(handle, param, fixedText)` -> `adUpdBfChk(param, fixedText)` -> `setplaceAdUpdChk(param, fixedText)` | `getEKK0191C060 [R]`, `setEKK0191C060_func2 [-]`, `scResultCheck [-]`, `getEKK0251A010 [R]`, `setEKK0251A010 [-]`, `executeEKKA0020002_Kaisen [-]`, `getEKK0161A010 [R]`, `setEKK0161A010 [-]`, `getEKK0191A010 [R]`, `setEKK0191A010 [-]`, `getEKK0251C030 [R]`, `setEKK0251C030_func2 [-]`, `getKshAdSaiFlg [R]`, `getMapString [R]` |

**Notes:**
- The only internal caller found is `adUpdBfChk` (line 7222 in `JKKAdInfChgCC.java`), which acts as the routing dispatcher for pre-address-update checks.
- `adUpdBfChk` itself is called from `adInfChgCommit` (line 329), which is the primary commit entry point for the address change business flow.
- The entry point `adInfChgCommit` is invoked by external screens (class name pattern KKSV*) handling address change operations in the eo Customer Core System.
- No external screen/batch callers within 8 hops were detected; the call originates from the screen layer through the commit CBS.

## 6. Per-Branch Detail Blocks

**Block 1** — [PREPARATION] (L7488)

> Initial setup: creates condition map, retrieves the usage location address list from the request, and clears the condition map for reuse.

| # | Type | Code |
|---|------|------|
| 1 | SET | `condMap = new HashMap<String, String>()` // Empty condition map |
| 2 | EXEC | `paramMap = param.getData(fixedText)` // Retrieves data map from request |
| 3 | SET | `setplace_list = (ArrayList<HashMap<String, Object>>)paramMap.get(JKKAdInfChgConstCC.PARAM_KEY_SETPLACE_AD_LIST)` // Extracts usage location address list `["setplace_ad_list"]` |
| 4 | SET | `setplace_list_ite = setplace_list.iterator()` // Creates iterator for the list |

**Block 2** — [WHILE LOOP] `setplace_list_ite.hasNext()` (L7500)

> Iterates over each usage location address entry in the list. For each entry, executes the main processing blocks.

| # | Type | Code |
|---|------|------|
| 1 | SET | `cur_setplace = setplace_list_ite.next()` // Current usage location address entry |
| 2 | CALL | Block 2.1 — EKK0251A010 processing |
| 3 | CALL | Block 2.2 — EKK0251C030 processing |
| 4 | EXEC | `emg_list = (ArrayList<HashMap<String, Object>>)cur_setplace.get(JKKAdInfChgConstCC.PARAM_KEY_EMG_LIST)` // Extracts emergency notification list `["emg_list"]` |
| 5 | CALL | Block 2.3 — Nested EMG_LOOP over emg_list (L7532) |

**Block 2.1** — [IF/WHILE BODY: EKK0251A010] (L7504-L7527)

> **Service Contract Circuit Detail Agreement** (サービス契約回線内訳照会). Retrieves and prepares the circuit detail agreement data for the current usage location address, including obtaining the installation place number via `executeEKKA0020002_Kaisen`.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `condMap.clear()` |
| 2 | SET | `condMap.put(COND_KEY_SVC_KEI_KAIS_UCWK_NO, cur_setplace.get(PARAM_KEY_SETPLACE_AD_SVC_KEI_KAISEN_UCWK_NO))` // Search condition: service contract circuit detail number |
| 3 | SET | `condMap.put(COND_KEY_OPEDATE, paramMap.get(PARAM_KEY_OPE_DATE))` // Search condition: operation date |
| 4 | CALL | `mapper.setEKK0251A010(param, fixedText, condMap)` // Build CBS request |
| 5 | CALL | `scCall.run(reqMap, keepSesHandle.get())` // Execute CBS |
| 6 | CALL | `kk0251_a010_map = mapper.getEKK0251A010(param, fixedText, resMap)` // Extract CBS response |
| 7 | CALL | `mapper.scResultCheck(param)` // Check CBS result |
| 8 | SET | `kk0251_a010_map.put(UPD_DT_KEI_KAIS_UCWK_UPD_DTM_BEF, cur_setplace.get(PARAM_KEY_SETPLACE_AD_UPD_DTM_BF))` // Set pre-update timestamp `["upd_dt_kei_kais_ucwk_upd_dtm_bef"]` |
| 9 | SET | `kk0251_a010_map.put(EKKA0020002CBSMsg1List.KEY_SETPLACE_AD_MAN_INPUT_FLG, getMapString(cur_setplace, PARAM_KEY_SETPLACE_AD_MAN_INPUT_FLG))` // Set manual input flag `["setplace_ad_man_input_flg"]` |
| 10 | CALL | `setPlaceNo = executeEKKA0020002_Kaisen(param, fixedText, kk0251_a010_map)` // Obtain installation place number |

**Block 2.1.1** — [IF] `!StringUtils.isEmpty(setPlaceNo)` (L7523)

> If the installation place number was successfully obtained, store it back into the response map.

| # | Type | Code |
|---|------|------|
| 1 | SET | `kk0251_a010_map.put(EKKA0020002CBSMsg1List.KAISEN_PLACE_NO, setPlaceNo)` // Set the obtained place number `["kaisen_place_no"]` |

**Block 2.2** — [IF/WHILE BODY: EKK0251C030] (L7528-L7531)

> **Service Contract Circuit Detail Content Update** (サービス契約回線内訳内容変更). Updates the circuit detail content with the prepared data.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `mapper.setEKK0251C030_func2(param, fixedText, kk0251_a010_map)` // Build CBS request |
| 2 | CALL | `scCall.run(reqMap, keepSesHandle.get())` // Execute CBS |
| 3 | CALL | `mapper.getEKK0251C030(param, fixedText, resMap)` // Extract CBS response |
| 4 | CALL | `mapper.scResultCheck(param)` // Check CBS result |

**Block 2.3** — [WHILE LOOP] `emg_list_ite.hasNext()` (L7533)

> **Emergency Notification Destination Update Loop** (緊急通報先住所変更ループ). Iterates over each emergency notification destination record associated with the current usage location address, executing three sequential CBS operations per record.

| # | Type | Code |
|---|------|------|
| 1 | SET | `cur_emg = emg_list_ite.next()` // Current emergency notification destination entry |
| 2 | CALL | Block 2.3.1 — EKK0161A010: Service Contract Agreement |
| 3 | CALL | Block 2.3.2 — EKK0191A010: eo Optical Phone Agreement |
| 4 | CALL | Block 2.3.3 — EKK0191C060: eo Optical Phone Info Update |

**Block 2.3.1** — [IF/WHILE BODY: EKK0161A010] (L7542-L7571)

> **Service Contract Agreement** (サービス契約内訳照会). Retrieves the service contract agreement for the emergency notification destination, then populates updated fields including reservation apply date, request discrimination, MSKM detail number (conditionally), and update timestamps.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `condMap.clear()` |
| 2 | SET | `condMap.put(COND_KEY_SVC_KEI_UCWK_NO, cur_emg.get(PARAM_KEY_EMG_SVC_KEI_UCWK_NO))` // Search condition: service contract detail number `["emg_svc_kei_ucwk_no"]` |
| 3 | SET | `condMap.put(COND_KEY_OPEDATE, paramMap.get(PARAM_KEY_OPE_DATE))` // Search condition: operation date |
| 4 | CALL | `mapper.setEKK0161A010(param, fixedText, condMap)` // Build CBS request |
| 5 | CALL | `scCall.run(reqMap, keepSesHandle.get())` // Execute CBS |
| 6 | CALL | `kk0161_a010_map = mapper.getEKK0161A010(param, fixedText, resMap)` // Extract CBS response |
| 7 | CALL | `mapper.scResultCheck(param)` // Check CBS result |
| 8 | SET | `kk0161_a010_map.put(EKK0161A010CBSMsg1List.RSV_APLY_YMD, paramMap.get(PARAM_KEY_OPE_DATE))` // Set reservation apply date `["20991231"]` from OPE_DATE |
| 9 | SET | `kk0161_a010_map.put(EKK0161A010CBSMsg1List.IDO_DIV, paramMap.get(PARAM_KEY_IDO_DIV))` // Set request discrimination code `["ido_div"]` |

**Block 2.3.1.1** — [IF] `!JKKSvcConst.SVC_KEI_STAT_010.equals(svc_kei_ucwk_stat)` (L7558)

> **Condition**: If the service contract detail status is NOT "010" (Received / 受領済), then the application detail number may be updated. Status "010" means the agreement has already been received and should not be changed.

| # | Type | Code |
|---|------|------|
| 1 | GET | `svc_kei_ucwk_stat = kk0161_a010_map.get(EKK0161A010CBSMsg1List.SVC_KEI_UCWK_STAT)` // Current service contract detail status |
| 2 | IF_TRUE | `!svc_kei_ucwk_stat.equals("010")` // Status is not "Received" — proceed to check detail number |

**Block 2.3.1.1.1** — [IF] `!StringUtils.isEmpty(mskm_dtl_no)` (L7560)

> If the MSKM detail number is provided, populate it into the map. This field represents the application detail number for changes.

| # | Type | Code |
|---|------|------|
| 1 | SET | `kk0161_a010_map.put(EKK0161A010CBSMsg1List.MSKM_DTL_NO, paramMap.get(PARAM_KEY_MSKM_DTL_NO))` // Set application detail number `["mskm_dtl_no"]` |

**Block 2.3.1.2** — [ELSE-IF chain continues] (L7564)

> Regardless of the MSKM detail number condition, always set the last update timestamp before.

| # | Type | Code |
|---|------|------|
| 1 | SET | `kk0161_a010_map.put(UPD_DT_SVC_KEI_UCWK_UPD_DTM_BEF, cur_emg.get(PARAM_KEY_EMG_LAST_UPD_DTM_BF))` // Set pre-update timestamp `["upd_dt_svc_kei_ucwk_upd_dtm_bef"]` |

**Block 2.3.2** — [IF/WHILE BODY: EKK0191A010] (L7569-L7592)

> **Service Contract Agreement: eo Optical Phone** (サービス契約内訳:eo光電話同意照会). Retrieves the eo Optical Phone service contract agreement for the emergency notification destination, then populates all emergency address fields and validation flags.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `condMap.clear()` |
| 2 | SET | `condMap.put(COND_KEY_SVC_KEI_UCWK_NO, cur_emg.get(PARAM_KEY_EMG_SVC_KEI_UCWK_NO))` // Search condition |
| 3 | SET | `condMap.put(COND_KEY_OPEDATE, paramMap.get(PARAM_KEY_OPE_DATE))` // Search condition: operation date |
| 4 | CALL | `mapper.setEKK0191A010(param, fixedText, condMap)` // Build CBS request |
| 5 | CALL | `scCall.run(reqMap, keepSesHandle.get())` // Execute CBS |
| 6 | CALL | `kk0191_a010_map = mapper.getEKK0191A010(param, fixedText, resMap)` // Extract CBS response |
| 7 | CALL | `mapper.scResultCheck(param)` // Check CBS result |
| 8 | SET | `kk0191_a010_map.put(EMG_AD_CD, cur_emg.get(PARAM_KEY_EMG_AD_CD))` // Emergency address code `["emg_ad_cd"]` |
| 9 | SET | `kk0191_a010_map.put(EMG_HOSEI_PCD, cur_emg.get(PARAM_KEY_EMG_HOSEI_PCD))` // Emergency correction postal code `["emg_hosei_pcd"]` |
| 10 | SET | `kk0191_a010_map.put(EMG_STATE_NM, cur_emg.get(PARAM_KEY_EMG_STATE_NM))` // Emergency prefecture name `["emg_state_nm"]` |
| 11 | SET | `kk0191_a010_map.put(EMG_CITY_NM, cur_emg.get(PARAM_KEY_EMG_CITY_NM))` // Emergency city/town/village name `["emg_city_nm"]` |
| 12 | SET | `kk0191_a010_map.put(EMG_OAZTSU_NM, cur_emg.get(PARAM_KEY_EMG_OAZTSU_NM))` // Emergency large district name `["emg_oaztsu_nm"]` |
| 13 | SET | `kk0191_a010_map.put(EMG_AZCHO_NM, cur_emg.get(PARAM_KEY_EMG_AZCHO_NM))` // Emergency block/cho name `["emg_azcho_nm"]` |
| 14 | SET | `kk0191_a010_map.put(EMG_BNCHIGO, cur_emg.get(PARAM_KEY_EMG_BNCHIGO))` // Emergency lot number `["emg_bnchigo"]` |
| 15 | SET | `kk0191_a010_map.put(EMG_ADRTTM, cur_emg.get(PARAM_KEY_EMG_ADRTTM))` // Emergency address suffix/building name `["emg_adrttm"]` |
| 16 | SET | `kk0191_a010_map.put(EMG_ADRRM, cur_emg.get(PARAM_KEY_EMG_ADRRM))` // Emergency address suffix/room number `["emg_adrrm"]` |
| 17 | SET | `kk0191_a010_map.put(NTT_KSH_AD_KSH_AD_SAI_FLG, getKshAdSaiFlg(paramMap))` // NTT contract location match flag |
| 18 | SET | `kk0191_a010_map.put(EMG_AD_CHK_LV, "1")` // Emergency address check level = "1" |

**Block 2.3.3** — [IF/WHILE BODY: EKK0191C060] (L7597-L7601)

> **Service Contract Agreement: eo Optical Phone Info Update** (サービス契約内訳:eo光電話情報変更). Updates the eo Optical Phone service contract information with the emergency address data from both maps.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `mapper.setEKK0191C060_func2(param, fixedText, kk0161_a010_map, kk0191_a010_map)` // Build CBS request with both agreement maps |
| 2 | CALL | `scCall.run(reqMap, keepSesHandle.get())` // Execute CBS |
| 3 | CALL | `mapper.getEKK0191C060(param, fixedText, resMap)` // Extract CBS response |
| 4 | CALL | `mapper.scResultCheck(param)` // Check CBS result |

**Block 3** — [TRY-CATCH EXCEPTION HANDLER] (L7604-L7608)

> Catches all exceptions from the processing, maps them to a `CCException` with the error result code message, and re-throws.

| # | Type | Code |
|---|------|------|
| 1 | CATCH | `catch(Exception ex)` // Catches all exceptions from the try block |
| 2 | THROW | `throw new CCException(JKKAdInfChgConstCC.ERR_STR_RESULT_CD, ex.getCause())` // Error message: "サービスコンポーネントの実行結果にエラーがあります" (There is an error in the service component execution result) |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `setplace_ad_list` | Field | Usage Location Address Information List — list of usage location address entries to be updated; each entry contains circuit detail and emergency notification destination data. |
| `setplace_ad_svc_kei_kaisen_ucwk_no` | Field | Usage Location Address Service Contract Circuit Detail Number — internal tracking ID for a service contract circuit line item at the usage location. |
| `emg_list` | Field | Emergency Notification Destination Information List — list of emergency contact address entries associated with a usage location address. |
| `emg_svc_kei_ucwk_no` | Field | Emergency Notification Destination Service Contract Detail Number — internal tracking ID for a service contract detail at the emergency notification location. |
| `svc_kei_ucwk_stat` | Field | Service Contract Detail Status — status code of a service contract detail; "010" means "Received" (受領済), indicating the agreement has been received and should not be modified. |
| `ope_date` | Field | Operation Date — the business date for the address change operation, used as a condition key and populated into reservation apply date fields. |
| `ido_div` | Field | Request Discrimination Code — distinguishes the type of request (e.g., new registration, change). |
| `mskm_dtl_no` | Field | Application Detail Number — detail number of the application request; only updated when service contract detail status is not "010" (Received). |
| `kaisen_place_no` | Field | Circuit Place Number — installation/place number obtained from the home equipment management system integration. |
| `man_input_flg` | Field | Manual Input Flag — indicates whether the usage location address was manually entered (for home equipment management system correlation). |
| `emg_ad_cd` | Field | Emergency Notification Address Code — classification code for the emergency notification address. |
| `emg_hosei_pcd` | Field | Emergency Notification Correction Postal Code — corrected postal code for the emergency contact address. |
| `emg_state_nm` | Field | Emergency Notification Prefecture Name — name of the prefecture for the emergency contact address. |
| `emg_city_nm` | Field | Emergency Notification City/Town/Village Name — name of the city, town, or village for the emergency contact address. |
| `emg_oaztsu_nm` | Field | Emergency Notification Large District Name — name of the large district (oazutsu) for the emergency contact address. |
| `emg_azcho_nm` | Field | Emergency Notification Block/Cho Name — name of the block or cho for the emergency contact address. |
| `emg_bnchigo` | Field | Emergency Notification Lot Number — lot/banchi number for the emergency contact address. |
| `emg_adrttm` | Field | Emergency Notification Address Suffix / Building Name — building name or address suffix for the emergency contact. |
| `emg_adrrm` | Field | Emergency Notification Address Suffix / Room Number — room number for the emergency contact address. |
| `ksh_ad_ksh_ad_sai_flg` | Field | NTT Contract Location Address Match Flag — indicates whether the NTT contract location matches the current contract location. |
| `emg_ad_chk_lv` | Field | Emergency Address Check Level — validation level for emergency address; "1" is the active check level. |
| `COND_KEY_SVC_KEI_KAIS_UCWK_NO` | Constant | Condition key: service contract circuit detail number — used as a search condition in CBS queries. |
| `COND_KEY_SVC_KEI_UCWK_NO` | Constant | Condition key: service contract detail number — used as a search condition in CBS queries for emergency notification destinations. |
| `COND_KEY_OPEDATE` | Constant | Condition key: operation date — used as a search condition in CBS queries. |
| `SVC_KEI_STAT_010` | Constant | Service Contract Detail Status Code "010" — meaning "Received" (受領済); indicates the agreement has been received and should not be changed. |
| `ERR_STR_RESULT_CD` | Constant | Error message string: "サービスコンポーネントの実行結果にエラーがあります" (There is an error in the service component execution result). |
| EKK0161A010 | CBS | Service Contract Agreement — retrieves service contract detail information for emergency notification destinations. |
| EKK0191A010 | CBS | Service Contract Agreement: eo Optical Phone — retrieves eo Optical Phone service contract agreement information for emergency notification destinations. |
| EKK0191C060 | CBS | Service Contract Agreement: eo Optical Phone Info Update — updates eo Optical Phone service contract information (address, emergency contact details). |
| EKK0251A010 | CBS | Service Contract Circuit Detail Agreement — retrieves service contract circuit detail agreement information for usage location addresses. |
| EKK0251C030 | CBS | Service Contract Circuit Detail Content Update — updates service contract circuit detail content. |
| EKKA0020002 | CBS | Installation Place Number Obtainment — integration point with the home equipment management system to obtain the installation/place number. |
| adInfChgCommit | Method | Address Information Change Commit — the entry point CBS that orchestrates the full address change workflow including pre-checks, updates, and fault information registration. |
| adUpdBfChk | Method | Pre-address-update Check — dispatches to specific address update checks (contractor, usage location, billing, guide mail delivery, specified delivery) based on change flags. |
| Request Parameter | Object | IRequestParameterReadWrite — carries the model group and control map containing all screen data for the address change operation. |
