Index: web-module/src/main/java/egovframework/api/arms/module_reqreview/controller/UserReqReviewController.java =================================================================== diff -u -rf2910d4cc9450bf27809b17bf173f1c6837da671 -r8628ab27475cb2908988b10eabf1588d90800384 --- web-module/src/main/java/egovframework/api/arms/module_reqreview/controller/UserReqReviewController.java (.../UserReqReviewController.java) (revision f2910d4cc9450bf27809b17bf173f1c6837da671) +++ web-module/src/main/java/egovframework/api/arms/module_reqreview/controller/UserReqReviewController.java (.../UserReqReviewController.java) (revision 8628ab27475cb2908988b10eabf1588d90800384) @@ -11,20 +11,27 @@ */ package egovframework.api.arms.module_reqreview.controller; +import egovframework.api.arms.module_pdservicejiraver.model.PdServiceJiraVerDTO; +import egovframework.com.ext.jstree.support.util.ParameterParser; 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; 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.servlet.ModelAndView; import javax.annotation.PostConstruct; import javax.servlet.http.HttpServletRequest; +import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.NoSuchElementException; @@ -50,4 +57,37 @@ private final Logger logger = LoggerFactory.getLogger(this.getClass()); + @ResponseBody + @RequestMapping( + value = {"/getMonitor_Without_Root.do"}, + method = {RequestMethod.GET} + ) + public ModelAndView getMonitor_Without_Root(ModelMap model, HttpServletRequest request) throws Exception { + + ParameterParser parser = new ParameterParser(request); + String searchReviewer = parser.get("searchReviewer"); + + ReqReviewDTO reqReviewDTO = new ReqReviewDTO(); + Criterion criterion = Restrictions.not( + // replace "id" below with property name, depending on what you're filtering against + Restrictions.in("c_id", new Object[] {1L, 2L}) + ); + + reqReviewDTO.getCriterions().add(criterion); + + Criterion sender_criterion = Restrictions.or( + // replace "id" below with property name, depending on what you're filtering against + Restrictions.in("c_review_sender", Collections.singleton(searchReviewer)), + Restrictions.in("c_review_responder", Collections.singleton(searchReviewer)) + ); + reqReviewDTO.getCriterions().add(sender_criterion); + + reqReviewDTO.setOrder(Order.desc("c_review_creat_date")); + List list = reqReview.getChildNode(reqReviewDTO); + + ModelAndView modelAndView = new ModelAndView("jsonView"); + modelAndView.addObject("result", list); + return modelAndView; + } + }