Ver Fonte

Merge branch 'master' of http://wcollector.idatabank.com:5230/dbs289/LifeCenter.git

junekeunsong há 4 anos atrás
pai
commit
2867589d25

+ 1 - 1
src/main/java/com/lemon/lifecenter/common/LifeCenterInterCeptor.java

@@ -41,7 +41,7 @@ public class LifeCenterInterCeptor extends HandlerInterceptorAdapter {
         logger.error("url -- > " + url);
         logger.error("url -- > " + url.contains( "/mobile" ));
         
-        if (url.contains( "/error" )) {
+        if (url.contains( "/error" ) || url.contains("/nonface/wait")) {
             return true;
         }
         

+ 1 - 0
src/main/java/com/lemon/lifecenter/common/LifeCenterSessionController.java

@@ -10,6 +10,7 @@ public class LifeCenterSessionController {
   
   public static String getSession( HttpServletRequest request, String key ) {
     HttpSession session = request.getSession( false );
+    session.setMaxInactiveInterval( 1800 );
     String data = session.getAttribute( key ) == null ? "" : session.getAttribute( key ).toString();
     
     return data;

+ 26 - 0
src/main/java/com/lemon/lifecenter/controller/MobileNonFaceController.java

@@ -11,6 +11,7 @@ import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.servlet.ModelAndView;
 
 import com.lemon.lifecenter.common.LifeCenterConfigVO;
@@ -77,4 +78,29 @@ public class MobileNonFaceController extends LifeCenterController {
         return mv;
     }
     
+    @RequestMapping("/nonface/wait")
+    public ModelAndView wait(
+            @RequestParam(value="member_name", required=false, defaultValue="") String memberName,
+            @RequestParam(value="member_id", required=false, defaultValue="") String memberId,
+            @RequestParam(value="room_id", required=false, defaultValue="") String roomId,
+            @RequestParam(value="token", required=false, defaultValue="") String token,
+            @RequestParam(value="api_key", required=false, defaultValue="") String apiKey,
+            @RequestParam(value="hashData", required=false, defaultValue="") String hashData,
+            @RequestParam(value="classify", required=false, defaultValue="") String classify,
+            HttpServletRequest request, HttpServletResponse response) throws Exception {
+        
+        System.err.println( "roomId: " + roomId );
+        logger.debug( "roomId : " +roomId );
+        
+        
+        ModelAndView mv = setMobileMV("nonface/wait");
+        mv.addObject( "member_name", memberName );
+        mv.addObject( "member_id", memberId );
+        mv.addObject( "room_id", roomId );
+        mv.addObject( "token", token );
+        mv.addObject( "api_key", apiKey );
+        mv.addObject( "hashData", hashData );
+        
+        return mv;
+    }
 }

+ 5 - 1
src/main/java/com/lemon/lifecenter/controller/MobileServeyController.java

@@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.servlet.ModelAndView;
 
 import com.lemon.lifecenter.common.LifeCenterController;
+import com.lemon.lifecenter.common.LifeCenterFunction;
 import com.lemon.lifecenter.common.LifeCenterSessionController;
 import com.lemon.lifecenter.dto.PatientDTO;
 import com.lemon.lifecenter.service.MobilePatientService;
@@ -79,7 +80,10 @@ public class MobileServeyController extends LifeCenterController {
         dto.setEtcCheck(dto.getEtcCheckSymptom());
         dto.setEtcContent(dto.getEtcContentSymptom());
         patientService.updatePatientSymptom(dto);
-        return "redirect:/mobile/menu";
+        
+        LifeCenterFunction.scriptMessage( response, "alert('문진이 정상적으로 제출되었습니다');location.href='/mobile/serveyhistory';" );
+        
+        return "/common/black";
     }
     
     @RequestMapping("/servey/insert")

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

@@ -275,7 +275,7 @@ public class PatientController extends LifeCenterController {
         dto.setCenterCode( sesCenterCode );
         dto.setUpdateBy( sesId );
         
-        patientService.updatePatientCare( dto );  // 환지 기본정보 insert
+        patientService.updatePatientCare( dto );  // 환지 기본정보
         
         //patientDisease Insert
         dto.setEtcCheck( dto.getEtcCheckDisease() );

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

@@ -7,7 +7,7 @@ spring.mvc.view.suffix=.jsp
 #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.url=jdbc:log4jdbc:cubrid:localhost:30000:LIFE_CENTER:::?charset=UTF-8
 
 spring.datasource.username=dba
 spring.datasource.password=#zo240s!

+ 6 - 1
src/main/webapp/WEB-INF/jsp/mobile/health/health1.jsp

@@ -6,6 +6,11 @@
 <script>
 $( function(){
     $( "#healthForm" ).validate({
+    	rules : {
+    		temperature : {
+    			floatNum : true
+    		}
+    	},
         onkeyup: function( element, event ) {
             $( "div.error-msg" ).text( "" );
         },
@@ -19,7 +24,7 @@ $( function(){
                 $( "div.error-msg" ).text( "체온을 입력해주세요 (Please enter your body temperature)" );
             } else {
                 $( "#phrValue" ).val( temperature );
-                form.submit();
+//                 form.submit();
             }
         }
     });

+ 2 - 2
src/main/webapp/WEB-INF/jsp/mobile/history/serveyhistory.jsp

@@ -9,7 +9,7 @@
         <div class="container">
             <div class="header">
                 <div class="previous">
-                    <a href="javascript:;" onclick="history.back();">이전</a>
+                    <a href="javascript:;" onclick="location.href='/mobile/menu';">이전</a>
                 </div>
                 <div class="title">
                     문진내역보기
@@ -173,7 +173,7 @@
             <div class="btn_group">
                 <ul>
                     <li>
-                        <button onclick="history.back();" class="confirm"><span class="check">확인</span></button>
+                        <button onclick="location.href='/mobile/menu';" class="confirm"><span class="check">확인</span></button>
                     </li>
                 </ul>
             </div>

+ 12 - 33
src/main/webapp/WEB-INF/jsp/mobile/nonface/nonface.jsp

@@ -13,41 +13,20 @@ $( function() {
 //     frm.submit();
 
     //$("#nonface").submit();
-    var param = { type : "command",
-    		functionType : "popUpBrowsing",
-    		value : {
-    			url : "https://lemon.medihere.com/app/vc",
-    			method : "POST",
-    			parameters : $( "#nonface" ).serialize()
-    		}
-        }
+//     var param = { type : "command",
+//     		functionType : "popUpBrowsing",
+//     		value : {
+//     			url : "https://life-center.lemonhc.com/mobile/nonface/wait",
+//     			method : "POST",
+//     			parameters : $( "#nonface" ).serialize()
+//     		}
+//         }
+    systemBrowsing( "https://life-center.lemonhc.com/mobile/nonface/wait?" + $( "#nonface" ).serialize() );
     
-    console.log( stringifyJson( param ) );
-    toNative( param );
+    setTimeout( function(){
+        history.back();
+    }, 1000 );
 });
-
-function toNative( reqParam ){
-    try {
-        var data = stringifyJson( reqParam );
-        if( isMobile() ){
-            // 앱이 안드로이드일 경우
-            if( checkDevice() == "android" ){
-                window.Android.toNative( data );
-            } else if( checkDevice() == "ios" ){
-                data = "jscall://toNative?" + data;
-                location.href = data;
-            }
-        }else{
-            alert("App에서만 사용가능한 기능입니다.");
-        }
-    } catch (e) {
-//         self.log(e,"mcare_mobile_toNative");
-    }
-};
-
-function stringifyJson(jsonObj,replacer,space){
-    return JSON.stringify(jsonObj,replacer,space);
-}
 </script>
 </head>
 <body>

+ 25 - 0
src/main/webapp/WEB-INF/jsp/mobile/nonface/wait.jsp

@@ -0,0 +1,25 @@
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+    pageEncoding="UTF-8"%>
+<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
+<jsp:include page="${data._INCLUDE}/header.jsp"></jsp:include>
+<script type="text/javascript">
+$( function() {
+	setTimeout( function(){
+    $("#nonface").submit();
+	}, 2000 );
+});
+</script>
+</head>
+<body>
+<form id="nonface" name="nonface" method="post" action="https://lemon.medihere.com/app/vc">
+        <input type="hidden" name="member_name" value="${member_name}" />
+        <input type="hidden" name="member_id" value="${member_id}" />
+        <input type="hidden" name="room_id" value="${room_id}" />
+        <input type="hidden" name="token" value="${token}">
+        <input type="hidden" name="api_key" value="${api_key}" />
+        <input type="hidden" name="hashData" value="${hashData}">
+        <input type="hidden" name="classify" value="p"> <!-- 환자는 p 의료진은 d -->
+    </form>
+</body>
+</html>

+ 1 - 1
src/main/webapp/WEB-INF/jsp/mobile/servey/servey.jsp

@@ -402,7 +402,7 @@ function setEventHandler() {
                                     <input type="checkbox" id="symptomEtc" name="etcCheckSymptom" value="Y" />
                                     <label for="symptomEtc"><span></span>기타</label>
                                     <div class="comment label-readonly-check">
-                                        <input type="text" name="etcContentSymptom" placeholder="기타 증상 및 암명/수술명을 입력하세요.">
+                                        <input type="text" name="etcContentSymptom" placeholder="기타 증상을 입력하세요.">
                                     </div>
                                 </li>
                             </ul>

+ 1 - 1
src/main/webapp/WEB-INF/jsp/patient/edit.jsp

@@ -289,7 +289,7 @@ $( function(){
                                                                 
                                                                 <select class="custom-select select-date date-year">
                                                                       <option value="" selected="">년</option>
-                                                                      <c:forEach var="y" begin="1940" end="${sysYear}" step="1">
+                                                                      <c:forEach var="y" begin="1900" end="${sysYear}" step="1">
                                                                           <option value="${y}" <c:if test="${juminYear eq y}">selected="selected"</c:if>>${y} 년</option>
                                                                       </c:forEach>
                                                                 </select>

+ 55 - 0
src/main/webapp/resources/js/mobile/common.js

@@ -21,6 +21,58 @@ function getAjax( url, vv, success, error, done ){
   });
 };
 
+function toNative( reqParam ){
+    try {
+        var data = stringifyJson( reqParam );
+        if( isMobile() ){
+            // 앱이 안드로이드일 경우
+            if( checkDevice() == "android" ){
+                window.Android.toNative( data );
+            } else if( checkDevice() == "ios" ){
+                data = "jscall://toNative?" + data;
+                location.href = data;
+            }
+        }else{
+            alert("App에서만 사용가능한 기능입니다.");
+        }
+    } catch (e) {
+//         self.log(e,"mcare_mobile_toNative");
+    }
+};
+function systemBrowsing(url) {
+    var jsonMsg = {
+        "type" : "command",
+        "functionType" : "systemBrowsing",
+        "value" : {
+            "url" : url
+        }
+    };
+    toNative(jsonMsg);
+}
+function stringifyJson(jsonObj,replacer,space){
+    return JSON.stringify(jsonObj,replacer,space);
+}
+function exitApp() {
+    var jsonMsg = {
+        type : "command",
+        functionType : "exit"
+    };
+    toNative(jsonMsg);
+}
+/**
+ * 이전 버튼 이벤트
+ */
+function triggerBackBtn(){
+    if( checkDevice() == "android"  ){
+    console.log( checkDevice() );
+        //index 면 종료
+        if( (window.location.href).indexOf("/mobile/menu") > 0 ){
+            exitApp();
+            return;
+        }
+        history.back();
+     }
+};
 function isMobile(){
     return (/iphone|ipad|ipod|android|opera\smini|opera\smobi|symbian|blackberry|mini|windows\sce|palm/i.test(navigator.userAgent.toLowerCase()));
 }
@@ -71,6 +123,9 @@ $(document).ready(function(){
         return this.optional(element) ||  (Date.parse(value, "yyyy-MM-dd") == NaN) ? false : true;
     }, "날짜형식을 올바르게 입력해주세요  yyyy-mm-dd" );
     
+    $.validator.addMethod( "floatNum",  function( value, element ) {
+        return this.optional(element) || /^\-?([0-9]+(\.[0-9]+)?|Infinity)$/.test(value);
+    }, "숫자형식만 입력해주세요" );
     
     /* NAVIGATION BAR */
     $('#main .header .menu_bar a').click(function(){