Merge branch 'master' of http://118.219.150.34:50501/DBNT/kcscDev
commit
36eb847b15
|
|
@ -188,7 +188,7 @@ function StandardCodeList(props) {
|
||||||
</li>
|
</li>
|
||||||
<li className="third_2 R">
|
<li className="third_2 R">
|
||||||
<span className="f_search w_500">
|
<span className="f_search w_500">
|
||||||
<input type="text" name="" defaultValue={searchCondition.searchWrd} placeholder="" ref={wrdRef}
|
<input type="text" name="" defaultValue={searchCondition.searchWrd} placeholder="코드명" ref={wrdRef}
|
||||||
onChange={e => {
|
onChange={e => {
|
||||||
wrdRef.current.value = e.target.value;
|
wrdRef.current.value = e.target.value;
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +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.TnDocumentCodeList;
|
||||||
import com.dbnt.kcscbackend.standardCode.entity.TnDocumentInfo;
|
import com.dbnt.kcscbackend.standardCode.entity.TnDocumentInfo;
|
||||||
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;
|
||||||
|
|
@ -100,26 +101,18 @@ public class StandardCodeController extends BaseController {
|
||||||
public ResultVO selectStandardCodeList(@RequestBody TnDocumentInfo tnDocumentInfo, @AuthenticationPrincipal LoginVO user)
|
public ResultVO selectStandardCodeList(@RequestBody TnDocumentInfo tnDocumentInfo, @AuthenticationPrincipal LoginVO user)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
ResultVO resultVO = new ResultVO();
|
ResultVO resultVO = new ResultVO();
|
||||||
|
Map<String, Object> resultMap = new HashMap<>();
|
||||||
|
|
||||||
PaginationInfo paginationInfo = new PaginationInfo();
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
paginationInfo.setCurrentPageNo(tnDocumentInfo.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 : " + tnDocumentInfo.getPageIndex());
|
|
||||||
System.out.println("@@@ listCode : " + tnDocumentInfo.getListCode());
|
|
||||||
|
|
||||||
tnDocumentInfo.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
|
||||||
tnDocumentInfo.setLastIndex(paginationInfo.getLastRecordIndex());
|
|
||||||
tnDocumentInfo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
|
||||||
|
|
||||||
Map<String, Object> 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);
|
resultMap.put("paginationInfo", paginationInfo);
|
||||||
|
|
||||||
|
List<TnDocumentCodeList> tnDocumentCodeList = standardCodeService.selectStandardCodeList(tnDocumentInfo);
|
||||||
|
resultMap.put("resultList", tnDocumentCodeList);
|
||||||
|
Integer totCnt = tnDocumentCodeList.get(0).getContentcount();
|
||||||
|
resultMap.put("resultCnt", totCnt);
|
||||||
resultMap.put("user", user);
|
resultMap.put("user", user);
|
||||||
|
|
||||||
resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
|
resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
|
||||||
|
|
|
||||||
|
|
@ -100,9 +100,11 @@ public class TnDocumentInfo {
|
||||||
@Schema(description = "마지막페이지 인덱스")
|
@Schema(description = "마지막페이지 인덱스")
|
||||||
private int lastIndex = 1;
|
private int lastIndex = 1;
|
||||||
@Schema(description = "페이지당 레코드 개수")
|
@Schema(description = "페이지당 레코드 개수")
|
||||||
private int recordCountPerPage = 10;
|
private int recordCountPerPage = 100;
|
||||||
@Schema(description = "레코드 번호")
|
@Schema(description = "레코드 번호")
|
||||||
private int rowNo = 0;
|
private int rowNo = 0;
|
||||||
@Schema(description = "")
|
@Transient
|
||||||
private String listCode;
|
private String listCode;
|
||||||
|
@Transient
|
||||||
|
private String searchWrd;
|
||||||
}
|
}
|
||||||
|
|
@ -10,11 +10,10 @@ import java.util.List;
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface StandardCodeMapper {
|
public interface StandardCodeMapper {
|
||||||
|
|
||||||
List<TnDocumentInfo> selectStandardCodeList(TnDocumentInfo tnDocumentInfo);
|
List<TnDocumentCodeList> selectStandardCodeList(TnDocumentInfo tnDocumentInfo);
|
||||||
|
|
||||||
Integer selectStandardCodeListCnt(TnDocumentInfo tnDocumentInfo);
|
Integer selectStandardCodeListCnt(TnDocumentInfo tnDocumentInfo);
|
||||||
|
|
||||||
List<TnDocumentInfo> selectStandardCodeRevisionhistoryList(Integer groupseq);
|
List<TnDocumentInfo> selectStandardCodeRevisionhistoryList(Integer groupseq);
|
||||||
|
|
||||||
List<TnDocumentCodeList> selectStandardcodelist(String code);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,8 @@ public class StandardCodeService extends EgovAbstractServiceImpl {
|
||||||
return tnDocumentContentRepository.getRecentFullContextByContent(param.getDocCode(), param.getDocPart());
|
return tnDocumentContentRepository.getRecentFullContextByContent(param.getDocCode(), param.getDocPart());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<TnDocumentCodeList> selectStandardCodeList(TnDocumentInfo tnDocumentInfo){ return standardCodeMapper.selectStandardCodeList(tnDocumentInfo); }
|
||||||
|
|
||||||
public Integer selectStandardCodeListCnt(TnDocumentInfo tnDocumentInfo) {
|
public Integer selectStandardCodeListCnt(TnDocumentInfo tnDocumentInfo) {
|
||||||
return standardCodeMapper.selectStandardCodeListCnt(tnDocumentInfo);
|
return standardCodeMapper.selectStandardCodeListCnt(tnDocumentInfo);
|
||||||
}
|
}
|
||||||
|
|
@ -37,7 +39,4 @@ public class StandardCodeService extends EgovAbstractServiceImpl {
|
||||||
return standardCodeMapper.selectStandardCodeRevisionhistoryList(groupseq);
|
return standardCodeMapper.selectStandardCodeRevisionhistoryList(groupseq);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<TnDocumentCodeList> selectStandardcodelist(String code){
|
|
||||||
return standardCodeMapper.selectStandardcodelist(code);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,65 +3,49 @@
|
||||||
"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="TnDocumentInfo" resultType="TnDocumentInfo">
|
<select id="selectStandardCodeList" parameterType="TnDocumentInfo" resultType="TnDocumentCodeList">
|
||||||
SELECT
|
select
|
||||||
tdi.doc_info_seq,
|
case
|
||||||
tdi.use_yn,
|
when a3.doc_level > 1 then a3.doc_code_name
|
||||||
tdi.rvsn_ymd,
|
else a2.doc_code_name
|
||||||
tdi.rvsn_file_grp_id,
|
end as main_category,
|
||||||
tdi.old_seq,
|
case
|
||||||
tdi.old_kcsc_cd,
|
when a3.doc_level > 1 then a2.doc_code_name
|
||||||
tdi.last_yn,
|
else a.group_nm
|
||||||
tdi.last_chg_id,
|
end as middle_category,
|
||||||
tdi.last_chg_dt,
|
a.group_nm,
|
||||||
tdi.kcsc_cd,
|
a.kcsc_cd,
|
||||||
tdi.group_seq,
|
tdi.doc_file_grp_id,
|
||||||
tdi.frst_crt_id,
|
a.group_seq,
|
||||||
tdi.frst_crt_dt,
|
count(tdc.full_content) as contentcount
|
||||||
tdi.estb_ymd,
|
from
|
||||||
tdi.doc_yr,
|
tn_document_group a
|
||||||
tdi.doc_rvsn_remark,
|
left join tn_document_info tdi on
|
||||||
tdi.doc_rev_hist_seq,
|
a.group_seq = tdi.group_seq
|
||||||
tdi.doc_relation,
|
left join tn_document_content tdc on
|
||||||
tdi.doc_publish,
|
tdi.doc_info_seq = tdc.doc_info_seq,
|
||||||
tdi.doc_order,
|
sp_get_tn_document_code_by_tree() a2,
|
||||||
tdi.doc_nm,
|
sp_get_tn_document_code_by_tree() a3
|
||||||
tdi.doc_file_grp_id,
|
<include refid="selectStandardCodeListWhere"></include>
|
||||||
tdi.doc_er,
|
group by main_category, middle_category, a.group_nm, a.kcsc_cd, tdi.doc_file_grp_id, a.group_seq
|
||||||
tdi.doc_dept,
|
order by a.kcsc_cd
|
||||||
tdi.doc_cycl,
|
|
||||||
tdi.doc_consider,
|
|
||||||
tdi.doc_brief,
|
|
||||||
tdi.doc_advice,
|
|
||||||
tdi.aplcn_end_ymd,
|
|
||||||
tdi.aplcn_bgng_ymd
|
|
||||||
FROM
|
|
||||||
tn_document_info tdi, tn_document_group tdg
|
|
||||||
<include refid="selectStandardCodeListWhere"></include>
|
|
||||||
ORDER BY tdi.kcsc_cd
|
|
||||||
LIMIT #{recordCountPerPage} OFFSET #{firstIndex}
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectStandardCodeListCnt" parameterType="TnDocumentInfo" resultType="int">
|
|
||||||
SELECT count(*)
|
|
||||||
FROM
|
|
||||||
tn_document_info tdi, tn_document_group tdg
|
|
||||||
<include refid="selectStandardCodeListWhere"></include>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<sql id="selectStandardCodeListWhere">
|
<sql id="selectStandardCodeListWhere">
|
||||||
<where>
|
<where>
|
||||||
and tdi.group_seq = tdg.group_seq
|
a.parent_group_seq = a2.seq
|
||||||
and tdi.kcsc_cd like 'KDS%'
|
and a2.parent_seq = a3.seq
|
||||||
and tdi.last_yn = 'Y'
|
|
||||||
and tdi.use_yn = 'Y'
|
|
||||||
<if test="listCode != null and listCode != ''">
|
<if test="listCode != null and listCode != ''">
|
||||||
and tdg.group_full_cd like #{listCode} || '%'
|
and a.group_full_cd like #{listCode} || '%'
|
||||||
</if>
|
</if>
|
||||||
|
<if test="searchWrd != null and searchWrd != ''">
|
||||||
|
and a.group_nm like '%' || #{searchWrd} || '%'
|
||||||
|
</if>
|
||||||
|
and a.group_type = 'D'
|
||||||
|
and tdi.last_yn = 'Y'
|
||||||
</where>
|
</where>
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
<select id="selectStandardCodeRevisionhistoryList" resultType="TnDocumentInfo">
|
<select id="selectStandardCodeRevisionhistoryList" resultType="TnDocumentInfo">
|
||||||
select tdi.aplcn_bgng_ymd,tdi.doc_file_grp_id,tdi.rvsn_file_grp_id from tn_document_info tdi, tn_document_group tdg
|
select tdi.aplcn_bgng_ymd,tdi.doc_file_grp_id,tdi.rvsn_file_grp_id from tn_document_info tdi, tn_document_group tdg
|
||||||
where 1 = 1
|
where 1 = 1
|
||||||
|
|
@ -71,43 +55,5 @@
|
||||||
and tdi.use_yn = 'Y'
|
and tdi.use_yn = 'Y'
|
||||||
order by tdi.kcsc_cd;
|
order by tdi.kcsc_cd;
|
||||||
</select>
|
</select>
|
||||||
<select id="selectStandardcodelist" resultType="TnDocumentCodeList">
|
|
||||||
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
|
|
||||||
where
|
|
||||||
a.parent_group_seq = a2.seq
|
|
||||||
and a2.parent_seq = a3.seq
|
|
||||||
and a.group_full_cd like #{code} || '%'
|
|
||||||
and a.group_type = 'D'
|
|
||||||
and tdi.last_yn = 'Y'
|
|
||||||
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;
|
|
||||||
</select>
|
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue