# Business Logic — JKKKojiChgPlaceNoCC.execSvckeiEmgUpd() [230 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `com.fujitsu.futurity.bp.custom.common.JKKKojiChgPlaceNoCC` |
| Layer | CC/Common Component — Shared business coordination class for office/branch address change operations |
| Module | `common` (Package: `com.fujitsu.futurity.bp.custom.common`) |

## 1. Role

### JKKKojiChgPlaceNoCC.execSvckeiEmgUpd()

This method performs **emergency address information changes** (緊急通報用住所の情報変更) for service contract line items classified under **eo light phone** (eo光電話) within the broader service contract hierarchy. It is invoked as part of the office/branch location change process (場所変更) when a customer moves their registered office and their emergency call routing address (for emergency dial services like Japan's 110/119) must be updated.

The method implements a **nested lookup-and-update** pattern across three layers of service data: it first retrieves the service contract details list, then matches the "post-change new installation" (変更新設) contract line against the address change detail list, and finally invokes the appropriate service contract detail update SC — either a **future-dated change** (EKK0191C061) or a **present-time change** (EKK0191C060) depending on whether the current base date is before or after the reservation application date.

If the conditions are met, the method also triggers **SOD (Service Order Data) issuance** via `htelNoInfoChgeOdrCtrl`. However, a guard condition (introduced in v8.00.01) prevents SOD issuance when the address change is already fixed (AD_CHG_FIX_FIXED = "003") and the service contract parent number has not changed, to avoid duplicate SOD generation during same-number forwarding scenarios.

The method acts as a **shared coordination component** called by the `execute()` method of the same class, which serves as the primary entry point for the office address change no-phone-number (场所変更番号なし) business use case.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["execSvckeiEmgUpd: Emergency address update for eo light phone"])
    
    START --> EXTRACT_CC_MSG["Extract ccMsg from param by fixedText key"]
    EXTRACT_CC_MSG --> EXTRACT_WORKMAP["Extract workMap from param"]
    EXTRACT_WORKMAP --> EXTRACT_MSGS["Extract kaisenShinsetu and svcKeiNo from svcKeiMsg"]
    EXTRACT_MSGS --> CHECK_KEYS["IF svcKeiNo valid AND kaisenShinsetu valid"]
    
    CHECK_KEYS -->|True| CALL_EKU0081["callSC: EKU0081B010 - Get service contract details list"]
    CALL_EKU0081 --> LOOP_SVC_KEI["Loop svcKeiKojiMsgList"]
    LOOP_SVC_KEI --> CHECK_MATCH["IF kaisenShinsetu matches svc_kei_kaisen_ucwk_no"]
    
    CHECK_MATCH -->|True| GET_ADR_CHG_LIST["Get adrChgDtlList from ccMsg"]
    GET_ADR_CHG_LIST --> LOOP_ADR["Loop adchgDtlList"]
    LOOP_ADR --> CHECK_SBT_CD["IF adchg_dtl_sbt_cd == ADCHG_DTL_SBT_CD_02 = 02"]
    
    CHECK_SBT_CD -->|True| CHECK_CHAF["IF chaf_skbt_no is not null or empty"]
    CHECK_CHAF -->|True| CALL_EKK0161["callSC: EKK0161A010 - Get service contract detail func=2 rsv_aply=20991231"]
    CALL_EKK0161 --> CHECK_MSG_LIST["IF svcUcwkMsgList not null"]
    CHECK_MSG_LIST --> CHECK_STAT["IF svc_kei_ucwk_stat not equal 910 and not equal 920"]
    CHECK_STAT --> CHECK_SVC_MATCH["IF svcKeiNo matches svcUcwkMsg svc_kei_no"]
    
    CHECK_SVC_MATCH -->|True| CALL_EKK0191A["callSC: EKK0191A010 - eo light phone info agreement func=1"]
    CALL_EKK0191A --> CHECK_DATE["IF baseYmd < svcUcwkMsg rsv_aply_ymd"]
    
    CHECK_DATE -->|True| CALL_EKK0191C061["callSC: EKK0191C061 - Service contract detail change future reservation"]
    CALL_EKK0191C061 --> UPDATE_DTM_061["Update lastUpdDtm and svc_kei_ucwk_gadtm"]
    
    CHECK_DATE -->|False| CALL_EKK0191C060["callSC: EKK0191C060 - Service contract detail change present"]
    CALL_EKK0191C060 --> UPDATE_DTM_060["Update lastUpdDtm and svc_kei_ucwk_gadtm"]
    
    UPDATE_DTM_061 --> PUT_MAP["Put chaf_skbt_no to kaisenShinsetu in tmpSvcKeiUcwkNo"]
    UPDATE_DTM_060 --> PUT_MAP
    
    PUT_MAP --> CHECK_AD_CHG_FIX["IF adChgFix == AD_CHG_FIX_FIXED 003 OR chaf_skbt_no != chbf_skbt_no"]
    CHECK_AD_CHG_FIX -->|True| CALL_ODRCTRL["call htelNoInfoChgeOdrCtrl - SOD issuance"]
    
    CHECK_AD_CHG_FIX -->|False| SKIP_ODR["Skip SOD issuance - same number move with address change fixed"]
    CALL_ODRCTRL --> CLOSE_LOOP_SVC["End svcKeiKojiMsgList loop"]
    SKIP_ODR --> CLOSE_LOOP_SVC
    
    CHECK_SBT_CD -->|False| ADJ_SKIP["Skip - adchg_dtl_sbt_cd not equal 02"]
    CHECK_CHAF -->|False| ADJ_SKIP
    ADJ_SKIP --> CLOSE_LOOP_SVC
    CHECK_STAT -->|False| CLOSE_LOOP_SVC
    CHECK_SVC_MATCH -->|False| CLOSE_LOOP_SVC
    CHECK_MSG_LIST -->|False| CLOSE_LOOP_SVC
    LOOP_ADR -->|Loop ends| CLOSE_LOOP_SVC
    LOOP_SVC_KEI -->|Loop ends| CLOSE_LOOP_SVC
    CHECK_MATCH -->|False| CLOSE_LOOP_SVC
    CHECK_KEYS -->|False| RETURN_DT["Return lastUpdDtm"]
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | Database session handle providing the transactional context for all SC (Service Component) calls. Carries connection pool, transaction, and security context. |
| 2 | `scCall` | `ServiceComponentRequestInvoker` | Service component invocation proxy used to dispatch requests to downstream CBS (Central Business System) services. Enables remote calls for data retrieval and updates. |
| 3 | `param` | `IRequestParameterReadWrite` | Request parameter holder containing both the request payload data (via `getData()`) and the work area mapping (`getMappingWorkArea()`). Carries ccMsg, adrChgDtlList, ido_div, and various kaisen_place fields. |
| 4 | `fixedText` | `String` | Key used to retrieve the ccMsg HashMap from param. Acts as a dictionary key to identify which message payload block to process. Typically corresponds to a fixed text ID in the request context. |
| 5 | `svcKeiMsg` | `CAANMsg` | Service contract message containing the service contract number (SVC_KEI_NO). This is the parent contract under which eo light phone line items are searched and updated. |
| 6 | `lastUpdDtm` | `String` | The last update datetime stamp, passed in from the caller and updated after each SC call returns. Used for optimistic locking and audit trail. Returned as the method's final value. |
| 7 | `baseYmd` | `String` | The current base date (YYYYMMDD) used to determine whether the emergency address change should be applied as a future-dated reservation (EKK0191C061) or an immediate change (EKK0191C060). Compared against `rsv_aply_ymd`. |

**Instance fields / constants read:**

| Field | Type | Value | Business Meaning |
|-------|------|-------|------------------|
| `ADCHG_DTL_SBT_CD_02` | `String` | `"02"` | Address change detail type code for service contract number lines |
| `RSV_APLY_YMD_20991231` | `String` | `"20991231"` | Far-future reservation date used as a "no expiration" placeholder when querying active service contract details |
| `AD_CHG_FIX_FIXED` | `String` | `"003"` | Latest request type code meaning "fixed/cancel" — indicates address change is already confirmed; used to suppress duplicate SOD issuance |
| `TEMPLATE_ID_EKU0081B010` | `String` | `"EKU0081B010"` | Template ID for service contract detail list inquiry |
| `TEMPLATE_ID_EKK0161A010` | `String` | `"EKK0161A010"` | Template ID for service contract detail inquiry |
| `TEMPLATE_ID_EKK0191A010` | `String` | `"EKK0191A010"` | Template ID for eo light phone information agreement inquiry |

## 4. CRUD Operations / Called Services

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

The following table classifies all service component (SC) calls made by `execSvckeiEmgUpd()`. SC Codes are inferred from the template IDs and CBS class names referenced in the source code.

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `callSC(handle, scCall, param, fixedText, inMsg)` → EKU0081B010CBS | EKU0081B010CBS | EKU0081 (Service Contract Details List) | Inquiry: Retrieve the list of service contract detail records (svc_kei_koji_msg) using template EKU0081B010 with function code "1" (list search) by service contract number. |
| R | `callSC(handle, scCall, param, fixedText, inMsg)` → EKK0161A010CBS | EKK0161A010CBS | EKK0161 (Service Contract Detail) | Inquiry: Retrieve a single service contract detail record using template EKK0161A010 with function code "2" (detail search) by service contract work number (chaf_skbt_no) and reservation date 20991231. |
| R | `callSC(handle, scCall, param, fixedText, inMsg)` → EKK0191A010CBS | EKK0191A010CBS | EKK0191 (eo Light Phone Info Agreement) | Inquiry: Retrieve the eo light phone information agreement record using template EKK0191A010 with function code "1" (agreement inquiry) by service contract work number. |
| U | `callSC(handle, scCall, param, fixedText, inMsg)` → EKK0191C061CBS | EKK0191C061CBS | EKK0191C (Service Contract Detail Change — Future Reservation) | Update: Change service contract detail information for future effective date. Passed all emergency address fields (EMG_AD_CD, EMG_HOSEI_PCD, EMG_BNCHIGO, EMG_ADRTTM, EMG_ADRRM, EMG_KSH_NM, EMG_KSH_KANA, state/city/oazutsu/azcho names), phone number, and reservation application date. |
| U | `callSC(handle, scCall, param, fixedText, inMsg)` → EKK0191C060CBS | EKK0191C060CBS | EKK0191C (Service Contract Detail Change — Present) | Update: Change service contract detail information for immediate effective date. Passed all emergency address fields plus Dobaniten (local office) management fields (DOBANITEN_MSKM_UM, DOBANITEN_REQ_CTRL_CD, DOBANITEN_JDG_CD, EMG_KSH_KSITEI_FLG). |
| C | `htelNoInfoChgeOdrCtrl(handle, scCall, param, fixedText, svcKeiMsg, svcUcwkMsg, svc_kei_ucwk_gadtm)` | (internal) | SOD (Service Order Data) | Create: Issue a Service Order Data record for the phone number information change. SOD is a deferred order entity in the telecom system that triggers downstream provisioning workflows. Suppressed when address change is fixed and contract number is unchanged. |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | CBS: JKKKojiChgPlaceNoCC.execute() | `JKKKojiChgPlaceNoCC.execute()` → `JKKKojiChgPlaceNoCC.execSvckeiEmgUpd()` | `htelNoInfoChgeOdrCtrl [C] SOD`, `EKK0191C061CBS [U] EKK0191C`, `EKK0191C060CBS [U] EKK0191C`, `EKK0191A010CBS [R] EKK0191`, `EKK0161A010CBS [R] EKK0161`, `EKU0081B010CBS [R] EKU0081` |

This method is called directly from the `execute()` method of the same class `JKKKojiChgPlaceNoCC`, which serves as the business coordination class for office/branch address change (場所変更) operations where no phone number change is involved. The `execute()` method is the primary entry point for the location change workflow, dispatching various update operations including this emergency address update for eo light phone service contracts.

## 6. Per-Branch Detail Blocks

**Block 1** — SET `(ccMsg extraction)` (L2596)

Extract the ccMsg HashMap from the request parameter using the fixedText key, and extract the work area mapping for later address fields.

| # | Type | Code |
|---|------|------|
| 1 | SET | `ccMsg = (HashMap) param.getData(fixedText)` |
| 2 | SET | `workMap = (HashMap) param.getMappingWorkArea()` |
| 3 | SET | `svc_kei_ucwk_gadtm = ""` |
| 4 | SET | `inMsg = null` |

**Block 2** — SET `(v7.00.00 v8.00.01 data extraction)` (L2603-L2609)

Extract the "post-change new installation" number (変更新設番号) and service contract number. In v8.00.01, also extract the address change fix flag (ad_chg_fix).

| # | Type | Code |
|---|------|------|
| 1 | SET | `kaisenShinsetu = (String) ccMsg.get("svc_kei_kaisen_ucwk_no_shinsetsu")` — Post-change new installation service contract work number |
| 2 | SET | `svcKeiNo = svcKeiMsg.getString(EKK0081A010CBSMsg1List.SVC_KEI_NO)` — Parent service contract number |
| 3 | SET | `adChgFix = (String) ccMsg.get("ad_chg_fix")` — Address change fix flag (v8.00.01) |

**Block 3** — IF `(svcKeiNo != null && !"".equals(svcKeiNo) && kaisenShinsetu != null && !"".equals(kaisenShinsetu))` (L2610)

Guard: Only proceed if both the service contract number and the post-change new installation number are present and non-empty. If either is missing, the method skips all processing and returns the original lastUpdDtm.

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMsg = new Object[][]{ EKU0081B010CBSMsg.TEMPLATEID, TEMPLATE_ID_EKU0081B010 }, { EKU0081B010CBSMsg.FUNC_CODE, "1" }, { EKU0081B010CBSMsg.KEY_SVC_KEI_NO, svcKeiNo }, { EKU0081B010CBSMsg.KEY_KOJIAK_NO, "" }` |
| 2 | CALL | `svcKeiKojiMsgList = callSC(handle, scCall, param, fixedText, inMsg).getCAANMsgList(EKU0081B010CBSMsg.EKU0081B010CBSMSG1LIST)` — Retrieve service contract detail list |
| 3 | SET | `tmpSvcKeiUcwkNo = new HashMap<String, String>()` |
| 4 | EXEC | Enter loop over `svcKeiKojiMsgList` (Block 4) |

**Block 4** — FOR `(i = 0; i < svcKeiKojiMsgList.length)` (L2621)

Iterate over each service contract detail record returned by EKU0081B010.

| # | Type | Code |
|---|------|------|
| 1 | SET | `svcKeiKojiMsg = svcKeiKojiMsgList[i]` |
| 2 | IF | See Block 4.1 |

**Block 4.1** — IF `(!tmpSvcKeiUcwkNo.containsValue(kaisenShinsetu) && kaisenShinsetu.equals(svcKeiKojiMsg.getString(EKU0081B010CBSMsg1List.SVC_KEI_KAISEN_UCWK_NO)))` (L2625)

Guard: Check if this contract detail's "post-change work number" (変更作業番号) matches the kaisenShinsetu value, AND we haven't already processed this match. The dedup check (`!tmpSvcKeiUcwkNo.containsValue(kaisenShinsetu)`) ensures we only process the first matching line item.

| # | Type | Code |
|---|------|------|
| 1 | SET | `adchgDtlList = (ArrayList) ccMsg.get("adrChgDtlList")` — Address change detail list from ccMsg |
| 2 | SET | `childadrMap = null` |
| 3 | EXEC | Enter nested loop over `adchgDtlList` (Block 4.2) |

**Block 4.2** — FOR `(j = 0; j < adchgDtlList.size())` (L2630)

Iterate over each address change detail record to find lines matching the service contract detail processing criteria.

| # | Type | Code |
|---|------|------|
| 1 | SET | `childadrMap = (HashMap) adchgDtlList.get(j)` |
| 2 | SET | `adchg_dtl_sbt_cd = (String) childadrMap.get("adchg_dtl_sbt_cd")` |
| 3 | IF | See Block 4.2.1 (sbt_cd filter) |

**Block 4.2.1** — IF `(!ADCHG_DTL_SBT_CD_02.equals(adchg_dtl_sbt_cd))` — CONTINUE (L2632) [CONSTANT `ADCHG_DTL_SBT_CD_02 = "02"`]

Filter: Skip any address change detail line that is not of type "02" (service contract number). Only lines of subtype code 02 are eligible for emergency address processing.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `continue` — Skip non-"02" detail lines |

**Block 4.2.2** — SET `(chaf_skbt_no extraction, v8.00.01)` (L2635-L2639)

Extract the parent and child service contract numbers from the address change detail record.

| # | Type | Code |
|---|------|------|
| 1 | SET | `chaf_skbt_no = (String) childadrMap.get("chaf_skbt_no")` — Parent service contract number |
| 2 | SET | `chbf_skbt_no = (String) childadrMap.get("chbf_skbt_no")` — Child service contract number (v8.00.01) |
| 3 | IF | See Block 4.2.3 (chaf_skbt_no check) |

**Block 4.2.3** — IF `(chaf_skbt_no != null && !"".equals(chaf_skbt_no))` (L2640)

Guard: The parent service contract number must be populated to proceed. Without it, the system cannot look up the corresponding service contract detail for emergency address update.

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMsg = new Object[][]{ EKK0161A010CBSMsg.TEMPLATEID, TEMPLATE_ID_EKK0161A010 }, { EKK0161A010CBSMsg.FUNC_CODE, "2" }, { EKK0161A010CBSMsg.KEY_SVC_KEI_UCWK_NO, chaf_skbt_no }, { EKK0161A010CBSMsg.KEY_RSV_APLY_YMD, RSV_APLY_YMD_20991231 }` |
| 2 | CALL | `svcUcwkMsgList = callSC(handle, scCall, param, fixedText, inMsg).getCAANMsgList(EKK0161A010CBSMsg.EKK0161A010CBSMSG1LIST)` — Query service contract detail |
| 3 | IF | See Block 4.2.4 (svcUcwkMsgList check) |

**Block 4.2.4** — IF `(svcUcwkMsgList != null && svcUcwkMsgList.length > 0)` (L2653)

Guard: The service contract detail inquiry must return at least one record.

| # | Type | Code |
|---|------|------|
| 1 | SET | `svcUcwkMsg = svcUcwkMsgList[0]` |
| 2 | SET | `svcKeiUcwkStat = svcUcwkMsg.getString(EKK0161A010CBSMsg1List.SVC_KEI_UCWK_STAT)` |
| 3 | IF | See Block 4.2.5 (status filter) |

**Block 4.2.5** — IF `(!"910".equals(svcKeiUcwkStat) && !"920".equals(svcKeiUcwkStat))` (L2659)

Guard (OM-2015-0001393): Skip records whose service contract work status is "910" or "920". These status codes represent terminal states (e.g., completed or canceled) where the emergency address should not be updated.

| # | Type | Code |
|---|------|------|
| 1 | IF | See Block 4.2.6 (svcKeiNo match) |

**Block 4.2.6** — IF `(svcKeiNo.equals(svcUcwkMsg.getString(EKK0161A010CBSMsg1List.SVC_KEI_NO)))` (L2662)

Guard: The parent service contract number from the outer message must match the svc_kei_no in the queried service contract detail, confirming hierarchical consistency.

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMsg = new Object[][]{ EKK0191A010CBSMsg.TEMPLATEID, TEMPLATE_ID_EKK0191A010 }, { EKK0191A010CBSMsg.FUNC_CODE, "1" }, { EKK0191A010CBSMsg.KEY_SVC_KEI_UCWK_NO, svcUcwkMsg.getString(EKK0161A010CBSMsg1List.SVC_KEI_UCWK_NO) }, { EKK0191A010CBSMsg.KEY_GENE_ADD_DTM, svcUcwkMsg.getString(EKK0161A010CBSMsg1List.GENE_ADD_DTM) }` |
| 2 | CALL | `svcUcwkTelMsg = callSC(handle, scCall, param, fixedText, inMsg).getCAANMsgList(EKK0191A010CBSMsg.EKK0191A010CBSMSG1LIST)[0]` — Retrieve eo light phone info agreement |
| 3 | IF | See Block 4.2.7 (date comparison) |

**Block 4.2.7** — IF `(baseYmd.compareTo(svcUcwkMsg.getString(EKK0161A010CBSMsg1List.RSV_APLY_YMD)) < 0)` (L2681)

Branching decision: If the base date is **before** the reservation application date, the change should be applied as a **future-dated reservation**. Otherwise, it is applied immediately.

**Block 4.2.7.1** — IF-TRUE (L2684): Call `EKK0191C061` (future reservation update)

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMsg = new Object[][]{ EKK0191C061CBSMsg.TEMPLATEID, TEMPLATE_ID_EKK0191C061 }, { EKK0191C061CBSMsg.FUNC_CODE, "1" }, { EKK0191C061CBSMsg.SVC_KEI_UCWK_NO, ... }, { EKK0191C061CBSMsg.MSKM_DTL_NO, workMap.get("work_mskm_dtl_no") }, { EKK0191C061CBSMsg.SVC_UEST_KBTMZ_CD, svcUcwkMsg.getString(EKK0161A010CBSMsg1List.SVC_UEST_KBTMZ_CD) }, { EKK0191C061CBSMsg.SVC_UEST_KBTM_CD, svcUcwkMsg.getString(EKK0161A010CBSMsg1List.SVC_UEST_KBTM_CD) }, { EKK0191C061CBSMsg.PNLTY_HASSEI_CD, svcUcwkMsg.getString(EKK0161A010CBSMsg1List.PNLTY_HASSEI_CD) }, { EKK0191C061CBSMsg.IDO_DIV, ccMsg.get("ido_div") }, { EKK0191C061CBSMsg.TELNO, svcUcwkTelMsg.getString(EKK0191A010CBSMsg1List.TELNO) }, { EKK0191C061CBSMsg.TELNO_USE_PLACE_NO, svcUcwkTelMsg.getString(EKK0191A010CBSMsg1List.TELNO_USE_PLACE_NO) }, { EKK0191C061CBSMsg.EMG_AD_CD, ccMsg.get("kaisen_place_ad_cd") }, { EKK0191C061CBSMsg.EMG_HOSEI_PCD, ccMsg.get("kaisen_place_pcd") }, { EKK0191C061CBSMsg.EMG_BNCHIGO, ccMsg.get("kaisen_place_bnchigo") }, { EKK0191C061CBSMsg.EMG_ADRTTM, ccMsg.get("kaisen_place_adrttm") }, { EKK0191C061CBSMsg.EMG_ADRRM, ccMsg.get("kaisen_place_adrrm") }, { EKK0191C061CBSMsg.EMG_KSH_NM, svcUcwkTelMsg.getString(EKK0191A010CBSMsg1List.EMG_KSH_NM) }, { EKK0191C061CBSMsg.EMG_KSH_KANA, svcUcwkTelMsg.getString(EKK0191A010CBSMsg1List.EMG_KSH_KANA) }, { EKK0191C061CBSMsg.FIRST_CDR_HASSEI_YMD, svcUcwkTelMsg.getString(EKK0191A010CBSMsg1List.FIRST_CDR_HASSEI_YMD) }, { EKK0191C061CBSMsg.TELNO_JUN, svcUcwkTelMsg.getString(EKK0191A010CBSMsg1List.TELNO_JUN) }, { EKK0191C061CBSMsg.NTT_NO_GUIDE_UM, svcUcwkTelMsg.getString(EKK0191A010CBSMsg1List.NTT_NO_GUIDE_UM) }, { EKK0191C061CBSMsg.HELLOPAGE_KEISAI_UM, svcUcwkTelMsg.getString(EKK0191A010CBSMsg1List.HELLOPAGE_KEISAI_UM) }, { EKK0191C061CBSMsg.TUWA_DTL_KOKAI_YH, svcUcwkTelMsg.getString(EKK0191A010CBSMsg1List.TUWA_DTL_KOKAI_YH) }, { EKK0191C061CBSMsg.TEL_NO_PRE_TCHI_CD, svcUcwkTelMsg.getString(EKK0191A010CBSMsg1List.TEL_NO_PRE_TCHI_CD) }, { EKK0191C061CBSMsg.TSJGS_CD, svcUcwkTelMsg.getString(EKK0191A010CBSMsg1List.TSJGS_CD) }, { EKK0191C061CBSMsg.MAN_SWITCH_RSV_DTM, svcUcwkTelMsg.getString(EKK0191A010CBSMsg1List.MAN_SWITCH_RSV_DTM) }, { EKK0191C061CBSMsg.TOWNPAGE_KEISAI_KANA, svcUcwkTelMsg.getString(EKK0191A010CBSMsg1List.TOWNPAGE_KEISAI_KANA) }, { EKK0191C061CBSMsg.TOWNPAGE_KEISAI_NM, svcUcwkTelMsg.getString(EKK0191A010CBSMsg1List.TOWNPAGE_KEISAI_NM) }, { EKK0191C061CBSMsg.VA_TAKNKIKI_MODEL_CD, svcUcwkTelMsg.getString(EKK0191A010CBSMsg1List.VA_TAKNKIKI_MODEL_CD) }, { EKK0191C061CBSMsg.VA_KIKI_SEIZO_NO, svcUcwkTelMsg.getString(EKK0191A010CBSMsg1List.VA_KIKI_SEIZO_NO) }, { EKK0191C061CBSMsg.VA_PORT_NO, svcUcwkTelMsg.getString(EKK0191A010CBSMsg1List.VA_PORT_NO) }, { EKK0191C061CBSMsg.UPD_DTM_BF, lastUpdDtm }, { EKK0191C061CBSMsg.RULE0059_AUTO_APLY, "0" }, { EKK0191C061CBSMsg.VA_KIKI_CHG_NO, svcUcwkTelMsg.getString(EKK0191A010CBSMsg1List.VA_KIKI_CHG_NO) }, { EKK0191C061CBSMsg.RSV_APLY_YMD, svcUcwkMsg.getString(EKK0161A010CBSMsg1List.RSV_APLY_YMD) }, { EKK0191C061CBSMsg.EMG_STATE_NM, ccMsg.get("kaisen_place_state_nm") }, { EKK0191C061CBSMsg.EMG_CITY_NM, ccMsg.get("kaisen_place_city_nm") }, { EKK0191C061CBSMsg.EMG_OAZTSU_NM, ccMsg.get("kaisen_place_oaztsu_nm") }, { EKK0191C061CBSMsg.EMG_AZCHO_NM, ccMsg.get("kaisen_place_azcho_nm") }` |
| 2 | CALL | `msg = callSC(handle, scCall, param, fixedText, inMsg)` — Invoke future-dated emergency address change |
| 3 | SET | `lastUpdDtm = msg.getString(EKK0191C061CBSMsg.UPD_DTM)` |
| 4 | SET | `svc_kei_ucwk_gadtm = msg.getString(EKK0191C061CBSMsg.KK0161_GENE_ADD_DTM)` |

**Block 4.2.7.2** — ELSE (L2731): Call `EKK0191C060` (present-time update)

This block is identical to Block 4.2.7.1 except it uses template `EKK0191C060` and includes three additional Dobaniten (branch office) fields: `DOBANITEN_MSKM_UM`, `DOBANITEN_REQ_CTRL_CD`, `DOBANITEN_JDG_CD`, `EMG_KSH_KSITEI_FLG`.

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMsg = new Object[][]{ ... same fields as Block 4.2.7.1 ... plus DOBANITEN fields, EMG_KSH_KSITEI_FLG, VA_KIKI_CHG_NO }` |
| 2 | CALL | `msg = callSC(handle, scCall, param, fixedText, inMsg)` — Invoke present-time emergency address change |
| 3 | SET | `lastUpdDtm = msg.getString(EKK0191C060CBSMsg.UPD_DTM)` |
| 4 | SET | `svc_kei_ucwk_gadtm = msg.getString(EKK0191C060CBSMsg.KK0161_GENE_ADD_DTM)` |

**Block 4.2.8** — SET `(dedup tracking)` (L2774)

| # | Type | Code |
|---|------|------|
| 1 | SET | `tmpSvcKeiUcwkNo.put(chaf_skbt_no, kaisenShinsetu)` |

**Block 4.2.9** — IF `(AD_CHG_FIX_FIXED.equals(adChgFix) || !chaf_skbt_no.equals(chbf_skbt_no))` (L2778) [CONSTANT `AD_CHG_FIX_FIXED = "003"`]

v8.00.01 guard: Issue SOD only when either the address change is already fixed (adChgFix = "003"), OR the parent and child service contract numbers differ (indicating a real change rather than same-number forwarding). If both conditions are false (change not fixed AND numbers match), the SOD is suppressed to avoid duplicate orders during a same-number move where the address change is still pending.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `htelNoInfoChgeOdrCtrl(handle, scCall, param, fixedText, svcKeiMsg, svcUcwkMsg, svc_kei_ucwk_gadtm)` — Issue SOD for phone number info change |
| 2 | ELSE | Skip SOD issuance (comment: "同番移転で住所変更確定前ならSODは発行しない" = "Do not issue SOD if same-number forwarding and address change not yet confirmed") |

**Block 5** — RETURN (L2817)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return lastUpdDtm` — Return the (possibly updated) last update datetime string |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `svc_kei_no` | Field | Service contract number — the unique identifier for a service contract in the telecom billing system |
| `svc_kei_ucwk_no` | Field | Service contract work number — internal tracking ID for a service contract line item/working detail |
| `svc_kei_kaisen_ucwk_no` | Field | Service contract post-change work number — the work number after a post-change/new installation (変更新設) |
| `svc_kei_ucwk_stat` | Field | Service contract work status — lifecycle status code (910 = completed, 920 = canceled) |
| `svc_kei_ucwk_gadtm` | Field | Service contract work generate-add datetime — the timestamp when the service contract work record was generated/added |
| `kaisenShinsetu` | Field | Post-change new installation — the work number of a service contract detail after a post-change operation |
| `chaf_skbt_no` | Field | Parent service contract number — the parent-level contract number in a hierarchical contract structure |
| `chbf_skbt_no` | Field | Child service contract number — the child-level contract number in a hierarchical contract structure |
| `adchg_dtl_sbt_cd` | Field | Address change detail subtype code — classifies the type of address change detail (01 = service contract number, 02 = service detail number) |
| `ad_chg_fix` | Field | Address change fix flag — indicates whether the address change is confirmed/fixed |
| `ido_div` | Field | Move division — classification of the type of move/location change |
| `work_mskm_dtl_no` | Field | Work MSKM detail number — a detail line item key from the work area mapping |
| `baseYmd` | Field | Base year-month-day — the current date in YYYYMMDD format used for date comparisons |
| `lastUpdDtm` | Field | Last update datetime — timestamp of the last modification, used for optimistic concurrency control |
| `rsv_aply_ymd` | Field | Reservation application year-month-day — the date from which a reservation change becomes effective |
| `kaisen_place_ad_cd` | Field | Post-change address code — the full postal/address code of the new location |
| `kaisen_place_pcd` | Field | Post-change postal code — the zip code of the new address |
| `kaisen_place_bnchigo` | Field | Post-change block number — block/building number in the Japanese address format |
| `kaisen_place_adrttm` | Field | Post-change address street — street name/address street component |
| `kaisen_place_adrrm` | Field | Post-change address building — building name/room component |
| `kaisen_place_state_nm` | Field | Post-change state name — prefecture name in the new address |
| `kaisen_place_city_nm` | Field | Post-change city name — city/municipality name in the new address |
| `kaisen_place_oaztsu_nm` | Field | Post-change district name — larger district name (oazutsu) in the new address |
| `kaisen_place_azcho_nm` | Field | Post-change town name — town/chome name in the new address |
| `EMG_KSH_NM` | Field | Emergency registration name — the name registered for emergency call routing |
| `EMG_KSH_KANA` | Field | Emergency registration kana — the kana reading of the emergency registration name |
| `EMG_AD_CD` / `EMG_HOSEI_PCD` / `EMG_BNCHIGO` / `EMG_ADRTTM` / `EMG_ADRRM` | Field | Emergency address fields — the individual components of the emergency call routing address |
| `EMG_STATE_NM` / `EMG_CITY_NM` / `EMG_OAZTSU_NM` / `EMG_AZCHO_NM` | Field | Emergency address geographic fields — state, city, district, and town names for emergency routing |
| `EMG_KSH_KSITEI_FLG` | Field | Emergency registration designated flag — indicates if the emergency registration is a designated/pre-designated entry |
| SOD | Acronym | Service Order Data — a deferred order entity in the telecom ordering system that triggers downstream provisioning |
| EO Light Phone | Business term | eo光電話 — NTT East's fiber-optic telephony service brand |
| Emergency Address (緊急通報用住所) | Business term | The address registered for emergency services (110 for police, 119 for fire/ambulance) — determines dispatch location when a call is placed from the registered line |
| Same-Number Forwarding (同番移転) | Business term | A move scenario where the phone number is retained (forwarded) at a new location, as opposed to a number change |
| CBS | Acronym | Central Business System — the backend telecom business processing system |
| SC | Acronym | Service Component — a reusable service class that encapsulates business logic and data access |
| Dobaniten (看板店) | Business term | Local branch office / regional office management — fields controlling branch-level management of the service contract |
| VA | Abbreviation | Voice Application / Virtual Access — related to voice equipment (VA_TAKNKIKI_MODEL_CD, VA_KIKI_SEIZO_NO, VA_PORT_NO) |
| FTTH | Business term | Fiber To The Home — the fiber-optic access technology used for eo light services |
| EKK0191 | Domain entity | eo Light Phone Information Agreement — the service contract detail entity for phone line agreements |
| EKU0081 | Domain entity | Service Contract Detail List — entity for listing service contract details |
| EKK0161 | Domain entity | Service Contract Detail — entity for individual service contract detail records |
| ADCHG_DTL_SBT_CD_02 | Constant | "02" — Address change detail subtype code for service contract number lines |
| RSV_APLY_YMD_20991231 | Constant | "20991231" — Far-future reservation date used as a "no-expiration" placeholder |
| AD_CHG_FIX_FIXED | Constant | "003" — Latest request type code meaning address change is fixed/confirmed |
