# Business Logic — KKW05601SFLogic.actionTokiAddInit() [173 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKW05601SF.KKW05601SFLogic` |
| Layer | Service Component / Common Component (CC) |
| Module | `KKW05601SF` (Package: `eo.web.webview.KKW05601SF`) |

## 1. Role

### KKW05601SFLogic.actionTokiAddInit()

This method is the **initialization handler** for the Toki (トキ = Temporary) Registration Screen (トーキ登録画面), which handles the setup and display of temporary telephone installation equipment (トーキ = temporary cross-connect jack) for fiber optic services. It orchestrates a full screen init workflow: extracting inherited contract data from a parent screen, validating the contract and telephone status, conditionally checking address-change-related states (for 転送元先フラグ遷移 cases with code `00046` = "光電話・移転トーキ設定"), populating all display fields (target phone number, display pattern, installation preference, installation type, registration classification, end date, start date, transfer source number, contact number, reserved phone, and installation content), and building the reserved phone number pull-down list. The method follows a **gate-and-populate** pattern — it executes service lookups, performs sequential validation checks (contract validity, telephone status validity, address-change status), and only proceeds to field population if all checks pass. It acts as the **primary entry point** for screen initialization, called directly from `KKW05601SFLogic.actionInit()`, and serves as the bridge between the inherited data from prior screens and the current screen's form state. The method delegates to 16 internal helper methods for focused data retrieval and bean population, implementing a clear **delegation pattern** to keep the main flow readable.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["actionTokiAddInit()"])
    
    START --> BEAN["Get Screen Form Bean"]
    BEAN --> CHECK_BEAN{"Bean is null?"}
    CHECK_BEAN -->|Yes| THROW["Throw Exception"]
    CHECK_BEAN -->|No| LOG1["Log: Toki registration screen init start"]
    
    LOG1 --> GET_DATA["Read inheritance data from custKeiHktgiList"]
    GET_DATA --> EXTRACT["Extract: sysId, svcKeiNo, svcKeiUcwkNo, idoDiv, itnMotoSakiFlg, taishoTelNo"]
    EXTRACT --> LOG2["Log extracted values"]
    
    LOG2 --> SET_HKTG["setHktgDataTo(bean, sysId, svcKeiNo, ...)"]
    SET_HKTG --> INVOKE_SVC["invokeServiceKKSV0170(paramBean)"]
    INVOKE_SVC --> MAPPER["KKSV0170_KKSV0170OPDBMapper mapper"]
    
    MAPPER --> CHECK_DISP["initDispCheck(paramBean)"]
    CHECK_DISP --> CHECK_OK{"checkOk == true?"}
    
    CHECK_OK -->|No| GET_SCREEN["JCCWebCommon.getScreenId(this)"]
    GET_SCREEN --> CHECK_SCREEN{"Screen == KKW04207?"}
    CHECK_SCREEN -->|Yes| SET_ERR1["setErrorHktgInfo(KEIYAKU_ERROR)"]
    CHECK_SCREEN -->|No| RET_FALSE_1["Return false"]
    SET_ERR1 --> RET_FALSE_1
    
    CHECK_OK -->|Yes| CHECK_TELNO["initTelnoStatCheck(paramBean)"]
    CHECK_TELNO --> CHECK_TELNO_OK{"checkOkTelnoStat == true?"}
    
    CHECK_TELNO_OK -->|No| CHECK_SCREEN2{"Screen == KKW04207?"}
    CHECK_SCREEN2 -->|Yes| SET_ERR2["setErrorHktgInfo(DENWA_STAT_ERROR)"]
    CHECK_SCREEN2 -->|No| RET_FALSE_2["Return false"]
    SET_ERR2 --> RET_FALSE_2
    
    CHECK_TELNO_OK -->|Yes| CHECK_IDO{"idoDiv == 00046
(光電話移転トーキ)?"}
    
    CHECK_IDO -->|No| FETCH_LISTS["mapper.getTelNoList1(), getTelNoList2(), getTelNoList3()"]
    CHECK_IDO -->|Yes| FETCH_STATUS["mapper.getKojiakStat(), getMansKojiakStatCd(), getAdchgStat()"]
    
    FETCH_STATUS --> INIT_ADDR["initAddressChangeCheck(kojiAnkState, mansKojiAkStatCd, adchgStat)"]
    INIT_ADDR --> CHECK_ADDR{"checkOkShoki == true?"}
    CHECK_ADDR -->|No| RET_TRUE_1["Return true"]
    CHECK_ADDR -->|Yes| FETCH_LISTS
    
    FETCH_LISTS --> GET_SVC_BN["getSvcUcwkTelBean(paramBean)"]
    GET_SVC_BN --> SET_TOKI_TEL["Get tokiTgTelno from getInitData + set to bean"]
    SET_TOKI_TEL --> GET_BANPO["Get banpo (番ポ) from bean"]
    GET_BANPO --> SET_DISP["getDispPattern + set DISP_PATTERN to bean"]
    SET_DISP --> SET_TOKI_KIBO["Get tokiKiboUm (トキ希望) + set TOKI_KIBO_DSP to bean"]
    SET_TOKI_KIBO --> SET_TOKI_SBT["getTokiSbt (トキ種類) + set TOKI_SBT_DSP to bean"]
    SET_TOKI_SBT --> SET_TOKI_DIV["getAddDiv (トキ登録区分) + set TOKI_ADD_DIV_DSP to bean"]
    SET_TOKI_DIV --> SET_END_RSV["getEndRsvYmd (トキ終了予定日) + setYmdData + set TOKI_END_RSV_* to bean"]
    SET_END_RSV --> SET_MAN_STA["getStaRsvYmd (トキ手動開始予定日) + setYmdData + set TOKI_STA_RSV_* to bean"]
    SET_MAN_STA --> SET_ITENM_TEL["Set ITENM_TELNO = tokiTgTelno (移転元電話番号)"]
    SET_ITENM_TEL --> SET_RRKS_TEL["getRrksTelNo (連絡先電話番号) + set RRKS_TELNO to bean"]
    SET_RRKS_TEL --> SET_RSV_TEL["Get rsvTelNo (予約中電話番号) + set RSV_TELNO_DSP to bean"]
    SET_RSV_TEL --> SET_TOKI_NAIYO["Get TOKI_NAIYO_PAUSE + ADD_VALUE to TOKI_NAIYO"]
    SET_TOKI_NAIYO --> SET_PULLDOWN["setRsvTelNoPullDownList(paramBean, hktgKoumokuBean, idoDiv, mapper, tokiTgTelno)"]
    SET_PULLDOWN --> LOG_DUMP["JSYwebLog.println(DataBean_Dump)"]
    LOG_DUMP --> RET_TRUE_2["Return true"]
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| - | `(none)` | - | This method takes no parameters. It operates on the screen form bean obtained via `super.getServiceFormBean()` and inherited data stored in screen session state. |
| - | `paramBean[0]` | `X31SDataBeanAccess` | The screen form bean array (single-element). Represents the current screen's data context used for reading/writing display values. |
| - | `custKeiHktgiList` | `X31SDataBeanAccessArray` | Inheritance data list from a prior screen (typically the address change registration screen KKW04207). Contains contract and service context. |
| - | `hktgKoumokuBean` | `X31SDataBeanAccess` | The first data bean from `custKeiHktgiList`, carrying inherited screen items such as system ID, service contract number, service contract detail number, move classification, transfer source-sink flag, and target phone number. |
| - | `idoDiv` | `String` | Move classification code (異動区分). Determines whether the screen is for a phone relocation (転送) scenario. When `"00046"` (IDO_KBN_TEL_ITEN_TOKI), triggers additional address-change status checks. |
| - | `mapper` | `KKSV0170_KKSV0170OPDBMapper` | Service component mapper for KKSV0170, providing read access to contract status codes and phone number lists. |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `JCCWebCommon.getScreenId` | JCCWebCommon | - | Retrieves current screen ID to determine redirection behavior |
| R | `OneStopDataBeanAccessArray.getDataBean` | OneStopDataBeanAccessArray | - | Reads a specific data bean from the inheritance list |
| R | `OneStopDataBeanAccess.getDataBeanArray` | OneStopDataBeanAccess | - | Retrieves the inherited data bean array (custKeiHktgiList) from session |
| - | `OneStopDataBeanAccess.sendMessageString` | OneStopDataBeanAccess | - | Reads/writes screen form bean values (SET_VALUE, GET_VALUE, ADD_VALUE) |
| R | `JKKKeiNewCmnLogicUtil.getScreenId` | JKKKeiNewCmnLogic | - | Helper to retrieve current screen identifier |
| R | `KKW05601SFLogic.getAddDiv` | KKW05601SFLogic | - | Determines the temporary registration classification (トキ登録区分) based on display pattern and bean data |
| R | `KKW05601SFLogic.getDispPattern` | KKW05601SFLogic | - | Computes the display pattern for the screen |
| R | `KKW05601SFLogic.getEndRsvYmd` | KKW05601SFLogic | - | Calculates the temporary installation end reservation date (トキ終了予定日) |
| R | `KKW05601SFLogic.getInitData` | KKW05601SFLogic | - | Initializes and retrieves the target telephone number data |
| R | `KKW05601SFLogic.getRrksTelNo` | KKW05601SFLogic | - | Retrieves the contact telephone number (連絡先電話番号) |
| R | `KKW05601SFLogic.getStaRsvYmd` | KKW05601SFLogic | - | Calculates the temporary installation manual start reservation date (トキ手動開始予定日) |
| R | `KKW05601SFLogic.getSvcUcwkTelBean` | KKW05601SFLogic | - | Retrieves the service detail telephone number bean |
| R | `KKW05601SFLogic.getTokiSbt` | KKW05601SFLogic | - | Determines the temporary installation type (トキ種類) |
| - | `KKW05601SFLogic.initAddressChangeCheck` | KKW05601SFLogic | - | Validates address change status against construction order and maintenance order states |
| - | `KKW05601SFLogic.initDispCheck` | KKW05601SFLogic | - | Validates whether screen display/navigability is permitted based on contract status |
| - | `KKW05601SFLogic.initTelnoStatCheck` | KKW05601SFLogic | - | Validates whether screen navigation is permitted based on telephone status |
| - | `KKW05601SFLogic.invokeServiceKKSV0170` | KKW05601SFLogic | - | Invokes the KKSV0170 service component to retrieve contract and phone data |
| - | `KKW05601SFLogic.setErrorHktgInfo` | KKW05601SFLogic | - | Sets error inheritance information (KEIYAKU_ERROR or DENWA_STAT_ERROR) for forwarding to the previous screen |
| - | `KKW05601SFLogic.setHktgDataTo` | KKW05601SFLogic | - | Transfers inherited data (sysId, svcKeiNo, svcKeiUcwkNo, idoDiv) into the screen form bean |
| - | `KKW05601SFLogic.setRsvTelNoPullDownList` | KKW05601SFLogic | - | Configures the reserved phone number pull-down list with options from mapper |
| - | `KKW05601SFLogic.setYmdData` | KKW05601SFLogic | - | Splits a YYYYMMDD date string into year, month, day fields and sets them in the bean |
| R | `KKSV0170_KKSV0170OPDBMapper.getAdchgStat` | KKSV0170 | KKSV0170 | Reads address change status (住所変更ステータス) for construction order validation |
| R | `KKSV0170_KKSV0170OPDBMapper.getKojiakStat` | KKSV0170 | KKSV0170 | Reads construction order status (工事案件ステータス / 案件状態) |
| R | `KKSV0170_KKSV0170OPDBMapper.getMansKojiakStatCd` | KKSV0170 | KKSV0170 | Reads maintenance order status code (メンテナンス案件状態コード) |
| R | `KKSV0170_KKSV0170OPDBMapper.getTelNoList1` | KKSV0170 | KKSV0170 | Retrieves first phone number list for the service contract |
| R | `KKSV0170_KKSV0170OPDBMapper.getTelNoList2` | KKSV0170 | KKSV0170 | Retrieves second phone number list for the service contract |
| R | `KKSV0170_KKSV0170OPDBMapper.getTelNoList3` | KKSV0170 | KKSV0170 | Retrieves third phone number list for the service contract (used in pull-down) |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Caller: `KKW05601SFLogic.actionInit()` | `actionInit()` -> `actionTokiAddInit()` | `getAdchgStat [R] KKSV0170`, `getKojiakStat [R] KKSV0170`, `getMansKojiakStatCd [R] KKSV0170`, `getTelNoList1 [R] KKSV0170`, `getTelNoList2 [R] KKSV0170`, `getTelNoList3 [R] KKSV0170`, `setRsvTelNoPullDownList [-]`, `sendMessageString [-]`, `getRrksTelNo [R]`, `setYmdData [-]`, `getStaRsvYmd [R]`, `getEndRsvYmd [R]` |

**Call chain detail:** The method is called from `actionInit()` within the same class (`KKW05601SFLogic`). No external screen or batch entry points invoke this method directly — it is an internal initialization routine.

**Terminal operations reached from this method:**
- `setRsvTelNoPullDownList` (writes pull-down list)
- `sendMessageString` (multiple read/write operations on screen bean)
- `getRrksTelNo` (reads contact phone number)
- `setYmdData` (writes date split data)
- `getStaRsvYmd` / `getEndRsvYmd` (reads reservation dates)

## 6. Per-Branch Detail Blocks

### Block 1 — [IF] Bean null check (L243)

> Extract the screen form bean and validate it is not null.

| # | Type | Code |
|---|------|------|
| 1 | SET | `bean = super.getServiceFormBean()` |
| 2 | SET | `paramBean = { bean }` // single-element array wrapping the bean |
| 3 | IF | `null == bean` [L245] |

#### Block 1.1 — [IF-THEN] Bean is null (L245)

| # | Type | Code |
|---|------|------|
| 1 | THROW | `throw new Exception()` |

### Block 2 — [EXEC] Log start (L248)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `DEBUG_LOG.debug("####actionTokiAddInit start:トーキ登録画面初期表示")` // Log: Toki registration screen initial display |

### Block 3 — [EXEC] Read inheritance data (L251-261)

> Extract inherited screen items from the parent screen's data.

| # | Type | Code |
|---|------|------|
| 1 | SET | `custKeiHktgiList = paramBean[0].getDataBeanArray(KKW05601SFConst.CUST_KEI_HKTGI_LIST)` [-> `CUST_KEI_HKTGI_LIST`] // Inheritance data list |
| 2 | SET | `hktgKoumokuBean = custKeiHktgiList.getDataBean(0)` // First inherited data bean |
| 3 | SET | `sysId = hktgKoumokuBean.sendMessageString(KKW05601SFConst.SYSID_11, X31CWebConst.DATABEAN_GET_VALUE)` [-> `SYSID_11`] // System ID |
| 4 | SET | `svcKeiNo = hktgKoumokuBean.sendMessageString(KKW05601SFConst.SVC_KEI_NO_11, X31CWebConst.DATABEAN_GET_VALUE)` [-> `SVC_KEI_NO_11`] // Service contract number |
| 5 | SET | `svcKeiUcwkNo = hktgKoumokuBean.sendMessageString(KKW05601SFConst.SVC_KEI_UCWK_NO_11, X31CWebConst.DATABEAN_GET_VALUE)` [-> `SVC_KEI_UCWK_NO_11`] // Service contract detail number |
| 6 | SET | `idoDiv = hktgKoumokuBean.sendMessageString(KKW05601SFConst.IDO_DIV_11, X31CWebConst.DATABEAN_GET_VALUE)` [-> `IDO_DIV_11`] // Move classification code |
| 7 | SET | `itnMotoSakiFlg = hktgKoumokuBean.sendMessageString(KKW05601SFConst.ITN_MOTO_SAKI_11, X31CWebConst.DATABEAN_GET_VALUE)` [-> `ITN_MOTO_SAKI_11`] // Transfer source-sink flag (0: pre-activation, 1: post-activation from address change screen) |
| 8 | SET | `taishoTelNo = hktgKoumokuBean.sendMessageString(KKW05601SFConst.TOKI_TG_TELNO_11, X31CWebConst.DATABEAN_GET_VALUE)` [-> `TOKI_TG_TELNO_11`] // Target phone number for Toki |
| 9 | EXEC | `DEBUG_LOG.debug("####actionTokiAddInit start:sysId=" + sysId)` |
| 10 | EXEC | `DEBUG_LOG.debug("####actionTokiAddInit start:svcKeiNo=" + svcKeiNo)` |
| 11 | EXEC | `DEBUG_LOG.debug("####actionTokiAddInit start:svcKeiUcwkNo=" + svcKeiUcwkNo)` |
| 12 | EXEC | `DEBUG_LOG.debug("####actionTokiAddInit start:idoDiv" + idoDiv)` |
| 13 | EXEC | `DEBUG_LOG.debug("####actionTokiAddInit start:itnMotoSakiFlg（住所変更画面より、0:開通前、1:開通後）" + itnMotoSakiFlg)` // Log: Transfer source-sink flag (from address change screen, 0: pre-activation, 1: post-activation) |
| 14 | EXEC | `DEBUG_LOG.debug("####actionTokiAddInit start:トキ対象電話番号=" + taishoTelNo)` // Log: Toki target phone number |

### Block 4 — [CALL] Set inherited data (L264)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setHktgDataTo(bean, sysId, svcKeiNo, svcKeiUcwkNo, idoDiv)` // Transfer inherited data to screen bean |

### Block 5 — [CALL] Invoke service (L267)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `mapper = invokeServiceKKSV0170(paramBean)` // Invoke KKSV0170 service component to retrieve contract data |

### Block 6 — [IF] Contract status display check (L270-282)

> Validate whether screen display is permitted based on contract status.

| # | Type | Code |
|---|------|------|
| 1 | SET | `checkOk = initDispCheck(paramBean)` // Contract status validation |
| 2 | SET | `screenId = JCCWebCommon.getScreenId(this)` [L273] // ANK-4494-00-00 ADD |
| 3 | IF | `!checkOk` [L274] |

#### Block 6.1 — [IF-IF] Check screen ID for error inheritance (L275-277)

> If the source screen is the address change registration screen (KKW04207), set the inheritance error code so the previous screen can display the appropriate error message.

| # | Type | Code |
|---|------|------|
| 1 | IF | `JKKScreenConst.SCREEN_ID_KKW04207.equals(screenId)` [L276] |
| 2 | CALL | `setErrorHktgInfo("KEIYAKU_ERROR")` // Contract error - inherit to previous screen |

#### Block 6.2 — [IF-THEN-RETURN] Return false (L279)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return false` |

### Block 7 — [IF] Telephone status check (L283-294, ANK-4494-00-00 ADD)

> Validate whether screen display is permitted based on telephone status.

| # | Type | Code |
|---|------|------|
| 1 | SET | `checkOkTelnoStat = initTelnoStatCheck(paramBean)` [L285] // Telephone status validation |
| 2 | IF | `!checkOkTelnoStat` [L286] |

#### Block 7.1 — [IF-IF] Check screen ID for telephone error inheritance (L287-289)

> Same pattern as Block 6: if source is address change screen, set error inheritance.

| # | Type | Code |
|---|------|------|
| 1 | IF | `JKKScreenConst.SCREEN_ID_KKW04207.equals(screenId)` [L288] |
| 2 | CALL | `setErrorHktgInfo("DENWA_STAT_ERROR")` // Telephone status error - inherit to previous screen |

#### Block 7.2 — [IF-THEN-RETURN] Return false (L291)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return false` |

### Block 8 — [IF] Address-change status check for tel relocation type (L293-314, OM-2016-0000157 ADD)

> For "光電話・移転トーキ設定" (fiber phone relocation Toki setup, idoDiv = "00046"), validate construction order, maintenance order, and address change statuses.

| # | Type | Code |
|---|------|------|
| 1 | IF | `IDO_KBN_TEL_ITEN_TOKI.equals(idoDiv)` [IDO_KBN_TEL_ITEN_TOKI = `JJKCommonConst.IDO_DIV_VALUE_00046 = "00046"`] (L296) // Move classification: Fiber phone relocation Toki setup |

#### Block 8.1 — [EXEC] Read construction/maintenance/address-change statuses (L298-303)

| # | Type | Code |
|---|------|------|
| 1 | SET | `kojiAnkState = mapper.getKojiakStat()` // Construction order status |
| 2 | SET | `mansKojiAkStatCd = mapper.getMansKojiakStatCd()` // Maintenance order status code |
| 3 | SET | `adchgStat = mapper.getAdchgStat()` // Address change status |
| 4 | EXEC | `DEBUG_LOG.debug("####actionTokiAddInit:kojiAnkState：" + kojiAnkState)` |
| 5 | EXEC | `DEBUG_LOG.debug("####actionTokiAddInit:mansKojiAkStatCd：" + mansKojiAkStatCd)` |
| 6 | EXEC | `DEBUG_LOG.debug("####actionTokiAddInit:adchgStat：" + adchgStat)` |

#### Block 8.2 — [IF] Address-change validation (L305-308)

| # | Type | Code |
|---|------|------|
| 1 | SET | `checkOkShoki = initAddressChangeCheck(kojiAnkState, mansKojiAkStatCd, adchgStat)` |
| 2 | IF | `!checkOkShoki` [L306] |

##### Block 8.2.1 — [IF-THEN-RETURN] Return true (early exit) (L307)

> If address-change check fails, return true to proceed to field population (the restriction applies downstream).

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return true` |

### Block 9 — [CALL] Read phone number lists (L316-319)

> Retrieve phone number lists from the service component.

| # | Type | Code |
|---|------|------|
| 1 | SET | `list1 = mapper.getTelNoList1()` |
| 2 | SET | `list2 = mapper.getTelNoList2()` |
| 3 | SET | `list3 = mapper.getTelNoList3()` |
| 4 | EXEC | `DEBUG_LOG.debug("####actionTokiAddInit:list1.size：" + list1.size())` |
| 5 | EXEC | `DEBUG_LOG.debug("####actionTokiAddInit:list2.size：" + list2.size())` |
| 6 | EXEC | `DEBUG_LOG.debug("####actionTokiAddInit:list3.size：" + list3.size())` |

### Block 10 — [CALL] Get service detail telephone bean (L321)

| # | Type | Code |
|---|------|------|
| 1 | SET | `svcUtwkEoTelBean = getSvcUcwkTelBean(paramBean)` |

### Block 11 — [CALL] Set target phone number (L324-327)

> Set the temporary installation target phone number (トキ対象電話番号) in the screen bean.

| # | Type | Code |
|---|------|------|
| 1 | SET | `tokiTgTelno = getInitData(hktgKoumokuBean, svcUtwkEoTelBean, KKW05601SFConst.TOKI_TG_TELNO_11, KKW05601SFConst.TELNO_05)` |
| 2 | EXEC | `paramBean[0].sendMessageString(KKW05601SFConst.TOKI_TG_TELNO, X31CWebConst.DATABEAN_SET_VALUE, tokiTgTelno)` [-> `TOKI_TG_TELNO`] |
| 3 | EXEC | `DEBUG_LOG.debug("####actionTokiAddInit:トキ対象電話番号：" + tokiTgTelno)` |

### Block 12 — [CALL] Read banpo and keiyakuJotai (L329-333)

> Read existing banpo (番ポ = telephone number portability indicator) and contract status from the bean (pre-set values).

| # | Type | Code |
|---|------|------|
| 1 | SET | `banpo = paramBean[0].sendMessageString(KKW05601SFConst.BANGO_PORTA, X31CWebConst.DATABEAN_GET_VALUE)` [-> `BANGO_PORTA`] |
| 2 | SET | `keiyakuJotai = paramBean[0].sendMessageString(KKW05601SFConst.KEIYAKU_JOTAI, X31CWebConst.DATABEAN_GET_VALUE)` [-> `KEIYAKU_JOTAI`] |
| 3 | EXEC | `DEBUG_LOG.debug("####actionTokiAddInit:番ポ：" + banpo)` |
| 4 | EXEC | `DEBUG_LOG.debug("####actionTokiAddInit:契約状態：" + keiyakuJotai)` |

### Block 13 — [CALL] Set display pattern (L336-338)

| # | Type | Code |
|---|------|------|
| 1 | SET | `dispPattern = getDispPattern(paramBean[0], hktgKoumokuBean)` |
| 2 | EXEC | `paramBean[0].sendMessageString(KKW05601SFConst.DISP_PATTERN, X31CWebConst.DATABEAN_SET_VALUE, dispPattern)` [-> `DISP_PATTERN`] |
| 3 | EXEC | `DEBUG_LOG.debug("####actionTokiAddInit:表示パターン の設定：" + dispPattern)` |

### Block 14 — [CALL] Set Toki installation preference (L341-344)

> Set the customer's installation preference (トキ希望) in the bean.

| # | Type | Code |
|---|------|------|
| 1 | SET | `tokiKiboUm = hktgKoumokuBean.sendMessageString(KKW05601SFConst.ITNTOKI_KIBO_UM_11, X31CWebConst.DATABEAN_GET_VALUE)` [-> `ITNTOKI_KIBO_UM_11`] |
| 2 | EXEC | `paramBean[0].sendMessageString(KKW05601SFConst.TOKI_KIBO_DSP, X31CWebConst.DATABEAN_SET_VALUE, tokiKiboUm)` [-> `TOKI_KIBO_DSP`] |
| 3 | EXEC | `DEBUG_LOG.debug("####actionTokiAddInit:トキ希望：" + tokiKiboUm)` |

### Block 15 — [CALL] Set Toki installation type (L347-350)

> Set the temporary installation type (トキ種類) in the bean.

| # | Type | Code |
|---|------|------|
| 1 | SET | `tokiSbt = getTokiSbt(hktgKoumokuBean, svcUtwkEoTelBean)` |
| 2 | EXEC | `paramBean[0].sendMessageString(KKW05601SFConst.TOKI_SBT_DSP, X31CWebConst.DATABEAN_SET_VALUE, tokiSbt)` [-> `TOKI_SBT_DSP`] |
| 3 | EXEC | `DEBUG_LOG.debug("####actionTokiAddInit:トキ種類：" + tokiSbt)` |

### Block 16 — [CALL] Set Toki registration classification (L353-356)

> Set the temporary registration classification (トキ登録区分) — whether this is a new registration, change, or cancellation.

| # | Type | Code |
|---|------|------|
| 1 | SET | `tokiAddDiv = getAddDiv(hktgKoumokuBean, svcUtwkEoTelBean, dispPattern)` |
| 2 | EXEC | `paramBean[0].sendMessageString(KKW05601SFConst.TOKI_ADD_DIV_DSP, X31CWebConst.DATABEAN_SET_VALUE, tokiAddDiv)` [-> `TOKI_ADD_DIV_DSP`] |
| 3 | EXEC | `DEBUG_LOG.debug("####actionTokiAddInit:トキ登録区分：" + tokiAddDiv)` |

### Block 17 — [CALL] Set Toki end reservation date (L359-364)

> Set the temporary installation end date (トキ終了予定日) split into year/month/day fields.

| # | Type | Code |
|---|------|------|
| 1 | SET | `tokiEndRsvYmd = getEndRsvYmd(paramBean[0], hktgKoumokuBean)` |
| 2 | CALL | `setYmdData(paramBean[0], tokiEndRsvYmd, KKW05601SFConst.TOKI_END_RSV_YEAR, KKW05601SFConst.TOKI_END_RSV_MON, KKW05601SFConst.TOKI_END_RSV_DAY)` |
| 3 | EXEC | `DEBUG_LOG.debug("####actionTokiAddInit:トキ終了予定日：" + tokiEndRsvYmd)` |

### Block 18 — [CALL] Set Toki manual start reservation date (L367-372)

> Set the manual start date (トキ手動開始予定日) split into year/month/day fields.

| # | Type | Code |
|---|------|------|
| 1 | SET | `tokiManStaRsvYmd = getStaRsvYmd(paramBean[0], hktgKoumokuBean)` |
| 2 | CALL | `setYmdData(paramBean[0], tokiManStaRsvYmd, KKW05601SFConst.TOKI_STA_RSV_YEAR, KKW05601SFConst.TOKI_STA_RSV_MON, KKW05601SFConst.TOKI_STA_RSV_DAY)` |
| 3 | EXEC | `DEBUG_LOG.debug("####actionTokiAddInit:トキ手動開始予定日：" + tokiManStaRsvYmd)` |

### Block 19 — [CALL] Set transfer source phone number (L375-380)

> Set the transfer source phone number (移転元電話番号) — same as the target phone number (IT2-2012-0002125 mod: changed from getItenMotoTelNo to direct assignment).

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `paramBean[0].sendMessageString(KKW05601SFConst.ITENM_TELNO, X31CWebConst.DATABEAN_SET_VALUE, tokiTgTelno)` [-> `ITENM_TELNO`] // IT2-2012-0002125 mod: set same as target phone number |

### Block 20 — [CALL] Set contact phone number (L383-386)

> Set the contact phone number (連絡先電話番号).

| # | Type | Code |
|---|------|------|
| 1 | SET | `rrksTelNo = getRrksTelNo(hktgKoumokuBean)` |
| 2 | EXEC | `paramBean[0].sendMessageString(KKW05601SFConst.RRKS_TELNO, X31CWebConst.DATABEAN_SET_VALUE, rrksTelNo)` [-> `RRKS_TELNO`] |

### Block 21 — [CALL] Set reserved phone number display (L389-392)

> Set the phone number currently under reservation (予約中電話番号) in the display field.

| # | Type | Code |
|---|------|------|
| 1 | SET | `rsvTelNo = hktgKoumokuBean.sendMessageString(KKW05601SFConst.RSV_TELNO_S_11, X31CWebConst.DATABEAN_GET_VALUE)` [-> `RSV_TELNO_S_11`] |
| 2 | EXEC | `paramBean[0].sendMessageString(KKW05601SFConst.RSV_TELNO_DSP, X31CWebConst.DATABEAN_SET_VALUE, rsvTelNo)` [-> `RSV_TELNO_DSP`] |

### Block 22 — [CALL] Set Toki content (トキ内容) (L395-397)

> Set the initial installation content (トキ内容) — a pause/suspend description added as a value to the bean.

| # | Type | Code |
|---|------|------|
| 1 | SET | `tokiNaiyoInit = paramBean[0].sendMessageString(KKW05601SFConst.TOKI_NAIYO_PAUSE, X31CWebConst.DATABEAN_GET_VALUE)` [-> `TOKI_NAIYO_PAUSE`] |
| 2 | EXEC | `paramBean[0].sendMessageString(KKW05601SFConst.TOKI_NAIYO, X31CWebConst.DATABEAN_ADD_VALUE, tokiNaiyoInit)` [-> `TOKI_NAIYO`] |

### Block 23 — [CALL] Set reserved phone pull-down list (L400-401, ST2-2013-0001374 ADD)

> Configure the reserved phone number pull-down list with options for selection.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setRsvTelNoPullDownList(paramBean, hktgKoumokuBean, idoDiv, mapper, tokiTgTelno)` |

### Block 24 — [CALL] Log data bean dump + Return (L404-405)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `JSYwebLog.println(JSYwebLog.DataBean_Dump, getClass(), dumpDatabean(), null, null, null)` |
| 2 | RETURN | `return true` |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| トキ (Toki) | Business term | Temporary cross-connect jack — temporary telephone installation equipment used during fiber optic construction/transfer |
| トキ登録画面 (Toki Touroku Gammen) | Business term | Toki Registration Screen — the UI screen for setting up temporary cross-connect equipment |
| 異動区分 (Ido Kaku-bun) | Field | Move classification code — classifies the type of service change (e.g., new installation, relocation, transfer) |
| 光電話・移転トーキ設定 (Hikari Denwa Iten Toki Setchi) | Business term | Fiber Phone Relocation Toki Setup — service type code "00046" for phone relocation scenarios involving fiber optic services |
| 移転元先フラグ (Iten Moto-saki Flag) | Field | Transfer source-sink flag — indicates timing context: 0 = pre-activation, 1 = post-activation (from address change screen) |
| 案件状態 (Anken Joutai) | Field | Construction order status — the current state of the work order/construction case |
| メンテナンス案件状態コード (Manteinance Anken Joutai Code) | Field | Maintenance order status code — status of maintenance-related construction orders |
| 住所変更ステータス (Jusho Henkou Status) | Field | Address change status — tracks whether an address change has been applied |
| 番ポ (Banpo) | Business term | Telephone number portability indicator — indicates whether the phone number is ported |
| 契約状態 (Keiyaku Joutai) | Field | Contract status — the current state of the service contract |
| 表示パターン (Hyoji Pattern) | Field | Display pattern — determines how the screen's form fields are rendered |
| トキ希望 (Toki Kibou) | Field | Customer's preferred temporary installation arrangement |
| トキ種類 (Toki Shu-rui) | Field | Temporary installation type — classifies the kind of temporary setup (e.g., new, change) |
| トキ登録区分 (Toki Touroku Kaku-bun) | Field | Toki registration classification — distinguishes new registration, modification, or cancellation |
| トキ終了予定日 (Toki Shuuryo Yotebi) | Field | Temporary installation end reservation date |
| トキ手動開始予定日 (Toki Shudou Kaishi Yotebi) | Field | Temporary installation manual start reservation date |
| 移転元電話番号 (Iten-moto Denwabango) | Field | Transfer source phone number — the original phone number before relocation |
| 連絡先電話番号 (Renrakusaki Denwabango) | Field | Contact phone number for the customer |
| 予約中電話番号 (Yoyakuchuu Denwabango) | Field | Phone number currently under reservation |
| トキ内容 (Toki Naiyo) | Field | Toki content — description of the temporary installation content/suspend status |
| KEIYAKU_ERROR | Constant | Contract error code set for inheritance to the address change registration screen |
| DENWA_STAT_ERROR | Constant | Telephone status error code set for inheritance to the address change registration screen |
| KKW04207 | Screen ID | Address Change Registration Screen — the source screen for inherited contract data |
| KKSV0170 | Service Component | Service Component for retrieving construction/maintenance order data and phone number lists |
| KKSV0170OPDBMapper | Mapping class | Object-DB mapper for KKSV0170 — provides data access methods |
| 開通前 (Kaitsumamae) | Business term | Pre-activation — before the service line is activated |
| 開通後 (Kaitsumago) | Business term | Post-activation — after the service line has been activated |
| X31SDataBeanAccess | Technical | Screen form data bean — carries screen display and input data |
| X31SDataBeanAccessArray | Technical | Array wrapper for screen form data beans — used for inheritance data |
| OneStopDataBeanAccess | Technical | OneStop framework bean access utility — provides cross-session data access |
| JCCWebCommon | Technical | Web common utility component — shared web-layer utilities including screen ID retrieval |
| JKKScreenConst | Technical | Screen constant definitions — contains screen ID constants like SCREEN_ID_KKW04207 |
| JKKCommonConst.IDO_DIV_VALUE_00046 | Constant | Move classification code "00046" — represents "Fiber phone relocation Toki setup" |
| KKW05601SF | Screen Module | Screen module for Toki (temporary jack) registration operations |
| 転送 (Tenou) | Business term | Forwarding/Relocation — in telecom context, transferring a phone line to a different location |
| 工事案件 (Kouji Anken) | Business term | Construction order/case — a work order for physical installation/construction work |
