Merge branch 'advc' of http://yongjoon.cho@vcs.iten.co.kr:9999/hylee/offedu into advc
This commit is contained in:
commit
1bdd37f0b0
@ -131,4 +131,6 @@ public interface EgovFileMngService {
|
||||
public void updateFileName(FileVO fileVO) throws Exception;
|
||||
|
||||
public void deleteOffeduFile(FileVO fvo, VEEduAplctVO vEEduAplctVO) throws Exception;
|
||||
|
||||
public List<FileVO> selectZipFileOrderList(FileVO fvo) throws Exception;
|
||||
}
|
||||
|
||||
@ -94,6 +94,8 @@ public class FileVO implements Serializable {
|
||||
*/
|
||||
public String downloadType;
|
||||
|
||||
public String orderQuery;
|
||||
|
||||
public String getMaxFileNum() {
|
||||
return maxFileNum;
|
||||
}
|
||||
@ -344,4 +346,13 @@ public class FileVO implements Serializable {
|
||||
public void setDownloadType(String downloadType) {
|
||||
this.downloadType = downloadType;
|
||||
}
|
||||
|
||||
public String getOrderQuery() {
|
||||
return orderQuery;
|
||||
}
|
||||
|
||||
public void setOrderQuery(String orderQuery) {
|
||||
this.orderQuery = orderQuery;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -214,4 +214,9 @@ public class EgovFileMngServiceImpl extends EgovAbstractServiceImpl implements E
|
||||
}
|
||||
fileMngDAO.deleteFileInf(fileVO); //DB삭제
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FileVO> selectZipFileOrderList(FileVO fvo) throws Exception {
|
||||
return fileMngDAO.selectZipFileOrderList(fvo);
|
||||
}
|
||||
}
|
||||
|
||||
@ -203,4 +203,10 @@ public class FileManageDAO extends EgovComAbstractDAO {
|
||||
public int updateOffeduFileNull(VEEduAplctVO vEEduAplctVO) throws Exception {
|
||||
return update("FileManageDAO.updateOffeduFileNull", vEEduAplctVO);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<FileVO> selectZipFileOrderList(FileVO vo) throws Exception {
|
||||
return (List<FileVO>) list("FileManageDAO.selectZipFileOrderList", vo);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -799,7 +799,17 @@ String[] order = {
|
||||
fileVO.setDownloadType(downloadType);
|
||||
|
||||
fileVO.setAtchFileIdList(atchFileIdList);
|
||||
List<FileVO> fvoList = fileService.selectZipFileList(fileVO); // 해당 기능에 맞게 파일 조회
|
||||
|
||||
//IN에 들어간대로 정렬하기 위한 처리
|
||||
String orderQuery = "'";
|
||||
for(String fileId : atchFileIdList) {
|
||||
orderQuery += fileId + ",";
|
||||
}
|
||||
orderQuery = orderQuery.substring(0, orderQuery.length() -1); //마지막 쉼표 삭제
|
||||
orderQuery += "' , a.ATCH_FILE_ID";
|
||||
fileVO.setOrderQuery(orderQuery);
|
||||
|
||||
List<FileVO> fvoList = fileService.selectZipFileOrderList(fileVO); // 해당 기능에 맞게 파일 조회
|
||||
|
||||
int size = 1024;
|
||||
byte[] buf = new byte[size];
|
||||
|
||||
@ -276,4 +276,38 @@
|
||||
WHERE 1=1
|
||||
AND edu_aplct_ord = #eduAplctOrd#
|
||||
</update>
|
||||
|
||||
<select id="FileManageDAO.selectZipFileOrderList" parameterClass="FileVO" resultMap="fileList" >
|
||||
/* FileManageDAO.selectZipFileList */
|
||||
SELECT
|
||||
a.ATCH_FILE_ID, b.FILE_CN, b.FILE_SN, b.FILE_STRE_COURS, b.STRE_FILE_NM,
|
||||
b.FILE_EXTSN, b.ORIGNL_FILE_NM, b.FILE_SIZE, TO_CHAR(a.CREAT_DT, 'YYYY-MM-DD HH24:MI:SS' ) AS CREAT_DT
|
||||
FROM
|
||||
LETTNFILE a, LETTNFILEDETAIL b
|
||||
WHERE
|
||||
a.ATCH_FILE_ID = b.ATCH_FILE_ID
|
||||
AND
|
||||
a.USE_AT = 'Y'
|
||||
|
||||
|
||||
<isEqual property="downloadType" compareValue="A">
|
||||
AND a.ATCH_FILE_ID IN
|
||||
<iterate property="atchFileIdList" open="(" close=")" conjunction=",">
|
||||
#atchFileIdList[]#
|
||||
</iterate>
|
||||
<isNotEmpty property="fileSn">
|
||||
AND b.FILE_SN = #fileSn#
|
||||
</isNotEmpty>
|
||||
</isEqual>
|
||||
|
||||
<isEqual property="downloadType" compareValue="B">
|
||||
AND a.ATCH_FILE_ID = #atchFileId#
|
||||
AND b.FILE_SN IN
|
||||
<iterate property="atchFileSnList" open="(" close=")" conjunction=",">
|
||||
#atchFileSnList[]#
|
||||
</iterate>
|
||||
</isEqual>
|
||||
|
||||
ORDER BY INSTR ($orderQuery$)
|
||||
</select>
|
||||
</sqlMap>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user