Index: pom.xml
===================================================================
diff -u -rd2341fe8aef3ef180a3653720ad3ef502192d567 -r56c3311d9585c75c1f6de902e7a6dd893bf698ee
--- pom.xml (.../pom.xml) (revision d2341fe8aef3ef180a3653720ad3ef502192d567)
+++ pom.xml (.../pom.xml) (revision 56c3311d9585c75c1f6de902e7a6dd893bf698ee)
@@ -10,7 +10,7 @@
4.0.0
313devgrp
java-service-tree-framework-backend-server
- 22.10.18
+ 22.10.29
pom
java-service-tree-framework
Index: web-module/pom.xml
===================================================================
diff -u -rcee9c6ee6e1a299803aea56b37e582ab276246b0 -r56c3311d9585c75c1f6de902e7a6dd893bf698ee
--- web-module/pom.xml (.../pom.xml) (revision cee9c6ee6e1a299803aea56b37e582ab276246b0)
+++ web-module/pom.xml (.../pom.xml) (revision 56c3311d9585c75c1f6de902e7a6dd893bf698ee)
@@ -7,7 +7,7 @@
313devgrp
java-service-tree-framework-backend-server
- 22.10.18
+ 22.10.29
../pom.xml
Index: web-module/src/main/java/egovframework/api/arms/module_pdservice/controller/UserPdServiceController.java
===================================================================
diff -u -r537a1c9a1f52e97beeea33b4d84ee9415a73a7ec -r56c3311d9585c75c1f6de902e7a6dd893bf698ee
--- web-module/src/main/java/egovframework/api/arms/module_pdservice/controller/UserPdServiceController.java (.../UserPdServiceController.java) (revision 537a1c9a1f52e97beeea33b4d84ee9415a73a7ec)
+++ web-module/src/main/java/egovframework/api/arms/module_pdservice/controller/UserPdServiceController.java (.../UserPdServiceController.java) (revision 56c3311d9585c75c1f6de902e7a6dd893bf698ee)
@@ -11,6 +11,7 @@
*/
package egovframework.api.arms.module_pdservice.controller;
+import egovframework.api.arms.module_pdversion.model.PdVersionDTO;
import egovframework.com.ext.jstree.springHibernate.core.validation.group.UpdateNode;
import egovframework.com.utl.fcc.service.EgovFileUploadUtil;
import egovframework.com.utl.fcc.service.EgovFormBasedFileVo;
@@ -29,6 +30,7 @@
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.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import javax.annotation.PostConstruct;
import javax.servlet.http.HttpServletRequest;
@@ -102,20 +104,20 @@
* @return
* @throws Exception
*/
- @RequestMapping(value="/uploadFileToNode.do", method=RequestMethod.POST)
- public String uploadFileToNode(HttpServletRequest request, Model model) throws Exception {
+ @RequestMapping(value="/uploadFileToNode.do")
+ public String uploadFileToNode(final MultipartHttpServletRequest multiRequest, Model model) throws Exception {
// Spring multipartResolver 미사용 시 (commons-fileupload 활용)
//List list = EgovFormBasedFileUtil.uploadFiles(request, uploadDir, maxFileSize);
// Spring multipartResolver 사용시
String uploadDir = "";
long maxFileSize = new Long(313);
- List list = EgovFileUploadUtil.uploadFiles(request, uploadDir, maxFileSize);
+ List list = EgovFileUploadUtil.uploadFiles(multiRequest, uploadDir, maxFileSize);
if (list.size() > 0) {
EgovFormBasedFileVo vo = list.get(0); // 첫번째 이미지
- String url = request.getContextPath()
+ String url = multiRequest.getContextPath()
+ "/utl/web/imageSrc.do?"
+ "path=" + vo.getServerSubPath()
+ "&physical=" + vo.getPhysicalName()
@@ -141,4 +143,17 @@
return modelAndView;
}
+ @RequestMapping(value="/updatePdServiceNode.do", method=RequestMethod.POST)
+ public ModelAndView updatePdServiceNode(PdServiceDTO pdServiceDTO,
+ BindingResult bindingResult) throws Exception {
+ if (bindingResult.hasErrors())
+ throw new RuntimeException();
+
+
+ ModelAndView modelAndView = new ModelAndView("jsonView");
+ modelAndView.addObject("result", pdService.updatePdServiceNode(pdServiceDTO));
+
+ return modelAndView;
+ }
+
}
\ No newline at end of file
Index: web-module/src/main/java/egovframework/api/arms/module_pdservice/service/PdService.java
===================================================================
diff -u -r564aed4de8790496d949ca204ac04e09ebce1785 -r56c3311d9585c75c1f6de902e7a6dd893bf698ee
--- web-module/src/main/java/egovframework/api/arms/module_pdservice/service/PdService.java (.../PdService.java) (revision 564aed4de8790496d949ca204ac04e09ebce1785)
+++ web-module/src/main/java/egovframework/api/arms/module_pdservice/service/PdService.java (.../PdService.java) (revision 56c3311d9585c75c1f6de902e7a6dd893bf698ee)
@@ -12,11 +12,12 @@
package egovframework.api.arms.module_pdservice.service;
import egovframework.api.arms.module_pdservice.model.PdServiceDTO;
+import egovframework.api.arms.module_pdversion.model.PdVersionDTO;
import egovframework.com.ext.jstree.springHibernate.core.service.JsTreeHibernateService;
import egovframework.com.ext.jstree.springHibernate.core.vo.JsTreeHibernateSearchDTO;
public interface PdService extends JsTreeHibernateService {
public int updateContentsNode(T jsTreeHibernateDTO) throws Exception;
-
+ public int updatePdServiceNode(T jsTreeHibernateDTO) throws Exception;
}
\ No newline at end of file
Index: web-module/src/main/java/egovframework/api/arms/module_pdservice/service/PdServiceImpl.java
===================================================================
diff -u -r537a1c9a1f52e97beeea33b4d84ee9415a73a7ec -r56c3311d9585c75c1f6de902e7a6dd893bf698ee
--- web-module/src/main/java/egovframework/api/arms/module_pdservice/service/PdServiceImpl.java (.../PdServiceImpl.java) (revision 537a1c9a1f52e97beeea33b4d84ee9415a73a7ec)
+++ web-module/src/main/java/egovframework/api/arms/module_pdservice/service/PdServiceImpl.java (.../PdServiceImpl.java) (revision 56c3311d9585c75c1f6de902e7a6dd893bf698ee)
@@ -12,6 +12,7 @@
package egovframework.api.arms.module_pdservice.service;
import egovframework.api.arms.module_pdservice.model.PdServiceDTO;
+import egovframework.api.arms.module_pdversion.model.PdVersionDTO;
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;
@@ -21,6 +22,7 @@
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ObjectUtils;
+import org.unitils.util.ReflectionUtils;
import javax.annotation.Resource;
import java.lang.reflect.Field;
@@ -60,4 +62,28 @@
}
+ @Override
+ @Transactional(rollbackFor = { Exception.class }, propagation = Propagation.REQUIRED)
+ public int updatePdServiceNode(T jsTreeHibernateDTO) throws Exception {
+ jsTreeHibernateDao.setClazz(jsTreeHibernateDTO.getClass());
+ T alterTargetNode = (T) jsTreeHibernateDao.getUnique(jsTreeHibernateDTO.getC_id());
+
+ for (Field field : ReflectionUtils.getAllFields(jsTreeHibernateDTO.getClass())) {
+
+ field.setAccessible(true);
+
+ Object value = field.get(jsTreeHibernateDTO);
+
+ if (!ObjectUtils.isEmpty(value)) {
+ field.setAccessible(true);
+ field.set(alterTargetNode, value);
+ }
+
+ }
+ jsTreeHibernateDao.update(alterTargetNode);
+
+ return 1;
+ }
+
+
}
\ No newline at end of file
Index: web-module/src/main/webapp/WEB-INF/web.xml
===================================================================
diff -u -r3911d54c16bf3825fb98c081079f3ef456864b45 -r56c3311d9585c75c1f6de902e7a6dd893bf698ee
--- web-module/src/main/webapp/WEB-INF/web.xml (.../web.xml) (revision 3911d54c16bf3825fb98c081079f3ef456864b45)
+++ web-module/src/main/webapp/WEB-INF/web.xml (.../web.xml) (revision 56c3311d9585c75c1f6de902e7a6dd893bf698ee)
@@ -135,10 +135,7 @@
Forbidden
/*
- PUT
- DELETE
TRACE
- OPTIONS