diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..0ca1374 --- /dev/null +++ b/.classpath @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.project b/.project new file mode 100644 index 0000000..87d3522 --- /dev/null +++ b/.project @@ -0,0 +1,60 @@ + + + MCA + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + org.springframework.ide.eclipse.core.springbuilder + + + + + org.springframework.ide.eclipse.boot.validation.springbootbuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.eclipse.m2e.core.maven2Nature + org.eclipse.wst.common.project.facet.core.nature + org.eclipse.jdt.core.javanature + org.springframework.ide.eclipse.core.springnature + egovframework.dev.imp.ide.natures.egovnature + org.eclipse.wst.jsdt.core.jsNature + + + + 1644803890467 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/.settings/.jsdtscope b/.settings/.jsdtscope new file mode 100644 index 0000000..81672d4 --- /dev/null +++ b/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..075c81e --- /dev/null +++ b/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 +encoding//src/main/webapp/WEB-INF/jsp/include/header.jsp=UTF-8 +encoding//src/main/webapp/WEB-INF/jsp/mapUseSetting.jsp=UTF-8 +encoding//src/test/java=UTF-8 diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..26aef1a --- /dev/null +++ b/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore +org.eclipse.jdt.core.compiler.processAnnotations=enabled +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/.settings/org.eclipse.m2e.core.prefs b/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component new file mode 100644 index 0000000..8a8ed96 --- /dev/null +++ b/.settings/org.eclipse.wst.common.component @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml b/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml new file mode 100644 index 0000000..6d59853 --- /dev/null +++ b/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/.settings/org.eclipse.wst.common.project.facet.core.xml b/.settings/org.eclipse.wst.common.project.facet.core.xml new file mode 100644 index 0000000..e9fd478 --- /dev/null +++ b/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/.settings/org.eclipse.wst.jsdt.ui.superType.container b/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 0000000..3bd5d0a --- /dev/null +++ b/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/.settings/org.eclipse.wst.jsdt.ui.superType.name b/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 0000000..05bd71b --- /dev/null +++ b/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/.settings/org.eclipse.wst.validation.prefs b/.settings/org.eclipse.wst.validation.prefs new file mode 100644 index 0000000..04cad8c --- /dev/null +++ b/.settings/org.eclipse.wst.validation.prefs @@ -0,0 +1,2 @@ +disabled=06target +eclipse.preferences.version=1 diff --git a/.springBeans b/.springBeans new file mode 100644 index 0000000..83620af --- /dev/null +++ b/.springBeans @@ -0,0 +1,23 @@ + + + 1 + + + + + + + + + src/main/resources/egovframework/spring/context-idgen.xml + src/main/resources/egovframework/spring/context-sqlMap.xml + src/main/resources/egovframework/spring/context-transaction.xml + src/main/resources/egovframework/spring/context-mapper.xml + src/main/resources/egovframework/spring/context-common.xml + src/main/resources/egovframework/spring/context-properties.xml + src/main/resources/egovframework/spring/context-datasource.xml + src/main/resources/egovframework/spring/context-validator.xml + + + + diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..bbaa712 --- /dev/null +++ b/pom.xml @@ -0,0 +1,373 @@ + + + 4.0.0 + MBCA + MBCA + war + 1.0.0 + sample + http://www.egovframe.go.kr + + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + + + + + 4.3.22.RELEASE + 3.9.0 + 5.0.6.RELEASE + 3.0.5 + + + + + mvn2s + https://repo1.maven.org/maven2/ + + true + + + true + + + + egovframe + http://maven.egovframe.kr:8080/maven/ + + true + + + false + + + + egovframe2 + http://www.egovframe.go.kr/maven/ + + true + + + false + + + + + + + + egovframework.rte + egovframework.rte.fdl.security + ${egovframework.rte.version} + + + + + + egovframework.rte + egovframework.rte.ptl.mvc + ${egovframework.rte.version} + + + commons-logging + commons-logging + + + + + + egovframework.rte + egovframework.rte.psl.dataaccess + ${egovframework.rte.version} + + + egovframework.rte + egovframework.rte.fdl.idgnr + ${egovframework.rte.version} + + + egovframework.rte + egovframework.rte.fdl.property + ${egovframework.rte.version} + + + + javax.servlet + servlet-api + provided + 2.5 + + + + javax.servlet + jstl + 1.2 + + + + taglibs + standard + 1.1.2 + + + + org.antlr + antlr + 3.5 + + + + org.hsqldb + hsqldb + 2.3.2 + + + + mysql + mysql-connector-java + 8.0.11 + + + + commons-dbcp + commons-dbcp + 1.4 + + + + org.projectlombok + lombok + 1.18.20 + + + + + + org.json + json + 20210307 + + + + net.sf.json-lib + json-lib + 2.4 + jdk15 + + + + org.codehaus.jackson + jackson-mapper-asl + 1.9.13 + + + + com.fasterxml.jackson.core + jackson-core + 2.9.9 + + + + com.fasterxml.jackson.core + jackson-databind + 2.9.9 + + + + + com.google.code.gson + gson + 2.8.5 + + + + + org.apache.tiles + tiles-extras + ${org.apache.tiles.version} + + + org.apache.tiles + tiles-jsp + ${org.apache.tiles.version} + + + org.apache.tiles + tiles-servlet + ${org.apache.tiles.version} + + + + + + + + + + + install + ${basedir}/target + ${artifactId}-${version} + + + + org.apache.tomcat.maven + tomcat7-maven-plugin + 2.2 + + 80 + / + + -Xms256m -Xmx768m -XX:MaxPermSize=256m + + + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.8 + 1.8 + UTF-8 + + + + org.codehaus.mojo + hibernate3-maven-plugin + 2.1 + + + + hbm2ddl + annotationconfiguration + + + + + + org.hsqldb + hsqldb + 2.3.2 + + + + + + org.codehaus.mojo + emma-maven-plugin + 1.0-alpha-3 + + + + org.apache.maven.plugins + maven-pmd-plugin + 3.1 + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + true + once + xml + + **/Abstract*.java + **/*Suite.java + + + **/*Test.java + + + + + org.codehaus.mojo + emma-maven-plugin + true + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.9.1 + + + + + ${basedir}/target/site + + + org.apache.maven.plugins + maven-project-info-reports-plugin + 2.7 + + + sunlink + + javadoc + + true + + + http://docs.oracle.com/javase/6/docs/api/ + + + + + + + + org.codehaus.mojo + emma-maven-plugin + true + + + org.codehaus.mojo + surefire-report-maven-plugin + true + + + + report-only + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + + 128m + 512m + ${encoding} + ${encoding} + ${encoding} + + + + + org.apache.maven.plugins + maven-jxr-plugin + + ${encoding} + ${encoding} + true + apidocs + + + + + diff --git a/src/main/java/com/mca/cmmn/mapper/AreaCodeMapper.java b/src/main/java/com/mca/cmmn/mapper/AreaCodeMapper.java new file mode 100644 index 0000000..1350cdc --- /dev/null +++ b/src/main/java/com/mca/cmmn/mapper/AreaCodeMapper.java @@ -0,0 +1,25 @@ +package com.mca.cmmn.mapper; + +import java.util.List; + +import com.mca.cmmn.vo.AreaCodeVO; + +import egovframework.rte.psl.dataaccess.mapper.Mapper; + +@Mapper("areaCodeMapper") +public interface AreaCodeMapper { + + /** + * + * + * @param searchVO 검색, 페이지 정보 객체 + * @return 게시물 리스트 + * @throws Exception 기본 예외 처리 + */ + public List> selectCity() throws Exception; + + public List> selectCounty(AreaCodeVO areaCodeVO) throws Exception; + + public String selectAreaName(String places) throws Exception; + +} diff --git a/src/main/java/com/mca/cmmn/mapper/LayersMapper.java b/src/main/java/com/mca/cmmn/mapper/LayersMapper.java new file mode 100644 index 0000000..2dfa02b --- /dev/null +++ b/src/main/java/com/mca/cmmn/mapper/LayersMapper.java @@ -0,0 +1,16 @@ +package com.mca.cmmn.mapper; + +import java.util.List; + +import com.mca.cmmn.vo.LayersVO; + +import egovframework.rte.psl.dataaccess.mapper.Mapper; + +@Mapper("layersMapper") +public interface LayersMapper { + + public LayersVO selectFacility(String layer); + + public List selectLayers(); + +} diff --git a/src/main/java/com/mca/cmmn/service/AreaCodeService.java b/src/main/java/com/mca/cmmn/service/AreaCodeService.java new file mode 100644 index 0000000..0cd496d --- /dev/null +++ b/src/main/java/com/mca/cmmn/service/AreaCodeService.java @@ -0,0 +1,48 @@ +package com.mca.cmmn.service; + +import java.util.List; + +import javax.annotation.Resource; + +import org.springframework.stereotype.Service; + +import com.mca.cmmn.mapper.AreaCodeMapper; +import com.mca.cmmn.vo.AreaCodeVO; + +@Service("areaCodeService") +public class AreaCodeService { + + @Resource(name="areaCodeMapper") + AreaCodeMapper areaCodeMapper; + + public List> selectCity() throws Exception { + // TODO Auto-generated method stub + return areaCodeMapper.selectCity(); + } + + + public List> selectCounty(String code, String area) throws Exception { + // TODO Auto-generated method stub + code = code + "___"; + AreaCodeVO areaCodeVO = new AreaCodeVO(); + areaCodeVO.setCode(code); + return areaCodeMapper.selectCounty(areaCodeVO); + } + + + public String selectAreaName(String code) throws Exception{ + // TODO Auto-generated method stub + String areaName = null; + if(code.length() == 5){ + areaName = areaCodeMapper.selectAreaName(code.substring(0, 2)); + areaName = areaName + " " + areaCodeMapper.selectAreaName(code); + }else if(code.length() == 8){ + areaName = areaCodeMapper.selectAreaName(code.substring(0, 2)); + areaName = areaName + " " + areaCodeMapper.selectAreaName(code.substring(0, 5)); + areaName = areaName + " " + areaCodeMapper.selectAreaName(code); + }else { + areaName = areaCodeMapper.selectAreaName(code); + } + return areaName; + } +} diff --git a/src/main/java/com/mca/cmmn/service/LayersService.java b/src/main/java/com/mca/cmmn/service/LayersService.java new file mode 100644 index 0000000..e3e4b7a --- /dev/null +++ b/src/main/java/com/mca/cmmn/service/LayersService.java @@ -0,0 +1,27 @@ +package com.mca.cmmn.service; + +import java.util.List; + +import javax.annotation.Resource; + +import org.springframework.stereotype.Service; + +import com.mca.cmmn.mapper.LayersMapper; +import com.mca.cmmn.vo.LayersVO; + +@Service("layersService") +public class LayersService { + + @Resource(name="layersMapper") + LayersMapper layersMapper; + + public LayersVO selectFacility(String layer) { + return layersMapper.selectFacility(layer); + } + + public List selectLayers() { + // TODO Auto-generated method stub + return layersMapper.selectLayers(); + } + +} diff --git a/src/main/java/com/mca/cmmn/vo/AreaCodeVO.java b/src/main/java/com/mca/cmmn/vo/AreaCodeVO.java new file mode 100644 index 0000000..0d19940 --- /dev/null +++ b/src/main/java/com/mca/cmmn/vo/AreaCodeVO.java @@ -0,0 +1,26 @@ +package com.mca.cmmn.vo; + +public class AreaCodeVO { + String code; + String area; + String tile_id; + + public String getCode() { + return code; + } + public void setCode(String code) { + this.code = code; + } + public String getArea() { + return area; + } + public void setArea(String area) { + this.area = area; + } + public String getTile_id() { + return tile_id; + } + public void setTile_id(String tile_id) { + this.tile_id = tile_id; + } +} diff --git a/src/main/java/com/mca/cmmn/vo/BaseSearchVO.java b/src/main/java/com/mca/cmmn/vo/BaseSearchVO.java new file mode 100644 index 0000000..84045c7 --- /dev/null +++ b/src/main/java/com/mca/cmmn/vo/BaseSearchVO.java @@ -0,0 +1,108 @@ +package com.mca.cmmn.vo; + +public class BaseSearchVO { + + /** + * serialVersion UID + */ + private static final long serialVersionUID = -858838578081269359L; + + /** 검색조건 */ + private String searchCondition = ""; + + /** 검색Keyword */ + private String searchKeyword = ""; + + /** 검색사용여부 */ + private String searchUseYn = ""; + + /** 현재페이지 */ + private int pageIndex = 1; + + /** 페이지갯수 */ + private int pageUnit = 10; + + /** 페이지사이즈 */ + private int pageSize = 10; + + /** firstIndex */ + private int firstIndex = 1; + + /** lastIndex */ + private int lastIndex = 1; + + /** recordCountPerPage */ + private int recordCountPerPage = 10; + + public String getSearchCondition() { + return searchCondition; + } + + public void setSearchCondition(String searchCondition) { + this.searchCondition = searchCondition; + } + + public String getSearchKeyword() { + return searchKeyword; + } + + public void setSearchKeyword(String searchKeyword) { + this.searchKeyword = searchKeyword; + } + + public String getSearchUseYn() { + return searchUseYn; + } + + public void setSearchUseYn(String searchUseYn) { + this.searchUseYn = searchUseYn; + } + + public int getPageIndex() { + return pageIndex; + } + + public void setPageIndex(int pageIndex) { + this.pageIndex = pageIndex; + } + + public int getPageUnit() { + return pageUnit; + } + + public void setPageUnit(int pageUnit) { + this.pageUnit = pageUnit; + } + + public int getPageSize() { + return pageSize; + } + + public void setPageSize(int pageSize) { + this.pageSize = pageSize; + } + + public int getFirstIndex() { + return firstIndex; + } + + public void setFirstIndex(int firstIndex) { + this.firstIndex = firstIndex; + } + + public int getLastIndex() { + return lastIndex; + } + + public void setLastIndex(int lastIndex) { + this.lastIndex = lastIndex; + } + + public int getRecordCountPerPage() { + return recordCountPerPage; + } + + public void setRecordCountPerPage(int recordCountPerPage) { + this.recordCountPerPage = recordCountPerPage; + } +} diff --git a/src/main/java/com/mca/cmmn/vo/LayersVO.java b/src/main/java/com/mca/cmmn/vo/LayersVO.java new file mode 100644 index 0000000..fcdda8d --- /dev/null +++ b/src/main/java/com/mca/cmmn/vo/LayersVO.java @@ -0,0 +1,26 @@ +package com.mca.cmmn.vo; + +public class LayersVO { + private String layer; + private String name; + private String code; + + public String getLayer() { + return layer; + } + public void setLayer(String layer) { + this.layer = layer; + } + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public String getCode() { + return code; + } + public void setCode(String code) { + this.code = code; + } +} diff --git a/src/main/java/com/mca/cmmn/web/AdminController.java b/src/main/java/com/mca/cmmn/web/AdminController.java new file mode 100644 index 0000000..7504536 --- /dev/null +++ b/src/main/java/com/mca/cmmn/web/AdminController.java @@ -0,0 +1,400 @@ +package com.mca.cmmn.web; + +import java.util.ArrayList; +import java.util.List; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; + +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; + +import com.mca.cmmn.service.AreaCodeService; +import com.mca.cmmn.service.LayersService; +import com.mca.cmmn.vo.LayersVO; +import com.mca.map.service.FieldDataService; +import com.mca.map.service.UseHistoryService; +import com.mca.map.service.UseRequestService; +import com.mca.map.vo.FieldDataSearchVO; +import com.mca.map.vo.FieldDataVO; +import com.mca.map.vo.UseHistorySearchVO; +import com.mca.map.vo.UseRequestSearchVO; +import com.mca.map.vo.UseRequestVO; +import com.mca.sec.UserUtil; +import com.mca.sec.vo.LoginUserVO; +import com.mca.user.service.UserService; +import com.mca.user.vo.UserSearchVO; +import com.mca.user.vo.UserVO; + +import egovframework.rte.fdl.property.EgovPropertyService; +import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo; + +@Controller +@RequestMapping("/admin") +public class AdminController { + + /** + * properties값을 가져오는 인터페이스. + **/ + @Resource(name="propertiesService") + private EgovPropertyService propertiesService; + + @Resource(name="useRequestService") + private UseRequestService useRequestService; + + @Resource(name="useHistoryService") + private UseHistoryService useHistoryService; + + @Resource(name="areaCodeService") + private AreaCodeService areaCodeService; + + @Resource(name="layersService") + private LayersService layersService; + + @Resource(name="userService") + private UserService userService; + + @Resource(name="fieldDataService") + private FieldDataService fieldDataService; + + + /** + * 지도 사용요청 목록을 반환한다. + * + * @param useRequestSearchVO 지도사용요청 검색, 페이지 정보 객체 + * @param model 모델 객체 + * @return 지도사용요청 목록 화면 + * @throws + */ + @RequestMapping("/request") + public String reqList(@ModelAttribute("UseRequestSearchVO") UseRequestSearchVO useRequestSearchVO, Model model) throws Exception { + try { + useRequestSearchVO.setPageUnit(propertiesService.getInt("pageUnit")); + useRequestSearchVO.setPageSize(propertiesService.getInt("pageSize")); + + PaginationInfo paginationInfo = new PaginationInfo(); + paginationInfo.setCurrentPageNo(useRequestSearchVO.getPageIndex()); + paginationInfo.setRecordCountPerPage(useRequestSearchVO.getPageUnit()); + paginationInfo.setPageSize(useRequestSearchVO.getPageSize()); + + useRequestSearchVO.setFirstIndex(paginationInfo.getFirstRecordIndex()); + useRequestSearchVO.setLastIndex(paginationInfo.getLastRecordIndex()); + useRequestSearchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage()); + + List> userList = useRequestService.selectUseRequestList(useRequestSearchVO); + int count = useRequestService.selectUseRequestCnt(useRequestSearchVO); + int statusCnt = useRequestService.selectUseRequeststatusCnt(); + + paginationInfo.setTotalRecordCount(count); + + model.addAttribute("paginationInfo", paginationInfo); + model.addAttribute("useRequestList", userList); + model.addAttribute("useRequestSearchVO", useRequestSearchVO); + model.addAttribute("count", count); + model.addAttribute("statusCnt", statusCnt); + + return "admin/request"; + } catch (Exception e) { + // TODO: handle exception + e.printStackTrace(); + return "error/EgovServerError"; + } + } + + /** + * 지도 사용요청 상세화면을 반환한다. + * + * @param idx 지도사용요청 Primary Key + * @param model 모델 객체 + * @return 지도사용요청 상세 화면 + * @throws Exception 기본 예외 처리 + */ + @RequestMapping("/request/{idx}") + public String reqDetail(@PathVariable int idx, Model model) throws Exception{ + try { + LoginUserVO loginUserVO = UserUtil.getMemberInfo(); + + UseRequestVO useRequestVO = useRequestService.selectUseRequest(idx); + useRequestVO = useRequestService.selectUseRequest(idx); + UserVO userVO = userService.selectUserInfo(useRequestVO.getUserid()); + + String layers[] = useRequestVO.getLayers().split(","); + String places[] = useRequestVO.getPlaces().split(","); + + ArrayList selectArea = new ArrayList(); + for(int i=0;i layersVO = layersService.selectLayers(); + model.addAttribute("loginUserVO", loginUserVO); + model.addAttribute("userVO", userVO); + model.addAttribute("useRequestVO", useRequestVO); + model.addAttribute("selectArea", selectArea); + model.addAttribute("layers", layers); + model.addAttribute("layersVO", layersVO); + return "admin/requestView"; + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + return "error/EgovServerError"; + } + } + + /** + * 지도사용이력 목록을 반환한다. + * + * @param useHistorySearchVO 지도사용이력 검색, 페이지 정보 객체 + * @param model 모델 객체 + * @return 지도사용요청 목록 화면 + * @throws + */ + @RequestMapping("/history") + public String history(@ModelAttribute("UseHistorySearchVO") UseHistorySearchVO useHistorySearchVO, Model model) throws Exception { + try { + useHistorySearchVO.setPageUnit(propertiesService.getInt("pageUnit")); + useHistorySearchVO.setPageSize(propertiesService.getInt("pageSize")); + + PaginationInfo paginationInfo = new PaginationInfo(); + paginationInfo.setCurrentPageNo(useHistorySearchVO.getPageIndex()); + paginationInfo.setRecordCountPerPage(useHistorySearchVO.getPageUnit()); + paginationInfo.setPageSize(useHistorySearchVO.getPageSize()); + + useHistorySearchVO.setFirstIndex(paginationInfo.getFirstRecordIndex()); + useHistorySearchVO.setLastIndex(paginationInfo.getLastRecordIndex()); + useHistorySearchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage()); + + List> useHistoryList = useHistoryService.selectUseHistoryList(useHistorySearchVO); + int count = useHistoryService.selectUseHistoryCnt(useHistorySearchVO); + + paginationInfo.setTotalRecordCount(count); + + model.addAttribute("paginationInfo", paginationInfo); + model.addAttribute("useHistoryList", useHistoryList); + model.addAttribute("useHistorySearchVO", useHistorySearchVO); + model.addAttribute("count", count); + + return "admin/history"; + } catch (Exception e) { + // TODO: handle exception + e.printStackTrace(); + return "error/EgovServerError"; + } + } + + /** + * 지도사용요청 승인/거절 처리한다. + * + * @param useRequestVO 지도사용요청 VO + * @param model 모델 객체 + * @return 지도사용요청 목록 화면 + * @throws + */ + @RequestMapping("/updateReqConfirm") + public String updateReqConfirm(@ModelAttribute("useRequestVO") UseRequestVO useRequestVO, Model model) throws Exception { + try { + useRequestService.updateReqConfirm(useRequestVO); + String resultMsg; + if(useRequestVO.getStatus().equals("0")) { + resultMsg = "지도사용요청 승인 처리가 되었습니다."; + }else { + resultMsg = "지도사용요청 거절 처리가 되었습니다."; + } + + model.addAttribute("url", "/admin/request"); + model.addAttribute("resultMsg", resultMsg); + return "/redirect"; + } catch (Exception e) { + // TODO: handle exception + e.printStackTrace(); + return "error/EgovServerError"; + } + } + + /** + * 사용자관리 목록을 반환한다. + * + * @param userSearchVO 사용자정보 검색 VO + * @param model 모델 객체 + * @return 사용자관리 목록 화면 + * @throws + */ + @RequestMapping("/userInfo") + public String userInfo(@ModelAttribute("UserSearchVO") UserSearchVO userSearchVO, Model model) throws Exception { + try { + userSearchVO.setPageUnit(propertiesService.getInt("pageUnit")); + userSearchVO.setPageSize(propertiesService.getInt("pageSize")); + + PaginationInfo paginationInfo = new PaginationInfo(); + paginationInfo.setCurrentPageNo(userSearchVO.getPageIndex()); + paginationInfo.setRecordCountPerPage(userSearchVO.getPageUnit()); + paginationInfo.setPageSize(userSearchVO.getPageSize()); + + userSearchVO.setFirstIndex(paginationInfo.getFirstRecordIndex()); + userSearchVO.setLastIndex(paginationInfo.getLastRecordIndex()); + userSearchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage()); + + List> userList = userService.selectUserList(userSearchVO); + int count = userService.selectUserCount(userSearchVO); + int standByCount = userService.selectUserStandByCount(); + + paginationInfo.setTotalRecordCount(count); + + model.addAttribute("paginationInfo", paginationInfo); + model.addAttribute("userList", userList); + model.addAttribute("userSearchVO", userSearchVO); + model.addAttribute("count", count); + model.addAttribute("standByCount", standByCount); + + return "admin/userInfo"; + } catch (Exception e) { + // TODO: handle exception + e.printStackTrace(); + return "error/EgovServerError"; + } + } + + /** + * 사용자관리 상세화면을 반환한다. + * + * @param userid 사용자정보 ID + * @param model 모델 객체 + * @return 사용자관리 상세 화면 + * @throws + */ + @RequestMapping("/userInfo/{userid}") + public String userInfoView(@PathVariable String userid, Model model) throws Exception { + try { + UserVO userVO = userService.selectUserInfo(userid); + model.addAttribute("userVO", userVO); + + return "admin/userInfoView"; + } catch (Exception e) { + // TODO: handle exception + e.printStackTrace(); + return "error/EgovServerError"; + } + } + + /** + * 사용자정보를 수정한다. + * + * @param req Request 객체 + * @param model 모델 객체 + * @param userVO 사용자정보 VO + * @return 사용자관리 목록 화면 + * @throws + */ + @RequestMapping("/userUpdate") + public String userUpdate(HttpServletRequest req, Model model, UserVO userVO) throws Exception { + try { + userService.updateUser(userVO); + model.addAttribute("url", "/admin/userInfo"); + model.addAttribute("resultMsg", "수정되었습니다."); + return "/redirect"; + } catch (Exception e) { + // TODO: handle exception + e.printStackTrace(); + return "error/EgovServerError"; + } + } + + /** + * 사용자를 승인/거절 처리한다. + * + * @param userVO 사용자정보 VO + * @param model 모델 객체 + * @return 사용자관리 목록 화면 + * @throws + */ + @RequestMapping("/userSign") + public String userSign(@ModelAttribute("userVO") UserVO userVO, Model model) throws Exception { + try { + String resultMsg = null; + if(userVO.getAuth() == 2) { + userService.updateUserSign(userVO.getUserid()); + resultMsg = "승인 처리 되었습니다."; + }else { + userService.updateUserDelete(userVO.getUserid()); + resultMsg = "삭제 처리 되었습니다."; + } + + model.addAttribute("url", "/admin/userInfo?auth=99"); + model.addAttribute("resultMsg", resultMsg); + return "/redirect"; + } catch (Exception e) { + // TODO: handle exception + e.printStackTrace(); + return "error/EgovServerError"; + } + } + + /** + * 현장수집데이터 목록을 반환한다. + * + * @param fieldDataSearchVO 현장수집데이터 검색 VO + * @param model 모델 객체 + * @return 현장수집데이터 목록 화면 + * @throws + */ + @RequestMapping("/fieldData") + public String fieldData(@ModelAttribute("FieldDataSearchVO") FieldDataSearchVO fieldDataSearchVO, Model model) throws Exception { + try { + fieldDataSearchVO.setPageUnit(propertiesService.getInt("pageUnit")); + fieldDataSearchVO.setPageSize(propertiesService.getInt("pageSize")); + + PaginationInfo paginationInfo = new PaginationInfo(); + paginationInfo.setCurrentPageNo(fieldDataSearchVO.getPageIndex()); + paginationInfo.setRecordCountPerPage(fieldDataSearchVO.getPageUnit()); + paginationInfo.setPageSize(fieldDataSearchVO.getPageSize()); + + fieldDataSearchVO.setFirstIndex(paginationInfo.getFirstRecordIndex()); + fieldDataSearchVO.setLastIndex(paginationInfo.getLastRecordIndex()); + fieldDataSearchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage()); + + List> fieldDataList = fieldDataService.selectFieldDataList(fieldDataSearchVO); + int count = fieldDataService.selectFieldDataCnt(fieldDataSearchVO); + + + paginationInfo.setTotalRecordCount(count); + + model.addAttribute("fieldDataList", fieldDataList); + model.addAttribute("paginationInfo", paginationInfo); + model.addAttribute("fieldDataSearchVO", fieldDataSearchVO); + model.addAttribute("count", count); + + return "admin/fieldData"; + } catch (Exception e) { + // TODO: handle exception + e.printStackTrace(); + return "error/EgovServerError"; + } + } + + /** + * 현장수집데이터 상세화면을 반환한다. + * + * @param id 현장수집데이터 id + * @param model 모델 객체 + * @return 현장수집데이터 상세 화면 + * @throws + */ + @RequestMapping("/fieldData/{id}") + public String fieldData(@PathVariable String id, Model model) throws Exception { + try { + FieldDataVO fieldDataVO = fieldDataService.selectFieldData(id); + UserVO userVO = userService.selectUserInfo(fieldDataVO.getUserid()); + + model.addAttribute("fieldDataVO", fieldDataVO); + model.addAttribute("userVO", userVO); + return "admin/fieldView"; + } catch (Exception e) { + // TODO: handle exception + e.printStackTrace(); + return "error/EgovServerError"; + } + } +} diff --git a/src/main/java/com/mca/cmmn/web/CommonController.java b/src/main/java/com/mca/cmmn/web/CommonController.java new file mode 100644 index 0000000..5459686 --- /dev/null +++ b/src/main/java/com/mca/cmmn/web/CommonController.java @@ -0,0 +1,175 @@ +package com.mca.cmmn.web; + +import java.util.List; + +import javax.annotation.Resource; +import javax.servlet.http.HttpSession; + +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +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.bind.annotation.ResponseBody; + +import com.mca.cmmn.service.AreaCodeService; +import com.mca.user.service.UserService; +import com.mca.user.vo.UserVO; + +import egovframework.rte.fdl.property.EgovPropertyService; + +@Controller +public class CommonController { + + + /** + * properties값을 가져오는 인터페이스. + **/ + @Resource(name="propertiesService") + private EgovPropertyService propertiesService; + + @Resource(name="userService") + private UserService userService; + + @Resource(name="areaCodeService") + private AreaCodeService areaCodeService; + + + /** + * 로그인 화면을 반환한다. + * + * @param error 로그인 실패정보 + * @param fail 사용자 인증정보 + * @return 로그인화면 화면 + * @throws Exception 기본 예외 처리 + */ + @RequestMapping(value="/login") + public String login(String error, String fail, Model model) throws Exception{ + try { + if(error != null) { + model.addAttribute("errMsg", "접속자 정보를 찾을 수 없습니다."); + } + if(fail != null) { + model.addAttribute("errMsg", "승인 처리중입니다."); + } + return "login"; + } catch (Exception e) { + // TODO: handle exception + e.printStackTrace(); + return "error/EgovServerError"; + } + } + + /** + * 로그아웃처리를 한다 + * + * @param session 세션 객체 + * @param model 모델 객체 + * @return 로그인 화면 + * @throws Exception 기본 예외 처리 + */ + @RequestMapping(value="/logout") + public String logout(HttpSession session, Model model) throws Exception { + try { + session.removeAttribute("id"); + session.removeAttribute("admin"); + model.addAttribute("url", "/"); + model.addAttribute("resultMsg", "로그아웃 되었습니다."); + return "/redirect"; + } catch (Exception e) { + // TODO: handle exception + e.printStackTrace(); + return "error/EgovServerError"; + } + } + + /** + * 회원가입 화면을 반환한다. + * @return 회원가입 화면 + * @throws Exception 기본 예외 처리 + */ + @RequestMapping(value="/join") + public String join() throws Exception { + try { + return "join"; + } catch (Exception e) { + // TODO: handle exception + e.printStackTrace(); + return "error/EgovServerError"; + } + } + + /** + * 아이디 중복 체크를 한다. + * @param checkId 입력 아이디값 + * @return 성공, 실패 여부 + * @throws Exception 기본 예외 처리 + */ + @RequestMapping(value="/userIdCheck") + @ResponseBody + public String checkId(@RequestParam("checkId")String checkId) throws Exception { + try { + int cnt = userService.selectUserIdCheck(checkId); + if(cnt > 0) { + return "duplicate"; + }else { + return "ok"; + } + } catch (Exception e) { + // TODO: handle exception + e.printStackTrace(); + return "error/EgovServerError"; + } + } + + /** + * 사용자 등록 처리를 한다. + * @param userVO 사용자정보 VO + * @param model 모델 객체 + * @return 로그인 화면 + * @throws Exception 기본 예외 처리 + */ + @RequestMapping(value="/insertUser") + public String userInsert(@ModelAttribute("userVO") UserVO userVO, Model model) throws Exception { + try { + int result = userService.insertUser(userVO); + if(result == 0) { + model.addAttribute("url", "/"); + model.addAttribute("resultMsg", "회원가입이 완료 되었습니다. 승인을 기다려주세요."); + return "/redirect"; + }else { + model.addAttribute("resultMsg", "오류가 발생하였습니다."); + return "/join"; + } + } catch (Exception e) { + // TODO: handle exception + e.printStackTrace(); + return "error/EgovServerError"; + } + } + + /** + * 지역 리스트 가져온다. + * @param code 법정동 코드 + * @param area 지역이름 + * @return 선택된 지역 리스트 + * @throws Exception 기본 예외 처리 + */ + @RequestMapping(value="/selectAreaList") + @ResponseBody + public List> selectAreaList(@RequestParam("code")String code, @RequestParam("area")String area) throws Exception { + List> countyList = areaCodeService.selectCounty(code, area); + return countyList; + } + + /** + * 권한이 없는 사용자가 접근시 권한제한 화면으로 이동한다. + * + * @return 권한없음 페이지 + * @exception Exception 기본 예외 처리 + */ + @RequestMapping("/error/EgovAccessDenied") + public String accessDenied() throws Exception { + return "error/EgovAccessDenied"; + } +} diff --git a/src/main/java/com/mca/cmmn/web/MapController.java b/src/main/java/com/mca/cmmn/web/MapController.java new file mode 100644 index 0000000..5da997f --- /dev/null +++ b/src/main/java/com/mca/cmmn/web/MapController.java @@ -0,0 +1,264 @@ +package com.mca.cmmn.web; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; + +import com.mca.cmmn.service.AreaCodeService; +import com.mca.cmmn.service.LayersService; +import com.mca.cmmn.vo.LayersVO; +import com.mca.map.service.UseRequestService; +import com.mca.map.vo.UseRequestSearchVO; +import com.mca.map.vo.UseRequestVO; +import com.mca.sec.UserUtil; +import com.mca.sec.vo.LoginUserVO; +import com.mca.user.service.UserService; +import com.mca.user.vo.UserVO; + +import egovframework.rte.fdl.property.EgovPropertyService; +import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo; + +@Controller +@RequestMapping("/map") +public class MapController { + + private static final Logger logger = LoggerFactory.getLogger(MapController.class); + + /** + * properties값을 가져오는 인터페이스. + **/ + @Resource(name="propertiesService") + private EgovPropertyService propertiesService; + + @Resource(name="useRequestService") + private UseRequestService useRequestService; + + @Resource(name="areaCodeService") + private AreaCodeService areaCodeService; + + @Resource(name="layersService") + private LayersService layersService; + + @Resource(name="userService") + private UserService userService; + + + /** + * 지도 사용요청 목록을 반환한다. + * + * @param useRequestSearchVO 지도사용요청 검색, 페이지 정보 객체 + * @param request Request 객체 + * @param model 모델 객체 + * @return 지도사용요청 목록 화면 + * @throws + */ + @RequestMapping("/request") + public String reqList(@ModelAttribute("UseRequestSearchVO") UseRequestSearchVO useRequestSearchVO, HttpServletRequest req, Model model) throws Exception { + + LoginUserVO user = (LoginUserVO) req.getSession().getAttribute("userVO"); + + useRequestSearchVO.setPageUnit(propertiesService.getInt("pageUnit")); + useRequestSearchVO.setPageSize(propertiesService.getInt("pageSize")); + useRequestSearchVO.setUserid(user.getUserid()); + + PaginationInfo paginationInfo = new PaginationInfo(); + paginationInfo.setCurrentPageNo(useRequestSearchVO.getPageIndex()); + paginationInfo.setRecordCountPerPage(useRequestSearchVO.getPageUnit()); + paginationInfo.setPageSize(useRequestSearchVO.getPageSize()); + + useRequestSearchVO.setFirstIndex(paginationInfo.getFirstRecordIndex()); + useRequestSearchVO.setLastIndex(paginationInfo.getLastRecordIndex()); + useRequestSearchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage()); + + List> useRequestList = useRequestService.selectUseRequestList(useRequestSearchVO); + int count = useRequestService.selectUseRequestCnt(useRequestSearchVO); + + paginationInfo.setTotalRecordCount(count); + + model.addAttribute("paginationInfo", paginationInfo); + model.addAttribute("useRequestList", useRequestList); + model.addAttribute("useRequestSearchVO", useRequestSearchVO); + model.addAttribute("count", count); + + return "map/request"; + } + + + /** + * 지도 사용요청 상세화면을 반환한다. + * + * @param idx 지도사용요청 Primary Key + * @param model 모델 객체 + * @return 지도사용요청 상세 화면 + * @throws Exception 기본 예외 처리 + */ + @RequestMapping("/request/{idx}") + public String reqDetail(@PathVariable int idx, Model model) throws Exception { + try { + List> cityList = areaCodeService.selectCity(); + UseRequestVO useRequestVO = useRequestService.selectUseRequest(idx); + + if(UserUtil.isEqualMember(useRequestVO.getUserid())) { + String layers[] = useRequestVO.getLayers().split(","); + String places[] = useRequestVO.getPlaces().split(","); + + List selectArea = new ArrayList(); + for(int i=0;i map = new HashMap(); + map.put("name", areaCodeService.selectAreaName(places[i])); + map.put("code", places[i]); + selectArea.add(map); + } + + List layersVO = layersService.selectLayers(); + + model.addAttribute("useRequestVO", useRequestVO); + model.addAttribute("selectArea", selectArea); + model.addAttribute("cityList", cityList); + model.addAttribute("layers", layers); + model.addAttribute("layersVO", layersVO); + + return "map/requestView"; + }else { + model.addAttribute("url", "/map/request"); + model.addAttribute("resultMsg", "권한이 없습니다."); + return "/redirect"; + } + } catch (Exception e) { + e.printStackTrace(); + return "error/EgovServerError"; + } + } + + /** + * 지도 사용요청을 등록한다. + * + * @param useRequestVO 지도사용요청 VO + * @param req request 객체 + * @param model 모델 객체 + * @return 목록 화면 + * @throws Exception 기본 예외 처리 + */ + @RequestMapping(value="/insertReq") + public String insertReq(@ModelAttribute("useRequestVO") UseRequestVO useRequestVO, HttpServletRequest req, Model model) throws Exception { + + LoginUserVO user = (LoginUserVO) req.getSession().getAttribute("userVO"); + useRequestVO.setUserid(user.getUserid()); + useRequestService.insertReq(useRequestVO); + + model.addAttribute("url", "/map/request"); + model.addAttribute("resultMsg", "지도사용요청 신청이 완료되었습니다. 승인을 기다려주세요."); + return "/redirect"; + } + + + /** + * 지도 사용요청을 수정한다. + * + * @param useRequestVO 지도사용요청 VO + * @param model 모델 객체 + * @return 목록 화면 + * @throws Exception 기본 예외 처리 + */ + @RequestMapping(value="/updateReq" ) + public String updateReq(@ModelAttribute("useRequestVO") UseRequestVO useRequestVO, Model model) throws Exception { + + useRequestService.updateReq(useRequestVO); + + model.addAttribute("url", "/map/request"); + model.addAttribute("resultMsg", "지도사용요청 수정이 완료되었습니다. 승인을 기다려주세요."); + return "/redirect"; + } + + /** + * 지도 사용요청을 삭제한다. + * + * @param useRequestVO 지도사용요청 VO + * @param model 모델 객체 + * @return 목록 화면 + * @throws Exception 기본 예외 처리 + */ + @RequestMapping(value="/deleteReq" ) + public String deleteReq(@ModelAttribute("useRequestVO") UseRequestVO useRequestVO, Model model) throws Exception { + + useRequestService.deleteReq(useRequestVO.getIdx()); + + model.addAttribute("url", "/map/reqList"); + model.addAttribute("resultMsg", "지도사용요청이 취소되었습니다.."); + return "/redirect"; + } + + /** + * 지도 사용요청 등록화면을 반환한다. + * + * @param model 모델 객체 + * @return 목록 화면 + * @throws Exception 기본 예외 처리 + */ + @RequestMapping(value="/reqWrite") + public String reqWrite(Model model) throws Exception { + try { + List> cityList = areaCodeService.selectCity(); + List layersVO = layersService.selectLayers(); + + model.addAttribute("layersVO", layersVO); + model.addAttribute("cityList", cityList); + return "map/requestWrite"; + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + return "map/requestWrite"; + } + } + + /** + * 사용자 목록화면을 반환한다. + * + * @param model 모델 객체 + * @param req Request 객체 + * @return 목록 화면 + * @throws Exception 기본 예외 처리 + */ + @RequestMapping("/userInfo") + public String userInfo(HttpServletRequest req, Model model) throws Exception { + + LoginUserVO loginUserVO = (LoginUserVO) req.getSession().getAttribute("userVO"); + UserVO userVO = userService.selectUserInfo(loginUserVO.getUserid()); + + model.addAttribute("userVO", userVO); + + return "map/userInfo"; + } + + /** + * 사용자정보를 수정한다. + * + * @param req Request 객체 + * @param model 모델 객체 + * @param userVO 사용자정보 VO + * @return 목록 화면 + * @throws Exception 기본 예외 처리 + */ + @RequestMapping("/userUpdate") + public String userUpdate(HttpServletRequest req, Model model, UserVO userVO) throws Exception { + + userService.updateUser(userVO); + + model.addAttribute("url", "/map/userInfo"); + model.addAttribute("resultMsg", "수정되었습니다."); + return "/redirect"; + } + + +} diff --git a/src/main/java/com/mca/map/mapper/FieldDataMapper.java b/src/main/java/com/mca/map/mapper/FieldDataMapper.java new file mode 100644 index 0000000..4c761ad --- /dev/null +++ b/src/main/java/com/mca/map/mapper/FieldDataMapper.java @@ -0,0 +1,18 @@ +package com.mca.map.mapper; + +import java.util.List; + +import com.mca.map.vo.FieldDataSearchVO; +import com.mca.map.vo.FieldDataVO; + +import egovframework.rte.psl.dataaccess.mapper.Mapper; + +@Mapper("fieldDataMapper") +public interface FieldDataMapper { + + List> selectFieldDataList(FieldDataSearchVO fieldDataSearchVO); + + int selectFieldDataCnt(FieldDataSearchVO fieldDataSearchVO); + + FieldDataVO selectFieldData(String id); +} diff --git a/src/main/java/com/mca/map/mapper/UseHistoryMapper.java b/src/main/java/com/mca/map/mapper/UseHistoryMapper.java new file mode 100644 index 0000000..1dacee7 --- /dev/null +++ b/src/main/java/com/mca/map/mapper/UseHistoryMapper.java @@ -0,0 +1,15 @@ +package com.mca.map.mapper; + +import java.util.List; + +import com.mca.map.vo.UseHistorySearchVO; + +import egovframework.rte.psl.dataaccess.mapper.Mapper; + +@Mapper("useHistoryMapper") +public interface UseHistoryMapper { + + List> selectUseHistoryList(UseHistorySearchVO useHistorySearchVO); + + int selectUseHistoryCnt(UseHistorySearchVO useHistorySearchVO); +} diff --git a/src/main/java/com/mca/map/mapper/UseReqeustMapper.java b/src/main/java/com/mca/map/mapper/UseReqeustMapper.java new file mode 100644 index 0000000..5e9a94d --- /dev/null +++ b/src/main/java/com/mca/map/mapper/UseReqeustMapper.java @@ -0,0 +1,29 @@ +package com.mca.map.mapper; + +import java.util.List; + +import com.mca.map.vo.UseRequestSearchVO; +import com.mca.map.vo.UseRequestVO; + +import egovframework.rte.psl.dataaccess.mapper.Mapper; + +@Mapper("useReqeustMapper") +public interface UseReqeustMapper { + + + public int selectUseRequestCnt(UseRequestSearchVO useRequestSearchVO); + + public List> selectUseRequestList(UseRequestSearchVO useRequestSearchVO); + + public void insertReq(UseRequestVO useRequestVO); + + public UseRequestVO selectUseRequest(int idx); + + public void updateReq(UseRequestVO useRequestVO); + + public void deleteReq(int idx); + + public void updateReqConfirm(UseRequestVO useRequestVO); + + public int selectUseRequeststatusCnt(); +} diff --git a/src/main/java/com/mca/map/service/FieldDataService.java b/src/main/java/com/mca/map/service/FieldDataService.java new file mode 100644 index 0000000..24c63c6 --- /dev/null +++ b/src/main/java/com/mca/map/service/FieldDataService.java @@ -0,0 +1,34 @@ +package com.mca.map.service; + + +import java.util.List; + +import javax.annotation.Resource; + +import org.springframework.stereotype.Service; + +import com.mca.map.mapper.FieldDataMapper; +import com.mca.map.vo.FieldDataSearchVO; +import com.mca.map.vo.FieldDataVO; + +@Service("fieldDataService") +public class FieldDataService { + + @Resource(name="fieldDataMapper") + FieldDataMapper fieldDataMapper; + + public List> selectFieldDataList(FieldDataSearchVO fieldDataSearchVO) { + // TODO Auto-generated method stub + return fieldDataMapper.selectFieldDataList(fieldDataSearchVO); + } + + public int selectFieldDataCnt(FieldDataSearchVO fieldDataSearchVO) { + // TODO Auto-generated method stub + return fieldDataMapper.selectFieldDataCnt(fieldDataSearchVO); + } + + public FieldDataVO selectFieldData(String id) { + // TODO Auto-generated method stub + return fieldDataMapper.selectFieldData(id); + } +} diff --git a/src/main/java/com/mca/map/service/UseHistoryService.java b/src/main/java/com/mca/map/service/UseHistoryService.java new file mode 100644 index 0000000..fe1a7b8 --- /dev/null +++ b/src/main/java/com/mca/map/service/UseHistoryService.java @@ -0,0 +1,27 @@ +package com.mca.map.service; + +import java.util.List; + +import javax.annotation.Resource; + +import org.springframework.stereotype.Service; +import com.mca.map.mapper.UseHistoryMapper; +import com.mca.map.vo.UseHistorySearchVO; + +@Service("useHistoryService") +public class UseHistoryService { + + @Resource(name="useHistoryMapper") + UseHistoryMapper useHistoryMapper; + + + public int selectUseHistoryCnt(UseHistorySearchVO useHistorySearchVO) { + // TODO Auto-generated method stub + return useHistoryMapper.selectUseHistoryCnt(useHistorySearchVO); + } + + public List> selectUseHistoryList(UseHistorySearchVO useHistorySearchVO) { + // TODO Auto-generated method stub + return useHistoryMapper.selectUseHistoryList(useHistorySearchVO); + } +} diff --git a/src/main/java/com/mca/map/service/UseRequestService.java b/src/main/java/com/mca/map/service/UseRequestService.java new file mode 100644 index 0000000..61b0927 --- /dev/null +++ b/src/main/java/com/mca/map/service/UseRequestService.java @@ -0,0 +1,63 @@ +package com.mca.map.service; + +import java.util.List; + +import javax.annotation.Resource; + +import org.springframework.stereotype.Service; + +import com.mca.map.mapper.UseReqeustMapper; +import com.mca.map.vo.UseRequestSearchVO; +import com.mca.map.vo.UseRequestVO; + +@Service("useRequestService") +public class UseRequestService { + + @Resource(name="useReqeustMapper") + UseReqeustMapper useReqeustMapper; + + public List> selectUseRequestList(UseRequestSearchVO useRequestSearchVO) { + // TODO Auto-generated method stub + return useReqeustMapper.selectUseRequestList(useRequestSearchVO); + } + + public int selectUseRequestCnt(UseRequestSearchVO useRequestSearchVO) { + // TODO Auto-generated method stub + return useReqeustMapper.selectUseRequestCnt(useRequestSearchVO); + } + + public void insertReq(UseRequestVO useRequestVO) { + // TODO Auto-generated method stub + useReqeustMapper.insertReq(useRequestVO); + } + + public UseRequestVO selectUseRequest(int idx) { + // TODO Auto-generated method stub + return useReqeustMapper.selectUseRequest(idx); + } + + public void updateReq(UseRequestVO useRequestVO) { + // TODO Auto-generated method stub + useReqeustMapper.updateReq(useRequestVO); + } + + public void deleteReq(int idx) { + // TODO Auto-generated method stub + useReqeustMapper.deleteReq(idx); + } + + public void updateReqConfirm(UseRequestVO useRequestVO) { + // TODO Auto-generated method stub + useReqeustMapper.updateReqConfirm(useRequestVO); + } + + public int selectUseRequeststatusCnt() { + // TODO Auto-generated method stub + return useReqeustMapper.selectUseRequeststatusCnt(); + } + + + + + +} diff --git a/src/main/java/com/mca/map/vo/FieldDataSearchVO.java b/src/main/java/com/mca/map/vo/FieldDataSearchVO.java new file mode 100644 index 0000000..ae7ce84 --- /dev/null +++ b/src/main/java/com/mca/map/vo/FieldDataSearchVO.java @@ -0,0 +1,7 @@ +package com.mca.map.vo; + +import com.mca.cmmn.vo.BaseSearchVO; + +public class FieldDataSearchVO extends BaseSearchVO{ + +} \ No newline at end of file diff --git a/src/main/java/com/mca/map/vo/FieldDataVO.java b/src/main/java/com/mca/map/vo/FieldDataVO.java new file mode 100644 index 0000000..d1ddcc3 --- /dev/null +++ b/src/main/java/com/mca/map/vo/FieldDataVO.java @@ -0,0 +1,85 @@ +package com.mca.map.vo; + +import com.mca.user.vo.UserVO; + +public class FieldDataVO { + private String id; + private String userid; + private String save_date; + private String data_path; + private String layer_id; + private String field_data; + private String region; + private String description; + private String status; + private String err_note; + + private UserVO userVO; + + public UserVO getUserVO() { + return userVO; + } + public void setUserVO(UserVO userVO) { + this.userVO = userVO; + } + public String getId() { + return id; + } + public void setId(String id) { + this.id = id; + } + public String getUserid() { + return userid; + } + public void setUserid(String userid) { + this.userid = userid; + } + public String getSave_date() { + return save_date; + } + public void setSave_date(String save_date) { + this.save_date = save_date; + } + public String getData_path() { + return data_path; + } + public void setData_path(String data_path) { + this.data_path = data_path; + } + public String getLayer_id() { + return layer_id; + } + public void setLayer_id(String layer_id) { + this.layer_id = layer_id; + } + public String getField_data() { + return field_data; + } + public void setField_data(String field_data) { + this.field_data = field_data; + } + public String getRegion() { + return region; + } + public void setRegion(String region) { + this.region = region; + } + public String getDescription() { + return description; + } + public void setDescription(String description) { + this.description = description; + } + public String getStatus() { + return status; + } + public void setStatus(String status) { + this.status = status; + } + public String getErr_note() { + return err_note; + } + public void setErr_note(String err_note) { + this.err_note = err_note; + } +} diff --git a/src/main/java/com/mca/map/vo/UseHistorySearchVO.java b/src/main/java/com/mca/map/vo/UseHistorySearchVO.java new file mode 100644 index 0000000..9da91df --- /dev/null +++ b/src/main/java/com/mca/map/vo/UseHistorySearchVO.java @@ -0,0 +1,29 @@ +package com.mca.map.vo; + +import com.mca.cmmn.vo.BaseSearchVO; + +public class UseHistorySearchVO extends BaseSearchVO{ + + private String userid; + private String company; + private String area; + + public String getUserid() { + return userid; + } + public void setUserid(String userid) { + this.userid = userid; + } + public String getCompany() { + return company; + } + public void setCompany(String company) { + this.company = company; + } + public String getArea() { + return area; + } + public void setArea(String area) { + this.area = area; + } +} \ No newline at end of file diff --git a/src/main/java/com/mca/map/vo/UseHistoryVO.java b/src/main/java/com/mca/map/vo/UseHistoryVO.java new file mode 100644 index 0000000..f828d42 --- /dev/null +++ b/src/main/java/com/mca/map/vo/UseHistoryVO.java @@ -0,0 +1,50 @@ +package com.mca.map.vo; + +public class UseHistoryVO { + private String logDate; + private String reqArea; + // private String content; + private String userid; + private String name; + private String company; + + public String getLogDate() { + return logDate; + } + + public void setLogDate(String logDate) { + this.logDate = logDate; + } + + public String getReqArea() { + return reqArea; + } + + public void setReqArea(String reqArea) { + this.reqArea = reqArea; + } + + public String getUserid() { + return userid; + } + + public void setUserid(String userid) { + this.userid = userid; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getCompany() { + return company; + } + + public void setCompany(String company) { + this.company = company; + } +} diff --git a/src/main/java/com/mca/map/vo/UseRequestSearchVO.java b/src/main/java/com/mca/map/vo/UseRequestSearchVO.java new file mode 100644 index 0000000..10203fc --- /dev/null +++ b/src/main/java/com/mca/map/vo/UseRequestSearchVO.java @@ -0,0 +1,36 @@ +package com.mca.map.vo; + +import com.mca.cmmn.vo.BaseSearchVO; + +public class UseRequestSearchVO extends BaseSearchVO{ + + private String userid; + private String company; + private String area; + private String status; + + public String getUserid() { + return userid; + } + public void setUserid(String userid) { + this.userid = userid; + } + public String getCompany() { + return company; + } + public void setCompany(String company) { + this.company = company; + } + public String getArea() { + return area; + } + public void setArea(String area) { + this.area = area; + } + public String getStatus() { + return status; + } + public void setStatus(String status) { + this.status = status; + } +} diff --git a/src/main/java/com/mca/map/vo/UseRequestVO.java b/src/main/java/com/mca/map/vo/UseRequestVO.java new file mode 100644 index 0000000..75481e2 --- /dev/null +++ b/src/main/java/com/mca/map/vo/UseRequestVO.java @@ -0,0 +1,113 @@ +package com.mca.map.vo; + +public class UseRequestVO { + private int idx; + private String title; + private String status; + private String s_date; + private String e_date; + private String r_date; + private String places; + private String layers; + private String tile_id; + private String userid; + private String user_msg; + private String admin_id; + private String admin_msg; + + private String name; + private String company; + + public int getIdx() { + return idx; + } + public void setIdx(int idx) { + this.idx = idx; + } + public String getTitle() { + return title; + } + public void setTitle(String title) { + this.title = title; + } + public String getStatus() { + return status; + } + public void setStatus(String status) { + this.status = status; + } + public String getS_date() { + return s_date; + } + public void setS_date(String s_date) { + this.s_date = s_date; + } + public String getE_date() { + return e_date; + } + public void setE_date(String e_date) { + this.e_date = e_date; + } + public String getR_date() { + return r_date; + } + public void setR_date(String r_date) { + this.r_date = r_date; + } + public String getPlaces() { + return places; + } + public void setPlaces(String places) { + this.places = places; + } + public String getLayers() { + return layers; + } + public void setLayers(String layers) { + this.layers = layers; + } + public String getTile_id() { + return tile_id; + } + public void setTile_id(String tile_id) { + this.tile_id = tile_id; + } + public String getUserid() { + return userid; + } + public void setUserid(String userid) { + this.userid = userid; + } + public String getUser_msg() { + return user_msg; + } + public void setUser_msg(String user_msg) { + this.user_msg = user_msg; + } + public String getAdmin_id() { + return admin_id; + } + public void setAdmin_id(String admin_id) { + this.admin_id = admin_id; + } + public String getAdmin_msg() { + return admin_msg; + } + public void setAdmin_msg(String admin_msg) { + this.admin_msg = admin_msg; + } + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public String getCompany() { + return company; + } + public void setCompany(String company) { + this.company = company; + } + + +} diff --git a/src/main/java/com/mca/sec/LoginSuccessHandler.java b/src/main/java/com/mca/sec/LoginSuccessHandler.java new file mode 100644 index 0000000..7a5ce35 --- /dev/null +++ b/src/main/java/com/mca/sec/LoginSuccessHandler.java @@ -0,0 +1,47 @@ +package com.mca.sec; + +import java.io.IOException; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import org.springframework.security.core.Authentication; +import org.springframework.security.web.authentication.AuthenticationSuccessHandler; + +import com.mca.sec.vo.LoginUserVO; +import com.mca.sec.UserUtil; + +public class LoginSuccessHandler implements AuthenticationSuccessHandler{ + private String roleName; + + @Override + public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, + Authentication authentication) throws IOException, ServletException { + // TODO Auto-generated method stub + + LoginUserVO user = UserUtil.getMemberInfo(); + + HttpSession session = request.getSession(); + session.setAttribute("userVO", user); + + LoginSuccessHandler loginSuccessHandler = new LoginSuccessHandler(); + authentication.getAuthorities().forEach(authority ->{ + loginSuccessHandler.roleName = authority.getAuthority(); + }); + + if(loginSuccessHandler.roleName.equals("ROLE_USER")) { + response.sendRedirect("/map/request"); + return; + }else if(loginSuccessHandler.roleName.equals("ROLE_ADMIN")) { + response.sendRedirect("/admin/request"); + return; + }else if(loginSuccessHandler.roleName.equals("ROLE_DISABLE")) { + response.sendRedirect("/login?fail"); + return; + } + response.sendRedirect("/"); + } + +} diff --git a/src/main/java/com/mca/sec/LogoutSuccessHandler.java b/src/main/java/com/mca/sec/LogoutSuccessHandler.java new file mode 100644 index 0000000..05cef44 --- /dev/null +++ b/src/main/java/com/mca/sec/LogoutSuccessHandler.java @@ -0,0 +1,25 @@ +package com.mca.sec; + +import java.io.IOException; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.security.core.Authentication; +import org.springframework.security.web.authentication.logout.SimpleUrlLogoutSuccessHandler; + +public class LogoutSuccessHandler extends SimpleUrlLogoutSuccessHandler{ + + private String successUrl = "/"; + + public void setSuccessUrl(String successUrl){ + this.successUrl = successUrl; + } + + public void onLogoutSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException, ServletException { + setDefaultTargetUrl(successUrl); + super.onLogoutSuccess(request, response, authentication); + } + +} diff --git a/src/main/java/com/mca/sec/UserUtil.java b/src/main/java/com/mca/sec/UserUtil.java new file mode 100644 index 0000000..e51d99e --- /dev/null +++ b/src/main/java/com/mca/sec/UserUtil.java @@ -0,0 +1,31 @@ +package com.mca.sec; + +import com.mca.sec.vo.LoginUserVO; +import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper; +public class UserUtil { + + /** + * 현재 로그인 상태인 회원의 정보를 반환한다. 로그인 상태가 아니면 null값을 반환한다. + * @return loginUserVO 회원 정보 + */ + public static LoginUserVO getMemberInfo() { + return (LoginUserVO) EgovUserDetailsHelper.getAuthenticatedUser(); + } + + /** + * 현재 로그인 상태인 회원과 선택한 회원이 동일한지 확인한다. + * @return boolean + */ + public static boolean isEqualMember(String target) { + LoginUserVO member = getMemberInfo(); + if (getMemberInfo() != null) { + if(member.getUserid().equals(target)){ + return true; + } else{ + return false; + } + } else { + return false; + } + } +} diff --git a/src/main/java/com/mca/sec/mapper/SecurityMapper.java b/src/main/java/com/mca/sec/mapper/SecurityMapper.java new file mode 100644 index 0000000..ea639f8 --- /dev/null +++ b/src/main/java/com/mca/sec/mapper/SecurityMapper.java @@ -0,0 +1,15 @@ +package com.mca.sec.mapper; + +import com.mca.sec.vo.LoginUserVO; +import com.mca.sec.vo.SecurityRolesVO; + +import egovframework.rte.psl.dataaccess.mapper.Mapper; + +@Mapper("securityMapper") +public interface SecurityMapper { + + public LoginUserVO getUser(String userid); + + public SecurityRolesVO getAuthoritiesUser(int auth); + +} diff --git a/src/main/java/com/mca/sec/service/SecurityService.java b/src/main/java/com/mca/sec/service/SecurityService.java new file mode 100644 index 0000000..4a661e1 --- /dev/null +++ b/src/main/java/com/mca/sec/service/SecurityService.java @@ -0,0 +1,44 @@ +package com.mca.sec.service; + +import java.util.ArrayList; +import java.util.List; + +import javax.annotation.Resource; + +import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.userdetails.UserDetails; +import org.springframework.security.core.userdetails.UserDetailsService; +import org.springframework.security.core.userdetails.UsernameNotFoundException; + +import com.mca.sec.mapper.SecurityMapper; +import com.mca.sec.vo.LoginUserVO; + +import egovframework.rte.fdl.security.userdetails.EgovUserDetails; + + +public class SecurityService implements UserDetailsService{ + + @Resource(name = "securityMapper") + SecurityMapper securityMapper; + + + @Override + public UserDetails loadUserByUsername(String userid) throws UsernameNotFoundException { + // TODO Auto-generated method stub + + LoginUserVO member = securityMapper.getUser(userid); + List authorities = new ArrayList(); + + if (member != null) { + authorities.add(securityMapper.getAuthoritiesUser(member.getAuth())); + } else { + throw new UsernameNotFoundException("접속자 정보를 찾을 수 없습니다."); + } + if (authorities.size() == 0) { + throw new UsernameNotFoundException("User " + member.getUserid()+ " has no GrantedAuthority"); + } + + return new EgovUserDetails(member.getUserid(), member.getPassword(), true, true, true, true, authorities, member); + } + +} diff --git a/src/main/java/com/mca/sec/vo/LoginUserVO.java b/src/main/java/com/mca/sec/vo/LoginUserVO.java new file mode 100644 index 0000000..5000f71 --- /dev/null +++ b/src/main/java/com/mca/sec/vo/LoginUserVO.java @@ -0,0 +1,76 @@ +package com.mca.sec.vo; + +public class LoginUserVO { + private String userid; + private String password; + private String name; + private String company; + private String email; + private String phonenum; + private String regdate; + private int auth; + private String code; + private String description; + + + public String getUserid() { + return userid; + } + public void setUserid(String userid) { + this.userid = userid; + } + public String getPassword() { + return password; + } + public void setPassword(String password) { + this.password = password; + } + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public String getCompany() { + return company; + } + public void setCompany(String company) { + this.company = company; + } + public String getEmail() { + return email; + } + public void setEmail(String email) { + this.email = email; + } + public String getPhonenum() { + return phonenum; + } + public void setPhonenum(String phonenum) { + this.phonenum = phonenum; + } + public String getRegdate() { + return regdate; + } + public void setRegdate(String regdate) { + this.regdate = regdate; + } + public int getAuth() { + return auth; + } + public void setAuth(int auth) { + this.auth = auth; + } + public String getCode() { + return code; + } + public void setCode(String code) { + this.code = code; + } + public String getDescription() { + return description; + } + public void setDescription(String description) { + this.description = description; + } +} diff --git a/src/main/java/com/mca/sec/vo/SecurityRolesVO.java b/src/main/java/com/mca/sec/vo/SecurityRolesVO.java new file mode 100644 index 0000000..4d082a8 --- /dev/null +++ b/src/main/java/com/mca/sec/vo/SecurityRolesVO.java @@ -0,0 +1,28 @@ +package com.mca.sec.vo; + +import org.springframework.security.core.GrantedAuthority; + +public class SecurityRolesVO implements GrantedAuthority { + + /** + * + */ + private static final long serialVersionUID = 1L; + + private int auth; + private String authority; + + + public int getAuth() { + return auth; + } + public void setAuth(int auth) { + this.auth = auth; + } + public String getAuthority() { + return authority; + } + public void setAuthority(String authority) { + this.authority = authority; + } +} diff --git a/src/main/java/com/mca/user/mapper/UserMapper.java b/src/main/java/com/mca/user/mapper/UserMapper.java new file mode 100644 index 0000000..04b5b06 --- /dev/null +++ b/src/main/java/com/mca/user/mapper/UserMapper.java @@ -0,0 +1,30 @@ +package com.mca.user.mapper; + +import java.util.List; + +import com.mca.user.vo.UserSearchVO; +import com.mca.user.vo.UserVO; + +import egovframework.rte.psl.dataaccess.mapper.Mapper; + +@Mapper("userMapper") +public interface UserMapper { + + public int selectUserIdCheck(String checkId); + + public void insertUser(UserVO userVO); + + public UserVO selectUserInfo(String userid); + + public List> selectUserList(UserSearchVO userSearchVO); + + public int selectUserCount(UserSearchVO userSearchVO); + + public int selectUserStandByCount(); + + public void updateUserSign(String userid); + + public void updateUserDelete(String userid); + + public void updateUser(UserVO userVO); +} diff --git a/src/main/java/com/mca/user/service/UserService.java b/src/main/java/com/mca/user/service/UserService.java new file mode 100644 index 0000000..094557a --- /dev/null +++ b/src/main/java/com/mca/user/service/UserService.java @@ -0,0 +1,81 @@ +package com.mca.user.service; + +import java.util.List; + +import javax.annotation.Resource; + +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; +import org.springframework.stereotype.Service; + +import com.mca.user.mapper.UserMapper; +import com.mca.user.vo.UserSearchVO; +import com.mca.user.vo.UserVO; + +@Service("userService") +public class UserService { + + @Resource(name="userMapper") + UserMapper userMapper; + + public int selectUserIdCheck(String checkId) { + return userMapper.selectUserIdCheck(checkId); + } + + public int insertUser(UserVO userVO) { + // TODO Auto-generated method stub + + try { + /* bcrypt 사용 고려 */ + //BCryptPasswordEncoder bcryptPasswordEncoder = new BCryptPasswordEncoder(10); + //userVO.setPassword(bcryptPasswordEncoder.encode(userVO.getPassword())); + + userMapper.insertUser(userVO); + return 0; + + }catch (Exception e) { + return -1; + } + + } + + public UserVO selectUserInfo(String userid) { + // TODO Auto-generated method stub + return userMapper.selectUserInfo(userid); + } + + public List> selectUserList(UserSearchVO userSearchVO) { + // TODO Auto-generated method stub + return userMapper.selectUserList(userSearchVO); + } + + public int selectUserCount(UserSearchVO userSearchVO) { + // TODO Auto-generated method stub + return userMapper.selectUserCount(userSearchVO); + } + + public int selectUserStandByCount() { + // TODO Auto-generated method stub + return userMapper.selectUserStandByCount(); + } + + public void updateUserSign(String userid) { + // TODO Auto-generated method stub + userMapper.updateUserSign(userid); + } + + public void updateUserDelete(String userid) { + // TODO Auto-generated method stub + userMapper.updateUserDelete(userid); + } + + public void updateUser(UserVO userVO) { + // TODO Auto-generated method stub + if(userVO.getPassword() != null && !userVO.getPassword().equals("")) { + /* bcrypt 사용 고려 */ + //BCryptPasswordEncoder bcryptPasswordEncoder = new BCryptPasswordEncoder(10); + //userVO.setPassword(bcryptPasswordEncoder.encode(userVO.getPassword())); + } + + userMapper.updateUser(userVO); + } +} diff --git a/src/main/java/com/mca/user/vo/UserSearchVO.java b/src/main/java/com/mca/user/vo/UserSearchVO.java new file mode 100644 index 0000000..fe7ae34 --- /dev/null +++ b/src/main/java/com/mca/user/vo/UserSearchVO.java @@ -0,0 +1,44 @@ +package com.mca.user.vo; + +import com.mca.cmmn.vo.BaseSearchVO; + +public class UserSearchVO extends BaseSearchVO{ + + private String userid; + private String name; + private String company; + private String phonenum; + private String auth; + + public String getUserid() { + return userid; + } + public void setUserid(String userid) { + this.userid = userid; + } + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public String getCompany() { + return company; + } + public void setCompany(String company) { + this.company = company; + } + public String getPhonenum() { + return phonenum; + } + public void setPhonenum(String phonenum) { + this.phonenum = phonenum; + } + public String getAuth() { + return auth; + } + public void setAuth(String auth) { + this.auth = auth; + } + +} diff --git a/src/main/java/com/mca/user/vo/UserVO.java b/src/main/java/com/mca/user/vo/UserVO.java new file mode 100644 index 0000000..4a5c2b2 --- /dev/null +++ b/src/main/java/com/mca/user/vo/UserVO.java @@ -0,0 +1,76 @@ +package com.mca.user.vo; + +public class UserVO { + private String userid; + private String password; + private String name; + private String company; + private String email; + private String phonenum; + private String regdate; + private int auth; + private String code; + private String description; + + + public String getUserid() { + return userid; + } + public void setUserid(String userid) { + this.userid = userid; + } + public String getPassword() { + return password; + } + public void setPassword(String password) { + this.password = password; + } + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public String getCompany() { + return company; + } + public void setCompany(String company) { + this.company = company; + } + public String getEmail() { + return email; + } + public void setEmail(String email) { + this.email = email; + } + public String getPhonenum() { + return phonenum; + } + public void setPhonenum(String phonenum) { + this.phonenum = phonenum; + } + public String getRegdate() { + return regdate; + } + public void setRegdate(String regdate) { + this.regdate = regdate; + } + public int getAuth() { + return auth; + } + public void setAuth(int auth) { + this.auth = auth; + } + public String getCode() { + return code; + } + public void setCode(String code) { + this.code = code; + } + public String getDescription() { + return description; + } + public void setDescription(String description) { + this.description = description; + } +} diff --git a/src/main/java/com/mca/util/ImgPaginationRenderer.java b/src/main/java/com/mca/util/ImgPaginationRenderer.java new file mode 100644 index 0000000..342df62 --- /dev/null +++ b/src/main/java/com/mca/util/ImgPaginationRenderer.java @@ -0,0 +1,68 @@ +/* + * Copyright 2008-2009 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.mca.util; + +import egovframework.rte.ptl.mvc.tags.ui.pagination.AbstractPaginationRenderer; + +import javax.servlet.ServletContext; + +import org.springframework.web.context.ServletContextAware; + +/** + * @Class Name : ImagePaginationRenderer.java + * @Description : ImagePaginationRenderer Class + * @Modification Information + * @ + * @ 수정일 수정자 수정내용 + * @ --------- --------- ------------------------------- + * @ 2009.03.16 최초생성 + * + * @author 개발프레임웍크 실행환경 개발팀 + * @since 2009. 03.16 + * @version 1.0 + * @see + * + * Copyright (C) by MOPAS All right reserved. + */ +public class ImgPaginationRenderer extends AbstractPaginationRenderer implements ServletContextAware{ + + private ServletContext servletContext; + + public ImgPaginationRenderer() { + // no-op + } + + /** + * PaginationRenderer + * + * @see 개발프레임웍크 실행환경 개발팀 + */ + public void initVariables() { + + firstPageLabel = "" + " "; + previousPageLabel = "" + " "; + currentPageLabel = "{0} "; + otherPageLabel = "{2} "; + nextPageLabel = "" + " "; + lastPageLabel = "" + " "; + } + + @Override + public void setServletContext(ServletContext servletContext) { + this.servletContext = servletContext; + initVariables(); + } +} diff --git a/src/main/resources/egovframework/message/message-common.properties b/src/main/resources/egovframework/message/message-common.properties new file mode 100644 index 0000000..518ba4b --- /dev/null +++ b/src/main/resources/egovframework/message/message-common.properties @@ -0,0 +1,45 @@ +#UI resource# +list.sample=List Sample +button.search=\uac80\uc0c9 +button.list=\ubaa9\ub85d +button.modify=\uc218\uc815 +button.create=\ub4f1\ub85d +button.reset=\uc7ac\uc124\uc815 +button.delete=\uc0ad\uc81c +search.choose=\uac80\uc0c9\uc5b4 \uc120\ud0dd +search.keyword=\uac80\uc0c9\uc5b4 \uc785\ub825 +search.name=\uc774\ub984 +search.id=ID +title.sample.id=\uce74\ud14c\uace0\ub9acID +title.sample.name=\uce74\ud14c\uace0\ub9ac\uba85 +title.sample.useYn=\uc0ac\uc6a9\uc5ec\ubd80 +title.sample.description=\uc124\uba85 +title.sample.regUser=\ub4f1\ub85d\uc790 +title.sample=\uae30\ubcf8 \uac8c\uc2dc\ud310 \ubaa9\ub85d + +# image name # +image.search=btn_form_search.gif +image.errorBg=error + +# -- validator errors -- # +fail.common.msg=\uc5d0\ub7ec\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4! +fail.common.sql=sql \uc5d0\ub7ec\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4! error code: {0}, error msg: {1} +info.nodata.msg=\ud574\ub2f9 \ub370\uc774\ud130\uac00 \uc5c6\uc2b5\ub2c8\ub2e4. +errors.prefix= +errors.suffix= +errors.required={0} \uc740 \ud544\uc218 \uc785\ub825\uac12\uc785\ub2c8\ub2e4. +errors.minlength={0} \uc740 {1}\uc790 \uc774\uc0c1 \uc785\ub825\ud574\uc57c \ud569\ub2c8\ub2e4. +errors.maxlength={0} \uc740 {1}\uc790 \uc774\uc0c1 \uc785\ub825\ud560\uc218 \uc5c6\uc2b5\ub2c8\ub2e4. +errors.invalid={0} \uc740 \uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 \uac12\uc785\ub2c8\ub2e4. +errors.byte={0} \uc740 byte \ud0c0\uc785\uc774\uc5b4\uc57c \ud569\ub2c8\ub2e4. +errors.short={0} \uc740 short \ud0c0\uc785\uc774\uc5b4\uc57c \ud569\ub2c8\ub2e4. +errors.integer={0} \uc740 integer \ud0c0\uc785\uc774\uc5b4\uc57c \ud569\ub2c8\ub2e4. +errors.long={0} \uc740 long \ud0c0\uc785\uc774\uc5b4\uc57c \ud569\ub2c8\ub2e4. +errors.float={0} \uc740 float \ud0c0\uc785\uc774\uc5b4\uc57c \ud569\ub2c8\ub2e4. +errors.double={0} \uc740 double \ud0c0\uc785\uc774\uc5b4\uc57c \ud569\ub2c8\ub2e4. +errors.date={0} \uc740 \ub0a0\uc9dc \uc720\ud615\uc774 \uc544\ub2d9\ub2c8\ub2e4. +errors.range={0} \uc740 {1} \uacfc {2} \uc0ac\uc774\uc758 \uac12\uc774\uc5b4\uc57c \ud569\ub2c8\ub2e4. +errors.creditcard={0} \uc740 \uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 \uc2e0\uc6a9\uce74\ub4dc \ubc88\ud638\uc785\ub2c8\ub2e4. +errors.email={0} \uc740 \uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 \uc774\uba54\uc77c \uc8fc\uc18c\uc785\ub2c8\ub2e4. +errors.ihidnum=\uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 \uc8fc\ubbfc\ub4f1\ub85d\ubc88\ud638\uc785\ub2c8\ub2e4. +errors.korean={0}\uc740 \ud55c\uae00\uc744 \uc785\ub825\ud558\uc154\uc57c \ud569\ub2c8\ub2e4. \ No newline at end of file diff --git a/src/main/resources/egovframework/message/message-common_en.properties b/src/main/resources/egovframework/message/message-common_en.properties new file mode 100644 index 0000000..1d45910 --- /dev/null +++ b/src/main/resources/egovframework/message/message-common_en.properties @@ -0,0 +1,46 @@ +#UI resource# +list.sample=List Sample +button.search=Search +button.list=List +button.modify=Modify +button.create=Create +button.reset=Reset +button.delete=Delete +button.create=create +search.choose=Select Choose +search.keyword=Search +search.name=name +search.id=ID +title.sample.id=Category ID +title.sample.name=Category Name +title.sample.useYn=useYn +title.sample.description=Description +title.sample.regUser=User Name +title.sample=Default BBS List + +# image name # +image.search=btn_form_search_en.gif +image.errorBg=error_en + +# -- validator errors -- # +fail.common.msg=error ocurred! +fail.common.sql=sql error ocurred! error code: {0}, error msg: {1} +info.nodata.msg=no data found. +errors.prefix= +errors.suffix= +errors.required={0} is required. +errors.minlength={0} can not be less than {1} characters. +errors.maxlength={0} can not be greater than {1} characters. +errors.invalid={0} is invalid. +errors.byte={0} must be a byte. +errors.short={0} must be a short. +errors.integer={0} must be an integer. +errors.long={0} must be a long. +errors.float={0} must be a float. +errors.double={0} must be a double. +errors.date={0} is not a date. +errors.range={0} is not in the range {1} through {2}. +errors.creditcard={0} is an invalid credit card number. +errors.email={0} is an invalid e-mail address. +errors.ihidnum=An invalid Social Security Number. +errors.korean={0} must be a Korean. \ No newline at end of file diff --git a/src/main/resources/egovframework/message/message-common_ko.properties b/src/main/resources/egovframework/message/message-common_ko.properties new file mode 100644 index 0000000..518ba4b --- /dev/null +++ b/src/main/resources/egovframework/message/message-common_ko.properties @@ -0,0 +1,45 @@ +#UI resource# +list.sample=List Sample +button.search=\uac80\uc0c9 +button.list=\ubaa9\ub85d +button.modify=\uc218\uc815 +button.create=\ub4f1\ub85d +button.reset=\uc7ac\uc124\uc815 +button.delete=\uc0ad\uc81c +search.choose=\uac80\uc0c9\uc5b4 \uc120\ud0dd +search.keyword=\uac80\uc0c9\uc5b4 \uc785\ub825 +search.name=\uc774\ub984 +search.id=ID +title.sample.id=\uce74\ud14c\uace0\ub9acID +title.sample.name=\uce74\ud14c\uace0\ub9ac\uba85 +title.sample.useYn=\uc0ac\uc6a9\uc5ec\ubd80 +title.sample.description=\uc124\uba85 +title.sample.regUser=\ub4f1\ub85d\uc790 +title.sample=\uae30\ubcf8 \uac8c\uc2dc\ud310 \ubaa9\ub85d + +# image name # +image.search=btn_form_search.gif +image.errorBg=error + +# -- validator errors -- # +fail.common.msg=\uc5d0\ub7ec\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4! +fail.common.sql=sql \uc5d0\ub7ec\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4! error code: {0}, error msg: {1} +info.nodata.msg=\ud574\ub2f9 \ub370\uc774\ud130\uac00 \uc5c6\uc2b5\ub2c8\ub2e4. +errors.prefix= +errors.suffix= +errors.required={0} \uc740 \ud544\uc218 \uc785\ub825\uac12\uc785\ub2c8\ub2e4. +errors.minlength={0} \uc740 {1}\uc790 \uc774\uc0c1 \uc785\ub825\ud574\uc57c \ud569\ub2c8\ub2e4. +errors.maxlength={0} \uc740 {1}\uc790 \uc774\uc0c1 \uc785\ub825\ud560\uc218 \uc5c6\uc2b5\ub2c8\ub2e4. +errors.invalid={0} \uc740 \uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 \uac12\uc785\ub2c8\ub2e4. +errors.byte={0} \uc740 byte \ud0c0\uc785\uc774\uc5b4\uc57c \ud569\ub2c8\ub2e4. +errors.short={0} \uc740 short \ud0c0\uc785\uc774\uc5b4\uc57c \ud569\ub2c8\ub2e4. +errors.integer={0} \uc740 integer \ud0c0\uc785\uc774\uc5b4\uc57c \ud569\ub2c8\ub2e4. +errors.long={0} \uc740 long \ud0c0\uc785\uc774\uc5b4\uc57c \ud569\ub2c8\ub2e4. +errors.float={0} \uc740 float \ud0c0\uc785\uc774\uc5b4\uc57c \ud569\ub2c8\ub2e4. +errors.double={0} \uc740 double \ud0c0\uc785\uc774\uc5b4\uc57c \ud569\ub2c8\ub2e4. +errors.date={0} \uc740 \ub0a0\uc9dc \uc720\ud615\uc774 \uc544\ub2d9\ub2c8\ub2e4. +errors.range={0} \uc740 {1} \uacfc {2} \uc0ac\uc774\uc758 \uac12\uc774\uc5b4\uc57c \ud569\ub2c8\ub2e4. +errors.creditcard={0} \uc740 \uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 \uc2e0\uc6a9\uce74\ub4dc \ubc88\ud638\uc785\ub2c8\ub2e4. +errors.email={0} \uc740 \uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 \uc774\uba54\uc77c \uc8fc\uc18c\uc785\ub2c8\ub2e4. +errors.ihidnum=\uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 \uc8fc\ubbfc\ub4f1\ub85d\ubc88\ud638\uc785\ub2c8\ub2e4. +errors.korean={0}\uc740 \ud55c\uae00\uc744 \uc785\ub825\ud558\uc154\uc57c \ud569\ub2c8\ub2e4. \ No newline at end of file diff --git a/src/main/resources/egovframework/property/globals.properties b/src/main/resources/egovframework/property/globals.properties new file mode 100644 index 0000000..f4bb33f --- /dev/null +++ b/src/main/resources/egovframework/property/globals.properties @@ -0,0 +1,26 @@ +#----------------------------------------------------------------------- +# +# globals.properties : \uc2dc\uc2a4\ud15c +# +#----------------------------------------------------------------------- +# 1. key = value \uad6c\uc870\uc785\ub2c8\ub2e4. +# 2. key\uac12\uc740 \uacf5\ubc31\ubb38\uc790\ub97c \ud3ec\ud568\ubd88\uac00, value\uac12\uc740 \uacf5\ubc31\ubb38\uc790\ub97c \uac00\ub2a5 +# 3. key\uac12\uc73c\ub85c \ud55c\uae00\uc744 \uc0ac\uc6a9\ubd88\uac00, value\uac12\uc740 \ud55c\uae00\uc0ac\uc6a9\uc774 \uac00\ub2a5 +# 4. \uc904\uc744 \ubc14\uafc0 \ud544\uc694\uac00 \uc788\uc73c\uba74 '\'\ub97c \ub77c\uc778\uc758 \ub05d\uc5d0 \ucd94\uac00(\ub9cc\uc57d '\'\ubb38\uc790\ub97c \uc0ac\uc6a9\ud574\uc57c \ud558\ub294 \uacbd\uc6b0\ub294 '\\'\ub97c \uc0ac\uc6a9) +# 5. Windows\uc5d0\uc11c\uc758 \ub514\ub809\ud1a0\ub9ac \ud45c\uc2dc : '\\' or '/' ('\' \uc0ac\uc6a9\ud558\uba74 \uc548\ub428) +# 6. Unix\uc5d0\uc11c\uc758 \ub514\ub809\ud1a0\ub9ac \ud45c\uc2dc : '/' +# 7. \uc8fc\uc11d\ubb38 \ucc98\ub9ac\ub294 #\uc0ac\uc6a9 +# 8. value\uac12 \ub4a4\uc5d0 \uc2a4\ud398\uc774\uc2a4\uac00 \uc874\uc7ac\ud558\ub294 \uacbd\uc6b0 \uc11c\ube14\ub9bf\uc5d0\uc11c \ucc38\uc870\ud560\ub54c\ub294 \uc5d0\ub7ec\ubc1c\uc0dd\ud560 \uc218 \uc788\uc73c\ubbc0\ub85c trim()\ud558\uac70\ub098 \ub9c8\uc9c0\ub9c9 \uacf5\ubc31\uc5c6\uc774 properties \uac12\uc744 \uc124\uc815\ud560\uac83 +#----------------------------------------------------------------------- + +#File path +Global.fileStorePath = C:/MCA/upload/ + +#TEST DB +Global.datasource.driverClassName=com.mysql.cj.jdbc.Driver +Global.datasource.url=jdbc:mysql://106.247.244.146:57306/gg_mobile_220214?useSSL=false&serverTimezone=UTC +Global.datasource.username=root +Global.datasource.password=dbnt0928 + +#FieldVerify URL +Field.verifyPath = localhost:8080/UFQM/iface \ No newline at end of file diff --git a/src/main/resources/egovframework/spring/context-common.xml b/src/main/resources/egovframework/spring/context-common.xml new file mode 100644 index 0000000..2cfce4c --- /dev/null +++ b/src/main/resources/egovframework/spring/context-common.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + classpath:/egovframework/message/message-common + classpath:/egovframework/rte/fdl/idgnr/messages/idgnr + classpath:/egovframework/rte/fdl/property/messages/properties + classpath:property/globals + + + + 60 + + + + + + + + + + + + + + + + + + * + + + + + + + + + + + + + text/plain;charset=UTF-8 + text/html;charset=UTF-8 + application/json;charset=UTF-8 + + + + + + + + text/plain;charset=UTF-8 + text/html;charset=UTF-8 + application/json;charset=UTF-8 + + + + + + + + + + + diff --git a/src/main/resources/egovframework/spring/context-datasource.xml b/src/main/resources/egovframework/spring/context-datasource.xml new file mode 100644 index 0000000..21c3324 --- /dev/null +++ b/src/main/resources/egovframework/spring/context-datasource.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/src/main/resources/egovframework/spring/context-idgen.xml b/src/main/resources/egovframework/spring/context-idgen.xml new file mode 100644 index 0000000..153cde4 --- /dev/null +++ b/src/main/resources/egovframework/spring/context-idgen.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/egovframework/spring/context-mapper.xml b/src/main/resources/egovframework/spring/context-mapper.xml new file mode 100644 index 0000000..615c871 --- /dev/null +++ b/src/main/resources/egovframework/spring/context-mapper.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + classpath:/egovframework/property/globals.properties + + + + + \ No newline at end of file diff --git a/src/main/resources/egovframework/spring/context-properties.xml b/src/main/resources/egovframework/spring/context-properties.xml new file mode 100644 index 0000000..6e7b109 --- /dev/null +++ b/src/main/resources/egovframework/spring/context-properties.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + diff --git a/src/main/resources/egovframework/spring/context-security.xml b/src/main/resources/egovframework/spring/context-security.xml new file mode 100644 index 0000000..5c4c6d7 --- /dev/null +++ b/src/main/resources/egovframework/spring/context-security.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/egovframework/spring/context-sqlMap.xml b/src/main/resources/egovframework/spring/context-sqlMap.xml new file mode 100644 index 0000000..a72bf17 --- /dev/null +++ b/src/main/resources/egovframework/spring/context-sqlMap.xml @@ -0,0 +1,11 @@ + + + + + + + diff --git a/src/main/resources/egovframework/spring/context-transaction.xml b/src/main/resources/egovframework/spring/context-transaction.xml new file mode 100644 index 0000000..6681fdc --- /dev/null +++ b/src/main/resources/egovframework/spring/context-transaction.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/egovframework/spring/context-validator.xml b/src/main/resources/egovframework/spring/context-validator.xml new file mode 100644 index 0000000..03ebe32 --- /dev/null +++ b/src/main/resources/egovframework/spring/context-validator.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + /WEB-INF/config/egovframework/validator/validator-rules.xml + /WEB-INF/config/egovframework/validator/validator.xml + + + + + diff --git a/src/main/resources/egovframework/sqlmap/mappers/cmmn/areaCode.xml b/src/main/resources/egovframework/sqlmap/mappers/cmmn/areaCode.xml new file mode 100644 index 0000000..b7a9970 --- /dev/null +++ b/src/main/resources/egovframework/sqlmap/mappers/cmmn/areaCode.xml @@ -0,0 +1,40 @@ + + + + + + + SELECT + code, + area + FROM + t_area_code + WHERE + code like '__' + ORDER BY code ASC + + + + + SELECT + code, + area + FROM + t_area_code + WHERE + code LIKE '${code}' + ORDER BY code ASC + + + + SELECT + area + FROM + t_area_code + WHERE + code = #{code} + + + + + \ No newline at end of file diff --git a/src/main/resources/egovframework/sqlmap/mappers/cmmn/layers.xml b/src/main/resources/egovframework/sqlmap/mappers/cmmn/layers.xml new file mode 100644 index 0000000..4e45c7e --- /dev/null +++ b/src/main/resources/egovframework/sqlmap/mappers/cmmn/layers.xml @@ -0,0 +1,22 @@ + + + + + + + SELECT + * + FROM + t_layers + WHERE + layer = #{layer} + + + + SELECT + * + FROM + t_layers + ORDER BY NAME ASC + + \ No newline at end of file diff --git a/src/main/resources/egovframework/sqlmap/mappers/map/fieldData.xml b/src/main/resources/egovframework/sqlmap/mappers/map/fieldData.xml new file mode 100644 index 0000000..9d138ec --- /dev/null +++ b/src/main/resources/egovframework/sqlmap/mappers/map/fieldData.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + SELECT + a.id, + b.name, + b.company, + a.save_date, + a.region, + a.status + FROM + map_field_data a LEFT JOIN t_user b ON a.userid=b.userid + WHERE 1=1 + ORDER BY id DESC + LIMIT #{recordCountPerPage} OFFSET #{firstIndex} + + + + SELECT + COUNT(*) + FROM + map_field_data + WHERE 1 = 1 + + + + SELECT + id, + userid, + save_date, + data_path, + layer_id, + field_data, + region, + description, + status, + err_note + FROM + map_field_data + WHERE id = #{id} + + \ No newline at end of file diff --git a/src/main/resources/egovframework/sqlmap/mappers/map/useHistory.xml b/src/main/resources/egovframework/sqlmap/mappers/map/useHistory.xml new file mode 100644 index 0000000..95b1693 --- /dev/null +++ b/src/main/resources/egovframework/sqlmap/mappers/map/useHistory.xml @@ -0,0 +1,54 @@ + + + + + + + SELECT + log_date AS logDate, + req_area AS reqArea, + -- content, + a.userid, + b.name, + b.company + FROM + map_use_history a JOIN t_user b ON a.userid=b.userid + WHERE 1 = 1 + + + + AND (content LIKE CONCAT('%',#{searchKeyword},'%') + OR b.name LIKE CONCAT('%',#{searchKeyword},'%') + OR b.company LIKE CONCAT('%',#{searchKeyword},'%') + OR a.area LIKE CONCAT('%',#{searchKeyword},'%')) + + + AND ${searchCondition} LIKE CONCAT('%',#{searchKeyword},'%') + + + + ORDER BY log_date DESC + LIMIT #{recordCountPerPage} OFFSET #{firstIndex} + + + + SELECT + COUNT(*) + FROM + map_use_history a JOIN t_user b ON a.userid=b.userid + WHERE 1 = 1 + + + + AND (content LIKE CONCAT('%',#{searchKeyword},'%') + OR b.name LIKE CONCAT('%',#{searchKeyword},'%') + OR b.company LIKE CONCAT('%',#{searchKeyword},'%')) + OR a.area LIKE CONCAT('%',#{searchKeyword},'%')) + + + AND ${searchCondition} LIKE CONCAT('%',#{searchKeyword},'%') + + + + + \ No newline at end of file diff --git a/src/main/resources/egovframework/sqlmap/mappers/map/useRequest.xml b/src/main/resources/egovframework/sqlmap/mappers/map/useRequest.xml new file mode 100644 index 0000000..c2fb9b2 --- /dev/null +++ b/src/main/resources/egovframework/sqlmap/mappers/map/useRequest.xml @@ -0,0 +1,139 @@ + + + + + + SELECT + idx, + title, + a.userid, + b.name, + b.company, + status, + s_date, + e_date, + r_date, + places, + layers, + tile_id, + user_msg, + admin_msg + FROM map_use_request a LEFT JOIN t_user b ON a.userid=b.userid + WHERE 1 = 1 + + AND a.userid = #{userid} + + + AND status = #{status} + + + + + AND (title LIKE CONCAT('%',#{searchKeyword},'%') + OR b.name LIKE CONCAT('%',#{searchKeyword},'%') + OR b.company LIKE CONCAT('%',#{searchKeyword},'%')) + + + AND ${searchCondition} LIKE CONCAT('%',#{searchKeyword},'%') + + + + ORDER BY idx DESC + LIMIT #{recordCountPerPage} OFFSET #{firstIndex} + + + + SELECT + COUNT(*) + FROM map_use_request a LEFT JOIN t_user b ON a.userid=b.userid + WHERE 1 = 1 + + AND a.userid = #{userid} + + + AND status = #{status} + + + + + AND (title LIKE CONCAT('%',#{searchKeyword},'%') + OR b.name LIKE CONCAT('%',#{searchKeyword},'%') + OR b.company LIKE CONCAT('%',#{searchKeyword},'%')) + + + AND ${searchCondition} LIKE CONCAT('%',#{searchKeyword},'%') + + + + + + + SELECT + * + FROM + map_use_request + WHERE + idx = #{idx} + + + + SELECT + COUNT(*) + FROM + map_use_request + WHERE + status = 99 + + + + INSERT INTO map_use_request + ( + title, + s_date, + e_date, + r_date, + places, + layers, + userid, + user_msg + ) + value + ( + #{title}, + #{s_date}, + #{e_date}, + NOW(), + #{places}, + #{layers}, + #{userid}, + #{user_msg} + ); + + + + UPDATE map_use_request SET + title = #{title}, + s_date = #{s_date}, + e_date = #{e_date}, + r_date = now(), + places = #{places}, + layers = #{layers}, + user_msg = #{user_msg} + WHERE + idx = #{idx} + + + + UPDATE map_use_request SET + status = #{status}, + admin_id = #{admin_id}, + admin_msg = #{admin_msg} + WHERE + idx = #{idx} + + + + DELETE FROM map_use_request WHERE idx = #{idx} + + + \ No newline at end of file diff --git a/src/main/resources/egovframework/sqlmap/mappers/sec/security.xml b/src/main/resources/egovframework/sqlmap/mappers/sec/security.xml new file mode 100644 index 0000000..18514b1 --- /dev/null +++ b/src/main/resources/egovframework/sqlmap/mappers/sec/security.xml @@ -0,0 +1,29 @@ + + + + + SELECT + USERID, + PASSWORD, + NAME, + COMPANY, + EMAIL, + PHONENUM, + REGDATE, + AUTH + FROM + T_USER + WHERE + USERID= #{id} + + + + SELECT + AUTH, + CODE as AUTHORITY + FROM + T_USER_AUTH + WHERE + AUTH = #{auth} + + \ No newline at end of file diff --git a/src/main/resources/egovframework/sqlmap/mappers/user/user.xml b/src/main/resources/egovframework/sqlmap/mappers/user/user.xml new file mode 100644 index 0000000..d103f13 --- /dev/null +++ b/src/main/resources/egovframework/sqlmap/mappers/user/user.xml @@ -0,0 +1,143 @@ + + + + + + SELECT + userid, + name, + company, + email, + phonenum, + regdate, + auth + FROM t_user + WHERE 1 = 1 + + + AND auth = #{auth} + + + AND auth != 99 + + + + + + AND (name LIKE CONCAT('%',#{searchKeyword},'%') + OR company LIKE CONCAT('%',#{searchKeyword},'%') + OR email LIKE CONCAT('%',#{searchKeyword},'%') + OR phonenum LIKE CONCAT('%',#{searchKeyword},'%')) + + + AND ${searchCondition} LIKE CONCAT('%',#{searchKeyword},'%') + + + + ORDER BY regdate DESC + LIMIT #{recordCountPerPage} OFFSET #{firstIndex} + + + + SELECT + COUNT(*) + FROM t_user + WHERE 1 = 1 + + AND auth = #{auth} + + + + + AND (name LIKE CONCAT('%',#{searchKeyword},'%') + OR company LIKE CONCAT('%',#{searchKeyword},'%') + OR email LIKE CONCAT('%',#{searchKeyword},'%') + OR phonenum LIKE CONCAT('%',#{searchKeyword},'%')) + + + AND ${searchCondition} LIKE CONCAT('%',#{searchKeyword},'%') + + + + + + + SELECT + COUNT(*) + FROM + t_user + WHERE + auth = 99 + + + + + SELECT + COUNT(userid) + FROM + T_USER + WHERE + userid = #{checkId} + + + + INSERT INTO T_USER( + userid, + password, + name, + company, + email, + phonenum, + regdate, + auth + ) + VALUES( + #{userid}, + #{password}, + #{name}, + #{company}, + #{email}, + #{phonenum}, + NOW(), + 99 + ) + + + + SELECT + * + FROM + t_user + WHERE + userid = #{userid} + + + + UPDATE t_user SET + auth = 2 + WHERE userid = #{userid} + + + + DELETE FROM + t_user + WHERE + userid = #{userid} + + + + UPDATE t_user SET + + password = #{password}, + + + auth = #{auth}, + + name = #{name}, + company = #{company}, + email = #{email}, + phonenum = #{phonenum} + WHERE userid = #{userid} + + + \ No newline at end of file diff --git a/src/main/resources/egovframework/sqlmap/sql-mapper-config.xml b/src/main/resources/egovframework/sqlmap/sql-mapper-config.xml new file mode 100644 index 0000000..9c5dd52 --- /dev/null +++ b/src/main/resources/egovframework/sqlmap/sql-mapper-config.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml new file mode 100644 index 0000000..286f146 --- /dev/null +++ b/src/main/resources/log4j2.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/property/globals.properties b/src/main/resources/property/globals.properties new file mode 100644 index 0000000..a431944 --- /dev/null +++ b/src/main/resources/property/globals.properties @@ -0,0 +1,18 @@ + +#----------------------------------------------------------------------- +# +# globals.properties : \uc2dc\uc2a4\ud15c +# +#----------------------------------------------------------------------- +# 1. key = value \uad6c\uc870\uc785\ub2c8\ub2e4. +# 2. key\uac12\uc740 \uacf5\ubc31\ubb38\uc790\ub97c \ud3ec\ud568\ubd88\uac00, value\uac12\uc740 \uacf5\ubc31\ubb38\uc790\ub97c \uac00\ub2a5 +# 3. key\uac12\uc73c\ub85c \ud55c\uae00\uc744 \uc0ac\uc6a9\ubd88\uac00, value\uac12\uc740 \ud55c\uae00\uc0ac\uc6a9\uc774 \uac00\ub2a5 +# 4. \uc904\uc744 \ubc14\uafc0 \ud544\uc694\uac00 \uc788\uc73c\uba74 '\'\ub97c \ub77c\uc778\uc758 \ub05d\uc5d0 \ucd94\uac00(\ub9cc\uc57d '\'\ubb38\uc790\ub97c \uc0ac\uc6a9\ud574\uc57c \ud558\ub294 \uacbd\uc6b0\ub294 '\\'\ub97c \uc0ac\uc6a9) +# 5. Windows\uc5d0\uc11c\uc758 \ub514\ub809\ud1a0\ub9ac \ud45c\uc2dc : '\\' or '/' ('\' \uc0ac\uc6a9\ud558\uba74 \uc548\ub428) +# 6. Unix\uc5d0\uc11c\uc758 \ub514\ub809\ud1a0\ub9ac \ud45c\uc2dc : '/' +# 7. \uc8fc\uc11d\ubb38 \ucc98\ub9ac\ub294 #\uc0ac\uc6a9 +# 8. value\uac12 \ub4a4\uc5d0 \uc2a4\ud398\uc774\uc2a4\uac00 \uc874\uc7ac\ud558\ub294 \uacbd\uc6b0 \uc11c\ube14\ub9bf\uc5d0\uc11c \ucc38\uc870\ud560\ub54c\ub294 \uc5d0\ub7ec\ubc1c\uc0dd\ud560 \uc218 \uc788\uc73c\ubbc0\ub85c trim()\ud558\uac70\ub098 \ub9c8\uc9c0\ub9c9 \uacf5\ubc31\uc5c6\uc774 properties \uac12\uc744 \uc124\uc815\ud560\uac83 +#----------------------------------------------------------------------- + +#FieldVerify URL +Field.verifyPath = localhost:8080/UFQM/iface \ No newline at end of file diff --git a/src/main/webapp/META-INF/MANIFEST.MF b/src/main/webapp/META-INF/MANIFEST.MF new file mode 100644 index 0000000..254272e --- /dev/null +++ b/src/main/webapp/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/src/main/webapp/META-INF/config/egovframework/validator/validator-rules.xml b/src/main/webapp/META-INF/config/egovframework/validator/validator-rules.xml new file mode 100644 index 0000000..6b696a6 --- /dev/null +++ b/src/main/webapp/META-INF/config/egovframework/validator/validator-rules.xml @@ -0,0 +1,1222 @@ + + + + + + + + + + = 0) { + value = field.options[si].value; + } + } else if (field.type == 'radio' || field.type == 'checkbox') { + if (field.checked) { + value = field.value; + } + } else { + value = field.value; + } + if (trim(value).length == 0) { + if ((i == 0) && (field.type != 'hidden')) { + focusField = field; + } + fields[i++] = oRequired[x][1]; + isValid = false; + } + } else if (field.type == "select-multiple") { + var numOptions = field.options.length; + lastSelected=-1; + for(loop=numOptions-1;loop>=0;loop--) { + if(field.options[loop].selected) { + lastSelected = loop; + value = field.options[loop].value; + break; + } + } + if(lastSelected < 0 || trim(value).length == 0) { + if(i == 0) { + focusField = field; + } + fields[i++] = oRequired[x][1]; + isValid=false; + } + } else if ((field.length > 0) && (field[0].type == 'radio' || field[0].type == 'checkbox')) { + isChecked=-1; + for (loop=0;loop < field.length;loop++) { + if (field[loop].checked) { + isChecked=loop; + break; // only one needs to be checked + } + } + if (isChecked < 0) { + if (i == 0) { + focusField = field[0]; + } + fields[i++] = oRequired[x][1]; + isValid=false; + } + } + } + if (fields.length > 0) { + focusField.focus(); + alert(fields.join('\n')); + } + return isValid; + } + + // Trim whitespace from left and right sides of s. + function trim(s) { + return s.replace( /^\s*/, "" ).replace( /\s*$/, "" ); + } + + ]]> + + + + + + + + + + + + 0) && (field.value.length < iMin)) { + if (i == 0) { + focusField = field; + } + fields[i++] = oMinLength[x][1]; + isValid = false; + } + } + } + if (fields.length > 0) { + focusField.focus(); + alert(fields.join('\n')); + } + return isValid; + }]]> + + + + + + + + iMax) { + if (i == 0) { + focusField = field; + } + fields[i++] = oMaxLength[x][1]; + isValid = false; + } + } + } + if (fields.length > 0) { + focusField.focus(); + alert(fields.join('\n')); + } + return isValid; + }]]> + + + + + + + + 0)) { + + if (!matchPattern(field.value, oMasked[x][2]("mask"))) { + if (i == 0) { + focusField = field; + } + fields[i++] = oMasked[x][1]; + isValid = false; + } + } + } + + if (fields.length > 0) { + focusField.focus(); + alert(fields.join('\n')); + } + return isValid; + } + + function matchPattern(value, mask) { + return mask.exec(value); + }]]> + + + + + + + + = 0) { + value = field.options[si].value; + } + } else { + value = field.value; + } + + if (value.length > 0) { + if (!isAllDigits(value)) { + bValid = false; + if (i == 0) { + focusField = field; + } + fields[i++] = oByte[x][1]; + + } else { + + var iValue = parseInt(value); + if (isNaN(iValue) || !(iValue >= -128 && iValue <= 127)) { + if (i == 0) { + focusField = field; + } + fields[i++] = oByte[x][1]; + bValid = false; + } + } + } + + } + } + if (fields.length > 0) { + focusField.focus(); + alert(fields.join('\n')); + } + return bValid; + }]]> + + + + + + + + = 0) { + value = field.options[si].value; + } + } else { + value = field.value; + } + + if (value.length > 0) { + if (!isAllDigits(value)) { + bValid = false; + if (i == 0) { + focusField = field; + } + fields[i++] = oShort[x][1]; + + } else { + + var iValue = parseInt(value); + if (isNaN(iValue) || !(iValue >= -32768 && iValue <= 32767)) { + if (i == 0) { + focusField = field; + } + fields[i++] = oShort[x][1]; + bValid = false; + } + } + } + } + } + if (fields.length > 0) { + focusField.focus(); + alert(fields.join('\n')); + } + return bValid; + }]]> + + + + + + + + = 0) { + value = field.options[si].value; + } + } else { + value = field.value; + } + + if (value.length > 0) { + + if (!isAllDigits(value)) { + bValid = false; + if (i == 0) { + focusField = field; + } + fields[i++] = oInteger[x][1]; + + } else { + var iValue = parseInt(value); + if (isNaN(iValue) || !(iValue >= -2147483648 && iValue <= 2147483647)) { + if (i == 0) { + focusField = field; + } + fields[i++] = oInteger[x][1]; + bValid = false; + } + } + } + } + } + if (fields.length > 0) { + focusField.focus(); + alert(fields.join('\n')); + } + return bValid; + } + + function isAllDigits(argvalue) { + argvalue = argvalue.toString(); + var validChars = "0123456789"; + var startFrom = 0; + if (argvalue.substring(0, 2) == "0x") { + validChars = "0123456789abcdefABCDEF"; + startFrom = 2; + } else if (argvalue.charAt(0) == "0") { + validChars = "01234567"; + startFrom = 1; + } else if (argvalue.charAt(0) == "-") { + startFrom = 1; + } + + for (var n = startFrom; n < argvalue.length; n++) { + if (validChars.indexOf(argvalue.substring(n, n+1)) == -1) return false; + } + return true; + }]]> + + + + + + + + + + + = 0) { + value = field.options[si].value; + } + } else { + value = field.value; + } + + if (value.length > 0) { + // remove '.' before checking digits + var tempArray = value.split('.'); + var joinedString= tempArray.join(''); + + if (!isAllDigits(joinedString)) { + bValid = false; + if (i == 0) { + focusField = field; + } + fields[i++] = oFloat[x][1]; + + } else { + var iValue = parseFloat(value); + if (isNaN(iValue)) { + if (i == 0) { + focusField = field; + } + fields[i++] = oFloat[x][1]; + bValid = false; + } + } + } + } + } + if (fields.length > 0) { + focusField.focus(); + alert(fields.join('\n')); + } + return bValid; + }]]> + + + + + + + + + + + 0) && + (datePattern.length > 0)) { + var MONTH = "MM"; + var DAY = "dd"; + var YEAR = "yyyy"; + var orderMonth = datePattern.indexOf(MONTH); + var orderDay = datePattern.indexOf(DAY); + var orderYear = datePattern.indexOf(YEAR); + if ((orderDay < orderYear && orderDay > orderMonth)) { + var iDelim1 = orderMonth + MONTH.length; + var iDelim2 = orderDay + DAY.length; + var delim1 = datePattern.substring(iDelim1, iDelim1 + 1); + var delim2 = datePattern.substring(iDelim2, iDelim2 + 1); + if (iDelim1 == orderDay && iDelim2 == orderYear) { + dateRegexp = new RegExp("^(\\d{2})(\\d{2})(\\d{4})$"); + } else if (iDelim1 == orderDay) { + dateRegexp = new RegExp("^(\\d{2})(\\d{2})[" + delim2 + "](\\d{4})$"); + } else if (iDelim2 == orderYear) { + dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})(\\d{4})$"); + } else { + dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{4})$"); + } + var matched = dateRegexp.exec(value); + if(matched != null) { + if (!isValidDate(matched[2], matched[1], matched[3])) { + if (i == 0) { + focusField = form[oDate[x][0]]; + } + fields[i++] = oDate[x][1]; + bValid = false; + } + } else { + if (i == 0) { + focusField = form[oDate[x][0]]; + } + fields[i++] = oDate[x][1]; + bValid = false; + } + } else if ((orderMonth < orderYear && orderMonth > orderDay)) { + var iDelim1 = orderDay + DAY.length; + var iDelim2 = orderMonth + MONTH.length; + var delim1 = datePattern.substring(iDelim1, iDelim1 + 1); + var delim2 = datePattern.substring(iDelim2, iDelim2 + 1); + if (iDelim1 == orderMonth && iDelim2 == orderYear) { + dateRegexp = new RegExp("^(\\d{2})(\\d{2})(\\d{4})$"); + } else if (iDelim1 == orderMonth) { + dateRegexp = new RegExp("^(\\d{2})(\\d{2})[" + delim2 + "](\\d{4})$"); + } else if (iDelim2 == orderYear) { + dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})(\\d{4})$"); + } else { + dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{4})$"); + } + var matched = dateRegexp.exec(value); + if(matched != null) { + if (!isValidDate(matched[1], matched[2], matched[3])) { + if (i == 0) { + focusField = form[oDate[x][0]]; + } + fields[i++] = oDate[x][1]; + bValid = false; + } + } else { + if (i == 0) { + focusField = form[oDate[x][0]]; + } + fields[i++] = oDate[x][1]; + bValid = false; + } + } else if ((orderMonth > orderYear && orderMonth < orderDay)) { + var iDelim1 = orderYear + YEAR.length; + var iDelim2 = orderMonth + MONTH.length; + var delim1 = datePattern.substring(iDelim1, iDelim1 + 1); + var delim2 = datePattern.substring(iDelim2, iDelim2 + 1); + if (iDelim1 == orderMonth && iDelim2 == orderDay) { + dateRegexp = new RegExp("^(\\d{4})(\\d{2})(\\d{2})$"); + } else if (iDelim1 == orderMonth) { + dateRegexp = new RegExp("^(\\d{4})(\\d{2})[" + delim2 + "](\\d{2})$"); + } else if (iDelim2 == orderDay) { + dateRegexp = new RegExp("^(\\d{4})[" + delim1 + "](\\d{2})(\\d{2})$"); + } else { + dateRegexp = new RegExp("^(\\d{4})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{2})$"); + } + var matched = dateRegexp.exec(value); + if(matched != null) { + if (!isValidDate(matched[3], matched[2], matched[1])) { + if (i == 0) { + focusField = form[oDate[x][0]]; + } + fields[i++] = oDate[x][1]; + bValid = false; + } + } else { + if (i == 0) { + focusField = form[oDate[x][0]]; + } + fields[i++] = oDate[x][1]; + bValid = false; + } + } else { + if (i == 0) { + focusField = form[oDate[x][0]]; + } + fields[i++] = oDate[x][1]; + bValid = false; + } + } + } + if (fields.length > 0) { + focusField.focus(); + alert(fields.join('\n')); + } + return bValid; + } + + function isValidDate(day, month, year) { + if (month < 1 || month > 12) { + return false; + } + if (day < 1 || day > 31) { + return false; + } + if ((month == 4 || month == 6 || month == 9 || month == 11) && + (day == 31)) { + return false; + } + if (month == 2) { + var leap = (year % 4 == 0 && + (year % 100 != 0 || year % 400 == 0)); + if (day>29 || (day == 29 && !leap)) { + return false; + } + } + return true; + }]]> + + + + + + + + + + + + + + + 0)) { + + var iMin = parseInt(oRange[x][2]("min")); + var iMax = parseInt(oRange[x][2]("max")); + var iValue = parseInt(field.value); + if (!(iValue >= iMin && iValue <= iMax)) { + if (i == 0) { + focusField = field; + } + fields[i++] = oRange[x][1]; + isValid = false; + } + } + } + if (fields.length > 0) { + focusField.focus(); + alert(fields.join('\n')); + } + return isValid; + }]]> + + + + + + + 0)) { + + var fMin = parseFloat(oRange[x][2]("min")); + var fMax = parseFloat(oRange[x][2]("max")); + var fValue = parseFloat(field.value); + if (!(fValue >= fMin && fValue <= fMax)) { + if (i == 0) { + focusField = field; + } + fields[i++] = oRange[x][1]; + isValid = false; + } + } + } + if (fields.length > 0) { + focusField.focus(); + alert(fields.join('\n')); + } + return isValid; + }]]> + + + + + + + 0)) { + if (!luhnCheck(form[oCreditCard[x][0]].value)) { + if (i == 0) { + focusField = form[oCreditCard[x][0]]; + } + fields[i++] = oCreditCard[x][1]; + bValid = false; + } + } + } + if (fields.length > 0) { + focusField.focus(); + alert(fields.join('\n')); + } + return bValid; + } + + /** + * Reference: http://www.ling.nwu.edu/~sburke/pub/luhn_lib.pl + */ + function luhnCheck(cardNumber) { + if (isLuhnNum(cardNumber)) { + var no_digit = cardNumber.length; + var oddoeven = no_digit & 1; + var sum = 0; + for (var count = 0; count < no_digit; count++) { + var digit = parseInt(cardNumber.charAt(count)); + if (!((count & 1) ^ oddoeven)) { + digit *= 2; + if (digit > 9) digit -= 9; + }; + sum += digit; + }; + if (sum == 0) return false; + if (sum % 10 == 0) return true; + }; + return false; + } + + function isLuhnNum(argvalue) { + argvalue = argvalue.toString(); + if (argvalue.length == 0) { + return false; + } + for (var n = 0; n < argvalue.length; n++) { + if ((argvalue.substring(n, n+1) < "0") || + (argvalue.substring(n,n+1) > "9")) { + return false; + } + } + return true; + }]]> + + + + + + + + 0)) { + if (!checkEmail(form[oEmail[x][0]].value)) { + if (i == 0) { + focusField = form[oEmail[x][0]]; + } + fields[i++] = oEmail[x][1]; + bValid = false; + } + } + } + if (fields.length > 0) { + focusField.focus(); + alert(fields.join('\n')); + } + return bValid; + } + + /** + * Reference: Sandeep V. Tamhankar (stamhankar@hotmail.com), + * http://javascript.internet.com + */ + function checkEmail(emailStr) { + if (emailStr.length == 0) { + return true; + } + var emailPat=/^(.+)@(.+)$/; + var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"; + var validChars="\[^\\s" + specialChars + "\]"; + var quotedUser="(\"[^\"]*\")"; + var ipDomainPat=/^(\d{1,3})[.](\d{1,3})[.](\d{1,3})[.](\d{1,3})$/; + var atom=validChars + '+'; + var word="(" + atom + "|" + quotedUser + ")"; + var userPat=new RegExp("^" + word + "(\\." + word + ")*$"); + var domainPat=new RegExp("^" + atom + "(\\." + atom + ")*$"); + var matchArray=emailStr.match(emailPat); + if (matchArray == null) { + return false; + } + var user=matchArray[1]; + var domain=matchArray[2]; + if (user.match(userPat) == null) { + return false; + } + var IPArray = domain.match(ipDomainPat); + if (IPArray != null) { + for (var i = 1; i <= 4; i++) { + if (IPArray[i] > 255) { + return false; + } + } + return true; + } + var domainArray=domain.match(domainPat); + if (domainArray == null) { + return false; + } + var atomPat=new RegExp(atom,"g"); + var domArr=domain.match(atomPat); + var len=domArr.length; + if ((domArr[domArr.length-1].length < 2) || + (domArr[domArr.length-1].length > 3)) { + return false; + } + if (len < 2) { + return false; + } + return true; + }]]> + + + + + + + 0) { + alert(fields.join('\n')); + } + return bValid; + } + + /** + * Reference: JS Guide + * http://jsguide.net/ver2/articles/frame.php?artnum=002 + */ + function checkIhIdNum(ihidnum){ + + fmt = /^\d{6}[1234]\d{6}$/; + if(!fmt.test(ihidnum)){ + return false; + } + + birthYear = (ihidnum.charAt(7) <= "2") ? "19" : "20"; + birthYear += ihidnum.substr(0, 2); + birthMonth = ihidnum.substr(2, 2) - 1; + birthDate = ihidnum.substr(4, 2); + birth = new Date(birthYear, birthMonth, birthDate); + + if( birth.getYear() % 100 != ihidnum.substr(0, 2) || + birth.getMonth() != birthMonth || + birth.getDate() != birthDate) { + return false; + } + + var arrDivide = [2, 3, 4, 5, 6, 7, 8, 9, 2, 3, 4, 5]; + var checkdigit = 0; + for(var i=0;i + + + + 0) { + focusField.focus(); + alert(fields.join('\n')); + } + return bValid; + } + + function checkKorean(koreanStr){ + for(var i=0;i + + + + + + diff --git a/src/main/webapp/WEB-INF/config/egovframework/springmvc/dispatcher-servlet.xml b/src/main/webapp/WEB-INF/config/egovframework/springmvc/dispatcher-servlet.xml new file mode 100644 index 0000000..b73b15b --- /dev/null +++ b/src/main/webapp/WEB-INF/config/egovframework/springmvc/dispatcher-servlet.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + */*;charset=UTF-8 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/plain;charset=UTF-8 + text/html;charset=UTF-8 + application/json;charset=UTF-8 + + + + + + + + + + + + + json=application/json + xml=application/xml + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/config/egovframework/validator/validator-rules.xml b/src/main/webapp/WEB-INF/config/egovframework/validator/validator-rules.xml new file mode 100644 index 0000000..6b696a6 --- /dev/null +++ b/src/main/webapp/WEB-INF/config/egovframework/validator/validator-rules.xml @@ -0,0 +1,1222 @@ + + + + + + + + + + = 0) { + value = field.options[si].value; + } + } else if (field.type == 'radio' || field.type == 'checkbox') { + if (field.checked) { + value = field.value; + } + } else { + value = field.value; + } + if (trim(value).length == 0) { + if ((i == 0) && (field.type != 'hidden')) { + focusField = field; + } + fields[i++] = oRequired[x][1]; + isValid = false; + } + } else if (field.type == "select-multiple") { + var numOptions = field.options.length; + lastSelected=-1; + for(loop=numOptions-1;loop>=0;loop--) { + if(field.options[loop].selected) { + lastSelected = loop; + value = field.options[loop].value; + break; + } + } + if(lastSelected < 0 || trim(value).length == 0) { + if(i == 0) { + focusField = field; + } + fields[i++] = oRequired[x][1]; + isValid=false; + } + } else if ((field.length > 0) && (field[0].type == 'radio' || field[0].type == 'checkbox')) { + isChecked=-1; + for (loop=0;loop < field.length;loop++) { + if (field[loop].checked) { + isChecked=loop; + break; // only one needs to be checked + } + } + if (isChecked < 0) { + if (i == 0) { + focusField = field[0]; + } + fields[i++] = oRequired[x][1]; + isValid=false; + } + } + } + if (fields.length > 0) { + focusField.focus(); + alert(fields.join('\n')); + } + return isValid; + } + + // Trim whitespace from left and right sides of s. + function trim(s) { + return s.replace( /^\s*/, "" ).replace( /\s*$/, "" ); + } + + ]]> + + + + + + + + + + + + 0) && (field.value.length < iMin)) { + if (i == 0) { + focusField = field; + } + fields[i++] = oMinLength[x][1]; + isValid = false; + } + } + } + if (fields.length > 0) { + focusField.focus(); + alert(fields.join('\n')); + } + return isValid; + }]]> + + + + + + + + iMax) { + if (i == 0) { + focusField = field; + } + fields[i++] = oMaxLength[x][1]; + isValid = false; + } + } + } + if (fields.length > 0) { + focusField.focus(); + alert(fields.join('\n')); + } + return isValid; + }]]> + + + + + + + + 0)) { + + if (!matchPattern(field.value, oMasked[x][2]("mask"))) { + if (i == 0) { + focusField = field; + } + fields[i++] = oMasked[x][1]; + isValid = false; + } + } + } + + if (fields.length > 0) { + focusField.focus(); + alert(fields.join('\n')); + } + return isValid; + } + + function matchPattern(value, mask) { + return mask.exec(value); + }]]> + + + + + + + + = 0) { + value = field.options[si].value; + } + } else { + value = field.value; + } + + if (value.length > 0) { + if (!isAllDigits(value)) { + bValid = false; + if (i == 0) { + focusField = field; + } + fields[i++] = oByte[x][1]; + + } else { + + var iValue = parseInt(value); + if (isNaN(iValue) || !(iValue >= -128 && iValue <= 127)) { + if (i == 0) { + focusField = field; + } + fields[i++] = oByte[x][1]; + bValid = false; + } + } + } + + } + } + if (fields.length > 0) { + focusField.focus(); + alert(fields.join('\n')); + } + return bValid; + }]]> + + + + + + + + = 0) { + value = field.options[si].value; + } + } else { + value = field.value; + } + + if (value.length > 0) { + if (!isAllDigits(value)) { + bValid = false; + if (i == 0) { + focusField = field; + } + fields[i++] = oShort[x][1]; + + } else { + + var iValue = parseInt(value); + if (isNaN(iValue) || !(iValue >= -32768 && iValue <= 32767)) { + if (i == 0) { + focusField = field; + } + fields[i++] = oShort[x][1]; + bValid = false; + } + } + } + } + } + if (fields.length > 0) { + focusField.focus(); + alert(fields.join('\n')); + } + return bValid; + }]]> + + + + + + + + = 0) { + value = field.options[si].value; + } + } else { + value = field.value; + } + + if (value.length > 0) { + + if (!isAllDigits(value)) { + bValid = false; + if (i == 0) { + focusField = field; + } + fields[i++] = oInteger[x][1]; + + } else { + var iValue = parseInt(value); + if (isNaN(iValue) || !(iValue >= -2147483648 && iValue <= 2147483647)) { + if (i == 0) { + focusField = field; + } + fields[i++] = oInteger[x][1]; + bValid = false; + } + } + } + } + } + if (fields.length > 0) { + focusField.focus(); + alert(fields.join('\n')); + } + return bValid; + } + + function isAllDigits(argvalue) { + argvalue = argvalue.toString(); + var validChars = "0123456789"; + var startFrom = 0; + if (argvalue.substring(0, 2) == "0x") { + validChars = "0123456789abcdefABCDEF"; + startFrom = 2; + } else if (argvalue.charAt(0) == "0") { + validChars = "01234567"; + startFrom = 1; + } else if (argvalue.charAt(0) == "-") { + startFrom = 1; + } + + for (var n = startFrom; n < argvalue.length; n++) { + if (validChars.indexOf(argvalue.substring(n, n+1)) == -1) return false; + } + return true; + }]]> + + + + + + + + + + + = 0) { + value = field.options[si].value; + } + } else { + value = field.value; + } + + if (value.length > 0) { + // remove '.' before checking digits + var tempArray = value.split('.'); + var joinedString= tempArray.join(''); + + if (!isAllDigits(joinedString)) { + bValid = false; + if (i == 0) { + focusField = field; + } + fields[i++] = oFloat[x][1]; + + } else { + var iValue = parseFloat(value); + if (isNaN(iValue)) { + if (i == 0) { + focusField = field; + } + fields[i++] = oFloat[x][1]; + bValid = false; + } + } + } + } + } + if (fields.length > 0) { + focusField.focus(); + alert(fields.join('\n')); + } + return bValid; + }]]> + + + + + + + + + + + 0) && + (datePattern.length > 0)) { + var MONTH = "MM"; + var DAY = "dd"; + var YEAR = "yyyy"; + var orderMonth = datePattern.indexOf(MONTH); + var orderDay = datePattern.indexOf(DAY); + var orderYear = datePattern.indexOf(YEAR); + if ((orderDay < orderYear && orderDay > orderMonth)) { + var iDelim1 = orderMonth + MONTH.length; + var iDelim2 = orderDay + DAY.length; + var delim1 = datePattern.substring(iDelim1, iDelim1 + 1); + var delim2 = datePattern.substring(iDelim2, iDelim2 + 1); + if (iDelim1 == orderDay && iDelim2 == orderYear) { + dateRegexp = new RegExp("^(\\d{2})(\\d{2})(\\d{4})$"); + } else if (iDelim1 == orderDay) { + dateRegexp = new RegExp("^(\\d{2})(\\d{2})[" + delim2 + "](\\d{4})$"); + } else if (iDelim2 == orderYear) { + dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})(\\d{4})$"); + } else { + dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{4})$"); + } + var matched = dateRegexp.exec(value); + if(matched != null) { + if (!isValidDate(matched[2], matched[1], matched[3])) { + if (i == 0) { + focusField = form[oDate[x][0]]; + } + fields[i++] = oDate[x][1]; + bValid = false; + } + } else { + if (i == 0) { + focusField = form[oDate[x][0]]; + } + fields[i++] = oDate[x][1]; + bValid = false; + } + } else if ((orderMonth < orderYear && orderMonth > orderDay)) { + var iDelim1 = orderDay + DAY.length; + var iDelim2 = orderMonth + MONTH.length; + var delim1 = datePattern.substring(iDelim1, iDelim1 + 1); + var delim2 = datePattern.substring(iDelim2, iDelim2 + 1); + if (iDelim1 == orderMonth && iDelim2 == orderYear) { + dateRegexp = new RegExp("^(\\d{2})(\\d{2})(\\d{4})$"); + } else if (iDelim1 == orderMonth) { + dateRegexp = new RegExp("^(\\d{2})(\\d{2})[" + delim2 + "](\\d{4})$"); + } else if (iDelim2 == orderYear) { + dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})(\\d{4})$"); + } else { + dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{4})$"); + } + var matched = dateRegexp.exec(value); + if(matched != null) { + if (!isValidDate(matched[1], matched[2], matched[3])) { + if (i == 0) { + focusField = form[oDate[x][0]]; + } + fields[i++] = oDate[x][1]; + bValid = false; + } + } else { + if (i == 0) { + focusField = form[oDate[x][0]]; + } + fields[i++] = oDate[x][1]; + bValid = false; + } + } else if ((orderMonth > orderYear && orderMonth < orderDay)) { + var iDelim1 = orderYear + YEAR.length; + var iDelim2 = orderMonth + MONTH.length; + var delim1 = datePattern.substring(iDelim1, iDelim1 + 1); + var delim2 = datePattern.substring(iDelim2, iDelim2 + 1); + if (iDelim1 == orderMonth && iDelim2 == orderDay) { + dateRegexp = new RegExp("^(\\d{4})(\\d{2})(\\d{2})$"); + } else if (iDelim1 == orderMonth) { + dateRegexp = new RegExp("^(\\d{4})(\\d{2})[" + delim2 + "](\\d{2})$"); + } else if (iDelim2 == orderDay) { + dateRegexp = new RegExp("^(\\d{4})[" + delim1 + "](\\d{2})(\\d{2})$"); + } else { + dateRegexp = new RegExp("^(\\d{4})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{2})$"); + } + var matched = dateRegexp.exec(value); + if(matched != null) { + if (!isValidDate(matched[3], matched[2], matched[1])) { + if (i == 0) { + focusField = form[oDate[x][0]]; + } + fields[i++] = oDate[x][1]; + bValid = false; + } + } else { + if (i == 0) { + focusField = form[oDate[x][0]]; + } + fields[i++] = oDate[x][1]; + bValid = false; + } + } else { + if (i == 0) { + focusField = form[oDate[x][0]]; + } + fields[i++] = oDate[x][1]; + bValid = false; + } + } + } + if (fields.length > 0) { + focusField.focus(); + alert(fields.join('\n')); + } + return bValid; + } + + function isValidDate(day, month, year) { + if (month < 1 || month > 12) { + return false; + } + if (day < 1 || day > 31) { + return false; + } + if ((month == 4 || month == 6 || month == 9 || month == 11) && + (day == 31)) { + return false; + } + if (month == 2) { + var leap = (year % 4 == 0 && + (year % 100 != 0 || year % 400 == 0)); + if (day>29 || (day == 29 && !leap)) { + return false; + } + } + return true; + }]]> + + + + + + + + + + + + + + + 0)) { + + var iMin = parseInt(oRange[x][2]("min")); + var iMax = parseInt(oRange[x][2]("max")); + var iValue = parseInt(field.value); + if (!(iValue >= iMin && iValue <= iMax)) { + if (i == 0) { + focusField = field; + } + fields[i++] = oRange[x][1]; + isValid = false; + } + } + } + if (fields.length > 0) { + focusField.focus(); + alert(fields.join('\n')); + } + return isValid; + }]]> + + + + + + + 0)) { + + var fMin = parseFloat(oRange[x][2]("min")); + var fMax = parseFloat(oRange[x][2]("max")); + var fValue = parseFloat(field.value); + if (!(fValue >= fMin && fValue <= fMax)) { + if (i == 0) { + focusField = field; + } + fields[i++] = oRange[x][1]; + isValid = false; + } + } + } + if (fields.length > 0) { + focusField.focus(); + alert(fields.join('\n')); + } + return isValid; + }]]> + + + + + + + 0)) { + if (!luhnCheck(form[oCreditCard[x][0]].value)) { + if (i == 0) { + focusField = form[oCreditCard[x][0]]; + } + fields[i++] = oCreditCard[x][1]; + bValid = false; + } + } + } + if (fields.length > 0) { + focusField.focus(); + alert(fields.join('\n')); + } + return bValid; + } + + /** + * Reference: http://www.ling.nwu.edu/~sburke/pub/luhn_lib.pl + */ + function luhnCheck(cardNumber) { + if (isLuhnNum(cardNumber)) { + var no_digit = cardNumber.length; + var oddoeven = no_digit & 1; + var sum = 0; + for (var count = 0; count < no_digit; count++) { + var digit = parseInt(cardNumber.charAt(count)); + if (!((count & 1) ^ oddoeven)) { + digit *= 2; + if (digit > 9) digit -= 9; + }; + sum += digit; + }; + if (sum == 0) return false; + if (sum % 10 == 0) return true; + }; + return false; + } + + function isLuhnNum(argvalue) { + argvalue = argvalue.toString(); + if (argvalue.length == 0) { + return false; + } + for (var n = 0; n < argvalue.length; n++) { + if ((argvalue.substring(n, n+1) < "0") || + (argvalue.substring(n,n+1) > "9")) { + return false; + } + } + return true; + }]]> + + + + + + + + 0)) { + if (!checkEmail(form[oEmail[x][0]].value)) { + if (i == 0) { + focusField = form[oEmail[x][0]]; + } + fields[i++] = oEmail[x][1]; + bValid = false; + } + } + } + if (fields.length > 0) { + focusField.focus(); + alert(fields.join('\n')); + } + return bValid; + } + + /** + * Reference: Sandeep V. Tamhankar (stamhankar@hotmail.com), + * http://javascript.internet.com + */ + function checkEmail(emailStr) { + if (emailStr.length == 0) { + return true; + } + var emailPat=/^(.+)@(.+)$/; + var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"; + var validChars="\[^\\s" + specialChars + "\]"; + var quotedUser="(\"[^\"]*\")"; + var ipDomainPat=/^(\d{1,3})[.](\d{1,3})[.](\d{1,3})[.](\d{1,3})$/; + var atom=validChars + '+'; + var word="(" + atom + "|" + quotedUser + ")"; + var userPat=new RegExp("^" + word + "(\\." + word + ")*$"); + var domainPat=new RegExp("^" + atom + "(\\." + atom + ")*$"); + var matchArray=emailStr.match(emailPat); + if (matchArray == null) { + return false; + } + var user=matchArray[1]; + var domain=matchArray[2]; + if (user.match(userPat) == null) { + return false; + } + var IPArray = domain.match(ipDomainPat); + if (IPArray != null) { + for (var i = 1; i <= 4; i++) { + if (IPArray[i] > 255) { + return false; + } + } + return true; + } + var domainArray=domain.match(domainPat); + if (domainArray == null) { + return false; + } + var atomPat=new RegExp(atom,"g"); + var domArr=domain.match(atomPat); + var len=domArr.length; + if ((domArr[domArr.length-1].length < 2) || + (domArr[domArr.length-1].length > 3)) { + return false; + } + if (len < 2) { + return false; + } + return true; + }]]> + + + + + + + 0) { + alert(fields.join('\n')); + } + return bValid; + } + + /** + * Reference: JS Guide + * http://jsguide.net/ver2/articles/frame.php?artnum=002 + */ + function checkIhIdNum(ihidnum){ + + fmt = /^\d{6}[1234]\d{6}$/; + if(!fmt.test(ihidnum)){ + return false; + } + + birthYear = (ihidnum.charAt(7) <= "2") ? "19" : "20"; + birthYear += ihidnum.substr(0, 2); + birthMonth = ihidnum.substr(2, 2) - 1; + birthDate = ihidnum.substr(4, 2); + birth = new Date(birthYear, birthMonth, birthDate); + + if( birth.getYear() % 100 != ihidnum.substr(0, 2) || + birth.getMonth() != birthMonth || + birth.getDate() != birthDate) { + return false; + } + + var arrDivide = [2, 3, 4, 5, 6, 7, 8, 9, 2, 3, 4, 5]; + var checkdigit = 0; + for(var i=0;i + + + + 0) { + focusField.focus(); + alert(fields.join('\n')); + } + return bValid; + } + + function checkKorean(koreanStr){ + for(var i=0;i + + + + + + diff --git a/src/main/webapp/WEB-INF/config/egovframework/validator/validator.xml b/src/main/webapp/WEB-INF/config/egovframework/validator/validator.xml new file mode 100644 index 0000000..453fa36 --- /dev/null +++ b/src/main/webapp/WEB-INF/config/egovframework/validator/validator.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/admin/fieldData.jsp b/src/main/webapp/WEB-INF/jsp/admin/fieldData.jsp new file mode 100644 index 0000000..472dbc2 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/admin/fieldData.jsp @@ -0,0 +1,102 @@ +<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> + + + + + + + +모바일센터 관리시스템 +"> +"> +" rel="stylesheet"> +" rel="stylesheet"> +" rel="stylesheet"> + + + + + <%@ include file="../include/header.jsp"%> + + + + + + + + + + + value="all">통합검색 + value="content">작업내용 + value="name">이름 + value="company">소속 + value="area">위치 + + " /> + + + + + + + 현장수집 데이터 + + Data ID + 지역 + 소속 + 담당자 + 수집날짜 + 상태 + + + + + + + + + + + + + + 수집 + 검증실패 + 검증 + 반영실패 + 반영 + + + + + + + 요청한 목록이 없습니다. + + + + + + + + + + + + + diff --git a/src/main/webapp/WEB-INF/jsp/admin/fieldView.jsp b/src/main/webapp/WEB-INF/jsp/admin/fieldView.jsp new file mode 100644 index 0000000..b860849 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/admin/fieldView.jsp @@ -0,0 +1,341 @@ +<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> + + + + + + + + +모바일센터 관리시스템 +"> +"> +"> +"> + +" rel="stylesheet"> +" rel="stylesheet"> +" rel="stylesheet"> +" rel="stylesheet"> + + + + <%@ include file="../include/header.jsp"%> + + + + + + + + + + + 담당자 + + + + + 소속 + + 담당자 + + 연락처 + + + + + + + + + 지도정보 + + + + + 레이어 ID + + 수집일 + + + + 지역 + + 상태 + + + + 수집 + + + 검증실패 + + + 검증성공 + + + 반영실패 + + + 반영 + + + + + + 설명 + + 오류내용 + + + + + + + + + 측량데이터 + + + + + + + + + 속성정보 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/WEB-INF/jsp/admin/history.jsp b/src/main/webapp/WEB-INF/jsp/admin/history.jsp new file mode 100644 index 0000000..6957725 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/admin/history.jsp @@ -0,0 +1,85 @@ +<%@ page language="java" contentType="text/html; charset=utf-8" + pageEncoding="utf-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> + + + + + + + + +모바일센터 관리시스템 +"> +"> +" rel="stylesheet"> +" rel="stylesheet"> +" rel="stylesheet"> + + + + + <%@ include file="../include/header.jsp"%> + + + + + + + + + + + value="all">통합검색 + value="content">작업내용 + value="name">이름 + value="company">소속 + value="area">위치 + + + + + + + + + + 지도사용 이력 + + 위치 + 작업내용 + 소속 + 담당자 + 날짜 + + + + + + + + <%----%> + + + + + + + + 요청한 목록이 없습니다. + + + + + + + + + + + + + diff --git a/src/main/webapp/WEB-INF/jsp/admin/request.jsp b/src/main/webapp/WEB-INF/jsp/admin/request.jsp new file mode 100644 index 0000000..ead85ab --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/admin/request.jsp @@ -0,0 +1,106 @@ +<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> + + + + + + + + +모바일센터 관리시스템 +"> +"> +" rel="stylesheet"> +" rel="stylesheet"> +" rel="stylesheet"> + + + + <%@ include file="../include/header.jsp"%> + + + + + + + " /> + + + + class="active">전체 + class="active">승인 + class="active">반려 + class="active">승인대기 + + + + + + value="all">통합검색 + value="title">작업명 + value="name">이름 + value="company">소속 + + + + + + + + + + + 지도사용 요청 + + 번호 + 작업명 + 소속 + 담당자 + 날짜 + 상태 + + + + + + + + + + + + + + + + + + + + + + + 요청한 목록이 없습니다. + + + + + + + + + + + + + diff --git a/src/main/webapp/WEB-INF/jsp/admin/requestView.jsp b/src/main/webapp/WEB-INF/jsp/admin/requestView.jsp new file mode 100644 index 0000000..5533da0 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/admin/requestView.jsp @@ -0,0 +1,215 @@ +<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> + + + + + + + +모바일센터 관리시스템 +"> +"> + +" rel="stylesheet"> +" rel="stylesheet"> +" rel="stylesheet"> + + + +<%@ include file="../include/header.jsp"%> + + + + + + + + + + + + + + 담당자 + + + + 소속 + + 담당자 + + 연락처 + + 상태 + + + + + + + + + + + + + + 지도 사용 요청 + + + + 작업명 + + + + 기간 + ~ + + + 장소 + + + + ${item} + + + + + + 레이어 + 지하시설물 + + + + + + + + + + + + /> + + + + + + + + 지하구조물 + + + + + + + + + + /> + + + + + + + + 지반 + + + + + + + checked + + + /> + + + + + + + + 요청 내용 + + + + + + + + + + + 전달 메세지 + + + + + + + + + + + + + + + + + + + + + + 전달 메세지 + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/WEB-INF/jsp/admin/userInfo.jsp b/src/main/webapp/WEB-INF/jsp/admin/userInfo.jsp new file mode 100644 index 0000000..31cc6ea --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/admin/userInfo.jsp @@ -0,0 +1,146 @@ +<%@ page language="java" contentType="text/html; charset=utf-8" + pageEncoding="utf-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> + + + + + + + + +모바일센터 관리시스템 +"> +"> +" rel="stylesheet"> +" rel="stylesheet"> +" rel="stylesheet"> + + + + + <%@ include file="../include/header.jsp"%> + + + + + + + + + + class="active">승인대기 + class="active">회원 관리 + + + + + + + + selected value="all">통합검색 + selected value="name">이름 + selected value="company">소속 + selected value="email">이메일 + selected value="phonenum">전화번호 + + + + + + + + + 회원 관리 + + 아이디 + 이름 + 소속 + 전화번호 + 이메일 + 가입일 + + + 상태 + + + 권한 + + + + + + + + + + + + + + + + + 관리자 + 사용자 + + + + + + + + + + + 요청한 목록이 없습니다. + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/WEB-INF/jsp/admin/userInfoView.jsp b/src/main/webapp/WEB-INF/jsp/admin/userInfoView.jsp new file mode 100644 index 0000000..13b9985 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/admin/userInfoView.jsp @@ -0,0 +1,165 @@ +<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> + + + + + + + + +모바일센터 관리시스템 +"> +"> +" rel="stylesheet"> +" rel="stylesheet"> +" rel="stylesheet"> + + + <%@ include file="../include/header.jsp"%> + + + + + + + 회원 정보 수정 + + + + + 아이디 + ${userVO.userid} + + + 비밀번호 + + 비밀번호 변경 + + + + + 비밀번호 확인 + + + + + 이름 + + + + 소속기관 + + + + 연락처 + + + + 이메일 + + + + + + + + + 권한 + + + checked + /> 사용자 + + + checked + /> 관리자 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/WEB-INF/jsp/cmmn/dataAccessFailure.jsp b/src/main/webapp/WEB-INF/jsp/cmmn/dataAccessFailure.jsp new file mode 100644 index 0000000..bf361e5 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/cmmn/dataAccessFailure.jsp @@ -0,0 +1,13 @@ +<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> + + + + +Error + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/cmmn/egovBizException.jsp b/src/main/webapp/WEB-INF/jsp/cmmn/egovBizException.jsp new file mode 100644 index 0000000..50e5187 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/cmmn/egovBizException.jsp @@ -0,0 +1,13 @@ +<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> + + + + +Error + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/cmmn/egovError.jsp b/src/main/webapp/WEB-INF/jsp/cmmn/egovError.jsp new file mode 100644 index 0000000..50e5187 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/cmmn/egovError.jsp @@ -0,0 +1,13 @@ +<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> + + + + +Error + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/cmmn/transactionFailure.jsp b/src/main/webapp/WEB-INF/jsp/cmmn/transactionFailure.jsp new file mode 100644 index 0000000..50e5187 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/cmmn/transactionFailure.jsp @@ -0,0 +1,13 @@ +<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> + + + + +Error + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/cmmn/validator.jsp b/src/main/webapp/WEB-INF/jsp/cmmn/validator.jsp new file mode 100644 index 0000000..2925385 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/cmmn/validator.jsp @@ -0,0 +1,3 @@ +<%@ page language="java" contentType="javascript/x-javascript" %> +<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %> + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/error/EgovAccessDenied.jsp b/src/main/webapp/WEB-INF/jsp/error/EgovAccessDenied.jsp new file mode 100644 index 0000000..5ec03ef --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/error/EgovAccessDenied.jsp @@ -0,0 +1,67 @@ +<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> +<%@ taglib uri="http://www.springframework.org/security/tags" prefix="sec" %> + + + + + + +Error +"> +"> +" rel="stylesheet"> +" rel="stylesheet"> +" rel="stylesheet"> + + + + + + + + + + + + Access Denied + + + + + + Go Back + + + Go Back + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/error/EgovNotFound.jsp b/src/main/webapp/WEB-INF/jsp/error/EgovNotFound.jsp new file mode 100644 index 0000000..4a064ac --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/error/EgovNotFound.jsp @@ -0,0 +1,62 @@ +<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> +<%@ taglib uri="http://www.springframework.org/security/tags" prefix="sec" %> + + + + + + +Error +"> +"> +" rel="stylesheet"> +" rel="stylesheet"> +" rel="stylesheet"> + + + + + + + + + + + + 404 not found + + + + + Go Back + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/error/EgovServerError.jsp b/src/main/webapp/WEB-INF/jsp/error/EgovServerError.jsp new file mode 100644 index 0000000..b26ecb1 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/error/EgovServerError.jsp @@ -0,0 +1,62 @@ +<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> +<%@ taglib uri="http://www.springframework.org/security/tags" prefix="sec" %> + + + + + + +Error +"> +"> +" rel="stylesheet"> +" rel="stylesheet"> +" rel="stylesheet"> + + + + + + + + + + + + 500 Internal Server error + + + + + Go Back + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/include/header.jsp b/src/main/webapp/WEB-INF/jsp/include/header.jsp new file mode 100644 index 0000000..4b91691 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/include/header.jsp @@ -0,0 +1,62 @@ +<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> +<%@ taglib uri="http://www.springframework.org/security/tags" prefix="sec" %> +<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> + + + + + + + + + + + 모바일센터 관리시스템 + + + "> + 로그아웃 + + + + + + + + class="thisOn" onclick="location.href='/map/request'">지도사용 요청 + class="thisOn" onclick="location.href='/map/userInfo'">회원정보수정 + + + + + + + + + 모바일센터 관리시스템 + + + "> + 로그아웃 + + + + + + + class="thisOn" onclick="location.href='/admin/request'">지도사용 요청 + class="thisOn" onclick="location.href='/admin/history'">지도사용 이력 + class="thisOn" onclick="location.href='/admin/fieldData'">현장수집 데이터 + class="thisOn" onclick="location.href='/admin/userInfo?auth=99'">회원 관리 + + + + + + + + + + + + diff --git a/src/main/webapp/WEB-INF/jsp/join.jsp b/src/main/webapp/WEB-INF/jsp/join.jsp new file mode 100644 index 0000000..61e517f --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/join.jsp @@ -0,0 +1,168 @@ +<%@ page language="java" contentType="text/html; charset=utf-8" + pageEncoding="utf-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> + + + + + + + +모바일센터 관리시스템 +"> +"> +" rel="stylesheet"> +" rel="stylesheet"> +" rel="stylesheet"> + + + + 모바일센터 관리시스템 + + + + + + + 회원 정보 입력 + + + + + + + 아이디 + + + + + + + 비밀번호 + + + + 비밀번호 확인 + + + + 이름 + + + + 소속기관 + + + + 연락처 + + + + 이메일 + + + + + + + + + + ※ 회원 가입을 요청한 후에 승인을 기다려주세요. + + + + + + + + diff --git a/src/main/webapp/WEB-INF/jsp/login.jsp b/src/main/webapp/WEB-INF/jsp/login.jsp new file mode 100644 index 0000000..660b708 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/login.jsp @@ -0,0 +1,64 @@ +<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> + + + + + + + + 모바일센터 관리시스템 + "> + "> + " rel="stylesheet"> + " rel="stylesheet"> + " rel="stylesheet"> + + + + 모바일센터 관리시스템 + + + + + + + + + + + + + + + + + + + + + + 아이디/비밀번호 찾기 + + + + ">회원가입 + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/map/request.jsp b/src/main/webapp/WEB-INF/jsp/map/request.jsp new file mode 100644 index 0000000..5fd2d9d --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/map/request.jsp @@ -0,0 +1,132 @@ +<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> + + + + + + +모바일센터 관리시스템 +"> +"> +" rel="stylesheet"> +" rel="stylesheet"> +" rel="stylesheet"> + + + <%@ include file="../include/header.jsp"%> + + + + + + + + + + + 지도 사용 요청 목록 + + 번호 + 작업명 + 날짜 + 상태 + + + + + + + ${idx.count} + ${item.title} + ${item.r_date} + + + + + + + + + + + + 요청한 목록이 없습니다. + + + + + + + + + + + + + + + + + + + + +
+ +
+ + +
비밀번호 변경
+ + + + + + + + + +
+ + Go Back + + + Go Back + +
+ Go Back +
※ 회원 가입을 요청한 후에 승인을 기다려주세요.