# Business Logic — KKW00147SFLogic.cfmTran() [222 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKW00147SF.KKW00147SFLogic` |
| Layer | Controller / View Logic (Web layer) |
| Module | `KKW00147SF` (Package: `eo.web.webview.KKW00147SF`) |

## 1. Role

### KKW00147SFLogic.cfmTran()

This method serves as the **confirmation processing handler** for the Telephone Number Registration screen (KKW00147). It is invoked when a user submits the telephone number registration form and performs comprehensive pre-flight validation, data consistency checks, and registration confirmation before forwarding to the subsequent registration confirmation screen (KKW00151). The method implements a multi-stage validation pipeline: first performing server-side service data validation (`checkSVData()`), then executing a telephone number information update check (`doAddTelephoneNumberInfo()`), and finally running a series of business-rule-specific conditional checks based on the operation type (`ido_div`). The operation type determines which validation branches are exercised: **Number Addition** (BANGO_TSUIKA), **Number Change** (BANGO_HENKO), **Number Cancellation** (BANGO_KAIYAKU), or **Telephone Information Change** (DENWA_HENKO). If the temporary registration flag (`kari_touroku_flg`) is set, additional confirmation messages about temporary registration and work information loss are displayed. The method delegates to `actionKikiChange()` for emergency recovery when initial server-side validation fails, acting as a graceful degradation path. Its role in the larger system is as the shared confirmation entry point — called by both `actionCfm()` (confirmation action) and `actionKrAdd()` (confirmation + add) — making it the central orchestration method for the telephone number registration confirmation workflow.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["cfmTran()"])
    DUMP["DataBean log dump"]
    RESET["Reset DataBean for javascript rollback recovery"]
    CHECKSV{"checkSVData returns false?"}
    ACTIONCHANGE["actionKikiChange()"]
    RETURN_TRUE_1(["Return true"])
    CONFIRM["confirmServiceFormBean()"]
    TRY_START["try block"]
    DOADD["doAddTelephoneNumberInfo(FUNC_CD_2=2)"]
    DOADD_CHECK{"doAddTelephoneNumberInfo returns true?"}
    RETURN_TRUE_2(["Return true"])
    CATCH_SECTION["catch Exception"]
    THROW["throw e"]
    FINALLY_SECTION["finally block"]
    REEDIT["reeditServiceFormBean()"]
    IDO_CHECK1{"ido_div == BANGO_TSUIKA or DENWA_HENKO?"}
    GETFORM1["getServiceFormBean()"]
    HENKO_CHECK{"ido_div == BANGO_HENKO?"}
    GET_SVC_KEI["Get svc_kei_ucwk_no from DataBean"]
    CHECK_EMERG["checkEmegencyAddress()"]
    MSG_EKBA410["setMessageInfo: EKBA410--Q"]
    IDO_KAIYAKU_CHECK{"ido_div == BANGO_KAIYAKU?"}
    KAIYAKU_DATE_CHECK["Check service end date vs contract end date"]
    SET_SCREEN["setScreenId to KKW00151"]
    SET_NEXT["Set next screen KKW00151 in commonInfoBean"]
    MSG_EKB0370["setMessageInfo: EKB0370--I"]
    GETFORM2["getServiceFormBean()"]
    KARI_CHECK{"kari_touroku_flg == on?"}
    MSG_EKB1220["setMessageInfo: EKB1220--I"]
    KARI_TSUIKA_CHECK{"ido_div == BANGO_TSUIKA?"}
    CHECK_NO_TCH["Check hashinsha_no_tch change"]
    NO_TCH_CHANGED{"no_tch_ini != no_tch?"}
    MSG_EKBD790_1["setMessageInfo: EKBD790--I"]
    KANRI_MSG_CHECK["Check work info fields for non-null"]
    WORK_INFO_SET{"Any work info field non-null?"}
    MSG_EKBD790_2["setMessageInfo: EKBD790--I with message"]
    BMP_CHECK{"ido_div == BANGO_TSUIKA?"}
    BMP_UN_CHECK{"BANGO_ARI and JMTE_CD_BMP empty?"}
    MSG_EKBE148["setMessageInfo: EKBE148--Q"]
    DENWA_HENKO_CHECK{"ido_div == DENWA_HENKO?"}
    VA_MODEL_COMPARE["Compare VA model before vs after"]
    VA_CHANGED{"VA model changed?"}
    MSG_EKBC920["setMessageInfo: EKBC920--Q"]
    FINAL_RETURN(["Return true"])
    END(["END"])

    START --> DUMP
    DUMP --> RESET
    RESET --> CHECKSV
    CHECKSV -->|"Yes"| ACTIONCHANGE
    ACTIONCHANGE --> RETURN_TRUE_1
    CHECKSV -->|"No"| CONFIRM
    CONFIRM --> TRY_START
    TRY_START --> DOADD
    DOADD --> DOADD_CHECK
    DOADD_CHECK -->|"Yes"| RETURN_TRUE_2
    DOADD_CHECK -->|"No"| CATCH_SECTION
    CATCH_SECTION --> THROW
    THROW --> FINALLY_SECTION
    DOADD --> FINALLY_SECTION
    FINALLY_SECTION --> REEDIT
    REEDIT --> IDO_CHECK1
    IDO_CHECK1 -->|"Yes"| GETFORM1
    GETFORM1 --> HENKO_CHECK
    HENKO_CHECK -->|"Yes"| GET_SVC_KEI
    GET_SVC_KEI --> CHECK_EMERG
    HENKO_CHECK -->|"No"| CHECK_EMERG
    CHECK_EMERG -->|"No"| MSG_EKBA410
    MSG_EKBA410 --> IDO_KAIYAKU_CHECK
    CHECK_EMERG -->|"Yes"| IDO_KAIYAKU_CHECK
    IDO_KAIYAKU_CHECK -->|"Yes"| KAIYAKU_DATE_CHECK
    KAIYAKU_DATE_CHECK --> SET_SCREEN
    IDO_KAIYAKU_CHECK -->|"No"| SET_SCREEN
    SET_SCREEN --> SET_NEXT
    SET_NEXT --> MSG_EKB0370
    MSG_EKB0370 --> GETFORM2
    GETFORM2 --> KARI_CHECK
    KARI_CHECK -->|"Yes"| MSG_EKB1220
    MSG_EKB1220 --> KARI_TSUIKA_CHECK
    KARI_CHECK -->|"No"| KANRI_MSG_CHECK
    KARI_TSUIKA_CHECK -->|"Yes"| CHECK_NO_TCH
    CHECK_NO_TCH --> NO_TCH_CHANGED
    NO_TCH_CHANGED -->|"Yes"| MSG_EKBD790_1
    NO_TCH_CHANGED -->|"No"| KANRI_MSG_CHECK
    MSG_EKBD790_1 --> KANRI_MSG_CHECK
    KANRI_MSG_CHECK --> WORK_INFO_SET
    WORK_INFO_SET -->|"Yes"| MSG_EKBD790_2
    WORK_INFO_SET -->|"No"| BMP_CHECK
    MSG_EKBD790_2 --> BMP_CHECK
    BMP_CHECK -->|"Yes"| BMP_UN_CHECK
    BMP_UN_CHECK -->|"Yes"| MSG_EKBE148
    MSG_EKBE148 --> DENWA_HENKO_CHECK
    BMP_UN_CHECK -->|"No"| DENWA_HENKO_CHECK
    DENWA_HENKO_CHECK -->|"Yes"| VA_MODEL_COMPARE
    DENWA_HENKO_CHECK -->|"No"| FINAL_RETURN
    VA_MODEL_COMPARE --> VA_CHANGED
    VA_CHANGED -->|"Yes"| MSG_EKBC920
    VA_CHANGED -->|"No"| FINAL_RETURN
    MSG_EKBC920 --> FINAL_RETURN
    FINAL_RETURN --> END
```

**Branch meanings:**
- `IDO_DIV_BANGO_TSUIKA = "00041"` (Number Addition — eo光 telephone)
- `IDO_DIV_BANGO_HENKO = "00042"` (Number Change — eo光 telephone)
- `IDO_DIV_BANGO_KAIYAKU = "00043"` (Number Cancellation — eo光 telephone)
- `IDO_DIV_DENWA_HENKO = "00048"` (Telephone Information Change — eo光 telephone)
- `FUNC_CD_2 = "2"` (Check-only function code)
- `CD00002_ARI = "1"` (BANGO has value)
- `CD00002_NASI = "0"` (BANGO has no value)
- `JKKCommonConst.FLG_ON = "1"` (Registration flag on)
- `TKNRT_TAKNKIKI_MODEL_NM = "eo光多機能ルータ"` (eo光 Multifunction Router)
- `HGW_TAKNKIKI_MODEL_NM = "eoホームゲートウェイ"` (eo Home Gateway)

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| - | (none — method takes no parameters) | - | - |

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

| No | Field Name | Type | Business Description |
|----|-----------|------|---------------------|
| 1 | `ido_div` | `String` | Operation type discriminator — determines which business validation branch to execute (number addition, number change, number cancellation, or telephone information change). Retrieved from the service form DataBean. |
| 2 | `svcFormBean` (via `getServiceFormBean()`) | `X31SDataBeanAccess` | Service form DataBean — contains the telephone number registration form data including service contract details, device model information, temporary registration flag, and various business fields. |
| 3 | `commonInfoBean` (via `getCommonInfoBean()`) | `X31SDataBeanAccess` | Common information bean — carries screen navigation state (next screen ID, screen name) for forwarding to the confirmation screen. |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `checkSVData` | (logic method) | - | Server-side service data validation — checks form data integrity |
| - | `actionKikiChange` | (logic method) | - | Device change recovery action — handles emergency device change when server validation fails |
| - | `confirmServiceFormBean` | (logic method) | - | Pre-confirmation service form bean composition — sets up service form bean fields for the confirmation screen |
| C/R | `doAddTelephoneNumberInfo` | (SC method) | KK_T_TELNO, KK_T_ODR_HAKKO_JOKEN (inferred) | Telephone number information registration check — performs check-only update of telephone number data; FUNC_CD_2="2" indicates confirmation-only mode (not a live persist) |
| - | `reeditServiceFormBean` | (logic method) | - | Post-confirmation re-edit of service form bean for confirmation screen display |
| - | `getServiceFormBean` | (framework method) | - | Accesses the service form DataBean |
| - | `getCommonInfoBean` | (framework method) | - | Accesses the common info DataBean |
| - | `checkEmegencyAddress` | (logic method) | - | Emergency address validation — checks address data validity for number addition/change |
| - | `getPulldownNm` | (logic method) | - | Retrieves pulldown selection label name from DataBean |
| - | `createYMDStr` | (utility method) | - | Constructs YYYYMMDD string from year, month, day components |
| R | `DataServiceBeanAccess.getDataBeanArray` | (framework) | - | Retrieves array DataBean (BMP_UM, JIMU_COMMISION) |
| R | `DataBeanAccess.getDataBean` | (framework) | - | Retrieves specific DataBean from array (index 0) |
| - | `DataBeanAccess.sendMessageString` | (framework) | - | Get/set DataBean string values across various fields (IDO_DIV, SVC_KEI_UCWK_NO, service end dates, model codes, etc.) |

**Validation messages displayed (no DB impact):**

| Message Code | Type | Description |
|-------------|------|-------------|
| `EKBA410--Q` | Warning | Address confirmation message (for number addition/change) |
| `EKB2990--Q` | Warning | Service end date validation error (for number cancellation) |
| `EKB0370--I` | Info | "Telephone number registration" confirmation message |
| `EKB1220--I` | Info | Temporary registration confirmation message |
| `EKBD790--I` | Warning | Notification setting changed / work information will be lost |
| `EKBE148--Q` | Warning | BANGO (number portability) temporary fund setting required |
| `EKBC920--Q` | Warning | VA (Virtual Apparatus) information changed |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Caller: `KKW00147SFLogic.actionCfm()` | `actionCfm()` -> `cfmTran()` | `doAddTelephoneNumberInfo[FUNC_CD_2="2"]` (Check-mode telephone number update) |
| 2 | Caller: `KKW00147SFLogic.actionKrAdd()` | `actionKrAdd()` -> `cfmTran()` | `doAddTelephoneNumberInfo[FUNC_CD_2="2"]` (Check-mode telephone number update) |

**Terminal operations from this method (outbound):**
- `setMessageInfo` [-] — Sets screen messages for user feedback
- `sendMessageString` [-] — Reads/writes DataBean values
- `getDataBean` [-] — Accesses DataBean array elements
- `checkSVData` [-] — Server-side validation
- `doAddTelephoneNumberInfo` [-] — Telephone number registration check
- `checkEmegencyAddress` [-] — Emergency address validation
- `reeditServiceFormBean` [-] — Service form re-edit
- `confirmServiceFormBean` [-] — Service form bean composition
- `actionKikiChange` [-] — Device change recovery action

## 6. Per-Branch Detail Blocks

**Block 1** — [SET] DataBean log dump (L2440)

> Dumps the current DataBean state for debugging/audit purposes.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `JSYwebLog.println(JSYwebLog.DataBean_Dump, getClass(), dumpDatabean(), null, null, null)` // DataBean log output |

**Block 2** — [SET] DataBean initialization (L2445)

> Resets DataBean to recover values lost due to JavaScript rollback processing.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `resetDataBean()` // DataBean initialization — restores values lost during JavaScript rollback |

**Block 3** — [IF] Server-side validation check `(L2450)`

> Checks server-side service data. If validation fails, delegates to device change recovery action and returns early.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `if(!checkSVData())` // Server-side data check |

**Block 3.1** — [nested IF - false branch] Recovery path `(L2452)`

> When server-side validation fails, trigger the device change action and return true (indicating the caller should handle further navigation).

| # | Type | Code |
|---|------|------|
| 1 | CALL | `actionKikiChange()` // Device change action — handles emergency recovery |
| 2 | RETURN | `return true` // Return early — caller will handle screen transition |

**Block 4** — [SET] Pre-confirmation bean setup `(L2458)`

> Composes the service form bean fields needed for the confirmation screen display.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `confirmServiceFormBean()` // Pre-confirmation service form bean composition |

**Block 5** — [TRY-CATCH-FINALLY] Telephone number registration check `(L2461-2476)`

> Wraps the telephone number update check in a try-catch-finally block. Ensures the service form bean is re-edited for confirmation screen display regardless of success or failure. The `doAddTelephoneNumberInfo` method is called with `FUNC_CD_2="2"` (check-only mode — validation without persisting). If an exception is caught, it is forwarded to the framework (FW) as-is.

| # | Type | Code |
|---|------|------|
| 1 | SET | `try { ... }` // Try block for telephone number check |
| 2 | CALL | `doAddTelephoneNumberInfo(JPCModelConstant.FUNC_CD_2)` // Check-only update of telephone number data (FUNC_CD_2="2" = check mode) |
| 3 | EXEC | `if (doAddTelephoneNumberInfo(...) )` // Check if an error occurred during the update check |

**Block 5.1** — [nested IF - error path] `(L2464)`

> If `doAddTelephoneNumberInfo` returns true (indicating an error occurred), return true to signal the caller to handle the error.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return true` // Error occurred during telephone number update check |

**Block 5.2** — [CATCH] Exception handler `(L2471)`

> Forwards any exception to the FW (framework) unchanged — no wrapping or transformation.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `throw e` // Forward exception to FW unchanged |

**Block 5.3** — [FINALLY] Re-edit service form bean `(L2475)`

> Ensures the service form bean is re-edited so the confirmation screen can be displayed regardless of what happened in the try block.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `reeditServiceFormBean()` // Re-edit service form bean for confirmation screen display |

**Block 6** — [IF] Number Addition / Telephone Information Change validation `(L2479-2486)`

> For operation types Number Addition (`IDO_DIV_BANGO_TSUIKA = "00041"`) or Telephone Information Change (`IDO_DIV_DENWA_HENKO = "00048"`), retrieve the service form bean and validate the emergency address. For Number Change operations (`IDO_DIV_BANGO_HENKO = "00042"`), also retrieve the current service detail work number.

| # | Type | Code |
|---|------|------|
| 1 | SET | `X31SDataBeanAccess svcFormBean = getServiceFormBean()` // Get service form bean |
| 2 | SET | `String currentSvcKeiUwkNo = ""` // Initialize current service detail work number |

**Block 6.1** — [nested IF - Number Change] `(L2482)`

> For Number Change operations, retrieve the current service detail work number from the DataBean.

| # | Type | Code |
|---|------|------|
| 1 | SET | `currentSvcKeiUwkNo = svcFormBean.sendMessageString(KKW00147SFConst.SVC_KEI_UCWK_NO, X31CWebConst.DATABEAN_GET_VALUE)` // Get current service detail work number |

**Block 6.2** — [nested IF] Emergency address check `(L2485)`

> If the emergency address check fails, display an address confirmation warning message.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `checkEmegencyAddress(svcFormBean, currentSvcKeiUwkNo)` // Validate emergency address |
| 2 | SET | `if (!checkEmegencyAddress(...))` // If validation fails |
| 3 | CALL | `JCCWebCommon.setMessageInfo(this, "EKBA410--Q")` // Display address confirmation message |

**Block 7** — [IF] Number Cancellation date validation `(L2491-2516)`

> For Number Cancellation operations (`IDO_DIV_BANGO_KAIYAKU = "00043"`), validate that the service end date does not exceed the contract end date (operational period + service end term).

| # | Type | Code |
|---|------|------|
| 1 | SET | `svcEndTerm = svcFormBean.sendMessageString(KKW00147SFConst.SVC_END_TERM, DATABEAN_GET_VALUE)` // Service end term (days) |
| 2 | SET | `svcEndY = svcFormBean.sendMessageString(KKW00147SFConst.SVC_END_YEAR, DATABEAN_GET_VALUE)` // Service end year |
| 3 | SET | `svcEndM = svcFormBean.sendMessageString(KKW00147SFConst.SVC_END_MON, DATABEAN_GET_VALUE)` // Service end month |
| 4 | SET | `svcEndD = svcFormBean.sendMessageString(KKW00147SFConst.SVC_END_DAY, DATABEAN_GET_VALUE)` // Service end day |
| 5 | EXEC | `newSvcEndYmd = createYMDStr(svcEndY, svcEndM, svcEndD)` // Construct YYYYMMDD end date |
| 6 | SET | `unyoYmd = svcFormBean.sendMessageString(KKW00147SFConst.UNYO_YMD, DATABEAN_GET_VALUE)` // Operational period date (YYYYMMDD) |
| 7 | SET | `Calendar calSvcEndYmd = Calendar.getInstance()` // Calendar for calculated service end date |
| 8 | SET | `SimpleDateFormat sdfYmd = new SimpleDateFormat("yyyyMMdd")` // Date format for parsing |
| 9 | EXEC | `calSvcEndYmd.setTime(sdfYmd.parse(newSvcEndYmd))` // Set service end date calendar |
| 10 | SET | `Calendar calYmd = Calendar.getInstance()` // Calendar for contract end date |
| 11 | EXEC | `calYmd.setTime(sdfYmd.parse(unyoYmd))` // Set operational period date |
| 12 | EXEC | `calYmd.add(Calendar.DAY_OF_YEAR, Integer.parseInt(svcEndTerm))` // Add service end term days |
| 13 | SET | `if (calYmd.compareTo(calSvcEndYmd) < 0)` // If contract end date is before service end date (error) |
| 14 | SET | `str = {KKW00147SFConst.SVC_END_YMD, svcEndTerm + "日"}` // Error message parameter |
| 15 | CALL | `JCCWebCommon.setMessageInfo(this, JPCOnlineMessageConstant.EKB2990__Q, str)` // Display date validation error |

**Block 8** — [SET] Screen transition setup `(L2518-2526)`

> Sets up the screen transition information: destination screen ID (KKW00151), screen name, and navigation metadata in the common info bean.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `JCCWebCommon.setScreenId(this, SCREEN_ID_KKW00151, JKKScreenConst.SCREEN_ID_KKW00147)` // Set screen transition destination |
| 2 | SET | `X31SDataBeanAccess commonInfoBean = super.getCommonInfoBean()` // Get common info bean |
| 3 | EXEC | `commonInfoBean.sendMessageString(CommonInfoCFConst.NEXT_SCREEN_ID, DATABEAN_SET_VALUE, SCREEN_ID_KKW00151)` // Set next screen ID |
| 4 | EXEC | `commonInfoBean.sendMessageString(CommonInfoCFConst.NEXT_SCREEN_NAME, DATABEAN_SET_VALUE, SCREEN_NM_KKW00151)` // Set next screen name |
| 5 | CALL | `JCCWebCommon.setMessageInfo(this, JPCOnlineMessageConstant.EKB0370__I, new String[]{"Telephone number registration"})` // Display registration confirmation info message |

**Block 9** — [IF] Temporary registration confirmation `(L2529-2590)`

> If the temporary registration flag (`kari_touroku_flg`) is ON, display a temporary registration confirmation message. Additionally, for Number Addition operations, check if the sender notification setting has changed, and check if work information fields contain data (which would be discarded during temporary registration).

| # | Type | Code |
|---|------|------|
| 1 | SET | `X31SDataBeanAccess svcFormBean = getServiceFormBean()` // Get service form bean |
| 2 | SET | `kariTourokuFlg = svcFormBean.sendMessageString(KKW00147SFConst.KARI_TOUROKU_FLG, DATABEAN_GET_VALUE)` // Get temporary registration flag |
| 3 | SET | `if (JKKCommonConst.FLG_ON.equals(kariTourokuFlg))` // If flag is "1" (on) |
| 4 | CALL | `JCCWebCommon.setMessageInfo(this, "EKB1220--I", new String[]{"Temporary registration proceeding. Separate registration update confirmation button for final registration."})` // Display temporary registration confirmation |

**Block 9.1** — [nested IF] Sender notification check `(L2544-2555)`

> For Number Addition operations, compare the sender notification setting between its initial value and the current value. If changed, display a warning message.

| # | Type | Code |
|---|------|------|
| 1 | SET | `no_tch_ini = svcFormBean.sendMessageString(KKW00147SFConst.HNO_TCHI_INI, DATABEAN_GET_VALUE)` // Get sender notification initial value |
| 2 | SET | `no_tch = svcFormBean.sendMessageString(KKW00147SFConst.HASINSHA_NO_TCH_L, DATABEAN_GET_VALUE)` // Get sender notification current value |
| 3 | SET | `no_tch = no_tch.substring(0, 1)` // Extract only the first character (code value) |
| 4 | SET | `if (!no_tch_ini.equals(no_tch))` // If initial and current values differ (sender notification changed) |
| 5 | CALL | `JKKWebCommon.setMessageInfo(this, JPCOnlineMessageConstant.EKBD790__I)` // Display warning: notification setting changed |

**Block 9.2** — [nested IF] Work information fields check `(L2577-2590)`

> If any work information field has a value (work method preservation, remarks 1/2, installation preference deadline, contact time, contact info, customer contact phone), display a warning that work information will be discarded during temporary registration.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `isNullBlank(rrk_way_hoki)` // Check work method preservation field |
| 2 | EXEC | `isNullBlank(kojiak_biko_1)` // Check remark 1 field |
| 3 | EXEC | `isNullBlank(kojiak_biko_2)` // Check remark 2 field |
| 4 | EXEC | `isNullBlank(tnkj_kipo_apo_kigen_ymd)` // Check installation preference deadline |
| 5 | EXEC | `isNullBlank(tel_rrk_kibo_time)` // Check contact time field |
| 6 | EXEC | `isNullBlank(koji_apo_rrks)` // Check contact info field |
| 7 | EXEC | `isNullBlank(cust_rrks_telno)` // Check customer contact phone field |
| 8 | SET | `if (any of above is non-null/blank)` // If any work info field has data |
| 9 | CALL | `JCCWebCommon.setMessageInfo(this, JPCOnlineMessageConstant.EKBD790__I, new String[]{"Work information entered will be discarded during temporary registration. Re-enter work information at final registration."})` // Display warning |

**Block 10** — [IF] BANGO (number portability) check `(L2593-2608)`

> For Number Addition operations (`IDO_DIV_BANGO_TSUIKA = "00041"`), check if the customer has BANGO (number portability) enabled but has not set a temporary fund setting code. Display a confirmation message if so.

| # | Type | Code |
|---|------|------|
| 1 | SET | `X31SDataBeanAccess bean = svcFormBean.getDataBeanArray(KKW00147SFConst.BMP_UM).getDataBean(0)` // Get BANGO availability DataBean |
| 2 | SET | `indStr = bean.sendMessageString(KKW00147SFConst.INDEX_01, DATABEAN_GET_VALUE)` // Get index |
| 3 | SET | `cdDiv = bean.sendMessageString(KKW00147SFConst.CD_DIV_LIST_01, DATABEAN_GET_VALUE, Integer.parseInt(indStr))` // Get code division |
| 4 | SET | `if (CD00002_ARI.equals(cdDiv) && "".equals(svcFormBean.sendMessageString(KKW00147SFConst.JMTE_CD_BMP, DATABEAN_GET_VALUE)))` // If BANGO has value AND temporary fund setting code is empty |
| 5 | CALL | `JCCWebCommon.setMessageInfo(this, "EKBE148--Q")` // Display confirmation: temporary fund setting required |

**Block 11** — [IF] VA (Virtual Apparatus) model change check `(L2613-2651)`

> For Telephone Information Change operations (`IDO_DIV_DENWA_HENKO = "00048"`), compare the VA model code and name before vs. after the change. If the VA model code or model name differs, display a confirmation message indicating the VA information has changed. The condition also checks for specific model names (eo光 Multifunction Router, eo Home Gateway) as part of the before-change state determination.

| # | Type | Code |
|---|------|------|
| 1 | SET | `vaModelCdBefore = svcFormBean.sendMessageString(KKW00147SFConst.VA_MODEL_CD_BEFORE, DATABEAN_GET_VALUE)` // Get VA model code before change |
| 2 | SET | `vaChoiceNm = getPulldownNm(svcFormBean, KKW00147SFConst.VA_CHOICE)` // Get pulldown selection name |
| 3 | SET | `vaKikiChgNoBefore = svcFormBean.sendMessageString(KKW00147SFConst.VA_KIKI_CHG_NO_BEFORE, DATABEAN_GET_VALUE)` // Get VA device change number before |
| 4 | SET | `if ((vaModelCdBefore != null && !"".equals(vaModelCdBefore)) || ((TKNRT_TAKNKIKI_MODEL_NM.equals(vaChoiceNm.trim()) || HGW_TAKNKIKI_MODEL_NM.equals(vaChoiceNm.trim())) || (vaKikiChgNoBefore != null && !"".equals(vaKikiChgNoBefore))))` // If before-change VA model code is set, or pulldown selection is eo光 Multifunction Router / eo Home Gateway, or device change number is set |
| 5 | SET | `vaModelCdAfter = svcFormBean.sendMessageString(KKW00147SFConst.VA_MODEL_CD, DATABEAN_GET_VALUE)` // Get VA model code after change |
| 6 | SET | `vaModelNmBefore = svcFormBean.sendMessageString(KKW00147SFConst.VA_MODEL_NM_BEFORE, DATABEAN_GET_VALUE)` // Get VA model name before |
| 7 | SET | `vaModelNmAfter = svcFormBean.sendMessageString(KKW00147SFConst.VA_MODEL_NM, DATABEAN_GET_VALUE)` // Get VA model name after |
| 8 | SET | `if (!vaModelCdBefore.equals(vaModelCdAfter) || !vaModelNmBefore.equals(vaModelNmAfter))` // If model code OR model name changed |
| 9 | CALL | `JCCWebCommon.setMessageInfo(this, "EKBC920--Q")` // Display confirmation: VA information changed |

**Block 12** — [RETURN] Final return `(L2654)`

> Always returns `true` to indicate successful processing completion. The actual screen transition is determined by the next screen ID set in Block 8.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return true` // Processing complete |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `ido_div` | Field | Operation type discriminator — determines which business validation branch to execute. Values: 00041 (Number Addition), 00042 (Number Change), 00043 (Number Cancellation), 00048 (Telephone Information Change) |
| `kari_touroku_flg` | Field | Temporary registration flag — when ON, indicates the registration is provisional and the user must perform a final confirmation update later |
| `svc_kei_ucwk_no` | Field | Service detail work number — internal tracking ID for service contract line items |
| `BANGO_TSUIKA` | Field | Number addition — adding a telephone number to an existing eo光 telephone service |
| `BANGO_HENKO` | Field | Number change — changing the telephone number itself |
| `BANGO_KAIYAKU` | Field | Number cancellation — canceling the telephone number service |
| `DENWA_HENKO` | Field | Telephone information change — changing telephone-related information (not the number) |
| `BMP_UM` | Field | BANGO (number portability) availability — indicates whether the customer has number portability enabled |
| `JMTE_CD_BMP` | Field | Temporary fund setting code (BANGO) — the code for temporary fund arrangement when using number portability |
| `BANGO` | Business term | Number Portability — the ability to retain an existing phone number when switching carriers or services |
| `VA` | Acronym | Virtual Apparatus — customer premises equipment (CPE) / home gateway device associated with the eo光 service |
| `VA_MODEL_CD` | Field | Virtual Apparatus model code — the technical model identifier of the home gateway |
| `VA_MODEL_NM` | Field | Virtual Apparatus model name — the human-readable name of the home gateway model |
| `TKNRT_TAKNKIKI_MODEL_NM` | Constant | "eo光多機能ルータ" (eo光 Multifunction Router) — Fujitsu's multi-function router model for eo光 |
| `HGW_TAKNKIKI_MODEL_NM` | Constant | "eoホームゲートウェイ" (eo Home Gateway) — Fujitsu's home gateway model for eo光 |
| `KKTK_SBT_CD_VA` | Constant | "50" — equipment type codefor eo telephone VA (Virtual Apparatus) |
| `HASINSHA_NO_TCH` | Field | Sender notification — NTT's caller ID notification service that sends notifications to the sender when making certain calls |
| `HASINSHA_NO_TCH_L` | Field | Sender notification (long format) — full-length sender notification setting field |
| `RRK_WAY_HOKI` | Field | Work method preservation — installation/work method preference field |
| `KOJIAK_BIKO_1` / `KOJIAK_BIKO_2` | Field | Individual remarks 1 and 2 — free-text remark fields for installation details |
| `TNKJ_KIBO_APO_KIGEN_YMD` | Field | Installation preference deadline date — requested deadline for installation |
| `TEL_RRK_KIBO_TIME` | Field | Telephone work preferred time — preferred contact time for installation |
| `KOJI_APO_RRKS` | Field | Work contact information — contact details for installation coordination |
| `CUST_RRKS_TELNO` | Field | Customer registration telephone number — customer contact phone for installation |
| `FUNC_CD_2` | Constant | "2" — Check-only function code — indicates `doAddTelephoneNumberInfo` runs in validation-only mode without persisting |
| `CD00002_ARI` | Constant | "1" — Code division: available / with value |
| `CD00002_NASI` | Constant | "0" — Code division: not available / no value |
| `FLG_ON` | Constant | "1" — Flag value for ON/active state |
| `EKB0370--I` | Message | Info message: "Telephone number registration" displayed on confirmation screen |
| `EKB1220--I` | Message | Info message: Temporary registration confirmation — informs user to perform final registration update |
| `EKBA410--Q` | Message | Warning message: Address confirmation required for number addition/change operations |
| `EKBD790--I` | Message | Warning message: Setting changed / Work information will be discarded |
| `EKBE148--Q` | Message | Confirmation message: Temporary fund setting (BANGO) required |
| `EKBC920--Q` | Message | Confirmation message: VA (Virtual Apparatus) information has changed |
| `EKB2990--Q` | Message | Error message: Service end date validation error — end date exceeds contract term |
| `KKW00147` | Screen | Telephone Number Registration screen — the initial registration form screen |
| `KKW00151` | Screen | Registration Confirmation screen — the confirmation screen displayed after successful registration check |
| `DataBean` | Pattern | Framework data transfer object — carries form data between the JSP view and logic layer |
| `confirmServiceFormBean` | Method | Pre-confirmation method that composes service form bean fields for display on the confirmation screen |
| `doAddTelephoneNumberInfo` | Method | Telephone number registration update check — validates and optionally updates telephone number data |
| `checkSVData` | Method | Server-side validation — validates service data integrity on the server |
| `reeditServiceFormBean` | Method | Re-edits the service form bean for display on the confirmation screen after processing |
| `actionKikiChange` | Method | Device change action — handles emergency recovery when server-side validation fails |
| `checkEmegencyAddress` | Method | Validates emergency address data for number addition/change operations |
| `UNYO_YMD` | Field | Operational period date — the service activation/operational start date (YYYYMMDD) |
| `SVC_END_TERM` | Field | Service end term — number of days from the operational period start to the service end date |
| `SVC_END_YMD` | Field | Service end date — the date when the service contract ends |
| `NO_GUIDE` | Field | Number guidance — telephone number guidance/information field |
| `TELNO_PRE_TCHI` | Field | Telephone number prior notification — pre-notification setting for telephone number changes |
| `PORT_NO` | Field | Port number — the port number assigned to the telephone line |
| `VA_CHOICE` | Field | VA selection — the pulldown selection for Virtual Apparatus model choice |
