chart.jsp 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
  2. <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
  3. <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
  4. <%@ page language="java" contentType="text/html; charset=UTF-8"
  5. pageEncoding="UTF-8"%>
  6. <jsp:include page="${data._INCLUDE}/header.jsp"></jsp:include>
  7. <script>
  8. var startDate = "<c:out value='${startDate}'/>";
  9. var endDate = "<c:out value='${endDate}'/>";
  10. $(function() {
  11. $("input[name=\"startDate\"]").daterangepicker({
  12. singleDatePicker : true,
  13. showDropdowns : true,
  14. // startDate : "<c:out value='${startDate}'/>",
  15. locale : {
  16. //format : "M/DD hh:mm A"
  17. format : "YYYY-MM-DD"
  18. },
  19. maxDate : new Date()
  20. });
  21. $("input[name=\"endDate\"]").daterangepicker({
  22. singleDatePicker : true,
  23. showDropdowns : true,
  24. // startDate : "<c:out value='${endDate}'/>",
  25. locale : {
  26. //format : "M/DD hh:mm A"
  27. format : "YYYY-MM-DD"
  28. },
  29. maxDate : new Date()
  30. });
  31. $("input[name=\"startDate\"]").val( startDate );
  32. $("input[name=\"endDate\"]").val( endDate );
  33. });
  34. function getExcel(){
  35. if( $.trim( $( "#downMemo" ).val() ) == "" ){
  36. alertBox({ txt : "사유를 입력해주세요" });
  37. $( ".modal-header>.modal-title h3" ).remove();
  38. return false;
  39. }
  40. var newForm = $( "#searchForm" ).clone();
  41. newForm.attr( "id", "excelForm" );
  42. newForm.attr( "method", "post" );
  43. newForm.attr( "action", "./excel" );
  44. newForm.attr( "target", "_blank" );
  45. newForm.hide();
  46. $( document.body ).append( newForm );
  47. newForm.submit();
  48. $( "button.close" ).click();
  49. $( "#downMemo" ).val( "" );
  50. $( "#excelForm" ).remove();
  51. }
  52. </script>
  53. </head>
  54. <body>
  55. <div class="modal fade" id="excelDownMemo" tabindex="-1" role="dialog" aria-hidden="true" data-memoid="">
  56. <div class="modal-dialog" role="document">
  57. <div class="modal-content">
  58. <div class="modal-header">
  59. <h5 class="modal-title">생활치료센터 리스트 Excel 다운로드</h5>
  60. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
  61. aria-hidden="true">&times;</span> </button>
  62. </div>
  63. <div class="modal-body m-3">
  64. <table class="table mobile-table">
  65. <colgroup>
  66. <col style="width: 20%">
  67. <col style="width: 80%">
  68. </colgroup>
  69. <tr>
  70. <th><span class="fix">*</span>다운로드 사유</th>
  71. <td>
  72. <div class="form-row">
  73. <textarea id="downMemo" name="downMemo" class="form-control" cols="" rows="6" placeholder="" maxlength="200"></textarea>
  74. </div>
  75. </td>
  76. </tr>
  77. </table>
  78. </div>
  79. <div class="addMemoTools modal-footer">
  80. <button type="button" class="btn btn-outline-primary" data-dismiss="modal">취소</button>
  81. <button type="button" class="btn btn-primary" onclick="getExcel();">제출 후 다운로드</button>
  82. </div>
  83. </div>
  84. </div>
  85. </div>
  86. <div class="wrapper">
  87. <jsp:include page="${data._INCLUDE}/sidebar.jsp"></jsp:include>
  88. <div class="main">
  89. <jsp:include page="${data._INCLUDE}/top.jsp"></jsp:include>
  90. <main class="content">
  91. <div class="container-fluid p-0">
  92. <!-- 환지관리 START -->
  93. <div class="row">
  94. <div class="col-12 col-lg-6">
  95. <h1 class="h3 mb-3">생활치료센터 오픈API 통계</h1>
  96. </div>
  97. <div class="col-12 col-lg-6 text-right">
  98. <nav aria-label="breadcrumb">
  99. <ol class="breadcrumb">
  100. <li class="breadcrumb-item"><a href="javscript:;">Home</a></li>
  101. <li class="breadcrumb-item active">생활치료센터 오픈API 통계</li>
  102. </ol>
  103. </nav>
  104. </div>
  105. </div>
  106. <div class="row">
  107. <div class="col-12">
  108. <div class="card">
  109. <form action="?" method="get" id="searchForm">
  110. <div class="card-body">
  111. <table class="table mobile-table">
  112. <colgroup>
  113. <col style="width:10%">
  114. <col style="width:40%">
  115. <col style="width:10%">
  116. <col style="width:40%">
  117. </colgroup>
  118. <tr>
  119. <th>지역</th>
  120. <td>
  121. <select class="custom-select form-control" name="locationCode">
  122. <option value="">전체</option>
  123. <c:forEach var="i" items="${locationList}">
  124. <option value="${i.locationCode}" <c:if test="${i.locationCode eq locationCode}"> selected="selected"</c:if>><c:out value="${i.locationName}"/></option>
  125. </c:forEach>
  126. </select>
  127. </td>
  128. <th>생활치료센터명</th>
  129. <td>
  130. <input type="text" class="form-control" name="centerName" placeholder="생활치료센터명" value="<c:out value="${centerName}" />">
  131. </td>
  132. </tr>
  133. <tr>
  134. <th>등록일</th>
  135. <td>
  136. <div class="row">
  137. <div class="col-lg-5 col-sm-5">
  138. <div class="form-group calendar-bar mb-xl-0">
  139. <input class="form-control" type="text" name="startDate" placeholder="검색 시작일자" autocomplete="off">
  140. <i class="align-middle mr-2 fas fa-fw fa-calendar-alt"></i>
  141. </div>
  142. </div>
  143. <div class="col-lg-2 col-sm-2 text-center">
  144. ~
  145. </div>
  146. <div class="col-lg-5 col-sm-5">
  147. <div class="form-group calendar-bar mb-xl-0">
  148. <input class="form-control" type="text" name="endDate" placeholder="검색 종료일자" autocomplete="off">
  149. <i class="align-middle mr-2 fas fa-fw fa-calendar-alt"></i>
  150. </div>
  151. </div>
  152. </div>
  153. </td>
  154. <td colspan="2">
  155. <button class="btn btn-primary">검색</button>
  156. </td>
  157. </tr>
  158. </table>
  159. </div>
  160. </form>
  161. </div>
  162. </div>
  163. </div>
  164. <div class="row">
  165. <div class="col-12">
  166. <div class="card">
  167. <div class="card-body">
  168. <div class="row mb-3">
  169. <div class="col-6">
  170. 전체 :
  171. <fmt:formatNumber value="${total}" pattern="#,###" />
  172. </div>
  173. <div class="col-6 text-right">
  174. <button class="btn btn-success" data-toggle="modal" data-target="#excelDownMemo">Excel 다운로드</button>
  175. <c:if test="${role._CREATE eq 'Y'}">
  176. <button class="btn btn-primary" onclick="location.href='./new';">생활치료센터 신규 등록</button>
  177. </c:if>
  178. </div>
  179. </div>
  180. <div class="table-responsive">
  181. <table class="table table-striped text-center">
  182. <colgroup>
  183. <col style=" width: 5%; ">
  184. <col style=" width: 14%; ">
  185. <col style=" width: 6%; ">
  186. <col style=" width: 12%; ">
  187. <col style=" width: 8%; ">
  188. <col style=" width: 8%; ">
  189. </colgroup>
  190. <thead>
  191. <tr>
  192. <th rowspan="2">번호</th>
  193. <th rowspan="2">생활치료센터</th>
  194. <th rowspan="2">지역</th>
  195. <th rowspan="2">협력병원</th>
  196. <th rowspan="2">API 호출 횟수</th>
  197. <th rowspan="2">API 호출 건수</th>
  198. </tr>
  199. </thead>
  200. <tbody>
  201. <c:choose>
  202. <c:when test="${total > 0}">
  203. <c:forEach var="l" items="${item}" varStatus="lStatus">
  204. <c:set var="viewLink" value="./info?centerCode=${l.centerCode}" />
  205. <c:set var="pageNum" value="${ ( total - lStatus.index ) - ( (page - 1) * pageSize ) }" />
  206. <tr>
  207. <td><fmt:formatNumber value="${pageNum}" pattern="#,###" /></td>
  208. <td>
  209. <c:out value="${l.centerName}" />
  210. </td>
  211. <td><c:out value="${l.locationName}" /></td>
  212. <td><c:out value="${l.cooperativeName}" /></td>
  213. <td><c:out value="${l.apiCount}"/></td>
  214. <td><c:out value="${l.numberOfCase}"/></td>
  215. </tr>
  216. </c:forEach>
  217. </c:when>
  218. <c:otherwise>
  219. <tr>
  220. <td colspan="13">오픈API 통계 정보가 없습니다.</td>
  221. </tr>
  222. </c:otherwise>
  223. </c:choose>
  224. </tbody>
  225. </table>
  226. </div>
  227. <div class="row mt-5">
  228. <div class="col-12 col-lg-6 mb-2">
  229. </div>
  230. <div class="col-12 col-lg-6 mb-2">
  231. <jsp:include page="${data._INCLUDE}/paging.jsp" flush="true">
  232. <jsp:param name="firstPageNo" value="${paging.firstPageNo}" />
  233. <jsp:param name="prevPageNo" value="${paging.prevPageNo}" />
  234. <jsp:param name="startPageNo" value="${paging.startPageNo}" />
  235. <jsp:param name="pageNo" value="${paging.pageNo}" />
  236. <jsp:param name="endPageNo" value="${paging.endPageNo}" />
  237. <jsp:param name="nextPageNo" value="${paging.nextPageNo}" />
  238. <jsp:param name="finalPageNo" value="${paging.finalPageNo}" />
  239. <jsp:param name="preFix" value="${paging.preFix}" />
  240. <jsp:param name="url" value="${paging.url}" />
  241. <jsp:param name="total" value="${paging.totalCount}" />
  242. </jsp:include>
  243. </div>
  244. </div>
  245. </div>
  246. </div>
  247. </div>
  248. </div>
  249. <!-- 환자관리 END -->
  250. </div>
  251. </main>
  252. <jsp:include page="${data._INCLUDE}/footer.jsp"></jsp:include>
  253. </div>
  254. </div>
  255. </body>
  256. </html>