# Business Logic — FUW00164SFLogic.finMskm() [440 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.FUW00164SF.FUW00164SFLogic` |
| Layer | Service / Business Logic (Web frontend business layer) |
| Module | `FUW00164SF` (Package: `eo.web.webview.FUW00164SF`) |

## 1. Role

### FUW00164SFLogic.finMskm()

This method is the **subscription completion (finMskm = Finish Maskum/Finish Gas subscription) handler** invoked when the user clicks the "submit" button on the gas (electricity) application screen. It orchestrates the full end-to-end registration of a multi-service subscription contract for an e-Onet (fiber broadband) customer — including service contract registration, device provisioning, option service enrollment, billing setup, and notification email dispatch. The method implements a **builder + routing pattern**: it first assembles a comprehensive `inputMap` via a chain of mapper method calls (each responsible for a specific service registration), then delegates the actual backend invocation to `invokeService()`. It supports two operational modes: **bulk registration** (for condominiums where all households subscribe uniformly, identified by application condition code "13") and **single-household registration** (the standard per-customer flow). Upon success, it sends a subscription-completion notification email and navigates the user to the completion screen (FUW00122).

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["Start: finMskm - Subscription Completion"])

    START --> B1["Initialize Form Beans"]
    B1 --> RETRIEVE["Retrieve Beans: eonet, keiyakuSvc, mansioninfo, pymy"]
    RETRIEVE --> CHKGAS["chkGasMskmInfo()"]
    CHKGAS --> |false| RET_TRUE["Return true"]
    CHKGAS --> |true| SETGAS["setGasMskmInfo()"]
    SETGAS --> OPEDATE["Get opeDate"]
    OPEDATE --> KENSET["Set application area and mail form info"]
    KENSET --> MAPINIT["Generate paramMap, mappers, inputMap"]
    MAPINIT --> GETJOKEN["Get knykeiMskmJokenCd"]
    GETJOKEN --> COND1{"Joken condition"}

    COND1 --> |All households| BULK["UseUseCaseFUSV0161; bulk mapping"]
    COND1 --> |Single household| SINGLE["UseUseCaseFUSV0160; mapper mapping setup"]

    BULK --> POST1["Post-process: getWorkKiseiList"]
    SINGLE --> MSET1["setMskmDmenXmlMap, service mappings"]
    MSET1 --> MSET2["Contract, device, approval mappings"]
    MSET2 --> MSET3["Service contract, front agreement mappings"]
    MSET3 --> MSET4["IoT option service contract mappings"]
    MSET4 --> MSET5["ISP, security pack, security mappings"]
    MSET5 --> MSET6["Famipal, device cancel, discount mappings"]
    MSET6 --> MSET7["Data items, latest contract mappings"]
    MSET7 --> TBCOND{"Tablet or purchased device"}

    TBCOND --> |tablet or purchased| TB_ON["Dealer agreement, Smart Link, IoT service, discount mappings"]
    TBCOND --> |normal| TB_OFF["Skip tablet mappings"]

    TB_OFF --> POSTMAP1["Phone number, transfer, dialing check mappings"]
    TB_ON --> POSTMAP1

    POSTMAP1 --> POSTMAP2["Phone agreement, engineering mappings"]
    POSTMAP2 --> POSTMAP3["Option service contract, sub-option mappings"]
    POSTMAP3 --> POSTMAP4["Initial request, screening, credit mappings"]
    POSTMAP4 --> POSTMAP5["Billing change, payment method, prepaid mappings"]
    POSTMAP5 --> POSTMAP6["Progress, answer number, email, work mappings"]
    POSTMAP6 --> PHCOND{"Phone service requested"}

    PHCOND --> |Yes| PH_ON["Phone service contract mappings"]
    PHCOND --> |No| PH_OFF["Skip phone service mappings"]

    PH_OFF --> FINAL1["Auto application, data extraction mappings"]
    PH_ON --> FINAL1

    FINAL1 --> FINAL2["Backyard, customer, same billing check mappings"]
    FINAL2 --> FINAL3["Billing option service registration"]
    FINAL3 --> ELECCOND{"Electric guide requested"}

    ELECCOND --> |Yes| ELEC_ON["Electric guide work registration"]
    ELECCOND --> |No| ELEC_OFF["Skip electric guide mapping"]

    ELEC_OFF --> OUTMAP["Generate outputMap; setMskmDmenXmlMapWebNew"]
    ELEC_ON --> OUTMAP

    OUTMAP --> INVOKE["invokeService call"]
    INVOKE --> |success| POST2["AxM integration service"]
    INVOKE --> |exception| EXCEPT["Exception Handler"]

    EXCEPT --> EKKAERR{"Template EKKA0010001"}
    EKKAERR --> |Yes| EXCEPT_EKKA["Credit error sub-branches"]
    EKKAERR --> |No| OTHERERR["Check other template IDs"]
    OTHERERR --> THROW3["JCCBusinessException ERROR_CODE_0204"]

    EXCEPT_EKKA --> RET_TRUE
    OTHERERR --> RET_TRUE
    OTHERERR --> THROW1["JCCBusinessException ERROR_CODE_0102"]
    OTHERERR --> THROW2["JCCBusinessException ERROR_CODE_0103"]

    POST2 --> KISEI{"Business restriction"}
    KISEI --> |No| KISEI_NOK["Bulk getdatamap + mail registration"]
    KISEI --> |Yes| KISEI_Y["Update timestamp"]
    KISEI_NOK --> SCREEN
    KISEI_Y --> SCREEN["Set next screen FUW00122"]

    SCREEN --> USECASE{"Joken condition"}
    USECASE --> |All households| UC_BULK["usecaseId = FUSV0161"]
    USECASE --> |Single| UC_SINGLE["usecaseId = FUSV0160"]
    UC_BULK --> MAIL["Send subscription completion email"]
    UC_SINGLE --> MAIL
    MAIL --> END(["Return true"])
    RET_TRUE --> END
    THROW1 --> END
    THROW2 --> END
    THROW3 --> END
```

**CRITICAL -- Constant Resolution:**
- `KNYKEI_MSKM_JOKEN_CD_13 = "13"` (全戸一括 / "All households unified") — when the application condition code equals "13", bulk registration mode is used with pre-mapping via `callSetdatamap`. Otherwise, single-household mode applies with full mapper chain.
- `USECASE_ID_FUSV0160` — UseCase ID for single-household registration (default).
- `USECASE_ID_FUSV0161` — UseCase ID for bulk/all-household registration.
- `JFUStrConst.MSKM_KBN_HON` — Flag value indicating the "main application" (本申込).
- `JFUStrConst.SMALIN_TABLET_MSKM` — Indicator that a tablet device is being registered.
- `JFUStrConst.GH_TANMT_BUY` — Indicator that a home purchased device is being used.
- `JFUStrConst.SELECT_SVC_TEL_CHOICE` — Indicator that phone service is being subscribed.
- `JFUStrConst.TEL_COURSE_2BANGOU_SVC` — Indicator that the 2nd number phone option is selected.
- `JFUStrConst.ELEC_GUIDE_KIBO_ARI` — Indicator that electric guide service is requested.
- `JPCModelConstant.FUNC_CD_1` / `JPCModelConstant.FUNC_CD_2` — Function code flags for mapper dispatch.
- `JFUStrConst.RELATION_CHECK_ERR_EA` — Error flag indicating a relationship check error.
- `ERR_CR_CARDNUMBER`, `ERR_CR_CARDEXP`, `ERR_CR_AMOUNT` — Credit card error item identifiers.
- `ITEMID_KEY_SVC_KEI_ERR`, `ITEMID_KEY_TELNO_ERR`, `ITEMID_KEY_AGING_TG_VALUE_ERR`, `ITEMID_TELNO_ERR` — Error item IDs for specific validation failures.
- `EKKA0010001` — Initial request request Template ID.
- `EKK0081B524` — Service contract list agreement (same billing line information retrieval) Template ID.
- `EZM0121A010` — Phone number agreement Template ID.
- `EZM0111B030` — Engineering list agreement (engineering target values) Template ID.
- `ETU0071A010` — Number portability available area agreement Template ID.
- `EZM0121C010` — Number transfer area check Template ID.
- `NOT_IKT` — Constant used in credit request processing map.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| - | (none) | - | This method takes no explicit parameters. All input is derived from form beans maintained as instance state (shared form bean, service form bean, E-onet bean, contract service bean, mansion info bean, payment method bean). |

**Instance fields / external state read:**

| Source | Description |
|--------|-------------|
| `getCommonInfoBean()` | Shared form bean — holds cross-screen state including next screen routing, work restriction flags, and application area data |
| `getServiceFormBean()` | Service form bean — carries service-level data such as service type selections |
| `getEonet(web_new_infobean)` | E-onet (fiber broadband) bean — contains device type info (tablet, purchased home device) |
| `getKeiyakusvcinfo(web_new_infobean)` | Contract service bean — holds contract service info including phone service selections |
| `getMansioninfo(web_new_infobean)` | Mansion info bean — carries apartment/condominium data including the `knykeiMskmJokenCd` (application condition code: single vs. all-household) |
| `getPywyInfo(web_new_infobean)` | Payment method bean — stores payment method details including credit card validation results |
| `getWorkKiseiList(commoninfoBean)` | Work restriction list — determines whether business restrictions are active |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| C | `FUSV0160_FUSV0160OPDBMapper.setMskmDmenXmlMap` | FUSV0160 | - | Sets application screen XML map for data preservation |
| C | `FUSV0160_FUSV0160OPDBMapper.setFUSV016006CC` | FUSV0160 | - | Location/residence info segmentation mapping |
| C | `FUSV0160_FUSV0160OPDBMapper.setFUSV016007CC` | FUSV0160 | - | Contract residence info segmentation mapping |
| C | `FUSV0160_FUSV0160OPDBMapper.setFUSV016008CC` | FUSV0160 | - | Number portability location/residence info segmentation mapping |
| C | `FUSV0160_FUSV0160OPDBMapper.setFUSV016010CC` | FUSV0160 | - | Mobile device delivery destination info segmentation mapping |
| C | `FUSV0160_FUSV0160OPDBMapper.setEKK0011C050` | EKK0011C050 | - | Preliminary application flag change mapping |
| C | `FUSV0160_FUSV0160OPDBMapper.setEKK0011C110` | EKK0011C110 | - | Application content approval mapping |
| C | `FUSV0160_FUSV0160OPDBMapper.setEKK0341D010` | EKK0341D010 | - | Device provision service contract registration |
| C | `FUSV0160_FUSV0160OPDBMapper.setEKK2811B503` | EKK2811B503 | - | Device operation service contract list agreement (front) |
| C | `FUSV0160_FUSV0160OPDBMapper.setEKK0341B002` | EKK0341B002 | - | Device provision service contract list agreement |
| C | `FUSV0160_FUSV0160OPDBMapper.setEKK0341C330` | EKK0341C330 | - | Device provision service contract cancellation |
| C | `FUSV0160_FUSV0160OPDBMapper.setEKK0091A010` | EKK0091A010 | - | Service contract e-onet agreement |
| C | `FUSV0160_FUSV0160OPDBMapper.setEKK0341D010Tkn` | EKK0341D010 | - | Device provision service contract registration (token) |
| C | `FUSV0160_FUSV0160OPDBMapper.setEKK2811D010Net02` | EKK2811D010 | - | IoT option service contract registration (Net) |
| C | `FUSV0160_FUSV0160OPDBMapper.setEKK2811D010Tel02` | EKK2811D010 | - | IoT option service contract registration (Tel) |
| C | `FUSV0160_FUSV0160OPDBMapper.setEKK0391D010` | EKK0391D010 | - | Option service contract registration |
| C | `FUSV0160_FUSV0160OPDBMapper.setFUSV016040SC` | FUSV0160 | - | Service contract e-onet agreement SC |
| C | `FUSV0160_FUSV0160OPDBMapper.setJKKSecurityPackOperateCC` | JKKSecurityPackOperateCC | - | Security pack operation CC |
| C | `FUSV0160_FUSV0160OPDBMapper.setJFUFamipaRouterCC` | JFUFamipaRouterCC | - | Famipal router auto-registration |
| C | `FUSV0160_FUSV0160OPDBMapper.setJFUVaKikiCancelCC` | JFUVaKikiCancelCC | - | Device operation registration CC |
| C | `FUSV0160_FUSV0160OPDBMapper.setJFUWribSvcKeiAutoAddCC` | JFUWribSvcKeiAutoAddCC | - | Discount service contract auto-registration |
| C | `FUSV0160_FUSV0160OPDBMapper.setFUSV016033CC` | FUSV0160 | - | Discount registration (auto, excl. Famipa) |
| C | `FUSV0160_FUSV0160OPDBMapper.setFUSV016034CC` | FUSV0160 | - | Data extraction item registration (excl. auto) |
| C | `FUSV0160_FUSV0160OPDBMapper.setFUSV016021CC` | FUSV0160 | - | Latest device provision service contract multi-function update mapping |
| C | `FUSV0160_FUSV0160OPDBMapper.setEKK0061A010` | EKK0061A010 | - | Dealer agreement |
| C | `FUSV0160_FUSV0160OPDBMapper.setJFUSmartLinAdd2CC` | JFUSmartLinAdd2CC | - | Smart Link registration CC |
| C | `FUSV0160_FUSV0160OPDBMapper.setEKK0361D010` | EKK0361D010 | - | Option service contract ISP registration |
| C | `FUSV0160_FUSV0160OPDBMapper.setEKK0341D010Sml` | EKK0341D010 | - | Device provision service contract registration (small) |
| C | `FUSV0160_FUSV0160OPDBMapper.setEKK2541D010` | EKK2541D010 | - | Discount contract registration |
| C | `FUSV0160_FUSV0160OPDBMapper.setJFUBmpTelNoAddChkCC` | JFUBmpTelNoAddChkCC | - | Number portability phone number registration check CC |
| C | `FUSV0160_FUSV0160OPDBMapper.setTransferCC` | - | - | Data transfer CC |
| C | `FUSV0160_FUSV0160OPDBMapper.setJKKChkDobanitenPsbAreaCC` | JKKChkDobanitenPsbAreaCC | - | Duplicate forwarding possible area check CC |
| C | `FUSV0160_FUSV0160OPDBMapper.setEZM0121D010` | EZM0121D010 | - | Phone number registration |
| C | `FUSV0160_FUSV0160OPDBMapper.setEZM0111D010` | EZM0111D010 | - | Engineering registration |
| C | `FUSV0160_FUSV0160OPDBMapper.setEKK0191C012` | EKK0191C012 | - | Service contract content change e-onet |
| C | `FUSV0160_FUSV0160OPDBMapper.setEKK0371D010` | EKK0371D010 | - | Option service contract phone registration |
| C | `FUSV0160_FUSV0160OPDBMapper.setEKK0381D010` | EKK0381D010 | - | Option service contract TV registration |
| C | `FUSV0160_FUSV0160OPDBMapper.setEKK0341C230` | EKK0341C230 | - | Device provision service contract info change |
| C | `FUSV0160_FUSV0160OPDBMapper.setEKK0431D010` | EKK0431D010 | - | Sub-option registration |
| C | `FUSV0160_FUSV0160OPDBMapper.setEKKA0010001` | EKKA0010001 | - | Initial request request |
| C | `FUSV0160_FUSV0160OPDBMapper.setEKK0521D020` | EKK0521D020 | - | Screening credit card registration |
| C | `FUSV0160_FUSV0160OPDBMapper.setEKK0521D010` | EKK0521D010 | - | Credit request processing mapping |
| C | `FUSV0160_FUSV0160OPDBMapper.setEKK1031D010` | EKK1031D010 | - | Realization registration |
| C | `FUSV0160_FUSV0160OPDBMapper.setJFUAddSeikyKozaCC` | JFUAddSeikyKozaCC | - | Billing account registration CC |
| C | `FUSV0160_FUSV0160OPDBMapper.setEKK0491C240` | EKK0491C240 | - | Billing payment method change |
| C | `FUSV0160_FUSV0160OPDBMapper.setEKK0491C060` | EKK0491C060 | - | Billing contract content change |
| C | `FUSV0160_FUSV0160OPDBMapper.setEKK0081C012` | EKK0081C012 | - | Service contract payment method inheritance change |
| C | `FUSV0160_FUSV0160OPDBMapper.setEKK0491C220` | EKK0491C220 | - | Billing contract reservation cancellation mapping |
| C | `FUSV0160_FUSV0160OPDBMapper.setEKK0321D010` | EKK0321D010 | - | Payment address registration |
| C | `FUSV0160_FUSV0160OPDBMapper.setEKK1091D010` | EKK1091D010 | - | Progress registration |
| C | `FUSV0160_FUSV0160OPDBMapper.setEKK0051D010_GAS` | EKK0051D010 | - | Answer number |
| C | `FUSV0160_FUSV0160OPDBMapper.setECC0021D010` | ECC0021D010 | - | Mail registration |
| C | `FUSV0160_FUSV0160OPDBMapper.setECC0021D010_GAS` | ECC0021D010 | - | Mail registration (gas application) |
| C | `FUSV0160_FUSV0160OPDBMapper.setEKK2201A010` | EKK2201A010 | - | Application screen entry support work agreement |
| C | `FUSV0160_FUSV0160OPDBMapper.setEKK2201C010` | EKK2201C010 | - | Application screen entry support work update |
| C | `FUSV0160_FUSV0160OPDBMapper.setEKK0321B002` | EKK0321B002 | - | Payment address list |
| C | `FUSV0160_FUSV0160OPDBMapper.setEKK0451D01001` | EKK0451D010 | - | Discount service contract e-onet phone pack CC registration |
| C | `FUSV0160_FUSV0160OPDBMapper.setEKK0451D01002` | EKK0451D010 | - | Discount service contract 2nd number registration |
| C | `FUSV0160_FUSV0160OPDBMapper.setJKKWrisvcAutoAplyCC` | JKKWrisvcAutoAplyCC | - | WRISVC auto-application CC |
| C | `FUSV0160_FUSV0160OPDBMapper.setJKKWrisvcAutoAplyCC2` | JKKWrisvcAutoAplyCC | - | WRISVC auto-application CC (2nd) |
| C | `FUSV0160_FUSV0160OPDBMapper.setEKK1391C040` | EKK1391C040 | - | Data extraction item setup completion |
| C | `FUSV0160_FUSV0160OPDBMapper.setJFUBackyardMappingCC` | JFUBackyardMappingCC | - | Backyard mapping CC |
| C | `FUSV0160_FUSV0160OPDBMapper.setJFUCustCC` | JFUCustCC | - | Customer CC |
| C | `FUSV0160_FUSV0160OPDBMapper.setJFUSameSeikyusakiCheckCC` | JFUSameSeikyusakiCheckCC | - | Same billing address check CC |
| C | `FUSV0160_FUSV0160OPDBMapper.setJFUAddSeikyOpSvcCC` | JFUAddSeikyOpSvcCC | - | Billing option service registration CC |
| C | `FUSV0160_FUSV0160OPDBMapper.setECR0511D010` | ECR0511D010 | - | CASE work registration |
| C | `JCCBatCommon.invokeService` | JCCBatCommon | - | Calls `invokeService` in `JCCBatCommon` |
| R | `JCCBPCommon.getOpeDate` | JCCBPCommon | - | Calls `getOpeDate` in `JCCBPCommon` |
| R | `JCCBPCommon.getOpeDateTimeStamp` | JCCBPCommon | - | Calls `getOpeDateTimeStamp` in `JCCBPCommon` |
| R | `FUSV0160_FUSV0160OPDBMapper.setJFUAddAgntCC` | JFUAddAgntCC | - | Dealer registration CC (called via mapper_152) |
| R | `FUSV0160_FUSV0160OPDBMapper.setEKK0321B002` | EKK0321B002 | - | Payment address list registration |
| C | `FUSV0160_FUSV0160OPDBMapper.setEKKA0010001` | EKKA0010001 | - | Initial request request |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:FUW00164 | `FUW00164SFLogic.submit` -> `finMskm()` | `invokeService [C] backend_service`, `setEKKA0010001 [C] initial_request`, `setEKK0341D010 [C] device_contract`, `setEKK0521D010 [C] credit`, `setEKK1031D010 [C] realization`, `setECC0021D010 [C] mail`, `sendMskmFinMail [C] notification_mail` |

**Note:** The primary entry point for this method is the submit button press on screen `FUW00164SF` (gas application screen). The method is defined as `@return true` in its Javadoc, and callers route the user to completion screen `FUW00122` on success or error screens (e.g., `FUW00115` for credit errors) on failure.

## 6. Per-Branch Detail Blocks

### Block 1 — IF (chkGasMskmInfo) (L561)

> Gas application information input check. If validation fails, returns early to keep the user on the same screen.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `chkGasMskmInfo()` // gas application info input check |
| 2 | RETURN | `return true` // validation failed; keep on current screen |

#### Block 1.1 — ELSE (gas info valid) (L565)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setGasMskmInfo()` // set gas application info |
| 2 | CALL | `opeDate = JFUWebCommon.getOpeDate(this, null)` // get system date |

### Block 2 — EXEC (Application setup) (L569)

> Sets the application area flag and populates the mail form bean.

| # | Type | Code |
|---|------|------|
| 1 | SET | `sendMessageString(MSKM_KBN2_06, DATABEAN_SET_VALUE, MSKM_KBN_HON)` // set application area 2 to main application |
| 2 | CALL | `setFormBeanMailInfo(web_new_infobean, serviceFormBean)` // set mail send data form bean |
| 3 | SET | `paramMap = new HashMap()` // generate user case ID map |
| 4 | SET | `paramMap.put(TELEGRAM_INFO_USECASE_ID, USECASE_ID_FUSV0160)` // default single-household UseCase |
| 5 | SET | `mapper = new FUSV0160_FUSV0160OPDBMapper()` // mapping handler |
| 6 | SET | `mapper_152 = new FUSV0152_FUSV0152OPDBMapper()` // bulk mapping handler |
| 7 | SET | `mapper_161 = new FUSV0161_FUSV0161OPDBMapper()` // bulk mapping handler |
| 8 | SET | `inputMap = new HashMap()` // input data map |
| 9 | SET | `beans = { getCommonInfoBean(), getServiceFormBean() }` // bean array |

### Block 3 — IF (knykeiMskmJokenCd == "13") (L580)

> **Constant:** `KNYKEI_MSKM_JOKEN_CD_13 = "13"` (All households unified registration). If the apartment/condominium has all households subscribing together, a bulk pre-mapping is performed.

| # | Type | Code |
|---|------|------|
| 1 | SET | `paramMap.put(TELEGRAM_INFO_USECASE_ID, USECASE_ID_FUSV0161)` // switch to bulk UseCase |
| 2 | CALL | `callSetdatamap(mapper_152, mapper, mapper_161, beans, inputMap)` // bulk pre-mapping |

#### Block 3.1 — ELSE (single household) (L586)

> Standard single-household flow: each mapper method builds a portion of the input map for backend service invocation.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `mapper.setMskmDmenXmlMap(beans, inputMap, FUNC_CD_1)` // application screen XML map |
| 2 | CALL | `mapper.setFUSV016006CC(beans, inputMap, FUNC_CD_1)` // location/residence segmentation |
| 3 | CALL | `mapper.setFUSV016007CC(beans, inputMap, FUNC_CD_1)` // contract residence segmentation |
| 4 | CALL | `mapper.setFUSV016008CC(beans, inputMap, FUNC_CD_1)` // number portability segmentation |
| 5 | CALL | `mapper.setFUSV016010CC(beans, inputMap, FUNC_CD_1)` // mobile device delivery segmentation |
| 6 | CALL | `mapper.setEKK0011C050(beans, inputMap, FUNC_CD_1)` // preliminary application flag change |
| 7 | CALL | `mapper.setEKK0011C110(beans, inputMap, FUNC_CD_1)` // application content approval |
| 8 | CALL | `mapper.setEKK0341D010(beans, inputMap, FUNC_CD_1)` // device provision service contract |
| 9 | CALL | `mapper.setEKK2811B503(beans, inputMap, FUNC_CD_1)` // device option contract list (front) |
| 10 | CALL | `mapper.setEKK0341B002(beans, inputMap, FUNC_CD_1)` // device provision contract list |
| 11 | CALL | `mapper.setEKK0341C330(beans, inputMap, FUNC_CD_1)` // device provision contract cancellation |
| 12 | CALL | `mapper.setEKK0091A010(beans, inputMap, FUNC_CD_1)` // service contract e-onet |
| 13 | CALL | `mapper.setEKK0341D010Tkn(beans, inputMap, FUNC_CD_1)` // device contract (token) |
| 14 | CALL | `mapper.setEKK2811D010Net02(beans, inputMap, FUNC_CD_1)` // IoT option service (Net) |
| 15 | CALL | `mapper.setEKK2811D010Tel02(beans, inputMap, FUNC_CD_1)` // IoT option service (Tel) |
| 16 | CALL | `mapper.setEKK0391D010(beans, inputMap, FUNC_CD_1)` // option service contract |
| 17 | CALL | `mapper.setFUSV016040SC(beans, inputMap, FUNC_CD_2)` // service contract e-onet SC |
| 18 | CALL | `mapper.setJKKSecurityPackOperateCC(beans, inputMap, FUNC_CD_1)` // security pack operation |
| 19 | CALL | `mapper.setJFUFamipaRouterCC(beans, inputMap, FUNC_CD_2, opeDateTime)` // famipal router auto-reg |
| 20 | CALL | `mapper.setJFUVaKikiCancelCC(beans, inputMap)` // device operation reg CC |
| 21 | CALL | `mapper.setJFUWribSvcKeiAutoAddCC(beans, inputMap, FUNC_CD_1)` // discount auto-reg |
| 22 | CALL | `mapper.setFUSV016033CC(beans, inputMap, FUNC_CD_1, opeDate)` // discount registration |
| 23 | CALL | `mapper.setFUSV016034CC(beans, inputMap, FUNC_CD_1, opeDate)` // data extraction item reg |
| 24 | CALL | `mapper.setFUSV016021CC(beans, inputMap)` // latest multi-function contract mapping |

#### Block 4 — IF (tablet or purchased device) (L626)

> **Constants:** `JFUStrConst.SMALIN_TABLET_MSKM` (tablet), `JFUStrConst.GH_TANMT_BUY` (purchased home device). If the customer is using a tablet or purchased home device, additional dealer and IoT service mappings are executed.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `mapper.setEKK0061A010(beans, inputMap, FUNC_CD_2)` // dealer agreement |
| 2 | CALL | `mapper.setJFUSmartLinAdd2CC(beans, inputMap)` // Smart Link registration CC |
| 3 | CALL | `mapper.setEKK0361D010(beans, inputMap, FUNC_CD_1)` // option service ISP reg |
| 4 | CALL | `mapper.setEKK0341D010Sml(beans, inputMap, FUNC_CD_1, opeDate)` // device contract (small) |
| 5 | CALL | `mapper.setEKK2541D010(beans, inputMap, FUNC_CD_1)` // discount contract reg |

### Block 5 — EXEC (Post-tablet mappings) (L636)

> Mappings executed regardless of the tablet/purchased device branch.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `mapper.setJFUBmpTelNoAddChkCC(beans, inputMap, FUNC_CD_2)` // phone number reg check |
| 2 | CALL | `mapper.setTransferCC(beans, inputMap)` // data transfer CC |
| 3 | CALL | `mapper.setJKKChkDobanitenPsbAreaCC(beans, inputMap)` // duplicate forwarding check |
| 4 | CALL | `mapper.setEZM0121D010(beans, inputMap, FUNC_CD_1)` // phone number registration |
| 5 | CALL | `mapper.setEZM0111D010(beans, inputMap, FUNC_CD_1)` // engineering registration |
| 6 | CALL | `mapper.setEKK0191C012(beans, inputMap, FUNC_CD_1)` // service contract content change |
| 7 | CALL | `mapper.setEKK0371D010(beans, inputMap, FUNC_CD_1)` // option service phone reg |
| 8 | CALL | `mapper.setEKK0381D010(beans, inputMap, FUNC_CD_1)` // option service TV reg |
| 9 | CALL | `mapper.setEKK0341C230(beans, inputMap, FUNC_CD_1)` // device contract info change |
| 10 | CALL | `mapper.setEKK0431D010(beans, inputMap, FUNC_CD_1)` // sub-option registration |
| 11 | CALL | `mapper.setEKKA0010001(beans, inputMap, FUNC_CD_1, opeDateTime)` // initial request |
| 12 | CALL | `mapper.setEKK0521D020(beans, inputMap, FUNC_CD_1)` // screening credit card reg |
| 13 | CALL | `mapper.setEKK0521D010(beans, inputMap, FUNC_CD_1, NOT_IKT)` // credit request mapping |
| 14 | CALL | `mapper.setEKK1031D010(beans, inputMap, FUNC_CD_1, opeDateTime)` // realization registration |
| 15 | CALL | `mapper.setJFUAddSeikyKozaCC(beans, inputMap, FUNC_CD_1)` // billing account CC |
| 16 | CALL | `mapper.setEKK0491C240(beans, inputMap, FUNC_CD_1, opeDate)` // billing payment change |
| 17 | CALL | `mapper.setEKK0491C060(beans, inputMap, FUNC_CD_1, opeDate)` // billing contract change |
| 18 | CALL | `mapper.setEKK0081C012(beans, inputMap, FUNC_CD_1)` // payment method inheritance change |
| 19 | CALL | `mapper.setEKK0491C220(beans, inputMap, FUNC_CD_1)` // billing reservation cancel |
| 20 | CALL | `mapper.setEKK0321D010(beans, inputMap, FUNC_CD_1)` // payment address registration |
| 21 | CALL | `mapper_152.setJFUAddAgntCC(beans, inputMap, FUNC_CD_1, SCREEN_ID_FUW00156)` // dealer registration |
| 22 | CALL | `mapper.setEKK1091D010(beans, inputMap, FUNC_CD_1)` // progress registration |
| 23 | CALL | `mapper.setEKK0051D010_GAS(getCommonInfoBean(), inputMap, FUNC_CD_1)` // answer number |
| 24 | CALL | `mapper.setECC0021D010(beans, inputMap, FUNC_CD_1)` // mail registration |
| 25 | CALL | `mapper.setECC0021D010_GAS(beans, inputMap, FUNC_CD_1)` // mail registration (gas) |
| 26 | CALL | `mapper.setEKK2201A010(beans, inputMap, FUNC_CD_1)` // entry support agreement |
| 27 | CALL | `mapper.setEKK2201C010(beans, inputMap, FUNC_CD_1)` // entry support update |
| 28 | CALL | `mapper.setEKK0321B002(beans, inputMap, FUNC_CD_1)` // payment address list |

### Block 6 — IF (phone service requested) (L644)

> **Constants:** `JFUStrConst.SELECT_SVC_TEL_CHOICE` (phone service selected), `JFUStrConst.TEL_COURSE_2BANGOU_SVC` (2nd number service). Phone service contract mappings are conditionally executed.

| # | Type | Code |
|---|------|------|
| 1 | SET | `telMskm = keiyakuSvc.sendMessageString(SELECT_SVC_TEL_10, DATABEAN_GET_VALUE)` |
| 2 | SET | `telCourse = web_new_infobean.sendMessageString(TEL_COURSE_06, DATABEAN_GET_VALUE)` |
| 3 | CALL | `mapper.setEKK0451D01001(beans, inputMap, FUNC_CD_1, opeDate)` // discount service phone pack CC (1st number) |

#### Block 6.1 — IF (2nd number phone) (L650)

> **Constant:** `JFUStrConst.TEL_COURSE_2BANGOU_SVC` — 2nd number phone service option.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `mapper.setEKK0451D01002(beans, inputMap, FUNC_CD_1, opeDate)` // discount service phone pack (2nd number) |

### Block 7 — EXEC (Post-phone mappings) (L657)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `mapper.setJKKWrisvcAutoAplyCC(beans, inputMap, FUNC_CD_1)` // WRISVC auto-app |
| 2 | CALL | `mapper.setJKKWrisvcAutoAplyCC2(beans, inputMap, FUNC_CD_1)` // WRISVC auto-app 2 |
| 3 | CALL | `mapper.setEKK1391C040(beans, inputMap, FUNC_CD_1, opeDate)` // data extraction completion |
| 4 | CALL | `mapper.setJFUBackyardMappingCC(beans, inputMap)` // backyard mapping |
| 5 | CALL | `mapper.setJFUCustCC(beans, inputMap, FUNC_CD_1)` // customer CC |
| 6 | CALL | `mapper.setJFUSameSeikyusakiCheckCC(beans, inputMap, FUNC_CD_1)` // same billing check |
| 7 | CALL | `mapper.setJFUAddSeikyOpSvcCC(beans, inputMap, "1")` // billing option service reg |

### Block 8 — IF (electric guide requested) (L669)

> **Constant:** `JFUStrConst.ELEC_GUIDE_KIBO_ARI` — electric guide requested. If the customer opted for electric guide service, CASE work registration is performed.

| # | Type | Code |
|---|------|------|
| 1 | SET | `opeDateStamp = JFUWebCommon.getOpeDateTimeStamp(this, null)` |
| 2 | CALL | `mapper.setECR0511D010(beans, inputMap, FUNC_CD_1, opeDateStamp)` // CASE work registration |

### Block 9 — EXEC (Output map generation and invokeService) (L682)

> After all mapper calls complete, generate the output map and persist data to backend via `invokeService()`.

| # | Type | Code |
|---|------|------|
| 1 | SET | `outputMap = new HashMap()` // output data map |
| 2 | CALL | `JFUWebCommon.setMskmDmenXmlMapWebNew(inputMap, this)` // persist application screen data |

#### Block 9.1 — TRY (invokeService) (L687)

> The core backend service invocation that processes all mapped data.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `invokeService(paramMap, inputMap, outputMap)` // backend service invocation |

#### Block 9.2 — CATCH (JCCWebServiceException) (L690)

> Exception handler: analyzes error details from `JCCWebServiceException` and routes to appropriate error screen or business exception based on the template ID and error item ID.

| # | Type | Code |
|---|------|------|
| 1 | SET | `moreInfo = je.getMessageList().getMessageMoreInfoList()` |
| 2 | SET | `info = moreInfo[0]` // first error message |
| 3 | SET | `templateid = info.getTemplateId()` |
| 4 | SET | `itemid = info.getItemId()` |
| 5 | SET | `status = info.getStatus()` |
| 6 | SET | `errFlg = info.getItemCheckErr()` |

##### Block 9.2.1 — IF (RELATION_ERR, template EKKA0010001) (L700)

> **Constants:** `JPCModelConstant.RELATION_ERR`, `EKKA0010001` (initial request), `JFUStrConst.RELATION_CHECK_ERR_EA`. Handles credit card validation errors.

| # | Type | Code |
|---|------|------|
| 1 | SET | `knykeiMskmJokenCd` (retrieved from mansioninfo at L577) |

###### Block 9.2.1.1 — IF (credit card number error) (L702)

> **Constant:** `ERR_CR_CARDNUMBER` — credit card number field.

| # | Type | Code |
|---|------|------|
| 1 | SET | `bnPymy.sendMessageString(CR_RESULTCODE_15, DATABEAN_SET_VALUE, CR_RESULTCODE_NG)` // set credit result to NG |
| 2 | SET | `web_new_infobean.sendMessageString(SCREEN_MODE_06, DATABEAN_SET_VALUE, SCREEN_MODE_DEF)` |
| 3 | SET | `commoninfoBean.sendMessageString(NEXT_SCREEN_ID, DATABEAN_SET_VALUE, SCREEN_ID_FUW00115)` |
| 4 | SET | `commoninfoBean.sendMessageString(NEXT_SCREEN_NAME, DATABEAN_SET_VALUE, SCREEN_NAME_FUW00115)` |
| 5 | RETURN | `return true` |

###### Block 9.2.1.2 — IF (credit card expiry error) (L715)

> **Constant:** `ERR_CR_CARDEXP` — credit card expiry field.

| # | Type | Code |
|---|------|------|
| 1 | SET | `bnPymy.sendMessageString(CR_RESULTCODE_15, DATABEAN_SET_VALUE, CR_RESULTCODE_NG_2)` // expiry NG |
| 2 | SET | Screen routing to FUW00115 (same as above) |
| 3 | RETURN | `return true` |

###### Block 9.2.1.3 — IF (credit card amount error) (L728)

> **Constant:** `ERR_CR_AMOUNT` — credit card amount field.

| # | Type | Code |
|---|------|------|
| 1 | SET | `bnPymy.sendMessageString(CR_RESULTCODE_15, DATABEAN_SET_VALUE, CR_RESULTCODE_NG_4)` // amount NG |
| 2 | SET | Screen routing to FUW00115 |
| 3 | RETURN | `return true` |

###### Block 9.2.1.4 — ELSE (general credit error) (L741)

| # | Type | Code |
|---|------|------|
| 1 | SET | `bnPymy.sendMessageString(CR_RESULTCODE_15, DATABEAN_SET_VALUE, CR_RESULTCODE_NG_3)` // general system error NG |
| 2 | SET | Screen routing to FUW00115 |
| 3 | RETURN | `return true` |

##### Block 9.2.2 — IF (EKK0081B524, contract status error) (L749)

> **Constants:** `EKK0081B524`, `ITEMID_KEY_SVC_KEI_ERR`. Contract status error during service contract list agreement check.

| # | Type | Code |
|---|------|------|
| 1 | THROW | `throw new JCCBusinessException(JFUStrConst.ERROR_CODE_0102)` |

##### Block 9.2.3 — IF (EZM0121A010, phone number already contracted) (L756)

> **Constants:** `EZM0121A010`, `ITEMID_KEY_TELNO_ERR`. Phone number already has an existing contract.

| # | Type | Code |
|---|------|------|
| 1 | THROW | `throw new JCCBusinessException(JFUStrConst.ERROR_CODE_0103)` |

##### Block 9.2.4 — IF (EZM0111B030, engineering target value already contracted) (L763)

> **Constants:** `EZM0111B030`, `ITEMID_KEY_AGING_TG_VALUE_ERR`. Engineering target value already in use.

| # | Type | Code |
|---|------|------|
| 1 | THROW | `throw new JCCBusinessException(JFUStrConst.ERROR_CODE_0103)` |

##### Block 9.2.5 — IF (ETU0071A010, number portability check failed) (L771)

> **Constants:** `ETU0071A010`, `ITEMID_KEY_JUKU_KYOKU_NO_ERR`. Number portability not possible.

| # | Type | Code |
|---|------|------|
| 1 | THROW | `throw new JCCBusinessException(JFUStrConst.ERROR_CODE_0103)` |

##### Block 9.2.6 — IF (EKK0161B511, upplno error) (L777)

| # | Type | Code |
|---|------|------|
| 1 | THROW | `throw new JCCBusinessException("0112")` |

##### Block 9.2.7 — IF (EZM0121C010, number transfer area check failed) (L783)

> **Constants:** `EZM0121C010`, `ITEMID_TELNO_ERR`.

| # | Type | Code |
|---|------|------|
| 1 | THROW | `throw new JCCBusinessException(JFUStrConst.ERROR_CODE_0102)` |

##### Block 9.2.8 — ELSE (all other errors) (L789)

| # | Type | Code |
|---|------|------|
| 1 | THROW | `throw new JCCBusinessException(JFUStrConst.ERROR_CODE_0204)` // update error |

### Block 10 — EXEC (Post-invoke) (L793)

> After successful backend invocation, execute AxM integration and retrieve work restrictions.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `JFUWebCommon.executeAxmRenkeiService(this)` // AxM integration service |
| 2 | CALL | `workKiseiListBean = getWorkKiseiList(commoninfoBean)` // work restriction list |

### Block 11 — IF (business restriction not active) (L797)

> **Constant:** `JFUStrConst.REQUEST_RESTRICTION_FLG_ON` — business restriction flag. If no restriction is active, perform post-processing.

| # | Type | Code |
|---|------|------|
| 1 | IF | `KNYKEI_MSKM_JOKEN_CD_13.equals(knykeiMskmJokenCd)` // all households check (L801) |

#### Block 11.1 — IF (all households, no restriction) (L801)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `callGetdatamap(mapper_152, mapper_161, beans, outputMap)` // bulk post-processing |
| 2 | CALL | `mapper.setECC0021D010_GAS(beans, outputMap, FUNC_CD_1)` // mail reg (gas) |

### Block 12 — ELSE (business restriction active) (L808)

> When business restrictions are active, update the timestamp on the contract service bean.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `keiyakuSvc.sendMessageString(UPD_DTM_MSKM_NO_10, DATABEAN_SET_VALUE, getOpeDateTime(...))` // update timestamp |

### Block 13 — EXEC (Next screen setup) (L813)

> Navigate to the subscription completion screen.

| # | Type | Code |
|---|------|------|
| 1 | SET | `commoninfoBean.sendMessageString(NEXT_SCREEN_ID, DATABEAN_SET_VALUE, SCREEN_ID_FUW00122)` |
| 2 | SET | `commoninfoBean.sendMessageString(NEXT_SCREEN_NAME, DATABEAN_SET_VALUE, SCREEN_NAME_FUW00122)` |

### Block 14 — IF (jokenCd == "13") (L819)

> **Constant:** `KNYKEI_MSKM_JOKEN_CD_13 = "13"` (all households). Select the appropriate UseCase for the completion email.

| # | Type | Code |
|---|------|------|
| 1 | SET | `usecaseId = USECASE_ID_FUSV0161` // bulk use case |

#### Block 14.1 — ELSE (single household) (L823)

| # | Type | Code |
|---|------|------|
| 1 | SET | `usecaseId = USECASE_ID_FUSV0160` // single-household use case |

### Block 15 — EXEC (Final email and return) (L828)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `JFUWebCommon.sendMskmFinMail(this, outputMap, usecaseId)` // send subscription completion email |
| 2 | RETURN | `return true` |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `finMskm` | Method | Finish Maskum (Finish Gas Subscription) — subscription completion handler for electricity application |
| `knykei_mskm_joken_cd` | Field | Application condition code — classifies whether subscription is per-household or all-households-unified ("13" = full building, "11" = web tenant, "12" = web owner, "20" = move-in, "21" = move-in search, "22" = existing resident) |
| `MSKM_KBN_HON` | Constant | Main application flag (本申込) — distinguishes the primary application from supplements |
| `svc_kei_ucwk_no` | Field | Service detail work number — internal tracking ID for service contract line items |
| `e-onet` | Business term | Fiber broadband service — K-Opticom's optical fiber internet service (eo Net) |
| FTTH | Business term | Fiber To The Home — fiber-optic access technology |
| `EKK0341D010` | SC Code | Device provision service contract registration — registers the customer's device service contract |
| `EKK0521D010` | SC Code | Credit request processing mapping — processes credit card billing information |
| `EKK1031D010` | SC Code | Realization registration — finalizes the service contract realization |
| `ECC0021D010` | SC Code | Mail registration — registers the customer for notification emails |
| `EKKA0010001` | SC Code | Initial request request — handles initial service request processing |
| `EZM0121D010` | SC Code | Phone number registration — registers the customer's phone number for service |
| `EZM0111D010` | SC Code | Engineering registration — registers engineering/installation requirements |
| `JFUAddSeikyKozaCC` | SC Code | Billing account registration CC — registers the customer's billing account |
| `JFUSmartLinAdd2CC` | SC Code | Smart Link registration CC — registers the Smart Link service |
| `JFUFamipaRouterCC` | SC Code | Famipal router auto-registration — automatically registers the Famipal home router service |
| `JFUWribSvcKeiAutoAddCC` | SC Code | Discount service contract auto-registration — auto-registers discounted service contracts |
| `EKK0451D01001` | SC Code | Discount service contract e-onet phone pack CC registration (1st number) |
| `EKK0451D01002` | SC Code | Discount service contract 2nd number registration |
| `EKK0061A010` | SC Code | Dealer agreement — registers dealer channel agreement |
| `EKK2811D010` | SC Code | IoT option service contract registration — registers IoT-based option services |
| `EKK0361D010` | SC Code | Option service contract ISP registration — registers ISP option service |
| `EKK0371D010` | SC Code | Option service contract phone registration — registers phone option service |
| `EKK0381D010` | SC Code | Option service contract TV registration — registers TV option service |
| `EKK0431D010` | SC Code | Sub-option registration — registers sub-option services |
| `EKK0521D020` | SC Code | Screening credit card registration — registers screening credit card info |
| `EKK0321D010` | SC Code | Payment address registration — registers the customer's payment address |
| `JFUBmpTelNoAddChkCC` | SC Code | Number portability phone number registration check CC |
| `JFUSameSeikyusakiCheckCC` | SC Code | Same billing address check CC — verifies billing address consistency |
| `JFUAddSeikyOpSvcCC` | SC Code | Billing option service registration CC |
| `JCCBatCommon` | Component | JCC Batch Common — shared batch processing component that provides `invokeService` |
| `JFUWebCommon` | Component | JFU Web Common — shared web utility component for date/time, screen routing, email |
| `X31SDataBeanAccess` | Type | Shared form data bean access — provides typed access to shared form data |
| `X31SDataBeanAccessArray` | Type | Shared form data bean array access — provides array operations on shared form beans |
| `FUSV0160_FUSV0160OPDBMapper` | Class | Data mapping handler — builds the inputMap from form beans for backend service invocation |
| `invokeService` | Method | Backend service invocation — delegates to JCCBatCommon to execute the full service chain |
| `callSetdatamap` | Method | Bulk pre-mapping — prepares the inputMap for all-household (bulk) registration |
| `callGetdatamap` | Method | Bulk post-mapping — extracts the outputMap after bulk registration |
| `JCCBusinessException` | Exception | Business logic exception — thrown for contract status errors and update errors |
| `JCCWebServiceException` | Exception | Web service exception — thrown when backend service invocation fails |
| `SCREEN_ID_FUW00115` | Constant | Credit error screen ID — displays credit card validation errors to the user |
| `SCREEN_ID_FUW00122` | Constant | Subscription completion screen ID — the success page after all registrations |
| `ERROR_CODE_0102` | Constant | Contract status error code — thrown when a contract status conflict occurs |
| `ERROR_CODE_0103` | Constant | Contract completion error code — thrown when a service is already contracted |
| `ERROR_CODE_0204` | Constant | Update error code — thrown for general backend update failures |
| CR_RESULTCODE_NG | Constant | Credit result code: NG (general failure) |
| CR_RESULTCODE_NG_2 | Constant | Credit result code: NG (expiry) |
| CR_RESULTCODE_NG_3 | Constant | Credit result code: NG (system error) |
| CR_RESULTCODE_NG_4 | Constant | Credit result code: NG (amount error) |
| `SMALIN_TABLET_MSKM` | Constant | Tablet device indicator — identifies tablet-based subscriptions |
| `GH_TANMT_BUY` | Constant | Purchased home device indicator — identifies home purchased device subscriptions |
| `SELECT_SVC_TEL_CHOICE` | Constant | Phone service selected indicator |
| `TEL_COURSE_2BANGOU_SVC` | Constant | 2nd number phone service indicator |
| `ELEC_GUIDE_KIBO_ARI` | Constant | Electric guide requested indicator |
| FUNC_CD_1 | Constant | Function code 1 — mapper dispatch flag |
| FUNC_CD_2 | Constant | Function code 2 — mapper dispatch flag (priority/alternate path) |
