|
@@ -22,6 +22,7 @@ import lombok.val;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
@@ -59,28 +60,25 @@ public class KlConceptStaticFacade {
|
|
|
public List<StaticKnowledgeIndexDTO> staticKnowledgeIndex(StaticKnowledgeIndexVO staticKnowledgeIndexVO) {
|
|
|
List<StaticKnowledgeIndexDTO> retList = Lists.newLinkedList();
|
|
|
List<ClassicCaseIndexDTO> cases = Lists.newLinkedList();
|
|
|
+ RespDTO<List<ClassicCaseIndexDTO>> caseDTO = RespDTO.onSuc(new ArrayList<>(0));
|
|
|
+ RespDTO<List<StaticKnowledgeIndexDTO>> respDTO = RespDTO.onSuc(new ArrayList<>(0));
|
|
|
|
|
|
- RespDTO<List<ClassicCaseIndexDTO>> caseDTO = cdssCoreClient.classicCaseIndex(staticKnowledgeIndexVO);
|
|
|
- if(staticKnowledgeIndexVO.getTypes().contains(11))
|
|
|
- staticKnowledgeIndexVO.getTypes().remove(staticKnowledgeIndexVO.getTypes().indexOf(11));
|
|
|
- RespDTO<List<StaticKnowledgeIndexDTO>> respDTO = cdssCoreClient.staticKnowledgeIndex(staticKnowledgeIndexVO);
|
|
|
+ if (staticKnowledgeIndexVO.getTypes().contains(0) ||
|
|
|
+ staticKnowledgeIndexVO.getTypes().contains(11) ||
|
|
|
+ staticKnowledgeIndexVO.getTypes().isEmpty()) {
|
|
|
+ caseDTO = cdssCoreClient.classicCaseIndex(staticKnowledgeIndexVO);
|
|
|
+ if (staticKnowledgeIndexVO.getTypes().contains(11) && staticKnowledgeIndexVO.getTypes().size() > 1)
|
|
|
+ staticKnowledgeIndexVO.getTypes().remove(staticKnowledgeIndexVO.getTypes().indexOf(11));
|
|
|
+ }
|
|
|
+ if (!staticKnowledgeIndexVO.getTypes().contains(11))
|
|
|
+ respDTO = cdssCoreClient.staticKnowledgeIndex(staticKnowledgeIndexVO);
|
|
|
|
|
|
if (RespDTOUtil.respIsOK(respDTO)) {
|
|
|
retList = respDTO.data;
|
|
|
if (RespDTOUtil.respIsOK(caseDTO)) {
|
|
|
- cases = caseDTO.data;
|
|
|
- for (ClassicCaseIndexDTO classicCase : cases){
|
|
|
+ for (ClassicCaseIndexDTO classicCase : caseDTO.data) {
|
|
|
StaticKnowledgeIndexDTO dto = new StaticKnowledgeIndexDTO();
|
|
|
- dto.setId(classicCase.getId());
|
|
|
- dto.setName(classicCase.getName());
|
|
|
- dto.setType(classicCase.getType());
|
|
|
- dto.setTypeName(classicCase.getTypeName());
|
|
|
- dto.setRetrievalName(classicCase.getRetrievalName());
|
|
|
- dto.setHasInfo(classicCase.getHasInfo());
|
|
|
- dto.setStatus(classicCase.getStatus());
|
|
|
- dto.setCode(null);
|
|
|
- dto.setGuocode(null);
|
|
|
- dto.setGuoname(null);
|
|
|
+ BeanUtil.copyProperties(classicCase, dto);
|
|
|
retList.add(dto);
|
|
|
}
|
|
|
}
|
|
@@ -258,6 +256,7 @@ public class KlConceptStaticFacade {
|
|
|
}
|
|
|
return success;
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
* 启用禁用
|
|
|
*
|