기준코드리스트 where절추가
parent
5db2e775bd
commit
eb7e6ad202
|
|
@ -25,7 +25,7 @@ function StandardCodeList(props) {
|
||||||
const bbsId = location.state?.bbsId || NOTICE_BBS_ID;
|
const bbsId = location.state?.bbsId || NOTICE_BBS_ID;
|
||||||
|
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const [searchCondition, setSearchCondition] = useState(location.state?.searchCondition || { bbsId: bbsId, pageIndex: 1, searchCnd: '0', searchWrd: '' });// 기존 조회에서 접근 했을 시 || 신규로 접근 했을 시
|
const [searchCondition, setSearchCondition] = useState(location.state?.searchCondition || { listCode: listCode, pageIndex: 1, searchCnd: '0', searchWrd: '' });// 기존 조회에서 접근 했을 시 || 신규로 접근 했을 시
|
||||||
const [masterBoard, setMasterBoard] = useState({});
|
const [masterBoard, setMasterBoard] = useState({});
|
||||||
const [paginationInfo, setPaginationInfo] = useState({});
|
const [paginationInfo, setPaginationInfo] = useState({});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -110,6 +110,7 @@ public class StandardCodeController extends BaseController {
|
||||||
paginationInfo.setPageSize(propertyService.getInt("Globals.pageSize"));
|
paginationInfo.setPageSize(propertyService.getInt("Globals.pageSize"));
|
||||||
|
|
||||||
System.out.println("@@@ pageIndex : " + tnDocumentInfo.getPageIndex());
|
System.out.println("@@@ pageIndex : " + tnDocumentInfo.getPageIndex());
|
||||||
|
System.out.println("@@@ listCode : " + tnDocumentInfo.getListCode());
|
||||||
|
|
||||||
tnDocumentInfo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
tnDocumentInfo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||||
tnDocumentInfo.setLastIndex(paginationInfo.getLastRecordIndex());
|
tnDocumentInfo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||||
|
|
|
||||||
|
|
@ -101,4 +101,6 @@ public class TnDocumentInfo {
|
||||||
private int recordCountPerPage = 10;
|
private int recordCountPerPage = 10;
|
||||||
@Schema(description = "레코드 번호")
|
@Schema(description = "레코드 번호")
|
||||||
private int rowNo = 0;
|
private int rowNo = 0;
|
||||||
|
@Schema(description = "")
|
||||||
|
private String listCode;
|
||||||
}
|
}
|
||||||
|
|
@ -5,48 +5,60 @@
|
||||||
|
|
||||||
<select id="selectStandardCodeList" parameterType="TnDocumentInfo" resultType="TnDocumentInfo">
|
<select id="selectStandardCodeList" parameterType="TnDocumentInfo" resultType="TnDocumentInfo">
|
||||||
SELECT
|
SELECT
|
||||||
doc_info_seq,
|
tdi.doc_info_seq,
|
||||||
use_yn,
|
tdi.use_yn,
|
||||||
rvsn_ymd,
|
tdi.rvsn_ymd,
|
||||||
rvsn_file_grp_id,
|
tdi.rvsn_file_grp_id,
|
||||||
old_seq,
|
tdi.old_seq,
|
||||||
old_kcsc_cd,
|
tdi.old_kcsc_cd,
|
||||||
last_yn,
|
tdi.last_yn,
|
||||||
last_chg_id,
|
tdi.last_chg_id,
|
||||||
last_chg_dt,
|
tdi.last_chg_dt,
|
||||||
kcsc_cd,
|
tdi.kcsc_cd,
|
||||||
group_seq,
|
tdi.group_seq,
|
||||||
frst_crt_id,
|
tdi.frst_crt_id,
|
||||||
frst_crt_dt,
|
tdi.frst_crt_dt,
|
||||||
estb_ymd,
|
tdi.estb_ymd,
|
||||||
doc_yr,
|
tdi.doc_yr,
|
||||||
doc_rvsn_remark,
|
tdi.doc_rvsn_remark,
|
||||||
doc_rev_hist_seq,
|
tdi.doc_rev_hist_seq,
|
||||||
doc_relation,
|
tdi.doc_relation,
|
||||||
doc_publish,
|
tdi.doc_publish,
|
||||||
doc_order,
|
tdi.doc_order,
|
||||||
doc_nm,
|
tdi.doc_nm,
|
||||||
doc_file_grp_id,
|
tdi.doc_file_grp_id,
|
||||||
doc_er,
|
tdi.doc_er,
|
||||||
doc_dept,
|
tdi.doc_dept,
|
||||||
doc_cycl,
|
tdi.doc_cycl,
|
||||||
doc_consider,
|
tdi.doc_consider,
|
||||||
doc_brief,
|
tdi.doc_brief,
|
||||||
doc_advice,
|
tdi.doc_advice,
|
||||||
aplcn_end_ymd,
|
tdi.aplcn_end_ymd,
|
||||||
aplcn_bgng_ymd
|
tdi.aplcn_bgng_ymd
|
||||||
FROM
|
FROM
|
||||||
tn_document_info
|
tn_document_info tdi, tn_document_group tdg
|
||||||
WHERE 1 = 1
|
<include refid="selectStandardCodeListWhere"></include>
|
||||||
ORDER BY doc_info_seq desc
|
ORDER BY tdi.kcsc_cd
|
||||||
LIMIT #{recordCountPerPage} OFFSET #{firstIndex}
|
LIMIT #{recordCountPerPage} OFFSET #{firstIndex}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectStandardCodeListCnt" parameterType="TnDocumentInfo" resultType="int">
|
<select id="selectStandardCodeListCnt" parameterType="TnDocumentInfo" resultType="int">
|
||||||
SELECT count(*)
|
SELECT count(*)
|
||||||
FROM
|
FROM
|
||||||
tn_document_info
|
tn_document_info tdi, tn_document_group tdg
|
||||||
WHERE 1 = 1
|
<include refid="selectStandardCodeListWhere"></include>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<sql id="selectStandardCodeListWhere">
|
||||||
|
<where>
|
||||||
|
and tdi.group_seq = tdg.group_seq
|
||||||
|
and tdi.kcsc_cd like 'KDS%'
|
||||||
|
and tdi.last_yn = 'Y'
|
||||||
|
and tdi.use_yn = 'Y'
|
||||||
|
<if test="listCode != null and listCode != ''">
|
||||||
|
and tdg.group_full_cd like #{listCode} || '%'
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue