Prechádzať zdrojové kódy

행정인력 개발

databank102 4 rokov pred
rodič
commit
f9daf77042

+ 69 - 23
src/main/java/com/lemon/lifecenter/controller/StaffManagerController.java

@@ -2,7 +2,6 @@ package com.lemon.lifecenter.controller;
 
 import java.util.ArrayList;
 import java.util.List;
-import java.util.Random;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -22,10 +21,11 @@ import com.lemon.lifecenter.common.LifeCenterController;
 import com.lemon.lifecenter.common.LifeCenterFunction;
 import com.lemon.lifecenter.common.LifeCenterPaging;
 import com.lemon.lifecenter.common.LifeCenterSessionController;
-import com.lemon.lifecenter.dto.StaffManagerDTO;
+import com.lemon.lifecenter.dto.ApiManagerDTO;
 import com.lemon.lifecenter.dto.CenterInfoDTO;
-import com.lemon.lifecenter.service.StaffManagerService;
+import com.lemon.lifecenter.dto.StaffManagerDTO;
 import com.lemon.lifecenter.service.CenterService;
+import com.lemon.lifecenter.service.StaffManagerService;
 
 @Controller
 @RequestMapping("/staffManager")
@@ -38,16 +38,23 @@ public class StaffManagerController extends LifeCenterController {
     @Autowired
     private CenterService centerService;
     
-    @RequestMapping("/medicalinfo")
-    public ModelAndView staffMediCalInfo(
+    @Autowired
+    private LifeCenterConfigVO config;
+    
+    @Autowired
+    private LifeCenterPaging paging;
+    
+    @RequestMapping("/info")
+    public ModelAndView staffManagerInfo(
             @ModelAttribute("dto") StaffManagerDTO dto,
+            @RequestParam(value="gubun", required=false, defaultValue="M") String inputgubun,
             HttpServletRequest request,HttpServletResponse response) {
         
         String sesCenterCode  = LifeCenterSessionController.getSession( request, "sesCenterCode" );
         dto.setCenterCode(Integer.valueOf(sesCenterCode));
-        dto.setGubun("M");
+        dto.setGubun(inputgubun);
         
-        ModelAndView mv = setMV("staff/manager/medicalinfo");
+        ModelAndView mv = setMV("staff/manager/info");
         
         int total = service.selectStaffManagerCount(dto);
         
@@ -56,7 +63,7 @@ public class StaffManagerController extends LifeCenterController {
             ndto = service.selectStaffManagerInfo(dto);
         } else {
             ndto.setCenterCode(Integer.valueOf(sesCenterCode));
-            ndto.setGubun("M");
+            ndto.setGubun(inputgubun);
             
         }
         
@@ -66,14 +73,15 @@ public class StaffManagerController extends LifeCenterController {
     }
     
     
-      @RequestMapping("/medicaledit")
-      public ModelAndView staffMediCalEdit(
+      @RequestMapping("/edit")
+      public ModelAndView staffManagerEdit(
               @ModelAttribute("dto") StaffManagerDTO dto,
+              @RequestParam(value="gubun", required=false, defaultValue="M") String inputgubun,
               HttpServletRequest request,HttpServletResponse response) {
           
           String sesCenterCode  = LifeCenterSessionController.getSession( request, "sesCenterCode" );
           dto.setCenterCode(Integer.valueOf(sesCenterCode));
-          dto.setGubun("M");
+          dto.setGubun(inputgubun);
           
           int total = service.selectStaffManagerCount(dto);
           StaffManagerDTO ndto = new StaffManagerDTO();
@@ -82,29 +90,33 @@ public class StaffManagerController extends LifeCenterController {
               ndto.setStatus("U");
           } else {
               ndto.setCenterCode(Integer.valueOf(sesCenterCode));
-              ndto.setGubun("M");
+              ndto.setGubun(inputgubun);
               ndto.setStatus("I");
           }
           
-          ModelAndView mv = setMV("staff/manager/medicaledit");
+          ModelAndView mv = setMV("staff/manager/edit");
           
           mv.addObject("list", ndto);
           
           return mv;
       }
       
-      @RequestMapping( value = "/medicalupdate", method = RequestMethod.POST)
-      public String staffMediCalUpdate(
+      @RequestMapping( value = "/staffupdate", method = RequestMethod.POST)
+      public String staffManagerUpdate(
               @ModelAttribute("dto") final StaffManagerDTO dto,
               HttpServletRequest request,HttpServletResponse response) {
           String sesId  = LifeCenterSessionController.getSession( request, "sesId" );
           String sesCenterCode  = LifeCenterSessionController.getSession( request, "sesCenterCode" );
           String sesCenterName  = LifeCenterSessionController.getSession( request, "sesCenterName" );
           
-          dto.setGubun("M");
           dto.setCenterCode(Integer.valueOf(sesCenterCode));
           
-          if (dto.getStatus().equals("I")) {
+          int total = service.selectStaffManagerCount(dto);
+          
+          if (total > 0) {
+              dto.setUpdateById(sesId);
+              service.updateStaffManager(dto);
+          } else {
               dto.setCreateById(sesId);
               
               CenterInfoDTO cdto = new CenterInfoDTO();
@@ -114,17 +126,51 @@ public class StaffManagerController extends LifeCenterController {
               //검색용으로 저장
               dto.setLocationCode(cdto.getLocationCode());
               dto.setCenterName(sesCenterName);
-              
               service.insertStaffManager(dto);
-          } else  if (dto.getStatus().equals("U")) {
-              dto.setUpdateById(sesId);
-              service.updateStaffManager(dto);
           }
           
-          
-          LifeCenterFunction.scriptMessage( response, "alertBox({ txt: '저장을 완료하였습니다.', callBack : function(){ location.href='/staffManager/medicalinfo'; } });" );
+          LifeCenterFunction.scriptMessage( response, "alertBox({ txt: '저장을 완료하였습니다.', callBack : function(){ location.href='/staffManager/info?gubun="+ dto.getGubun() +"'; } });" );
           return "/common/blank";
           
       }    
       
+      @RequestMapping("/list")
+      public ModelAndView staffManagerList(
+              @ModelAttribute("dto") StaffManagerDTO dto,
+              @RequestParam(value="gubun", required=false, defaultValue="M") String inputgubun,
+              @RequestParam(value="locationCode", required=false, defaultValue="") String inputlocationCode,
+              @RequestParam(value="centerName", required=false, defaultValue="") String inputCenterName,
+              @RequestParam(value="page", required=false, defaultValue="1") int page,
+              
+              HttpServletRequest request,HttpServletResponse response) {
+          
+          dto.setLimit( ( Integer.valueOf( page ) - 1 ) * config.pageDataSize );
+          dto.setLimitMax( config.pageDataSize );
+          dto.setGubun(inputgubun);
+          
+          int total = service.selectStaffManagerCount(dto);
+          List<StaffManagerDTO> list = new ArrayList<StaffManagerDTO>();
+          if (total > 0) {
+              list = service.selectStaffManagerList(dto);
+          }
+          
+          String param = "locationCode="+inputlocationCode+"&centerlName="+inputCenterName+"&gubun="+inputgubun;
+          paging = LifeCenterPaging.getInstance();
+          paging.paging(config, total, page, param);
+              
+          ModelAndView mv = setMV("api/list");
+          
+          mv.addObject("total", total);
+          mv.addObject("list", list);
+          mv.addObject("gubun", inputgubun);
+          mv.addObject("locationCode", inputlocationCode);
+          mv.addObject("centerName", inputCenterName);
+          
+          mv.addObject("paging", paging);
+          mv.addObject("page", page);
+          mv.addObject("pageSize", dto.getLimitMax());
+          
+          return mv;
+      }
+      
 }

+ 15 - 0
src/main/java/com/lemon/lifecenter/dto/StaffManagerDTO.java

@@ -31,6 +31,8 @@ public class StaffManagerDTO {
     private String centerName = "";
     private String Status = "";
     
+    private int limit = 0;
+    private int limitMax = 0;
     
     public int getCenterCode() {
         return centerCode;
@@ -178,5 +180,18 @@ public class StaffManagerDTO {
     public void setCenterName(String centerName) {
         this.centerName = centerName;
     }
+    public int getLimit() {
+        return limit;
+    }
+    public void setLimit(int limit) {
+        this.limit = limit;
+    }
+    public int getLimitMax() {
+        return limitMax;
+    }
+    public void setLimitMax(int limitMax) {
+        this.limitMax = limitMax;
+    }
+    
     
 }

+ 0 - 1
src/main/java/com/lemon/lifecenter/mapper/StaffManagerMapper.java

@@ -14,7 +14,6 @@ public interface StaffManagerMapper {
     public int selectStaffManagerCount(StaffManagerDTO dto);
     public StaffManagerDTO selectStaffManagerInfo(StaffManagerDTO dto);
     public List<StaffManagerDTO> selectStaffManagerList(StaffManagerDTO dto);
-    public StaffManagerDTO selectStaffManagerInfoOne(String idx);
     public void insertStaffManager(StaffManagerDTO dto);
     public void updateStaffManager(StaffManagerDTO dto);
     

+ 2 - 4
src/main/java/com/lemon/lifecenter/service/StaffManagerService.java

@@ -6,6 +6,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import com.lemon.lifecenter.dto.StaffManagerDTO;
+import com.lemon.lifecenter.dto.ApiManagerDTO;
 import com.lemon.lifecenter.dto.CooperationDTO;
 import com.lemon.lifecenter.mapper.StaffManagerMapper;
 
@@ -27,10 +28,6 @@ public class StaffManagerService {
         return mapper.selectStaffManagerList(dto);
     }
     
-    public StaffManagerDTO selectStaffManagerInfoOne(String idx) {
-        return mapper.selectStaffManagerInfoOne(idx);
-    }
-    
     public void insertStaffManager(StaffManagerDTO dto) {
         mapper.insertStaffManager(dto);
     }
@@ -38,4 +35,5 @@ public class StaffManagerService {
     public void updateStaffManager(StaffManagerDTO dto) {
         mapper.updateStaffManager(dto);
     }
+    
 }

+ 45 - 74
src/main/resources/mybatis/mapper/staff/staffManager.xml

@@ -7,9 +7,23 @@
             SELECT COUNT(*) AS TOTAL
               FROM STAFF_MANAGER
             WHERE 1 = 1
-            AND CENTER_CODE = #{centerCode}
-            AND GUBUN = #{gubun}
+                AND GUBUN = #{gubun}
         ]]>
+        <if test='centerCode != null and centerCode != ""'>
+            <![CDATA[
+                AND CENTER_CODE = #{centerCode}
+            ]]>
+        </if>
+        <if test='centerName != null and centerName != ""'>
+            <![CDATA[
+                AND CENTER_NAME LIKE CONCAT('%', #{centerName}, '%')
+            ]]>
+        </if>
+        <if test='locationCode != null and locationCode != ""'>
+            <![CDATA[
+                AND LOCATION_CODE = #{locationCode}
+            ]]>
+        </if>
     </select>
     
     <select id="selectStaffManagerInfo" parameterType="StaffManagerDTO" resultType="StaffManagerDTO">
@@ -129,47 +143,43 @@
     <select id="selectStaffManagerList" parameterType="StaffManagerDTO" resultType="StaffManagerDTO">
         <![CDATA[
             SELECT
-                AM.IDX,
-                AM.MANAGER_NAME                                          AS managerName,
-                AM.HOSPITAL_NAME                                         AS hospitalName,
-                AM.DEPARTMENT_NAME                                       AS departmentName,
-                AM.MANAGER_EMAIL                                         AS managerEmail,
-                AM.MANAGER_PHONE                                         AS managerPhone,
-                AM.USE_PURPOSE                                           AS usePurpose,
-                AM.API_KEY                                               AS apiKey,
-                AM.COOPERATIVE_CODE                                      AS cooperativeCode,
-                AM.USE_YN                                                AS useYn,
-                AM.REQUEST_DATE                                          AS requestDate,
-                AM.ACCEPT_DATE                                           AS acceptDate,
-                AM.CREATE_DATE                                           AS createDate,
-                CASE WHEN AM.USE_YN = 'C' THEN '승인완료'
-                     WHEN AM.USE_YN = 'W' THEN '승인대기'
-                     WHEN AM.USE_YN = 'D' THEN '승인해제'
-                ELSE '' END                                             AS useynNm,
-                AM.MANAGER_ID                                           AS managerId,
-                AM.CENTER_CODE                                          AS centerCode,
-                (SELECT CI.CENTER_NAME 
-                    FROM CENTER_INFO CI
-                    WHERE AM.CENTER_CODE = CI.CENTER_CODE
-                )                                                       AS centerName,
-                (SELECT CH.COOPERATIVE_NAME 
-                    FROM COOPERATIVE_HOSPITAL CH
-                    WHERE AM.COOPERATIVE_CODE = CH.COOPERATIVE_CODE
-                )                                                       AS cooperativeName,
-                AM.EXPIRE_DATE                                          AS expireDate
+                CENTER_CODE                                             AS centerCode,
+                GUBUN                                                   AS gubun,
+                STAFF1                                                  AS staff1, --의사
+                STAFF2                                                  AS staff2, --간호사
+                STAFF3                                                  AS staff3, --간호조무사
+                STAFF4                                                  AS staff4, --임상병리사
+                STAFF5                                                  AS staff5, --방사선사
+                STAFF6                                                  AS staff6, --행정인력
+                STAFF7                                                  AS staff7, --공보의
+                STAFF8                                                  AS staff8, --군의관
+                STAFF9                                                  AS staff9, --간호사관생도
+                STAFF10                                                 AS staff10, --민간모집의사
+                STAFF11                                                 AS staff11, --민간모집간호사
+                STAFF12                                                 AS staff12, --민간모집간호조무사
+                STAFF13                                                 AS staff13, --민간모집임상병리사
+                STAFF14                                                 AS staff14, --민간모집방사선사
+                STAFF15                                                 AS staff15, --민간모집기타인력
+                CREATE_DATE                                             AS createDate,
+                UPDATE_DATE                                             AS updateDate,
+                CREATE_BY_ID                                            AS createById,
+                UPDATE_BY_ID                                            AS updateById,
+                LOCATION_CODE                                           AS locationCode,
+                CENTER_NAME                                             AS centerName
             FROM
-                STAFF_MANAGER AM
+                STAFF_MANAGER
             WHERE 1 = 1
+            AND GUBUN = #{gubun}
         ]]>
         
-        <if test='hospitalName != null and hospitalName != ""'>
+        <if test='centerName != null and centerName != ""'>
             <![CDATA[
-                AND HOSPITAL_NAME LIKE CONCAT('%', #{hospitalName}, '%')
+                AND CENTER_NAME LIKE CONCAT('%', #{centerName}, '%')
             ]]>
         </if>
-        <if test='useYn != null and useYn != ""'>
+        <if test='locationCode != null and locationCode != ""'>
             <![CDATA[
-                AND USE_YN = #{useYn}
+                AND LOCATION_CODE = #{locationCode}
             ]]>
         </if>
         <![CDATA[
@@ -178,43 +188,4 @@
         ]]>
     </select>
     
-    <select id="selectStaffManagerInfoOne" parameterType="String" resultType="StaffManagerDTO">
-        <![CDATA[
-            SELECT
-                AM.IDX,
-                AM.MANAGER_NAME                                          AS managerName,
-                AM.HOSPITAL_NAME                                         AS hospitalName,
-                AM.DEPARTMENT_NAME                                       AS departmentName,
-                AM.MANAGER_EMAIL                                         AS managerEmail,
-                AM.MANAGER_PHONE                                         AS managerPhone,
-                AM.USE_PURPOSE                                           AS usePurpose,
-                AM.API_KEY                                               AS apiKey,
-                AM.COOPERATIVE_CODE                                      AS cooperativeCode,
-                AM.USE_YN                                                AS useYn,
-                AM.REQUEST_DATE                                          AS requestDate,
-                AM.ACCEPT_DATE                                           AS acceptDate,
-                AM.CREATE_DATE                                           AS createDate,
-                CASE WHEN AM.USE_YN = 'C' THEN '승인완료'
-                     WHEN AM.USE_YN = 'W' THEN '승인대기'
-                     WHEN AM.USE_YN = 'D' THEN '승인해제'
-                ELSE '' END                                              AS useynNm,
-                AM.MANAGER_ID                                            AS managerId,
-                AM.CENTER_CODE                                           AS centerCode,
-                (SELECT CI.CENTER_NAME 
-                    FROM CENTER_INFO CI
-                    WHERE AM.CENTER_CODE = CI.CENTER_CODE
-                )                                                        AS centerName,
-                (SELECT CH.COOPERATIVE_NAME 
-                    FROM COOPERATIVE_HOSPITAL CH
-                    WHERE AM.COOPERATIVE_CODE = CH.COOPERATIVE_CODE
-                )                                                        AS cooperativeName,
-                AM.EXPIRE_DATE                                           AS expireDate
-            FROM
-                STAFF_MANAGER AM
-            WHERE 1 = 1
-            AND IDX = #{idx}
-        ]]>
-    </select>
-    
-    
 </mapper>

+ 103 - 12
src/main/webapp/WEB-INF/jsp/staff/manager/medicaledit.jsp

@@ -51,23 +51,27 @@ $( function(){
             staff11: {
                 number:true,
                 digits:true
-            },
-            staff12: {
+            }
+            <c:choose>     
+            <c:when test="${list.gubun eq 'M'}">
+            ,staff12: {
                 number:true,
                 digits:true
-            },
-            staff13: {
+            }
+            ,staff13: {
                 number:true,
                 digits:true
-            },
-            staff14: {
+            }
+            ,staff14: {
                 number:true,
                 digits:true
-            },
-            staff15: {
+            }
+            ,staff15: {
                 number:true,
                 digits:true
             }
+            </c:when>
+            </c:choose>
         },
         onkeyup: function( element, event ) {
             $( element ).valid();
@@ -89,19 +93,20 @@ $( function(){
 
         <div class="main">
             <jsp:include page="${data._INCLUDE}/top.jsp"></jsp:include>
-            <form id="editForm" action="./medicalupdate" method="post">
+            <form id="editForm" action="./staffupdate" method="post">
             <input type="hidden" name="status" value="<c:out value="${list.status}" />">
+            <input type="hidden" name="gubun" value="<c:out value="${list.gubun}" />">
             <main class="content">
                 <div class="container-fluid p-0">
                     <div class="row">
                         <div class="col-12 col-lg-6">
-                            <h1 class="h3 mb-3">생활치료센터 의료인력 관리</h1>
+                            <h1 class="h3 mb-3">생활치료센터  <c:if test="${list.gubun eq 'M'}">의료</c:if><c:if test="${list.gubun eq 'G'}">행정</c:if>인력 관리</h1>
                         </div>
                         <div class="col-12 col-lg-6  text-right">
                             <nav aria-label="breadcrumb">
                                 <ol class="breadcrumb">
                                     <li class="breadcrumb-item"><a href="javscript:;">Home</a></li>
-                                    <li class="breadcrumb-item">의료인력 관리</li>
+                                    <li class="breadcrumb-item"><c:if test="${list.gubun eq 'M'}">의료</c:if><c:if test="${list.gubun eq 'G'}">행정</c:if>인력 관리</li>
                                 </ol>
                             </nav>
                         </div>
@@ -110,10 +115,12 @@ $( function(){
                         <div class="col-12">
                             <div class="card">
                                 <div class="card-body">
-                                    <h5 class="text-info mb-3">협력병원 인력 현황</h5>
+                                    <h5 class="text-info mb-3"><c:if test="${list.gubun eq 'M'}">협력병원</c:if><c:if test="${list.gubun eq 'G'}">행정</c:if> 인력 현황</h5>
                                     <div class="table-responsive">
                                         <table class="table table-striped text-center">
                                             <colgroup>
+                                            <c:choose>     
+                                                <c:when test="${list.gubun eq 'M'}">
                                                 <col style=" width: 14%; ">
                                                 <col style=" width: 14%; ">
                                                 <col style=" width: 14%; ">
@@ -121,9 +128,21 @@ $( function(){
                                                 <col style=" width: 14%; ">
                                                 <col style=" width: 14%; ">
                                                 <col style=" width: 14%; ">
+                                                </c:when>
+                                                <c:when test="${list.gubun eq 'G'}">
+                                                <col style=" width: 16%; ">
+                                                <col style=" width: 16%; ">
+                                                <col style=" width: 16%; ">
+                                                <col style=" width: 16%; ">
+                                                <col style=" width: 16%; ">
+                                                <col style=" width: 16%; ">
+                                                </c:when>
+                                            </c:choose>
                                             </colgroup>
                                             <thead>
                                                 <tr>
+                                                <c:choose>     
+                                                    <c:when test="${list.gubun eq 'M'}">    
                                                     <th>구분</th>
                                                     <th>의사</th>
                                                     <th>간호사</th>
@@ -131,10 +150,22 @@ $( function(){
                                                     <th>임상병리사</th>
                                                     <th>방사선사</th>
                                                     <th>행정인력</th>
+                                                    </c:when>
+                                                    <c:when test="${list.gubun eq 'G'}">    
+                                                    <th>구분</th>
+                                                    <th>복지부</th>
+                                                    <th>지자체</th>
+                                                    <th>환경부</th>
+                                                    <th>소방청</th>
+                                                    <th>기타</th>
+                                                    </c:when>
+                                                </c:choose>
                                                 </tr>
                                             </thead>
                                             <tbody>
                                                 <tr>
+                                                <c:choose>     
+                                                    <c:when test="${list.gubun eq 'M'}">
                                                     <td>인원</td>
                                                     <td><input type="text" name="staff1" class="form-control text-center" value="<c:out value="${list.staff1}" />"></td>
                                                     <td><input type="text" name="staff2" class="form-control text-center" value="<c:out value="${list.staff2}" />"></td>
@@ -142,6 +173,16 @@ $( function(){
                                                     <td><input type="text" name="staff4" class="form-control text-center" value="<c:out value="${list.staff4}" />"></td>
                                                     <td><input type="text" name="staff5" class="form-control text-center" value="<c:out value="${list.staff5}" />"></td>
                                                     <td><input type="text" name="staff6" class="form-control text-center" value="<c:out value="${list.staff6}" />"></td>
+                                                    </c:when>
+                                                    <c:when test="${list.gubun eq 'G'}">
+                                                    <td>인원</td>
+                                                    <td><input type="text" name="staff1" class="form-control text-center" value="<c:out value="${list.staff1}" />"></td>
+                                                    <td><input type="text" name="staff2" class="form-control text-center" value="<c:out value="${list.staff2}" />"></td>
+                                                    <td><input type="text" name="staff3" class="form-control text-center" value="<c:out value="${list.staff3}" />"></td>
+                                                    <td><input type="text" name="staff4" class="form-control text-center" value="<c:out value="${list.staff4}" />"></td>
+                                                    <td><input type="text" name="staff5" class="form-control text-center" value="<c:out value="${list.staff5}" />"></td>
+                                                    </c:when>
+                                                </c:choose>    
                                                 </tr>
                                             </tbody>
                                         </table>
@@ -165,18 +206,38 @@ $( function(){
                                             </colgroup>
                                             <thead>
                                                 <tr>
+                                                <c:choose>     
+                                                    <c:when test="${list.gubun eq 'M'}">
                                                     <th>구분</th>
                                                     <th>공보의</th>
                                                     <th>군의관</th>
                                                     <th>간호사관생도</th>
+                                                    </c:when>
+                                                    <c:when test="${list.gubun eq 'G'}">
+                                                    <th>구분</th>
+                                                    <th>국방부</th>
+                                                    <th>경찰청</th>
+                                                    <th>소방청</th>
+                                                    </c:when>
+                                                </c:choose>   
                                                 </tr>
                                             </thead>
                                             <tbody>
                                                 <tr>
+                                                <c:choose>     
+                                                    <c:when test="${list.gubun eq 'M'}">
                                                     <td>인원</td>
                                                     <td><input type="text" name="staff7" class="form-control text-center" value="<c:out value="${list.staff7}" />"></td>
                                                     <td><input type="text" name="staff8" class="form-control text-center" value="<c:out value="${list.staff8}" />"></td>
                                                     <td><input type="text" name="staff9" class="form-control text-center" value="<c:out value="${list.staff9}" />"></td>
+                                                    </c:when>
+                                                    <c:when test="${list.gubun eq 'G'}">
+                                                    <td>인원</td>
+                                                    <td><input type="text" name="staff6" class="form-control text-center" value="<c:out value="${list.staff6}" />"></td>
+                                                    <td><input type="text" name="staff7" class="form-control text-center" value="<c:out value="${list.staff7}" />"></td>
+                                                    <td><input type="text" name="staff8" class="form-control text-center" value="<c:out value="${list.staff8}" />"></td>
+                                                    </c:when>
+                                                </c:choose>
                                                 </tr>
                                             </tbody>
                                         </table>
@@ -193,6 +254,8 @@ $( function(){
                                     <div class="table-responsive">
                                         <table class="table table-striped text-center">
                                             <colgroup>
+                                            <c:choose>     
+                                                <c:when test="${list.gubun eq 'M'}">
                                                 <col style=" width: 14%; ">
                                                 <col style=" width: 14%; ">
                                                 <col style=" width: 14%; ">
@@ -200,9 +263,19 @@ $( function(){
                                                 <col style=" width: 14%; ">
                                                 <col style=" width: 14%; ">
                                                 <col style=" width: 14%; ">
+                                                </c:when>
+                                                <c:when test="${list.gubun eq 'G'}">
+                                                <col style=" width: 25%; ">
+                                                <col style=" width: 25%; ">
+                                                <col style=" width: 25%; ">
+                                                <col style=" width: 25%; ">
+                                                </c:when>
+                                            </c:choose>
                                             </colgroup>
                                             <thead>
                                                 <tr>
+                                                <c:choose>     
+                                                    <c:when test="${list.gubun eq 'M'}">
                                                     <th>구분</th>
                                                     <th>민간모집의사</th>
                                                     <th>민간모집간호사</th>
@@ -210,10 +283,20 @@ $( function(){
                                                     <th>민간모집임상병리사</th>
                                                     <th>민간모집방사선사</th>
                                                     <th>민간모집기타인력</th>
+                                                    </c:when>
+                                                    <c:when test="${list.gubun eq 'G'}">
+                                                    <th>구분</th>
+                                                    <th>방역</th>
+                                                    <th>청소</th>
+                                                    <th>기타</th>
+                                                    </c:when>
+                                                </c:choose>
                                                 </tr>
                                             </thead>
                                             <tbody>
                                                 <tr>
+                                                <c:choose>     
+                                                    <c:when test="${list.gubun eq 'M'}">
                                                     <td>인원</td>
                                                     <td><input type="text" name="staff10" class="form-control text-center" value="<c:out value="${list.staff10}" />"></td>
                                                     <td><input type="text" name="staff11" class="form-control text-center" value="<c:out value="${list.staff11}" />"></td>
@@ -221,6 +304,14 @@ $( function(){
                                                     <td><input type="text" name="staff13" class="form-control text-center" value="<c:out value="${list.staff13}" />"></td>
                                                     <td><input type="text" name="staff14" class="form-control text-center" value="<c:out value="${list.staff14}" />"></td>
                                                     <td><input type="text" name="staff15" class="form-control text-center" value="<c:out value="${list.staff15}" />"></td>
+                                                    </c:when>
+                                                    <c:when test="${list.gubun eq 'G'}">
+                                                    <td>인원</td>
+                                                    <td><input type="text" name="staff9" class="form-control text-center" value="<c:out value="${list.staff9}" />"></td>
+                                                    <td><input type="text" name="staff10" class="form-control text-center" value="<c:out value="${list.staff10}" />"></td>
+                                                    <td><input type="text" name="staff11" class="form-control text-center" value="<c:out value="${list.staff11}" />"></td>
+                                                    </c:when>
+                                                </c:choose>    
                                                 </tr>
                                             </tbody>
                                         </table>

+ 92 - 6
src/main/webapp/WEB-INF/jsp/staff/manager/medicalinfo.jsp

@@ -20,13 +20,13 @@
                 <div class="container-fluid p-0">
                     <div class="row">
                         <div class="col-12 col-lg-6">
-                            <h1 class="h3 mb-3">생활치료센터 의료인력 관리</h1>
+                           <h1 class="h3 mb-3">생활치료센터  <c:if test="${list.gubun eq 'M'}">의료</c:if><c:if test="${list.gubun eq 'G'}">행정</c:if>인력 관리</h1>
                         </div>
                         <div class="col-12 col-lg-6  text-right">
                             <nav aria-label="breadcrumb">
                                 <ol class="breadcrumb">
                                     <li class="breadcrumb-item"><a href="javscript:;">Home</a></li>
-                                    <li class="breadcrumb-item">의료인력 관리</li>
+                                    <li class="breadcrumb-item"><c:if test="${list.gubun eq 'M'}">의료</c:if><c:if test="${list.gubun eq 'G'}">행정</c:if>인력 관리</li>
                                 </ol>
                             </nav>
                         </div>
@@ -35,10 +35,12 @@
                         <div class="col-12">
                             <div class="card">
                                 <div class="card-body">
-                                    <h5 class="text-info mb-3">협력병원 인력 현황</h5>
+                                    <h5 class="text-info mb-3"><c:if test="${list.gubun eq 'M'}">협력병원</c:if><c:if test="${list.gubun eq 'G'}">행정</c:if> 인력 현황</h5>
                                     <div class="table-responsive">
                                         <table class="table table-striped text-center">
                                             <colgroup>
+                                            <c:choose>     
+                                                <c:when test="${list.gubun eq 'M'}">
                                                 <col style=" width: 14%; ">
                                                 <col style=" width: 14%; ">
                                                 <col style=" width: 14%; ">
@@ -46,9 +48,21 @@
                                                 <col style=" width: 14%; ">
                                                 <col style=" width: 14%; ">
                                                 <col style=" width: 14%; ">
+                                                </c:when>
+                                                <c:when test="${list.gubun eq 'G'}">
+                                                <col style=" width: 16%; ">
+                                                <col style=" width: 16%; ">
+                                                <col style=" width: 16%; ">
+                                                <col style=" width: 16%; ">
+                                                <col style=" width: 16%; ">
+                                                <col style=" width: 16%; ">
+                                                </c:when>
+                                            </c:choose>
                                             </colgroup>
                                             <thead>
                                                 <tr>
+                                                <c:choose>     
+                                                    <c:when test="${list.gubun eq 'M'}">    
                                                     <th>구분</th>
                                                     <th>의사</th>
                                                     <th>간호사</th>
@@ -56,10 +70,22 @@
                                                     <th>임상병리사</th>
                                                     <th>방사선사</th>
                                                     <th>행정인력</th>
+                                                    </c:when>
+                                                    <c:when test="${list.gubun eq 'G'}">    
+                                                    <th>구분</th>
+                                                    <th>복지부</th>
+                                                    <th>지자체</th>
+                                                    <th>환경부</th>
+                                                    <th>소방청</th>
+                                                    <th>기타</th>
+                                                    </c:when>
+                                                </c:choose>
                                                 </tr>
                                             </thead>
                                             <tbody>
                                                 <tr>
+                                                <c:choose>     
+                                                    <c:when test="${list.gubun eq 'M'}">
                                                     <td>인원</td>
                                                     <td><c:out value="${list.staff1}" /></td>
                                                     <td><c:out value="${list.staff2}" /></td>
@@ -67,6 +93,16 @@
                                                     <td><c:out value="${list.staff4}" /></td>
                                                     <td><c:out value="${list.staff5}" /></td>
                                                     <td><c:out value="${list.staff6}" /></td>
+                                                    </c:when>
+                                                    <c:when test="${list.gubun eq 'G'}">
+                                                    <td>인원</td>
+                                                    <td><c:out value="${list.staff1}" /></td>
+                                                    <td><c:out value="${list.staff2}" /></td>
+                                                    <td><c:out value="${list.staff3}" /></td>
+                                                    <td><c:out value="${list.staff4}" /></td>
+                                                    <td><c:out value="${list.staff5}" /></td>
+                                                    </c:when>
+                                                </c:choose>    
                                                 </tr>
                                             </tbody>
                                         </table>
@@ -79,7 +115,7 @@
                         <div class="col-12">
                             <div class="card">
                                 <div class="card-body">
-                                    <h5 class="text-info mb-3">공공 인력 현황</h5>
+                                    <h5 class="text-info mb-3"><c:if test="${list.gubun eq 'M'}">공공</c:if><c:if test="${list.gubun eq 'G'}">서비스</c:if> 인력 현황</h5>
                                     <div class="table-responsive">
                                         <table class="table table-striped text-center">
                                             <colgroup>
@@ -90,18 +126,38 @@
                                             </colgroup>
                                             <thead>
                                                 <tr>
+                                                <c:choose>     
+                                                    <c:when test="${list.gubun eq 'M'}">
                                                     <th>구분</th>
                                                     <th>공보의</th>
                                                     <th>군의관</th>
                                                     <th>간호사관생도</th>
+                                                    </c:when>
+                                                    <c:when test="${list.gubun eq 'G'}">
+                                                    <th>구분</th>
+                                                    <th>국방부</th>
+                                                    <th>경찰청</th>
+                                                    <th>소방청</th>
+                                                    </c:when>
+                                                </c:choose>   
                                                 </tr>
                                             </thead>
                                             <tbody>
                                                 <tr>
+                                                <c:choose>     
+                                                    <c:when test="${list.gubun eq 'M'}">
                                                     <td>인원</td>
                                                     <td><c:out value="${list.staff7}" /></td>
                                                     <td><c:out value="${list.staff8}" /></td>
                                                     <td><c:out value="${list.staff9}" /></td>
+                                                    </c:when>
+                                                    <c:when test="${list.gubun eq 'G'}">
+                                                    <td>인원</td>
+                                                    <td><c:out value="${list.staff6}" /></td>
+                                                    <td><c:out value="${list.staff7}" /></td>
+                                                    <td><c:out value="${list.staff8}" /></td>
+                                                    </c:when>
+                                                </c:choose>
                                                 </tr>
                                             </tbody>
                                         </table>
@@ -114,10 +170,12 @@
                         <div class="col-12">
                             <div class="card">
                                 <div class="card-body">
-                                    <h5 class="text-info mb-3">민간 인력 현황</h5>
+                                    <h5 class="text-info mb-3"><c:if test="${list.gubun eq 'M'}">민간</c:if><c:if test="${list.gubun eq 'G'}">사설업체</c:if> 인력 현황</h5>
                                     <div class="table-responsive">
                                         <table class="table table-striped text-center">
                                             <colgroup>
+                                            <c:choose>     
+                                                <c:when test="${list.gubun eq 'M'}">
                                                 <col style=" width: 14%; ">
                                                 <col style=" width: 14%; ">
                                                 <col style=" width: 14%; ">
@@ -125,9 +183,19 @@
                                                 <col style=" width: 14%; ">
                                                 <col style=" width: 14%; ">
                                                 <col style=" width: 14%; ">
+                                                </c:when>
+                                                <c:when test="${list.gubun eq 'G'}">
+                                                <col style=" width: 25%; ">
+                                                <col style=" width: 25%; ">
+                                                <col style=" width: 25%; ">
+                                                <col style=" width: 25%; ">
+                                                </c:when>
+                                            </c:choose>
                                             </colgroup>
                                             <thead>
                                                 <tr>
+                                                <c:choose>     
+                                                    <c:when test="${list.gubun eq 'M'}">
                                                     <th>구분</th>
                                                     <th>민간모집의사</th>
                                                     <th>민간모집간호사</th>
@@ -135,10 +203,20 @@
                                                     <th>민간모집임상병리사</th>
                                                     <th>민간모집방사선사</th>
                                                     <th>민간모집기타인력</th>
+                                                    </c:when>
+                                                    <c:when test="${list.gubun eq 'G'}">
+                                                    <th>구분</th>
+                                                    <th>방역</th>
+                                                    <th>청소</th>
+                                                    <th>기타</th>
+                                                    </c:when>
+                                                </c:choose>
                                                 </tr>
                                             </thead>
                                             <tbody>
                                                 <tr>
+                                                <c:choose>     
+                                                    <c:when test="${list.gubun eq 'M'}">
                                                     <td>인원</td>
                                                      <td><c:out value="${list.staff10}" /></td>
                                                     <td><c:out value="${list.staff11}" /></td>
@@ -146,6 +224,14 @@
                                                     <td><c:out value="${list.staff13}" /></td>
                                                     <td><c:out value="${list.staff14}" /></td>
                                                     <td><c:out value="${list.staff15}" /></td>
+                                                    </c:when>
+                                                    <c:when test="${list.gubun eq 'G'}">
+                                                    <td>인원</td>
+                                                     <td><c:out value="${list.staff9}" /></td>
+                                                    <td><c:out value="${list.staff10}" /></td>
+                                                    <td><c:out value="${list.staff11}" /></td>
+                                                    </c:when>
+                                                </c:choose>    
                                                 </tr>
                                             </tbody>
                                         </table>
@@ -157,7 +243,7 @@
                     <div class="row mt-3">
                         <div class="col-12">
                             <div class="text-right">
-                                <button type="button" class="btn btn-primary w100" onclick="location.href='medicaledit';">수정</button>
+                                <button type="button" class="btn btn-primary w100" onclick="location.href='edit?gubun=${list.gubun}';">수정</button>
                             </div>
                         </div>
                     </div>