# Fu-jin/Raijinのデータ取得

<div align="left"><figure><img src="/files/ejBZZeDrq5sOKCU38C1E" alt=""><figcaption></figcaption></figure></div>

## 機能概要

* **Fu-jin/Raijinのデータ取得**は、Fu-jin/Raijin(SQL Server)からi-Reporterへ**i-Repo Gatewayを利用**して連携を行います。

<table><thead><tr><th>連携方向</th><th width="214.33333333333331">機能説明</th><th>実行タイミング</th></tr></thead><tbody><tr><td>Fu-jin/Raijin(SQL Server)→i-Reporter連携</td><td>Fu-jin/Raijin(SQL Server)のデータをi-Repo Gatewayを利用してi-Reporter入力帳票のクラスターへ取得します。</td><td>i-Reporterのアクションクラスターの実行</td></tr></tbody></table>

## マッピング設定の手順

以下の手順に従ってマッピング設定を行ってください。

### 1. Fu-jin/Raijin(SQL Server)との連携パターンの選択

* **Fu-jin/Raijinのデータ取得**メニューをクリックして新規のマッピングを追加します。

<figure><img src="/files/SFsQZCVny6xdxCSLfLcJ" alt=""><figcaption></figcaption></figure>

### 2. マッピングコード・名称の設定

* **マッピングコード**と**マッピング名称**を設定します。
* マッピングコードは、**i-Repo Link環境内の全てのマッピング設定を一意に識別するキー**になります。

<figure><img src="/files/hsas4PEeDW3dNKvhCdUc" alt=""><figcaption></figcaption></figure>

### 3. 連携元のFu-jin/Raijin(SQL Server)データベースのデータソースとテーブル／ビューの選択

* 連携元としてFu-jin/Raijin(SQL Server)データベースの**データソース**と**テーブルまたはビュー**を選択します。

<figure><img src="/files/OVOS23A4r3FtNDiASIGm" alt=""><figcaption></figcaption></figure>

* データソースの追加・設定は、以下のページを参照してください。

{% content-ref url="/pages/Mr8iIh9WBLvgsGDHpX6I" %}
[データソース管理](/i-repo-link-manual/system/2/1.md)
{% endcontent-ref %}

### 4. 連携先のi-Reporter帳票定義の選択

<figure><img src="/files/GgOCezfsO5BhKeHJakxd" alt=""><figcaption></figcaption></figure>

### 5. Fu-jin/Raijin(SQL Server)データベースのフィールドとi-Reporter帳票定義のクラスターをマッピング

* 画面[^1]左側にFu-jin/Raijin(SQL Server)データベース情報、画面右側にi-Reporterの帳票定義情報が表示されます。
* Fu-jin/Raijin(SQL Server)データベースのフィールドが薄いグレーのものは、連携対象外のフィールドです。
* マッピングできない場合は、エラーメッセージが表示されます。

<figure><img src="/files/j2Ks1gBhaXCMFnpcx8oN" alt=""><figcaption></figcaption></figure>

連携先のi-Reporter情報グリッドの項目説明

<table><thead><tr><th width="284">項目</th><th>説明</th></tr></thead><tbody><tr><td>フィールド</td><td>連携元のFu-jin/Raijin(SQL Server)データベースのフィールドを表示します。</td></tr><tr><td>クラスター</td><td>連携先のi-Reporterのクラスターを表示します。</td></tr><tr><td>True値</td><td>チェッククラスターのチェックON(True)と判定する値を設定します。</td></tr></tbody></table>

* マッピングできるフィールドとクラスターの組み合わせは、以下のページを参照してください。

{% content-ref url="/pages/K19TsaURkIWmv9eUOKj8" %}
[Fu-jin/Raijinとi-Reporterの連携項目対応表](/i-repo-link-manual/shisutemu-fu-jinraijin/gong-tong/fu-jinraijintoi-reporterno.md)
{% endcontent-ref %}

### 6. データ検索条件の設定

* Fu-jin/Raijin(SQL Server)データベースのデータを抽出するための検索条件を設定します。\
  検索されたデータを元に入力帳票のクラスターにConMas Gateway経由で値が設定されます。
* Fu-jin/Raijin(SQL Server)データベースのフィールドとi-Reporter帳票定義のクラスターを指定します。
* **レコードが１件となるように検索条件を設定**してください。\
  複数レコードが検索されると自動帳票作成はエラーとなります。

<figure><img src="/files/METbwy5DJoejaSQtrinU" alt=""><figcaption></figcaption></figure>

### 7. Gatewayの設定

* i-Repo Gatewayの**アクションファイルのダウンロードまたはGatewayサーバーへアクションファイルを配置**します。\
  Gatewayサーバーへアクションファイルを配置する場合は、**事前にシステム管理のi-Repo Gateway設定**を行ってください。

{% content-ref url="/pages/j3pUvgktmFXnQz641Jhv" %}
[i-Repo Gateway設定/i-RepoLink Gateway設定](/i-repo-link-manual/system/2/3.md)
{% endcontent-ref %}

* 対象の帳票定義のアクションクラスターにGatewayのパラメーターを更新します。\
  **パラメーターの更新を行うと帳票定義のリビジョンがアップ**します。

<figure><img src="/files/MqfGMZ54Sj3KvJNbCVbE" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
**「Gatewayへ配置」ボタンを利用するためのi-Repo** **GatewayのConfigファイルの設定について**

i-Repo Gatewa 2.1.230200 以降のバージョンを利用する必要があります。\
Gatewayへ配置を行うためには、i-Repo GatewayのConfigファイルの設定を変更してください。\
Configファイルをメモ帳などで開き以下の末尾に記載した **runMode** の設定を「true」に変更してください。\
なお、default.json の修正を反映させる場合は、一度i-RepoGatewayサービスの再起動が必要となります。\
※default.json に runMode の設定の記載がない場合、以下の末尾に記載した **runMode** の設定を追加してください。

**default.jsonファイル設定**

```json
{
  "port": 3000,
  "ssl": false,
  "sslkey": "./ssl/cert.key",
  "sslcert": "./ssl/cert.pem",
  "authType": "default",
  "token": "トークン",
  "pythonShell": {
    "mode": "text",
    "encoding": "utf8",
    "pythonOptions": ["-X", "utf8"]
  },
  "uploadFileTypes": {
    "binary": "bmp;gif;jpg;tif;png;wav",
    "text": ""
  },
  "customMaster": {
    "limit": 500
  }
  ここから追加（先頭にカンマを付けてください）
  ,
    "runMode": {
    "maintenance": true
  }
  ここまで追加
}
```

{% endhint %}

[^1]:


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cimtops.gitbook.io/i-repo-link-manual/shisutemu-fu-jinraijin/meny/fu-jinraijinnodta.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
