# Business Logic — JKKOrsjgsUseStpRlsRunCC.orsjgsUseStpRlsKanrencheck() [147 LOC]

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

## 1. Role

### JKKOrsjgsUseStpRlsRunCC.orsjgsUseStpRlsKanrencheck()

This method serves as a **related-party (contractor) validation gate** for the service contract suspension-resume process ("orsjgs" = "oryoku teishi hanrei" — suspension exemption/release). It is a shared utility method called during the broader suspension-resume workflow to ensure data integrity before allowing a suspension exemption to proceed. The method performs four sequential validation checks: (1) **contract existence check** — confirms a service contract record exists for the given service contract number; (2) **service type check** — verifies the contract is for a network (NET) service (service code CD00130_01 = "01"), since suspension exemptions only apply to network services; (3) **contractor (denpa-jigyo-sha) consistency check** — ensures the contractor code from the original request matches the contractor stored in the customer agreement information, and further validates that the contractor's business period includes the operation date; and (4) **contract status check** — scans all service contracts on the same service line to confirm at least one other service (Telephone, Television, or Network) is currently suspended (status CD00037_STAT_STP = "220"). If any check fails, the method sets a specific return code and error message, then returns early. It follows a **gatekeeper / guard clause** design pattern, using cascading early returns to fail fast on any validation issue.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["orsjgsUseStpRlsKanrencheck(params)"])
    CHECK_MSG["Get ccMsg from param"]
    CREATE_INVOKER["Create ServiceComponentRequestInvoker"]
    GET_SVC_KEI_NO["Get svcKeiNo from ccMsg"]
    GET_ORSJGS_CD["Get orsjgsCd from ccMsg"]
    GET_OPE_DATE["Get unyoYMD via JCCBPCommon.getOpeDate"]
    CALL_EKK0081["editInMsgEKK0081A010(svcKeiNo, unyoYMD)"]
    INVOK_EKK0081["callSC(handle, scCall, param, fixedText, ekk0081a010)"]
    COND_EXISTS["Contract exists?
(ekk0081a010Out.length == 0)"]
    ERR_CONTRACT["Set return CD=1100
contract check error"]
    RET_1100(["Return CD_1100"])
    GET_SVC_CD["Get svcCd from EKK0081A010 result"]
    COND_SVC_CD["svcCd == CD00130_01?
(network service)"]
    ERR_SVC_CD["Set return CD=1103
service code check error"]
    RET_1103(["Return CD_1103"])
    GET_SYSID["Get sysid from EKK0081A010 result"]
    CALL_ECK0011["editInMsgECK0011A010(sysid, unyoYMD)"]
    INVOK_ECK0011["callSC(handle, scCall, param, fixedText, eck0011a010In)"]
    COND_CUSTOMER["Customer info exists?
(eck0011a010Out.length > 0)"]
    GET_ORSJGS_ECK["Get orsjgsCdEk0011a010 from ECK0011A010 result"]
    COND_ORSJGS_MISMATCH["orsjgsCdEk0011a010 is blank
OR
does not match orsjgsCd"]
    ERR_ORSJGS_1["Set return CD=1101
contractor check error"]
    RET_1101_A(["Return CD_1101"])
    CALL_ECH0911["editInMsgECH0911A010(orsjgsCdEk0011a010, unyoYMD)"]
    INVOK_ECH0911["callSC(handle, scCall, param, fixedText, ech0911a010In)"]
    COND_ECH0911["Ech0911a010 result exists?"]
    COND_VALIDITY["unyoYMD within
[TSTAYMD, TENDYMD]?"]
    ERR_ORSJGS_2["Set return CD=1101
contractor check error"]
    RET_1101_B(["Return CD_1101"])
    CLEAR_LIST["pramSvcKeiStList.clear()"]
    COND_PRAM_SIZE["pramSvcKeiStat size > 0?"]
    CHECK_DENWA["Check CD00130_02 (Telephone)
if suspended add to list"]
    CHECK_TEREBI["Check CD00130_03 (Television)
if suspended add to list"]
    CHECK_NET["Check CD00130_01 (Network)
if suspended add to list"]
    COND_SUSPENDED["Suspended services found?
(pramSvcKeiStList.size == 0)"]
    ERR_STAT["Set return CD=1102
contract status check error"]
    RET_1102(["Return CD_1102"])
    RET_OK(["Return CHECK_OK"])

    START --> CHECK_MSG
    CHECK_MSG --> CREATE_INVOKER
    CREATE_INVOKER --> GET_SVC_KEI_NO
    GET_SVC_KEI_NO --> GET_ORSJGS_CD
    GET_ORSJGS_CD --> GET_OPE_DATE
    GET_OPE_DATE --> CALL_EKK0081
    CALL_EKK0081 --> INVOK_EKK0081
    INVOK_EKK0081 --> COND_EXISTS
    COND_EXISTS -- true --> ERR_CONTRACT
    ERR_CONTRACT --> RET_1100
    COND_EXISTS -- false --> GET_SVC_CD
    GET_SVC_CD --> COND_SVC_CD
    COND_SVC_CD -- true --> GET_SYSID
    COND_SVC_CD -- false --> ERR_SVC_CD
    ERR_SVC_CD --> RET_1103
    GET_SYSID --> CALL_ECK0011
    CALL_ECK0011 --> INVOK_ECK0011
    INVOK_ECK0011 --> COND_CUSTOMER
    COND_CUSTOMER -- false --> CLEAR_LIST
    COND_CUSTOMER -- true --> GET_ORSJGS_ECK
    GET_ORSJGS_ECK --> COND_ORSJGS_MISMATCH
    COND_ORSJGS_MISMATCH -- true --> ERR_ORSJGS_1
    ERR_ORSJGS_1 --> RET_1101_A
    COND_ORSJGS_MISMATCH -- false --> CALL_ECH0911
    CALL_ECH0911 --> INVOK_ECH0911
    INVOK_ECH0911 --> COND_ECH0911
    COND_ECH0911 -- false --> CLEAR_LIST
    COND_ECH0911 -- true --> COND_VALIDITY
    COND_VALIDITY -- false --> ERR_ORSJGS_2
    ERR_ORSJGS_2 --> RET_1101_B
    COND_VALIDITY -- true --> CLEAR_LIST
    COND_CUSTOMER -- false --> COND_PRAM_SIZE
    COND_ECH0911 -- false --> COND_PRAM_SIZE
    COND_PRAM_SIZE -- false --> CHECK_DENWA
    COND_PRAM_SIZE -- true --> CHECK_DENWA
    CHECK_DENWA --> CHECK_TEREBI
    CHECK_TEREBI --> CHECK_NET
    CHECK_NET --> COND_SUSPENDED
    COND_SUSPENDED -- true --> ERR_STAT
    ERR_STAT --> RET_1102
    COND_SUSPENDED -- false --> RET_OK
```

**Processing flow summary:**

1. **Initialization** — Extracts the correlation message map from the request parameters, creates a `ServiceComponentRequestInvoker` for SC invocations, retrieves the service contract number (`svcKeiNo`) and the dependency source classification / contractor code (`orsjgsCd`), and gets the current operation date.
2. **Contract existence check** — Calls `EKK0081A010` (service contract agreement information retrieval) and verifies the result set is non-empty. If empty, returns error code 1100.
3. **Service code check** — Verifies the service contract's service code is "01" (network service). If not, returns error code 1103.
4. **Contractor verification** — Extracts the `sysid` from the contract result, calls `ECK0011A010` (customer agreement information retrieval), and compares the retrieved contractor code against the request's contractor code. If they differ or the retrieved code is blank, returns error code 1101.
5. **Contractor business period validation** — Calls `ECH0911A010` (contractor agreement information retrieval) and validates the operation date falls within the contractor's business period (`TSTAYMD` to `TENDYMD`). If outside, returns error code 1101.
6. **Contract status check** — Iterates over the pre-populated service status map (`pramSvcKeiStat`) for each service type (Telephone=02, Television=03, Network=01) and collects those with suspended status ("220") into the result list. If no suspended services are found, returns error code 1102.
7. **Success** — Returns `CHECK_OK` if all checks pass.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | Database session handle used for service component (SC) invocations. Provides the transactional context for all SC calls within this method. |
| 2 | `param` | `IRequestParameterReadWrite` | Request parameter object that carries the input data map and allows the method to write back correlation messages (`ccMsg`) with return codes and error messages on failure. |
| 3 | `fixedText` | `String` | Key used to retrieve and store the correlation message map (`ccMsg`) from/to the request parameter object. Acts as the namespace key for this method's data within the broader request flow. |
| 4 | `pramSvcKeiStat` | `HashMap<String, String>` | Service contract status map keyed by service code (e.g., CD00130_01 for Network, CD00130_02 for Telephone, CD00130_03 for Television). Values are status codes. This map is pre-populated by the caller and scanned to identify which services are suspended. |
| 5 | `pramSvcKeiStList` | `List<String>` | Output list that collects service codes of services found to be in suspended status ("220"). Cleared at the start of the status check phase and populated incrementally. Used by the caller to determine which services remain suspended after the exemption. |

**Instance fields read:**
- None directly (no instance fields are accessed within this method).

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `JKKBatClarisAuthCrdt.isNullBlank` | JKKBatClarisAuthCrdt | - | Calls `isNullBlank` in `JKKBatClarisAuthCrdt` |
| - | `JKKBatClearPassBase.isNullBlank` | JKKBatClearPassBase | - | Calls `isNullBlank` in `JKKBatClearPassBase` |
| - | `JKKBatClearPassCrdt.isNullBlank` | JKKBatClearPassCrdt | - | Calls `isNullBlank` in `JKKBatClearPassCrdt` |
| - | `JBSbatACEoElectPrcInfoTrkm.isNullBlank` | JBSbatACEoElectPrcInfoTrkm | - | Calls `isNullBlank` in `JBSbatACEoElectPrcInfoTrkm` |
| - | `JBSbatACTrgtSvcKeiMake.isNullBlank` | JBSbatACTrgtSvcKeiMake | - | Calls `isNullBlank` in `JBSbatACTrgtSvcKeiMake` |
| - | `JBSbatAKKshkmRsltInfoTukiawsday.setData` | JBSbatAKKshkmRsltInfoTukiawsday | - | Calls `setData` in `JBSbatAKKshkmRsltInfoTukiawsday` |
| - | `JBSbatAKKshkmRsltInfoTukiaws.setData` | JBSbatAKKshkmRsltInfoTukiaws | - | Calls `setData` in `JBSbatAKKshkmRsltInfoTukiaws` |
| - | `JBSbatAKKshkmRsltInfoTukiawsRealSkh.setData` | JBSbatAKKshkmRsltInfoTukiawsRealSkh | - | Calls `setData` in `JBSbatAKKshkmRsltInfoTukiawsRealSkh` |
| - | `JBSbatAKKshkmRsltInfTkCvsNCnsl.setData` | JBSbatAKKshkmRsltInfTkCvsNCnsl | - | Calls `setData` in `JBSbatAKKshkmRsltInfTkCvsNCnsl` |
| R | `JBSbatDKNyukaFinAdd.getData` | JBSbatDKNyukaFinAdd | - | Calls `getData` in `JBSbatDKNyukaFinAdd` |
| R | `JBSbatFUCaseFileRnkData.getString` | JBSbatFUCaseFileRnkData | - | Calls `getString` in `JBSbatFUCaseFileRnkData` |
| R | `JBSbatFUMoveNaviData.getString` | JBSbatFUMoveNaviData | - | Calls `getString` in `JBSbatFUMoveNaviData` |
| - | `JBSbatKKGetCTITelno.setData` | JBSbatKKGetCTITelno | - | Calls `setData` in `JBSbatKKGetCTITelno` |
| R | `JBSbatZMAdDataSet.getString` | JBSbatZMAdDataSet | - | Calls `getString` in `JBSbatZMAdDataSet` |
| R | `JCCBPCommon.getOpeDate` | JCCBPCommon | - | Calls `getOpeDate` in `JCCBPCommon` to retrieve the current operation date |
| R | `JFUeoTelOpTransferCC.getData` | JFUeoTelOpTransferCC | - | Calls `getData` in `JFUeoTelOpTransferCC` |
| R | `JFUEoTvCngAddStbCC.getOpeDate` | JFUEoTvCngAddStbCC | - | Calls `getOpeDate` in `JFUEoTvCngAddStbCC` |
| R | `JFUHikkosiNaviRelAddCC.getOpeDate` | JFUHikkosiNaviRelAddCC | - | Calls `getOpeDate` in `JFUHikkosiNaviRelAddCC` |
| R | `JFUTransferCC.getData` | JFUTransferCC | - | Calls `getData` in `JFUTransferCC` |
| R | `JFUTransferListToListCC.getData` | JFUTransferListToListCC | - | Calls `getData` in `JFUTransferListToListCC` |
| R | `JKKCreditAddCC.getOpeDate` | JKKCreditAddCC | - | Calls `getOpeDate` in `JKKCreditAddCC` |
| R | `JKKOrsjgsUseStpRlsRunCC.callSC` | JKKOrsjgsUseStpRlsRunCC | - | Calls `callSC` in `JKKOrsjgsUseStpRlsRunCC` — generic SC invocation wrapper used for all three service component calls |
| U | `JKKOrsjgsUseStpRlsRunCC.editInMsgECH0911A010` | JKKOrsjgsUseStpRlsRunCC | - | Calls `editInMsgECH0911A010` in `JKKOrsjgsUseStpRlsRunCC` — prepares input message for contractor agreement info retrieval |
| U | `JKKOrsjgsUseStpRlsRunCC.editInMsgECK0011A010` | JKKOrsjgsUseStpRlsRunCC | - | Calls `editInMsgECK0011A010` in `JKKOrsjgsUseStpRlsRunCC` — prepares input message for customer agreement info retrieval |
| U | `JKKOrsjgsUseStpRlsRunCC.editInMsgEKK0081A010` | JKKOrsjgsUseStpRlsRunCC | - | Calls `editInMsgEKK0081A010` in `JKKOrsjgsUseStpRlsRunCC` — prepares input message for service contract agreement info retrieval |
| - | `JCCcomFileSearchUtil.clear` | JCCcomFileSearch | - | Calls `clear` in `JCCcomFileSearchUtil` |
| - | `JZMAdEdit.clear` | JZMAdEdit | - | Calls `clear` in `JZMAdEdit` |
| R | `JESC0101B010TPMA.getString` | JESC0101B010TPMA | - | Calls `getString` in `JESC0101B010TPMA` |
| R | `JESC0101B020TPMA.getString` | JESC0101B020TPMA | - | Calls `getString` in `JESC0101B020TPMA` |
| R | `JKKModelCommon.getOpeDate` | JKKModelCommon | - | Calls `getOpeDate` in `JKKModelCommon` |

**SC Code and Entity inference from source analysis:**

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `editInMsgEKK0081A010` / `callSC` | `EKK0081A010SC` | KK_T_SVC_KEI_AGREE (Service Contract Agreement) | Retrieves service contract agreement information by service contract number and operation date. Used to verify contract existence and obtain service code and sysid. |
| R | `editInMsgECK0011A010` / `callSC` | `ECK0011A010SC` | KK_T_CUSTOMER_AGREE (Customer Agreement) | Retrieves customer agreement (okimiyaku kaiwa) information by sysid and operation date. Used to validate contractor (denpa-jigyo-sha) consistency. |
| R | `editInMsgECH0911A010` / `callSC` | `ECH0911A010SC` | KK_T_CONTRACTOR_AGREE (Contractor Agreement) | Retrieves contractor agreement information by contractor code and operation date. Used to validate the contractor's business period includes the operation date. |
| R | `JCCBPCommon.getOpeDate` | `JCCBPCommon` | - | Gets the current operation date (YMD string format). |
| R | `callSC` | `JKKOrsjgsUseStpRlsRunCC` | - | Generic service component invocation wrapper. Calls the SC identified in the input message array and retrieves the CAAN response. |
| U | `editInMsgEKK0081A010` | `JKKOrsjgsUseStpRlsRunCC` | - | Constructs input message for service contract agreement retrieval SC. |
| U | `editInMsgECK0011A010` | `JKKOrsjgsUseStpRlsRunCC` | - | Constructs input message for customer agreement retrieval SC. |
| U | `editInMsgECH0911A010` | `JKKOrsjgsUseStpRlsRunCC` | - | Constructs input message for contractor agreement retrieval SC. |
| U | `param.setData` | `JKKOrsjgsUseStpRlsRunCC` | - | Writes return code and error message back to the request parameter object. |
| U | `ccMsg.put` | `JKKOrsjgsUseStpRlsRunCC` | - | Stores return code and return message in the correlation message map. |
| - | `pramSvcKeiStList.clear` | `JKKOrsjgsUseStpRlsRunCC` | - | Clears the output list before populating suspended service codes. |

## 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: `setData` [-], `setData` [-], `setData` [-], `setData` [-], `setData` [-], `isNullBlank` [-], `isNullBlank` [-], `isNullBlank` [-], `isNullBlank` [-], `isNullBlank` [-], `isNullBlank` [-], `isNullBlank` [-], `isNullBlank` [-], `isNullBlank` [-], `isNullBlank` [-], `isNullBlank` [-], `isNullBlank` [-], `isNullBlank` [-], `isNullBlank` [-], `isNullBlank` [-]

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | `JKKOrsjgsUseStpRlsRunCC.orsjgsRunUseStpRls()` | `orsjgsRunUseStpRls(handle, param, fixedText)` -> `orsjgsUseStpRlsKanrencheck(handle, param, fixedText, pramSvcKeiStat, pramSvcKeiStList)` | `EKK0081A010SC [R] KK_T_SVC_KEI_AGREE`, `ECK0011A010SC [R] KK_T_CUSTOMER_AGREE`, `ECH0911A010SC [R] KK_T_CONTRACTOR_AGREE`, `param.setData [U] RequestParams`, `ccMsg.put [U] CorrelationMap` |

**Notes on the call chain:**
The caller `orsjgsRunUseStpRls()` is itself a CC-level method that orchestrates the full suspension-resume process for related-party (contractor) scenarios. It queries service contract details via `callEKK0251B001SC`, determines the contract detail number, and then calls `orsjgsUseStpRlsKanrencheck` as a pre-condition validation before proceeding with the actual suspension exemption. The three SC calls made by this method query contract agreement data, customer agreement data, and contractor agreement data respectively — all read-only operations against the telecom service contract database.

## 6. Per-Branch Detail Blocks

**Block 1** — [SET] Initialization (L6308)

> Extracts the correlation message map and initializes the SC request invoker.

| # | Type | Code |
|---|------|------|
| 1 | SET | `ccMsg = (HashMap<String, Object>)param.getData(fixedText)` // Retrieves correlation message map |
| 2 | SET | `scCall = new ServiceComponentRequestInvoker()` // Creates SC invocation instance |

**Block 2** — [SET] Data retrieval (L6312–6316)

> Retrieves service contract number, contractor code, and operation date.

| # | Type | Code |
|---|------|------|
| 1 | SET | `svcKeiNo = (String)ccMsg.get(JKKStrConst.SVC_KEI_NO)` // Service contract number |
| 2 | SET | `orsjgsCd = (String)ccMsg.get(JKKStrConst.IRAIMOTO_KBN)` // Dependency source classification / contractor code |
| 3 | SET | `unyoYMD = JCCBPCommon.getOpeDate(null)` // Current operation date (YMD string) |

**Block 3** — [IF-ELSE] Contract existence check (L6320–6331)

> Calls EKK0081A010 to retrieve service contract agreement info and checks if a record exists.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `ekk0081a010 = editInMsgEKK0081A010(svcKeiNo, unyoYMD)` // Prepare input for service contract retrieval |
| 2 | CALL | `ekk0081a010Out = callSC(handle, scCall, param, fixedText, ekk0081a010).getCAANMsgList(EKK0081A010CBSMsg.EKK0081A010CBSMSG1LIST)` // Invoke SC and extract results |
| 3 | IF | `ekk0081a010Out.length == 0` // No contract found [L6324] |

**Block 3.1** — [ELSE-IF/ERROR] Contract not found (L6325–6331)

> Contract does not exist — returns error code 1100.

| # | Type | Code |
|---|------|------|
| 1 | SET | `ccMsg.put(JKKStrConst.RETURN_CODE, JKKStrConst.RETURN_CD_1100)` // Return code 1100 |
| 2 | SET | `ccMsg.put(JKKStrConst.RETURN_MESSAGE, JKKStrConst.RETURN_MESSAGE_KEI_EXISTS_CHECK_ERROR)` // Error: contract existence check error |
| 3 | EXEC | `param.setData(fixedText, ccMsg)` // Write back to request params |
| 4 | RETURN | `return JKKStrConst.RETURN_CD_1100` // Return early |

**Block 3.2** — [IF-ELSE] Service code check (L6334–6345)

> Verifies the service contract is for a network service (service code "01").

| # | Type | Code |
|---|------|------|
| 1 | SET | `svcCd = ekk0081a010Out[0].getString(EKK0081A010CBSMsg1List.SVC_CD)` // Service code from contract result |
| 2 | IF | `!CD00130_01.equals(svcCd)` where CD00130_01 = "01" (network service) [L6336] |

**Block 3.2.1** — [ERROR] Wrong service code (L6337–6345)

> Service code is not "01" (not a network service) — returns error code 1103.

| # | Type | Code |
|---|------|------|
| 1 | SET | `ccMsg.put(JKKStrConst.RETURN_CODE, JKKStrConst.RETURN_CD_1103)` // Return code 1103 |
| 2 | SET | `ccMsg.put(JKKStrConst.RETURN_MESSAGE, JKKStrConst.RETURN_MESSAGE_SVC_CD_CHECK_ERROR)` // Error: service code check error |
| 3 | EXEC | `param.setData(fixedText, ccMsg)` // Write back to request params |
| 4 | RETURN | `return JKKStrConst.RETURN_CD_1103` // Return early |

**Block 4** — [IF-ELSE] Contractor verification (L6349–6386)

> Retrieves customer agreement info, validates contractor code matches, and checks business period.

| # | Type | Code |
|---|------|------|
| 1 | SET | `sysid = ekk0081a010Out[0].getString(EKK0081A010CBSMsg1List.SYSID)` // Sysid from contract result |
| 2 | CALL | `eck0011a010In = editInMsgECK0011A010(sysid, unyoYMD)` // Prepare input for customer agreement retrieval |
| 3 | CALL | `eck0011a010Out = callSC(handle, scCall, param, fixedText, eck0011a010In).getCAANMsgList(ECK0011A010CBSMsg.ECK0011A010CBSMSG1LIST)` // Invoke SC and extract results |
| 4 | IF | `eck0011a010Out != null && eck0011a010Out.length > 0` // Customer info exists [L6350] |

**Block 4.1** — [ELSE] No customer info found (implicit fall-through)

> Customer agreement record is empty — skips contractor checks and falls through to status check.

| # | Type | Code |
|---|------|------|
| 1 | — | (implicit fall-through to Block 5) |

**Block 4.2** — [IF] Contractor code mismatch (L6353–6363)

> Retrieves contractor code from customer agreement and checks it matches the request's contractor code.

| # | Type | Code |
|---|------|------|
| 1 | SET | `orsjgsCdEk0011a010 = eck0011a010Out[0].getString(ECK0011A010CBSMsg1List.ORSJGS_CD)` // Contractor code from customer agreement |
| 2 | IF | `JKKStringUtil.isNullBlank(orsjgsCdEk0011a010) \|\| !orsjgsCd.equals(orsjgsCdEk0011a010)` // Contractor code is blank OR does not match request [L6354–6355] |

**Block 4.2.1** — [ERROR] Contractor code mismatch (L6356–6363)

> Contractor code does not match — returns error code 1101.

| # | Type | Code |
|---|------|------|
| 1 | SET | `ccMsg.put(JKKStrConst.RETURN_CODE, JKKStrConst.RETURN_CD_1101)` // Return code 1101 |
| 2 | SET | `ccMsg.put(JKKStrConst.RETURN_MESSAGE, JKKStrConst.RETURN_MESSAGE_ORSJIGS_CHECK_ERROR)` // Error: contractor check error |
| 3 | EXEC | `param.setData(fixedText, ccMsg)` // Write back to request params |
| 4 | RETURN | `return JKKStrConst.RETURN_CD_1101` // Return early |

**Block 4.3** — [IF] Contractor business period check (L6366–6383)

> Retrieves contractor agreement info and validates the operation date falls within the contractor's active business period.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `ech0911a010In = editInMsgECH0911A010(orsjgsCdEk0011a010, unyoYMD)` // Prepare input for contractor agreement retrieval |
| 2 | CALL | `ech0911a010Out = callSC(handle, scCall, param, fixedText, ech0911a010In).getCAANMsgList(ECH0911A010CBSMsg.ECH0911A010CBSMSG1LIST)` // Invoke SC and extract results |
| 3 | IF | `ech0911a010Out != null && ech0911a010Out.length > 0` // Contractor agreement exists [L6369] |

**Block 4.3.1** — [IF-ELSE] Business period out of range (L6370–6382)

> Validates the operation date (`unyoYMD`) falls within `[TSTAYMD, TENDYMD]` — the contractor's active business period start and end dates.

| # | Type | Code |
|---|------|------|
| 1 | IF | `TSTAYMD <= unyoYMD && unyoYMD <= TENDYMD` (negated — fails if outside period) [L6371–6372] |

**Block 4.3.1.1** — [ERROR] Business period expired (L6373–6382)

> Operation date is outside contractor's active business period — returns error code 1101.

| # | Type | Code |
|---|------|------|
| 1 | SET | `ccMsg.put(JKKStrConst.RETURN_CODE, JKKStrConst.RETURN_CD_1101)` // Return code 1101 |
| 2 | SET | `ccMsg.put(JKKStrConst.RETURN_MESSAGE, JKKStrConst.RETURN_MESSAGE_ORSJIGS_CHECK_ERROR)` // Error: contractor check error |
| 3 | EXEC | `param.setData(fixedText, ccMsg)` // Write back to request params |
| 4 | RETURN | `return JKKStrConst.RETURN_CD_1101` // Return early |

**Block 5** — [IF-ELSE] Contract status check (L6388–6440)

> Scans the service status map to find suspended services on the same service line. At least one other service must be suspended for the exemption to be allowed.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `pramSvcKeiStList.clear()` // Clear the output list |
| 2 | IF | `pramSvcKeiStat.size() > 0` // Status map is populated [L6392] |

**Block 5.1** — [IF-ELSE-IF] Telephone service check — CD00130_02 (L6395–6401)

> Checks if Telephone service (CD00130_02 = "02") is in suspended status (CD00037_STAT_STP = "220").

| # | Type | Code |
|---|------|------|
| 1 | IF | `!isNullBlank(pramSvcKeiStat.get(CD00130_02)) && containsKey(CD00130_02)` [L6395] |
| 2 | IF | `CD00037_STAT_STP.equals(pramSvcKeiStat.get(CD00130_02))` where CD00037_STAT_STP = "220" (suspended) [L6397] |

**Block 5.1.1** — [SET] Telephone is suspended (L6398–6399)

| # | Type | Code |
|---|------|------|
| 1 | SET | `pramSvcKeiStList.add(CD00130_02)` // Add telephone service code to suspended list |

**Block 5.2** — [IF] Television service check — CD00130_03 (L6403–6409)

> Checks if Television service (CD00130_03 = "03") is in suspended status.

| # | Type | Code |
|---|------|------|
| 1 | IF | `!isNullBlank(pramSvcKeiStat.get(CD00130_03)) && containsKey(CD00130_03)` [L6403] |
| 2 | IF | `CD00037_STAT_STP.equals(pramSvcKeiStat.get(CD00130_03))` where CD00037_STAT_STP = "220" |

**Block 5.2.1** — [SET] Television is suspended (L6404–6405)

| # | Type | Code |
|---|------|------|
| 1 | SET | `pramSvcKeiStList.add(CD00130_03)` // Add television service code to suspended list |

**Block 5.3** — [IF] Network service check — CD00130_01 (L6410–6417)

> Checks if Network service (CD00130_01 = "01") is in suspended status. Network is checked last per the comment.

| # | Type | Code |
|---|------|------|
| 1 | IF | `!isNullBlank(pramSvcKeiStat.get(CD00130_01)) && containsKey(CD00130_01)` [L6410] |
| 2 | IF | `CD00037_STAT_STP.equals(pramSvcKeiStat.get(CD00130_01))` where CD00037_STAT_STP = "220" |

**Block 5.3.1** — [SET] Network is suspended (L6412–6413)

| # | Type | Code |
|---|------|------|
| 1 | SET | `pramSvcKeiStList.add(CD00130_01)` // Add network service code to suspended list |

**Block 6** — [IF-ELSE] Suspended services not found (L6419–6428)

> After scanning all service types, if no suspended services were found, returns error code 1102.

| # | Type | Code |
|---|------|------|
| 1 | IF | `pramSvcKeiStList.size() == 0` // No suspended services found [L6419] |

**Block 6.1** — [ERROR] No suspended services (L6420–6428)

> No other service on this line is suspended — returns error code 1102.

| # | Type | Code |
|---|------|------|
| 1 | SET | `ccMsg.put(JKKStrConst.RETURN_CODE, JKKStrConst.RETURN_CD_1102)` // Return code 1102 |
| 2 | SET | `ccMsg.put(JKKStrConst.RETURN_MESSAGE, JKKStrConst.RETURN_MESSAGE_KEI_STAT_CHECK_ERROR)` // Error: contract status check error |
| 3 | EXEC | `param.setData(fixedText, ccMsg)` // Write back to request params |
| 4 | RETURN | `return JKKStrConst.RETURN_CD_1102` // Return early |

**Block 7** — [RETURN] Success (L6430)

> All checks passed — at least one service is suspended and the contractor is valid.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return JKKStrConst.CHECK_OK` // All validations passed |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `orsjgsUseStpRlsKanrencheck` | Method | Related-party (contractor) validation for service contract suspension exemption process |
| `orsjgs` (お取下事業者) | Acronym/Japanese | Denpa-jigyo-sha — Telecommunications contractor / licensee. The method name abbreviates to "oryoku teishi hanrei jigyo-sha kanren check" — suspension exemption contractor related check |
| `use_stp_rls` (利用停止解除) | Japanese | Utility suspension release / exemption — the business process of removing a service suspension (typically for non-payment) after a contractor validates eligibility |
| `svc_kei_no` (サービス契約番号) | Field | Service contract number — unique identifier for a service contract line in the telecom billing system |
| `orsjgs_cd` (お取下事業者コード) | Field | Contractor (telecommunications licensee) code — identifies the licensed contractor responsible for the service installation and maintenance |
| `iraimoto_kbn` (依存元区分) | Field | Dependency source classification — indicates which system or process initiated the request; used to cross-reference with contractor records |
| `unyo_ymd` (運用年月日) | Field | Operation date — the current business date (YYYYMMDD string) used as a cutoff for record validation |
| `svc_cd` (サービスコード) | Field | Service type code — classifies the service (01 = Network/Internet, 02 = Telephone, 03 = Television) |
| `cd00130_01` | Constant | Service code "01" — Network service (FTTH / internet) |
| `cd00130_02` | Constant | Service code "02" — Telephone service |
| `cd00130_03` | Constant | Service code "03" — Television service |
| `cd00037_stat_stp` | Constant | Status code "220" — Service suspended (utility suspension) |
| `sysid` | Field | System identifier — unique key linking service contracts to customer agreement records |
| `tstay_md` (事業開始年月日) | Field | Contractor business start date — the date the contractor's business authorization began |
| `tendy_md` (事業終了年月日) | Field | Contractor business end date — the date the contractor's business authorization expired or will expire |
| `ekk0081a010` | SC Code | Service Contract Agreement Information Retrieval — retrieves service contract details by contract number |
| `eck0011a010` | SC Code | Customer Agreement Information Retrieval — retrieves customer/master agreement details including contractor code |
| `ech0911a010` | SC Code | Contractor Agreement Information Retrieval — retrieves contractor authorization details including business period |
| `return_cd_1100` | Constant | Return code — Contract existence check error (no service contract record found) |
| `return_cd_1101` | Constant | Return code — Contractor check error (contractor code mismatch or business period invalid) |
| `return_cd_1102` | Constant | Return code — Contract status check error (no suspended services found on the line) |
| `return_cd_1103` | Constant | Return code — Service code check error (contract is not for a network service) |
| `check_ok` | Constant | Return code — All validation checks passed successfully |
| `cc_msg` | Variable | Correlation message map — carries return codes, messages, and data between CC methods within a single request flow |
| `sc_call` | Variable | Service Component Request Invoker — instance used to invoke service component (SC) methods |
| `kaanmsg` | Term | CAAN Message — the Fujitsu custom message format used for service component request/response data exchange |
| FTTH | Business term | Fiber To The Home — fiber-optic broadband internet service (service code 01) |
| SC | Acronym | Service Component — the enterprise service layer in this architecture that handles data access and business logic |
| CC | Acronym | Common Component — a shared code module in the custom business layer that provides cross-cutting functionality |
| `fixedText` | Parameter | Correlation key — the namespace key used to store and retrieve the method's data map within the request parameter object |
| `pramSvcKeiStat` | Parameter | Service contract status map — pre-populated map of service codes to status codes for all services on the same line |
| `pramSvcKeiStList` | Parameter | Suspended service codes list — output list of service codes found to be in suspended status |
