# Business Logic — JFUCngSeikyushoYohiCC.setOutMapEKK0491A010() [65 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `com.fujitsu.futurity.bp.custom.common.JFUCngSeikyushoYohiCC` |
| Layer | CC / Common Component |
| Module | `common` (Package: `com.fujitsu.futurity.bp.custom.common`) |

## 1. Role

### JFUCngSeikyushoYohiCC.setOutMapEKK0491A010()

This method performs a **downward mapping** (下りマッピング) of invoice contract detail fields from a child map into the parent request parameter map, specifically for the invoice contract unique inquiry screen (請求契約一意照会). It operates as a **field-level data transfer** method within the customer information change workflow (変更請求書oughi — service charge information modification).

The method retrieves a previously populated detail list (stored under the template key `EKK0491A010CBSMsg1List`) from the parent `inMap`, extracts the first child record, and copies **49 billing contract and delivery address fields** into the parent map. These fields cover the full spectrum of invoice contract data: contract status, agreement dates, cancellation details, billing cycles, payment methods (bank account or credit card), customer contact information, and delivery address specifications.

This is a **shared utility method** called by the parent `cngSeikyushoYohi()` method, which serves as the main entry point for the customer invoice change service. The method implements a **simple builder pattern** — assembling the output map with all fields required by the downstream inquiry display processing, ensuring the screen has access to the complete set of invoice contract detail fields in a single consolidated structure.

The method has no conditional branches; it executes a linear sequence of field copies, always processing the first detail record in the list.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["setOutMapEKK0491A010(param, fixedText)"])
    STEP1["Retrieve inMap from param.getData(fixedText)"]
    STEP2["Extract childList from inMap.get(TEMPLATE_ID_DETAIL_EKK0491A010)"]
    STEP3["Select first item childMap from childList.get(0)"]
    STEP4["Copy childMap fields to inMap
49 fields transferred"]
    END_NODE(["Return (void)"])

    START --> STEP1 --> STEP2 --> STEP3 --> STEP4 --> END_NODE
```

The method executes a linear, sequential flow with no branching:

1. **Retrieves the parent map** (`inMap`) from the request parameter using `param.getData(fixedText)`. The `fixedText` parameter serves as the service message key that identifies which data section to access.
2. **Extracts the detail list** (`childList`) from the parent map using the template key `TEMPLATE_ID_DETAIL_EKK0491A010`, which resolves to `"EKK0491A010CBSMsg1List"`. This list contains the billing contract detail records populated by a prior SC call.
3. **Selects the first detail record** (`childMap`) from the list at index 0, representing the primary invoice contract detail being processed.
4. **Copies all 49 fields** from the child map into the parent map using `inMap.put()`, each value retrieved via `childMap.get()` with the corresponding field constant from `EKK0491A010CBSMsg1List`.
5. **Returns** (void) — the parent map is now fully populated with invoice contract detail fields for downstream use.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `param` | `IRequestParameterReadWrite` | Request parameter object carrying the full business context for the customer invoice change operation. It holds the request data map (`inMap`) under the key identified by `fixedText`, and serves as the central data carrier throughout the service chain. |
| 2 | `fixedText` | `String` | Service message identifier that specifies which data section within the parameter's internal map to access. It acts as the key for retrieving the parent data map (`inMap`) that contains the invoice contract detail list. Typically corresponds to the SC screen code (e.g., `EKK0491A010`). |

**Instance/External State:**

| Name | Type | Business Description |
|------|------|---------------------|
| `TEMPLATE_ID_DETAIL_EKK0491A010` | `private static final String` | Template identifier constant resolving to `"EKK0491A010CBSMsg1List"`. Used as the key to locate the detail list within the parent data map. |

## 4. CRUD Operations / Called Services

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

This method performs **only map-level data operations** (field copies from child map to parent map). It does **not** directly invoke any SC/CBS, DAO, or database methods. All data retrieval was completed in prior processing stages (called by the parent method `cngSeikyushoYohi()` which invokes `executeSC` / `getData` operations before this method is called).

The method's role is purely **in-process data assembly** — mapping already-retrieved data from a nested structure to a flat parent map.

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| (none) | — | — | — | This method contains no direct SC/CBS/DAO calls. It performs in-memory field mapping from `childMap` to `inMap`. Data was retrieved in prior processing steps by the caller `cngSeikyushoYohi()`. |

### In-Process Operations (Map Data Transfer)

| # | Type | Target | Fields Copied |
|---|------|--------|---------------|
| 1 | MAP_PUT | `inMap` ← `childMap` | All 49 fields from `EKK0491A010CBSMsg1List` (see Block analysis below) |

## 5. Dependency Trace

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

No screen/batch entry points found within 8 hops. Direct callers found: 1 methods.
Terminal operations from this method: *(none — this method performs only in-memory map operations, no external calls)*

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | CC: JFUCngSeikyushoYohiCC.cngSeikyushoYohi() | `cngSeikyushoYohi()` → `setOutMapEKK0491A010(param, fixedText)` | *(none — this method performs in-memory mapping only)* |

The caller `JFUCngSeikyushoYohiCC.cngSeikyushoYohi()` is the main service method for the customer invoice change operation (変更請求書oughi). Before calling `setOutMapEKK0491A010()`, the caller executes SC operations (via `JFUBaseUtil.executeSC`) to retrieve invoice contract data, which populates the `childMap` that this method then maps into the parent `inMap`.

## 6. Per-Branch Detail Blocks

The method has **no conditional branches** — it executes a single linear path. The body consists of a sequence of 49 field copy operations.

**Block 1** — [ENTIRE BODY] `(no conditions)` (L1160)

> Retrieves the parent map, extracts the detail child list, and copies all billing contract and delivery address fields from the first child record into the parent map.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | EXEC | `inMap = (HashMap) param.getData(fixedText)` | Retrieves the parent data map from the request parameter under the `fixedText` key. (親マップの取得) |
| 2 | EXEC | `childList = (ArrayList) inMap.get(TEMPLATE_ID_DETAIL_EKK0491A010)` | Extracts the detail list (`"EKK0491A010CBSMsg1List"`) from the parent map. (明細リストの取得) |
| 3 | EXEC | `childMap = (HashMap) childList.get(0)` | Selects the first child record (index 0) as the source invoice contract detail. (第1明細レコードの取得) |
| 4 | SET | `inMap.put(SEIKY_KEI_STAT, childMap.get(SEIKY_KEI_STAT))` | Copy: Billing contract status (請求契約ステータス) |
| 5 | SET | `inMap.put(SYSID, childMap.get(SYSID))` | Copy: System ID (SYSID) |
| 6 | SET | `inMap.put(MANSION_OWNR_ID, childMap.get(MANSION_OWNR_ID))` | Copy: Mansion owner ID (マンションオーナーID) |
| 7 | SET | `inMap.put(SEIKY_WAY_CD, childMap.get(SEIKY_WAY_CD))` | Copy: Billing method code (請求方法コード) |
| 8 | SET | `inMap.put(NEXT_SEIKY_WAY_DIV, childMap.get(NEXT_SEIKY_WAY_DIV))` | Copy: Next billing method division (次回請求方法コード) |
| 9 | SET | `inMap.put(KEI_CNC_YMD, childMap.get(KEI_CNC_YMD))` | Copy: Contract agreement date (契約結成年月日) |
| 10 | SET | `inMap.put(SEIKY_KEI_DSL_YMD, childMap.get(SEIKY_KEI_DSL_YMD))` | Copy: Billing contract cancellation date (請求契約解約年月日) |
| 11 | SET | `inMap.put(SEIKY_KEI_DLRE_CD, childMap.get(SEIKY_KEI_DLRE_CD))` | Copy: Billing contract cancellation reason code (請求契約解約理由コード) |
| 12 | SET | `inMap.put(SEIKY_KEI_DLRE_MEMO, childMap.get(SEIKY_KEI_DLRE_MEMO))` | Copy: Billing contract cancellation reason memo (請求契約解約理由メモ) |
| 13 | SET | `inMap.put(SEIKY_CYCLE_CD, childMap.get(SEIKY_CYCLE_CD))` | Copy: Billing cycle code (請求サイクルコード) |
| 14 | SET | `inMap.put(SEIKY_WAY_CHGE_YMD, childMap.get(SEIKY_WAY_CHGE_YMD))` | Copy: Billing method change date (請求方法変更年月日) |
| 15 | SET | `inMap.put(SEIKY_KEI_KANA, childMap.get(SEIKY_KEI_KANA))` | Copy: Billing contract kana name (請求契約カナ名) |
| 16 | SET | `inMap.put(SEIKY_WAY_NO_KOZA, childMap.get(SEIKY_WAY_NO_KOZA))` | Copy: Billing method number (bank account) (請求方法番号(口座)) |
| 17 | SET | `inMap.put(SEIKY_WAY_NO_CRECARD, childMap.get(SEIKY_WAY_NO_CRECARD))` | Copy: Billing method number (credit card) (請求方法番号(クレジットカード)) |
| 18 | SET | `inMap.put(INFO_DSP_CD, childMap.get(INFO_DSP_CD))` | Copy: Information display code (情報表示コード) |
| 19 | SET | `inMap.put(SEIKYUS_HAKKO_YH, childMap.get(SEIKYUS_HAKKO_YH))` | Copy: Invoice issuance required flag (請求書発行要否) |
| 20 | SET | `inMap.put(SK_S_HS_KSH_AD_SAI_FLG, childMap.get(SK_S_HS_KSH_AD_SAI_FLG))` | Copy: Invoice delivery address vs contract address mismatch flag (請求書送付先_契約者住所差異フラグ) |
| 21 | SET | `inMap.put(SK_S_HS_NM_CUST_NM_SAI_FLG, childMap.get(SK_S_HS_NM_CUST_NM_SAI_FLG))` | Copy: Invoice delivery name vs customer name mismatch flag (請求書送付先名_お客様名差異フラグ) |
| 22 | SET | `inMap.put(SHS_HOJIN_SBT_CD, childMap.get(SHS_HOJIN_SBT_CD))` | Copy: Delivery address corporate entity type code (送付先法人格種類コード) |
| 23 | SET | `inMap.put(SHS_HOJIN_ZENGO_SHITEI_CD, childMap.get(SHS_HOJIN_ZENGO_SHITEI_CD))` | Copy: Delivery address corporate title prefix/suffix designation code (送付先法人格前後指定コード) |
| 24 | SET | `inMap.put(SHS_KANA, childMap.get(SHS_KANA))` | Copy: Delivery address kana name (送付先カナ名) |
| 25 | SET | `inMap.put(SOHUS_NM, childMap.get(SOHUS_NM))` | Copy: Delivery address name (送付先名) |
| 26 | SET | `inMap.put(SOHUS_BKM, childMap.get(SOHUS_BKM))` | Copy: Delivery address department name (送付先部署名) |
| 27 | SET | `inMap.put(SOHUS_TNTSHA_NM, childMap.get(SOHUS_TNTSHA_NM))` | Copy: Delivery address responsible person name (送付先担当者名) |
| 28 | SET | `inMap.put(SOHUS_AD_CD, childMap.get(SOHUS_AD_CD))` | Copy: Delivery address postal code (送付先住所コード) |
| 29 | SET | `inMap.put(SOHUS_PCD, childMap.get(SOHUS_PCD))` | Copy: Delivery address postal code (送付先郵便番号) |
| 30 | SET | `inMap.put(SOHUS_STATE_NM, childMap.get(SOHUS_STATE_NM))` | Copy: Delivery address prefecture name (送付先都道府県名) |
| 31 | SET | `inMap.put(SOHUS_CITY_NM, childMap.get(SOHUS_CITY_NM))` | Copy: Delivery address city/town/village name (送付先市区町村名) |
| 32 | SET | `inMap.put(SOHUS_OAZTSU_NM, childMap.get(SOHUS_OAZTSU_NM))` | Copy: Delivery address oazutsu name (送付先大字通称名) |
| 33 | SET | `inMap.put(SOHUS_AZCHO_NM, childMap.get(SOHUS_AZCHO_NM))` | Copy: Delivery address choice name (送付先字丁目名) |
| 34 | SET | `inMap.put(SOHUS_ADRTTM, childMap.get(SOHUS_ADRTTM))` | Copy: Delivery address building name (送付先住所補記・建物名) |
| 35 | SET | `inMap.put(SOHUS_ADRRM, childMap.get(SOHUS_ADRRM))` | Copy: Delivery address room number (送付先住所補記・部屋番号) |
| 36 | SET | `inMap.put(SOHUS_BNCHIGO, childMap.get(SOHUS_BNCHIGO))` | Copy: Delivery address land number (送付先番地号) |
| 37 | SET | `inMap.put(SOHUS_TELNO, childMap.get(SOHUS_TELNO))` | Copy: Delivery address telephone number (送付先電話番号) |
| 38 | SET | `inMap.put(SOHUS_FAX_NO, childMap.get(SOHUS_FAX_NO))` | Copy: Delivery address FAX number (送付先FAX番号) |
| 39 | SET | `inMap.put(SOHUS_MLAD, childMap.get(SOHUS_MLAD))` | Copy: Delivery address email address (送付先メールアドレス) |
| 40 | SET | `inMap.put(SEIKYUS_SOHUS_CHGE_YMD, childMap.get(SEIKYUS_SOHUS_CHGE_YMD))` | Copy: Invoice delivery address change date (請求書送付先変更年月日) |
| 41 | SET | `inMap.put(SEIKY_WAY_APLY_ADJ_YMD, childMap.get(SEIKY_WAY_APLY_ADJ_YMD))` | Copy: Billing method application adjustment date (請求方法適用調整年月日) |
| 42 | SET | `inMap.put(KYOSEI_MADOGUCHI_FLG, childMap.get(KYOSEI_MADOGUCHI_FLG))` | Copy: Forced window flag (強制窓口フラグ) |
| 43 | SET | `inMap.put(RSV_TSTA_KIBO_YMD, childMap.get(RSV_TSTA_KIBO_YMD))` | Copy: Reservation application start desired date (予約適用開始希望年月日) |
| 44 | SET | `inMap.put(RSV_APLY_YMD, childMap.get(RSV_APLY_YMD))` | Copy: Reservation application date (予約適用年月日) |
| 45 | SET | `inMap.put(RSV_CL_YMD, childMap.get(RSV_CL_YMD))` | Copy: Reservation cancellation date (予約取消年月日) |
| 46 | SET | `inMap.put(RSV_APLY_CD, childMap.get(RSV_APLY_CD))` | Copy: Reservation application code (予約適用コード) |
| 47 | SET | `inMap.put(IDO_DIV, childMap.get(IDO_DIV))` | Copy: Transfer division (異動区分) |
| 48 | SET | `inMap.put(FIRST_SEIKY_YM, childMap.get(FIRST_SEIKY_YM))` | Copy: First billing year/month (初回請求年月) |
| 49 | SET | `inMap.put(FIRST_PAY_MSKMSHO_SOHU_YH, childMap.get(FIRST_PAY_MSKMSHO_SOHU_YH))` | Copy: First payment application document delivery required flag (初回支払申込書送付要否) |
| 50 | SET | `inMap.put(FIRST_PAY_MSKMSHO_SOHU_YMD, childMap.get(FIRST_PAY_MSKMSHO_SOHU_YMD))` | Copy: First payment application document delivery date (初回支払申込書送付年月日) |
| 51 | SET | `inMap.put(FIRST_PAY_MSKMSHO_RCP_YMD, childMap.get(FIRST_PAY_MSKMSHO_RCP_YMD))` | Copy: First payment application document reception date (初回支払申込書受領年月日) |
| 52 | SET | `inMap.put(UPD_DTM, childMap.get(UPD_DTM))` | Copy: Update date/time (更新年月日时分秒) |
| 53 | SET | `inMap.put(SOHUS_AD_MAN_INPUT_FLG, childMap.get(SOHUS_AD_MAN_INPUT_FLG))` | Copy: Delivery address manual input flag (送付先住所手入力フラグ) |
| 54 | RETURN | *(void return)* | Method completes. The parent `inMap` now contains all 49 invoice contract and delivery address fields. |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `setOutMapEKK0491A010` | Method | Downward mapping item setting for invoice contract unique inquiry — maps invoice contract detail fields from child map to parent map |
| `cngSeikyushoYohi` | Method | Customer invoice change service — main entry point for modifying invoice/delivery address information |
| `seiky_kei_stat` | Field | Billing contract status — current state of the billing contract (active, cancelled, etc.) |
| `mansion_ownr_id` | Field | Mansion owner ID — identifies the building/mansion owner for multi-unit dwelling contracts |
| `seiky_way_cd` | Field | Billing method code — indicates how billing is performed (bank transfer, credit card, etc.) |
| `next_seiky_way_div` | Field | Next billing method division — code for the billing method that will apply going forward (used when a billing method change is scheduled) |
| `kei_cnc_ymd` | Field | Contract agreement date — the date when the service contract was formally agreed/signed |
| `seiky_kei_dsl_ymd` | Field | Billing contract cancellation date — the date when the billing contract was cancelled |
| `seiky_kei_dlre_cd` | Field | Billing contract cancellation reason code — classification code for why the billing contract was cancelled |
| `seiky_kei_dlre_memo` | Field | Billing contract cancellation reason memo — free-text description of the cancellation reason |
| `seiky_cycle_cd` | Field | Billing cycle code — the recurring billing interval (monthly, quarterly, etc.) |
| `seiky_way_chge_ymd` | Field | Billing method change date — the date the billing method was changed |
| `seiky_kei_kana` | Field | Billing contract kana name — phonetic katakana representation of the billing contract name |
| `seiky_way_no_koza` | Field | Billing method number (bank account) — bank account number used for billing payment |
| `seiky_way_no_crecard` | Field | Billing method number (credit card) — credit card number used for billing payment |
| `info_dsp_cd` | Field | Information display code — controls what additional information is displayed on the screen |
| `seikyus_hakko_yh` | Field | Invoice issuance required flag — whether an invoice should be issued for this contract |
| `sks_shs_ksh_ad_sai_flg` | Field | Invoice delivery address vs contract address mismatch flag — indicates if the delivery address differs from the contract address |
| `sks_shs_nm_cust_nm_sai_flg` | Field | Invoice delivery name vs customer name mismatch flag — indicates if the delivery name differs from the customer name |
| `shs_hojin_sbt_cd` | Field | Delivery address corporate entity type code — classifies the type of corporate entity (e.g., corporation, LLC) |
| `shs_hojin_zengo_shitei_cd` | Field | Delivery address corporate title prefix/suffix designation code — indicates how corporate titles (e.g., Kabushiki Kaisha) are formatted |
| `sohus_nm` | Field | Delivery address name — the name on the invoice delivery address |
| `sohus_bkm` | Field | Delivery address department name — the department within the delivery organization |
| `sohus_tntsha_nm` | Field | Delivery address responsible person name — the name of the person responsible at the delivery address |
| `sohus_ad_cd` | Field | Delivery address code — internal code for the delivery address |
| `sohus_pcd` | Field | Delivery address postal code — 7-digit Japanese postal code |
| `sohus_state_nm` | Field | Delivery address prefecture name — the prefecture (e.g., Tokyo, Osaka) |
| `sohus_city_nm` | Field | Delivery address city/town/village name — the municipality |
| `sohus_oaztsu_nm` | Field | Delivery address large district name — the town/area name within the municipality |
| `sohus_azcho_nm` | Field | Delivery address block name — the block/chome number within the district |
| `sohus_adrttm` | Field | Delivery address building name — building name and supplementary address info |
| `sohus_adrrm` | Field | Delivery address room number — room/suite number within the building |
| `sohus_bnchigo` | Field | Delivery address land number — the land/lot number |
| `sohus_telno` | Field | Delivery address telephone number — phone number at the delivery address |
| `sohus_fax_no` | Field | Delivery address FAX number — FAX number at the delivery address |
| `sohus_mlad` | Field | Delivery address email address — email address for the delivery contact |
| `seikyus_sohus_chge_ymd` | Field | Invoice delivery address change date — the date the delivery address was last changed |
| `seiky_way_aply_adj_ymd` | Field | Billing method application adjustment date — date when billing method adjustments take effect |
| `kyosei_madoguchi_flg` | Field | Forced window flag — indicates if the customer was routed through a forced service window (e.g., complaint resolution) |
| `rsv_tsta_kibo_ymd` | Field | Reservation application start desired date — the customer's desired start date for the reservation |
| `rsv_aply_ymd` | Field | Reservation application date — the date the reservation was applied |
| `rsv_cl_ymd` | Field | Reservation cancellation date — the date the reservation was cancelled |
| `rsv_aply_cd` | Field | Reservation application code — classification code for the reservation type |
| `ido_div` | Field | Transfer division — indicates whether this is a new contract, transfer, or other type of change |
| `first_seiky_ym` | Field | First billing year/month — the first month for which billing is applied |
| `first_pay_mskmsho_sohu_yh` | Field | First payment application document delivery required flag — whether the first payment application form should be sent |
| `first_pay_mskmsho_sohu_ymd` | Field | First payment application document delivery date — when the first payment application form was sent |
| `first_pay_mskmsho_rcp_ymd` | Field | First payment application document reception date — when the first payment application form was received |
| `upd_dtm` | Field | Update date/time — the last update timestamp for this record (year, month, day, hour, minute, second) |
| `sohus_ad_man_input_flg` | Field | Delivery address manual input flag — indicates if the delivery address was entered manually rather than selected from a list |
| `TEMPLATE_ID_DETAIL_EKK0491A010` | Constant | Template ID for the EKK0491A010 detail list — resolves to `"EKK0491A010CBSMsg1List"`, used as the map key to access child detail records |
| `EKK0491A010CBSMsg1List` | Constant | Message field list constant class — defines all field name constants (e.g., `SEIKY_KEI_STAT`, `SYSID`) for the invoice contract inquiry data structure |
| SC | Acronym | Service Component — a service layer class that handles business logic and data access for a specific operation |
| CBS | Acronym | Composite Business Service — a service component that orchestrates multiple SCs for complex business operations |
| CC | Acronym | Connection Component / Communication Component — a Java class that connects screen operations to service components, handling data transformation and routing |
| FTTH | Business term | Fiber To The Home — fiber-optic broadband internet service offered by the provider |
| SYSID | Acronym | System ID — internal unique identifier used within the Fujitsu Futurity platform for system-level identification |
| HashMap | Technical term | Java Map implementation providing key-value storage; used here as the request parameter data container |
| ArrayList | Technical term | Java dynamic array used to store the list of child detail records |
| IRequestParameterReadWrite | Technical term | Interface for bidirectional request parameter access; provides `getData()` to retrieve data maps and `setData()` to store data |
| 変更請求書oughi (Henkou Seikyusho Yohi) | Business term | Customer invoice change service — a telecom business process for modifying billing and delivery address information for customer contracts |
| 請求契約一意照会 (Seikyuu Keiyuu Iichi Shoukai) | Business term | Invoice contract unique inquiry — a screen/function that displays a single invoice contract's complete detail for review or modification |
| 下りマッピング (Ori Mapping) | Business term | Downward mapping — the pattern of copying data from a high-level container into a more detailed nested structure, or from a child record into a parent context |
