# Business Logic — FUW01403SFLogic.editRegData() [413 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.FUW01403SF.FUW01403SFLogic` |
| Layer | Controller (Web Layer — frontend service form logic) |
| Module | `FUW01403SF` (Package: `eo.web.webview.FUW01403SF`) |

## 1. Role

### FUW01403SFLogic.editRegData()

This method performs the **registration data preparation and editing** step for the K-Opticom number portability (number portability transfer) service ordering screen (FUW01403SF). Its business purpose is to transform the raw form input values submitted by the customer on the number portability transfer screen into a structured registration data payload, which is then stored in the serviceFormBean for subsequent service interface submission.

The method handles **three main business domains**: (1) **Telecom Provider Selection** — resolving the selected telecommunications carrier from a combo box dropdown into the corresponding carrier code and name; (2) **Number Portability Address Resolution** — branching on the number portability usage flag (`bmpUm`) to determine whether to clear all portability-related fields (not porting) or to resolve the installation address from one of three sources (current location, contract address, or other custom address); and (3) **Contractor Name Assembly** — branching on the contractor name choice and contractor type code (individual vs. legal entity) to correctly compose the full contractor name and katakana name with appropriate field concatenation rules.

The method implements the **builder/data-transformer design pattern**: it reads from multiple source beans (shared form bean for existing customer/contract data, service form bean for screen input), performs conditional data manipulation, and writes the result into the service form bean in a format expected by downstream service interfaces. It does not perform any database operations or external API calls directly — it is purely a data preparation layer.

This method is called by `FUW01403SFLogic.cfm()` (the screen's main processing method), serving as the **data editing step within the screen's request processing pipeline**. It prepares two detail records: a submission detail record (with form code "01" for WEB) and a discrepancy reason detail record (with reason code "C1" for price change receipt), both required by their respective service IFs which mandate at least one record per detail list.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START["editRegData"] --> GET_TSJGS["Get Telecom Provider Combo Box"]
    GET_TSJGS --> GET_INDEX["Get Telecom Provider Index"]
    GET_INDEX --> GET_CD_NM["Get Telecom Provider Code and Name"]
    GET_CD_NM --> GET_PARENTS["Get Parent Beans: genCustKeiInfo, svcKeiInfo, seikyKeiInfo"]
    GET_PARENTS --> GET_LISTS["Get Service Form Lists: svcKeiInfoList, kktkSvcKeiList"]
    GET_LISTS --> GET_COND["Get Condition Fields: bmpUm, nttAdChoice, noTchSvcChoice, pplanCd, keishaTypeCd"]
    GET_COND --> GET_ADD["Get Additional Fields: stcPlaceAdChoice, kshnmChoice"]
    GET_ADD --> GET_SRC["Get Source Fields: telNo parts, kaisen place info, updDtmBf"]
    GET_SRC --> COMPOSE_TEL["Compose Full Telephone Number"]
    COMPOSE_TEL --> JUDGE_KYOKU["Extract Judge Kyoku No (First 7 Digits)"]
    JUDGE_KYOKU --> TRANSFER["Transfer Fields to serviceFormBean"]
    TRANSFER --> REFORMAT["Reformat Postal Code with Hyphen"]
    REFORMAT --> NO_TCH_FLG["Set NoTchSvcAddFlg"]
    NO_TCH_FLG --> NO_TCH_UM["Set NoTchSvcUm"]
    NO_TCH_UM --> PCRS_FLG["Set KktkPcrsChgFlg Based on Price Plan"]
    PCRS_FLG --> COND_BMP{bmpUm = 0}
    COND_BMP -->|Yes| CLEAR_ALL["Clear Carrier and Address Fields"]
    CLEAR_ALL --> SET_KYOKU_0["Set KyokuNoKeishaFlg = 0"]
    SET_KYOKU_0 --> CREATE_REC
    COND_BMP -->|No| COND_BMP1{bmpUm = 1}
    COND_BMP1 -->|No| CREATE_REC["Create Detail Records"]
    COND_BMP1 -->|Yes| COND_STC{stcPlaceAdChoice}
    COND_STC -->|Use Current Place| TRANSFER_SRC_PLACE["Transfer Current Place Address"]
    TRANSFER_SRC_PLACE --> TRANSFER_CONTRACT_ADDR["Transfer Contract Address"]
    TRANSFER_CONTRACT_ADDR --> TRANSFER_OTHER_ADDR["Transfer Other Address"]
    TRANSFER_OTHER_ADDR --> CHECK_KSHNM
    COND_STC -->|Contract Address| TRANSFER_CONTRACT_ADDR
    COND_STC -->|Other Place| TRANSFER_OTHER_ADDR
    CHECK_KSHNM --> KSHNM_CONTRACT{KshnmChoice = 1}
    KSHNM_CONTRACT -->|Yes| USE_CUST_NAME["Use Customer Name from genCustKeiInfo"]
    KSHNM_CONTRACT -->|No| KSHNM_OTHER{KeishaTypeCd = 2}
    KSHNM_OTHER -->|Yes| USE_SEI_ONLY["Set Sei Name Only"]
    KSHNM_OTHER -->|No| USE_FULL_NAME["Set Full Name with Space"]
    USE_CUST_NAME --> CHECK_KYOKU
    USE_SEI_ONLY --> CHECK_KYOKU
    USE_FULL_NAME --> CHECK_KYOKU
    CHECK_KYOKU{KeishaTypeCd 1 or 2}
    CHECK_KYOKU -->|Yes| SET_KYOKU_1["Set KyokuNoKeishaFlg = 1"]
    CHECK_KYOKU -->|No| SET_KYOKU_0_B["Set KyokuNoKeishaFlg = 0"]
    SET_KYOKU_1 --> CREATE_REC
    SET_KYOKU_0_B --> CREATE_REC
    CREATE_REC --> CREATE_MSKM["Create MskmDtlList with FormCd = 01"]
    CREATE_MSKM --> CREATE_IDO["Create IdoDtlList with RsnCd = C1"]
    CREATE_IDO --> END_NODE["Return"]
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `commonInfoBean` | `final X31SDataBeanAccess` | Shared form bean carrying existing customer contract data, service contract information, and billing contract information. Accessed via nested paths (`GEN_CUST_KEI_INFO`, `SVC_KEI_INFO`, `SEIKY_KEI_INFO`) to retrieve customer name, katakana name, contractor type code, and previous service contract timestamps. This represents the customer's current registered data in the K-Opticom system. |
| 2 | `serviceFormBean` | `final X31SDataBeanAccess` | Screen input/output bean for the number portability transfer service form. Contains telecom provider combo box selections, number portability usage choice, contractor name choice, installation location choice, price plan code, and service contract lists. After this method executes, it holds the fully prepared registration data payload for downstream service submission. |

**External state / instance fields read:**
| Field | Type | Business Meaning |
|-------|------|------------------|
| `DEBUG_LOG` | Logger | Debug logging utility for method entry/exit tracing |
| `BLANK_7` | `String = "       "` | 7-space blank string used for string padding when extracting judge office number |
| `BMP_UM_0` | `String = "0"` | Number portability non-usage flag — when `bmpUm` equals "0", portability is not being used |
| `BMP_UM_1` | `String = "1"` | Number portability usage flag — when `bmpUm` equals "1", portability is being used |
| `KYOKU_NO_KEISHA_FLG_0` | `String = "0"` | Judge office one-agreement non-target flag — set when contractor is not subject to judge office one-agreement |
| `KYOKU_NO_KEISHA_FLG_1` | `String = "1"` | Judge office one-agreement target flag — set when contractor type is individual (1) or legal entity (2) |
| `PROP_ID_STC_PLACE_AD_CHOICE_USE_PLACE` | `String = "STC_PLACE_AD_CHOICE_USE_PLACE"` | Property key for display text: "Current service installation location address" |
| `PROP_ID_STC_PLACE_AD_CHOICE_CONTRACT` | `String = "STC_PLACE_AD_CHOICE_CONTRACT"` | Property key for display text: "Same as contract address" |
| `PROP_ID_STC_PLACE_AD_CHOICE_OTHER` | `String = "STC_PLACE_AD_CHOICE_OTHER"` | Property key for display text: "Other installation location address" |
| `PROP_ID_KSHNM_CHOICE_CONTRACT` | `String = "KSHNM_CHOICE_CONTRACT"` | Property key for display text: "Same as contracting party" |
| `PROP_ID_KSHNM_CHOICE_OTHER` | `String = "KSHNM_CHOICE_OTHER"` | Property key for display text: "Other contracting party name" |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `JFUWebCommon.getDataBeanTypeByPath` | - | - | Reads nested bean references from `commonInfoBean` and `serviceFormBean` to resolve data paths |
| R | `JFUWebCommon.createAndGetDataBeanTypeByPath` | - | - | Creates new nested bean paths for `mskmDtlList` and `idoDtlList` detail record containers |
| R | `JFUWebCommon.getDispText` | - | - | Resolves display text from properties files using property keys for choice labels (installation location, contractor name) |
| R | `serviceFormBean.sendMessageString(GET)` | - | - | Retrieves string values from service form bean fields (carrier code, contractor type, price plan, etc.) |
| R | `serviceFormBean.sendMessageBoolean(GET)` | - | - | Retrieves boolean value for no-tachNotify service choice flag |
| R | `svcKeiInfoList.sendMessageString(GET)` | - | - | Retrieves fields from service contract info list (service contract line-item work number, installation address, postal code) |
| R | `kktkSvcKeiList.sendMessageString(GET)` | - | - | Retrieves fields from equipment provision service contract list (service number, registration date/time, price plan code) |
| R | `genCustKeiInfo.sendMessageString(GET)` | - | - | Retrieves fields from current customer contract info (customer name, katakana name, contractor type code) |
| R | `svcKeiInfo.sendMessageString(GET)` | - | - | Retrieves fields from service contract info (provision method contract number, last update datetime) |
| R | `seikyKeiInfo.sendMessageString(GET)` | - | - | Retrieves billing contract number from billing contract info |
| R | `tsjgsCombobox.sendMessageString(GET)` | - | - | Retrieves telecom provider combo box index and associated code/name lists |
| SET | `serviceFormBean.sendMessageString(SET)` | - | - | Writes/sets field values to service form bean (mapped fields, flags, composed values) |
| SET | `serviceFormBean.sendMessageBoolean(SET)` | - | - | Sets boolean field (personal information agreement choice) to false |
| SET | `tsjgsCombobox.sendMessageString(SET, CLEAR)` | - | - | Clears the telecom provider combo box selection index |
| CLEAR | `serviceFormBean.sendMessage(CLEAR)` | - | - | Clears multiple string/boolean fields when number portability is not used (carrier, address, telephone, name fields) |
| - | `String.substring(0, 7)` | - | - | Extracts first 7 characters of telephone number for judge office number identification |
| - | `JFUCommonUtil.nvl(value, EMPTY)` | - | - | Null-safe value resolution — returns empty string if value is null |
| - | `JFUStrConst.EMPTY` | - | - | Constant: empty string literal used as default for null telephone notification service field |
| - | `JFUStrConst.SPACE` | - | - | Constant: space character used to separate contractor name surname and given name |

**CRUD Classification Summary:**
This method performs **zero database operations**. It is a pure data transformation layer that reads from in-memory beans, applies conditional logic and string manipulation, and writes results back to the service form bean. No entities, tables, or service components are directly accessed.

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | `FUW01403SFLogic.cfm()` | `cfm()` → `editRegData(commonInfoBean, serviceFormBean)` | `getDispText [R]`, `getDispText [R]`, `sendMessage [CLEAR]`, `sendMessage [CLEAR]`, `sendMessage [CLEAR]`, `sendMessage [CLEAR]`, `sendMessage [CLEAR]`, `sendMessageString [-]`, `sendMessageString [-]`, `sendMessageString [-]`, `createAndGetDataBeanTypeByPath [C]`, `createAndGetDataBeanTypeByPath [C]`, `sendMessageString [-]`, `sendMessageString [-]`, `createAndGetDataBeanTypeByPath [C]`, `createAndGetDataBeanTypeByPath [C]`, `createAndGetDataBeanTypeByPath [C]`, `createAndGetDataBeanTypeByPath [C]` |

**Analysis:** This method is called exclusively by `FUW01403SFLogic.cfm()`, which is the main processing entry point for the FUW01403SF screen (Number Portability Transfer Service). The method operates at the presentation layer — it reads from screen beans (no external services) and prepares data for downstream service interfaces. No DB reads or writes are performed.

## 6. Per-Branch Detail Blocks

### Block 1 [GET] Telecom Provider Information Extraction (L1470)

> Extracts the selected telecom carrier code and name from the combo box dropdown on the service form.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `JFUWebCommon.getDataBeanTypeByPath(serviceFormBean, TSJGS_COMBOBOX)` |
| 2 | CALL | `tsjgsCombobox.sendMessageString(TSJGS_CD_04, GET)` — Get telecom provider combo box selection index |
| 3 | SET | `index = Integer.parseInt(tsjgsCombobox.sendMessageString(TSJGS_CD_04, GET))` |
| 4 | CALL | `tsjgsCombobox.sendMessageString(TSJGS_CD_LIST_04, GET, index)` — Get telecom provider code at selected index |
| 5 | SET | `String tsjgsCd` — Telecom provider code |
| 6 | CALL | `tsjgsCombobox.sendMessageString(TSJGS_NM_LIST_04, GET, index)` — Get telecom provider name at selected index |
| 7 | SET | `String tsjgsNm` — Telecom provider name |

### Block 2 [GET] Parent Bean and List Bean Resolution (L1482)

> Resolves nested bean paths for existing customer contract data, service contract data, and billing contract data from both the shared form bean and the service form bean.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `JFUWebCommon.getDataBeanTypeByPath(commonInfoBean, JFUWebCommon.GEN_CUST_KEI_INFO)` — Current customer contract info |
| 2 | SET | `X31SDataBeanAccess genCustKeiInfo` — Parent bean for customer data |
| 3 | CALL | `JFUWebCommon.getDataBeanTypeByPath(commonInfoBean, JFUWebCommon.SVC_KEI_INFO)` — Service contract info |
| 4 | SET | `X31SDataBeanAccess svcKeiInfo` — Service contract info bean |
| 5 | CALL | `JFUWebCommon.getDataBeanTypeByPath(commonInfoBean, JFUWebCommon.SEIKY_KEI_INFO)` — Billing contract info |
| 6 | SET | `X31SDataBeanAccess seikyKeiInfo` — Billing contract info bean |
| 7 | CALL | `JFUWebCommon.getDataBeanTypeByPath(serviceFormBean, FUW01403SFConst.SVC_KEI_INFO_LIST)` — Service contract info list |
| 8 | SET | `X31SDataBeanAccess svcKeiInfoList` |
| 9 | CALL | `JFUWebCommon.getDataBeanTypeByPath(serviceFormBean, FUW01403SFConst.KKTK_SVC_KEI_LIST)` — Equipment provision service contract list |
| 10 | SET | `X31SDataBeanAccess kktkSvcKeiList` |

### Block 3 [GET] Condition Field Extraction (L1500)

> Extracts conditional flags and codes that control subsequent branching logic.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `serviceFormBean.sendMessageString(BMP_UM, GET)` — Number portability usage selection value |
| 2 | SET | `String bmpUm` — "0" (not used) or "1" (continue/porting) |
| 3 | CALL | `serviceFormBean.sendMessageString(NTT_AD_CHOICE, GET)` — NTT contract address selection |
| 4 | SET | `String nttAdChoice` |
| 5 | CALL | `serviceFormBean.sendMessageBoolean(NO_TCH_SVC_CHOICE, GET)` — Nouchakusha bangou notification service choice |
| 6 | SET | `Boolean noTchSvcChoice` |
| 7 | CALL | `kktkSvcKeiList.sendMessageString(PPLAN_CD_02, GET)` — Price plan code for equipment provision |
| 8 | SET | `String pplanCd` — e.g., "PC0401" (VA1 Port Fixed Plan), "PG0301" |
| 9 | CALL | `genCustKeiInfo.sendMessageString(CommonInfoCFConst.KEISHA_TYPE_CD_22, GET)` — Contractor type code |
| 10 | SET | `String keishaTypeCd` — "1" (Individual) or "2" (Legal Entity) |
| 11 | CALL | `serviceFormBean.sendMessageString(STC_PLACE_AD_CHOICE, GET)` — Installation location address selection [ANK-2535] |
| 12 | SET | `String stcPlaceAdChoice` |
| 13 | CALL | `serviceFormBean.sendMessageString(KSHNM_CHOICE, GET)` — Contractor name choice [ANK-2535] |
| 14 | SET | `String kshnmChoice` |

### Block 4 [GET] Source Data Field Extraction (L1521)

> Extracts all fields that will be mapped from source beans to the service form bean. Includes telephone number components, installation address details, and contract timestamps.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `svcKeiInfoList.sendMessageString(SVC_KEI_KAISEN_UCWK_NO_01, GET)` — Service contract line-item work number |
| 2 | SET | `String svcKeiKaisenUcwkNo` |
| 3 | CALL | `kktkSvcKeiList.sendMessageString(KKTK_SVC_KEI_NO_02, GET)` — Equipment provision service contract number |
| 4 | SET | `String kktkSvcKeiNo` |
| 5 | CALL | `kktkSvcKeiList.sendMessageString(GENE_ADD_DTM_02, GET)` — Equipment provision registration date/time |
| 6 | SET | `String geneAddDtm` |
| 7 | CALL | `svcKeiInfo.sendMessageString(CommonInfoCFConst.TK_HOSHIKI_KEI_NO_23, GET)` — Provision method contract number |
| 8 | SET | `String tkHoshikiKeiNo` |
| 9 | CALL | `seikyKeiInfo.sendMessageString(CommonInfoCFConst.SEIKY_KEI_NO_32, GET)` — Billing contract number |
| 10 | SET | `String seikyKeiNo` |
| 11 | CALL | `serviceFormBean.sendMessageString(TEL_AREA, GET)` — Phone number area code |
| 12 | SET | `String telNoArea` |
| 13 | CALL | `serviceFormBean.sendMessageString(TEL_LOCAL, GET)` — Phone number local exchange |
| 14 | SET | `String telNoLocal` |
| 15 | CALL | `serviceFormBean.sendMessageString(TEL_SUBSCRIBER, GET)` — Phone number subscriber number |
| 16 | SET | `String telNoSubscriber` |
| 17 | CALL | `serviceFormBean.sendMessageString(TELNO, SET, telNoArea + telNoLocal + telNoSubscriber)` — Compose full phone number |
| 18 | CALL | `serviceFormBean.sendMessageString(TELNO, GET)` — Retrieve composed phone number |
| 19 | CALL | `(result + BLANK_7).substring(0, 7).trim()` — Extract judge office number (first 7 digits) |
| 20 | SET | `String judgeKyokuNo` — Judge office number (7 digits) |
| 21-35 | CALL + SET | `svcKeiInfoList.sendMessageString()` — Extract kaisenPlaceAdCd, kaisenPlacePcd, kaisenPlaceBnchigo, kaisenPlaceAdrttm, kaisenPlaceAdrrm, kaisenPlaceNo |
| 36 | CALL | `svcKeiInfo.sendMessageString(CommonInfoCFConst.LAST_UPD_DTM_23, GET)` — Last update datetime (service contract) |
| 37 | SET | `String kk0081UpdDtmBf` |

### Block 5 [SET] Field Transfer to Service Form Bean (L1544)

> Maps all extracted source fields to their corresponding target fields in the service form bean. This is the core data mapping step.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `serviceFormBean.sendMessageString(SVC_KEI_KAISEN_UCWK_NO, SET, svcKeiKaisenUcwkNo)` — Service contract line-item work number |
| 2 | CALL | `serviceFormBean.sendMessageString(KKTK_SVC_KEI_NO, SET, kktkSvcKeiNo)` — Equipment provision service contract number |
| 3 | CALL | `serviceFormBean.sendMessageString(GENE_ADD_DTM_KIKI, SET, geneAddDtm)` — Registration date/time (equipment provision) |
| 4 | CALL | `serviceFormBean.sendMessageString(TK_HOSHIKI_KEI_NO, SET, tkHoshikiKeiNo)` — Provision method contract number |
| 5 | CALL | `serviceFormBean.sendMessageString(SEIKY_KEI_NO, SET, seikyKeiNo)` — Billing contract number |
| 6 | CALL | `serviceFormBean.sendMessageString(JUDGE_KYOKU_NO, SET, judgeKyokuNo)` — Judge office number |
| 7 | CALL | `serviceFormBean.sendMessageString(TSJGS_CD, SET, tsjgsCd)` — Telecom provider code |
| 8 | CALL | `serviceFormBean.sendMessageString(TSJGS_NM, SET, tsjgsNm)` — Telecom provider name |
| 9 | CALL | `serviceFormBean.sendMessageString(KAISEN_PLACE_AD_CD, SET, kaisenPlaceAdCd)` — Installation location address code |
| 10 | CALL | `serviceFormBean.sendMessageString(KAISEN_PLACE_PCD, SET, kaisenPlacePcd)` — Installation location postal code (first write) |
| 11 | CALL | `serviceFormBean.sendMessageString(KAISEN_PLACE_PCD, SET, kaisenPlacePcd.substring(0,3) + "-" + kaisenPlacePcd.substring(3))` — Reformat postal code with hyphen |
| 12 | CALL | `serviceFormBean.sendMessageString(KAISEN_PLACE_BNCHIGO, SET, kaisenPlaceBnchigo)` — Installation location lot number |
| 13-16 | CALL + SET | Installation location supplemental: building name (ADRTTM), room number (ADRRM), lot number (NO) |
| 17 | CALL | `serviceFormBean.sendMessageString(KK0081_UPD_DTM_BF, SET, kk0081UpdDtmBf)` — Last update datetime (service contract) |

### Block 6 [IF] Nouchakusha Bangou Notification Service Flag (L1570)

> Determines the notification service registration flag based on customer selection.

| # | Type | Code |
|---|------|------|
| 1 | SET | `String noTchSvcAddFlg = "0"` — Default: notification service not registered |
| 2 | IF | `noTchSvcChoice.booleanValue()` (L1573) [IF] Nouchakusha Bangou Notification Service selected |
| 2.1 | SET | `noTchSvcAddFlg = "1"` — Notification service registered |
| 3 | END_IF | — |
| 4 | CALL | `serviceFormBean.sendMessageString(NO_TCH_SVC_ADD_FLG, SET, noTchSvcAddFlg)` |
| 5 | CALL | `serviceFormBean.sendMessageString(NO_TCH_SVC_UM, SET, JFUCommonUtil.nvl(..., JFUStrConst.EMPTY))` — Null-safe set for notification service display field |

### Block 7 [IF] Equipment Provision Price Change Flag (L1581)

> Determines whether the equipment provision service contract has undergone a price change, based on the price plan code.

| # | Type | Code |
|---|------|------|
| 1 | SET | `String kktkPcrsChgFlg = "0"` — Default: no price change |
| 2 | IF | `JFUStrConst.CD00565_PC0401.equals(pplanCd) || JFUStrConst.CD00565_PG0301.equals(pplanCd)` [-> PC0401 = "PC0401" (VA1 Port Fixed Plan); PG0301 = "PG0301"] (L1582) |
| 2.1 | SET | `kktkPcrsChgFlg = "1"` — Price change in progress |
| 3 | END_IF | — |
| 4 | CALL | `serviceFormBean.sendMessageString(KKTK_PCRS_CHG_FLG, SET, kktkPcrsChgFlg)` |

### Block 8 [IF-ELSE] Number Portability Usage Branch (L1589)

> Branches on whether the customer is using number portability. This is the primary control flow split.

**Block 8 [IF]** `BMP_UM_0.equals(bmpUm)` [-> BMP_UM_0 = "0" (Number Portability Not Used)] (L1591)

> When the customer is **not** using number portability, all portability-related carrier, address, telephone, and personal information fields are cleared to ensure no stale portability data is submitted with the service order.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `serviceFormBean.sendMessage(TSJGS_CD, CLEAR)` — Clear telecom provider code |
| 2 | CALL | `serviceFormBean.sendMessage(TSJGS_NM, CLEAR)` — Clear telecom provider name |
| 3 | CALL | `serviceFormBean.sendMessageBoolean(KOJIN_INFO_DOI, SET, Boolean.valueOf(false))` — Clear personal information agreement |
| 4 | CALL | `serviceFormBean.sendMessage(NTT_AD_CHOICE, CLEAR)` — Clear NTT contract address selection |
| 5 | CALL | `serviceFormBean.sendMessage(TELNO, CLEAR)` — Clear full telephone number |
| 6 | CALL | `serviceFormBean.sendMessage(JUDGE_KYOKU_NO, CLEAR)` — Clear judge office number |
| 7 | CALL | `serviceFormBean.sendMessage(TEL_AREA, CLEAR)` — Clear phone area code |
| 8 | CALL | `serviceFormBean.sendMessage(TEL_LOCAL, CLEAR)` — Clear phone local number |
| 9 | CALL | `serviceFormBean.sendMessage(TEL_SUBSCRIBER, CLEAR)` — Clear phone subscriber number |
| 10-15 | CALL | Clear NTT contractor address fields: postal code (NTT_KEISHA_PCD), postal code parts (1, 2), state/city name, oazutsu/azcho/bnchigo name, building name, room number |
| 16-22 | CALL | Clear NTT contractor name fields (quality improvement — TAI-2012-0000081): name (sei/mei), katakana (sei/mei), full name kana |
| 23 | CALL | `tsjgsCombobox.sendMessageString(TSJGS_CD_04, SET, CLEAR)` — Clear combo box selection index |
| 24 | CALL | `serviceFormBean.sendMessageString(KYOKU_NO_KEISHA_FLG, SET, KYOKU_NO_KEISHA_FLG_0)` [-> "0"] — Set judge office one-agreement non-target flag |
| 25-28 | CALL | Clear installation location address fields and contractor name choice fields (ANK-2535) |

**Block 8.1 [ELSE-IF]** `BMP_UM_1.equals(bmpUm)` [-> BMP_UM_1 = "1" (Number Portability Used)] (L1634)

> When the customer **is** using number portability, the installation address and contractor name must be resolved from one of three sources based on the customer's selection.

#### Block 8.1.1 [IF] Installation Location = Current Place (L1639)

> When the customer selects "1" (Use current service installation location address), the installation address components are copied from the service contract info list.

| # | Type | Code |
|---|------|------|
| 1 | IF | `JFUStrConst.STC_PLACE_AD_CHOICE_USE_PLACE.equals(stcPlaceAdChoice)` (L1639) [-> "1" (Use Current Place)] |
| 2-7 | CALL | Extract kaisenPlacePcd1, kaisenPlacePcd2, kaisenPlaceStateNm, kaisenPlaceCityNm, kaisenPlaceOaztsuNm, kaisenPlaceAzchoNm from svcKeiInfoList |
| 8 | CALL | `serviceFormBean.sendMessageString(STC_PLACE_AD_CHOICE_NM, SET, JFUWebCommon.getDispText(null, PROP_ID_STC_PLACE_AD_CHOICE_USE_PLACE))` |
| 9 | CALL | `serviceFormBean.sendMessageString(NTT_KEISHA_PCD, SET, kaisenPlacePcd)` — Full postal code |
| 10 | CALL | `serviceFormBean.sendMessageString(NTT_KEISHA_PCD_1, SET, kaisenPlacePcd1)` — Postal code first part |
| 11 | CALL | `serviceFormBean.sendMessageString(NTT_KEISHA_PCD_2, SET, kaisenPlacePcd2)` — Postal code second part |
| 12 | CALL | `serviceFormBean.sendMessageString(NTT_KEISHA_STATE_CITY_NM, SET, kaisenPlaceStateNm + kaisenPlaceCityNm)` — Prefecture + city concatenated |
| 13 | CALL | `serviceFormBean.sendMessageString(NTT_KEISHA_OAZTSU_NM, SET, kaisenPlaceOaztsuNm)` — Oazutsu (large street) name |
| 14 | CALL | `serviceFormBean.sendMessageString(NTT_KEISHA_AZCHO_BNCHIGO_NM, SET, kaisenPlaceAzchoNm + kaisenPlaceBnchigo)` — Azcho + bnchigo concatenated |
| 15 | CALL | `serviceFormBean.sendMessageString(NTT_KEISHA_ADRTTM, SET, kaisenPlaceAdrttm)` — Building name |
| 16 | CALL | `serviceFormBean.sendMessageString(NTT_KEISHA_ADRRM, SET, kaisenPlaceAdrrm)` — Room number |

#### Block 8.1.2 [ELSE-IF] Installation Location = Contract Address (L1675)

> When the customer selects "2" (Same as contract address), the address components are read from the NTT contractor address fields on the service form bean.

| # | Type | Code |
|---|------|------|
| 1 | IF | `JFUStrConst.STC_PLACE_AD_CHOICE_CONTRACT.equals(stcPlaceAdChoice)` (L1675) [-> "2" (Same as Contract Address)] |
| 2-10 | CALL | Extract keishaPcd, keishaPcd1, keishaPcd2, keishaStateNm, keishaCityNm, keishaOaztsuNm, keishaAzchoNm, keishaBnchigo, keishaAdrttm, keishaAdrrm from serviceFormBean |
| 11 | CALL | `serviceFormBean.sendMessageString(STC_PLACE_AD_CHOICE_NM, SET, JFUWebCommon.getDispText(null, PROP_ID_STC_PLACE_AD_CHOICE_CONTRACT))` |
| 12 | CALL | `serviceFormBean.sendMessageString(NTT_KEISHA_PCD, SET, keishaPcd)` |
| 13-14 | CALL | Set NTT_KEISHA_PCD_1 and NTT_KEISHA_PCD_2 |
| 15 | CALL | `serviceFormBean.sendMessageString(NTT_KEISHA_STATE_CITY_NM, SET, keishaStateNm + keishaCityNm)` |
| 16 | CALL | `serviceFormBean.sendMessageString(NTT_KEISHA_OAZTSU_NM, SET, keishaOaztsuNm)` |
| 17 | CALL | `serviceFormBean.sendMessageString(NTT_KEISHA_AZCHO_BNCHIGO_NM, SET, keishaAzchoNm + keishaBnchigo)` |
| 18 | CALL | `serviceFormBean.sendMessageString(NTT_KEISHA_ADRTTM, SET, keishaAdrttm)` |
| 19 | CALL | `serviceFormBean.sendMessageString(NTT_KEISHA_ADRRM, SET, keishaAdrrm)` |

#### Block 8.1.3 [ELSE-IF] Installation Location = Other Place (L1717)

> When the customer selects "3" (Other installation location address), the postal code is composed from its two parts and other fields are marked as other.

| # | Type | Code |
|---|------|------|
| 1 | IF | `JFUStrConst.STC_PLACE_AD_CHOICE_OTHER.equals(stcPlaceAdChoice)` (L1717) [-> "3" (Other Place)] |
| 2 | CALL | `serviceFormBean.sendMessageString(NTT_KEISHA_PCD_1, GET)` — Postal code first part |
| 3 | CALL | `serviceFormBean.sendMessageString(NTT_KEISHA_PCD_2, GET)` — Postal code second part |
| 4 | SET | `pcd1`, `pcd2` |
| 5 | CALL | `serviceFormBean.sendMessageString(NTT_KEISHA_PCD, SET, pcd1 + pcd2)` — Compose full postal code |
| 6 | CALL | `serviceFormBean.sendMessageString(STC_PLACE_AD_CHOICE_NM, SET, JFUWebCommon.getDispText(null, PROP_ID_STC_PLACE_AD_CHOICE_OTHER))` |

#### Block 8.1.4 [IF] Contractor Name = Contract Party (L1731)

> When the customer selects "1" (Same as contracting party), the name is retrieved from the genCustKeiInfo parent bean (existing customer data).

| # | Type | Code |
|---|------|------|
| 1 | IF | `JFUStrConst.KSHNM_CHOICE_CONTRACT.equals(kshnmChoice)` [-> "1" (Same as Contracting Party)] (L1731) |
| 2 | CALL | `serviceFormBean.sendMessageString(KSHNM_CHOICE_NM, SET, JFUWebCommon.getDispText(null, PROP_ID_KSHNM_CHOICE_CONTRACT))` |
| 3 | CALL | `genCustKeiInfo.sendMessageString(CommonInfoCFConst.CUST_NM_22, GET)` — Customer name |
| 4 | SET | `String custNm` |
| 5 | CALL | `genCustKeiInfo.sendMessageString(CommonInfoCFConst.CUST_KANA_22, GET)` — Customer katakana name |
| 6 | SET | `String custKana` |
| 7 | CALL | `serviceFormBean.sendMessageString(NTT_KEISHA_NM, SET, custNm)` |
| 8 | CALL | `serviceFormBean.sendMessageString(NTT_KEISHA_KANA, SET, custKana)` |

#### Block 8.1.5 [ELSE-IF] Contractor Name = Other (L1742)

> When the customer selects "0" (Other contracting party name), the name is constructed from the service form's NTT contractor name fields. A further branch handles legal entity vs. individual naming conventions.

| # | Type | Code |
|---|------|------|
| 1 | IF | `JFUStrConst.KSHNM_CHOICE_OTHER.equals(kshnmChoice)` (L1742) [-> "0" (Other)] |
| 2 | CALL | `serviceFormBean.sendMessageString(KSHNM_CHOICE_NM, SET, JFUWebCommon.getDispText(null, PROP_ID_KSHNM_CHOICE_OTHER))` |
| 3 | CALL | `serviceFormBean.sendMessageString(NTT_KEISHA_NM_SEI, GET)` — Contractor name surname |
| 4 | CALL | `serviceFormBean.sendMessageString(NTT_KEISHA_NM_MEI, GET)` — Contractor name given name |
| 5 | CALL | `serviceFormBean.sendMessageString(NTT_KEISHA_KANA_SEI, GET)` — Kana surname |
| 6 | CALL | `serviceFormBean.sendMessageString(NTT_KEISHA_KANA_MEI, GET)` — Kana given name |
| 7 | SET | `keishaNmSei`, `keishaNmMei`, `keishaKanaSei`, `keishaKanaMei` |
| 8 | IF | `JFUStrConst.CD00036_2.equals(serviceFormBean.sendMessageString(KEISHA_TYPE_CD, GET))` [-> "2" (Legal Entity)] (L1753) |
| 8.1 | CALL | `serviceFormBean.sendMessageString(NTT_KEISHA_NM, SET, keishaNmSei)` — Legal entities: store surname only |
| 8.2 | CALL | `serviceFormBean.sendMessageString(NTT_KEISHA_KANA, SET, keishaKanaSei)` |
| 8.3 | ELSE | — |
| 8.4 | CALL | `serviceFormBean.sendMessageString(NTT_KEISHA_NM, SET, keishaNmSei + JFUStrConst.SPACE + keishaNmMei)` — Individual: full name with space separator |
| 8.5 | CALL | `serviceFormBean.sendMessageString(NTT_KEISHA_KANA, SET, keishaKanaSei + JFUStrConst.SPACE + keishaKanaMei)` |

#### Block 8.1.6 [IF] Judge Office One-Agreement Flag (L1764)

> Determines whether this contractor is subject to judge office one-agreement processing based on contractor type code.

| # | Type | Code |
|---|------|------|
| 1 | IF | `JFUStrConst.CD00036_1.equals(keishaTypeCd) || JFUStrConst.CD00036_2.equals(keishaTypeCd)` [-> "1" (Individual) or "2" (Legal Entity)] (L1764) |
| 1.1 | CALL | `serviceFormBean.sendMessageString(KYOKU_NO_KEISHA_FLG, SET, KYOKU_NO_KEISHA_FLG_1)` [-> "1" (Target)] |
| 1.2 | ELSE | — |
| 1.3 | CALL | `serviceFormBean.sendMessageString(KYOKU_NO_KEISHA_FLG, SET, KYOKU_NO_KEISHA_FLG_0)` [-> "0" (Non-target)] |

### Block 9 [CREATE] Submission Detail Record (L1801)

> Creates the detail record required by the submission registration service IF, which mandates at least one record per detail list.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `JFUWebCommon.createAndGetDataBeanTypeByPath(serviceFormBean, FUW01403SFConst.MSKM_DTL_LIST)` — Creates and retrieves the submission detail list bean |
| 2 | SET | `X31SDataBeanAccess mskmDtlList` — Submission detail record container |
| 3 | CALL | `mskmDtlList.sendMessageString(MSKM_FORM_CD_07, SET, JFUStrConst.CD00591_01)` [-> "01" (WEB)] — Set form code |

### Block 10 [CREATE] Discrepancy Reason Detail Record (L1814)

> Creates the detail record required by the progression registration service IF, which mandates at least one record per detail list.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `JFUWebCommon.createAndGetDataBeanTypeByPath(serviceFormBean, FUW01403SFConst.IDO_DTL_LIST)` — Creates and retrieves the discrepancy reason detail list bean |
| 2 | SET | `X31SDataBeanAccess idoDtlList` — Discrepancy reason detail record container |
| 3 | CALL | `idoDtlList.sendMessageString(IDO_RSN_CD_08, SET, JFUStrConst.CD00846_C1)` [-> "C1" (Price Change Receipt)] — Set reason code |

### Block 11 [RETURN] Method Completion (L1823)

> Logs end and returns void. All prepared data is now available in `serviceFormBean` for the caller.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `DEBUG_LOG.info("----- FUW01403 End editRegData -----")` |
| 2 | RETURN | `return;` (void) |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `bmpUm` | Field | Number portability usage flag — "0" (not using portability) or "1" (using portability/continuing). Controls whether to clear or resolve portability-related fields. |
| `stcPlaceAdChoice` | Field | Installation location address choice — "1" (current service location), "2" (same as contract address), "3" (other custom location). Determines which address source to use. |
| `kshnmChoice` | Field | Contractor name choice — "1" (same as contracting party, i.e., existing customer name), "0" (other/custom name). |
| `noTchSvcChoice` | Field | Nouchakusha Bangou notification service choice — Boolean flag indicating whether to register for phone number notification service. |
| `pplanCd` | Field | Price plan code — identifies the pricing plan for equipment provision service (e.g., PC0401 = VA1 Port Fixed Plan). |
| `keishaTypeCd` | Field | Contractor type code — "1" (Individual/kojin), "2" (Legal entity/houjin). Affects name formatting and judge office one-agreement eligibility. |
| `svcKeiKaisenUcwkNo` | Field | Service contract line-item work number — internal tracking ID for service contract line items. |
| `kktkSvcKeiNo` | Field | Equipment provision service contract number — unique identifier for equipment provision service contracts. |
| `geneAddDtm` | Field | Registration date/time for equipment provision service — when the service was registered in the system. |
| `tkHoshikiKeiNo` | Field | Provision method contract number — contract number for the service provision method. |
| `seikyKeiNo` | Field | Billing contract number — contract number for billing/charging. |
| `judgeKyokuNo` | Field | Judge office number — first 7 digits of the telephone number, used for routing and geographic identification. |
| `tsjgsCd` | Field | Telecom provider (Tsushin Jigyou-sha) code — unique identifier for the selected telecommunications carrier. |
| `tsjgsNm` | Field | Telecom provider name — display name of the selected telecommunications carrier. |
| `kaisenPlaceAdCd` | Field | Installation location address code — code identifying the line installation location. |
| `kaisenPlacePcd` | Field | Installation location postal code — 7-digit Japanese postal code for the installation address. |
| `kaisenPlaceBnchigo` | Field | Installation location lot number — parcel/lot identifier for the installation address. |
| `kaisenPlaceAdrttm` | Field | Installation location supplemental: building name — name of the building at the installation location. |
| `kaisenPlaceAdrrm` | Field | Installation location supplemental: room number — room/suite number at the installation location. |
| `noTchSvcAddFlg` | Field | Nouchakusha Bangou notification service registration flag — "1" if registered, "0" if not. |
| `kktkPcrsChgFlg` | Field | Equipment provision service contract price change flag — "1" if price change is in progress, "0" if not. |
| `kyokuNoKeishaFlg` | Field | Judge office one-agreement target contractor flag — "1" (subject to judge office one-agreement), "0" (not subject). |
| `mskmFormCd` | Field | Submission form code — "01" indicates WEB submission channel. |
| `idoRsnCd` | Field | Discrepancy reason code — "C1" indicates price change receipt (kaika henkou uketuke). |
| KOJIN_INFO_DOI | Field | Personal information agreement choice — customer's consent to handle personal information. |
| NTT_AD_CHOICE | Field | NTT contract address selection — choice for NTT-related contract address. |
| TELNO | Field | Full telephone number — composed of area code + local exchange + subscriber number. |
| NTT_KEISHA_PCD | Field | NTT contractor postal code — postal code for the NTT contractor address. |
| NTT_KEISHA_NM | Field | NTT contractor name — full contractor name (may include surname only for legal entities). |
| NTT_KEISHA_KANA | Field | NTT contractor katakana name — katakana pronunciation of the contractor name. |
| NTT_KEISHA_NM_SEI | Field | NTT contractor name: surname (Sei) — surname part of contractor name for custom name entry. |
| NTT_KEISHA_NM_MEI | Field | NTT contractor name: given name (Mei) — given name part of contractor name for custom name entry. |
| KK0081_UPD_DTM_BF | Field | Last update datetime (service contract) — timestamp of last modification to service contract data. |
| KKTK_SVC_KEI_LIST | Field | Equipment provision service contract list — list of equipment provision service contract records. |
| SVC_KEI_INFO_LIST | Field | Service contract info list — list of service contract records. |
| GEN_CUST_KEI_INFO | Field | Current customer contract info — bean containing existing customer data (name, type, etc.). |
| SVC_KEI_INFO | Field | Service contract info — bean for service contract details (provision method, timestamps). |
| SEIKY_KEI_INFO | Field | Billing contract info — bean for billing contract details. |
| TSJGS_COMBOBOX | Field | Telecom provider combo box — dropdown selection data for carrier selection. |
| PC0401 | Constant | VA1 Port Fixed Plan — price plan code for VA1 port monthly fixed fee plan. |
| PG0301 | Constant | PG0301 price plan — another pricing plan triggering price change flag. |
| CD00036_1 | Constant | "1" — Individual contractor type (Kojin). |
| CD00036_2 | Constant | "2" — Legal entity contractor type (Houjin). |
| CD00591_01 | Constant | "01" — WEB submission form code. |
| CD00846_C1 | Constant | "C1" — Price change receipt discrepancy reason code. |
| C1 | Business term | Kaika Henkou Uketuke — price change receipt; a reason code for service order discrepancy. |
| 局番一意識 | Business term | Judge Office One-Agreement — a telecom regulatory process where a single judge office handles the entire portability agreement for a contractor. |
| 電話番号通知サービス | Business term | Nouchakusha Bangou Notification Service — service that notifies the customer of incoming call recipient phone numbers. |
| 機器提供サービス | Business term | Equipment Provision Service — provision of communication equipment (e.g., modems, routers) to the customer. |
| 料プランコード | Business term | Price Plan Code — identifies the monthly pricing structure for a service contract. |
| 回線場所 | Business term | Kaisen Basho — line installation location; the physical address where the fiber/phone line is terminated. |
| 同番移転全チャネル販売対応 | Business term | Number Portability Full Channel Sales Support (ANK-2535) — a system enhancement for handling number portability across all sales channels (STEP 2). |
| TAI-2012-0000081 | Project ID | Quality Improvement Measures — 2012/08/28 enhancement for contractor name field clearing during portability non-usage. |
