Merge remote-tracking branch 'origin/master'
commit
156d0beba4
|
|
@ -119,7 +119,7 @@ public class StandardCodeController extends BaseController {
|
||||||
tnDocumentInfo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
tnDocumentInfo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||||
|
|
||||||
Map<String, Object> resultMap = new HashMap<>();
|
Map<String, Object> resultMap = new HashMap<>();
|
||||||
resultMap.put("resultList", standardCodeService.selectStandardCodeList(tnDocumentInfo));
|
resultMap.put("resultList", standardCodeService.selectStandardcodlist(tnDocumentInfo.getListCode()));
|
||||||
resultMap.put("resultCnt", standardCodeService.selectStandardCodeListCnt(tnDocumentInfo));
|
resultMap.put("resultCnt", standardCodeService.selectStandardCodeListCnt(tnDocumentInfo));
|
||||||
Integer totCnt = (Integer) resultMap.get("resultCnt");
|
Integer totCnt = (Integer) resultMap.get("resultCnt");
|
||||||
paginationInfo.setTotalRecordCount(totCnt);
|
paginationInfo.setTotalRecordCount(totCnt);
|
||||||
|
|
@ -139,10 +139,7 @@ public class StandardCodeController extends BaseController {
|
||||||
tags = {"StandardCodeController"}
|
tags = {"StandardCodeController"}
|
||||||
)
|
)
|
||||||
@PostMapping("/testCodeList.do")
|
@PostMapping("/testCodeList.do")
|
||||||
public ResponseEntity<?> testCodeList(@RequestBody Integer groupseq){
|
public ResponseEntity<List<TnDocumentInfo>> testCodeList(@RequestBody Integer groupseq){
|
||||||
System.out.println(groupseq+"-------------------------------");
|
|
||||||
|
|
||||||
|
|
||||||
return ResponseEntity.ok(standardCodeService.selectStandardCodeRevisionhistoryList(groupseq));
|
return ResponseEntity.ok(standardCodeService.selectStandardCodeRevisionhistoryList(groupseq));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.dbnt.kcscbackend.standardCode.mapper;
|
package com.dbnt.kcscbackend.standardCode.mapper;
|
||||||
|
|
||||||
|
|
||||||
|
import com.dbnt.kcscbackend.standardCode.entity.TnDocumentCodeList;
|
||||||
import com.dbnt.kcscbackend.standardCode.entity.TnDocumentInfo;
|
import com.dbnt.kcscbackend.standardCode.entity.TnDocumentInfo;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
|
@ -14,4 +15,6 @@ public interface StandardCodeMapper {
|
||||||
Integer selectStandardCodeListCnt(TnDocumentInfo tnDocumentInfo);
|
Integer selectStandardCodeListCnt(TnDocumentInfo tnDocumentInfo);
|
||||||
|
|
||||||
List<TnDocumentInfo> selectStandardCodeRevisionhistoryList(Integer groupseq);
|
List<TnDocumentInfo> selectStandardCodeRevisionhistoryList(Integer groupseq);
|
||||||
|
|
||||||
|
List<TnDocumentCodeList> selectStandardcodlist(String code);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.dbnt.kcscbackend.standardCode.service;
|
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.entity.TnDocumentInfo;
|
||||||
import com.dbnt.kcscbackend.standardCode.mapper.StandardCodeMapper;
|
import com.dbnt.kcscbackend.standardCode.mapper.StandardCodeMapper;
|
||||||
import com.dbnt.kcscbackend.standardCode.repository.TnDocumentContentRepository;
|
import com.dbnt.kcscbackend.standardCode.repository.TnDocumentContentRepository;
|
||||||
|
|
@ -37,4 +38,8 @@ public class StandardCodeService {
|
||||||
public List<TnDocumentInfo> selectStandardCodeRevisionhistoryList(Integer groupseq) {
|
public List<TnDocumentInfo> selectStandardCodeRevisionhistoryList(Integer groupseq) {
|
||||||
return standardCodeMapper.selectStandardCodeRevisionhistoryList(groupseq);
|
return standardCodeMapper.selectStandardCodeRevisionhistoryList(groupseq);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<TnDocumentCodeList> selectStandardcodlist(String code){
|
||||||
|
return standardCodeMapper.selectStandardcodlist(code);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -71,4 +71,45 @@
|
||||||
and tdi.use_yn = 'Y'
|
and tdi.use_yn = 'Y'
|
||||||
order by tdi.kcsc_cd;
|
order by tdi.kcsc_cd;
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectStandardcodlist" 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