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 3c1f2eb..d5d0942 100644 --- a/egovframe-template-simple-react-contribution/src/pages/standardCode/StandardCodeList.jsx +++ b/egovframe-template-simple-react-contribution/src/pages/standardCode/StandardCodeList.jsx @@ -188,7 +188,7 @@ function StandardCodeList(props) {
  • - { wrdRef.current.value = e.target.value; }} 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 57ca243..d21da89 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 @@ -4,6 +4,7 @@ import com.dbnt.kcscbackend.config.common.BaseController; import com.dbnt.kcscbackend.config.common.LoginVO; import com.dbnt.kcscbackend.config.common.ResponseCode; import com.dbnt.kcscbackend.config.common.ResultVO; +import com.dbnt.kcscbackend.standardCode.entity.TnDocumentCodeList; import com.dbnt.kcscbackend.standardCode.entity.TnDocumentInfo; import com.dbnt.kcscbackend.standardCode.service.StandardCodeService; import com.dbnt.kcscbackend.standardCode.service.StandardCodeVO; @@ -100,26 +101,18 @@ public class StandardCodeController extends BaseController { public ResultVO selectStandardCodeList(@RequestBody TnDocumentInfo tnDocumentInfo, @AuthenticationPrincipal LoginVO user) throws Exception { ResultVO resultVO = new ResultVO(); + Map resultMap = new HashMap<>(); PaginationInfo paginationInfo = new PaginationInfo(); paginationInfo.setCurrentPageNo(tnDocumentInfo.getPageIndex()); paginationInfo.setRecordCountPerPage(propertyService.getInt("Globals.pageUnit")); paginationInfo.setPageSize(propertyService.getInt("Globals.pageSize")); - - System.out.println("@@@ pageIndex : " + tnDocumentInfo.getPageIndex()); - System.out.println("@@@ listCode : " + tnDocumentInfo.getListCode()); - - tnDocumentInfo.setFirstIndex(paginationInfo.getFirstRecordIndex()); - tnDocumentInfo.setLastIndex(paginationInfo.getLastRecordIndex()); - tnDocumentInfo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage()); - - Map resultMap = new HashMap<>(); - resultMap.put("resultList", standardCodeService.selectStandardcodelist(tnDocumentInfo.getListCode())); - resultMap.put("resultCnt", standardCodeService.selectStandardCodeListCnt(tnDocumentInfo)); - Integer totCnt = (Integer) resultMap.get("resultCnt"); - paginationInfo.setTotalRecordCount(totCnt); - resultMap.put("paginationInfo", paginationInfo); + + List tnDocumentCodeList = standardCodeService.selectStandardCodeList(tnDocumentInfo); + resultMap.put("resultList", tnDocumentCodeList); + Integer totCnt = tnDocumentCodeList.get(0).getContentcount(); + resultMap.put("resultCnt", totCnt); resultMap.put("user", user); resultVO.setResultCode(ResponseCode.SUCCESS.getCode()); 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 de220d3..6ab422d 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 @@ -100,9 +100,11 @@ public class TnDocumentInfo { @Schema(description = "마지막페이지 인덱스") private int lastIndex = 1; @Schema(description = "페이지당 레코드 개수") - private int recordCountPerPage = 10; + private int recordCountPerPage = 100; @Schema(description = "레코드 번호") private int rowNo = 0; - @Schema(description = "") + @Transient private String listCode; + @Transient + private String searchWrd; } \ No newline at end of file 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 90f65bc..f49f0b2 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 @@ -10,11 +10,10 @@ import java.util.List; @Mapper public interface StandardCodeMapper { - List selectStandardCodeList(TnDocumentInfo tnDocumentInfo); + List selectStandardCodeList(TnDocumentInfo tnDocumentInfo); 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 23ad92e..5f97fa7 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 @@ -29,6 +29,8 @@ public class StandardCodeService extends EgovAbstractServiceImpl { return tnDocumentContentRepository.getRecentFullContextByContent(param.getDocCode(), param.getDocPart()); } + public List selectStandardCodeList(TnDocumentInfo tnDocumentInfo){ return standardCodeMapper.selectStandardCodeList(tnDocumentInfo); } + public Integer selectStandardCodeListCnt(TnDocumentInfo tnDocumentInfo) { return standardCodeMapper.selectStandardCodeListCnt(tnDocumentInfo); } @@ -37,7 +39,4 @@ public class StandardCodeService extends EgovAbstractServiceImpl { 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 04f40f5..c15543e 100644 --- a/kcsc-back-end/src/main/resources/mybatisMapper/StandardCodeMapper.xml +++ b/kcsc-back-end/src/main/resources/mybatisMapper/StandardCodeMapper.xml @@ -3,65 +3,49 @@ "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + select + case + when a3.doc_level > 1 then a3.doc_code_name + else a2.doc_code_name + end as main_category, + case + when a3.doc_level > 1 then a2.doc_code_name + else a.group_nm + end as middle_category, + a.group_nm, + a.kcsc_cd, + tdi.doc_file_grp_id, + a.group_seq, + count(tdc.full_content) as contentcount + from + tn_document_group a + left join tn_document_info tdi on + a.group_seq = tdi.group_seq + left join tn_document_content tdc on + tdi.doc_info_seq = tdc.doc_info_seq, + sp_get_tn_document_code_by_tree() a2, + sp_get_tn_document_code_by_tree() a3 + + group by main_category, middle_category, a.group_nm, a.kcsc_cd, tdi.doc_file_grp_id, a.group_seq + order by a.kcsc_cd - - - and tdi.group_seq = tdg.group_seq - and tdi.kcsc_cd like 'KDS%' - and tdi.last_yn = 'Y' - and tdi.use_yn = 'Y' + a.parent_group_seq = a2.seq + and a2.parent_seq = a3.seq - and tdg.group_full_cd like #{listCode} || '%' + and a.group_full_cd like #{listCode} || '%' + + and a.group_nm like '%' || #{searchWrd} || '%' + + and a.group_type = 'D' + and tdi.last_yn = 'Y' - - + \ No newline at end of file