intra-mart Accel Kaiden! GadgetBuilder 設定ガイド 第6版 2020-04-01

4.2. 設定の流れ(申請書ガジェット)

本項では、GadgetBuilderの設定の流れを説明します。
(経費明細を例にします。)

4.2.1. テーブル定義

はじめに、対象となるテーブルの定義を行います。
要件に合わせて次の各カラムを組み合わせて定義を行ってください。

4.2.1.1. 必須カラム

GadgetBuilderで申請書ガジェットを作成する場合のテーブルの定義です。

4.2.1.1.1. 基本テーブル

基本テーブルの場合は次のカラムは必ず設定してください。(全て「not null」制約)
論理名 物理名 PK PostgreSQL Oracle SqlServer
システム案件ID system_matter_id varchar(20) varchar2(20) nvarchar(20)
ユーザデータID user_data_id varchar(20) varchar2(20) nvarchar(20)
ガジェットID gadget_id   varchar(220) varchar2(220) nvarchar(220)
ガジェットクラス gadget_class varchar(100) varchar2(100) nvarchar(100)
ガジェットバリエーション gadget_variation   varchar(100) varchar2(100) nvarchar(100)
ガジェットインスタンス gadget_instance numeric(18,0) numeric(18,0) numeric(18,0)
タプルID tuple_id   numeric(18,0) numeric(18,0) numeric(18,0)
行番号 row_number   numeric(18,0) numeric(18,0) numeric(18,0)
登録日時 entry_ts   timestamp without time zone timestamp datetime2
登録ユーザ entry_user_cd   varchar(100) varchar2(100) nvarchar(100)
更新カウント renew_cnt   numeric(18,0) numeric(18,0) numeric(18,0)
更新日時 renew_ts   timestamp without time zone timestamp datetime2
更新ユーザ renew_user_cd   varchar(100) varchar2(100) nvarchar(100)

4.2.1.1.2. 退避テーブル

退避(アーカイブ)テーブルの場合は次のカラムは必ず設定してください。(全て「not null」制約)
論理名 物理名 PK PostgreSQL Oracle SqlServer
システム案件ID system_matter_id varchar(20) varchar2(20) nvarchar(20)
ユーザデータID user_data_id varchar(20) varchar2(20) nvarchar(20)
ガジェットID gadget_id   varchar(220) varchar2(220) nvarchar(220)
ガジェットクラス gadget_class varchar(100) varchar2(100) nvarchar(100)
ガジェットバリエーション gadget_variation   varchar(100) varchar2(100) nvarchar(100)
ガジェットインスタンス gadget_instance numeric(18,0) numeric(18,0) numeric(18,0)
ロケールID locale_id varchar(50) varchar2(50) nvarchar(50)
アーカイブ月 archive_month   varchar(6) varchar2(6) nvarchar(6)
タプルID tuple_id   numeric(18,0) numeric(18,0) numeric(18,0)
行番号 row_number   numeric(18,0) numeric(18,0) numeric(18,0)
登録日時 entry_ts   timestamp without time zone timestamp datetime2
登録ユーザ entry_user_cd   varchar(100) varchar2(100) nvarchar(100)
更新カウント renew_cnt   numeric(18,0) numeric(18,0) numeric(18,0)
更新日時 renew_ts   timestamp without time zone timestamp datetime2
更新ユーザ renew_user_cd   varchar(100) varchar2(100) nvarchar(100)

コラム

タプルID、行番号は明細系ブロックの登録先の場合のみ設定してください。

4.2.1.1.3. 定義サンプル

次項以降では、次の定義を利用した場合の設定の流れを説明します。
  • PostgreSQL
    create table k30t_expense_detail
    (
        system_matter_id               varchar(20) not null,
        user_data_id                   varchar(20) not null,
        gadget_class                   varchar(100) not null,
        gadget_instance                numeric(18,0) not null,
        tuple_id                       numeric(18,0) not null,
        gadget_id                      varchar(220) not null,
        gadget_variation               varchar(100) not null,
        row_number                     numeric(18,0) not null,
        occur_date                     timestamp without time zone,
        summary                        varchar(4000),
        exp_type_cd                    varchar(100),
        account_cd                     varchar(100),
        tax_type_cd                    varchar(100),
        tax_rate                       numeric(28,10),
        quantity                       numeric(28,10),
        trans_currency_cd              varchar(100),
        trans_amount                   numeric(28,10),
        company_currency_cd            varchar(100),
        company_rate                   numeric(28,10),
        company_amount                 numeric(28,10),
        company_amount_exc_tax         numeric(28,10),
        company_amount_tax             numeric(28,10),
        company_amount_sum             numeric(28,10),
        pay_type_cd                    varchar(100),
        pay_method_cd                  varchar(100),
        payee_cd                       varchar(100),
        payee_name                     varchar(1000),
        department_set_cd              varchar(100),
        department_cd                  varchar(100),
        project_cd                     varchar(100),
        extension_a                    varchar(1000),
        extension_b                    varchar(1000),
        extension_c                    varchar(1000),
        extension_d                    varchar(1000),
        extension_e                    varchar(1000),
        extension_f                    varchar(1000),
        extension_g                    varchar(1000),
        extension_h                    varchar(1000),
        extension_i                    varchar(1000),
        extension_j                    varchar(1000),
        entry_ts                       timestamp without time zone not null,
        entry_user_cd                  varchar(100) not null,
        renew_cnt                      numeric(18,0) not null,
        renew_ts                       timestamp without time zone not null,
        renew_user_cd                  varchar(100) not null
    );
    alter table k30t_expense_detail add primary key  (system_matter_id, user_data_id, tuple_id, gadget_class, gadget_instance);
    alter table k30t_expense_detail add check (gadget_instance >= 0);
    alter table k30t_expense_detail add check (tuple_id >= 0);
    alter table k30t_expense_detail add check (row_number >= 0);
    alter table k30t_expense_detail add check (tax_rate >= 0);
    
    create table ka30t_expense_detail
    (
        system_matter_id               varchar(20) not null,
        user_data_id                   varchar(20) not null,
        gadget_class                   varchar(100) not null,
        gadget_instance                numeric(18,0) not null,
        tuple_id                       numeric(18,0) not null,
        locale_id                      varchar(50) not null,
        archive_month                  varchar(6) not null,
        gadget_id                      varchar(220) not null,
        gadget_variation               varchar(100) not null,
        row_number                     numeric(18,0) not null,
        occur_date                     timestamp without time zone,
        summary                        varchar(4000),
        exp_type_cd                    varchar(100),
        account_cd                     varchar(100),
        tax_type_cd                    varchar(100),
        tax_rate                       numeric(28,10),
        quantity                       numeric(28,10),
        trans_currency_cd              varchar(100),
        trans_amount                   numeric(28,10),
        company_currency_cd            varchar(100),
        company_rate                   numeric(28,10),
        company_amount                 numeric(28,10),
        company_amount_exc_tax         numeric(28,10),
        company_amount_tax             numeric(28,10),
        company_amount_sum             numeric(28,10),
        pay_type_cd                    varchar(100),
        pay_method_cd                  varchar(100),
        payee_cd                       varchar(100),
        payee_name                     varchar(1000),
        department_set_cd              varchar(100),
        department_cd                  varchar(100),
        project_cd                     varchar(100),
        exp_type_name                  varchar(1000),
        account_name                   varchar(1000),
        tax_type_name                  varchar(1000),
        trans_currency_name            varchar(1000),
        company_currency_name          varchar(1000),
        pay_type_name                  varchar(1000),
        payment_flag                   varchar(1),
        pay_method_name                varchar(1000),
        department_name                varchar(1000),
        project_name                   varchar(1000),
        extension_a                    varchar(1000),
        extension_b                    varchar(1000),
        extension_c                    varchar(1000),
        extension_d                    varchar(1000),
        extension_e                    varchar(1000),
        extension_f                    varchar(1000),
        extension_g                    varchar(1000),
        extension_h                    varchar(1000),
        extension_i                    varchar(1000),
        extension_j                    varchar(1000),
        entry_ts                       timestamp without time zone not null,
        entry_user_cd                  varchar(100) not null,
        renew_cnt                      numeric(18,0) not null,
        renew_ts                       timestamp without time zone not null,
        renew_user_cd                  varchar(100) not null
    );
    alter table ka30t_expense_detail add primary key  (system_matter_id, user_data_id, gadget_class, gadget_instance, tuple_id, locale_id);
    
    create index idx_ka30t_expense_detail_1 on ka30t_expense_detail (archive_month);
    
  • Oracle
    create table k30t_expense_detail
    (
        system_matter_id               varchar2(20) not null,
        user_data_id                   varchar2(20) not null,
        gadget_class                   varchar2(100) not null,
        gadget_instance                numeric(18,0) not null,
        tuple_id                       numeric(18,0) not null,
        gadget_id                      varchar2(220) not null,
        gadget_variation               varchar2(100) not null,
        row_number                     numeric(18,0) not null,
        occur_date                     timestamp,
        summary                        varchar2(4000),
        exp_type_cd                    varchar2(100),
        account_cd                     varchar2(100),
        tax_type_cd                    varchar2(100),
        tax_rate                       numeric(28,10),
        quantity                       numeric(28,10),
        trans_currency_cd              varchar2(100),
        trans_amount                   numeric(28,10),
        company_currency_cd            varchar2(100),
        company_rate                   numeric(28,10),
        company_amount                 numeric(28,10),
        company_amount_exc_tax         numeric(28,10),
        company_amount_tax             numeric(28,10),
        company_amount_sum             numeric(28,10),
        pay_type_cd                    varchar2(100),
        pay_method_cd                  varchar2(100),
        payee_cd                       varchar2(100),
        payee_name                     varchar2(1000),
        department_set_cd              varchar2(100),
        department_cd                  varchar2(100),
        project_cd                     varchar2(100),
        extension_a                    varchar2(1000),
        extension_b                    varchar2(1000),
        extension_c                    varchar2(1000),
        extension_d                    varchar2(1000),
        extension_e                    varchar2(1000),
        extension_f                    varchar2(1000),
        extension_g                    varchar2(1000),
        extension_h                    varchar2(1000),
        extension_i                    varchar2(1000),
        extension_j                    varchar2(1000),
        entry_ts                       timestamp not null,
        entry_user_cd                  varchar2(100) not null,
        renew_cnt                      numeric(18,0) not null,
        renew_ts                       timestamp not null,
        renew_user_cd                  varchar2(100) not null
    );
    alter table k30t_expense_detail add primary key  (system_matter_id, user_data_id, tuple_id, gadget_class, gadget_instance);
    alter table k30t_expense_detail add check (gadget_instance >= 0);
    alter table k30t_expense_detail add check (tuple_id >= 0);
    alter table k30t_expense_detail add check (row_number >= 0);
    alter table k30t_expense_detail add check (tax_rate >= 0);
    
    create table ka30t_expense_detail
    (
        system_matter_id               varchar2(20) not null,
        user_data_id                   varchar2(20) not null,
        gadget_class                   varchar2(100) not null,
        gadget_instance                numeric(18,0) not null,
        tuple_id                       numeric(18,0) not null,
        locale_id                      varchar2(50) not null,
        archive_month                  varchar2(6) not null,
        gadget_id                      varchar2(220) not null,
        gadget_variation               varchar2(100) not null,
        row_number                     numeric(18,0) not null,
        occur_date                     timestamp,
        summary                        varchar2(4000),
        exp_type_cd                    varchar2(100),
        account_cd                     varchar2(100),
        tax_type_cd                    varchar2(100),
        tax_rate                       numeric(28,10),
        quantity                       numeric(28,10),
        trans_currency_cd              varchar2(100),
        trans_amount                   numeric(28,10),
        company_currency_cd            varchar2(100),
        company_rate                   numeric(28,10),
        company_amount                 numeric(28,10),
        company_amount_exc_tax         numeric(28,10),
        company_amount_tax             numeric(28,10),
        company_amount_sum             numeric(28,10),
        pay_type_cd                    varchar2(100),
        pay_method_cd                  varchar2(100),
        payee_cd                       varchar2(100),
        payee_name                     varchar2(1000),
        department_set_cd              varchar2(100),
        department_cd                  varchar2(100),
        project_cd                     varchar2(100),
        exp_type_name                  varchar2(1000),
        account_name                   varchar2(1000),
        tax_type_name                  varchar2(1000),
        trans_currency_name            varchar2(1000),
        company_currency_name          varchar2(1000),
        pay_type_name                  varchar2(1000),
        payment_flag                   varchar2(1),
        pay_method_name                varchar2(1000),
        department_name                varchar2(1000),
        project_name                   varchar2(1000),
        extension_a                    varchar2(1000),
        extension_b                    varchar2(1000),
        extension_c                    varchar2(1000),
        extension_d                    varchar2(1000),
        extension_e                    varchar2(1000),
        extension_f                    varchar2(1000),
        extension_g                    varchar2(1000),
        extension_h                    varchar2(1000),
        extension_i                    varchar2(1000),
        extension_j                    varchar2(1000),
        entry_ts                       timestamp not null,
        entry_user_cd                  varchar2(100) not null,
        renew_cnt                      numeric(18,0) not null,
        renew_ts                       timestamp not null,
        renew_user_cd                  varchar2(100) not null
    );
    alter table ka30t_expense_detail add primary key  (system_matter_id, user_data_id, gadget_class, gadget_instance, tuple_id, locale_id);
    
    create index idx_ka30t_expense_detail_1 on ka30t_expense_detail (archive_month);
    
  • SqlServer
    create table k30t_expense_detail
    (
        system_matter_id               nvarchar(20) not null,
        user_data_id                   nvarchar(20) not null,
        gadget_class                   nvarchar(100) not null,
        gadget_instance                numeric(18,0) not null,
        tuple_id                       numeric(18,0) not null,
        gadget_id                      nvarchar(220) not null,
        gadget_variation               nvarchar(100) not null,
        row_number                     numeric(18,0) not null,
        occur_date                     datetime2,
        summary                        nvarchar(4000),
        exp_type_cd                    nvarchar(100),
        account_cd                     nvarchar(100),
        tax_type_cd                    nvarchar(100),
        tax_rate                       numeric(28,10),
        quantity                       numeric(28,10),
        trans_currency_cd              nvarchar(100),
        trans_amount                   numeric(28,10),
        company_currency_cd            nvarchar(100),
        company_rate                   numeric(28,10),
        company_amount                 numeric(28,10),
        company_amount_exc_tax         numeric(28,10),
        company_amount_tax             numeric(28,10),
        company_amount_sum             numeric(28,10),
        pay_type_cd                    nvarchar(100),
        pay_method_cd                  nvarchar(100),
        payee_cd                       nvarchar(100),
        payee_name                     nvarchar(1000),
        department_set_cd              nvarchar(100),
        department_cd                  nvarchar(100),
        project_cd                     nvarchar(100),
        extension_a                    nvarchar(1000),
        extension_b                    nvarchar(1000),
        extension_c                    nvarchar(1000),
        extension_d                    nvarchar(1000),
        extension_e                    nvarchar(1000),
        extension_f                    nvarchar(1000),
        extension_g                    nvarchar(1000),
        extension_h                    nvarchar(1000),
        extension_i                    nvarchar(1000),
        extension_j                    nvarchar(1000),
        entry_ts                       datetime2 not null,
        entry_user_cd                  nvarchar(100) not null,
        renew_cnt                      numeric(18,0) not null,
        renew_ts                       datetime2 not null,
        renew_user_cd                  nvarchar(100) not null
    );
    alter table k30t_expense_detail add primary key  (system_matter_id, user_data_id, tuple_id, gadget_class, gadget_instance);
    alter table k30t_expense_detail add check (gadget_instance >= 0);
    alter table k30t_expense_detail add check (tuple_id >= 0);
    alter table k30t_expense_detail add check (row_number >= 0);
    alter table k30t_expense_detail add check (tax_rate >= 0);
    
    create table ka30t_expense_detail
    (
        system_matter_id               nvarchar(20) not null,
        user_data_id                   nvarchar(20) not null,
        gadget_class                   nvarchar(100) not null,
        gadget_instance                numeric(18,0) not null,
        tuple_id                       numeric(18,0) not null,
        locale_id                      nvarchar(50) not null,
        archive_month                  nvarchar(6) not null,
        gadget_id                      nvarchar(220) not null,
        gadget_variation               nvarchar(100) not null,
        row_number                     numeric(18,0) not null,
        occur_date                     datetime2,
        summary                        nvarchar(4000),
        exp_type_cd                    nvarchar(100),
        account_cd                     nvarchar(100),
        tax_type_cd                    nvarchar(100),
        tax_rate                       numeric(28,10),
        quantity                       numeric(28,10),
        trans_currency_cd              nvarchar(100),
        trans_amount                   numeric(28,10),
        company_currency_cd            nvarchar(100),
        company_rate                   numeric(28,10),
        company_amount                 numeric(28,10),
        company_amount_exc_tax         numeric(28,10),
        company_amount_tax             numeric(28,10),
        company_amount_sum             numeric(28,10),
        pay_type_cd                    nvarchar(100),
        pay_method_cd                  nvarchar(100),
        payee_cd                       nvarchar(100),
        payee_name                     nvarchar(1000),
        department_set_cd              nvarchar(100),
        department_cd                  nvarchar(100),
        project_cd                     nvarchar(100),
        exp_type_name                  nvarchar(1000),
        account_name                   nvarchar(1000),
        tax_type_name                  nvarchar(1000),
        trans_currency_name            nvarchar(1000),
        company_currency_name          nvarchar(1000),
        pay_type_name                  nvarchar(1000),
        payment_flag                   nvarchar(1),
        pay_method_name                nvarchar(1000),
        department_name                nvarchar(1000),
        project_name                   nvarchar(1000),
        extension_a                    nvarchar(1000),
        extension_b                    nvarchar(1000),
        extension_c                    nvarchar(1000),
        extension_d                    nvarchar(1000),
        extension_e                    nvarchar(1000),
        extension_f                    nvarchar(1000),
        extension_g                    nvarchar(1000),
        extension_h                    nvarchar(1000),
        extension_i                    nvarchar(1000),
        extension_j                    nvarchar(1000),
        entry_ts                       datetime2 not null,
        entry_user_cd                  nvarchar(100) not null,
        renew_cnt                      numeric(18,0) not null,
        renew_ts                       datetime2 not null,
        renew_user_cd                  nvarchar(100) not null
    );
    alter table ka30t_expense_detail add primary key  (system_matter_id, user_data_id, gadget_class, gadget_instance, tuple_id, locale_id);
    
    create index idx_ka30t_expense_detail_1 on ka30t_expense_detail (archive_month);
    

4.2.2. Service、Entity生成

次に「S2JDBC-Gen」を使用して、Service、Entityの作成を行います。

注意

Service、Entityの作成前に必ず、「テーブル定義」で定義したテーブルを作成してください。

4.2.2.1. S2JDBC-Genのセットアップ

Service、Entityを作成するために、S2JDBC-Genをセットアップします。
セットアップ方法の詳細は『intra-mart Accel Kaiden! プログラミングガイド』の「基本 - 事前準備 - S2JDBC」を参照してください。

4.2.2.2. Service、Entityの作成

Service、Entityを作成します。
作成方法の詳細は『intra-mart Accel Kaiden! プログラミングガイド』の「応用 - マスタメンテナンス - チュートリアル - S2JDBC」を参照してください。

4.2.2.3. Service、Entityの配置とコンポーネント設定

作成したService、Entityをプロジェクトに配置します。
配置先のパス、およびパッケージは必要に応じて変更してください。
また、作成したServiceのコンポーネント追加先も使用プロジェクトのDiconファイルに追加してください。
(本説明では、intra-mart Accel Kaiden! ワークフローモジュールに配置した想定で作成しています。)
  • K30tExpenseDetail.java
    %ModuleProject%/src/main/generated/jp/co/slcs/kaiden2/product_workflow/foundation/model/entity/K30tExpenseDetail.java
    package jp.co.slcs.kaiden2.product_workflow.foundation.model.entity;
    
    import java.io.Serializable;
    import java.math.BigDecimal;
    import java.sql.Timestamp;
    import javax.annotation.Generated;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.Id;
    import javax.persistence.Lob;
    import javax.persistence.Table;
    import jp.co.slcs.kaiden2.base.foundation.model.entity.GenerateEntity;
    
    /**
     * 経費明細テーブル.
     * 
     * @author Sumitomo Life Information Systems Co.,Ltd.
     */
    @Entity
    @Table(name = "k30t_expense_detail")
    @Generated(value = {"S2JDBC-Gen 2.4.46", "org.seasar.extension.jdbc.gen.internal.model.EntityModelFactoryImpl"})
    public final class K30tExpenseDetail extends GenerateEntity implements Serializable {
        
        /** シリアルバージョンUID. */
        private static final long serialVersionUID = 1L;
        
        /** システム案件id. */
        @Id
        @Column(name = "system_matter_id", columnDefinition = "varchar2(20)", nullable = false, unique = false)
        public String systemMatterId;
        
        /** ユーザデータid. */
        @Id
        @Column(name = "user_data_id", columnDefinition = "varchar2(20)", nullable = false, unique = false)
        public String userDataId;
        
        /** ガジェットクラス. */
        @Id
        @Column(name = "gadget_class", columnDefinition = "varchar2(100)", nullable = false, unique = false)
        public String gadgetClass;
        
        /** ガジェットインスタンス. */
        @Id
        @Column(name = "gadget_instance", columnDefinition = "number(18,0)", nullable = false, unique = false)
        public Long gadgetInstance;
        
        /** タプルid. */
        @Id
        @Column(name = "tuple_id", columnDefinition = "number(18,0)", nullable = false, unique = false)
        public Long tupleId;
        
        /** ガジェットid. */
        @Column(name = "gadget_id", columnDefinition = "varchar2(220)", nullable = false, unique = false)
        public String gadgetId;
        
        /** ガジェットバリエーション. */
        @Column(name = "gadget_variation", columnDefinition = "varchar2(100)", nullable = false, unique = false)
        public String gadgetVariation;
        
        /** 行番号. */
        @Column(name = "row_number", columnDefinition = "number(18,0)", nullable = false, unique = false)
        public Long rowNumber;
        
        /** 発生日. */
        @Column(name = "occur_date", columnDefinition = "timestamp(6)", nullable = true, unique = false)
        public Timestamp occurDate;
        
        /** 摘要. */
        @Column(name = "summary", columnDefinition = "varchar2(4000)", nullable = true, unique = false)
        public String summary;
        
        /** 経費区分コード. */
        @Column(name = "exp_type_cd", columnDefinition = "varchar2(100)", nullable = true, unique = false)
        public String expTypeCd;
        
        /** 勘定科目コード. */
        @Column(name = "account_cd", columnDefinition = "varchar2(100)", nullable = true, unique = false)
        public String accountCd;
        
        /** 税区分コード. */
        @Column(name = "tax_type_cd", columnDefinition = "varchar2(100)", nullable = true, unique = false)
        public String taxTypeCd;
        
        /** 税率. */
        @Column(name = "tax_rate", columnDefinition = "number(28,10)", nullable = true, unique = false)
        public BigDecimal taxRate;
        
        /** 数量. */
        @Column(name = "quantity", columnDefinition = "number(28,10)", nullable = true, unique = false)
        public BigDecimal quantity;
        
        /** 取引通貨コード. */
        @Column(name = "trans_currency_cd", columnDefinition = "varchar2(100)", nullable = true, unique = false)
        public String transCurrencyCd;
        
        /** 取引通貨額. */
        @Column(name = "trans_amount", columnDefinition = "number(28,10)", nullable = true, unique = false)
        public BigDecimal transAmount;
        
        /** 会社通貨コード. */
        @Column(name = "company_currency_cd", columnDefinition = "varchar2(100)", nullable = true, unique = false)
        public String companyCurrencyCd;
        
        /** 会社通貨換算レート. */
        @Column(name = "company_rate", columnDefinition = "number(28,10)", nullable = true, unique = false)
        public BigDecimal companyRate;
        
        /** 会社通貨額. */
        @Column(name = "company_amount", columnDefinition = "number(28,10)", nullable = true, unique = false)
        public BigDecimal companyAmount;
        
        /** 会社通貨税抜額. */
        @Column(name = "company_amount_exc_tax", columnDefinition = "number(28,10)", nullable = true, unique = false)
        public BigDecimal companyAmountExcTax;
        
        /** 会社通貨税額. */
        @Column(name = "company_amount_tax", columnDefinition = "number(28,10)", nullable = true, unique = false)
        public BigDecimal companyAmountTax;
        
        /** 会社通貨額合計. */
        @Column(name = "company_amount_sum", columnDefinition = "number(28,10)", nullable = true, unique = false)
        public BigDecimal companyAmountSum;
        
        /** 支払分類コード. */
        @Column(name = "pay_type_cd", columnDefinition = "varchar2(100)", nullable = true, unique = false)
        public String payTypeCd;
        
        /** 支払方法コード. */
        @Column(name = "pay_method_cd", columnDefinition = "varchar2(100)", nullable = true, unique = false)
        public String payMethodCd;
        
        /** 支払先コード. */
        @Column(name = "payee_cd", columnDefinition = "varchar2(100)", nullable = true, unique = false)
        public String payeeCd;
        
        /** 支払先名. */
        @Column(name = "payee_name", columnDefinition = "varchar2(1000)", nullable = true, unique = false)
        public String payeeName;
        
        /** 組織セットコード. */
        @Column(name = "department_set_cd", columnDefinition = "varchar2(100)", nullable = true, unique = false)
        public String departmentSetCd;
        
        /** 組織コード. */
        @Column(name = "department_cd", columnDefinition = "varchar2(100)", nullable = true, unique = false)
        public String departmentCd;
        
        /** プロジェクトコード. */
        @Column(name = "project_cd", columnDefinition = "varchar2(100)", nullable = true, unique = false)
        public String projectCd;
        
        /** 連携区分. */
        @Column(name = "relation_type", columnDefinition = "varchar2(100)", nullable = true, unique = false)
        public String relationType;
        
        /** 連携id. */
        @Column(name = "relation_id", columnDefinition = "varchar2(100)", nullable = true, unique = false)
        public String relationId;
        
        /** 連携内容. */
        @Lob
        @Column(name = "relation_data", columnDefinition = "clob", nullable = true, unique = false)
        public String relationData;
        
        /** 予備項目a. */
        @Column(name = "extension_a", columnDefinition = "varchar2(1000)", nullable = true, unique = false)
        public String extensionA;
        
        /** 予備項目b. */
        @Column(name = "extension_b", columnDefinition = "varchar2(1000)", nullable = true, unique = false)
        public String extensionB;
        
        /** 予備項目c. */
        @Column(name = "extension_c", columnDefinition = "varchar2(1000)", nullable = true, unique = false)
        public String extensionC;
        
        /** 予備項目d. */
        @Column(name = "extension_d", columnDefinition = "varchar2(1000)", nullable = true, unique = false)
        public String extensionD;
        
        /** 予備項目e. */
        @Column(name = "extension_e", columnDefinition = "varchar2(1000)", nullable = true, unique = false)
        public String extensionE;
        
        /** 予備項目f. */
        @Column(name = "extension_f", columnDefinition = "varchar2(1000)", nullable = true, unique = false)
        public String extensionF;
        
        /** 予備項目g. */
        @Column(name = "extension_g", columnDefinition = "varchar2(1000)", nullable = true, unique = false)
        public String extensionG;
        
        /** 予備項目h. */
        @Column(name = "extension_h", columnDefinition = "varchar2(1000)", nullable = true, unique = false)
        public String extensionH;
        
        /** 予備項目i. */
        @Column(name = "extension_i", columnDefinition = "varchar2(1000)", nullable = true, unique = false)
        public String extensionI;
        
        /** 予備項目j. */
        @Column(name = "extension_j", columnDefinition = "varchar2(1000)", nullable = true, unique = false)
        public String extensionJ;
    }
    
  • Ka30tExpenseDetail.java
    %ModuleProject%/src/main/generated/jp/co/slcs/kaiden2/product_workflow/foundation/model/entity/Ka30tExpenseDetail.java
    package jp.co.slcs.kaiden2.product_workflow.foundation.model.entity;
    
    import java.io.Serializable;
    import java.math.BigDecimal;
    import java.sql.Timestamp;
    import javax.annotation.Generated;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.Id;
    import javax.persistence.Lob;
    import javax.persistence.Table;
    import jp.co.slcs.kaiden2.base.foundation.model.entity.GenerateEntity;
    
    /**
     * (過去案件)経費明細テーブル.
     * 
     * @author Sumitomo Life Information Systems Co.,Ltd.
     */
    @Entity
    @Table(name = "ka30t_expense_detail")
    @Generated(value = {"S2JDBC-Gen 2.4.46", "org.seasar.extension.jdbc.gen.internal.model.EntityModelFactoryImpl"})
    public final class Ka30tExpenseDetail extends GenerateEntity implements Serializable {
        
        /** シリアルバージョンUID. */
        private static final long serialVersionUID = 1L;
        
        /** システム案件id. */
        @Id
        @Column(name = "system_matter_id", columnDefinition = "varchar2(20)", nullable = false, unique = false)
        public String systemMatterId;
        
        /** ユーザデータid. */
        @Id
        @Column(name = "user_data_id", columnDefinition = "varchar2(20)", nullable = false, unique = false)
        public String userDataId;
        
        /** ガジェットクラス. */
        @Id
        @Column(name = "gadget_class", columnDefinition = "varchar2(100)", nullable = false, unique = false)
        public String gadgetClass;
        
        /** ガジェットインスタンス. */
        @Id
        @Column(name = "gadget_instance", columnDefinition = "number(18,0)", nullable = false, unique = false)
        public Long gadgetInstance;
        
        /** タプルid. */
        @Id
        @Column(name = "tuple_id", columnDefinition = "number(18,0)", nullable = false, unique = false)
        public Long tupleId;
        
        /** ロケールid. */
        @Id
        @Column(name = "locale_id", columnDefinition = "varchar2(50)", nullable = false, unique = false)
        public String localeId;
        
        /** アーカイブ年月. */
        @Column(name = "archive_month", columnDefinition = "varchar2(6)", nullable = false, unique = false)
        public String archiveMonth;
        
        /** ガジェットid. */
        @Column(name = "gadget_id", columnDefinition = "varchar2(220)", nullable = false, unique = false)
        public String gadgetId;
        
        /** ガジェットバリエーション. */
        @Column(name = "gadget_variation", columnDefinition = "varchar2(100)", nullable = false, unique = false)
        public String gadgetVariation;
        
        /** 行番号. */
        @Column(name = "row_number", columnDefinition = "number(18,0)", nullable = false, unique = false)
        public Long rowNumber;
        
        /** 発生日. */
        @Column(name = "occur_date", columnDefinition = "timestamp(6)", nullable = true, unique = false)
        public Timestamp occurDate;
        
        /** 摘要. */
        @Column(name = "summary", columnDefinition = "varchar2(4000)", nullable = true, unique = false)
        public String summary;
        
        /** 経費区分コード. */
        @Column(name = "exp_type_cd", columnDefinition = "varchar2(100)", nullable = true, unique = false)
        public String expTypeCd;
        
        /** 勘定科目コード. */
        @Column(name = "account_cd", columnDefinition = "varchar2(100)", nullable = true, unique = false)
        public String accountCd;
        
        /** 税区分コード. */
        @Column(name = "tax_type_cd", columnDefinition = "varchar2(100)", nullable = true, unique = false)
        public String taxTypeCd;
        
        /** 税率. */
        @Column(name = "tax_rate", columnDefinition = "number(28,10)", nullable = true, unique = false)
        public BigDecimal taxRate;
        
        /** 数量. */
        @Column(name = "quantity", columnDefinition = "number(28,10)", nullable = true, unique = false)
        public BigDecimal quantity;
        
        /** 取引通貨コード. */
        @Column(name = "trans_currency_cd", columnDefinition = "varchar2(100)", nullable = true, unique = false)
        public String transCurrencyCd;
        
        /** 取引通貨額. */
        @Column(name = "trans_amount", columnDefinition = "number(28,10)", nullable = true, unique = false)
        public BigDecimal transAmount;
        
        /** 会社通貨コード. */
        @Column(name = "company_currency_cd", columnDefinition = "varchar2(100)", nullable = true, unique = false)
        public String companyCurrencyCd;
        
        /** 会社通貨換算レート. */
        @Column(name = "company_rate", columnDefinition = "number(28,10)", nullable = true, unique = false)
        public BigDecimal companyRate;
        
        /** 会社通貨額. */
        @Column(name = "company_amount", columnDefinition = "number(28,10)", nullable = true, unique = false)
        public BigDecimal companyAmount;
        
        /** 会社通貨税抜額. */
        @Column(name = "company_amount_exc_tax", columnDefinition = "number(28,10)", nullable = true, unique = false)
        public BigDecimal companyAmountExcTax;
        
        /** 会社通貨税額. */
        @Column(name = "company_amount_tax", columnDefinition = "number(28,10)", nullable = true, unique = false)
        public BigDecimal companyAmountTax;
        
        /** 会社通貨額合計. */
        @Column(name = "company_amount_sum", columnDefinition = "number(28,10)", nullable = true, unique = false)
        public BigDecimal companyAmountSum;
        
        /** 支払分類コード. */
        @Column(name = "pay_type_cd", columnDefinition = "varchar2(100)", nullable = true, unique = false)
        public String payTypeCd;
        
        /** 支払方法コード. */
        @Column(name = "pay_method_cd", columnDefinition = "varchar2(100)", nullable = true, unique = false)
        public String payMethodCd;
        
        /** 支払先コード. */
        @Column(name = "payee_cd", columnDefinition = "varchar2(100)", nullable = true, unique = false)
        public String payeeCd;
        
        /** 支払先名. */
        @Column(name = "payee_name", columnDefinition = "varchar2(1000)", nullable = true, unique = false)
        public String payeeName;
        
        /** 組織セットコード. */
        @Column(name = "department_set_cd", columnDefinition = "varchar2(100)", nullable = true, unique = false)
        public String departmentSetCd;
        
        /** 組織コード. */
        @Column(name = "department_cd", columnDefinition = "varchar2(100)", nullable = true, unique = false)
        public String departmentCd;
        
        /** プロジェクトコード. */
        @Column(name = "project_cd", columnDefinition = "varchar2(100)", nullable = true, unique = false)
        public String projectCd;
        
        /** 経費区分名. */
        @Column(name = "exp_type_name", columnDefinition = "varchar2(1000)", nullable = true, unique = false)
        public String expTypeName;
        
        /** 勘定科目名. */
        @Column(name = "account_name", columnDefinition = "varchar2(1000)", nullable = true, unique = false)
        public String accountName;
        
        /** 税区分名. */
        @Column(name = "tax_type_name", columnDefinition = "varchar2(1000)", nullable = true, unique = false)
        public String taxTypeName;
        
        /** 取引通貨名. */
        @Column(name = "trans_currency_name", columnDefinition = "varchar2(1000)", nullable = true, unique = false)
        public String transCurrencyName;
        
        /** 会社通貨名. */
        @Column(name = "company_currency_name", columnDefinition = "varchar2(1000)", nullable = true, unique = false)
        public String companyCurrencyName;
        
        /** 支払分類名. */
        @Column(name = "pay_type_name", columnDefinition = "varchar2(1000)", nullable = true, unique = false)
        public String payTypeName;
        
        /** 立替フラグ. */
        @Column(name = "payment_flag", columnDefinition = "varchar2(1)", nullable = true, unique = false)
        public String paymentFlag;
        
        /** 支払方法名. */
        @Column(name = "pay_method_name", columnDefinition = "varchar2(1000)", nullable = true, unique = false)
        public String payMethodName;
        
        /** 組織名. */
        @Column(name = "department_name", columnDefinition = "varchar2(1000)", nullable = true, unique = false)
        public String departmentName;
        
        /** プロジェクト名. */
        @Column(name = "project_name", columnDefinition = "varchar2(1000)", nullable = true, unique = false)
        public String projectName;
        
        /** 連携区分. */
        @Column(name = "relation_type", columnDefinition = "varchar2(100)", nullable = true, unique = false)
        public String relationType;
        
        /** 連携id. */
        @Column(name = "relation_id", columnDefinition = "varchar2(100)", nullable = true, unique = false)
        public String relationId;
        
        /** 連携内容. */
        @Lob
        @Column(name = "relation_data", columnDefinition = "clob", nullable = true, unique = false)
        public String relationData;
        
        /** 予備項目a. */
        @Column(name = "extension_a", columnDefinition = "varchar2(1000)", nullable = true, unique = false)
        public String extensionA;
        
        /** 予備項目b. */
        @Column(name = "extension_b", columnDefinition = "varchar2(1000)", nullable = true, unique = false)
        public String extensionB;
        
        /** 予備項目c. */
        @Column(name = "extension_c", columnDefinition = "varchar2(1000)", nullable = true, unique = false)
        public String extensionC;
        
        /** 予備項目d. */
        @Column(name = "extension_d", columnDefinition = "varchar2(1000)", nullable = true, unique = false)
        public String extensionD;
        
        /** 予備項目e. */
        @Column(name = "extension_e", columnDefinition = "varchar2(1000)", nullable = true, unique = false)
        public String extensionE;
        
        /** 予備項目f. */
        @Column(name = "extension_f", columnDefinition = "varchar2(1000)", nullable = true, unique = false)
        public String extensionF;
        
        /** 予備項目g. */
        @Column(name = "extension_g", columnDefinition = "varchar2(1000)", nullable = true, unique = false)
        public String extensionG;
        
        /** 予備項目h. */
        @Column(name = "extension_h", columnDefinition = "varchar2(1000)", nullable = true, unique = false)
        public String extensionH;
        
        /** 予備項目i. */
        @Column(name = "extension_i", columnDefinition = "varchar2(1000)", nullable = true, unique = false)
        public String extensionI;
        
        /** 予備項目j. */
        @Column(name = "extension_j", columnDefinition = "varchar2(1000)", nullable = true, unique = false)
        public String extensionJ;
    }
    
  • K30tExpenseDetailService.java
    %ModuleProject%/src/main/generated/jp/co/slcs/kaiden2/product_workflow/foundation/model/service/K30tExpenseDetailService.java
    package jp.co.slcs.kaiden2.product_workflow.foundation.model.service;
    
    import javax.annotation.Generated;
    import jp.co.slcs.kaiden2.base.foundation.model.service.GenerateService;
    import jp.co.slcs.kaiden2.product_workflow.foundation.model.entity.K30tExpenseDetail;
    
    /**
     * {@link K30tExpenseDetail}のサービスクラス.
     * 
     * @author Sumitomo Life Information Systems Co.,Ltd.
     */
    @Generated(value = {"S2JDBC-Gen 2.4.46", "org.seasar.extension.jdbc.gen.internal.model.ServiceModelFactoryImpl"})
    public final class K30tExpenseDetailService extends GenerateService<K30tExpenseDetail> {
        //
    }
    
  • Ka30tExpenseDetailService.java
    %ModuleProject%/src/main/generated/jp/co/slcs/kaiden2/product_workflow/foundation/model/service/Ka30tExpenseDetailService.java
    package jp.co.slcs.kaiden2.product_workflow.foundation.model.service;
    
    import javax.annotation.Generated;
    import jp.co.slcs.kaiden2.base.foundation.model.service.GenerateService;
    import jp.co.slcs.kaiden2.product_workflow.foundation.model.entity.Ka30tExpenseDetail;
    
    /**
     * {@link Ka30tExpenseDetail}のサービスクラス.
     * 
     * @author Sumitomo Life Information Systems Co.,Ltd.
     */
    @Generated(value = {"S2JDBC-Gen 2.4.46", "org.seasar.extension.jdbc.gen.internal.model.ServiceModelFactoryImpl"})
    public final class Ka30tExpenseDetailService extends GenerateService<Ka30tExpenseDetail> {
        //
    }
    
  • kaiden_product_workflow.dicon
    %ModuleProject%/src/main/resources/kaiden_product_workflow.dicon
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE components PUBLIC "-//SEASAR//DTD S2Container 2.4//EN"
      "https://www.seasar.org/dtd/components24.dtd">
    
    <components>
    
      <!-- 略 -->
    
      <component name="k30tExpenseDetailService" class="jp.co.slcs.kaiden2.product_workflow.foundation.model.service.K30tExpenseDetailService" instance="prototype"></component>
      <component name="ka30tExpenseDetailService" class="jp.co.slcs.kaiden2.product_workflow.foundation.model.service.Ka30tExpenseDetailService" instance="prototype"></component>
    </components>
    

4.2.3. GadgetBuilder定義作成

続いて、GadgetBuilder定義を作成します。

4.2.3.1. GadgetBuilder定義ファイル作成

定義用のファイルを作成します。
ファイル名は必ず「%ガジェットクラス%_%ガジェットバリエーション%.xml(expenseDetail_v01.xml)」とします。

配置先
%ModuleProject%/src/main/storage/public/kaiden/generic/gadget/expenseDetail_v01.xml

内容
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<gadgetBuilderSettings xmlns="http://kaiden.slcs.co.jp/xmlschema/gadgetBuilderSettings">
  <gadgetClass>expenseDetail</gadgetClass>
  <gadgetVariation>v01</gadgetVariation>
  <jspPath>/WEB-INF/view/kaiden2/extension_imw/generic/gadget/generic_v01.jsp</jspPath>
  <javaPath>jp.co.slcs.kaiden2.extension_imw.feature.logic.kaiden.gadget.builder.GadgetBuilderLogic</javaPath>
  <sortKey>51001</sortKey>
  <surfaceKey>chapterTitle</surfaceKey>
  <descriptions>
    <description localeId="en"    gadgetName="Expenses Particulars" description="Enter Expenses Particulars.&#xD;Only Japanese Yen is available."/>
    <description localeId="ja"    gadgetName="経費明細"              description="経費明細の入力を行います。&#xD;日本円のみ利用可能です。"/>
    <description localeId="zh_CN" gadgetName="经费明细"              description="输入经费明细。&#xD;只可使用日元。"/>
  </descriptions>
  <blocks>
    <block id="expenseDetail" type="DETAIL" surfaceKey="chapterTitle">
      <service basic="k30tExpenseDetailService" archive="ka30tExpenseDetailService">
        <sqls>
         <sql id="init"    path="META-INF/sql/jp/co/slcs/kaiden2/generic/gadget/ExpenseDetail.sql"/>
         <sql id="copy"    path="META-INF/sql/jp/co/slcs/kaiden2/generic/gadget/ExpenseDetail.sql"/>
         <sql id="merge"   path="META-INF/sql/jp/co/slcs/kaiden2/generic/gadget/ExpenseDetail.sql"/>
         <sql id="archive" path="META-INF/sql/jp/co/slcs/kaiden2/generic/gadget/ExpenseDetail.sql"/>
         <sql id="select"  path="META-INF/sql/jp/co/slcs/kaiden2/generic/gadget/ExpenseDetail.sql"/>
        </sqls>
      </service>
      <groups>
        <group id="rowNumber" surfaceKey="rowNumber" requiredType="ALWAYS_ANY" inputType="LABEL">
          <args>
            <arg key="style_pc" value="text-align:center;"/>
          </args>
          <fields>
            <field id="rowNumber" surfaceKey="rowNumber" requiredType="INHERIT" inputType="INHERIT" type="PANEL">
              <!--
              <args>
                <arg key="header"         value="true"/>
                <arg key="headerAllowAdd" value="true"/>
                <arg key="headerAllowDel" value="true"/>
                <arg key="detail"         value="true"/>
                <arg key="detailAllowAdd" value="true"/>
                <arg key="detailAllowDel" value="true"/>
              </args>
              -->
            </field>
            <field id="imwApplyBaseDate" surfaceKey="imwApplyBaseDate" requiredType="ALWAYS_ANY" inputType="INHERIT" type="DTO"/>
            <field id="searchCriteriaCompany" surfaceKey="searchCriteriaCompany" requiredType="ALWAYS_ANY" inputType="INHERIT" type="DTO"/>
            <field id="payMethodCd" surfaceKey="payMethod" requiredType="INHERIT" inputType="INHERIT" type="TEXT_HIDDEN"/>
          </fields>
        </group>
        <group id="occurDate" surfaceKey="occurDate" requiredType="ALWAYS_REQ" inputType="CONFIG">
          <fields>
            <field id="occurDate" surfaceKey="occurDate" requiredType="INHERIT" inputType="INHERIT" type="TEXT_DATE">
              <args>
                <arg key="autoFormat" value="true"/>
              </args>
              <validates>
                <validate event="default" config="{'id':'date'}"/>
              </validates>
            </field>
          </fields>
        </group>
        <group id="summary" surfaceKey="summary" requiredType="SETTING_REQ" inputType="CONFIG">
          <fields>
            <field id="summary" surfaceKey="summary" requiredType="INHERIT" inputType="INHERIT" type="TEXT">
              <args>
                <arg key="maxlength" value="250"/>
                <arg key="style_pc"  value="width:98%"/>
              </args>
              <validates>
                <validate event="default" config="{'id':'maxLength', 'args':'250'}"/>
              </validates>
            </field>
          </fields>
        </group>
        <group id="expType" surfaceKey="expType" requiredType="ALWAYS_REQ" inputType="CONFIG">
          <fields>
            <field id="expTypeCd" surfaceKey="expType" requiredType="INHERIT" inputType="INHERIT" type="MASTER">
              <args>
                <arg key="masterId"      value="exp_type"/>
                <arg key="extensionId"   value="expenseDetail"/>
                <arg key="searchType"    value="search"/>
                <arg key="viewName"      value="expTypeName"/>
                <arg key="criteria"      value="{'searchCriteriaDate':'imwApplyBaseDate','searchCriteriaCompany':'searchCriteriaCompany','expTypeCd':'expTypeCd','includeBlank':'false'}"/>
                <arg key="resultChain"   value="{'expTypeCd':'expTypeCd','expTypeName':'expTypeName','accountCd':'accountCd','accountName':'accountName','taxTypeCd':'taxTypeCd','taxTypeName':'taxTypeName','taxRate':'taxRate'}"/>
                <arg key="resultValue"   value="expTypeName"/>
                <arg key="primaryTarget" value="expTypeCd"/>
                <arg key="tmtableId"     value="expenseDetail"/>
                <arg key="refreshTarget" value="imwApplyBaseDate,searchCriteriaCompany"/>
                <arg key="style_pc"      value="display:inline-block; width:35%;"/>
              </args>
              <validates>
                <validate event="default" target="SERVER" config="{'id':'masterBuilderExists', 'args':{'masterId':'exp_type', 'extensionId':'expenseDetail', 'searchCriteriaDate':'imwApplyBaseDate', 'searchCriteriaCompany':'searchCriteriaCompany', 'expTypeCd':'expTypeCd'}}"/>
              </validates>
            </field>
            <field id="accountCd" surfaceKey="account" requiredType="INHERIT" inputType="INHERIT" type="TEXT_HIDDEN">
              <validates>
                <validate event="default" target="SERVER" config="{'id':'masterBuilderExists', 'args':{'masterId':'tax_type', 'extensionId':'expenseDetail', 'searchCriteriaDate':'imwApplyBaseDate', 'searchCriteriaCompany':'searchCriteriaCompany', 'taxTypeCd':'taxTypeCd'}}"/>
              </validates>
            </field>
            <field id="accountName" surfaceKey="account" requiredType="ALWAYS_ANY" inputType="LABEL" type="TEXT">
              <args>
                <arg key="style_pc" value="display:inline-block; width:30%; margin-left:3px; text-overflow:ellipsis; white-space:nowrap; overflow:hidden; vertical-align:middle;"/>
              </args>
            </field>
            <field id="taxTypeCd" surfaceKey="taxType" requiredType="INHERIT" inputType="INHERIT" type="TEXT_HIDDEN">
              <validates>
                <validate event="default" target="SERVER" config="{'id':'masterBuilderExists', 'args':{'masterId':'tax_type', 'extensionId':'expenseDetail', 'searchCriteriaDate':'imwApplyBaseDate', 'searchCriteriaCompany':'searchCriteriaCompany', 'taxTypeCd':'taxTypeCd'}}"/>
              </validates>
            </field>
            <field id="taxTypeName" surfaceKey="taxType" requiredType="ALWAYS_ANY" inputType="LABEL" type="TEXT">
              <args>
                <arg key="style_pc" value="display:inline-block; width:25%; margin-left:3px; text-overflow:ellipsis; white-space:nowrap; overflow:hidden; vertical-align:middle;"/>
              </args>
            </field>
            <field id="taxRate" surfaceKey="taxRate" requiredType="INHERIT" inputType="INHERIT" type="TEXT_HIDDEN"/>
          </fields>
        </group>
        <group id="department" surfaceKey="department" requiredType="ALWAYS_ANY" inputType="CONFIG">
          <fields>
            <field id="departmentSetCd" surfaceKey="departmentSet" requiredType="INHERIT" inputType="INHERIT" type="TEXT_HIDDEN"/>
            <field id="departmentCd" surfaceKey="department" requiredType="INHERIT" inputType="INHERIT" type="MASTER">
              <args>
                <arg key="masterId"      value="department"/>
                <arg key="extensionId"   value="expenseDetail"/>
                <arg key="searchType"    value="search"/>
                <arg key="viewName"      value="departmentName"/>
                <arg key="criteria"      value="{'searchCriteriaDate':'imwApplyBaseDate','searchCriteriaCompany':'searchCriteriaCompany','departmentSetCd':'searchCriteriaCompany','departmentCd':'departmentCd','includeBlank':'true'}"/>
                <arg key="resultChain"   value="{'departmentCd':'departmentCd','departmentName':'departmentName','departmentSetCd':'departmentSetCd'}"/>
                <arg key="resultValue"   value="departmentName"/>
                <arg key="primaryTarget" value="departmentSetCd,departmentCd"/>
                <arg key="tmtableId"     value="expenseDetail"/>
                <arg key="refreshTarget" value="imwApplyBaseDate,searchCriteriaCompany,searchCriteriaCompany"/>
                <arg key="style_pc"      value="width:85%;"/>
              </args>
              <validates>
                <validate event="default" target="ALWAYS" config="{'id':'requiredAny', 'args':['departmentCd','projectCd']}"/>
                <validate event="default" target="SERVER" config="{'id':'masterBuilderExists', 'args':{'masterId':'department', 'extensionId':'expenseDetail', 'searchCriteriaDate':'imwApplyBaseDate', 'searchCriteriaCompany':'searchCriteriaCompany', 'departmentSetCd':'searchCriteriaCompany','departmentCd':'departmentCd'}}"/>
              </validates>
            </field>
          </fields>
        </group>
        <group id="project" surfaceKey="project" requiredType="ALWAYS_ANY" inputType="CONFIG">
          <fields>
            <field id="projectCd" surfaceKey="project" requiredType="INHERIT" inputType="INHERIT" type="MASTER">
              <args>
                <arg key="masterId"      value="project_workflow"/>
                <arg key="extensionId"   value="expenseDetail"/>
                <arg key="searchType"    value="search"/>
                <arg key="viewName"      value="projectName"/>
                <arg key="criteria"      value="{'searchCriteriaDate':'imwApplyBaseDate','searchCriteriaCompany':'searchCriteriaCompany','projectCd':'projectCd','includeBlank':'true'}"/>
                <arg key="resultChain"   value="{'projectCd':'projectCd','projectName':'projectName'}"/>
                <arg key="resultValue"   value="projectName"/>
                <arg key="primaryTarget" value="projectCd"/>
                <arg key="tmtableId"     value="expenseDetail"/>
                <arg key="refreshTarget" value="imwApplyBaseDate,searchCriteriaCompany"/>
                <arg key="style_pc"      value="width:85%;"/>
              </args>
              <validates>
                <validate event="default" target="ALWAYS" config="{'id':'requiredAny', 'args':['departmentCd','projectCd']}"/>
                <validate event="default" target="SERVER" config="{'id':'masterBuilderExists', 'args':{'masterId':'project_workflow', 'extensionId':'expenseDetail', 'searchCriteriaDate':'imwApplyBaseDate', 'searchCriteriaCompany':'searchCriteriaCompany', 'projectCd':'projectCd'}}"/>
              </validates>
            </field>
          </fields>
        </group>
        <group id="payType" surfaceKey="payType" requiredType="ALWAYS_REQ" inputType="CONFIG">
          <fields>
            <field id="payTypeCd" surfaceKey="payType" requiredType="INHERIT" inputType="INHERIT" type="MASTER">
              <args>
                <arg key="masterId"      value="pay_type"/>
                <arg key="extensionId"   value="expenseDetail"/>
                <arg key="searchType"    value="select"/>
                <arg key="viewName"      value="payTypeName"/>
                <arg key="criteria"      value="{'searchCriteriaDate':'imwApplyBaseDate','searchCriteriaCompany':'searchCriteriaCompany','payTypeCd':'payTypeCd','includeBlank':'false'}"/>
                <arg key="resultChain"   value="{'payTypeCd':'payTypeCd','payTypeName':'payTypeName','paymentFlag':'paymentFlag'}"/>
                <arg key="resultValue"   value="payTypeName"/>
                <arg key="primaryTarget" value="payTypeCd"/>
                <arg key="tmtableId"     value="expenseDetail"/>
                <arg key="refreshTarget" value="imwApplyBaseDate,searchCriteriaCompany"/>
<!--                 <arg key="singleList"    value="true"/> -->
                <arg key="style_pc"      value="width:98%;"/>
              </args>
              <validates>
                <validate event="default" target="SERVER" config="{'id':'masterBuilderExists', 'args':{'masterId':'pay_type', 'extensionId':'expenseDetail', 'searchCriteriaDate':'imwApplyBaseDate', 'searchCriteriaCompany':'searchCriteriaCompany', 'payTypeCd':'payTypeCd'}}"/>
              </validates>
            </field>
            <field id="paymentFlag" surfaceKey="paymentFlag" requiredType="INHERIT" inputType="INHERIT" type="TEXT_HIDDEN"/>
          </fields>
        </group>
        <group id="payee" surfaceKey="payee" requiredType="SETTING_ANY" inputType="CONFIG">
          <fields>
            <field id="payeeName" surfaceKey="payee" requiredType="INHERIT" inputType="INHERIT" type="TEXT">
              <args>
                <arg key="maxlength" value="250"/>
                <arg key="style_pc"  value="width:98%"/>
              </args>
              <validates>
                <validate event="default" config="{'id':'maxLength', 'args':'250'}"/>
              </validates>
            </field>
          </fields>
        </group>
        <group id="transAmount" surfaceKey="transAmount" requiredType="ALWAYS_REQ" inputType="CONFIG">
          <args>
            <arg key="style_pc" value="text-align:right;"/>
          </args>
          <fields>
            <field id="transAmount" surfaceKey="transAmount" requiredType="INHERIT" inputType="INHERIT" type="TEXT_NUMERIC">
              <args>
                <arg key="style_pc" value="width:98%"/>
                <arg key="amount"   value="true"/>
                <arg key="event"    value="change"/>
              </args>
              <validates>
                <validate event="default" config="{'id':'currencyAmnt2', 'args':['','searchCriteriaCompany']}"/>
                <validate event="default" config="{'id':'amountMin', 'args':'0'}"/>
              </validates>
            </field>
            <field id="transCurrencyCd" surfaceKey="transCurrency" requiredType="ALWAYS_ANY" inputType="INHERIT" type="TEXT_HIDDEN"/>
            <field id="companyRate" surfaceKey="companyRate" requiredType="INHERIT" inputType="INHERIT" type="TEXT_HIDDEN"/>
            <field id="companyAmount" surfaceKey="companyAmount" requiredType="INHERIT" inputType="INHERIT" type="TEXT_HIDDEN"/>
            <field id="companyCurrencyCd" surfaceKey="companyCurrency" requiredType="ALWAYS_ANY" inputType="INHERIT" type="DTO"/>
            <field id="quantity" surfaceKey="quantity" requiredType="INHERIT" inputType="INHERIT" type="TEXT_HIDDEN"/>
            <field id="companyAmountSum" surfaceKey="companyAmountSum" requiredType="INHERIT" inputType="INHERIT" type="TEXT_HIDDEN"/>
            <field id="companyAmountExcTax" surfaceKey="companyAmountExcTax" requiredType="INHERIT" inputType="INHERIT" type="TEXT_HIDDEN"/>
            <field id="companyAmountTax" surfaceKey="companyAmountTax" requiredType="INHERIT" inputType="INHERIT" type="TEXT_HIDDEN"/>
          </fields>
        </group>
      </groups>
      <table rowNumberTarget="rowNumber" type="HORIZONTAL">
        <colgroups>
          <colgroup style="width:50px; overflow:hidden"/>
          <colgroup style="overflow:hidden"/>
          <colgroup style="width:23%; overflow:hidden"/>
          <colgroup style="width:23%; overflow:hidden"/>
          <colgroup style="width:23%; overflow:hidden"/>
        </colgroups>
        <rows>
          <row>
            <cols>
              <col groupId="rowNumber"  rowspan="3"/>
              <col groupId="occurDate"/>
              <col groupId="summary"    colspan="3"/>
            </cols>
          </row>
          <row>
            <cols>
              <col groupId="expType"    colspan="2"/>
              <col groupId="department"/>
              <col groupId="project"/>
            </cols>
          </row>
          <row>
            <cols>
              <col groupId="payType"/>
              <col groupId="payee"      colspan="2"/>
              <col groupId="transAmount"/>
            </cols>
          </row>
        </rows>
      </table>
      <completions>
        <completion name="departmentSetCd"     position="1" type="claimValueOnInit" args="{'claim':'claimDefaultDepartmentSetCd', 'target':'1'}"                              target="CLIENT" mode="EMPTY"/>
        <completion name="departmentCd"        position="1" type="claimValueOnInit" args="{'claim':'claimDefaultDepartmentCd', 'target':'1'}"                                 target="CLIENT" mode="EMPTY"/>
        <completion name="projectCd"           position="1" type="claimValueOnInit" args="{'claim':'claimDefaultProjectCd', 'target':'1'}"                                    target="CLIENT" mode="EMPTY"/>
        <completion name="payMethodCd"         position="1" type="claimValue"       args="{'claim':'claimPayMethod'}"                                                         target="ALWAYS" mode="ALWAYS"/>
        <completion name="transCurrencyCd"     position="2" type="variable"         args="{'field':'companyCurrencyCd'}"                                                      target="ALWAYS" mode="ALWAYS"/>
        <completion name="companyRate"         position="3" type="fixed"            args="{'value':'1'}"                                                                      target="ALWAYS" mode="EMPTY"/>
        <completion name="companyAmount"       position="4" type="variable"         args="{'field':'transAmount'}"                                                            target="ALWAYS" mode="ALWAYS"/>
        <completion name="quantity"            position="5" type="fixed"            args="{'value':'1'}"                                                                      target="ALWAYS" mode="EMPTY"/>
        <completion name="companyAmountSum"    position="6" type="calcMul"          args="{'field1':'companyAmount','field2':'quantity','round':'4','digits':'0'}"            target="ALWAYS" mode="ALWAYS"/>
        <completion name="companyAmountTax"    position="7" type="calcTax"          args="{'amount':'companyAmountSum','taxRate':'taxRate','round':'4','digits':'0'}"         target="ALWAYS" mode="ALWAYS"/>
        <completion name="companyAmountExcTax" position="8" type="calcSub"          args="{'field1':'companyAmountSum','field2':'companyAmountTax','round':'4','digits':'0'}" target="ALWAYS" mode="ALWAYS"/>
      </completions>
      <claims>
        <claim name="claimExpenseAmount"      type="claimAmountSummary"     args="{'amount':'companyAmountSum'}"/>
        <claim name="claimTemporaryPayAmount" type="claimAmountSummary"     args="{'amount':'companyAmountSum','paymentFlag':'paymentFlag','payment':'1'}"/>
        <claim name="claimCompanyPayAmount"   type="claimAmountSummary"     args="{'amount':'companyAmountSum','paymentFlag':'paymentFlag','payment':'0'}"/>
        <claim name="claimDateDetail"         type="claimColumnValuesList"  args="{'field1':'occurDate','field2':'occurDate'}"/>
        <claim name="claimExpenseDetail"      type="claimColumnValuesList"  args="{'field1':'companyAmountSum'}"/>
        <claim name="claimExpenceCount"       type="claimRowCount"          args=""/>
        <claim name="loadData4Settle"         type="claimSearchData"        args="{'systemMatterId':'imwSystemMatterId', 'userDataId':'imwUserDataId', 'gadgetClass':'gadgetClass'}" target="CLIENT"/>
      </claims>
      <events>
        <event target="matter_end" name="journalSourceDetailEntryForSqlEvent">
          <args>
            <arg key="sqlPath" value="META-INF/sql/jp/co/slcs/kaiden2/generic/gadget/journal/ExpenseDetail.sql"/>
          </args>
        </event>
      </events>
      <includes>
        <include path="/WEB-INF/view/kaiden2/product_workflow/generic/gadget/include/defaultDepartmentProject.jsp" />
      </includes>
    </block>
  </blocks>
  <surfaces>
    <surface surfaceKey="chapterTitle">
      <name localeId="en"    surface="Expenses Particulars"/>
      <name localeId="ja"    surface="経費明細"/>
      <name localeId="zh_CN" surface="经费明细"/>
    </surface>
    
    <surface surfaceKey="rowNumber">
      <name localeId="en"    surface="No"/>
      <name localeId="ja"    surface="No"/>
      <name localeId="zh_CN" surface="No"/>
    </surface>
    <surface surfaceKey="imwApplyBaseDate">
      <name localeId="en"    surface="Apply Reference Date"/>
      <name localeId="ja"    surface="申請基準日"/>
      <name localeId="zh_CN" surface="申请基准日"/>
    </surface>
    <surface surfaceKey="searchCriteriaCompany">
      <name localeId="en"    surface="Search Reference Company"/>
      <name localeId="ja"    surface="検索基準会社"/>
      <name localeId="zh_CN" surface="检索基准公司"/>
    </surface>
    <surface surfaceKey="payMethod">
      <name localeId="en"    surface="Payment Method"/>
      <name localeId="ja"    surface="支払方法"/>
      <name localeId="zh_CN" surface="支付方法"/>
    </surface>
    <surface surfaceKey="occurDate">
      <name localeId="en"    surface="Occurrence Date"/>
      <name localeId="ja"    surface="発生日"/>
      <name localeId="zh_CN" surface="发生日"/>
    </surface>
    <surface surfaceKey="summary">
      <name localeId="en"    surface="Description of Expense"/>
      <name localeId="ja"    surface="経費内容"/>
      <name localeId="zh_CN" surface="经费内容"/>
    </surface>
    <surface surfaceKey="expType">
      <name localeId="en"    surface="Expense Type"/>
      <name localeId="ja"    surface="経費区分"/>
      <name localeId="zh_CN" surface="经费分类"/>
    </surface>
    <surface surfaceKey="account">
      <name localeId="en"    surface="Account"/>
      <name localeId="ja"    surface="勘定科目"/>
      <name localeId="zh_CN" surface="帐户科目"/>
    </surface>
    <surface surfaceKey="taxType">
      <name localeId="en"    surface="Tax Category"/>
      <name localeId="ja"    surface="税区分"/>
      <name localeId="zh_CN" surface="税分类"/>
    </surface>
    <surface surfaceKey="taxRate">
      <name localeId="en"    surface="Tax Rate"/>
      <name localeId="ja"    surface="税率"/>
      <name localeId="zh_CN" surface="税率"/>
    </surface>
    <surface surfaceKey="departmentSet">
      <name localeId="en"    surface="Organization Set"/>
      <name localeId="ja"    surface="組織セット"/>
      <name localeId="zh_CN" surface="组织集合"/>
    </surface>
    <surface surfaceKey="department">
      <name localeId="en"    surface="Organization"/>
      <name localeId="ja"    surface="組織"/>
      <name localeId="zh_CN" surface="组织"/>
    </surface>
    <surface surfaceKey="project">
      <name localeId="en"    surface="Project"/>
      <name localeId="ja"    surface="プロジェクト"/>
      <name localeId="zh_CN" surface="项目"/>
    </surface>
    <surface surfaceKey="payType">
      <name localeId="en"    surface="Payment Classification"/>
      <name localeId="ja"    surface="支払分類"/>
      <name localeId="zh_CN" surface="支付分类"/>
    </surface>
    <surface surfaceKey="paymentFlag">
      <name localeId="en"    surface="Reimbursement Flag"/>
      <name localeId="ja"    surface="立替フラグ"/>
      <name localeId="zh_CN" surface="垫付标志"/>
    </surface>
    <surface surfaceKey="payee">
      <name localeId="en"    surface="Payee"/>
      <name localeId="ja"    surface="支払先"/>
      <name localeId="zh_CN" surface="收款方"/>
    </surface>
    <surface surfaceKey="transAmount">
      <name localeId="en"    surface="Amount"/>
      <name localeId="ja"    surface="金額"/>
      <name localeId="zh_CN" surface="金额"/>
    </surface>
    <surface surfaceKey="transCurrency">
      <name localeId="en"    surface="Currency"/>
      <name localeId="ja"    surface="通貨"/>
      <name localeId="zh_CN" surface="货币"/>
    </surface>
    <surface surfaceKey="companyRate">
      <name localeId="en"    surface="rate"/>
      <name localeId="ja"    surface="レート"/>
      <name localeId="zh_CN" surface="汇率"/>
    </surface>
    <surface surfaceKey="companyAmount">
      <name localeId="en"    surface="Converted"/>
      <name localeId="ja"    surface="換算額"/>
      <name localeId="zh_CN" surface="换算额"/>
    </surface>
    <surface surfaceKey="companyCurrency">
      <name localeId="en"    surface="Company Currency"/>
      <name localeId="ja"    surface="会社通貨"/>
      <name localeId="zh_CN" surface="公司货币"/>
    </surface>
    <surface surfaceKey="quantity">
      <name localeId="en"    surface="Quantity"/>
      <name localeId="ja"    surface="数量"/>
      <name localeId="zh_CN" surface="数量"/>
    </surface>
    <surface surfaceKey="companyAmountSum">
      <name localeId="en"    surface="Total amount"/>
      <name localeId="ja"    surface="合計額"/>
      <name localeId="zh_CN" surface="总量"/>
    </surface>
    <surface surfaceKey="companyAmountExcTax">
      <name localeId="en"    surface="Tax excluded amount"/>
      <name localeId="ja"    surface="税抜金額"/>
      <name localeId="zh_CN" surface="税抜金量"/>
    </surface>
    <surface surfaceKey="companyAmountTax">
      <name localeId="en"    surface="Tax included amount"/>
      <name localeId="ja"    surface="税込金額"/>
      <name localeId="zh_CN" surface="钱含税金额"/>
    </surface>
  </surfaces>
  <tags>
    <tag value="appNormal"/>
    <tag value="appAdvance"/>
    <tag value="appSettle"/>
    <tag value="spSupport"/>
  </tags>
</gadgetBuilderSettings>

4.2.4. SQL作成

必要に応じて、GadgetBuilderで使用する検索用のSQLを作成します。

内容
%ModuleProject%/src/main/resources/META-INF/sql/jp/co/slcs/kaiden2/generic/gadget/ExpenseDetail.sql
select
   target.system_matter_id
  ,target.user_data_id
  ,target.gadget_id
  ,target.gadget_class
  ,target.gadget_variation
  ,target.gadget_instance
  ,target.tuple_id
  ,target.row_number
  ,target.occur_date
  ,target.summary
  ,target.exp_type_cd
  ,exp_type.exp_type_name
  ,target.account_cd
  ,account.account_name
  ,target.tax_type_cd
  ,tax_type.tax_type_name
  ,target.tax_rate
  ,target.quantity
  ,target.trans_currency_cd
  ,trans_currency.currency_name as trans_currency_name
  ,target.trans_amount
  ,target.company_rate
  ,target.company_currency_cd
  ,company_currency.currency_name as company_currency_name
  ,target.company_amount
  ,target.company_amount_exc_tax
  ,target.company_amount_tax
  ,target.company_amount_sum
  ,target.pay_type_cd
  ,pay_type.pay_type_name
  ,pay_type.payment_flag
  ,target.pay_method_cd
  ,pay_method.pay_method_name
  ,target.payee_cd
  ,target.payee_name
  ,target.department_set_cd
  ,target.department_cd
  ,department.department_name
  ,target.project_cd
  ,project.project_name
  /*IF sqlId != "copy"*/
  ,target.relation_type
  ,target.relation_id
  ,target.relation_data
  /*END*/
  ,target.extension_a
  ,target.extension_b
  ,target.extension_c
  ,target.extension_d
  ,target.extension_e
  ,target.extension_f
  ,target.extension_g
  ,target.extension_h
  ,target.extension_i
  ,target.extension_j
  ,target.entry_ts
  ,target.entry_user_cd
  ,target.renew_cnt
  ,target.renew_ts
  ,target.renew_user_cd
  ,info.apply_base_date as imw_apply_base_date
  ,info.auth_company_cd as search_criteria_company_code
  ,/*localeId*/ as locale_id
from
  k30t_expense_detail target
  left outer join k20c_matter_info info
    on  info.system_matter_id = target.system_matter_id
  left outer join k30m_exp_type exp_type
    on  exp_type.company_cd          =  info.auth_company_cd
    and exp_type.exp_type_cd         =  target.exp_type_cd
    and exp_type.locale_id           =  /*localeId*/'ja'
    and exp_type.start_date          <= info.apply_base_date
    and exp_type.end_date            >  info.apply_base_date
    and exp_type.delete_flag         =  '0'
  left outer join k30m_account account
    on  account.company_cd           =  info.auth_company_cd
    and target.account_cd            =  account.account_cd
    and account.locale_id            =  /*localeId*/'ja'
    and account.start_date           <= info.apply_base_date
    and account.end_date             >  info.apply_base_date
    and account.delete_flag          =  '0'
  left outer join k30m_tax_type tax_type
    on  tax_type.company_cd          =  info.auth_company_cd
    and target.tax_type_cd           =  tax_type.tax_type_cd
    and tax_type.locale_id           =  /*localeId*/'ja'
    and tax_type.start_date          <= info.apply_base_date
    and tax_type.end_date            >  info.apply_base_date
    and tax_type.delete_flag         =  '0'
  left outer join imm_currency trans_currency
    on  trans_currency.company_cd    =  info.auth_company_cd
    and trans_currency.currency_cd   =  target.trans_currency_cd
    and trans_currency.locale_id     =  /*localeId*/'ja'
    and trans_currency.delete_flag   =  '0'
  left outer join imm_currency company_currency
    on  company_currency.company_cd  =  info.auth_company_cd
    and company_currency.currency_cd =  target.company_currency_cd
    and company_currency.locale_id   =  /*localeId*/'ja'
    and company_currency.delete_flag =  '0'
  left outer join k30m_pay_type pay_type
    on  pay_type.company_cd          =  info.auth_company_cd
    and pay_type.pay_type_cd         =  target.pay_type_cd
    and pay_type.locale_id           =  /*localeId*/'ja'
    and pay_type.start_date          <= info.apply_base_date
    and pay_type.end_date            >  info.apply_base_date
    and pay_type.delete_flag         =  '0'
  left outer join k30m_pay_method pay_method
    on  pay_method.company_cd        =  info.auth_company_cd
    and pay_method.pay_method_cd     =  target.pay_method_cd
    and pay_method.locale_id         =  /*localeId*/'ja'
    and pay_method.start_date        <= info.apply_base_date
    and pay_method.end_date          >  info.apply_base_date
    and pay_method.delete_flag       =  '0'
  left outer join imm_department department
    on  department.company_cd        =  info.auth_company_cd
    and department.department_set_cd =  target.department_set_cd
    and department.department_cd     =  target.department_cd
    and department.locale_id         =  /*localeId*/'ja'
    and department.start_date        <= info.apply_base_date
    and department.end_date          >  info.apply_base_date
    and department.delete_flag       =  '0'
  left outer join k30m_project project
    on  project.company_cd           =  info.auth_company_cd
    and project.project_cd           =  target.project_cd
    and project.locale_id            =  /*localeId*/'ja'
    and project.start_date           <= info.apply_base_date
    and project.end_date             >  info.apply_base_date
    and project.delete_flag          =  '0'
/*BEGIN*/
where
  /*IF systemMatterId != null*/
  target.system_matter_id =/*systemMatterId*/'systemMatterId'
  /*END*/
  /*IF userDataId != null*/
  and target.user_data_id = /*userDataId*/'userDataId'
  /*END*/
  /*IF gadgetClass != null*/
  and target.gadget_class = /*gadgetClass*/'gadgetClass'
  /*END*/
  /*IF gadgetVariation != null*/
  and target.gadget_variation = /*gadgetVariation*/'gadgetVariation'
  /*END*/
/*END*/
order by target.system_matter_id, target.row_number
検索条件
設定したLogicクラスに応じて、検索条件が設定されます。
  • jp.co.slcs.kaiden2.base.feature.logic.kaiden.generic.impl.GadgetLogic
    条件名 条件キー
    システム案件ID systemMatterId
    ユーザデータID userDataId
    ガジェットクラス gadgetClass
    ガジェットバリエーション gadgetVariation
    ロケールID localeId

コラム

申請基準日と検索基準会社を取得するために、下記の結合条件を必ず追加してください。
上記SQLから抜粋
from
  k30t_expense_detail target
  left outer join k20c_matter_info info
    on  info.system_matter_id = target.system_matter_id

4.2.5. 動作確認

これまでに設定した内容を動作確認します。

配置先
src
└─main
    ├─generated
    │  └─jp
    │      └─co
    │          └─slcs
    │              └─kaiden2
    │                  └─product_workflow
    │                      └─foundation
    │                          └─model
    │                              ├─entity
    │                              │   ├─K30tExpenseDetail.java
    │                              │   └─Ka30tExpenseDetail.java
    │                              └─service
    │                                   ├─K30tExpenseDetailService.java
    │                                   └─Ka30tExpenseDetailService.java
    │
    ├─resources
    │  ├─META-INF
    │  │  └─sql
    │  │      └─jp
    │  │          └─co
    │  │              └─slcs
    │  │                  └─kaiden2
    │  │                      └─generic
    │  │                          └─gadget
    │  │                              ├─journal
    │  │                              │   └─ExpenseDetail.sql
    │  │                              └─ExpenseDetail.sql
    │  └─kaiden_product_workflow.dicon
    │
    └─storage
        └─public
            └─kaiden
                └─generic
                    └─gadget
                        └─expenseDetail_v01.xml

コラム

配置先には記載していませんが、「テーブル定義」で定義したテーブルを作成してください。

4.2.5.1. GadgetBuilder定義インポート

ガジェットのインポートジョブを使用して、GadgetBuilder定義をインポートします。
  1. 「サイトマップ」→「テナント管理」→「ジョブネット設定」をクリックします。
  2. ジョブネット一覧(画面左部)の「ガジェット」をクリックします。
    ../../../_images/jobnet_01.png
  3. 「即時実行」をクリックします。
    ../../../_images/jobnet_02.png
  4. 確認ポップアップの「決定」をクリックします。
    ../../../_images/jobnet_03.png
  5. ジョブネットが実行されました。
    ../../../_images/jobnet_04.png

コラム

ガジェットインポートのジョブは、「%パブリックストレージ%/kaiden/generic/gadget」フォルダに配置された
GadgetBuilder定義をインポートします。
システムストレージに配置されたGadgetBuilder定義はインポート対象外です。

注意

「%パブリックストレージ%/kaiden/generic/gadget」フォルダに配置されたGadgetBuilder定義(xmlファイル)は
全てインポートされます。
上記のため、ファイル名が異なっていても「ガジェットクラス」「ガジェットバリエーション」が同一のGadgetBuilder定義
が存在している場合、インポートしたいGadgetBuilder定義を上書きしてしまい想定の反映がされない場合があります。

注意

ガジェットインポート後は、必ずインポートしたガジェットを使用しているコンテンツを申請書マスタから更新してください。
更新しない場合、申請書を申請する時にエラーが発生します。

4.2.5.2. 申請書マスタメンテナンス

続いて申請書マスタメンテナンス機能を使用して、コンテンツを作成します。
作成方法の詳細は『intra-mart Accel Kaiden! 経費旅費 / 管理者操作ガイド』を参照してください。

コラム

コンテンツ作成後は、フローを作成してください。

4.2.5.3. 申請画面

申請画面を表示し、動作確認を行います。
../../../_images/screen.png