# Business Logic — JKKSodSendCC.executeSodSend() [241 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `com.fujitsu.futurity.bp.custom.common.JKKSodSendCC` |
| Layer | Common Component (CC) — shared business logic reused by screens and batch jobs |
| Module | `common` (Package: `com.fujitsu.futurity.bp.custom.common`) |

## 1. Role

### JKKSodSendCC.executeSodSend()

This method performs **SOD (Service Order Data) transmission**, which is the core business operation for submitting telecom service orders to the upstream service control system. It processes three distinct service types — **Internet (FTTH) service orders**, **Telephone (Telco) service orders**, and **Mobile service orders** — each routed to its respective service component endpoint.

The method follows a **routing/dispatch pattern** with **delegation**: it extracts structured target data from a parameter map, iterates over each service type's order list, and delegates execution to specific SC (Service Component) methods via `callSvcInter`. For FTTH orders, it first checks OLS (Optical Line Subscriber) functionality presence via `EZM0411A010SC` — if OLS is absent (`OLS_KINO_UM = "0"`), the service order is silently acknowledged without actual transmission. For telephone orders, it handles OLS/multi-function router scenarios by calling `EKK1081B001CBS` to verify order conditions before proceeding with the main transmission via `ESC0051D010SC`.

It plays the role of a **shared orchestrator** called by the KKSV0193 screen operation (`KKSV0193OPOperation`) and the batch job `JBSbatKKSodSendReq`. It serves as the central entry point for all SOD submissions — whether triggered by a customer-facing screen or by a scheduled/queued batch — ensuring consistent service order routing, MAC address enrichment, and order condition management across the K-Opticom customer core system.

If orders are successfully processed (`odrHakkoFlg = true`), the method additionally updates order setup settings and order issuance conditions to synchronize them with the service controller. The method always returns with a `"0000"` return code, indicating successful completion.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["executeSodSend"])
    INIT["init param fixedText"]

    START --> INIT
    INIT --> GET_DATA["getData fixedText"]
    GET_DATA --> GET_LIST["get TRGT_DATA_LIST"]
    GET_LIST --> OUTER_LOOP["for each trgtDataInfo"]

    OUTER_LOOP --> MAC_NET["getMACAdress net"]
    MAC_NET --> MAC_TEL["getMACAdress tel"]
    MAC_TEL --> MAC_MOBILE["getMACAdress mobile"]
    MAC_MOBILE --> MAC_FAT["getMACAdress FatBroadBandRouter"]

    MAC_FAT --> INIT_FLAGS["odrHakkoFlg=false olsNashiFlg=false"]

    INIT_FLAGS --> LOOP_SVC["for each svcOrderInfo"]
    LOOP_SVC --> CHECK_147["isIllegalSvcOdr147"]
    CHECK_147 --> CHECK_EMPTY["svcOrderInfo not empty"]
    CHECK_EMPTY --> CHECK_SVC_CD["svc_order_cd == 0A"]
    CHECK_SVC_CD -->|YES| OLS_CHECK["editInMsgEZM0411A010 callSvcInter check OLS_KINO_UM"]
    CHECK_SVC_CD -->|NO| SKIP_OLS["skip OLS check"]
    OLS_CHECK -->|OLS=0| SET_OLS["olsNashiFlg=true"]
    OLS_CHECK -->|OLS!=0| SKIP_OLS
    SKIP_OLS --> NOT_OLS["!olsNashiFlg"]
    SET_OLS --> NOT_OLS
    NOT_OLS -->|false| END_SVC_LOOP["end svcOrderInfo loop"]
    NOT_OLS -->|true| EXEC_SVC["editInMsgESC0041D010 callSvcInter set ukeDtm"]
    EXEC_SVC --> MARK_FLG_SVC["odrHakkoFlg=true"]
    MARK_FLG_SVC --> END_SVC_LOOP

    END_SVC_LOOP --> LOOP_TEL["for each telSvcOrderInfo"]
    LOOP_TEL --> CHECK_TEL_EMPTY["telSvcOrderInfo not empty"]
    CHECK_TEL_EMPTY --> GET_TEL_CODE["get tel_svc_order_cd yokyu_sbt_cd"]
    GET_TEL_CODE --> CHECK_TEL_TYPE["tel_svc_order_cd in 20 26 AND yokyu_sbt_cd in 02 03 04 08"]
    CHECK_TEL_TYPE -->|true| EXEC_OLS["editInMsgEKK1081B001 callSvcInter get updTrnId"]
    CHECK_TEL_TYPE -->|false| SKIP_OLS_TEL["skip OLS part"]
    EXEC_OLS --> GET_ODR_DTL["getOdrDtlCdForAdChg"]
    SKIP_OLS_TEL --> GET_ODR_DTL
    GET_ODR_DTL --> EXEC_TEL["editInMsgESC0051D010 callSvcInter set ukeDtm"]
    EXEC_TEL --> MARK_FLG_TEL["odrHakkoFlg=true"]
    MARK_FLG_TEL --> END_TEL_LOOP["end telSvcOrderInfo loop"]

    END_TEL_LOOP --> LOOP_MOBILE["for each mobileOrderInfo"]
    LOOP_MOBILE --> CHECK_MOBILE_EMPTY["mobileOrderInfo not empty"]
    CHECK_MOBILE_EMPTY --> EXEC_MOBILE["editInMsgESC0031D010 callSvcInter set ukeDtm"]
    EXEC_MOBILE --> MARK_FLG_MOBILE["odrHakkoFlg=true"]
    MARK_FLG_MOBILE --> END_MOBILE_LOOP["end mobileOrderInfo loop"]

    END_MOBILE_LOOP --> CHECK_ODR_FLG["odrHakkoFlg==true"]
    CHECK_ODR_FLG -->|false| END_RESULT["set returnCode 0000 return param"]
    CHECK_ODR_FLG -->|true| GET_ODR_SET["get ODR_SET_INFO_LIST"]
    GET_ODR_SET --> LOOP_ODR["for each odrSetInfo"]
    LOOP_ODR --> GET_JOKEN_CD["get odr_hakko_joken_cd"]
    GET_JOKEN_CD --> CHECK_EXCLUDE["NOT in TEL_SVC_START 13 14 AND NOT olsNashiFlg"]
    CHECK_EXCLUDE -->|true| GET_ODR_PARAMS["get order_sbt_cd svc_order_cd"]
    CHECK_EXCLUDE -->|false| END_ODR_LOOP["end odrSetInfo loop"]
    GET_ODR_PARAMS --> GET_PATTERN["getOrdSetUpdJdg ordSetPattern"]
    GET_PATTERN --> CHECK_PATTERN["ordSetPattern >= 1"]
    CHECK_PATTERN -->|true| EXEC_CONSULT["editInMsgEKK1041B001 callSvcInter"]
    EXEC_CONSULT --> CHECK_RSLT["rsltMsgEKK1041B001 != null"]
    CHECK_RSLT -->|true| EXEC_UPDATE["editInMsgEKK1041C010 callSvcInter"]
    CHECK_RSLT -->|false| EXEC_INSERT["editInMsgEKK1041D010 callSvcInter"]
    EXEC_UPDATE --> END_ODR_LOOP
    EXEC_INSERT --> END_ODR_LOOP
    CHECK_PATTERN -->|false| END_ODR_LOOP
    END_ODR_LOOP --> EXEC_JOKEN["editInMsgEKK1081C010 callSvcInter"]
    EXEC_JOKEN --> SAVE_UPD_DTM["newerUpdDtm.put odrHakkoJokenNo updDtm"]
    SAVE_UPD_DTM --> END_ODR_LOOP
    END_ODR_LOOP --> END_RESULT

    END_RESULT --> END_NODE(["Return param"])
```

**CRITICAL — Constant Resolution:**

- `JKKSodSendConstCC.ITS_TKNRT = "FatBroadBandRouter"` — device type identifier for multi-function router MAC address retrieval (ANK-1578-00-00 multi-function router support)
- `JKKSodSendConstCC.SOI_SVC_ORDER_CD = "svc_order_cd"` — service order code; value `"0A"` triggers OLS functionality check
- `JKKSodSendConstCC.TSOI_TEL_SVC_ORDER_CD = "tel_svc_order_cd"` — telephone service order code; values `"20"` (FTTH) or `"26"` (multi-function router) trigger OLS pre-check
- `JKKSodSendConstCC.TSOI_YOKYU_SBT_CD = "yokyu_sbt_cd"` — request type code; values `"02"` (new), `"03"` (change), `"04"` (cancellation), `"08"` (deletion) trigger OLS pre-check
- `JKKSvcConst.ODR_HAKKO_JOKEN_CD_TEL_SVC_START_JOKEN = "11"` — order issuance condition: telephone service start condition (excluded from order setup update)
- `JKKSvcConst.ODR_HAKKO_JOKEN_CD_KKTK_START_JOKEN = "13"` — order issuance condition: equipment delivery start condition (excluded from order setup update)
- `JKKSvcConst.ODR_HAKKO_JOKEN_CD_KKTK_END_JOKEN = "14"` — order issuance condition: equipment delivery end condition (excluded from order setup update)
- `JKKSodSendConstCC.SVC_ODR_UK_DTM = "ServiceOrderUketukeDtm"` — key for storing service order receipt timestamp

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | Session handle carrying the database connection and session context used for all service component invocations and data operations |
| 2 | `param` | `IRequestParameterReadWrite` | Business data read/write parameter object containing the control map (with return codes), a data map keyed by `fixedText`, and model group data. Holds the target SOD order lists to be processed |
| 3 | `fixedText` | `String` | User-specified arbitrary string used as a data key to extract the specific target data group from the parameter's data map; identifies which batch/screen's orders to process |

**Instance fields read:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `newerUpdDtm` | `Map<String, String>` | Stores the mapping of order issuance condition number (`odr_hakko_joken_no`) to updated timestamp (`upd_dtm`) after EKK1081C010 processing, preserving the year/month/day/time/minutes/seconds value for later use |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `editInMsgEZM0411A010` | EZM0411A010 | - | Prepares input message for OLS (Optical Line Subscriber) functionality check — only called when `svc_order_cd == "0A"` (FTTH service) |
| R | `callSvcInter` (EZM0411A010) | EZM0411A010SC | - | Calls EZM0411A010SC to query whether OLS functionality is present; returns `OLS_KINO_UM` flag indicating OLS availability |
| R | `editInMsgESC0041D010` | ESC0041D010 | - | Prepares input message for Internet service order receipt; packages FTTH service order data for transmission |
| R/U | `callSvcInter` (ESC0041D010) | ESC0041D010SC | Service Order table | Executes Internet service order receipt — registers/updates the service order in the system; returns receipt timestamp (`SVC_ORDER_UK_DTM`) |
| R | `editInMsgEKK1081B001` | EKK1081B001 | - | Prepares input message for telephone order setup consultation; packages telco service order data for verification |
| R/U | `callSvcInter` (EKK1081B001) | EKK1081B001CBS | Order Setup table | Consults order setup settings for telephone service orders matching OLS/multi-function router conditions (`tel_svc_order_cd` in 20/26 + `yokyu_sbt_cd` in 02/03/04/08); returns update transaction ID (`updTrnId`) |
| R | `getOdrDtlCdForAdChg` | - | - | Retrieves order detail code for address change processing; used as parameter for ESC0051D010 |
| R | `editInMsgESC0051D010` | ESC0051D010 | - | Prepares input message for telephone service order receipt; packages telco service order data including update transaction ID and order detail code |
| R/U | `callSvcInter` (ESC0051D010) | ESC0051D010SC | Telephone Service Order table | Executes telephone service order receipt — registers/updates the telephone service order; returns receipt timestamp (`TEL_SVC_ORDER_UK_DTM`) |
| R | `editInMsgESC0031D010` | ESC0031D010 | - | Prepares input message for mobile service order receipt; packages mobile service order data for transmission |
| R/U | `callSvcInter` (ESC0031D010) | ESC0031D010SC | Mobile Order table | Executes mobile service order receipt — registers/updates the mobile service order; returns receipt timestamp (`MOBILE_ORDER_UK_DTM`) |
| R | `editInMsgEKK1041B001` | EKK1041B001 | - | Prepares input message for order setup consultation; packages order set info data for order setup setting retrieval |
| R/U | `callSvcInter` (EKK1041B001) | EKK1041B001SC | Order Setup table | Consults order setup settings; determines whether order setup already exists, returns the result message for further branching |
| R | `editInMsgEKK1041C010` | EKK1041C010 | - | Prepares input message for order setup change; packages order set info with the result from consultation |
| R/U | `callSvcInter` (EKK1041C010) | EKK1041C010CBS | Order Setup table | Updates existing order setup settings — called when `rsltMsgEKK1041B001` is not null (setup already exists) |
| R | `editInMsgEKK1041D010` | EKK1041D010 | - | Prepares input message for order setup registration; packages order set info for new registration |
| R/U | `callSvcInter` (EKK1041D010) | EKK1041D010CBS | Order Setup table | Registers new order setup settings — called when `rsltMsgEKK1041B001` is null (setup does not yet exist) |
| R | `editInMsgEKK1081C010` | EKK1081C010 | - | Prepares input message for order issuance condition change; packages order issuance condition info for update |
| R/U | `callSvcInter` (EKK1081C010) | EKK1081C010CBS | Order Issuance Condition table | Updates order issuance conditions after service order processing — synchronizes the order condition with service status; returns updated timestamp |
| C | `JCCBPCommon.getSysDateTimeStamp` | JCCBPCommon | - | Gets current system date/time stamp — used as fallback receipt time when OLS is absent for FTTH orders |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:KKSV0193 | `KKSV0193OPOperation.run` → `target3.invoke` → `CCRequestBroker.execute` → `JKKSodSendCC.executeSodSend` | `editInMsgEZM0411A010 [R] OLS check data`, `callSvcInter EZM0411A010SC [R] OLS functionality table`, `editInMsgESC0041D010 [R/U] Service Order table`, `editInMsgEKK1081B001 [R/U] Order Setup table`, `editInMsgESC0051D010 [R/U] Telephone Service Order table`, `editInMsgESC0031D010 [R/U] Mobile Order table`, `editInMsgEKK1041B001 [R/U] Order Setup table`, `editInMsgEKK1041C010 [U] Order Setup table`, `editInMsgEKK1041D010 [C] Order Setup table`, `editInMsgEKK1081C010 [U] Order Issuance Condition table` |
| 2 | Batch:JBSbatKKSodSendReq | `JBSbatKKSodSendReq` prepares target data with `trgt_data_list`, `svc_order_info_list`, `tel_svc_order_info_list`, `mobile_order_info_list` → invokes SOD transmission → `JKKSodSendCC.executeSodSend` | `editInMsgEZM0411A010 [R] OLS check data`, `callSvcInter EZM0411A010SC [R] OLS functionality table`, `editInMsgESC0041D010 [R/U] Service Order table`, `editInMsgEKK1081B001 [R/U] Order Setup table`, `editInMsgESC0051D010 [R/U] Telephone Service Order table`, `editInMsgESC0031D010 [R/U] Mobile Order table`, `editInMsgEKK1041B001 [R/U] Order Setup table`, `editInMsgEKK1041C010 [U] Order Setup table`, `editInMsgEKK1041D010 [C] Order Setup table`, `editInMsgEKK1081C010 [U] Order Issuance Condition table` |

**Notes:**
- **KKSV0193** is the screen operation that triggers SOD transmission from customer-facing operations (e.g., service order registration/change screens). It uses `CCRequestBroker` to invoke the CC method.
- **JBSbatKKSodSendReq** is the batch job that prepares order data maps (`tel_svc_order_info_list`, `mobile_order_info_list`, etc.) via `addKksv019301ccOrderInfo()` and queues them for SOD transmission.

## 6. Per-Branch Detail Blocks

**Block 1** — [INITIALIZATION] (L171)

Initial processing of the method.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `init(param, fixedText)` // Initialize parameter with fixed text |
| 2 | SET | `trgtData = (HashMap) param.getData(fixedText)` // Get target data map keyed by fixedText |
| 3 | SET | `trgtDataList = (ArrayList) trgtData.get(TRGT_DATA_LIST)` // Extract target data list [-> `TRGT_DATA_LIST = "trgt_data_list"`] |

**Block 2** — [FOR LOOP: outer] `for each trgtDataInfo` (L191)

Outer loop over each target data group (batch/screen group).

| # | Type | Code |
|---|------|------|
| 1 | SET | `svcOrderInfoList = (ArrayList) trgtDataInfo.get(SVC_ORDER_INFO_LIST)` // Extract service order info list [-> `SVC_ORDER_INFO_LIST = "svc_order_info_list"`] |
| 2 | SET | `telSvcOrderInfoList = (ArrayList) trgtDataInfo.get(TEL_SVC_ORDER_INFO_LIST)` // Extract telephone service order info list [-> `TEL_SVC_ORDER_INFO_LIST = "tel_svc_order_info_list"`] |
| 3 | SET | `mobileOrderInfoList = (ArrayList) trgtDataInfo.get(MOBILE_ORDER_INFO_LIST)` // Extract mobile order info list [-> `MOBILE_ORDER_INFO_LIST = "mobile_order_info_list"`] |
| 4 | SET | `odrHakkoJokenInfo = (HashMap) trgtDataInfo.get(ODR_HAKKO_JOKEN_INFO)` // Extract order issuance condition info [-> `ODR_HAKKO_JOKEN_INFO = "odr_hakko_joken_info"`] |

**Block 2.1** — [EXEC: MAC address enrichment] (L195–L201)

Retrieve MAC addresses for each service type. This includes the multi-function router addition from ANK-1578-00-00.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `getMACAdress(param, svcOrderInfoList, handle, fixedText, "net")` // Get MAC address for internet service |
| 2 | CALL | `getMACAdress(param, telSvcOrderInfoList, handle, fixedText, "tel")` // Get MAC address for telephone service |
| 3 | CALL | `getMACAdress(param, mobileOrderInfoList, handle, fixedText, "mobile")` // Get MAC address for mobile service |
| 4 | CALL | `getMACAdress(param, telSvcOrderInfoList, handle, fixedText, ITS_TKNRT)` // Get MAC address for multi-function router [-> `ITS_TKNRT = "FatBroadBandRouter"`] |

**Block 2.2** — [INIT: flags] (L203–L205)

Initialize processing flags for order issuance and OLS check.

| # | Type | Code |
|---|------|------|
| 1 | SET | `odrHakkoFlg = false` // Flag indicating whether order was issued |
| 2 | SET | `olsNashiFlg = false` // Flag indicating OLS functionality is absent [ST1-2012-0000319] |

**Block 3** — [FOR LOOP: service order info] `for (int i = 0; svcOrderInfoList != null && i < svcOrderInfoList.size())` (L207)

Process each FTTH/Internet service order entry.

| # | Type | Code |
|---|------|------|
| 1 | SET | `svcOrderInfo = svcOrderInfoList.get(i)` // Get current service order info |

**Block 3.1** — [IF: isIllegalSvcOdr147] `if (isIllegalSvcOdr147(svcOrderInfo))` (L212)

Check if the order is service order type 147 (router connection info / registration) with missing required data. If illegal, skip processing (continue).

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `isIllegalSvcOdr147(svcOrderInfo)` // Check for required data deficiency in service order type 147 [ST1-2012-0000120] |
| 2 | EXEC | (continue) // Skip this iteration if illegal |

**Block 4** — [IF: svcOrderInfo not empty] `if (svcOrderInfo != null && !svcOrderInfo.isEmpty())` (L218)

Process the service order info if it contains data.

**Block 4.1** — [IF: svc_order_cd == "0A"] `if ("0A".equals(svc_order_cd))` (L226)

OLS functionality check: Only for service order code "0A" (FTTH service). Calls `EZM0411A010SC` to check if OLS (Optical Line Subscriber) functionality is present.

| # | Type | Code |
|---|------|------|
| 1 | SET | `svc_order_cd = (String) svcOrderInfo.get(SOI_SVC_ORDER_CD)` // Get service order code [-> `SOI_SVC_ORDER_CD = "svc_order_cd"`] |
| 2 | CALL | `inMapEZM0411A010 = editInMsgEZM0411A010(param, svcOrderInfo)` // Prepare input message for OLS check |
| 3 | CALL | `outMapEZM0411A010 = callSvcInter(handle, param, fixedText, inMapEZM0411A010)` // Call EZM0411A010SC |
| 4 | SET | `rsltMsgEZM0411A010List = outMapEZM0411A010.getCAANMsgList(EZM0411A010CBSMsg.EZM0411A010CBSMSG1LIST)` // Get result message list |
| 5 | IF | `rsltMsgEZM0411A010List != null && rsltMsgEZM0411A010List.length > 0` // Check results exist |

**Block 4.1.1** — [IF: OLS_KINO_UM == "0"] `if ("0".equals(rsltMsgEKK1041B001.getString(EZM0411A010CBSMsg1List.OLS_KINO_UM)))` (L232)

OLS functionality is absent — skip SOD transmission for this order and mark `olsNashiFlg`.

| # | Type | Code |
|---|------|------|
| 1 | SET | `rsltMsgEKK1041B001 = rsltMsgEZM0411A010List[0]` // Get first result message |
| 2 | SET | `olsNashiFlg = true` // Set flag: OLS functionality not present |

**Block 4.2** — [IF: !olsNashiFlg] `if (!olsNashiFlg)` (L237)

Execute SOD transmission only when OLS functionality is present (or when svc_order_cd != "0A").

| # | Type | Code |
|---|------|------|
| 1 | CALL | `inMapESC0041D010 = editInMsgESC0041D010(param, svcOrderInfo)` // Prepare input message for Internet service order receipt |
| 2 | CALL | `rsltMsg = callSvcInter(handle, param, fixedText, inMapESC0041D010)` // Call ESC0041D010SC to receive the service order |
| 3 | SET | `ukeDtm = rsltMsg.getString(ESC0041D010CBSMsg.SVC_ORDER_UK_DTM)` // Get service order receipt timestamp |
| 4 | SET | `odrHakkoJokenInfo.put(SVC_ODR_UK_DTM, ukeDtm)` // Store receipt timestamp [-> `SVC_ODR_UK_DTM = "ServiceOrderUketukeDtm"`] |

**Block 4.2.1 (ELSE)** — OLS absent: set current timestamp as placeholder (ANK-1578-00-00 multi-function router support) (L244)

| # | Type | Code |
|---|------|------|
| 1 | SET | `odrHakkoJokenInfo.put(SVC_ODR_UK_DTM, JCCBPCommon.getSysDateTimeStamp())` // Set system timestamp as receipt time |

**Block 4.3** — [SET] (L249)

Mark that an order was issued.

| # | Type | Code |
|---|------|------|
| 1 | SET | `odrHakkoFlg = true` // Order issuance flag set to true |

**Block 5** — [FOR LOOP: telephone service order info] `for (int i = 0; telSvcOrderInfoList != null && i < telSvcOrderInfoList.size())` (L254)

Process each telephone service order entry.

| # | Type | Code |
|---|------|------|
| 1 | SET | `telSvcOrderInfo = telSvcOrderInfoList.get(i)` // Get current telco service order info |

**Block 5.1** — [IF: telSvcOrderInfo not empty] `if (telSvcOrderInfo != null && !telSvcOrderInfo.isEmpty())` (L258)

Process the telephone service order info if it contains data.

**Block 5.2** — [SET: extract codes] (L263–L264)

Extract telephone service order code and request type code.

| # | Type | Code |
|---|------|------|
| 1 | SET | `teSvcOdrCd = (String) telSvcOrderInfo.get(TSOI_TEL_SVC_ORDER_CD)` // Get telephone service order code [-> `TSOI_TEL_SVC_ORDER_CD = "tel_svc_order_cd"`] |
| 2 | SET | `yokyuSbtCd = (String) telSvcOrderInfo.get(TSOI_YOKYU_SBT_CD)` // Get request type code [-> `TSOI_YOKYU_SBT_CD = "yokyu_sbt_cd"`] |
| 3 | SET | `updTrnId = ""` // Initialize update transaction ID [ANK-2113-00-00] |

**Block 5.3** — [IF: telco order type check] `if (("20".equals(teSvcOdrCd) || "26".equals(teSvcOdrCd)) && ("02".equals(yokyuSbtCd) || "04".equals(yokyuSbtCd) || "03".equals(yokyuSbtCd) || "08".equals(yokyuSbtCd)))` (L271–L276)

If the telephone service order is for FTTH (`"20"`) or multi-function router (`"26"`) AND the request type is new (`"02"`), change (`"03"`), cancellation (`"04"`), or deletion (`"08"`), then first consult order setup settings to get the update transaction ID.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `inMapEKK1081B001 = editInMsgEKK1081B001(param, telSvcOrderInfo)` // Prepare input for order setup consultation |
| 2 | CALL | `outMapEKK1081B001 = callSvcInter(handle, param, fixedText, inMapEKK1081B001)` // Call EKK1081B001CBS |
| 3 | SET | `rsltMsgEKK1081B001List = outMapEKK1081B001.getCAANMsgList(EKK1081B001CBSMsg.EKK1081B001CBSMSG1LIST)` // Get result list |
| 4 | IF | `rsltMsgEKK1081B001List != null && rsltMsgEKK1081B001List.length > 0` |
| 5 | SET | `rsltMsgEKK1081B001 = rsltMsgEKK1081B001List[0]` // Get first result |
| 6 | SET | `updTrnId = rsltMsgEKK1081B001.getString(EKK1081B001CBSMsg1List.UPD_TRN_ID)` // Get update transaction ID [ANK-2113-00-00] |

**Block 5.4** — [SET: address change order detail code] (L282–L289)

Retrieve order detail code for address change processing.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `updOdrDtlCd = getOdrDtlCdForAdChg(handle, param, fixedText, teSvcOdrCd, yokyuSbtCd, updTrnId, telSvcOrderInfo)` // Get order detail code for address change [OM-2020-0000318] |

**Block 5.5** — [CALL: execute telephone service order] (L293)

Execute the telephone service order receipt with update transaction ID and order detail code.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `inMapESC0051D010 = editInMsgESC0051D010(param, telSvcOrderInfo, updTrnId, updOdrDtlCd)` // Prepare input with update transaction ID and order detail code |
| 2 | CALL | `rsltMsg = callSvcInter(handle, param, fixedText, inMapESC0051D010)` // Call ESC0051D010SC |
| 3 | SET | `ukeDtm = rsltMsg.getString(ESC0051D010CBSMsg.TEL_SVC_ORDER_UK_DTM)` // Get telephone service order receipt timestamp |
| 4 | SET | `odrHakkoJokenInfo.put(SVC_ODR_UK_DTM, ukeDtm)` // Store receipt timestamp |
| 5 | SET | `odrHakkoFlg = true` // Mark order issued |

**Block 6** — [FOR LOOP: mobile order info] `for (int i = 0; mobileOrderInfoList != null && i < mobileOrderInfoList.size())` (L310)

Process each mobile service order entry.

| # | Type | Code |
|---|------|------|
| 1 | SET | `mobileOrderInfo = mobileOrderInfoList.get(i)` // Get current mobile order info |

**Block 6.1** — [IF: mobileOrderInfo not empty] `if (mobileOrderInfo != null && !mobileOrderInfo.isEmpty())` (L314)

Process the mobile service order info if it contains data.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `inMapESC0031D010 = editInMsgESC0031D010(param, mobileOrderInfo)` // Prepare input message for mobile service order receipt |
| 2 | CALL | `rsltMsg = callSvcInter(handle, param, fixedText, inMapESC0031D010)` // Call ESC0031D010SC |
| 3 | SET | `ukeDtm = rsltMsg.getString(ESC0031D010CBSMsg.MOBILE_ORDER_UK_DTM)` // Get mobile order receipt timestamp |
| 4 | SET | `odrHakkoJokenInfo.put(SVC_ODR_UK_DTM, ukeDtm)` // Store receipt timestamp |
| 5 | SET | `odrHakkoFlg = true` // Mark order issued |

**Block 7** — [IF: odrHakkoFlg] `if (odrHakkoFlg)` (L325)

If any order was issued (at least one service order was processed successfully), proceed with order setup settings update and order issuance condition change. This only runs when service control needs to be linked with order information.

**Block 7.1** — [SET: extract order set info list] (L329)

| # | Type | Code |
|---|------|------|
| 1 | SET | `odrSetInfoList = (ArrayList) trgtDataInfo.get(ODR_SET_INFO_LIST)` // Extract order setup info list [-> `ODR_SET_INFO_LIST = "odr_set_info_list"`] |

**Block 7.2** — [FOR LOOP: order set info] `for (int i = 0; odrSetInfoList != null && i < odrSetInfoList.size())` (L330)

Process each order setup info entry.

| # | Type | Code |
|---|------|------|
| 1 | SET | `odrSetInfo = odrSetInfoList.get(i)` // Get current order set info |
| 2 | SET | `odrHakkoJokenCd = (String) odrSetInfo.get(OSI_ODR_HAKKO_JOKEN_CD)` // Get order issuance condition code [-> `OSI_ODR_HAKKO_JOKEN_CD = "odr_hakko_joken_cd"`] |

**Block 7.3** — [IF: exclude specific condition codes] `if (!(ODR_HAKKO_JOKEN_CD_TEL_SVC_START_JOKEN.equals(odrHakkoJokenCd) || ODR_HAKKO_JOKEN_CD_KKTK_START_JOKEN.equals(odrHakkoJokenCd) || ODR_HAKKO_JOKEN_CD_KKTK_END_JOKEN.equals(odrHakkoJokenCd)) && !olsNashiFlg)` (L338–L342)

Skip order setup update if the order issuance condition is a special type (telephone service start, equipment delivery start/end) OR if OLS is absent. Only update when the condition code is NOT one of these special types and OLS functionality is present.

| # | Type | Code |
|---|------|------|
| 1 | SET | `orderSbtCd = (String) odrSetInfo.get(OSI_ORDER_SBT_CD)` // Get order type code [-> `OSI_ORDER_SBT_CD = "order_sbt_cd"`] |
| 2 | SET | `svcOrderCd = (String) odrSetInfo.get(OSI_SVC_ORDER_CD)` // Get service order code [-> `OSI_SVC_ORDER_CD = "svc_order_cd"`] |
| 3 | SET | `ordSetPattern = getOrdSetUpdJdg(orderSbtCd, svcOrderCd)` // Determine order setup update pattern |

**Block 7.4** — [IF: ordSetPattern >= 1] `if (ordSetPattern >= 1)` (L349)

If the order setup pattern is 1 or higher (includes the multi-function router expansion from ANK-1578-00-00 that removed the upper bound `<= 9`), execute order setup consultation.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `inMapEKK1041B001 = editInMsgEKK1041B001(param, odrSetInfo, ordSetPattern)` // Prepare input for order setup consultation |
| 2 | CALL | `outMapEKK1041B001 = callSvcInter(handle, param, fixedText, inMapEKK1041B001)` // Call EKK1041B001SC |
| 3 | SET | `rsltMsgEKK1041B001List = outMapEKK1041B001.getCAANMsgList(EKK1041B001CBSMsg.EKK1041B001CBSMSG1LIST)` // Get result list |
| 4 | IF | `rsltMsgEKK1041B001List != null && rsltMsgEKK1041B001List.length > 0` |
| 5 | SET | `rsltMsgEKK1041B001 = rsltMsgEKK1041B001List[0]` // Get first result |

**Block 7.5** — [IF: rsltMsgEKK1041B001 != null] `if (rsltMsgEKK1041B001 != null)` (L363)

Branch based on whether the consultation found existing order setup data.

**Block 7.5.1** — [CALL: update order setup] (L365)

Order setup already exists — execute update.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `inMapEKK1041C010 = editInMsgEKK1041C010(param, odrSetInfo, rsltMsgEKK1041B001)` // Prepare input for order setup change |
| 2 | CALL | `callSvcInter(handle, param, fixedText, inMapEKK1041C010)` // Call EKK1041C010CBS to update existing order setup |

**Block 7.5.2 (ELSE)** — [CALL: register new order setup] (L371)

Order setup does not exist — execute new registration.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `inMapEKK1041D010 = editInMsgEKK1041D010(param, odrSetInfo)` // Prepare input for order setup registration |
| 2 | CALL | `callSvcInter(handle, param, fixedText, inMapEKK1041D010)` // Call EKK1041D010CBS to register new order setup |

**Block 8** — [CALL: order issuance condition change] (L380–L382)

After all order setup updates are done, update the order issuance conditions for the processed target data.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `inMapEKK1081C010 = editInMsgEKK1081C010(param, odrHakkoJokenInfo)` // Prepare input for order issuance condition change |
| 2 | CALL | `ekk1081c010Msg = callSvcInter(handle, param, fixedText, inMapEKK1081C010)` // Call EKK1081C010CBS |

**Block 8.1** — [SET: save updated timestamp] (L386–L390)

Preserve the updated year/month/day/time/minutes/seconds for the order issuance condition.

| # | Type | Code |
|---|------|------|
| 1 | SET | `odrHakkoJokenNo = (String) odrHakkoJokenInfo.get(OHJI_ODR_HAKKO_JOKEN_NO)` // Get order issuance condition number [-> `OHJI_ODR_HAKKO_JOKEN_NO = "odr_hakko_joken_no"`] |
| 2 | SET | `updDtm = ekk1081c010Msg.getString(EKK1081C010CBSMsg.UPD_DTM)` // Get updated timestamp |
| 3 | EXEC | `newerUpdDtm.put(odrHakkoJokenNo, updDtm)` // Store mapping in instance field |

**Block 9** — [FINAL] (L394–L398)

Set the return code to `"0000"` indicating normal end, and return the parameter object.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `param.setControlMapData(SCControlMapKeys.RETURN_CODE, "0000")` // Set success return code |
| 2 | RETURN | `return param` // Return parameter with updated data |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| SOD | Acronym | Service Order Data — telecom order fulfillment entity representing service contract line items sent to the service control system |
| FTTH | Business term | Fiber To The Home — fiber-optic broadband internet service |
| OLS | Acronym | Optical Line Subscriber — optical line termination functionality managing the fiber connection between the exchange and customer premises |
| SC | Acronym | Service Component — a service layer class (e.g., ESC0041D010SC, EKK1041B001SC) that handles specific business operations |
| CBS | Acronym | Common Business System — the backend CBS message class (e.g., EKK1081B001CBSMsg) defining request/response message structures |
| CC | Acronym | Common Component — a shared business logic component class (e.g., JKKSodSendCC) reused across screens and batch jobs |
| `svc_order_cd` | Field | Service order code — classifies the service order type; `"0A"` indicates FTTH service triggering OLS check |
| `tel_svc_order_cd` | Field | Telephone service order code — `"20"` for FTTH, `"26"` for multi-function router |
| `yokyu_sbt_cd` | Field | Request type code — `"02"` (new), `"03"` (change), `"04"` (cancellation), `"08"` (deletion) |
| `svc_order_info_list` | Field | List of service (FTTH) order information — contains one map per FTTH order to process |
| `tel_svc_order_info_list` | Field | List of telephone service order information — contains one map per telco order to process |
| `mobile_order_info_list` | Field | List of mobile order information — contains one map per mobile order to process |
| `trgt_data_list` | Field | List of target data groups — top-level grouping of orders to be transmitted |
| `odr_hakko_joken_info` | Field | Order issuance condition information — contains order issuance condition number, code, and receipt timestamp |
| `odr_set_info_list` | Field | Order setup information list — contains order setup data for updating registration when orders are processed |
| `svc_order_uketuke_dtm` | Field | Service order receipt date/time stamp — timestamp when the service order was received/processed by the system |
| `odr_hakko_joken_cd` | Field | Order issuance condition code — `"01"` (order issuance), `"11"` (telephone service start), `"12"` (fund deposit), `"13"` (equipment delivery start), `"14"` (equipment delivery end) |
| `upd_dtm` | Field | Updated date/time stamp — timestamp updated by EKK1081C010CBS after order condition change |
| `newerUpdDtm` | Field | Map storing order issuance condition number → updated timestamp mappings, for later comparison in concurrent processing |
| `mac_address` | Field | MAC address of customer premises equipment (router/ONT) — enriched during processing for service identification |
| `FatBroadBandRouter` | Field | Multi-function router device type identifier used in MAC address retrieval |
| `ols_kino_um` | Field | OLS functionality presence flag — `"0"` means OLS not present, other values mean OLS is active |
| KKSV0193 | Screen | K-Opticom screen operation that triggers SOD transmission from the business process |
| JBSbatKKSodSendReq | Batch | Batch job that prepares and queues SOD transmission requests |
| `ordSetPattern` | Field | Order setup update pattern — integer determined by `getOrdSetUpdJdg()` indicating the combination of order type and service order type for setup consultation |
| ANK-1578-00-00 | Change ID | Multi-function router support enhancement — added OLS check for telco orders and expanded ordSetPattern upper bound |
| ANK-2113-00-00 | Change ID | SOD issue countermeasure — modified telco service order handling with update transaction ID support |
| OM-2020-0000318 | Change ID | Address change confirmation — added order detail code retrieval for address change processing |
