diff --git a/src/main/java/cokr/xit/adds/MainController.java b/src/main/java/cokr/xit/adds/MainController.java index f239443..659fedc 100644 --- a/src/main/java/cokr/xit/adds/MainController.java +++ b/src/main/java/cokr/xit/adds/MainController.java @@ -1,29 +1,12 @@ package cokr.xit.adds; - -import java.util.List; - -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.ModelAndView; -import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping; - -import cokr.xit.foundation.data.DataObject; -import cokr.xit.foundation.web.AbstractController; -import cokr.xit.foundation.web.RequestHandlerReader; @Controller -public class MainController extends AbstractController { - @Autowired - private RequestMappingHandlerMapping requestHandlers; - - @GetMapping(name="로그인", value="/login.do") - public String loginPage() { - return "login"; - } - +public class MainController extends cokr.xit.base.web.MainController { + @Override @GetMapping(name="홈", value={"/", "/index.do"}) public ModelAndView mainPage() { ModelAndView mav = dashboard(); @@ -35,12 +18,4 @@ public class MainController extends AbstractController { public ModelAndView dashboard() { return new ModelAndView("dashboard"); } - - @RequestMapping(name="기능 URL 선택", value="/urls.do") - public ModelAndView getURLs(boolean multiple) { - List urls = new RequestHandlerReader().read(requestHandlers); - return new ModelAndView("select-url") - .addObject("multiple", multiple) - .addObject("urls", toJson(urls)); - } } \ No newline at end of file diff --git a/src/main/java/cokr/xit/base/SggDeptController.java b/src/main/java/cokr/xit/base/SggDeptController.java new file mode 100644 index 0000000..97901f1 --- /dev/null +++ b/src/main/java/cokr/xit/base/SggDeptController.java @@ -0,0 +1,10 @@ +package cokr.xit.base; + +import org.springframework.stereotype.Controller; + +import cokr.xit.base.user.Department; +import cokr.xit.base.user.Sigungu; +import cokr.xit.base.user.web.SigunguDepartmentController; + +@Controller +public class SggDeptController extends SigunguDepartmentController {} \ No newline at end of file diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index cd89c6e..5e065d9 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -82,6 +82,7 @@ spring: username: addsweb password: addsweb1234 auto-commit: false + maximumPoolSize: 2 propertyService: properties: @@ -105,6 +106,7 @@ spring: username: addsweb password: addsweb1234 auto-commit: false + maximumPoolSize: 2 server: port: 9077 diff --git a/src/main/resources/sql/mapper/base/department-mapper.xml b/src/main/resources/sql/mapper/base/department-mapper.xml new file mode 100644 index 0000000..184bee0 --- /dev/null +++ b/src/main/resources/sql/mapper/base/department-mapper.xml @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + +SELECT DEPT_CD + , SGG_CD + , INST_CD + , DEPT_NM + , DEPT_TELNO + , DEPT_FXNO + , USE_YN + , REG_DT + , RGTR + , MDFCN_DT + , MDFR + FROM TB_DEPT + + + + + +SELECT A.SGG_CD, SGG_NM, A.INST_CD, INST_NM, DEPT_CD, DEPT_NM + FROM TB_SGG A, TB_DEPT B + WHERE A.USE_YN = 'Y' + AND B.USE_YN = 'Y' + AND A.SGG_CD = B.SGG_CD + AND A.INST_CD = B.INST_CD + + + +/* 부서 정보 등록(departmentMapper.insert) */ +INSERT INTO TB_DEPT ( + DEPT_CD + , SGG_CD + , INST_CD + , DEPT_NM + , DEPT_TELNO + , DEPT_FXNO + , USE_YN + , REG_DT + , RGTR + , MDFCN_DT + , MDFR +) VALUES ( + #{deptID} + , #{sggID} + , #{instCode} + , #{name} + , #{telno} + , #{faxno} + , #{useYN} + , #{createdAt} + , #{createdBy} + , #{lastModified} + , #{modifiedBy} +) + +/* 부서 정보 수정(departmentMapper.update) */ +UPDATE TB_DEPT + SET SGG_CD = #{sggID} + , INST_CD = #{instCode} + , DEPT_NM = #{name} + , DEPT_TELNO = #{telno} + , DEPT_FXNO = #{faxno} + , MDFCN_DT = #{lastModified} + , MDFR = #{modifiedBy} + WHERE DEPT_CD = #{deptID} + +/* 부서 정보 삭제(departmentMapper.deleteDepartment) */ +UPDATE TB_DEPT + SET USE_YN = 'N' + , MDFCN_DT = + , MDFR = #{currentUser.id} + AND SGG_CD IN (#{sggID}) + AND DEPT_CD IN (#{deptID}) + + \ No newline at end of file diff --git a/src/main/resources/sql/mapper/base/sigungu-mapper.xml b/src/main/resources/sql/mapper/base/sigungu-mapper.xml new file mode 100644 index 0000000..f034d48 --- /dev/null +++ b/src/main/resources/sql/mapper/base/sigungu-mapper.xml @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + + + + + + + + + + +SELECT SGG_CD + , SGG_NM + , INST_CD + , INST_SE_CD + , INST_NM + , INST_ADDR + , INST_DADDR + , INST_ZIP + , OFFCS_FILE_PATH + , OFFCS_FILE_NM + , USE_YN + , REG_DT + , RGTR + , MDFCN_DT + , MDFR + FROM TB_SGG + + + + + +/* 시군구 등록(sigunguMapper.insert) */ +INSERT INTO TB_SGG ( + SGG_CD + , SGG_NM + , INST_CD + , INST_SE_CD + , INST_NM + , INST_ADDR + , INST_DADDR + , INST_ZIP + , OFFCS_FILE_PATH + , OFFCS_FILE_NM + , USE_YN + , REG_DT + , RGTR + , MDFCN_DT + , MDFR +) VALUES ( + #{sggID} + , #{sggName} + , #{instCode} + , #{instType} + , #{instName} + , #{instAddress} + , #{instDetailAddress} + , #{instZipCode} + , #{officialSealFilepath} + , #{officialSealFilename} + , #{useYN} + , #{createdAt} + , #{createdBy} + , #{lastModified} + , #{modifiedBy} +) + +/* 시군구 수정(sigunguMapper.update) */ +UPDATE TB_SGG + SET INST_CD = #{instCode} + , INST_SE_CD = #{instType} + , SGG_NM = #{sggName} + , INST_NM = #{instName} + , INST_ADDR = #{instAddress} + , INST_DADDR = #{instDetailAddress} + , INST_ZIP = #{instZipCode} + , OFFCS_FILE_PATH = #{officialSealFilepath} + , OFFCS_FILE_NM = #{officialSealFilename} + , USE_YN = #{useYN} + , MDFCN_DT = #{lastModified} + , MDFR = #{modifiedBy} + WHERE SGG_CD = #{sggID} + +/* 시군구 삭제(sigunguMapper.delete) */ +UPDATE TB_SGG + SET USE_YN = 'N' + , MDFCN_DT = + , MDFR = #{currentUser.id} + WHERE SGG_CD IN (#{sggID}) + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/base/user/dept-info.jsp b/src/main/webapp/WEB-INF/jsp/base/user/dept-info.jsp new file mode 100644 index 0000000..9e088b6 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/base/user/dept-info.jsp @@ -0,0 +1,101 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%> +<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%> +
+
+
+
+ +
+ + + +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ + +
+
+
+
+
+ +
+
+ + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/base/user/select-sggDepts.jsp b/src/main/webapp/WEB-INF/jsp/base/user/select-sggDepts.jsp new file mode 100644 index 0000000..b665b92 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/base/user/select-sggDepts.jsp @@ -0,0 +1,57 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%> +<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%> + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/base/user/sgg-dept.jsp b/src/main/webapp/WEB-INF/jsp/base/user/sgg-dept.jsp new file mode 100644 index 0000000..424f7f6 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/base/user/sgg-dept.jsp @@ -0,0 +1,245 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%> +<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%> +기관 정보 + +
+ +
+ + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/base/user/sgg-info.jsp b/src/main/webapp/WEB-INF/jsp/base/user/sgg-info.jsp new file mode 100644 index 0000000..777d0e1 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/base/user/sgg-info.jsp @@ -0,0 +1,122 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%> +<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%> +
+
+
+
+ +
+
+ + +
+
+
+
+
+
+ +
+
+ + + +
+
+
+
+
+
+ +
+
+ + + +
+
+
+
+
+
+ +
+
+ + +
+
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ + +
+
+
+
+
+ +
+
+ + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/base/user/user-info.jsp b/src/main/webapp/WEB-INF/jsp/base/user/user-info.jsp index ca9ab48..40d8eb7 100644 --- a/src/main/webapp/WEB-INF/jsp/base/user/user-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/base/user/user-info.jsp @@ -1,5 +1,6 @@ <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%> <%@ include file="/WEB-INF/jsp/include/taglib.jsp"%> +${currentUser.hasAuthorities("ROLE_ADMIN")}
@@ -44,6 +45,26 @@
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+