refactor:과거사건등록 > 문서등록 기능 완료
This commit is contained in:
parent
c18cc93d48
commit
00330f6448
92
src/main/java/kcc/com/cmm/service/AdrInnorixFileVO.java
Normal file
92
src/main/java/kcc/com/cmm/service/AdrInnorixFileVO.java
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
package kcc.com.cmm.service;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import kcc.com.cmm.ComDefaultVO;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author : 이호영
|
||||||
|
* @fileName : InnorixVO.java
|
||||||
|
* @date : 2022.11.01
|
||||||
|
* @description : 대용량 파일 등록 솔루션 VO
|
||||||
|
* ===========================================================
|
||||||
|
* DATE AUTHOR NOTE
|
||||||
|
* ----------------------------------------------------------- *
|
||||||
|
* 2022.11.01 이호영 최초 생성
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class AdrInnorixFileVO extends ComDefaultVO implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 4400281789694196418L;
|
||||||
|
|
||||||
|
|
||||||
|
public String adrSeq = "";
|
||||||
|
|
||||||
|
public String adrDocTy = "";
|
||||||
|
|
||||||
|
private String frstRegistPnttm; //등록일시
|
||||||
|
private String frstRegisterId; //등록자
|
||||||
|
private String lastUpdtPnttm; //수정일시
|
||||||
|
private String lastUpdusrId; //수정자
|
||||||
|
|
||||||
|
public List<InnorixFileVO> innorixFileListVO = new ArrayList<InnorixFileVO>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public String getAdrSeq() {
|
||||||
|
return adrSeq;
|
||||||
|
}
|
||||||
|
public void setAdrSeq(String adrSeq) {
|
||||||
|
this.adrSeq = adrSeq;
|
||||||
|
}
|
||||||
|
public String getAdrDocTy() {
|
||||||
|
return adrDocTy;
|
||||||
|
}
|
||||||
|
public void setAdrDocTy(String adrDocTy) {
|
||||||
|
this.adrDocTy = adrDocTy;
|
||||||
|
}
|
||||||
|
public String getFrstRegistPnttm() {
|
||||||
|
return frstRegistPnttm;
|
||||||
|
}
|
||||||
|
public void setFrstRegistPnttm(String frstRegistPnttm) {
|
||||||
|
this.frstRegistPnttm = frstRegistPnttm;
|
||||||
|
}
|
||||||
|
public String getFrstRegisterId() {
|
||||||
|
return frstRegisterId;
|
||||||
|
}
|
||||||
|
public void setFrstRegisterId(String frstRegisterId) {
|
||||||
|
this.frstRegisterId = frstRegisterId;
|
||||||
|
}
|
||||||
|
public String getLastUpdtPnttm() {
|
||||||
|
return lastUpdtPnttm;
|
||||||
|
}
|
||||||
|
public void setLastUpdtPnttm(String lastUpdtPnttm) {
|
||||||
|
this.lastUpdtPnttm = lastUpdtPnttm;
|
||||||
|
}
|
||||||
|
public String getLastUpdusrId() {
|
||||||
|
return lastUpdusrId;
|
||||||
|
}
|
||||||
|
public void setLastUpdusrId(String lastUpdusrId) {
|
||||||
|
this.lastUpdusrId = lastUpdusrId;
|
||||||
|
}
|
||||||
|
public List<InnorixFileVO> getInnorixFileListVO() {
|
||||||
|
return innorixFileListVO;
|
||||||
|
}
|
||||||
|
public void setInnorixFileListVO(List<InnorixFileVO> innorixFileListVO) {
|
||||||
|
this.innorixFileListVO = innorixFileListVO;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
27
src/main/java/kcc/com/cmm/service/InnorixFileService.java
Normal file
27
src/main/java/kcc/com/cmm/service/InnorixFileService.java
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
package kcc.com.cmm.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import egovframework.rte.fdl.cmmn.exception.FdlException;
|
||||||
|
import kcc.kccadr.cmm.RestResponse;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Class Name : EgovFileMngService.java
|
||||||
|
* @Description : 파일정보의 관리를 위한 서비스 인터페이스
|
||||||
|
* @Modification Information
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- ------- -------------------
|
||||||
|
* 2009. 3. 25. 이삼섭 최초생성
|
||||||
|
*
|
||||||
|
* @author 공통 서비스 개발팀 이삼섭
|
||||||
|
* @since 2009. 3. 25.
|
||||||
|
* @version
|
||||||
|
* @see
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface InnorixFileService {
|
||||||
|
|
||||||
|
RestResponse insertInnorixFileAjax(AdrInnorixFileVO adrInnorixFileVO) throws FdlException, Exception;
|
||||||
|
}
|
||||||
180
src/main/java/kcc/com/cmm/service/InnorixFileVO.java
Normal file
180
src/main/java/kcc/com/cmm/service/InnorixFileVO.java
Normal file
@ -0,0 +1,180 @@
|
|||||||
|
package kcc.com.cmm.service;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import kcc.com.cmm.ComDefaultVO;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author : 이호영
|
||||||
|
* @fileName : InnorixVO.java
|
||||||
|
* @date : 2022.11.01
|
||||||
|
* @description : 대용량 파일 등록 솔루션 VO
|
||||||
|
* ===========================================================
|
||||||
|
* DATE AUTHOR NOTE
|
||||||
|
* ----------------------------------------------------------- *
|
||||||
|
* 2022.11.01 이호영 최초 생성
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class InnorixFileVO extends ComDefaultVO implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 5641887401063483713L;
|
||||||
|
|
||||||
|
public String rowID = "";
|
||||||
|
|
||||||
|
public String controlId = "";
|
||||||
|
|
||||||
|
public String uploadUrl = "";
|
||||||
|
|
||||||
|
public String clientFilePath = "";
|
||||||
|
|
||||||
|
public String clientFileName = "";
|
||||||
|
|
||||||
|
public String rootName = "";
|
||||||
|
|
||||||
|
public String fileState = "";
|
||||||
|
|
||||||
|
public Integer fileSize = 0;
|
||||||
|
|
||||||
|
public String serverFilePath = "";
|
||||||
|
|
||||||
|
public String serverFileName = "";
|
||||||
|
|
||||||
|
public Boolean isFolder = null;
|
||||||
|
|
||||||
|
public Boolean firstTransferCompleted = null;
|
||||||
|
|
||||||
|
public Integer totalTransferTime = 0;
|
||||||
|
|
||||||
|
public Integer transferTime = 0;
|
||||||
|
|
||||||
|
private String frstRegistPnttm;
|
||||||
|
|
||||||
|
private String frstRegisterId;
|
||||||
|
|
||||||
|
private String lastUpdtPnttm;
|
||||||
|
|
||||||
|
private String lastUpdusrId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public String getRowID() {
|
||||||
|
return rowID;
|
||||||
|
}
|
||||||
|
public void setRowID(String rowID) {
|
||||||
|
this.rowID = rowID;
|
||||||
|
}
|
||||||
|
public String getControlId() {
|
||||||
|
return controlId;
|
||||||
|
}
|
||||||
|
public void setControlId(String controlId) {
|
||||||
|
this.controlId = controlId;
|
||||||
|
}
|
||||||
|
public String getUploadUrl() {
|
||||||
|
return uploadUrl;
|
||||||
|
}
|
||||||
|
public void setUploadUrl(String uploadUrl) {
|
||||||
|
this.uploadUrl = uploadUrl;
|
||||||
|
}
|
||||||
|
public String getClientFilePath() {
|
||||||
|
return clientFilePath;
|
||||||
|
}
|
||||||
|
public void setClientFilePath(String clientFilePath) {
|
||||||
|
this.clientFilePath = clientFilePath;
|
||||||
|
}
|
||||||
|
public String getClientFileName() {
|
||||||
|
return clientFileName;
|
||||||
|
}
|
||||||
|
public void setClientFileName(String clientFileName) {
|
||||||
|
this.clientFileName = clientFileName;
|
||||||
|
}
|
||||||
|
public String getRootName() {
|
||||||
|
return rootName;
|
||||||
|
}
|
||||||
|
public void setRootName(String rootName) {
|
||||||
|
this.rootName = rootName;
|
||||||
|
}
|
||||||
|
public String getFileState() {
|
||||||
|
return fileState;
|
||||||
|
}
|
||||||
|
public void setFileState(String fileState) {
|
||||||
|
this.fileState = fileState;
|
||||||
|
}
|
||||||
|
public Integer getFileSize() {
|
||||||
|
return fileSize;
|
||||||
|
}
|
||||||
|
public void setFileSize(Integer fileSize) {
|
||||||
|
this.fileSize = fileSize;
|
||||||
|
}
|
||||||
|
public String getServerFilePath() {
|
||||||
|
return serverFilePath;
|
||||||
|
}
|
||||||
|
public void setServerFilePath(String serverFilePath) {
|
||||||
|
this.serverFilePath = serverFilePath;
|
||||||
|
}
|
||||||
|
public String getServerFileName() {
|
||||||
|
return serverFileName;
|
||||||
|
}
|
||||||
|
public void setServerFileName(String serverFileName) {
|
||||||
|
this.serverFileName = serverFileName;
|
||||||
|
}
|
||||||
|
public Boolean getIsFolder() {
|
||||||
|
return isFolder;
|
||||||
|
}
|
||||||
|
public void setIsFolder(Boolean isFolder) {
|
||||||
|
this.isFolder = isFolder;
|
||||||
|
}
|
||||||
|
public Boolean getFirstTransferCompleted() {
|
||||||
|
return firstTransferCompleted;
|
||||||
|
}
|
||||||
|
public void setFirstTransferCompleted(Boolean firstTransferCompleted) {
|
||||||
|
this.firstTransferCompleted = firstTransferCompleted;
|
||||||
|
}
|
||||||
|
public Integer getTotalTransferTime() {
|
||||||
|
return totalTransferTime;
|
||||||
|
}
|
||||||
|
public void setTotalTransferTime(Integer totalTransferTime) {
|
||||||
|
this.totalTransferTime = totalTransferTime;
|
||||||
|
}
|
||||||
|
public Integer getTransferTime() {
|
||||||
|
return transferTime;
|
||||||
|
}
|
||||||
|
public void setTransferTime(Integer transferTime) {
|
||||||
|
this.transferTime = transferTime;
|
||||||
|
}
|
||||||
|
public String getFrstRegistPnttm() {
|
||||||
|
return frstRegistPnttm;
|
||||||
|
}
|
||||||
|
public void setFrstRegistPnttm(String frstRegistPnttm) {
|
||||||
|
this.frstRegistPnttm = frstRegistPnttm;
|
||||||
|
}
|
||||||
|
public String getFrstRegisterId() {
|
||||||
|
return frstRegisterId;
|
||||||
|
}
|
||||||
|
public void setFrstRegisterId(String frstRegisterId) {
|
||||||
|
this.frstRegisterId = frstRegisterId;
|
||||||
|
}
|
||||||
|
public String getLastUpdtPnttm() {
|
||||||
|
return lastUpdtPnttm;
|
||||||
|
}
|
||||||
|
public void setLastUpdtPnttm(String lastUpdtPnttm) {
|
||||||
|
this.lastUpdtPnttm = lastUpdtPnttm;
|
||||||
|
}
|
||||||
|
public String getLastUpdusrId() {
|
||||||
|
return lastUpdusrId;
|
||||||
|
}
|
||||||
|
public void setLastUpdusrId(String lastUpdusrId) {
|
||||||
|
this.lastUpdusrId = lastUpdusrId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
31
src/main/java/kcc/com/cmm/service/impl/InnorixFileDAO.java
Normal file
31
src/main/java/kcc/com/cmm/service/impl/InnorixFileDAO.java
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
package kcc.com.cmm.service.impl;
|
||||||
|
|
||||||
|
import egovframework.rte.psl.dataaccess.EgovAbstractDAO;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.ibatis.sqlmap.client.SqlMapClient;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EgovComAbstractDAO.java 클래스
|
||||||
|
*
|
||||||
|
* @author 서준식
|
||||||
|
* @since 2011. 9. 23.
|
||||||
|
* @version 1.0
|
||||||
|
* @see
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- ------------- ----------------------
|
||||||
|
* 2011. 9. 23. 서준식 최초 생성
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@Repository("InnorixFileDAO")
|
||||||
|
public class InnorixFileDAO extends EgovAbstractDAO {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,136 @@
|
|||||||
|
package kcc.com.cmm.service.impl;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
import org.apache.commons.io.FileUtils;
|
||||||
|
import org.apache.commons.io.FilenameUtils;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl;
|
||||||
|
import egovframework.rte.fdl.cmmn.exception.FdlException;
|
||||||
|
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
|
||||||
|
import kcc.com.cmm.service.AdrInnorixFileVO;
|
||||||
|
import kcc.com.cmm.service.FileVO;
|
||||||
|
import kcc.com.cmm.service.InnorixFileService;
|
||||||
|
import kcc.com.cmm.service.InnorixFileVO;
|
||||||
|
import kcc.com.cmm.web.InnorixFileController;
|
||||||
|
import kcc.kccadr.accdnt.ans.service.AnsVO;
|
||||||
|
import kcc.kccadr.accdnt.ans.service.impl.AnsDAO;
|
||||||
|
import kcc.kccadr.cmm.RestResponse;
|
||||||
|
import kcc.let.utl.fcc.service.EgovStringUtil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Class Name : EgovCmmUseServiceImpl.java
|
||||||
|
* @Description : 공통코드등 전체 업무에서 공용해서 사용해야 하는 서비스를 정의하기위한 서비스 구현 클래스
|
||||||
|
* @Modification Information
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- ------- -------------------
|
||||||
|
* 2009. 3. 11. 이삼섭
|
||||||
|
*
|
||||||
|
* @author 공통 서비스 개발팀 이삼섭
|
||||||
|
* @since 2009. 3. 11.
|
||||||
|
* @version
|
||||||
|
* @see
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Service("InnorixFileService")
|
||||||
|
public class InnorixFileServiceImpl extends EgovAbstractServiceImpl implements InnorixFileService {
|
||||||
|
|
||||||
|
private static final Logger logger = LoggerFactory.getLogger(InnorixFileServiceImpl.class);
|
||||||
|
|
||||||
|
@Resource(name = "InnorixFileDAO")
|
||||||
|
private InnorixFileDAO innorixDAO;
|
||||||
|
|
||||||
|
@Resource(name = "FileManageDAO")
|
||||||
|
private FileManageDAO fileManageDAO;
|
||||||
|
|
||||||
|
@Value("#{globalSettings['Globals.Innorix.FilePath']}")
|
||||||
|
private String innoFilePath;
|
||||||
|
|
||||||
|
@Resource(name = "ansDAO")
|
||||||
|
private AnsDAO ansDAO;
|
||||||
|
|
||||||
|
@Resource(name = "egovFileIdGnrService")
|
||||||
|
private EgovIdGnrService idgenService;
|
||||||
|
|
||||||
|
//답변서 idgen 서비스
|
||||||
|
@Resource(name = "egovRldMgrManageGnrService")
|
||||||
|
private EgovIdGnrService egovRldMgrManageGnrService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RestResponse insertInnorixFileAjax(AdrInnorixFileVO adrInnorixFileListVO) throws FdlException, Exception {
|
||||||
|
|
||||||
|
List<FileVO> result = new ArrayList<FileVO>();
|
||||||
|
|
||||||
|
String fileNextId = idgenService.getNextStringId();
|
||||||
|
|
||||||
|
int fileSn = 0;
|
||||||
|
|
||||||
|
logger.info(" file data 반복문 시작 :: [{}]", adrInnorixFileListVO.getInnorixFileListVO().size());
|
||||||
|
for(InnorixFileVO innorixFileVO : adrInnorixFileListVO.getInnorixFileListVO())
|
||||||
|
{
|
||||||
|
FileVO fileVO = new FileVO();
|
||||||
|
// new 파일명
|
||||||
|
String newName = "PST_" + EgovStringUtil.getTimeStamp();
|
||||||
|
|
||||||
|
logger.info("[{}]번쨰 newName :: [{}]", fileSn, newName);
|
||||||
|
|
||||||
|
String oriFullPath = innoFilePath + innorixFileVO.getServerFileName();
|
||||||
|
String newFullPath = innoFilePath + newName;
|
||||||
|
|
||||||
|
logger.info("oriFullPath :: [{}]", oriFullPath);
|
||||||
|
logger.info("newFullPath :: [{}]", newFullPath);
|
||||||
|
|
||||||
|
try {
|
||||||
|
File orifile = FileUtils.getFile(oriFullPath);
|
||||||
|
File newfile = FileUtils.getFile(newFullPath);
|
||||||
|
FileUtils.moveFile(orifile, newfile);
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
fileVO.setAtchFileId(fileNextId);
|
||||||
|
fileVO.setFileSn(Integer.toString(fileSn));
|
||||||
|
fileVO.setFileStreCours(innoFilePath);
|
||||||
|
fileVO.setStreFileNm(newName);
|
||||||
|
fileVO.setOrignlFileNm(innorixFileVO.getServerFileName());
|
||||||
|
fileVO.setFileExtsn(FilenameUtils.getExtension(oriFullPath));
|
||||||
|
fileVO.setFileSize(Integer.toString(innorixFileVO.getFileSize()));
|
||||||
|
|
||||||
|
result.add(fileVO);
|
||||||
|
|
||||||
|
fileSn++;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
logger.info(" // file data 반복문 끝 ");
|
||||||
|
// 파일 업로드
|
||||||
|
fileManageDAO.insertFileInfs(result);
|
||||||
|
|
||||||
|
|
||||||
|
// RpplDoc
|
||||||
|
AnsVO ansVO = new AnsVO();
|
||||||
|
ansVO.setAdrSeq(adrInnorixFileListVO.getAdrSeq());
|
||||||
|
ansVO.setAdrSn("1");
|
||||||
|
ansVO.setRpplDocSeq(egovRldMgrManageGnrService.getNextStringId());
|
||||||
|
ansVO.setAdrDocTy(adrInnorixFileListVO.getAdrDocTy());
|
||||||
|
ansVO.setAtchFileId(fileNextId);
|
||||||
|
ansVO.setFrstRegistPnttm(adrInnorixFileListVO.getFrstRegistPnttm());
|
||||||
|
ansVO.setLastUpdtPnttm(adrInnorixFileListVO.getFrstRegistPnttm());
|
||||||
|
ansDAO.ansSubmitAjax_setp1(ansVO);
|
||||||
|
|
||||||
|
return new RestResponse(HttpStatus.OK, "등록 되었습니다.", LocalDateTime.now());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
69
src/main/java/kcc/com/cmm/web/InnorixFileController.java
Normal file
69
src/main/java/kcc/com/cmm/web/InnorixFileController.java
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
package kcc.com.cmm.web;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
|
||||||
|
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
|
||||||
|
import kcc.com.cmm.LoginVO;
|
||||||
|
import kcc.com.cmm.service.AdrInnorixFileVO;
|
||||||
|
import kcc.com.cmm.service.InnorixFileService;
|
||||||
|
import kcc.com.utl.fcc.service.EgovStringUtil;
|
||||||
|
import kcc.kccadr.cmm.RestResponse;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author : 이호영
|
||||||
|
* @fileName : InnorixFileController.java
|
||||||
|
* @date : 2022.11.01
|
||||||
|
* @description : innorix 대용량 파일 업로드 솔루션
|
||||||
|
* ===========================================================
|
||||||
|
* DATE AUTHOR NOTE
|
||||||
|
* ----------------------------------------------------------- *
|
||||||
|
* 2022.11.01 이호영 최초 생성
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
public class InnorixFileController {
|
||||||
|
|
||||||
|
private static final Logger logger = LoggerFactory.getLogger(InnorixFileController.class);
|
||||||
|
|
||||||
|
/** EgovPropertyService */
|
||||||
|
@Resource(name = "InnorixFileService")
|
||||||
|
protected InnorixFileService innorixService;
|
||||||
|
|
||||||
|
@RequestMapping(value = {"/kccadr/common/insertInnorixFileAjax.do"}, method = RequestMethod.POST)
|
||||||
|
public ResponseEntity<RestResponse> insertInnorixFileAjax(@RequestBody AdrInnorixFileVO adrInnorixFileVO) throws Exception {
|
||||||
|
|
||||||
|
logger.info(" ++ adrSeq :: [{}], adrDocTy :: [{}], frstRegistPnttm :: [{}] ", adrInnorixFileVO.getAdrSeq(), adrInnorixFileVO.getAdrDocTy(), adrInnorixFileVO.getFrstRegistPnttm());
|
||||||
|
|
||||||
|
//로그인 권한정보 불러오기
|
||||||
|
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
|
||||||
|
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getUniqId());
|
||||||
|
|
||||||
|
if(userId.equals("")) {
|
||||||
|
return ResponseEntity.ok(new RestResponse(HttpStatus.UNAUTHORIZED, "로그인이 필요합니다.", LocalDateTime.now()));
|
||||||
|
}
|
||||||
|
|
||||||
|
adrInnorixFileVO.setFrstRegisterId(userId);
|
||||||
|
adrInnorixFileVO.setLastUpdusrId(userId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return ResponseEntity.ok(innorixService.insertInnorixFileAjax(adrInnorixFileVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -61,6 +61,7 @@ public class PgrCmmVO extends ComDefaultVO implements Serializable {
|
|||||||
private String frstRegisterId;
|
private String frstRegisterId;
|
||||||
private String frstRegistPnttm;
|
private String frstRegistPnttm;
|
||||||
private String lastUpdusrId;
|
private String lastUpdusrId;
|
||||||
|
private String lastUpdtPnttm;
|
||||||
private String memDeptNm; // 조정부명
|
private String memDeptNm; // 조정부명
|
||||||
private String memDeptSeq; // 조정부
|
private String memDeptSeq; // 조정부
|
||||||
private String memName; // 조정부장명
|
private String memName; // 조정부장명
|
||||||
@ -488,7 +489,15 @@ public class PgrCmmVO extends ComDefaultVO implements Serializable {
|
|||||||
this.lastUpdusrId = lastUpdusrId;
|
this.lastUpdusrId = lastUpdusrId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getMemDeptNm() {
|
public String getLastUpdtPnttm() {
|
||||||
|
return lastUpdtPnttm;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLastUpdtPnttm(String lastUpdtPnttm) {
|
||||||
|
this.lastUpdtPnttm = lastUpdtPnttm;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMemDeptNm() {
|
||||||
return memDeptNm;
|
return memDeptNm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,19 +1,13 @@
|
|||||||
package kcc.kccadr.adjcclt.opinion.web;
|
package kcc.kccadr.adjcclt.opinion.web;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.http.ResponseEntity;
|
|
||||||
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.ModelAttribute;
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
|
||||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||||
|
|
||||||
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
|
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
|
||||||
@ -22,9 +16,6 @@ import kcc.com.cmm.LoginVO;
|
|||||||
import kcc.kccadr.adjPgrMgr.exmp.app.service.ExmpAppManageService;
|
import kcc.kccadr.adjPgrMgr.exmp.app.service.ExmpAppManageService;
|
||||||
import kcc.kccadr.adjPgrMgr.exmp.cmm.ExmpManageVO;
|
import kcc.kccadr.adjPgrMgr.exmp.cmm.ExmpManageVO;
|
||||||
import kcc.kccadr.adjcclt.opinion.service.AdjstOpinionService;
|
import kcc.kccadr.adjcclt.opinion.service.AdjstOpinionService;
|
||||||
import kcc.kccadr.adjcclt.opinion.service.AdjstOpinionVO;
|
|
||||||
import kcc.kccadr.adjcclt.service.AdjstConciliatorVO;
|
|
||||||
import kcc.kccadr.cmm.RestResponse;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|||||||
@ -177,4 +177,7 @@ Globals.ozFontPath=/home/oz80/fontTestDir/
|
|||||||
#Globals.ozFontPath=/home/oz80/fontTestDir/
|
#Globals.ozFontPath=/home/oz80/fontTestDir/
|
||||||
|
|
||||||
#\uc624\uc988\ub9ac\ud3ec\ud2b8 \ud3f0\ud2b8 \uc885\ub958
|
#\uc624\uc988\ub9ac\ud3ec\ud2b8 \ud3f0\ud2b8 \uc885\ub958
|
||||||
Globals.ozFont=NanumSquareR.ttf
|
Globals.ozFont=NanumSquareR.ttf
|
||||||
|
|
||||||
|
#\ub300\uc6a9\ub7c9 innorix filePath
|
||||||
|
Globals.Innorix.FilePath=D:\\usr\\local\\tomcat\\file\\sht\\
|
||||||
|
|||||||
@ -175,4 +175,7 @@ Globals.prod.islocal=real
|
|||||||
Globals.ozFontPath=/home/oz80/fontTestDir/
|
Globals.ozFontPath=/home/oz80/fontTestDir/
|
||||||
|
|
||||||
#\uc624\uc988\ub9ac\ud3ec\ud2b8 \ud3f0\ud2b8 \uc885\ub958
|
#\uc624\uc988\ub9ac\ud3ec\ud2b8 \ud3f0\ud2b8 \uc885\ub958
|
||||||
Globals.ozFont=NanumSquareR.ttf
|
Globals.ozFont=NanumSquareR.ttf
|
||||||
|
|
||||||
|
#\ub300\uc6a9\ub7c9 innorix filePath
|
||||||
|
Globals.Innorix.FilePath=/usr/local/tomcat/file/sht/
|
||||||
@ -77,9 +77,19 @@
|
|||||||
, SYS_DATETIME
|
, SYS_DATETIME
|
||||||
, #usrCi#
|
, #usrCi#
|
||||||
, #atchFileId#
|
, #atchFileId#
|
||||||
|
<isNotEmpty property="frstRegistPnttm" >
|
||||||
|
,TO_DATETIME(TO_CHAR(#frstRegistPnttm#,'YYYY-MM-DD'))
|
||||||
|
</isNotEmpty>
|
||||||
|
<isEmpty property="frstRegistPnttm" >
|
||||||
, SYS_DATETIME
|
, SYS_DATETIME
|
||||||
|
</isEmpty>
|
||||||
, #frstRegisterId#
|
, #frstRegisterId#
|
||||||
|
<isNotEmpty property="lastUpdtPnttm" >
|
||||||
|
,TO_DATETIME(TO_CHAR(#lastUpdtPnttm#,'YYYY-MM-DD'))
|
||||||
|
</isNotEmpty>
|
||||||
|
<isEmpty property="lastUpdtPnttm" >
|
||||||
, SYS_DATETIME
|
, SYS_DATETIME
|
||||||
|
</isEmpty>
|
||||||
, #lastUpdusrId#
|
, #lastUpdusrId#
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|||||||
@ -28,6 +28,7 @@
|
|||||||
<html lang="ko">
|
<html lang="ko">
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
|
<script src="<c:url value='/innorix/innorix.js' />"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
|
||||||
@ -43,12 +44,18 @@ $(document).ready(function(){
|
|||||||
// $('#goPageForm').attr('action', '<c:url value="/kccadr/adjReqMgOff/adjReqMgrPastProgRegist.do" />');
|
// $('#goPageForm').attr('action', '<c:url value="/kccadr/adjReqMgOff/adjReqMgrPastProgRegist.do" />');
|
||||||
// $('#goPageForm').submit();
|
// $('#goPageForm').submit();
|
||||||
// });
|
// });
|
||||||
|
$('#allUploadBtn').click(function(){
|
||||||
|
|
||||||
|
console.log($('.uploadBtn').length)
|
||||||
|
|
||||||
|
$('.uploadBtn').leanth();
|
||||||
|
$('.uploadBtn').click();
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
//더하기 버튼 alert
|
|
||||||
function fn_testPageAlert(){
|
|
||||||
alert("사건관련 문서 추가 시 작동하는 버튼입니다. \n 첨부파일 솔루션 도입 후 적용 예정");
|
|
||||||
}
|
|
||||||
|
|
||||||
function fn_goListPage(){
|
function fn_goListPage(){
|
||||||
var pageForm = document.pageForm ;
|
var pageForm = document.pageForm ;
|
||||||
@ -56,44 +63,88 @@ function fn_goListPage(){
|
|||||||
pageForm.submit();
|
pageForm.submit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function fn_insertFile(data){
|
||||||
|
|
||||||
|
var resultData = {
|
||||||
|
"adrSeq": $('#adrSeq').val()
|
||||||
|
, "adrDocTy": $('#adrDocTy').val()
|
||||||
|
, "frstRegistPnttm": $('#frstRegistPnttm').val()
|
||||||
|
, "innorixFileListVO": data
|
||||||
|
}
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "<c:url value='/kccadr/common/insertInnorixFileAjax.do' />",
|
||||||
|
data: JSON.stringify(resultData),
|
||||||
|
dataType:'json',
|
||||||
|
async: false,
|
||||||
|
processData: false,
|
||||||
|
contentType: "application/json",
|
||||||
|
cache: false,
|
||||||
|
success: function (returnData) {
|
||||||
|
if(data.status == "OK"){
|
||||||
|
// saveProcess();
|
||||||
|
alert(returnData.data);
|
||||||
|
}else{
|
||||||
|
alert(returnData.data);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function (e) { alert("저장에 실패하였습니다."); console.log("ERROR : ", e); }
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var control = new Object();
|
||||||
|
window.onload = function() {
|
||||||
|
// 파일전송 컨트롤 생성
|
||||||
|
control = innorix.create({
|
||||||
|
el: '#fileControl' // 컨트롤 출력 HTML 객체 ID
|
||||||
|
, transferMode: 'both' // 업로드, 다운로드 혼합사용
|
||||||
|
, installUrl: '/innorix/install/install.html' // Agent 설치 페이지
|
||||||
|
, uploadUrl: '/innorix/exam/upload_test_220916.jsp' // 업로드 URL
|
||||||
|
, height:80
|
||||||
|
, width: 635
|
||||||
|
});
|
||||||
|
|
||||||
|
// 업로드 완료 이벤트
|
||||||
|
control.on('uploadComplete', function (p) {
|
||||||
|
console.log(p.files);
|
||||||
|
fn_insertFile(p.files);
|
||||||
|
var f = p.files;
|
||||||
|
// var r = "Upload complete\n\n";
|
||||||
|
// for (var i = 0; i < f.length; i++ ) {
|
||||||
|
// r += f[i].controlId + " " + f[i].clientFileName + " " + f[i].fileSize + "\n";
|
||||||
|
// }
|
||||||
|
// alert(r);
|
||||||
|
|
||||||
|
var files = JSON.stringify(f);
|
||||||
|
console.log(files);
|
||||||
|
var innoJquery = innorix._load("innoJquery");
|
||||||
|
innoJquery('form#f_write').append('<input type="hidden" name="files" id="files" value=\'' + files + '\' />');
|
||||||
|
// innoJquery('form#f_write').submit();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
.calendarPop {left:-165px;}
|
/* .calendarPop {left:-165px;} */
|
||||||
.cont .list {overflow:inherit;min-height:auto;border-bottom:0 none;}
|
/* .cont .list {overflow:inherit;min-height:auto;border-bottom:0 none;} */
|
||||||
.cont .list.tbType01 tbody tr td {padding:10px 15px;}
|
/* .cont .list.tbType01 tbody tr td {padding:10px 15px;} */
|
||||||
.cont .list.tbType01 tbody tr td .sel_date {position:relative;}
|
/* .cont .list.tbType01 tbody tr td .sel_date {position:relative;} */
|
||||||
.cont .list.tbType01 tbody tr td .sel_date .startDate {width:100%;box-sizing:border-box;}
|
/* .cont .list.tbType01 tbody tr td .sel_date .startDate {width:100%;box-sizing:border-box;} */
|
||||||
.cont .list.tbType01 tbody tr td .sel_date .calendar_in {position:absolute;right:0;top:8px;}
|
/* .cont .list.tbType01 tbody tr td .sel_date .calendar_in {position:absolute;right:0;top:8px;} */
|
||||||
.cont .list.tbType01 tbody tr td.upload_area {text-align:left;}
|
/* .cont .list.tbType01 tbody tr td.upload_area {text-align:left;} */
|
||||||
.cont .list.tbType01 tbody tr td.upload_area .btnType01 {height:36px;padding:0 11px;font-size:15px;}
|
/* .cont .list.tbType01 tbody tr td.upload_area .btnType01 {height:36px;padding:0 11px;font-size:15px;} */
|
||||||
</style>
|
</style>
|
||||||
|
<link rel="stylesheet" href="<c:url value='/innorix/innorix.css'/>" type="text/css">
|
||||||
<title>사건관련문서 등록</title>
|
<title>사건관련문서 등록</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<form id="pageForm" name="pageForm" method="post">
|
|
||||||
<input type="hidden" name="pageIndex" id="pageIndex" value="1">
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<form id="popPageForm" name="popPageForm" method="post">
|
|
||||||
<!-- <input type="hidden" id="prtclSeq" name="prtclSeq" value="" /> -->
|
|
||||||
<input type="hidden" id="adrSeq" name="adrSeq" value="<c:out value="${adjReqMgrPastVO.adrSeq}" />" />
|
|
||||||
<%-- <input type="hidden" id="adrSn" name="adrSn" value="<c:out value="${info.adrSn}" />" /> --%>
|
|
||||||
<%-- <input type="hidden" id="adrNo" name="adrNo" value="<c:out value="${info.adrNo}" />" /> --%>
|
|
||||||
<!-- <input type="hidden" id="rpplTy" name="rpplTy" /> -->
|
|
||||||
<%-- <input type="hidden" id="adrEndDeDay" name="adrEndDeDay" value="<c:out value="${info.adrEndDeDay}" />" /> --%>
|
|
||||||
<%-- <input type="hidden" id="appSeq" name="appSeq" value="<c:out value="${info.appSeq}" />" /> --%>
|
|
||||||
<!-- <input type="hidden" id="closeDocTy" name="closeDocTy" /> -->
|
|
||||||
<%-- <input type="hidden" id="adrAvoidSeq" name="adrAvoidSeq" value="<c:out value="${info.adrAvoidSeq}" />" /> --%>
|
|
||||||
<%-- <input type="hidden" id="agntSeq" name="agntSeq" value="<c:out value="${info.agntSeq}" />" /> --%>
|
|
||||||
<%-- <input type="hidden" id="adrMaxSn" name="adrMaxSn" value="<c:out value="${adrMaxSn}" />" /> --%>
|
|
||||||
<input type="hidden" id="rpplSeq" name="rpplSeq" value=""/>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<form id="goPageForm" name="goPageForm" method="post">
|
|
||||||
<input type="hidden" id="adrSeq" name="adrSeq" value="${adjReqMgrPastVO.adrSeq }">
|
<input type="hidden" id="adrSeq" name="adrSeq" value="${adjReqMgrPastVO.adrSeq }">
|
||||||
</form>
|
|
||||||
<div class="cont_wrap">
|
<div class="cont_wrap">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
|
|
||||||
@ -113,14 +164,8 @@ function fn_goListPage(){
|
|||||||
</div>
|
</div>
|
||||||
<!-- //cont_tit -->
|
<!-- //cont_tit -->
|
||||||
|
|
||||||
|
<p class="tb_tit">파일 등록</p>
|
||||||
<div class="cont">
|
<div class="cont">
|
||||||
<!-- list_top -->
|
|
||||||
<div class="list_top">
|
|
||||||
<%-- <p>총 진행 회차 : <span><c:out value="${fn:length(adjReqMgrPastListVO) }"/></span>건</p> --%>
|
|
||||||
<button class="btnType06 btn_edit" type="button" onclick="fn_testPageAlert(); return false;">+</button>
|
|
||||||
</div>
|
|
||||||
<!-- //list_top -->
|
|
||||||
<!-- list -->
|
|
||||||
<div class="list tbType01">
|
<div class="list tbType01">
|
||||||
<table>
|
<table>
|
||||||
<colgroup>
|
<colgroup>
|
||||||
@ -141,122 +186,86 @@ function fn_goListPage(){
|
|||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<div class="sel_date">
|
<div class="sel_date">
|
||||||
<input type="text" class="startDate inp" title="검색시작일" id="startDate01" name="searchStartDt" value="${adjReqMgrOffLineVO.searchStartDt}" data-datecontrol="true">
|
<input type="text" class="frstRegistPnttm inp" title="검색시작일" id="frstRegistPnttm" name="searchStartDt" value="${adjReqMgrOffLineVO.searchStartDt}" data-datecontrol="true">
|
||||||
<div class="calendar_in" id="calendarName_startDate" style="z-index: 9;">
|
<div class="calendar_in" id="calendarName_frstRegistPnttm" style="z-index: 9;">
|
||||||
<button type="button" value="달력 팝업 열기" onclick="return calendarOpen('startDate01-lry','',this)" class="btn_cal"></button>
|
<button type="button" value="달력 팝업 열기" onclick="return calendarOpen('frstRegistPnttm-lry','',this)" class="btn_cal"></button>
|
||||||
<div id="startDate01-lry" class="calendarPop" style="display: none;">
|
<div id="frstRegistPnttm-lry" class="calendarPop" style="display: none;">
|
||||||
<iframe id="startDate01-ifrm" name="startDate01-ifrm" class="calendar-frame" src="/kccadrPb/adm/calendar.html" title=" 달력 팝업" frameborder="0" scrolling="no"></iframe>
|
<iframe id="frstRegistPnttm-ifrm" name="frstRegistPnttm-ifrm" class="calendar-frame" src="/kccadrPb/adm/calendar.html" title=" 달력 팝업" frameborder="0" scrolling="no"></iframe>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<select name="regiType" id="regiType">
|
<kc:select codeId="CC044" id="adrDocTy" name="adrDocTy" />
|
||||||
<option value="">선택</option>
|
|
||||||
<option value="">신청서</option>
|
|
||||||
<option value="">답변서</option>
|
|
||||||
<option value="">피신청인 경정신청서</option>
|
|
||||||
</select>
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<textarea name="" id="" rows="3"></textarea>
|
<div id="fileControl"></div><br/>
|
||||||
</td>
|
</td>
|
||||||
<td><button type="button" class="btnType04 btn_del reqPerDel">삭제</button></td>
|
<td><button type="button" class="btnType04 btn_del reqPerDel">삭제</button></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td colspan="4" class="upload_area">
|
|
||||||
<input type="file" id="file_temp" name="file_temp" class="uploadFile" style="display: none" />
|
|
||||||
<button type="button" id="filebutton" class="btnType01 btn_add_file">파일 첨부하기</button>
|
|
||||||
<div class="file_wrap file_upload_box no_img_box">
|
|
||||||
<table class="tbType02">
|
|
||||||
<caption>첨부파일 추가 리스트 : 파일명, 종류, 크기, 삭제</caption>
|
|
||||||
<colgroup>
|
|
||||||
<col style="width: 60%;">
|
|
||||||
<col style="width: auto;">
|
|
||||||
<col style="width: 20%;">
|
|
||||||
<col style="width: 10%;">
|
|
||||||
</colgroup>
|
|
||||||
<thead>
|
|
||||||
<th scope="col">파일 명</th>
|
|
||||||
<th scope="col">종류</th>
|
|
||||||
<th scope="col">크기</th>
|
|
||||||
<th scope="col">삭제</th>
|
|
||||||
</thead>
|
|
||||||
<tbody class="tb_file_before">
|
|
||||||
<tr>
|
|
||||||
<td colspan="4">
|
|
||||||
<p>
|
|
||||||
첨부하실 파일을
|
|
||||||
<span>마우스로 끌어서</span>
|
|
||||||
넣어주세요.
|
|
||||||
</p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<div class="file_wrap fileAfter file_list_div">
|
|
||||||
<table class="tbType02">
|
|
||||||
<caption>첨부파일 추가 리스트 : 파일명, 종류, 크기, 삭제</caption>
|
|
||||||
<colgroup>
|
|
||||||
<col style="width: 60%">
|
|
||||||
<col style="width: 10%">
|
|
||||||
<col style="width: 20%">
|
|
||||||
<col style="width: 10%">
|
|
||||||
</colgroup>
|
|
||||||
<thead>
|
|
||||||
<th scope="col">파일 명</th>
|
|
||||||
<th scope="col">종류</th>
|
|
||||||
<th scope="col">크기</th>
|
|
||||||
<th scope="col">삭제</th>
|
|
||||||
</thead>
|
|
||||||
<tbody id="tbody_fiielist" class="tb_file_after">
|
|
||||||
<c:forEach var="fileList" items="${fileList}" varStatus="status">
|
|
||||||
<tr class="item_<c:out value='${fileList.atchFileId}' />_<c:out value='${fileList.fileSn}' /> uploaded_obj">
|
|
||||||
<input type="hidden" name="fileSize" class="item_file_size" value="<c:out value='${fileList.fileSize}' />">
|
|
||||||
<input type="hidden" name="limitcount" value="3" />
|
|
||||||
<td class="td_filename">
|
|
||||||
<span class="file_name_text"><c:out value='${fileList.orignlFileNm}' /></span>
|
|
||||||
</td>
|
|
||||||
<td class="td_filesort">
|
|
||||||
<span class="file_filesort_text" value="<c:out value="${fileList.fileExtsn}"/>">
|
|
||||||
<c:out value="${fileList.fileExtsn}" />
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td class="td_filesize">
|
|
||||||
<span class="file_size_text" value="<c:out value="${fileList.fileMg}"/>">
|
|
||||||
<c:out value="${fileList.fileMg}" />
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<button type="button" class="btn_del" onclick="delAtchFile('<c:out value='${fileList.atchFileId}' />', '<c:out value='${fileList.fileSn}' />'); return false;" title="파일${status.count} 삭제">
|
|
||||||
<i></i>
|
|
||||||
</button>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</c:forEach>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<!-- //list -->
|
<!-- //list -->
|
||||||
<!-- 하단 버튼 -->
|
<!-- 하단 버튼 -->
|
||||||
<div class="btn_wrap btn_layout01">
|
<div class="btn_wrap btn_layout01">
|
||||||
<div class="area_left">
|
<div class="area_left" style="width: 500px;">
|
||||||
<!-- <button type="button" id="prevPage" class="btnType04">< 이전단계 이동</button> -->
|
<button class="btnType06" type="button" onclick="control.openFileDialog();">멀티 파일 추가</button>
|
||||||
|
<button class="btnType06" type="button" onclick="control.openFileDialogSingle();">단일 파일 추가</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="area_right">
|
<div class="area_right">
|
||||||
<!-- <button type="button" id="goPage" class="btnType06">다음단계 이동 ></button> -->
|
<button class="btnType06" type="button" onclick="control.upload();">등록</button>
|
||||||
<button class="btnType06" onclick="window.close(); return false;">저장</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- //하단 버튼 -->
|
<!-- //하단 버튼 -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- list_상세 -->
|
||||||
|
<p class="tb_tit">신청 정보</p>
|
||||||
|
<div class="tbType03">
|
||||||
|
<table>
|
||||||
|
<colgroup>
|
||||||
|
<col style="width: 15%;">
|
||||||
|
<col style="width: auto;">
|
||||||
|
</colgroup>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<!-- <th> -->
|
||||||
|
<!-- <input type="checkbox" name="checkAll" id="checkAll" onclick="fncCheckAll(this, 'ckAdrList')"> -->
|
||||||
|
<!-- <input type="checkbox" name="chkAll" value="All" title="모두체크"> -->
|
||||||
|
<!-- <label for="checkAll"></label> -->
|
||||||
|
<!-- </th> -->
|
||||||
|
<th>일자
|
||||||
|
<!-- <button type="button" class="btn_sort">▲</button> -->
|
||||||
|
</th>
|
||||||
|
<th>문건명</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<p>2022-09-30</p>
|
||||||
|
</td>
|
||||||
|
<td><a href="#" onclick="fn_adjstReq_preview('ADR_0000000000003230'); return false;">조정신청서</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<p>2022-09-30</p>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="/cmm/fms/FileDown.do?atchFileId=FILE_000000000015660&&fileSn=0" title="첨부파일 다운로드" targe="_blank"> test.txt </a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<!-- //list_상세 -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- //cont -->
|
<!-- //cont -->
|
||||||
<!-- //cont -->
|
<!-- //cont -->
|
||||||
|
|||||||
@ -15,9 +15,10 @@
|
|||||||
|
|
||||||
control.on('loadComplete', function (p) { // 다운로드 파일 추가
|
control.on('loadComplete', function (p) { // 다운로드 파일 추가
|
||||||
var urlBase = location.href.substring(0, location.href.lastIndexOf("/") + 1);
|
var urlBase = location.href.substring(0, location.href.lastIndexOf("/") + 1);
|
||||||
|
console.log('urlBase :', urlBase);
|
||||||
control.presetDownloadFiles(
|
control.presetDownloadFiles(
|
||||||
[{
|
[{
|
||||||
printFileName: "INNORIX WP 브로셔.pdf",
|
printFileName: "INNORIX WP 브로셔!!!.pdf",
|
||||||
fileSize: 1433885,
|
fileSize: 1433885,
|
||||||
downloadUrl: urlBase + "download.jsp?fileID=1"
|
downloadUrl: urlBase + "download.jsp?fileID=1"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="../innorix.css">
<script src="../innorix.js"></script>
<script>
var control = new Object();
window.onload = function() {
// 파일전송 컨트롤 생성
control = innorix.create({
el: '#fileControl', // 컨트롤 출력 HTML 객체 ID
transferMode: 'both', // 업로드, 다운로드 혼합사용
agent: false, // true = Agent 설치, false = html5 모드 사용
installUrl: '../install/install.html', // Agent 설치 페이지
uploadUrl: './upload.jsp' // 업로드 URL
});
// 업로드 완료 이벤트
control.on('uploadComplete', function (p) {
alert("업로드가 완료 되었습니다.\n다운로드 가능하게 재구성 합니다.");
var urlBase = location.href.substring(0, location.href.lastIndexOf("/") + 1);
var fileArray = new Array();
var f = p.files;
for (var i = 0; i < f.length; i++ ) {
var fileObj = new Object();
fileObj.printFileName = f[i].clientFileName;
fileObj.fileSize = f[i].fileSize;
fileObj.downloadUrl = urlBase + "download.jsp?fileName=" + f[i].serverFileName;
fileArray.push(fileObj);
}
control.removeAllFiles(); // 파일을 삭제
control.presetDownloadFiles(fileArray); // 다운로드 목록을 구성
});
};
</script>
</head>
<body>
<a href="../index.html">← 예제 목록</a><br /><br />
<div id="fileControl"></div><br/>
<input type="button" value="파일추가" onclick="control.openFileDialog();"/>
<input type="button" value="업로드" onclick="control.upload();"/> |
<input type="button" value="선택파일 다운로드" onclick="control.downloadSelectedFiles();"/>
<input type="button" value="전체 다운로드" onclick="control.download();"/>
</body>
</html>
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="../innorix.css">
<script src="../innorix.js"></script>
<script>
var control = new Object();
window.onload = function() {
// 파일전송 컨트롤 생성
control = innorix.create({
el: '#fileControl', // 컨트롤 출력 HTML 객체 ID
transferMode: 'both', // 업로드, 다운로드 혼합사용
agent: false, // true = Agent 설치, false = html5 모드 사용
installUrl: '../install/install.html', // Agent 설치 페이지
uploadUrl: './upload.jsp', // 업로드 URL
// width : 550, // 컨트롤 출력 너비(pixel)
height : 100 // 컨트롤 출력 높이(pixel)
});
// 업로드 완료 이벤트
control.on('uploadComplete', function (p) {
alert("업로드가 완료 되었습니다.\n다운로드 가능하게 재구성 합니다.");
var urlBase = location.href.substring(0, location.href.lastIndexOf("/") + 1);
var fileArray = new Array();
var f = p.files;
for (var i = 0; i < f.length; i++ ) {
var fileObj = new Object();
fileObj.printFileName = f[i].clientFileName;
fileObj.fileSize = f[i].fileSize;
fileObj.downloadUrl = urlBase + "download.jsp?fileName=" + f[i].serverFileName;
fileArray.push(fileObj);
}
control.removeAllFiles(); // 파일을 삭제
control.presetDownloadFiles(fileArray); // 다운로드 목록을 구성
});
};
</script>
</head>
<body>
<!-- <a href="../index.html">← 예제 목록</a><br /><br /> -->
<div id="fileControl"></div><br/>
<input type="button" value="파일추가" onclick="control.openFileDialog();"/>
<input type="button" value="업로드" class="uploadBtn" onclick="control.upload();"/> |
<input type="button" value="선택파일 다운로드" onclick="control.downloadSelectedFiles();"/>
<input type="button" value="전체 다운로드" onclick="control.download();"/>
</body>
</html>
|
||||||
1
src/main/webapp/innorix/exam/html5Combine_ori.html
Normal file
1
src/main/webapp/innorix/exam/html5Combine_ori.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="../innorix.css">
<script src="../innorix.js"></script>
<script>
var control = new Object();
window.onload = function() {
// 파일전송 컨트롤 생성
control = innorix.create({
el: '#fileControl', // 컨트롤 출력 HTML 객체 ID
transferMode: 'both', // 업로드, 다운로드 혼합사용
agent: false, // true = Agent 설치, false = html5 모드 사용
installUrl: '../install/install.html', // Agent 설치 페이지
uploadUrl: './upload.jsp' // 업로드 URL
});
// 업로드 완료 이벤트
control.on('uploadComplete', function (p) {
alert("업로드가 완료 되었습니다.\n다운로드 가능하게 재구성 합니다.");
var urlBase = location.href.substring(0, location.href.lastIndexOf("/") + 1);
var fileArray = new Array();
var f = p.files;
for (var i = 0; i < f.length; i++ ) {
var fileObj = new Object();
fileObj.printFileName = f[i].clientFileName;
fileObj.fileSize = f[i].fileSize;
fileObj.downloadUrl = urlBase + "download.jsp?fileName=" + f[i].serverFileName;
fileArray.push(fileObj);
}
control.removeAllFiles(); // 파일을 삭제
control.presetDownloadFiles(fileArray); // 다운로드 목록을 구성
});
};
</script>
</head>
<body>
<a href="../index.html">← 예제 목록</a><br /><br />
<div id="fileControl"></div><br/>
<input type="button" value="파일추가" onclick="control.openFileDialog();"/>
<input type="button" value="업로드" onclick="control.upload();"/> |
<input type="button" value="선택파일 다운로드" onclick="control.downloadSelectedFiles();"/>
<input type="button" value="전체 다운로드" onclick="control.download();"/>
</body>
</html>
|
||||||
@ -27,7 +27,7 @@
|
|||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<a href="../index.html">← 예제 목록</a><br /><br />
|
<!-- <a href="../index.html">← 예제 목록</a><br /><br /> -->
|
||||||
|
|
||||||
<div id="fileControl"></div><br/>
|
<div id="fileControl"></div><br/>
|
||||||
|
|
||||||
|
|||||||
37
src/main/webapp/innorix/exam/html5Upload_ori.html
Normal file
37
src/main/webapp/innorix/exam/html5Upload_ori.html
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<link rel="stylesheet" href="../innorix.css">
|
||||||
|
<script src="../innorix.js"></script>
|
||||||
|
<script>
|
||||||
|
var control = new Object();
|
||||||
|
window.onload = function() {
|
||||||
|
// 파일전송 컨트롤 생성
|
||||||
|
control = innorix.create({
|
||||||
|
el: '#fileControl', // 컨트롤 출력 HTML 객체 ID
|
||||||
|
agent: false, // true = Agent 설치, false = html5 모드 사용
|
||||||
|
installUrl: '../install/install.html', // Agent 설치 페이지
|
||||||
|
uploadUrl: './upload.jsp' // 업로드 URL
|
||||||
|
});
|
||||||
|
|
||||||
|
// 업로드 완료 이벤트
|
||||||
|
control.on('uploadComplete', function (p) {
|
||||||
|
var f = p.files;
|
||||||
|
var r = "Upload complete\n\n";
|
||||||
|
for (var i = 0; i < f.length; i++ ) {
|
||||||
|
r += f[i].clientFileName + " " + f[i].fileSize + "\n";
|
||||||
|
}
|
||||||
|
alert(r);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<a href="../index.html">← 예제 목록</a><br /><br />
|
||||||
|
|
||||||
|
<div id="fileControl"></div><br/>
|
||||||
|
|
||||||
|
<input type="button" value="파일추가" onclick="control.openFileDialog();"/>
|
||||||
|
<input type="button" value="업로드" onclick="control.upload();"/>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@ -30,7 +30,7 @@
|
|||||||
var files = JSON.stringify(f);
|
var files = JSON.stringify(f);
|
||||||
var innoJquery = innorix._load("innoJquery");
|
var innoJquery = innorix._load("innoJquery");
|
||||||
innoJquery('form#f_write').append('<input type="hidden" name="files" id="files" value=\'' + files + '\' />');
|
innoJquery('form#f_write').append('<input type="hidden" name="files" id="files" value=\'' + files + '\' />');
|
||||||
innoJquery('form#f_write').submit();
|
// innoJquery('form#f_write').submit();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
if (request.getMethod().equals("POST"))
|
if (request.getMethod().equals("POST"))
|
||||||
{
|
{
|
||||||
String directory = InnorixUpload.getServletAbsolutePath(request);
|
String directory = InnorixUpload.getServletAbsolutePath(request);
|
||||||
|
System.out.println("========== directory :: " + directory + " ==========");
|
||||||
directory = directory.substring(0, directory.lastIndexOf("/") + 1) + "data";
|
directory = directory.substring(0, directory.lastIndexOf("/") + 1) + "data";
|
||||||
int maxPostSize = 2147482624; // bytes
|
int maxPostSize = 2147482624; // bytes
|
||||||
|
|
||||||
|
|||||||
@ -51,6 +51,7 @@
|
|||||||
// 업로드 완료 이벤트
|
// 업로드 완료 이벤트
|
||||||
control.on('uploadComplete', function (p) {
|
control.on('uploadComplete', function (p) {
|
||||||
var f = p.files;
|
var f = p.files;
|
||||||
|
console.log('f : ', f);
|
||||||
var r = "Upload complete\n\n";
|
var r = "Upload complete\n\n";
|
||||||
for (var i = 0; i < f.length; i++ ) {
|
for (var i = 0; i < f.length; i++ ) {
|
||||||
r += f[i].clientFileName + " " + f[i].fileSize + "\n";
|
r += f[i].clientFileName + " " + f[i].fileSize + "\n";
|
||||||
@ -138,7 +139,7 @@
|
|||||||
|
|
||||||
<head>
|
<head>
|
||||||
<body>
|
<body>
|
||||||
<a href="../index.html">← 예제 목록</a><br /><br />
|
<!-- <a href="../index.html">← 예제 목록</a><br /><br /> -->
|
||||||
<div id="dropZone" style="overflow:auto; width:500px; height:200px; border: 1px solid #c0c0c0;">
|
<div id="dropZone" style="overflow:auto; width:500px; height:200px; border: 1px solid #c0c0c0;">
|
||||||
<table id="fileTable" class="fileTable">
|
<table id="fileTable" class="fileTable">
|
||||||
<thead>
|
<thead>
|
||||||
|
|||||||
165
src/main/webapp/innorix/exam/uploadCustomTable_ori.html
Normal file
165
src/main/webapp/innorix/exam/uploadCustomTable_ori.html
Normal file
@ -0,0 +1,165 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<style>
|
||||||
|
button { font-size:9pt; }
|
||||||
|
table.fileTable {
|
||||||
|
width: 500px;
|
||||||
|
font-size: 9pt;
|
||||||
|
color: #333333;
|
||||||
|
border-width: 1px;
|
||||||
|
border-color: #c0c0c0;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
table.fileTable th {
|
||||||
|
border-width: 1px;
|
||||||
|
padding: 8px;
|
||||||
|
border-style: solid;
|
||||||
|
border-color: #c0c0c0;
|
||||||
|
background-color: #dedede;
|
||||||
|
}
|
||||||
|
table.fileTable td {
|
||||||
|
border-width: 1px;
|
||||||
|
padding: 8px;
|
||||||
|
border-style: solid;
|
||||||
|
border-color: #c0c0c0;
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
#fileTable tr > .fileInfo { display:none; }
|
||||||
|
</style>
|
||||||
|
<link rel="stylesheet" href="../innorix.css">
|
||||||
|
<script src="../innorix.js"></script>
|
||||||
|
<script>
|
||||||
|
var innoJquery = innorix._load("innoJquery");
|
||||||
|
var control = new Object(); // 파일전송 컨트롤
|
||||||
|
var tableRowInsert = true; // 파일 추가시 커스텀 테이블에 정보전달 여부
|
||||||
|
|
||||||
|
innoJquery(document).ready(function() {
|
||||||
|
// 파일전송 컨트롤 생성
|
||||||
|
control = innorix.create({
|
||||||
|
el: '#fileControl', // 컨트롤 출력 HTML 객체 ID
|
||||||
|
installUrl: '../install/install.html', // Agent 설치 페이지
|
||||||
|
uploadUrl: './upload.jsp' // 업로드 URL
|
||||||
|
});
|
||||||
|
|
||||||
|
innoJquery("#dropZone").on({ // 외부 HTML 객체 DropZone 활성
|
||||||
|
"dragenter": function(innoJqueryevt) {
|
||||||
|
control.setDropZone(innoJqueryevt, this); // DropZone 으로 지정
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 업로드 완료 이벤트
|
||||||
|
control.on('uploadComplete', function (p) {
|
||||||
|
var f = p.files;
|
||||||
|
console.log('f : ', f);
|
||||||
|
var r = "Upload complete\n\n";
|
||||||
|
for (var i = 0; i < f.length; i++ ) {
|
||||||
|
r += f[i].clientFileName + " " + f[i].fileSize + "\n";
|
||||||
|
}
|
||||||
|
alert(r);
|
||||||
|
});
|
||||||
|
|
||||||
|
// 파일을 추가후 발생 이벤트
|
||||||
|
control.on('afterAddFiles', function (p) {
|
||||||
|
|
||||||
|
// 커스텀 테이블 사용하는 경우 선택된 파일정보 전달
|
||||||
|
if (tableRowInsert == true) {
|
||||||
|
for (var i = 0; i < p.length; i++ ) {
|
||||||
|
|
||||||
|
var _filePath = p[i].filePath;
|
||||||
|
var _fileSize = p[i].fileSize;
|
||||||
|
var _fileID = p[i].id;
|
||||||
|
var _fileType = "normal";
|
||||||
|
|
||||||
|
var arr = (_filePath.replace(/\\/gi,"/")).split("/");
|
||||||
|
var fileName = arr[arr.length-1];
|
||||||
|
var fileSize = bytesToSize(_fileSize);
|
||||||
|
var fileType = "일반";
|
||||||
|
|
||||||
|
if (_fileSize > 104857600) {
|
||||||
|
var _fileType = "large";
|
||||||
|
var fileType = "대용량";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 선택된 파일을 커스텀 테이블에 추가
|
||||||
|
innoJquery('#fileTable > tbody:last').append(' \
|
||||||
|
<tr class="fileTable"> \
|
||||||
|
<td class="fileInfo">' + _filePath + '</td> \
|
||||||
|
<td class="fileInfo">' + _fileSize + '</td> \
|
||||||
|
<td class="fileInfo">' + _fileType + '</td> \
|
||||||
|
<td>' + fileName + '</td> \
|
||||||
|
<td>' + fileSize + '</td> \
|
||||||
|
<td>' + fileType + '</td> \
|
||||||
|
<td><input type="button" value="삭제" onClick="deleteRow(this,\'' + _fileID + '\')"/></td> \
|
||||||
|
</tr> \
|
||||||
|
');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// 파일 사이즈 bytes 를 KB, MB... 형식으로 변환
|
||||||
|
function bytesToSize(bytes) {
|
||||||
|
var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
|
||||||
|
if (bytes == 0) return 'n/a';
|
||||||
|
var i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024)));
|
||||||
|
if (i == 0) return bytes + ' ' + sizes[i];
|
||||||
|
return (bytes / Math.pow(1024, i)).toFixed(1) + ' ' + sizes[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
// 커스텀 테이블 행 삭제
|
||||||
|
function deleteRow(obj, fileID) {
|
||||||
|
var row = obj.parentNode.parentNode;
|
||||||
|
row.parentNode.removeChild(row);
|
||||||
|
control.removeFileById(fileID);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 커스텀 테이블 파일 정보를 확인
|
||||||
|
function getTableFiles() {
|
||||||
|
var tbl = innoJquery('#fileTable tr:has(td)').map(function(i, v) {
|
||||||
|
var innoJquerytd = innoJquery('td', this);
|
||||||
|
var type = innoJquerytd.eq(2).text();
|
||||||
|
if (type == "large") {
|
||||||
|
var uploadUrl = control.option.uploadUrl + "?type=large";
|
||||||
|
} else {
|
||||||
|
var uploadUrl = control.option.uploadUrl + "?type=normal";
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
basePath: "",
|
||||||
|
filePath: innoJquerytd.eq(0).text(),
|
||||||
|
fileSize: Number(innoJquerytd.eq(1).text()),
|
||||||
|
fileType: innoJquerytd.eq(2).text(),
|
||||||
|
uploadUrl: uploadUrl
|
||||||
|
}
|
||||||
|
}).get();
|
||||||
|
|
||||||
|
return tbl;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<body>
|
||||||
|
<a href="../index.html">← 예제 목록</a><br /><br />
|
||||||
|
<div id="dropZone" style="overflow:auto; width:500px; height:200px; border: 1px solid #c0c0c0;">
|
||||||
|
<table id="fileTable" class="fileTable">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="fileInfo">filePath</th>
|
||||||
|
<th class="fileInfo">fileSize</th>
|
||||||
|
<th class="fileInfo">fileType</th>
|
||||||
|
<th>파일명</th>
|
||||||
|
<th>용량</th>
|
||||||
|
<th>구분</th>
|
||||||
|
<th>삭제</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody></tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="fileControl" style="display:none"></div><br/>
|
||||||
|
|
||||||
|
<input type="button" value="파일추가" onclick="control.openFileDialog();"/>
|
||||||
|
<input type="button" value="업로드" onclick="control.upload();"/>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@ -1,12 +1,14 @@
|
|||||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||||
<%@ page import="com.innorix.transfer.InnorixUpload" %>
|
<%@ page import="com.innorix.transfer.InnorixUpload" %>
|
||||||
|
<%-- <%@ page import="egovframework.rte.fdl.property.EgovPropertyService" %> --%>
|
||||||
<%
|
<%
|
||||||
// CORS체크를 위한 OPTIONS 메소드가 들어오므로 POST 일 경우에만 동작하도록 조건 추가
|
// CORS체크를 위한 OPTIONS 메소드가 들어오므로 POST 일 경우에만 동작하도록 조건 추가
|
||||||
if (request.getMethod().equals("POST"))
|
if (request.getMethod().equals("POST"))
|
||||||
{
|
{
|
||||||
String directory = InnorixUpload.getServletAbsolutePath(request);
|
String directory = InnorixUpload.getServletAbsolutePath(request);
|
||||||
directory = directory.substring(0, directory.lastIndexOf("/") + 1) + "data";
|
// directory = directory.substring(0, directory.lastIndexOf("/") + 1) + "data";
|
||||||
|
// directory = PropertyService.getString("Globals.fileStorePath");
|
||||||
|
directory = "/usr/local/tomcat/file/sht/";
|
||||||
int maxPostSize = 2147482624; // bytes
|
int maxPostSize = 2147482624; // bytes
|
||||||
|
|
||||||
InnorixUpload uploader = new InnorixUpload(request, response, maxPostSize, directory);
|
InnorixUpload uploader = new InnorixUpload(request, response, maxPostSize, directory);
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user