---
# Business Logic — FUW03901SFLogic.chkPayInitialCost() [29 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.FUW03901SF.FUW03901SFLogic` |
| Layer | Service (Webview Logic / Business Service Layer) |
| Module | `FUW03901SF` (Package: `eo.web.webview.FUW03901SF`) |

## 1. Role

### FUW03901SFLogic.chkPayInitialCost()

This method determines whether a customer's order includes any initial charges (setup fees) by inspecting the data structure prepared during the screen's processing flow. It operates on an `outputMap` that was populated earlier by the `setFUSV019201CC` mapping step, which loads process information from the FUSV0192 service. Specifically, it checks whether the child list key `EKK0721A010CBSMsg1List` exists and contains at least one entry — this list holds temporary payment details such as NTT West Japan suspension work costs (一時支払金額（NTT西日本休止工事費）). If such a list exists and is non-empty, the method signals that initial costs are present (`true`). Otherwise, it signals no initial costs (`false`). This method is called from `FUW03901SFLogic.init()`, serving as a decision gate in the authentication ID / password change business logic flow that determines whether to display or process initial fee information on the password change screen.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["chkPayInitialCost(outputMap)"])
    CHECK_CONTAINS["outputMap contains FUSV019201CC"]
    GET_PARENT["parentMap = outputMap.get(FUSV019201CC)"]
    CHECK_PARENT_NULL{"parentMap != null"}
    CHECK_PARENT_KEY{"parentMap contains EKK0721A010CBSMsg1List"}
    GET_CHILD_LIST["childList = parentMap.get(EKK0721A010CBSMsg1List)"]
    CHECK_CHILD_NULL{"childList != null"}
    CHECK_CHILD_SIZE{"childList.size() > 0"}
    RES_TRUE["res = true (Initial cost exists)"]
    RES_FALSE["res = false (No initial cost)"]
    RETURN_FALSE["res = false (No initial cost)"]
    END_RETURN(["return res"])

    START --> CHECK_CONTAINS
    CHECK_CONTAINS -- true --> GET_PARENT --> CHECK_PARENT_NULL
    CHECK_CONTAINS -- false --> CHECK_PARENT_NULL
    CHECK_PARENT_NULL -- true --> CHECK_PARENT_KEY
    CHECK_PARENT_NULL -- false --> RETURN_FALSE
    CHECK_PARENT_KEY -- true --> GET_CHILD_LIST
    CHECK_PARENT_KEY -- false --> RETURN_FALSE
    GET_CHILD_LIST --> CHECK_CHILD_NULL
    CHECK_CHILD_NULL -- true --> CHECK_CHILD_SIZE
    CHECK_CHILD_NULL -- false --> RES_FALSE
    CHECK_CHILD_SIZE -- true --> RES_TRUE --> END_RETURN
    CHECK_CHILD_SIZE -- false --> RES_FALSE --> END_RETURN
    RES_TRUE --> END_RETURN
    RES_FALSE --> END_RETURN
    RETURN_FALSE --> END_RETURN
```

**Constant Resolution:**
- `FUSV019201CC` = `"FUSV019201CC"` — Key in `outputMap` for the parent process info HashMap (FUSV0192 service process details).
- `EKK0721A010CBSMSG1LIST` = `"EKK0721A010CBSMsg1List"` — Key in `parentMap` for the `ArrayList` holding temporary payment (NTT West Japan suspension work cost) agreement details (一時支払金額（NTT西日本休止工事費）一時支払金合意明細).

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `outputMap` | `HashMap` | The output data structure that carries all screen processing results. It was populated during `init()` by mapping calls such as `setFUSV019201CC`, which load FUSV0192 service process information. Under the key `FUSV019201CC`, it holds a `HashMap` (parentMap) that may contain the `EKK0721A010CBSMsg1List` key with a list of temporary payment items. |

**Instance fields / external state read:** None. This method is purely stateless — it reads only from the `outputMap` parameter and produces a boolean result.

## 4. CRUD Operations / Called Services

This method performs **no database or service component calls**. It is a pure in-memory data inspection logic that navigates nested `HashMap`/`ArrayList` structures within the `outputMap`.

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| — | — | — | — | No CRUD operations. This method only inspects in-memory data structures. |

**Note:** The data being inspected originates from the `setFUSV019201CC` mapping step (called earlier in `init()`) and the `EKK0721A010CBSMsg1List` list is populated by CBS operations in the broader flow. However, `chkPayInitialCost` itself does not invoke any service components or perform any CRUD operations.

## 5. Dependency Trace

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

No screen/batch entry points found within 8 hops. Direct callers found: 1 methods.

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | `FUW03901SFLogic.init()` | `init()` -> `chkPayInitialCost(outputMap)` | None (pure logic check) |

**Caller Description:**
- `FUW03901SFLogic.init()` — The initialization method of the same class (authentication ID/password change business logic class) calls `chkPayInitialCost(outputMap)` to determine whether initial costs apply to the current user's service, likely to conditionally display fee information or gate subsequent processing on the password change screen.

## 6. Per-Branch Detail Blocks

> This method performs a cascading null-check pattern on nested HashMap entries to determine whether initial payment items are present. The business rule is: initial costs exist if and only if the parent process map contains a non-null, non-empty child list keyed by the temporary payment agreement details identifier.

**Block 1** — [IF] `(outputMap.containsKey(FUSV019201CC))` `[FUSV019201CC="FUSV019201CC"]` (L545)

> Checks whether the outputMap has been populated with FUSV0192 service process info. If present, the parent map is extracted for further inspection.

| # | Type | Code |
|---|------|------|
| 1 | SET | `boolean res = false;` // Default: no initial cost |
| 2 | SET | `HashMap parentMap = null;` // Initialize parent reference |
| 3 | IF | `outputMap.containsKey(FUSV019201CC)` `[FUSV019201CC="FUSV019201CC"]` |

**Block 1.1** — [nested IF: true branch] (L546)

> The parent process map exists — extract it from the output map.

| # | Type | Code |
|---|------|------|
| 1 | SET | `parentMap = (HashMap) outputMap.get(FUSV019201CC)` // Cast to HashMap |

**Block 1.2** — [nested IF: false branch] (L545)

> No FUSV0192 data in outputMap — `parentMap` remains null, flow continues to Block 2 where null check handles it.

**Block 2** — [IF] `(null != parentMap && parentMap.containsKey(EKK0721A010CBSMSG1LIST))` `[EKK0721A010CBSMSG1LIST="EKK0721A010CBSMsg1List"]` (L550)

> Checks two conditions: (1) parentMap is not null (i.e., the outer IF was taken), and (2) parentMap contains the temporary payment child list key. Both must hold to proceed to cost detection.

| # | Type | Code |
|---|------|------|
| 1 | IF | `null != parentMap` |
| 2 | AND | `parentMap.containsKey(EKK0721A010CBSMSG1LIST)` `[EKK0721A010CBSMSG1LIST="EKK0721A010CBSMsg1List"]` |

**Block 2.1** — [nested IF: true branch] (L551)

> Parent map has the child list — extract it and check whether it has any entries.

| # | Type | Code |
|---|------|------|
| 1 | SET | `ArrayList childList = (ArrayList) parentMap.get(EKK0721A010CBSMSG1LIST)` // Cast to ArrayList |

**Block 2.1.1** — [IF] `(childList != null && childList.size() > 0)` (L553)

> The child list exists and contains entries — this means temporary payment items (e.g., NTT West Japan suspension work costs) are present, so initial costs apply.

| # | Type | Code |
|---|------|------|
| 1 | IF | `childList != null` |
| 2 | AND | `childList.size() > 0` |
| 3 | SET | `res = true` // 初期費用がある場合 (Initial cost exists) |

**Block 2.1.2** — [nested ELSE] (L557)

> The child list is empty — no temporary payment items.

| # | Type | Code |
|---|------|------|
| 1 | SET | `res = false` // 初期費用がない場合 (No initial cost) |

**Block 2.2** — [nested IF: false branch] (L550)

> Either parentMap is null or it does not contain the child list key. In either case, no initial costs exist.

| # | Type | Code |
|---|------|------|
| 1 | SET | `res` remains `false` (default from Block 1) |

**Block 3** — [RETURN] `(return res)` (L561)

> Returns the final determination: `true` if initial costs exist (non-empty child list found), `false` otherwise.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return res` // true: 初期費用あり / false: 初期費用なし |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `chkPayInitialCost` | Method | Initial cost payment check — determines whether the customer's service order includes any initial/setup fees |
| `initial cost` (初期費用) | Business term | One-time setup charges incurred at the time of service activation or modification |
| `FUSV019201CC` | Constant | Key string (`"FUSV019201CC"`) for accessing the parent process info HashMap in `outputMap`; represents the FUSV0192 service process data |
| `FUSV0192` | Service ID | Service ID for initial display processing (初期表示) — the service responsible for loading the screen's initial data |
| `EKK0721A010CBSMsg1List` | Constant | Key string (`"EKK0721A010CBSMsg1List"`) for the child list ArrayList; holds temporary payment (NTT West Japan suspension work cost) agreement details |
| `一時支払金額（NTT西日本休止工事費）` | Business term | Temporary payment amount — NTT West Japan suspension work cost; fees incurred when service suspension work is performed by NTT West Japan |
| `一時支払金合意明細` | Business term | Temporary payment agreement details — line-item breakdown of agreed temporary payments |
| `outputMap` | Parameter | HashMap carrying all screen processing output data; populated by mapping methods during `init()` |
| `parentMap` | Local variable | HashMap extracted from `outputMap` under key `FUSV019201CC`, containing parent process information |
| `childList` | Local variable | ArrayList extracted from `parentMap` under key `EKK0721A010CBSMsg1List`, containing temporary payment detail entries |
| `FUW03901SF` | Module | Authentication ID / password change module — handles business logic for password changes including security validation |
| `init()` | Method | Initialization method of `FUW03901SFLogic` that sets up screen data and invokes `chkPayInitialCost` |
| `setFUSV019201CC` | Mapping method | DB mapping method (from `FUSV0192_FUSV0192OPDBMapper`) that populates `outputMap` with FUSV0192 process information |
| `FUSV0075` | Service ID | Service ID for application (申請) — order registration service |
| `FUSV0259` | Service ID | Service ID for application (ADSL) — ADSL order registration service |
| `AUTH_ID` | Domain | Authentication ID — the customer's login identifier for the service platform |
| `password change` (パスワード変更) | Business term | The business operation of changing a customer's authentication password, the primary purpose of the `FUW03901SF` module |
