# Business Logic — JBSbatKKBndWdtOvrSendMl.setSodParam() [42 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.business.service.JBSbatKKBndWdtOvrSendMl` |
| Layer | Service (Batch Service Component) |
| Module | `service` (Package: `eo.business.service`) |

## 1. Role

### JBSbatKKBndWdtOvrSendMl.setSodParam()

This method prepares the parameter structure required for **Service Order Data (SOD) issuance**, a critical step in the domain control (bandwidth limit) notification batch processing workflow. When a customer exceeds their allocated communication volume, the system issues an SOD (Service Order Data) to formally record the bandwidth restriction action — this method assembles the structured request payload that will be dispatched to the SOD issuance service component.

The method implements the **Builder pattern**, constructing a nested map hierarchy (`sodMap`) containing SOD basic information (`sod_kihon_info`) and service contract information (`svc_kei_info`), then wrapping it inside a transport container (`dataMap`) with a function code. This container is placed into the caller's `inputMap` under a service-specific title key (`JKKHakkoSODCC`), enabling the caller to route the prepared data to the appropriate downstream service via the ESB interface.

Its role in the larger system is that of a **data assembler / payload builder** — it is a private helper method that transforms flat service contract identifiers into the structured format expected by the SOD issuance service. It is exclusively called from `execute()` within the same class when the dispatch category is "implementation notice" (`SEND_KBN_JISHI = "2"`) and the processing day is not the first of the month (per change OM-2015-0000836, which disables band limit enforcement on month-start dates).

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["setSodParam(svcKeiNo, sysId, inputMap)"])
    STEP1["Create dataMap, dataList, sodMap,
sodKihonInfoMap, svcKeiInfoMap"]
    STEP2["Set sodKihonInfoMap:
  sysid = sysId
  syori_div = SYORI_DIV_011 = 011"]
    STEP3["Set sodMap:
  sod_kihon_info = sodKihonInfoMap"]
    STEP4["Set svcKeiInfoMap:
  svc_kei_no = svcKeiNo"]
    STEP5["Set sodMap:
  svc_kei_info = svcKeiInfoMap"]
    STEP6["Add sodMap to dataList"]
    STEP7["Set dataMap:
  trgt_data_list = dataList
  func_code = 1"]
    STEP8["Put dataMap into inputMap:
  CC_TITLE_JKKHAKKOSODCC = JKKHakkoSODCC"]
    END_NODE(["Return void"])

    START --> STEP1
    STEP1 --> STEP2
    STEP2 --> STEP3
    STEP3 --> STEP4
    STEP4 --> STEP5
    STEP5 --> STEP6
    STEP6 --> STEP7
    STEP7 --> STEP8
    STEP8 --> END_NODE
```

**Processing summary:** This method performs purely sequential map construction with no conditional branches. It:

1. Creates five local `HashMap` / `ArrayList` structures to build the nested payload.
2. Populates `sodKihonInfoMap` with the system ID and processing division code `011` (band limit implementation processing division).
3. Embeds `sodKihonInfoMap` into `sodMap` under the key `sod_kihon_info`.
4. Populates `svcKeiInfoMap` with the service contract number and embeds it into `sodMap` under the key `svc_kei_info`.
5. Adds `sodMap` to the `dataList` list.
6. Wraps `dataList` into `dataMap` under the key `trgt_data_list` with a hardcoded function code of `"1"`.
7. Inserts the complete `dataMap` into the caller's `inputMap` under the title key `JKKHakkoSODCC`, making it available for the ESB service dispatch.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `svcKeiNo` | `String` | Service contract number — the unique identifier for a customer's service contract line item. Used to associate the SOD (Service Order Data) with the specific customer account subject to the bandwidth restriction. |
| 2 | `sysId` | `String` | System ID — identifies the originating system within the K-Opticom customer core system. Stored in the SOD basic information for audit and traceability purposes. |
| 3 | `inputMap` | `HashMap<String, Object>` | Input data map passed by the caller (`execute()`). The method writes the fully constructed SOD parameter payload into this map under the key `JKKHakkoSODCC`, so the caller can retrieve it and dispatch it to the SOD issuance service via `JCCBatchEsbInterface.invokeService`. |

**Instance fields read:** None. This method is purely stateless — it does not read any instance fields.

## 4. CRUD Operations / Called Services

This method does not directly call any SC (Service Component), CBS (Common Business Service), DAO, or database methods. It is a pure data-assembly helper that constructs an in-memory parameter map. The downstream SOD issuance service (`JKKHakkoSODCC`) receives this data via the ESB interface invoked by the caller (`execute()`).

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| — | *(none — pure in-memory map builder)* | — | — | This method constructs the SOD parameter payload in memory only. No direct DB access or service call. |

**Indirect invocation chain (via caller `execute()`):**
- `execute()` calls `JCCBatchEsbInterface.invokeService(super.commonItem, paramMap, inputMap, outputMap)` where `inputMap` contains the SOD payload prepared by this method. The `JKKHakkoSODCC` service component is invoked, which internally performs database reads/writes on SOD-related tables.

## 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: —

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Batch: JBSbatKKBndWdtOvrSendMl | `execute(JBSbatServiceInterfaceMap)` -> `setSodParam(svcKeiNo, sysId, inputMap)` | `JCCBatchEsbInterface.invokeService` -> SOD issuance service (JKKHakkoSODCC) [indirect R/U] |

**Call chain detail:**
- `JBSbatKKBndWdtOvrSendMl.execute()` (the batch's main processing method) constructs an `inputMap` with `svc_kei_no` and `sysid` from the inbound service interface, then calls `setSodParam(svcKeiNo, sysId, inputMap)` to populate the SOD parameter payload.
- After `setSodParam` returns, `execute()` passes the populated `inputMap` to `JCCBatchEsbInterface.invokeService()` which dispatches to the `JKKHakkoSODCC` service component for SOD issuance.

## 6. Per-Branch Detail Blocks

This method contains no conditional branches (no if/else, switch, or loops). All operations are sequential.

---

**Block 1** — [SET] `(local variable creation)` (L698)

> Initializes five local data structures to build the nested SOD parameter hierarchy.

| # | Type | Code |
|---|------|------|
| 1 | SET | `dataMap = new HashMap<String, Object>()` // Top-level transport container |
| 2 | SET | `dataList = new ArrayList<Map<String, Object>>()` // List to hold SOD map(s) |
| 3 | SET | `sodMap = new HashMap<String, Object>()` // SOD data container |
| 4 | SET | `sodKihonInfoMap = new HashMap<String, Object>()` // SOD basic information sub-map |
| 5 | SET | `svcKeiInfoMap = new HashMap<String, Object>()` // Service contract information sub-map |

---

**Block 2** — [SET] `(Set SOD basic information)` (L707–710)

> Populates the SOD basic information map with system ID and processing division code. The processing division `011` identifies this as "band limit implementation" processing.

| # | Type | Code |
|---|------|------|
| 1 | SET | `sodKihonInfoMap.put("sysid", sysId)` // Store the system ID for audit traceability |
| 2 | SET | `sodKihonInfoMap.put("syori_div", SYORI_DIV_011)` [-> SYORI_DIV_011="011"] // Processing division code: 011 = Band Limit Implementation |

---

**Block 3** — [SET] `(Set SOD basic info into SOD map)` (L712)

> Embeds the SOD basic information map into the main SOD map under the key `sod_kihon_info`.

| # | Type | Code |
|---|------|------|
| 1 | SET | `sodMap.put("sod_kihon_info", sodKihonInfoMap)` // Nested: SOD basic info -> SOD data |

---

**Block 4** — [SET] `(Set service contract information)` (L718–720)

> Populates the service contract info map with the contract number and embeds it into the SOD map.

| # | Type | Code |
|---|------|------|
| 1 | SET | `svcKeiInfoMap.put("svc_kei_no", svcKeiNo)` // Store the service contract number |
| 2 | SET | `sodMap.put("svc_kei_info", svcKeiInfoMap)` // Nested: Service contract info -> SOD data |

---

**Block 5** — [SET] `(Set SOD data into list)` (L724)

> Wraps the assembled SOD map inside a list, which is the expected structure for the transport container's target data field.

| # | Type | Code |
|---|------|------|
| 1 | SET | `dataList.add(sodMap)` // Add the SOD data to the list |

---

**Block 6** — [SET] `(Set transport container data)` (L728–731)

> Populates the top-level `dataMap` with the target data list and a hardcoded function code.

| # | Type | Code |
|---|------|------|
| 1 | SET | `dataMap.put("trgt_data_list", dataList)` // Transport container: target data list |
| 2 | SET | `dataMap.put("func_code", "1")` // Function code: "1" (SOD issuance function) |

---

**Block 7** — [SET] `(Set CC title key and store into inputMap)` (L734–737)

> Places the complete transport container into the caller's `inputMap` under the service component title key `JKKHakkoSODCC`, making it available for the ESB dispatch in the caller's `execute()` method.

| # | Type | Code |
|---|------|------|
| 1 | SET | `inputMap.put(CC_TITLE_JKKHAKKOSODCC, dataMap)` [-> CC_TITLE_JKKHAKKOSODCC="JKKHakkoSODCC"] // Store payload under SOD issuance title key for ESB dispatch |

---

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| SOD | Acronym | Service Order Data — the formal order record created when a bandwidth restriction action is issued to a customer |
| JKKHakkoSODCC | Constant | CC (Common Component) title key "JKKHakkoSODCC" — identifies the Service Order Issuance common component for ESB routing |
| syori_div | Field | Processing division code — classifies the type of processing (e.g., "011" = Band Limit Implementation) |
| SYORI_DIV_011 | Constant | Processing division code value "011" — represents the "band limit implementation" processing type |
| svc_kei_no | Field | Service contract number — unique identifier for a customer's service contract line item |
| sysid | Field | System ID — identifies the originating system for audit and traceability |
| trgt_data_list | Field | Target data list — the transport field in the data map containing the list of SOD payloads |
| func_code | Field | Function code — identifies the type of function being invoked (here, "1" = SOD issuance) |
| JBSbatKKBndWdtOvrSendMl | Class | Bandwidth Limit Excess Notification Mail Batch — a batch service that sends notification emails when customers exceed their allocated communication volume |
| SEND_KBN_JISHI | Constant | Dispatch category "2" — Implementation Notice (as opposed to "1" for Warning Notice) |
| KKSV0571 | Constant | User case ID for bandwidth limit implementation — identifies the user scenario that triggered this SOD issuance |
| ESB | Acronym | Enterprise Service Bus — middleware used for service-to-service communication (via `JCCBatchEsbInterface.invokeService`) |
| KK_T_SVC_KEI | Table | Service Contract table — stores customer service contract records |
| KK_T_FTTH_TSRCK_JSK | Table | FTTH Communication Volume Exceedance Record table — tracks fiber-to-the-home communication volume exceedance data |
