# Business Logic — JBSbatKKKojiKnrnInfCheck.kojiClInfOutPut() [172 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.business.service.JBSbatKKKojiKnrnInfCheck` |
| Layer | Service (Batch processing service within `eo.business.service`) |
| Module | `service` (Package: `eo.business.service`) |

## 1. Role

### JBSbatKKKojiKnrnInfCheck.kojiClInfOutPut()

This method implements the **Construction Cancellation Information Output Process** (工事取消情報出力処理), a batch-oriented routing and classification engine that reads intermediate construction cancellation records, validates each record against service contract data and a business rule engine, and then distributes the records into two categorized output files. The method reads a CSV input file containing construction cancellation records (file ID `KKIFM065`), performs a service contract lookup for each record to determine the current service state (e.g., "Service Provisioning," "Accepted," "Completed"), and runs a rule-check on the construction-related information (工事関連情報受入確認) to classify each record into one of three processing outcomes: **acceptable for registration** (受入可), **next-day acceptance** (翌日受入), or **registration failure** (受入不可).

The method implements a **dispatch/routing design pattern** — based on the rule check result code and the service contract status, each record is routed to one of three branches: (1) records that are acceptable and either eligible for promotion search or have specific service states are written to the "acceptable" intermediate file (KKIFM065003.csv); (2) records that require next-day acceptance or are accepted but ineligible for promotion search are written to the "next-day acceptance" intermediate file (KKIFM065004.csv); (3) records that fail validation are either logged to a delay correction table (KK_T_KOJI_DLY_KEHSI) or logged as business errors depending on whether the service contract exists in the delay correction compensation table.

As a shared batch processing method called from `JBSbatKKKojiKnrnInfCheck.execute()`, this method serves as the **output and validation coordinator** within the construction cancellation information check subsystem. It does not accept new orders — instead, it processes pre-filtered cancellation records from a previous batch phase, validates them against live service contract data, and produces classified output files for downstream processing.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["kojiClInfOutPut mid_dir_kk"])
    START --> INIT["Initialize file paths and StringBuilders"]
    INIT --> GENFILE["Generate file_path mid_dir_kk plus file ID plus 002 plus extension"]
    GENFILE --> READFILE["Read input file via getInputFile KKIFM065 -> data_list"]
    READFILE --> FORLOOP["For each line in data_list"]

    FORLOOP --> PARSE["Parse line: split by comma -> data array"]
    PARSE --> EXTRACT["Extract svc_kei_no data[0], kuj_ank_stb_cd data[5], rec_div data[16]"]
    EXTRACT --> SETPARAM["Set paramList svc_kei_no and super.opeDate"]
    SETPARAM --> SELECT["Call executeKK_T_SVC_KEI_KK_SELECT_060 paramList -> outDbMap"]
    SELECT --> CHECKDB{outDbMap null?}

    CHECKDB -->|Yes| ERRLOG["printBusinessErrorLog EKKB0630NW not found"]
    ERRLOG --> SKIP1["continue skip"]

    CHECKDB -->|No| GETSTAT["Extract svc_kei_stat from outDbMap"]
    GETSTAT --> RULECHECK["Call executeRule0081001 kuj_ank_stb_cd svc_kei_stat rec_div -> result_cd"]

    RULECHECK --> CHECKRULE{result_cd equals 9?}

    CHECKRULE -->|No needs process| UKEIRECHECK{result_cd equals 0 ACCEPTABLE?}
    CHECKRULE -->|Yes error| ERRLOG2["printBusinessErrorLog EKKB0010CW rule error"]
    ERRLOG2 --> SKIP2["continue skip"]

    UKEIRECHECK -->|Yes| UKEIREPSB{isUkeirePsb svc_kei_stat svc_kei_no?}
    UKEIRECHECK -->|No next-day| YOKUJITSUCHECK{isYokujitsuUkeire svc_kei_stat outDbMap?}

    YOKUJITSUCHECK -->|Yes| YOKUJITSUOUT["setKojiClInf data_work koji_cl_inf2"]
    YOKUJITSUCHECK -->|No| SKIP3["continue"]

    UKEIREPSB -->|Yes| ACCEPTPROC["Get datetime getKojiUkOptyIdoDiv setKojiClInfRec setKojiClInf koji_cl_inf1 setPrgIfAdd"]
    UKEIREPSB -->|No| ACCEPTSKIP["setKojiClInf data_work koji_cl_inf2"]

    ACCEPTPROC --> SKIP4["continue"]
    ACCEPTSKIP --> SKIP4
    YOKUJITSUOUT --> SKIP3

    SKIP1 --> FORLOOP
    SKIP2 --> FORLOOP
    SKIP3 --> FORLOOP
    SKIP4 --> FORLOOP

    FORLOOP --> GENFILE1["Generate file_path1 mid_dir_kk plus KKIFM065 plus 003 plus csv"]
    GENFILE1 --> WRITE1["executeOutputFile koji_cl_inf1 file_path1 KKIFM065"]

    WRITE1 --> GENFILE2["Generate file_path2 mid_dir_kk plus KKIFM065 plus 004 plus csv"]
    GENFILE2 --> WRITE2["executeOutputFile koji_cl_inf2 file_path2 KKIFM065"]

    WRITE2 --> END(["kojiClInfOutPut_END"])
```

**CRITICAL — Constant Resolution:**

| Constant | Actual Value | Business Meaning |
|----------|-------------|------------------|
| `KOJI_CL_INF_FILE_ID` | `"KKIFM065"` | File ID for construction cancellation information files |
| `FILE_KEISHIKI` | `".csv"` | File extension |
| `RESULT_UKEIRE_PSB` | `"0"` | Judgment result code — Acceptable (受入可) |
| `RESULT_YOKUJITSU_UKEIRE` | `"1"` | Judgment result code — Next-day Acceptance (翌日受入) |
| `RESULT_UKEIRE_FAIL` | `"2"` | Judgment result code — Registration Failure (受入不可) |
| `MASSEAGE2` | `"工事関連情報受入確認条件ルールで異常が発生しました。"` | Error message — "An abnormality occurred in the construction-related information acceptance condition rule." |

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `mid_dir_kk` | `String` | Intermediate file storage directory path — the filesystem directory where input, output, and temporary CSV files for the construction cancellation processing are read from and written to. All file paths for this batch operation are derived by appending a file ID (e.g., `KKIFM065`), a sequence number (`002`, `003`, `004`), and the file extension (`.csv`) to this base path. |

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

| Field | Type | Business Description |
|-------|------|---------------------|
| `super.opeDate` | `String` | Batch operation date — the business date for this batch run, used as a query parameter when searching service contract data and as the date portion of the timestamp set on output records (data[14]) |
| `super.logPrint` | `JCCBatCommon` | Logging utility — used for printing debug logs and business error logs via `printDebugLog` and `printBusinessErrorLog` |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `JCCBatCommon.printDebugLog` | - | - | Calls `printDebugLog` in `JCCBatCommon` (logging utility) |
| R | `executeKK_T_SVC_KEI_KK_SELECT_060` | `EKK0361A060SC` | `KK_T_SVC_KEI` | Queries service contract record by service contract number and operation date via SQL define `KK_SELECT_060`. Returns `JBSbatCommonDBInterface` or `null` if not found. |
| R | `JBSbatKK_T_SVC_KEI.SVC_KEI_STAT` | - | `KK_T_SVC_KEI` | Field reference — reads the service contract status field from the query result. Values include `100` (Service Provisioning), `210` (Suspended/Cancellation Pending), `220` (Stopped), `910` (Released), `920` (Cancelled), `010` (Accepted), `020` (Approved), `030` (Completed). |
| - | `JBSbatStringUtil.Rtrim` | - | - | Calls `Rtrim` utility to trim trailing whitespace from the service status string. |
| - | `executeRule0081001` | `RULE0081001` | - | Calls the business rule engine to validate construction-related information acceptance. Accepts STB kind code, service status, and record division; returns a result code (`0`=Acceptable, `1`=Next-day, `2`=Failure, `9`=OK/No Action). |
| R | `JBSbatFUCaseFileRnkData.getString` | - | - | Calls `getString` to extract field values from the database result map (`outDbMap`). |
| C | `createKojiDlyKeiHosei` | `EKK0630A001CBS` | `KK_T_KOJI_DLY_KEHSI` | Registers the construction delay contract compensation record into the delay correction table for service contract numbers that are missing from the delay correction table. |
| R | `isKojiDlyKeiHosei` | - | `KK_T_KOJI_DLY_KEHSI` | Checks whether the service contract number exists in the construction delay contract compensation table. |
| R | `isUkeirePsb` | - | `KK_T_SVC_KEI` | Determines if the service contract status is eligible for promotion search — returns `true` for statuses `100` (Service Provisioning), `210` (Suspended/Cancellation Pending), `220` (Stopped), `910` (Released), `920` (Cancelled), or when the rule check returns no promotion information. |
| R | `isYokujitsuUkeire` | - | `KK_T_SVC_KEI` | Determines if the record qualifies for next-day acceptance based on service status and contract data. |
| - | `JBSbatDateUtil.getSystemDateTimeStamp` | - | - | Returns the current system datetime in timestamp format. |
| - | `getKojiUkOptyIdoDiv` | - | - | Resolves the work cancellation/receipt occasion differentiation code from the construction item number (data[6]). |
| - | `setKojiClInfRec` | - | - | Formats construction cancellation data into a record string, appending the timestamp and differentiation code. |
| - | `setKojiClInf` | - | - | Transcribes formatted construction cancellation data into the target StringBuilder (either the acceptable or next-day acceptance buffer). |
| - | `setPrgIfAdd` | - | - | Registers advancement data for the record (v7.00.02: simplified signature, now takes only `data` array). |
| - | `executeOutputFile` | - | - | Writes a StringBuilder's contents to a CSV output file at the given path. Called twice — once for acceptable output (KKIFM065003.csv) and once for next-day acceptance output (KKIFM065004.csv). |
| - | `getInputFile` | - | - | Reads an input file and returns its lines as an `ArrayList<String>`. |
| - | `printBusinessErrorLog` (EKKB0630NW) | - | - | Logs a business error when the service contract is not found during the lookup. |
| - | `printBusinessErrorLog` (EKKB0010CW) | - | - | Logs a business error when the rule check returns an unexpected code (anything other than `9` or a known processing code). |

## 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: `printDebugLog` [-], `printDebugLog` [-], `printBusinessErrorLog` [-], `executeOutputFile` [-], `executeOutputFile` [-], `createKojiDlyKeiHosei` [C], `isKojiDlyKeiHosei` [-], `setKojiClInf` [-], `isYokujitsuUkeire` [-], `setKojiClInf` [-], `setPrgIfAdd` [-], `getKojiUkOptyIdoDiv` [-], `setKojiClInfRec` [-], `executeKK_T_SVC_KEI_KK_SELECT_060` [-]

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Batch: JBSbatKKKojiKnrnInfCheck.execute() | `JBSbatKKKojiKnrnInfCheck.execute()` -> `kojiClInfOutPut(mid_dir_kk)` | `executeOutputFile [] KKIFM065 output`, `printBusinessErrorLog [] EKKB0630NW/EKKB0010CW`, `createKojiDlyKeiHosei [C] KK_T_KOJI_DLY_KEHSI`, `executeKK_T_SVC_KEI_KK_SELECT_060 [R] KK_T_SVC_KEI` |

## 6. Per-Branch Detail Blocks

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

> Initialize all local variables: file paths, string builder buffers for acceptable and next-day output, and the data work buffer.

| # | Type | Code |
|---|------|------|
| 1 | SET | `data_work = ""` // Construction cancellation info file single-line data buffer |
| 2 | SET | `file_path = ""` // File path buffer |
| 3 | SET | `file_path1 = ""` // File path buffer (acceptable output) |
| 4 | SET | `file_path2 = ""` // File path buffer (next-day output) |
| 5 | SET | `svc_kei_stat = ""` // Service contract status |
| 6 | SET | `koji_cl_inf1 = new StringBuilder()` // StringBuilder for acceptable output records |
| 7 | SET | `koji_cl_inf2 = new StringBuilder()` // StringBuilder for next-day acceptance output records |

**Block 2** — [SET] `Generate input file path` (L2092)

> Construct the path to the construction cancellation input file. The file name follows the pattern: `mid_dir_kk + "KKIFM065" + "002" + ".csv"`.

| # | Type | Code |
|---|------|------|
| 1 | SET | `file_path = mid_dir_kk + KOJI_CL_INF_FILE_ID + "002" + FILE_KEISHIKI` [-> `KOJI_CL_INF_FILE_ID="KKIFM065"`, `FILE_KEISHIKI=".csv"`] |

**Block 3** — [CALL] `Read input file` (L2095)

> Read the construction cancellation information file from the intermediate directory and load all lines into `data_list`.

| # | Type | Code |
|---|------|------|
| 1 | SET | `data_list = getInputFile(file_path, KOJI_CL_INF_FILE_ID)` [-> `"KKIFM065"`] |

**Block 4** — [FOR LOOP] `Iterate over each record` (L2098)

> Process each line of the input file. For every record, parse the CSV, look up the service contract, run the rule check, and route to the appropriate output branch.

| # | Type | Code |
|---|------|------|
| 1 | SET | `i = 0; i < data_list.size(); i++` |
| 2 | SET | `data_work = data_list.get(i)` // Get the current record |
| 3 | EXEC | `super.logPrint.printDebugLog("Construction cancellation character string (before edit): " + data_work)` |
| 4 | SET | `data = data_work.split(",", -1)` // Parse CSV into array fields |

**Block 5** — [EXTRACT] `Extract key fields` (L2105)

> Extract the service contract number, STB kind code, and prepare the query parameters for the service contract lookup.

| # | Type | Code |
|---|------|------|
| 1 | SET | `svc_kei_no = data[0]` // Service contract number |
| 2 | SET | `kuj_ank_stb_cd = data[5]` // Construction item kind code |
| 3 | SET | `paramList = new Object[2]` // Query parameter array |
| 4 | SET | `paramList[0] = svc_kei_no` |
| 5 | SET | `paramList[1] = super.opeDate` // Batch operation date |

**Block 6** — [CALL] `Service contract lookup` (L2113)

> Query the `KK_T_SVC_KEI` table for the service contract record using SQL define `KK_SELECT_060`. In v7.00.02, this replaced `KK_SELECT_090`.

| # | Type | Code |
|---|------|------|
| 1 | SET | `outDbMap = executeKK_T_SVC_KEI_KK_SELECT_060(paramList)` [-> SC Code: `EKK0361A060SC`] |

**Block 7** — [IF] `Check if service contract record exists` (L2116)
**Condition**: `null != outDbMap`

| # | Type | Code |
|---|------|------|
| 1 | SET | `svc_kei_stat = JBSbatStringUtil.Rtrim(outDbMap.getString(JBSbatKK_T_SVC_KEI.SVC_KEI_STAT))` |
| 2 | EXEC | (else branch) `super.logPrint.printBusinessErrorLog("EKKB0630NW", new String[]{"Service Contract", "Service Contract Number", svc_kei_no})` [v7.00.03: minimized to error log instead of throwing exception] |
| 3 | EXEC | `continue` |

**Block 8** — [EXTRACT] `Extract record division` (L2126)

> Extract the record division field from the CSV data. This is used as input to the rule engine.

| # | Type | Code |
|---|------|------|
| 1 | SET | `rec_div = data[16]` |
| 2 | EXEC | `super.logPrint.printDebugLog("Record division: " + rec_div)` |

**Block 9** — [CALL] `Rule check` (L2130)

> Invoke the business rule engine (RULE0081001) to validate the construction-related information acceptance conditions.

| # | Type | Code |
|---|------|------|
| 1 | SET | `result_cd = executeRule0081001(kuj_ank_stb_cd, svc_kei_stat, rec_div)` [-> Rule contents ID: `"RULE0081001"`] |
| 2 | EXEC | `super.logPrint.printDebugLog("Construction related information acceptance check result: " + result_cd)` |

**Block 10** — [IF] `Check rule result code == "9"` (L2134)
**Condition**: `"9".equals(result_cd)`

> When `result_cd` equals `"9"`, the rule check passed and no action is needed — the record is skipped via the else block. When `result_cd` is NOT `"9"`, further processing is required, branching on the specific result code.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | (else) `super.logPrint.printBusinessErrorLog("EKKB0010CW", new String[]{MASSEAGE2 + "(File ID: " + KOJI_CL_INF_FILE_ID + ", Service Contract Number: " + svc_kei_no + ")})` [MASSEAGE2: "工事関連情報受入確認条件ルールで異常が発生しました。"] |
| 2 | EXEC | `continue` |

**Block 10.1** — [IF-ELSE-IF] `Check result_cd against processing categories` (L2139)
**Condition**: `!` (outer if was `! "9".equals(result_cd)`)

> Three mutually exclusive branches: Acceptable (`"0"`), Next-day Acceptance (`"1"`), and Registration Failure (`"2"`).

**Block 10.1.1** — [IF] `result_cd == "0" (ACCEPTABLE)` [RESULT_UKEIRE_PSB="0"] (L2139)

> Records with result code `0` are acceptable for registration. This branch further splits based on whether promotion search eligibility (`isUkeirePsb`) is true.

| # | Type | Code |
|---|------|------|
| 1 | SET | `isUkeirePsb(svc_kei_stat, svc_kei_no)` // Check if eligible for promotion search |

**Block 10.1.1.1** — [IF] `isUkeirePsb returns true` (L2143)

> The service contract status is `100` (Service Provisioning), `210` (Suspended/Cancellation Pending), `220` (Stopped), `910` (Released), `920` (Cancelled), OR the rule check returned no promotion information. These records are written to the **acceptable output file** (KKIFM065003.csv).

| # | Type | Code |
|---|------|------|
| 1 | SET | `sysrtem_date = JBSbatDateUtil.getSystemDateTimeStamp()` // Get system datetime |
| 2 | SET | `data[14] = super.opeDate + sysrtem_date.substring(8)` // Set advancement year/month/day/time/minutes/seconds = batch date + hhmmssSSS from system time |
| 3 | SET | `kojiUkOptyIdoDiv = this.getKojiUkOptyIdoDiv(data[6])` // Resolve work cancellation/receipt occasion differentiation from construction item number |
| 4 | EXEC | `super.logPrint.printDebugLog("Construction item number: " + data[6])` |
| 5 | EXEC | `super.logPrint.printDebugLog("Work receipt occasion differentiation: " + kojiUkOptyIdoDiv)` |
| 6 | SET | `data_work_af = this.setKojiClInfRec(data, kojiUkOptyIdoDiv)` // Format the cancellation record with timestamp and differentiation |
| 7 | CALL | `this.setKojiClInf(data_work_af, koji_cl_inf1)` // Write to acceptable output StringBuilder |
| 8 | CALL | `this.setPrgIfAdd(data)` [v7.00.02: simplified — removed `kojiUkOptyIdoDiv` param] // Register advancement data |
| 9 | EXEC | `continue` |

**Block 10.1.1.2** — [ELSE] `isUkeirePsb returns false` (L2166)

> The service contract status is `010` (Accepted), `020` (Approved), or `030` (Completed), AND promotion search returned results. These records go to the **next-day acceptance output file** (KKIFM065004.csv).

| # | Type | Code |
|---|------|------|
| 1 | CALL | `this.setKojiClInf(data_work, koji_cl_inf2)` // Write to next-day acceptance StringBuilder |
| 2 | EXEC | `continue` |

**Block 10.1.2** — [ELSE-IF] `result_cd == "1" (NEXT-DAY ACCEPTANCE)` [RESULT_YOKUJITSU_UKEIRE="1"] (L2177)

> Records with result code `1` are designated for next-day acceptance. The additional check `isYokujitsuUkeire(svc_kei_stat, outDbMap)` determines if the record should actually be written to the next-day output or skipped.

| # | Type | Code |
|---|------|------|
| 1 | SET | `isYokujitsuUkeire(svc_kei_stat, outDbMap)` // Determine if next-day acceptance applies |
| 2 | CALL | `setKojiClInf(data_work, koji_cl_inf2)` // Write to next-day acceptance StringBuilder |
| 3 | EXEC | `continue` |

**Block 10.1.3** — [ELSE-IF] `result_cd == "2" (REGISTRATION FAILURE)` [RESULT_UKEIRE_FAIL="2"] (L2187)

> Records with result code `2` failed validation. Before logging an error, the method checks whether the service contract number exists in the construction delay contract compensation table. If it does exist, the record is registered to the delay correction table.

| # | Type | Code |
|---|------|------|
| 1 | SET | `isKojiDlyKeiHosei(svc_kei_no, data[2])` // Check if in delay correction table |
| 2 | CALL | `createKojiDlyKeiHosei(data, outDbMap)` [-> C: `KK_T_KOJI_DLY_KEHSI`] // Register to delay correction table |
| 3 | EXEC | `continue` |

**Block 11** — [ELSE] `result_cd == "9" (OK/No Action)` (L2199)

> The rule check returned code `9` — the record does not require processing. Log a business error indicating that an abnormality occurred in the construction-related information acceptance condition rule, then skip the record.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `super.logPrint.printBusinessErrorLog("EKKB0010CW", new String[]{MASSEAGE2 + "(File ID: " + KOJI_CL_INF_FILE_ID + ", Service Contract Number: " + svc_kei_no + ")})` |
| 2 | EXEC | `continue` |

**Block 12** — [SET] `Generate acceptable output file path` (L2208)

> Construct the path for the acceptable output file. Pattern: `mid_dir_kk + "KKIFM065" + "003" + ".csv"`.

| # | Type | Code |
|---|------|------|
| 1 | SET | `file_path1 = mid_dir_kk + KOJI_CL_INF_FILE_ID + "003" + FILE_KEISHIKI` |

**Block 13** — [CALL] `Write acceptable output file` (L2211)

> Write all accumulated acceptable records from `koji_cl_inf1` to the intermediate output file.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `executeOutputFile(koji_cl_inf1.toString(), file_path1, KOJI_CL_INF_FILE_ID)` [-> Output file: `KKIFM065003.csv`] |

**Block 14** — [SET] `Generate next-day acceptance output file path` (L2214)

> Construct the path for the next-day acceptance output file. Pattern: `mid_dir_kk + "KKIFM065" + "004" + ".csv"`.

| # | Type | Code |
|---|------|------|
| 1 | SET | `file_path2 = mid_dir_kk + KOJI_CL_INF_FILE_ID + "004" + FILE_KEISHIKI` |

**Block 15** — [CALL] `Write next-day acceptance output file` (L2217)

> Write all accumulated next-day acceptance records from `koji_cl_inf2` to the intermediate output file.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `executeOutputFile(koji_cl_inf2.toString(), file_path2, KOJI_CL_INF_FILE_ID)` [-> Output file: `KKIFM065004.csv`] |

**Block 16** — [EXEC] `End logging` (L2219)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `super.logPrint.printDebugLog("kojiClInfOutPut_END")` |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `kojiClInfOutPut` | Method | Construction Cancellation Information Output Process — batch method that reads, validates, and routes construction cancellation records to classified output files |
| `svc_kei_no` | Field | Service Contract Number — the unique identifier for a service contract line item in the telecom billing system |
| `svc_kei_stat` | Field | Service Contract Status — current state of the service contract (010: Accepted, 020: Approved, 030: Completed, 100: Service Provisioning, 210: Suspended/Cancellation Pending, 220: Stopped, 910: Released, 920: Cancelled) |
| `kuj_ank_stb_cd` | Field | Construction Item Kind Code — classifies the type of construction item (e.g., STB-related construction, network construction) |
| `rec_div` | Field | Record Division — categorizes the type of record within the CSV file, used as a rule engine input parameter |
| `result_cd` | Field | Result Code — output from the business rule engine: `0`=Acceptable (受入可), `1`=Next-day Acceptance (翌日受入), `2`=Registration Failure (受入不可), `9`=OK/No Action required |
| `koji_cl_inf` | Field | Construction Cancellation Information — the core data object representing a cancellation record being processed |
| `kojiUkOptyIdoDiv` | Field | Work Cancellation/Receipt Occasion Differentiation — distinguishes the type of cancellation event (e.g., customer-initiated cancellation vs. company-initiated termination) |
| `mid_dir_kk` | Parameter | Intermediate File Storage Directory — filesystem path where batch intermediate files are stored and retrieved |
| `KKIFM065` | Constant | File ID — internal identifier for the Construction Cancellation Information file format |
| `KK_T_SVC_KEI` | Table | Service Contract Table — database table storing service contract master data including status, customer info, and service details |
| `KK_T_KOJI_DLY_KEHSI` | Table | Construction Delay Contract Compensation Table — table for recording service contracts that have delay compensation, used for rejection handling |
| `KKIFM065003.csv` | File | Acceptable Output File — intermediate output containing records that passed validation and are acceptable for registration |
| `KKIFM065004.csv` | File | Next-day Acceptance Output File — intermediate output containing records that must be processed on the next business day |
| `UKEIRE_PSB` | Constant | Acceptable (受入可) — result code `0`, indicating the record is valid and should be processed immediately |
| `YOKUJITSU_UKEIRE` | Constant | Next-day Acceptance (翌日受入) — result code `1`, indicating the record should be deferred to the next processing cycle |
| `UKEIRE_FAIL` | Constant | Registration Failure (受入不可) — result code `2`, indicating the record failed validation rules |
| `isUkeirePsb` | Method | Eligibility for Promotion Search — checks if the service status allows immediate processing based on specific status values |
| `isYokujitsuUkeire` | Method | Next-day Acceptance Check — determines whether a record qualifies for next-day acceptance processing |
| `isKojiDlyKeiHosei` | Method | Delay Correction Compensation Check — checks if a service contract number exists in the delay correction table |
| `createKojiDlyKeiHosei` | Method | Create Delay Correction Compensation — registers a record into the construction delay contract compensation table |
| `executeRule0081001` | Method | Rule Check — invokes the business rule engine with construction item code, service status, and record division to determine the processing outcome |
| `RULE0081001` | Constant | Rule Contents ID — the identifier for the construction-related information acceptance condition rule configuration |
| `setKojiClInf` | Method | Set Construction Cancellation Info — formats and appends a cancellation record to a StringBuilder buffer |
| `setKojiClInfRec` | Method | Set Construction Cancellation Info Record — formats a full cancellation record with timestamp and differentiation code |
| `setPrgIfAdd` | Method | Set Progress Information Add — registers advancement data for the processed record |
| `executeKK_T_SVC_KEI_KK_SELECT_060` | Method | Service Contract Lookup — queries `KK_T_SVC_KEI` table using SQL define `KK_SELECT_060` to retrieve service contract data |
| `EKK0361A060SC` | SC Code | Service Component — service component code for the service contract SELECT operation |
| `EKKB0630NW` | Error Code | Network/Service Error — error code logged when a service contract record is not found |
| `EKKB0010CW` | Error Code | Condition Warning — error code logged when an abnormality occurs in the acceptance condition rule |
| `opeDate` | Field | Operation Date — the business date for the current batch run, derived from the system or configured at runtime |
| `KK_T_KKTK_SVC_KEI` | Table | Machine-Provided Service Contract Table — table for service contracts related to machine-provided services |
| `KU_T_KOJIAK` | Table | Construction Item Table — master table for construction item definitions |
| `ZM_M_CD_NM_KANRI` | Table | Code Name Management Table — master table managing code values and their display names |
| `ZM_M_WORK_PARAM_KNRI` | Table | Business Parameter Management Table — table storing operational parameters for batch processing |
| KK_T_SVC_KEI.SVC_KEI_STAT | Field | Service Contract Status column — the specific column in `KK_T_SVC_KEI` that holds the service status value |
| File ID `KKIFM065` | Constant | Construction Cancellation Information File ID — identifies the input file format for cancellation records |
| `MASSEAGE2` | Constant | Error Message — "工事関連情報受入確認条件ルールで異常が発生しました。" (An abnormality occurred in the construction-related information acceptance condition rule.) |
