중간저장.
parent
3ff1ce7481
commit
163d0ecd4f
|
|
@ -29,25 +29,21 @@
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
.code_list .head >span:nth-child(5),.code_list .result .List_Codes >div:nth-child(5){
|
.code_list .head >span:nth-child(5),.code_list .result .List_Codes >div:nth-child(5){
|
||||||
width: 7%;
|
width: 15%;
|
||||||
}
|
}
|
||||||
.code_list .head >span:nth-child(6),.code_list .result .List_Codes >div:nth-child(6){
|
.code_list .head >span:nth-child(6),.code_list .result .List_Codes >div:nth-child(6){
|
||||||
width: 7%;
|
width: 15%;
|
||||||
}
|
}
|
||||||
.code_list .head > span:nth-child(7),.code_list .result .List_Codes >div:nth-child(7){
|
.code_list .head > span:nth-child(7),.code_list .result .List_Codes >div:nth-child(7){
|
||||||
width: 7%;
|
width: 7%;
|
||||||
}
|
}
|
||||||
.code_list .head >span:nth-child(8),.code_list .result .List_Codes >div:nth-child(8){
|
|
||||||
width: 8%;
|
|
||||||
}
|
|
||||||
.code_list .result .List_Codes >div:nth-child(1),
|
.code_list .result .List_Codes >div:nth-child(1),
|
||||||
.code_list .result .List_Codes >div:nth-child(2),
|
.code_list .result .List_Codes >div:nth-child(2),
|
||||||
.code_list .result .List_Codes >div:nth-child(3),
|
.code_list .result .List_Codes >div:nth-child(3),
|
||||||
.code_list .result .List_Codes >div:nth-child(4),
|
.code_list .result .List_Codes >div:nth-child(4),
|
||||||
.code_list .result .List_Codes >div:nth-child(5),
|
.code_list .result .List_Codes >div:nth-child(5),
|
||||||
.code_list .result .List_Codes >div:nth-child(6),
|
.code_list .result .List_Codes >div:nth-child(6),
|
||||||
.code_list .result .List_Codes >div:nth-child(7),
|
.code_list .result .List_Codes >div:nth-child(7){
|
||||||
.code_list .result .List_Codes >div:nth-child(8){
|
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
.codelistcontent{
|
.codelistcontent{
|
||||||
|
|
|
||||||
|
|
@ -5,47 +5,16 @@ import * as EgovNet from 'api/egovFetch';
|
||||||
import URL from 'constants/url';
|
import URL from 'constants/url';
|
||||||
import {StandardCodeListModal, StandardCodeListModalTable} from './StandardCodeListModal'
|
import {StandardCodeListModal, StandardCodeListModalTable} from './StandardCodeListModal'
|
||||||
import {AiFillFileMarkdown, AiFillStar} from "react-icons/ai";
|
import {AiFillFileMarkdown, AiFillStar} from "react-icons/ai";
|
||||||
|
import StandardCodeSearchForm from "./StandardCodeSearchForm";
|
||||||
|
|
||||||
function StandardCodeList(props) {
|
function StandardCodeList({}) {
|
||||||
const {listCode} = useParams();
|
const {listCode} = useParams();
|
||||||
const [show, setShow] = useState(false);
|
const [listData, setListData] = useState([])
|
||||||
const [groupSeq, setgroupSeq] = useState();
|
|
||||||
|
|
||||||
console.group("StandardCodeList");
|
|
||||||
console.log("[Start] StandardCodeList ------------------------------");
|
|
||||||
console.log("StandardCodeList [props] : ", props);
|
|
||||||
console.log("listcode----------------------------" + listCode);
|
|
||||||
|
|
||||||
const location = useLocation();
|
|
||||||
console.log("StandardCodeList [location] : ", location);
|
|
||||||
|
|
||||||
const category1Ref = useRef();
|
|
||||||
const category2Ref = useRef();
|
|
||||||
const category3Ref = useRef();
|
|
||||||
const wrdRef = useRef();
|
|
||||||
|
|
||||||
// eslint-disable-next-line no-unused-vars
|
|
||||||
const [searchCondition, setSearchCondition] = useState(location.state?.searchCondition || {
|
|
||||||
pageIndex: 1,
|
|
||||||
tab: listCode?.substring(0, 2),
|
|
||||||
category1: listCode?.substring(2, 4),
|
|
||||||
category2: listCode?.substring(4, 6),
|
|
||||||
searchWrd: ''
|
|
||||||
});// 기존 조회에서 접근 했을 시 || 신규로 접근 했을 시
|
|
||||||
const [masterBoard, setMasterBoard] = useState({});
|
|
||||||
|
|
||||||
/* 검색기능 추가 변수*/
|
|
||||||
const [listData, setlistData] = useState([]);
|
|
||||||
const [filterData, setFilterData] = useState('');
|
const [filterData, setFilterData] = useState('');
|
||||||
const [category1List, setCategory1List] = useState([]);
|
|
||||||
const [category2List, setCategory2List] = useState([]);
|
|
||||||
const [category3List, setCategory3List] = useState([]);
|
|
||||||
const [resultCnt, setResultCnt] = useState(0);
|
const [resultCnt, setResultCnt] = useState(0);
|
||||||
|
const [groupSeq, setGroupSeq] = useState();
|
||||||
|
|
||||||
/* 탭 */
|
const [show, setShow] = useState(false);
|
||||||
const [activeTab, setActiveTab] = useState(10);
|
|
||||||
const [subTabsVisible, setSubTabsVisible] = useState(false);
|
|
||||||
|
|
||||||
function close() {
|
function close() {
|
||||||
setShow(false);
|
setShow(false);
|
||||||
}
|
}
|
||||||
|
|
@ -89,74 +58,33 @@ function StandardCodeList(props) {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
setgroupSeq(<StandardCodeListModalTable head={head} content={body}/>);
|
setGroupSeq(<StandardCodeListModalTable head={head} content={body}/>);
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
setShow(true);
|
setShow(true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const handleTabClick = (tabName) => {
|
|
||||||
setActiveTab(tabName);
|
|
||||||
|
|
||||||
const updatedCondition = {
|
|
||||||
...searchCondition,
|
|
||||||
tab: tabName,
|
|
||||||
category1: '',
|
|
||||||
category2: '',
|
|
||||||
category3: '',
|
|
||||||
searchWrd: '',
|
|
||||||
};
|
|
||||||
|
|
||||||
setSearchCondition(updatedCondition);
|
|
||||||
retrieveList(updatedCondition);
|
|
||||||
|
|
||||||
if ([40, 50, 60, 70, 80, 90].includes(tabName)) {
|
|
||||||
setSubTabsVisible(true);
|
|
||||||
} else {
|
|
||||||
setSubTabsVisible(false);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const retrieveList = useCallback((searchCondition) => {
|
const retrieveList = useCallback((searchCondition) => {
|
||||||
console.groupCollapsed("StandardCodeList.retrieveList()");
|
if(searchCondition?.tab){
|
||||||
|
EgovNet.requestFetch('/standardCode/standard-code-list'+EgovNet.convParams(searchCondition),
|
||||||
const retrieveListURL = '/standardCode/selectStandardCodeList.do';
|
{
|
||||||
const requestOptions = {
|
method: "GET",
|
||||||
method: "POST",
|
|
||||||
headers: {
|
headers: {
|
||||||
'Content-type': 'application/json',
|
'Content-type': 'application/json',
|
||||||
},
|
|
||||||
body: JSON.stringify(searchCondition)
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
EgovNet.requestFetch(retrieveListURL,
|
|
||||||
requestOptions,
|
|
||||||
(resp) => {
|
(resp) => {
|
||||||
setMasterBoard(resp.result.tnDocumentInfo);
|
setListData(resp.result.resultList);
|
||||||
/*검색을 위한 리스트 state에 저장*/
|
|
||||||
setlistData(resp.result.resultList);
|
|
||||||
setCategory1List(resp.result.category1List);
|
|
||||||
setCategory2List(resp.result.category2List);
|
|
||||||
setCategory3List(resp.result.category3List);
|
|
||||||
setResultCnt(resp.result.resultCnt);
|
setResultCnt(resp.result.resultCnt);
|
||||||
// 리스트 항목 구성
|
|
||||||
},
|
},
|
||||||
function (resp) {
|
function (resp) {
|
||||||
console.log("err response : ", resp);
|
console.log("err response : ", resp);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
console.groupEnd("StandardCodeList.retrieveList()");
|
}
|
||||||
|
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
retrieveList(searchCondition);
|
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
console.log("------------------------------StandardCodeList [End]");
|
|
||||||
console.groupEnd("StandardCodeList");
|
|
||||||
return (
|
return (
|
||||||
<div className="StandardCodeList container">
|
<div className="StandardCodeList container">
|
||||||
<div className="c_wrap codelistcontent">
|
<div className="c_wrap codelistcontent">
|
||||||
|
|
@ -172,112 +100,10 @@ function StandardCodeList(props) {
|
||||||
<div className="top_tit">
|
<div className="top_tit">
|
||||||
<h2 className="tit_1">건설기준코드 검색</h2>
|
<h2 className="tit_1">건설기준코드 검색</h2>
|
||||||
</div>
|
</div>
|
||||||
<div className="condition">
|
<StandardCodeSearchForm param={listCode} reloadFunction={retrieveList}/>
|
||||||
<ul>
|
|
||||||
<li className="third_1 L">
|
|
||||||
<div className={`tab ${activeTab === 10 ? 'active' : ''}`} onClick={() => handleTabClick(10)}>설계기준</div>
|
|
||||||
</li>
|
|
||||||
<li className="third_1 L">
|
|
||||||
<div className={`tab ${activeTab === 20 ? 'active' : ''}`} onClick={() => handleTabClick(20)}>표준시방서</div>
|
|
||||||
</li>
|
|
||||||
<li className="third_1 L">
|
|
||||||
<div className={`tab ${[40, 50, 60, 70, 80, 90].includes(activeTab) ? 'active' : ''}`} onClick={() => handleTabClick(40)}>전문시방서</div>
|
|
||||||
</li>
|
|
||||||
<li className="third_1 L">
|
|
||||||
<label className="f_select" htmlFor="sel1">
|
|
||||||
<select id="sel1" title="조건" value={searchCondition.category1} ref={category1Ref}
|
|
||||||
onChange={e => {
|
|
||||||
const updatedCondition = {
|
|
||||||
...searchCondition,
|
|
||||||
category1: e.target.value,
|
|
||||||
category2: '',
|
|
||||||
category3: '',
|
|
||||||
searchWrd: wrdRef.current.value,
|
|
||||||
tab: activeTab
|
|
||||||
};
|
|
||||||
|
|
||||||
setSearchCondition(updatedCondition);
|
|
||||||
retrieveList(updatedCondition);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<option value="">전체</option>
|
|
||||||
{category1List.map(category => (
|
|
||||||
<option key={category.groupSeq} value={category.groupFullCd.substring(2, 4)}>{category.groupNm}</option>
|
|
||||||
))}
|
|
||||||
</select>
|
|
||||||
</label>
|
|
||||||
</li>
|
|
||||||
<li className="third_1 L">
|
|
||||||
<label className="f_select w_306" htmlFor="sel1">
|
|
||||||
<select id="sel2" title="조건" value={searchCondition.category2} ref={category2Ref}
|
|
||||||
onChange={e => {
|
|
||||||
const updatedCondition = {
|
|
||||||
...searchCondition,
|
|
||||||
category1: category1Ref.current.value,
|
|
||||||
category2: category2Ref.current.value,
|
|
||||||
category3: '',
|
|
||||||
searchWrd: wrdRef.current.value,
|
|
||||||
tab: activeTab
|
|
||||||
};
|
|
||||||
|
|
||||||
setSearchCondition(updatedCondition);
|
|
||||||
retrieveList(updatedCondition);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<option value="">전체</option>
|
|
||||||
{category2List.map(category => (
|
|
||||||
<option key={category.groupSeq} value={category.groupFullCd.substring(4, 6)}>{category.groupNm}</option>
|
|
||||||
))}
|
|
||||||
</select>
|
|
||||||
</label>
|
|
||||||
</li>
|
|
||||||
<li className="third_1 L">
|
|
||||||
<label className="f_select w_306" htmlFor="sel1">
|
|
||||||
<select id="sel3" title="조건" value={searchCondition.category3} ref={category3Ref}
|
|
||||||
onChange={e => {
|
|
||||||
const updatedCondition = {
|
|
||||||
...searchCondition,
|
|
||||||
category1: category1Ref.current.value,
|
|
||||||
category2: category2Ref.current.value,
|
|
||||||
category3: category3Ref.current.value,
|
|
||||||
searchWrd: wrdRef.current.value,
|
|
||||||
tab: activeTab
|
|
||||||
};
|
|
||||||
|
|
||||||
setSearchCondition(updatedCondition);
|
|
||||||
retrieveList(updatedCondition);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<option value="">전체</option>
|
|
||||||
{category3List.map(category => (
|
|
||||||
<option key={category.groupSeq} value={category.groupFullCd.substring(6, 8)}>{category.groupNm}</option>
|
|
||||||
))}
|
|
||||||
</select>
|
|
||||||
</label>
|
|
||||||
</li>
|
|
||||||
<li className="third_1 L">
|
|
||||||
<div className={`tab`}>통합 다운로드</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
{/* <!--// 검색조건 --> */}
|
|
||||||
{subTabsVisible && (
|
|
||||||
<div className="right_col">
|
|
||||||
<div className="mini_board">
|
|
||||||
<ul>
|
|
||||||
<div className={`tab ${activeTab === 40 ? 'active' : ''}`} onClick={() => handleTabClick(40)}>서울특별시</div>
|
|
||||||
<div className={`tab ${activeTab === 50 ? 'active' : ''}`} onClick={() => handleTabClick(50)}>고속도로공사</div>
|
|
||||||
<div className={`tab ${activeTab === 60 ? 'active' : ''}`} onClick={() => handleTabClick(60)}>한국농어촌공사</div>
|
|
||||||
<div className={`tab ${activeTab === 70 ? 'active' : ''}`} onClick={() => handleTabClick(70)}>철도건설공사</div>
|
|
||||||
<div className={`tab ${activeTab === 80 ? 'active' : ''}`} onClick={() => handleTabClick(80)}>LH한국토지주택공사</div>
|
|
||||||
<div className={`tab ${activeTab === 90 ? 'active' : ''}`} onClick={() => handleTabClick(90)}>K-Water</div>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
<div><span>전체 {resultCnt} 건</span></div>
|
<div><span>전체 {resultCnt} 건</span></div>
|
||||||
{/* <!-- 게시판목록 --> */}
|
{/* <!-- 게시판목록 --> */}
|
||||||
<div className="board_list BRD002 code_list">
|
<div className="board_list code_list">
|
||||||
<div className="head">
|
<div className="head">
|
||||||
<span>대분류</span>
|
<span>대분류</span>
|
||||||
<span>중분류</span>
|
<span>중분류</span>
|
||||||
|
|
@ -285,12 +111,9 @@ function StandardCodeList(props) {
|
||||||
<span>코드명</span>
|
<span>코드명</span>
|
||||||
<span>개정이력</span>
|
<span>개정이력</span>
|
||||||
<span>보기</span>
|
<span>보기</span>
|
||||||
<span>다운로드</span>
|
|
||||||
<span>즐겨찾기</span>
|
<span>즐겨찾기</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="result">
|
<div className="result">
|
||||||
|
|
||||||
{/*검색기능 filterData가 없는경우 모든 데이터 출력*/}
|
|
||||||
{listData.filter(item => {
|
{listData.filter(item => {
|
||||||
if (item.groupNm.includes(filterData)) {
|
if (item.groupNm.includes(filterData)) {
|
||||||
return item
|
return item
|
||||||
|
|
@ -305,24 +128,13 @@ function StandardCodeList(props) {
|
||||||
<div className="groupNm">{item.groupNm}</div>
|
<div className="groupNm">{item.groupNm}</div>
|
||||||
<div className="Revisionhistory"><a className="vieweratag" onClick={showHandling} data-groupSeq={item.groupSeq}>개정이력</a></div>
|
<div className="Revisionhistory"><a className="vieweratag" onClick={showHandling} data-groupSeq={item.groupSeq}>개정이력</a></div>
|
||||||
<div className="fille">{item.contentcount > 0 ? <a className="vieweratag" href={"/standardCode/viewer/" + item.kcscCd}>내용보기</a> : null}</div>
|
<div className="fille">{item.contentcount > 0 ? <a className="vieweratag" href={"/standardCode/viewer/" + item.kcscCd}>내용보기</a> : null}</div>
|
||||||
<div className="viewer">{item.docFileGrpId == null ? null :
|
|
||||||
<a href={"https://www.kcsc.re.kr/file/DownloadGrp/" + item.docFileGrpId}><AiFillFileMarkdown/></a>}</div>
|
|
||||||
<div className="star"><AiFillStar/></div>
|
<div className="star"><AiFillStar/></div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/* <!--// 게시판목록 --> */}
|
|
||||||
|
|
||||||
|
|
||||||
{/* <!-- Paging --> */}
|
|
||||||
|
|
||||||
{/* <!--/ Paging --> */}
|
|
||||||
<StandardCodeListModal size={"lg"} show={show} content={groupSeq} onClose={close} title={"개정이력"}/>
|
<StandardCodeListModal size={"lg"} show={show} content={groupSeq} onClose={close} title={"개정이력"}/>
|
||||||
|
|
||||||
|
|
||||||
{/* <!--// 본문 --> */}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,86 @@
|
||||||
|
import React, {useEffect, useState} from "react";
|
||||||
|
|
||||||
|
function StandardCodeSearchForm({param, reloadFunction}){
|
||||||
|
|
||||||
|
const [searchCondition, setSearchCondition] = useState({
|
||||||
|
pageIndex: 1,
|
||||||
|
tab: Number(param?.substring(0, 2)),
|
||||||
|
category1: param?.substring(2, 4),
|
||||||
|
category2: param?.substring(4, 6),
|
||||||
|
searchWrd: ''
|
||||||
|
});
|
||||||
|
const [subTabsVisible, setSubTabsVisible] = useState(false);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if(searchCondition.tab){
|
||||||
|
if(searchCondition.tab !== 10 && searchCondition.tab !== 20){
|
||||||
|
setSubTabsVisible(true)
|
||||||
|
}else{
|
||||||
|
setSubTabsVisible(false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
reloadFunction(searchCondition)
|
||||||
|
}, [searchCondition]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div className="condition">
|
||||||
|
<ul>
|
||||||
|
<li className="third_1 L">
|
||||||
|
<div className={`tab ${searchCondition.tab === 10 ? 'active' : ''}`}
|
||||||
|
onClick={() => {setSearchCondition({...searchCondition, tab: 10})}}>설계기준</div>
|
||||||
|
</li>
|
||||||
|
<li className="third_1 L">
|
||||||
|
<div className={`tab ${searchCondition.tab === 20 ? 'active' : ''}`}
|
||||||
|
onClick={() => {setSearchCondition({...searchCondition, tab: 20})}}>표준시방서</div>
|
||||||
|
</li>
|
||||||
|
<li className="third_1 L">
|
||||||
|
<div className={`tab ${[40, 50, 60, 70, 80, 90].includes(searchCondition.tab) ? 'active' : ''}`}
|
||||||
|
onClick={() => {setSearchCondition({...searchCondition, tab: 40})}}>전문시방서</div>
|
||||||
|
</li>
|
||||||
|
<li className="third_1 L">
|
||||||
|
<label className="f_select" htmlFor="sel1">
|
||||||
|
<select id="sel1" title="조건" value={searchCondition.category1}>
|
||||||
|
<option value="">전체</option>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
</li>
|
||||||
|
<li className="third_1 L">
|
||||||
|
<label className="f_select w_306" htmlFor="sel1">
|
||||||
|
<select id="sel2" title="조건" value={searchCondition.category2}>
|
||||||
|
<option value="">전체</option>
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
</li>
|
||||||
|
<li className="third_1 L">
|
||||||
|
<label className="f_select w_306" htmlFor="sel1">
|
||||||
|
<select id="sel3" title="조건" value={searchCondition.category3} >
|
||||||
|
<option value="">전체</option>
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
</li>
|
||||||
|
<li className="third_1 L">
|
||||||
|
<div className={`tab`}>통합 다운로드</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
{subTabsVisible && (
|
||||||
|
<div className="right_col">
|
||||||
|
<div className="mini_board">
|
||||||
|
<ul>
|
||||||
|
<div className={`tab ${searchCondition.tab === 40 ? 'active' : ''}`} onClick={() => {setSearchCondition({...searchCondition, tab: 40})}}>서울특별시</div>
|
||||||
|
<div className={`tab ${searchCondition.tab === 50 ? 'active' : ''}`} onClick={() => {setSearchCondition({...searchCondition, tab: 50})}}>고속도로공사</div>
|
||||||
|
<div className={`tab ${searchCondition.tab === 60 ? 'active' : ''}`} onClick={() => {setSearchCondition({...searchCondition, tab: 60})}}>한국농어촌공사</div>
|
||||||
|
<div className={`tab ${searchCondition.tab === 70 ? 'active' : ''}`} onClick={() => {setSearchCondition({...searchCondition, tab: 70})}}>철도건설공사</div>
|
||||||
|
<div className={`tab ${searchCondition.tab === 80 ? 'active' : ''}`} onClick={() => {setSearchCondition({...searchCondition, tab: 80})}}>LH한국토지주택공사</div>
|
||||||
|
<div className={`tab ${searchCondition.tab === 90 ? 'active' : ''}`} onClick={() => {setSearchCondition({...searchCondition, tab: 90})}}>K-Water</div>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default StandardCodeSearchForm;
|
||||||
|
|
@ -145,35 +145,20 @@ public class StandardCodeController extends BaseController {
|
||||||
@ApiResponse(responseCode = "200", description = "조회 성공"),
|
@ApiResponse(responseCode = "200", description = "조회 성공"),
|
||||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||||
})
|
})
|
||||||
@PostMapping(value = "/selectStandardCodeList.do", consumes = MediaType.APPLICATION_JSON_VALUE)
|
@GetMapping(value = "/standard-code-list")
|
||||||
public ResultVO selectStandardCodeList(@RequestBody TnDocumentInfo tnDocumentInfo, @AuthenticationPrincipal LoginVO user)
|
public ResultVO selectStandardCodeList(TnDocumentInfo tnDocumentInfo, @AuthenticationPrincipal LoginVO user)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
ResultVO resultVO = new ResultVO();
|
ResultVO resultVO = new ResultVO();
|
||||||
Map<String, Object> resultMap = new HashMap<>();
|
Map<String, Object> resultMap = new HashMap<>();
|
||||||
|
|
||||||
PaginationInfo paginationInfo = new PaginationInfo();
|
|
||||||
paginationInfo.setCurrentPageNo(tnDocumentInfo.getPageIndex());
|
|
||||||
paginationInfo.setRecordCountPerPage(propertyService.getInt("Globals.pageUnit"));
|
|
||||||
paginationInfo.setPageSize(propertyService.getInt("Globals.pageSize"));
|
|
||||||
resultMap.put("paginationInfo", paginationInfo);
|
|
||||||
|
|
||||||
String tab = tnDocumentInfo.getTab() != null ? tnDocumentInfo.getTab() : "";
|
String tab = tnDocumentInfo.getTab() != null ? tnDocumentInfo.getTab() : "";
|
||||||
String category1 = tnDocumentInfo.getCategory1() != null ? tnDocumentInfo.getCategory1() : "";
|
String category1 = tnDocumentInfo.getCategory1() != null ? tnDocumentInfo.getCategory1() : "";
|
||||||
String category2 = tnDocumentInfo.getCategory2() != null ? tnDocumentInfo.getCategory2() : "";
|
String category2 = tnDocumentInfo.getCategory2() != null ? tnDocumentInfo.getCategory2() : "";
|
||||||
String category3 = tnDocumentInfo.getCategory3() != null ? tnDocumentInfo.getCategory3() : "";
|
String category3 = tnDocumentInfo.getCategory3() != null ? tnDocumentInfo.getCategory3() : "";
|
||||||
|
|
||||||
System.out.println("@@@ tab : " + tab);
|
|
||||||
System.out.println("@@@ category1 : " + category1);
|
|
||||||
System.out.println("@@@ category2 : " + category2);
|
|
||||||
System.out.println("@@@ category3 : " + category3);
|
|
||||||
System.out.println("@@@ searchWrd : " + tnDocumentInfo.getSearchWrd());
|
|
||||||
|
|
||||||
Integer categorySeq1 = standardCodeService.selectStandardCodeGroupSeq(tab);
|
Integer categorySeq1 = standardCodeService.selectStandardCodeGroupSeq(tab);
|
||||||
Integer categorySeq2 = standardCodeService.selectStandardCodeGroupSeq(tab + category1);
|
Integer categorySeq2 = standardCodeService.selectStandardCodeGroupSeq(tab + category1);
|
||||||
Integer categorySeq3 = standardCodeService.selectStandardCodeGroupSeq(tab + category1 + category2);
|
Integer categorySeq3 = standardCodeService.selectStandardCodeGroupSeq(tab + category1 + category2);
|
||||||
System.out.println("@@@ categorySeq1 : " + categorySeq1);
|
|
||||||
System.out.println("@@@ categorySeq2 : " + categorySeq2);
|
|
||||||
System.out.println("@@@ categorySeq3 : " + categorySeq3);
|
|
||||||
resultMap.put("category1List", standardCodeService.selectStandardCodeCategoryList(categorySeq1));
|
resultMap.put("category1List", standardCodeService.selectStandardCodeCategoryList(categorySeq1));
|
||||||
resultMap.put("category2List", standardCodeService.selectStandardCodeCategoryList(categorySeq2));
|
resultMap.put("category2List", standardCodeService.selectStandardCodeCategoryList(categorySeq2));
|
||||||
resultMap.put("category3List", standardCodeService.selectStandardCodeCategoryList(categorySeq3));
|
resultMap.put("category3List", standardCodeService.selectStandardCodeCategoryList(categorySeq3));
|
||||||
|
|
@ -182,7 +167,7 @@ public class StandardCodeController extends BaseController {
|
||||||
List<TnDocumentCodeList> tnDocumentCodeList = standardCodeService.selectStandardCodeList(tnDocumentInfo);
|
List<TnDocumentCodeList> tnDocumentCodeList = standardCodeService.selectStandardCodeList(tnDocumentInfo);
|
||||||
resultMap.put("resultList", tnDocumentCodeList);
|
resultMap.put("resultList", tnDocumentCodeList);
|
||||||
Integer totCnt = tnDocumentCodeList.get(0).getContentcount();
|
Integer totCnt = tnDocumentCodeList.get(0).getContentcount();
|
||||||
System.out.println("@@@ resultCnt : " + totCnt);
|
|
||||||
resultMap.put("resultCnt", totCnt);
|
resultMap.put("resultCnt", totCnt);
|
||||||
resultMap.put("user", user);
|
resultMap.put("user", user);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ import org.hibernate.annotations.DynamicUpdate;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Transient;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
|
|
@ -37,4 +38,7 @@ public class TnDocumentCodeList {
|
||||||
private String parentGroupSeq;
|
private String parentGroupSeq;
|
||||||
@Column(name = "group_full_cd")
|
@Column(name = "group_full_cd")
|
||||||
private String groupFullCd;
|
private String groupFullCd;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
private List<>
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -87,22 +87,6 @@ public class TnDocumentInfo {
|
||||||
@Column(name = "old_seq")
|
@Column(name = "old_seq")
|
||||||
private Integer oldSeq;
|
private Integer oldSeq;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Schema(description = "현재페이지")
|
|
||||||
private int pageIndex = 1;
|
|
||||||
@Schema(description = "페이지갯수")
|
|
||||||
private int pageUnit = 10;
|
|
||||||
@Schema(description = "페이지사이즈")
|
|
||||||
private int pageSize = 10;
|
|
||||||
@Schema(description = "첫페이지 인덱스")
|
|
||||||
private int firstIndex = 1;
|
|
||||||
@Schema(description = "마지막페이지 인덱스")
|
|
||||||
private int lastIndex = 1;
|
|
||||||
@Schema(description = "페이지당 레코드 개수")
|
|
||||||
private int recordCountPerPage = 100;
|
|
||||||
@Schema(description = "레코드 번호")
|
|
||||||
private int rowNo = 0;
|
|
||||||
@Transient
|
@Transient
|
||||||
private String listCode;
|
private String listCode;
|
||||||
@Transient
|
@Transient
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,9 @@ public class StandardCodeService extends EgovAbstractServiceImpl {
|
||||||
return tnDocumentInfoRepository.spGetTnDocumentInfoByGroupCd(param.getDocCode());
|
return tnDocumentInfoRepository.spGetTnDocumentInfoByGroupCd(param.getDocCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<TnDocumentCodeList> selectStandardCodeList(TnDocumentInfo tnDocumentInfo){ return standardCodeMapper.selectStandardCodeList(tnDocumentInfo); }
|
public List<TnDocumentCodeList> selectStandardCodeList(TnDocumentInfo tnDocumentInfo){
|
||||||
|
return standardCodeMapper.selectStandardCodeList(tnDocumentInfo);
|
||||||
|
}
|
||||||
|
|
||||||
public Integer selectStandardCodeListCnt(TnDocumentInfo tnDocumentInfo) {
|
public Integer selectStandardCodeListCnt(TnDocumentInfo tnDocumentInfo) {
|
||||||
return standardCodeMapper.selectStandardCodeListCnt(tnDocumentInfo);
|
return standardCodeMapper.selectStandardCodeListCnt(tnDocumentInfo);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue