|
@@ -0,0 +1,64 @@
|
|
|
|
+package com.diagbot.web;
|
|
|
|
+
|
|
|
|
+import com.diagbot.annotation.SysLogger;
|
|
|
|
+import com.diagbot.dto.RespDTO;
|
|
|
|
+import com.diagbot.dto.RetrievalDTO;
|
|
|
|
+import com.diagbot.dto.ScaleIndexDTO;
|
|
|
|
+import com.diagbot.facade.ConceptDetailFacade;
|
|
|
|
+import com.diagbot.facade.SearchFacade;
|
|
|
|
+import com.diagbot.vo.GetStaticKnowledgeVO;
|
|
|
|
+import com.diagbot.vo.GetStaticVO;
|
|
|
|
+import com.diagbot.vo.ScaleIndexVO;
|
|
|
|
+import io.micrometer.core.instrument.search.Search;
|
|
|
|
+import io.swagger.annotations.Api;
|
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
|
+
|
|
|
|
+import javax.validation.Valid;
|
|
|
|
+import java.util.List;
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * @Description:
|
|
|
|
+ * @Author: gaodm
|
|
|
|
+ * @time: 2019/5/14 9:51
|
|
|
|
+ */
|
|
|
|
+@RestController
|
|
|
|
+@RequestMapping("/search")
|
|
|
|
+@Api(value = "检索API", tags = { "数据服务模式-检索API" })
|
|
|
|
+@SuppressWarnings("unchecked")
|
|
|
|
+public class SearchController {
|
|
|
|
+ @Autowired
|
|
|
|
+ private SearchFacade searchFacade;
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 静态知识检索
|
|
|
|
+ *
|
|
|
|
+ * @param getStaticVO
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @ApiOperation(value = "静态知识检索[by:zhoutg]",
|
|
|
|
+ notes = "inputStr:检索内容,必填")
|
|
|
|
+ @PostMapping("/getStaticKnowledge")
|
|
|
|
+ @SysLogger("getStaticKnowledge")
|
|
|
|
+ public RespDTO<List<RetrievalDTO>> getStaticKnowledge(@Valid @RequestBody GetStaticVO getStaticVO){
|
|
|
|
+ return RespDTO.onSuc(searchFacade.getStaticKnowledge(getStaticVO));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 量表搜索
|
|
|
|
+ *
|
|
|
|
+ * @param scaleIndexVO
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @ApiOperation(value = "量表搜索[by:zhoutg]",
|
|
|
|
+ notes = "name:检索内容,必填<br>" +
|
|
|
|
+ "filterName:需要过滤的名称")
|
|
|
|
+ @PostMapping(value = "/getScale")
|
|
|
|
+ public RespDTO<List<ScaleIndexDTO>> index(@Valid @RequestBody ScaleIndexVO scaleIndexVO){
|
|
|
|
+ return RespDTO.onSuc(searchFacade.index(scaleIndexVO));
|
|
|
|
+ }
|
|
|
|
+}
|