# Business Logic — JKKSeikyKeiHenkoCC.editInMsg_EKK0011D020() [314 LOC]

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

## 1. Role

### JKKSeikyKeiHenkoCC.editInMsg_EKK0011D020()

This method serves as a **message factory** for the Order Content Approval Registration screen (EKK0011D020 / 申込内容承認登録) in the K-Opticom telecom billing system. It constructs a structured CAANMsg template that carries all order form data from the web request layer to the underlying CBS (Core Business System) service layer. The method implements the **Builder pattern** — it instantiates a `CAANMsg` template of type `EKK0011D020CBSMsg`, populates it with runtime metadata (operator ID, operate date, operate date-time, function code), then maps 17 source fields from `dataMap` and `childMap` into the template with null-safe handling (empty-string inputs are converted to `null` rather than empty string values). It also creates a child message array (`EKK0011D020CBSMsg1List[]`) for detailed contact/order line items when that child list is absent from the request, initializing all 30+ child fields to null as a blank-slate template. The method is called from `execEKK0011D020()` and plays a central role in the screen's request-to-CBS message pipeline — it bridges the UI form data (collected in `childMap` and `dataMap`) with the CBS envelope format expected by downstream service components. It inherits common metadata setup from `editInMsg()` (the base method in the same class) and then customizes for the EKK0011D020 domain.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["editInMsg_EKK0011D020(params)"])
    S1["editInMsg(param) → paramMap"]
    S2["new CAANMsg(EKK0011D020CBSMsg)"]
    S3["Set TEMPLATEID = TEMPLATE_ID_EKK0011D020"]
    S4["Set FUNC_CODE, OPERATOR_ID, DATE, DATETIME"]
    S5["Get workMap from param"]
    S6["OVERWRITE FUNC_CODE from dataMap"]
    F1["Map sysid: if dataMap.sysid empty -> null, else set"]
    F2["Map mskm_sbt_cd: if childMap empty -> null, else set"]
    F3["Map mskmsho_ariv_ymd: if childMap empty -> null, else set"]
    F4["Map mskm_uk_dtm: if childMap empty -> null, else set"]
    F5["Map mskm_uk_tnt_user_id: if childMap empty -> null, else set"]
    F6["Map mskm_ymd: if childMap empty -> null, else set"]
    F7["Map ttl_business_center_uk_no: if childMap empty -> null, else set"]
    F8["Map ttl_business_mskm_opt_cd: if childMap empty -> null, else set"]
    F9["Map mskm_rrks_telno: if childMap empty -> null, else set"]
    F10["Map mskm_jssis_sbt_cd: if childMap empty -> null, else set"]
    F11["Map cust_yobo_jiko: if childMap empty -> null, else set"]
    F12["Map tel_rrk_kibo_time_cd: if childMap empty -> null, else set"]
    F13["Map takcho_kibo_time_cd: if childMap empty -> null, else set"]
    F14["Map kari_mskm_flg: if childMap empty -> null, else set"]
    F15["Map referer: if childMap empty -> null, else set"]
    F16["Map kepco_custinfo_juju_doi_um: if childMap empty -> null, else set"]
    F17["Map consmbsn_mskm_stat_skbt_cd: if childMap empty -> null, else set"]
    S18["Set 8 fields to null (TAKCHO_KIBOD, TEL_RRK_KIBOD, SHOSA, etc.)"]
    S19["Get inList from childMap"]
    S20{"inList == null?"}
    S21["Create CAANMsg[1] list template, set 30+ fields to null"]
    S22["template.set(EKK0011D020CBSMSG1LIST, templateArray)"]
    S23["new CAANMsg[1], templates[0] = template"]
    S24["paramMap.put(TEMPLATE_LIST_KEY, templates)"]
    S25["return paramMap"]

    START --> S1 --> S2 --> S3 --> S4 --> S5 --> S6
    S6 --> F1 --> F2 --> F3 --> F4 --> F5 --> F6 --> F7 --> F8 --> F9 --> F10 --> F11 --> F12 --> F13 --> F14 --> F15 --> F16 --> F17 --> S18 --> S19 --> S20
    S20 -- "yes" --> S21 --> S22 --> S23
    S20 -- "no" --> S23
    S23 --> S24 --> S25
```

**Processing overview:**

1. **Common metadata initialization** — Delegates to `editInMsg(param)` to create a base `paramMap`, then instantiates the CBS message template with the template ID constant (`TEMPLATE_ID_EKK0011D020 = "EKK0011D020"`).
2. **Runtime metadata population** — Sets operator ID, operate date, and operate date-time from the request's control map, along with a static `FUNC_CODE = "1"` (overwritten shortly after).
3. **Function code overwrite** — The function code is overwritten from `dataMap.get(JCMConstants.FUNC_CODE_KEY)`, ensuring the correct screen-level function code takes precedence.
4. **SYSID field mapping** — Reads from `dataMap.get("sysid")` (changed from `childMap` in v8.00.01 — SYSID is no longer sourced from the child map to align with the request schema).
5. **16 childMap field mappings** — Each field follows the same pattern: if the childMap value is an empty string, set null on the template; otherwise cast and set the string value. These cover order type codes, dates, contact info, customer preferences, and consent flags.
6. **8 unconditional null fields** — Sets 8 fields to null explicitly (TAKCHO_KIBOD_SBT_CD, TEL_RRK_KIBOD_SBT_CD, SHOSA_BF_RRK_JIKO_YH, SHOSA_BF_RRK_JIKO, USE_SVC_KEIZK_SBT_CD, KOJI_REQ_INFO_RRK_JIKO, UK_TNTSHA_SKBT_CD, MSKM_ROUTE_SKBT_CD) — these are fields not yet implemented or not required for this screen.
7. **Child list template creation** — If the child list (`kksv040501_EKK0011D020CBSMsg1List`) is null, creates a new `CAANMsg[]` array and initializes all 30+ detail fields to null as a blank-slate child record template.
8. **Final assembly** — Wraps the template in a `CAANMsg[]` array and stores it under `JCMConstants.TEMPLATE_LIST_KEY` in the paramMap, then returns the paramMap.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `param` | `IRequestParameterReadWrite` | The request parameter holder containing control metadata (operator ID, operate date/time) and the work mapping area. It bridges the HTTP request from the UI with the backend processing pipeline. |
| 2 | `dataMap` | `Map<String, Object>` | Carries screen-level context data including the SYSID (system identifier for the order record) and the FUNC_CODE (function code identifying which screen invoked this method). Values from dataMap override generic settings. |
| 3 | `childMap` | `HashMap<String, Object>` | Contains the child/line-item order data collected from the form submission. Keys follow the pattern `kksv040501_*` and include order type codes, dates, contact details, customer preferences, consent flags, and a child list for detailed order records. |

**External state / instance fields read:**
- None directly — all state is passed via parameters. The method delegates to `editInMsg(param)` which is a superclass/enclosing method that sets up the base paramMap.

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| U | `JKKSeikyKeiHenkoCC.editInMsg` | JKKSeikyKeiHenkoCC | - | Calls `editInMsg(param)` in the same class to initialize the base paramMap with common metadata (operator ID, operate date, etc.) |
| R | `SCW00701SFLogic.getName` | SCW00701SFLogic | - | (Referenced in code graph but not directly called in this method — may be called from the caller `execEKK0011D020`) |

### Method calls within `editInMsg_EKK0011D020`:

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| U | `JKKSeikyKeiHenkoCC.editInMsg` | JKKSeikyKeiHenkoCC | - | Base message initialization — creates paramMap with common headers (operator ID, operate date, operate date-time). Invoked at the start of this method. |
| U | `CAANMsg.set` | CAANMsg (template) | - | Populates 20+ fields on the main CBS message template with values from param, dataMap, or childMap. Each `set()` call maps one source field to one template field. |
| U | `CAANMsg.setNull` | CAANMsg (template) | - | Clears 8 top-level fields that are not used in this screen, and initializes all 30+ child fields to null in the blank-slate template. |
| U | `HashMap.put` | HashMap | - | Stores the completed `CAANMsg[]` template array under `JCMConstants.TEMPLATE_LIST_KEY` in the paramMap for downstream CBS consumption. |

**Note:** This method is a **message assembly** component, not a data-access layer method. It does not directly execute SQL or touch database tables. It transforms request parameters into a CBS message envelope that is consumed by downstream service components (called from `execEKK0011D020`, which in turn calls CBS service methods that perform actual C/R/U/D operations).

## 5. Dependency Trace

### Caller

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | CBS: JKKSeikyKeiHenkoCC.execEKK0011D020() | `execEKK0011D020` → `editInMsg_EKK0011D020` | Message assembly (no direct DB access — terminal ops are performed by downstream CBS calls in the caller) |

**Call chain details:**

`execEKK0011D020()` (the screen's execution handler within `JKKSeikyKeiHenkoCC`) calls `editInMsg_EKK0011D020()` to build the CBS message template. The resulting `paramMap` containing the assembled template is then used by `execEKK0011D020()` to invoke downstream CBS service components (which perform the actual database CRUD operations). This method itself is purely a message transformer and does not reach the database layer.

**Downstream terminal operations from this method:**

| Operation | Type |
|-----------|------|
| `CAANMsg.set()` / `CAANMsg.setNull()` | Message assembly |
| `HashMap.put()` | Parameter map population |

All terminal operations are message-level transformations. The actual data access (C/R/U/D) occurs in the caller method `execEKK0011D020()` after this method returns.

## 6. Per-Branch Detail Blocks

**Block 1** — [EXEC] Common area initialization (L890)

> Calls the base `editInMsg` method to create a paramMap with common headers, then creates the CBS message template.

| # | Type | Code |
|---|------|------|
| 1 | SET | `paramMap = editInMsg(param)` // Initializes base paramMap with common metadata [CALL from same class] |
| 2 | SET | `template = new CAANMsg(EKK0011D020CBSMsg.class.getName())` // Creates CBS message template for EKK0011D020 |

**Block 2** — [EXEC] Template ID and common field setup (L893–L907)

> Sets the template identifier, function code, operator ID, operate date, and operate date-time on the template.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.set(TEMPLATEID, TEMPLATE_ID_EKK0011D020)` // TEMPLATE_ID_EKK0011D020 = "EKK0011D020" |
| 2 | SET | `template.set(FUNC_CODE, "1")` // Initial function code, overwritten later |
| 3 | SET | `operatorId = param.getControlMapData(SCControlMapKeys.OPERATOR_ID)` // Get logged-in operator ID |
| 4 | SET | `template.set(OPERATOR_ID_KEY, operatorId)` |
| 5 | SET | `operateDate = param.getControlMapData(SCControlMapKeys.OPE_DATE)` // Get operate date from control map |
| 6 | SET | `template.set(OPERATE_DATE_KEY, operateDate)` |
| 7 | SET | `operateDateTime = param.getControlMapData(SCControlMapKeys.OPE_TIME)` // Get operate date-time from control map |
| 8 | SET | `template.set(OPERATE_DATETIME_KEY, operateDateTime)` |

**Block 3** — [EXEC] Work area retrieval (L910–L912)

> Retrieves the work mapping area from the parameter and initializes local variables.

| # | Type | Code |
|---|------|------|
| 1 | SET | `workMap = param.getMappingWorkArea()` // Gets the work area mapping (not actively used in this method) |
| 2 | SET | `template.set(FUNC_CODE, dataMap.get(JCMConstants.FUNC_CODE_KEY))` // OVERWRITE: function code from dataMap |

**Block 4** — [IF-ELSE] SYSID field mapping — dataMap source (v8.00.01 change) (L919–L926)

> Maps SYSID from `dataMap` (changed from `childMap` in v8.00.01 per OM-2014-0002048 — no longer uses SYSID from child map). If the value is an empty string, sets null.

| # | Type | Code |
|---|------|------|
| 1 | IF | `"".equals(dataMap.get("sysid"))` [dataMap.sysid empty check] |
| 1.1 | SET | `template.setNull(SYSID)` // SYSID is empty → set null [IF branch: empty] |
| 1.2 | SET | `template.set(SYSID, (String)dataMap.get("sysid"))` // SYSID populated from dataMap [ELSE branch: non-empty] |

**Block 5** — [IF-ELSE] MSKM_SBT_CD (Order Type Code) (L931–L938)

> Maps the order type classification code from childMap.

| # | Type | Code |
|---|------|------|
| 1 | IF | `"".equals(childMap.get("kksv040501_mskm_sbt_cd"))` [empty-string check] |
| 1.1 | SET | `template.setNull(MSKM_SBT_CD)` // Order type code is empty |
| 1.2 | SET | `template.set(MSKM_SBT_CD, (String)childMap.get("kksv040501_mskm_sbt_cd"))` // Order type code mapped |

**Block 6** — [IF-ELSE] MSKMSHO_ARIV_YMD (Order Document Arrival Date) (L942–L949)

> Maps the date when the order document was received.

| # | Type | Code |
|---|------|------|
| 1 | IF | `"".equals(childMap.get("kksv040501_mskmsho_ariv_ymd"))` [empty-string check] |
| 1.1 | SET | `template.setNull(MSKMSHO_ARIV_YMD)` // Order document arrival date is empty |
| 1.2 | SET | `template.set(MSKMSHO_ARIV_YMD, (String)childMap.get("kksv040501_mskmsho_ariv_ymd"))` // Arrived date mapped |

**Block 7** — [IF-ELSE] MSKM_UK_DTM (Order Receipt Date-Time) (L953–L960)

> Maps the date-time when the order was received.

| # | Type | Code |
|---|------|------|
| 1 | IF | `"".equals(childMap.get("kksv040501_mskm_uk_dtm"))` [empty-string check] |
| 1.1 | SET | `template.setNull(MSKM_UK_DTM)` // Order receipt date-time is empty |
| 1.2 | SET | `template.set(MSKM_UK_DTM, (String)childMap.get("kksv040501_mskm_uk_dtm"))` // Receipt date-time mapped |

**Block 8** — [IF-ELSE] MSKM_UK_TNT_USER_ID (Order Reception Responsible User ID) (L964–L971)

> Maps the user ID of the person responsible for receiving the order.

| # | Type | Code |
|---|------|------|
| 1 | IF | `"".equals(childMap.get("kksv040501_mskm_uk_tnt_user_id"))` [empty-string check] |
| 1.1 | SET | `template.setNull(MSKM_UK_TNT_USER_ID)` // Responsible user ID is empty |
| 1.2 | SET | `template.set(MSKM_UK_TNT_USER_ID, (String)childMap.get("kksv040501_mskm_uk_tnt_user_id"))` // Responsible user ID mapped |

**Block 9** — [IF-ELSE] MSKM_YMD (Order Date) (L975–L982)

> Maps the date of the order.

| # | Type | Code |
|---|------|------|
| 1 | IF | `"".equals(childMap.get("kksv040501_mskm_ymd"))` [empty-string check] |
| 1.1 | SET | `template.setNull(MSKM_YMD)` // Order date is empty |
| 1.2 | SET | `template.set(MSKM_YMD, (String)childMap.get("kksv040501_mskm_ymd"))` // Order date mapped |

**Block 10** — [IF-ELSE] TTL_BUSINESS_CENTER_UK_NO (Total Business Center Receipt Number) (L986–L993)

> Maps the business center receipt number for total business operations.

| # | Type | Code |
|---|------|------|
| 1 | IF | `"".equals(childMap.get("kksv040501_ttl_business_center_uk_no"))` [empty-string check] |
| 1.1 | SET | `template.setNull(TTL_BUSINESS_CENTER_UK_NO)` // Center receipt number is empty |
| 1.2 | SET | `template.set(TTL_BUSINESS_CENTER_UK_NO, (String)childMap.get("kksv040501_ttl_business_center_uk_no"))` // Number mapped |

**Block 11** — [IF-ELSE] TTL_BUSINESS_MSKM_OPT_CD (Total Business Order Contract Code) (L997–L1004)

> Maps the order contract code for total business operations.

| # | Type | Code |
|---|------|------|
| 1 | IF | `"".equals(childMap.get("kksv040501_ttl_business_mskm_opt_cd"))` [empty-string check] |
| 1.1 | SET | `template.setNull(TTL_BUSINESS_MSKM_OPT_CD)` // Contract code is empty |
| 1.2 | SET | `template.set(TTL_BUSINESS_MSKM_OPT_CD, (String)childMap.get("kksv040501_ttl_business_mskm_opt_cd"))` // Contract code mapped |

**Block 12** — [IF-ELSE] MSKM_RRKS_TELNO (Order Contact Phone Number) (L1008–L1015)

> Maps the contact phone number for the order.

| # | Type | Code |
|---|------|------|
| 1 | IF | `"".equals(childMap.get("kksv040501_mskm_rrks_telno"))` [empty-string check] |
| 1.1 | SET | `template.setNull(MSKM_RRKS_TELNO)` // Contact phone number is empty |
| 1.2 | SET | `template.set(MSKM_RRKS_TELNO, (String)childMap.get("kksv040501_mskm_rrks_telno"))` // Phone number mapped |

**Block 13** — [IF-ELSE] MSKM_JSSIS_SBT_CD (Order Executor Type Code) (L1019–L1026)

> Maps the code for the type of entity executing the order (e.g., own company, partner, subcontractor).

| # | Type | Code |
|---|------|------|
| 1 | IF | `"".equals(childMap.get("kksv040501_mskm_jssis_sbt_cd"))` [empty-string check] |
| 1.1 | SET | `template.setNull(MSKM_JSSIS_SBT_CD)` // Executor type code is empty |
| 1.2 | SET | `template.set(MSKM_JSSIS_SBT_CD, (String)childMap.get("kksv040501_mskm_jssis_sbt_cd"))` // Executor type code mapped |

**Block 14** — [IF-ELSE] CUST_YOBO_JIKO (Customer Preferences / Self-Entered Items) (L1030–L1037)

> Maps the customer's self-entered preference items.

| # | Type | Code |
|---|------|------|
| 1 | IF | `"".equals(childMap.get("kksv040501_cust_yobo_jiko"))` [empty-string check] |
| 1.1 | SET | `template.setNull(CUST_YOBO_JIKO)` // Customer preferences is empty |
| 1.2 | SET | `template.set(CUST_YOBO_JIKO, (String)childMap.get("kksv040501_cust_yobo_jiko"))` // Preferences mapped |

**Block 15** — [IF-ELSE] TEL_RRK_KIBO_TIME_CD (Telephone Contact Preference Time Slot Code) (L1041–L1048)

> Maps the preferred time window for telephone contact.

| # | Type | Code |
|---|------|------|
| 1 | IF | `"".equals(childMap.get("kksv040501_tel_rrk_kibo_time_cd"))` [empty-string check] |
| 1.1 | SET | `template.setNull(TEL_RRK_KIBO_TIME_CD)` // Contact time slot code is empty |
| 1.2 | SET | `template.set(TEL_RRK_KIBO_TIME_CD, (String)childMap.get("kksv040501_tel_rrk_kibo_time_cd"))` // Time slot code mapped |

**Block 16** — [IF-ELSE] TAKCHO_KIBO_TIME_CD (On-site Survey Preference Time Slot Code) (L1052–L1059)

> Maps the preferred time window for on-site surveys/visits.

| # | Type | Code |
|---|------|------|
| 1 | IF | `"".equals(childMap.get("kksv040501_takcho_kibo_time_cd"))` [empty-string check] |
| 1.1 | SET | `template.setNull(TAKCHO_KIBO_TIME_CD)` // Survey time slot code is empty |
| 1.2 | SET | `template.set(TAKCHO_KIBO_TIME_CD, (String)childMap.get("kksv040501_takcho_kibo_time_cd"))` // Time slot code mapped |

**Block 17** — [IF-ELSE] KARI_MSKM_FLG (Preliminary Order Flag) (L1063–L1070)

> Maps the flag indicating whether this is a preliminary/temporary order.

| # | Type | Code |
|---|------|------|
| 1 | IF | `"".equals(childMap.get("kksv040501_kari_mskm_flg"))` [empty-string check] |
| 1.1 | SET | `template.setNull(KARI_MSKM_FLG)` // Preliminary order flag is empty |
| 1.2 | SET | `template.set(KARI_MSKM_FLG, (String)childMap.get("kksv040501_kari_mskm_flg"))` // Preliminary flag mapped |

**Block 18** — [IF-ELSE] REFERER (Referrer) (L1074–L1081)

> Maps the referer/origin of the order request (e.g., website source).

| # | Type | Code |
|---|------|------|
| 1 | IF | `"".equals(childMap.get("kksv040501_referer"))` [empty-string check] |
| 1.1 | SET | `template.setNull(REFERER)` // Referrer is empty |
| 1.2 | SET | `template.set(REFERER, (String)childMap.get("kksv040501_referer"))` // Referrer mapped |

**Block 19** — [IF-ELSE] KEPCO_CUSTINFO_JUJU_DOI_UM (KEPCO Customer Information Consent) (L1085–L1092)

> Maps the consent flag for sharing customer information with KEPCO (Kansai Electric Power Company), a business partner of K-Opticom.

| # | Type | Code |
|---|------|------|
| 1 | IF | `"".equals(childMap.get("kksv040501_kepco_custinfo_juju_doi_um"))` [empty-string check] |
| 1.1 | SET | `template.setNull(KEPCO_CUSTINFO_JUJU_DOI_UM)` // KEPCO consent flag is empty |
| 1.2 | SET | `template.set(KEPCO_CUSTINFO_JUJU_DOI_UM, (String)childMap.get("kksv040501_kepco_custinfo_juju_doi_um"))` // KEPCO consent flag mapped |

**Block 20** — [IF-ELSE] CONSMBSN_MSKM_STAT_SKBT_CD (Consumer Business Order Status Sub-type Code) (L1096–L1103)

> Maps the order status sub-type code for consumer business orders.

| # | Type | Code |
|---|------|------|
| 1 | IF | `"".equals(childMap.get("kksv040501_consmbsn_mskm_stat_skbt_cd"))` [empty-string check] |
| 1.1 | SET | `template.setNull(CONSMBSN_MSKM_STAT_SKBT_CD)` // Consumer order status code is empty |
| 1.2 | SET | `template.set(CONSMBSN_MSKM_STAT_SKBT_CD, (String)childMap.get("kksv040501_consmbsn_mskm_stat_skbt_cd"))` // Status code mapped |

**Block 21** — [EXEC] Unconditional null fields (L1106–L1113)

> Sets 8 fields to null unconditionally — these are fields defined in the CBS message template but not yet in use for this screen.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.setNull(TAKCHO_KIBOD_SBT_CD)` // On-site survey execution type code — not used |
| 2 | SET | `template.setNull(TEL_RRK_KIBOD_SBT_CD)` // Telephone contact execution type code — not used |
| 3 | SET | `template.setNull(SHOSA_BF_RRK_JIKO_YH)` // Pre-check contact self-entry flag — not used |
| 4 | SET | `template.setNull(SHOSA_BF_RRK_JIKO)` // Pre-check contact self-entry item — not used |
| 5 | SET | `template.setNull(USE_SVC_KEIZK_SBT_CD)` // Used service detail type code — not used |
| 6 | SET | `template.setNull(KOJI_REQ_INFO_RRK_JIKO)` // Construction request info self-entry — not used |
| 7 | SET | `template.setNull(UK_TNTSHA_SKBT_CD)` // Reception responsible sub-type code — not used |
| 8 | SET | `template.setNull(MSKM_ROUTE_SKBT_CD)` // Order route sub-type code — not used |

**Block 22** — [IF-ELSE] Child list template creation (L1116–L1200)

> Retrieves the child list from childMap. If null, creates a blank-slate child message template array with all 30+ detail fields initialized to null. This provides the CBS with a proper structure for detailed order/line-item data even when no data is present.

| # | Type | Code |
|---|------|------|
| 1 | SET | `inList = (ArrayList)childMap.get("kksv040501_EKK0011D020CBSMsg1List")` // Child detail list |
| 2 | IF | `inList == null` [Child list null check] |
| 2.1 | SET | `templateArray = new CAANMsg[1]` // Create template array of size 1 |
| 2.2 | SET | `templateArray[0] = new CAANMsg(EKK0011D020CBSMsg1List.class.getName())` // Create list template |
| 2.3–2.28 | SET | `templateArray[0].setNull(MSKMSHO_NO)` through `templateArray[0].setNull(SAME_EQUIP_RE_MSKM_CD)` // Set 26 detail fields to null |
| 2.29–2.35 | SET | `templateArray[0].setNull(OP_SVC_HKTGI_UM)` through `templateArray[0].setNull(HNIN_CFM_ATICLE_SBT_CD)` // Set 7 additional fields to null |
| 2.36–2.40 | SET | `templateArray[0].setNull(KEI_HUKA_CD)` through `templateArray[0].setNull(MKM_UK_SBT_CD)` // Set 5 contract-related fields to null |
| 2.41 | SET | `template.set(EKK0011D020CBSMSG1LIST, templateArray)` // Assign child array to main template |
| 2.42 | ELSE | (if inList != null, skip child template creation — existing child data is preserved in the main template by the caller) |

**Block 23** — [EXEC] Final template assembly and return (L1200–L1203)

> Wraps the template in a CAANMsg array and stores it in the paramMap under the template list key.

| # | Type | Code |
|---|------|------|
| 1 | SET | `templates = new CAANMsg[1]` // Create template wrapper array |
| 2 | SET | `templates[0] = template` // Populate with the assembled template |
| 3 | SET | `paramMap.put(JCMConstants.TEMPLATE_LIST_KEY, templates)` // Store template array in paramMap |
| 4 | RETURN | `return paramMap` // Return completed message parameter map |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `mskm` | Field prefix | 申込 (Shoumu) — Order / Application. Appears in many field names as shorthand for "order information" |
| `mskm_sbt_cd` | Field | Order Type Code — classifies the type of order (e.g., new connection, change, cancellation) |
| `msksho_ariv_ymd` | Field | Order Document Arrival Date — the date the order documentation was received |
| `mskm_uk_dtm` | Field | Order Receipt Date-Time — when the order was received (date and time combined) |
| `mskm_uk_tnt_user_id` | Field | Order Reception Responsible User ID — identifies which staff member received the order |
| `mskm_ymd` | Field | Order Date — the date the order was placed |
| `ttl_business_center_uk_no` | Field | Total Business Center Receipt Number — central business division receipt tracking number |
| `ttl_business_mskm_opt_cd` | Field | Total Business Order Contract Code — the contract code for total business orders |
| `mskm_rrks_telno` | Field | Order Contact Phone Number — phone number to contact regarding this order |
| `mskm_jssis_sbt_cd` | Field | Order Executor Type Code — identifies who will execute the order (own company, partner, subcontractor) |
| `cust_yobo_jiko` | Field | Customer Preferences / Self-Entered Items — items the customer specified themselves |
| `tel_rrk_kibo_time_cd` | Field | Telephone Contact Preference Time Slot Code — preferred time for telephone contact |
| `takcho_kibo_time_cd` | Field | On-site Survey Preference Time Slot Code — preferred time for technician on-site visit |
| `kari_mskm_flg` | Field | Preliminary Order Flag — indicates whether this is a temporary/preliminary order |
| `referer` | Field | Referrer — the source/channel through which the order was submitted |
| `kepco_custinfo_juju_doi_um` | Field | KEPCO Customer Information Consent Flag — whether the customer consents to sharing data with KEPCO (Kansai Electric Power Company) |
| `consmbsn_mskm_stat_skbt_cd` | Field | Consumer Business Order Status Sub-type Code — sub-type classification for consumer order status |
| `sysid` | Field | System ID — unique system identifier for the order record |
| `skbt_cd` | Field | Sub-Type Code — a subtype classification code used in various contexts |
| `jiku` / `jiko` | Field suffix | 自項目 (Ji-kou) — self-specified / self-entered field (customer-provided detail) |
| `kibo` | Field suffix | 希望 (Kibo) — preference / wish (e.g., preferred time) |
| `rrks` | Field suffix | 連絡 (Renraku) — contact |
| `uk` | Field suffix | 受領 (Ryoutou) — receipt / reception |
| `sbt_cd` | Field suffix | 種類コード (Shurui Code) — type classification code |
| `ymd` | Field suffix | 年月日 (Nenniggatsu Nichi) — Year-Month-Day date format |
| `dtm` | Field suffix | DateTime — date and time combined |
| `um` | Field suffix | 有無 (Umu) — presence/absence flag (Yes/No boolean) |
| `flg` | Field suffix | Flag — boolean indicator |
| `cd` | Field suffix | Code — a classification code value |
| EKK0011D020 | Screen ID | 申込内容承認登録 (Order Content Approval Registration) — the approval registration screen for order content |
| TEMPLATE_ID_EKK0011D020 | Constant | Template identifier constant, value: `"EKK0011D020"` |
| CAANMsg | Class | Core Business System message envelope — the standard messaging format for CBS communication |
| EKK0011D020CBSMsg | Class | Main CBS message template for EKK0011D020 — contains header-level order information |
| EKK0011D020CBSMsg1List | Class | Child CBS message template for EKK0011D020 — contains detailed line-item/contact information |
| FUNC_CODE | Field | Function Code — identifies the screen/business function invoking this method |
| PARAMAP / TEMPLATE_LIST_KEY | Constant key | Key used to store the template array in the paramMap for CBS processing |
| SCControlMapKeys | Class | Constants class for control map keys (OPERATOR_ID, OPE_DATE, OPE_TIME) |
| JCMConstants | Class | Core JCM constants class (TEMPLATE_LIST_KEY, OPERATOR_ID_KEY, OPERATE_DATE_KEY, OPERATE_DATETIME_KEY, FUNC_CODE_KEY) |
| REQUEST_PARAMETER | Class | Base class/interface for request parameter handling in the framework |
| JKKSeikyKeiHenkoCC | Class | Billing Contract Change Common Component — the class containing this method, part of the K-Opticom billing system |
| KEPCO | Business term | Kansai Electric Power Company (関西電力) — a major utility company and business partner of K-Opticom |
