# Business Logic — JBSbatKKAdHenkoHoyuDataUpd.createKktkSvcKeiRec() [343 LOC]

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

## 1. Role

### JBSbatKKAdHenkoHoyuDataUpd.createKktkSvcKeiRec()

This method performs **data preparation and persistence for an Equipment Provider Service Contract (機器提供サービス契約)** record within the `KK_T_KKTK_SVC_KEI` entity. It acts as a **data extractor and mapper**, collecting 171 structured fields from two input data interfaces — the current contract keymap (`kktkSvKeiKeyMap`) and the update address list (`dbList`) — into a single flat `String[]` parameter array, which is then passed to the insert service `executeKK_T_KKTK_SVC_KEI_PKINSERT` for database creation.

The method handles a comprehensive set of contract-related data including: contract number, status, service codes, pricing plan codes, installation method, equipment type details (model, serial number, manufacturer), delivery/shipping address information, service start/end dates, billing period details, service stop/pause/resume lifecycle states, service termination details, trial period records, warranty/insurance period calculations, device authentication credentials, and audit/traceability fields (registration ID, update ID, deletion ID, operational dates).

This is a **shared utility method** used by the calling method `insertKktkSvcKeiAddresData` during the equipment provider service contract address update workflow. It does not contain any business decision logic, validation, or branching — all processing is a straightforward one-pass field extraction and delegation pattern.

**Design Pattern:** Builder/Assembler — the method assembles a flat parameter object from multiple sources and delegates persistence to a dedicated insert service method.

---

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["createKktkSvcKeiRec(kktkSvKeiKeyMap, dbList)"])

    START --> INIT["SET: String[] setParam = new String[171]"]

    INIT --> PHASE1["PHASE 1: Extract fields from kktkSvKeiKeyMap (setParam[0]–setParam[62])"]

    PHASE1 --> R0["setParam[0]: KKTK_SVC_KEI_NO (Equipment Provider Service Contract Number)"]
    R0 --> R1["setParam[1]: SysDateTimeStamp from JCCBatCommon.getSysDateTimeStamp()"]
    R1 --> R2["setParam[2]: KKTK_SVC_KEI_STAT (Contract Status)"]
    R2 --> R3["setParam[3]: KKTK_SVC_CD (Service Code)"]
    R3 --> R4["setParam[4]: PCRS_CD (Pricing Cost Code)"]
    R4 --> R5["setParam[5]: PPLAN_CD (Pricing Plan Code)"]
    R5 --> R6["setParam[6]: TK_HOSHIKI_KEI_NO (Installation Method Contract Number)"]
    R6 --> R7["setParam[7]: KKTK_SBT_CD (Equipment Provider Type Code)"]
    R7 --> R8["setParam[8]: HAMBAI_SBT_CD (Sales Type Code)"]
    R8 --> R9["setParam[9]: SVC_USE_STA_KIBO_YMD (Service Usage Start Desired Date)"]
    R9 --> R10["setParam[10]: RSV_TSTA_KIBO_YMD (Reservation Application Start Desired Date)"]
    R10 --> R11["setParam[11]: KIBO_MAKER_CD (Desired Maker Code)"]
    R11 --> R12["setParam[12]: KIKI_SHITEI_SBT_CD (Equipment Designated Type Code)"]
    R12 --> R13["setParam[13]: TAKNKIKI_SBT_CD (Indoor Equipment Type Code)"]
    R13 --> R14["setParam[14]: TAKNKIKI_MODEL_CD (Indoor Equipment Model Code)"]
    R14 --> R15["setParam[15]: KIKI_SEIZO_NO (Equipment Serial Number)"]
    R15 --> R16["setParam[16]: FUZOKUHIN_SBT_CD (Accessory Type Code)"]
    R16 --> R17["setParam[17]: FUZOKUHIN_MODEL_CD (Accessory Model Code)"]
    R17 --> R18["setParam[18]: TAKNKIKI_SETHIN_MODEL_CD (Indoor Equipment Set Model Code)"]
    R18 --> R19["setParam[19]: KIKI_CHG_NO (Equipment Change Number)"]
    R19 --> R20["setParam[20]: KIKI_CHG_RSN_CD (Equipment Change Reason Code)"]
    R20 --> R21["setParam[21]: TSUSHIN_KIKI_SET_CD (Communication Equipment Set Code)"]
    R21 --> R22["setParam[22]: HDD_CAPA_CD (HDD Capacity Code)"]
    R22 --> R23["setParam[23]: KIKI_STC_SAKI_PLACE_NO (Equipment Installation Place Number)"]
    R23 --> R24["setParam[24]: OYA_KEI_SKBT_CD (Parent Contract ID Code)"]
    R24 --> R25["setParam[25]: SVC_KEI_NO (Service Contract Number)"]
    R25 --> R26["setParam[26]: SVC_KEI_UCWK_NO (Service Contract Detail Number)"]
    R26 --> R27["setParam[27]: SVC_KEI_KAISEN_UCWK_NO (Service Contract Line Detail Number)"]
    R27 --> R28["setParam[28]: OP_SVC_KEI_NO (Option Service Contract Number)"]
    R28 --> R29["setParam[29]: SYSID (System ID)"]
    R29 --> R30["setParam[30]: MSKM_DTL_NO (Application Detail Number)"]
    R30 --> R31["setParam[31]: LINK_STB_FLG (Link STB Flag)"]
    R31 --> R32["setParam[32]: KIKI_HKAT_SHITEI_SOKO_CD (Equipment Indication Designation Warehouse Code)"]
    R32 --> R33["setParam[33]: KIKI_HKAT_SHITEI_SKDN_CD (Equipment Indication Designation Stand Code)"]
    R33 --> R34["setParam[34]: KIKI_STI_JI_KRIPLACE_SKCD (Equipment Designated Time Management Location ID)"]
    R34 --> R35["setParam[35]: KIKI_STI_JI_KOCOMP_CD (Equipment Designated Time Contractor Code)"]
    R35 --> R36["setParam[36]: KIKI_STI_JI_KOCOMP_SLF_CD (Equipment Designated Time Contractor Stand Code)"]
    R36 --> R37["setParam[37]: KIKI_STI_JI_YTKSKOF_CD (Equipment Designated Time Pre-Appointment Office Code)"]
    R37 --> R38["setParam[38]: KIKI_STI_JI_YTKSKOF_SLF_CD (Equipment Designated Time Pre-Appointment Office Stand Code)"]
    R38 --> R39["setParam[39]: KKTK_SVC_KEI_HKHASYMD (Equipment Provider Service Contract Inheritance Date)"]
    R39 --> R40["setParam[40]: KIKI_SORYO_UM (Equipment Freight Free/Paid)"]
    R40 --> R41["setParam[41]: KIKI_SORYO_SAKSEI_YMD (Equipment Freight Creation Date)"]
    R41 --> R42["setParam[42]: KIKI_SOHUS_NM (Equipment Delivery Recipient Name)"]
    R42 --> R43["setParam[43]: KIKI_SOHUS_KANA (Equipment Delivery Recipient Kana Name)"]
    R43 --> R44["setParam[44]: KIKI_SOHUS_AD_CD (Equipment Delivery Address Code)"]
    R44 --> R45["setParam[45]: KIKI_SOHUS_PCD (Equipment Delivery Postal Code)"]
    R45 --> R46["setParam[46]: KIKI_SOHUS_STATE_NM (Equipment Delivery Prefecture Name)"]
    R46 --> R47["setParam[47]: KIKI_SOHUS_CITY_NM (Equipment Delivery City/Town/Village Name)"]
    R47 --> R48["setParam[48]: KIKI_SOHUS_OAZTSU_NM (Equipment Delivery Oaza/Street Name)"]
    R48 --> R49["setParam[49]: KIKI_SOHUS_AZCHO_NM (Equipment Delivery Chome/Block Name)"]
    R49 --> R50["setParam[50]: KIKI_SOHUS_BNCHIGO (Equipment Delivery Address Number)"]
    R50 --> R51["setParam[51]: KIKI_SOHUS_ADRTTM (Equipment Delivery Building Name)"]
    R51 --> R52["setParam[52]: KIKI_SOHUS_ADRRM (Equipment Delivery Room Number)"]
    R52 --> R53["setParam[53]: KIKI_SHS_AD_MAN_INPUT_FLG (Delivery Address Manual Input Flag)"]
    R53 --> R54["setParam[54]: KIKI_SOHUS_TELNO (Equipment Delivery Phone Number)"]
    R54 --> R55["setParam[55]: MANSION_BUKKEN_NO (Mansion Property Number)"]
    R55 --> R56["setParam[56]: KIKI_SOHUS_KSH_AD_SAI_FLG (Delivery Contractor Address Diff Flag)"]
    R56 --> R57["setParam[57]: KIKI_SHS_KBT_SHITEI_FLG (Delivery Individual Designation Flag)"]
    R57 --> R58["setParam[58]: KIKI_SHS_HSK_CD_1 (Delivery Supplement Code 1)"]
    R58 --> R59["setParam[59]: KIKI_SHS_HSK_CD_2 (Delivery Supplement Code 2)"]
    R59 --> R60["setParam[60]: KIKI_SHS_HSK_MEMO (Delivery Supplement Memo)"]
    R60 --> R61["setParam[61]: KIKI_STC_SAKI_NM (Equipment Installation Destination Name)"]
    R61 --> R62["setParam[62]: KIKI_STC_SAKI_KANA (Equipment Installation Destination Kana Name)"]

    PHASE1 --> PHASE2["PHASE 2: Extract address fields from dbList (setParam[63]–setParam[75])"]

    PHASE2 --> LD0["setParam[63]: dbList.getValue(0) (Installation Address Code)"]
    LD0 --> LD1["setParam[64]: dbList.getValue(1) (Installation Postal Code)"]
    LD1 --> LD2["setParam[65]: dbList.getValue(2) (Installation Prefecture)"]
    LD2 --> LD3["setParam[66]: dbList.getValue(3) (Installation City/Town/Village)"]
    LD3 --> LD4["setParam[67]: dbList.getValue(4) (Installation Oaza/Street)"]
    LD4 --> LD5["setParam[68]: dbList.getValue(5) (Installation Chome/Block)"]
    LD5 --> LD6["setParam[69]: kktkSvKeiKeyMap.getString(KIKI_STC_SAKI_BNCHIGO) (Installation Address No.)"]
    LD6 --> LD7["setParam[70]: kktkSvKeiKeyMap.getString(KIKI_STC_SAKI_ADRTTM) (Installation Building Name)"]
    LD7 --> LD8["setParam[71]: kktkSvKeiKeyMap.getString(KIKI_STC_SAKI_ADRRM) (Installation Room Number)"]
    LD8 --> LD9["setParam[72]: kktkSvKeiKeyMap.getString(KIKI_STC_SK_KSH_AD_SAI_FLG) (Install. Contract Address Diff Flag)"]
    LD9 --> LD10["setParam[73]: kktkSvKeiKeyMap.getString(KIKI_STC_SK_TELNO) (Install. Phone Number)"]
    LD10 --> LD11["setParam[74]: kktkSvKeiKeyMap.getString(KIKI_STS_KKK_SEIRI_CHU_FLG) (Install. Area Sorting Flag)"]
    LD11 --> LD12["setParam[75]: kktkSvKeiKeyMap.getString(AD_MI_FIX_FLG) (Address Not Yet Fixed Flag)"]

    PHASE2 --> PHASE3["PHASE 3: Extract remaining fields from kktkSvKeiKeyMap (setParam[76]–setParam[170])"]

    PHASE3 --> REM1["setParam[76]: AUTO_ADD_CD (Auto Registration Code)"]
    REM1 --> REM2["setParam[77]: AD_MI_FIX_RLS_YMD (Address Unfixed Release Date)"]
    REM2 --> REM3["setParam[78]: CHRG_STA_YMD_HOSEI_UM (Billing Start Date Correction Flag)"]
    REM3 --> REM4["setParam[79]: KIKI_STS_HSK_CD_1 (Install. Supplement Code 1)"]
    REM4 --> REM5["setParam[80]: KIKI_STS_HSK_CD_2 (Install. Supplement Code 2)"]
    REM5 --> REM6["setParam[81]: KIKI_STS_HSK_MEMO (Install. Supplement Memo)"]
    REM6 --> REM7["setParam[82]: KKTK_SVC_KEI_KZKWRK_REQYMD (Post-Contract Work Request Date)"]
    REM7 --> REM8["setParam[83]: SHOSA_YMD (Inspection Date)"]
    REM8 --> REM9["setParam[84]: SHOSA_CL_YMD (Inspection Cancellation Date)"]
    REM9 --> REM10["setParam[85]: HAISO_DIV (Delivery Section)"]
    REM10 --> REM11["setParam[86]: HAISO_KIGEN_YMD (Delivery Deadline Date)"]
    REM11 --> REM12["setParam[87]: HAISO_ARIV_SHITEI_YMD (Delivery Arrival Designated Date)"]
    REM12 --> REM13["setParam[88]: FTRIAL_KANYU_YMD (Trial Addition Date)"]
    REM13 --> REM14["setParam[89]: FTRIAL_PRD_ENDYMD (Trial Period End Date)"]
    REM14 --> REM15["setParam[90]: HONKANYU_YMD (Full Addition Date)"]
    REM15 --> REM16["setParam[91]: HONKANYU_IKO_KIGEN_YMD (Full Addition Transfer Deadline Date)"]
    REM16 --> REM17["setParam[92]: KEI_CNC_YMD (Contract Closing Date)"]
    REM17 --> REM18["setParam[93]: JCCC_KANYU_BUNSHO_YMD (JCCC Addition Document Date)"]
    REM18 --> REM19["setParam[94]: HOSHO_CD (Insurance Code)"]
    REM19 --> REM20["setParam[95]: KKTK_SVKEI_HOKI (Equipment Provider Service Contract Supplementary)"]
    REM20 --> REM21["setParam[96]: HOSHO_STAYMD (Insurance Start Date)"]
    REM21 --> REM22["setParam[97]: HOSHO_END_YMD (Insurance End Date)"]
    REM22 --> REM23["setParam[98]: RSV_APLY_YMD (Reservation Application Date)"]
    REM23 --> REM24["setParam[99]: RSV_CL_YMD (Reservation Cancellation Date)"]
    REM24 --> REM25["setParam[100]: RSV_APLY_CD (Reservation Application Code)"]
    REM25 --> REM26["setParam[101]: KIKI_CHG_YMD (Equipment Change Date)"]
    REM26 --> REM27["setParam[102]: PLAN_STAYMD (Plan Start Date)"]
    REM27 --> REM28["setParam[103]: PLAN_ENDYMD (Plan End Date)"]
    REM28 --> REM29["setParam[104]: PLAN_CHRG_STAYMD (Plan Billing Start Date)"]
    REM29 --> REM30["setParam[105]: PLAN_CHRG_ENDYMD (Plan Billing End Date)"]
    REM30 --> REM31["setParam[106]: PLAN_END_SBT_CD (Plan End Type Code)"]
    REM31 --> REM32["setParam[107]: SVC_CANCEL_YMD (Service Cancel Date)"]
    REM32 --> REM33["setParam[108]: SVC_CANCEL_RSN_CD (Service Cancel Reason Code)"]
    REM33 --> REM34["setParam[109]: SVC_STA_KISAN_YMD (Service Start Calculation Date)"]
    REM34 --> REM35["setParam[110]: SVC_STA_YMD (Service Start Date)"]
    REM35 --> REM36["setParam[111]: SVC_CHRG_STAYMD (Service Billing Start Date)"]
    REM36 --> REM37["setParam[112]: SVC_STP_YMD (Service Stop Date)"]
    REM37 --> REM38["setParam[113]: SVCTK_CHU_USE_FAIL_SBT_CD (Service In-Use Fail Type Code)"]
    REM38 --> REM39["setParam[114]: SVC_STP_RSN_CD (Service Stop Reason Code)"]
    REM39 --> REM40["setParam[115]: SVC_STP_RLS_YMD (Service Stop Release Date)"]
    REM40 --> REM41["setParam[116]: SVC_STP_RLS_RSN_CD (Service Stop Release Reason Code)"]
    REM41 --> REM42["setParam[117]: PAUSE_STP_CD (Pause Stop Code)"]
    REM42 --> REM43["setParam[118]: SVC_PAUSE_YMD (Service Pause Date)"]
    REM43 --> REM44["setParam[119]: SVC_PAUSE_RSN_CD (Service Pause Reason Code)"]
    REM44 --> REM45["setParam[120]: SVC_PAUSE_RSN_MEMO (Service Pause Reason Memo)"]
    REM45 --> REM46["setParam[121]: SVC_PAUSE_RLS_YMD (Service Pause Release Date)"]
    REM46 --> REM47["setParam[122]: SVC_PAUSE_RLS_RSN_CD (Service Pause Release Reason Code)"]
    REM47 --> REM48["setParam[123]: SVC_PAUSE_RLS_RSN_MEMO (Service Pause Release Reason Memo)"]
    REM48 --> REM49["setParam[124]: SVC_ENDYMD (Service End Date)"]
    REM49 --> REM50["setParam[125]: SVC_CHRG_ENDYMD (Service Billing End Date)"]
    REM50 --> REM51["setParam[126]: SVC_DSL_YMD (Service Dissolution Date)"]
    REM51 --> REM52["setParam[127]: SVC_DLRE_CD (Service Dissolution Reason Code)"]
    REM52 --> REM53["setParam[128]: SVC_DLRE_MEMO (Service Dissolution Reason Memo)"]
    REM53 --> REM54["setParam[129]: ZANCHI_FLG (Remainder Flag)"]
    REM54 --> REM55["setParam[130]: SVC_DSL_TTDKI_FIN_FLG (Service Dissolution Procedure Completion Flag)"]
    REM55 --> REM56["setParam[131]: KAIHK_YMD (Recovery Date)"]
    REM56 --> REM57["setParam[132]: SVC_CANCEL_CL_YMD (Service Cancel Cancellation Date)"]
    REM57 --> REM58["setParam[133]: SVC_DSL_CL_YMD (Service Dissolution Cancellation Date)"]
    REM58 --> REM59["setParam[134]: SKEKKA_SEND_CD (Review Result Send Code)"]
    REM59 --> REM60["setParam[135]: SVC_PAUSE_CHRG_STA_YMD (Service Pause Billing Start Date)"]
    REM60 --> REM61["setParam[136]: PNLTY_HASSEI_CD (Penalty Occurrence Code)"]
    REM61 --> REM62["setParam[137]: KIKI_NINSHO_ID (Equipment Authentication ID)"]
    REM62 --> REM63["setParam[138]: KIKI_NINSHO_ID_PWD (Equipment Authentication Password)"]
    REM63 --> REM64["setParam[139]: IDO_DIV (Migration Section)"]
    REM64 --> REM65["setParam[140]: KKST_JSEKI_UK_YMD (Equipment Installation Actual Receipt Date)"]
    REM65 --> REM66["setParam[141]: EO_TV_KKST_SNN_STAT_CD (eoTV Equipment Installation Approval Status Code)"]
    REM66 --> REM67["setParam[142]: KKST_SNN_YMD (Equipment Installation Approval Date)"]
    REM67 --> REM68["setParam[143]: TAKNKIKI_IDO_CD (Indoor Equipment Migration Code)"]
    REM68 --> REM69["setParam[144]: CAS_CARD_USE_KYODAK_YMD (CAS Card Usage Agreement Date)"]
    REM69 --> REM70["setParam[145]: KIKI_HUKA_INFO_CD (Equipment Additional Info Code)"]
    REM70 --> REM71["setParam[146]: SHOSA_DSL_FIN_CD (Inspection Dissolution Completion Code)"]
    REM71 --> REM72["setParam[147]: ROUTER_DSL_RSV_TRN_STAT_CD (Router Dissolution Reservation Processing Status Code)"]
    REM72 --> REM73["setParam[148]: ROUTER_DSL_RSV_TRN_RSLT_CD (Router Dissolution Reservation Processing Result Code)"]
    REM73 --> REM74["setParam[149]: HAISO_WAY_CD (Delivery Method Code)"]
    REM74 --> REM75["setParam[150]: KIKI_ITENS_MV_JSSIS_SKCD (Equipment Transfer Destination Executor ID)"]
    REM75 --> REM76["setParam[151]: KAISHU_KIKI_UM (Returned Equipment Presence)"]
    REM76 --> REM77["setParam[152]: HAISO_REQ_SHITEI_YMD (Delivery Request Designated Date)"]
    REM77 --> REM78["setParam[153]: SHKA_FIN_JI_SYRZM_FLG (Departure Completion Process Flag)"]
    REM78 --> REM79["setParam[154]: SVC_STA_JI_HIS_JOKYO_SKCD (Service Start Status ID)"]
    REM79 --> REM80["setParam[159]: DEL_DTM (Deletion Date/Time Stamp)"]
    REM80 --> REM81["setParam[160]: DEL_OPEACNT (Deletion Operator Account)"]
    REM81 --> REM82["setParam[161]: MK_FLG (Invalid Flag)"]
    REM82 --> REM83["setParam[162]: ADD_UNYO_YMD (Registration Operational Date)"]
    REM83 --> REM84["setParam[163]: ADD_TRN_ID (Registration Processing ID)"]
    REM84 --> REM85["setParam[164]: UPD_UNYO_YMD (Update Operational Date)"]
    REM85 --> REM86["setParam[165]: UPD_TRN_ID (Update Processing ID)"]
    REM86 --> REM87["setParam[166]: DEL_UNYO_YMD (Deletion Operational Date)"]
    REM87 --> REM88["setParam[167]: DEL_TRN_ID (Deletion Processing ID)"]
    REM88 --> REM89["setParam[168]: HCPRD_STAD_SNSTSTD_YMD (Warranty/Guarantee Period Start Reference Date)"]
    REM89 --> REM90["setParam[169]: HCPRD_STAD_SNSTSTD_YMD_IKF (Warranty Period Start Reference Date Transfer Flag)"]
    REM90 --> REM91["setParam[170]: HCPRD_STAD_SNSTSTD_YMD_SCD (Warranty Period Start Reference Date ID Code)"]

    PHASE3 --> INSERT["CALL: executeKK_T_KKTK_SVC_KEI_PKINSERT(setParam)"]

    INSERT --> END_NODE(["END"])

    END_NODE
```

### Processing Description

The method performs a single-pass, linear extraction of 171 fields with no conditional branching or loops. Processing is divided into three phases:

1. **Phase 1 (L2652–L2708)**: Extracts 63 fields (setParam[0]–setParam[62]) from the `kktkSvKeiKeyMap` interface. These cover the core contract metadata, equipment specifications, delivery address, and installation destination information. Each field is read via `kktkSvKeiKeyMap.getString()` and passed through `JBSbatStringUtil.Rtrim()` to remove trailing whitespace.

2. **Phase 2 (L2709–L2721)**: Extracts 6 fields (setParam[63]–setParam[68]) from the `dbList` interface using indexed access (`dbList.getValue(n)`), followed by 8 additional fields (setParam[69]–setParam[75]) from `kktkSvKeiKeyMap`. These fields specifically handle installation address data — the `dbList` fields provide the updated address code, postal code, and address components (prefecture, city, oaza, chome), while the remaining fields from `kktkSvKeiKeyMap` provide installation-specific address details and flags.

3. **Phase 3 (L2722–L2984)**: Extracts the remaining 94 fields (setParam[76]–setParam[170]) from `kktkSvKeiKeyMap`. These cover operational metadata, lifecycle dates (service start, stop, pause, end, dissolution), billing periods, trial periods, warranty/insurance calculations, audit trail fields, device authentication, and delivery logistics.

4. **Final Step (L2986)**: Delegates to `executeKK_T_KKTK_SVC_KEI_PKINSERT(setParam)` to persist the assembled record into the `KK_T_KKTK_SVC_KEI` table.

---

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `kktkSvKeiKeyMap` | `JBSbatCommonDBInterface` | A key-value data interface containing the **current Equipment Provider Service Contract (機器提供サービス契約)** record. Provides access to all 168 contract-level fields including contract number, status codes, service codes, pricing, equipment specs, delivery/installation addresses, lifecycle dates, billing periods, warranty/insurance info, and audit fields. This is the primary source of truth for existing contract data. |
| 2 | `dbList` | `JBSbatCommonDBInterface` | A list-based data interface carrying **updated address information (更新用住所情報)** for the equipment installation destination. Specifically provides indexed values (0–5) for the installation address code, postal code, and address components (prefecture, city, oaza, chome) that override or supplement the contract-level address data. |

### Instance Fields / External State

No instance fields or external state are read by this method. The method is fully stateless — it relies entirely on the two input parameters and static utility methods (`JBSbatStringUtil.Rtrim`, `JCCBatCommon.getSysDateTimeStamp`).

---

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `JBSbatStringUtil.Rtrim` | - | - | String utility: removes trailing whitespace from all 171 extracted field values |
| R | `JCCBatCommon.getSysDateTimeStamp` | JCCBatCommon | - | Retrieves the current system date/time stamp used as the registration timestamp (setParam[1]) |
| C | `executeKK_T_KKTK_SVC_KEI_PKINSERT` | EKK (inferred) | `KK_T_KKTK_SVC_KEI` | Inserts a new Equipment Provider Service Contract record with all 171 assembled parameters |

### Detailed CRUD Analysis

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `JCCBatCommon.getSysDateTimeStamp()` | JCCBatCommon | - | Reads the current system timestamp to populate the registration date/time field (setParam[1]) |
| R | `kktkSvKeiKeyMap.getString()` | - | - | Reads 168 string fields from the contract keymap interface (setParam[0], [2]–[62], [69]–[170]) |
| R | `dbList.getValue()` | - | - | Reads 6 address fields from the dbList interface by index (setParam[63]–[68]) |
| C | `executeKK_T_KKTK_SVC_KEI_PKINSERT()` | EKK (inferred) | `KK_T_KKTK_SVC_KEI` | Creates (Inserts) a new Equipment Provider Service Contract record with all 171 parameters assembled into the flat array |

**Note:** The SC Code for `executeKK_T_KKTK_SVC_KEI_PKINSERT` is inferred as `EKK` based on the table naming convention (`KK_T_KKTK_SVC_KEI`). The exact SC class is not visible within the 343-line scope of this method.

---

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | `JBSbatKKAdHenkoHoyuDataUpd.insertKktkSvcKeiAddresData()` | `insertKktkSvcKeiAddresData()` → `createKktkSvcKeiRec(kktkSvKeiKeyMap, dbList)` | `executeKK_T_KKTK_SVC_KEI_PKINSERT [C] KK_T_KKTK_SVC_KEI` |

### Call Chain Description

The method is called by `insertKktkSvcKeiAddresData()` within the same class `JBSbatKKAdHenkoHoyuDataUpd`. This caller is part of the equipment provider service contract address update workflow. The terminal CRUD operation performed by `createKktkSvcKeiRec` is an **Insert (C)** into the `KK_T_KKTK_SVC_KEI` table via `executeKK_T_KKTK_SVC_KEI_PKINSERT`, which creates a new Equipment Provider Service Contract record.

---

## 6. Per-Branch Detail Blocks

This method contains **no conditional branches** (no if/else, switch, for, while, or try/catch). The entire method is a single linear execution path: extract fields, assemble parameter array, delegate to insert method.

### Block 1 — LINEAR EXECUTION (L2644–L2986)

> Entire method body: A flat sequence of 171 field extractions followed by one insert call. No branching, no loops, no exception handling within this scope.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `String[] setParam = new String[171]` | Allocate a 171-element flat parameter array to hold all contract fields |
| 2 | SET | `setParam[0] = JBSbatStringUtil.Rtrim(kktkSvKeiKeyMap.getString(KKTK_SVC_KEI_NO))` | Equipment Provider Service Contract Number — primary contract identifier |
| 3 | SET | `setParam[1] = JBSbatStringUtil.Rtrim(JCCBatCommon.getSysDateTimeStamp())` | Registration Date/Time — current system timestamp |
| 4 | SET | `setParam[2] = JBSbatStringUtil.Rtrim(kktkSvKeiKeyMap.getString(KKTK_SVC_KEI_STAT))` | Contract Status — current state of the service contract |
| 5 | SET | `setParam[3] = JBSbatStringUtil.Rtrim(kktkSvKeiKeyMap.getString(KKTK_SVC_CD))` | Service Code — type of equipment provider service |
| 6 | SET | `setParam[4] = JBSbatStringUtil.Rtrim(kktkSvKeiKeyMap.getString(PCRS_CD))` | Pricing Cost Code — cost classification |
| 7 | SET | `setParam[5] = JBSbatStringUtil.Rtrim(kktkSvKeiKeyMap.getString(PPLAN_CD))` | Pricing Plan Code — billing plan classification |
| 8 | SET | `setParam[6] = JBSbatStringUtil.Rtrim(kktkSvKeiKeyMap.getString(TK_HOSHIKI_KEI_NO))` | Installation Method Contract Number |
| 9 | SET | `setParam[7] = JBSbatStringUtil.Rtrim(kktkSvKeiKeyMap.getString(KKTK_SBT_CD))` | Equipment Provider Type Code |
| 10 | SET | `setParam[8] = JBSbatStringUtil.Rtrim(kktkSvKeiKeyMap.getString(HAMBAI_SBT_CD))` | Sales Type Code |
| 11 | SET | `setParam[9]–setParam[170]` | Remaining 160 fields from kktkSvKeiKeyMap covering equipment specs, addresses, lifecycle dates, billing, warranty, audit, and delivery fields |
| 12 | SET | `setParam[63]–setParam[68] = dbList.getValue(0)–getValue(5)` | Updated installation address fields from dbList: address code, postal code, prefecture, city, oaza, chome |
| 13 | EXEC | `JBSbatStringUtil.Rtrim()` applied to all 171 values | Trims trailing whitespace from every extracted string |
| 14 | CALL | `executeKK_T_KKTK_SVC_KEI_PKINSERT(setParam)` | Inserts the assembled Equipment Provider Service Contract record into `KK_T_KKTK_SVC_KEI` |

---

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `KKTK_SVC_KEI_NO` | Field | Equipment Provider Service Contract Number — unique identifier for the service contract line item |
| `KKTK_SVC_KEI_STAT` | Field | Equipment Provider Service Contract Status — current state (e.g., active, terminated, paused) |
| `KKTK_SVC_CD` | Field | Equipment Provider Service Code — classifies the type of equipment provider service |
| `PCRS_CD` | Field | Pricing Cost Code — cost classification for billing |
| `PPLAN_CD` | Field | Pricing Plan Code — billing plan type classification |
| `TK_HOSHIKI_KEI_NO` | Field | Installation Method Contract Number — contract number associated with installation method |
| `KKTK_SBT_CD` | Field | Equipment Provider Type Code — classifies the provider type |
| `HAMBAI_SBT_CD` | Field | Sales Type Code — classifies the sales channel/type |
| `SVC_USE_STA_KIBO_YMD` | Field | Service Usage Start Desired Date — customer's requested service start date |
| `RSV_TSTA_KIBO_YMD` | Field | Reservation Application Start Desired Date — desired start date for reservation application |
| `KIBO_MAKER_CD` | Field | Desired Maker Code — customer's preferred equipment manufacturer |
| `KIKI_SHITEI_SBT_CD` | Field | Equipment Designated Type Code — type of designated equipment |
| `TANKIKI_SBT_CD` | Field | Indoor Equipment Type Code — classification of indoor equipment |
| `TANKIKI_MODEL_CD` | Field | Indoor Equipment Model Code — specific model of indoor equipment |
| `KIKI_SEIZO_NO` | Field | Equipment Serial Number — unique serial number of the equipment |
| `FUZOKUHIN_SBT_CD` | Field | Accessory Type Code — type code for equipment accessories |
| `FUZOKUHIN_MODEL_CD` | Field | Accessory Model Code — model code for accessories |
| `KIKI_CHG_NO` | Field | Equipment Change Number — tracking number for equipment changes |
| `KIKI_CHG_RSN_CD` | Field | Equipment Change Reason Code — reason for equipment replacement/change |
| `HDD_CAPA_CD` | Field | HDD Capacity Code — equipment HDD storage capacity classification |
| `KIKI_STC_SAKI_PLACE_NO` | Field | Equipment Installation Place Number — location number for installation |
| `OYA_KEI_SKBT_CD` | Field | Parent Contract ID Code — parent/associated contract identifier |
| `SVC_KEI_NO` | Field | Service Contract Number — the overarching service contract number |
| `SVC_KEI_UCWK_NO` | Field | Service Contract Detail Number — detail-level contract tracking ID |
| `SVC_KEI_KAISEN_UCWK_NO` | Field | Service Contract Line Detail Number — line-item detail contract number |
| `OP_SVC_KEI_NO` | Field | Option Service Contract Number — optional add-on service contract number |
| `SYSID` | Field | System ID — the system identifier that owns this record |
| `MSKM_DTL_NO` | Field | Application Detail Number — detail number of the application |
| `LINK_STB_FLG` | Field | Link STB Flag — flag for STB (Set-Top Box) linkage status |
| `KIKI_SOHUS_NM` | Field | Equipment Delivery Recipient Name — name of the person receiving equipment delivery |
| `KIKI_SOHUS_PCD` | Field | Equipment Delivery Postal Code — postal code for delivery address |
| `KIKI_SOHUS_TELNO` | Field | Equipment Delivery Phone Number — phone number of delivery recipient |
| `KIKI_STC_SAKI_NM` | Field | Equipment Installation Destination Name — name of the installation location |
| `KIKI_STC_SAKI_KANA` | Field | Equipment Installation Destination Kana Name — katakana name of installation location |
| `KIKI_STC_SAKI_BNCHIGO` | Field | Equipment Installation Destination Address Number — address number for installation |
| `KIKI_STC_SAKI_ADRTTM` | Field | Equipment Installation Destination Building Name — building name at installation site |
| `KIKI_STC_SAKI_ADRRM` | Field | Equipment Installation Destination Room Number — room number at installation site |
| `AD_MI_FIX_FLG` | Field | Address Not Yet Fixed Flag — indicates whether the address has been finalized |
| `AD_MI_FIX_RLS_YMD` | Field | Address Unfixed Release Date — date when the "not yet fixed" status is released |
| `AUTO_ADD_CD` | Field | Auto Registration Code — classification for automatic registration |
| `KKTK_SVC_KEI_KZKWRK_REQYMD` | Field | Post-Contract Work Request Date — date when post-contract work was requested |
| `SHOSA_YMD` | Field | Inspection Date — date of equipment/service inspection |
| `SHOSA_CL_YMD` | Field | Inspection Cancellation Date — date when inspection was cancelled |
| `HAISO_DIV` | Field | Delivery Section — classification of delivery area/section |
| `HAISO_KIGEN_YMD` | Field | Delivery Deadline Date — latest date by which delivery must be completed |
| `HAISO_ARIV_SHITEI_YMD` | Field | Delivery Arrival Designated Date — customer-specified delivery arrival date |
| `FTRIAL_KANYU_YMD` | Field | Trial Addition Date — date of trial service addition |
| `FTRIAL_PRD_ENDYMD` | Field | Trial Period End Date — end date of the trial service period |
| `HONKANYU_YMD` | Field | Full Addition Date — date of full (non-trial) service addition |
| `HONKANYU_IKO_KIGEN_YMD` | Field | Full Addition Transfer Deadline Date — deadline for transferring to full service |
| `KEI_CNC_YMD` | Field | Contract Closing Date — date when the contract was formally closed |
| `JCCC_KANYU_BUNSHO_YMD` | Field | JCCC Addition Document Date — date of JCCC (Japan Cable Connection Center) addition document |
| `HOSHO_CD` | Field | Insurance Code — insurance/warranty classification code |
| `HOSHO_STAYMD` | Field | Insurance Start Date — start date of insurance/warranty period |
| `HOSHO_END_YMD` | Field | Insurance End Date — end date of insurance/warranty period |
| `RSV_APLY_YMD` | Field | Reservation Application Date — date of reservation application |
| `RSV_CL_YMD` | Field | Reservation Cancellation Date — date when reservation was cancelled |
| `RSV_APLY_CD` | Field | Reservation Application Code — classification of reservation type |
| `KIKI_CHG_YMD` | Field | Equipment Change Date — date when equipment was changed |
| `PLAN_STAYMD` | Field | Plan Start Date — start date of the billing plan |
| `PLAN_ENDYMD` | Field | Plan End Date — end date of the billing plan |
| `PLAN_CHRG_STAYMD` | Field | Plan Billing Start Date — start date for billing under the plan |
| `PLAN_CHRG_ENDYMD` | Field | Plan Billing End Date — end date for billing under the plan |
| `PLAN_END_SBT_CD` | Field | Plan End Type Code — type code for plan termination |
| `SVC_CANCEL_YMD` | Field | Service Cancel Date — date when service cancellation was requested |
| `SVC_CANCEL_RSN_CD` | Field | Service Cancel Reason Code — reason for service cancellation |
| `SVC_STA_YMD` | Field | Service Start Date — date when service actually started |
| `SVC_CHRG_STAYMD` | Field | Service Billing Start Date — date when service billing started |
| `SVC_STP_YMD` | Field | Service Stop Date — date when service was stopped |
| `SVC_STP_RSN_CD` | Field | Service Stop Reason Code — reason for service suspension |
| `SVC_STP_RLS_YMD` | Field | Service Stop Release Date — date when service suspension was lifted |
| `SVC_STP_RLS_RSN_CD` | Field | Service Stop Release Reason Code — reason for releasing service suspension |
| `SVC_PAUSE_YMD` | Field | Service Pause Date — date when service was paused |
| `SVC_PAUSE_RSN_CD` | Field | Service Pause Reason Code — reason for service pause |
| `SVC_PAUSE_RLS_YMD` | Field | Service Pause Release Date — date when pause was released |
| `SVC_ENDYMD` | Field | Service End Date — date when service was terminated |
| `SVC_CHRG_ENDYMD` | Field | Service Billing End Date — date when billing ended |
| `SVC_DSL_YMD` | Field | Service Dissolution Date — date of service contract dissolution |
| `SVC_DLRE_CD` | Field | Service Dissolution Reason Code — reason for contract dissolution |
| `SVC_DLRE_MEMO` | Field | Service Dissolution Reason Memo — free-text memo for dissolution reason |
| `SVC_DSL_TTDKI_FIN_FLG` | Field | Service Dissolution Procedure Completion Flag — indicates if dissolution procedures are complete |
| `KAIHK_YMD` | Field | Recovery Date — date of service recovery after suspension/pause |
| `SVC_CANCEL_CL_YMD` | Field | Service Cancel Cancellation Date — date when cancellation request was withdrawn |
| `SVC_DSL_CL_YMD` | Field | Service Dissolution Cancellation Date — date when dissolution was cancelled |
| `SKEKKA_SEND_CD` | Field | Review Result Send Code — code for sending review results |
| `PNLTY_HASSEI_CD` | Field | Penalty Occurrence Code — code indicating whether a penalty was incurred |
| `KIKI_NINSHO_ID` | Field | Equipment Authentication ID — ID for device authentication |
| `KIKI_NINSHO_ID_PWD` | Field | Equipment Authentication Password — password for device authentication |
| `IDO_DIV` | Field | Migration Section — classification for equipment/service migration |
| `KKST_JSEKI_UK_YMD` | Field | Equipment Installation Actual Receipt Date — date when equipment was actually received at installation |
| `EO_TV_KKST_SNN_STAT_CD` | Field | eoTV Equipment Installation Approval Status Code — approval status for eoTV equipment |
| `KKST_SNN_YMD` | Field | Equipment Installation Approval Date — date of equipment installation approval |
| `TANKIKI_IDO_CD` | Field | Indoor Equipment Migration Code — code for indoor equipment migration |
| `CAS_CARD_USE_KYODAK_YMD` | Field | CAS Card Usage Agreement Date — date of agreement for CAS (Conditional Access System) card usage |
| `KIKI_HUKA_INFO_CD` | Field | Equipment Additional Info Code — code for supplementary equipment information |
| `SHOSA_DSL_FIN_CD` | Field | Inspection Dissolution Completion Code — code for completion of inspection dissolution |
| `ROUTER_DSL_RSV_TRN_STAT_CD` | Field | Router Dissolution Reservation Processing Status Code — status of router dissolution reservation |
| `ROUTER_DSL_RSV_TRN_RSLT_CD` | Field | Router Dissolution Reservation Processing Result Code — result of router dissolution processing |
| `HAISO_WAY_CD` | Field | Delivery Method Code — classification of delivery method |
| `KIKI_ITENS_MV_JSSIS_SKCD` | Field | Equipment Transfer Destination Executor ID — ID of the entity performing equipment transfer |
| `KAISHU_KIKI_UM` | Field | Returned Equipment Presence — flag indicating whether equipment needs to be returned |
| `HAISO_REQ_SHITEI_YMD` | Field | Delivery Request Designated Date — date requested by customer for delivery |
| `SHKA_FIN_JI_SYRZM_FLG` | Field | Departure Completion Process Flag — indicates if departure processing is complete |
| `SVC_STA_JI_HIS_JOKYO_SKCD` | Field | Service Start Status ID — identifier for service start status details |
| `DEL_DTM` | Field | Deletion Date/Time Stamp — timestamp of record deletion |
| `DEL_OPEACNT` | Field | Deletion Operator Account — account of the operator who performed deletion |
| `MK_FLG` | Field | Invalid Flag — flag indicating if the record is marked as invalid |
| `ADD_UNYO_YMD` | Field | Registration Operational Date — date of data registration operation |
| `ADD_TRN_ID` | Field | Registration Processing ID — unique ID for the registration transaction |
| `UPD_UNYO_YMD` | Field | Update Operational Date — date of data update operation |
| `UPD_TRN_ID` | Field | Update Processing ID — unique ID for the update transaction |
| `DEL_UNYO_YMD` | Field | Deletion Operational Date — date of data deletion operation |
| `DEL_TRN_ID` | Field | Deletion Processing ID — unique ID for the deletion transaction |
| `HCPRD_STAD_SNSTSTD_YMD` | Field | Warranty/Guarantee Period Start Reference Date — reference date for warranty period calculation |
| `HCPRD_STAD_SNSTSTD_YMD_IKF` | Field | Warranty Period Start Reference Date Transfer Flag — indicates transfer of reference date |
| `HCPRD_STAD_SNSTSTD_YMD_SCD` | Field | Warranty Period Start Reference Date ID Code — identifier for the warranty reference date |
| `KK_T_KKTK_SVC_KEI` | Table | Equipment Provider Service Contract table — the core entity storing all equipment provider service contract data |
| `JCCBatCommon` | Class | System date/time utility class — provides `getSysDateTimeStamp()` for generating system timestamps |
| `JBSbatStringUtil.Rtrim` | Method | String trimming utility — removes trailing whitespace from string values |
| `JBSbatCommonDBInterface` | Interface | Common database interface — abstract interface for accessing key-value and list-based data structures |
| `JBSbatKK_T_KKTK_SVC_KEI` | Class | Field constant definitions — contains column name constants for the `KK_T_KKTK_SVC_KEI` table |