# Business Logic — JFUCngSeikyushoYohiCC.setInMapSeikyOpSvcKeiRegist() [29 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `com.fujitsu.futurity.bp.custom.common.JFUCngSeikyushoYohiCC` |
| Layer | CC/Common Component (Controller-Component, shared data-mapping helper) |
| Module | `common` (Package: `com.fujitsu.futurity.bp.custom.common`) |

## 1. Role

### JFUCngSeikyushoYohiCC.setInMapSeikyOpSvcKeiRegist()

This method performs the **billing option service contract registration** data-mapping operation for the customer change (請求変更) screen workflow. Its business purpose is to prepare a parameter map (`inMap`) with all required fields so that a downstream CBS/SC component can persist a new billing option service contract line item to the database.

The method acts as a **data builder / preparer** — it does not execute any database operation itself. Instead, it assembles a flat `HashMap` carrying 10 key-value pairs: billing contract number, SYSID, billing option service code, price code, price plan code, application detail number, service contract number, change classification, and the pre-update datetime stamp. These values are drawn from method parameters, the incoming request parameter object, and the `netKeiMap` (service contract info map for network services).

It supports a single service type: **billing option services (請求オプションサービス)** — specifically, the "invoice procedure fee" variant identified by code `E001`. The method implements a **sequential builder pattern**, where each `inMap.put()` call adds one field to the aggregate map. The hardcoded constants (service code `E001`, price code `E01`, price plan code `PE0101`, change classification `00015`) indicate this method is dedicated to a specific billing scenario rather than a generic multi-branch dispatcher.

Its role in the larger system is as a **shared mapping utility** called from the customer change order processing method (`cngSeikyushoYohi()`). It bridges the UI request layer and the CBS service layer by translating screen-level parameters into a structured map format expected by the billing option service contract registration CBS.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["setInMapSeikyOpSvcKeiRegist<br/>Billing Option Svc Contract Registration"])

    START --> STEP1["JFUBaseUtil.setFuncCode<br/>FUNC_CD_1 = \"1\"<br/>(Check & Register mode)"]
    STEP1 --> STEP2["inMap = param.getData(fixedText)<br/>Get request parameter map"]
    STEP2 --> STEP3["inMap.put(SEIKY_KEI_NO, seikyKeiNo)<br/>Billing contract number"]
    STEP3 --> STEP4["inMap.put(SYSID, netKeiMap.get(SYSID))<br/>System ID from network contract"]
    STEP4 --> STEP5["inMap.put(SEIOPSVC_CD, E001)<br/>Billing Option Svc Code = \"E001\"<br/>(Invoice procedure fee)"]
    STEP5 --> STEP6["inMap.put(PCRS_CD, E01)<br/>Price Code = \"E01\""]
    STEP6 --> STEP7["inMap.put(PPLAN_CD, PE0101)<br/>Price Plan Code = \"PE0101\""]
    STEP7 --> STEP8["inMap.put(MSKM_DTL_NO, mskmDtlNo)<br/>Application detail number"]
    STEP8 --> STEP9["inMap.put(SVC_KEI_NO, netKeiMap.get(SVC_KEI_NO))<br/>Service contract number from network"]
    STEP9 --> STEP10["inMap.put(IDO_DIV, 00015)<br/>Change Classification = \"00015\"<br/>(Before update)"]
    STEP10 --> STEP11["inMap.put(UPD_DTM_BF, updDtm)<br/>Pre-update datetime"]
    STEP11 --> END(["Return void / Next"])

    START --> STEP1
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `param` | `IRequestParameterReadWrite` | Request parameter object carrying screen input data. Provides `getData(fixedText)` to retrieve the target `HashMap` for this registration flow. Acts as the primary data exchange mechanism between the screen layer and the CBS layer. |
| 2 | `fixedText` | `String` | Service message key used as the map lookup key in `param.getData(fixedText)`. Identifies which segment of the request parameter map to populate — in this case, the billing option service contract registration segment. |
| 3 | `seikyKeiNo` | `String` | Billing contract number (請求契約番号) — the unique identifier for the billing contract to which this option service line item belongs. Populated directly from the method parameter. |
| 4 | `mskmDtlNo` | `String` | Application detail number (申込明細番号) — the unique identifier for the order detail line item. Links this billing option registration to the specific order line. |
| 5 | `updDtm` | `String` | Update date/time (更新年月日時分秒) — represents the "before update" timestamp. Captures the current state of the record before modification, used for audit trail and optimistic locking. |
| 6 | `netKeiMap` | `HashMap` | Service contract information map for network services (サービス契約情報-ネット). Contains SYSID and SVC_KEI_NO (service contract number) extracted from the network-side contract data. Provides cross-referenced data from the network service contract context. |

**External/instance fields read:** None. This method is purely parameter-driven and stateless.

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `JFUBaseUtil.setFuncCode` | JFUBaseUtil | - | Sets function code `FUNC_CD_1 = "1"` (check & register mode) on the request parameter. Mode indicator for downstream processing. |
| R | `param.getData` | (inline) | - | Retrieves the target `HashMap` from the request parameter object using `fixedText` as the key. Reads the pre-allocated map structure. |
| R | `netKeiMap.get(SYSID)` | (inline) | - | Reads the SYSID from the network service contract info map. Used as a foreign key linking billing contract to network service. |
| R | `netKeiMap.get(SVC_KEI_NO)` | (inline) | - | Reads the service contract number from the network service contract info map. Links this billing option to the parent service contract. |

**Note:** This method itself performs no database or CBS invocation. It is purely a **data-preparation method** that populates a map. The actual Create (C) operation on the billing option service contract entity is executed by a downstream CBS/SC component (e.g., a `executeOdrHakkoJokenAdd`-style method) that receives this populated map.

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | `JFUCngSeikyushoYohiCC.cngSeikyushoYohi()` | `cngSeikyushoYohi()` -> `setInMapSeikyOpSvcKeiRegist(param, fixedText, seikyKeiNo, mskmDtlNo, updDtm, netKeiMap)` | `param.getData [R]`, `netKeiMap.get(SYSID) [R]`, `netKeiMap.get(SVC_KEI_NO) [R]`, `JFUBaseUtil.setFuncCode [-]` |

**Terminal operations from this method:** `param.getData` [R], `JFUBaseUtil.setFuncCode` [-], `netKeiMap.get(SYSID)` [R], `netKeiMap.get(SVC_KEI_NO)` [R].

## 6. Per-Branch Detail Blocks

**Block 1** — [EXEC] `(function code setup) (L797)`

Sets the function code on the request parameter to indicate "check & register" mode.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `JFUBaseUtil.setFuncCode(param, fixedText, JPCModelConstant.FUNC_CD_1)` // Function code setup (check & register) [-> FUNC_CD_1 = "1"] |

**Block 2** — [EXEC] `(user data retrieval) (L800)`

Retrieves the target HashMap from the request parameter object using `fixedText` as the lookup key.

| # | Type | Code |
|---|------|------|
| 1 | SET | `HashMap inMap = (HashMap)param.getData(fixedText)` // User data retrieval — get request parameter map |

**Block 3** — [EXEC] `(billing contract number) (L803)`

Stores the billing contract number into the map.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `inMap.put(EKK0441D010CBSMsg.SEIKY_KEI_NO, seikyKeiNo)` // Billing contract number |

**Block 4** — [EXEC] `(SYSID) (L805)`

Reads the SYSID from the network service contract map and stores it.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `inMap.put(EKK0441D010CBSMsg.SYSID, netKeiMap.get(EKK0081B528CBSMsg1List.SYSID))` // SYSID — system identifier from network contract |

**Block 5** — [EXEC] `(billing option service code) (L807)`

Sets the billing option service code to the hardcoded invoice procedure fee value.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `inMap.put(EKK0441D010CBSMsg.SEIOPSVC_CD, JFUStrConst.KK0761_SEIOPSVC_CD_E001)` // Billing option service code [-> KK0761_SEIOPSVC_CD_E001 = "E001" (Invoice procedure fee)] |

**Block 6** — [EXEC] `(price code) (L809)`

Sets the hardcoded price code.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `inMap.put(EKK0441D010CBSMsg.PCRS_CD, JFUStrConst.CD00134_E01)` // Price code [-> CD00134_E01 = "E01"] |

**Block 7** — [EXEC] `(price plan code) (L811)`

Sets the hardcoded price plan code.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `inMap.put(EKK0441D010CBSMsg.PPLAN_CD, JFUStrConst.CD00565_PE0101)` // Price plan code [-> CD00565_PE0101 = "PE0101"] |

**Block 8** — [EXEC] `(application detail number) (L813)`

Stores the application/order detail number into the map.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `inMap.put(EKK0441D010CBSMsg.MSKM_DTL_NO, mskmDtlNo)` // Application detail number |

**Block 9** — [EXEC] `(service contract number) (L815)`

Reads the service contract number from the network service contract map and stores it.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `inMap.put(EKK0441D010CBSMsg.SVC_KEI_NO, netKeiMap.get(EKK0081B528CBSMsg1List.SVC_KEI_NO))` // Service contract number |

**Block 10** — [EXEC] `(change classification) (L817)`

Sets the hardcoded change classification code for "before update" state.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `inMap.put(EKK0441D010CBSMsg.IDO_DIV, JFUStrConst.CD00576_00015)` // Change classification [-> CD00576_00015 = "00015" (Before update)] |

**Block 11** — [EXEC] `(before-update datetime) (L819)`

Stores the pre-update timestamp for audit purposes.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `inMap.put(EKK0441D010CBSMsg.UPD_DTM_BF, updDtm)` // Before-update date/time (更新年月日時分秒(更新前)) |

**Block 12** — [RETURN] `(end of method) (L822)`

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return;` // void method — map is populated, caller proceeds |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `setInMapSeikyOpSvcKeiRegist` | Method | Billing option service contract registration mapping — populates request parameter map with billing option service registration fields |
| `seikyKeiNo` | Field | Billing contract number (請求契約番号) — unique identifier for the billing contract |
| `mskmDtlNo` | Field | Application detail number (申込明細番号) — unique identifier for the order detail line item |
| `updDtm` | Field | Update date/time (更新年月日時分秒) — timestamp used for audit trail; "before update" version in this context |
| `netKeiMap` | Field | Service contract information map for network services (サービス契約情報-ネット) — cross-reference map holding network-side contract data |
| `inMap` | Field | Internal working map — the HashMap populated with registration fields for the downstream CBS call |
| `fixedText` | Parameter | Service message key — identifies the map segment within the request parameter object |
| `SEIKY_KEI_NO` | Constant | Billing contract number field key in the map |
| `SYSID` | Constant | System ID — unique system-level identifier, sourced from the network contract map |
| `SEIOPSVC_CD` | Constant | Billing option service code field key in the map |
| `KK0761_SEIOPSVC_CD_E001` | Constant | Billing option service code value "E001" — specifically "請求書発行手数料" (invoice procedure fee) |
| `PCRS_CD` | Constant | Price code field key in the map |
| `CD00134_E01` | Constant | Price code value "E01" — billing price classification code |
| `PPLAN_CD` | Constant | Price plan code field key in the map |
| `CD00565_PE0101` | Constant | Price plan code value "PE0101" — specific price plan identifier |
| `MSKM_DTL_NO` | Constant | Application detail number field key in the map |
| `SVC_KEI_NO` | Constant | Service contract number field key in the map |
| `IDO_DIV` | Constant | Change classification field key in the map |
| `CD00576_00015` | Constant | Change classification value "00015" — indicates "before update" (更新前) state |
| `UPD_DTM_BF` | Constant | Before-update date/time field key in the map (BF = Before) |
| `EKK0441D010CBSMsg` | Class | Message constant class for CBS (EKK0441D010CBS) — defines map keys for billing option service contract registration |
| `EKK0081B528CBSMsg1List` | Class | Message constant class for CBS (EKK0081B528CBS) — defines map keys for network service contract data |
| `JPCModelConstant.FUNC_CD_1` | Constant | Function code "1" — indicates "check & register" (チェック＆登録) processing mode |
| `JFUBaseUtil` | Class | Base utility component — provides common functions such as `setFuncCode` for setting processing mode on request parameters |
| `IRequestParameterReadWrite` | Interface | Request parameter read/write interface — data exchange contract between screen layer and CBS layer |
| FUNC_CD_1 | Constant | Function code "1" — sets check and register mode for the CBS processing pipeline |
| Billing Option Service | Business term | 請求オプションサービス — optional add-on services attached to a billing contract (e.g., invoice procedure fee, additional features) |
| Invoice Procedure Fee | Business term | 請求書発行手数料 — the fee charged for generating and issuing a billing statement |
| Price Code | Business term | 料金コード — classifies the type of price/charge (e.g., monthly fee, one-time fee) |
| Price Plan Code | Business term | 料金プランコード — identifies the specific pricing plan tier or package |
| Change Classification | Business term | 異動区分 — categorizes the type of contract change (new, modify, cancel, before-update, etc.) |
| SYSID | Business term | System ID — unique identifier assigned by the system to a contract or service record |
| CBS | Acronym | Contract Billing System — the core billing contract processing subsystem |
| SC | Acronym | Service Component — a reusable business logic component that implements specific operations (CRUD, validation, etc.) |
| CC | Acronym | Change Component / Common Component — a data-mapping and preparation component in the Fujitsu Futurity framework |
