---
# Business Logic — JKKTelnoInfoAddCC.addJmte() [263 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `com.fujitsu.futurity.bp.custom.common.JKKTelnoInfoAddCC` |
| Layer | CC/Common Component |
| Module | `common` (Package: `com.fujitsu.futurity.bp.custom.common`) |

## 1. Role

### JKKTelnoInfoAddCC.addJmte()

This method performs **contract service fee registration processing** (契約事務手数料登録処理) — specifically, it handles the creation, update, or deletion of **temporary financial settings records** (一時金設定) associated with photo electric phone number addition or number change operations in the K-Opticom telecom fulfillment system. The method acts as a central dispatch hub that determines whether temporary financial settings registration is needed, based on two independent criteria: the base service type (standard vs. optional phone / 番ポ) and the type of service movement (addition vs. change). It implements a **routing/dispatch design pattern**, branching along two orthogonal dimensions — first whether standard financial settings are required (`ichijKnSetteAddFlg`), and second whether optional-phone financial settings are required (`ichijKnSetteBmpAddFlg`) — each leading to distinct service component calls. Within each branch, it further dispatches by movement type (number addition: IDO_DIV_HTELNOADD="00041", number change: IDO_DIV_HTELNOCHGE="00042") to either update existing temporary financial records or create new ones. The method also handles a special case where address change operations (IDO_DIV_ADCHGADD="00019" or IDO_DIV_ADCHGFIX="00020") calling this method are remapped to number addition processing to ensure fee charges are not omitted (商用OM-2013-0003573). Its role in the larger system is as a shared common component invoked by both `executeHtelTelnoAdd()` and `executeHtelTelnoChg()`, bridging the telco number addition/change screen flows with the temporary financial settings registration backend.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["addJmte params"])

    START --> S1["SET jmteTorokuMap = new HashMap"]
    S1 --> S2["CALL getRsltMsgListValue to get tmpPrcGrpCd from outMapEKK0081A010"]
    S2 --> S3["CALL getMansSkbtCd with PPLAN_CD from outMapEKK0081A010"]
    S3 --> S4["CALL getSvcKeiUcwkStat handle param svcKeiUcwkNo"]
    S4 --> S5["SET idoDiv from trgtData get IDO_DIV"]
    S5 --> S6["MAP jmteTorokuMap put IDO_DIV PRC_GRP_CD SVC_KEI_NO SVC_KEI_UCWK_NO MSKM_DTL_NO MANS_SKBT_CD"]
    S6 --> S7["CALL editJmteTorokuMap jmteTorokuMap trgtData null svcKeiUcwkStat"]
    S7 --> S8["SET svcKeiNo bmpUm from trgtData"]
    S8 --> C0{idoDiv equals IDO_DIV_ADCHGADD 00019 or IDO_DIV_ADCHGFIX 00020}

    C0 -->|"Yes"| R1["SET idoDiv = IDO_DIV_HTELNOADD 00041 UPDATE jmteTorokuMap IDO_DIV"]
    C0 -->|"No"| R2[continue]
    R1 --> R2

    R2 --> C1{idoDiv equals IDO_DIV_HTELNOCHGE 00042}

    C1 -->|"Yes"| U1["SET trgtData put KARI_TOUROKU_FLG = FLG_OFF"]
    C1 -->|"No"| U2[continue]
    U1 --> U2

    U2 --> D1["CALL jdgIchijKnSette trgtData bmpUm"]
    D1 --> D2["CALL jdgIchijKnSetteBmp trgtData bmpUm"]
    D2 --> C2{ichijKnSetteAddFlg true}

    C2 -->|"Yes"| B1[Block 2 Temp Financial Settings]
    C2 -->|"No"| C4{ichijKnSetteBmpAddFlg true}

    B1 --> B2["CALL telInfoMapper.editInMsgEKK1021C011"]
    B2 --> B3["CALL callSvcInter handle param inMapEKK1021C011"]
    B3 --> B4["GET tmpPayPrcNoEohtlJmte from outMapEKK1021C011"]
    B4 --> B5{tmpPayPrcNoEohtlJmte not null}

    B5 -->|"No"| C4
    B5 -->|"Yes"| B6["CALL getIcjknSetteNotFin handle param trgtData svcKeiNo svcKeiUcwkNo tmpPayPrcNoEohtlJmte"]
    B6 --> B7["CALL editJmteTorokuMap jmteTorokuMap trgtData bmpUm svcKeiUcwkStat"]
    B7 --> B8{idoDiv equals IDO_DIV_HTELNOADD 00041}

    B8 -->|"Yes"| B9{outMapEKK1021A010 not null}
    B8 -->|"No"| B10{idoDiv equals IDO_DIV_HTELNOCHGE 00042}

    B9 -->|"Yes"| B11["CALL telInfoMapper.editInMsgEKK1021C010"]
    B11 --> B12["CALL callSvcInter handle param inMapEKK1021C010"]
    B12 --> C4

    B9 -->|"No"| B13["CALL JKKBpCommon.addIcjkn4Jmte"]
    B13 --> C4

    B10 -->|"Yes"| B14["CALL JKKBpCommon.addIcjkn4Jmte"]
    B10 -->|"No"| C4
    B14 --> C4

    C4 -->|"Yes"| BMP1[Block 3 Temp Financial Settings Optional Phone]
    C4 -->|"No"| END_N["Return"]

    BMP1 --> BMP2["CALL telInfoMapper.editInMsgEKK1021C011 with BMP_UM_ARI"]
    BMP2 --> BMP3["CALL callSvcInter handle param inMapEKK1021C011"]
    BMP3 --> BMP4["GET tmpPayPrcNoBmpJmte from outMapEKK1021C011"]
    BMP4 --> BMP5{tmpPayPrcNoBmpJmte not null}

    BMP5 -->|"No"| END_N
    BMP5 -->|"Yes"| BMP6["CALL getIcjknSetteNotFin handle param trgtData svcKeiNo svcKeiUcwkNo tmpPayPrcNoBmpJmte"]

    BMP6 --> BMP7{bmpUm equals BMP_UM_ARI 1 AND BMP_ICJKN_SETTE_CD null AND idoDiv equals IDO_DIV_HTELNOADD 00041}

    BMP7 -->|"Yes"| BMP8["if outMapEKK1021A010 not null then SET trgtData BMP_ICJKN_SETTE_CD BMP_ICJKN_SHITEI_RT BMP_ICJKN_SHITEI_AMNT"]
    BMP7 -->|"No"| BMP9

    BMP8 --> BMP9["CALL editBmpJmteTorokuMap jmteTorokuMap trgtData bmpUm svcKeiUcwkStat idoDiv"]
    BMP9 --> BMP10{bmpUm equals BMP_UM_ARI 1}

    BMP10 -->|"Yes"| BMP11{idoDiv equals IDO_DIV_HTELNOADD 00041}
    BMP10 -->|"No"| BMP12{bmpUm not 1}

    BMP11 -->|"Yes"| BMP13{outMapEKK1021A010 not null}
    BMP11 -->|"No"| BMP14{idoDiv equals IDO_DIV_HTELNOCHGE 00042}

    BMP13 -->|"Yes"| BMP15["CALL telInfoMapper.editInMsgEKK1021C010"]
    BMP15 --> BMP16["CALL callSvcInter handle param inMapEKK1021C010"]
    BMP16 --> END_N

    BMP13 -->|"No"| BMP17["CALL JKKBpCommon.addIcjkn4Jmte"]
    BMP17 --> END_N

    BMP14 -->|"Yes"| BMP18["CALL JKKBpCommon.addIcjkn4Jmte"]
    BMP14 -->|"No"| END_N
    BMP18 --> END_N

    BMP12 -->|"Yes"| BMP19{outMapEKK1021A010 not null}

    BMP19 -->|"Yes"| BMP20["CALL telInfoMapper.editInMsgEKK1021E010"]
    BMP20 --> BMP21["CALL callSvcInter handle param inMapEKK1021E010"]
    BMP21 --> END_N

    BMP19 -->|"No"| END_N
```

### Processing Flow Summary

The method executes in these major phases:

1. **Constant Data Retrieval (L7862–7875)**: Extracts pricing group code, maintenance identification code, and service contract status from the input map and service call results.
2. **Mapping Information Setup (L7878–7894)**: Populates a registration map (`jmteTorokuMap`) with all fields needed for temporary financial settings, including movement classification, pricing group, service contract number, service contract detail number, order detail number, and maintenance identification code. Calls `editJmteTorokuMap` for initial temporary financial settings information preparation.
3. **Movement Classification Remap (L7897–7904)**: If the operation originates from an address change flow (IDO_DIV_ADCHGADD="00019" or IDO_DIV_ADCHGFIX="00020"), remaps the movement classification to number addition (IDO_DIV_HTELNOADD="00041") to ensure fee charges are not omitted. This was added for commercial requirement OM-2013-0003573.
4. **Temporary Financial Settings Registration Flag Determination (L7921–7925)**: Evaluates two independent boolean flags — `ichijKnSetteAddFlg` (standard financial settings required) and `ichijKnSetteBmpAddFlg` (optional-phone financial settings required).
5. **Standard Financial Settings Registration (L7927–7998)**: If `ichijKnSetteAddFlg` is true, performs business fee determination, retrieves the temporary payment processing number, fetches non-completed temporary financial settings records, and dispatches to update (editInMsgEKK1021C010) or create (addIcjkn4Jmte) depending on whether an existing record was found.
6. **Optional-Phone Financial Settings Registration (L8000–8103)**: If `ichijKnSetteBmpAddFlg` is true, performs similar logic but for optional-phone services, including the OM-2014-0002267 enhancement for the case where optional phone is present ("1"), no temporary financial setting code exists, and movement type is number addition.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | Session handle containing the session manager and runtime context; used for database connection and transaction management across all service component calls within this method |
| 2 | `param` | `IRequestParameterReadWrite` | Request parameter object carrying incoming screen/form data; used as input to mapper methods (editInMsgEKK1021C011, editInMsgEKK1021C010, editInMsgEKK1021E010) and service calls |
| 3 | `trgtData` | `HashMap<String, Object>` | Target data map containing business entity fields extracted from the request context; holds the movement classification (IDO_DIV), service contract number (SVC_KEI_NO), optional-phone flag (BMP_UM), and serves as the data source for the registration map |
| 4 | `outMapEKK0081A010` | `CAANMsg` | Service contract unique inquiry result map (EKK0081A010); contains service contract header data including pricing group code (PRC_GRP_CD) and pricing plan code (PPLAN_CD) used to determine service category |
| 5 | `mskmDtlNo` | `String` | Order detail number (申込明細番号) — unique identifier for the specific order line item; used as a key field in the temporary financial settings registration map |
| 6 | `svcKeiUcwkNo` | `String` | Service contract detail number (サービス契約内訳番号) — internal tracking ID for service contract line items; used to query and correlate temporary financial settings records |

**Instance fields / external state read by the method:**

| Field | Source Class | Description |
|-------|-------------|-------------|
| `telInfoMapper` | `JKKTelnoInfoAddCC` | Mapper instance providing access to telco information message mappers (editInMsgEKK1021C010, editInMsgEKK1021C011, editInMsgEKK1021E010) |

## 4. CRUD Operations / Called Services

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

Analyzed from the actual source code calls within the `addJmte` method (lines 7852–8114). Each called method is classified as Create (C), Read (R), Update (U), or Delete (D) based on naming convention, method purpose, and the SC Code pattern.

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `getRsltMsgListValue` | EKK0081A010 | EKK0081A010CBSMsg1List | Reads pricing group code (PRC_GRP_CD) from service contract inquiry result map |
| R | `getMansSkbtCd` | EKK0081A010 | EKK0081A010CBSMsg1List | Reads maintenance identification code from pricing plan code (PPLAN_CD) |
| R | `getSvcKeiUcwkStat` | - | Service contract detail table | Retrieves service contract detail status for the given svcKeiUcwkNo |
| R | `jdgIchijKnSette` | - | - | Determines whether standard temporary financial settings registration is required based on target data and optional-phone flag |
| R | `jdgIchijKnSetteBmp` | - | - | Determines whether optional-phone temporary financial settings registration is required |
| U | `telInfoMapper.editInMsgEKK1021C011` | EKK1021C011CBS | EKK1021C011 | Business fee determination — builds input message for business fee assessment service; called with movement type and optional-phone indicator |
| C | `callSvcInter` | EKK1021C011SC | - | Invokes the EKK1021C011 service component for business fee determination; returns outMapEKK1021C011 containing temporary payment processing number |
| R | `getRsltMsgListValue` | EKK1021C011CBS | EKK1021C011CBSMsg1List | Reads temporary payment processing number (TMP_PAY_PRC_NO) from business fee determination result |
| R | `getIcjknSetteNotFin` | EKK1021A010 | EKK1021A010CBSMsg | Reads non-completed temporary financial settings records by payment processing number; returns outMapEKK1021A010 with existing record data or null if not found |
| U | `editJmteTorokuMap` | EKK1021C011 | EKK1021C011CBSMsg | Updates temporary financial settings registration map with actual optional-phone flag and service status |
| U | `telInfoMapper.editInMsgEKK1021C010` | EKK1021C010CBS | EKK1021C010 | Business fee update — prepares input message to update existing temporary financial settings record |
| U | `callSvcInter` | EKK1021C010SC | - | Invokes the EKK1021C010 service component to update existing temporary financial settings |
| C | `JKKBpCommon.addIcjkn4Jmte` | EKK1021E010 | - | Creates a new temporary financial settings registration record with the populated jmteTorokuMap data |
| U | `editBmpJmteTorokuMap` | EKK1021C011 | EKK1021C011CBSMsg | Updates temporary financial settings registration map for optional-phone case with actual optional-phone flag, service status, and movement type |
| U | `telInfoMapper.editInMsgEKK1021E010` | EKK1021E010CBS | EKK1021E010 | Business fee logical deletion — prepares input message to logically delete a temporary financial settings record (when optional phone is absent but previously existed) |
| D | `callSvcInter` | EKK1021E010SC | - | Invokes the EKK1021E010 service component to logically delete a temporary financial settings record |
| C | `editJmteTorokuMap` | - | - | Initial setup of temporary financial settings registration map with default data |
| U | `editBmpJmteTorokuMap` | - | - | Optional-phone specific update of temporary financial settings registration map |

### Method Call Detail:

| # | Called Method | CRUD | Business Description |
|---|-------------|------|---------------------|
| 1 | `getRsltMsgListValue(outMapEKK0081A010, ...PrcGrpCd)` | R | Extracts pricing group code from service contract inquiry to determine fee category |
| 2 | `getMansSkbtCd(...PPLAN_CD)` | R | Resolves pricing plan code to maintenance identification code |
| 3 | `getSvcKeiUcwkStat(handle, param, svcKeiUcwkNo)` | R | Gets service contract detail status for the given detail number |
| 4 | `editJmteTorokuMap(jmteTorokuMap, trgtData, null, svcKeiUcwkStat)` | C | Initial setup of temporary financial settings map with default values |
| 5 | `jdgIchijKnSette(trgtData, bmpUm)` | R | Determines if standard temporary financial settings are needed |
| 6 | `jdgIchijKnSetteBmp(trgtData, bmpUm)` | R | Determines if optional-phone temporary financial settings are needed |
| 7 | `telInfoMapper.editInMsgEKK1021C011(...)` | U | Builds input message for business fee determination (standard) |
| 8 | `callSvcInter(handle, param, inMapEKK1021C011)` | C | Invokes business fee determination service component |
| 9 | `getIcjknSetteNotFin(...)` | R | Retrieves non-completed temporary financial settings records |
| 10 | `editJmteTorokuMap(jmteTorokuMap, trgtData, bmpUm, svcKeiUcwkStat)` | U | Updates registration map with actual optional-phone flag |
| 11 | `telInfoMapper.editInMsgEKK1021C010(...)` | U | Builds input message for temporary financial settings update |
| 12 | `JKKBpCommon.addIcjkn4Jmte(getClass(), param, handle, jmteTorokuMap)` | C | Creates new temporary financial settings record |
| 13 | `editBmpJmteTorokuMap(jmteTorokuMap, trgtData, bmpUm, svcKeiUcwkStat, idoDiv)` | U | Updates registration map for optional-phone scenario |
| 14 | `telInfoMapper.editInMsgEKK1021E010(...)` | D | Builds input message for temporary financial settings logical deletion |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | CBS: JKKTelnoInfoAddCC | `JKKTelnoInfoAddCC.executeHtelTelnoAdd()` -> `addJmte(handle, param, trgtData, outMapEKK0081A010, mskmDtlNo, svcKeiUcwkNo)` | `addIcjkn4Jmte [C] KK_T_ICJKN_SETTE, editInMsgEKK1021C010 [U] KK_T_ICJKN_SETTE` |
| 2 | CBS: JKKTelnoInfoAddCC | `JKKTelnoInfoAddCC.executeHtelTelnoChg()` -> `addJmte(handle, param, trgtData, outMapEKK0081A010, mskmDtlNo, svcKeiUcwkNo)` | `addIcjkn4Jmte [C] KK_T_ICJKN_SETTE, editInMsgEKK1021E010 [D] KK_T_ICJKN_SETTE` |

**Terminal operations reached from this method:**

| Terminal Operation | CRUD | Entity/DB | SC Code |
|-------------------|------|-----------|---------|
| `editInMsgEKK1021C011` | U | Business fee determination input | EKK1021C011CBS |
| `callSvcInter` (EKK1021C011) | C | Service invocation | EKK1021C011SC |
| `getIcjknSetteNotFin` | R | Non-completed temporary financial settings | EKK1021A010CBS |
| `editInMsgEKK1021C010` | U | Temporary financial settings update input | EKK1021C010CBS |
| `callSvcInter` (EKK1021C010) | U | Service invocation | EKK1021C010SC |
| `addIcjkn4Jmte` | C | Temporary financial settings creation | EKK1021E010CBS |
| `editInMsgEKK1021E010` | D | Temporary financial settings logical deletion input | EKK1021E010CBS |
| `callSvcInter` (EKK1021E010) | D | Service invocation | EKK1021E010SC |

## 6. Per-Branch Detail Blocks

**Block 1** — [INITIALIZATION] (L7862)

> Initializes the temporary financial settings registration map and retrieves constant data from the service contract inquiry result.

| # | Type | Code |
|---|------|------|
| 1 | SET | `jmteTorokuMap = new HashMap<String, Object>()` // Initialize registration map // KT1-2012-0000022 2013/01/05 |
| 2 | SET | `tmpPrcGrpCd = getRsltMsgListValue(outMapEKK0081A010, EKK0081A010CBSMsg.EKK0081A010CBSMSG1LIST, EKK0081A010CBSMsg1List.PRC_GRP_CD)` // Extract pricing group code // [-> PRC_GRP_CD from EKK0081A010CBSMsg1List] |
| 3 | SET | `mansSkbtCd = getMansSkbtCd(getRsltMsgListValue(outMapEKK0081A010, EKK0081A010CBSMsg.EKK0081A010CBSMSG1LIST, EKK0081A010CBSMsg1List.PPLAN_CD))` // Resolve maintenance identification code from pricing plan code // [-> PPLAN_CD from EKK0081A010CBSMsg1List] |
| 4 | SET | `svcKeiUcwkStat = getSvcKeiUcwkStat(handle, param, svcKeiUcwkNo)` // Get service contract detail status |

**Block 2** — [MAP SETUP] (L7878)

> Populates the temporary financial settings registration map with all required fields for the registration process.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `jmteTorokuMap.put(JKKJmteTorokuConst.IDO_DIV, trgtData.get(JKKTelnoInfoAddConstCC.IDO_DIV))` // Movement classification // [-> IDO_DIV = "ido_div"] |
| 2 | EXEC | `jmteTorokuMap.put(JKKJmteTorokuConst.PRC_GRP_CD, tmpPrcGrpCd)` // Pricing group code // [-> PRC_GRP_CD = "mskm_prc_grp_cd"] |
| 3 | EXEC | `jmteTorokuMap.put(JKKJmteTorokuConst.SVC_KEI_NO, trgtData.get(JKKTelnoInfoAddConstCC.SVC_KEI_NO))` // Service contract number // [-> SVC_KEI_NO = "svc_kei_no"] |
| 4 | EXEC | `jmteTorokuMap.put(JKKJmteTorokuConst.SVC_KEI_UCWK_NO, svcKeiUcwkNo)` // Service contract detail number // [-> SVC_KEI_UCWK_NO = "svc_kei_ucwk_no"] |
| 5 | EXEC | `jmteTorokuMap.put(JKKJmteTorokuConst.MSKM_DTL_NO, mskmDtlNo)` // Order detail number // [-> MSKM_DTL_NO = "mskm_dtl_no"] |
| 6 | EXEC | `jmteTorokuMap.put(JKKJmteTorokuConst.MANS_SKBT_CD, mansSkbtCd)` // Maintenance identification code // [-> MANS_SKBT_CD = "mans_skbt_cd"] |
| 7 | CALL | `editJmteTorokuMap(jmteTorokuMap, trgtData, null, svcKeiUcwkStat)` // Initial setup of temporary financial settings map with null bmpUm |

**Block 3** — [CONSTANT VARIABLE SETTING] (L7896)

> Extracts key variables from target data for subsequent branching logic.

| # | Type | Code |
|---|------|------|
| 1 | SET | `idoDiv = (String)trgtData.get(JKKTelnoInfoAddConstCC.IDO_DIV)` // Movement classification from target data |
| 2 | SET | `svcKeiNo = (String)trgtData.get(JKKTelnoInfoAddConstCC.SVC_KEI_NO)` // Service contract number |
| 3 | SET | `bmpUm = (String)trgtData.get(JKKTelnoInfoAddConstCC.BMP_UM)` // Optional phone presence flag |
| 4 | SET | `inMapEKK1021C011` // Declarative: Business fee determination input map |
| 5 | SET | `outMapEKK1021C011` // Declarative: Business fee determination output map |

**Block 4** — [IF: Address Change Remap for Number Addition] (Condition: `JKKSvcConst.IDO_DIV_ADCHGADD.equals(idoDiv) || JKKSvcConst.IDO_DIV_ADCHGFIX.equals(idoDiv)`) [CONSTANT: IDO_DIV_ADCHGADD="00019" (Address change/registration), IDO_DIV_ADCHGFIX="00020" (Address change/determination)] (L7902)

> For commercial requirement OM-2013-0003573: When called from address change flows, remap movement classification to number addition to ensure service fee charges are not omitted. Both the local variable and the registration map are updated.

| # | Type | Code |
|---|------|------|
| 1 | SET | `idoDiv = JKKSvcConst.IDO_DIV_HTELNOADD` // Remap to number addition // [-> IDO_DIV_HTELNOADD = "00041"] |
| 2 | EXEC | `jmteTorokuMap.put(JKKJmteTorokuConst.IDO_DIV, idoDiv)` // Overwrite registration map movement classification with number addition // "登録処理用異動区分も上書き" |

**Block 5** — [IF: Number Change Special Handling] (Condition: `JKKSvcConst.IDO_DIV_HTELNOCHGE.equals(idoDiv)`) [CONSTANT: IDO_DIV_HTELNOCHGE="00042"] (L7920)

> When the movement type is number change, disable the temporary registration flag. This ensures the system treats the operation as a change rather than a new temporary registration.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `trgtData.put(JKKTelnoInfoAddConstCC.KARI_TOUROKU_FLG, JKKSvcConst.FLG_OFF)` // Disable temporary registration flag // [-> FLG_OFF = "0"] |

**Block 6** — [REGISTRATION FLAG DETERMINATION] (L7924–7925)

> Determines whether temporary financial settings registration is needed on two independent axes: standard and optional-phone.

| # | Type | Code |
|---|------|------|
| 1 | SET | `ichijKnSetteAddFlg = jdgIchijKnSette(trgtData, bmpUm)` // Registration judgment (temporary financial settings) |
| 2 | SET | `ichijKnSetteBmpAddFlg = jdgIchijKnSetteBmp(trgtData, bmpUm)` // Registration judgment (temporary financial settings with optional phone) |

**Block 7** — [IF: Standard Temporary Financial Settings Registration] (Condition: `ichijKnSetteAddFlg`) (L7927)

> Executes the standard (non-optional-phone) temporary financial settings registration flow. This includes business fee determination, retrieving existing records, and either updating or creating records based on movement type and existence of existing data.

**Block 7.1** — [Business Fee Determination] (L7933)

> Calls the telco info mapper to build the input message for business fee determination, then invokes the service component.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `inMapEKK1021C011 = telInfoMapper.editInMsgEKK1021C011(param, trgtData, outMapEKK0081A010, idoDiv, null, (String)jmteTorokuMap.get(JKKJmteTorokuConst.MANS_SKBT_CD))` // Build business fee determination input message |
| 2 | CALL | `outMapEKK1021C011 = callSvcInter(handle, param, inMapEKK1021C011)` // Invoke service component for business fee determination |

**Block 7.2** — [Retrieve Temporary Payment Processing Number] (L7939)

> Extracts the temporary payment processing number from the business fee determination result. This number is used to query for existing non-completed temporary financial settings records.

| # | Type | Code |
|---|------|------|
| 1 | SET | `tmpPayPrcNoEohtlJmte = convNullToBlank(getRsltMsgListValue(outMapEKK1021C011, EKK1021C011CBSMsg.EKK1021C011CBSMSG1LIST, EKK1021C011CBSMsg1List.TMP_PAY_PRC_NO))` // Extract temporary payment processing number |

**Block 7.3** — [IF: Temporary Payment Processing Number Exists] (Condition: `null != tmpPayPrcNoEohtlJmte && !"".equals(tmpPayPrcNoEohtlJmte)`) (L7945)

> When the business fee determination returned a valid temporary payment processing number, proceed with financial settings registration.

**Block 7.3.1** — [Fetch Non-Completed Temporary Financial Settings] (L7950)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `outMapEKK1021A010 = getIcjknSetteNotFin(handle, param, trgtData, svcKeiNo, svcKeiUcwkNo, tmpPayPrcNoEohtlJmte)` // Query for existing non-completed temporary financial settings records |

**Block 7.3.2** — [Update Registration Map with Actual bmpUm] (L7953)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `editJmteTorokuMap(jmteTorokuMap, trgtData, bmpUm, svcKeiUcwkStat)` // Update with actual optional-phone flag (bmpUm), not null |

**Block 7.3.3** — [IF: Number Addition / ELSE: Number Change] (Condition: `JKKSvcConst.IDO_DIV_HTELNOADD.equals(idoDiv)`) [CONSTANT: IDO_DIV_HTELNOADD="00041"] (L7958)

> **IF branch (Number Addition)**: For photo electric phone number addition, check if an existing temporary financial settings record exists. If it exists (outMapEKK1021A010 not null), update it via editInMsgEKK1021C010; otherwise create a new one via addIcjkn4Jmte.

**Block 7.3.3.1** — [IF: Existing Record Found — Update] (Condition: `null != outMapEKK1021A010`) (L7965)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `inMapEKK1021C010 = telInfoMapper.editInMsgEKK1021C010(param, trgtData, outMapEKK1021A010, jmteTorokuMap)` // Build update input message |
| 2 | CALL | `callSvcInter(handle, param, inMapEKK1021C010)` // Invoke service component for update |

**Block 7.3.3.2** — [ELSE: No Existing Record — Create] (L7972)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `JKKBpCommon.addIcjkn4Jmte(getClass(), param, handle, jmteTorokuMap)` // Create new temporary financial settings registration |

**Block 7.3.4** — [ELSE-IF: Number Change] (Condition: `JKKSvcConst.IDO_DIV_HTELNOCHGE.equals(idoDiv)`) [CONSTANT: IDO_DIV_HTELNOCHGE="00042"] (L7979)

> **Number change case**: Always create (not update) a temporary financial settings record. For number change operations, the method always delegates to `JKKBpCommon.addIcjkn4Jmte`.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `JKKBpCommon.addIcjkn4Jmte(getClass(), param, handle, jmteTorokuMap)` // Create temporary financial settings registration for number change |

**Block 8** — [IF: Optional-Phone Temporary Financial Settings Registration] (Condition: `ichijKnSetteBmpAddFlg`) (L8000)

> Executes the optional-phone temporary financial settings registration flow. This is independent of the standard flow above — both can execute in sequence. Handles phone number assignment fee processing (電話番号割当手続き) for optional-phone scenarios.

**Block 8.1** — [Business Fee Determination for Optional Phone] (L8006)

> Calls telInfoMapper with `bmpUm = JKKSvcConst.BMP_UM_ARI` ("1") to explicitly indicate the optional phone is present, and passes null for maintenance identification code.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `inMapEKK1021C011 = telInfoMapper.editInMsgEKK1021C011(param, trgtData, outMapEKK0081A010, idoDiv, JKKSvcConst.BMP_UM_ARI, null)` // Business fee determination for optional phone // [-> BMP_UM_ARI = "1"] |
| 2 | CALL | `outMapEKK1021C011 = callSvcInter(handle, param, inMapEKK1021C011)` // Invoke service component |

**Block 8.2** — [Retrieve Temporary Payment Processing Number for Optional Phone] (L8014)

| # | Type | Code |
|---|------|------|
| 1 | SET | `tmpPayPrcNoBmpJmte = convNullToBlank(getRsltMsgListValue(outMapEKK1021C011, EKK1021C011CBSMsg.EKK1021C011CBSMSG1LIST, EKK1021C011CBSMsg1List.TMP_PAY_PRC_NO))` // Extract temporary payment processing number for phone number assignment fee |

**Block 8.3** — [IF: Temporary Payment Processing Number Exists] (Condition: `null != tmpPayPrcNoBmpJmte && !"".equals(tmpPayPrcNoBmpJmte)`) (L8022)

**Block 8.3.1** — [Fetch Non-Completed Temporary Financial Settings] (L8027)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `outMapEKK1021A010 = getIcjknSetteNotFin(handle, param, trgtData, svcKeiNo, svcKeiUcwkNo, tmpPayPrcNoBmpJmte)` // Query non-completed temporary financial settings for optional phone |

**Block 8.3.2** — [OM-2014-0002267: Update Optional Phone Financial Setting Fields] (Condition: `JKKSvcConst.BMP_UM_ARI.equals(bmpUm) && isNull(trgtData.get(JKKTelnoInfoAddConstCC.BMP_ICJKN_SETTE_CD)) && JKKSvcConst.IDO_DIV_HTELNOADD.equals(idoDiv)`) [CONSTANT: BMP_UM_ARI="1", IDO_DIV_HTELNOADD="00041"] (L8030)

> When optional phone is present ("1"), no temporary financial setting code exists, and the movement type is number addition: if an existing record was fetched, populate the optional phone financial setting code, designated rate, and designated amount into trgtData.

**Block 8.3.2.1** — [IF: Record Found in Optional Phone Financial Settings Fetch] (Condition: `outMapEKK1021A010 != null`) (L8033)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `trgtData.put(JKKTelnoInfoAddConstCC.BMP_ICJKN_SETTE_CD, convBlankToNull(getRsltMsgListValue(outMapEKK1021A010, EKK1021A010CBSMsg.EKK1021A010CBSMSG1LIST, EKK1021A010CBSMsg1List.ICJKN_SETTE_CD)))` // Set optional phone temporary financial setting code |
| 2 | EXEC | `trgtData.put(JKKTelnoInfoAddConstCC.BMP_ICJKN_SHITEI_RT, convBlankToNull(getRsltMsgListValue(outMapEKK1021A010, EKK1021A010CBSMsg.EKK1021A010CBSMSG1LIST, EKK1021A010CBSMsg1List.ICJKN_SHITEI_RT)))` // Set optional phone temporary financial designated rate |
| 3 | EXEC | `trgtData.put(JKKTelnoInfoAddConstCC.BMP_ICJKN_SHITEI_AMNT, convBlankToNull(getRsltMsgListValue(outMapEKK1021A010, EKK1021A010CBSMsg.EKK1021A010CBSMSG1LIST, EKK1021A010CBSMsg1List.ICJKN_SHITEI_AMNT)))` // Set optional phone temporary financial designated amount |

**Block 8.3.3** — [Update Optional Phone Registration Map] (L8043)

> Updated in IT2-2013-0000354 MOD 2013/04/09: now passes `idoDiv` as a new parameter to `editBmpJmteTorokuMap` (was previously calling `editJmteTorokuMap`).

| # | Type | Code |
|---|------|------|
| 1 | CALL | `editBmpJmteTorokuMap(jmteTorokuMap, trgtData, bmpUm, svcKeiUcwkStat, idoDiv)` // Update optional phone registration map with movement type (IT2-2013-0000354 MOD) |

**Block 8.3.4** — [IF: Optional Phone Present] (Condition: `JKKSvcConst.BMP_UM_ARI.equals(bmpUm)`) [CONSTANT: BMP_UM_ARI="1"] (L8050)

> When the optional phone flag indicates presence, process financial settings for optional phone number addition or change.

**Block 8.3.4.1** — [IF: Number Addition with Optional Phone] (Condition: `JKKSvcConst.IDO_DIV_HTELNOADD.equals(idoDiv)`) [CONSTANT: IDO_DIV_HTELNOADD="00041"] (L8058)

**Block 8.3.4.1.1** — [IF: Existing Record — Update] (Condition: `null != outMapEKK1021A010`) (L8064)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `inMapEKK1021C010 = telInfoMapper.editInMsgEKK1021C010(param, trgtData, outMapEKK1021A010, jmteTorokuMap)` // Build update input message for optional phone number addition |
| 2 | CALL | `callSvcInter(handle, param, inMapEKK1021C010)` // Invoke service component for update |

**Block 8.3.4.1.2** — [ELSE: Create New] (L8072)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `JKKBpCommon.addIcjkn4Jmte(getClass(), param, handle, jmteTorokuMap)` // Create new temporary financial settings for optional phone number addition |

**Block 8.3.4.2** — [ELSE-IF: Number Change with Optional Phone] (Condition: `JKKSvcConst.IDO_DIV_HTELNOCHGE.equals(idoDiv)`) [CONSTANT: IDO_DIV_HTELNOCHGE="00042"] (L8079)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `JKKBpCommon.addIcjkn4Jmte(getClass(), param, handle, jmteTorokuMap)` // Create temporary financial settings for optional phone number change |

**Block 8.3.5** — [ELSE: Optional Phone Absent — Logical Deletion] (L8086)

> When the optional phone flag is NOT "1" (i.e., optional phone is absent), but an existing temporary financial settings record was found (outMapEKK1021A010 not null), perform logical deletion of the previously existing optional-phone financial settings record. This handles the case where an optional phone was previously registered but is now being removed.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `inMapEKK1021E010 = telInfoMapper.editInMsgEKK1021E010(param, trgtData, outMapEKK1021A010)` // Build logical deletion input message |
| 2 | CALL | `callSvcInter(handle, param, inMapEKK1021E010)` // Invoke service component for logical deletion (一時金設定論理削除処理) |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `addJmte` | Method | Contract service fee registration — handles temporary financial settings for photo electric phone number operations |
| `jkktelno` | Abbreviation | Telco (電話) number — refers to phone number services in the K-Opticom system |
| `tmte` / `jmte` | Abbreviation | Temporary financial setting (一時金設定) — interim fee charges applied before final billing |
| `ido_div` | Field | Movement classification (異動区分) — code indicating the type of service operation (addition, change, cancellation, etc.) |
| `ido_div_adchgadd` | Constant | Address change/registration (住所変更・登録) = "00019" |
| `ido_div_adchgfix` | Constant | Address change/determination (住所変更・確定) = "00020" |
| `ido_div_htelnoadd` | Constant | Photo electric phone/number addition (光電話・番号追加) = "00041" |
| `ido_div_htelnochge` | Constant | Photo electric phone/number change (光電話・番号変更) = "00042" |
| `prc_grp_cd` | Field | Pricing group code (料金グループコード) — classifies the pricing category of the service (e.g., eo光 home type "02", eo光 telephone "10") |
| `mans_skbt_cd` | Field | Maintenance identification code (メンテナンス識別コード) — identifies the type of maintenance work associated with the service |
| `svc_kei_no` | Field | Service contract number (サービス契約番号) — unique identifier for a service contract |
| `svc_kei_ucwk_no` | Field | Service contract detail number (サービス契約内訳番号) — internal tracking ID for a service contract line item |
| `mskm_dtl_no` | Field | Order detail number (申込明細番号) — unique identifier for an order line item |
| `bmp_um` | Field | Optional phone presence/absence (番ポ有無) — indicates whether optional phone services are attached ("1" = present, "0" = absent) |
| `bmp_um_ari` | Constant | Optional phone present (番ポ有) = "1" |
| `bmp_icjkn_sette_cd` | Field | Optional phone temporary financial setting code (番ポ一時金設定コード) |
| `bmp_icjkn_shitei_rt` | Field | Optional phone temporary financial designated rate (番ポ一時金指定率) |
| `bmp_icjkn_shitei_amnt` | Field | Optional phone temporary financial designated amount (番ポ一時金指定金額) |
| `kari_touroku_flg` | Field | Temporary registration flag (一時登録フラグ) — indicates whether temporary registration is active ("0" = off, "1" = on) |
| `flg_off` | Constant | Flag off (フラグ:オフ) = "0" |
| `ichij_kn_sette` | Abbreviation | Temporary financial settings (一時金設定) — interim billing charges |
| `ichij_kn_sette_add_flg` | Variable | Registration judgment flag for standard temporary financial settings |
| `ichij_kn_sette_bmp_add_flg` | Variable | Registration judgment flag for optional-phone temporary financial settings |
| `tmp_pay_prc_no` | Field | Temporary payment processing number (一時支払処理番号) — returned by business fee determination to correlate with financial settings |
| `icjkn_sette_cd` | Field | Temporary financial setting code (一時金設定コード) — "01" = none, "02" = present, "03" = half amount, "04" = designated amount |
| `telno` | Abbreviation | Telephone number |
| `htel` | Abbreviation | Photo electric telephone (光電話) — NTT fiber-optic telephone service |
| `bmp` | Abbreviation | Optional phone service (番ポ / 番外番号) — additional phone number service attached to the main contract |
| `EKK0081A010` | SC Code | Service contract unique inquiry — retrieves service contract header data |
| `EKK1021C010` | SC Code | Temporary financial settings update — business fee update service component |
| `EKK1021C011` | SC Code | Business fee determination — business fee assessment service component |
| `EKK1021E010` | SC Code | Temporary financial settings logical deletion — logically deletes existing temporary financial settings records |
| `addIcjkn4Jmte` | Method | Create temporary financial settings registration — universal create method for all temporary financial setting types |
| `editInMsgEKK1021C010` | Method | Build input message for temporary financial settings update |
| `editInMsgEKK1021C011` | Method | Build input message for business fee determination |
| `editInMsgEKK1021E010` | Method | Build input message for temporary financial settings logical deletion |
| `callSvcInter` | Method | Service component invocation gateway — generic method to call any service component with input message and receive output |
| `getIcjknSetteNotFin` | Method | Retrieve non-completed temporary financial settings — queries existing pending temporary financial settings by payment processing number |
| `editJmteTorokuMap` | Method | Setup temporary financial settings registration map — populates registration map with default values |
| `editBmpJmteTorokuMap` | Method | Setup optional-phone temporary financial settings registration map — populates registration map with optional-phone specific values |
| `jdgIchijKnSette` | Method | Determine standard temporary financial settings registration required — business rule evaluation |
| `jdgIchijKnSetteBmp` | Method | Determine optional-phone temporary financial settings registration required — business rule evaluation |
| `OM-2013-0003573` | Ticket | Commercial requirement — address change number addition to prevent omitted service fee charges |
| `OM-2014-0002267` | Ticket | Enhancement — populate optional phone financial setting fields when number addition with optional phone and no existing code |
| `IT2-2013-0000354` | Ticket | Modification — pass movement type (idoDiv) to editBmpJmteTorokuMap for proper handling |
