# Business Logic — JEKKA0070001TPMA.editOutMsg() [124 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.ejb.cbs.mainproc.JEKKA0070001TPMA` |
| Layer | Service (Package: `eo.ejb.cbs.mainproc`) |
| Module | `mainproc` (Package: `eo.ejb.cbs.mainproc`) |

## 1. Role

### JEKKA0070001TPMA.editOutMsg()

This method constructs the outbound response message for the "Individual Discount Applicability Inquiry/Change Request" screen workflow (個別割引適用可否照会・変更依頼). It receives processing results, error information, and contract data packed into a `resServiceMap`, then maps these into five structured message lists conforming to the CBS message schema defined in the `EKKA0070001CBSMsg` family. The method follows a **data mapping / transformer** pattern: it extracts raw data from a generic map, normalizes null values via `JKKStringUtil.nullToBlank`, populates strongly-typed `CAANMsg` objects for each message section, and finally serializes the message lists into CAANMsg arrays that are written back to the output `inCBSMsg`. It is a **shared utility method** (private static) consumed by `call_KKIFE401` within the same class, serving as the final serialization step before the response is sent to the calling system.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["editOutMsg(inCBSMsg, resServiceMap)"])

    START --> INIT_LISTS["Initialize 5 empty CAANMsg lists (msg1List-msg5List)"]

    INIT_LISTS --> EXTRACT_MAP["Extract from resServiceMap: resultCode, resultDetailCode, gyomuErrorList, body"]

    EXTRACT_MAP --> CHECK_C1{"contract1 == null?"}
    CHECK_C1 -->|No| CHECK_C2{"contract2 == null?"}
    CHECK_C1 -->|Yes| INIT_C1["contract1 = new HashMap()"]
    INIT_C1 --> CHECK_C2
    CHECK_C2 -->|No| BUILD_MSG1["Build msg1 (processing results)"]
    CHECK_C2 -->|Yes| INIT_C2["contract2 = new HashMap()"]
    INIT_C2 --> BUILD_MSG1

    BUILD_MSG1 --> BUILD_MSG2["Build msg2 (Contract 1 details)"]
    BUILD_MSG2 --> BUILD_MSG3["Build msg3 (Contract 2 details)"]
    BUILD_MSG3 --> BUILD_MSG4["Build msg4 (result codes)"]

    BUILD_MSG4 --> ERR_LOOP{"Loop: i from 0 to errList.size()"}
    ERR_LOOP -->|Yes| CHECK_ERR_MAP{"map == null?"}
    CHECK_ERR_MAP -->|Yes| INIT_ERR_MAP["map = new HashMap()"]
    INIT_ERR_MAP --> SET_MSG5["Build msg5 from error map: errorCode, errorMessage"]
    SET_MSG5 --> ERR_LOOP
    CHECK_ERR_MAP -->|No| SET_MSG5
    ERR_LOOP -->|No| CONVERT_ARRAYS["Convert msg1-5 lists to CAANMsg arrays"]

    CONVERT_ARRAYS --> SET_ARRAY1["inCBSMsg.set(EKKA0070001CBSMSG1LIST, msg1List array)"]
    SET_ARRAY1 --> SET_ARRAY2["inCBSMsg.set(EKKA0070001CBSMSG2LIST, msg2List array)"]
    SET_ARRAY2 --> SET_ARRAY3["inCBSMsg.set(EKKA0070001CBSMSG3LIST, msg3List array)"]
    SET_ARRAY3 --> SET_ARRAY4["inCBSMsg.set(EKKA0070001CBSMSG4LIST, msg4List array)"]
    SET_ARRAY4 --> SET_ARRAY5["inCBSMsg.set(EKKA0070001CBSMSG5LIST, msg5List array)"]
    SET_ARRAY5 --> END_NODE(["Return / Next"])
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `inCBSMsg` | `CAANMsg` | The outbound response message object. Populated with five structured sub-messages (processing results, Contract 1, Contract 2, result codes, error list) that will be returned to the calling screen system. |
| 2 | `resServiceMap` | `Map<String, Object>` | The result service map carrying the processed business outcomes from the CBS service layer. Contains `resultCode` (処理結果 — processing result code), `resultDetailCode` (処理結果詳細コード — processing result detail code), `gyomuErrorList` (業務エラーリスト — business error list), and `body` (業務データ — business data containing nested `contract1` and `contract2` maps). |

**Instance/external state read:** None. The method is fully static with no reliance on instance fields or external state.

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `JKKStringUtil.nullToBlank` | JKKStringUtil | - | Utility call — converts null String values to empty strings to prevent null propagation in the message fields |
| R | `EKKA0070001CBSMsg1List` (field access) | EKKA0070001CBS | - | Schema constant access — retrieves field name constants (RESULT_OUT, ROUTE_OUT, etc.) for setting response fields |
| R | `EKKA0070001CBSMsg2List` (field access) | EKKA0070001CBS | - | Schema constant access — retrieves field name constants (SVC_KEI_NO_1, SYSID_1, etc.) for Contract 1 mapping |
| R | `EKKA0070001CBSMsg3List` (field access) | EKKA0070001CBS | - | Schema constant access — retrieves field name constants (SVC_KEI_NO_2, etc.) for Contract 2 mapping |
| R | `EKKA0070001CBSMsg4List` (field access) | EKKA0070001CBS | - | Schema constant access — retrieves field name constants (RSLT_CD, RSLT_DTL_CD) for result code mapping |
| R | `EKKA0070001CBSMsg5List` (field access) | EKKA0070001CBS | - | Schema constant access — retrieves field name constants (ERR_CD, ERR_MSG) for error list mapping |
| R | `EKKA0070001CBSMsg` (field access) | EKKA0070001CBS | - | Schema constant access — retrieves field name constants (EKKA0070001CBSMSG1LIST through MSG5LIST) for setting message array fields |

This method performs **no database CRUD operations**. It is purely a **data transformation** layer that maps structured data from a service result map into the CBS response message format.

## 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: `toArray` [-], `nullToBlank` [-], `nullToBlank` [-], `nullToBlank` [-], `nullToBlank` [-], `nullToBlank` [-], `nullToBlank` [-], `nullToBlank` [-], `nullToBlank` [-], `nullToBlank` [-], `nullToBlank` [-], `nullToBlank` [-], `nullToBlank` [-], `nullToBlank` [-], `nullToBlank` [-], `nullToBlank` [-], `nullToBlank` [-], `nullToBlank` [-], `nullToBlank` [-], `nullToBlank` [-]

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | CBS: JEKKA0070001TPMA.call_KKIFE401 | `call_KKIFE401` -> `editOutMsg` | `nullToBlank` [-], `toArray` [-] |

This method is a private utility consumed only by `call_KKIFE401()` within the same class. It transforms processing results into the outbound message format — it does not reach any database or external service.

## 6. Per-Branch Detail Blocks

### Block 1 — INIT (L247)

> Initialize five empty message lists that will collect CAANMsg entries for each response section.

| # | Type | Code |
|---|------|------|
| 1 | SET | `msg1List = new ArrayList<CAANMsg>()` // Processing results list |
| 2 | SET | `msg2List = new ArrayList<CAANMsg>()` // Contract 1 list |
| 3 | SET | `msg3List = new ArrayList<CAANMsg>()` // Contract 2 list |
| 4 | SET | `msg4List = new ArrayList<CAANMsg>()` // Result codes list |
| 5 | SET | `msg5List = new ArrayList<CAANMsg>()` // Error details list |

### Block 2 — EXTRACT (L252)

> Extract processing outcome data from the resServiceMap. This is the gateway data that drives all downstream message construction.

| # | Type | Code |
|---|------|------|
| 1 | SET | `resultCode = (String)resServiceMap.get("resultCode")` // 処理結果 (processing result) |
| 2 | SET | `resultDetailCode = (String)resServiceMap.get("resultDetailCode")` // 処理結果詳細コード (processing result detail code) |
| 3 | SET | `errList = (List<Object>)resServiceMap.get("gyomuErrorList")` // 業務エラーリスト (business error list) |
| 4 | SET | `body = (Map<String, Object>)resServiceMap.get("body")` // 業務データ (business data) |

### Block 3 — EXTRACT / NULL GUARD: contract1 (L259)

> Retrieve Contract 1 data from the body map. If null, initialize a new empty map to prevent NPE in subsequent field accesses.

| # | Type | Code |
|---|------|------|
| 1 | SET | `contract1 = (Map<String, Object>)body.get("contract1")` // 契約1 (Contract 1) |
| 2 | IF | `contract1 == null` (L261) |

#### Block 3.1 — ELSE (L262) (contract1 IS null)

| # | Type | Code |
|---|------|------|
| 1 | SET | `contract1 = new HashMap<String, Object>()` // Initialize empty contract1 map |

### Block 4 — EXTRACT / NULL GUARD: contract2 (L265)

> Retrieve Contract 2 data from the body map. If null, initialize a new empty map to prevent NPE in subsequent field accesses.

| # | Type | Code |
|---|------|------|
| 1 | SET | `contract2 = (Map<String, Object>)body.get("contract2")` // 契約2 (Contract 2) |
| 2 | IF | `contract2 == null` (L266) |

#### Block 4.1 — ELSE (L267) (contract2 IS null)

| # | Type | Code |
|---|------|------|
| 1 | SET | `contract2 = new HashMap<String, Object>()` // Initialize empty contract2 map |

### Block 5 — BUILD: msg1 (L273)

> Build the processing results message (msg1). Contains high-level response metadata: result, route, request ID, operational timestamp, transaction type, and campaign code. This is the top-level acknowledgment of the request processing.

| # | Type | Code |
|---|------|------|
| 1 | SET | `msg1 = new CAANMsg(EKKA0070001CBSMsg1List.class.getName())` |
| 2 | EXEC | `msg1.set(RESULT_OUT, JKKStringUtil.nullToBlank((String)body.get("result")))` // 処理結果 (processing result) |
| 3 | EXEC | `msg1.set(ROUTE_OUT, JKKStringUtil.nullToBlank((String)body.get("route")))` // 申請経路 (application route) [ANK-4195-00-00 ADD] |
| 4 | EXEC | `msg1.set(REQUESTID_OUT, JKKStringUtil.nullToBlank((String)body.get("requestID")))` // リクエストID (request ID) |
| 5 | EXEC | `msg1.set(OPE_DATE_TIME_OUT, JKKStringUtil.nullToBlank((String)body.get("operateDateTime")))` // 運用日時 (operational date/time) |
| 6 | EXEC | `msg1.set TRAN_DIV_OUT, JKKStringUtil.nullToBlank((String)body.get("processingType")))` // 処理区分 (transaction type) |
| 7 | EXEC | `msg1.set(CMP_CD_OUT, JKKStringUtil.nullToBlank((String)body.get("campaignCode")))` // キャンペーンコード (campaign code) |
| 8 | EXEC | `msg1List.add(msg1)` |

### Block 6 — BUILD: msg2 (L287)

> Build the Contract 1 details message (msg2). Contains 25 fields covering the full contractual and billing profile of Contract 1: service contract number, SYSID, invoice number, address codes, service codes, fee group/course/plan codes, contract form, subscription date, inspection date, cancellation code, acceptance number, contract status, usage place address, line detail number, service start/end dates, charge period, service ID, course classification, mineo phone number, and mail notification flag.

| # | Type | Code |
|---|------|------|
| 1 | SET | `msg2 = new CAANMsg(EKKA0070001CBSMsg2List.class.getName())` |
| 2 | EXEC | `msg2.set(SVC_KEI_NO_1, JKKStringUtil.nullToBlank((String)contract1.get("serviceNum")))` // サービス契約番号 (service contract number) |
| 3 | EXEC | `msg2.set(SYSID_1, JKKStringUtil.nullToBlank((String)contract1.get("sysid")))` // SYSID |
| 4 | EXEC | `msg2.set(SEIKY_KEI_NO_1, JKKStringUtil.nullToBlank((String)contract1.get("invoiceNum")))` // 請求契約番号 (invoice contract number) |
| 5 | EXEC | `msg2.set(KEISHA_AD_CD_1, JKKStringUtil.nullToBlank((String)contract1.get("contractorAddressCode")))` // 契約者住所コード (contractor address code) |
| 6 | EXEC | `msg2.set(SVC_CD_1, JKKStringUtil.nullToBlank((String)contract1.get("service")))` // サービスコード (service code) |
| 7 | EXEC | `msg2.set(PRC_GRP_CD_1, JKKStringUtil.nullToBlank((String)contract1.get("feeGroup")))` // 料金グルーブコード (fee group code) |
| 8 | EXEC | `msg2.set(PCRS_CD_1, JKKStringUtil.nullToBlank((String)contract1.get("feeCource")))` // 料金コースコード (fee course code) |
| 9 | EXEC | `msg2.set(PPLAN_CD_1, JKKStringUtil.nullToBlank((String)contract1.get("feePlan")))` // 料金プランコード (fee plan code) |
| 10 | EXEC | `msg2.set(KANYU_KEI_PAY_HOSHIKI_CD_1, JKKStringUtil.nullToBlank((String)contract1.get("contractForm")))` // 加入契約払方式コード (contract payment method code) |
| 11 | EXEC | `msg2.set(MSKM_YMD_1, JKKStringUtil.nullToBlank((String)contract1.get("subscriptionDate")))` // 申込年月日 (subscription date) |
| 12 | EXEC | `msg2.set(SHOSA_YMD_1, JKKStringUtil.nullToBlank((String)contract1.get("inspectionDate")))` // 照会年月日 (inquiry date) |
| 13 | EXEC | `msg2.set(SHOSA_DSL_FIN_CD_1, JKKStringUtil.nullToBlank((String)contract1.get("inspectionCancellationCode")))` // 照会解約完了コード (inquiry cancellation completion code) |
| 14 | EXEC | `msg2.set(MSKMSHO_NO_1, JKKStringUtil.nullToBlank((String)contract1.get("acceptanceNum")))` // 申込書番号 (application number) |
| 15 | EXEC | `msg2.set(SVC_KEI_STAT_1, JKKStringUtil.nullToBlank((String)contract1.get("contractCondition")))` // サービス契約ステータス (service contract status) |
| 16 | EXEC | `msg2.set(KAISEN_PLACE_AD_CD_1, JKKStringUtil.nullToBlank((String)contract1.get("usingPlaceAddressCode")))` // 回線場所住所コード (line location address code) |
| 17 | EXEC | `msg2.set(SVC_KEI_KAISEN_UCWK_NO_1, JKKStringUtil.nullToBlank((String)contract1.get("lineNum")))` // サービス契約回線内訳番号 (service contract line detail number) |
| 18 | EXEC | `msg2.set(SVC_STA_YMD_1, JKKStringUtil.nullToBlank((String)contract1.get("serviceStartDate")))` // サービス開始年月日 (service start date) |
| 19 | EXEC | `msg2.set(SVC_ENDYMD_1, JKKStringUtil.nullToBlank((String)contract1.get("serviceEndDate")))` // サービス終了年月日 (service end date) |
| 20 | EXEC | `msg2.set(SVC_CHRG_STAYMD_1, JKKStringUtil.nullToBlank((String)contract1.get("chargeStartNum")))` // サービス課金開始年月日 (service charge start date) |
| 21 | EXEC | `msg2.set(SVC_CHRG_ENDYMD_1, JKKStringUtil.nullToBlank((String)contract1.get("chargeEndNum")))` // サービス課金終了年月日 (service charge end date) |
| 22 | EXEC | `msg2.set(SERVICEID_1, JKKStringUtil.nullToBlank((String)contract1.get("serviceID")))` // サービスID (service ID) |
| 23 | EXEC | `msg2.set(COURCE_DIV_1, JKKStringUtil.nullToBlank((String)contract1.get("courceClassification")))` // コース区分 (course classification) |
| 24 | EXEC | `msg2.set(MINEO_TEL_1, JKKStringUtil.nullToBlank((String)contract1.get("mineoTel")))` // mineo電話番号 (mineo phone number) |
| 25 | EXEC | `msg2.set(KEI_1_MAIL_SEND_FLAG_1, JKKStringUtil.nullToBlank((String)contract1.get("mailSendFlag")))` // 解除メール通知有無 (cancellation mail notification flag) |
| 26 | EXEC | `msg2List.add(msg2)` |

### Block 7 — BUILD: msg3 (L316)

> Build the Contract 2 details message (msg3). Mirrors msg2 with 24 fields for a second contract. Contract 2 includes input-specific fields (input mineo acceptance number, input acceptance number) and a mail notification flag unique to Contract 2.

| # | Type | Code |
|---|------|------|
| 1 | SET | `msg3 = new CAANMsg(EKKA0070001CBSMsg3List.class.getName())` |
| 2 | EXEC | `msg3.set(INPUT_MINEO_NO_2, JKKStringUtil.nullToBlank((String)contract2.get("inputMineoNum")))` // 入力mineo受番番号・電話番号 (input mineo acceptance number / phone number) |
| 3 | EXEC | `msg3.set(INPUT_UK_NO_2, JKKStringUtil.nullToBlank((String)contract2.get("inputAcceptanceNum")))` // 入力受番番号 (input acceptance number) |
| 4 | EXEC | `msg3.set(KEI_2_MAIL_SEND_FLAG_2, JKKStringUtil.nullToBlank((String)contract2.get("mailSendFlag")))` // 解除メール通知有無 (cancellation mail notification flag) |
| 5 | EXEC | `msg3.set(SVC_KEI_NO_2, JKKStringUtil.nullToBlank((String)contract2.get("serviceNum")))` // サービス契約番号 (service contract number) |
| 6 | EXEC | `msg3.set(SYSID_2, JKKStringUtil.nullToBlank((String)contract2.get("sysid")))` // SYSID |
| 7 | EXEC | `msg3.set(SEIKY_KEI_NO_2, JKKStringUtil.nullToBlank((String)contract2.get("invoiceNum")))` // 請求契約番号 (invoice contract number) |
| 8 | EXEC | `msg3.set(KEISHA_AD_CD_2, JKKStringUtil.nullToBlank((String)contract2.get("contractorAddressCode")))` // 契約者住所コード (contractor address code) |
| 9 | EXEC | `msg3.set(SVC_CD_2, JKKStringUtil.nullToBlank((String)contract2.get("service")))` // サービスコード (service code) |
| 10 | EXEC | `msg3.set(PRC_GRP_CD_2, JKKStringUtil.nullToBlank((String)contract2.get("feeGroup")))` // 料金グルーブコード (fee group code) |
| 11 | EXEC | `msg3.set(PCRS_CD_2, JKKStringUtil.nullToBlank((String)contract2.get("feeCource")))` // 料金コースコード (fee course code) |
| 12 | EXEC | `msg3.set(PPLAN_CD_2, JKKStringUtil.nullToBlank((String)contract2.get("feePlan")))` // 料金プランコード (fee plan code) |
| 13 | EXEC | `msg3.set(KANYU_KEI_PAY_HOSHIKI_CD_2, JKKStringUtil.nullToBlank((String)contract2.get("contractForm")))` // 加入契約払方式コード (contract payment method code) |
| 14 | EXEC | `msg3.set(MSKM_YMD_2, JKKStringUtil.nullToBlank((String)contract2.get("subscriptionDate")))` // 申込年月日 (subscription date) |
| 15 | EXEC | `msg3.set(SHOSA_YMD_2, JKKStringUtil.nullToBlank((String)contract2.get("inspectionDate")))` // 照会年月日 (inquiry date) |
| 16 | EXEC | `msg3.set(SHOSA_DSL_FIN_CD_2, JKKStringUtil.nullToBlank((String)contract2.get("inspectionCancellationCode")))` // 照会解約完了コード (inquiry cancellation completion code) |
| 17 | EXEC | `msg3.set(MSKMSHO_NO_2, JKKStringUtil.nullToBlank((String)contract2.get("acceptanceNum")))` // 申込書番号 (application number) |
| 18 | EXEC | `msg3.set(SVC_KEI_STAT_2, JKKStringUtil.nullToBlank((String)contract2.get("contractCondition")))` // サービス契約ステータス (service contract status) |
| 19 | EXEC | `msg3.set(KAISEN_PLACE_AD_CD_2, JKKStringUtil.nullToBlank((String)contract2.get("usingPlaceAddressCode")))` // 回線場所住所コード (line location address code) |
| 20 | EXEC | `msg3.set(SVC_KEI_KAISEN_UCWK_NO_2, JKKStringUtil.nullToBlank((String)contract2.get("lineNum")))` // サービス契約回線内訳番号 (service contract line detail number) |
| 21 | EXEC | `msg3.set(SVC_STA_YMD_2, JKKStringUtil.nullToBlank((String)contract2.get("serviceStartDate")))` // サービス開始年月日 (service start date) |
| 22 | EXEC | `msg3.set(SVC_ENDYMD_2, JKKStringUtil.nullToBlank((String)contract2.get("serviceEndDate")))` // サービス終了年月日 (service end date) |
| 23 | EXEC | `msg3.set(SVC_CHRG_STAYMD_2, JKKStringUtil.nullToBlank((String)contract2.get("chargeStartNum")))` // サービス課金開始年月日 (service charge start date) |
| 24 | EXEC | `msg3.set(SVC_CHRG_ENDYMD_2, JKKStringUtil.nullToBlank((String)contract2.get("chargeEndNum")))` // サービス課金終了年月日 (service charge end date) |
| 25 | EXEC | `msg3.set(SERVICEID_2, JKKStringUtil.nullToBlank((String)contract2.get("serviceID")))` // サービスID (service ID) |
| 26 | EXEC | `msg3.set(COURCE_DIV_2, JKKStringUtil.nullToBlank((String)contract2.get("courceClassification")))` // コース区分 (course classification) |
| 27 | EXEC | `msg3.set(MINEO_TEL_2, JKKStringUtil.nullToBlank((String)contract2.get("mineoTel")))` // mineo電話番号 (mineo phone number) |
| 28 | EXEC | `msg3List.add(msg3)` |

### Block 8 — BUILD: msg4 (L345)

> Build the result codes message (msg4). Contains the overall processing result code and the detailed result code extracted from the service map.

| # | Type | Code |
|---|------|------|
| 1 | SET | `msg4 = new CAANMsg(EKKA0070001CBSMsg4List.class.getName())` |
| 2 | EXEC | `msg4.set(RSLT_CD, resultCode)` // 処理結果コード (processing result code) [-> resolved from resServiceMap] |
| 3 | EXEC | `msg4.set(RSLT_DTL_CD, resultDetailCode)` // 処理結果詳細コード (processing result detail code) [-> resolved from resServiceMap] |
| 4 | EXEC | `msg4List.add(msg4)` |

### Block 9 — LOOP: error list iteration (L350)

> Iterate over the business error list and build individual error detail messages (msg5) for each entry. Each error map entry contains an errorCode and errorMessage.

| # | Type | Code |
|---|------|------|
| 1 | SET | `i = 0` |
| 2 | WHILE | `i < errList.size()` (L350) |

#### Block 9.1 — LOOP BODY (L351)

| # | Type | Code |
|---|------|------|
| 1 | SET | `msg5 = new CAANMsg(EKKA0070001CBSMsg5List.class.getName())` |
| 2 | SET | `map = (Map<String, Object>)errList.get(i)` |
| 3 | IF | `map == null` (L353) |

##### Block 9.1.1 — ELSE (L354) (map IS null)

| # | Type | Code |
|---|------|------|
| 1 | SET | `map = new HashMap<String, Object>()` // Initialize empty map |

##### Block 9.1.2 — ERROR FIELD EXTRACTION (L357)

| # | Type | Code |
|---|------|------|
| 1 | SET | `err_cd = JKKStringUtil.nullToBlank((String)map.get("errorCode"))` // エラーコード (error code) |
| 2 | SET | `err_msg = JKKStringUtil.nullToBlank((String)map.get("errorMessage"))` // エラーメッセージ (error message) |
| 3 | EXEC | `msg5.set(ERR_CD, err_cd)` |
| 4 | EXEC | `msg5.set(ERR_MSG, err_msg)` |
| 5 | EXEC | `msg5List.add(msg5)` |
| 6 | SET | `i++` |

### Block 10 — FINALIZE: Convert lists to arrays (L362)

> Convert each CAANMsg list to a CAANMsg array and set it onto the output message object. This is the final serialization step that populates `inCBSMsg` with all five response sections. The comment reads: "Listから配列に変換して設定" (Convert from lists to arrays and set).

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `inCBSMsg.set(EKKA0070001CBSMSG1LIST, msg1List.toArray(new CAANMsg[msg1List.size()]))` |
| 2 | EXEC | `inCBSMsg.set(EKKA0070001CBSMSG2LIST, msg2List.toArray(new CAANMsg[msg2List.size()]))` |
| 3 | EXEC | `inCBSMsg.set(EKKA0070001CBSMSG3LIST, msg3List.toArray(new CAANMsg[msg3List.size()]))` |
| 4 | EXEC | `inCBSMsg.set(EKKA0070001CBSMSG4LIST, msg4List.toArray(new CAANMsg[msg4List.size()]))` |
| 5 | EXEC | `inCBSMsg.set(EKKA0070001CBSMSG5LIST, msg5List.toArray(new CAANMsg[msg5List.size()]))` |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `inCBSMsg` | Field | Outbound CBS message — the response message object populated by this method for transmission back to the caller |
| `resServiceMap` | Field | Result service map — the intermediate data structure carrying processed results from the CBS service layer |
| `resultCode` | Field | 処理結果 (processing result) — the high-level outcome code of the service operation (e.g., success, failure) |
| `resultDetailCode` | Field | 処理結果詳細コード (processing result detail code) — a granular sub-code providing specific success/failure detail |
| `gyomuErrorList` | Field | 業務エラーリスト (business error list) — a list of error entries, each containing errorCode and errorMessage |
| `body` | Field | 業務データ (business data) — the payload map containing contract data and processing metadata |
| `contract1` | Field | 契約1 (Contract 1) — the primary service contract's data, including all billing and service parameters |
| `contract2` | Field | 契約2 (Contract 2) — a secondary service contract's data (e.g., additional or modified contract line) |
| `result_out` | Field | 処理結果 (processing result) — the response result value, mapped from body.result |
| `route_out` | Field | 申請経路 (application route) — the routing path the request took through the system [ANK-4195-00-00] |
| `requestID_out` | Field | リクエストID (request ID) — the unique identifier for the original request |
| `ope_date_time_out` | Field | 運用日時 (operational date/time) — the date and time the processing occurred |
| `tran_div_out` | Field | 処理区分 (transaction type) — the type of processing performed (e.g., inquiry, change) |
| `cmp_cd_out` | Field | キャンペーンコード (campaign code) — the campaign associated with the request |
| `svc_kei_no_1` / `_2` | Field | サービス契約番号 (service contract number) — the unique service contract identifier |
| `sysid_1` / `_2` | Field | SYSID — the system identifier for the contract |
| `seiky_kei_no_1` / `_2` | Field | 請求契約番号 (invoice contract number) — the billing contract identifier |
| `keisha_ad_cd_1` / `_2` | Field | 契約者住所コード (contractor address code) — the address code of the contracting party |
| `svc_cd_1` / `_2` | Field | サービスコード (service code) — the code identifying the service type |
| `prc_grp_cd_1` / `_2` | Field | 料金グルーブコード (fee group code) — the fee group classification code |
| `pcrs_cd_1` / `_2` | Field | 料金コースコード (fee course code) — the fee course classification code |
| `pplan_cd_1` / `_2` | Field | 料金プランコード (fee plan code) — the fee plan classification code |
| `kanyu_kei_pay_hoshiki_cd_1` / `_2` | Field | 加入契約払方式コード (contract payment method code) — the payment method for the contract |
| `mskm_ymd_1` / `_2` | Field | 申込年月日 (subscription date) — the date the service was subscribed |
| `shosa_ymd_1` / `_2` | Field | 照会年月日 (inquiry date) — the date of the inquiry |
| `shosa_dsl_fin_cd_1` / `_2` | Field | 照会解約完了コード (inquiry cancellation completion code) — the code for inquiry cancellation completion status |
| `mskmsho_no_1` / `_2` | Field | 申込書番号 (application number) — the application form number |
| `svc_kei_stat_1` / `_2` | Field | サービス契約ステータス (service contract status) — the current status of the service contract |
| `kaisen_place_ad_cd_1` / `_2` | Field | 回線場所住所コード (line location address code) — the address code of the line location |
| `svc_kei_kaisen_ucwk_no_1` / `_2` | Field | サービス契約回線内訳番号 (service contract line detail number) — the internal line tracking number within the contract |
| `svc_sta_ymd_1` / `_2` | Field | サービス開始年月日 (service start date) — the date service began |
| `svc_endymd_1` / `_2` | Field | サービス終了年月日 (service end date) — the date service ends |
| `svc_chrg_staymd_1` / `_2` | Field | サービス課金開始年月日 (service charge start date) — the date billing starts |
| `svc_chrg_endymd_1` / `_2` | Field | サービス課金終了年月日 (service charge end date) — the date billing ends |
| `serviceID_1` / `_2` | Field | サービスID (service ID) — the service identifier |
| `cource_div_1` / `_2` | Field | コース区分 (course classification) — the course classification code |
| `mineo_tel_1` / `_2` | Field | mineo電話番号 (mineo phone number) — the phone number for the mineo service |
| `kei_1_mail_send_flag_1` / `kei_2_mail_send_flag_2` | Field | 解除メール通知有無 (cancellation mail notification flag) — indicates whether a cancellation notification email should be sent |
| `input_mineo_no_2` | Field | 入力mineo受番番号・電話番号 (input mineo acceptance number / phone number) — input mineo acceptance number for Contract 2 |
| `input_uk_no_2` | Field | 入力受番番号 (input acceptance number) — input acceptance number for Contract 2 |
| `err_cd` | Field | エラーコード (error code) — the code identifying a business error |
| `err_msg` | Field | エラーメッセージ (error message) — the human-readable error message |
| `nullToBlank` | Utility | String utility — converts null String values to empty strings ("") to prevent null propagation in message fields |
| `CAANMsg` | Class | CAAN message object — the base message container class used for CBS wire format communication |
| `CAANSchemaInfo` | Class | Base schema info class — provides the type-safe field access mechanism via CONTENTS array and static final field constants |
| CBS | Acronym | Customer Business System — the core customer-facing business system in the e-o platform |
| TPMA | Acronym | Transaction Message Adapter — a class responsible for message transformation in the CBS pipeline |
| CAAN | Acronym | Communication And Application Network — the message framework used for inter-component communication (Fujitsu Futurity framework) |
| mineo | Business term | mineo — K-Opticom's mobile phone brand offering voice and data services |
