# Business Logic — JBSbatKKKDDIAnkenIktTrkm.insertKDDITjgwrKjks() [116 LOC]

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

## 1. Role

### JBSbatKKKDDIAnkenIktTrkm.insertKDDITjgwrKjks()

This method performs **KDDI Third-Party Discount Contract Status Inquiry Registration** (KDDI他事業者割引契約状況照会登録処理). It is the core business logic that ingests a HashMap containing all record data from a KDDI brokerage case (KDDI取次案件) — including subscriber personal information, contact details, address, optional service selections, and promotional codes — into a structured parameter array and persists it to the database table `KK_T_KDDI_TJGWR_KJKS` via a dedicated insert entity method. The method acts as a **data transformation and assembly layer**: it maps flat HashMap keys (from the KDDI file import constant class `JBSbatKKIFE217`) into positional array elements at specific indices, generates a formatted unique sequence number for the registration record, and hardcodes the contract status code to "1" (In Progress). It follows a **builder pattern** — assembling all fields into an `Object[]` before delegating the actual persistence to `executeKK_T_KDDI_TJGWR_KJKS_PKINSERT` — and operates within a batch processing context, committing the database transaction upon completion. This method is called exclusively by `JBSbatKKKDDIAnkenIktTrkm.execute()`, serving as the dedicated registration handler for KDDI third-party discount contract inquiry data imported via file-based batch processing.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["insertKDDITjgwrKjks begins"])
    SETUP["Create Object[] setParamIns[67]"]
    GEN_SEQ["Generate sequence number<br/>JKKStrConst.KDDI_SEQ_KDDI_TJGWR_KJKS_NO"]
    POPULATE["Populate array indices 1-38 from rsMap<br/>via JBSbatKKIFE217 and JBSbatKK_M_AGNT constants"]
    STATUS["Set index 39 = KDDI_STAT_MSKM_UK<br/>Value: \"1\" (Contract status: In progress)"]
    NULLS["Set indices 40-53 to null<br/>Reserved future-use fields"]
    CALL_INSERT["executeKK_T_KDDI_TJGWR_KJKS_PKINSERT"]
    COMMIT["DB commit<br/>JBSbatBusinessBase.dbcon.commit"]
    END_NODE(["Method returns void"])

    START --> SETUP
    SETUP --> GEN_SEQ
    GEN_SEQ --> POPULATE
    POPULATE --> STATUS
    STATUS --> NULLS
    NULLS --> CALL_INSERT
    CALL_INSERT --> COMMIT
    COMMIT --> END_NODE
```

**Processing flow:**

1. **Parameter Array Setup**: Allocate a fixed-size `Object[67]` array to hold all insert parameters. This is the builder pattern — the entire database record is assembled positionally before any I/O occurs.

2. **Sequence Number Generation**: Generate a formatted next sequence number for the KDDI third-party discount contract registration number (`KDDI_TJGWR_KJKS_NO`) using `JKKBatCommon.getFormatedNextSeq()`. The sequence key constant is `JKKStrConst.KDDI_SEQ_KDDI_TJGWR_KJKS_NO = "SEQ_KDDI_TJGWR_KJKS_NO"`. The result is a zero-padded 10-digit integer.

3. **Data Population (Indices 1-38)**: Extract 38 fields from the incoming `rsMap` using the constant key definitions from `JBSbatKKIFE217` (the KDDI brokerage case file constant class) and `JBSbatKK_M_AGNT.AGNT_CD` (agent code). These fields cover:
   - **Subscriber identification**: brokerage name, kana name, address components (postal code, prefecture, town, lot number, building name), property type code
   - **Contact information**: home phone, mobile phone, contact phone
   - **Timestamp**: submission date/time with spaces removed via `.replace(" ", "")`
   - **KDDI-specific codes**: validation code, introduction first-merchant code/name, payment store code/name/type
   - **Agent information**: agent code and name
   - **Desired services**: eo光電話, eo光ネット, eo光テレビ subscription preference codes
   - **Contact preferences**: preferred day code, time slot code
   - **Current services**: existing phone, internet, TV service content
   - **Compliance and promotions**: personal information handling consent code, KDDI payment store special items, KOPT/KDDI promotion codes, remarks
   - **Alternative store info**: Kansai area outside KDDI payment store code/name

4. **Status Hardcode (Index 39)**: Set the contract status code (`KDDI_TJGWR_KJKS_STAT_CD`) to `JKKStrConst.KDDI_STAT_MSKM_UK = "1"`, meaning "In Progress" (among).

5. **Reserved Null Fields (Indices 40-53)**: Set 14 fields to `null` — these are reserved for future use including: eo contract status codes, KOPT contract acceptance result code, KDDI discount NG reason code, correction content, application document numbers, information linkage department code, callback date/time memo, and KOPT remarks.

6. **Persist**: Call `executeKK_T_KDDI_TJGWR_KJKS_PKINSERT(setParamIns)` which maps all 67 array elements to named database columns and executes the SQL INSERT.

7. **Commit**: Commit the database transaction via `JBSbatBusinessBase.dbcon.commit()` (DB compression processing — DBコミット処理).

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `rsMap` | `HashMap` | A HashMap containing all record data from a KDDI brokerage case (KDDI取次案件). Keys are defined by `JBSbatKKIFE217` constants and include subscriber personal information (name, kana, address, phone numbers), KDDI discount-related codes (validation code, introduction merchant code, payment store info), agent information, desired service selection codes (eo光電話, eo光ネット, eo光テレビ), contact preference codes (preferred day, time slot), existing service content (phone, internet, TV), personal information consent code, promotional codes, and remarks. This map is the payload from the KDDI file import processing. |
| — | `commonItem` | instance field | Common item context used as input to `JKKBatCommon.getFormatedNextSeq()` for sequence number generation. |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `JKKBatCommon.getFormatedNextSeq` | JKKBatCommon | - | Retrieves the next formatted sequence number for KDDI third-party discount contract registration number using sequence key "SEQ_KDDI_TJGWR_KJKS_NO", zero-padded to 10 digits |
| C | `executeKK_T_KDDI_TJGWR_KJKS_PKINSERT` | JBSbatKKKDDIAnkenIktTrkm | KK_T_KDDI_TJGWR_KJKS | Inserts a new record into the KDDI third-party discount contract status inquiry table. Maps 64 database columns including registration number, inquiry management number, subscriber info, address, contact details, service selections, contract status, and audit fields (ADD_DTM, ADD_OPEACNT, etc.) |
| R | `JBSbatBusinessBase.dbcon.commit` | JBSbatBusinessBase | - | Commits the database transaction, persisting the insert to the database |

## 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: `executeKK_T_KDDI_TJGWR_KJKS_PKINSERT` [C], `getFormatedNextSeq` [R], `dbcon.commit` [R]  # NOSONAR

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Batch: JBSbatKKKDDIAnkenIktTrkm | `JBSbatKKKDDIAnkenIktTrkm.execute()` -> `insertKDDITjgwrKjks(rsMap)` | `executeKK_T_KDDI_TJGWR_KJKS_PKINSERT [C] KK_T_KDDI_TJGWR_KJKS` |

## 6. Per-Branch Detail Blocks

**Block 1** — ARRAY_ALLOCATION `(setParamIns = new Object[67])` (L361)

> Allocate a fixed-size parameter array for the 67-position insert parameter structure.

| # | Type | Code |
|---|------|------|
| 1 | SET | `Object[] setParamIns = new Object[67]` // Parameter array for KDDI third-party discount contract status registration [-> INDEX=0..66] |

**Block 2** — INDEXED_SET `[setParamIns[0]]` (L363)

> Generate and assign the formatted next sequence number for the KDDI third-party discount contract registration number.

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParamIns[0] = JKKBatCommon.getFormatedNextSeq(commonItem, JKKStrConst.KDDI_SEQ_KDDI_TJGWR_KJKS_NO, "", 10)` // KDDI third-party discount contract status inquiry number [-> JKKStrConst.KDDI_SEQ_KDDI_TJGWR_KJKS_NO="SEQ_KDDI_TJGWR_KJKS_NO"] |

**Block 3** — INDEXED_SET `[setParamIns[1]]` (L365)

> Populate from rsMap: Introduction management number (紹介票管理番号).

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParamIns[1] = rsMap.get(JBSbatKKIFE217.INTR_HYO_KANRI_NO)` // Introduction management number [-> JBSbatKKIFE217.INTR_HYO_KANRI_NO="INTR_HYO_KANRI_NO"] |

**Block 4** — INDEXED_SET `[setParamIns[2]]` (L367)

> Populate from rsMap: Third-party discount applicant name (他事業者割引申込者名).

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParamIns[2] = rsMap.get(JBSbatKKIFE217.TJGWR_MKMS_NM)` // Third-party discount applicant name [-> JBSbatKKIFE217.TJGWR_MKMS_NM="TJGWR_MKMS_NM"] |

**Block 5** — INDEXED_SET `[setParamIns[3]]` (L369)

> Populate from rsMap: Third-party discount applicant kana name (他事業者割引申込者カナ名).

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParamIns[3] = rsMap.get(JBSbatKKIFE217.TJGWR_MKMS_KANA)` // Third-party discount applicant kana name [-> JBSbatKKIFE217.TJGWR_MKMS_KANA="TJGWR_MKMS_KANA"] |

**Block 6** — INDEXED_SET `[setParamIns[4]]` (L371)

> Populate from rsMap: Third-party discount applicant postal code (他事業者割引申込者郵便番号).

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParamIns[4] = rsMap.get(JBSbatKKIFE217.TJGWR_MKMS_PCD)` // Third-party discount applicant postal code [-> JBSbatKKIFE217.TJGWR_MKMS_PCD="TJGWR_MKMS_PCD"] |

**Block 7** — INDEXED_SET `[setParamIns[5]]` (L373)

> Populate from rsMap: Applicant prefecture/city/town/village name (他事業者割引申込者都道府県市区町村名).

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParamIns[5] = rsMap.get(JBSbatKKIFE217.TJGWR_MKMS_STATE_CITY_NM)` // Applicant prefecture/city/town/village name [-> JBSbatKKIFE217.TJGWR_MKMS_STATE_CITY_NM="TJGWR_MKMS_STATE_CITY_NM"] |

**Block 8** — INDEXED_SET `[setParamIns[6]]` (L375)

> Populate from rsMap: Applicant town/block name (他事業者割引申込者大字通称字丁目名).

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParamIns[6] = rsMap.get(JBSbatKKIFE217.TJGWR_MKMS_OAZTSU_AZCHO_NM)` // Applicant town/block name [-> JBSbatKKIFE217.TJGWR_MKMS_OAZTSU_AZCHO_NM="TJGWR_MKMS_OAZTSU_AZCHO_NM"] |

**Block 9** — INDEXED_SET `[setParamIns[7]]` (L377)

> Populate from rsMap: Applicant lot/number (他事業者割引申込者番地号).

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParamIns[7] = rsMap.get(JBSbatKKIFE217.TJGWR_MKMS_BNCHIGO)` // Applicant lot/number [-> JBSbatKKIFE217.TJGWR_MKMS_BNCHIGO="TJGWR_MKMS_BNCHIGO"] |

**Block 10** — INDEXED_SET `[setParamIns[8]]` (L379)

> Populate from rsMap: Applicant building name/room number (他事業者割引申込者建物名部屋番号).

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParamIns[8] = rsMap.get(JBSbatKKIFE217.TJGWR_MKMS_TTM_NM_RM_NO)` // Applicant building name/room number [-> JBSbatKKIFE217.TJGWR_MKMS_TTM_NM_RM_NO="TJGWR_MKMS_TTM_NM_RM_NO"] |

**Block 11** — INDEXED_SET `[setParamIns[9]]` (L381)

> Populate from rsMap: Property type code (物件種類コード).

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParamIns[9] = rsMap.get(JBSbatKKIFE217.TJGWR_MKMS_JKYO_BKN_SBT_CD)` // Property type code (single-family/condominium) [-> JBSbatKKIFE217.TJGWR_MKMS_JKYO_BKN_SBT_CD="TJGWR_MKMS_JKYO_BKN_SBT_CD"] |

**Block 12** — INDEXED_SET `[setParamIns[10]]` (L383)

> Populate from rsMap: Home phone number (他事業者割引申込者自宅電話番号).

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParamIns[10] = rsMap.get(JBSbatKKIFE217.TJGWR_MKMS_HOME_TELNO)` // Home phone number [-> JBSbatKKIFE217.TJGWR_MKMS_HOME_TELNO="TJGWR_MKMS_HOME_TELNO"] |

**Block 13** — INDEXED_SET `[setParamIns[11]]` (L385)

> Populate from rsMap: Mobile phone number (他事業者割引申込者携帯電話番号).

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParamIns[11] = rsMap.get(JBSbatKKIFE217.TJGWR_MKMS_KTAI_TELNO)` // Mobile phone number [-> JBSbatKKIFE217.TJGWR_MKMS_KTAI_TELNO="TJGWR_MKMS_KTAI_TELNO"] |

**Block 14** — INDEXED_SET `[setParamIns[12]]` (L387)

> Populate from rsMap: Contact phone number (他事業者割引申込者連絡先電話番号).

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParamIns[12] = rsMap.get(JBSbatKKIFE217.TJGWR_MKMS_RRKS_TELNO)` // Contact phone number [-> JBSbatKKIFE217.TJGWR_MKMS_RRKS_TELNO="TJGWR_MKMS_RRKS_TELNO"] |

**Block 15** — INDEXED_SET `[setParamIns[13]]` (L389)

> Populate from rsMap: Submission date/time (申込年月日時分秒), with spaces stripped.

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParamIns[13] = rsMap.get(JBSbatKKIFE217.MSKM_DTM).toString().replace(" ", "")` // Submission date/time with spaces removed [-> JBSbatKKIFE217.MSKM_DTM="MSKM_DTM"] |

**Block 16** — INDEXED_SET `[setParamIns[14]]` (L391)

> Populate from rsMap: KDDI validation code (KDDIバリューコード).

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParamIns[14] = rsMap.get(JBSbatKKIFE217.KDDI_VAL_CD)` // KDDI validation code [-> JBSbatKKIFE217.KDDI_VAL_CD="KDDI_VAL_CD"] |

**Block 17** — INDEXED_SET `[setParamIns[15]]` (L393)

> Populate from rsMap: KDDI introduction first merchant code (KDDI照会先事業者コード).

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParamIns[15] = rsMap.get(JBSbatKKIFE217.KDDI_SHOKAI_SK_JGS_CD)` // KDDI introduction first merchant code [-> JBSbatKKIFE217.KDDI_SHOKAI_SK_JGS_CD="KDDI_SHOKAI_SK_JGS_CD"] |

**Block 18** — INDEXED_SET `[setParamIns[16]]` (L395)

> Populate from rsMap: KDDI introduction first merchant name (KDDI照会先事業者名).

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParamIns[16] = rsMap.get(JBSbatKKIFE217.KDDI_SHOKAI_SK_JGS_NM)` // KDDI introduction first merchant name [-> JBSbatKKIFE217.KDDI_SHOKAI_SK_JGS_NM="KDDI_SHOKAI_SK_JGS_NM"] |

**Block 19** — INDEXED_SET `[setParamIns[17]]` (L397)

> Populate from rsMap: KDDI payment store code (KDDI受付店コード).

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParamIns[17] = rsMap.get(JBSbatKKIFE217.KDDI_UK_TEN_CD)` // KDDI payment store code [-> JBSbatKKIFE217.KDDI_UK_TEN_CD="KDDI_UK_TEN_CD"] |

**Block 20** — INDEXED_SET `[setParamIns[18]]` (L399)

> Populate from rsMap: KDDI payment store name (KDDI受付店名).

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParamIns[18] = rsMap.get(JBSbatKKIFE217.KDDI_UK_TEN_NM)` // KDDI payment store name [-> JBSbatKKIFE217.KDDI_UK_TEN_NM="KDDI_UK_TEN_NM"] |

**Block 21** — INDEXED_SET `[setParamIns[19]]` (L401)

> Populate from rsMap: Agent code (代理店コード).

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParamIns[19] = rsMap.get(JBSbatKK_M_AGNT.AGNT_CD)` // Agent code [-> JBSbatKK_M_AGNT.AGNT_CD="AGNT_CD"] |

**Block 22** — INDEXED_SET `[setParamIns[20]]` (L403)

> Populate from rsMap: Agent name (代理店名).

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParamIns[20] = rsMap.get(JBSbatKK_M_AGNT.AGNT_NM)` // Agent name [-> JBSbatKK_M_AGNT.AGNT_NM="AGNT_NM"] |

**Block 23** — INDEXED_SET `[setParamIns[21]]` (L405)

> Populate from rsMap: KDDI payment type code (KDDI受付種類コード).

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParamIns[21] = rsMap.get(JBSbatKKIFE217.KDDI_UK_SBT_CD)` // KDDI payment type code [-> JBSbatKKIFE217.KDDI_UK_SBT_CD="KDDI_UK_SBT_CD"] |

**Block 24** — INDEXED_SET `[setParamIns[22]]` (L407)

> Populate from rsMap: eo光電話 (eo Fiber Phone) desired subscription preference code (eo光電話申込希望種類コード).

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParamIns[22] = rsMap.get(JBSbatKKIFE217.EOHTL_MSKM_KIBO_SBT_CD)` // eo光電話 desired subscription code [-> JBSbatKKIFE217.EOHTL_MSKM_KIBO_SBT_CD="EOHTL_MSKM_KIBO_SBT_CD"] |

**Block 25** — INDEXED_SET `[setParamIns[23]]` (L409)

> Populate from rsMap: eo光ネット (eo Fiber Net) desired subscription preference code (eo光ネット申込希望種類コード).

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParamIns[23] = rsMap.get(JBSbatKKIFE217.EOHNT_MSKM_KIBO_SBT_CD)` // eo光ネット desired subscription code [-> JBSbatKKIFE217.EOHNT_MSKM_KIBO_SBT_CD="EOHNT_MSKM_KIBO_SBT_CD"] |

**Block 26** — INDEXED_SET `[setParamIns[24]]` (L411)

> Populate from rsMap: eo光テレビ (eo Fiber TV) desired subscription preference code (eo光テレビ申込希望種類コード).

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParamIns[24] = rsMap.get(JBSbatKKIFE217.EOHTV_MSKM_KIBO_SBT_CD)` // eo光テレビ desired subscription code [-> JBSbatKKIFE217.EOHTV_MSKM_KIBO_SBT_CD="EOHTV_MSKM_KIBO_SBT_CD"] |

**Block 27** — INDEXED_SET `[setParamIns[25]]` (L413)

> Populate from rsMap: Contact preferred day type code (連絡希望日種類コード).

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParamIns[25] = rsMap.get(JBSbatKKIFE217.RRK_KIBOD_SBT_CD)` // Contact preferred day code [-> JBSbatKKIFE217.RRK_KIBOD_SBT_CD="RRK_KIBOD_SBT_CD"] |

**Block 28** — INDEXED_SET `[setParamIns[26]]` (L415)

> Populate from rsMap: Contact preferred time slot code (連絡希望時間帯コード).

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParamIns[26] = rsMap.get(JBSbatKKIFE217.RRK_KBTMZ_CD)` // Contact preferred time slot code [-> JBSbatKKIFE217.RRK_KBTMZ_CD="RRK_KBTMZ_CD"] |

**Block 29** — INDEXED_SET `[setParamIns[27]]` (L417)

> Populate from rsMap: Existing phone service content (利用中電話サービス内容).

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParamIns[27] = rsMap.get(JBSbatKKIFE217.USE_CHU_TEL_SVC_NAIYO)` // Current phone service content [-> JBSbatKKIFE217.USE_CHU_TEL_SVC_NAIYO="USE_CHU_TEL_SVC_NAIYO"] |

**Block 30** — INDEXED_SET `[setParamIns[28]]` (L419)

> Populate from rsMap: Existing internet service content (利用中ネットサービス内容).

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParamIns[28] = rsMap.get(JBSbatKKIFE217.USE_CHU_NET_SVC_NAIYO)` // Current internet service content [-> JBSbatKKIFE217.USE_CHU_NET_SVC_NAIYO="USE_CHU_NET_SVC_NAIYO"] |

**Block 31** — INDEXED_SET `[setParamIns[29]]` (L421)

> Populate from rsMap: Existing TV service content (利用中テレビサービス内容).

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParamIns[29] = rsMap.get(JBSbatKKIFE217.USE_CHU_TV_SVC_NAIYO)` // Current TV service content [-> JBSbatKKIFE217.USE_CHU_TV_SVC_NAIYO="USE_CHU_TV_SVC_NAIYO"] |

**Block 32** — INDEXED_SET `[setParamIns[30]]` (L423)

> Populate from rsMap: Personal information handling consent code (個人情報取扱い承諾コード).

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParamIns[30] = rsMap.get(JBSbatKKIFE217.KOJIN_INFO_TRAT_SHODAKU_CD)` // Personal information handling consent code [-> JBSbatKKIFE217.KOJIN_INFO_TRAT_SHODAKU_CD="KOJIN_INFO_TRAT_SHODAKU_CD"] |

**Block 33** — INDEXED_SET `[setParamIns[31]]` (L425)

> Populate from rsMap: KDDI payment store special items (KDDI受付店特記事項).

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParamIns[31] = rsMap.get(JBSbatKKIFE217.KDDI_UK_TEN_TKJK)` // KDDI payment store special items [-> JBSbatKKIFE217.KDDI_UK_TEN_TKJK="KDDI_UK_TEN_TKJK"] |

**Block 34** — INDEXED_SET `[setParamIns[32]]` (L427)

> Populate from rsMap: KOPT partnership promotion code 1 (KOPT施策コード1).

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParamIns[32] = rsMap.get(JBSbatKKIFE217.KOPT_SISAK_CD_1)` // KOPT partnership promotion code 1 [-> JBSbatKKIFE217.KOPT_SISAK_CD_1="KOPT_SISAK_CD_1"] |

**Block 35** — INDEXED_SET `[setParamIns[33]]` (L429)

> Populate from rsMap: KOPT partnership promotion code 2 (KOPT施策コード2).

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParamIns[33] = rsMap.get(JBSbatKKIFE217.KOPT_SISAK_CD_2)` // KOPT partnership promotion code 2 [-> JBSbatKKIFE217.KOPT_SISAK_CD_2="KOPT_SISAK_CD_2"] |

**Block 36** — INDEXED_SET `[setParamIns[34]]` (L431)

> Populate from rsMap: KDDI promotion code 1 (KDDI施策コード1).

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParamIns[34] = rsMap.get(JBSbatKKIFE217.KDDI_SISAK_CD_1)` // KDDI promotion code 1 [-> JBSbatKKIFE217.KDDI_SISAK_CD_1="KDDI_SISAK_CD_1"] |

**Block 37** — INDEXED_SET `[setParamIns[35]]` (L433)

> Populate from rsMap: KDDI promotion code 2 (KDDI施策コード2).

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParamIns[35] = rsMap.get(JBSbatKKIFE217.KDDI_SISAK_CD_2)` // KDDI promotion code 2 [-> JBSbatKKIFE217.KDDI_SISAK_CD_2="KDDI_SISAK_CD_2"] |

**Block 38** — INDEXED_SET `[setParamIns[36]]` (L435)

> Populate from rsMap: KDDI remarks (KDDI備考).

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParamIns[36] = rsMap.get(JBSbatKKIFE217.KDDI_BIKO)` // KDDI remarks [-> JBSbatKKIFE217.KDDI_BIKO="KDDI_BIKO"] |

**Block 39** — INDEXED_SET `[setParamIns[37]]` (L437)

> Populate from rsMap: Kansai area outside KDDI payment store code (関西エリア外KDDI受付店コード).

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParamIns[37] = rsMap.get(JBSbatKKIFE217.KSARAGAI_KDDI_UK_TEN_CD)` // Kansai area outside KDDI payment store code [-> JBSbatKKIFE217.KSARAGAI_KDDI_UK_TEN_CD="KSARAGAI_KDDI_UK_TEN_CD"] |

**Block 40** — INDEXED_SET `[setParamIns[38]]` (L439)

> Populate from rsMap: Kansai area outside KDDI payment store name (関西エリア外KDDI受付店名).

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParamIns[38] = rsMap.get(JBSbatKKIFE217.KSARAGAI_KDDI_UK_TEN_NM)` // Kansai area outside KDDI payment store name [-> JBSbatKKIFE217.KSARAGAI_KDDI_UK_TEN_NM="KSARAGAI_KDDI_UK_TEN_NM"] |

**Block 41** — INDEXED_SET `[setParamIns[39]]` (L441)

> Hardcode the KDDI third-party discount contract status code to "1" (In Progress).

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParamIns[39] = JKKStrConst.KDDI_STAT_MSKM_UK` // Contract status: In Progress [-> JKKStrConst.KDDI_STAT_MSKM_UK="1"] |

**Block 42** — INDEXED_SET `[setParamIns[40-53]]` (L443-L496)

> Set 14 reserved/future-use fields to null. These include: response completion date (対応完了年月日), eo光/eo光ネット/eo光テレビ contract status codes, KOPT contract acceptance result code, KDDI discount NG reason code, KOPT correction content, application document numbers, network/TV application detail numbers, information linkage department code, callback date/time memo, and KOPT remarks.

| # | Type | Code |
|---|------|------|
| 1 | SET | `setParamIns[40] = null` // Response completion date [-> TAIO_FIN_YMD] |
| 2 | SET | `setParamIns[41] = null` // eo光電話 contract status code [-> EOHTL_KEI_JOKYO_CD] |
| 3 | SET | `setParamIns[42] = null` // eo光ネット contract status code [-> EOHNT_KEI_JOKYO_CD] |
| 4 | SET | `setParamIns[43] = null` // eo光テレビ contract status code [-> EOHTV_KEI_JOKYO_CD] |
| 5 | SET | `setParamIns[44] = null` // KOPT contract acceptance result code [-> KOPT_KEI_JCHUKDO_RSLT_CD] |
| 6 | SET | `setParamIns[45] = null` // KDDI third-party discount NG reason code [-> KDDI_TJGWR_NG_RSN_CD] |
| 7 | SET | `setParamIns[46] = null` // KOPT correction content [-> KOPT_TEISE_NAIYO] |
| 8 | SET | `setParamIns[47] = null` // Application document number [-> MSKMSHO_NO] |
| 9 | SET | `setParamIns[48] = null` // Network phone application detail number [-> NET_TEL_MKMSDTL_NO] |
| 10 | SET | `setParamIns[49] = null` // TV application detail number [-> TV_MKMSDTL_NO] |
| 11 | SET | `setParamIns[50] = null` // Information linkage department code [-> INFO_RENKEI_BUSHO_CD] |
| 12 | SET | `setParamIns[51] = null` // Callback date [-> CALLBK_YMD] |
| 13 | SET | `setParamIns[52] = null` // Callback time memo [-> CALLBK_TIME_MEMO] |
| 14 | SET | `setParamIns[53] = null` // KOPT remarks [-> KOPT_BIKO] |

**Block 43** — CALL `[executeKK_T_KDDI_TJGWR_KJKS_PKINSERT(setParamIns)]` (L464)

> Persist the assembled 67-element parameter array to the database table `KK_T_KDDI_TJGWR_KJKS`. This method maps each array element to a named database column (64 columns total including audit fields like ADD_DTM, ADD_OPEACNT, UPD_DTM, UPD_OPEACNT, DEL_DTM, DEL_OPEACNT, MK_FLG, ADD_UNYO_YMD, ADD_TRN_ID, UPD_UNYO_YMD, UPD_TRN_ID, DEL_UNYO_YMD, DEL_TRN_ID) and executes an INSERT statement with a primary key.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `executeKK_T_KDDI_TJGWR_KJKS_PKINSERT(setParamIns)` // Insert KDDI third-party discount contract status inquiry record into KK_T_KDDI_TJGWR_KJKS [C KK_T_KDDI_TJGWR_KJKS] |

**Block 44** — EXEC `[JBSbatBusinessBase.dbcon.commit()]` (L356)

> Commit the database transaction. This is the DB compression processing (DBコミット処理) that finalizes all pending changes.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `JBSbatBusinessBase.dbcon.commit()` // DB commit processing [DBコミット処理] |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `rsMap` | Parameter | KDDI brokerage case record data — a HashMap containing all fields from the imported KDDI file, keyed by JBSbatKKIFE217 constant names |
| `KDDI_TJGWR_KJKS_NO` | Field | KDDI third-party discount contract status inquiry number — unique sequence number for each registration record |
| `INTR_HYO_KANRI_NO` | Field | Introduction management number — internal tracking ID for the introduction form |
| `TJGWR_MKMS_NM` | Field | Third-party discount applicant name — the name of the person applying for the discount |
| `TJGWR_MKMS_KANA` | Field | Third-party discount applicant kana name — phonetic reading of the applicant name in Japanese kana |
| `TJGWR_MKMS_PCD` | Field | Applicant postal code |
| `TJGWR_MKMS_STATE_CITY_NM` | Field | Applicant prefecture/city/town/village name — administrative area component of the address |
| `TJGWR_MKMS_OAZTSU_AZCHO_NM` | Field | Applicant town/block name — neighborhood-level address component |
| `TJGWR_MKMS_BNCHIGO` | Field | Applicant lot/number — property lot number |
| `TJGWR_MKMS_TTM_NM_RM_NO` | Field | Applicant building name/room number |
| `TJGWR_MKMS_JKYO_BKN_SBT_CD` | Field | Property type code — classifies as single-family home (一戸建) or condominium/apartment (集合住宅) |
| `TJGWR_MKMS_HOME_TELNO` | Field | Applicant home phone number |
| `TJGWR_MKMS_KTAI_TELNO` | Field | Applicant mobile phone number |
| `TJGWR_MKMS_RRKS_TELNO` | Field | Applicant contact phone number |
| `MSKM_DTM` | Field | Submission date/time (year, month, day, hour, minute, second) |
| `KDDI_VAL_CD` | Field | KDDI validation code — authentication/verification code from KDDI |
| `KDDI_SHOKAI_SK_JGS_CD` | Field | KDDI introduction first merchant code — the first merchant that was introduced |
| `KDDI_SHOKAI_SK_JGS_NM` | Field | KDDI introduction first merchant name |
| `KDDI_UK_TEN_CD` | Field | KDDI payment store code |
| `KDDI_UK_TEN_NM` | Field | KDDI payment store name |
| `KDDI_UK_SBT_CD` | Field | KDDI payment type code — classifies the payment method/type |
| `AGNT_CD` | Field | Agent code — the authorized sales agent's code |
| `AGNT_NM` | Field | Agent name |
| `EOHTL_MSKM_KIBO_SBT_CD` | Field | eo光電話 (eo Fiber Phone) desired subscription preference code |
| `EOHNT_MSKM_KIBO_SBT_CD` | Field | eo光ネット (eo Fiber Net) desired subscription preference code |
| `EOHTV_MSKM_KIBO_SBT_CD` | Field | eo光テレビ (eo Fiber TV) desired subscription preference code |
| `RRK_KIBOD_SBT_CD` | Field | Contact preferred day type code |
| `RRK_KBTMZ_CD` | Field | Contact preferred time slot code |
| `USE_CHU_TEL_SVC_NAIYO` | Field | Existing phone service content — current phone service the subscriber uses |
| `USE_CHU_NET_SVC_NAIYO` | Field | Existing internet service content |
| `USE_CHU_TV_SVC_NAIYO` | Field | Existing TV service content |
| `KOJIN_INFO_TRAT_SHODAKU_CD` | Field | Personal information handling consent code — subscriber's consent to process personal data |
| `KDDI_UK_TEN_TKJK` | Field | KDDI payment store special items — additional notes for the payment store |
| `KOPT_SISAK_CD_1` | Field | KOPT partnership promotion code 1 |
| `KOPT_SISAK_CD_2` | Field | KOPT partnership promotion code 2 |
| `KDDI_SISAK_CD_1` | Field | KDDI promotion code 1 |
| `KDDI_SISAK_CD_2` | Field | KDDI promotion code 2 |
| `KDDI_BIKO` | Field | KDDI remarks — additional notes |
| `KSARAGAI_KDDI_UK_TEN_CD` | Field | Kansai area outside KDDI payment store code — for subscribers in areas not covered by KDDI direct stores |
| `KSARAGAI_KDDI_UK_TEN_NM` | Field | Kansai area outside KDDI payment store name |
| `KDDI_STAT_MSKM_UK` | Constant | Contract status: "1" = In Progress (among) — hardcoded value |
| `KK_T_KDDI_TJGWR_KJKS` | DB Table | KDDI third-party discount contract status inquiry table — stores the registration records for KDDI brokerage discount contracts |
| `JKKBatCommon` | Class | Batch common utility class — provides sequence number generation via `getFormatedNextSeq` |
| `JBSbatKKIFE217` | Class | KDDI brokerage case file constant class — defines all HashMap keys for the imported file data |
| `JBSbatKK_M_AGNT` | Class | Agent master table utility — defines agent-related field names |
| `JKKStrConst` | Class | KDDI string constants — defines sequence keys and status codes |
| `JBSbatCommonDBInterface` | Class | Common database interface — used as a Map-like container for setting database column values |
| executeKK_T_KDDI_TJGWR_KJKS_PKINSERT | Method | Entity insert method for KK_T_KDDI_TJGWR_KJKS table — maps array elements to 64 database columns and executes INSERT |
| eo光電話 (eo Hikari Denwa) | Business term | eo Fiber Phone — K-Opticom's fixed-line telephone service over fiber optics |
| eo光ネット (eo Hikari Net) | Business term | eo Fiber Net — K-Opticom's internet service over fiber optics |
| eo光テレビ (eo Hikari TV) | Business term | eo Fiber TV — K-Opticom's television service over fiber optics |
| 他事業者割引 (Ta-jigyosha Waribiki) | Business term | Third-party carrier discount — a discount program for subscribers switching from other telecom carriers |
| 照会 (Shoukai) | Business term | Inquiry/referral — the process of a third-party merchant referring customers |
| KOPT | Acronym | K-Opticom — the telecom service provider |
| KDDI | Business term | KDDI — major Japanese telecommunications carrier (partner for third-party discount program) |
