Explorar o código

협력병원 관리 추가

huiwon.seo %!s(int64=4) %!d(string=hai) anos
pai
achega
3aac51406d

+ 53 - 0
src/main/java/com/lemon/lifecenter/controller/CooperationController.java

@@ -0,0 +1,53 @@
+package com.lemon.lifecenter.controller;
+
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.servlet.ModelAndView;
+
+import com.lemon.lifecenter.common.LifeCenterController;
+
+@Controller
+@RequestMapping("/cooperation")
+public class CooperationController extends LifeCenterController {
+    
+    @RequestMapping( "/list" )
+    public ModelAndView list() {
+        ModelAndView mv = setMV( "cooperation/list" );
+        
+        return mv;
+    }
+    
+    @RequestMapping( "/new" )
+    public ModelAndView newCooperation() {
+        ModelAndView mv = setMV( "cooperation/new" );
+        
+        return mv;
+    }
+    
+    @RequestMapping( "/new/insert" )
+    public String insertCooperation() {
+        
+        return "redirect:/cooperation/list";
+    }
+    
+    @RequestMapping( "/info" )
+    public ModelAndView info() {
+        ModelAndView mv = setMV( "cooperation/info" );
+        
+        return mv;
+    }
+    
+    
+    @RequestMapping( "/edit" )
+    public ModelAndView edit() {
+        ModelAndView mv = setMV( "cooperation/edit" );
+        
+        return mv;
+    }
+    
+    @RequestMapping( "/edit/update" )
+    public String updateCooperation() {
+        
+        return "redirect:/cooperation/edit";
+    }
+}

+ 90 - 0
src/main/webapp/WEB-INF/jsp/cooperation/edit.jsp

@@ -0,0 +1,90 @@
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+    pageEncoding="UTF-8"%>
+<jsp:include page="${data._INCLUDE}/header.jsp"></jsp:include>
+<script>
+
+
+</script>
+</head>
+<body>
+    <div class="wrapper">
+        <jsp:include page="${data._INCLUDE}/sidebar.jsp"></jsp:include>
+        
+        <div class="main">
+            <jsp:include page="${data._INCLUDE}/top.jsp"></jsp:include>
+
+            <main class="content">
+                <div class="container-fluid p-0">
+                    <div class="row">
+                        <div class="col-12 col-lg-6">
+                            <h1 class="h3 mb-3">협력병원 정보 수정</h1>
+                        </div>
+                        <div class="col-12 col-lg-6  text-right">
+                            <nav aria-label="breadcrumb">
+                                <ol class="breadcrumb">
+                                    <li class="breadcrumb-item"><a href="javscript:;">Home</a></li>
+                                    <li class="breadcrumb-item">협력병원 관리</li>
+                                    <li class="breadcrumb-item active">협력병원 정보 수정</li>
+                                </ol>
+                            </nav>
+                        </div>
+                    </div>
+                    <div class="row">
+                        <div class="col-12">
+                            <div class="card">
+                                <form action="?" method="get">
+                                    <div class="card-body">
+                                        <table class="table mobile-table">
+                                            <colgroup>
+                                                <col style="width:10%">
+                                                <col style="width:40%">
+                                                <col style="width:10%">
+                                                <col style="width:40%">
+                                            </colgroup>
+                                            <tr>
+                                                <th>협력병원명</th>
+                                                <td>
+                                                    <input type="text" name="" class="form-control" placeholder="협력병원명" required>
+                                                </td>
+                                            </tr>
+                                            <tr>
+                                                <th>요양기관 기호</th>
+                                                <td>
+                                                    <input type="text" name="" class="form-control" placeholder="요양기관 기호" required>
+                                                </td>
+                                            </tr>
+                                            <tr>
+                                                <th>사용여부</th>
+                                                <td>
+                                                    <select class="custom-select" name="">
+                                                        <option value="Y">활성</option>
+                                                        <option value="N">비활성</option>
+                                                    </select>
+                                                </td>
+                                            </tr>
+                                        </table>
+                                        
+                                        <div class="row mt-3">
+                                            <div class="col-12">
+                                                <div class="text-right">
+                                                    <button type="button" class="btn btn-outline-primary w100" onclick="history.back();">취소</button>
+                                                    <button type="submit" class="btn btn-primary w100">등록</button>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </form>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </main>
+
+            <jsp:include page="${data._INCLUDE}/footer.jsp"></jsp:include>
+        </div>
+    </div>
+</body>
+</html>

+ 78 - 0
src/main/webapp/WEB-INF/jsp/cooperation/info.jsp

@@ -0,0 +1,78 @@
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+    pageEncoding="UTF-8"%>
+<jsp:include page="${data._INCLUDE}/header.jsp"></jsp:include>
+<script>
+</script>
+</head>
+<body>
+    <div class="wrapper">
+        <jsp:include page="${data._INCLUDE}/sidebar.jsp"></jsp:include>
+        
+        <div class="main">
+            <jsp:include page="${data._INCLUDE}/top.jsp"></jsp:include>
+
+            <main class="content">
+                <div class="container-fluid p-0">
+                    <div class="row">
+                        <div class="col-12 col-lg-6">
+                            <h1 class="h3 mb-3">협력병원 정보</h1>
+                        </div>
+                        <div class="col-12 col-lg-6  text-right">
+                            <nav aria-label="breadcrumb">
+                                <ol class="breadcrumb">
+                                    <li class="breadcrumb-item"><a href="javscript:;">Home</a></li>
+                                    <li class="breadcrumb-item">협력병원 관리</li>
+                                    <li class="breadcrumb-item active">협력병원 정보</li>
+                                </ol>
+                            </nav>
+                        </div>
+                    </div>
+                    <div class="row">
+                        <div class="col-12">
+                            <div class="card">
+                                <form action="?" method="get">
+                                    <div class="card-body">
+                                        <table class="table mobile-table">
+                                            <colgroup>
+                                                <col style="width:10%">
+                                                <col style="width:40%">
+                                                <col style="width:10%">
+                                                <col style="width:40%">
+                                            </colgroup>
+                                            <tr>
+                                                <th>협력병원명</th>
+                                                <td></td>
+                                            </tr>
+                                            <tr>
+                                                <th>요양기관 기호</th>
+                                                <td></td>
+                                            </tr>
+                                            <tr>
+                                                <th>사용여부</th>
+                                                <td></td>
+                                            </tr>
+                                        </table>
+                                        
+                                        <div class="row mt-3">
+                                            <div class="col-12">
+                                                <div class="text-right">
+                                                    <button type="button" class="btn btn-outline-primary w100" onclick="location.href='./list';">확인</button>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </form>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </main>
+
+            <jsp:include page="${data._INCLUDE}/footer.jsp"></jsp:include>
+        </div>
+    </div>
+</body>
+</html>

+ 195 - 0
src/main/webapp/WEB-INF/jsp/cooperation/list.jsp

@@ -0,0 +1,195 @@
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+    pageEncoding="UTF-8"%>
+<jsp:include page="${data._INCLUDE}/header.jsp"></jsp:include>
+<script>
+var startDate = "<c:out value='${startDate}'/>";
+var endDate   = "<c:out value='${endDate}'/>";
+
+    $(function() {
+        $("input[name=\"startDate\"]").daterangepicker({
+            singleDatePicker : true,
+            showDropdowns : true,
+//             startDate : "<c:out value='${startDate}'/>",
+            locale : {
+                //format : "M/DD hh:mm A"
+                format : "YYYY-MM-DD"
+            }
+        });
+        $("input[name=\"endDate\"]").daterangepicker({
+            singleDatePicker : true,
+            showDropdowns : true,
+//             startDate : "<c:out value='${endDate}'/>",
+            locale : {
+                //format : "M/DD hh:mm A"
+                format : "YYYY-MM-DD"
+            }
+        });
+        
+        $("input[name=\"startDate\"]").val( startDate );
+        $("input[name=\"endDate\"]").val( endDate );
+    });
+</script>
+</head>
+<body>
+    <div class="wrapper">
+        <jsp:include page="${data._INCLUDE}/sidebar.jsp"></jsp:include>
+        
+        <div class="main">
+            <jsp:include page="${data._INCLUDE}/top.jsp"></jsp:include>
+
+            <main class="content">
+                <div class="container-fluid p-0">
+                    <!-- 환지관리 START -->
+                    <div class="row">
+                        <div class="col-12 col-lg-6">
+                            <h1 class="h3 mb-3">협력병원 관리</h1>
+                        </div>
+                        <div class="col-12 col-lg-6  text-right">
+                            <nav aria-label="breadcrumb">
+                                <ol class="breadcrumb">
+                                    <li class="breadcrumb-item"><a href="javscript:;">Home</a></li>
+                                    <li class="breadcrumb-item">협력병원 관리</li>
+                                    <li class="breadcrumb-item active">협력병원 리스트</li>
+                                </ol>
+                            </nav>
+                        </div>
+                    </div>
+                    <div class="row">
+                        <div class="col-12">
+                            <div class="card">
+                                <form action="?" method="get">
+                                    <div class="card-body">
+                                        <table class="table mobile-table">
+                                            <colgroup>
+                                                <col style="width:10%">
+                                                <col style="width:40%">
+                                                <col style="width:10%">
+                                                <col style="width:40%">
+                                            </colgroup>
+                                            <tr>
+                                                <th>조건</th>
+                                                <td>
+                                                    <div class="form-row">
+                                                        <div class="col-6">
+                                                            <select class="custom-select  form-control" id="selectState" name="selectState">
+                                                                <option value="">전체</option>
+                                                                <option value="sName" <c:if test="${selectState eq 'sName'}"> selected="selected"</c:if>>요양기관기호</option>
+                                                                <option value="sId" <c:if test="${selectState eq 'sId'}"> selected="selected"</c:if>>협력병원명</option>
+<%--                                                                 <option value="sCenterName" <c:if test="${selectState eq 'sCenterName'}"> selected="selected"</c:if>>치료센터명</option> --%>
+                                                            </select>
+                                                        </div>
+                                                        <div class="col-6">
+                                                            <input type="text" class="form-control" name="sData" value="${sData}" placeholder="">
+                                                        </div>
+                                                    </div>
+                                                </td>
+                                                <th>사용여부</th>
+                                                <td>
+                                                    <div class="form-row">
+                                                        <div class="col-6">
+                                                            <select class="custom-select  form-control" id="useYn" name="useYn">
+                                                                <option value="">전체</option>
+                                                                <option value="Y" <c:if test="${useYn eq 'Y'}"> selected="selected"</c:if>>활성</option>
+                                                                <option value="N" <c:if test="${useYn eq 'N'}"> selected="selected"</c:if>>비활성</option>
+                                                            </select>
+                                                        </div>
+                                                        <div class="col-6">
+                                                            <button class="btn btn-primary">검색</button>
+                                                        </div>
+                                                    </div>
+                                                </td>
+                                            </tr>
+                                        </table>
+                                    </div>
+                                </form>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="row">
+                        <div class="col-12">
+                            <div class="card">
+                                <div class="card-body">
+                                    <div class="row mb-3">
+                                        <div class="col-6">전체 : 
+                                            <fmt:formatNumber value="${total}" pattern="#,###" />
+                                        </div>
+                                        <div class="col-6 text-right">
+                                            <button class="btn btn-primary" onclick="location.href='./new';">협력병원 신규 등록</button>
+                                        </div>
+                                    </div>
+                                    <div class="table-responsive">
+                                        <table class="table table-striped text-center">
+                                            <colgroup>
+                                                <col style=" width: 10%; ">
+                                                <col style=" width: 40%; ">
+                                                <col style=" width: 30%; ">
+                                                <col style=" width: 20%; ">
+                                            </colgroup>
+                                            <thead>
+                                                <tr>
+                                                    <th>번호</th>
+                                                    <th>협력병원명</th>
+                                                    <th>요양기관기호</th>
+                                                    <th>사용여부</th>
+                                                </tr>
+                                            </thead>
+                                            <tbody>
+                                                <c:choose>
+                                                    <c:when test="${total > 0}">
+                                                        <c:forEach var="l" items="${item}" varStatus="lStatus">
+                                                            <c:set var="viewLink" value="./info?centerCode=${l.centerCode}" />
+                                                            <c:set var="pageNum" value="${ ( total - lStatus.index ) - ( (page - 1) * pageSize ) }" />
+                                                            
+                                                            <tr>
+                                                                <td><fmt:formatNumber value="${pageNum}" pattern="#,###" /></td>
+                                                                <td>
+                                                                    <a href="${viewLink}"><c:out value="${l.centerName}" /></a>
+                                                                </td>
+                                                                <td><c:out value="${l.locationName}" /></td>
+                                                                <td><c:out value="${l.staffName}(${l.staffId})" /></td>
+                                                            </tr>
+                                                        </c:forEach>
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        <tr>
+                                                            <td colspan="4">등록된 협력병원이 없습니다.</td>
+                                                        </tr>
+                                                    </c:otherwise>
+                                                </c:choose>
+                                            </tbody>
+                                        </table>
+                                    </div>
+                                    <div class="row mt-5">
+                                        <div class="col-12 col-lg-6 mb-2">
+                                        </div>
+                                        <div class="col-12 col-lg-6 mb-2">
+<%--                                             <jsp:include page="${data._INCLUDE}/paging.jsp" flush="true"> --%>
+<%--                                                 <jsp:param name="firstPageNo" value="${paging.firstPageNo}" /> --%>
+<%--                                                 <jsp:param name="prevPageNo"  value="${paging.prevPageNo}" /> --%>
+<%--                                                 <jsp:param name="startPageNo" value="${paging.startPageNo}" /> --%>
+<%--                                                 <jsp:param name="pageNo"      value="${paging.pageNo}" /> --%>
+<%--                                                 <jsp:param name="endPageNo"   value="${paging.endPageNo}" /> --%>
+<%--                                                 <jsp:param name="nextPageNo"  value="${paging.nextPageNo}" /> --%>
+<%--                                                 <jsp:param name="finalPageNo" value="${paging.finalPageNo}" /> --%>
+<%--                                                 <jsp:param name="preFix"      value="${paging.preFix}" /> --%>
+<%--                                                 <jsp:param name="url"         value="${paging.url}" /> --%>
+<%--                                                 <jsp:param name="total"       value="${paging.totalCount}" /> --%>
+<%--                                             </jsp:include> --%>
+                                        </div>
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                    <!-- 환자관리 END -->
+                </div>
+            </main>
+
+            <jsp:include page="${data._INCLUDE}/footer.jsp"></jsp:include>
+        </div>
+    </div>
+</body>
+</html>

+ 90 - 0
src/main/webapp/WEB-INF/jsp/cooperation/new.jsp

@@ -0,0 +1,90 @@
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+    pageEncoding="UTF-8"%>
+<jsp:include page="${data._INCLUDE}/header.jsp"></jsp:include>
+<script>
+
+
+</script>
+</head>
+<body>
+    <div class="wrapper">
+        <jsp:include page="${data._INCLUDE}/sidebar.jsp"></jsp:include>
+        
+        <div class="main">
+            <jsp:include page="${data._INCLUDE}/top.jsp"></jsp:include>
+
+            <main class="content">
+                <div class="container-fluid p-0">
+                    <div class="row">
+                        <div class="col-12 col-lg-6">
+                            <h1 class="h3 mb-3">협력병원 신규 등록</h1>
+                        </div>
+                        <div class="col-12 col-lg-6  text-right">
+                            <nav aria-label="breadcrumb">
+                                <ol class="breadcrumb">
+                                    <li class="breadcrumb-item"><a href="javscript:;">Home</a></li>
+                                    <li class="breadcrumb-item">협력병원 관리</li>
+                                    <li class="breadcrumb-item active">협력병원 신규 등록</li>
+                                </ol>
+                            </nav>
+                        </div>
+                    </div>
+                    <div class="row">
+                        <div class="col-12">
+                            <div class="card">
+                                <form action="?" method="get">
+                                    <div class="card-body">
+                                        <table class="table mobile-table">
+                                            <colgroup>
+                                                <col style="width:10%">
+                                                <col style="width:40%">
+                                                <col style="width:10%">
+                                                <col style="width:40%">
+                                            </colgroup>
+                                            <tr>
+                                                <th>협력병원명</th>
+                                                <td>
+                                                    <input type="text" name="" class="form-control" placeholder="협력병원명" required>
+                                                </td>
+                                            </tr>
+                                            <tr>
+                                                <th>요양기관 기호</th>
+                                                <td>
+                                                    <input type="text" name="" class="form-control" placeholder="요양기관 기호" required>
+                                                </td>
+                                            </tr>
+                                            <tr>
+                                                <th>사용여부</th>
+                                                <td>
+                                                    <select class="custom-select" name="">
+                                                        <option value="Y">활성</option>
+                                                        <option value="N">비활성</option>
+                                                    </select>
+                                                </td>
+                                            </tr>
+                                        </table>
+                                        
+                                        <div class="row mt-3">
+                                            <div class="col-12">
+                                                <div class="text-right">
+                                                    <button type="button" class="btn btn-outline-primary w100" onclick="history.back();">취소</button>
+                                                    <button type="submit" class="btn btn-primary w100">등록</button>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </form>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </main>
+
+            <jsp:include page="${data._INCLUDE}/footer.jsp"></jsp:include>
+        </div>
+    </div>
+</body>
+</html>

+ 4 - 0
src/main/webapp/WEB-INF/jsp/include/sidebar.jsp

@@ -32,6 +32,10 @@
                         <li class="sidebar-item <c:if test='${data._MENUPATH eq "center"}'>active</c:if>">
                             <a class="sidebar-link" href="/center/list">생활치료센터 관리</a>
                         </li>
+                        
+                        <li class="sidebar-item <c:if test='${data._MENUPATH eq "cooperation"}'>active</c:if>">
+                            <a class="sidebar-link" href="/cooperation/list">협력병원 관리</a>
+                        </li>
                     </c:if>
                 </ul>
             </li>