Browse Source

匹配不上的数据暂不推送

zhaops 5 years ago
parent
commit
d524d8b59e

+ 3 - 1
tran-service/src/main/java/com/diagbot/web/DiseaseDeptController.java

@@ -10,7 +10,9 @@ 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.ResponseBody;
 import org.springframework.web.bind.annotation.RestController;
 
 import java.util.List;
@@ -36,7 +38,7 @@ public class DiseaseDeptController {
                     "conceptNames: 内部诊断名称列表<br>")
     @PostMapping("/getDiseaseDeptByConceptNames")
     @SysLogger("getDiseaseDeptByConceptNames")
-    public RespDTO<List<DiseaseDeptDTO>> getDiseaseDeptByConceptNames(DiseaseDeptVO diseaseDeptVO) {
+    public RespDTO<List<DiseaseDeptDTO>> getDiseaseDeptByConceptNames(@RequestBody DiseaseDeptVO diseaseDeptVO) {
         List<DiseaseDeptDTO> data = diseaseDeptFacade.getDiseaseDeptByConceptNames(diseaseDeptVO);
         return RespDTO.onSuc(data);
     }

+ 1 - 0
triage-service/src/main/java/com/diagbot/dto/SYFDeptDTO.java

@@ -14,5 +14,6 @@ import java.util.List;
 @Setter
 public class SYFDeptDTO {
     private String deptName;
+    private String deptCode;
     private List<SYFDiseaseDeptDTO> diseaseDept;
 }

+ 8 - 0
triage-service/src/main/java/com/diagbot/facade/AIFacade.java

@@ -332,6 +332,9 @@ public class AIFacade {
                 });
                 for (SYFDiseaseDeptDTO syfDiseaseDeptDTO : syfDiseaseDeptList) {
                     if (items.size() < 2) {
+                        if (StringUtil.isBlank(syfDiseaseDeptDTO.getDept())) {
+                            continue;
+                        }
                         items.add(syfDiseaseDeptDTO);
                     }
                 }
@@ -342,6 +345,7 @@ public class AIFacade {
         itemMap.entrySet().forEach(item -> {
             SYFDeptDTO syfDeptDTO = new SYFDeptDTO();
             syfDeptDTO.setDeptName(item.getKey());
+            syfDeptDTO.setDeptCode(item.getValue().get(0).getDeptCode());
             syfDeptDTO.setDiseaseDept(item.getValue());
             syfDeptDTOList.add(syfDeptDTO);
         });
@@ -498,6 +502,10 @@ public class AIFacade {
 
         for (SYFDiseaseDeptDTO syfDiseaseDeptDTO : mergeFeatureList) {
             if (items.size() < size) {
+                //未匹配数据暂不返回
+                if (StringUtil.isBlank(syfDiseaseDeptDTO.getDept())) {
+                    continue;
+                }
                 items.add(syfDiseaseDeptDTO);
             } else {
                 break;