intra-mart Accel Kaiden! プログラミングガイド 第21版 2024-04-01

4.2.2.4.4. 実装

勤務表集計欄のJSPを作成します。
標準機能では、「/WEB-INF/views/kaiden/v2/product_labormgr/gadget/workReportSummary/workReportSummaryV01.jsp」を使用しています。
上記を必要に応じて変更してください。

4.2.2.4.4.1. JSP作成

JSPファイル名を「workReportSummaryC01.jsp」とします。
「/WEB-INF/views/kaiden/v2/tutorial2/gadget/workReportSummary」に配置します。

コラム

標準機能で使用している「workReportSummaryV01.jsp」では、締め期間集計値を取得して、フィールド名と集計キーが一致する場合、取得した値を設定します。
そのため、JSPに表示したい締め期間集計値のフィールドを追加すると集計欄に値が設定されます。
次は、JSPの抜粋です。
<table class="imui-table" style="margin-bottom:0px;width:auto;">
    <tr>
      <th rowspan="2"><label>${surfaceTimeCountWork}</label></th>
      <th rowspan="2"><label>${surfaceTimeCountDeduction}</label></th>
      <th rowspan="2"><label>${surfaceTimeCountDeductionExemption}</label></th>
      <%-- 遅刻早退時間のラベルの表示を追加 --%>
      <th rowspan="2"><label>${surfaceTimeCountLateEarly}</label></th>
      <th colspan="6"><label>${surfaceTimeCountDetailTitle}</label></th>
      <th colspan="3"><label>${surfaceTimeTtlCountOutLegalTitle}</label></th>
    </tr>
    <tr>
      <th><label>${surfaceTimeCountOverInLegal}</label></th>
      <th><label>${surfaceTimeCountOverOutLegal}</label></th>
      <th><label>${surfaceTimeCountNight}</label></th>
      <th><label>${surfaceTimeCountLegalHoliday}</label></th>
      <th><label>${surfaceTimeCountHoliday}</label></th>
      <th><label>${surfaceTimeCountOutLegalOverWkOnHday}</label></th>
      <th><label>${surfaceTimeTtlCountOutLegalMonth3}</label></th>
      <th><label>${surfaceTimeTtlCountOutLegalMonth6}</label></th>
      <th><label>${surfaceTimeTtlCountOutLegalMonth12}</label></th>
    </tr>
    <tr>
      <td class="align-R"><k:surface surfaceKey="${surfaceSummaryValueNone}" class="kaiden-labor-summary-value-default-hyphen" formated="view" name="PA_work_M" /></td>
      <td class="align-R"><k:surface surfaceKey="${surfaceSummaryValueNone}" class="kaiden-labor-summary-value-default-hyphen" formated="view" name="PL_10_M" /></td>
      <td class="align-R"><k:surface surfaceKey="${surfaceSummaryValueNone}" class="kaiden-labor-summary-value-default-hyphen" formated="view" name="PL_20_M" /></td>
      <%-- 遅刻早退時間の値の表示を追加 --%>
      <td class="align-R"><k:surface surfaceKey="${surfaceSummaryValueNone}" class="kaiden-labor-summary-value-default-hyphen" formated="view" name="PA_late_early_time_M" /></td>
      <td class="align-R"><k:surface surfaceKey="${surfaceSummaryValueNone}" class="kaiden-labor-summary-value-default-hyphen" formated="view" name="PA_in_legal_over_work_M" /></td>
      <td class="align-R"><k:surface surfaceKey="${surfaceSummaryValueNone}" class="kaiden-labor-summary-value-default-hyphen" formated="view" name="PA_out_legal_over_work_M" /></td>
      <td class="align-R"><k:surface surfaceKey="${surfaceSummaryValueNone}" class="kaiden-labor-summary-value-default-hyphen" formated="view" name="PA_night_work_M" /></td>
      <td class="align-R"><k:surface surfaceKey="${surfaceSummaryValueNone}" class="kaiden-labor-summary-value-default-hyphen" formated="view" name="PA_legal_holiday_work_M" /></td>
      <td class="align-R"><k:surface surfaceKey="${surfaceSummaryValueNone}" class="kaiden-labor-summary-value-default-hyphen" formated="view" name="PA_holiday_work_M" /></td>
      <td class="align-R"><k:surface surfaceKey="${surfaceSummaryValueNone}" class="kaiden-labor-summary-value-default-hyphen" formated="view" name="PA_out_legal_over_wk_on_hday_M" /></td>
      <td class="align-R"><k:surface surfaceKey="${surfaceSummaryValueNone}" class="kaiden-labor-summary-value-default-hyphen" formated="view" name="ttl36Month3_M" /></td>
      <td class="align-R"><k:surface surfaceKey="${surfaceSummaryValueNone}" class="kaiden-labor-summary-value-default-hyphen" formated="view" name="ttl36Month6_M" /></td>
      <td class="align-R"><k:surface surfaceKey="${surfaceSummaryValueNone}" class="kaiden-labor-summary-value-default-hyphen" formated="view" name="ttl36Month12_M" /></td>
    </tr>
  </table>