# Business Logic — KKA14201SFLogic.commonKnrnChkForOneStop() [215 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKA14201SF.KKA14201SFLogic` |
| Layer | Service (Logic layer — webview logic class) |
| Module | `KKA14201SF` (Package: `eo.web.webview.KKA14201SF`) |

## 1. Role

### KKA14201SFLogic.commonKnrnChkForOneStop()

This method is a shared common-check utility for the **One-Stop (ワンストップ) service** flow in the KKA14201SF screen. The One-Stop feature allows customers to view multiple service contracts (e.g., FTTH, Mail, ENUM) through a single consolidated interface, enabling unified contract management such as modifications, transfers, or cancellations without logging into each individual service portal. The method orchestrates a series of validation and data-retrieval service calls across four distinct service component screens: **KKSV0820** (SYSID/service contract/user existence check and code management setup), **KKSV0061** (service-related information retrieval), **KKSV0062** (service contract history retrieval), **KKSV0463** (difference/discontinuation classification retrieval), and **KKSV0551** (difference/discontinuation reason retrieval). It validates that the core identity fields — SYSID, service contract number, and user ID — all exist in the system, ensures the difference reason classification and reason code form a valid pair, and checks whether the service contract is eligible for modification or discontinuation. If any validation fails, it returns `false` after setting a specific error code (E5003, E5010, E5011, E5012, or E5013) via the OneStop XML response builder. On full validation success, it returns `true`. This method implements a **gateway/validator pattern**, acting as a pre-condition gate before the caller proceeds with One-Stop dependent operations.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["commonKnrnChkForOneStop"])
    STEP1["Get service form bean<br/>Extract request params<br/>sysid, svc_kei_no, user_id<br/>Set idoDiv = OS_IDO_DIV<br/>Get opeDate"]
    STEP2["KKSV0820: Prepare paramMap<br/>setKKSV082001CC - SYSID existence<br/>invokeService - KKSV0820OP"]
    STEP3["Check SYSID existence<br/>checkExistSysid"]
    STEP4["setReturnXml E5010<br/>Return false"]
    STEP5["Check svc_kei_no existence<br/>checkExistSvcKeiNo"]
    STEP6["setReturnXml E5011<br/>Return false"]
    STEP7["Check user_id existence<br/>checkExistUserId"]
    STEP8["setReturnXml E5012<br/>Return false"]
    STEP9["Extract cdDivListMap<br/>from KKSV0820 output"]
    STEP10["OneStopDataBeanAccess: Set sysid, svc_kei_no, opeDate"]
    STEP11["KKSV0061: Prepare paramMap<br/>setKKSV006101SC, 02SC, 03SC<br/>invokeService - KKSV0061OP"]
    STEP12["KKSV0061: Get output<br/>getKKSV006101-04SC"]
    STEP13["KKSV0062: Prepare paramMap<br/>setKKSV006201-23SC<br/>invokeService - KKSV0062OP"]
    STEP14["KKSV0062: Get output<br/>getKKSV006201-23SC"]
    STEP15["Extract prcGrpCd from<br/>EKK0081A010CBSMsg1List"]
    STEP16["prcGrpCd in [07, 08, 09, 10]?<br/>Wi-Fi/EMobile/UQ-WiMAX"]
    STEP17["getKKSV006212SC"]
    STEP18["Extract svc_kei_stat from<br/>EKK0081B024CBSMsg1List"]
    STEP19["For loop: iterate<br/>svc_kei_stat rows"]
    STEP20["svc_kei_stat == 100<br/>Service providing"]
    STEP21["Set svcTkRrkFlg = 1<br/>Break loop"]
    STEP22["KKSV0463: Prepare paramMap<br/>setKKSV046301SC - diff classification<br/>invokeService - KKSV0463OP"]
    STEP23["KKSV0551: Prepare paramMap<br/>setKKSV055101SC - diff reason<br/>invokeService - KKSV0551OP"]
    STEP24["Check diff reason pair<br/>checkIdoRsnCdPair"]
    STEP25["setReturnXml E5013<br/>Return false"]
    STEP26["Check service diff feasibility<br/>checkSvcKeiIdoPsb"]
    STEP27["setReturnXml E5003<br/>Return false"]
    STEP28["Return true"]

    START --> STEP1
    STEP1 --> STEP2
    STEP2 --> STEP3
    STEP3 --> |"checkExistSysid = false"| STEP4
    STEP3 --> |"checkExistSysid = true"| STEP5
    STEP5 --> |"checkExistSvcKeiNo = false"| STEP6
    STEP5 --> |"checkExistSvcKeiNo = true"| STEP7
    STEP7 --> |"checkExistUserId = false"| STEP8
    STEP7 --> |"checkExistUserId = true"| STEP9
    STEP9 --> STEP10
    STEP10 --> STEP11
    STEP11 --> STEP12
    STEP12 --> STEP13
    STEP13 --> STEP14
    STEP14 --> STEP15
    STEP15 --> STEP16
    STEP16 --> |"true"| STEP17
    STEP16 --> |"false"| STEP18
    STEP17 --> STEP18
    STEP18 --> STEP19
    STEP19 --> STEP20
    STEP20 --> |"svc_kei_stat == 100"| STEP21
    STEP20 --> |"not 100"| STEP19
    STEP21 --> STEP22
    STEP22 --> STEP23
    STEP23 --> STEP24
    STEP24 --> |"checkIdoRsnCdPair = false"| STEP25
    STEP24 --> |"checkIdoRsnCdPair = true"| STEP26
    STEP26 --> |"checkSvcKeiIdoPsb = false"| STEP27
    STEP26 --> |"checkSvcKeiIdoPsb = true"| STEP28
    STEP28 --> END(["End: return true"])
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| - | (none) | - | This method takes no external parameters. All data is obtained from the service form bean and the request map (HTTP session/request attributes). |
| 1 | (instance) `requestMap` | `Map` | The request parameter map obtained from the HTTP request context. Contains business keys: `sysid` (system ID for One-Stop identity), `svc_kei_no` (service contract number), `user_id` (user identifier), `ido_rsn_dbri_cd` (individual discontinuation reason broad category code), `ido_rsn_cbri_cd` (individual discontinuation reason middle category code). |
| 2 | (instance) `funcCode` | `String` | Functional code identifying the calling feature/module for error reporting. |
| 3 | (instance) `IF_ID` | `String` | Interface identifier used in error XML response construction. |
| 4 | (instance) `warnList` | `List` | Warning/error list populated with error codes when validation fails. |
| 5 | (instance) `cdDivListMap` | `Map<String, Object>` | Instance field set during processing to store code classification data extracted from KKSV0820 output, used by downstream callers. |
| 6 | (instance) `svcTkRrkFlg` | `String` | Instance field set to `"1"` when a service with active provision status (`svc_kei_stat = "100"`) is found, indicating the customer currently has an active service. |
| 7 | (instance) `OS_IDO_DIV` | `String` | Constant field resolving to `IDO_DIV_VALUE_00031`, representing the One-Stop individual modification division classification (set to a fixed One-Stop-specific division value). |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `JCCWebCommon.getOpeDate` | JCCWebCommon | - | Gets the current operational date for transaction processing |
| C | `KKSV0820_KKSV0820OPDBMapper.setKKSV082001CC` | KKSV082001CC | - | Sets up KKSV0820 input parameters with service form bean and SYSID/service/user data |
| C | `KKSV0061_KKSV0061OPDBMapper.setKKSV006101SC` | KKSV006101SC | - | Sets up KKSV0061 input with FUNC_CD_1 (service contract information) |
| C | `KKSV0061_KKSV0061OPDBMapper.setKKSV006102SC` | KKSV006102SC | - | Sets up KKSV0061 input with FUNC_CD_3 (service detail information) |
| C | `KKSV0061_KKSV0061OPDBMapper.setKKSV006103SC` | KKSV006103SC | - | Sets up KKSV0061 input with FUNC_CD_3 (additional service info) |
| C | `KKSV0062_KKSV0062OPDBMapper.setKKSV006201SC` | KKSV006201SC | - | Sets up KKSV0062 input with FUNC_CD_2 (service contract history list) |
| C | `KKSV0062_KKSV0062OPDBMapper.setKKSV006202SC` | KKSV006202SC | - | Sets up KKSV0062 input with FUNC_CD_1 |
| C | `KKSV0062_KKSV0062OPDBMapper.setKKSV006203SC` | KKSV006203SC | - | Sets up KKSV0062 input with FUNC_CD_1 |
| C | `KKSV0062_KKSV0062OPDBMapper.setKKSV006205SC` | KKSV006205SC | - | Sets up KKSV0062 input with FUNC_CD_1 |
| C | `KKSV0062_KKSV0062OPDBMapper.setKKSV006206SC` | KKSV006206SC | - | Sets up KKSV0062 input with FUNC_CD_1 |
| C | `KKSV0062_KKSV0062OPDBMapper.setKKSV006207SC` | KKSV006207SC | - | Sets up KKSV0062 input with FUNC_CD_6 (additional history) |
| C | `KKSV0062_KKSV0062OPDBMapper.setKKSV006208SC` | KKSV006208SC | - | Sets up KKSV0062 input with FUNC_CD_2 |
| C | `KKSV0062_KKSV0062OPDBMapper.setKKSV006209SC` | KKSV006209SC | - | Sets up KKSV0062 input with FUNC_CD_1 |
| C | `KKSV0062_KKSV0062OPDBMapper.setKKSV006210SC` | KKSV006210SC | - | Sets up KKSV0062 input with FUNC_CD_2 |
| C | `KKSV0062_KKSV0062OPDBMapper.setKKSV006212SC` | KKSV006212SC | - | Sets up KKSV0062 input with FUNC_CD_1 |
| C | `KKSV0062_KKSV0062OPDBMapper.setKKSV006221SC` | KKSV006221SC | - | Sets up KKSV0062 input with FUNC_CD_1 |
| C | `KKSV0062_KKSV0062OPDBMapper.setKKSV006222CC` | KKSV006222CC | - | Sets up KKSV0062 CC (added for ANK-2687) with FUNC_CD_1 |
| C | `KKSV0062_KKSV0062OPDBMapper.setKKSV006223SC` | KKSV006223SC | - | Sets up KKSV0062 input with FUNC_CD_2 (added IT1-2016-0000100) |
| C | `KKSV0463_KKSV0463OPDBMapper.setKKSV046301SC` | KKSV046301SC | - | Sets up KKSV0463 input with FUNC_CD_1 and individual modification division code |
| C | `KKSV0551_KKSV0551OPDBMapper.setKKSV055101SC` | KKSV055101SC | - | Sets up KKSV0551 input with FUNC_CD_1 and individual discontinuation reason broad category code |
| R | `KKSV0820_KKSV0820OPDBMapper.getKKSV082001SC` | KKSV082001SC | - | Reads KKSV0820 output (code name management data) |
| R | `KKSV0061_KKSV0061OPDBMapper.getKKSV006101SC` | KKSV006101SC | - | Reads KKSV0061 output (service contract information) |
| R | `KKSV0061_KKSV0061OPDBMapper.getKKSV006102SC` | KKSV006102SC | - | Reads KKSV0061 output (service detail information) |
| R | `KKSV0061_KKSV0061OPDBMapper.getKKSV006103SC` | KKSV006103SC | - | Reads KKSV0061 output (additional service info) |
| R | `KKSV0061_KKSV0061OPDBMapper.getKKSV006104SC` | KKSV006104SC | - | Reads KKSV0061 output (service status info) |
| R | `KKSV0062_KKSV0062OPDBMapper.getKKSV006201SC` | KKSV006201SC | - | Reads KKSV0062 output (service contract history list with prc_grp_cd) |
| R | `KKSV0062_KKSV0062OPDBMapper.getKKSV006205SC` | KKSV006205SC | - | Reads KKSV0062 output |
| R | `KKSV0062_KKSV0062OPDBMapper.getKKSV006207SC` | KKSV006207SC | - | Reads KKSV0062 output |
| R | `KKSV0062_KKSV0062OPDBMapper.getKKSV006208SC` | KKSV006208SC | - | Reads KKSV0062 output (contract difference classification details) |
| R | `KKSV0062_KKSV0062OPDBMapper.getKKSV006209SC` | KKSV006209SC | - | Reads KKSV0062 output |
| R | `KKSV0062_KKSV0062OPDBMapper.getKKSV006210SC` | KKSV006210SC | - | Reads KKSV0062 output |
| R | `KKSV0062_KKSV0062OPDBMapper.getKKSV006211SC` | KKSV006211SC | - | Reads KKSV0062 output (service contract history details with svc_kei_stat) |
| R | `KKSV0062_KKSV0062OPDBMapper.getKKSV006212SC` | KKSV006212SC | - | Reads KKSV0062 output (conditional for Wi-Fi/EMobile/UQ-WiMAX) |
| R | `KKSV0062_KKSV0062OPDBMapper.getKKSV006221SC` | KKSV006221SC | - | Reads KKSV0062 output |
| R | `KKSV0062_KKSV0062OPDBMapper.getKKSV006223SC` | KKSV006223SC | - | Reads KKSV0062 output (EKK0081B024CBSMsg1List with svc_kei_stat) |
| R | `KKSV0463_KKSV0463OPDBMapper.getKKSV046301SC` | KKSV046301SC | - | Reads KKSV0463 output (individual modification difference classification) |
| R | `KKSV0551_KKSV0551OPDBMapper.getKKSV055101SC` | KKSV055101SC | - | Reads KKSV0551 output (individual discontinuation reason details) |
| - | `JKKOneStopApiCommonUtil.checkExistSysid` | JKKOneStopApiCommon | - | Validates that SYSID field exists in KKSV0820 output map |
| - | `JKKOneStopApiCommonUtil.checkExistSvcKeiNo` | JKKOneStopApiCommon | - | Validates that service contract number field exists in KKSV0820 output map |
| - | `JKKOneStopApiCommonUtil.checkExistUserId` | JKKOneStopApiCommon | - | Validates that user ID field exists in KKSV0820 output map |
| - | `JKKOneStopApiCommonUtil.checkIdoRsnCdPair` | JKKOneStopApiCommon | - | Validates that the individual discontinuation reason broad category and middle category codes form a valid combination |
| - | `JKKOneStopApiCommonUtil.checkSvcKeiIdoPsb` | JKKOneStopApiCommon | - | Checks whether the service contract is eligible for modification/discontinuation (ido) |
| - | `JKKOneStopApiCommonUtil.setReturnXml` | JKKOneStopApiCommon | - | Sets the error XML response with error code (E5003/E5010/E5011/E5012/E5013) |
| - | `OneStopDataBeanAccess.sendMessageString` | OneStopDataBeanAccess | - | Sends string messages to the One-Stop data bean for parameter passing |
| - | `KKA14201SFLogic.invokeService` | KKA14201SFLogic | - | Internal method to invoke service components (KKSV0820OP, KKSV0061OP, KKSV0062OP, KKSV0463OP, KKSV0551OP) |

## 5. Dependency Trace

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

No screen/batch entry points found within 8 hops. Direct callers found: 1 methods.
Terminal operations from this method: `setReturnXml` [-], `setReturnXml` [-], `setReturnXml` [-], `checkSvcKeiIdoPsb` [-], `setReturnXml` [-], `setReturnXml` [-], `setReturnXml` [-], `checkIdoRsnCdPair` [-], `invokeService` [-], `setKKSV055101SC` [-], `setKKSV055101SC` [-], `invokeService` [-], `setKKSV046301SC` [-], `setKKSV046301SC` [-], `getKKSV006223SC` [R], `getKKSV006223SC` [R], `getKKSV006212SC` [R], `getKKSV006212SC` [R], `getKKSV006221SC` [R], `getKKSV006221SC` [R]  # NOSONAR

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Caller: KKA14201SFLogic.apiControl | `KKA14201SFLogic.apiControl` -> `KKA14201SFLogic.commonKnrnChkForOneStop` | `setReturnXml [E5003/E5010/E5011/E5012/E5013]`, `checkExistSysid [R]`, `checkExistSvcKeiNo [R]`, `checkExistUserId [R]`, `checkIdoRsnCdPair [R]`, `checkSvcKeiIdoPsb [R]`, `getKKSV006212SC [R]`, `getKKSV006223SC [R]`, `getKKSV006221SC [R]`, `invokeService [C] KKSV0820OP/KKSV0061OP/KKSV0062OP/KKSV0463OP/KKSV0551OP` |

## 6. Per-Branch Detail Blocks

**Block 1** — [SET] Data bean and request parameter extraction (L815)

> Retrieves the service form bean and extracts all request parameters needed for One-Stop validation.

| # | Type | Code |
|---|------|------|
| 1 | SET | `bean = super.getServiceFormBean()` // Get service form data bean [-> X31SDataBeanAccess] |
| 2 | SET | `paramBean = {bean}` // Wrap bean as array for mapper calls |
| 3 | SET | `sysid = requestMap.get("sysid")` // System ID for One-Stop identity |
| 4 | SET | `svcKeiNo = requestMap.get("svc_kei_no")` // Service contract number |
| 5 | SET | `userId = requestMap.get("user_id")` // User identifier |
| 6 | SET | `idoDiv = OS_IDO_DIV` // One-Stop individual modification division [-> IDO_DIV_VALUE_00031] |
| 7 | SET | `idoRsnDbriCd = requestMap.get("ido_rsn_dbri_cd")` // Individual discontinuation reason broad category code |
| 8 | SET | `idoRsnCbriCd = requestMap.get("ido_rsn_cbri_cd")` // Individual discontinuation reason middle category code |
| 9 | SET | `cdSbtList = new ArrayList<String>()` // Code subtype list (unused, empty) |
| 10 | SET | `opeDate = JCCWebCommon.getOpeDate(this, null)` // Get operational date for transaction |

**Block 2** — [SET] KKSV0820 parameter preparation (L831)

> Prepares the input parameters for the SYSID/service contract/user existence check service KKSV0820.

| # | Type | Code |
|---|------|------|
| 1 | SET | `kksv0820ParamMap = new HashMap()` // Service invocation parameter map |
| 2 | SET | `kksv0820InputMap = new HashMap()` // Input map for KKSV0820 |
| 3 | SET | `kksv0820OutputMap = new HashMap()` // Output map for KKSV0820 |
| 4 | SET | `kksv0820ParamMap.put(TELEGRAM_INFO_USECASE_ID, "KKSV0820")` // Use case identifier |
| 5 | SET | `kksv0820ParamMap.put(TELEGRAM_INFO_OPERATION_ID, "KKSV0820OP")` // Operation identifier |
| 6 | SET | `kksv0820Mapper = new KKSV0820_KKSV0820OPDBMapper()` // Mapper instance |
| 7 | CALL | `kksv0820Mapper.setKKSV082001CC(paramBean, kksv0820InputMap, opeDate, sysid, svcKeiNo, userId, cdSbtList)` // Set up KKSV082001CC with existence check parameters |

**Block 3** — [CALL] KKSV0820 service invocation (L840)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `invokeService(kksv0820ParamMap, kksv0820InputMap, kksv0820OutputMap)` // Invoke KKSV0820OP to validate existence of SYSID, service contract number, and user ID |

**Block 4** — [IF] SYSID existence check (L843)

> Verifies that the SYSID is present in the KKSV0820 output. Error code E5010 if missing.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `!JKKOneStopApiCommonUtil.checkExistSysid(kksv0820OutputMap)` // Check if SYSID exists |
| 2 | SET | `JKKOneStopApiCommonUtil.setReturnXml(this, "E5010", warnList, funcCode, IF_ID)` // Set error XML with code E5010 |
| 3 | RETURN | `return false` // Validation failed, exit early |

**Block 5** — [IF] Service contract number existence check (L852)

> Verifies that the service contract number (`svc_kei_no`) is present. Error code E5011 if missing.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `!JKKOneStopApiCommonUtil.checkExistSvcKeiNo(kksv0820OutputMap)` // Check if service contract number exists |
| 2 | SET | `JKKOneStopApiCommonUtil.setReturnXml(this, "E5011", warnList, funcCode, IF_ID)` // Set error XML with code E5011 |
| 3 | RETURN | `return false` // Validation failed, exit early |

**Block 6** — [IF] User ID existence check (L861)

> Verifies that the user ID is present. Error code E5012 if missing.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `!JKKOneStopApiCommonUtil.checkExistUserId(kksv0820OutputMap)` // Check if user ID exists |
| 2 | SET | `JKKOneStopApiCommonUtil.setReturnXml(this, "E5012", warnList, funcCode, IF_ID)` // Set error XML with code E5012 |
| 3 | RETURN | `return false` // Validation failed, exit early |

**Block 7** — [SET] Extract code classification data (L871)

> Extracts the code classification (code subtype map) from KKSV0820 output for downstream use.

| # | Type | Code |
|---|------|------|
| 1 | SET | `kksv082001ccMap = kksv0820OutputMap.get("KKSV082001CC")` // Get CC output map |
| 2 | SET | `codeMeishoKanriMap = kksv082001ccMap.get("codeMeishoKanriMap")` // Get code name management map |
| 3 | SET | `cdDivListMap = codeMeishoKanriMap.get("rslt_cd_sbt_map")` // Extract result code subtype map [-> instance field] |

**Block 8** — [SET] OneStopDataBeanAccess initialization (L875)

> Initializes the One-Stop data bean with system identification parameters for subsequent service calls.

| # | Type | Code |
|---|------|------|
| 1 | SET | `osBean = new OneStopDataBeanAccess()` // Create One-Stop data bean access |
| 2 | EXEC | `osBean.sendMessageString("SYSTEM_ID", DATABEAN_SET_VALUE, sysid)` // Set SYSID in OneStop bean |
| 3 | EXEC | `osBean.sendMessageString("Selected Service Contract Number", DATABEAN_SET_VALUE, svcKeiNo)` // Set service contract number |
| 4 | EXEC | `osBean.sendMessageString("Operational Date", DATABEAN_SET_VALUE, opeDate)` // Set operational date |
| 5 | EXEC | `osBean.sendMessageString("Service Contract Number", DATABEAN_SET_VALUE, svcKeiNo)` // Set service contract number (IT1-2016-0000100 ADD) |
| 6 | SET | `paramOsBean = {osBean}` // Wrap bean as array for mapper calls |

**Block 9** — [SET] KKSV0061 parameter preparation (L887)

> Prepares service component inputs for retrieving service-related information (contract details, service specs).

| # | Type | Code |
|---|------|------|
| 1 | SET | `kksv0061ParamMap = new HashMap()` // Service invocation parameter map |
| 2 | SET | `kksv0061InputMap = new HashMap()` // Input map for KKSV0061 |
| 3 | SET | `kksv0061OutputMap = new HashMap()` // Output map for KKSV0061 |
| 4 | SET | `kksv0061ParamMap.put(TELEGRAM_INFO_USECASE_ID, JKKCommonConst.UCID_KKSV0061)` // Use case ID |
| 5 | SET | `kksv0061ParamMap.put(TELEGRAM_INFO_OPERATION_ID, JKKCommonConst.OPID_KKSV0061OP)` // Operation ID |
| 6 | SET | `kksv0061Mapper = new KKSV0061_KKSV0061OPDBMapper()` // Mapper instance |
| 7 | CALL | `kksv0061Mapper.setKKSV006101SC(paramOsBean, kksv0061InputMap, JPCModelConstant.FUNC_CD_1)` // Set service contract info |
| 8 | CALL | `kksv0061Mapper.setKKSV006102SC(paramOsBean, kksv0061InputMap, JPCModelConstant.FUNC_CD_3)` // Set service detail info |
| 9 | CALL | `kksv0061Mapper.setKKSV006103SC(paramOsBean, kksv0061InputMap, JPCModelConstant.FUNC_CD_3)` // Set additional service info |

**Block 10** — [CALL] KKSV0061 service invocation (L898)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `invokeService(kksv0061ParamMap, kksv0061InputMap, kksv0061OutputMap)` // Invoke KKSV0061OP |

**Block 11** — [CALL] KKSV0061 output retrieval (L901)

> Extracts all KKSV0061 output data into the parameter bean.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `kksv0061Mapper.getKKSV006101SC(paramOsBean, kksv0061OutputMap)` // Get service contract info |
| 2 | CALL | `kksv0061Mapper.getKKSV006102SC(paramOsBean, kksv0061OutputMap)` // Get service detail info |
| 3 | CALL | `kksv0061Mapper.getKKSV006103SC(paramOsBean, kksv0061OutputMap)` // Get additional service info |
| 4 | CALL | `kksv0061Mapper.getKKSV006104SC(paramOsBean, kksv0061OutputMap)` // Get service status info |

**Block 12** — [SET] KKSV0062 parameter preparation (L909)

> Prepares a large set of service component inputs for retrieving service contract history and related data. This includes history lists, status checks, and conditional data for Wi-Fi/EMobile/UQ-WiMAX services.

| # | Type | Code |
|---|------|------|
| 1 | SET | `kksv0062ParamMap = new HashMap()` // Service invocation parameter map |
| 2 | SET | `kksv0062InputMap = new HashMap()` // Input map for KKSV0062 |
| 3 | SET | `kksv0062OutputMap = new HashMap()` // Output map for KKSV0062 |
| 4 | SET | `kksv0062ParamMap.put(TELEGRAM_INFO_USECASE_ID, JKKCommonConst.UCID_KKSV0062)` // Use case ID |
| 5 | SET | `kksv0062ParamMap.put(TELEGRAM_INFO_OPERATION_ID, JKKCommonConst.OPID_KKSV0062OP)` // Operation ID |
| 6 | SET | `kksv0062Mapper = new KKSV0062_KKSV0062OPDBMapper()` // Mapper instance |
| 7 | CALL | `kksv0062Mapper.setKKSV006201SC(paramOsBean, kksv0062InputMap, JPCModelConstant.FUNC_CD_2)` // Service contract history |
| 8 | CALL | `kksv0062Mapper.setKKSV006202SC(paramOsBean, kksv0062InputMap, JPCModelConstant.FUNC_CD_1)` // History setup |
| 9 | CALL | `kksv0062Mapper.setKKSV006203SC(paramOsBean, kksv0062InputMap, JPCModelConstant.FUNC_CD_1)` // History setup |
| 10 | CALL | `kksv0062Mapper.setKKSV006205SC(paramOsBean, kksv0062InputMap, JPCModelConstant.FUNC_CD_1)` // History setup |
| 11 | CALL | `kksv0062Mapper.setKKSV006206SC(paramOsBean, kksv0062InputMap, JPCModelConstant.FUNC_CD_1)` // History setup |
| 12 | CALL | `kksv0062Mapper.setKKSV006207SC(paramOsBean, kksv0062InputMap, JPCModelConstant.FUNC_CD_6)` // Additional history |
| 13 | CALL | `kksv0062Mapper.setKKSV006208SC(paramOsBean, kksv0062InputMap, JPCModelConstant.FUNC_CD_2)` // Difference classification |
| 14 | CALL | `kksv0062Mapper.setKKSV006209SC(paramOsBean, kksv0062InputMap, JPCModelConstant.FUNC_CD_1)` // History setup |
| 15 | CALL | `kksv0062Mapper.setKKSV006210SC(paramOsBean, kksv0062InputMap, JPCModelConstant.FUNC_CD_2)` // History setup |
| 16 | CALL | `kksv0062Mapper.setKKSV006212SC(paramOsBean, kksv0062InputMap, JPCModelConstant.FUNC_CD_1)` // History setup |
| 17 | CALL | `kksv0062Mapper.setKKSV006221SC(paramOsBean, kksv0062InputMap, JPCModelConstant.FUNC_CD_1)` // History setup |
| 18 | CALL | `kksv0062Mapper.setKKSV006222CC(paramOsBean, kksv0062InputMap, JPCModelConstant.FUNC_CD_1)` // Added ANK-2687 [L929] |
| 19 | CALL | `kksv0062Mapper.setKKSV006223SC(paramOsBean, kksv0062InputMap, JPCModelConstant.FUNC_CD_2)` // Added IT1-2016-0000100 [L932] |

**Block 13** — [CALL] KKSV0062 service invocation (L934)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `invokeService(kksv0062ParamMap, kksv0062InputMap, kksv0062OutputMap)` // Invoke KKSV0062OP |

**Block 14** — [CALL] KKSV0062 output retrieval (L937)

> Extracts all KKSV0062 output data. Conditionally retrieves extra data for Wi-Fi/EMobile/UQ-WiMAX services.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `kksv0062Mapper.getKKSV006201SC(paramOsBean, kksv0062OutputMap)` // Get service contract history |
| 2 | CALL | `kksv0062Mapper.getKKSV006205SC(paramOsBean, kksv0062OutputMap)` // Get history data |
| 3 | CALL | `kksv0062Mapper.getKKSV006207SC(paramOsBean, kksv0062OutputMap)` // Get history data |
| 4 | CALL | `kksv0062Mapper.getKKSV006209SC(paramOsBean, kksv0062OutputMap)` // Get history data |
| 5 | CALL | `kksv0062Mapper.getKKSV006210SC(paramOsBean, kksv0062OutputMap)` // Get history data |
| 6 | CALL | `kksv0062Mapper.getKKSV006211SC(paramOsBean, kksv0062OutputMap)` // Get history details (includes svc_kei_stat) |
| 7 | CALL | `kksv0062Mapper.getKKSV006208SC(paramOsBean, kksv0062OutputMap)` // Get difference classification |
| 8 | CALL | `kksv0062Mapper.getKKSV006221SC(paramOsBean, kksv0062OutputMap)` // Get history data |

**Block 15** — [SET] Extract prcGrpCd from service contract history (L940)

> Extracts the processing group code (`prc_grp_cd`) from the first entry of the EKK0081A010CBSMsg1List. This code identifies the service type category.

| # | Type | Code |
|---|------|------|
| 1 | SET | `kksv006201scMap = kksv0062OutputMap.get("KKSV006201SC")` // Get SC output map |
| 2 | SET | `ekk0081a010List = kksv006201scMap.get("EKK0081A010CBSMsg1List")` // Get CBS message list |
| 3 | SET | `ekk0081a010Map = (list not null && size > 0) ? list.get(0) : null` // Get first entry |
| 4 | SET | `prcGrpCd = (ekk0081a010Map != null) ? ekk0081a010Map.get("prc_grp_cd") : ""` // Extract processing group code |

**Block 16** — [IF] Service type check — Wi-Fi/EMobile/UQ-WiMAX (L943) `[prcGrpCd in ("07", "08", "09", "10")]`

> If the processing group code indicates a Wi-Fi (07), EMobile (08), UQ-WiMAX (09), or related service (10), retrieve additional service contract history data via KKSV006212SC.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `"07".equals(prcGrpCd) \|\| "08".equals(prcGrpCd) \|\| "09".equals(prcGrpCd) \|\| "10".equals(prcGrpCd)` // Check if Wi-Fi/EMobile/UQ-WiMAX service |
| 2 | CALL | `kksv0062Mapper.getKKSV006212SC(paramOsBean, kksv0062OutputMap)` // Get additional service data |

**Block 17** — [CALL] KKSV006223SC retrieval (L947)

> Retrieves the service contract history details list (EKK0081B024CBSMsg1List) which includes service status information. Added IT1-2016-0000100.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `kksv0062Mapper.getKKSV006223SC(paramOsBean, kksv0062OutputMap)` // Get service contract history details |

**Block 18** — [SET] Extract svc_kei_stat from history list (L950)

> Prepares to check if the customer has any service with active provision status.

| # | Type | Code |
|---|------|------|
| 1 | SET | `kksv006223scMap = kksv0062OutputMap.get("KKSV006223SC")` // Get SC output map |
| 2 | SET | `eKK0081B024List = kksv006223scMap.get("EKK0081B024CBSMsg1List")` // Get history list |
| 3 | SET | `eKK0081B024Map = null` // Current row map |
| 4 | SET | `svcKeiStat = ""` // Service contract status |

**Block 19** — [IF] History list null check (L956) `[eKK0081B024List != null && size > 0]`

> Only process the loop if the service contract history list is non-null and has entries. The Japanese comment reads: "Service contract history list map — if history details are not NULL and the history details list size is greater than 0."

| # | Type | Code |
|---|------|------|
| 1 | SET | `eKK0081B024Map = (Map)eKK0081B024List.get(i)` // Get current history entry |
| 2 | SET | `svcKeiStat = eKK0081B024Map.get("svc_kei_stat")` // Extract service contract status |

**Block 19.1** — [IF] Service providing status check (L963) `[svc_kei_stat == JKKCommonConst.SVC_KEI_STAT_100 == "100"]`

> If any service contract has status "100" (Service Providing / サービス提供中), set the active service flag to "1" and break the loop. The Japanese comment reads: "If service contract status = '100' (Service Providing), set service provision history flag to '1' (Service provision history exists)."

| # | Type | Code |
|---|------|------|
| 1 | SET | `svcTkRrkFlg = "1"` // Set service provision history flag |
| 2 | EXEC | `break` // Exit loop early since active service found |

**Block 20** — [SET] KKSV0463 parameter preparation (L977)

> Prepares the difference/discontinuation classification service for retrieving which modification types are available for this service contract.

| # | Type | Code |
|---|------|------|
| 1 | SET | `kksv0463ParamMap = new HashMap()` // Service invocation parameter map |
| 2 | SET | `kksv0463InputMap = new HashMap()` // Input map for KKSV0463 |
| 3 | SET | `kksv0463OutputMap = new HashMap()` // Output map for KKSV0463 |
| 4 | SET | `kksv0463ParamMap.put(TELEGRAM_INFO_USECASE_ID, JKKCommonConst.UCID_KKSV0463)` // Use case ID |
| 5 | SET | `kksv0463ParamMap.put(TELEGRAM_INFO_OPERATION_ID, JKKCommonConst.OPID_KKSV0463OP)` // Operation ID |
| 6 | SET | `kksv0463Mapper = new KKSV0463_KKSV0463OPDBMapper()` // Mapper instance |
| 7 | CALL | `kksv0463Mapper.setKKSV046301SC(paramOsBean, kksv0463InputMap, JPCModelConstant.FUNC_CD_1, idoDiv)` // Set difference classification with modification division code |

**Block 21** — [CALL] KKSV0463 service invocation (L982)

> The Japanese comment reads: "Execute difference classification selection difference reason service."

| # | Type | Code |
|---|------|------|
| 1 | CALL | `invokeService(kksv0463ParamMap, kksv0463InputMap, kksv0463OutputMap)` // Invoke KKSV0463OP |

**Block 22** — [SET] KKSV0551 parameter preparation (L988)

> Prepares the individual discontinuation reason service for retrieving available discontinuation reasons.

| # | Type | Code |
|---|------|------|
| 1 | SET | `kksv0551ParamMap = new HashMap()` // Service invocation parameter map |
| 2 | SET | `kksv0551InputMap = new HashMap()` // Input map for KKSV0551 |
| 3 | SET | `kksv0551OutputMap = new HashMap()` // Output map for KKSV0551 |
| 4 | SET | `kksv0551ParamMap.put(TELEGRAM_INFO_USECASE_ID, JKKCommonConst.UCID_KKSV0551)` // Use case ID |
| 5 | SET | `kksv0551ParamMap.put(TELEGRAM_INFO_OPERATION_ID, JKKCommonConst.OPID_KKSV0551OP)` // Operation ID |
| 6 | SET | `kksv0551Mapper = new KKSV0551_KKSV0551OPDBMapper()` // Mapper instance |
| 7 | CALL | `kksv0551Mapper.setKKSV055101SC(paramOsBean, kksv0551InputMap, JPCModelConstant.FUNC_CD_1, idoRsnDbriCd)` // Set reason with broad category code |

**Block 23** — [CALL] KKSV0551 service invocation (L997)

> The Japanese comment reads: "Execute difference reason broad category switching service."

| # | Type | Code |
|---|------|------|
| 1 | CALL | `invokeService(kksv0551ParamMap, kksv0551InputMap, kksv0551OutputMap)` // Invoke KKSV0551OP |

**Block 24** — [IF] Difference reason pair validation (L1002)

> Validates that the individual discontinuation reason broad category and middle category codes form a valid combination. Error code E5013 if invalid. The Japanese comment reads: "Difference reason broad category / middle category combination check."

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `!JKKOneStopApiCommonUtil.checkIdoRsnCdPair(kksv0463OutputMap, kksv0551OutputMap, osBean, idoRsnDbriCd, idoRsnCbriCd)` // Check reason pair validity |
| 2 | SET | `JKKOneStopApiCommonUtil.setReturnXml(this, "E5013", warnList, funcCode, IF_ID)` // Set error XML with code E5013 |
| 3 | RETURN | `return false` // Validation failed, exit early |

**Block 25** — [IF] Service contract modification feasibility check (L1008)

> Checks whether the service contract is eligible for modification or discontinuation. Error code E5003 if not feasible. The Japanese comment reads: "Service contract difference feasibility check."

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `!JKKOneStopApiCommonUtil.checkSvcKeiIdoPsb(kksv0062OutputMap, osBean, idoDiv)` // Check service modification eligibility |
| 2 | SET | `JKKOneStopApiCommonUtil.setReturnXml(this, "E5003", warnList, funcCode, IF_ID)` // Set error XML with code E5003 |
| 3 | RETURN | `return false` // Validation failed, exit early |

**Block 26** — [RETURN] Success (L1015)

> All validations passed — the One-Stop check completed successfully.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return true` // All checks passed |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `commonKnrnChkForOneStop` | Method | Common related check method for One-Stop — validates all prerequisites for the One-Stop consolidated service view |
| ワンストップ (One-Stop) | Business term | One-Stop service — a consolidated interface allowing customers to manage multiple Fujitsu service contracts through a single login/screen |
| `sysid` | Field | System ID — unique One-Stop identity identifier for the customer session |
| `svc_kei_no` | Field | Service contract number (サービス契約番号) — the unique identifier for a specific service contract line |
| `user_id` | Field | User ID — the customer's account identifier in the system |
| `ido_div` | Field | Individual modification division (個別変更区分) — classification for the type of individual service modification being performed |
| `ido_rsn_dbri_cd` | Field | Individual discontinuation reason broad category code (個別解約理由大分類コード) — primary categorization for why a service is being discontinued |
| `ido_rsn_cbri_cd` | Field | Individual discontinuation reason middle category code (個別解約理由中分類コード) — secondary refinement of the discontinuation reason |
| `opeDate` | Field | Operational date (運用日付) — the system date used as the transaction date for all operations |
| `prc_grp_cd` | Field | Processing group code (処理グループコード) — identifies the service type category (07=Wi-Fi, 08=EMobile, 09=UQ-WiMAX, 10=other) |
| `svc_kei_stat` | Field | Service contract status (サービス契約ステータス) — current status of a service contract; "100" means active/providing |
| `svcTkRrkFlg` | Field | Service provision history flag (サービス提供履歴フラグ) — set to "1" when an active service (status 100) is found, indicating the customer has an active service |
| `cdDivListMap` | Field | Code classification map (コード区分リストマップ) — stores code name management data extracted from KKSV0820, used by downstream callers |
| `cdSbtList` | Field | Code subtype list (コード種類リスト) — list of code subtypes, initialized empty in this method |
| OS_IDO_DIV | Constant | One-Stop individual modification division constant, resolves to `IDO_DIV_VALUE_00031` — a fixed One-Stop-specific modification division value |
| SVC_KEI_STAT_100 | Constant | Service contract status "100" — Services Providing (サービス提供中) |
| FUNC_CD_1 to FUNC_CD_6 | Constant | Function code constants used to configure service component input parameters (FUNC_CD_1 = standard, FUNC_CD_2 = list retrieval, FUNC_CD_3 = detail, FUNC_CD_6 = extended) |
| KKSV0820 | Service Screen | SYSID / service contract number / user existence check and code name management — validates identity fields and retrieves code classification data |
| KKSV0061 | Service Screen | Service-related information retrieval — fetches service contract details and service specifications |
| KKSV0062 | Service Screen | Service contract history retrieval — fetches contract history, status, and modification eligibility data |
| KKSV0463 | Service Screen | Difference/discontinuation classification retrieval — retrieves which modification types are available for the service |
| KKSV0551 | Service Screen | Individual discontinuation reason retrieval — retrieves available discontinuation reasons based on broad category |
| E5003 | Error Code | Service contract modification not feasible (サービス契約変更不可) — the service cannot be modified or discontinued |
| E5010 | Error Code | SYSID does not exist (SYSID不存在) — the provided system ID was not found |
| E5011 | Error Code | Service contract number does not exist (サービス契約番号不存在) — the provided service contract number was not found |
| E5012 | Error Code | User ID does not exist (ユーザID不存在) — the provided user ID was not found |
| E5013 | Error Code | Invalid discontinuation reason combination (解約理由組み合わせエラー) — the broad/middle category reason codes do not form a valid pair |
| setReturnXml | Method | OneStop API common method — constructs an XML error response with the specified error code, warning list, function code, and interface ID |
| checkExistSysid | Method | Validates SYSID field presence in KKSV0820 output |
| checkExistSvcKeiNo | Method | Validates service contract number field presence in KKSV0820 output |
| checkExistUserId | Method | Validates user ID field presence in KKSV0820 output |
| checkIdoRsnCdPair | Method | Validates that the discontinuation reason broad/middle category code pair is valid |
| checkSvcKeiIdoPsb | Method | Checks whether the service contract is eligible for modification/discontinuation (ido = 個別変更) |
| invokeService | Method | Internal logic method that dispatches to the appropriate service component operation |
| OneStopDataBeanAccess | Component | One-Stop specific data bean access class for passing parameters between services in the One-Stop flow |
| FTTH | Business term | Fiber To The Home — fiber-optic internet broadband service (context domain) |
| ENUM | Business term | ENUM service — telephone number mapping service (context domain) |