Ver código fonte

의료인력현황 수정(정원,사용불가, 사용불가사유 )
일자별 수정가능하도록 수정
생활치료센터현황 메뉴 수정(실가용인원,사용불가인원, 사용불가사유)
수정사항 - 슬라이드 7번까지함

huiwon.seo 4 anos atrás
pai
commit
2020b6558e

+ 239 - 2
src/main/java/com/lemon/lifecenter/controller/StaffTotalManagerController.java

@@ -228,7 +228,7 @@ public class StaffTotalManagerController extends LifeCenterController {
         mv.addObject("paging", paging);
         mv.addObject("page", page);
         mv.addObject("pageSize", dto.getLimitMax());
-        
+        mv.addObject( "nowYmd", LifeCenterFunction.getNow( "yyyy-MM-dd" ) );
         return mv;
     }
     //의료인력현황 /meditotal
@@ -251,6 +251,10 @@ public class StaffTotalManagerController extends LifeCenterController {
           dto.setGubun(inputgubun);
           dto.setStatusFlag(inputStatusFlag);
           
+          if( dto.getRegistDay().equals( "" ) ) {
+              dto.setRegistDay( LifeCenterFunction.getNow( "yyyy-MM-dd" ) );
+          }
+          
           int total = service.selectStaffManagerCount(dto);
           StaffManagerDTO ndto = new StaffManagerDTO();
           if (total > 0) {
@@ -263,7 +267,7 @@ public class StaffTotalManagerController extends LifeCenterController {
           ModelAndView mv = setMV("staffTotal/edit");
           
           mv.addObject("list", ndto);
-          
+          mv.addObject( "nowYmd", LifeCenterFunction.getNow( "yyyy-MM-dd" ) );
           return mv;
       }
     //의료인력현황 /meditotal
@@ -443,6 +447,239 @@ public class StaffTotalManagerController extends LifeCenterController {
           return mv;
       }
       
+      
+      
+      @RequestMapping("/center/report/excel")
+      public void centerStaffReportExcel(
+              @ModelAttribute("dto") StaffManagerDTO dto,
+              @RequestParam(value="locationCode", required=false, defaultValue="") String inputlocationCode,
+              @RequestParam(value="centerName", required=false, defaultValue="") String inputCenterName,
+              @RequestParam(value="registDay", required=false, defaultValue="") String inputRegistDay,
+              @RequestParam(value="page", required=false, defaultValue="1") int page,
+              HttpServletRequest request,HttpServletResponse response) {
+          
+          List<LocationDTO> locationCodeList = centerService.selectLocation();
+          
+          
+          dto.setGubun("m");
+          
+          if (inputRegistDay.isEmpty()) {
+              inputRegistDay = LifeCenterFunction.getNow("yyyy-MM-dd");
+          }
+          
+          dto.setRegistDay(inputRegistDay);
+          
+          // 센터별관리화면에서는 레몬생치는 제외
+          dto.setEtcType( "manager" );
+          
+          int total = service.selectStaffManagerCount(dto);
+          List<StaffManagerDTO> list = new ArrayList<StaffManagerDTO>();
+          if (total > 0) {
+              
+              dto.setLimit( 0 );
+              dto.setLimitMax( total + 1 );
+              
+              list = service.selectCenterStaffReportList(dto);
+              for (int i = 0; i < list.size(); i++) {
+                  int staffTotal = list.get(i).getStaffTotal();
+                  int staffCapacity = list.get(i).getStaffCapacity();
+                  
+                  float rate = 0.f;
+
+                  
+                  if (staffTotal == 0 || staffCapacity == 0) {
+                  } else {
+                      rate = (float) (((float) staffTotal / (float) staffCapacity) * 100.0);
+                  }
+                  
+                  String str = String.format("%.1f", rate);
+                  list.get(i).setRate(Float.parseFloat(str));
+                  list.get(i).setStaff1(staffCapacity - staffTotal);
+                  
+              }
+          }
+          
+          
+          getCenterStaffReportExcel(request, response, list);
+      }
+      
+      
+      private void getCenterStaffReportExcel(HttpServletRequest request, HttpServletResponse response, List<StaffManagerDTO> data ) {
+          String password = LifeCenterSessionController.getSession(request, "sesPhoneNumber");
+          password = password.toLowerCase();
+          if (!password.equals("null") && !password.equals("")) {
+              password = password.replace("-", "");
+              password = password.substring(3).trim();
+          } else {
+              password = "";
+          }
+
+          Workbook workbook = new XSSFWorkbook();
+          Sheet sheet1 = workbook.createSheet("firstSheet");
+          DecimalFormat df = new DecimalFormat("#,###");
+
+          // 1.셀 스타일 및 폰트 설정
+          CellStyle styleOfBoardFillFontBlackBold16 = workbook.createCellStyle();
+          // 정렬
+          styleOfBoardFillFontBlackBold16.setAlignment(CellStyle.ALIGN_CENTER); // 가운데 정렬
+          styleOfBoardFillFontBlackBold16.setVerticalAlignment(CellStyle.VERTICAL_CENTER); // 높이 가운데 정렬
+          // 배경색
+          styleOfBoardFillFontBlackBold16.setFillForegroundColor(IndexedColors.LIGHT_YELLOW.getIndex());
+          styleOfBoardFillFontBlackBold16.setFillPattern(CellStyle.SOLID_FOREGROUND);
+          // 테두리 선 (우,좌,위,아래)
+          styleOfBoardFillFontBlackBold16.setBorderRight(HSSFCellStyle.BORDER_THIN);
+          styleOfBoardFillFontBlackBold16.setBorderLeft(HSSFCellStyle.BORDER_THIN);
+          styleOfBoardFillFontBlackBold16.setBorderTop(HSSFCellStyle.BORDER_THIN);
+          styleOfBoardFillFontBlackBold16.setBorderBottom(HSSFCellStyle.BORDER_THIN);
+          // 폰트 설정
+          Font fontOfGothicBlackBold16 = workbook.createFont();
+//          fontOfGothicBlackBold16.setFontName("나눔고딕"); //글씨체
+          fontOfGothicBlackBold16.setFontHeight((short) (10 * 20)); // 사이즈
+          fontOfGothicBlackBold16.setBoldweight(Font.BOLDWEIGHT_BOLD); // 볼드 (굵게)
+          styleOfBoardFillFontBlackBold16.setFont(fontOfGothicBlackBold16);
+
+          int i = 1;
+          Row row = sheet1.createRow(0);
+          Cell cell1 = row.createCell(0);
+          Cell cell2 = row.createCell(1);
+          Cell cell3 = row.createCell(2);
+          Cell cell4 = row.createCell(3);
+          Cell cell5 = row.createCell(4);
+          Cell cell6 = row.createCell(5);
+          Cell cell7 = row.createCell(6);
+          Cell cell8 = row.createCell(7);
+          Cell cell9 = row.createCell(8);
+          Cell cell10 = row.createCell(9);
+
+          cell1.setCellStyle(styleOfBoardFillFontBlackBold16);
+          cell2.setCellStyle(styleOfBoardFillFontBlackBold16);
+          cell3.setCellStyle(styleOfBoardFillFontBlackBold16);
+          cell4.setCellStyle(styleOfBoardFillFontBlackBold16);
+          cell5.setCellStyle(styleOfBoardFillFontBlackBold16);
+          cell6.setCellStyle(styleOfBoardFillFontBlackBold16);
+          cell7.setCellStyle(styleOfBoardFillFontBlackBold16);
+          cell8.setCellStyle(styleOfBoardFillFontBlackBold16);
+          cell9.setCellStyle(styleOfBoardFillFontBlackBold16);
+          cell10.setCellStyle(styleOfBoardFillFontBlackBold16);
+
+          sheet1.setColumnWidth(0, 10000); // 번호
+          sheet1.setColumnWidth(1, 10000); // 소관
+          sheet1.setColumnWidth(2, 5000); // 생활치료센터명
+          sheet1.setColumnWidth(3, 5000); // 정원
+          sheet1.setColumnWidth(4, 8000); // 현원
+          sheet1.setColumnWidth(5, 6000); // 가동률
+          sheet1.setColumnWidth(6, 4000); // 입실가능인원
+          sheet1.setColumnWidth(7, 4000); // 실가용인원
+          sheet1.setColumnWidth(8, 4000); // 사용불가 인원
+          sheet1.setColumnWidth(9, 4000); // 사용불가 사유
+
+          cell1.setCellValue("번호");
+          cell2.setCellValue("생활치료센터명");
+          cell3.setCellValue("소관");
+          cell4.setCellValue("정원");
+          cell5.setCellValue("현원");
+          cell6.setCellValue("가동률");
+          cell7.setCellValue("입실가능인원");
+          cell8.setCellValue("실가용인원");
+          cell9.setCellValue("사용불가 인원");
+          cell10.setCellValue("사용불가 사유");
+
+          for (StaffManagerDTO dto : data) {
+              row = sheet1.createRow(i);
+              cell1 = row.createCell(0);
+              cell2 = row.createCell(1);
+              cell3 = row.createCell(2);
+              cell4 = row.createCell(3);
+              cell5 = row.createCell(4);
+              cell6 = row.createCell(5);
+              cell7 = row.createCell(6);
+              cell8 = row.createCell(7);
+              cell9 = row.createCell(8);
+              cell10 = row.createCell(9);
+              
+              String num = ( i > 1 )?  String.valueOf(i -1) : "총계";
+              cell1.setCellValue( num );
+              cell2.setCellValue( dto.getCenterName() );
+              cell3.setCellValue( dto.getLocationName() );
+              cell4.setCellValue( dto.getStaffCapacity() );
+              cell5.setCellValue( dto.getStaffTotal() );
+              cell6.setCellValue( String.valueOf( dto.getRate() ) + "%" );
+              cell7.setCellValue( dto.getStaff1() );
+              cell8.setCellValue( dto.getStaff1() - dto.getUnavailableTotal() );
+              cell9.setCellValue( dto.getUnavailableTotal() );
+              cell10.setCellValue( dto.getUnavailableNote() );
+              
+              
+              i++;
+          }
+
+          row = sheet1.createRow(i);
+          cell1 = row.createCell(2);
+          cell2 = row.createCell(3);
+          cell3 = row.createCell(4);
+          cell4 = row.createCell(5);
+          cell5 = row.createCell(6);
+          cell6 = row.createCell(7);
+          cell7 = row.createCell(8);
+          cell8 = row.createCell(9);
+          cell9 = row.createCell(10);
+          cell10 = row.createCell(11);
+
+          try {
+//            File file = new File(".");
+//            String rootPath = file.getAbsolutePath();
+//            System.out.println("현재 프로젝트의 경로 : "+rootPath );
+
+              // JBOSS에서 구동시 /home1/jboss/jboss-eap-7.3/domain/test/excel-temp 경로에 저장이됨
+              String tempPath = "../excel-temp/testExcel.xlsx";
+              String downName = LifeCenterFunction.getNow() + " 생활치료센터현황.xlsx";
+              File xlsFile = new File(tempPath);
+//            FileOutputStream fileOut = new FileOutputStream(tempPath);
+//            workbook.write(fileOut);
+//            fileOut.close();
+
+              ByteArrayOutputStream fileOut = new ByteArrayOutputStream();
+              FileOutputStream fos = new FileOutputStream(tempPath);
+              workbook.write(fileOut);
+
+              InputStream filein = new ByteArrayInputStream(fileOut.toByteArray());
+              OPCPackage opc = OPCPackage.open(filein);
+
+              POIFSFileSystem fileSystem = new POIFSFileSystem();
+
+              EncryptionInfo encryptionInfo = new EncryptionInfo(EncryptionMode.agile);
+              Encryptor encryptor = encryptionInfo.getEncryptor();
+              encryptor.confirmPassword(password);
+
+              opc.save(encryptor.getDataStream(fileSystem));
+              opc.flush();
+
+              fileSystem.writeFilesystem(fos);
+
+              fileOut.close();
+              opc.close();
+
+              filein.close();
+              fileSystem.close();
+
+              LifeCenterFileDownload.download(request, response, tempPath, downName);
+
+              xlsFile.delete();
+          } catch (FileNotFoundException e) {
+              e.printStackTrace();
+          } catch (IOException e) {
+              e.printStackTrace();
+          } catch (GeneralSecurityException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        } catch (InvalidFormatException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+      }
+      
+      
+      
       //의료인력관리 /medi/managerlist
       //행정인력현황 /gov/managerlist
       @RequestMapping( value="{addr}/excel", method=RequestMethod.POST )

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

@@ -43,9 +43,24 @@ public class StaffManagerDTO {
     private String statusFlag = "";
     private String etcType="";
     
+    private int unavailableTotal = 0;
+    private String unavailableNote = "";
+    
     private int limit = 0;
     private int limitMax = 0;
     
+    public int getUnavailableTotal() {
+        return unavailableTotal;
+    }
+    public void setUnavailableTotal(int unavailableTotal) {
+        this.unavailableTotal = unavailableTotal;
+    }
+    public String getUnavailableNote() {
+        return unavailableNote;
+    }
+    public void setUnavailableNote(String unavailableNote) {
+        this.unavailableNote = unavailableNote;
+    }
     public float getRate() {
         return rate;
     }

+ 28 - 11
src/main/resources/mybatis/mapper/staffTotal/staffManager.xml

@@ -45,7 +45,7 @@
         </if>
         <if test='statusFlag == "U"'>
             <![CDATA[
-                AND REGIST_DAY = TO_CHAR(NOW(),'YYYY-MM-DD')
+                AND REGIST_DAY = TO_CHAR(#{registDay},'YYYY-MM-DD')
             ]]>
         </if>
     </select>
@@ -55,6 +55,7 @@
             SELECT
                 CENTER_CODE                                             AS centerCode,
                 GUBUN                                                   AS gubun,
+                REGIST_DAY                                              AS registDay,
                 STAFF_CAPACITY                                          AS staffCapacity,
                 STAFF1                                                  AS staff1, --의사
                 STAFF2                                                  AS staff2, --간호사
@@ -74,7 +75,9 @@
                 CREATE_DATE                                             AS createDate,
                 UPDATE_DATE                                             AS updateDate,
                 CREATE_BY_ID                                            AS createById,
-                UPDATE_BY_ID                                            AS updateById
+                UPDATE_BY_ID                                            AS updateById,
+                UNAVAILABLE_TOTAL                                       AS unavailableTotal,
+                UNAVAILABLE_NOTE                                        AS unavailableNote
             FROM
                 STAFF_MANAGER SM
             WHERE 1 = 1
@@ -95,7 +98,7 @@
         </if>
         <if test='statusFlag == "U"'>
             <![CDATA[
-                AND REGIST_DAY = TO_CHAR(NOW(),'YYYY-MM-DD')
+                AND REGIST_DAY = TO_CHAR(#{registDay},'YYYY-MM-DD')
             ]]>
         </if>
     </select>
@@ -124,7 +127,9 @@
                     STAFF14,
                     STAFF15,
                     CREATE_DATE,
-                    CREATE_BY_ID
+                    CREATE_BY_ID,
+                    UNAVAILABLE_TOTAL,
+                    UNAVAILABLE_NOTE
                 )
             values
                 (
@@ -148,7 +153,9 @@
                     #{staff14},
                     #{staff15},
                     NOW(),
-                    #{createById}
+                    #{createById},
+                    #{unavailableTotal},
+                    #{unavailableNote}
                 )
         ]]>
     </insert>
@@ -175,11 +182,13 @@
                 STAFF14 = #{staff14},
                 STAFF15 = #{staff15},
                 UPDATE_DATE = NOW(),
-                UPDATE_BY_ID = #{updateById}
+                UPDATE_BY_ID = #{updateById},
+                UNAVAILABLE_TOTAL = #{unavailableTotal},
+                UNAVAILABLE_NOTE = #{unavailableNote}
             WHERE
                 CENTER_CODE = #{centerCode}
                 AND GUBUN = #{gubun}
-                AND REGIST_DAY = TO_CHAR(NOW(),'YYYY-MM-DD')
+                AND REGIST_DAY = TO_CHAR(#{registDay},'YYYY-MM-DD')
         ]]>
     </insert>
     <select id="selectStaffManagerList" parameterType="StaffManagerDTO" resultType="StaffManagerDTO">
@@ -218,7 +227,9 @@
                      WHERE CI.LOCATION_CODE = LI.LOCATION_CODE)         AS locationName,
                 SUM(STAFF1 + STAFF2 + STAFF3 + STAFF4 + STAFF5 +
                  STAFF6 + STAFF7 + STAFF8 + STAFF9 + STAFF10 +
-                 STAFF11 + STAFF12 + STAFF13 + STAFF14 + STAFF15)       AS staffTotal
+                 STAFF11 + STAFF12 + STAFF13 + STAFF14 + STAFF15)       AS staffTotal,
+                 UNAVAILABLE_TOTAL                                       AS unavailableTotal,
+                 UNAVAILABLE_NOTE                                        AS unavailableNote
             FROM CENTER_INFO CI
             LEFT JOIN STAFF_MANAGER SM
               ON CI.CENTER_CODE = SM.CENTER_CODE
@@ -298,7 +309,9 @@
                 (STAFF1 + STAFF2 + STAFF3 + STAFF4 + STAFF5 +
                  STAFF6 + STAFF7 + STAFF8 + STAFF9 + STAFF10 +
                  STAFF11 + STAFF12 + STAFF13 + STAFF14 + STAFF15)          AS staffTotal,
-                 DECODE(SM.CENTER_CODE, NULL , 'I', 'U')                      AS statusFlag
+                 DECODE(SM.CENTER_CODE, NULL , 'I', 'U')                      AS statusFlag,
+                 UNAVAILABLE_TOTAL                                       AS unavailableTotal,
+                UNAVAILABLE_NOTE                                        AS unavailableNote
             FROM
                 (SELECT TO_CHAR(NOW(),'YYYY-MM-DD') AS GEN_DATE
                     FROM DB_ROOT
@@ -348,7 +361,9 @@
                 (STAFF1 + STAFF2 + STAFF3 + STAFF4 + STAFF5 +
                  STAFF6 + STAFF7 + STAFF8 + STAFF9 + STAFF10 +
                  STAFF11 + STAFF12 + STAFF13 + STAFF14 + STAFF15)          AS staffTotal,
-                 null                                                      AS statusFlag
+                 null                                                      AS statusFlag,
+                 UNAVAILABLE_TOTAL                                       AS unavailableTotal,
+                UNAVAILABLE_NOTE                                        AS unavailableNote
             FROM
                 STAFF_MANAGER SM, CENTER_INFO CI
             WHERE 1 = 1
@@ -401,7 +416,9 @@
                    NVL(SUM(SM.STAFF_CAPACITY ), 0)                               AS staffCapacity,
                    SUM(STAFF1 + STAFF2 + STAFF3 + STAFF4 + STAFF5 +
                        STAFF6 + STAFF7 + STAFF8 + STAFF9 + STAFF10 +
-                       STAFF11 + STAFF12 + STAFF13 + STAFF14 + STAFF15)          AS staffTotal
+                       STAFF11 + STAFF12 + STAFF13 + STAFF14 + STAFF15)          AS staffTotal,
+                   SUM( UNAVAILABLE_TOTAL )                                      AS unavailableTotal,
+                   UNAVAILABLE_NOTE                                              AS unavailableNote
               FROM CENTER_INFO CI
               LEFT JOIN STAFF_MANAGER SM
                 ON CI.CENTER_CODE = SM.CENTER_CODE

+ 14 - 6
src/main/webapp/WEB-INF/jsp/staffTotal/daylist.jsp

@@ -180,8 +180,10 @@ $(function() {
                                             <c:choose>     
                                                 <c:when test="${gubun eq 'm'}">
                                                 <col style=" width: 4%; ">
-                                                <col style=" width: 6%; ">
+                                                <col style=" width: 8%; ">
+                                                <col style=" width: 4%; ">
                                                 <col style=" width: 4%; ">
+                                                <col style=" width: 8%; ">
                                                 <col style=" width: 4%; ">
                                                 <col style=" width: 4%; ">
                                                 <col style=" width: 4%; ">
@@ -227,6 +229,8 @@ $(function() {
                                                     <th rowspan="2">번호</th>
                                                     <th rowspan="2">작성일</th>
                                                     <th rowspan="2">정원</th>
+                                                    <th rowspan="2">사용불가인원</th>
+                                                    <th rowspan="2">사용불가 사유</th>
                                                     <th rowspan="2">인력총계<br>(단위:명)</th>
                                                     <th colspan="6">협력병원 인력 현황 (단위 :명)</th>
                                                     <th colspan="3">공공 인력 현황(단위 :명)</th>
@@ -287,13 +291,17 @@ $(function() {
                                                 <c:choose>
                                                     <c:when test="${total > 0}">
                                                         <c:forEach var="l" items="${list}" varStatus="lStatus">
-                                                        
                                                             <c:set var="pageNum" value="${ ( total - lStatus.index ) - ( (page - 1) * pageSize ) }" />
                                                             <tr>
                                                                 <td>${pageNum}</td>
-                                                                <td><c:out value="${l.registDay}" /></td>
+                                                                <td><c:out value="${l.registDay}" />
+                                                                <c:if test="${l.registDay eq null || l.registDay eq ''}">${nowYmd}</c:if>
+                                                                
+                                                                </td>
                                                                 <c:if test="${gubun eq 'm'}">
                                                                     <td><fmt:formatNumber value="${l.staffCapacity}" pattern="#,###" /></td>
+                                                                    <td><fmt:formatNumber value="${l.unavailableTotal}" pattern="#,###" /></td>
+                                                                    <td><c:out value="${l.unavailableNote}" /></td>
                                                                 </c:if>
 <%--                                                                 <td><c:out value="${l.staffTotal}" /></td> --%>
                                                                 <td><fmt:formatNumber value="${l.staffTotal}" pattern="#,###" /></td>
@@ -316,13 +324,13 @@ $(function() {
                                                                 </c:if>
                                                                 <c:choose>     
                                                                     <c:when test="${l.statusFlag eq 'I'}">
-                                                                        <td><button type="button" class="btn btn-primary w100" onclick="location.href='edit?statusFlag=${l.statusFlag}';">등록</button></td>
+                                                                        <td><button type="button" class="btn btn-primary w100" onclick="location.href='edit?statusFlag=${l.statusFlag}&registDay=${l.registDay}';">등록</button></td>
                                                                     </c:when>
                                                                     <c:when test="${l.statusFlag eq 'U'}">
-                                                                        <td><button type="button" class="btn btn-primary w100" onclick="location.href='edit?statusFlag=${l.statusFlag}';">수정</button></td>
+                                                                        <td><button type="button" class="btn btn-primary w100" onclick="location.href='edit?statusFlag=${l.statusFlag}&registDay=${l.registDay}';">수정</button></td>
                                                                     </c:when>
                                                                      <c:otherwise>
-                                                                        <td></td>
+                                                                        <td><button type="button" class="btn btn-primary w100" onclick="location.href='edit?statusFlag=${l.statusFlag}&registDay=${l.registDay}';">수정</button></td>
                                                                      </c:otherwise>
                                                                </c:choose>
                                                             </tr>

+ 9 - 2
src/main/webapp/WEB-INF/jsp/staffTotal/edit.jsp

@@ -94,13 +94,14 @@ $( function(){
         <div class="main">
             <jsp:include page="${data._INCLUDE}/top.jsp"></jsp:include>
             <form id="editForm" action="./staffupdate" method="post">
+            <input type="hidden" name="registDay" value="<c:out value="${list.registDay}" />">
             <input type="hidden" name="gubun" value="<c:out value="${list.gubun}" />">
             <input type="hidden" name="statusFlag" value="<c:out value="${list.statusFlag}" />">
             <main class="content">
                 <div class="container-fluid p-0">
                     <div class="row">
                         <div class="col-12 col-lg-6">
-                            <h1 class="h3 mb-3">생활치료센터  <c:if test="${list.gubun eq 'm'}">의료</c:if><c:if test="${list.gubun eq 'g'}">행정</c:if>인력 관리</h1>
+                            <h1 class="h3 mb-3">생활치료센터  <c:if test="${list.gubun eq 'm'}">의료</c:if><c:if test="${list.gubun eq 'g'}">행정</c:if>인력 관리 ( ${list.registDay}<c:if test="${list.registDay eq null || list.registDay eq ''}">${nowYmd}</c:if> )</h1>
                         </div>
                         <div class="col-12 col-lg-6  text-right">
                             <nav aria-label="breadcrumb">
@@ -121,18 +122,24 @@ $( function(){
                                         <table class="table table-striped text-center">
                                             <colgroup>
                                                 <col style=" width: 25%; ">
-                                                <col style=" width: 75%; ">
+                                                <col style=" width: 25%; ">
+                                                <col style=" width: 25%; ">
+                                                <col style=" width: 25%; ">
                                             </colgroup>
                                             <thead>
                                                 <tr>
                                                     <th>구분</th>
                                                     <th>생활치료센터 정원</th>
+                                                    <th>사용불가 인원</th>
+                                                    <th>사용불가 사유</th>
                                                 </tr>
                                             </thead>
                                             <tbody>
                                                 <tr>
                                                     <td>정원</td>
                                                     <td><input type="text" name="staffCapacity" class="form-control text-center" value="<c:out value="${list.staffCapacity}" />"></td>
+                                                    <td><input type="text" name="unavailableTotal" class="form-control text-center" value="<c:out value="${list.unavailableTotal}" />" placeholder="0"></td>
+                                                    <td><input type="text" name="unavailableNote" class="form-control text-left" value="<c:out value="${list.unavailableNote}" />"></td>
                                                 </tr>
                                             </tbody>
                                         </table>

+ 16 - 7
src/main/webapp/WEB-INF/jsp/staffTotal/report/list.jsp

@@ -190,22 +190,28 @@ function getExcel(){
                                         <table class="table table-striped text-center">
                                             <colgroup>
                                                 <col style=" width: 4%; ">
-                                                <col style=" width: 6%; ">
-                                                <col style=" width: 6%; ">
-                                                <col style=" width: 4%; ">
-                                                <col style=" width: 4%; ">
-                                                <col style=" width: 4%; ">
-                                                <col style=" width: 4%; ">
+                                                <col style=" width: 15%; ">
+                                                <col style=" width: 10%; ">
+                                                <col style=" width: 8%; ">
+                                                <col style=" width: 8%; ">
+                                                <col style=" width: 8%; ">
+                                                <col style=" width: 8%; ">
+                                                <col style=" width: 8%; ">
+                                                <col style=" width: 8%; ">
+                                                <col style=" width: 15%; ">
                                             </colgroup>
                                             <thead>
                                                 <tr>
                                                     <th rowspan="2">번호</th>
-                                                    <th rowspan="2">소관</th>
                                                     <th rowspan="2">생활치료센터명</th>
+                                                    <th rowspan="2">소관</th>
                                                     <th rowspan="2">정원</th>
                                                     <th rowspan="2">현원</th>
                                                     <th rowspan="2">가동률</th>
                                                     <th rowspan="2">입실가능인원</th>
+                                                    <th rowspan="2">실가용인원</th>
+                                                    <th rowspan="2">사용불가 인원</th>
+                                                    <th rowspan="2">사용불가 사유</th>
                                                 </tr>
                                             </thead>
                                             
@@ -225,6 +231,9 @@ function getExcel(){
                                                                 <td><fmt:formatNumber value="${l.staffTotal}" pattern="#,###" /></td>
                                                                 <td><c:out value="${l.rate}" />%</td>
                                                                 <td><fmt:formatNumber value="${l.staff1}" pattern="#,###" /></td>
+                                                                <td><fmt:formatNumber value="${l.staff1 - l.unavailableTotal}" pattern="#,###" /></td>
+                                                                <td><fmt:formatNumber value="${l.unavailableTotal}" pattern="#,###" /></td>
+                                                                <td><c:out value="${l.unavailableNote}" /></td>
 <%--                                                                 <td><fmt:formatNumber value="${l.staff4}" pattern="#,###" /></td> --%>
 <%--                                                                 <td><fmt:formatNumber value="${l.staff5}" pattern="#,###" /></td> --%>
 <%--                                                                 <td><fmt:formatNumber value="${l.staff6}" pattern="#,###" /></td> --%>