Merge branch 'JIWOO' into advc

This commit is contained in:
jiwoo 2023-08-22 11:06:08 +09:00
commit cb151dca3d
19 changed files with 971 additions and 18 deletions

View File

@ -38,6 +38,15 @@ public class AdrInnorixFileVO extends ComDefaultVO implements Serializable {
public String successMsg = "";
public String eduAplctOrd = "";
// 컨트롤 엘리먼트 ID - 멀티 업로드 jsp에서 사용하는 el
public String controlId = "";
// 승인코드 - 저작권 체험교실 결과보고서 임시저장 구분용으로 추가
public String aprvlCd = "";
// 파일 ID
public String atchFileId = "";
// private String frstRegistPnttm; //등록일시
// private String frstRegisterId; //등록자
@ -89,6 +98,30 @@ public class AdrInnorixFileVO extends ComDefaultVO implements Serializable {
this.eduAplctOrd = eduAplctOrd;
}
public String getControlId() {
return controlId;
}
public void setControlId(String controlId) {
this.controlId = controlId;
}
public String getAprvlCd() {
return aprvlCd;
}
public void setAprvlCd(String aprvlCd) {
this.aprvlCd = aprvlCd;
}
public String getAtchFileId() {
return atchFileId;
}
public void setAtchFileId(String atchFileId) {
this.atchFileId = atchFileId;
}

View File

@ -24,5 +24,11 @@ import kcc.kccadr.cmm.RestResponse;
public interface InnorixFileService {
RestResponse insertInnorixFile(AdrInnorixFileVO adrInnorixFileVO);
RestResponse insertRprtInnorixFile(AdrInnorixFileVO adrInnorixFileVO);
RestResponse deleteRprtInnorixFile(AdrInnorixFileVO adrInnorixFileVO);
RestResponse updateRprtInnorixFile(AdrInnorixFileVO adrInnorixFileVO);
}

View File

@ -10,15 +10,11 @@ import javax.annotation.Resource;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.lang3.StringUtils;
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 com.dreamsecurity.magicline.util.Log;
import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl;
import egovframework.rte.fdl.cmmn.exception.FdlException;
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
@ -26,8 +22,6 @@ import egovframework.rte.fdl.property.EgovPropertyService;
import kcc.com.cmm.service.EgovFileMngService;
import kcc.com.cmm.service.FileVO;
import kcc.com.cmm.service.impl.FileManageDAO;
import kcc.kccadr.accdnt.ans.service.AnsVO;
import kcc.kccadr.accdnt.ans.service.impl.AnsDAO;
import kcc.kccadr.cmm.RestResponse;
import kcc.kccadr.cmm.innorix.service.AdrInnorixFileVO;
import kcc.kccadr.cmm.innorix.service.InnorixFileService;
@ -35,6 +29,7 @@ import kcc.kccadr.cmm.innorix.service.InnorixFileVO;
import kcc.let.utl.fcc.service.EgovStringUtil;
import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduAplctService;
import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduAplctVO;
import kcc.ve.instr.tngrVisitEdu.eduInfo.service.VEEduMIXService;
/**
* @Class Name : EgovCmmUseServiceImpl.java
@ -74,6 +69,9 @@ public class InnorixFileServiceImpl extends EgovAbstractServiceImpl implements I
@Resource(name = "vEEduAplctService")
private VEEduAplctService vEEduAplctService;
//교육과정신청
@Resource(name = "vEEduMIXService")
private VEEduMIXService vEEduMIXService;
/**
* @methodName : fileDataUpload
* @author : 이호영
@ -204,4 +202,166 @@ public class InnorixFileServiceImpl extends EgovAbstractServiceImpl implements I
return new RestResponse(HttpStatus.OK, adrInnorixFileVO.getSuccessMsg(), LocalDateTime.now());
}
@Override
public RestResponse insertRprtInnorixFile(AdrInnorixFileVO adrInnorixFileVO) {
List<FileVO> result = null;
VEEduAplctVO vEEduAplctVO = new VEEduAplctVO();
try {
// 파일 저장 저장할 file 정보를 받아옴
for(InnorixFileVO innorixFileVO : adrInnorixFileVO.getInnorixFileListVO()) {
result = this.insertRprtFileData(innorixFileVO);
// 파일 정보 insert
String atchFileId = fileManageDAO.insertFileInfs(result);
if("orgn".equals(innorixFileVO.getControlId())) {
vEEduAplctVO.setOrgnlRsltAtchFileId(atchFileId);
}else if("cpy".equals(innorixFileVO.getControlId())){
vEEduAplctVO.setCpyRsltAtchFileId(atchFileId);
}else if("evdnc".equals(innorixFileVO.getControlId())) {
vEEduAplctVO.setEvdncPhtAtchFileId(atchFileId);
}else if("rmttrn".equals(innorixFileVO.getControlId())) {
vEEduAplctVO.setRmtTrnAtchFileId(atchFileId);
}
}
vEEduAplctVO.setAprvlCd(adrInnorixFileVO.getAprvlCd());
vEEduAplctVO.setFrstRegisterId(adrInnorixFileVO.getUniqId());
vEEduAplctVO.setLastUpdusrId(adrInnorixFileVO.getUniqId());
vEEduAplctVO.setEduAplctOrd(adrInnorixFileVO.getEduAplctOrd());
//저장
vEEduMIXService.insertExprnClsrmEndInfo(vEEduAplctVO);
} catch (Exception e) {
e.printStackTrace();
return new RestResponse(HttpStatus.BAD_REQUEST, "등록에 실패하였습니다.", LocalDateTime.now());
}
return new RestResponse(HttpStatus.OK, adrInnorixFileVO.getSuccessMsg(), LocalDateTime.now());
}
public List<FileVO> insertRprtFileData(InnorixFileVO innorixVO) throws Exception {
List<FileVO> result = this.fileRprtChange(innorixVO);
return result;
}
private List<FileVO> fileRprtChange(InnorixFileVO innorixVO) throws FdlException {
List<FileVO> result = new ArrayList<FileVO>();
String storePathString = propertyService.getString("Globals.fileStorePath");
String atchFileId = idgenService.getNextStringId();
int fileSn = 0;
FileVO fileVO = new FileVO();
// new 파일명
String oriFullPath = innorixVO.getServerFilePath();
String fileType = "";
String newFileNm = innorixVO.getControlId() + "_" + EgovStringUtil.getTimeStamp() + "0";
String newFullPath = storePathString + File.separator + newFileNm;
try {
File orifile = FileUtils.getFile(oriFullPath);
File newfile = FileUtils.getFile(newFullPath);
FileUtils.moveFile(orifile, newfile);
fileVO.setAtchFileId(atchFileId);
fileVO.setFileSn(Integer.toString(fileSn));
fileVO.setFileStreCours(storePathString);
fileVO.setStreFileNm(newFileNm);
fileVO.setOrignlFileNm(innorixVO.getServerFileName());
fileVO.setFileExtsn(FilenameUtils.getExtension(oriFullPath));
fileVO.setFileMg(Integer.toString(innorixVO.getFileSize()));
result.add(fileVO);
fileSn++;
} catch (IOException e) {
log.info("파일명 수정 실패 :: [{}] ==> [{}]", oriFullPath, newFullPath );
e.printStackTrace();
}
log.info(" // file data 반복문 끝 ");
return result;
}
@Override
public RestResponse deleteRprtInnorixFile(AdrInnorixFileVO adrInnorixFileVO) {
FileVO fileVO = new FileVO();
fileVO.setAtchFileId(adrInnorixFileVO.getAtchFileId());
fileVO.setFileSn("0"); //저작권 체험교실 결과보고서는 항목당 첨부파일 최대 1개
try {
fileMngService.deleteFmsFileInf(fileVO); //실제 파일 삭제 처리
VEEduAplctVO vEEduAplctVO = new VEEduAplctVO();
vEEduAplctVO.setEduAplctOrd(adrInnorixFileVO.getEduAplctOrd());
vEEduAplctVO.setFileType(adrInnorixFileVO.getFileType());
vEEduAplctVO.setLastUpdusrId(adrInnorixFileVO.getUniqId());
//저장
vEEduMIXService.updateRsltRprtFileIdNull(vEEduAplctVO);
} catch (Exception e) {
e.printStackTrace();
return new RestResponse(HttpStatus.BAD_REQUEST, "등록에 실패하였습니다.", LocalDateTime.now());
}
return new RestResponse(HttpStatus.OK, adrInnorixFileVO.getSuccessMsg(), LocalDateTime.now());
}
@Override
public RestResponse updateRprtInnorixFile(AdrInnorixFileVO adrInnorixFileVO) {
List<FileVO> result = null;
VEEduAplctVO vEEduAplctVO = new VEEduAplctVO();
try {
// 파일 저장 저장할 file 정보를 받아옴
for(InnorixFileVO innorixFileVO : adrInnorixFileVO.getInnorixFileListVO()) {
result = this.insertRprtFileData(innorixFileVO);
// 파일 정보 insert
String atchFileId = fileManageDAO.insertFileInfs(result);
if("orgn".equals(innorixFileVO.getControlId())) {
vEEduAplctVO.setOrgnlRsltAtchFileId(atchFileId);
}else if("cpy".equals(innorixFileVO.getControlId())){
vEEduAplctVO.setCpyRsltAtchFileId(atchFileId);
}else if("evdnc".equals(innorixFileVO.getControlId())) {
vEEduAplctVO.setEvdncPhtAtchFileId(atchFileId);
}else if("rmttrn".equals(innorixFileVO.getControlId())) {
vEEduAplctVO.setRmtTrnAtchFileId(atchFileId);
}
}
vEEduAplctVO.setAprvlCd(adrInnorixFileVO.getAprvlCd());
vEEduAplctVO.setLastUpdusrId(adrInnorixFileVO.getUniqId());
vEEduAplctVO.setEduAplctOrd(adrInnorixFileVO.getEduAplctOrd());
//저장
vEEduMIXService.updateRsltRprtFileId(vEEduAplctVO);
} catch (Exception e) {
e.printStackTrace();
return new RestResponse(HttpStatus.BAD_REQUEST, "등록에 실패하였습니다.", LocalDateTime.now());
}
return new RestResponse(HttpStatus.OK, adrInnorixFileVO.getSuccessMsg(), LocalDateTime.now());
}
}

View File

@ -69,8 +69,71 @@ public class InnorixFileController {
return ResponseEntity.ok(innorixService.insertInnorixFile(adrInnorixFileVO));
}
/**
* @methodName : insertRprtInnorixFile
* @description : 저작권체험교실 결과보고 파일 insert 전용
* @param adrInnorixFileVO
* @return
* @throws Exception
*/
@RequestMapping(value = {"/web/common/insertRprtInnorixFileAjax.do"}, method = RequestMethod.POST)
public ResponseEntity<RestResponse> insertRprtInnorixFile(@RequestBody AdrInnorixFileVO adrInnorixFileVO) throws Exception {
//로그인 권한정보 불러오기
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.setUniqId(userId);
return ResponseEntity.ok(innorixService.insertRprtInnorixFile(adrInnorixFileVO));
}
/**
* @methodName : deleteRprtInnorixFile
* @description : 저작권체험교실 결과보고 파일 delete 전용
* @param adrInnorixFileVO
* @return
* @throws Exception
*/
@RequestMapping(value = {"/web/common/deleteRprtInnorixFileAjax.do"}, method = RequestMethod.POST)
public ResponseEntity<RestResponse> deleteRprtInnorixFile(@RequestBody AdrInnorixFileVO adrInnorixFileVO) throws Exception {
//로그인 권한정보 불러오기
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.setUniqId(userId);
return ResponseEntity.ok(innorixService.deleteRprtInnorixFile(adrInnorixFileVO));
}
/**
* @methodName : updateRprtInnorixFile
* @description : 저작권체험교실 결과보고 update 전용
* @param adrInnorixFileVO
* @return
* @throws Exception
* 임시저장 다시 임시저장 or 제출 기존에 데이터가 있었기 때문에 insert가 아닌 update 처리
*/
@RequestMapping(value = {"/web/common/updateRprtInnorixFileAjax.do"}, method = RequestMethod.POST)
public ResponseEntity<RestResponse> updateRprtInnorixFile(@RequestBody AdrInnorixFileVO adrInnorixFileVO) throws Exception {
//로그인 권한정보 불러오기
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.setUniqId(userId);
return ResponseEntity.ok(innorixService.updateRprtInnorixFile(adrInnorixFileVO));
}
}

View File

@ -408,8 +408,32 @@ public class ExprnClsrmEndController {
//데이터 복호화 - VO 단위로 만들어서 사용
vEEduAplctVO = egovCryptoUtil.decryptVEEduAplctVOInfo(vEEduAplctVO);
FileVO fileVO = new FileVO();
if(vEEduAplctVO.getOrgnlRsltAtchFileId() != null){
fileVO.setAtchFileId(vEEduAplctVO.getOrgnlRsltAtchFileId());
fileVO.setFileSn("0");
vEEduAplctVO.setOrgnlRsltAtchFileDetail(fileService.selectFileInf(fileVO));
}
if(vEEduAplctVO.getCpyRsltAtchFileId() != null){
fileVO.setAtchFileId(vEEduAplctVO.getCpyRsltAtchFileId());
fileVO.setFileSn("0");
vEEduAplctVO.setCpyRsltAtchFileDetail(fileService.selectFileInf(fileVO));
}
if(vEEduAplctVO.getEvdncPhtAtchFileId() != null){
fileVO.setAtchFileId(vEEduAplctVO.getEvdncPhtAtchFileId());
fileVO.setFileSn("0");
vEEduAplctVO.setEvdncPhtAtchFileDetail(fileService.selectFileInf(fileVO));
}
if(vEEduAplctVO.getRmtTrnAtchFileId() != null){
fileVO.setAtchFileId(vEEduAplctVO.getRmtTrnAtchFileId());
fileVO.setFileSn("0");
vEEduAplctVO.setRmtTrnAtchFileDetail(fileService.selectFileInf(fileVO));
}
model.addAttribute("info", vEEduAplctVO);
return "/web/ve/aplct/cpyrgExprnClsrm/exprnClsrmEnd/exprnClsrmEndRslt";
// return "/web/ve/aplct/cpyrgExprnClsrm/exprnClsrmEnd/exprnClsrmEndRslt";
//대량 업로드 솔루션 테스트
return "/web/ve/aplct/cpyrgExprnClsrm/exprnClsrmEnd/exprnClsrmEndRsltTest";
}
/**

View File

@ -2,7 +2,8 @@ package kcc.ve.instr.tngrVisitEdu.eduInfo.service;
import java.io.Serializable;
import kcc.com.cmm.ComDefaultVO;
import kcc.com.cmm.ComDefaultVO;
import kcc.com.cmm.service.FileVO;
public class VEEduAplctVO extends ComDefaultVO implements Serializable {
@ -161,6 +162,11 @@ public class VEEduAplctVO extends ComDefaultVO implements Serializable {
private String rprtAtchFileId; //교육결과 파일ID
//ve_edu_rslt_rprt 임시 저장 정보 조회
private FileVO orgnlRsltAtchFileDetail;//원본결과첨부파일 상세
private FileVO cpyRsltAtchFileDetail; //사본결과첨부파일 상세
private FileVO evdncPhtAtchFileDetail; //증비사진첨부파일 상세
private FileVO rmtTrnAtchFileDetail; //원격연수이수증첨부파일 상세
//ve_edu_aplct_unq_isues
private String unqIsuesOrd; //특이사항순번
@ -1425,5 +1431,30 @@ public class VEEduAplctVO extends ComDefaultVO implements Serializable {
public void setEndEduPrsnl(String endEduPrsnl) {
this.endEduPrsnl = endEduPrsnl;
}
public FileVO getOrgnlRsltAtchFileDetail() {
return orgnlRsltAtchFileDetail;
}
public void setOrgnlRsltAtchFileDetail(FileVO orgnlRsltAtchFileDetail) {
this.orgnlRsltAtchFileDetail = orgnlRsltAtchFileDetail;
}
public FileVO getCpyRsltAtchFileDetail() {
return cpyRsltAtchFileDetail;
}
public void setCpyRsltAtchFileDetail(FileVO cpyRsltAtchFileDetail) {
this.cpyRsltAtchFileDetail = cpyRsltAtchFileDetail;
}
public FileVO getEvdncPhtAtchFileDetail() {
return evdncPhtAtchFileDetail;
}
public void setEvdncPhtAtchFileDetail(FileVO evdncPhtAtchFileDetail) {
this.evdncPhtAtchFileDetail = evdncPhtAtchFileDetail;
}
public FileVO getRmtTrnAtchFileDetail() {
return rmtTrnAtchFileDetail;
}
public void setRmtTrnAtchFileDetail(FileVO rmtTrnAtchFileDetail) {
this.rmtTrnAtchFileDetail = rmtTrnAtchFileDetail;
}
}

View File

@ -46,4 +46,8 @@ public interface VEEduMIXService {
//교육신청 신청자 조회
List<UserManageVO> eduAplctMngUserList(UserManageVO userManageVO) throws Exception;
void updateRsltRprtFileIdNull(VEEduAplctVO vEEduAplctVO) throws Exception;
void updateRsltRprtFileId(VEEduAplctVO vEEduAplctVO) throws Exception;
}

View File

@ -129,4 +129,12 @@ public class VEEduMIXDAO extends EgovAbstractDAO {
List<UserManageVO> list = (List<UserManageVO>) list("VEEduMIXDAO.eduAplctMngUserList", paramVO);
return list;
}
public void updateRsltRprtFileIdNull(VEEduAplctVO vEEduAplctVO) throws Exception {
insert("VEEduMIXDAO.updateRsltRprtFileIdNull", vEEduAplctVO);
}
public void updateRsltRprtFileId(VEEduAplctVO vEEduAplctVO) throws Exception {
insert("VEEduMIXDAO.updateRsltRprtFileId", vEEduAplctVO);
}
}

View File

@ -99,7 +99,10 @@ public class VEEduMIXServiceImpl implements VEEduMIXService {
public void insertExprnClsrmEndInfo(VEEduAplctVO vEEduAplctVO) throws Exception {
String eduChasiOrd = eduChasiGnrService.getNextStringId(); // 교육차시 순번
vEEduAplctVO.setEduChasiOrd(eduChasiOrd);
vEEduAplctVO.setAprvlCd("10");
//230811 이지우 - 저작권 체험교실 결과보고에 임시저장(230) 추가
if(!"230".equals(vEEduAplctVO.getAprvlCd())){
vEEduAplctVO.setAprvlCd("10");
}
vEEduMIXDAO.insertExprnClsrmEndInfo(vEEduAplctVO);
}
@ -111,5 +114,15 @@ public class VEEduMIXServiceImpl implements VEEduMIXService {
//paging List
public List<UserManageVO> eduAplctMngUserList(UserManageVO paramVO) throws Exception{
return vEEduMIXDAO.eduAplctMngUserList(paramVO);
}
}
@Override
public void updateRsltRprtFileIdNull(VEEduAplctVO vEEduAplctVO) throws Exception {
vEEduMIXDAO.updateRsltRprtFileIdNull(vEEduAplctVO);
}
@Override
public void updateRsltRprtFileId(VEEduAplctVO vEEduAplctVO) throws Exception {
vEEduMIXDAO.updateRsltRprtFileId(vEEduAplctVO);
}
}

View File

@ -85,7 +85,8 @@ Globals.sso.pwFindUrl=https://devoneid.copyright.or.kr/member/infoFind/passFindS
Globals.MainPage = /cmm/main/mainPage.do
#\ucee8\ud150\uce20 \ud30c\uc77c\uc704\uce58
#Globals.ckeditorUploadDir=/home/file/ckeditor/
Globals.ckeditorUploadDir=/usr/local/tomcat/file/ckeditor/
#Globals.ckeditorUploadDir=/usr/local/tomcat/file/ckeditor/
Globals.ckeditorUploadDir=/app/doc/offedu/ckeditor/
#TEST SERVER
Globals.RealCntFileFolder=C:/eGovFrameDev-3.9.0-64bit_ncms/workspace/ncms39/src/main/webapp/WEB-INF/jsp/cnt/
Globals.Solr.url=http://localhost:8983/solr

View File

@ -91,7 +91,8 @@ Globals.sso.pwFindUrl=https://oneid.copyright.or.kr/member/infoFind/passFindStep
Globals.MainPage = /cmm/main/mainPage.do
#\ucee8\ud150\uce20 \ud30c\uc77c\uc704\uce58
#Globals.ckeditorUploadDir=/home/file/ckeditor/
Globals.ckeditorUploadDir=/usr/local/tomcat/file/ckeditor/
#Globals.ckeditorUploadDir=/usr/local/tomcat/file/ckeditor/
Globals.ckeditorUploadDir=/app/doc/offedu/ckeditor/
#TEST SERVER
Globals.RealCntFileFolder=C:/eGovFrameDev-3.9.0-64bit_ncms/workspace/ncms39/src/main/webapp/WEB-INF/jsp/cnt/
Globals.Solr.url=http://localhost:8983/solr

View File

@ -3302,4 +3302,38 @@ VALUES
</select>
<insert id="VEEduMIXDAO.updateRsltRprtFileIdNull" parameterClass="VEEduAplctVO">
UPDATE
ve_edu_rslt_rprt
SET
$fileType$ = null,
last_updusr_id = #lastUpdusrId#,
last_updt_pnttm = now()
WHERE
edu_aplct_ord = #eduAplctOrd#
</insert>
<insert id="VEEduMIXDAO.updateRsltRprtFileId" parameterClass="VEEduAplctVO">
UPDATE
ve_edu_rslt_rprt
SET
aprvl_cd = #aprvlCd#,
<isNotEmpty property="orgnlRsltAtchFileId">
orgnl_rslt_atch_file_id = #orgnlRsltAtchFileId#,
</isNotEmpty>
<isNotEmpty property="cpyRsltAtchFileId">
cpy_rslt_atch_file_id = #cpyRsltAtchFileId#,
</isNotEmpty>
<isNotEmpty property="evdncPhtAtchFileId">
evdnc_pht_atch_file_id = #evdncPhtAtchFileId#,
</isNotEmpty>
<isNotEmpty property="rmtTrnAtchFileId">
rmt_trn_atch_file_id = #rmtTrnAtchFileId#,
</isNotEmpty>
last_updusr_id = #lastUpdusrId#,
last_updt_pnttm = now()
WHERE
edu_aplct_ord = #eduAplctOrd#
</insert>
</sqlMap>

View File

@ -0,0 +1,540 @@
<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="kc" uri="/WEB-INF/tlds/kcc_tld.tld"%>
<%@ taglib prefix="un" uri="http://jakarta.apache.org/taglibs/unstandard-1.0" %>
<un:useConstants var="VeConstants" className="kcc.ve.cmm.VeConstants" />
<% pageContext.setAttribute("replaceChar", "\n"); %>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<spring:eval expression="@property['Globals.Innorix.License']" var="license"/>
<script>
/* js에 전달용 */
var contextPath = '${pageContext.request.contextPath}';
var eduAplctOrd = "<c:out value='${info.eduAplctOrd}'/>";
</script>
<script src="<c:url value='/innorix/innorix_${license}.js' />"></script>
<script src="<c:url value='/js/kccadr/innorixCommon.js' />"></script>
<link rel="stylesheet" href="<c:url value='/innorix/innorix.css'/>" type="text/css">
<style>
input:disabled {
background-color: #f9f9f9 !important;
}
input:read-only {
background-color: #f9f9f9 !important;
}
#orgn{margin: 8px 0 0 0; border: 1px solid #d5d5d5; border-radius: 5px; height: 150px !important; background-color: #fafafa;}
.innorix_basic div.irx_filetree.empty-uploader{background: url(/offeduadvc/visitEdu/usr/publish/images/content/dropzone_file_before.png) no-repeat center; height: 150px !important;}
.irx_filetree,.innorix_basic div.irx_infoBox{height: 150px !important;}
#cpy{margin: 8px 0 0 0; border: 1px solid #d5d5d5; border-radius: 5px; height: 150px !important; background-color: #fafafa;}
#evdnc{margin: 8px 0 0 0; border: 1px solid #d5d5d5; border-radius: 5px; height: 150px !important; background-color: #fafafa;}
#evdnc div.irx_filetree.empty-uploader{background: url(/offeduadvc/visitEdu/usr/publish/images/content/dropzone_file_before_only_zip.png) no-repeat center; height: 150px !important;}
#rmttrn{margin: 8px 0 0 0; border: 1px solid #d5d5d5; border-radius: 5px; height: 150px !important; background-color: #fafafa;}
</style>
<script type="text/javaScript" language="javascript">
//대용량 업로드 솔루션
var control1 = new Object();
var control2 = new Object();
var control3 = new Object();
var control4 = new Object();
var control5 = new Object();
//첨부파일 변화 유무
var control1Chg = 'N';
var control2Chg = 'N';
var control3Chg = 'N';
var control4Chg = 'N';
//임시파일 유무 설정
var control1Tmprr = 'N';
var control2Tmprr = 'N';
var control3Tmprr = 'N';
var control4Tmprr = 'N';
//기존 임시저장 확인 여부 - tmprrYn이 == N 테이블 insert / tmprrYn == Y 테이블 update
var tmprrYn = 'N';
var control1Id = '${info.orgnlRsltAtchFileId}';
var control2Id = '${info.cpyRsltAtchFileId}';
var control3Id = '${info.evdncPhtAtchFileId}';
var control4Id = '${info.rmtTrnAtchFileId}';
if(control1Id != null && control1Id != ''){
control1Tmprr = 'Y';
tmprrYn = 'Y';
}
if(control2Id != null && control2Id != ''){
control2Tmprr = 'Y';
tmprrYn = 'Y';
}
if(control3Id != null && control3Id != ''){
control3Tmprr = 'Y';
tmprrYn = 'Y';
}
if(control4Id != null && control4Id != ''){
control4Tmprr = 'Y';
tmprrYn = 'Y';
}
//임시파일 다운로드 jsp 기본 경로
var urlBase = "<c:url value='/innorix/exam/'/>"
$(document).ready(function(){
//대용량 업로드 솔루션 innorix
//원본 결과 보고서 컨트롤 생성
control1 = innorix.create({
el : '#orgn', // 컨트롤 출력 객체 ID
installUrl: '<c:url value="/innorix/install/install.html" />', // Agent 설치 페이지
uploadUrl: '<c:url value="/innorix/exam/upload.jsp?el=orgn" />', // 업로드 URL
maxFileCount : 1, // 첨부가능 파일 전체 개수
width : 870, // 컨트롤 출력 너비(pixel)
height : 80, // 컨트롤 출력 높이(pixel)
allowExtension : ["txt","xls","xlsx","png","jpg","jpeg","doc","ppt","hwp","pdf","zip"],
useContextMenu : 'false' //우클릭을 이용한 개별 업로드 방지
});
// 파일 추가 이벤트
control1.on('afterAddFiles', function (p) {
$('.orgnl_totalfileSize').text(getStrFileSize(p[0].fileSize)) ;
$('.orgnl_totalfileCount').text(p.length);
control1Chg = 'Y';
});
// 파일 삭제 이벤트
// 임시 저장이 아닌, 새로 afterAddFiles(업로드 전 파일추가) - control1Chg 'N'
// 임시 저장 파일 삭제 시 - control1Chg 'Y'
control1.on('removeFiles', function (p) {
$('.orgnl_totalfileSize').text('0MB') ;
$('.orgnl_totalfileCount').text('0');
control1Chg = 'N';
if(control1Tmprr == 'Y'){
if(confirm("삭제하시겠습니까?")){
innorixDelRprtAtchFile(p[0].uniqueFileName, 'orgnl_rslt_atch_file_id')
control1Tmprr = 'N';
control1Chg = 'Y';
$("#control1DownBtn").css('display', 'none');
}else{
return false;
}
}
});
//평가용 결과 보고서 컨트롤 생성
control2 = innorix.create({
el : '#cpy', // 컨트롤 출력 객체 ID
installUrl: '<c:url value="/innorix/install/install.html" />', // Agent 설치 페이지
uploadUrl: '<c:url value="/innorix/exam/upload.jsp?el=cpy" />', // 업로드 URL
maxFileCount : 1, // 첨부가능 파일 전체 개수
width : 870, // 컨트롤 출력 너비(pixel)
height : 80, // 컨트롤 출력 높이(pixel)
allowExtension : ["txt","xls","xlsx","png","jpg","jpeg","doc","ppt","hwp","pdf","zip"],
useContextMenu : 'false'
});
// 파일 추가 이벤트
control2.on('afterAddFiles', function (p) {
$('.cpy_totalfileSize').text(getStrFileSize(p[0].fileSize)) ;
$('.cpy_totalfileCount').text(p.length);
control2Chg = 'Y';
});
// 파일 삭제 이벤트
control2.on('removeFiles', function (p) {
$('.cpy_totalfileSize').text('0MB') ;
$('.cpy_totalfileCount').text('0');
control2Chg = 'N';
if(control2Tmprr == 'Y'){
if(confirm("삭제하시겠습니까?")){
innorixDelRprtAtchFile(p[0].uniqueFileName, 'cpy_rslt_atch_file_id')
control2Tmprr = 'N';
control2Chg = 'Y';
$("#control2DownBtn").css('display', 'none');
}else{
return false;
}
}
});
//증빙사진 컨트롤 생성
control3 = innorix.create({
el : '#evdnc', // 컨트롤 출력 객체 ID
installUrl: '<c:url value="/innorix/install/install.html" />', // Agent 설치 페이지
uploadUrl: '<c:url value="/innorix/exam/upload.jsp?el=evdnc" />', // 업로드 URL
maxFileCount : 1, // 첨부가능 파일 전체 개수
width : 870, // 컨트롤 출력 너비(pixel)
height : 80, // 컨트롤 출력 높이(pixel)
allowExtension : ["zip"],
useContextMenu : 'false'
});
// 파일 추가 이벤트
control3.on('afterAddFiles', function (p) {
$('.evdnc_totalfileSize').text(getStrFileSize(p[0].fileSize)) ;
$('.evdnc_totalfileCount').text(p.length);
control3Chg = 'Y';
});
// 파일 삭제 이벤트
control3.on('removeFiles', function (p) {
$('.evdnc_totalfileSize').text('0MB') ;
$('.evdnc_totalfileCount').text('0');
control3Chg = 'N';
if(control3Tmprr == 'Y'){
if(confirm("삭제하시겠습니까?")){
innorixDelRprtAtchFile(p[0].uniqueFileName, 'evdnc_pht_atch_file_id')
control3Tmprr = 'N';
control3Chg = 'Y';
$("#control3DownBtn").css('display', 'none');
}else{
return false;
}
}
});
//원격연수 이수증 컨트롤 생성
control4 = innorix.create({
el : '#rmttrn', // 컨트롤 출력 객체 ID
installUrl: '<c:url value="/innorix/install/install.html" />', // Agent 설치 페이지
uploadUrl: '<c:url value="/innorix/exam/upload.jsp?el=rmttrn" />', // 업로드 URL
maxFileCount : 1, // 첨부가능 파일 전체 개수
width : 870, // 컨트롤 출력 너비(pixel)
height : 80, // 컨트롤 출력 높이(pixel)
allowExtension : ["txt","xls","xlsx","png","jpg","jpeg","doc","ppt","hwp","pdf","zip"],
useContextMenu : 'false'
});
// 파일 추가 이벤트
control4.on('afterAddFiles', function (p) {
$('.rmtTrn_totalfileSize').text(getStrFileSize(p[0].fileSize)) ;
$('.rmtTrn_totalfileCount').text(p.length);
control4Chg = 'Y';
});
// 파일 삭제 이벤트
control4.on('removeFiles', function (p) {
$('.rmtTrn_totalfileSize').text('0MB') ;
$('.rmtTrn_totalfileCount').text('0');
control4Chg = 'N';
if(control4Tmprr == 'Y'){
if(confirm("삭제하시겠습니까?")){
innorixDelRprtAtchFile(p[0].uniqueFileName, 'rmt_trn_atch_file_id')
control4Tmprr = 'N';
control4Chg = 'Y';
$("#control4DownBtn").css('display', 'none');
}else{
return false;
}
}
});
//멀티 컨트롤 생성 - hidden으로 화면 비노출, 제출 시 컨트롤 1~4를 add하여 업로드
control5 = innorix.create({
el : '#fileControl5', // 컨트롤 출력 객체 ID
installUrl: '<c:url value="/innorix/install/install.html" />', // Agent 설치 페이지
uploadUrl: '<c:url value="/innorix/exam/upload.jsp" />', // 업로드 URL
maxFileCount : 4, // 첨부가능 파일 전체 개수
});
//임시저장 데이터가 있을 시 임시저장 파일 처리
if(control1Tmprr == 'Y'){
control1.presetDownloadFiles([{
printFileName: '${info.orgnlRsltAtchFileDetail.orignlFileNm}',
fileSize: '${info.orgnlRsltAtchFileDetail.fileSize}',
downloadUrl: urlBase + "download.jsp?fileName=" + '${info.orgnlRsltAtchFileDetail.streFileNm}',
uniqueFileName : '${info.orgnlRsltAtchFileDetail.atchFileId}'
}]);
control1Chg = 'N'; //임시저장 파일 세팅 시 'afterAddFiles' 이벤트에서 control1Chg = 'Y' 처리가 되어 다시 N으로 설정
}
if(control2Tmprr == 'Y'){
control2.presetDownloadFiles([{
printFileName: '${info.cpyRsltAtchFileDetail.orignlFileNm}',
fileSize: '${info.cpyRsltAtchFileDetail.fileSize}',
downloadUrl: urlBase + "download.jsp?fileName=" + '${info.cpyRsltAtchFileDetail.streFileNm}',
uniqueFileName : '${info.cpyRsltAtchFileDetail.atchFileId}'
}]);
control2Chg = 'N';
}
if(control3Tmprr == 'Y'){
control3.presetDownloadFiles([{
printFileName: '${info.evdncPhtAtchFileDetail.orignlFileNm}',
fileSize: '${info.evdncPhtAtchFileDetail.fileSize}',
downloadUrl: urlBase + "download.jsp?fileName=" + '${info.evdncPhtAtchFileDetail.streFileNm}',
uniqueFileName : '${info.evdncPhtAtchFileDetail.atchFileId}'
}]);
control3Chg = 'N';
}
if(control4Tmprr == 'Y'){
control4.presetDownloadFiles([{
printFileName: '${info.rmtTrnAtchFileDetail.orignlFileNm}',
fileSize: '${info.rmtTrnAtchFileDetail.fileSize}',
downloadUrl: urlBase + "download.jsp?fileName=" + '${info.rmtTrnAtchFileDetail.streFileNm}',
uniqueFileName : '${info.rmtTrnAtchFileDetail.atchFileId}'
}]);
control4Chg = 'N';
}
//첨부파일 업로드 후속조치 - 결과제출 시 처리
control5.on('uploadComplete', function (p) {
fn_callBackInnorixInsert(p.files);
});
});
function fn_callBackInnorixInsert(data){
var url = "<c:url value='/web/common/insertRprtInnorixFileAjax.do' />";
if(tmprrYn == 'Y'){ //임시 저장 데이터가 있을 시 테이블 update 처리
var url = "<c:url value='/web/common/updateRprtInnorixFileAjax.do' />";
}
var sendData = {
"eduAplctOrd": $('#eduAplctOrd').val()
, "aprvlCd" : $('#aprvlCd').val() //결과제출 - 10, 임시제출 - 230
, "innorixFileListVO": data
, "successMsg" : "제출 완료되었습니다."
}
if(fn_innorixCmmAjax(sendData, url) == "OK")
{
fncGoList();
}
}
function fncGoList(){
var linkForm = document.linkForm ;
linkForm.action = "<c:url value='/web/ve/aplct/cpyrgExprnClsrm/exprnClsrmEnd/exprnClsrmEndDetail.do'/>";
linkForm.submit();
}
function fncSave(){
if(control1.getFileCount() == 0){
alert("원본 결과보고서를 첨부해주세요.")
return false;
}
if(control2.getFileCount() == 0){
alert("평가용 결과보고서를 첨부해주세요.")
return false;
}
if(control3.getFileCount() == 0){
alert("증빙사진을 첨부해주세요.")
return false;
}
document.getElementById('aprvlCd').value = '10';
//임시저장 파일이 아닌 새로 추가한 파일만 업로드 처리
control5.removeAllFiles(); //control5 초기화
if(control1Chg == 'Y'){
control5.addFiles(control1.getAllFiles());
}
if(control2Chg == 'Y'){
control5.addFiles(control2.getAllFiles());
}
if(control3Chg == 'Y'){
control5.addFiles(control3.getAllFiles());
}
if(control4Chg == 'Y'){
control5.addFiles(control4.getAllFiles());
}
//업로드 파일 사이즈 500MB 제한
//임시로 저장되어 있던 파일들 용량까지 체크하기 위하여 control5.getTotalSize()가 아닌 각각 파일의 사이즈를 더하여 비교
if(control1.getTotalSize() + control2.getTotalSize() + control3.getTotalSize() + control4.getTotalSize()> 524288000){
alert("업로드 가능한 용량은 전체 파일을 합산한 기준으로 500MB 제한이 있습니다.")
return false;
}
//기존 임시 저장상태에서 새로 등록한 파일이 없다면, 상태 값만 10으로 update 처리
if(control5.getFileCount() == '0'){
var url = "<c:url value='/web/common/updateRprtInnorixFileAjax.do' />";
var sendData = {
"eduAplctOrd": $('#eduAplctOrd').val()
, "aprvlCd" : $('#aprvlCd').val()
, "successMsg" : "제출 완료되었습니다."
}
if(fn_innorixCmmAjax(sendData, url) == "OK")
{
fncGoList();
}
}else{
//업로드 경로 설정 -upload.jsp에서 uploader.setDirectory(innoDirPath) 식으로 사용
//230810 기준 : innoDirPath = globals_local.properties = /usr/local/tomcat/file/sht/ 경로지만
//upload.jsp에서 /app/doc/offedu/sht/로 다시 set. context-properties.xml에서 파일 경로도 /app/doc/offedu/sht/
var postObj = new Object();
postObj.innoDirPath = $('#innoDirPath').val();
control5.setPostData(postObj); // 업로드시 함께 전달될 POST Param 추가
control5.upload();
}
}
function fncTmprrSave(){
//첨부파일이 변경됐을시만 업로드. 임시저장으로 인하여 비교 필요
control5.removeAllFiles(); //control5 초기화
if(control1Chg == 'Y'){
control5.addFiles(control1.getAllFiles());
}
if(control2Chg == 'Y'){
control5.addFiles(control2.getAllFiles());
}
if(control3Chg == 'Y'){
control5.addFiles(control3.getAllFiles());
}
if(control4Chg == 'Y'){
control5.addFiles(control4.getAllFiles());
}
//업로드 파일 사이즈 500MB 제한
if(control1.getTotalSize() + control2.getTotalSize() + control3.getTotalSize() + control4.getTotalSize()> 524288000){
alert("업로드 가능한 용량은 전체 파일을 합산한 기준으로 500MB 제한이 있습니다.")
return false;
}
if((control1Chg == 'N' && control2Chg == 'N'
&& control3Chg == 'N' && control4Chg == 'N') || control5.getFileCount() == '0'){
alert("임시저장할 파일을 첨부해주세요.")
return false;
}
document.getElementById('aprvlCd').value = '230';
//업로드 경로 설정 -upload.jsp에서 uploader.setDirectory(innoDirPath) 식으로 사용
//230810 기준 : innoDirPath = globals_local.properties = /usr/local/tomcat/file/sht/ 경로지만
//upload.jsp에서 /app/doc/offedu/sht/로 다시 set. context-properties.xml에서 파일 경로도 /app/doc/offedu/sht/
var postObj = new Object();
postObj.innoDirPath = $('#innoDirPath').val();
control5.setPostData(postObj); // 업로드시 함께 전달될 POST Param 추가
control5.upload();
}
</script>
<form:form id="linkForm" name="linkForm" commandName="vEEduAplctVO" onsubmit="return false;" method="post">
<input type="hidden" name="eduAplctOrd" id="eduAplctOrd" value="${info.eduAplctOrd}" />
<input type="hidden" name="aprvlCd" id="aprvlCd" value="" />
<input type="hidden" id="innoDirPath" value="<spring:eval expression="@globalSettings['Globals.Innorix.FilePath']"/>" />
</form:form>
<div class="cont_wrap" id="sub">
<div class="cont_tit">
<h2>결과보고</h2>
<div class="sns_go">
<button type="button" title="새창열림"><img src="${pageContext.request.contextPath}/visitEdu/usr/publish/images/content/facebook_icon.png" alt="페이스북 바로가기"></button>
<button type="button" title="새창열림"><img src="${pageContext.request.contextPath}/visitEdu/usr/publish/images/content/twitter_icon.png" alt="트위터 바로가기"></button>
</div>
</div>
<div class="tb_tit01">
<div class="tb_tit01_left">
<p>결과보고 정보</p>
<span class="cf_text" style="font-size: 16px; font-weight: 400; color: #e40000;line-height: 1.5;margin-left:100px;">※ 업로드 가능한 용량은 전체 파일을 합산한 기준으로 500MB 제한이 있습니다.
<br/>&nbsp;&nbsp;&nbsp;&nbsp;용량을 초과할 경우, 오류 발생으로 인해 업로드가 되지 않으니 유의하시기 바랍니다. </span>
</div>
</div>
<div class="exprnClsrmEndRslt_wrap">
<dl class="filewrap_div">
<dt><p class="req_text"><span>필수입력 항목</span>*</p>원본 결과보고서</dt>
<dd>
<div class="btn_wrap">
<button type="button" onclick="control1.openFileDialogSingle();" class="btnType01 orgnl_btn_add_file">원본 결과보고서 파일찾기</button>
<c:if test="${info.orgnlRsltAtchFileId != null && info.orgnlRsltAtchFileId != ''}">
<button type="button" id="control1DownBtn" onclick="control1.download();" class="btnType01 cpy_btn_add_file">다운로드</button>
</c:if>
</div>
<div id="orgn"></div><br/>
<div class="file_cf">
<div class="cf_left">
<p>최대 <span class="orgnl_limitFileCount">1</span>개</p>
</div>
<div class="cf_right">
<p>등록된 파일 <span class="upload_number orgnl_totalfileCount">0</span>개</p>
<span class="upload_number orgnl_totalfileSize">0MB</span>
</div>
</div>
</dd>
</dl>
<dl class="filewrap_div">
<dt><p class="req_text"><span>필수입력 항목</span>*</p>평가용 결과보고서</dt>
<dd>
<div class="btn_wrap">
<button type="button" onclick="control2.openFileDialogSingle();" class="btnType01 cpy_btn_add_file">평가용 결과보고서 파일찾기</button>
<c:if test="${info.cpyRsltAtchFileId != null && info.cpyRsltAtchFileId != ''}">
<button type="button" id="control2DownBtn" onclick="control2.download();" class="btnType01 cpy_btn_add_file">다운로드</button>
</c:if>
</div>
<div id="cpy"></div><br/>
<div class="file_cf">
<div class="cf_left">
<p>최대 <span class="cpy_limitFileCount">1</span>개</p>
</div>
<div class="cf_right">
<p>등록된 파일 <span class="upload_number cpy_totalfileCount">0</span>개</p>
<span class="upload_number cpy_totalfileSize">0MB</span>
</div>
</div>
</dd>
</dl>
<dl class="filewrap_div">
<dt><p class="req_text"><span>필수입력 항목</span>*</p>증빙사진</dt>
<dd>
<div class="btn_wrap">
<button type="button" onclick="control3.openFileDialogSingle();" class="btnType01 evdnc_btn_add_file">증빙 사진 파일찾기</button>
<c:if test="${info.evdncPhtAtchFileId != null && info.evdncPhtAtchFileId != ''}">
<button type="button" id="control3DownBtn" onclick="control3.download();" class="btnType01 cpy_btn_add_file">다운로드</button>
</c:if>
</div>
<div id="evdnc"></div><br/>
<div class="file_cf">
<div class="cf_left">
<p>최대 <span class="evdnc_limitFileCount">1</span>개</p>
</div>
<div class="cf_right">
<p>등록된 파일 <span class="upload_number evdnc_totalfileCount">0</span>개</p>
<span class="upload_number evdnc_totalfileSize">0MB</span>
</div>
</div>
</dd>
</dl>
<dl class="filewrap_div">
<dt>원격연수 이수증</dt>
<dd>
<div class="btn_wrap">
<button type="button" onclick="control4.openFileDialogSingle();" class="btnType01 rmtTrn_btn_add_file">원격연수 이수증 파일찾기</button>
<c:if test="${info.rmtTrnAtchFileId != null && info.rmtTrnAtchFileId != ''}">
<button type="button" id="control4DownBtn" onclick="control4.download();" class="btnType01 cpy_btn_add_file">다운로드</button>
</c:if>
</div>
<div id="rmttrn"></div><br/>
<div class="file_cf">
<div class="cf_left">
<p>최대 <span class="rmtTrn_limitFileCount">1</span>개</p>
</div>
<div class="cf_right">
<p>등록된 파일 <span class="upload_number rmtTrn_totalfileCount">0</span>개</p>
<span class="upload_number rmtTrn_totalfileSize">0MB</span>
</div>
</div>
</dd>
</dl>
</div>
<div class="btn_wrap btn_layout01">
<div class="btn_left"></div>
<div class="btn_center">
<button type="button" class="btnType06" onclick="fncSave();">결과제출</button>
<button type="button" class="btnType06" onclick="fncTmprrSave();">임시저장</button>
</div>
<div class="btn_right">
<div id="fileControl5" style="display:none"></div>
<button type="button" class="btnType02 m_btn_block" onclick="fncGoList();">취소</button>
</div>
</div>
</div>

View File

@ -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', // 업로드, 다운로드 혼합사용 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); } console.log(fileArray); control.removeAllFiles(); // 리스트 컨트롤에서 파일을 삭제 control.presetDownloadFiles(fileArray); // 다운로드 목록을 구성 }); }; </script> </head> <body> <a href="../index.html">&larr; 예제 목록</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="/offeduadvc/innorix/innorix_dev.js"></script> <script> var control = new Object(); window.onload = function() { // 파일전송 컨트롤 생성 control = innorix.create({ el: '#fileControl', // 컨트롤 출력 HTML 객체 ID transferMode: 'both', // 업로드, 다운로드 혼합사용 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); } console.log(fileArray); control.removeAllFiles(); // 리스트 컨트롤에서 파일을 삭제 control.presetDownloadFiles(fileArray); // 다운로드 목록을 구성 }); }; </script> </head> <body> <a href="../index.html">&larr; 예제 목록</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>

View File

@ -15,7 +15,8 @@ String filePath = saveDir.substring(0, saveDir.lastIndexOf("/") + 1);
*/
// filePath = request.getParameter("innoDirPath");
filePath = "D:/usr/local/tomcat/file/sht/";
// filePath = "D:/usr/local/tomcat/file/sht/";
filePath = "/app/doc/offedu/sht/";
// downloadType : "stream" 설정시 자동 전달되는 GET Param 값
String szStartOffset = request.getParameter("_StartOffset");
String szEndOffset = request.getParameter("_EndOffset");

View File

@ -28,7 +28,7 @@
#fileTable tr > .fileInfo { display:none; }
</style>
<link rel="stylesheet" href="../innorix.css">
<script src="../innorix.js"></script>
<script src="/offeduadvc/innorix/innorix_dev.js"></script>
<script>
var innoJquery = innorix._load("innoJquery");
var control = new Object(); // 파일전송 컨트롤

View File

@ -3,6 +3,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="../innorix.css">
<script src="../innorix.js"></script>
<script src="/offeduadvc/innorix/innorix_dev.js"></script>
<script>
var control1 = new Object(); // 파일전송 컨트롤 1
var control2 = new Object(); // 파일전송 컨트롤 2

View File

@ -56,9 +56,10 @@ function fn_innorixCmmAjax(sendData, url){
/* 등록되어 있는 파일 삭제버튼 클릭시 */
function innorixDelAtchFile(itemId , fileSn){
var url = contextPath+"/uss/ion/fms/fmsfileDeleteAjax.do";
$.ajax({
type: "POST",
url: "/uss/ion/fms/fmsfileDeleteAjax.do",
url: url,
data:{ "atchFileId" : itemId , "fileSn" : fileSn},
dataType:'json',
cache: false,
@ -84,6 +85,38 @@ function innorixDelAtchFile(itemId , fileSn){
});
}
/* 저작권 체험교실 결과보고서 파일 삭제 - 파일삭제와 결과보고 테이블의 첨부파일 ID update 처리 */
function innorixDelRprtAtchFile(itemId , type){
var url = contextPath+"/web/common/deleteRprtInnorixFileAjax.do";
$.ajax({
type: "POST",
url: url,
data:JSON.stringify({ "atchFileId" : itemId , "fileType" : type, "eduAplctOrd" : eduAplctOrd}),
dataType:'json',
async: false,
contentType: "application/json",
cache: false,
success: function (returnData, status) {
if(status == 'success'){
if(returnData.result == 'fail'){
alert("삭제처리가 실패하였습니다.");
}else if(returnData.result == 'auth_fail'){
alert("세션이 종료되었습니다.");
}else if(returnData.result =='success'){
alert("삭제되었습니다.");
}
}else{
alert("삭제처리에 실패하였습니다.");
}
},
error: function (e) {
console.log("ERROR : ", e);
alert("삭제처리에 실패하였습니다.");
}
});
}
/*
* loadComplete에서 불러온 최초 파일 array에서
* 삭제된 파일 정보 삭제

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB