이지우 - 이노릭스 작업 중

This commit is contained in:
JIWOO 2024-10-29 10:16:32 +09:00
parent 93c442802e
commit 784d13d3fd
6 changed files with 61 additions and 19 deletions

View File

@ -514,6 +514,13 @@
<artifactId>commons-dbutils</artifactId> <artifactId>commons-dbutils</artifactId>
<version>1.6</version> <version>1.6</version>
</dependency> </dependency>
<dependency>
<groupId>innorix</groupId>
<artifactId>InnorixJAVA</artifactId>
<version>9.2</version>
</dependency>
</dependencies> </dependencies>
<build> <build>

View File

@ -149,10 +149,10 @@ root.path=C:/project/git/case_seed/WebContent/WEB-INF/views/site
root.contextpath= root.contextpath=
#\ucca8\ubd80\ud30c\uc77c \uc784\uc2dc\ud3f4\ub354 #\ucca8\ubd80\ud30c\uc77c \uc784\uc2dc\ud3f4\ub354
file.temp.path=C:/project/git/case_seed/WebContent/WEB-INF/views/site/case/upload/tempFiles file.temp.path=D:/project/git/case_seed/WebContent/WEB-INF/views/site/case/upload/tempFiles
#file.temp.path=C:/Project_Files/case_seed-v3.0/WebContent/WEB-INF/views/site/case/upload/tempFiles #file.temp.path=C:/Project_Files/case_seed-v3.0/WebContent/WEB-INF/views/site/case/upload/tempFiles
#\ucca8\ubd80\ud30c\uc77c \uc5c5\ub85c\ub4dc\ud3f4\ub354 #\ucca8\ubd80\ud30c\uc77c \uc5c5\ub85c\ub4dc\ud3f4\ub354
file.real.path=C:/project/git/case_seed/WebContent/WEB-INF/views/site/case/upload/uploadFiles file.real.path=D:/project/git/case_seed/WebContent/WEB-INF/views/site/case/upload/uploadFiles
#file.real.path=C:/Project_Files/case_seed-v3.0/WebContent/WEB-INF/views/site/case/upload/uploadFiles #file.real.path=C:/Project_Files/case_seed-v3.0/WebContent/WEB-INF/views/site/case/upload/uploadFiles
#NICE #NICE

View File

@ -22,6 +22,7 @@ import javax.servlet.http.HttpSession;
import org.apache.ibatis.logging.Log; import org.apache.ibatis.logging.Log;
import org.apache.ibatis.logging.LogFactory; import org.apache.ibatis.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
@ -49,6 +50,16 @@ public class SeedFileController {
protected Log log = LogFactory.getLog(this.getClass()); protected Log log = LogFactory.getLog(this.getClass());
//임시 파일 저장 경로
@Value("#{globalSettings['file.temp.path']}")
private String globalTempPath;
//파일 저장 경로
@Value("#{globalSettings['file.real.path']}")
private String globalRealPath;
//루트 경로
@Value("#{globalSettings['root.path']}")
private String globalRootPath;
@RequestMapping(value="/seed/extra/temp/file.do", method=RequestMethod.POST) @RequestMapping(value="/seed/extra/temp/file.do", method=RequestMethod.POST)
public @ResponseBody HashMap<String, Object> tempFileUpload(HttpSession session, HttpServletRequest req, MultipartHttpServletRequest mreq){ public @ResponseBody HashMap<String, Object> tempFileUpload(HttpSession session, HttpServletRequest req, MultipartHttpServletRequest mreq){
String siteIdx = SeedUtils.setReplaceNull(session.getAttribute("siteIdx")); String siteIdx = SeedUtils.setReplaceNull(session.getAttribute("siteIdx"));
@ -70,12 +81,20 @@ public class SeedFileController {
boolean success = false; boolean success = false;
SeedProperties seedProperties = new SeedProperties(); /*SeedProperties seedProperties = new SeedProperties();
String tempPath = ""; String tempPath = "";
if(funcType.equals("trublchargermng")){ if(funcType.equals("trublchargermng")){
tempPath = seedProperties.getConfigValue("root.path"); tempPath = seedProperties.getConfigValue("root.path");
}else{ }else{
tempPath = seedProperties.getConfigValue("file.temp.path"); tempPath = seedProperties.getConfigValue("file.temp.path");
}*/
SeedProperties seedProperties = new SeedProperties();
String tempPath = "";
if(funcType.equals("trublchargermng")){
tempPath = globalRootPath;
}else{
tempPath = globalTempPath;
} }
//SeedUtils.setSeedMkDirs(rootPath + "/" + siteIdx + "/upload/tempFiles/"+funcType); //SeedUtils.setSeedMkDirs(rootPath + "/" + siteIdx + "/upload/tempFiles/"+funcType);
@ -197,7 +216,8 @@ public class SeedFileController {
public ModelAndView fileDown(ModelMap map, HttpSession session ,HttpServletResponse response,HttpServletRequest request,@RequestParam Map<String,Object> paramMap){ public ModelAndView fileDown(ModelMap map, HttpSession session ,HttpServletResponse response,HttpServletRequest request,@RequestParam Map<String,Object> paramMap){
SeedProperties seedProperties = new SeedProperties(); SeedProperties seedProperties = new SeedProperties();
String rootPath = seedProperties.getConfigValue("file.real.path"); /*String rootPath = seedProperties.getConfigValue("file.real.path");*/
String rootPath = globalRootPath;
String dataIdx = SeedUtils.setReplaceNull(paramMap.get("dataIdx")); String dataIdx = SeedUtils.setReplaceNull(paramMap.get("dataIdx"));
String pathKey1 = SeedUtils.setReplaceNull(paramMap.get("pathKey1")); String pathKey1 = SeedUtils.setReplaceNull(paramMap.get("pathKey1"));
@ -205,7 +225,8 @@ public class SeedFileController {
String funcType = SeedUtils.setReplaceNull(paramMap.get("funcType")); String funcType = SeedUtils.setReplaceNull(paramMap.get("funcType"));
if(funcType.equals("trublchargermng")){ if(funcType.equals("trublchargermng")){
rootPath = seedProperties.getConfigValue("root.path"); /*rootPath = seedProperties.getConfigValue("root.path");*/
rootPath = globalRootPath;
} }
String path = SeedUtils.setReplaceNull(paramMap.get("filePath")); String path = SeedUtils.setReplaceNull(paramMap.get("filePath"));

View File

@ -10,6 +10,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSession;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import egovframework.rte.fdl.property.EgovPropertyService; import egovframework.rte.fdl.property.EgovPropertyService;
@ -35,6 +36,16 @@ public class SeedFileService {
@Resource(name = "propertiesService") @Resource(name = "propertiesService")
protected EgovPropertyService propertyService; protected EgovPropertyService propertyService;
//임시 파일 저장 경로
@Value("#{globalSettings['file.temp.path']}")
private String globalTempPath;
//파일 저장 경로
@Value("#{globalSettings['file.real.path']}")
private String globalRealPath;
//루트 경로
@Value("#{globalSettings['root.path']}")
private String globalRootPath;
public void fileInsert(Map<String, Object> paramMap, HttpServletRequest request, HttpSession session){ public void fileInsert(Map<String, Object> paramMap, HttpServletRequest request, HttpSession session){
String siteIdx = SeedUtils.setReplaceNull(session.getAttribute("siteIdx")); String siteIdx = SeedUtils.setReplaceNull(session.getAttribute("siteIdx"));
@ -45,18 +56,22 @@ public class SeedFileService {
SeedProperties seedProperties = new SeedProperties(); SeedProperties seedProperties = new SeedProperties();
String rootPath = null; /*AS-IS 분쟁조정 첨부파일 경로 설정*/
//AS-iS 분쟁조정 설정 /*String rootPath = null;
/*String tempPath = seedProperties.getConfigValue("file.temp.path");*/ String tempPath = seedProperties.getConfigValue("file.temp.path");
String tempPath = propertyService.getString("Globals.fileStorePath");
if(fileFuncType.equals("trublchargermng")){ if(fileFuncType.equals("trublchargermng")){
/*rootPath = seedProperties.getConfigValue("root.path");*/ rootPath = seedProperties.getConfigValue("root.path");
rootPath = propertyService.getString("root.path");
}else{ }else{
/*rootPath = seedProperties.getConfigValue("file.real.path");*/ rootPath = seedProperties.getConfigValue("file.real.path");
rootPath = propertyService.getString("Globals.fileStorePath"); }*/
}
String rootPath = null;
String tempPath = globalTempPath;
if(fileFuncType.equals("trublchargermng")){
rootPath = globalRootPath;
}else{
rootPath = globalRealPath;
}

View File

@ -383,16 +383,14 @@ http.url=
#\ud574\ub2f9 \uc0ac\uc774\ud2b8 URL #\ud574\ub2f9 \uc0ac\uc774\ud2b8 URL
root.url=http://localhost root.url=http://localhost
#\ud574\ub2f9 \uc11c\ubc84 SEED\uc11c\ubc84 \uacbd\ub85c #\ud574\ub2f9 \uc11c\ubc84 SEED\uc11c\ubc84 \uacbd\ub85c
root.path=D:/project/git/case_seed/WebContent/WEB-INF/views/site root.path=/usr/local/homepage/WEB-INF/views/site
#\ud574\ub2f9 \uc0ac\uc774\ud2b8 URL path #\ud574\ub2f9 \uc0ac\uc774\ud2b8 URL path
root.contextpath= root.contextpath=
#\ucca8\ubd80\ud30c\uc77c \uc784\uc2dc\ud3f4\ub354 #\ucca8\ubd80\ud30c\uc77c \uc784\uc2dc\ud3f4\ub354
file.temp.path=D:/project/git/case_seed/WebContent/WEB-INF/views/site/case/upload/tempFiles file.temp.path=/usr/local/homepage/WEB-INF/views/site/case/upload/tempFiles
#file.temp.path=C:/Project_Files/case_seed-v3.0/WebContent/WEB-INF/views/site/case/upload/tempFiles
#\ucca8\ubd80\ud30c\uc77c \uc5c5\ub85c\ub4dc\ud3f4\ub354 #\ucca8\ubd80\ud30c\uc77c \uc5c5\ub85c\ub4dc\ud3f4\ub354
file.real.path=D:/project/git/case_seed/WebContent/WEB-INF/views/site/case/upload/uploadFiles file.real.path=/usr/local/homepage/WEB-INF/views/site/case/upload/uploadFiles
#file.real.path=C:/Project_Files/case_seed-v3.0/WebContent/WEB-INF/views/site/case/upload/uploadFiles
#NICE #NICE
nice.uid=kofair nice.uid=kofair

View File

@ -13,7 +13,8 @@
el: '#fileControl', // 컨트롤 출력 HTML 객체 ID el: '#fileControl', // 컨트롤 출력 HTML 객체 ID
transferMode: 'both', // 업로드, 다운로드 혼합사용 transferMode: 'both', // 업로드, 다운로드 혼합사용
installUrl: '/innorix/install/install.html', // Agent 설치 페이지 installUrl: '/innorix/install/install.html', // Agent 설치 페이지
uploadUrl: '/innorix/exam/upload_test_220916.jsp' // 업로드 URL uploadUrl: '/innorix/exam/upload.jsp' // 업로드 URL
/* uploadUrl: '/innorix/exam/upload_test_220916.jsp' // 업로드 URL */
}); });
// 업로드 완료 이벤트 // 업로드 완료 이벤트