# Business Logic — JBSbatKKKojiKnrnInfToroku.createKikiInfTv() [301 LOC]

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

## 1. Role

### JBSbatKKKojiKnrnInfToroku.createKikiInfTv()

This method performs the **device information (television) registration processing** for batch jobs. It reads a CSV intermediate file containing television-related device data from a given intermediate directory, parses each row into its constituent fields, transforms and maps the data into a parameter list, and then inserts the resulting records into the temporary equipment work table `KK_T_KOJI_TG_KIKI_WK`. The intermediate file ID is `KKIFM064003`, and the file format is CSV.

The method implements a **batch file processing pattern** — it iterates over every line of the input CSV file, transforming each delimited data row into a structured parameter list for database insertion. Fields that are null or empty in the source are normalized to a half-width space constant (`HAFU_SPACE = " "`) to maintain column alignment. Additionally, many ONU, VA, Router, and PLC fields (which belong to other device types) are explicitly filled with empty strings since this is a television-specific registration path.

Its role in the larger system is to consume pre-margined (pre-processed) intermediate television device files produced by a prior load or preparation step and persist them as insert-ready records in a work table. It is called by `JBSbatKKKojiKnrnInfToroku.execute()`, which serves as the batch job entry point that orchestrates multiple registration tasks (equipment information for net, TV, termination services, etc.).

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["createKikiInfTv(mid_dir_kk)"])

    START --> LOG_START["Log: createKikiInfTv_START"]

    LOG_START --> INIT_VARS["Set data_work = ''
Set file_path = ''"]

    INIT_VARS --> GET_SYS_DATE["CALL: JBSbatDateUtil.getSystemDateTimeStamp()"]

    GET_SYS_DATE --> GEN_FILE_PATH["Set file_path = mid_dir_kk + KIKI_INF_TV_FILE_ID + FILE_KEISHIKI
KIKI_INF_TV_FILE_ID = KKIFM064003
FILE_KEISHIKI = .csv"]

    GEN_FILE_PATH --> READ_FILE["CALL: getInputFile(file_path, KIKI_INF_TV_FILE_ID)
Returns ArrayList data_list"]

    READ_FILE --> FOR_INIT["Set i = 0"]

    FOR_INIT --> FOR_CHECK{"i < data_list.size()?"}

    FOR_CHECK -->|true| FOR_INC["i++"]

    FOR_INC --> GET_ROW["Set data_work = data_list.get(i)"]

    GET_ROW --> SPLIT_DATA["String[] data = data_work.split(, -1)"]

    SPLIT_DATA --> PARAM_ADD["Create ArrayList param_add"]

    PARAM_ADD --> ADD_01["param_add.add(data[0])
Service Contract No."]

    ADD_01 --> ADD_02["param_add.add(data[1])
Service Contract Line ID"]

    ADD_02 --> ADD_03["param_add.add(data[2])
Joint Year-Month-Day"]

    ADD_03 --> ADD_04["param_add.add(data[3])
Serial Number"]

    ADD_04 --> CHECK_4{"data[4] != null
and not empty?"}

    CHECK_4 -->|true| ADD_4["param_add.add(data[4])
New Change Code"]

    CHECK_4 -->|false| ADD_4FALL["param_add.add(HAFU_SPACE)
HAFU_SPACE = space"]

    ADD_4 --> CHECK_5{"data[5] != null
and not empty?"}

    ADD_4FALL --> CHECK_5

    CHECK_5 -->|true| ADD_5["param_add.add(data[5])
Work Case Type Code"]

    CHECK_5 -->|false| ADD_5FALL["param_add.add(HAFU_SPACE)"]

    ADD_5 --> CHECK_6{"data[6] != null
and not empty?"}

    ADD_5FALL --> CHECK_6

    CHECK_6 -->|true| ADD_6["param_add.add(data[6])
Work Case Number"]

    CHECK_6 -->|false| ADD_6FALL["param_add.add(HAFU_SPACE)"]

    ADD_6 --> ADD_FIXED_SBT["param_add.add(KOJIAK_SBT_CD_TV)
KOJIAK_SBT_CD_TV = 03
Work Case Service Type Code TV"]

    ADD_FIXED_SBT --> CHECK_7{"data[7] != null
and not empty?"}

    CHECK_7 -->|true| ADD_7["param_add.add(data[7])
Work Company Code"]

    CHECK_7 -->|false| ADD_7FALL["param_add.add(HAFU_SPACE)"]

    ADD_7 --> ADD_EMPTY_ONU["Add empty strings for
Indoor Model ONU
MAC ONU
Service Contract ONU
Indoor Model VA
Device Mfr No VA
Service Contract VA
Indoor Model Router
Device Mfr No Router
Service Contract Router
Indoor Error Router
Indoor Model PLC1-8
Device Mfr No PLC1-8
Service Contract PLC1-8
Indoor Error PLC1-8"]

    ADD_EMPTY_ONU --> CHECK_8{"data[8] != null
and not empty?"}

    CHECK_8 -->|true| ADD_8["param_add.add(data[8])
Indoor Model Code V-ONU"]

    CHECK_8 -->|false| ADD_8FALL["param_add.add(HAFU_SPACE)"]

    ADD_8 --> CHECK_9{"data[9] != null
and not empty?"}

    ADD_8FALL --> CHECK_9

    CHECK_9 -->|true| ADD_9["param_add.add(data[9])
Device Mfr No V-ONU"]

    CHECK_9 -->|false| ADD_9FALL["param_add.add(HAFU_SPACE)"]

    ADD_9 --> ADD_25["param_add.add(data[25])
Service Contract V-ONU"]

    ADD_25 --> ADD_41["param_add.add(data[41])
Indoor Error Code V-ONU"]

    ADD_41 --> ADD_STB["Add STB1 through STB5 blocks
STBID, Service Contract, Indoor Error for each"]

    ADD_STB --> ADD_BCAS["Add B-CAS Card No. 1-5
C-CAS Card No. 1-5
Service Contract for B-CAS 1-5
Service Contract for C-CAS 1-5"]

    ADD_BCAS --> CHECK_47{"data[47] != null
and not empty?"}

    CHECK_47 -->|true| ADD_47["param_add.add(data[47])
STB-Free Menu Flag"]

    CHECK_47 -->|false| ADD_47FALL["param_add.add(HAFU_SPACE)"]

    ADD_47 --> ADD_48["param_add.add(data[48])
Contract Change Memo"]

    ADD_48 --> ADD_SYS["Add system fields:
system_date, batchUserId, opeDate, opeType, SPACE, 0
Repeated for insert/update/delete operations"]

    ADD_SYS --> EXEC_INSERT["CALL: executeKK_T_KOJI_TG_KIKI_WK_PKINSERT
Insert into KK_T_KOJI_TG_KIKI_WK"]

    EXEC_INSERT --> FOR_INC2["i++"]

    FOR_INC2 --> FOR_CHECK

    FOR_CHECK -->|false| LOG_END["Log: createKikiInfTv_END"]

    LOG_END --> END_NODE(["End"])
```

**CRITICAL - Constant Resolution:**

| Constant | Actual Value | Business Meaning |
|----------|-------------|-----------------|
| `KIKI_INF_TV_FILE_ID` | `KKIFM064003` | File ID for intermediate equipment (television) input files |
| `FILE_KEISHIKI` | `.csv` | File extension for CSV input/output files |
| `KOJIAK_SBT_CD_TV` | `03` | Work Case Service Type Code for TV (television) registration |
| `HAFU_SPACE` | `" "` (single half-width space) | Placeholder value used when a field is null or empty |
| `SPACE` | `" "` (space) | Generic space constant for system fields |

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `mid_dir_kk` | `String` | The intermediate file storage directory path where the pre-margined device information (television) CSV file is located. This directory path is concatenated with the file ID (`KKIFM064003`) and file extension (`.csv`) to construct the full file path read during processing. |

**Instance fields / external state read:**

| # | Field | Type | Business Description |
|---|-------|------|---------------------|
| 1 | `super.batchUserId` | `String` | The batch job user ID used for audit trail fields during record insertion |
| 2 | `super.opeDate` | `String` | The operator date used for registration, update, and delete operation date fields |
| 3 | `super.logPrint` | `LogPrint` | Debug logging utility used to log start/end markers |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `JBSbatDateUtil.getSystemDateTimeStamp` | JBSbatDateUtil | - | Gets the current system date-time stamp for audit trail fields |
| R | `JBSbatKKKojiKnrnInfToroku.getInputFile` | JBSbatKKKojiKnrnInfToroku | - | Reads the intermediate CSV file from disk and returns lines as an `ArrayList<String>` |
| C | `JBSbatKKKojiKnrnInfToroku.executeKK_T_KOJI_TG_KIKI_WK_PKINSERT` | JBSbatKKKojiKnrnInfToroku | `KK_T_KOJI_TG_KIKI_WK` | Inserts a device information (television) record into the temporary equipment work table with all parsed fields |
| - | `JACBatCommon.printDebugLog` | JACBatCommon | - | Debug logging utility (start/end markers) |

### Additional analysis of method calls:

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `JBSbatDateUtil.getSystemDateTimeStamp` | JBSbatDateUtil | - | Retrieves system date/time for batch audit fields (created_by, created_date, updated_by, updated_date) |
| R | `getInputFile` | - | File system | Reads the CSV intermediate file from `mid_dir_kk/KKIFM064003.csv` and returns each line as a string in an `ArrayList` |
| C | `executeKK_T_KOJI_TG_KIKI_WK_PKINSERT` | EKK064 (inferred) | `KK_T_KOJI_TG_KIKI_WK` | Inserts one device (TV) work record per iteration, including service contract number, line ID, joint date, serial number, new change code, work case type code, work company code, V-ONU details, B-CAS card numbers, C-CAS card numbers, STB IDs, and system fields |

## 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: `printDebugLog` [-], `getSystemDateTimeStamp` [R], `getInputFile` [R], `executeKK_T_KOJI_TG_KIKI_WK_PKINSERT` [C], `printDebugLog` [-]

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Batch: JBSbatKKKojiKnrnInfToroku | `JBSbatKKKojiKnrnInfToroku.execute()` -> `createKikiInfTv(mid_dir_kk)` | `executeKK_T_KOJI_TG_KIKI_WK_PKINSERT [C] KK_T_KOJI_TG_KIKI_WK` |

**Description:** This method is called from the `execute()` method of the same class `JBSbatKKKojiKnrnInfToroku`. The `execute()` method serves as the batch job entry point and orchestrates multiple device registration tasks including equipment for net, equipment for TV, termination service equipment, and others. Each registration task is handled by its own dedicated method (e.g., `createKikiInfNet()`, `createKikiInfTv()`, `createTAKNIInf()`).

## 6. Per-Branch Detail Blocks

### Block 1 — Initialization and Setup (L2680)

> Initializes local variables, retrieves the system date, constructs the intermediate file path, and reads the CSV file.

| # | Type | Code |
|---|------|------|
| 1 | SET | `data_work = ""` // Device info (TV) file 1-line data holder |
| 2 | SET | `file_path = ""` // File path holder |
| 3 | CALL | `sysrtem_date = JBSbatDateUtil.getSystemDateTimeStamp()` // Get system date/time |
| 4 | SET | `file_path = mid_dir_kk + KIKI_INF_TV_FILE_ID + FILE_KEISHIKI` // [KIKI_INF_TV_FILE_ID="KKIFM064003"] [FILE_KEISHIKI=".csv"] |
| 5 | CALL | `data_list = getInputFile(file_path, KIKI_INF_TV_FILE_ID)` // Read CSV file into ArrayList |

### Block 2 — For Loop Over File Lines (L2697)

> Iterates over each row of the intermediate CSV file. For each line, the data is split, transformed into a parameter list, and inserted.

| # | Type | Code |
|---|------|------|
| 1 | SET | `i = 0` // Loop counter |
| 2 | CONDITION | `i < data_list.size()` // Loop continuation condition |
| 3 | SET | `i++` // Increment loop counter |

#### Block 2.1 — Get Row and Split (L2702)

| # | Type | Code |
|---|------|------|
| 1 | SET | `data_work = data_list.get(i)` // Get current line |
| 2 | SET | `String[] data = data_work.split(",", -1)` // Split data by comma delimiter |
| 3 | SET | `param_add = new ArrayList<String>(data.length)` // Create parameter list for registration data |

#### Block 2.2 — Map Service Contract Fields (L2706-2713)

> Maps the first four CSV fields (service contract number, service contract line ID, joint date, serial number) directly from the input.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `param_add.add(data[0])` // Service contract number (svc_kei_no) |
| 2 | EXEC | `param_add.add(data[1])` // Service contract line ID (svc_kei_rn_no) |
| 3 | EXEC | `param_add.add(data[2])` // Joint year-month-date (gong_date) |
| 4 | EXEC | `param_add.add(data[3])` // Serial number (rei_ban) |

#### Block 2.3 — Conditional: New Change Code (data[4]) (L2716-2721)

[KINDYOU_CD - "New Change Code" conditional null/empty check]

| # | Type | Code |
|---|------|------|
| 1 | CONDITION | `null != data[4] && !"".equals(data[4])` // New change code present? |
| 2 | EXEC (then) | `param_add.add(data[4])` // New change code present — use value |
| 3 | EXEC (else) | `param_add.add(HAFU_SPACE)` // [HAFU_SPACE=" "] New change code empty — use half-width space |

#### Block 2.4 — Conditional: Work Case Type Code (data[5]) (L2723-2728)

[SAKUSEN_KBN_CD - "Work Case Type Code" conditional null/empty check]

| # | Type | Code |
|---|------|------|
| 1 | CONDITION | `null != data[5] && !"".equals(data[5])` // Work case type code present? |
| 2 | EXEC (then) | `param_add.add(data[5])` // Work case type code present — use value |
| 3 | EXEC (else) | `param_add.add(HAFU_SPACE)` // [HAFU_SPACE=" "] Empty — use half-width space |

#### Block 2.5 — Conditional: Work Case Number (data[6]) (L2730-2735)

[SAKUSEN_NO - "Work Case Number" conditional null/empty check]

| # | Type | Code |
|---|------|------|
| 1 | CONDITION | `null != data[6] && !"".equals(data[6])` // Work case number present? |
| 2 | EXEC (then) | `param_add.add(data[6])` // Work case number present — use value |
| 3 | EXEC (else) | `param_add.add(HAFU_SPACE)` // [HAFU_SPACE=" "] Empty — use half-width space |

#### Block 2.6 — Fixed Service Type Code (L2738)

[KOJIAK_SBT_CD_TV = "03" — Work Case Service Type Code for Television]

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `param_add.add(KOJIAK_SBT_CD_TV)` // [KOJIAK_SBT_CD_TV="03"] Work case service type code (TV) — always "03" |

#### Block 2.7 — Conditional: Work Company Code (data[7]) (L2740-2745)

[KOUSAI_KEN_COD - "Work Company Code" conditional null/empty check]

| # | Type | Code |
|---|------|------|
| 1 | CONDITION | `null != data[7] && !"".equals(data[7])` // Work company code present? |
| 2 | EXEC (then) | `param_add.add(data[7])` // Work company code present — use value |
| 3 | EXEC (else) | `param_add.add(HAFU_SPACE)` // [HAFU_SPACE=" "] Empty — use half-width space |

#### Block 2.8 — Empty Default Fields for ONU/VA/Router/PLC Devices (L2748-2874)

> These device types (ONU, VA, Router, PLC1 through PLC8) are not relevant to television registration. All their fields — model code, manufacturer serial number, service contract number, and error code — are filled with empty strings (`""`). This maintains the column alignment for the target table `KK_T_KOJI_TG_KIKI_WK`.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `param_add.add("")` // Indoor model code (ONU) |
| 2 | EXEC | `param_add.add("")` // MAC address (ONU) |
| 3 | EXEC | `param_add.add("")` // Service contract number (ONU) |
| 4 | EXEC | `param_add.add("")` // Indoor model code (VA) |
| 5 | EXEC | `param_add.add("")` // Device manufacturer number (VA) |
| 6 | EXEC | `param_add.add("")` // Service contract number (VA) |
| 7 | EXEC | `param_add.add("")` // Indoor model code (Router) |
| 8 | EXEC | `param_add.add("")` // Device manufacturer number (Router) |
| 9 | EXEC | `param_add.add("")` // Service contract number (Router) |
| 10 | EXEC | `param_add.add("")` // Indoor model error code (Router) |
| 11-38 | EXEC | `param_add.add("")` // Indoor model code, Device mfr no, Service contract, Error code for PLC1 through PLC8 (7 PLCs x 4 fields each = 28 fields) |

#### Block 2.9 — Conditional: V-ONU Indoor Model Code (data[8]) (L2876-2881)

[V-ONU - Virtual ONU / IPTV terminal device]

| # | Type | Code |
|---|------|------|
| 1 | CONDITION | `null != data[8] && !"".equals(data[8])` // V-ONU indoor model code present? |
| 2 | EXEC (then) | `param_add.add(data[8])` // V-ONU indoor model code — use value |
| 3 | EXEC (else) | `param_add.add(HAFU_SPACE)` // [HAFU_SPACE=" "] Empty — use half-width space |

#### Block 2.10 — Conditional: V-ONU Device Manufacturer Number (data[9]) (L2883-2888)

| # | Type | Code |
|---|------|------|
| 1 | CONDITION | `null != data[9] && !"".equals(data[9])` // V-ONU device mfr no present? |
| 2 | EXEC (then) | `param_add.add(data[9])` // V-ONU device mfr no — use value |
| 3 | EXEC (else) | `param_add.add(HAFU_SPACE)` // [HAFU_SPACE=" "] Empty — use half-width space |

#### Block 2.11 — V-ONU Specific Fields (L2890-2893)

> These fields are taken directly without null/empty check — they are expected to always be present.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `param_add.add(data[25])` // Service contract number (V-ONU) |
| 2 | EXEC | `param_add.add(data[41])` // Indoor model error code (V-ONU) |

#### Block 2.12 — STB (Set-Top Box) Fields (L2895-2939)

> Five STBs (STB1 through STB5) are supported. Each STB has three associated fields: STBID, service contract number, and indoor model error code. The service contract numbers are sourced from data[26]-data[30] and error codes from data[42]-data[46]. These are always added without null/empty check.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `param_add.add(data[10])` // STB ID 1 |
| 2 | EXEC | `param_add.add(data[26])` // Service contract number (STB1) |
| 3 | EXEC | `param_add.add(data[42])` // Indoor model error code (STB1) |
| 4 | EXEC | `param_add.add(data[13])` // STB ID 2 |
| 5 | EXEC | `param_add.add(data[29])` // Service contract number (STB2) |
| 6 | EXEC | `param_add.add(data[43])` // Indoor model error code (STB2) |
| 7 | EXEC | `param_add.add(data[16])` // STB ID 3 |
| 8 | EXEC | `param_add.add(data[32])` // Service contract number (STB3) |
| 9 | EXEC | `param_add.add(data[44])` // Indoor model error code (STB3) |
| 10 | EXEC | `param_add.add(data[19])` // STB ID 4 |
| 11 | EXEC | `param_add.add(data[35])` // Service contract number (STB4) |
| 12 | EXEC | `param_add.add(data[45])` // Indoor model error code (STB4) |
| 13 | EXEC | `param_add.add(data[22])` // STB ID 5 |
| 14 | EXEC | `param_add.add(data[38])` // Service contract number (STB5) |
| 15 | EXEC | `param_add.add(data[46])` // Indoor model error code (STB5) |

#### Block 2.13 — B-CAS / C-CAS Card Number Fields (L2941-2965)

> Five B-CAS card numbers (data[11], data[14], data[17], data[20], data[23]) and five C-CAS card numbers (data[12], data[15], data[18], data[21], data[24]) plus their associated service contract numbers (data[27]-data[31] for B-CAS, data[28], data[30]-data[31] for C-CAS, data[34]-data[37] for C-CAS) are added directly without null/empty check.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `param_add.add(data[11])` // B-CAS card number 1 |
| 2 | EXEC | `param_add.add(data[27])` // Service contract number (B-CAS 1) |
| 3 | EXEC | `param_add.add(data[12])` // C-CAS card number 1 |
| 4 | EXEC | `param_add.add(data[28])` // Service contract number (C-CAS 1) |
| 5 | EXEC | `param_add.add(data[14])` // B-CAS card number 2 |
| 6 | EXEC | `param_add.add(data[30])` // Service contract number (B-CAS 2) |
| 7 | EXEC | `param_add.add(data[15])` // C-CAS card number 2 |
| 8 | EXEC | `param_add.add(data[31])` // Service contract number (C-CAS 2) |
| 9 | EXEC | `param_add.add(data[17])` // B-CAS card number 3 |
| 10 | EXEC | `param_add.add(data[33])` // Service contract number (B-CAS 3) |
| 11 | EXEC | `param_add.add(data[18])` // C-CAS card number 3 |
| 12 | EXEC | `param_add.add(data[34])` // Service contract number (C-CAS 3) |
| 13 | EXEC | `param_add.add(data[20])` // B-CAS card number 4 |
| 14 | EXEC | `param_add.add(data[36])` // Service contract number (B-CAS 4) |
| 15 | EXEC | `param_add.add(data[21])` // C-CAS card number 4 |
| 16 | EXEC | `param_add.add(data[37])` // Service contract number (C-CAS 4) |
| 17 | EXEC | `param_add.add(data[23])` // B-CAS card number 5 |
| 18 | EXEC | `param_add.add(data[39])` // Service contract number (B-CAS 5) |
| 19 | EXEC | `param_add.add(data[24])` // C-CAS card number 5 |
| 20 | EXEC | `param_add.add(data[40])` // Service contract number (C-CAS 5) |

#### Block 2.14 — Conditional: STB-Free Menu Flag (data[47]) (L2967-2972)

[SET-top-box free menu flag — indicates whether the subscription includes STB-free (set-top box free) menu service]

| # | Type | Code |
|---|------|------|
| 1 | CONDITION | `null != data[47] && !"".equals(data[47])` // STB-free menu flag present? |
| 2 | EXEC (then) | `param_add.add(data[47])` // STB-free menu flag — use value |
| 3 | EXEC (else) | `param_add.add(HAFU_SPACE)` // [HAFU_SPACE=" "] Empty — use half-width space |

#### Block 2.15 — Final Fields and System Data (L2974-2986)

> Adds the contract change memo, system date, batch user ID, operation date, and operation type fields. The system fields block is repeated three times (for insert, update, and delete operation records).

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `param_add.add(data[48])` // Contract change memo |
| 2 | EXEC | `param_add.add(sysrtem_date)` // System date/time |
| 3 | EXEC | `param_add.add(super.batchUserId)` // Batch user ID |
| 4 | EXEC | `param_add.add(sysrtem_date)` // System date/time (repeat for update op) |
| 5 | EXEC | `param_add.add(super.batchUserId)` // Batch user ID (repeat) |
| 6 | EXEC | `param_add.add(SPACE)` // Operation type (insert = space) |
| 7 | EXEC | `param_add.add(SPACE)` // Operation type (update = space) |
| 8 | EXEC | `param_add.add("0")` // Operation flag |
| 9 | EXEC | `param_add.add(super.opeDate)` // Registration operation date |
| 10 | EXEC | `param_add.add(SPACE)` // Insert operation type (space = insert) |
| 11 | EXEC | `param_add.add(super.opeDate)` // Update operation date |
| 12 | EXEC | `param_add.add(SPACE)` // Update operation type (space = update) |
| 13 | EXEC | `param_add.add(SPACE)` // Delete operation date (space = not used) |
| 14 | EXEC | `param_add.add(SPACE)` // Delete operation type (space = not used) |

#### Block 2.16 — Database Insert (L2989)

> Executes the insert operation into the temporary equipment work table `KK_T_KOJI_TG_KIKI_WK` with all the prepared parameters. This is the sole database write operation in this method.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `executeKK_T_KOJI_TG_KIKI_WK_PKINSERT(param_add.toArray())` // Insert TV device record into KK_T_KOJI_TG_KIKI_WK |

### Block 3 — Completion (L2992)

> Logs the end of processing.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `super.logPrint.printDebugLog("createKikiInfTv_END")` // Log end marker |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `KKIFM064003` | Constant | File ID for intermediate equipment (television) input CSV files |
| `KOJIAK_SBT_CD_TV` | Constant | Work Case Service Type Code = "03" for TV (television) |
| `HAFU_SPACE` | Constant | Half-width space (" ") used as placeholder for empty/null fields |
| `FILE_KEISHIKI` | Constant | File extension (".csv") for intermediate files |
| `KK_T_KOJI_TG_KIKI_WK` | DB Table | Temporary equipment work table — holds device registration records pending further processing |
| `mid_dir_kk` | Field | Intermediate file storage directory path |
| `svc_kei_no` | Field | Service contract number — the primary contract identifier for a customer service |
| `svc_kei_rn_no` | Field | Service contract line ID — identifies a specific line within a service contract |
| `gong_date` | Field | Joint year-month-day — the date when the service contract and line were jointly created |
| `rei_ban` | Field | Serial number — sequential number within the contract |
| `KINDYOU_CD` | Field | New change code — classifies the type of new change (e.g., new installation, modification) |
| `SAKUSEN_KBN_CD` | Field | Work case type code — classifies the kind of work (installation, repair, etc.) |
| `SAKUSEN_NO` | Field | Work case number — a unique identifier for a work case |
| `KOJIAK_SBT_CD` | Field | Work case service type code — distinguishes between service types (TV, Net, etc.) |
| `KOUSAI_KEN_COD` | Field | Work company code — identifies the contracting work company |
| V-ONU | Device | Virtual Optical Network Unit — the IPTV terminal device used for television service delivery |
| ONU | Device | Optical Network Unit — fiber-to-the-home terminal device (not populated for TV records) |
| VA | Device | Video Adapter / Video Access device — video access equipment (not populated for TV records) |
| STB | Device | Set-Top Box — digital television decoder device supporting up to 5 units per subscriber |
| B-CAS | Standard | B-CAS Card — Japanese broadcast content protection smart card used for decrypting broadcast signals |
| C-CAS | Standard | C-CAS Card — secondary content protection card for additional service access |
| PLC | Device | Passive Optical Line / Power Line Communication device — networking equipment in fiber architecture (not populated for TV records) |
| STB-Free Menu Flag | Field | Indicates whether the subscription includes set-top box free menu service |
| Contract Change Memo | Field | Free-text memo describing the reason for the contract change |
| Batch User ID | Field | The system user ID of the batch job executing the registration |
| `KKSV*` | Class | Screen class naming convention for web-based customer service screens |
| Intermediate File | Concept | Pre-processed CSV file produced by a prior batch step, consumed by registration methods |
| Margined File | Concept | A file that has been validated and formatted with proper delimiters, ready for consumption |
| SC (Service Component) | Concept | A service-layer component that encapsulates a specific business operation |
| CBS (Corporate Business Service) | Concept | A business service component for core corporate operations |
| KK (Kokumin) | Prefix | National / customer-facing prefix for NTT-East equipment and service tables |
| PKINSERT | Method suffix | Primary key insert — database insert operation using primary key fields |
