Index: pom.xml =================================================================== diff -u -r0ba4881d31ade128390177d22dac88738e4e67cc -r663837047ab042c4bd3cd245e17ad41e525caa2e --- pom.xml (.../pom.xml) (revision 0ba4881d31ade128390177d22dac88738e4e67cc) +++ pom.xml (.../pom.xml) (revision 663837047ab042c4bd3cd245e17ad41e525caa2e) @@ -10,7 +10,7 @@ 4.0.0 313devgrp java-service-tree-framework-backend-server - 22.11.15 + 22.11.17 pom java-service-tree-framework Index: web-module/pom.xml =================================================================== diff -u -r0ba4881d31ade128390177d22dac88738e4e67cc -r663837047ab042c4bd3cd245e17ad41e525caa2e --- web-module/pom.xml (.../pom.xml) (revision 0ba4881d31ade128390177d22dac88738e4e67cc) +++ web-module/pom.xml (.../pom.xml) (revision 663837047ab042c4bd3cd245e17ad41e525caa2e) @@ -7,7 +7,7 @@ 313devgrp java-service-tree-framework-backend-server - 22.11.15 + 22.11.17 ../pom.xml Index: web-module/src/main/java/egovframework/api/arms/module_reqadd/controller/UserReqAddController.java =================================================================== diff -u -r9acfa51a82d6eae6c7e1738728fd414f77b8be94 -r663837047ab042c4bd3cd245e17ad41e525caa2e --- web-module/src/main/java/egovframework/api/arms/module_reqadd/controller/UserReqAddController.java (.../UserReqAddController.java) (revision 9acfa51a82d6eae6c7e1738728fd414f77b8be94) +++ web-module/src/main/java/egovframework/api/arms/module_reqadd/controller/UserReqAddController.java (.../UserReqAddController.java) (revision 663837047ab042c4bd3cd245e17ad41e525caa2e) @@ -13,7 +13,6 @@ import egovframework.api.arms.module_filerepository.model.FileRepositoryDTO; import egovframework.api.arms.module_filerepository.service.FileRepository; -import egovframework.api.arms.module_pdservice.model.PdServiceDTO; import egovframework.api.arms.module_reqadd.model.ReqAddDTO; import egovframework.api.arms.module_reqadd.model.ReqAddSqlMaaperDTO; import egovframework.api.arms.module_reqadd.service.ReqAdd; @@ -24,12 +23,13 @@ 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.validation.group.MoveNode; -import egovframework.com.ext.jstree.springHibernate.core.vo.JsTreeHibernateSearchDTO; import egovframework.com.ext.jstree.support.util.ParameterParser; import egovframework.com.utl.fcc.service.EgovFileUploadUtil; import egovframework.com.utl.fcc.service.EgovFormBasedFileVo; import lombok.extern.slf4j.Slf4j; +import org.hibernate.criterion.Criterion; import org.hibernate.criterion.Order; +import org.hibernate.criterion.Restrictions; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -152,6 +152,38 @@ @ResponseBody @RequestMapping( + value = {"/{changeReqTableName}/getChildNodeWithParent.do"}, + method = {RequestMethod.GET} + ) + public ModelAndView + getSwitchDBChildNodeWithParent(@PathVariable(value ="changeReqTableName") String changeReqTableName, + ReqAddDTO reqAddDTO, HttpServletRequest request) throws Exception { + ParameterParser parser = new ParameterParser(request); + if (parser.getInt("c_id") <= 0) { + throw new RuntimeException(); + } else { + + SessionUtil.setAttribute("replaceTableName",changeReqTableName); + + //쿼리 + Criterion criterion1 = Restrictions.ge("c_left", reqAddDTO.getC_left()); + Criterion criterion2 = Restrictions.and(Restrictions.le("c_right", reqAddDTO.getC_right())); + reqAddDTO.getCriterions().add(criterion1); + reqAddDTO.getCriterions().add(criterion2); + reqAddDTO.setOrder(Order.asc("c_left")); + reqAddDTO.setC_id(null); + + List list = reqAdd.getChildNode(reqAddDTO); + SessionUtil.removeAttribute("replaceTableName"); + + ModelAndView modelAndView = new ModelAndView("jsonView"); + modelAndView.addObject("result", list); + return modelAndView; + } + } + + @ResponseBody + @RequestMapping( value = {"/{changeReqTableName}/addNode.do"}, method = {RequestMethod.POST} )