diff --git a/egovframe-template-simple-react-contribution/src/pages/standardCode/StandardCodeList.jsx b/egovframe-template-simple-react-contribution/src/pages/standardCode/StandardCodeList.jsx index 5fb3218..b69755b 100644 --- a/egovframe-template-simple-react-contribution/src/pages/standardCode/StandardCodeList.jsx +++ b/egovframe-template-simple-react-contribution/src/pages/standardCode/StandardCodeList.jsx @@ -5,11 +5,11 @@ import * as EgovNet from 'api/egovFetch'; import URL from 'constants/url'; import { NOTICE_BBS_ID } from 'config'; -import { default as EgovLeftNav } from 'components/leftmenu/EgovLeftNavInform'; + import EgovPaging from 'components/EgovPaging'; import { itemIdxByPage } from 'utils/calc'; -import StandardCodeListModal from './StandardCodeListModal' +import {StandardCodeListModal, StandardCodeListModalTable} from './StandardCodeListModal' function StandardCodeList(props) { const {listCode} = useParams(); @@ -17,8 +17,48 @@ function StandardCodeList(props) { const [groupseq,setgroupseq] = useState(); function showhandling(e){ const param = e.currentTarget.dataset; + const groupseq = param.groupseq; + console.log(groupseq); + EgovNet.requestFetch( + '/standardCode/testCodeList.do', + { + method: "POST", + headers: { + 'Content-type': 'application/json' + }, + body: JSON.stringify( + groupseq + ) + },(resp) =>{ + console.log(resp+"------------------------resp") + const body =[]; + const head =[]; + if(resp.length>0){ + + resp.forEach(function (item,index){ + const formattedDate = item.aplcnBgngYmd.match(/\d{4}-\d{2}-\d{2}/)[0]; + const url = "https://www.kcsc.re.kr/file/DownloadGrp/"+item.docFileGrpId; + body.push( + + {formattedDate} + {item.docFileGrpId} + + ) + }) + head.push( + + 년도 + 기준코드 + 신구건설기준비교 + + ) + } + + setgroupseq(); + } + ) setshow(true); - setgroupseq(param.groupseq); + } function close () { setshow(false); @@ -75,29 +115,22 @@ function StandardCodeList(props) { mutListTag.push( -
-
+ className="list_item List_Codes" > +
{item.mainCategory}
+
{item.middleCategory}
{item.kcscCd}
{(item.replyLc * 1 ? true : false) &&
- {item.docNm} + {item.groupNm}
} {(item.replyLc * 1 ? false : true) &&
- {item.docNm} + {item.groupNm}
}
-
-
+
{item.contentcount>0?{item.kcscCd}:null}
+
{item.docFileGrpId}
@@ -134,14 +167,14 @@ function StandardCodeList(props) {
{/* */} - + {/* */}
{/* */}
-

건설기준코드

+

건설기준코드

설계기준, 표준시방서 내용을 열람할 수 있습니다.

@@ -206,7 +239,8 @@ function StandardCodeList(props) { retrieveList({ ...searchCondition, pageIndex: passedPage, searchCnd: cndRef.current.value, searchWrd: wrdRef.current.value }) }} /> {/* */} - + +
{/* */} diff --git a/egovframe-template-simple-react-contribution/src/pages/standardCode/StandardCodeListModal.js b/egovframe-template-simple-react-contribution/src/pages/standardCode/StandardCodeListModal.js index 1838a26..ef87d39 100644 --- a/egovframe-template-simple-react-contribution/src/pages/standardCode/StandardCodeListModal.js +++ b/egovframe-template-simple-react-contribution/src/pages/standardCode/StandardCodeListModal.js @@ -1,17 +1,30 @@ import {Button, Modal, ModalBody, ModalFooter, ModalHeader, ModalTitle} from "react-bootstrap"; -function StandardCodeListModal({show,groupseq,onClose}){ - //todo 로직추가구현필요 +function StandardCodeListModal({show,content,onClose,title,size}){ return( - + - 개정이력 + {title} - {groupseq} + {content} ) } -export default StandardCodeListModal; \ No newline at end of file + +function StandardCodeListModalTable({head,content}){ + return( + + + {head} + + + {content} + +
+ ) +} + +export {StandardCodeListModal,StandardCodeListModalTable}; \ No newline at end of file diff --git a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/standardCode/StandardCodeController.java b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/standardCode/StandardCodeController.java index 30e9aca..b711a1b 100644 --- a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/standardCode/StandardCodeController.java +++ b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/standardCode/StandardCodeController.java @@ -15,6 +15,7 @@ import lombok.RequiredArgsConstructor; import org.egovframe.rte.fdl.property.EgovPropertyService; import org.egovframe.rte.ptl.mvc.tags.ui.pagination.PaginationInfo; import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; import org.springframework.security.core.annotation.AuthenticationPrincipal; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -23,6 +24,7 @@ import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; import java.util.HashMap; +import java.util.List; import java.util.Map; /** @@ -117,7 +119,7 @@ public class StandardCodeController extends BaseController { tnDocumentInfo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage()); Map resultMap = new HashMap<>(); - resultMap.put("resultList", standardCodeService.selectStandardCodeList(tnDocumentInfo)); + resultMap.put("resultList", standardCodeService.selectStandardcodelist(tnDocumentInfo.getListCode())); resultMap.put("resultCnt", standardCodeService.selectStandardCodeListCnt(tnDocumentInfo)); Integer totCnt = (Integer) resultMap.get("resultCnt"); paginationInfo.setTotalRecordCount(totCnt); @@ -130,4 +132,17 @@ public class StandardCodeController extends BaseController { resultVO.setResult(resultMap); return resultVO; } + + @Operation( + summary = "건설기준코드 개정이력 조회", + description = "건설기준코드 개정이력 조회", + tags = {"StandardCodeController"} + ) + @PostMapping("/testCodeList.do") + public ResponseEntity> testCodeList(@RequestBody Integer groupseq){ + return ResponseEntity.ok(standardCodeService.selectStandardCodeRevisionhistoryList(groupseq)); + } + + + } \ No newline at end of file diff --git a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/standardCode/entity/TnDocumentCodeList.java b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/standardCode/entity/TnDocumentCodeList.java new file mode 100644 index 0000000..9d1ff3d --- /dev/null +++ b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/standardCode/entity/TnDocumentCodeList.java @@ -0,0 +1,36 @@ +package com.dbnt.kcscbackend.standardCode.entity; + +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import org.hibernate.annotations.DynamicInsert; +import org.hibernate.annotations.DynamicUpdate; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; + +@Getter +@Setter +@Entity +@NoArgsConstructor +@DynamicInsert +@DynamicUpdate +public class TnDocumentCodeList { + + @Column(name = "main_category") + private String mainCategory; + @Column(name = "middle_category") + private String middleCategory; + @Column(name = "group_nm") + private String groupNm; + @Column(name = "kcsc_cd") + private String kcscCd; + @Column(name = "doc_file_grp_id") + private String docFileGrpId; + @Id + @Column(name ="group_seq") + private Integer groupSeq; + @Column(name = "contentcount") + private Integer contentcount; +} diff --git a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/standardCode/entity/TnDocumentInfo.java b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/standardCode/entity/TnDocumentInfo.java index a6d3da8..de220d3 100644 --- a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/standardCode/entity/TnDocumentInfo.java +++ b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/standardCode/entity/TnDocumentInfo.java @@ -87,6 +87,8 @@ public class TnDocumentInfo { @Column(name = "old_seq") private Integer oldSeq; + + @Schema(description = "현재페이지") private int pageIndex = 1; @Schema(description = "페이지갯수") diff --git a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/standardCode/mapper/StandardCodeMapper.java b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/standardCode/mapper/StandardCodeMapper.java index b2cf19e..8e257d9 100644 --- a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/standardCode/mapper/StandardCodeMapper.java +++ b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/standardCode/mapper/StandardCodeMapper.java @@ -1,6 +1,7 @@ package com.dbnt.kcscbackend.standardCode.mapper; +import com.dbnt.kcscbackend.standardCode.entity.TnDocumentCodeList; import com.dbnt.kcscbackend.standardCode.entity.TnDocumentInfo; import org.apache.ibatis.annotations.Mapper; @@ -13,4 +14,7 @@ public interface StandardCodeMapper { Integer selectStandardCodeListCnt(TnDocumentInfo tnDocumentInfo); + List selectStandardCodeRevisionhistoryList(Integer groupseq); + + List selectStandardcodelist(String code); } 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 7aeed90..3621a53 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 @@ -1,5 +1,6 @@ package com.dbnt.kcscbackend.standardCode.service; +import com.dbnt.kcscbackend.standardCode.entity.TnDocumentCodeList; import com.dbnt.kcscbackend.standardCode.entity.TnDocumentInfo; import com.dbnt.kcscbackend.standardCode.mapper.StandardCodeMapper; import com.dbnt.kcscbackend.standardCode.repository.TnDocumentContentRepository; @@ -34,4 +35,11 @@ public class StandardCodeService { return standardCodeMapper.selectStandardCodeListCnt(tnDocumentInfo); } + public List selectStandardCodeRevisionhistoryList(Integer groupseq) { + return standardCodeMapper.selectStandardCodeRevisionhistoryList(groupseq); + } + + public List selectStandardcodelist(String code){ + return standardCodeMapper.selectStandardcodelist(code); + } } diff --git a/kcsc-back-end/src/main/resources/mybatisMapper/StandardCodeMapper.xml b/kcsc-back-end/src/main/resources/mybatisMapper/StandardCodeMapper.xml index 4346d7c..d69e018 100644 --- a/kcsc-back-end/src/main/resources/mybatisMapper/StandardCodeMapper.xml +++ b/kcsc-back-end/src/main/resources/mybatisMapper/StandardCodeMapper.xml @@ -61,4 +61,55 @@ + + + \ No newline at end of file