<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
      layout:decorate="~{admin/layout/layout}" th:with="title='',active='home'">
<th:block layout:fragment="html_head">
	<script>

	
	
	function goSearch(pageNo){
		var form = document.searchVO;
		
		form.action = "/stat/casino";
		form.submit();
	}
	</script>
</th:block>
<th:block layout:fragment="content">

            <div class="container-fluid">
              <div class="page-name">
                  <h1>게임 회사별 수익 리스트</h1>
              </div>

              <div class="table">
                <div class="head"><h6 class="bold">게임 회사별 수익 리스트</h6><span class="text">매일 새벽 5시에 통계내용이 갱신 됩니다.</span></div>
                <div class="body">
                  <div class="tableserachwrap">
                    <div></div>
                    <div>
                     <form class="searchWrap-form" name="searchVO">
                      <ul class="tableserach">
                        <li>
                          <div class="input-group">
                            <div>
                              <label class="input-group-text">기간</label>
                            </div>
                        
                              <input class="br0" type="date" name="startDate" th:value="${searchVO.startDate}"/>
                            <input type="date" name="endDate" th:value="${searchVO.endDate}"/>
                          </div>
                        </li>
                        <li>
                             <a class="btn" href ="javascript:goSearch()">
                            <i class="fas fa-search fa-sm text-white-50"></i>
                          </a>
                        </li>
                      </ul>
                      </form>
                    </div>
                  </div>
                  <div class="table-responsive">
                    <table class="center">
                      <thead>
                        <tr>
                          <th>카지노 벤더</th>
                          <th>베팅 금액</th>
                          <th>당첨 금액</th>
                          <th>손익 금액 (총합)</th>
                          <th>베팅 건수</th>
                          <th>당첨 건수</th>
                        </tr>
                      </thead>
                      <tbody>
                      <th:block th:if="${list.size() >0}">
	                      <th:block th:each="list,seq : ${list}">
                        <tr>
                          <td th:text="${list.vendorName}">evolution</td>
                            <td th:text="|${#numbers.formatInteger(list.depositAmt, 0, 'COMMA')} C|">4,997,185,334 C</td>
	                          <td th:text="|${#numbers.formatInteger(list.creditAmt, 0, 'COMMA')} C|">4,806,942,674 C</td>
	                          <td th:text="|${#numbers.formatInteger(list.depositAmt - list.creditAmt, 0, 'COMMA')} C|">190,242,660 C</td>
	                          <td th:text="|${#numbers.formatInteger(list.betCnt, 0, 'COMMA')}건|">2,660 건</td>
	                          <td th:text="|${#numbers.formatInteger(list.betWinCnt, 0, 'COMMA')}건|">2,660 건</td>
                        </tr>
                           </th:block>
                          </th:block>
                          <th:block th:if="${list.size() ==0}">
                          	<tr><td colspan="6">데이터가 없습니다</td></tr>
                          </th:block>
                      </tbody>
                    </table>
                  </div>
                  <p class="bottomText">베팅, 당첨 건수는 2022-02-13 부터 통계작성이 시작되었습니다.</p>
                </div>
              </div>
            </div><!-- container-fluid -->

</th:block>
