# Business Logic — JBSbatACTaiikiLmtTchiTrgtMake.makeInputMap() [19 LOC]

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

## 1. Role

### JBSbatACTaiikiLmtTchiTrgtMake.makeInputMap()

This method is the **data transformation entry point** for the **FTTH Bandwidth Exceedance Record Registration (Service)** batch process (`JBSbatACTaiikiLmtTchiTrgtMake`). In Japanese: ＦＴＴＨ通信量超過実績登録（サービス）情報作成 — it constructs the input data map required to register a customer whose fiber-to-the-home (FTTH) internet usage has exceeded their contracted bandwidth limit.

The method implements a **mapping/assembly pattern**: it extracts specific business fields from an incoming `JBSbatServiceInterfaceMap` (which carries the batch job's runtime context and data) and assembles them into a `HashMap<String, String>` with well-defined keys. This input map is subsequently consumed by downstream batch processing steps (such as `addTsrckJsk`) that perform the actual exceedance logic.

Two of the five extracted fields are supplemented with **hardcoded constant values**: the "domain control implementation flag" is always set to `"0"` (not implemented), and the "function code" is always set to `"1"`, indicating this is the standard registration function path.

This method has **no conditional branches** — it performs a straightforward, deterministic extraction and re-keying of data. Its role in the larger system is to **normalize the input interface** into the format expected by the batch's internal processing pipeline, acting as a data adapter between the batch framework's service interface and the domain-specific processing logic.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["makeInputMap(inMap)"])
    S1["Print debug log - Start [S][makeInputMap]"]
    S2["Create new HashMap<String, String> inputMap"]
    S3["inputMap.put('svc_kei_no', inMap.getString(SVKEI_NO))<br/>Service Contract Number"]
    S4["inputMap.put('pcrs_cd', inMap.getString(PCRS_CD))<br/>Price Cost Code"]
    S5["inputMap.put('pplan_cd', inMap.getString(PRC_SVC_CD))<br/>Price Service Cost Code"]
    S6["inputMap.put('ftth_tushin_use_ym', inMap.getString(RIYOU_YM))<br/>FTTH Communication Usage YearMonth"]
    S7["inputMap.put('tik_ctl_jssi_zm_flg', ZUMI_FLG_MI)<br/>Domain Control Implementation Flag = '0' (Not Implemented)"]
    S8["inputMap.put('func_code', '1')<br/>Function Code"]
    S9["Print debug log - inputMap content"]
    S10["Print debug log - End [E][makeInputMap]"]
    S11["Return inputMap"]

    START --> S1
    S1 --> S2
    S2 --> S3
    S3 --> S4
    S4 --> S5
    S5 --> S6
    S6 --> S7
    S7 --> S8
    S8 --> S9
    S9 --> S10
    S10 --> S11
```

**Constant Resolution:**

| Constant | Resolved Value | Business Meaning |
|----------|---------------|------------------|
| `JBSbatACIFM214.SVKEI_NO` | `"SVKEI_NO"` | Key name for Service Contract Number |
| `JBSbatACIFM214.PCRS_CD` | `"PCRS_CD"` | Key name for Price Cost Code |
| `JBSbatACIFM214.PRC_SVC_CD` | `"PRC_SVC_CD"` | Key name for Price Service Cost Code |
| `JBSbatACIFM214.RIYOU_YM` | `"RIYOU_YM"` | Key name for FTTH Communication Usage Year/Month |
| `JACStrConst.ZUMI_FLG_MI` | `"0"` | Flag for "not yet implemented" — domain control not yet applied |

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `inMap` | `JBSbatServiceInterfaceMap` | The batch framework's runtime service interface map carrying the **customer's service contract data** for the FTTH exceedance registration batch. This map contains pre-populated key-value pairs keyed by constants from `JBSbatACIFM214`, including the service contract number, price cost code, price service code, and usage period — all necessary to identify which customer's bandwidth exceedance record is being registered. |

**Instance fields / external state read:**

| No | Field | Source | Business Description |
|----|-------|--------|---------------------|
| 1 | `super.logPrint` | `JBSbatBusinessService` (parent class) | Debug log print stream inherited from the batch business service base class, used for emitting structured debug log entries |

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `JACbatDebugLogUtil.printDebugLog` | JACbatDebugLog | - | Prints debug log entry marking method start `[S][makeInputMap]` |
| R | `JBSbatServiceInterfaceMap.getString` | - | - | Reads string value from the service interface map by key (called 4 times for SVKEI_NO, PCRS_CD, PRC_SVC_CD, RIYOU_YM) |
| - | `JACbatDebugLogUtil.printDebugLog` | JACbatDebugLog | - | Prints debug log entry with the constructed inputMap contents |
| - | `JACbatDebugLogUtil.printDebugLog` | JACbatDebugLog | - | Prints debug log entry marking method end `[E][makeInputMap]` |

**Note:** This method is a pure data transformation / mapping method — it reads data from the input map and writes to an output map. It performs **no database operations** (no C/R/U/D) and **no calls to other service components (SC/CBS)**. All data is sourced from the in-memory `JBSbatServiceInterfaceMap` parameter.

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Batch: `JBSbatACTaiikiLmtTchiTrgtMake.execute()` | `execute()` → `makeInputMap(inMap)` | `printDebugLog [-]` ×3, `getString [R]` ×4 |

**Description:** The only direct caller is the batch class's own `execute()` method, which orchestrates the FTTH bandwidth exceedance record registration batch job. The `execute()` method prepares the input data and invokes `makeInputMap()` to build the standardized input map, which is then passed to downstream processing methods such as `addTsrckJsk()`. No screen (KKSV*) or external CBS entry points call this method directly — it is an internal batch utility method.

## 6. Per-Branch Detail Blocks

This method has **no conditional branches** (no if/else, switch, loops, or try/catch). It executes a linear sequence of operations.

**Block 1** — LINEAR EXECUTION (no branching) (L262)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `JACbatDebugLogUtil.printDebugLog(super.logPrint, "[S][makeInputMap]")` // Print debug log: method start |
| 2 | SET | `HashMap<String, String> inputMap = new HashMap<String, String>()` // Create empty output map |
| 3 | SET | `inputMap.put("svc_kei_no", inMap.getString(JBSbatACIFM214.SVKEI_NO))` // Extract Service Contract Number `[SVKEI_NO="SVKEI_NO"]` |
| 4 | SET | `inputMap.put("pcrs_cd", inMap.getString(JBSbatACIFM214.PCRS_CD))` // Extract Price Cost Code `[PCRS_CD="PCRS_CD"]` |
| 5 | SET | `inputMap.put("pplan_cd", inMap.getString(JBSbatACIFM214.PRC_SVC_CD))` // Extract Price Service Cost Code `[PRC_SVC_CD="PRC_SVC_CD"]` |
| 6 | SET | `inputMap.put("ftth_tushin_use_ym", inMap.getString(JBSbatACIFM214.RIYOU_YM))` // Extract FTTH Communication Usage Year/Month `[RIYOU_YM="RIYOU_YM"]` |
| 7 | SET | `inputMap.put("tik_ctl_jssi_zm_flg", JACStrConst.ZUMI_FLG_MI)` // Set Domain Control Implementation Flag = `"0"` (Not Implemented) `[-> ZUMI_FLG_MI="0"]` |
| 8 | SET | `inputMap.put("func_code", "1")` // Set Function Code = `"1"` (Standard registration path) |
| 9 | EXEC | `JACbatDebugLogUtil.printDebugLog(super.logPrint, "[E][makeInputMap][inputMap=" + inputMap.toString() + "]")` // Print debug log: output map contents |
| 10 | EXEC | `JACbatDebugLogUtil.printDebugLog(super.logPrint, "[E][makeInputMap]")` // Print debug log: method end |
| 11 | RETURN | `return inputMap` // Return the assembled input map |

**Block 1.1** — Field extraction details (L265-L269)

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `inputMap.put("svc_kei_no", ...)` | Maps the customer's **service contract number** — the unique identifier for the customer's service agreement |
| 2 | SET | `inputMap.put("pcrs_cd", ...)` | Maps the **price cost code** — identifies the billing cost category associated with the service contract |
| 3 | SET | `inputMap.put("pplan_cd", ...)` | Maps the **price service code** — identifies the pricing plan the customer is subscribed to |
| 4 | SET | `inputMap.put("ftth_tushin_use_ym", ...)` | Maps the **FTTH communication usage year/month** — the billing period during which the bandwidth exceedance occurred |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `svc_kei_no` | Field | Service Contract Number — the unique identifier assigned to a customer's service agreement |
| `pcrs_cd` | Field | Price Cost Code — classifies the billing cost category for a service contract line item |
| `pplan_cd` | Field | Price Service Code — identifies the specific pricing plan a customer is subscribed to |
| `ftth_tushin_use_ym` | Field | FTTH Communication Usage Year/Month — the billing period (year-month) during which the customer's fiber internet usage was measured |
| `tik_ctl_jssi_zm_flg` | Field | Domain Control Implementation Flag — indicates whether domain-level control has been applied ("0" = not yet implemented, "1" = implemented) |
| `func_code` | Field | Function Code — identifies which batch function is being invoked ("1" = standard registration) |
| FTTH | Business term | Fiber To The Home — fiber-optic broadband internet service delivered to residential customers |
| `JBSbatServiceInterfaceMap` | Class | Batch Service Interface Map — the framework object that carries runtime input data between batch processing stages |
| `JBSbatACIFM214` | Class | Constants class for domain restriction notification target input data — defines the string key names used to access fields in the service interface map |
| `JACStrConst` | Class | Common string constants shared across the system — contains standard flag values like `ZUMI_FLG_MI` |
| `ZUMI_FLG_MI` | Constant | "Not Implemented" flag — the value `"0"` indicating a feature or control has not yet been activated |
| `JBSbatBusinessService` | Class | Parent batch business service class — provides common batch processing infrastructure including the `logPrint` debug logging stream |
| `JACbatDebugLogUtil` | Class | Batch debug log utility — provides structured debug logging with start `[S]` and end `[E]` markers |
| ＦＴＴＨ通信量超過実績登録 | Japanese term | FTTH Bandwidth Exceedance Record Registration — the batch process that registers records of customers who have exceeded their contracted fiber internet bandwidth |
| 料金コストコード | Japanese term | Price Cost Code — the cost classification code used in billing |
| 料金プランコード | Japanese term | Price Plan Code — the code identifying the customer's pricing plan |
| ＦＴＴＨ通信利用年月 | Japanese term | FTTH Communication Usage Year/Month — the billing period for which FTTH usage data is collected |
| 領域制御実施済フラグ | Japanese term | Domain Control Implementation Flag — indicates whether domain-level throttling/control has been applied to the customer's service |
| 機能コード | Japanese term | Function Code — identifies the specific function being executed within the batch |
| サービス契約番号 | Japanese term | Service Contract Number — the unique customer service agreement identifier |
