Merge branch 'master' of http://118.219.150.34:50501/DBNT/kcscDev
commit
d919e8fc9c
|
|
@ -45,7 +45,7 @@ function StandardCodeList(props) {
|
|||
EgovNet.requestFetch(retrieveListURL,
|
||||
requestOptions,
|
||||
(resp) => {
|
||||
setMasterBoard(resp.result.tnDocumentInfoVO);
|
||||
setMasterBoard(resp.result.tnDocumentInfo);
|
||||
setPaginationInfo(resp.result.paginationInfo);
|
||||
|
||||
let mutListTag = [];
|
||||
|
|
@ -66,12 +66,14 @@ function StandardCodeList(props) {
|
|||
state={{
|
||||
docInfoSeq: item.docInfoSeq,
|
||||
docNm: item.docNm,
|
||||
kcscCode: item.kcscCode,
|
||||
kcscCd: item.kcscCd,
|
||||
searchCondition: searchCondition
|
||||
}}
|
||||
key={listIdx}
|
||||
className="list_item" >
|
||||
<div>{listIdx}</div>
|
||||
<div></div>
|
||||
<div></div>
|
||||
<div>{item.kcscCd}</div>
|
||||
{(item.replyLc * 1 ? true : false) &&
|
||||
<div className="al reply">
|
||||
{item.docNm}
|
||||
|
|
@ -80,9 +82,10 @@ function StandardCodeList(props) {
|
|||
<div className="al">
|
||||
{item.docNm}
|
||||
</div>}
|
||||
<div>{item.frstRegisterNm}</div>
|
||||
<div>{item.frstRegisterPnttm}</div>
|
||||
<div>{item.inqireCo}</div>
|
||||
<div></div>
|
||||
<div></div>
|
||||
<div></div>
|
||||
<div></div>
|
||||
</Link>
|
||||
);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -4,8 +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.TnDocumentInfoVO;
|
||||
import com.dbnt.kcscbackend.standardCode.service.StandardCodeListService;
|
||||
import com.dbnt.kcscbackend.standardCode.entity.TnDocumentInfo;
|
||||
import com.dbnt.kcscbackend.standardCode.service.StandardCodeService;
|
||||
import com.dbnt.kcscbackend.standardCode.service.StandardCodeVO;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
|
@ -49,7 +48,6 @@ public class StandardCodeController extends BaseController {
|
|||
|
||||
private final StandardCodeService standardCodeService;
|
||||
|
||||
private final StandardCodeListService standardCodeListService;
|
||||
|
||||
|
||||
@Operation(
|
||||
|
|
@ -102,27 +100,27 @@ public class StandardCodeController extends BaseController {
|
|||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||
})
|
||||
@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 {
|
||||
ResultVO resultVO = new ResultVO();
|
||||
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(tnDocumentInfoVO.getPageIndex());
|
||||
paginationInfo.setCurrentPageNo(tnDocumentInfo.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(propertyService.getInt("Globals.pageUnit"));
|
||||
paginationInfo.setPageSize(propertyService.getInt("Globals.pageSize"));
|
||||
|
||||
System.out.println("@@@ pageIndex : " + tnDocumentInfoVO.getPageIndex());
|
||||
System.out.println("@@@ pageIndex : " + tnDocumentInfo.getPageIndex());
|
||||
|
||||
tnDocumentInfoVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
tnDocumentInfoVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
tnDocumentInfoVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
tnDocumentInfo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
tnDocumentInfo.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
tnDocumentInfo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
Map<String, Object> resultMap = standardCodeListService.selectStandardCodeList(tnDocumentInfoVO);
|
||||
|
||||
int totCnt = Integer.parseInt((String)resultMap.get("resultCnt"));
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
resultMap.put("resultList", standardCodeService.selectStandardCodeList(tnDocumentInfo));
|
||||
resultMap.put("resultCnt", standardCodeService.selectStandardCodeListCnt(tnDocumentInfo));
|
||||
Integer totCnt = (Integer) resultMap.get("resultCnt");
|
||||
paginationInfo.setTotalRecordCount(totCnt);
|
||||
|
||||
resultMap.put("tnDocumentInfoVO", tnDocumentInfoVO);
|
||||
resultMap.put("paginationInfo", paginationInfo);
|
||||
resultMap.put("user", user);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.dbnt.kcscbackend.standardCode.entity;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
|
@ -85,4 +86,19 @@ public class TnDocumentInfo {
|
|||
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;
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -2,7 +2,6 @@ package com.dbnt.kcscbackend.standardCode.mapper;
|
|||
|
||||
|
||||
import com.dbnt.kcscbackend.standardCode.entity.TnDocumentInfo;
|
||||
import com.dbnt.kcscbackend.standardCode.entity.TnDocumentInfoVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -10,7 +9,7 @@ import java.util.List;
|
|||
@Mapper
|
||||
public interface StandardCodeMapper {
|
||||
|
||||
List<TnDocumentInfoVO> selectStandardCodeList(TnDocumentInfo tnDocumentInfo);
|
||||
List<TnDocumentInfo> selectStandardCodeList(TnDocumentInfo tnDocumentInfo);
|
||||
|
||||
Integer selectStandardCodeListCnt(TnDocumentInfo tnDocumentInfo);
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
|
@ -1,5 +1,7 @@
|
|||
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.TnDocumentGroupRepository;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
|
@ -14,6 +16,7 @@ import java.util.List;
|
|||
public class StandardCodeService {
|
||||
private final TnDocumentGroupRepository tnDocumentGroupRepository;
|
||||
private final TnDocumentContentRepository tnDocumentContentRepository;
|
||||
private final StandardCodeMapper standardCodeMapper;
|
||||
|
||||
public List<StandardCodeTreeInterface> selectStandardCodeTree(){
|
||||
return tnDocumentGroupRepository.spGetTnDocumentCodeByTree();
|
||||
|
|
@ -23,12 +26,12 @@ public class StandardCodeService {
|
|||
return tnDocumentContentRepository.getRecentFullContextByContent(param.getDocCode(), param.getDocPart());
|
||||
}
|
||||
|
||||
/*public List<TnDocumentInfo> selectStandardCodeList(TnDocumentInfo tnDocumentInfo) {
|
||||
public List<TnDocumentInfo> selectStandardCodeList(TnDocumentInfo tnDocumentInfo) {
|
||||
return standardCodeMapper.selectStandardCodeList(tnDocumentInfo);
|
||||
}
|
||||
|
||||
public Integer selectStandardCodeListCnt(TnDocumentInfo tnDocumentInfo) {
|
||||
return standardCodeMapper.selectStandardCodeListCnt(tnDocumentInfo);
|
||||
}*/
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.dbnt.kcscbackend.standardCode.mapper.StandardCodeMapper">
|
||||
|
||||
<select id="selectStandardCodeList" parameterType="TnDocumentInfoVO" resultMap="TnDocumentInfoVO">
|
||||
<select id="selectStandardCodeList" parameterType="TnDocumentInfo" resultType="TnDocumentInfo">
|
||||
SELECT
|
||||
doc_info_seq,
|
||||
use_yn,
|
||||
|
|
@ -42,7 +42,7 @@
|
|||
LIMIT #{recordCountPerPage} OFFSET #{firstIndex}
|
||||
</select>
|
||||
|
||||
<select id="selectStandardCodeListCnt" parameterType="TnDocumentInfoVO" resultType="int">
|
||||
<select id="selectStandardCodeListCnt" parameterType="TnDocumentInfo" resultType="int">
|
||||
SELECT count(*)
|
||||
FROM
|
||||
tn_document_info
|
||||
|
|
|
|||
Loading…
Reference in New Issue