Ver Fonte

Merge remote-tracking branch 'origin/master' into databank

huiwon.seo há 4 anos atrás
pai
commit
68d3797f0a

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

@@ -3,6 +3,8 @@ package com.lemon.lifecenter.controller;
 import java.util.HashMap;
 import java.util.Map;
 
+import javax.servlet.http.HttpServletRequest;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -11,6 +13,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
 
+import com.lemon.lifecenter.common.LifeCenterSessionController;
 import com.lemon.lifecenter.dto.AppVersionDTO;
 import com.lemon.lifecenter.dto.DeviceInfoDTO;
 import com.lemon.lifecenter.service.DeviceService;
@@ -58,7 +61,7 @@ public class DeviceController {
      * 02 : 디바이스 토큰 저장 실패
      */
     @RequestMapping(value="/mobile/insertDeviceInfo", method=RequestMethod.POST)
-    public Map<String, String> setDeviceInfo(@RequestBody DeviceInfoDTO dto) {
+    public Map<String, String> setDeviceInfo(@RequestBody DeviceInfoDTO dto, HttpServletRequest request) {
         HashMap<String, String> result = new HashMap<>();
         String code = "99";
         
@@ -67,6 +70,12 @@ public class DeviceController {
         String deviceToken = dto.getDeviceToken();
         String macAddress = dto.getMacAddress();
         
+        // macAddress는 현재 앱사용자의 앱버전을 받음 
+        // DB에 Insert 시키지 말고 세션에 저장후 menu.jsp 페이지에서 현재 앱버전 표시
+        dto.setMacAddress( "" );
+        LifeCenterSessionController.setSessionMobile(request, "sesMDeviceVersion", macAddress );
+        
+        
         if (patientIdx == 0 || deviceType.equals("") || deviceToken.equals("") || macAddress.equals("")) {
             code = "01";
             result.put("code", code);

+ 19 - 0
src/main/java/com/lemon/lifecenter/controller/MobileMenuController.java

@@ -41,11 +41,27 @@ public class MobileMenuController extends LifeCenterController {
         String sesMpIdx  = LifeCenterSessionController.getSession( request, "sesMpIdx" );
         String sesMCenterName  = LifeCenterSessionController.getSession( request, "sesMCenterName" );
         String sesMCenterCode  = LifeCenterSessionController.getSession( request, "sesMCenterCode" );
+        String sesMDeviceVersion  = LifeCenterSessionController.getSession( request, "sesMDeviceVersion" );
         
         PatientDTO dto = new PatientDTO();
         dto.setPatientIdx(Integer.parseInt(sesMpIdx));
         int cnt = patientService.selectMunJinCount(dto);
         
+        dto.setCenterCode( Integer.valueOf( sesMCenterCode ) );
+        String tel = mpatientService.selectMPatientAdminPhone(dto).getAdminPhone();
+        
+        if (!tel.equals( "" )) {
+            tel = tel.replace("-", "");
+            
+            if (tel.length() == 8) {
+                tel = tel.replaceFirst("^([0-9]{4})([0-9]{4})$", "$1-$2");
+            } else if (tel.length() == 12) {
+                tel = tel.replaceFirst("(^[0-9]{4})([0-9]{4})([0-9]{4})$", "$1-$2-$3");
+            } else {
+                tel = tel.replaceFirst("(^02|[0-9]{3})([0-9]{3,4})([0-9]{4})$", "$1-$2-$3");
+            }
+        }
+        
         ModelAndView mv = setMobileMV("menu/menu");
         mv.addObject("patientIdx", sesMpIdx);
         mv.addObject("patientId", patientId);
@@ -55,6 +71,9 @@ public class MobileMenuController extends LifeCenterController {
         mv.addObject("centerName", sesMCenterName);
         mv.addObject("centerCode", sesMCenterCode);
         mv.addObject("redirectUrl", redirectUrl);
+        mv.addObject( "tel", tel );
+        mv.addObject( "deviceVersion", sesMDeviceVersion );
+        
         return mv;
     }
     

Diff do ficheiro suprimidas por serem muito extensas
+ 43 - 14
src/main/webapp/WEB-INF/jsp/login/staff.jsp


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

@@ -115,7 +115,7 @@ div.bluetooth span.readonly{color:#999999;font-weight:500;}
                     </li>
                 </ul>
             </div>
-            <div id="bluetoothBtn" class="examination">
+            <div id="bluetoothBtn" class="examination" style="display:none;">
                 <div class="history">
                     <a href="javascript:;" onclick="phrValue( 'getPhrValue', phrCallBackType );">블루투스 기기 연동</a>
                 </div>

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

@@ -181,7 +181,7 @@ div.bluetooth span.readonly{color:#999999;font-weight:500;}
                 </ul>
             </div>
 
-            <div id="bluetoothBtn" class="examination">
+            <div id="bluetoothBtn" class="examination" style="display:none;">
                 <div class="history">
                     <a href="javascript:;" onclick="phrValue( 'getPhrValue', phrCallBackType );">블루투스 기기 연동</a>
                 </div>

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

@@ -103,7 +103,7 @@ div.bluetooth span.readonly{color:#999999;font-weight:500;}
                 </ul>
             </div>
             
-            <div id="bluetoothBtn" class="examination">
+            <div id="bluetoothBtn" class="examination" style="display:none;">
                 <div class="history">
                     <a href="javascript:;" onclick="phrValue( 'getPhrValue', phrCallBackType );">블루투스 기기 연동</a>
                 </div>

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

@@ -103,7 +103,7 @@ div.bluetooth span.readonly{color:#999999;font-weight:500;}
                 </ul>
             </div>
             
-            <div id="bluetoothBtn" class="examination">
+            <div id="bluetoothBtn" class="examination" style="display:none;">
                 <div class="history">
                     <a href="javascript:;" onclick="phrValue( 'getPhrValue', phrCallBackType );">블루투스 기기 연동</a>
                 </div>

+ 12 - 8
src/main/webapp/WEB-INF/jsp/mobile/menu/menu.jsp

@@ -65,9 +65,9 @@ function searchingDevice() {
                             <li>
                                 <a href="./nonface">비대면 진료(Untact Treatment)</a>
                             </li>
-                            <li>
-                                <a href="./push/list">메시지 수신함(Message received)</a>
-                            </li>
+                             <li> 
+                                 <a href="./push/list">메시지 수신함(Message received)</a>
+                             </li>
                             <!-- li>
                                 <a href="javascript:;">생활치료센터 이용 안내</a>
                             </li -->
@@ -75,7 +75,7 @@ function searchingDevice() {
                     </div>
                     <div class="version">
 <!--                         <span onclick="location.href='/mobile/accept/info'">이용약관</span> |  -->
-                        <span>버전정보 v1.0.0</span>
+<%--                         <span>버전정보 v<c:out value="${deviceVersion}"/></span> --%>
                     </div>
                 </div>
             </div>
@@ -107,10 +107,14 @@ function searchingDevice() {
                         <div style="display:inline-block;width:80%;">
                          오늘의 건강정보를<br/>기록해주세요.
                         </div>
-                        <div onclick='systemBrowsing( "https://life-center.lemonhc.com/mobile/call?c=<c:out value="${centerCode}"/>");'
+                        <a href='tel:<c:out value="${tel}" />'
                             style="position:absolute;right:-25px;top:-25px;display:inline-block;width:114px;height:106px;font-size:0;">
                                 <img src="/resources/images/mobile/emergency_call.png" style="width:114px;height:106px;"/>
-                        </div>
+                        </a>
+<%--                         <div onclick='systemBrowsing( "https://life-center.lemonhc.com/mobile/call?c=<c:out value="${centerCode}"/>");' --%>
+<!--                             style="position:absolute;right:-25px;top:-25px;display:inline-block;width:114px;height:106px;font-size:0;"> -->
+<!--                                 <img src="/resources/images/mobile/emergency_call.png" style="width:114px;height:106px;"/> -->
+<!--                         </div> -->
                     </div>
                 </div>
             </div>
@@ -160,7 +164,7 @@ function searchingDevice() {
                          <div class="menu-eng">(Untact Treatment)</div>
                         </a>
                     </li>
-                    <li>
+                    <li style="display:none;">
                         <a href="javascript:void(0);" onclick="searchingDevice();" id="deviceBtn">
                             <div class="image">
 <!--                                 <div class="new_icon">NEW</div> -->
@@ -175,7 +179,7 @@ function searchingDevice() {
                 </ul>
             </div>
             <div class="user_guide">
-                <a href="#">
+                <a href="tel:1661-8308">
                     <span class="icon">
 <!--                         <img src="/resources/images/mobile/guide_icon.png" /> -->
                     </span>