|
@@ -3,7 +3,9 @@ package com.diagbot.facade;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.diagbot.client.BehospitalInfoHystrixClient;
|
|
|
+import com.diagbot.dto.AnalyzeMessageDTO;
|
|
|
import com.diagbot.dto.MedQcresultDetailAllDTO;
|
|
|
+import com.diagbot.dto.RespDTO;
|
|
|
import com.diagbot.dto.SthospitalInfoFindDTO;
|
|
|
import com.diagbot.dto.SthospitalInfoPageDTO;
|
|
|
import com.diagbot.dto.SthospitalInfoStatiDTO;
|
|
@@ -32,6 +34,7 @@ import org.springframework.stereotype.Component;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* @author wangfeng
|
|
@@ -171,18 +174,24 @@ public class StdBehospitalInfoFacade extends StdBehospitalInfoServiceImpl {
|
|
|
return stdBehospitalInfoService.getStatistic(sthospitalInfoStatiVO);
|
|
|
}
|
|
|
|
|
|
- public boolean analyze() {
|
|
|
+ public AnalyzeMessageDTO analyze() {
|
|
|
+ AnalyzeMessageDTO analyzeMessageDTO = new AnalyzeMessageDTO();
|
|
|
QueryWrapper<StdBehospitalInfo> stdBehospitalInfoQuery = new QueryWrapper<>();
|
|
|
stdBehospitalInfoQuery.eq("is_deleted", IsDeleteEnum.N.getKey());
|
|
|
List<StdBehospitalInfo> list = stdBehospitalInfoService.list(stdBehospitalInfoQuery);
|
|
|
+ List<String> messages = new ArrayList<>();
|
|
|
if (ListUtil.isNotEmpty(list)) {
|
|
|
for (StdBehospitalInfo data : list) {
|
|
|
AnalyzeApiVO analyzeApiVO = new AnalyzeApiVO();
|
|
|
analyzeApiVO.setBehospitalCode(data.getBehospitalCode());
|
|
|
analyzeApiVO.setHospitalId(data.getHospitalId());
|
|
|
- behospitalInfoHystrixClient.analyzeApi(analyzeApiVO);
|
|
|
+ RespDTO<Map<String, Object>> mapRespDTO = behospitalInfoHystrixClient.analyzeApi(analyzeApiVO);
|
|
|
+ if(mapRespDTO.data == null){
|
|
|
+ messages.add(mapRespDTO.msg+data.getBehospitalCode());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- return true;
|
|
|
+ analyzeMessageDTO.setMessages(messages);
|
|
|
+ return analyzeMessageDTO;
|
|
|
}
|
|
|
}
|