diff --git a/src/main/resources/sql/mapper/base/file-mapper.xml b/src/main/resources/sql/mapper/base/file-mapper.xml index 00d066b..bee752e 100644 --- a/src/main/resources/sql/mapper/base/file-mapper.xml +++ b/src/main/resources/sql/mapper/base/file-mapper.xml @@ -57,7 +57,7 @@ SELECT A.*, REPLACE(FILE_PATH, 'C://workspace/xit/base', '') URL SELECT NEW_ID, CONCAT(DIR, NEW_ID, '.', #{file.extension}) PATH FROM ( - SELECT IFNULL(MAX(FILE_ID) + 1, CONCAT(THIS_DAY, '00001')) NEW_ID + SELECT NVL(MAX(FILE_ID) + 1, CONCAT(THIS_DAY, '00001')) NEW_ID FROM TB_FILE A, () B WHERE FILE_ID LIKE CONCAT(THIS_DAY, '%') ) T1, ( diff --git a/src/main/resources/sql/mapper/base/menu-mapper.xml b/src/main/resources/sql/mapper/base/menu-mapper.xml index 2856c0b..599e194 100644 --- a/src/main/resources/sql/mapper/base/menu-mapper.xml +++ b/src/main/resources/sql/mapper/base/menu-mapper.xml @@ -31,7 +31,7 @@ SELECT A.* /* 메뉴 등록(menuMapper.insertMenu) */ SELECT NEW_NO, NEW_ORD - FROM (SELECT IFNULL(MAX(MENU_NO) + 1, 0) NEW_NO FROM TB_MENU) A, + FROM (SELECT NVL(MAX(MENU_NO) + 1, 0) NEW_NO FROM TB_MENU) A, () B INSERT INTO TB_MENU ( MENU_NO @@ -69,7 +69,7 @@ UPDATE TB_MENU SET , IMG_CNF = #{menu.imageConf} WHERE MENU_NO = #{menu.id} -SELECT IFNULL(MAX(SRT_ORD) + 1, 0) NEW_ORD FROM TB_MENU WHERE PRNT_NO = IFNULL(#{parentID}, IFNULL(#{menu.parentID}, 0)) +SELECT NVL(MAX(SRT_ORD) + 1, 0) NEW_ORD FROM TB_MENU WHERE PRNT_NO = NVL(#{parentID}, NVL(#{menu.parentID}, 0)) /* 메뉴 이동(menuMapper.moveMenus) */ UPDATE TB_MENU SET diff --git a/src/main/resources/sql/mapper/base/user-mapper.xml b/src/main/resources/sql/mapper/base/user-mapper.xml index bc46fb6..ba8cc20 100644 --- a/src/main/resources/sql/mapper/base/user-mapper.xml +++ b/src/main/resources/sql/mapper/base/user-mapper.xml @@ -89,7 +89,7 @@ SELECT * AND NSTT_CD = #{institute} -SELECT LPAD(IFNULL(MAX(USER_ID) + 1, 1), 10, '0') NEW_ID FROM TB_USER +SELECT LPAD(NVL(MAX(USER_ID) + 1, 1), 10, '0') NEW_ID FROM TB_USER /* 사용자 정보 등록(userMapper.insertUser) */ INSERT INTO TB_USER ( USER_ID diff --git a/src/main/resources/sql/mapper/base/utility.xml b/src/main/resources/sql/mapper/base/utility.xml index 5187fae..c927282 100644 --- a/src/main/resources/sql/mapper/base/utility.xml +++ b/src/main/resources/sql/mapper/base/utility.xml @@ -20,16 +20,23 @@ SELECT FOUND_ROWS() TOT_CNT -DATE_FORMAT(CURRENT_TIMESTAMP(), '%Y%m%d%H%i%s') - -SELECTNOW + +DATE_FORMAT(CURRENT_TIMESTAMP, '%Y%m%d%H%i%s') DATE_FORMAT(CURRENT_DATE, '%Y%m%d') -SELECTTODAY + + +SELECTNOW FROM DUAL + +SELECTTODAY FROM DUAL -IFNULL(#{thisDay},) +NVL(#{thisDay},) -SELECTTHIS_DAY +SELECTTHIS_DAY FROM DUAL \ No newline at end of file diff --git a/src/main/resources/sql/mybatis-config.xml b/src/main/resources/sql/mybatis-config.xml index 03ad4e8..44b3157 100644 --- a/src/main/resources/sql/mybatis-config.xml +++ b/src/main/resources/sql/mybatis-config.xml @@ -19,7 +19,7 @@ - + \ No newline at end of file diff --git a/src/main/webapp/resources/js/base/base.js b/src/main/webapp/resources/js/base/base.js index a3d986b..ad18c15 100644 --- a/src/main/webapp/resources/js/base/base.js +++ b/src/main/webapp/resources/js/base/base.js @@ -227,7 +227,7 @@ var ajax = { dialog.alert({ title:resp.title, - content:resp.message + content:[resp.description, resp.message].join("
") }); debug("stacktrace", stacktrace); diff --git a/src/main/webapp/resources/js/base/dataset.js b/src/main/webapp/resources/js/base/dataset.js index 7eb0ebf..aae80b2 100644 --- a/src/main/webapp/resources/js/base/dataset.js +++ b/src/main/webapp/resources/js/base/dataset.js @@ -1275,6 +1275,7 @@ class DatasetControl { _load() { if (!this.query.pageNum) this.query.pageNum = 1; + ajax.get({ url:this.urls.load, data:this.query, @@ -1287,6 +1288,14 @@ class DatasetControl { } }); } + + download(all) { + if (all) + this.query.fetchAll = all; + let query = toQuery(this.query); + this.query.download = this.query.fetchAll = null; + document.location.href = this.urls.load + "? " + query; + } setData(obj) { this.dataset.setData(obj);