Kaynağa Gözat

login 작업중

huiwon.seo 4 yıl önce
ebeveyn
işleme
cf7d205ecc

+ 7 - 0
src/main/java/com/lemon/lifecenter/dto/PatientDTO.java

@@ -20,10 +20,17 @@ public class PatientDTO {
     private String pw;
     private String patientPhone;
     private String guardianPhone;
+    private int patientIdx;
     private int limit;
     private int limitMax;
     
     
+    public int getPatientIdx() {
+        return patientIdx;
+    }
+    public void setPatientIdx(int patientIdx) {
+        this.patientIdx = patientIdx;
+    }
     public String getPatientPhone() {
         return patientPhone;
     }

+ 29 - 0
src/main/java/com/lemon/lifecenter/test/TestContorller.java

@@ -43,6 +43,35 @@ public class TestContorller extends LifeCenterController {
         return mv;
     }
     
+    @RequestMapping("/insertSymptom/{start}/{end}")
+    public ModelAndView insertSymptom(@PathVariable("start") int start, @PathVariable("end") int end) {
+
+        ModelAndView mv = setMV("test");
+
+        PatientDTO dto = new PatientDTO();
+
+        for (int i = start; i < end; i++) {
+            dto.setPatientIdx( i );
+            s.insertPatientSymptom(dto);
+        }
+
+        return mv;
+    }
+    @RequestMapping("/insertDisease/{start}/{end}")
+    public ModelAndView insertdisease(@PathVariable("start") int start, @PathVariable("end") int end) {
+
+        ModelAndView mv = setMV("test");
+
+        PatientDTO dto = new PatientDTO();
+
+        for (int i = start; i < end; i++) {
+            dto.setPatientIdx( i );
+            s.insertPatientDisease(dto);
+        }
+
+        return mv;
+    }
+    
 
 
 

+ 2 - 0
src/main/java/com/lemon/lifecenter/test/TestMapper.java

@@ -9,4 +9,6 @@ import com.lemon.lifecenter.dto.PatientDTO;
 @Mapper
 public interface TestMapper {
     public void insertPatientCare( PatientDTO dto );
+    public void insertPatientSymptom( PatientDTO dto );
+    public void insertPatientDisease( PatientDTO dto );
 }

+ 9 - 0
src/main/java/com/lemon/lifecenter/test/TestService.java

@@ -13,5 +13,14 @@ public class TestService {
     public void insertPatientCare(PatientDTO dto) {
         mapper.insertPatientCare(dto);
     }
+    
+    public void insertPatientSymptom( PatientDTO dto ) {
+        mapper.insertPatientSymptom(dto);
+    }
+    
+    public void insertPatientDisease( PatientDTO dto ) {
+        mapper.insertPatientDisease(dto);
+    }
+    
 
 }

Dosya farkı çok büyük olduğundan ihmal edildi
+ 34 - 1
src/main/resources/mybatis/mapper/test/test.xml


+ 2 - 1
src/main/webapp/WEB-INF/jsp/include/header.jsp

@@ -15,4 +15,5 @@
 <link rel="shortcut icon" href="/resources/images/favicon.ico" type="image/x-icon">
 <link rel="preconnect" href="//fonts.gstatic.com/" crossorigin="">
 <link href="/resources/css/common/classic.css" rel="stylesheet">
-<script src="/resources/js/common/app.js"></script>
+<script src="/resources/js/common/app.js"></script>
+<script src="/resources/js/common/common.js"></script>

+ 31 - 95
src/main/webapp/WEB-INF/jsp/login/staff.jsp

@@ -4,73 +4,6 @@
 <%@ page language="java" contentType="text/html; charset=UTF-8"
     pageEncoding="UTF-8"%>
 <jsp:include page="${data._INCLUDE}/header.jsp"></jsp:include>
-<script>
-    $(function() {
-        // Select2
-        $(".select2").each(function() {
-            $(this).wrap("<div class=\"position-relative\"></div>").select2({
-                placeholder : "Select value",
-                dropdownParent : $(this).parent()
-            });
-        })
-        // Daterangepicker
-        $("input[name=\"daterange\"]").daterangepicker({
-            opens : "left"
-        });
-        $("input[name=\"datetimes\"]").daterangepicker({
-            timePicker : true,
-            opens : "left",
-            startDate : moment().startOf("hour"),
-            endDate : moment().startOf("hour").add(32, "hour"),
-            locale : {
-                format : "M/DD hh:mm A"
-            }
-        });
-        $("input[name=\"datesingle\"]").daterangepicker({
-            singleDatePicker : true,
-            showDropdowns : true
-        });
-        // Datetimepicker
-        $('#datetimepicker-minimum').datetimepicker();
-        $('#datetimepicker-view-mode').datetimepicker({
-            viewMode : 'years'
-        });
-        $('#datetimepicker-time').datetimepicker({
-            format : 'LT'
-        });
-        $('#datetimepicker-date').datetimepicker({
-            format : 'L'
-        });
-        var start = moment().subtract(29, "days");
-        var end = moment();
-
-        function cb(start, end) {
-            $("#reportrange span").html(
-                    start.format("MMMM D, YYYY") + " - "
-                            + end.format("MMMM D, YYYY"));
-        }
-        $("#reportrange").daterangepicker(
-                {
-                    startDate : start,
-                    endDate : end,
-                    ranges : {
-                        "Today" : [ moment(), moment() ],
-                        "Yesterday" : [ moment().subtract(1, "days"),
-                                moment().subtract(1, "days") ],
-                        "Last 7 Days" : [ moment().subtract(6, "days"),
-                                moment() ],
-                        "Last 30 Days" : [ moment().subtract(29, "days"),
-                                moment() ],
-                        "This Month" : [ moment().startOf("month"),
-                                moment().endOf("month") ],
-                        "Last Month" : [
-                                moment().subtract(1, "month").startOf("month"),
-                                moment().subtract(1, "month").endOf("month") ]
-                    }
-                }, cb);
-        cb(start, end);
-    });
-</script>
 <script>
     $(function() {
         // Datatables basic
@@ -93,6 +26,26 @@
             }
         });
     });
+</script>
+<script>
+$( function(){
+    $("#loginForm").rules( "add", {
+        
+    })
+    $("#loginForm").validate({
+        ignoreTitle: true,
+        messages : {
+            id : {
+                required : "아이디를 입력해주세요." 
+            },
+            password : {
+                required : "비밀번호를 입력해주세요."
+            }
+        }
+    });
+});
+
+
 </script>
 </head>
 <body>
@@ -107,47 +60,30 @@
 
                         <div class="text-center mt-4">
                             <h1 class="h2">생활치료센터 의료진 시스템</h1>
-                            <p class="lead">Life Care Center Medical
-                                Staff System</p>
+                            <p class="lead">Life Care Center Medical Staff System</p>
                         </div>
 
                         <div class="card">
                             <div class="card-body">
                                 <div class="m-sm-4">
-                                    <form>
+                                    <form id="loginForm" action="./check" method="post">
                                         <div class="form-group">
-                                            <label>아이디</label> <input
-                                                id="id"
-                                                class="form-control form-control-lg"
-                                                type="email"
-                                                name="email"
-                                                placeholder="아이디를 입력해주세요">
+                                            <label>아이디</label>
+                                            <input id="id" class="form-control form-control-lg" type="text" name="email" title="아이디" placeholder="아이디를 입력해주세요" tabindex="1" maxlength="20" required>
                                         </div>
                                         <div class="form-group">
-                                            <label>비밀번호</label> <input
-                                                id="password"
-                                                class="form-control form-control-lg"
-                                                type="password"
-                                                name="password"
-                                                placeholder="비밀번호를 입력해주세요"
-                                                autocomplete="off">
+                                            <label>비밀번호</label>
+                                            <input id="password" class="form-control form-control-lg" type="password" name="password" title="비밀번호" placeholder="비밀번호를 입력해주세요" autocomplete="off" tabindex="2" maxlength="20" required>
                                         </div>
                                         <div>
-                                            <div
-                                                class="custom-control custom-checkbox align-items-center">
-                                                <input type="checkbox"
-                                                    class="custom-control-input"
-                                                    value="remember-me"
-                                                    name="remember-me"
-                                                    checked="">
-                                                <label
-                                                    class="custom-control-label text-small">아이디
-                                                    저장</label>
+                                            <div class="custom-control custom-checkbox align-items-center">
+                                                <input type="checkbox" class="custom-control-input" value="remember-me" name="remember-me" checked="checked">
+                                                <label class="custom-control-label text-small">아이디 저장</label>
                                             </div>
                                         </div>
                                         <div class="text-center mt-3">
-                                            <a href="../patient/list"
-                                                class="btn btn-lg btn-primary">로그인</a>
+                                            <button type="submit" class="btn btn-lg btn-primary">로그인</button>
+<!--                                             <a href="../patient/list" class="btn btn-lg btn-primary">로그인</a> -->
                                         </div>
                                     </form>
                                 </div>

+ 2 - 1
src/main/webapp/resources/css/common/classic.css

@@ -84,4 +84,5 @@
 .patients-stats .temperature.step1 { color:#47bac1; }
 .patients-stats .temperature.step2 { color:#dc3545; }
 .patients-stats .temperature.step3 { background-color: #EFCDD1; color:#dc3545; }
-.graph-area {  }
+.graph-area {  }
+.error{color:red;}

Dosya farkı çok büyük olduğundan ihmal edildi
+ 2 - 0
src/main/webapp/resources/js/common/common.js