# Business Logic — KKW00127SFLogic.initKKW00127() [422 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKW00127SF.KKW00127SFLogic` |
| Layer | Service (Logic) |
| Module | `KKW00127SF` (Package: `eo.web.webview.KKW00127SF`) |

## 1. Role

### KKW00127SFLogic.initKKW00127()

This method performs the **initial display processing** for the Order Information Update screen (KKW00127, screen ID: KKW00127, Japanese name: "Apply Information Update/Reference") in the K-Opticom customer contract management system. It is the primary entry point invoked from `actionInit()` within the same class, preparing the entire page state for a read-only review of an existing service contract order.

The method orchestrates a multi-step initialization pipeline: it first retrieves the service form bean and loads screen-level metadata, then delegates to `invokeInitService()` to execute the core one-stop initialization service that populates the service-specific data. Following that, it configures six pulldown lists (payment method carry-over, service content carry-over, termination notice type, service fee (agency fee), standard construction fee, and bundle information) each sourced from a dedicated SC screen code (KKSV003611SC through KKSV003616SC).

It then copies order detail fields (order document number, order number, application type code/name, acceptor, application date, application document arrival date, transferred-from service contract number, and timestamps) into the display bean, iterates the handling code list to dispatch display-specific processing, and processes temporary payment items — distinguishing between service fee records (payment prefix 01/04/11/21 with contract service fee check) and standard construction fee records (prefix 99). The method formats date fields for display, preserves "before update" snapshot values for the progress compensation edit feature, and finally sets up map display data, button visibility flags, and customer contract continuation data for session retention.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["initKKW00127(commoninfoBean)"])
    GetSvcBean["getServiceFormBean"]
    GetScreenInfo["getScreenInfo(svcFormBean)"]
    SetCode["setCode(svcFormBean)"]
    CreateParam["Create paramBean array svcFormBean"]
    InvokeService["invokeInitService(paramBean)"]
    SetPaywayPulldown["setPulldownList PAYWAY_HKTGI_LIST KKSV003611SC true"]
    SetSvcNaiyoPulldown["setPulldownList SVC_NAIYO_HKTGI_LIST KKSV003612SC false"]
    SetDslShoruiPulldown["setPulldownList DSL_SHORUI_SOHU_LIST KKSV003613SC false"]
    SetJimuPulldown["setPulldownList JIMU_COMMISION_LIST KKSV003614SC false"]
    SetStdardKojiPulldown["setPulldownList STDARD_KOJI_HI_LSIT KKSV003615SC false"]
    SetBundlePulldown["setPulldownList BUNDLE_INFO_LSIT KKSV003616SC false"]
    SetSvc["setSvc(svcFormBean, outputMap)"]
    GetSvcMsList["getDataBeanArray EKK0021A010CBSMSG1LIST"]
    GetSvcMs["getDataBean(0)"]
    CopyMskmFields["Copy order detail fields to bean: mskmShoNo, mskmNo, mskmshoDtlNo, mskmSbtCd"]
    GetSvcMsSbt["Get application type code name"]
    GetMskmInfo["Get application agreement info: acceptor, application date, application doc arrival date, TNKYM fields"]
    GetSvcContract["Get service contract agreement info: intro code, service code, price group code, service start desired date"]
    SetSeq["Set display sequence 1-4"]
    BackupBeforeValues["Backup before values: BK_MSKMSHO_NO, BK_MSKMSHO_DTL_NO, BF_INTR_CD"]
    GetCoupon["getDataBeanArray EKK0311B002CBSMSG1LIST - coupon code"]
    GetToratCd["Get handling code list: EKK0071B001CBSMSG1LIST, BF_EKK0071B001CBSMSG1LIST"]
    StartLoop["Loop through handling code list"]
    CheckDispJun{"dispJun == 1, 2, 3, or 4?"}
    SetToratCdInfo["setToriatsukaiInfo(svcFormBean, tratCdList, bfTratCdList, dispJun)"]
    FormatDates["Format dates YYYY/MM/DD via set_Ymd"]
    StartPayLoop["Loop through temporary payment list EKK1021B501CBSMSG1LIST"]
    CheckDivStr{"divStr == 01/04/11/21?"}
    CheckKeiExpense{"isKeiExpenseCharge (first 9 digits match KEI_EXPENSE_CHARGE_BEFORE9)?"}
    ProcessJimu["Process service fee info"]
    CheckIchjn01{"ichjn_sette_cd == 01/02/03/04?"}
    StartPayLoop99{"divStr == 99?"}
    ProcessKoji["Process standard construction fee info"]
    CheckHyojuCount{"hyojunkojihi_count == 0?"}
    SetEmptyJimu["Set empty service fee list values"]
    SetTsuchisho["setTsuchishoList(svcFormBean)"]
    SetPulldownInit["setPulldownInit(svcFormBean)"]
    GetSvckeiMap["getSvckeiCommonMap(outputMap, paramBean)"]
    SetSvckeiInfo["JKKWebCommon.setSvckeiInfo(this, svc_kei_dataMap)"]
    SetMapGmn["setMapGmnData(svcFormBean)"]
    SetBtnDisp["setBtnDispData(svcFormBean)"]
    SetBtnActive["setBtnActiveData(svcFormBean)"]
    GetHktgiData["getHktgiDataMap(CUST_KEI_HKTGI_LIST, CUST_KEI_HKTGI_KEYS)"]
    SetScreenInfo["JCCWebCommon.setScreenInfo(this, SCREEN_ID_KKW00127, hktgiData)"]
    DumpLog["JSYwebLog.println dumpDatabean"]
    RETURN(["return true"])

    START --> GetSvcBean
    GetSvcBean --> GetScreenInfo
    GetScreenInfo --> SetCode
    SetCode --> CreateParam
    CreateParam --> InvokeService
    InvokeService --> SetPaywayPulldown
    SetPaywayPulldown --> SetSvcNaiyoPulldown
    SetSvcNaiyoPulldown --> SetDslShoruiPulldown
    SetDslShoruiPulldown --> SetJimuPulldown
    SetJimuPulldown --> SetStdardKojiPulldown
    SetStdardKojiPulldown --> SetBundlePulldown
    SetBundlePulldown --> SetSvc
    SetSvc --> GetSvcMsList
    GetSvcMsList --> GetSvcMs
    GetSvcMs --> CopyMskmFields
    CopyMskmFields --> GetSvcMsSbt
    GetSvcMsSbt --> GetMskmInfo
    GetMskmInfo --> GetSvcContract
    GetSvcContract --> SetSeq
    SetSeq --> BackupBeforeValues
    BackupBeforeValues --> GetCoupon
    GetCoupon --> GetToratCd
    GetToratCd --> StartLoop
    StartLoop --> CheckDispJun
    CheckDispJun -->|Yes| SetToratCdInfo
    CheckDispJun -->|No| NextIteration
    SetToratCdInfo --> NextIteration
    NextIteration["Continue loop"] --> FormatDates
    FormatDates --> StartPayLoop
    StartPayLoop --> CheckDivStr
    CheckDivStr -->|Yes| CheckKeiExpense
    CheckDivStr -->|No| CheckDivStr99
    CheckKeiExpense -->|Yes| ProcessJimu
    CheckKeiExpense -->|No| NextPayLoop
    ProcessJimu --> CheckIchjn01
    CheckIchjn01 -->|Any| NextPayLoop
    CheckDivStr99{"divStr == 99?"}
    CheckDivStr99 -->|Yes| ProcessKoji
    CheckDivStr99 -->|No| NextPayLoop
    ProcessKoji --> NextPayLoop
    NextPayLoop["Continue loop"] --> CheckHyojuCount
    CheckHyojuCount -->|Yes| SetEmptyJimu
    CheckHyojuCount -->|No| SetTsuchisho
    StartPayLoop99["divStr == 99 check"] --> CheckDivStr99
    SetEmptyJimu --> SetTsuchisho
    SetTsuchisho --> SetPulldownInit
    SetPulldownInit --> GetSvckeiMap
    GetSvckeiMap --> SetSvckeiInfo
    SetSvckeiInfo --> SetMapGmn
    SetMapGmn --> SetBtnDisp
    SetBtnDisp --> SetBtnActive
    SetBtnActive --> GetHktgiData
    GetHktgiData --> SetScreenInfo
    SetScreenInfo --> DumpLog
    DumpLog --> RETURN
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `commoninfoBean` | `X31SDataBeanAccess` | The shared screen information bean carrying common context passed from the caller (`actionInit()`). Contains the logged-in user's session data, screen ID (KKW00127), and shared view-state fields used across the order update workflow. |

**Instance fields read by this method:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `svc_kei_dataMap` | `HashMap<String, Object>` | Service contract shared header map — accumulates service-level common data (service type, price group, etc.) set via `getSvckeiCommonMap()` and distributed via `JKKWebCommon.setSvckeiInfo()` |

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `invokeInitService` | invokeInitService | - | Executes the core one-stop initialization service that populates all data bean arrays in svcFormBean |
| R | `getHktgiDataMap` | KKW00127SFLogic | - | Reads customer contract continuation data into a HashMap for session preservation |
| R | `getScreenInfo` | KKW00127SFLogic | - | Retrieves screen-level configuration and display control flags |
| R | `getSvckeiCommonMap` | KKW00127SFLogic | - | Builds the service contract common header map from output data and param beans |
| R | `OneStopDataBeanAccess.getDataBeanArray` | - | EKK0021A010CBSMSG1LIST (Order Detail Agreement) | Retrieves order detail agreement bean array |
| R | `OneStopDataBeanAccess.getDataBeanArray` | - | EKK0011A010CBSMSG1LIST (Application Agreement) | Retrieves application agreement bean array |
| R | `OneStopDataBeanAccess.getDataBeanArray` | - | EKK0081A010CBSMSG1LIST (Service Contract Agreement) | Retrieves service contract agreement bean array |
| R | `OneStopDataBeanAccess.getDataBeanArray` | - | EKK0071B001CBSMSG1LIST (Handling Code List) | Retrieves handling code list for new application |
| R | `OneStopDataBeanAccess.getDataBeanArray` | - | BF_EKK0071B001CBSMSG1LIST (Before Handling Code List) | Retrieves prior handling code list for comparison |
| R | `OneStopDataBeanAccess.getDataBeanArray` | - | EKK1021B501CBSMSG1LIST (Temporary Payment List) | Retrieves temporary payment/purchase number list for fee processing |
| R | `OneStopDataBeanAccess.getDataBeanArray` | - | EKK0311B002CBSMSG1LIST (Coupon Code) | Retrieves coupon code information |
| R | `OneStopDataBeanAccess.getDataBeanArray` | - | XXXXXXXXXXX2CBSMSG1LIST (Temporary Payment Agency Fee Info) | Retrieves agency fee info for temporary payment settings |
| R | `OneStopDataBeanAccess.getDataBeanArray` | - | XXXXXXXXXXX3CBSMSG1LIST (Temporary Payment Standard Construction Fee Info) | Retrieves standard construction fee info for temporary payment settings |
| R | `OneStopDataBeanAccessArray.getCount` | - | - | Counts records in a data bean array |
| R | `OneStopDataBeanAccessArray.getDataBean` | - | - | Retrieves a specific data bean by index from array |
| - | `JKKPulldownUtil.setPulldownList` | KKSV003611SC - KKSV003616SC | - | Configures six pulldown dropdown lists (payment method carry-over, service content carry-over, termination notice type, service fee, standard construction fee, bundle info) |
| - | `setSvc` | - | - | Sets service type determination flags for display item control |
| - | `setCode` | - | - | Sets various code constants for the screen |
| - | `setToriatsukaiInfo` | - | - | Processes handling code data set for display based on display order number |
| - | `set_Ymd` | - | - | Formats raw date string to YYYY/MM/DD display format |
| - | `setChgAmnt` | - | - | Converts numeric amount value to display-formatted currency string |
| - | `setTsuchishoList` | ANK-2985-00-00 | - | Sets contract content notification (checkbox settings) |
| - | `setPulldownInit` | - | - | Initializes pulldown dropdown settings |
| - | `JKKWebCommon.setSvckeiInfo` | - | - | Distributes service contract info to the web layer |
| - | `setMapGmnData` | ANK-2121-00-00 | - | Sets up map screen opening data |
| - | `setBtnDispData` | - | - | Sets display flags for "Map Button" and "Unavailable Period History Button" |
| - | `setBtnActiveData` | ANK-4401-00-00 | - | Sets construction fee total notification button active flag |
| - | `JCCWebCommon.setScreenInfo` | - | - | Persists customer contract continuation data to session for screen KKW00127 |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | KKW00127SFLogic.actionInit() | `KKW00127SFLogic.actionInit` -> `KKW00127SFLogic.initKKW00127(commoninfoBean)` | `setScreenInfo [W] JKKScreenConst.SCREEN_ID_KKW00127`, `getHktgiDataMap [R] CUST_KEI_HKTGI_LIST`, `setBtnActiveData [-]`, `setBtnDispData [-]`, `setMapGmnData [-]`, `setSvckeiInfo [W] svc_kei_dataMap`, `setPulldownInit [-]`, `setTsuchishoList [-]`, `getDataBean [R] temporary payment list` |

**Call chain details:** `actionInit()` calls `JCCWebCommon.getScreenInfo(this)`, then `super.getCommonInfoBean()` to obtain `commoninfoBean`, then invokes `initKKW00127(commoninfoBean)`. This is the sole caller, serving as the screen's initial action entry point.

## 6. Per-Branch Detail Blocks

**Block 1** — [SET] (L628)
> Retrieve the service form bean from the superclass.

| # | Type | Code |
|---|------|------|
| 1 | SET | `svcFormBean = super.getServiceFormBean()` // Obtain service form bean |

**Block 2** — [EXEC] (L631)
> Cross-screen shared information setup processing.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `getScreenInfo(svcFormBean)` // Set cross-screen shared info |

**Block 3** — [EXEC] (L634)
> Set various codes for the screen.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `setCode(svcFormBean)` // Set various codes |

**Block 4** — [SET] (L637)
> Create the param bean array for the init service call.

| # | Type | Code |
|---|------|------|
| 1 | SET | `paramBean = {svcFormBean}` // Array of one svcFormBean |

**Block 5** — [CALL] (L640)
> Execute the core one-stop initialization service that populates the service-specific data bean arrays.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `outputMap = invokeInitService(paramBean)` // Execute init service |

**Block 6** — [EXEC x6] (L643-650)
> Configure six pulldown dropdown lists for the initial display. The payway list uses `true` (re-display flag ON, per IT2-2014-0000160 fix), while all others use `false`.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `setPulldownList(svcFormBean, outputMap, PAYWAY_HKTGI_LIST, "KKSV003611SC", true)` // Payment method carry-over list (re-display ON) |
| 2 | EXEC | `setPulldownList(svcFormBean, outputMap, SVC_NAIYO_HKTGI_LIST, "KKSV003612SC", false)` // Service content carry-over list |
| 3 | EXEC | `setPulldownList(svcFormBean, outputMap, DSL_SHORUI_SOHU_LIST, "KKSV003613SC", false)` // Termination notice type list |
| 4 | EXEC | `setPulldownList(svcFormBean, outputMap, JIMU_COMMISION_LIST, "KKSV003614SC", false)` // Service fee (agency fee) list |
| 5 | EXEC | `setPulldownList(svcFormBean, outputMap, STDARD_KOJI_HI_LSIT, "KKSV003615SC", false)` // Standard construction fee list |
| 6 | EXEC | `setPulldownList(svcFormBean, outputMap, BUNDLE_INFO_LSIT, "KKSV003616SC", false)` // Bundle information list |

**Block 7** — [EXEC] (L653-655)
> Set service type determination flags for display item control (IT2-2012-0000384 modification).

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `setSvc(svcFormBean, outputMap)` // Set service type display flags |

**Block 8** — [R + SET x4] (L659-671)
> Copy order detail (申請明細) fields from the one-stop agreement data. Extracts document number, order number, order detail number, and order type code.

| # | Type | Code |
|---|------|------|
| 1 | SET | `svcMsList = svcFormBean.getDataBeanArray(EKK0021A010CBSMSG1LIST)` // Order detail agreement list |
| 2 | SET | `svcMs = svcMsList.getDataBean(0)` // First element |
| 3 | SET | `mskmShoNo = svcMs.sendMessageString(MSKMSHO_NO_03, DATABEAN_GET_VALUE)` // Order document number |
| 4 | SET | `svcFormBean.sendMessageString(MSKMSHO_NO, DATABEAN_SET_VALUE, mskmShoNo)` // Copy to display bean |
| 5 | SET | `mskmNo = svcMs.sendMessageString(MSKM_NO_03, DATABEAN_GET_VALUE)` // Order number |
| 6 | SET | `svcFormBean.sendMessageString(MSKM_NO, DATABEAN_SET_VALUE, mskmNo)` // Copy to display bean |
| 7 | SET | `mskmshoDtlNo = svcMs.sendMessageString(MSKMSHO_DTL_NO_03, DATABEAN_GET_VALUE)` // Order detail number |
| 8 | SET | `svcFormBean.sendMessageString(MSKMSHO_DTL_NO, DATABEAN_SET_VALUE, mskmshoDtlNo)` // Copy to display bean |
| 9 | SET | `mskmSbtCd = svcMs.sendMessageString(MKSBT_03, DATABEAN_GET_VALUE)` // Order type code |
| 10 | SET | `svcFormBean.sendMessageString(MKSBT_CD, DATABEAN_SET_VALUE, mskmSbtCd)` // Copy to display bean |

**Block 9** — [R + SET x2] (L676-682)
> Get application type code and its display name from the type code list.

| # | Type | Code |
|---|------|------|
| 1 | SET | `svcMsSbtList = svcFormBean.getDataBeanArray(MKSBT_CD_LSIT)` // Application type code list |
| 2 | SET | `svcMsSbt = svcMsSbtList.getDataBean(0)` // First element |
| 3 | SET | `mskmSbt = svcMsSbt.sendMessageString(MKSBT_NM_09, DATABEAN_GET_VALUE)` // Application type code name |
| 4 | SET | `svcFormBean.sendMessageString(MKSBT, DATABEAN_SET_VALUE, mskmSbt)` // Copy to display bean |

**Block 10** — [R + SET x12] (L688-730)
> Get application agreement (申請書) info: acceptor, application date, application doc arrival date, and TNKYM (NTT transfer-from) service contract number fields. Also copies update timestamps.

| # | Type | Code |
|---|------|------|
| 1 | SET | `mskmList = svcFormBean.getDataBeanArray(EKK0011A010CBSMSG1LIST)` // Application agreement list |
| 2 | SET | `mskmElement = mskmList.getDataBean(0)` // First element |
| 3 | SET | `uktkTtSya = mskmElement.sendMessageString(UK_TNTSHA_04, DATABEAN_GET_VALUE)` // Acceptor |
| 4 | SET | `mskmElement.sendMessageString(UK_TNTSHA_LIST_04, DATABEAN_SET_VALUE, 0, uktkTtSya)` // Set acceptor list |
| 5 | SET | `mskmYmd = mskmElement.sendMessageString(MSKM_YMD_04, DATABEAN_GET_VALUE)` // Application date |
| 6 | SET | `svcFormBean.sendMessageString(MSKM_YMD, DATABEAN_SET_VALUE, mskmYmd)` // Copy to display bean |
| 7 | SET | `mskmShoYmd = mskmElement.sendMessageString(MSKM_UK_YMD_04, DATABEAN_GET_VALUE)` // Application doc arrival date |
| 8 | SET | `svcFormBean.sendMessageString(MSKM_UK_YMD, DATABEAN_SET_VALUE, mskmShoYmd)` // Copy to display bean |
| 9 | SET | `tnkym_svc_kei_no = mskmElement.sendMessageString(TNKYM_SVC_KEI_NO, DATABEAN_GET_VALUE)` // Transferred-from service contract number |
| 10 | SET | `svcFormBean.sendMessageString(TNKYM_SVC_KEI_NO, DATABEAN_SET_VALUE, tnkym_svc_kei_no)` // Copy to display bean |
| 11 | SET | `bf_tnkym_svc_kei_no = mskmElement.sendMessageString(TNKYM_SVC_KEI_NO, DATABEAN_GET_VALUE)` // Before-transfer service contract number |
| 12 | SET | `svcFormBean.sendMessageString(BF_TNKYM_SVC_KEI_NO, DATABEAN_SET_VALUE, bf_tnkym_svc_kei_no)` // Copy to display bean |
| 13 | SET | `mskm_uk_dtm = mskmElement.sendMessageString(MSKM_UK_DTM, DATABEAN_GET_VALUE)` // Application receive timestamp |
| 14 | SET | `svcFormBean.sendMessageString(MSKM_UK_DTM, DATABEAN_SET_VALUE, mskm_uk_dtm)` // Copy to display bean |
| 15 | SET | `upd_dtm_bf = mskmElement.sendMessageString(UPD_DTM, DATABEAN_GET_VALUE)` // Update date before |
| 16 | SET | `svcFormBean.sendMessageString(UPD_DTM_BF, DATABEAN_SET_VALUE, upd_dtm_bf)` // Copy to display bean |

**Block 11** — [R + SET x5] (L736-756)
> Get service contract agreement (サービス契約) info: introduction code, service code, price group code, service start desired date, and set display sequence numbers 1-4.

| # | Type | Code |
|---|------|------|
| 1 | SET | `svcList = svcFormBean.getDataBeanArray(EKK0081A010CBSMSG1LIST)` // Service contract agreement list |
| 2 | SET | `svcElement = svcList.getDataBean(0)` // First element |
| 3 | SET | `intrCd = svcElement.sendMessageString(INTR_CD_02, DATABEAN_GET_VALUE)` // Introduction code |
| 4 | SET | `svcElement.sendMessageString(INTR_CD_LIST_02, DATABEAN_SET_VALUE, 0, intrCd)` // Set intro code list |
| 5 | SET | `svcFormBean.sendMessageString(INTR_CD, DATABEAN_SET_VALUE, intrCd)` // Copy to display bean |
| 6 | SET | `svcCd = svcElement.sendMessageString(SVC_CD_02, DATABEAN_GET_VALUE)` // Service code |
| 7 | SET | `svcFormBean.sendMessageString(SVC_CD, DATABEAN_SET_VALUE, svcCd)` // Copy to display bean |
| 8 | SET | `prcGrpCd = svcElement.sendMessageString(PRC_GRP_CD_02, DATABEAN_GET_VALUE)` // Price group code |
| 9 | SET | `svcFormBean.sendMessageString(PRC_GRP_CD, DATABEAN_SET_VALUE, prcGrpCd)` // Copy to display bean |
| 10 | SET | `svcKibStatYmd = svcElement.sendMessageString(SVC_STA_KIBO_YMD_02, DATABEAN_GET_VALUE)` // Service start desired date |
| 11 | SET | `svcElement.sendMessageString(SVC_STA_KIBO_YMD, DATABEAN_SET_VALUE, 0, svcKibStatYmd)` // Copy to element |
| 12 | SET | `svcFormBean.sendMessageString(SEQ_1, DATABEAN_SET_VALUE, "1")` // Display sequence 1 |
| 13 | SET | `svcFormBean.sendMessageString(SEQ_2, DATABEAN_SET_VALUE, "2")` // Display sequence 2 |
| 14 | SET | `svcFormBean.sendMessageString(SEQ_3, DATABEAN_SET_VALUE, "3")` // Display sequence 3 |
| 15 | SET | `svcFormBean.sendMessageString(SEQ_4, DATABEAN_SET_VALUE, "4")` // Display sequence 4 |

**Block 12** — [SET x3] (L759-762)
> Preserve "before update" snapshot values for the progress compensation edit feature (ANK-1223-00-00).

| # | Type | Code |
|---|------|------|
| 1 | SET | `svcFormBean.sendMessageString(BK_MSKMSHO_NO, DATABEAN_SET_VALUE, mskmShoNo)` // Backup order document number |
| 2 | SET | `svcFormBean.sendMessageString(BK_MSKMSHO_DTL_NO, DATABEAN_SET_VALUE, mskmshoDtlNo)` // Backup order detail number |
| 3 | SET | `svcFormBean.sendMessageString(BF_INTR_CD, DATABEAN_SET_VALUE, intrCd)` // Backup introduction code |

**Block 13** — [R + SET x2] (L766-770)
> Get coupon code list for display (ANK-4416-00-00).

| # | Type | Code |
|---|------|------|
| 1 | SET | `couponList = svcFormBean.getDataBeanArray(EKK0311B002CBSMSG1LIST)` // Coupon code list |
| 2 | SET | `couponElement = couponList.getDataBean(0)` // First element |
| 3 | SET | `couponCd = couponElement.sendMessageString(COUPON_CD_23, DATABEAN_GET_VALUE)` // Coupon code |
| 4 | SET | `svcFormBean.sendMessageString(COUPON_CD_23, DATABEAN_SET_VALUE, couponCd)` // Copy to display bean |

**Block 14** — [R + LOOP] (L774-808)
> Iterate the handling code list and dispatch display processing for codes 1-4. Each dispJun value triggers `setToriatsukaiInfo()` with the appropriate display order.

| # | Type | Code |
|---|------|------|
| 1 | SET | `tratCdList = svcFormBean.getDataBeanArray(EKK0071B001CBSMSG1LIST)` // New application handling code list |
| 2 | SET | `bfTratCdList = svcFormBean.getDataBeanArray(BF_EKK0071B001CBSMSG1LIST)` // Before handling code list |
| 3 | SET | `for(i=0; i < tratCdList.getCount(); i++)` // Loop through handling codes |
| 4 | SET | `element = tratCdList.getDataBean(i)` // Get element at index |
| 5 | SET | `dispJun = Integer.valueOf(element.sendMessageString(DSP_JUN_05, DATABEAN_GET_VALUE))` // Display order number |

**Block 14.1** — [SWITCH-CASE: dispJun] (L788-806)

| # | Type | Code |
|---|------|------|
| 1 | CASE | `dispJun == TORATSU_CD1 (1)` // Handling code 1-1 |
| 2 | CASE | `dispJun == TORATSU_CD2 (2)` // Handling code 1-2 |
| 3 | CASE | `dispJun == TORATSU_CD3 (3)` // Handling code 2-1 |
| 4 | CASE | `dispJun == TORATSU_CD4 (4)` // Handling code 2-2 |
| 5 | EXEC | `setToriatsukaiInfo(svcFormBean, tratCdList, bfTratCdList, dispJun)` // Set handling code info |
| 6 | CASE | `default` // No processing |

**Block 15** — [SET x3] (L812-815)
> Declare display date formatter variables.

| # | Type | Code |
|---|------|------|
| 1 | SET | `dsp_mskm_ymd = null` // Display application date |
| 2 | SET | `dsp_mskm_uk_ymd = null` // Display application doc arrival date |
| 3 | SET | `dsp_svc_sta_kibo_ymd = null` // Display service start desired date |

**Block 16** — [IF x3 + EXEC x3 + SET x3] (L818-834)
> Format three date fields from raw format to YYYY/MM/DD display format. Each date is checked for null/empty before conversion.

| # | Type | Code |
|---|------|------|
| 1 | SET | `if(mskmYmd != null && !mskmYmd.isEmpty())` // Check application date |
| 2 | EXEC | `dsp_mskm_ymd = set_Ymd(mskmYmd)` // Format to YYYY/MM/DD |
| 3 | SET | `svcFormBean.sendMessageString(DSP_MSKM_YMD, DATABEAN_SET_VALUE, dsp_mskm_ymd)` // Set display date |
| 4 | SET | `if(mskmShoYmd != null && !mskmShoYmd.isEmpty())` // Check arrival date |
| 5 | EXEC | `dsp_mskm_uk_ymd = set_Ymd(mskmShoYmd)` // Format to YYYY/MM/DD |
| 6 | SET | `svcFormBean.sendMessageString(DSP_MSKM_UK_YMD, DATABEAN_SET_VALUE, dsp_mskm_uk_ymd)` // Set display date |
| 7 | SET | `if(svcKibStatYmd != null && !svcKibStatYmd.isEmpty())` // Check start date |
| 8 | EXEC | `dsp_svc_sta_kibo_ymd = set_Ymd(svcKibStatYmd)` // Format to YYYY/MM/DD |
| 9 | SET | `svcFormBean.sendMessageString(DSP_SVC_STA_KIBO_YMD, DATABEAN_SET_VALUE, dsp_svc_sta_kibo_ymd)` // Set display date |

**Block 17** — [SET x3 + FOR LOOP] (L839-845)
> Initialize standard construction fee counter and retrieve the temporary payment/purchase list for fee item processing.

| # | Type | Code |
|---|------|------|
| 1 | SET | `hyojunkojihi_count = 0` // Standard construction fee counter |
| 2 | SET | `eKK1021B501CBSMSG1LIST = svcFormBean.getDataBeanArray(EKK1021B501CBSMSG1LIST)` // Temporary payment list |
| 3 | SET | `for(i = 0; i < eKK1021B501CBSMSG1LIST.getCount(); i++)` // Loop through payment items |

**Block 17.1** — [SET x3] (L848-854)
> Inside the payment loop: retrieve the element and extract the first 2 digits of the temporary payment purchase number to determine fee type.

| # | Type | Code |
|---|------|------|
| 1 | SET | `element = eKK1021B501CBSMSG1LIST.getDataBean(i)` // Get element |
| 2 | SET | `tmpPayPrcNo = element.sendMessageString(TMP_PAY_PRC_NO_16, DATABEAN_GET_VALUE)` // Temporary payment purchase number |
| 3 | SET | `divStr = tmpPayPrcNo.substring(0, 2)` // First 2 digits: service fee (01/04/11/21) or construction fee (99) |

**Block 17.2** — [IF: divStr == 01/04/11/21] (L858-862)
> Check if this is a service fee item. The prefixes 01, 04, 11, and 21 all indicate service fee types (after ANK-3636-00-00 tax rate update).

| # | Type | Code |
|---|------|------|
| 1 | SET | `if(divStr.equals("01") || divStr.equals("04") || divStr.equals("11") || divStr.equals("21"))` // Service fee type |

**Block 17.2.1** — [SET x1 + FOR x2 + IF + BREAK] (L865-878)
> Check if the first 9 digits of the payment number match any contract service fee pattern in KEI_EXPENSE_CHARGE_BEFORE9. If not, skip this item.

| # | Type | Code |
|---|------|------|
| 1 | SET | `wkTmpPayPrvNoBefore9 = tmpPayPrcNo.substring(0, 9)` // First 9 digits of payment number |
| 2 | SET | `isKeiExpenseCharge = false` // Contract service fee flag |
| 3 | SET | `for(cnt = 0; cnt < KEI_EXPENSE_CHARGE_BEFORE9.length; cnt++)` // Iterate patterns |
| 4 | SET | `if(KEI_EXPENSE_CHARGE_BEFORE9[cnt].equals(wkTmpPayPrvNoBefore9))` // Match check |
| 5 | SET | `isKeiExpenseCharge = true` // Set flag |
| 6 | EXEC | `break` // Exit inner loop |
| 7 | SET | `if(!isKeiExpenseCharge) continue` // Skip if not contract service fee |

KEI_EXPENSE_CHARGE_BEFORE9 resolved values: `"010050486"`, `"010050016"`, `"010050506"`, `"010450066"`, `"110050486"`, `"110050016"`, `"110050506"`, `"110450066"`, `"210050486"`, `"210050016"`, `"210050506"`, `"210450066"` (Contract service fee first-9 patterns for service fee types 01/11/21)

**Block 17.2.2** — [SET x10 + IF x4 + SET x3] (L880-930)
> Process service fee (agency fee) info: retrieve setup number, set request bean fields, determine display text based on setup code (01=none, 02=yes, 03=half, 04=specified), convert amount to display format, and copy to the display bean list.

| # | Type | Code |
|---|------|------|
| 1 | SET | `jimu_Info = svcFormBean.getDataBeanArray(XXXXXXXXXXX2CBSMSG1LIST)` // Agency fee info list |
| 2 | SET | `jimu_subbean = jimu_Info.getDataBean(0)` // First element |
| 3 | SET | `icjkn_sette_no = element.sendMessageString(ICJKN_SETTE_NO_16, DATABEAN_GET_VALUE)` // Temporary payment setup number |
| 4 | SET | `jimu_subbean.sendMessageString(ICJKN_SETTE_NO_07, DATABEAN_SET_VALUE, icjkn_sette_no)` // Copy to subbean |
| 5 | SET | `jimu_subbean.sendMessageString(TMP_PAY_PRC_NO_07, DATABEAN_SET_VALUE, tmpPayPrcNo)` // Copy payment number |
| 6 | SET | `ichjn_sette_cd = element.sendMessageString(ICJKN_SETTE_CD_16, DATABEAN_GET_VALUE)` // Temporary payment setup code |
| 7 | SET | `svcFormBean.sendMessageString(JIMU_COMMISION_CD, DATABEAN_SET_VALUE, ichjn_sette_cd)` // Copy setup code |
| 8 | SET | `if(ichjn_sette_cd.equals("01")) dsp_jimu_commision = "1.無"` // Display: 1. None |
| 9 | SET | `else if(ichjn_sette_cd.equals("02")) dsp_jimu_commision = "2.有"` // Display: 2. Yes |
| 10 | SET | `else if(ichjn_sette_cd.equals("03")) dsp_jimu_commision = "3.半額"` // Display: 3. Half price |
| 11 | SET | `else if(ichjn_sette_cd.equals("04")) dsp_jimu_commision = "4.指定額"` // Display: 4. Specified amount |
| 12 | SET | `svcFormBean.sendMessageString(DSP_JIMU_COMMISION, DATABEAN_SET_VALUE, dsp_jimu_commision)` // Set display text |
| 13 | SET | `jimu_commision_amnt = element.sendMessageString(ICJKN_SHITEI_AMNT_16, DATABEAN_GET_VALUE)` // Specified amount |
| 14 | SET | `svcFormBean.sendMessageString(BF_JIMU_COMMISION_AMNT, DATABEAN_SET_VALUE, jimu_commision_amnt)` // Backup before amount |
| 15 | SET | `jimu_commision_amnt = setChgAmnt(jimu_commision_amnt)` // Convert to currency display |
| 16 | EXEC | `jimu_subbean.sendMessage(JIMU_COMMISION_AMNT_LIST_07, DATABEAN_CLEAR)` // Clear list |
| 17 | EXEC | `jimu_subbean.sendMessageString(JIMU_COMMISION_AMNT_LIST_07, DATABEAN_ADD_VALUE, jimu_commision_amnt)` // Add amount |
| 18 | SET | `jimu_subbean.sendMessageString(JIMU_COMMISION_AMNT_07, DATABEAN_SET_VALUE, jimu_commision_amnt)` // Set amount |
| 19 | SET | `icjkn_jimu_upd_dtm = element.sendMessageString(UPD_DTM_16, DATABEAN_GET_VALUE)` // Update timestamp |
| 20 | SET | `svcFormBean.sendMessageString(ICJKN_JIMU_UPD_DTM, DATABEAN_SET_VALUE, icjkn_jimu_upd_dtm)` // Copy timestamp |
| 21 | SET | `jimu_subbean.sendMessageString(UPD_DTM_07, DATABEAN_SET_VALUE, icjkn_jimu_upd_dtm)` // Copy to subbean |

**Block 17.3** — [IF: divStr == 99] (L932-973)
> Process standard construction fee (標準工事件) info when divStr is "99". Determine if construction fee is present/absent based on ichjn_sette_cd, set display text, and increment the counter.

| # | Type | Code |
|---|------|------|
| 1 | SET | `koji_Info = svcFormBean.getDataBeanArray(XXXXXXXXXXX3CBSMSG1LIST)` // Standard construction fee info list |
| 2 | SET | `koji_subbean = koji_Info.getDataBean(0)` // First element |
| 3 | SET | `icjkn_sette_no = element.sendMessageString(ICJKN_SETTE_NO_16, DATABEAN_GET_VALUE)` // Setup number |
| 4 | SET | `koji_subbean.sendMessageString(ICJKN_SETTE_NO_08, DATABEAN_SET_VALUE, icjkn_sette_no)` // Copy to subbean |
| 5 | SET | `koji_subbean.sendMessageString(TMP_PAY_PRC_NO_08, DATABEAN_SET_VALUE, tmpPayPrcNo)` // Copy payment number |
| 6 | SET | `ichjn_sette_cd = element.sendMessageString(ICJKN_SETTE_CD_16, DATABEAN_GET_VALUE)` // Setup code |
| 7 | SET | `if(ichjn_sette_cd.equals("01")) { stdard_koji_hi_cd = "1"; dsp_koji_commision = "2.有" }` // Present (code=1, display=2.Yes) |
| 8 | SET | `else if(ichjn_sette_cd.equals("02")) { stdard_koji_hi_cd = "0"; dsp_koji_commision = "1.無" }` // Absent (code=0, display=1.None) |
| 9 | SET | `svcFormBean.sendMessageString(STDARD_KOJI_HI_CD, DATABEAN_SET_VALUE, stdard_koji_hi_cd)` // Set code |
| 10 | SET | `svcFormBean.sendMessageString(DSP_STDARD_KOJI_HI, DATABEAN_SET_VALUE, dsp_koji_commision)` // Set display |
| 11 | SET | `icjkn_koji_upd_dtm = element.sendMessageString(UPD_DTM_16, DATABEAN_GET_VALUE)` // Update timestamp |
| 12 | SET | `svcFormBean.sendMessageString(ICJKN_STDARD_UPD_DTM, DATABEAN_SET_VALUE, icjkn_koji_upd_dtm)` // Copy timestamp |
| 13 | SET | `koji_subbean.sendMessageString(UPD_DTM_08, DATABEAN_SET_VALUE, icjkn_koji_upd_dtm)` // Copy to subbean |
| 14 | SET | `hyojunkojihi_count++` // Increment counter |

**Block 18** — [IF: hyojunkojihi_count == 0] (L977-980)
> If no standard construction fee items were found in the loop, default the construction fee code to "1" (present/有料). This is because the only available data for the temporary payment skim is "free" when count is 0, meaning standard construction fee is actually present.

| # | Type | Code |
|---|------|------|
| 1 | SET | `if(hyojunkojihi_count == 0)` // No standard construction fee found |
| 2 | SET | `svcFormBean.sendMessageString(STDARD_KOJI_HI_CD, DATABEAN_SET_VALUE, "1")` // Default to "1" (present) |

**Block 19** — [IF: empty list] (L984-990)
> If the temporary payment list is empty, set empty values in the service fee info bean (IT2-2012-0000343).

| # | Type | Code |
|---|------|------|
| 1 | SET | `if(eKK1021B501CBSMSG1LIST.getCount() == 0)` // Temporary payment list empty |
| 2 | SET | `jimu_Info = svcFormBean.getDataBeanArray(XXXXXXXXXXX2CBSMSG1LIST)` // Agency fee info |
| 3 | SET | `jimu_Info.getDataBean(0).sendMessageString(JIMU_COMMISION_AMNT_LIST_07, DATABEAN_SET_VALUE, 0, "")` // Set empty list |
| 4 | SET | `jimu_Info.getDataBean(0).sendMessageString(JIMU_COMMISION_AMNT_07, DATABEAN_SET_VALUE, "")` // Set empty amount |

**Block 20** — [EXEC] (L994-995)
> Set contract content notification checkbox settings (ANK-2985-00-00).

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `setTsuchishoList(svcFormBean)` // Set contract content notification checkboxes |

**Block 21** — [EXEC] (L998)
> Initialize pulldown dropdown settings.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `setPulldownInit(svcFormBean)` // Initialize pulldown settings |

**Block 22** — [CALL x2] (L1001-1003)
> Retrieve the service contract common header map and distribute service contract info to the web layer.

| # | Type | Code |
|---|------|------|
| 1 | SET | `svc_kei_dataMap = getSvckeiCommonMap(outputMap, paramBean)` // Build service contract common map |
| 2 | EXEC | `JKKWebCommon.setSvckeiInfo(this, svc_kei_dataMap)` // Set service contract info |

**Block 23** — [EXEC x3] (L1007-1010)
> Set up map screen data, button display settings, and button active flags (ANK-2121-00-00, ANK-4401-00-00).

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `setMapGmnData(svcFormBean)` // Map screen setup data |
| 2 | EXEC | `setBtnDispData(svcFormBean)` // Button display settings |
| 3 | EXEC | `setBtnActiveData(svcFormBean)` // Construction fee total notification button active flag |

**Block 24** — [CALL x2] (L1014-1018)
> Retrieve customer contract continuation data and persist it to session for screen retention.

| # | Type | Code |
|---|------|------|
| 1 | SET | `hktgiData = getHktgiDataMap(svcFormBean, CUST_KEI_HKTGI_LIST, CUST_KEI_HKTGI_KEYS)` // Customer contract continuation data |
| 2 | EXEC | `JCCWebCommon.setScreenInfo(this, JKKScreenConst.SCREEN_ID_KKW00127, hktgiData)` // Persist to session |

**Block 25** — [EXEC + RETURN] (L1021-1023)
> Dump data bean state to log and return success.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `JSYwebLog.println(JSYwebLog.DataBean_Dump, getClass(), dumpDatabean(), null, null, null)` // Log data bean |
| 2 | RETURN | `return true` // Indicate successful initialization |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `mskmShoNo` | Field | Order document number — the document number assigned to a batch of applications |
| `mskmNo` | Field | Order number — unique identifier for a specific application record |
| `mskmshoDtlNo` | Field | Order detail number — line-level identifier within an order document |
| `mskmSbtCd` | Field | Order type code — classifies the type of order/application |
| `uktkTtSya` | Field | Acceptor (担当社) — the responsible party/acceptor for the application |
| `mskmYmd` | Field | Application date (申請年月日) — the date the application was submitted |
| `mskmShoYmd` | Field | Application document arrival date (申請書到着年月日) — when the application document was received |
| `tnkym_svc_kei_no` | Field | Transferred-from service contract number (転居元サービス契約番号) — the NTT service contract number being transferred from during NTT cancellation (NTT卸対応) |
| `bf_tnkym_svc_kei_no` | Field | Before-transfer service contract number (変更前転居元サービス契約番号) — the service contract number before the transfer change |
| `mskm_uk_dtm` | Field | Application receive timestamp (申請受付年月日時) — precise timestamp of application receipt |
| `upd_dtm_bf` | Field | Update date before (更新年月日時(変更前)) — the last update timestamp before the current modification |
| `intrCd` | Field | Introduction code (紹介コード) — the referral/introduction channel code |
| `svcCd` | Field | Service code (サービスコード) — identifies the service type (e.g., eo Hikari FTTH, eo Mobile, eo TV) |
| `prcGrpCd` | Field | Price group code (料金グルーpcodes) — the pricing tier/group for the service contract |
| `svcKibStatYmd` | Field | Service start desired date (サービス開始希望日) — the date the customer wants the service to begin |
| `ichjn_sette_cd` | Field | Temporary payment setup code (一時金設定コード) — 01=None, 02=Yes, 03=Half, 04=Specified amount (agency fee); 01=Present, 02=Absent (construction fee) |
| `jimu_commision_amnt` | Field | Service fee specified amount (業務手数料・指定額) — the agency fee amount for service fee items |
| `stdard_koji_hi_cd` | Field | Standard construction fee code (標準工事費コード) — 0=Absent (無料), 1=Present (有料) |
| `hyojunkojihi_count` | Field | Standard construction fee count (標準工件事) — counter for how many standard construction fee items were processed |
| `dispJun` | Field | Display order number (表示順番番号) — the sort order for handling code display |
| `tmpPayPrcNo` | Field | Temporary payment purchase number (一時金支払料金番号) — identifies temporary payment items; first 2 digits determine type (01/04/11/21 = service fee, 99 = construction fee) |
| `divStr` | Field | Division string — the first 2 characters of tmpPayPrcNo indicating fee category |
| `isKeiExpenseCharge` | Field | Contract service fee flag — whether the payment number matches a contract service fee pattern |
| `TORATSU_CD1-4` | Constant | Handling codes 1-1, 1-2, 2-1, 2-2 — internal codes for handling types (取扱いコード) |
| KEI_EXPENSE_CHARGE_BEFORE9 | Constant | Array of 12 contract service fee first-9 digit patterns — matching prefixes indicate contract service fee items |
| EKK0021A010CBSMSG1LIST | Constant | Order detail agreement list (申請明細一貫照会明細) — CBS data element name for order detail |
| EKK0011A010CBSMSG1LIST | Constant | Application agreement list (申請一貫照会明細) — CBS data element name for application info |
| EKK0081A010CBSMSG1LIST | Constant | Service contract agreement list (サービス契約一貫照会明細) — CBS data element name for service contract |
| EKK0071B001CBSMSG1LIST | Constant | Handling code list (新規申請時取扱いコード一覧照会明細) — CBS data element name for handling codes |
| EKK1021B501CBSMSG1LIST | Constant | Temporary payment list (一時金設定業務手数料情報取得) — CBS data element name for temporary payment items |
| EKK0311B002CBSMSG1LIST | Constant | Coupon code list (クーポンコード一覧照会明細) — CBS data element name for coupon codes |
| XXXXXXXXXXX2CBSMSG1LIST | Constant | Temporary payment agency fee info (一時金設定業務手数料情報取得) — placeholder name for agency fee info CBS |
| XXXXXXXXXXX3CBSMSG1LIST | Constant | Temporary payment standard construction fee info (一時金設定標準工件事情報取得) — placeholder name for construction fee CBS |
| KKW00127 | Screen ID | Order Information Update screen (申請情報更新・照会) — the K-Opticom customer order update reference screen |
| KKSV003611SC - KKSV003616SC | SC Code | Pulldown source screen codes for payment method, service content, termination notice, agency fee, standard construction fee, and bundle info |
| CUST_KEI_HKTGI_LIST | Constant | Customer contract continuation list (顧客契約引継リスト) — customer contract carryover data |
| JKKScreenConst.SCREEN_ID_KKW00127 | Constant | Screen ID string "KKW00127" — used for session persistence |
| ANK-4427-00-00 | Change ID | NTT cancellation response (NTT卸対応) — added TNKYM fields for NTT cancellation workflow |
| ANK-1223-00-00 | Change ID | Progress compensation edit support (進捗補足事項編集対応) — added before-update value preservation |
| ANK-2121-00-00 | Change ID | Full participation response (フル参加対応) — added map screen and button display settings |
| ANK-3636-00-00 | Change ID | Consumption tax response (8% to 10%) (消費税対応) — added prefixes 11 and 21 to service fee type check |
| ANK-2985-00-00 | Change ID | Contract content notification checkbox settings (契約内容通知書(コンビニボックス設定)) |
| ANK-4401-00-00 | Change ID | Invoice response (インボイス対応) — added construction fee total notification button active flag |
| IT2-2014-0000160 | Change ID | No display on order info update screen (申請情報更新画面の扱いに何も表示されない) — fixed payway list re-display flag |
| OneStopDataBeanAccess | Class | One-stop screen data bean access class — provides getDataBeanArray, getDataBean, sendMessageString for cross-screen data access |
| X31SDataBeanAccess | Class | Screen data bean access class — the primary data container for screen state |
| set_Ymd | Method | Date formatter — converts raw date string to YYYY/MM/DD display format |
| setChgAmnt | Method | Amount converter — converts numeric amount to display-formatted currency string |
