# Business Logic — JBSbatKKBndWdtOvrSendPstCrd.setSodParam() [41 LOC]

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

## 1. Role

### JBSbatKKBndWdtOvrSendPstCrd.setSodParam()

This method constructs and structures the parameter map required to issue a **Service Order Data (SOD)** entity for **bandwidth restriction execution** (帯域制限実施). SOD is a telecom order fulfillment artifact that records and authorizes the execution of bandwidth control actions on a customer's service contract. Specifically, this method assembles a nested map containing SOD basic information (including the processing division code `011` meaning "bandwidth restriction execution") and the associated service contract number. It follows the **builder pattern**: it creates a hierarchy of `HashMap` objects — `sodKihonInfoMap` (basic info), `svcKeiInfoMap` (contract info) — nests them into `sodMap`, wraps that in `dataList`, and then places everything into `dataMap` under the CC (Common Component) title key `JKKHakkoSODCC`. The completed map is stored into the caller-provided `inputMap`, which is subsequently passed to `JCCBatchEsbInterface.invokeService()` by the caller's `execute()` method to trigger the actual SOD issuance service component. This method has no conditional branches; it is a pure parameter-assembly routine called unconditionally whenever the batch determines that a bandwidth restriction execution SOD must be issued.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["setSodParam(svcKeiNo, sysId, inputMap)"])

    START --> DECLARE["Declare local variables:
dataMap, dataList, sodMap,
sodKihonInfoMap, svcKeiInfoMap"]

    DECLARE --> SET_SYSID["SET sysid = sysId
-> sodKihonInfoMap"]

    SET_SYSID --> SET_SYORI["SET syori_div = SYORI_DIV_011
-> sodKihonInfoMap"]

    SET_SYORI --> SET_KIHON["SET sodKihonInfoMap -> sodMap
as sod_kihon_info"]

    SET_KIHON --> SET_SVC["SET svc_kei_no = svcKeiNo
-> svcKeiInfoMap"]

    SET_SVC --> SET_SVC_MAP["SET svcKeiInfoMap -> sodMap
as svc_kei_info"]

    SET_SVC_MAP --> ADD_LIST["ADD sodMap to dataList"]

    ADD_LIST --> SET_LIST["SET dataList -> dataMap
as trgt_data_list"]

    SET_LIST --> SET_FUNC["SET func_code = '1'
-> dataMap"]

    SET_FUNC --> PUT_INPUT["PUT dataMap -> inputMap
key = CC_TITLE_JKKHAKKOSODCC
('JKKHakkoSODCC')"]

    PUT_INPUT --> END_NODE(["Return"])
```

**Constant Resolution:**
- `SYORI_DIV_011 = "011"` — Processing division code for "bandwidth restriction execution" (帯域制限実施).
- `CC_TITLE_JKKHAKKOSODCC = "JKKHakkoSODCC"` — CC (Common Component) title key identifying the "Service Order Issuance" component (サービスオーダ発行).

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `svcKeiNo` | `String` | Service contract number — the unique identifier of the customer's service contract line item to which the bandwidth restriction SOD applies. |
| 2 | `sysId` | `String` | System ID — identifies the originating system (used in SOD basic info for audit/traceability). |
| 3 | `inputMap` | `HashMap<String, Object>` | The caller's parameter map into which the fully structured SOD data is placed. This map is later passed to the ESB service invocation (`JCCBatchEsbInterface.invokeService`). |

**Instance fields read:** None. This method is a pure data-assembly routine with no dependency on instance state.

## 4. CRUD Operations / Called Services

This method does **not** directly invoke any database queries, insert/update/delete operations, or external SC (Service Component) methods. It performs pure parameter construction — building nested `HashMap` structures and populating the `inputMap`. The actual SOD issuance is performed downstream by `JCCBatchEsbInterface.invokeService()` called by the caller `execute()` method, which delegates to the `JKKHakkoSODCC` common component.

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| (N/A) | *(none)* | — | — | No direct CRUD. This method only builds the parameter map `dataMap` containing `trgt_data_list` and `func_code`, then stores it into `inputMap` under key `JKKHakkoSODCC`. The downstream CC component `JKKHakkoSODCC` performs the actual SOD creation. |

**Downstream service chain (called by `execute()` using this method's output):**

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| C | `JCCBatchEsbInterface.invokeService()` | `JKKHakkoSODCC` | SOD (Service Order Data entity) | Common Component — Service Order Issuance. Creates the SOD record for bandwidth restriction execution with processing division `011`. |

## 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: JBSbatKKBndWdtOvrSendPstCrd.execute() | `execute()` → `setSodParam(svcKeiNo, sysId, inputMap)` | `JCCBatchEsbInterface.invokeService() [C] SOD (JKKHakkoSODCC)` |

**Call context:** The caller `execute()` method (line 181) extracts `svcKeiNo` and `sysId` from the inbound interface map, determines the send category (`sendKbn`) from the notification message, and if the send category indicates "actual execution" (`SEND_KBN_JISHI = "2"`) and it is not the first day of the month, it constructs an `inputMap` and invokes `setSodParam()` to populate it with SOD parameters before calling `JCCBatchEsbInterface.invokeService()`.

## 6. Per-Branch Detail Blocks

> **Block 1** — [VARIABLE DECLARATION] (L484)
> Declares and initializes all local HashMap and ArrayList structures for building the nested SOD parameter hierarchy.

| # | Type | Code |
|---|------|------|
| 1 | SET | `dataMap = new HashMap<String, Object>()` // Top-level data container |
| 2 | SET | `dataList = new ArrayList<Map<String, Object>>()` // List holding data entries |
| 3 | SET | `sodMap = new HashMap<String, Object>()` // SOD data map (holds basic info + contract info) |
| 4 | SET | `sodKihonInfoMap = new HashMap<String, Object>()` // SOD basic info map |
| 5 | SET | `svcKeiInfoMap = new HashMap<String, Object>()` // Service contract info map |

> **Block 2** — [PROCESSING] "SOD基本情報を設定する" (Set SOD basic information) (L494-L502)
> Populates the SOD basic info map with the system ID and processing division code, then nests it into the SOD map.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `sodKihonInfoMap.put("sysid", sysId)` | Set the system ID into basic info [-> sysid] |
| 2 | SET | `sodKihonInfoMap.put("syori_div", SYORI_DIV_011)` | Set processing division [-> SYORI_DIV_011 = "011" (Bandwidth Restriction Execution)] |
| 3 | SET | `sodMap.put("sod_kihon_info", sodKihonInfoMap)` | Nest basic info into SOD map [-> sod_kihon_info] |

> **Block 3** — [PROCESSING] "サービス契約情報を設定する" (Set service contract information) (L506-L511)
> Populates the service contract info map with the service contract number and nests it into the SOD map.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `svcKeiInfoMap.put("svc_kei_no", svcKeiNo)` | Set service contract number [-> svc_kei_no] |
| 2 | SET | `sodMap.put("svc_kei_info", svcKeiInfoMap)` | Nest contract info into SOD map [-> svc_kei_info] |

> **Block 4** — [PROCESSING] "SOD情報をリストに設定する" (Set SOD info into list) (L515)
> Adds the fully populated SOD map to the data list.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | EXEC | `dataList.add(sodMap)` | Append SOD map (containing basic info + contract info) to data list |

> **Block 5** — [PROCESSING] "リストをデータマップに設定する" (Set list into data map) (L519-L521)
> Wraps the data list into the data map with the target data list key and sets the function code.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `dataMap.put("trgt_data_list", dataList)` | Set data list into data map [-> trgt_data_list] |
| 2 | SET | `dataMap.put("func_code", "1")` | Set function code [-> "1"] |

> **Block 6** — [PROCESSING] "CCのタイトルをキーにデータを格納" (Store data with CC title as key) (L522)
> Places the complete data map into the caller's `inputMap` using the SOD issuance CC title as the key. This is the final step — the caller will then invoke `JCCBatchEsbInterface.invokeService()` with this `inputMap`.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `inputMap.put(CC_TITLE_JKKHAKKOSODCC, dataMap)` | Store data map into inputMap [-> CC_TITLE_JKKHAKKOSODCC = "JKKHakkoSODCC"] |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `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 purposes |
| `syori_div` | Field | Processing division code — classifies the type of processing (e.g., "011" for bandwidth restriction execution) |
| `sod_kihon_info` | Field | SOD basic information — nested map containing system ID and processing division |
| `svc_kei_info` | Field | Service contract information — nested map containing the service contract number |
| `trgt_data_list` | Field | Target data list — key in the data map holding the list of SOD data entries |
| `func_code` | Field | Function code — identifies the type of function being invoked (e.g., "1" for SOD issuance) |
| SOD | Acronym | Service Order Data — telecom order fulfillment entity that records and authorizes service changes |
| JKKHakkoSODCC | Component | Service Order Issuance Common Component — the CC component responsible for creating SOD records |
| SYORI_DIV_011 | Constant | Processing division code "011" — Bandwidth Restriction Execution (帯域制限実施) |
| CC_TITLE_JKKHAKKOSODCC | Constant | Common Component title "JKKHakkoSODCC" — key identifying the SOD issuance component |
| SEND_KBN_JISHI | Constant | Send category "2" — Actual execution notification (実施通知) |
| SEND_KBN_YOKOKU | Constant | Send category "1" — Warning notification (警告通知) |
| SEND_KBN_NONE | Constant | Send category "0" — No send / 2-month consecutive (2ヶ月連続) |
| MSG_STRING_JSHI | Constant | Message prefix string "実施" — indicates an execution notification |
| USECASE_ID_KKSV0571 | Constant | Use case ID "KKSV0571" — Bandwidth restriction execution use case |
| KK_T_SVC_KEI | DB Table | Service contract table |
| KK_T_SVC_KEI_UCWK | DB Table | Service contract detail table |
| KK_T_OP_SVC_KEI | DB Table | Option service contract table |
| KK_T_FTTH_TSRCK_JSK | DB Table | FTTH communication volume overuse record table |
| FTTH | Business term | Fiber To The Home — fiber-optic internet service |
| JBSbatKKIFM206 | Interface | Batch input/output interface definition class for message 206 (bandwidth overuse notification) |
| JCCBatchEsbInterface | Utility | ESB (Enterprise Service Bus) interface for batch service invocation |
