Ver Fonte

환자정보 조회 페이지 진행중

huiwon.seo há 4 anos atrás
pai
commit
427926d9a9

+ 4 - 1
src/main/java/com/lemon/lifecenter/controller/PatientController.java

@@ -165,9 +165,12 @@ public class PatientController extends LifeCenterController {
     }
 
     @RequestMapping("/info")
-    public ModelAndView patientInfo() {
+    public ModelAndView patientInfo( @ModelAttribute("dto") final PatientDTO dto ) {
         ModelAndView mv = setMV("patient/info");
 
+        int patientIdx = dto.getPatientIdx();
+        
+        mv.addObject("patientIdx", patientIdx);
         return mv;
     }
 

+ 1 - 0
src/main/resources/application.properties

@@ -6,6 +6,7 @@ spring.mvc.view.suffix=.jsp
 #spring.datasource.driver-class-name=cubrid.jdbc.driver.CUBRIDDriver
 #spring.datasource.url=jdbc:cubrid:localhost:30000:LIFE_CENTER:::?charset=UTF-8
 spring.datasource.driver-class-name=net.sf.log4jdbc.sql.jdbcapi.DriverSpy
+#spring.datasource.url=jdbc:log4jdbc:cubrid:61.97.184.187:30000:LIFE_CENTER:::?charset=UTF-8
 spring.datasource.url=jdbc:log4jdbc:cubrid:61.97.184.187:30000:LIFE_CENTER:::?charset=UTF-8
 
 spring.datasource.username=dba

+ 2 - 10
src/main/webapp/WEB-INF/jsp/patient/info.jsp

@@ -221,16 +221,8 @@
                                     <div class="row mt-3">
                                         <div class="col-12">
                                             <div class="text-right">
-                                                <button
-                                                    class="btn btn-warning w150"
-                                                    onclick="location.href='./privacy';">비밀번호
-                                                    변경</button>
-                                                <button
-                                                    class="btn btn-secondary w100"
-                                                    onclick="location.href='./edit';">정보수정</button>
-                                                <button
-                                                    class="btn btn-primary w100"
-                                                    onclick="location.href='./list';">확인</button>
+                                                <button class="btn btn-secondary w100" onclick="location.href='./edit?patientIdx=${patientIdx}';">정보수정</button>
+                                                <button class="btn btn-primary w100" onclick="location.href='./list';">확인</button>
                                             </div>
                                         </div>
                                     </div>