<table>
  <colgroup>
    <col width="18px">
    <col width="calc(60% - 18px)">
    <col width="40%">
  </colgroup>
  <thead>
    <tr>
      <th></th>
      <th>수집시각</th>
      <th>교통정보 수집 건수</th>
    </tr>
  </thead>
  <tbody></tbody>
  <tfoot></tfoot>
</table>

<script>

  const endPoint = "getPeriodRcvNtsStatistics";

  function callBack(data) {
    if (data && data.length) {
      let total = 0;
      data.forEach((obj)=>{
        let value = Number(obj.cnt) || 0;
        total += value;
      });
      return `<tr>
                 <td></td>
                 <td>합계</td>
                 <td>${total.toLocaleString()}</td>
               </tr>`;
    }
  }

  function getTableRow(obj, idx) {
      let value = Number(obj.cnt) || 0;
      return `<tr onclick="rowClick(this, 'container-2 table tbody')" >
                  <td><input style="display: none" type="checkbox" id="check_${idx}" onchange="checkEvent(this, 'container-2 table tbody')"></td>
                  <td>${obj.regDate}</td>
                  <td>${value.toLocaleString()}</td>
              </tr>`;
  }

</script>