|
@@ -38,6 +38,7 @@ import com.diagbot.vo.StaticKnowledgeHISVO;
|
|
|
import com.diagbot.vo.StaticKnowledgeIndexVO;
|
|
|
import com.diagbot.vo.StaticKnowledgeVO;
|
|
|
import com.google.common.collect.Lists;
|
|
|
+import io.swagger.models.auth.In;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Qualifier;
|
|
|
import org.springframework.stereotype.Component;
|
|
@@ -741,7 +742,7 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
|
|
|
* @param nameList
|
|
|
* @return
|
|
|
*/
|
|
|
- public Map<String, List<ConceptDetail>> getDetailByConcept(List<String> nameList) {
|
|
|
+ public Map<String, List<ConceptDetail>> getDetailByConcept(List<String> nameList, List<Integer> contentTypes) {
|
|
|
Map<String, List<ConceptDetail>> retMap = new HashMap<>();
|
|
|
List<DictionaryInfoDTO> dicList = dictionaryFacade.getListByGroupType(8);
|
|
|
QueryWrapper<ConceptInfo> conceptInfoQueryWrapper = new QueryWrapper<>();
|
|
@@ -759,8 +760,17 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
|
|
|
|
|
|
QueryWrapper<ConceptDetail> conceptDetailQueryWrapper = new QueryWrapper<>();
|
|
|
conceptDetailQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
- .in("concept_id", conceptIds)
|
|
|
- .in("content_type", new Integer[] { 1, 2, 3 });
|
|
|
+ .in("concept_id", conceptIds);
|
|
|
+ if(ListUtil.isNotEmpty(contentTypes)) {
|
|
|
+ conceptDetailQueryWrapper.and(sql -> {
|
|
|
+ for (int i = 0; i < contentTypes.size(); i++) {
|
|
|
+ if (i > 0) {
|
|
|
+ sql.or();
|
|
|
+ }
|
|
|
+ sql.apply("find_in_set({0},content_type)", contentTypes.get(i));
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
List<ConceptDetail> conceptDetailList = conceptDetailFacade.list(conceptDetailQueryWrapper);
|
|
|
Map<Long, List<ConceptDetail>> detailMap
|
|
|
= EntityUtil.makeEntityListMap(conceptDetailList, "conceptId");
|