Leeyh1121 4 months ago
commit 4d81700ad1

@ -1,7 +1,8 @@
server: server:
shutdown: graceful shutdown: graceful
port: 9077 port: 9077
max-http-header-size: 100KB
servlet: servlet:
context-path: / context-path: /
session: session:

@ -41,8 +41,7 @@
<if test="sggID != null"> AND SGG_CD = #{sggID}</if> <if test="sggID != null"> AND SGG_CD = #{sggID}</if>
<if test="instCode != null"> AND INST_CD = #{instCode}</if> <if test="instCode != null"> AND INST_CD = #{instCode}</if>
<if test="deptIDs != null"> AND DEPT_CD IN (<foreach collection="deptIDs" item="deptID" separator=",">#{deptID}</foreach>)</if> <if test="deptIDs != null"> AND DEPT_CD IN (<foreach collection="deptIDs" item="deptID" separator=",">#{deptID}</foreach>)</if>
<if test="!includeAll"> AND USE_YN = 'Y'</if> <if test="!includeAll"> AND USE_YN = 'Y'</if></where>
</where>
<include refid="utility.orderBy" /> <include refid="utility.orderBy" />
<include refid="utility.paging-suffix" /></select> <include refid="utility.paging-suffix" /></select>

@ -19,9 +19,16 @@
<result property="useYN" column="USE_YN"/> <result property="useYN" column="USE_YN"/>
</resultMap> </resultMap>
<sql id="fileDir">CONCAT(#{addsFileRootPath}, DIR, DATE_FORMAT(CURRENT_DATE, '%Y/%m/%d/'))</sql>
<sql id="fileUrl">(CASE
WHEN REPLACE(FILE_PATH,#{type},'/files/') LIKE '_:%'
THEN SUBSTR(REPLACE(FILE_PATH,#{type},'/files/'),3)
ELSE REPLACE(FILE_PATH,#{type},'/files/')
END)</sql>
<sql id="fileDirs"> <sql id="fileDirs">
SELECT INF_TYPE SELECT INF_TYPE
, CONCAT(#{addsFileRootPath}, DIR, DATE_FORMAT(CURRENT_DATE, '/%Y/%m/%d/')) DIR ,<include refid="cokr.xit.base.file.dao.FileMapper.fileDir" /> DIR
FROM ( FROM (
SELECT '00' INF_TYPE, 'attachment' DIR FROM DUAL UNION SELECT '00' INF_TYPE, 'attachment' DIR FROM DUAL UNION
SELECT '01' INF_TYPE, 'document' DIR FROM DUAL UNION SELECT '01' INF_TYPE, 'document' DIR FROM DUAL UNION
@ -47,11 +54,7 @@ SELECT A.FILE_ID
, A.USE_YN , A.USE_YN
, A.REG_DT , A.REG_DT
, A.RGTR , A.RGTR
, (CASE ,<include refid="cokr.xit.base.file.dao.FileMapper.fileUrl" /> AS URL
WHEN REPLACE(FILE_PATH,#{type},'/files/') LIKE '_:%'
THEN SUBSTR(REPLACE(FILE_PATH,#{type},'/files/'),3)
ELSE REPLACE(FILE_PATH,#{type},'/files/')
END) AS URL
FROM TB_FILE A FROM TB_FILE A
WHERE FILE_ID IN (<foreach collection="fileIDs" item="fileID" separator=",">#{fileID}</foreach>) WHERE FILE_ID IN (<foreach collection="fileIDs" item="fileID" separator=",">#{fileID}</foreach>)
ORDER BY FILE_ID ORDER BY FILE_ID
@ -71,11 +74,7 @@ SELECT A.FILE_ID
, A.USE_YN , A.USE_YN
, A.REG_DT , A.REG_DT
, A.RGTR , A.RGTR
, (CASE ,<include refid="cokr.xit.base.file.dao.FileMapper.fileUrl" /> AS URL
WHEN REPLACE(FILE_PATH,#{type},'/files/') LIKE '_:%'
THEN SUBSTR(REPLACE(FILE_PATH,#{type},'/files/'),3)
ELSE REPLACE(FILE_PATH,#{type},'/files/')
END) AS URL
FROM TB_FILE A FROM TB_FILE A
<where> <where>
<if test="infoType != null"> AND A.INF_TYPE = #{infoType}</if> <if test="infoType != null"> AND A.INF_TYPE = #{infoType}</if>

@ -21,7 +21,7 @@
<!-- base --> <!-- base -->
<script src="<c:url value="/webjars/js/base/base.js"/>"></script> <script src="<c:url value="/webjars/js/base/base.js"/>"></script>
<script src="<c:url value="/webjars/js/base/dataset.js"/>"></script> <script src="<c:url value="/webjars/js/base/dataset.js"/>"></script>
<script src="<c:url value="/resources/js/base/upload-support.js?${ver}"/>"></script> <script src="<c:url value="/webjars/js/base/upload-support.js?${ver}"/>"></script>
<script src="<c:url value="/webjars/js/base/code.js"/>"></script> <script src="<c:url value="/webjars/js/base/code.js"/>"></script>
<script src="<c:url value="/webjars/js/base/code-support.js"/>"></script> <script src="<c:url value="/webjars/js/base/code-support.js"/>"></script>
<script src="<c:url value="/webjars/js/base/menu.js"/>"></script> <script src="<c:url value="/webjars/js/base/menu.js"/>"></script>

@ -1,23 +0,0 @@
function uploadSupport(selector) {
let input = $(selector);
if (!input)
throw "Element not found: " + selector;
let fileset = new Dataset({
keymapper: info => info.id
});
input.change(function() {
var files = $(this).get(0).files,
length = files.length,
array = []
for (var i = 0; i < length; ++i) {
var file = files[i];
file.id = "file-" + new Date().getTime() + "-" + i;
file.url = (window.URL || window.webkitURL).createObjectURL(file);
array.push(file);
}
fileset.setData(array);
});
return fileset;
}
Loading…
Cancel
Save