Index: web-module/src/main/java/egovframework/api/arms/module_pdversion/controller/UserPdVersionController.java =================================================================== diff -u -r3bdd902ff67d96fd205d1926c558b2eac47cd0ad -rbb23712e362c72f80a065643e0668cc2cf4af7bd --- web-module/src/main/java/egovframework/api/arms/module_pdversion/controller/UserPdVersionController.java (.../UserPdVersionController.java) (revision 3bdd902ff67d96fd205d1926c558b2eac47cd0ad) +++ web-module/src/main/java/egovframework/api/arms/module_pdversion/controller/UserPdVersionController.java (.../UserPdVersionController.java) (revision bb23712e362c72f80a065643e0668cc2cf4af7bd) @@ -11,17 +11,17 @@ */ package egovframework.api.arms.module_pdversion.controller; +import egovframework.api.arms.devicelist.service.DeviceListService; 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.ui.ModelMap; 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.bind.annotation.*; import org.springframework.web.servlet.ModelAndView; import javax.annotation.PostConstruct; import javax.servlet.http.HttpServletRequest; @@ -50,4 +50,16 @@ private final Logger logger = LoggerFactory.getLogger(this.getClass()); + @RequestMapping(value="/getVersion.do",method= RequestMethod.GET) + public ModelAndView getNode(PdVersionDTO pdVersionDTO, ModelMap model, + HttpServletRequest request) throws Exception { + + List pdVersionDTOS = pdVersion.getVersion(pdVersionDTO); + logger.info("DeviceList update Count = " + pdVersionDTOS.size()); + + ModelAndView modelAndView = new ModelAndView("jsonView"); + modelAndView.addObject("result", pdVersionDTOS); + return modelAndView; + } + } Index: web-module/src/main/java/egovframework/api/arms/module_pdversion/model/PdVersionDTO.java =================================================================== diff -u -rc342d23e4f66f96f59d8f15be815e732fe3739ab -rbb23712e362c72f80a065643e0668cc2cf4af7bd --- web-module/src/main/java/egovframework/api/arms/module_pdversion/model/PdVersionDTO.java (.../PdVersionDTO.java) (revision c342d23e4f66f96f59d8f15be815e732fe3739ab) +++ web-module/src/main/java/egovframework/api/arms/module_pdversion/model/PdVersionDTO.java (.../PdVersionDTO.java) (revision bb23712e362c72f80a065643e0668cc2cf4af7bd) @@ -52,6 +52,18 @@ this.c_pdservice_link = c_pdservice_link; } + private String c_contents; + + @Lob + @Column(name="C_CONTENTS") + public String getC_contents() { + return c_contents; + } + + public void setC_contents(String c_contents) { + this.c_contents = c_contents; + } + /* * Extend Bean Field */ Index: web-module/src/main/java/egovframework/api/arms/module_pdversion/service/PdVersion.java =================================================================== diff -u -r3bdd902ff67d96fd205d1926c558b2eac47cd0ad -rbb23712e362c72f80a065643e0668cc2cf4af7bd --- web-module/src/main/java/egovframework/api/arms/module_pdversion/service/PdVersion.java (.../PdVersion.java) (revision 3bdd902ff67d96fd205d1926c558b2eac47cd0ad) +++ web-module/src/main/java/egovframework/api/arms/module_pdversion/service/PdVersion.java (.../PdVersion.java) (revision bb23712e362c72f80a065643e0668cc2cf4af7bd) @@ -12,9 +12,12 @@ package egovframework.api.arms.module_pdversion.service; import egovframework.com.ext.jstree.springHibernate.core.service.JsTreeHibernateService; +import egovframework.com.ext.jstree.springHibernate.core.vo.JsTreeHibernateSearchDTO; +import java.util.List; + public interface PdVersion extends JsTreeHibernateService { + public List getVersion(T jsTreeHibernateDTO) throws Exception; - } \ No newline at end of file Index: web-module/src/main/java/egovframework/api/arms/module_pdversion/service/PdVersionImpl.java =================================================================== diff -u -r3bdd902ff67d96fd205d1926c558b2eac47cd0ad -rbb23712e362c72f80a065643e0668cc2cf4af7bd --- web-module/src/main/java/egovframework/api/arms/module_pdversion/service/PdVersionImpl.java (.../PdVersionImpl.java) (revision 3bdd902ff67d96fd205d1926c558b2eac47cd0ad) +++ web-module/src/main/java/egovframework/api/arms/module_pdversion/service/PdVersionImpl.java (.../PdVersionImpl.java) (revision bb23712e362c72f80a065643e0668cc2cf4af7bd) @@ -11,12 +11,32 @@ */ package egovframework.api.arms.module_pdversion.service; +import egovframework.com.ext.jstree.springHibernate.core.dao.JsTreeHibernateDao; import egovframework.com.ext.jstree.springHibernate.core.service.JsTreeHibernateServiceImpl; +import egovframework.com.ext.jstree.springHibernate.core.vo.JsTreeHibernateSearchDTO; +import org.hibernate.criterion.Order; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import java.util.List; + @Service("pdVersion") public class PdVersionImpl extends JsTreeHibernateServiceImpl implements PdVersion{ + private final Logger logger = LoggerFactory.getLogger(this.getClass()); + @SuppressWarnings("rawtypes") + @Resource(name = "jsTreeHibernateDao") + private JsTreeHibernateDao jsTreeHibernateDao; + @Override + public List getVersion(T jsTreeHibernateDTO) throws Exception { + jsTreeHibernateDao.setClazz(jsTreeHibernateDTO.getClass()); + jsTreeHibernateDTO.setOrder(Order.asc("c_left")); + jsTreeHibernateDTO.setWhere("c_pdservice_link", jsTreeHibernateDTO.getC_id().toString()); + List list = jsTreeHibernateDao.getList(jsTreeHibernateDTO); + return list; + } } \ No newline at end of file