강석 최 2023-11-02 10:38:12 +09:00
commit d919e8fc9c
9 changed files with 44 additions and 227 deletions

View File

@ -45,7 +45,7 @@ function StandardCodeList(props) {
EgovNet.requestFetch(retrieveListURL, EgovNet.requestFetch(retrieveListURL,
requestOptions, requestOptions,
(resp) => { (resp) => {
setMasterBoard(resp.result.tnDocumentInfoVO); setMasterBoard(resp.result.tnDocumentInfo);
setPaginationInfo(resp.result.paginationInfo); setPaginationInfo(resp.result.paginationInfo);
let mutListTag = []; let mutListTag = [];
@ -66,12 +66,14 @@ function StandardCodeList(props) {
state={{ state={{
docInfoSeq: item.docInfoSeq, docInfoSeq: item.docInfoSeq,
docNm: item.docNm, docNm: item.docNm,
kcscCode: item.kcscCode, kcscCd: item.kcscCd,
searchCondition: searchCondition searchCondition: searchCondition
}} }}
key={listIdx} key={listIdx}
className="list_item" > className="list_item" >
<div>{listIdx}</div> <div></div>
<div></div>
<div>{item.kcscCd}</div>
{(item.replyLc * 1 ? true : false) && {(item.replyLc * 1 ? true : false) &&
<div className="al reply"> <div className="al reply">
{item.docNm} {item.docNm}
@ -80,9 +82,10 @@ function StandardCodeList(props) {
<div className="al"> <div className="al">
{item.docNm} {item.docNm}
</div>} </div>}
<div>{item.frstRegisterNm}</div> <div></div>
<div>{item.frstRegisterPnttm}</div> <div></div>
<div>{item.inqireCo}</div> <div></div>
<div></div>
</Link> </Link>
); );
}); });

View File

@ -4,8 +4,7 @@ import com.dbnt.kcscbackend.config.common.BaseController;
import com.dbnt.kcscbackend.config.common.LoginVO; import com.dbnt.kcscbackend.config.common.LoginVO;
import com.dbnt.kcscbackend.config.common.ResponseCode; import com.dbnt.kcscbackend.config.common.ResponseCode;
import com.dbnt.kcscbackend.config.common.ResultVO; import com.dbnt.kcscbackend.config.common.ResultVO;
import com.dbnt.kcscbackend.standardCode.entity.TnDocumentInfoVO; import com.dbnt.kcscbackend.standardCode.entity.TnDocumentInfo;
import com.dbnt.kcscbackend.standardCode.service.StandardCodeListService;
import com.dbnt.kcscbackend.standardCode.service.StandardCodeService; import com.dbnt.kcscbackend.standardCode.service.StandardCodeService;
import com.dbnt.kcscbackend.standardCode.service.StandardCodeVO; import com.dbnt.kcscbackend.standardCode.service.StandardCodeVO;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
@ -49,7 +48,6 @@ public class StandardCodeController extends BaseController {
private final StandardCodeService standardCodeService; private final StandardCodeService standardCodeService;
private final StandardCodeListService standardCodeListService;
@Operation( @Operation(
@ -102,27 +100,27 @@ public class StandardCodeController extends BaseController {
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님") @ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
}) })
@PostMapping(value = "/selectStandardCodeList.do", consumes = MediaType.APPLICATION_JSON_VALUE) @PostMapping(value = "/selectStandardCodeList.do", consumes = MediaType.APPLICATION_JSON_VALUE)
public ResultVO selectStandardCodeList(@RequestBody TnDocumentInfoVO tnDocumentInfoVO, @AuthenticationPrincipal LoginVO user) public ResultVO selectStandardCodeList(@RequestBody TnDocumentInfo tnDocumentInfo, @AuthenticationPrincipal LoginVO user)
throws Exception { throws Exception {
ResultVO resultVO = new ResultVO(); ResultVO resultVO = new ResultVO();
PaginationInfo paginationInfo = new PaginationInfo(); PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(tnDocumentInfoVO.getPageIndex()); paginationInfo.setCurrentPageNo(tnDocumentInfo.getPageIndex());
paginationInfo.setRecordCountPerPage(propertyService.getInt("Globals.pageUnit")); paginationInfo.setRecordCountPerPage(propertyService.getInt("Globals.pageUnit"));
paginationInfo.setPageSize(propertyService.getInt("Globals.pageSize")); paginationInfo.setPageSize(propertyService.getInt("Globals.pageSize"));
System.out.println("@@@ pageIndex : " + tnDocumentInfoVO.getPageIndex()); System.out.println("@@@ pageIndex : " + tnDocumentInfo.getPageIndex());
tnDocumentInfoVO.setFirstIndex(paginationInfo.getFirstRecordIndex()); tnDocumentInfo.setFirstIndex(paginationInfo.getFirstRecordIndex());
tnDocumentInfoVO.setLastIndex(paginationInfo.getLastRecordIndex()); tnDocumentInfo.setLastIndex(paginationInfo.getLastRecordIndex());
tnDocumentInfoVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage()); tnDocumentInfo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
Map<String, Object> resultMap = standardCodeListService.selectStandardCodeList(tnDocumentInfoVO); Map<String, Object> resultMap = new HashMap<>();
resultMap.put("resultList", standardCodeService.selectStandardCodeList(tnDocumentInfo));
int totCnt = Integer.parseInt((String)resultMap.get("resultCnt")); resultMap.put("resultCnt", standardCodeService.selectStandardCodeListCnt(tnDocumentInfo));
Integer totCnt = (Integer) resultMap.get("resultCnt");
paginationInfo.setTotalRecordCount(totCnt); paginationInfo.setTotalRecordCount(totCnt);
resultMap.put("tnDocumentInfoVO", tnDocumentInfoVO);
resultMap.put("paginationInfo", paginationInfo); resultMap.put("paginationInfo", paginationInfo);
resultMap.put("user", user); resultMap.put("user", user);

View File

@ -1,5 +1,6 @@
package com.dbnt.kcscbackend.standardCode.entity; package com.dbnt.kcscbackend.standardCode.entity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter; import lombok.Getter;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import lombok.Setter; import lombok.Setter;
@ -85,4 +86,19 @@ public class TnDocumentInfo {
private char useYn; private char useYn;
@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 = 10;
@Schema(description = "레코드 번호")
private int rowNo = 0;
} }

View File

@ -1,104 +0,0 @@
package com.dbnt.kcscbackend.standardCode.entity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.*;
import java.util.Date;
@Getter
@Setter
@Entity
@NoArgsConstructor
@DynamicInsert
@DynamicUpdate
@Table(name = "tn_document_info")
public class TnDocumentInfoVO extends TnDocumentInfo {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "doc_info_seq")
private int docInfoSeq;
@Column(name = "group_seq", nullable = false)
private int groupSeq;
@Column(name = "kcsc_cd")
private String kcscCd;
@Column(name = "old_kcsc_cd")
private String oldKcscCd;
@Column(name = "doc_nm", nullable = false)
private String docNm;
@Column(name = "doc_yr", nullable = false)
private String docYr;
@Column(name = "doc_cycl", nullable = false)
private int docCycl;
@Column(name = "doc_er", nullable = false)
private String docEr;
@Column(name = "estb_ymd")
@Temporal(TemporalType.DATE)
private Date estbYmd;
@Column(name = "rvsn_ymd")
@Temporal(TemporalType.DATE)
private Date rvsnYmd;
@Column(name = "doc_rev_hist_seq")
private int docRevHistSeq;
@Column(name = "doc_brief", length = 1000)
private String docBrief;
@Column(name = "doc_rvsn_remark", length = 1000)
private String docRvsnRemark;
@Column(name = "doc_consider", length = 255)
private String docConsider;
@Column(name = "doc_advice", length = 255)
private String docAdvice;
@Column(name = "doc_dept", length = 255)
private String docDept;
@Column(name = "doc_relation", length = 255)
private String docRelation;
@Column(name = "doc_publish", length = 255)
private String docPublish;
@Column(name = "aplcn_bgng_ymd")
@Temporal(TemporalType.DATE)
private Date aplcnBgngYmd;
@Column(name = "aplcn_end_ymd")
@Temporal(TemporalType.DATE)
private Date aplcnEndYmd;
@Column(name = "doc_order", nullable = false)
private int docOrder;
@Column(name = "last_yn", nullable = false)
private char lastYn;
@Column(name = "doc_file_grp_id")
private String docFileGrpId;
@Column(name = "rvsn_file_grp_id")
private String rvsnFileGrpId;
@Column(name = "frst_crt_id", nullable = false)
private String frstCrtId;
@Column(name = "frst_crt_dt", nullable = false)
@Temporal(TemporalType.TIMESTAMP)
private Date frstCrtDt;
@Column(name = "last_chg_id")
private String lastChgId;
@Column(name = "last_chg_dt")
@Temporal(TemporalType.TIMESTAMP)
private Date lastChgDt;
@Column(name = "use_yn", nullable = false)
private char useYn;
@Column(name = "old_seq")
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 = 10;
@Schema(description = "레코드 번호")
private int rowNo = 0;
}

View File

@ -2,7 +2,6 @@ package com.dbnt.kcscbackend.standardCode.mapper;
import com.dbnt.kcscbackend.standardCode.entity.TnDocumentInfo; import com.dbnt.kcscbackend.standardCode.entity.TnDocumentInfo;
import com.dbnt.kcscbackend.standardCode.entity.TnDocumentInfoVO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.List; import java.util.List;
@ -10,7 +9,7 @@ import java.util.List;
@Mapper @Mapper
public interface StandardCodeMapper { public interface StandardCodeMapper {
List<TnDocumentInfoVO> selectStandardCodeList(TnDocumentInfo tnDocumentInfo); List<TnDocumentInfo> selectStandardCodeList(TnDocumentInfo tnDocumentInfo);
Integer selectStandardCodeListCnt(TnDocumentInfo tnDocumentInfo); Integer selectStandardCodeListCnt(TnDocumentInfo tnDocumentInfo);

View File

@ -1,38 +0,0 @@
package com.dbnt.kcscbackend.standardCode.service;
import com.dbnt.kcscbackend.standardCode.entity.TnDocumentInfoVO;
import java.util.Map;
/**
*
* @author
* @since 2009.03.19
* @version 1.0
* @see
*
* <pre>
* << (Modification Information) >>
*
*
* ------- -------- ---------------------------
* 2009.03.19
* 2011.08.31 JJY 릿
*
* </pre>
*/
public interface StandardCodeListService {
/**
* .
* @return
*
* @param
* @param
* @exception Exception Exception
*/
public Map<String, Object> selectStandardCodeList(TnDocumentInfoVO tnDocumentInfoVO)
throws Exception;
}

View File

@ -1,5 +1,7 @@
package com.dbnt.kcscbackend.standardCode.service; package com.dbnt.kcscbackend.standardCode.service;
import com.dbnt.kcscbackend.standardCode.entity.TnDocumentInfo;
import com.dbnt.kcscbackend.standardCode.mapper.StandardCodeMapper;
import com.dbnt.kcscbackend.standardCode.repository.TnDocumentContentRepository; import com.dbnt.kcscbackend.standardCode.repository.TnDocumentContentRepository;
import com.dbnt.kcscbackend.standardCode.repository.TnDocumentGroupRepository; import com.dbnt.kcscbackend.standardCode.repository.TnDocumentGroupRepository;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
@ -14,6 +16,7 @@ import java.util.List;
public class StandardCodeService { public class StandardCodeService {
private final TnDocumentGroupRepository tnDocumentGroupRepository; private final TnDocumentGroupRepository tnDocumentGroupRepository;
private final TnDocumentContentRepository tnDocumentContentRepository; private final TnDocumentContentRepository tnDocumentContentRepository;
private final StandardCodeMapper standardCodeMapper;
public List<StandardCodeTreeInterface> selectStandardCodeTree(){ public List<StandardCodeTreeInterface> selectStandardCodeTree(){
return tnDocumentGroupRepository.spGetTnDocumentCodeByTree(); return tnDocumentGroupRepository.spGetTnDocumentCodeByTree();
@ -23,12 +26,12 @@ public class StandardCodeService {
return tnDocumentContentRepository.getRecentFullContextByContent(param.getDocCode(), param.getDocPart()); return tnDocumentContentRepository.getRecentFullContextByContent(param.getDocCode(), param.getDocPart());
} }
/*public List<TnDocumentInfo> selectStandardCodeList(TnDocumentInfo tnDocumentInfo) { public List<TnDocumentInfo> selectStandardCodeList(TnDocumentInfo tnDocumentInfo) {
return standardCodeMapper.selectStandardCodeList(tnDocumentInfo); return standardCodeMapper.selectStandardCodeList(tnDocumentInfo);
} }
public Integer selectStandardCodeListCnt(TnDocumentInfo tnDocumentInfo) { public Integer selectStandardCodeListCnt(TnDocumentInfo tnDocumentInfo) {
return standardCodeMapper.selectStandardCodeListCnt(tnDocumentInfo); return standardCodeMapper.selectStandardCodeListCnt(tnDocumentInfo);
}*/ }
} }

View File

@ -1,60 +0,0 @@
package com.dbnt.kcscbackend.standardCode.service.impl;
import com.dbnt.kcscbackend.standardCode.entity.TnDocumentInfoVO;
import com.dbnt.kcscbackend.standardCode.mapper.StandardCodeMapper;
import com.dbnt.kcscbackend.standardCode.service.StandardCodeListService;
import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
*
* @author
* @since 2009.03.19
* @version 1.0
* @see
*
* <pre>
* << (Modification Information) >>
*
*
* ------- -------- ---------------------------
* 2009.03.19
* 2011.08.31 JJY 릿
*
* </pre>
*/
@Service("StandardCodeListService")
public class StandardCodeListServiceImpl extends EgovAbstractServiceImpl implements StandardCodeListService {
private StandardCodeMapper standardCodeMapper;
/**
* .
*
* @see
*/
@Override
public Map<String, Object> selectStandardCodeList(TnDocumentInfoVO tnDocumentInfoVO) throws Exception {
List<TnDocumentInfoVO> list = standardCodeMapper.selectStandardCodeList(tnDocumentInfoVO);
List<TnDocumentInfoVO> result = new ArrayList<TnDocumentInfoVO>();
result = list;
int cnt = standardCodeMapper.selectStandardCodeListCnt(tnDocumentInfoVO);
Map<String, Object> map = new HashMap<String, Object>();
map.put("resultList", result);
map.put("resultCnt", Integer.toString(cnt));
return map;
}
}

View File

@ -3,7 +3,7 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dbnt.kcscbackend.standardCode.mapper.StandardCodeMapper"> <mapper namespace="com.dbnt.kcscbackend.standardCode.mapper.StandardCodeMapper">
<select id="selectStandardCodeList" parameterType="TnDocumentInfoVO" resultMap="TnDocumentInfoVO"> <select id="selectStandardCodeList" parameterType="TnDocumentInfo" resultType="TnDocumentInfo">
SELECT SELECT
doc_info_seq, doc_info_seq,
use_yn, use_yn,
@ -42,7 +42,7 @@
LIMIT #{recordCountPerPage} OFFSET #{firstIndex} LIMIT #{recordCountPerPage} OFFSET #{firstIndex}
</select> </select>
<select id="selectStandardCodeListCnt" parameterType="TnDocumentInfoVO" resultType="int"> <select id="selectStandardCodeListCnt" parameterType="TnDocumentInfo" resultType="int">
SELECT count(*) SELECT count(*)
FROM FROM
tn_document_info tn_document_info