Pārlūkot izejas kodu

공지사항 완료
의견게시판 시작

junekeunsong 4 gadi atpakaļ
vecāks
revīzija
931f04e25c

+ 3 - 0
src/main/java/com/lemon/lifecenter/common/LifeCenterConfigVO.java

@@ -47,4 +47,7 @@ public class LifeCenterConfigVO {
     
     @Value( "${config.nonface.api.secret}" )
     public String nonFaceApiSecret;
+    
+    @Value( "${config.file.path}" )
+    public String filePath;
 }

+ 213 - 16
src/main/java/com/lemon/lifecenter/controller/BoardController.java

@@ -21,6 +21,7 @@ import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.FileCopyUtils;
 import org.springframework.web.bind.annotation.ModelAttribute;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.servlet.ModelAndView;
@@ -47,7 +48,7 @@ public class BoardController extends LifeCenterController {
     
     private LifeCenterPaging paging;
     
-    @RequestMapping("/list")
+    @RequestMapping("/notice/list")
     public ModelAndView boardList(
             @RequestParam(value="searchTxt", required=false, defaultValue="") String searchTxt,
             @RequestParam(value="selectState", required=false, defaultValue="") String selectState,
@@ -79,7 +80,7 @@ public class BoardController extends LifeCenterController {
         paging = LifeCenterPaging.getInstance();
         paging.paging(config, total, page, param);
         
-        ModelAndView mv = setMV("board/list");
+        ModelAndView mv = setMV("notice/list");
         mv.addObject("sesGroupIdx", sesGroupIdx);
         mv.addObject("list", list);
         mv.addObject("total", total);
@@ -91,18 +92,28 @@ public class BoardController extends LifeCenterController {
         return mv;
     }
     
-    @RequestMapping("/new")
-    public ModelAndView boardNew() {
-        ModelAndView mv = setMV("board/new");
+    @RequestMapping("/notice/new")
+    public ModelAndView boardNew(HttpServletRequest request, HttpServletResponse response) {
+        String sesGroupIdx = LifeCenterSessionController.getSession( request, "sesGroupIdx" );
+        ModelAndView mv = setMV("notice/new");
+        mv.addObject("groupIdx",sesGroupIdx);
+        
         return mv;
     }
     
-    @RequestMapping("/new/insert")
+    @RequestMapping("/notice/new/insert")
     @Transactional(propagation=Propagation.REQUIRED)
     public String boardNewInsert(
             HttpServletRequest request, HttpServletResponse response,
             @ModelAttribute("dto") final BoardDTO dto,
             MultipartFile file) {
+        String sesId = LifeCenterSessionController.getSession(request, "sesId");
+        String sesGroupIdx = LifeCenterSessionController.getSession(request, "sesGroupIdx");
+        
+        if (!sesGroupIdx.equals("1")) {
+            LifeCenterFunction.scriptMessage( response, "alertBox({ txt: '공지사항 작성 권한이 없습니다.', callBack : function(){ location.href='/board/notice/list'; } });" );
+            return "/common/blank";
+        }
         
         if (file.isEmpty() == false) {
             UUID uuid = UUID.randomUUID();
@@ -112,7 +123,7 @@ public class BoardController extends LifeCenterController {
             String saveFileName = uuid + "." + ext;
             
             try {
-                String tempPath = "../notice-temp";
+                String tempPath = config.filePath;
                 File saveFile = new File(tempPath, saveFileName);
                 FileCopyUtils.copy(file.getBytes(),saveFile);
             } catch (IOException e) {
@@ -127,8 +138,6 @@ public class BoardController extends LifeCenterController {
             dto.setFileSize(fileSize);
         }
 
-        String sesId = LifeCenterSessionController.getSession(request, "sesId");
-        
         String title = dto.getTitle().trim();
         String content = dto.getContent().trim();
         
@@ -153,22 +162,210 @@ public class BoardController extends LifeCenterController {
             }
         }
         
-        return "redirect:/board/content?postSeq=" + dto.getPostSeq();
+        return "redirect:/board/notice/content?postSeq=" + dto.getPostSeq();
     }
     
-    @RequestMapping("/content")
+    @RequestMapping("/notice/content")
     public ModelAndView boardContent(
             @RequestParam(value="postSeq", required=false, defaultValue="") int postSeq,
             HttpServletRequest request, HttpServletResponse response) {
-        String sesId  = LifeCenterSessionController.getSession( request, "sesId" );
+        String referer = request.getHeader("referer");
         String sesGroupIdx = LifeCenterSessionController.getSession( request, "sesGroupIdx" );
-        ModelAndView mv = setMV("board/content");
+        
+        int total = boardService.selectNoticeBoardCountOne(postSeq);
+        BoardDTO dto = new BoardDTO();
+        if (total > 0) {
+            boardService.updateNoticeView(postSeq);
+            dto = boardService.selectNoticeBoardInfoOne(postSeq);
+        }
+        
+        int prePostCnt = boardService.selectPrePostCount(postSeq);
+        int nextPostCnt = boardService.selectNextPostCount(postSeq);
+        
+        BoardDTO preDto = new BoardDTO();
+        BoardDTO nextDto = new BoardDTO();
+        if (prePostCnt > 0) {
+            preDto = boardService.selectPrePost(postSeq);
+        }
+        
+        if (nextPostCnt > 0) {
+            nextDto = boardService.selectNextPost(postSeq);
+        }
+        
+        ModelAndView mv = setMV("notice/content");
+        mv.addObject("filePath", config.filePath);
+        mv.addObject("content", dto);
+        mv.addObject("groupIdx", sesGroupIdx);
+        mv.addObject("prePostCnt", prePostCnt);
+        mv.addObject("nextPostCnt", nextPostCnt);
+        mv.addObject("prePost", preDto);
+        mv.addObject("nextPost", nextDto);
+        mv.addObject("referer", referer);
+        return mv;
+    }
+    
+    @RequestMapping(value="/notice/content/file", method=RequestMethod.GET)
+    public void boardFile(HttpServletRequest request, HttpServletResponse response,
+            @RequestParam(value="postSeq", required=false, defaultValue="") int postSeq) {
+        
+        int total = boardService.selectFileCount(postSeq);
+        BoardDTO dto = new BoardDTO();
+        if (total > 0) {
+            dto = boardService.selectFile(postSeq);
+            String filePath = config.filePath + "/" + dto.getFileName();
+            String fileName = dto.getFileOriginalName();
+            logger.error("filePath -- > " + filePath);
+            LifeCenterFileDownload.download(request, response, filePath, fileName);
+        }
+    }
+    
+    @RequestMapping(value="/notice/content/delete")
+    @Transactional(propagation=Propagation.REQUIRED)
+    public String contentDelete(HttpServletRequest request, HttpServletResponse response,
+            @RequestParam(value="postSeq", required=false, defaultValue="") int postSeq) {
+        String sesGroupIdx = LifeCenterSessionController.getSession(request, "sesGroupIdx");
+        
+        if (!sesGroupIdx.equals("1")) {
+            LifeCenterFunction.scriptMessage( response, "alertBox({ txt: '해당 글을 삭제할 수 없습니다.', callBack : function(){ location.href='/board/notice/list'; } });" );
+            return "/common/blank";
+        }
+        
+        boardService.deleteNoticeIfno(postSeq);
+        boardService.deleteFile(postSeq);
+        
+        LifeCenterFunction.scriptMessage( response, "alertBox({ txt: '게시글이 삭제되었습니다. ', callBack : function(){ location.href='/board/notice/list'; } });" );
+        
+        return "/common/blank";
+    }
+    
+    @RequestMapping("/notice/edit")
+    public ModelAndView boardEdit(HttpServletRequest request, HttpServletResponse response,
+            @RequestParam(value="postSeq", required=false, defaultValue="") int postSeq) {
+        ModelAndView mv = setMV("notice/edit");
+        String sesGroupIdx = LifeCenterSessionController.getSession(request, "sesGroupIdx");
+//        
+//        if (!sesGroupIdx.equals("1")) {
+//            LifeCenterFunction.scriptMessage( response, "alertBox({ txt: '공지사항 작성 권한이 없습니다.', callBack : function(){ location.href='./list'; } });" );
+//            return "/common/blank";
+//        }
+        
+        BoardDTO dto = new BoardDTO();
+        int cnt = boardService.selectNoticeBoardCountOne(postSeq);
+        if (cnt == 0) {
+            
+        } else {
+            dto = boardService.selectNoticeBoardInfoOne(postSeq);
+        }
+        mv.addObject("groupIdx", sesGroupIdx);
+        mv.addObject("item", dto);
         return mv;
     }
     
-    @RequestMapping("edit")
-    public ModelAndView boardEdit() {
-        ModelAndView mv = setMV("board/edit");
+    @RequestMapping("/notice/edit/update")
+    @Transactional(propagation=Propagation.REQUIRED)
+    public String boardEditUpdate(
+            HttpServletRequest request, HttpServletResponse response,
+            @ModelAttribute("dto") final BoardDTO dto,
+            MultipartFile file) {
+        
+        String sesId = LifeCenterSessionController.getSession(request, "sesId");
+        String sesGroupIdx = LifeCenterSessionController.getSession(request, "sesGroupIdx");
+        
+        if (!sesGroupIdx.equals("1")) {
+            LifeCenterFunction.scriptMessage( response, "alertBox({ txt: '공지사항 작성 권한이 없습니다.', callBack : function(){ location.href='./list'; } });" );
+            return "/common/blank";
+        }
+        
+        int postSeq = dto.getPostSeq();
+        
+        if (file.isEmpty() == false) {
+            UUID uuid = UUID.randomUUID();
+            String fileName = file.getOriginalFilename();
+            int fileSize = (int) file.getSize(); //단위는 byte
+            String ext = FilenameUtils.getExtension(fileName);
+            String saveFileName = uuid + "." + ext;
+            
+            try {
+                File saveFile = new File(config.filePath, saveFileName);
+                FileCopyUtils.copy(file.getBytes(),saveFile);
+                
+                String path = config.filePath + "/" + dto.getFileName().trim();
+                File rFile = new File(path);
+                rFile.delete();
+            } catch (IOException e) {
+                e.printStackTrace();
+                LifeCenterFunction.scriptMessage( response, "alertBox({ txt : '파일 업로드에 실패하였습니다.', callBack : function(){ history.back(); } });" );
+                return "/common/blank";
+            }
+            
+            dto.setFileOriginalName(fileName);
+            dto.setFileName(saveFileName);
+            dto.setFileExtension(ext);
+            dto.setFileSize(fileSize);
+            int cnt = boardService.selectFileCount(postSeq);
+            if (cnt > 0) {
+                boardService.updateFile(dto);
+            } else {
+                boardService.fileUploadDataInsert(dto);
+            }
+            
+        } else {
+            if (dto.getFileOriginalName().equals("")) {
+                String path = config.filePath + "/" + dto.getFileName().trim();
+                File rFile = new File(path);
+                rFile.delete();
+                boardService.deleteFile(postSeq);
+            }
+        }
+        
+        dto.setUpdateBy(sesId);
+        boardService.updateNoticeBoard(dto);
+        
+        return "redirect:/board/notice/content?postSeq=" + dto.getPostSeq();
+    }
+    
+    @RequestMapping("/qna/list")
+    public ModelAndView qnsList(@RequestParam(value="searchTxt", required=false, defaultValue="") String searchTxt,
+            @RequestParam(value="selectState", required=false, defaultValue="") String selectState,
+            @RequestParam(value="page", required=false, defaultValue="1") int page,
+            HttpServletRequest request, HttpServletResponse response) {
+        String sesGroupIdx = LifeCenterSessionController.getSession( request, "sesGroupIdx" );
+        BoardDTO dto = new BoardDTO();
+        
+        if (!selectState.equals("")) {
+            if (selectState.equals("title")) {
+                dto.setTitle(searchTxt);
+            } else if (selectState.equals("createBy")) {
+                dto.setCreateBy(searchTxt);
+            } else if (selectState.equals("content")) {
+                dto.setContent(searchTxt);
+            }
+        }
+        
+        dto.setLimit( ( Integer.valueOf( page ) - 1 ) * config.pageDataSize );
+        dto.setLimitMax( config.pageDataSize );
+        
+        List<BoardDTO> list = new ArrayList<BoardDTO>();
+        
+        int total = boardService.selectQnaListCount(dto);
+        if (total == 0) {
+        } else {
+            list = boardService.selectQnaList(dto);
+        }
+        
+        String param = "";
+        paging = LifeCenterPaging.getInstance();
+        paging.paging(config, total, page, param);
+        
+        ModelAndView mv = setMV("qna/list");
+        mv.addObject("sesGroupIdx", sesGroupIdx);
+        mv.addObject("list", list);
+        mv.addObject("total", total);
+        mv.addObject("selectState", selectState);
+        mv.addObject("searchTxt", searchTxt);
+        mv.addObject("paging", paging);
+        mv.addObject("page", page);
+        mv.addObject("pageSize", dto.getLimitMax());
         return mv;
     }
 }

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

@@ -78,7 +78,7 @@ public class PatientController extends LifeCenterController {
             @RequestParam(value="page", required=false, defaultValue="1") int page,
             
             @RequestParam(value="sortType", required=false, defaultValue="patient_name") String sortType,
-            @RequestParam(value="sort", required=false, defaultValue="desc") String sort,
+            @RequestParam(value="sort", required=false, defaultValue="asc") String sort,
             
             HttpServletRequest request,HttpServletResponse response) {
         

+ 36 - 0
src/main/java/com/lemon/lifecenter/dto/BoardDTO.java

@@ -5,6 +5,7 @@ public class BoardDTO {
     private String title         = "";
     private String content       = "";
     private String createBy      = "";
+    private String createByName  = "";
     private String createDate    = null;
     private String updateBy      = "";
     private String updateDate    = null;
@@ -22,6 +23,35 @@ public class BoardDTO {
     private int limit = 0;
     private int limitMax = 0;
     
+    private int prePostSeq = 0;
+    private String prePostTitle = "";
+    private int nextPostSeq = 0;
+    private String nextPostTitle = "";
+    
+    public int getPrePostSeq() {
+        return prePostSeq;
+    }
+    public void setPrePostSeq(int prePostSeq) {
+        this.prePostSeq = prePostSeq;
+    }
+    public String getPrePostTitle() {
+        return prePostTitle;
+    }
+    public void setPrePostTitle(String prePostTitle) {
+        this.prePostTitle = prePostTitle;
+    }
+    public int getNextPostSeq() {
+        return nextPostSeq;
+    }
+    public void setNextPostSeq(int nextPostSeq) {
+        this.nextPostSeq = nextPostSeq;
+    }
+    public String getNextPostTitle() {
+        return nextPostTitle;
+    }
+    public void setNextPostTitle(String nextPostTitle) {
+        this.nextPostTitle = nextPostTitle;
+    }
     public int getPostSeq() {
         return postSeq;
     }
@@ -46,6 +76,12 @@ public class BoardDTO {
     public void setCreateBy(String createBy) {
         this.createBy = createBy;
     }
+    public String getCreateByName() {
+        return createByName;
+    }
+    public void setCreateByName(String createByName) {
+        this.createByName = createByName;
+    }
     public String getCreateDate() {
         return createDate;
     }

+ 19 - 0
src/main/java/com/lemon/lifecenter/mapper/BoardMapper.java

@@ -10,8 +10,27 @@ import com.lemon.lifecenter.dto.BoardDTO;
 @Repository
 @Mapper
 public interface BoardMapper {
+    // 공지사항
     public void noticeInsert(BoardDTO dto);
     public int selectNoticeBoardListCount(BoardDTO dto);
     public List<BoardDTO> selectNoticeBoardList(BoardDTO dto);
     public void fileUploadDataInsert(BoardDTO dto);
+    public int selectNoticeBoardCountOne(int postSeq);
+    public BoardDTO selectNoticeBoardInfoOne(int postSeq);
+    public int updateNoticeBoard(BoardDTO dto);
+    public int selectFileCount(int postSeq);
+    public int updateFile(BoardDTO dto);
+    public int deleteFile(int postSeq);
+    public BoardDTO selectFile(int postSeq);
+    public int selectPrePostCount(int postSeq);
+    public BoardDTO selectPrePost(int postSeq);
+    public int selectNextPostCount(int postSeq);
+    public BoardDTO selectNextPost(int postSeq);
+    public int updateNoticeView(int postSeq);
+    public int deleteNoticeIfno(int postSeq);
+    // 공지사항
+    //의견게시판
+    public int selectQnaListCount(BoardDTO dto);
+    public List<BoardDTO> selectQnaList(BoardDTO dto);
+    //의견게시판
 }

+ 57 - 0
src/main/java/com/lemon/lifecenter/service/BoardService.java

@@ -13,6 +13,7 @@ public class BoardService {
     @Autowired
     private BoardMapper mapper;
     
+    // 공자사항
     public void noticeInsert(BoardDTO dto) {
         mapper.noticeInsert(dto);
     }
@@ -28,4 +29,60 @@ public class BoardService {
     public void fileUploadDataInsert(BoardDTO dto) {
         mapper.fileUploadDataInsert(dto);
     }
+    
+    public int selectNoticeBoardCountOne(int postSeq) {
+        return mapper.selectNoticeBoardCountOne(postSeq);
+    }
+    
+    public BoardDTO selectNoticeBoardInfoOne(int postSeq) {
+        return mapper.selectNoticeBoardInfoOne(postSeq);
+    }
+    
+    public int updateNoticeBoard(BoardDTO dto) {
+        return mapper.updateNoticeBoard(dto);
+    }
+    
+    public int selectFileCount(int postSeq) {
+        return mapper.selectFileCount(postSeq);
+    }
+    
+    public int updateFile(BoardDTO dto) {
+        return mapper.updateFile(dto);
+    }
+    
+    public int deleteFile(int postSeq) {
+        return mapper.deleteFile(postSeq);
+    }
+    
+    public BoardDTO selectFile(int postSeq) {
+        return mapper.selectFile(postSeq);
+    }
+    
+    public int selectPrePostCount(int postSeq) {
+        return mapper.selectPrePostCount(postSeq);
+    }
+    public BoardDTO selectPrePost(int postSeq) {
+        return mapper.selectPrePost(postSeq);
+    }
+    public int selectNextPostCount(int postSeq) {
+        return mapper.selectNextPostCount(postSeq);
+    }
+    public BoardDTO selectNextPost(int postSeq) {
+        return mapper.selectNextPost(postSeq);
+    }
+    public int updateNoticeView(int postSeq) {
+        return mapper.updateNoticeView(postSeq);
+    }
+    public int deleteNoticeIfno(int postSeq) {
+        return mapper.deleteNoticeIfno(postSeq);
+    }
+    //공지사항
+    //의견게시판
+    public int selectQnaListCount(BoardDTO dto) {
+        return mapper.selectQnaListCount(dto);
+    }
+    public List<BoardDTO> selectQnaList(BoardDTO dto) {
+        return mapper.selectQnaList(dto);
+    }
+    //의견게시판
 }

+ 2 - 1
src/main/resources/config.properties

@@ -11,4 +11,5 @@ config.nonface.api.token  = https://lemon.medihere.com/auth/token
 config.nonface.api.appVC  = https://lemon.medihere.com/app/vc
 config.nonface.api.key    = 94e1ab361de9b8ca057c84c19cf1d907
 config.nonface.api.secret = 56a06414162da198f450e604a736ab7a550e3cc1095e142f9847d3533a044a26
-config.nonface.clint.id   = mohw
+config.nonface.clint.id   = mohw
+config.file.path = ../notice-temp

+ 172 - 0
src/main/resources/mybatis/mapper/board/board.xml

@@ -2,6 +2,7 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 
 <mapper namespace="com.lemon.lifecenter.mapper.BoardMapper">
+    <!-- 공지사항 -->
     <select id="selectNoticeBoardListCount" parameterType="BoardDTO" resultType="int">
         <![CDATA[
             SELECT COUNT(*) AS cnt
@@ -76,4 +77,175 @@
                  VALUES (#{postSeq}, #{fileOriginalName}, #{fileName}, #{fileExtension}, #{fileSize})
         ]]>
     </insert>
+    
+    <select id="selectNoticeBoardCountOne" parameterType="int" resultType="int">
+        <![CDATA[
+            SELECT COUNT(*) CNT
+              FROM BOARD_NOTICE BN
+              LEFT JOIN BOARD_ATTACH_FILE BAF
+                ON BN.POST_SEQ = BAF.POST_SEQ
+             WHERE 1 = 1
+               AND BN.POST_SEQ = #{postSeq}
+        ]]>
+    </select>
+    
+    <update id="updateNoticeView" parameterType="int">
+        <![CDATA[
+            UPDATE BOARD_NOTICE
+               SET VIEWS = VIEWS + 1
+             WHERE POST_SEQ = #{postSeq}
+        ]]>
+    </update>
+    <select id="selectNoticeBoardInfoOne" parameterType="int" resultType="BoardDTO">
+        <![CDATA[
+            SELECT BN.POST_SEQ                                       AS postSeq,
+                   BN.TITLE                                          AS title,
+                   BN.CONTENT                                        AS content,
+                   BAF.FILE_ORIGINAL_NAME                            AS fileOriginalName,
+                   BAF.FILE_NAME                                     AS fileName,
+                   DATE_FORMAT(BN.CREATE_DATE, '%Y-%m-%d %H:%i:%s') AS createDate,
+                   BN.CREATE_BY                                      AS createBy,
+                   (SELECT NAME
+                      FROM member
+                     WHERE ID = BN.CREATE_BY)                        AS createByName,
+                   BN.VIEWS                                          AS views
+              FROM BOARD_NOTICE BN
+              LEFT JOIN BOARD_ATTACH_FILE BAF
+                ON BN.POST_SEQ = BAF.POST_SEQ
+             WHERE 1 = 1
+               AND BN.POST_SEQ = #{postSeq}
+        ]]>
+    </select>
+    
+    <update id="updateNoticeBoard" parameterType="BoardDTO">
+        <![CDATA[
+            UPDATE BOARD_NOTICE
+               SET TITLE     = #{title},
+                   CONTENT   = #{content},
+                   UPDATE_BY = #{updateBy},
+                   UPDATE_DATE = DATE_FORMAT(NOW(), '%Y-%m-%d %H:%i:%s')
+             WHERE POST_SEQ = #{postSeq}
+        ]]>
+    </update>
+    <select id="selectFileCount" parameterType="int" resultType="int">
+        <![CDATA[
+            SELECT COUNT(*) AS cnt
+              FROM BOARD_ATTACH_FILE
+             WHERE POST_SEQ = ${postSeq}
+        ]]>
+    </select>
+    <select id="selectFile" parameterType="int" resultType="BoardDTO">
+        <![CDATA[
+            SELECT FILE_NAME           AS fileName,
+                   FILE_ORIGINAL_NAME  AS fileOriginalName
+              FROM BOARD_ATTACH_FILE
+             WHERE POST_SEQ = ${postSeq}
+              
+        ]]>
+    </select>
+    <update id="updateFile" parameterType="BoardDTO">
+        <![CDATA[
+            UPDATE BOARD_ATTACH_FILE
+               SET FILE_ORIGINAL_NAME = #{fileOriginalName},
+                   FILE_NAME          = #{fileName},
+                   FILE_EXTENSION     = #{fileExtension},
+                   FILE_SIZE          = #{fileSize}
+             WHERE POST_SEQ = #{postSeq}
+        ]]>
+    </update>
+    <delete id="deleteFile" parameterType="int">
+        <![CDATA[
+            DELETE FROM BOARD_ATTACH_FILE WHERE POST_SEQ = #{postSeq}
+        ]]>
+    </delete>
+    <select id="selectPrePostCount" parameterType="int" resultType="int">
+        <![CDATA[
+            SELECT COUNT(*) AS cnt
+              FROM BOARD_NOTICE
+             WHERE POST_SEQ = (SELECT MAX(POST_SEQ) FROM BOARD_NOTICE WHERE POST_SEQ < #{postSeq})
+        ]]>
+    </select>
+    <select id="selectPrePost" parameterType="int" resultType="BoardDTO">
+        <![CDATA[
+            SELECT POST_SEQ AS prePostSeq,
+                   TITLE    AS prePostTitle
+              FROM BOARD_NOTICE
+             WHERE POST_SEQ = (SELECT MAX(POST_SEQ) FROM BOARD_NOTICE WHERE POST_SEQ < #{postSeq})
+        ]]>
+    </select>
+    <select id="selectNextPostCount" parameterType="int" resultType="int">
+        <![CDATA[
+            SELECT COUNT(*) AS cnt
+              FROM BOARD_NOTICE
+             WHERE POST_SEQ = (SELECT MIN(POST_SEQ) FROM BOARD_NOTICE WHERE POST_SEQ > #{postSeq})
+        ]]>
+    </select>
+    <select id="selectNextPost" parameterType="int" resultType="BoardDTO">
+        <![CDATA[
+            SELECT POST_SEQ AS nextPostSeq,
+                   TITLE    AS nextPostTitle
+              FROM BOARD_NOTICE
+             WHERE POST_SEQ = (SELECT MIN(POST_SEQ) FROM BOARD_NOTICE WHERE POST_SEQ > #{postSeq})
+        ]]>
+    </select>
+    <delete id="deleteNoticeIfno">
+        <![CDATA[
+            DELETE FROM BOARD_NOTICE WHERE POST_SEQ = #{postSeq}
+        ]]>
+    </delete>
+    <!-- 공지사항 -->
+    
+    <!-- 의견게시판 -->
+    <select id="selectQnaListCount" parameterType="BoardDTO" resultType="int">
+        <![CDATA[
+            SELECT COUNT(*) AS cnt
+              FROM BOARD_REQUEST
+             WHERE 1 = 1
+         ]]>
+         <if test='title != null and title != ""'>
+             <![CDATA[
+                 AND UPPER(TITLE) LIKE CONCAT('%', UPPER(#{title}), '%')
+             ]]>
+         </if>
+         <if test='createBy != null and createBy !=""'>
+             <![CDATA[
+                 AND UPPER(CREATE_BY) LIKE CONCAT('%', UPPER(#{createBy}), '%')
+             ]]>
+         </if>
+         <if test='content != null and content != ""'>
+             <![CDATA[
+                 AND CONTENT LIKE CONCAT('%', #{content}, '%')
+             ]]>
+         </if>
+    </select>
+        <select id="selectQnaList" parameterType="BoardDTO" resultType="BoardDTO">
+        <![CDATA[
+            SELECT POST_SEQ                                      AS postSeq,
+                   TITLE                                         AS title,
+                   CREATE_BY                                     AS createBy,
+                   DATE_FORMAT(CREATE_DATE, '%Y-%M-%D %H:%I:%S') AS createDate,
+                   VIEWS                                         AS views,
+                   (SELECT FILE_EXTENSION
+                      FROM BOARD_ATTACH_FILE BAF
+                    WHERE BAF.POST_SEQ = POST_SEQ)               AS fileExtension
+              FROM BOARD_REQUEST
+             WHERE 1 = 1
+         ]]>
+         <if test='title != null and title != ""'>
+             <![CDATA[
+                 AND UPPER(TITLE) LIKE CONCAT('%', UPPER(#{title}), '%')
+             ]]>
+         </if>
+         <if test='createBy != null and createBy !=""'>
+             <![CDATA[
+                 AND UPPER(CREATE_BY) LIKE CONCAT('%', UPPER(#{createBy}), '%')
+             ]]>
+         </if>
+         <if test='content != null and content != ""'>
+             <![CDATA[
+                 AND CONTENT LIKE CONCAT('%', #{content}, '%')
+             ]]>
+         </if>
+    </select>
+    <!-- 의견게시판 -->
 </mapper>

+ 0 - 85
src/main/webapp/WEB-INF/jsp/board/edit.jsp

@@ -1,85 +0,0 @@
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
-<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
-<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
-<%@ page language="java" contentType="text/html; charset=UTF-8"
-    pageEncoding="UTF-8"%>
-<jsp:include page="${data._INCLUDE}/header.jsp"></jsp:include>
-<script>
-</script>
-</head>
-<body>
-    <div class="wrapper">
-        <jsp:include page="${data._INCLUDE}/sidebar.jsp"></jsp:include>
-        
-        <div class="main">
-            <jsp:include page="${data._INCLUDE}/top.jsp"></jsp:include>
-
-            <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>
-                        </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>
-                                </ol>
-                            </nav>
-                        </div>
-                    </div>
-                    <div class="row">
-                        <div class="col-12">
-                            <div class="card">
-                                <form id="sendForm" action="?" method="post">
-                                    <div class="card-body">
-                                        <table class="table mobile-table">
-                                            <colgroup>
-                                                <col style="width:20%">
-                                                <col style="width:80%">
-                                            </colgroup>
-                                            <tr>
-                                                <th><span class="fix">*</span>제목</th>
-                                                <td>
-                                                    <input type="text" name="nbTitle" class="form-control" placeholder="제목을 입력하세요" maxlength="80" required>
-                                                </td>
-                                            </tr>
-                                            
-                                            <tr>
-                                                <th><span class="fix">*</span>내용</th>
-                                                <td>
-                                                    <textarea  class="form-control" rows="10" cols="" name="nbContent" placeholder="내용을 입력하세요" maxlength="1000" required></textarea>
-                                                </td>
-                                            </tr>
-                                            
-                                            <tr>
-                                                <th>첨부파일</th>
-                                                <td>
-                                                    <input type="file" name="fileName" >
-                                                </td>
-                                            </tr>
-                                        </table>
-                                        
-                                        <div class="row mt-3">
-                                            <div class="col-12">
-                                                <div class="text-right">
-                                                    <button type="button" class="btn btn-outline-primary w100" onclick="history.back();">취소</button>
-                                                    <button type="submit" class="btn btn-primary w100">삭제</button>
-                                                    <button type="submit" class="btn btn-primary w100">수정</button>
-                                                </div>
-                                            </div>
-                                        </div>
-                                    </div>
-                                </form>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-            </main>
-
-            <jsp:include page="${data._INCLUDE}/footer.jsp"></jsp:include>
-        </div>
-    </div>
-</body>
-</html>

+ 55 - 19
src/main/webapp/WEB-INF/jsp/board/content.jsp

@@ -5,6 +5,32 @@
     pageEncoding="UTF-8"%>
 <jsp:include page="${data._INCLUDE}/header.jsp"></jsp:include>
 <script>
+function deleteConfirm(){
+    alertBox({ type : "confirm", 
+               txt : "정말로 삭제할까요? (해당 게시글이 삭제되며 복구가 불가능합니다)", 
+               callBack : function( result ){
+                   console.log( result );
+                   if( result ){
+                       $( "#sendForm" ).attr( "action", "./content/delete" );
+                       $( "#sendForm" ).submit();
+                   }
+               }
+    });
+    return false;
+}
+
+var listPage = '<c:out value="${referer}"/>'.replaceAll( "&amp;", "&" );
+if( listPage.includes( '/board/notice/list' ) ) {
+    encodeURIComponent(listPage);
+    setCookie( "boardlistPage", listPage );
+}
+function goListPage(){
+    var referer = getCookie( "boardlistPage" );
+    if( referer == "" ) {
+        referer = "/board/notice/list";
+    }
+    location.href = referer;
+}
 </script>
 </head>
 <body>
@@ -32,7 +58,8 @@
                     <div class="row">
                         <div class="col-12">
                             <div class="card">
-                                <form id="sendForm" action="?" method="post">
+                                <form id="sendForm" action="./notice/content/delete" method="post">
+                                    <input type="hidden" name="postSeq" value="${content.postSeq}" >
                                     <div class="card-body">
                                         <table class="table mobile-table">
                                             <colgroup>
@@ -42,31 +69,25 @@
                                             </colgroup>
                                             
                                             <tr>
-                                                <td>No. 132</td>
+                                                <td>조회수 : <c:out value="${content.views}"></c:out></td>
                                                 <th class="text-center">작성자</th>
-                                                <td>보건복지부(mohw)</td>
+                                                <td><c:out value="${content.createBy}(${content.createByName})" /></td>
                                             </tr>
                                             
                                             <tr>
-                                                <td class="text-bold text-info">생활치료센터 공지를 알려 드립니다.</td>
+                                                <td class="text-bold text-info"><c:out value="${content.title}" /></td>
                                                 <th class="text-center">작성일</th>
-                                                <td>2020-12-12 11:25</td>
+                                                <td><c:out value="${content.createDate}" /></td>
                                             </tr>
                                             
                                             <tr>
-                                                <td colspan="3">
-                                                    <div style="min-height:200px;">
-                                                        ^오^ 생활치료센터 공지사항입니다<br/>
-                                                        ^오^ 생활치료센터 공지사항입니다<br/>
-                                                        ^오^ 생활치료센터 공지사항입니다<br/>
-                                                    </div>
-                                                </td>
+                                                <td colspan="3" style="white-space: pre-line;"><div style="min-height:200px;"><c:out value="${content.content}" /></div></td>
                                             </tr>
                                             
                                             <tr>
                                                 <td colspan="3">
                                                     <span class="badge bg-primary">첨부파일</span>
-                                                    <a href="/{download-path}/{file-name}" class="text-dark" target="_blank">공지문.xlsx</a>
+                                                    <a href="./content/file?postSeq=${content.postSeq}" class="text-dark" target="_blank"><c:out value="${content.fileOriginalName}" /></a>
                                                 </td>
                                             </tr>
                                         </table>
@@ -79,20 +100,36 @@
                                             
                                             <tr>
                                                 <th>이전글 ▲</th>
-                                                <td>이전 공지글 제목</td>
+                                                <td>
+                                                    <c:if test="${prePostCnt eq 0}">
+                                                        이전 글이 없습니다.
+                                                    </c:if>
+                                                    <c:if test="${prePostCnt ne 0}">
+                                                        <a href="./content?postSeq=${prePost.prePostSeq}"><c:out value="${prePost.prePostTitle}" /></a>
+                                                    </c:if>
+                                                </td>
                                             </tr>
                                             <tr>
                                                 <th>다음글 ▼</th>
-                                                <td>다음 공지글 제목</td>
+                                                <td>
+                                                    <c:if test="${nextPostCnt eq 0}">
+                                                        다음 글이 없습니다.
+                                                    </c:if>
+                                                    <c:if test="${nextPostCnt ne 0}">
+                                                        <a href="./content?postSeq=${nextPost.nextPostSeq}"><c:out value="${nextPost.nextPostTitle}" /></a>
+                                                    </c:if>
+                                                </td>
                                             </tr>
                                         </table>
                                         
                                         <div class="row mt-3">
                                             <div class="col-12">
                                                 <div class="text-right">
-                                                    <button type="submit" class="btn btn-primary w100">수정</button>
-                                                    <button type="submit" class="btn btn-danger w100">삭제</button>
-                                                    <button type="button" class="btn btn-outline-primary w100" onclick="history.back();">목록</button>
+                                                    <c:if test="${groupIdx eq '1'}">
+                                                        <button type="button" onclick="location.href='./edit?postSeq=${content.postSeq}';" class="btn btn-primary w100">수정</button>
+                                                        <button type="button" onclick="deleteConfirm();" class="btn btn-danger w100">삭제</button>
+                                                    </c:if>
+                                                    <button type="button" class="btn btn-outline-primary w100" onclick="goListPage();">목록</button>
                                                 </div>
                                             </div>
                                         </div>
@@ -103,7 +140,6 @@
                     </div>
                 </div>
             </main>
-
             <jsp:include page="${data._INCLUDE}/footer.jsp"></jsp:include>
         </div>
     </div>

+ 173 - 0
src/main/webapp/WEB-INF/jsp/notice/edit.jsp

@@ -0,0 +1,173 @@
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+    pageEncoding="UTF-8"%>
+<jsp:include page="${data._INCLUDE}/header.jsp"></jsp:include>
+<script>
+$( function(){
+    $( "#sendForm" ).validate({
+        rules: {
+            title : {
+                maxlength : 100
+            },
+            content: {
+                maxlength : 4000
+            },
+        },
+        messages : {
+            title : {
+                required : "제목을 입력해주세요."
+            },
+            content : {
+                required : "내용을 입력해주세요."
+            }
+        },
+        onkeyup: function( element, event ) {
+            $( element ).valid();
+        },
+        onfocusout: function (element) {
+            $( element ).val( $.trim( $( element ).val() ) );
+            $( element ).valid();
+        },
+        submitHandler: function(form) {
+            form.submit();
+        }
+    });
+    var groupIdx = "<c:out value='${groupIdx}'/>";
+    if (groupIdx != "1") {
+        alertBox({ txt : '공지사항 수정 권한이 없습니다.', callBack : function(){ location.href='./list' } });
+    }
+
+    var button = '';
+    var fileOrgName = '<c:out value="${item.fileOriginalName}" />';
+    console.log("fileOrgName -- > " + fileOrgName);
+    button = '<input type="file" style="display: none;" id="file" name="file" onchange="checkFile(this);">';
+    if (fileOrgName == "") {
+        button = '<input type="file" id="file" name="file" onchange="checkFile(this);">';
+        button += '<button type="button" class="btn btn-danger" id="fileRemoveBtn" onclick="removeFile();">첨부파일 삭제</button>';
+    } else {
+        button += '<button type="button" class="btn btn-danger" id="fileRemoveBtn" onclick="removeFileNameTag();">첨부파일 삭제</button>';
+    }
+
+    $("#fileTd").append(button);
+})
+
+function checkFile(el){
+    // files 로 해당 파일 정보 얻기.
+    var file = el.files;
+
+    // file[0].size 는 파일 용량 정보입니다.
+    if(file[0].size > 1024 * 1024 * 10){
+        // 용량 초과시 경고후 해당 파일의 용량도 보여줌
+        alert('10MB 이하 파일만 등록할 수 있습니다.\n\n' + '현재파일 용량 : ' + (Math.round(file[0].size / 1024 / 1024 * 100) / 100) + 'MB');
+    } else {
+        // 체크를 통과했다면 종료.
+        return;
+    }
+
+    // 체크에 걸리면 선택된 내용 취소 처리를 해야함.
+    // 파일선택 폼의 내용은 스크립트로 컨트롤 할 수 없습니다.
+    // 그래서 그냥 새로 폼을 새로 써주는 방식으로 초기화 합니다.
+    // 이렇게 하면 간단 !?
+    el.outerHTML = el.outerHTML;
+}
+
+function removeFileNameTag() {
+    $("#fileName").css("display", "none");
+    $("#file").remove();
+    $("#fileTd").prepend('<input type="file" id="file" name="file" onchange="checkFile(this);">');
+    $("input[name=fileOriginalName]").val("");
+    document.getElementById("fileRemoveBtn").setAttribute("onClick", "removeFile()");
+}
+
+function removeFile() {
+    $("#file").val("");
+}
+</script>
+</head>
+<body>
+    <div class="wrapper">
+        <jsp:include page="${data._INCLUDE}/sidebar.jsp"></jsp:include>
+        
+        <div class="main">
+            <jsp:include page="${data._INCLUDE}/top.jsp"></jsp:include>
+
+            <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>
+                        </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>
+                                </ol>
+                            </nav>
+                        </div>
+                    </div>
+                    <div class="row">
+                        <div class="col-12">
+                            <div class="card">
+                                <form id="sendForm" action="./edit/update" method="post" enctype="multipart/form-data">
+                                    <input type="hidden" name="postSeq" value="${item.postSeq}" >
+                                    <input type="hidden" name="fileName" value="${item.fileName}" >
+                                    <input type="hidden" name="fileOriginalName" value="${item.fileOriginalName}" >
+                                    <div class="card-body">
+                                        <table class="table mobile-table">
+                                            <colgroup>
+                                                <col style="width:20%">
+                                                <col style="width:80%">
+                                            </colgroup>
+                                            <tr>
+                                                <th><span class="fix">*</span>제목</th>
+                                                <td>
+                                                    <input type="text" name="title" class="form-control" value="${item.title}" placeholder="제목을 입력하세요" maxlength="80" required>
+                                                </td>
+                                            </tr>
+                                            
+                                            <tr>
+                                                <th><span class="fix">*</span>내용</th>
+                                                <td>
+                                                    <textarea  class="form-control" rows="10" cols="" name="content" placeholder="내용을 입력하세요" maxlength="1000" required><c:out value="${item.content}" /></textarea>
+                                                </td>
+                                            </tr>
+                                            
+                                            <tr>
+                                                <th>첨부파일</th>
+                                                <td id="fileTd">
+                                                    <c:if test="${item.fileOriginalName eq ''}">
+                                                        
+                                                    </c:if>
+                                                    <c:if test="${item.fileOriginalName ne ''}">
+                                                        <span id="fileName"><c:out value="${item.fileOriginalName}" /></span>
+                                                    </c:if>
+                                                    
+<!--                                                     <input type="file" style="display: none;" id="file" name="file" onchange="checkFile(this);"> -->
+                                                </td>
+                                            </tr>
+                                        </table>
+                                        
+                                        <div class="row mt-3">
+                                            <div class="col-12">
+                                                <div class="text-right">
+                                                    <button type="button" class="btn btn-outline-primary w100" onclick="history.back();">취소</button>
+                                                    <button type="submit" class="btn btn-primary w100">수정</button>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </form>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </main>
+
+            <jsp:include page="${data._INCLUDE}/footer.jsp"></jsp:include>
+        </div>
+    </div>
+</body>
+</html>

+ 2 - 2
src/main/webapp/WEB-INF/jsp/board/list.jsp

@@ -47,8 +47,8 @@
                                                     <div class="form-row">
                                                         <div class="col-6">
                                                             <select class="custom-select  form-control" id="selectState" name="selectState">
-                                                                <option value="title">제목</option>
-                                                                <option value="content">내용</option>
+                                                                <option value="title" <c:if test="${selectState eq 'title'}">selected="selected"</c:if>>제목</option>
+                                                                <option value="content" <c:if test="${selectState eq 'content'}">selected="selected"</c:if>>내용</option>
 <%--                                                                 <option value="sCenterName" <c:if test="${selectState eq 'sCenterName'}"> selected="selected"</c:if>>치료센터명</option> --%>
                                                             </select>
                                                         </div>

+ 18 - 1
src/main/webapp/WEB-INF/jsp/board/new.jsp

@@ -34,6 +34,11 @@ $( function(){
             form.submit();
         }
     });
+    var groupIdx = "<c:out value='${groupIdx}'/>";
+    if (groupIdx != "1") {
+        alertBox({ txt : '공지사항 작성 권한이 없습니다.', callBack : function(){ location.href='./list' } });
+    }
+    
 })
 
 function checkFile(el){
@@ -55,6 +60,17 @@ function checkFile(el){
     // 이렇게 하면 간단 !?
     el.outerHTML = el.outerHTML;
 }
+
+function removeFile() {
+    $("#file").val("");
+    /* if ($.browser.msie) { 
+        // ie 일때 input[type=file] init. 
+        $("#file").replaceWith( $("#file").clone(true) ); 
+    } else {
+        // other browser 일때 input[type=file] init. 
+        
+    } */
+}
 </script>
 </head>
 <body>
@@ -106,7 +122,8 @@ function checkFile(el){
                                             <tr>
                                                 <th>첨부파일</th>
                                                 <td>
-                                                    <input type="file" name="file" onchange="checkFile(this);">
+                                                    <input type="file" id="file" name="file" onchange="checkFile(this);">
+                                                    <button type="button" class="btn btn-danger" onclick="removeFile();">첨부파일 삭제</button>
 <!--                                                     <div class="form-row"> -->
 <!--                                                         <div class="col-6"> -->
 <!--                                                             <select class="custom-select  form-control" id="selectState" name="selectState"> -->

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

@@ -307,6 +307,7 @@ tr.phr-info td span.no-data{color:#999999;}
                                                                 <td><c:out value="${l.hospitalizationDate}" /></td>
                                                                 <td>
                                                                     <c:if test="${l.expectedDischargeDate ne ''}">
+                                                                        <c:out value="${l.expectedDischargeDate}" />
                                                                     </c:if>
                                                                 </td>
                                                                 <td>

+ 185 - 0
src/main/webapp/WEB-INF/jsp/qna/list.jsp

@@ -0,0 +1,185 @@
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+    pageEncoding="UTF-8"%>
+<jsp:include page="${data._INCLUDE}/header.jsp"></jsp:include>
+</head>
+<body>
+    <div class="wrapper">
+        <jsp:include page="${data._INCLUDE}/sidebar.jsp"></jsp:include>
+
+        <div class="main">
+            <jsp:include page="${data._INCLUDE}/top.jsp"></jsp:include>
+
+            <main class="content">
+                <div class="container-fluid p-0">
+                    <!-- 의료진 관리 START -->
+                    <div class="row">
+                        <div class="col-12 col-lg-6">
+                            <h1 class="h3 mb-3">의견게시판</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 active">의료진 관리</li> -->
+                                </ol>
+                            </nav>
+                        </div>
+                    </div>
+                    <div class="row">
+                        <div class="col-12">
+                            <div class="card">
+                                <form action="?" method="get">
+                                    <div class="card-body">
+                                        <table class="table mobile-table">
+                                            <colgroup>
+                                                <col style="width:10%">
+                                                <col style="width:40%">
+                                                <col style="width:10%">
+                                                <col style="width:40%">
+                                            </colgroup>
+                                            <tr>
+                                                <th>구분</th>
+                                                <td>
+                                                    <div class="form-row">
+                                                        <div class="col-6">
+                                                            <select class="custom-select  form-control" id="selectState" name="selectState">
+                                                                <option value="title" <c:if test="${selectState eq 'title'}">selected="selected"</c:if>>제목</option>
+                                                                <option value="createBy" <c:if test="${selectState eq 'createBy'}">selected="selected"</c:if>>작성자</option>
+                                                                <option value="content" <c:if test="${selectState eq 'content'}">selected="selected"</c:if>>내용</option>
+<%--                                                                 <option value="sCenterName" <c:if test="${selectState eq 'sCenterName'}"> selected="selected"</c:if>>치료센터명</option> --%>
+                                                            </select>
+                                                        </div>
+                                                        <div class="col-6">
+                                                            <input type="text" class="form-control" name="searchTxt" value="${searchTxt}" placeholder="검색어를 입력하세요.">
+                                                        </div>
+                                                    </div>
+                                                </td>
+                                                <td colspan="2">
+                                                    <button class="btn btn-primary">검색</button>
+                                                </td>
+                                            </tr>
+                                        </table>
+                                    </div>
+                                </form>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="row">
+                        <div class="col-12">
+                            <div class="card">
+                                <div class="card-body">
+                                    <div class="row mb-3">
+                                        <div class="col-6">전체 :
+                                            <fmt:formatNumber value="${total}" pattern="#,###" />
+                                        </div>
+                                        <div class="col-6 text-right">
+                                            <button class="btn btn-primary" onclick="location.href='./new';">의견 등록</button>
+                                        </div>
+                                    </div>
+                                    <div class="table-responsive">
+                                        <table class="table table-striped text-center">
+                                            <colgroup>
+                                                <col style=" width: 10%; ">
+                                                <col style=" width: 40%; ">
+                                                <col style=" width: 15%; ">
+                                                <col style=" width: 15%; ">
+                                                <col style=" width: 10%; ">
+                                                <col style=" width: 10%; ">
+                                            </colgroup>
+                                            <thead>
+                                                <tr>
+                                                    <th>번호</th>
+                                                    <th>제목</th>
+                                                    <th>작성자</th>
+                                                    <th>작성일</th>
+                                                    <th>조회</th>
+                                                    <th>파일</th>
+                                                </tr>
+                                            </thead>
+                                            
+                                            <tbody>
+                                                <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><c:out value="${pageNum}" /></td>
+                                                                <td>
+                                                                    <a href="./content?postSeq=${l.postSeq}"><c:out value="${l.title}" /></a>
+                                                                </td>
+                                                                <td><c:out value="${l.createBy}" /></td>
+                                                                <td><c:out value="${l.createDate}" /></td>
+                                                                <td><c:out value="${l.views}" /></td>
+                                                                <td>
+                                                                    <c:if test="${l.fileExtension eq ''}">
+                                                                        -
+                                                                    </c:if>
+                                                                    <c:if test="${l.fileExtension ne ''}">
+                                                                        <c:out value="${l.fileExtension}" />
+                                                                    </c:if>
+                                                                    
+                                                                </td>
+                                                            </tr>
+                                                        </c:forEach>
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        <tr>
+                                                            <td colspan="9">등록된 게시글이 없습니다.</td>
+                                                        </tr>
+                                                    </c:otherwise>
+                                                </c:choose>
+<!--                                                 <tr> -->
+<!--                                                     <td>1</td> -->
+<!--                                                     <td> -->
+<!--                                                         <a href="javscript:;">제목제목제목제목제목</a> -->
+<!--                                                     </td> -->
+<!--                                                     <td>시스템(system)</td> -->
+<!--                                                     <td>2020-10-13 15:23</td> -->
+<!--                                                     <td>1501</td> -->
+<!--                                                     <td>-</td> -->
+<!--                                                 </tr> -->
+                                            </tbody>
+                                        </table>
+                                    </div>
+                                    <div class="row mt-5">
+                                        <div class="col-12 col-lg-6 mb-2">
+<!--                                             <select class="custom-select form-control col-md-2" id="inputState" name="inputState"> -->
+<!--                                                 <option value="success" selected="">전체</option> -->
+<!--                                                 <option value="info">입소</option> -->
+<!--                                                 <option value="warning">퇴소</option> -->
+<!--                                             </select> -->
+                                        </div>
+                                        <div class="col-12 col-lg-6 mb-2">
+                                            <jsp:include page="${data._INCLUDE}/paging.jsp" flush="true">
+                                                <jsp:param name="firstPageNo" value="${paging.firstPageNo}" />
+                                                <jsp:param name="prevPageNo"  value="${paging.prevPageNo}" />
+                                                <jsp:param name="startPageNo" value="${paging.startPageNo}" />
+                                                <jsp:param name="pageNo"      value="${paging.pageNo}" />
+                                                <jsp:param name="endPageNo"   value="${paging.endPageNo}" />
+                                                <jsp:param name="nextPageNo"  value="${paging.nextPageNo}" />
+                                                <jsp:param name="finalPageNo" value="${paging.finalPageNo}" />
+                                                <jsp:param name="preFix"      value="${paging.preFix}" />
+                                                <jsp:param name="url"         value="${paging.url}" />
+                                                <jsp:param name="total"       value="${paging.totalCount}" />
+                                            </jsp:include>
+                                        </div>
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                    <!-- 의료진 관리 END -->
+                </div>
+            </main>
+
+            <jsp:include page="${data._INCLUDE}/footer.jsp"></jsp:include>
+        </div>
+    </div>
+</body>
+</html>