Преглед на файлове

Merge branch 'databank' of http://wcollector.idatabank.com:5230/dbs289/LifeCenter into sudden

huiwonseo преди 4 години
родител
ревизия
6604639cba

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

@@ -236,9 +236,11 @@ public class PatientController extends LifeCenterController {
         int centerCount   = centerService.selectCenterOneCount( dto );
         
         String centerName = "";
-        
+        String centerType = "";
+
         if( centerCount > 0 ) {
             centerName = centerService.selectCenterInfoOne( dto ).getCenterName();
+            centerType = centerService.selectCenterInfoOne( dto ).getCenterType();
         }
         
         StaffDTO staffDTO = new StaffDTO();
@@ -258,6 +260,7 @@ public class PatientController extends LifeCenterController {
         }
         
         mv.addObject( "centerName", centerName );
+        mv.addObject( "centerType", centerType );
         mv.addObject( "centerCount", centerCount );
         mv.addObject( "actionType", "new" );
         mv.addObject( "staffList", staffList );
@@ -555,12 +558,15 @@ public class PatientController extends LifeCenterController {
             dto.setStaffId( sesId );
             String centerName = "";
             int centerCount   = centerService.selectCenterCount( dto );
-            
+            String centerType = "";
+
             if( sesCenterCode.equals( "0" ) ) { //센터코드가 없는 시스템권한 계정인경우
                 centerName = patientDTO.getCenterName();
+                centerType = "C";
             } else {
                 if( centerCount > 0 ) {
                     centerName = centerService.selectCenterInfoOne( dto ).getCenterName();
+                    centerType = centerService.selectCenterInfoOne( dto ).getCenterType();
                 } else {
                     LifeCenterFunction.scriptMessage(response, "alertBox({ txt : '문진이 정상적으로 제출되었습니다.', callBack : function(){ history.back(); } });" );
                     // return ""; 아직처리안함
@@ -607,7 +613,7 @@ public class PatientController extends LifeCenterController {
             
             mv.addObject( "centerName", centerName );
             mv.addObject( "centerCount", centerCount );
-            
+            mv.addObject( "centerType", centerType );
             mv.addObject( "staffList", staffList );
             
             mv.addObject( "patientIdx", patientIdx );

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

@@ -295,13 +295,20 @@ $( function(){
                                                     </td>
                                                 </tr>
                                                 <tr>
-                                                    <th><span class="fix">*</span>병동 번호</th>
+                                                    <th><span class="fix">*</span>병동 번호
+                                                        <c:if test="${centerType eq 'S'}" ><br/><span class="ml-2">(거주지 번호)</span></c:if>
+                                                    </th>
                                                     <td>
                                                         <div class="form-check-inline">
                                                             <!-- 병동 번호 (동 /호실) -->
                                                             <input type="text" value="${patientData.wardNumber}" class="form-control" name="wardNumber"> <span>동</span>
                                                             <input type="text" value="${patientData.roomNumber}" class="form-control" name="roomNumber" required> <span>호</span>
                                                         </div>
+                                                        <c:if test="${centerType eq 'S'}">
+                                                            <div class="mt-1">
+                                                              <span class="text-danger">재택치료는 "호" 항목만 사용해 주세요.</span>
+                                                            </div>
+                                                        </c:if>
                                                     </td>
                                                     <th><span class="fix">*</span>이름</th>
                                                     <td>

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

@@ -323,13 +323,20 @@ $( function(){
                                                     </td>
                                                 </tr>
                                                 <tr>
-                                                    <th><span class="fix">*</span>병동 번호</th>
+                                                    <th><span class="fix">*</span>병동 번호
+                                                        <c:if test="${centerType eq 'S'}" ><br/><span class="ml-2">(거주지 번호)</span></c:if>
+                                                    </th>
                                                     <td>
                                                         <div class="form-check-inline">
                                                             <!-- 병동 번호 (동 /호실) -->
                                                             <input type="text" class="form-control" name="wardNumber"> <span>동</span>
                                                             <input type="text" class="form-control" name="roomNumber" required> <span>호</span>
                                                         </div>
+                                                        <c:if test="${centerType eq 'S'}">
+                                                            <div class="mt-1">
+                                                              <span class="text-danger">재택치료는 "호" 항목만 사용해 주세요.</span>
+                                                            </div>
+                                                        </c:if>
                                                     </td>
                                                     <th><span class="fix">*</span>이름</th>
                                                     <td>