diff --git a/egovframe-template-simple-react-contribution/src/css/page.css b/egovframe-template-simple-react-contribution/src/css/page.css index c1ba2c6..8116173 100644 --- a/egovframe-template-simple-react-contribution/src/css/page.css +++ b/egovframe-template-simple-react-contribution/src/css/page.css @@ -322,14 +322,9 @@ .viewerDiv{height: calc(100vh - 190px); overflow-y: auto;} .openDoc{background-color: bisque;} - .docLink{ - color: black; - background-color: palegreen - } + .docLink{color: black;background-color: palegreen} .docLink:hover{cursor: pointer} - .bookmark{ - color: forestgreen; - } + .bookmark{color: forestgreen;} .bookmark:hover{cursor: pointer} .errorText{color:white; background-color: red; font-size: x-small; vertical-align: bottom; padding: 0 10px;} @@ -337,4 +332,8 @@ .titleCheckBox ~ p {display: inline} .errorCnt{display: inline; color:red;} .errorText{display: inline; cursor: pointer} -.detailInfoDiv > div > input {margin-right: 5px;} \ No newline at end of file +.detailInfoDiv > div > input {margin-right: 5px;} +.docInfoTitle{white-space: nowrap;} +.yearInfo{font-size: 9px} +.yearInfoActive{color: #0d6efd} +.docInfoBtn{--bs-btn-padding-y: 0.1rem;--bs-btn-padding-x: 0.25rem;--bs-btn-font-size: 0.7rem;} \ No newline at end of file diff --git a/egovframe-template-simple-react-contribution/src/pages/standardCode/viewer.js b/egovframe-template-simple-react-contribution/src/pages/standardCode/viewer.js index acd4e32..6b4d583 100644 --- a/egovframe-template-simple-react-contribution/src/pages/standardCode/viewer.js +++ b/egovframe-template-simple-react-contribution/src/pages/standardCode/viewer.js @@ -49,7 +49,7 @@ function CodeViewer(props) { setDocName(docName); getCodeInfo(docCode); setErrorSelector([]) - getCodeDetailInfo(null, docCode); + getCodeDetailInfo(docCode); } const getCodeTree = ()=>{ @@ -112,13 +112,16 @@ function CodeViewer(props) { let optionTag = []; docInfo.forEach(function (item, index){ optionTag.push( - - ) + + +
+

{item.doc_yr}

+ ) + }) - headTag.push({optionTag}) + headTag.push({docCode} {docName}{optionTag}) }else{ headTag.push(
검색된 결과가 없습니다.
); // 코드 목록 초기값 } @@ -127,7 +130,7 @@ function CodeViewer(props) { ) }) - const getCodeDetailInfo = useCallback((docInfoSeq, docCode) => { + const getCodeDetailInfo = useCallback((docCode, ymd) => { console.groupCollapsed("EgovMain.getCodeDetailInfo()"); EgovNet.requestFetch( '/standardCode/getCodeDetailInfo.do', @@ -137,8 +140,8 @@ function CodeViewer(props) { 'Content-type': 'application/json' }, body: JSON.stringify({ - docInfoSeq: docInfoSeq, - docCode: docCode + docCode: docCode, + ymd: ymd }) }, (resp) => { @@ -271,7 +274,7 @@ function CodeViewer(props) { setSelectFlag(true); const docInfoSeq = el.target.value setDocInfoSeq(docInfoSeq); - getCodeDetailInfo(docInfoSeq, null); + getCodeDetailInfo(docCode); }) const actionAppend = (el) => { if(!el) return; @@ -377,7 +380,7 @@ function CodeViewer(props) { useEffect(() => { getCodeTree(); getCodeInfo(docCode); - getCodeDetailInfo(null, docCode); + getCodeDetailInfo(docCode); }, []); console.log("------------------------------viewer [End]"); diff --git a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/standardCode/repository/TnDocumentContentRepository.java b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/standardCode/repository/TnDocumentContentRepository.java index f87b0eb..4e5b25b 100644 --- a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/standardCode/repository/TnDocumentContentRepository.java +++ b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/standardCode/repository/TnDocumentContentRepository.java @@ -17,6 +17,9 @@ public interface TnDocumentContentRepository extends JpaRepository getYearFullContextByContent(Integer docInfoSeq, String docCode, String docPart); + @Query(value = "select * from sp_get_recent_full_context_by_content(:docCode, :docPart, :ymd)", nativeQuery = true) + List spGetRecentFullContextByContent(String docCode, String docPart, String ymd); + Optional findByContTypeCd(String contTypeCd); Optional findByDocInfoSeqAndContTypeCd(Integer docInfoSeq, String contTypeCd); diff --git a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/standardCode/service/StandardCodeService.java b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/standardCode/service/StandardCodeService.java index 7bab361..4012e4e 100644 --- a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/standardCode/service/StandardCodeService.java +++ b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/standardCode/service/StandardCodeService.java @@ -37,7 +37,7 @@ public class StandardCodeService extends EgovAbstractServiceImpl { } public List selectStandardCodeDocument(StandardCodeVO param) { - return tnDocumentContentRepository.getYearFullContextByContent(param.getDocInfoSeq(), param.getDocCode(), param.getDocPart()); + return tnDocumentContentRepository.spGetRecentFullContextByContent(param.getDocCode(), param.getDocPart(), param.getYmd()); } public List selectStandardCodeDocInfo(StandardCodeVO param) { diff --git a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/standardCode/service/StandardCodeVO.java b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/standardCode/service/StandardCodeVO.java index 86ed17a..8feb183 100644 --- a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/standardCode/service/StandardCodeVO.java +++ b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/standardCode/service/StandardCodeVO.java @@ -6,9 +6,7 @@ import lombok.Setter; @Getter @Setter public class StandardCodeVO { - private Integer docInfoSeq; private String docCode; private String docPart; - private Integer year; - private Integer month; + private String ymd; }