Explorar o código

생활치료센터 등록 추가

junekeunsong %!s(int64=4) %!d(string=hai) anos
pai
achega
04cc739650

+ 61 - 3
src/main/java/com/lemon/lifecenter/controller/CenterController.java

@@ -1,26 +1,84 @@
 package com.lemon.lifecenter.controller;
 
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
+import org.springframework.transaction.annotation.Propagation;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.ModelAttribute;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.servlet.ModelAndView;
 
+import com.lemon.lifecenter.common.LifeCenterConfigVO;
 import com.lemon.lifecenter.common.LifeCenterController;
+import com.lemon.lifecenter.common.LifeCenterFunction;
+import com.lemon.lifecenter.dto.CenterInfoDTO;
+import com.lemon.lifecenter.dto.LocationDTO;
+import com.lemon.lifecenter.dto.MemberDTO;
+import com.lemon.lifecenter.service.CenterService;
+import com.lemon.lifecenter.service.MemberService;
 
 // 생활치료센터관리 contorller
 @Controller
 @RequestMapping("/center")
 public class CenterController extends LifeCenterController {
+    private final Logger logger = LoggerFactory.getLogger(this.getClass());
+    
+    @Autowired
+    private CenterService centerService;
+    @Autowired
+    private MemberService memberService;
+    @Autowired
+    private LifeCenterConfigVO config;
+    
     @RequestMapping("/new")
     public ModelAndView centerNew() {
+        List<LocationDTO> list = centerService.selectLocation();
+        
         ModelAndView mv = setMV("center/new");
-
+        mv.addObject("locationList", list);
         return mv;
     }
     
+    @RequestMapping("/newProc")
+    @Transactional(propagation=Propagation.REQUIRED)
+    public String centerNewProc(@ModelAttribute("dto") final CenterInfoDTO dto,
+            @RequestParam(value="detailAddr", required=true) String detailAddr,
+            @RequestParam(value="staffId", required=true) String staffId,
+            @RequestParam(value="staffPw", required=true) String staffPw,
+            @RequestParam(value="staffName", required=true) String staffName,
+            @RequestParam(value="staffPhoneNumber", required=true) String staffPhoneNumber) throws Exception {
+
+        String centerAddress = dto.getCenterAddress() + detailAddr;
+        dto.setCenterAddress(centerAddress);
+        MemberDTO mDto = new MemberDTO();
+        
+        centerService.insertCenter(dto);
+        mDto.setCenterCode(dto.getCenterCode());
+        mDto.setId(staffId);
+        mDto.setPassword(LifeCenterFunction.aesEncrypt(config.aesKey, config.IV, staffPw));
+        mDto.setName(staffName);
+        mDto.setPhoneNumber(staffPhoneNumber);
+        mDto.setGroupIdx("2");
+        memberService.inserMember(mDto);
+        
+        return "redirect:./info?centerCode=" + dto.getCenterCode() + "&staffId=" + staffId;
+    }
+    
     @RequestMapping("/info")
-    public ModelAndView centerInfo() {
+    public ModelAndView centerInfo(
+            @RequestParam(value="centerCode", required=true) int centerCode) {
+        CenterInfoDTO dto = new CenterInfoDTO();
+        dto.setCenterCode(centerCode);
+        dto = centerService.selectCenterInfo(dto);
         ModelAndView mv = setMV("center/info");
-
+        mv.addObject("centerInfo", dto);
         return mv;
     }
 

+ 104 - 0
src/main/java/com/lemon/lifecenter/dto/CenterInfoDTO.java

@@ -0,0 +1,104 @@
+package com.lemon.lifecenter.dto;
+
+public class CenterInfoDTO {
+    private int centerCode = 0;
+    private String centerName = "";
+    private String locationCode = "";
+    private String centerNumber = "";
+    private int totalPatient = 0;
+    private int totalCapacity = 0;
+    private int totalStaff = 0;
+    private String createDate = "";
+    private String updateDate = "";
+    private String centerAddress = "";
+    
+    private String locationName = "";
+    private String staffId = "";
+    private String staffName = "";
+    private String staffPhoneNumber = "";
+    
+    public int getCenterCode() {
+        return centerCode;
+    }
+    public void setCenterCode(int centerCode) {
+        this.centerCode = centerCode;
+    }
+    public String getCenterName() {
+        return centerName;
+    }
+    public void setCenterName(String centerName) {
+        this.centerName = centerName;
+    }
+    public String getLocationCode() {
+        return locationCode;
+    }
+    public void setLocationCode(String locationCode) {
+        this.locationCode = locationCode;
+    }
+    public String getCenterNumber() {
+        return centerNumber;
+    }
+    public void setCenterNumber(String centerNumber) {
+        this.centerNumber = centerNumber;
+    }
+    public int getTotalPatient() {
+        return totalPatient;
+    }
+    public void setTotalPatient(int totalPatient) {
+        this.totalPatient = totalPatient;
+    }
+    public int getTotalCapacity() {
+        return totalCapacity;
+    }
+    public void setTotalCapacity(int totalCapacity) {
+        this.totalCapacity = totalCapacity;
+    }
+    public int getTotalStaff() {
+        return totalStaff;
+    }
+    public void setTotalStaff(int totalStaff) {
+        this.totalStaff = totalStaff;
+    }
+    public String getCreateDate() {
+        return createDate;
+    }
+    public void setCreateDate(String createDate) {
+        this.createDate = createDate;
+    }
+    public String getUpdateDate() {
+        return updateDate;
+    }
+    public void setUpdateDate(String updateDate) {
+        this.updateDate = updateDate;
+    }
+    public String getCenterAddress() {
+        return centerAddress;
+    }
+    public void setCenterAddress(String centerAddress) {
+        this.centerAddress = centerAddress;
+    }
+    public String getLocationName() {
+        return locationName;
+    }
+    public void setLocationName(String locationName) {
+        this.locationName = locationName;
+    }
+    public String getStaffId() {
+        return staffId;
+    }
+    public void setStaffId(String staffId) {
+        this.staffId = staffId;
+    }
+    public String getStaffName() {
+        return staffName;
+    }
+    public void setStaffName(String staffName) {
+        this.staffName = staffName;
+    }
+    public String getStaffPhoneNumber() {
+        return staffPhoneNumber;
+    }
+    public void setStaffPhoneNumber(String staffPhoneNumber) {
+        this.staffPhoneNumber = staffPhoneNumber;
+    }
+}

+ 19 - 0
src/main/java/com/lemon/lifecenter/dto/LocationDTO.java

@@ -0,0 +1,19 @@
+package com.lemon.lifecenter.dto;
+
+public class LocationDTO {
+    private String locationCode = "";
+    private String locationName = "";
+    
+    public String getLocationCode() {
+        return locationCode;
+    }
+    public void setLocationCode(String locationCode) {
+        this.locationCode = locationCode;
+    }
+    public String getLocationName() {
+        return locationName;
+    }
+    public void setLocationName(String locationName) {
+        this.locationName = locationName;
+    }
+}

+ 82 - 0
src/main/java/com/lemon/lifecenter/dto/MemberDTO.java

@@ -0,0 +1,82 @@
+package com.lemon.lifecenter.dto;
+
+public class MemberDTO {
+    private String id = "";
+    private String password = "";
+    private String createDate = "";
+    private String name = "";
+    private String phoneNumber = "";
+    private String lastLoginTime = "";
+    private int failCount = 0;
+    private String useYn = "";
+    private String groupIdx = "";
+    private int centerCode = 0;
+    private String updateById = "";
+    
+    public String getId() {
+        return id;
+    }
+    public void setId(String id) {
+        this.id = id;
+    }
+    public String getPassword() {
+        return password;
+    }
+    public void setPassword(String password) {
+        this.password = password;
+    }
+    public String getCreateDate() {
+        return createDate;
+    }
+    public void setCreateDate(String createDate) {
+        this.createDate = createDate;
+    }
+    public String getName() {
+        return name;
+    }
+    public void setName(String name) {
+        this.name = name;
+    }
+    public String getPhoneNumber() {
+        return phoneNumber;
+    }
+    public void setPhoneNumber(String phoneNumber) {
+        this.phoneNumber = phoneNumber;
+    }
+    public String getLastLoginTime() {
+        return lastLoginTime;
+    }
+    public void setLastLoginTime(String lastLoginTime) {
+        this.lastLoginTime = lastLoginTime;
+    }
+    public int getFailCount() {
+        return failCount;
+    }
+    public void setFailCount(int failCount) {
+        this.failCount = failCount;
+    }
+    public String getUseYn() {
+        return useYn;
+    }
+    public void setUseYn(String useYn) {
+        this.useYn = useYn;
+    }
+    public String getGroupIdx() {
+        return groupIdx;
+    }
+    public void setGroupIdx(String groupIdx) {
+        this.groupIdx = groupIdx;
+    }
+    public int getCenterCode() {
+        return centerCode;
+    }
+    public void setCenterCode(int centerCode) {
+        this.centerCode = centerCode;
+    }
+    public String getUpdateById() {
+        return updateById;
+    }
+    public void setUpdateById(String updateById) {
+        this.updateById = updateById;
+    }
+}

+ 18 - 0
src/main/java/com/lemon/lifecenter/mapper/CenterMapper.java

@@ -0,0 +1,18 @@
+package com.lemon.lifecenter.mapper;
+
+import java.util.HashMap;
+import java.util.List;
+
+import org.apache.ibatis.annotations.Mapper;
+import org.springframework.stereotype.Repository;
+
+import com.lemon.lifecenter.dto.CenterInfoDTO;
+import com.lemon.lifecenter.dto.LocationDTO;
+
+@Repository
+@Mapper
+public interface CenterMapper {
+    public List<LocationDTO> selectLocation();
+    public void insertCenter(CenterInfoDTO dto) throws Exception;
+    public CenterInfoDTO selectCenterInfo(CenterInfoDTO dto);
+}

+ 12 - 0
src/main/java/com/lemon/lifecenter/mapper/MemberMapper.java

@@ -0,0 +1,12 @@
+package com.lemon.lifecenter.mapper;
+
+import org.apache.ibatis.annotations.Mapper;
+import org.springframework.stereotype.Repository;
+
+import com.lemon.lifecenter.dto.MemberDTO;
+
+@Repository
+@Mapper
+public interface MemberMapper {
+    public void insertMember(MemberDTO dto);
+}

+ 30 - 0
src/main/java/com/lemon/lifecenter/service/CenterService.java

@@ -0,0 +1,30 @@
+package com.lemon.lifecenter.service;
+
+import java.util.HashMap;
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.lemon.lifecenter.dto.CenterInfoDTO;
+import com.lemon.lifecenter.dto.LocationDTO;
+import com.lemon.lifecenter.mapper.CenterMapper;
+
+@Service
+public class CenterService {
+    
+    @Autowired
+    private CenterMapper mapper;
+    
+    public List<LocationDTO> selectLocation() {
+        return mapper.selectLocation();
+    }
+    
+    public void insertCenter(CenterInfoDTO dto) throws Exception {
+        mapper.insertCenter(dto);
+    }
+    
+    public CenterInfoDTO selectCenterInfo(CenterInfoDTO dto) {
+        return mapper.selectCenterInfo(dto);
+    }
+}

+ 17 - 0
src/main/java/com/lemon/lifecenter/service/MemberService.java

@@ -0,0 +1,17 @@
+package com.lemon.lifecenter.service;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.lemon.lifecenter.dto.MemberDTO;
+import com.lemon.lifecenter.mapper.MemberMapper;
+
+@Service
+public class MemberService {
+    @Autowired
+    private MemberMapper mapper;
+    
+    public void inserMember(MemberDTO dto) {
+        mapper.insertMember(dto);
+    }
+}

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

@@ -1,7 +1,7 @@
 #################################
 ## LifeCenterConfigVO
 #################################
-config.aesKey        = 1q2w3e4r5t6y7u8i9o0p!@#$%^&*()
+config.aesKey        = 1q2w3e4r5t6y7u8i9o0p!@#$%^&*()hj
 config.pageGroupSize = 5
 config.pageDataSize  = 10
 config.pagePrefix    = page

+ 51 - 0
src/main/resources/mybatis/mapper/center/center.xml

@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.lemon.lifecenter.mapper.CenterMapper">
+    <select id="selectLocation" resultType="LocationDTO">
+        <![CDATA[
+            SELECT LOCATION_CODE AS locationCode,
+                   LOCATION_NAME AS locationName
+              FROM LOCATION_INFO
+             WHERE 1 = 1
+               AND LOCATION_CODE != '00'
+        ]]>
+    </select>
+    
+    <insert id="insertCenter" parameterType="CenterInfoDTO" useGeneratedKeys="true">
+        <selectKey keyProperty="centerCode" resultType="int" order="AFTER">
+            <![CDATA[
+                SELECT CURRENT_VAL AS centerCode FROM db_serial WHERE NAME = 'center_info_ai_center_code'
+            ]]>
+        </selectKey>
+        <![CDATA[
+            INSERT INTO CENTER_INFO
+                        (CENTER_NAME,   LOCATION_CODE,   CENTER_ADDRESS, CENTER_NUMBER,   TOTAL_CAPACITY,   TOTAL_STAFF,   CREATE_DATE)
+                 VALUES (#{centerName}, #{locationCode}, #{centerAddress},     #{centerNumber}, #{totalCapacity}, #{totalStaff}, NOW())
+        ]]>
+    </insert>
+    
+    <select id="selectCenterInfo" parameterType="CenterInfoDTO" resultType="CenterInfoDTO">
+        <![CDATA[
+            SELECT CI.CENTER_CODE                                AS centerCode,
+                   CI.CENTER_NAME                                AS centerName,
+                   CI.LOCATION_CODE                              AS locationCode,
+                   (SELECT LOCATION_NAME
+                      FROM LOCATION_INFO LI
+                     WHERE LI.LOCATION_CODE = CI.LOCATION_CODE)  AS locationName,
+                   CI.CENTER_ADDRESS                             AS centerAddress,
+                   CI.CENTER_NUMBER                              AS centerNumber,
+                   CI.TOTAL_CAPACITY                             AS totalCapacity,
+                   CI.TOTAL_STAFF                                AS totalStaff,
+                   DATE_FORMAT(CI.CREATE_DATE, '%Y-%m-%d %H:%i') AS createDate,
+                   DATE_FORMAT(CI.UPDATE_DATE, '%Y-%m-%d %H:%i') AS updateDate,
+                   M.ID                                          AS staffId,
+                   M.NAME                                        AS staffName,
+                   M.PHONE_NUMBER                                AS staffPhoneNumber
+              FROM CENTER_INFO CI
+              LEFT OUTER JOIN MEMBER M
+                ON CI.CENTER_CODE = M.CENTER_CODE
+             WHERE CI.CENTER_CODE = #{centerCode}
+        ]]>
+    </select>
+</mapper>

+ 13 - 0
src/main/resources/mybatis/mapper/member/member.xml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.lemon.lifecenter.mapper.MemberMapper">
+    
+    <insert id="insertMember" parameterType="MemberDTO" useGeneratedKeys="true">
+        <![CDATA[
+            INSERT INTO MEMBER
+                        (ID,    PASSWORD,    CREATE_DATE, NAME,    PHONE_NUMBER,   GROUP_IDX,   CENTER_CODE)
+                  VALUE (#{id}, #{password}, NOW(),       #{name}, #{phoneNumber}, #{groupIdx}, #{centerCode})
+        ]]>
+    </insert>
+</mapper>

+ 2 - 2
src/main/resources/mybatis/mapper/patient/patient.xml

@@ -15,7 +15,7 @@
         </if>
         <if test='patientName != null and patientName != ""'>
             <![CDATA[
-               AND PATIENT_NAME = #{patientName}
+               AND PATIENT_NAME LIKE CONCAT('%', #{patientName}, '%')
             ]]>
         </if>
         <if test='startDate != null and startDate != "" and endDate != null and endDate != ""'>
@@ -47,7 +47,7 @@
     </if>
     <if test='patientName != null and patientName != ""'>
         <![CDATA[
-            AND PATIENT_NAME = #{patientName}
+            AND PATIENT_NAME LIKE CONCAT('%', #{patientName}, '%')
         ]]>
     </if>
     <if test='startDate != null and startDate != "" and endDate != null and endDate != ""'>

+ 10 - 10
src/main/webapp/WEB-INF/jsp/center/info.jsp

@@ -74,51 +74,51 @@
                                         <tr>
                                             <th>생활치료센터명</th>
                                             <td>
-                                                레몬종합병원
+                                                <c:out value="${centerInfo.centerName}" />
                                             </td>
                                             <th>지역</th>
                                             <td>
-                                                서울특별시
+                                                <c:out value="${centerInfo.locationName}" />
                                             </td>
                                         </tr>
                                         <tr>
                                             <th>주소</th>
                                             <td>
-                                                서울시 금천구 가산동 에이스타워 3차
+                                                <c:out value="${centerInfo.centerAddress}" />
                                             </td>
                                             <th>전화번호</th>
                                             <td>
-                                                02-1234-1234
+                                                <c:out value="${centerInfo.centerNumber}" />
                                             </td>
                                         </tr>
                                         <tr>
                                             <th>수용인원(명)</th>
                                             <td>
-                                                100
+                                                <c:out value="${centerInfo.totalCapacity}" />
                                             </td>
                                             <th>의료진 수(명)</th>
                                             <td>
-                                                30
+                                                <c:out value="${centerInfo.totalStaff}" />
                                             </td>
                                         </tr>
                                         <tr>
                                             <th>담당자</th>
                                             <td>
-                                                홍길동
+                                                <c:out value="${centerInfo.staffName}(${centerInfo.staffId})" />
                                             </td>
                                             <th>담당자 휴대전화번포</th>
                                             <td>
-                                                010-1234-1234
+                                                <c:out value="${centerInfo.staffPhoneNumber}" />
                                             </td>
                                         </tr>
                                         <tr>
                                             <th>등록일자</th>
                                             <td>
-                                                2020-10-10 14:22
+                                                <c:out value="${centerInfo.createDate}" />
                                             </td>
                                             <th>수정일자</th>
                                             <td>
-                                                -
+                                                <c:out value="${centerInfo.updateDate}" />
                                             </td>
                                         </tr>
                                     </table>

+ 153 - 68
src/main/webapp/WEB-INF/jsp/center/new.jsp

@@ -4,6 +4,75 @@
 <%@ page language="java" contentType="text/html; charset=UTF-8"
     pageEncoding="UTF-8"%>
 <jsp:include page="${data._INCLUDE}/header.jsp"></jsp:include>
+<script src="https://t1.daumcdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js"></script>
+<script>
+
+function juso() {
+    new daum.Postcode({
+        oncomplete: function(data) {
+            // 팝업에서 검색결과 항목을 클릭했을때 실행할 코드를 작성하는 부분.
+
+            // 각 주소의 노출 규칙에 따라 주소를 조합한다.
+            // 내려오는 변수가 값이 없는 경우엔 공백('')값을 가지므로, 이를 참고하여 분기 한다.
+            var addr = ''; // 주소 변수
+            var extraAddr = ''; // 참고항목 변수
+
+            //사용자가 선택한 주소 타입에 따라 해당 주소 값을 가져온다.
+            if (data.userSelectedType === 'R') { // 사용자가 도로명 주소를 선택했을 경우
+                addr = data.roadAddress;
+            } else { // 사용자가 지번 주소를 선택했을 경우(J)
+                addr = data.jibunAddress;
+            }
+
+            // 사용자가 선택한 주소가 도로명 타입일때 참고항목을 조합한다.
+            if(data.userSelectedType === 'R'){
+                // 법정동명이 있을 경우 추가한다. (법정리는 제외)
+                // 법정동의 경우 마지막 문자가 "동/로/가"로 끝난다.
+                if(data.bname !== '' && /[동|로|가]$/g.test(data.bname)){
+                    extraAddr += data.bname;
+                }
+                // 건물명이 있고, 공동주택일 경우 추가한다.
+                if(data.buildingName !== '' && data.apartment === 'Y'){
+                    extraAddr += (extraAddr !== '' ? ', ' + data.buildingName : data.buildingName);
+                }
+                // 표시할 참고항목이 있을 경우, 괄호까지 추가한 최종 문자열을 만든다.
+                if(extraAddr !== ''){
+                    extraAddr = ' (' + extraAddr + ')';
+                }
+                // 조합된 참고항목을 해당 필드에 넣는다.
+                //document.getElementById("detailAddr").value = extraAddr;
+            
+            } else {
+                //document.getElementById("detailAddr").value = '';
+            }
+
+            // 우편번호와 주소 정보를 해당 필드에 넣는다.
+            /* document.getElementById('sample6_postcode').value = data.zonecode; */
+            
+            document.getElementById("mainAddr").value = addr + " " + extraAddr;
+            // 커서를 상세주소 필드로 이동한다.
+            document.getElementById("detailAddr").focus();
+            
+        }
+    }).open();
+}
+
+function onlyNumber() {
+    if((event.keyCode<48) || (event.keyCode>57)) {
+        event.returnValue = false;
+    }
+}
+
+$( function(){
+    $( "#newForm" ).validate({
+        submitHandler: function(form) {
+            $("#mainAddr").removeAttr("disabled");
+            form.submit();
+        }
+    });
+})
+
+</script>
 </head>
 <body>
     <div class="wrapper">
@@ -56,78 +125,94 @@
                     <div class="row">
                         <div class="col-12">
                             <div class="card">
-                                <div class="card-body">
-                                    <table class="table mobile-table">
-                                        <colgroup>
-                                            <col style="width:15%">
-                                            <col style="width:35%">
-                                            <col style="width:15%">
-                                            <col style="width:35%">
-                                        </colgroup>
-                                        <tr>
-                                            <th>생활치료센터명</th>
-                                            <td>
-                                                <input type="text" class="form-control">
-                                            </td>
-                                            <th>지역</th>
-                                            <td>
-                                                <select class="custom-select">
-                                                              <option selected="">지역</option>
-                                                              <option>1</option>
-                                                              <option>2</option>
-                                                              <option>3</option>
-                                                              <option>4</option>
-                                                              <option>5</option>
-                                                              <option>6</option>
-                                                              <option>7</option>
-                                                </select>
-                                            </td>
-                                        </tr>
-                                        <tr>
-                                            <th>주소</th>
-                                            <td colspan="3">
-                                                <div class="form-row">
-                                                    <div class="col-lg-10"><input type="text" class="form-control"></div>
-                                                    <div class="col-lg-2"><button class="btn btn-primary w100">주소찾기</button></div>
+                                <form action="./newProc" method="post" id="newForm">
+                                    <div class="card-body">
+                                        <table class="table mobile-table">
+                                            <colgroup>
+                                                <col style="width:15%">
+                                                <col style="width:35%">
+                                                <col style="width:15%">
+                                                <col style="width:35%">
+                                            </colgroup>
+                                            <tr>
+                                                <th><span class="fix">*</span>생활치료센터명</th>
+                                                <td>
+                                                    <input type="text" class="form-control" name="centerName" required>
+                                                </td>
+                                                <th><span class="fix">*</span>지역</th>
+                                                <td>
+                                                    <select class="custom-select" name="locationCode">
+                                                        <option >지역</option>
+                                                        <c:forEach var="i" items="${locationList}">
+                                                            <option value="${i.locationCode}"><c:out value="${i.locationName}"/></option>
+                                                        </c:forEach>
+                                                    <!-- <option>1</option>
+                                                    <option>2</option>
+                                                    <option>3</option>
+                                                    <option>4</option>
+                                                    <option>5</option>
+                                                    <option>6</option>
+                                                    <option>7</option> -->
+                                                    </select>
+                                                </td>
+                                            </tr>
+                                            <tr>
+                                                <th><span class="fix">*</span>주소</th>
+                                                <td colspan="3">
+                                                    <div class="form-row">
+                                                        <div class="col-lg-10"><input type="text" class="form-control" disabled id="mainAddr" name="centerAddress" required></div>
+                                                        <div class="col-lg-2"><span class="btn btn-primary w100" onclick="juso();">주소찾기</span></div>
+                                                        <div class="col-lg-10"><input type="text" class="form-control mt8" id="detailAddr" name="detailAddr" placeholder="상세주소" required></div>
+                                                    </div>
+                                                </td>
+                                            </tr>
+                                            <tr>
+                                                <th><span class="fix">*</span>전화번호</th>
+                                                <td colspan="3">
+                                                    <input type="text" class="form-control" name="centerNumber" placeholder="예)1234-1234-1234" required onkeypress="onlyNumber()">
+                                                </td>
+                                            </tr>
+                                            <tr>
+                                                <th><span class="fix">*</span>수용인원(명)</th>
+                                                <td>
+                                                    <input type="text" class="form-control" name="totalCapacity" required onkeypress="onlyNumber();">
+                                                </td>
+                                                <th><span class="fix">*</span>의료진수 (명)</th>
+                                                <td>
+                                                    <input type="text" class="form-control" name="totalStaff" required onkeypress="onlyNumber();">
+                                                </td>
+                                            </tr>
+                                            <tr>
+                                                <th><span class="fix">*</span>아이디</th>
+                                                <td>
+                                                    <input type="text" class="form-control" name="staffId" required>
+                                                </td>
+                                                <th><span class="fix">*</span>비밀번호</th>
+                                                <td>
+                                                    <input type="text" class="form-control" name="staffPw" required>
+                                                </td>
+                                            </tr>
+                                            <tr>
+                                                <th><span class="fix">*</span>담당자 이름</th>
+                                                <td>
+                                                    <input type="text" class="form-control" name="staffName" required>
+                                                </td>
+                                                <th><span class="fix">*</span>담당자 휴대전화번호</th>
+                                                <td>
+                                                    <input type="text" class="form-control" name="staffPhoneNumber" required>
+                                                </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>
-                                            </td>
-                                        </tr>
-                                        <tr>
-                                            <th>전화번호</th>
-                                            <td colspan="3">
-                                                <input type="text" class="form-control" placeholder="예)1234-1234-1234">
-                                            </td>
-                                        </tr>
-                                        <tr>
-                                            <th>수용인원(명)</th>
-                                            <td>
-                                                <input type="text" class="form-control">
-                                            </td>
-                                            <th>의료진수 (명)</th>
-                                            <td>
-                                                <input type="text" class="form-control">
-                                            </td>
-                                        </tr>
-                                        <tr>
-                                            <th>담당자</th>
-                                            <td>
-                                                <input type="text" class="form-control">
-                                            </td>
-                                            <th>담당자 휴대전화번호</th>
-                                            <td>
-                                                <input type="text" class="form-control">
-                                            </td>
-                                        </tr>
-                                    </table>
-                                    <div class="row mt-3">
-                                        <div class="col-12">
-                                            <div class="text-right">
-                                                <button class="btn btn-outline-primary w100">취소</button>
-                                                <button class="btn btn-primary w100">등록</button>
                                             </div>
                                         </div>
                                     </div>
-                                </div>
+                                </form>
                             </div>
                         </div>
                     </div>

+ 2 - 1
src/main/webapp/resources/css/common/classic.css

@@ -85,4 +85,5 @@
 .patients-stats .temperature.step2 { color:#dc3545; }
 .patients-stats .temperature.step3 { background-color: #EFCDD1; color:#dc3545; }
 .graph-area {  }
-.error{color:red;}
+.error{color:red;}
+.mt8{margin-top:8px;}