<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<div class="row">
  <div class="col-12">
    <table class="table table-hover text-center">
      <thead>
      <tr>
        <th rowspan="2">관서</th>
        <th rowspan="2">정원</th>
        <th rowspan="2">현원</th>
        <th rowspan="2">과부족</th>
        <th:block th:each="code:${jtList}">
          <th colspan="2" th:text="${code.itemValue}"></th>
        </th:block>
        <th rowspan="2">수정자</th>
        <th rowspan="2">수정일</th>
      </tr>
      <tr>
        <th:block th:each="code:${jtList}">
          <th>정원</th>
          <th>현원</th>
        </th:block>
      </tr>
      </thead>
      <tbody>
      <tr class="versionInfoTr" th:each="ps:${statusList}">
        <td>
          <th:block th:each="code:${session.commonCode.get('OG')}">
            <th:block th:if="${ps.ogCd eq code.itemCd}" th:text="${code.itemValue}"></th:block>
          </th:block>
        </td>
        <td th:text="${ps.sumMax}"></td>
        <td th:text="${ps.sumNow}"></td>
        <td th:text="${ps.sumNow-ps.sumMax}" th:classappend="${(ps.sumNow-ps.sumMax)>=0?'text-primary':'text-danger'}"></td>
        <td th:text="${ps.jt007Max}"></td>
        <td th:text="${ps.jt007Now}"></td>
        <td th:text="${ps.jt006Max}"></td>
        <td th:text="${ps.jt006Now}"></td>
        <td th:text="${ps.jt005Max}"></td>
        <td th:text="${ps.jt005Now}"></td>
        <td th:text="${ps.jt004Max}"></td>
        <td th:text="${ps.jt004Now}"></td>
        <td th:text="${ps.jt003Max}"></td>
        <td th:text="${ps.jt003Now}"></td>
        <td th:text="${ps.jt002Max}"></td>
        <td th:text="${ps.jt002Now}"></td>
        <td th:text="${ps.jt001Max}"></td>
        <td th:text="${ps.jt001Now}"></td>
        <td>
          <th:block th:each="code:${session.commonCode.get('OG')}">
            <th:block th:if="${ps.wrtOrgan eq code.itemCd}" th:text="${code.itemValue}"></th:block>
          </th:block>
          <th:block th:each="code:${session.commonCode.get('JT')}">
            <th:block th:if="${ps.wrtUserGrd eq code.itemCd}" th:text="${code.itemValue}"></th:block>
          </th:block>
          <th:block th:text="${ps.wrtUserNm}"></th:block>
        </td>
        <td th:text="${#temporals.format(ps.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
      </tr>
      </tbody>
    </table>
  </div>
</div>
</html>