Index: pom.xml =================================================================== diff -u -r32b71e2da43218781d51046bf2a9a1cf247deddc -r47623bd6475cdd605786389e3566657d25021224 --- pom.xml (.../pom.xml) (revision 32b71e2da43218781d51046bf2a9a1cf247deddc) +++ pom.xml (.../pom.xml) (revision 47623bd6475cdd605786389e3566657d25021224) @@ -10,7 +10,7 @@ 4.0.0 313devgrp java-service-tree-framework-backend-server - 22.11.08 + 22.11.10 pom java-service-tree-framework Index: web-module/pom.xml =================================================================== diff -u -r32b71e2da43218781d51046bf2a9a1cf247deddc -r47623bd6475cdd605786389e3566657d25021224 --- web-module/pom.xml (.../pom.xml) (revision 32b71e2da43218781d51046bf2a9a1cf247deddc) +++ web-module/pom.xml (.../pom.xml) (revision 47623bd6475cdd605786389e3566657d25021224) @@ -7,7 +7,7 @@ 313devgrp java-service-tree-framework-backend-server - 22.11.08 + 22.11.10 ../pom.xml @@ -17,7 +17,7 @@ Web Project by 313 DEV GRP - 22.11.10 + 22.12.06 @@ -265,7 +265,8 @@ true 313devgrp/java-service-tree-framework-backend-server - ${project.version} + latest + web.war FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analcrawler/controller/AdminAnalCrawlerController.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analcrawler/controller/AnonAnalCrawlerController.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analcrawler/controller/UserAnalCrawlerController.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analcrawler/model/AnalCrawlerDTO.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analcrawler/service/AnalCrawler.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analcrawler/service/AnalCrawlerImpl.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analpdheatmap/controller/AdminAnalPdHeatmapController.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analpdheatmap/controller/AnonAnalPdHeatmapController.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analpdheatmap/controller/UserAnalPdHeatmapController.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analpdheatmap/model/AnalPdHeatmapDTO.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analpdheatmap/service/AnalPdHeatmap.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analpdheatmap/service/AnalPdHeatmapImpl.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analpdmember/controller/AdminAnalPdMemberController.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analpdmember/controller/AnonAnalPdMemberController.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analpdmember/controller/UserAnalPdMemberController.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analpdmember/model/AnalPdMemberDTO.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analpdmember/service/AnalPdMember.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analpdmember/service/AnalPdMemberImpl.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analpdrelease/controller/AdminAnalPdReleaseController.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analpdrelease/controller/AnonAnalPdReleaseController.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analpdrelease/controller/UserAnalPdReleaseController.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analpdrelease/model/AnalPdReleaseDTO.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analpdrelease/service/AnalPdRelease.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analpdrelease/service/AnalPdReleaseImpl.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analreport/controller/AdminAnalReportController.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analreport/controller/AnonAnalReportController.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analreport/controller/UserAnalReportController.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analreport/model/AnalReportDTO.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analreport/service/AnalReport.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analreport/service/AnalReportImpl.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analreqjira/controller/AdminAnalReqJiraController.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analreqjira/controller/AnonAnalReqJiraController.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analreqjira/controller/UserAnalReqJiraController.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analreqjira/model/AnalReqJiraDTO.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analreqjira/service/AnalReqJira.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analreqjira/service/AnalReqJiraImpl.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analreqrole/controller/AdminAnalReqRoleController.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analreqrole/controller/AnonAnalReqRoleController.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analreqrole/controller/UserAnalReqRoleController.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analreqrole/model/AnalReqRoleDTO.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analreqrole/service/AnalReqRole.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_analreqrole/service/AnalReqRoleImpl.java'. FishEye: No comparison available. Pass `N' to diff? Index: web-module/src/main/java/egovframework/api/arms/module_pdservice/controller/UserPdServiceController.java =================================================================== diff -u -r32b71e2da43218781d51046bf2a9a1cf247deddc -r47623bd6475cdd605786389e3566657d25021224 --- web-module/src/main/java/egovframework/api/arms/module_pdservice/controller/UserPdServiceController.java (.../UserPdServiceController.java) (revision 32b71e2da43218781d51046bf2a9a1cf247deddc) +++ web-module/src/main/java/egovframework/api/arms/module_pdservice/controller/UserPdServiceController.java (.../UserPdServiceController.java) (revision 47623bd6475cdd605786389e3566657d25021224) @@ -15,9 +15,17 @@ import egovframework.api.arms.module_filerepository.service.FileRepository; import egovframework.api.arms.module_pdservice.model.PdServiceDTO; import egovframework.api.arms.module_pdservice.service.PdService; +import egovframework.api.arms.module_pdversion.model.PdVersionDTO; +import egovframework.api.arms.module_pdversion.service.PdVersion; +import egovframework.api.arms.module_reqadd.model.ReqAddSqlMaaperDTO; +import egovframework.api.arms.module_reqadd.service.ReqAddSqlMapper; import egovframework.api.arms.util.PropertiesReader; import egovframework.com.ext.jstree.springHibernate.core.controller.SHVAbstractController; +import egovframework.com.ext.jstree.springHibernate.core.util.Util_TitleChecker; +import egovframework.com.ext.jstree.springHibernate.core.validation.group.AddNode; import egovframework.com.ext.jstree.springHibernate.core.vo.JsTreeHibernateSearchDTO; +import egovframework.com.ext.jstree.springiBatis.core.service.CoreService; +import egovframework.com.ext.jstree.springiBatis.core.vo.ComprehensiveTree; import egovframework.com.utl.fcc.service.EgovFileUploadUtil; import egovframework.com.utl.fcc.service.EgovFormBasedFileVo; import lombok.extern.slf4j.Slf4j; @@ -30,11 +38,13 @@ import org.springframework.ui.Model; import org.springframework.ui.ModelMap; import org.springframework.validation.BindingResult; +import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartHttpServletRequest; import org.springframework.web.servlet.ModelAndView; import javax.annotation.PostConstruct; +import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import java.util.Comparator; import java.util.HashMap; @@ -55,18 +65,78 @@ @Qualifier("fileRepository") private FileRepository fileRepository; + @Autowired + @Qualifier("pdVersion") + private PdVersion pdVersion; + + @Resource(name = "reqAddSqlMapper") + ReqAddSqlMapper reqAddSqlMapper; + @PostConstruct public void initialize() { setJsTreeHibernateService(pdService); } private final Logger logger = LoggerFactory.getLogger(this.getClass()); - private static final Long ROOT_NODE_ID = new Long(2); private static final String NODE_TYPE = new String("default"); + private static final String REQ_PREFIX_TABLENAME_BY_PDSERVICE = new String("T_ARMS_REQADD_"); @ResponseBody + @RequestMapping( + value = {"/addPdServiceNode.do"}, + method = {RequestMethod.POST} + ) + public ModelAndView addNode(@Validated({AddNode.class}) PdServiceDTO pdServiceDTO, + BindingResult bindingResult, ModelMap model) throws Exception { + if (bindingResult.hasErrors()) { + throw new RuntimeException(); + } else { + pdServiceDTO.setC_title(Util_TitleChecker.StringReplace(pdServiceDTO.getC_title())); + + PdServiceDTO addedNode = pdService.addNode(pdServiceDTO); + + //제품(서비스) 생성시 - 요구사항 TABLE 생성 + ReqAddSqlMaaperDTO reqAddSqlMaaperDTO = new ReqAddSqlMaaperDTO(); + reqAddSqlMaaperDTO.setC_title(REQ_PREFIX_TABLENAME_BY_PDSERVICE + addedNode.getC_id().toString()); + if(reqAddSqlMapper.isExistTable(reqAddSqlMaaperDTO) == 1){ + logger.error("already exist JSTF table : " + reqAddSqlMaaperDTO.getC_title()); + }else{ + reqAddSqlMapper.ddlExecuteToReqAdd(reqAddSqlMaaperDTO); + reqAddSqlMapper.ddlSequenceExecuteToReqAdd(reqAddSqlMaaperDTO); + reqAddSqlMapper.dmlExecuteToReqAdd(reqAddSqlMaaperDTO); + } + + String C_title_org = reqAddSqlMaaperDTO.getC_title(); + reqAddSqlMaaperDTO.setC_title(reqAddSqlMaaperDTO.getC_title() + "_LOG"); + if(reqAddSqlMapper.isExistTable(reqAddSqlMaaperDTO) == 1){ + logger.error("already exist log table : " + reqAddSqlMaaperDTO.getC_title()); + }else{ + reqAddSqlMaaperDTO.setC_title(C_title_org); + reqAddSqlMapper.ddlLogExecuteToReqAdd(reqAddSqlMaaperDTO); + //reqAddSqlMapper.ddlTriggerLogSqlExecuteToReqAdd(reqAddSqlMaaperDTO); + } + + //C_ETC 컬럼에 요구사항 테이블 이름 기입 + addedNode.setC_etc(REQ_PREFIX_TABLENAME_BY_PDSERVICE + addedNode.getC_id().toString()); + pdService.updateNode(addedNode); + + //Default Version 생성 + PdVersionDTO pdVersionDTO = new PdVersionDTO(); + pdVersionDTO.setRef(2L); + pdVersionDTO.setC_title("BaseVersion"); + pdVersionDTO.setC_type("default"); + pdVersionDTO.setC_pdservice_link(addedNode.getC_id().toString()); + pdVersion.addNode(pdVersionDTO); + + ModelAndView modelAndView = new ModelAndView("jsonView"); + modelAndView.addObject("result", addedNode); + return modelAndView; + } + } + + @ResponseBody @RequestMapping(value = "/addEndNodeByRoot.do", method = RequestMethod.POST) public ModelAndView addEndNodeByRoot(PdServiceDTO pdServiceDTO, BindingResult bindingResult) throws Exception { Index: web-module/src/main/java/egovframework/api/arms/module_reqadd/controller/AdminReqAddController.java =================================================================== diff -u --- web-module/src/main/java/egovframework/api/arms/module_reqadd/controller/AdminReqAddController.java (revision 0) +++ web-module/src/main/java/egovframework/api/arms/module_reqadd/controller/AdminReqAddController.java (revision 47623bd6475cdd605786389e3566657d25021224) @@ -0,0 +1,51 @@ +/* + * @author Dongmin.lee + * @since 2022-11-09 + * @version 22.11.09 + * @see
+ *  Copyright (C) 2007 by 313 DEV GRP, Inc - All Rights Reserved
+ *  Unauthorized copying of this file, via any medium is strictly prohibited
+ *  Proprietary and confidential
+ *  Written by 313 developer group <313@313.co.kr>, December 2010
+ * 
+ */ +package egovframework.api.arms.module_reqadd.controller; + +import lombok.extern.slf4j.Slf4j; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.validation.BindingResult; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.servlet.ModelAndView; +import javax.annotation.PostConstruct; +import javax.servlet.http.HttpServletRequest; +import java.util.Comparator; +import java.util.List; +import java.util.NoSuchElementException; + +import egovframework.com.ext.jstree.springHibernate.core.controller.SHVAbstractController; + +import egovframework.api.arms.module_reqadd.model.ReqAddDTO; +import egovframework.api.arms.module_reqadd.service.ReqAdd; + +@Slf4j +@Controller +@RequestMapping(value = {"/auth-admin/api/arms/reqAdd"}) +public class AdminReqAddController extends SHVAbstractController { + + @Autowired + @Qualifier("reqAdd") + private ReqAdd reqAdd; + + @PostConstruct + public void initialize() { + setJsTreeHibernateService(reqAdd); + } + +} Index: web-module/src/main/java/egovframework/api/arms/module_reqadd/controller/AnonReqAddController.java =================================================================== diff -u --- web-module/src/main/java/egovframework/api/arms/module_reqadd/controller/AnonReqAddController.java (revision 0) +++ web-module/src/main/java/egovframework/api/arms/module_reqadd/controller/AnonReqAddController.java (revision 47623bd6475cdd605786389e3566657d25021224) @@ -0,0 +1,51 @@ +/* + * @author Dongmin.lee + * @since 2022-11-09 + * @version 22.11.09 + * @see
+ *  Copyright (C) 2007 by 313 DEV GRP, Inc - All Rights Reserved
+ *  Unauthorized copying of this file, via any medium is strictly prohibited
+ *  Proprietary and confidential
+ *  Written by 313 developer group <313@313.co.kr>, December 2010
+ * 
+ */ +package egovframework.api.arms.module_reqadd.controller; + +import lombok.extern.slf4j.Slf4j; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.validation.BindingResult; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.servlet.ModelAndView; +import javax.annotation.PostConstruct; +import javax.servlet.http.HttpServletRequest; +import java.util.Comparator; +import java.util.List; +import java.util.NoSuchElementException; + +import egovframework.com.ext.jstree.springHibernate.core.controller.SHVAbstractController; + +import egovframework.api.arms.module_reqadd.model.ReqAddDTO; +import egovframework.api.arms.module_reqadd.service.ReqAdd; + +@Slf4j +@Controller +@RequestMapping(value = {"/auth-anon/api/arms/reqAdd"}) +public class AnonReqAddController extends SHVAbstractController { + + @Autowired + @Qualifier("reqAdd") + private ReqAdd reqAdd; + + @PostConstruct + public void initialize() { + setJsTreeHibernateService(reqAdd); + } + +} Index: web-module/src/main/java/egovframework/api/arms/module_reqadd/controller/UserReqAddController.java =================================================================== diff -u --- web-module/src/main/java/egovframework/api/arms/module_reqadd/controller/UserReqAddController.java (revision 0) +++ web-module/src/main/java/egovframework/api/arms/module_reqadd/controller/UserReqAddController.java (revision 47623bd6475cdd605786389e3566657d25021224) @@ -0,0 +1,101 @@ +/* + * @author Dongmin.lee + * @since 2022-11-09 + * @version 22.11.09 + * @see
+ *  Copyright (C) 2007 by 313 DEV GRP, Inc - All Rights Reserved
+ *  Unauthorized copying of this file, via any medium is strictly prohibited
+ *  Proprietary and confidential
+ *  Written by 313 developer group <313@313.co.kr>, December 2010
+ * 
+ */ +package egovframework.api.arms.module_reqadd.controller; + +import egovframework.api.arms.module_reqadd.dao.ReqAddSqlMapperDao; +import egovframework.api.arms.module_reqadd.model.ReqAddDTO; +import egovframework.api.arms.module_reqadd.model.ReqAddSqlMaaperDTO; +import egovframework.api.arms.module_reqadd.service.ReqAdd; +import egovframework.api.arms.module_reqadd.service.ReqAddSqlMapper; +import egovframework.com.ext.jstree.springHibernate.core.controller.SHVAbstractController; +import egovframework.com.ext.jstree.springHibernate.core.interceptor.SessionUtil; +import egovframework.com.ext.jstree.springiBatis.core.service.CoreService; +import egovframework.com.ext.jstree.support.util.ParameterParser; +import lombok.extern.slf4j.Slf4j; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.servlet.ModelAndView; + +import javax.annotation.PostConstruct; +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; + +@Slf4j +@Controller +@RequestMapping(value = {"/auth-user/api/arms/reqAdd"}) +public class UserReqAddController extends SHVAbstractController { + + @Autowired + @Qualifier("reqAdd") + private ReqAdd reqAdd; + + @Resource(name = "reqAddSqlMapper") + ReqAddSqlMapper reqAddSqlMapper; + + @PostConstruct + public void initialize() { + setJsTreeHibernateService(reqAdd); + } + + private final Logger logger = LoggerFactory.getLogger(this.getClass()); + + @ResponseBody + @RequestMapping( + value = {"/getTest.do"}, + method = {RequestMethod.GET} + ) + public ModelAndView getTest(V reqAddSqlMaaperDTO, HttpServletRequest request) throws Exception { + + ParameterParser parser = new ParameterParser(request); + + logger.info("UserReqAddController :: getTest :: tableName = " + reqAddSqlMaaperDTO.getC_title()); + + if(reqAddSqlMapper.isExistTable(reqAddSqlMaaperDTO) == 1){ + logger.error("already exist JSTF table : " + reqAddSqlMaaperDTO.getC_title()); + }else{ + reqAddSqlMapper.ddlExecuteToReqAdd(reqAddSqlMaaperDTO); + reqAddSqlMapper.ddlSequenceExecuteToReqAdd(reqAddSqlMaaperDTO); + reqAddSqlMapper.dmlExecuteToReqAdd(reqAddSqlMaaperDTO); + } + + String C_title_org = reqAddSqlMaaperDTO.getC_title(); + reqAddSqlMaaperDTO.setC_title(reqAddSqlMaaperDTO.getC_title() + "_LOG"); + if(reqAddSqlMapper.isExistTable(reqAddSqlMaaperDTO) == 1){ + logger.error("already exist log table : " + reqAddSqlMaaperDTO.getC_title()); + }else{ + reqAddSqlMaaperDTO.setC_title(C_title_org); + reqAddSqlMapper.ddlLogExecuteToReqAdd(reqAddSqlMaaperDTO); + //reqAddSqlMapper.ddlTriggerLogSqlExecuteToReqAdd(reqAddSqlMaaperDTO); + } + + ModelAndView modelAndView = new ModelAndView("jsonView"); + modelAndView.addObject("result", "good"); + return modelAndView; +// if (parser.getInt("c_id") <= 0) { +// throw new RuntimeException(); +// } else { +// SessionUtil.setAttribute("replaceTableName",reqAddDTO.getC_title()); +// V returnVO = this.reqAdd.getNode(reqAddDTO); +// SessionUtil.removeAttribute("replaceTableName"); +// ModelAndView modelAndView = new ModelAndView("jsonView"); +// modelAndView.addObject("result", returnVO); +// return modelAndView; +// } + } + +} Index: web-module/src/main/java/egovframework/api/arms/module_reqadd/dao/ReqAddSqlMapperDao.java =================================================================== diff -u --- web-module/src/main/java/egovframework/api/arms/module_reqadd/dao/ReqAddSqlMapperDao.java (revision 0) +++ web-module/src/main/java/egovframework/api/arms/module_reqadd/dao/ReqAddSqlMapperDao.java (revision 47623bd6475cdd605786389e3566657d25021224) @@ -0,0 +1,15 @@ +package egovframework.api.arms.module_reqadd.dao; + +import egovframework.com.ext.jstree.springiBatis.core.dao.CoreDao; +import egovframework.com.ext.jstree.springiBatis.core.vo.ComprehensiveTree; + +public interface ReqAddSqlMapperDao extends CoreDao { + + public void ddlSqlExecute(T comprehensiveTree) throws Exception; + public void ddlSequenceExecute(T comprehensiveTree) throws Exception; + public void dmlSqlExecute(T comprehensiveTree) throws Exception; + public void ddlLogExecute(T comprehensiveTree) throws Exception; + public void ddlTriggerLogExecute(T comprehensiveTree) throws Exception; + + public int isExistTable(T comprehensiveTree) throws Exception; +} Index: web-module/src/main/java/egovframework/api/arms/module_reqadd/dao/ReqAddSqlMapperDaoImpl.java =================================================================== diff -u --- web-module/src/main/java/egovframework/api/arms/module_reqadd/dao/ReqAddSqlMapperDaoImpl.java (revision 0) +++ web-module/src/main/java/egovframework/api/arms/module_reqadd/dao/ReqAddSqlMapperDaoImpl.java (revision 47623bd6475cdd605786389e3566657d25021224) @@ -0,0 +1,62 @@ +package egovframework.api.arms.module_reqadd.dao; + +import egovframework.com.ext.jstree.springiBatis.core.dao.CoreDaoImpl; +import egovframework.com.ext.jstree.springiBatis.core.vo.ComprehensiveTree; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.stereotype.Repository; + +@Repository("reqAddSqlMapperDao") +@Qualifier("reqAddSqlMapperDao") +public class ReqAddSqlMapperDaoImpl extends CoreDaoImpl implements ReqAddSqlMapperDao { + + @Override + public void ddlSqlExecute(T comprehensiveTree) throws Exception { + update(comprehensiveTree.getSqlMapSelector() + "." + "ddlSqlExecute", comprehensiveTree); + update(comprehensiveTree.getSqlMapSelector() + "." + "ddlSqlExecute_comment_1", comprehensiveTree); + update(comprehensiveTree.getSqlMapSelector() + "." + "ddlSqlExecute_comment_2", comprehensiveTree); + update(comprehensiveTree.getSqlMapSelector() + "." + "ddlSqlExecute_comment_3", comprehensiveTree); + update(comprehensiveTree.getSqlMapSelector() + "." + "ddlSqlExecute_comment_4", comprehensiveTree); + update(comprehensiveTree.getSqlMapSelector() + "." + "ddlSqlExecute_comment_5", comprehensiveTree); + update(comprehensiveTree.getSqlMapSelector() + "." + "ddlSqlExecute_comment_6", comprehensiveTree); + update(comprehensiveTree.getSqlMapSelector() + "." + "ddlSqlExecute_comment_7", comprehensiveTree); + update(comprehensiveTree.getSqlMapSelector() + "." + "ddlSqlExecute_comment_8", comprehensiveTree); + update(comprehensiveTree.getSqlMapSelector() + "." + "ddlSqlExecute_comment_9", comprehensiveTree); + } + + @Override + public void ddlSequenceExecute(T comprehensiveTree) throws Exception { + update(comprehensiveTree.getSqlMapSelector() + "." + "ddlSequenceExecute", comprehensiveTree); + } + + @Override + public void dmlSqlExecute(T comprehensiveTree) throws Exception { + update(comprehensiveTree.getSqlMapSelector() + "." + "dmlSqlExecute_1", comprehensiveTree); + update(comprehensiveTree.getSqlMapSelector() + "." + "dmlSqlExecute_2", comprehensiveTree); + update(comprehensiveTree.getSqlMapSelector() + "." + "dmlSqlExecute_3", comprehensiveTree); + update(comprehensiveTree.getSqlMapSelector() + "." + "dmlSqlExecute_4", comprehensiveTree); + } + + @Override + public void ddlLogExecute(T comprehensiveTree) throws Exception { + update(comprehensiveTree.getSqlMapSelector() + "." + "ddlLogSqlExecute", comprehensiveTree); + update(comprehensiveTree.getSqlMapSelector() + "." + "ddlLogSqlExecute_comment_1", comprehensiveTree); + update(comprehensiveTree.getSqlMapSelector() + "." + "ddlLogSqlExecute_comment_2", comprehensiveTree); + update(comprehensiveTree.getSqlMapSelector() + "." + "ddlLogSqlExecute_comment_3", comprehensiveTree); + update(comprehensiveTree.getSqlMapSelector() + "." + "ddlLogSqlExecute_comment_4", comprehensiveTree); + update(comprehensiveTree.getSqlMapSelector() + "." + "ddlLogSqlExecute_comment_5", comprehensiveTree); + update(comprehensiveTree.getSqlMapSelector() + "." + "ddlLogSqlExecute_comment_6", comprehensiveTree); + update(comprehensiveTree.getSqlMapSelector() + "." + "ddlLogSqlExecute_comment_7", comprehensiveTree); + update(comprehensiveTree.getSqlMapSelector() + "." + "ddlLogSqlExecute_comment_8", comprehensiveTree); + update(comprehensiveTree.getSqlMapSelector() + "." + "ddlLogSqlExecute_comment_9", comprehensiveTree); + } + + @Override + public void ddlTriggerLogExecute(T comprehensiveTree) throws Exception { + update(comprehensiveTree.getSqlMapSelector() + "." + "ddlTriggerLogSqlExecute", comprehensiveTree); + } + + public int isExistTable( T comprehensiveTree ) throws Exception{ + return (int) getSqlMapClientTemplate().queryForObject( + comprehensiveTree.getSqlMapSelector() + ".isExistTable", comprehensiveTree); + } +} Index: web-module/src/main/java/egovframework/api/arms/module_reqadd/model/ReqAddDTO.java =================================================================== diff -u --- web-module/src/main/java/egovframework/api/arms/module_reqadd/model/ReqAddDTO.java (revision 0) +++ web-module/src/main/java/egovframework/api/arms/module_reqadd/model/ReqAddDTO.java (revision 47623bd6475cdd605786389e3566657d25021224) @@ -0,0 +1,71 @@ +/* + * @author Dongmin.lee + * @since 2022-11-09 + * @version 22.11.09 + * @see
+ *  Copyright (C) 2007 by 313 DEV GRP, Inc - All Rights Reserved
+ *  Unauthorized copying of this file, via any medium is strictly prohibited
+ *  Proprietary and confidential
+ *  Written by 313 developer group <313@313.co.kr>, December 2010
+ * 
+ */ +package egovframework.api.arms.module_reqadd.model; + +import org.hibernate.annotations.*; +import org.hibernate.annotations.Cache; +import javax.persistence.*; +import javax.persistence.Entity; +import javax.persistence.Table; +import java.io.Serializable; +import egovframework.com.ext.jstree.springHibernate.core.vo.JsTreeHibernateDTO; +import egovframework.com.ext.jstree.springHibernate.core.vo.JsTreeHibernateSearchDTO; + +@Entity +@Table(name = "T_ARMS_REQADD") +@SelectBeforeUpdate(value=true) +@DynamicInsert(value=true) +@DynamicUpdate(value=true) +@Cache(usage = CacheConcurrencyStrategy.READ_WRITE) +@SequenceGenerator(name = "JsTreeSequence", sequenceName = "S_ARMS_REQADD", allocationSize = 1) +public class ReqAddDTO extends JsTreeHibernateSearchDTO implements Serializable { + + public ReqAddDTO() { + super(); + } + + public ReqAddDTO(Boolean copyBooleanValue) { + super(); + this.copyBooleanValue = copyBooleanValue; + } + + //@Getter @Setter + + /* + * Extend Bean Field + */ + private Boolean copyBooleanValue; + + @Transient + public Boolean getCopyBooleanValue() { + copyBooleanValue = false; + if (this.getCopy() == 0) { + copyBooleanValue = false; + } else { + copyBooleanValue = true; + } + return copyBooleanValue; + } + + public void setCopyBooleanValue(Boolean copyBooleanValue) { + this.copyBooleanValue = copyBooleanValue; + } + + @Override + public void setFieldFromNewInstance(T paramInstance) { + if( paramInstance instanceof JsTreeHibernateDTO){ + if(paramInstance.isCopied()) { + this.setC_title("copy_" + this.getC_title()); + } + } + } +} Index: web-module/src/main/java/egovframework/api/arms/module_reqadd/model/ReqAddSqlMaaperDTO.java =================================================================== diff -u --- web-module/src/main/java/egovframework/api/arms/module_reqadd/model/ReqAddSqlMaaperDTO.java (revision 0) +++ web-module/src/main/java/egovframework/api/arms/module_reqadd/model/ReqAddSqlMaaperDTO.java (revision 47623bd6475cdd605786389e3566657d25021224) @@ -0,0 +1,7 @@ +package egovframework.api.arms.module_reqadd.model; + +import egovframework.com.ext.jstree.springiBatis.core.vo.ComprehensiveTree; + +public class ReqAddSqlMaaperDTO extends ComprehensiveTree { + +} Index: web-module/src/main/java/egovframework/api/arms/module_reqadd/service/ReqAdd.java =================================================================== diff -u --- web-module/src/main/java/egovframework/api/arms/module_reqadd/service/ReqAdd.java (revision 0) +++ web-module/src/main/java/egovframework/api/arms/module_reqadd/service/ReqAdd.java (revision 47623bd6475cdd605786389e3566657d25021224) @@ -0,0 +1,20 @@ +/* + * @author Dongmin.lee + * @since 2022-11-09 + * @version 22.11.09 + * @see
+ *  Copyright (C) 2007 by 313 DEV GRP, Inc - All Rights Reserved
+ *  Unauthorized copying of this file, via any medium is strictly prohibited
+ *  Proprietary and confidential
+ *  Written by 313 developer group <313@313.co.kr>, December 2010
+ * 
+ */ +package egovframework.api.arms.module_reqadd.service; + +import egovframework.com.ext.jstree.springHibernate.core.service.JsTreeHibernateService; + +public interface ReqAdd extends JsTreeHibernateService { + + + +} \ No newline at end of file Index: web-module/src/main/java/egovframework/api/arms/module_reqadd/service/ReqAddImpl.java =================================================================== diff -u --- web-module/src/main/java/egovframework/api/arms/module_reqadd/service/ReqAddImpl.java (revision 0) +++ web-module/src/main/java/egovframework/api/arms/module_reqadd/service/ReqAddImpl.java (revision 47623bd6475cdd605786389e3566657d25021224) @@ -0,0 +1,22 @@ +/* + * @author Dongmin.lee + * @since 2022-11-09 + * @version 22.11.09 + * @see
+ *  Copyright (C) 2007 by 313 DEV GRP, Inc - All Rights Reserved
+ *  Unauthorized copying of this file, via any medium is strictly prohibited
+ *  Proprietary and confidential
+ *  Written by 313 developer group <313@313.co.kr>, December 2010
+ * 
+ */ +package egovframework.api.arms.module_reqadd.service; + +import egovframework.com.ext.jstree.springHibernate.core.service.JsTreeHibernateServiceImpl; +import org.springframework.stereotype.Service; + +@Service("reqAdd") +public class ReqAddImpl extends JsTreeHibernateServiceImpl implements ReqAdd{ + + + +} \ No newline at end of file Index: web-module/src/main/java/egovframework/api/arms/module_reqadd/service/ReqAddSqlMapper.java =================================================================== diff -u --- web-module/src/main/java/egovframework/api/arms/module_reqadd/service/ReqAddSqlMapper.java (revision 0) +++ web-module/src/main/java/egovframework/api/arms/module_reqadd/service/ReqAddSqlMapper.java (revision 47623bd6475cdd605786389e3566657d25021224) @@ -0,0 +1,19 @@ +package egovframework.api.arms.module_reqadd.service; + +import egovframework.com.ext.jstree.springiBatis.core.service.CoreService; +import egovframework.com.ext.jstree.springiBatis.core.vo.ComprehensiveTree; + +public interface ReqAddSqlMapper extends CoreService { + + public void ddlExecuteToReqAdd(T comprehensiveTree) throws Exception; + + public void ddlSequenceExecuteToReqAdd(T comprehensiveTree) throws Exception; + + public void dmlExecuteToReqAdd(T comprehensiveTree) throws Exception; + + public void ddlLogExecuteToReqAdd(T comprehensiveTree) throws Exception; + + public void ddlTriggerLogSqlExecuteToReqAdd(T comprehensiveTree) throws Exception; + + public int isExistTable(T comprehensiveTree) throws Exception; +} Index: web-module/src/main/java/egovframework/api/arms/module_reqadd/service/ReqAddSqlMapperImpl.java =================================================================== diff -u --- web-module/src/main/java/egovframework/api/arms/module_reqadd/service/ReqAddSqlMapperImpl.java (revision 0) +++ web-module/src/main/java/egovframework/api/arms/module_reqadd/service/ReqAddSqlMapperImpl.java (revision 47623bd6475cdd605786389e3566657d25021224) @@ -0,0 +1,55 @@ +package egovframework.api.arms.module_reqadd.service; + +import egovframework.api.arms.module_reqadd.dao.ReqAddSqlMapperDao; +import egovframework.com.ext.jstree.springiBatis.core.dao.CoreDao; +import egovframework.com.ext.jstree.springiBatis.core.service.CoreServiceImpl; +import egovframework.com.ext.jstree.springiBatis.core.vo.ComprehensiveTree; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; + +@Service("reqAddSqlMapper") +public class ReqAddSqlMapperImpl extends CoreServiceImpl implements ReqAddSqlMapper { + + private final Logger logger = LoggerFactory.getLogger(this.getClass()); + + @Resource(name = "reqAddSqlMapperDao") + ReqAddSqlMapperDao reqAddSqlMapperDao; + + @Override + @Transactional(readOnly = false, rollbackFor = { Exception.class }, propagation = Propagation.REQUIRED) + public void ddlExecuteToReqAdd(T comprehensiveTree) throws Exception { + reqAddSqlMapperDao.ddlSqlExecute(comprehensiveTree); + } + + @Override + public void ddlSequenceExecuteToReqAdd(T comprehensiveTree) throws Exception { + reqAddSqlMapperDao.ddlSequenceExecute(comprehensiveTree); + } + + @Override + @Transactional(readOnly = false, rollbackFor = { Exception.class }, propagation = Propagation.REQUIRED) + public void dmlExecuteToReqAdd(T comprehensiveTree) throws Exception { + reqAddSqlMapperDao.dmlSqlExecute(comprehensiveTree); + } + + @Override + public void ddlLogExecuteToReqAdd(T comprehensiveTree) throws Exception { + reqAddSqlMapperDao.ddlLogExecute(comprehensiveTree); + } + + @Override + public void ddlTriggerLogSqlExecuteToReqAdd(T comprehensiveTree) throws Exception { + reqAddSqlMapperDao.ddlTriggerLogExecute(comprehensiveTree); + } + + @Override + public int isExistTable(T comprehensiveTree) throws Exception { + return reqAddSqlMapperDao.isExistTable(comprehensiveTree); + } + +} FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_reqchange/controller/AdminReqChangeController.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_reqchange/controller/AnonReqChangeController.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_reqchange/controller/UserReqChangeController.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_reqchange/model/ReqChangeDTO.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_reqchange/service/ReqChange.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_reqchange/service/ReqChangeImpl.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_reqreview/controller/AdminReqReviewController.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_reqreview/controller/AnonReqReviewController.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_reqreview/controller/UserReqReviewController.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_reqreview/model/ReqReviewDTO.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_reqreview/service/ReqReview.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_reqreview/service/ReqReviewImpl.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_reqspec/controller/AdminReqSpecController.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_reqspec/controller/AnonReqSpecController.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_reqspec/controller/UserReqSpecController.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_reqspec/model/ReqSpecDTO.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_reqspec/service/ReqSpec.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 47623bd6475cdd605786389e3566657d25021224 refers to a dead (removed) revision in file `web-module/src/main/java/egovframework/api/arms/module_reqspec/service/ReqSpecImpl.java'. FishEye: No comparison available. Pass `N' to diff? Index: web-module/src/main/resources/egovframework/sqlmap/com/ext/jstree/springiBatis/moduleJSTF_SQL_Oracle_iBatis.xml =================================================================== diff -u --- web-module/src/main/resources/egovframework/sqlmap/com/ext/jstree/springiBatis/moduleJSTF_SQL_Oracle_iBatis.xml (revision 0) +++ web-module/src/main/resources/egovframework/sqlmap/com/ext/jstree/springiBatis/moduleJSTF_SQL_Oracle_iBatis.xml (revision 47623bd6475cdd605786389e3566657d25021224) @@ -0,0 +1,172 @@ + + + + + + + CREATE TABLE $c_title$( + C_ID NUMBER NOT NULL, + C_PARENTID NUMBER NOT NULL, + C_POSITION NUMBER NOT NULL, + C_LEFT NUMBER NOT NULL, + C_RIGHT NUMBER NOT NULL, + C_LEVEL NUMBER NOT NULL, + C_TITLE VARCHAR2(4000 BYTE), + C_TYPE VARCHAR2(4000 BYTE), + CONSTRAINT $c_title$_PK PRIMARY KEY (C_ID) + /* + * CONSTRAINT T_ARMS_REQADD_FK1 FOREIGN KEY (OTHER_ID) REFERENCES OTHER T_ARMS_REQADD(C_ID) ON DELETE CASCADE + */) + + + + /* + * 인덱스는 되도록 걸지 말것. + * CREATE UNIQUE INDEX I_COMPREHENSIVETREE ON T_ARMS_REQADD + * ("C_ID" ASC) + */ + /* + * DROP SEQUENCE S_ARMS_REQADD; + */ + CREATE SEQUENCE S_$c_title$ + START WITH 10 + MAXVALUE 999999999999999999999999999 + MINVALUE 0 + NOCYCLE + CACHE 20 + NOORDER + + + + COMMENT ON TABLE $c_title$ IS '기본 트리 스키마' + + + COMMENT ON COLUMN $c_title$.C_ID IS '노드 아이디' + + + COMMENT ON COLUMN $c_title$.C_PARENTID IS '부모 노드 아이디' + + + COMMENT ON COLUMN $c_title$.C_POSITION IS '노드 포지션' + + + COMMENT ON COLUMN $c_title$.C_LEFT IS '노드 좌측 끝 포인트' + + + COMMENT ON COLUMN $c_title$.C_RIGHT IS '노드 우측 끝 포인트' + + + COMMENT ON COLUMN $c_title$.C_LEVEL IS '노드 DEPTH' + + + COMMENT ON COLUMN $c_title$.C_TITLE IS '노드 명' + + + COMMENT ON COLUMN $c_title$.C_TYPE IS '노드 타입' + + + + Insert into $c_title$ (C_ID, C_PARENTID, C_POSITION, C_LEFT, C_RIGHT, C_LEVEL, C_TITLE, C_TYPE) + Values (1, 0, 0, 1, 8, 0, 'Root Node', 'root') + + + Insert into $c_title$ (C_ID, C_PARENTID, C_POSITION, C_LEFT, C_RIGHT, C_LEVEL, C_TITLE, C_TYPE) + Values (2, 1, 0, 2, 7, 1, 'First Child', 'drive') + + + Insert into $c_title$ (C_ID, C_PARENTID, C_POSITION, C_LEFT, C_RIGHT, C_LEVEL, C_TITLE, C_TYPE) + Values (3, 2, 0, 3, 4, 2, 'Leaf Node', 'default') + + + Insert into $c_title$ (C_ID, C_PARENTID, C_POSITION, C_LEFT, C_RIGHT, C_LEVEL, C_TITLE, C_TYPE) + Values (4, 2, 1, 5, 6, 2, 'Branch Node', 'folder') + + + + CREATE TABLE $c_title$_LOG( + C_ID NUMBER NOT NULL, + C_PARENTID NUMBER NOT NULL, + C_POSITION NUMBER NOT NULL, + C_LEFT NUMBER NOT NULL, + C_RIGHT NUMBER NOT NULL, + C_LEVEL NUMBER NOT NULL, + C_TITLE VARCHAR2(4000 BYTE), + C_TYPE VARCHAR2(4000 BYTE), + C_METHOD VARCHAR2(4000 BYTE), + C_STATE VARCHAR2(4000 BYTE), + C_DATE DATE NOT NULL + ) + + + COMMENT ON TABLE $c_title$_LOG IS '기본 트리 스키마 트리거 로그' + + + COMMENT ON COLUMN $c_title$_LOG.C_ID IS '노드 아이디' + + + COMMENT ON COLUMN $c_title$_LOG.C_PARENTID IS '부모 노드 아이디' + + + COMMENT ON COLUMN $c_title$_LOG.C_POSITION IS '노드 포지션' + + + COMMENT ON COLUMN $c_title$_LOG.C_LEFT IS '노드 좌측 끝 포인트' + + + COMMENT ON COLUMN $c_title$_LOG.C_RIGHT IS '노드 우측 끝 포인트' + + + COMMENT ON COLUMN $c_title$_LOG.C_LEVEL IS '노드 DEPTH ' + + + COMMENT ON COLUMN $c_title$_LOG.C_TITLE IS '노드 명' + + + COMMENT ON COLUMN $c_title$_LOG.C_TYPE IS '노드 타입' + + + COMMENT ON COLUMN $c_title$_LOG.C_METHOD IS '노드 변경 행위' + + + COMMENT ON COLUMN $c_title$_LOG.C_STATE IS '노드 상태값 ( 이전인지. 이후인지)' + + + COMMENT ON COLUMN $c_title$_LOG.C_DATE IS '노드 변경 시' + + + + + + + + + \ No newline at end of file