Index: web-module/src/main/java/egovframework/api/arms/module_reqadd/controller/UserReqAddController.java =================================================================== diff -u -r1936e60dae53301428372e99f188a288734f8d2f -r2a7685dcd381b2969d7137d35f5ba056544bc71b --- web-module/src/main/java/egovframework/api/arms/module_reqadd/controller/UserReqAddController.java (.../UserReqAddController.java) (revision 1936e60dae53301428372e99f188a288734f8d2f) +++ web-module/src/main/java/egovframework/api/arms/module_reqadd/controller/UserReqAddController.java (.../UserReqAddController.java) (revision 2a7685dcd381b2969d7137d35f5ba056544bc71b) @@ -960,4 +960,58 @@ return modelAndView; } + @ResponseBody + @RequestMapping({"/{changeReqTableName}/withReqReview/updateNode.do"}) + public ModelAndView updateNode_WithReqReview( + @PathVariable(value ="changeReqTableName") String changeReqTableName, + @Validated({UpdateNode.class}) ReqAddDTO reqAddDTO, + BindingResult bindingResult, HttpServletRequest request, ModelMap model) throws Exception { + + if (bindingResult.hasErrors()) { + throw new RuntimeException(); + } else { + + ParameterParser parser = new ParameterParser(request); + long c_id = parser.getLong("c_id"); + long c_review_pdservice_link = parser.getLong("c_review_pdservice_link"); + long c_review_req_link = parser.getLong("c_review_req_link"); + String c_review_result_state = parser.get("c_review_result_state"); + + ReqReviewDTO searchReviewDTO = new ReqReviewDTO(); + searchReviewDTO.setC_id(c_id); + ReqReviewDTO resultNode = reqReview.getNode(searchReviewDTO); + resultNode.setC_review_result_state(c_review_result_state); + resultNode.setC_review_result_date(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); + reqReview.updateNode(resultNode); + + resultNode.getC_review_responder(); + + SessionUtil.setAttribute("updateNode",changeReqTableName); + + ReqAddDTO searchReqAddDTO = new ReqAddDTO(); + searchReqAddDTO.setC_id(c_review_req_link); + ReqAddDTO resultReqAddNode = reqAdd.getNode(searchReqAddDTO); + + if(StringUtility.equals(resultNode.getC_review_responder(), resultReqAddNode.getC_reviewer01())){ + resultReqAddNode.setC_reviewer01_status(c_review_result_state); + }else if(StringUtility.equals(resultNode.getC_review_responder(), resultReqAddNode.getC_reviewer02())){ + resultReqAddNode.setC_reviewer02_status(c_review_result_state); + }else if(StringUtility.equals(resultNode.getC_review_responder(), resultReqAddNode.getC_reviewer03())){ + resultReqAddNode.setC_reviewer03_status(c_review_result_state); + }else if(StringUtility.equals(resultNode.getC_review_responder(), resultReqAddNode.getC_reviewer04())){ + resultReqAddNode.setC_reviewer04_status(c_review_result_state); + }else if(StringUtility.equals(resultNode.getC_review_responder(), resultReqAddNode.getC_reviewer05())){ + resultReqAddNode.setC_reviewer05_status(c_review_result_state); + } + + reqAdd.updateNode(resultReqAddNode); + + SessionUtil.removeAttribute("updateNode"); + } + + ModelAndView modelAndView = new ModelAndView("jsonView"); + modelAndView.addObject("result", "done"); + + return modelAndView; + } } Index: web-module/src/main/java/egovframework/api/arms/module_reqreview/controller/UserReqReviewController.java =================================================================== diff -u -rb8269bb63f38bf3c3105fce851b707da38fb703f -r2a7685dcd381b2969d7137d35f5ba056544bc71b --- web-module/src/main/java/egovframework/api/arms/module_reqreview/controller/UserReqReviewController.java (.../UserReqReviewController.java) (revision b8269bb63f38bf3c3105fce851b707da38fb703f) +++ web-module/src/main/java/egovframework/api/arms/module_reqreview/controller/UserReqReviewController.java (.../UserReqReviewController.java) (revision 2a7685dcd381b2969d7137d35f5ba056544bc71b) @@ -12,8 +12,11 @@ package egovframework.api.arms.module_reqreview.controller; import com.google.common.collect.Maps; +import egovframework.api.arms.module_pdserviceconnect.model.PdServiceConnectDTO; import egovframework.api.arms.module_pdservicejiraver.model.PdServiceJiraVerDTO; +import egovframework.api.arms.util.PropertiesReader; import egovframework.api.arms.util.StringUtility; +import egovframework.com.ext.jstree.springHibernate.core.validation.group.UpdateNode; import egovframework.com.ext.jstree.support.util.ParameterParser; import lombok.extern.slf4j.Slf4j; import org.hibernate.criterion.Criterion; @@ -23,16 +26,20 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; 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.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.client.RestTemplate; import org.springframework.web.servlet.ModelAndView; import javax.annotation.PostConstruct; import javax.servlet.http.HttpServletRequest; +import java.text.SimpleDateFormat; import java.util.*; import egovframework.com.ext.jstree.springHibernate.core.controller.SHVAbstractController; @@ -148,5 +155,4 @@ return modelAndView; } - } Index: web-module/src/main/java/egovframework/api/arms/module_reqreviewlog/controller/UserReqReviewLogController.java =================================================================== diff -u -r1936e60dae53301428372e99f188a288734f8d2f -r2a7685dcd381b2969d7137d35f5ba056544bc71b --- web-module/src/main/java/egovframework/api/arms/module_reqreviewlog/controller/UserReqReviewLogController.java (.../UserReqReviewLogController.java) (revision 1936e60dae53301428372e99f188a288734f8d2f) +++ web-module/src/main/java/egovframework/api/arms/module_reqreviewlog/controller/UserReqReviewLogController.java (.../UserReqReviewLogController.java) (revision 2a7685dcd381b2969d7137d35f5ba056544bc71b) @@ -74,7 +74,7 @@ ReqReviewLogDTO reviewLogDTO = new ReqReviewLogDTO(); reviewLogDTO.setWhere("c_review_pdservice_link", c_review_pdservice_link); reviewLogDTO.setWhere("c_review_req_link", c_review_req_link); - reviewLogDTO.setOrder(Order.desc("c_review_creat_date")); + reviewLogDTO.setOrder(Order.desc("c_id")); List list = reqReviewLog.getChildNodeWithoutPaging(reviewLogDTO); list.stream().forEach(data -> {