|
@@ -23,7 +23,6 @@ import com.diagbot.entity.DoctorAdvice;
|
|
|
import com.diagbot.entity.HomeDiagnoseInfo;
|
|
|
import com.diagbot.entity.HomeOperationInfo;
|
|
|
import com.diagbot.entity.HomePage;
|
|
|
-import com.diagbot.entity.QcCasesEntryPagedata;
|
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
|
import com.diagbot.exception.CommonException;
|
|
@@ -34,6 +33,7 @@ import com.diagbot.util.EncrypDES;
|
|
|
import com.diagbot.util.EntityUtil;
|
|
|
import com.diagbot.util.ListUtil;
|
|
|
import com.diagbot.util.MapUtil;
|
|
|
+import com.diagbot.util.StringUtil;
|
|
|
import com.diagbot.util.SysUserUtils;
|
|
|
import com.diagbot.vo.AlgorithmVO;
|
|
|
import com.diagbot.vo.AnalyzeApiVO;
|
|
@@ -53,6 +53,7 @@ import java.util.ArrayList;
|
|
|
import java.util.Arrays;
|
|
|
import java.util.Date;
|
|
|
import java.util.HashMap;
|
|
|
+import java.util.LinkedHashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.Set;
|
|
@@ -168,22 +169,22 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
AnalyzeVO analyzeVO = new AnalyzeVO();
|
|
|
BeanUtil.copyProperties(getDetailVO, analyzeVO);
|
|
|
List<MsgDTO> msgDTOList = getMsg(analyzeVO);
|
|
|
- List<Long> caseEntryId = msgDTOList.stream().map(r -> r.getCasesEntryId()).collect(Collectors.toList());
|
|
|
- if (ListUtil.isNotEmpty(caseEntryId)) {
|
|
|
- List<QcCasesEntryPagedata> qcCasesEntryPagedataList = qcCasesEntryPagedataFacade.list(new QueryWrapper<QcCasesEntryPagedata>()
|
|
|
- .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
- .eq("hospital_id", hospitalId)
|
|
|
- .in("cases_entry_id", caseEntryId)
|
|
|
- );
|
|
|
- Map<Long, List<QcCasesEntryPagedata>> pageKey = EntityUtil.makeEntityListMap(qcCasesEntryPagedataList, "casesEntryId");
|
|
|
- for (MsgDTO msgDTO : msgDTOList) {
|
|
|
- List<QcCasesEntryPagedata> pagedata = pageKey.get(msgDTO.getCasesEntryId());
|
|
|
- if (ListUtil.isNotEmpty(pagedata)) {
|
|
|
- msgDTO.setPageKeyList(pagedata.stream().map(r -> r.getPageKey()).collect(Collectors.toList()));
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
+ // 前端直接匹配,不从数据库获取
|
|
|
+// List<Long> caseEntryId = msgDTOList.stream().map(r -> r.getCasesEntryId()).collect(Collectors.toList());
|
|
|
+// if (ListUtil.isNotEmpty(caseEntryId)) {
|
|
|
+// List<QcCasesEntryPagedata> qcCasesEntryPagedataList = qcCasesEntryPagedataFacade.list(new QueryWrapper<QcCasesEntryPagedata>()
|
|
|
+// .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+// .eq("hospital_id", hospitalId)
|
|
|
+// .in("cases_entry_id", caseEntryId)
|
|
|
+// );
|
|
|
+// Map<Long, List<QcCasesEntryPagedata>> pageKey = EntityUtil.makeEntityListMap(qcCasesEntryPagedataList, "casesEntryId");
|
|
|
+// for (MsgDTO msgDTO : msgDTOList) {
|
|
|
+// List<QcCasesEntryPagedata> pagedata = pageKey.get(msgDTO.getCasesEntryId());
|
|
|
+// if (ListUtil.isNotEmpty(pagedata)) {
|
|
|
+// msgDTO.setPageKeyList(pagedata.stream().map(r -> r.getPageKey()).collect(Collectors.toList()));
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
Map<String, List<MsgDTO>> msgMap = EntityUtil.makeEntityListMap(msgDTOList, "modelName");
|
|
|
res.put("msg", msgMap);
|
|
|
}
|
|
@@ -317,12 +318,28 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
//根据质控结果获取质控条目
|
|
|
QcResultAlgQueryVO qcResultAlgQueryVO = new QcResultAlgQueryVO();
|
|
|
List<String> codeList = new ArrayList<>();
|
|
|
- for (Map.Entry<String, Map<String, String>> output : outputInfo.getResult().entrySet()) {
|
|
|
- codeList.add(output.getKey());
|
|
|
+ // code和info的映射map
|
|
|
+ Map<String, String> codeToInfoMap = new LinkedHashMap<>();
|
|
|
+ Map<String, Map<String, String>> codeMap = outputInfo.getResult();
|
|
|
+ for (String key : codeMap.keySet()) {
|
|
|
+ codeList.add(key);
|
|
|
+ Map<String, String> mapInfo = codeMap.get(key);
|
|
|
+ if (mapInfo != null && StringUtil.isNotBlank(mapInfo.get("info"))) {
|
|
|
+ codeToInfoMap.put(key, mapInfo.get("info"));
|
|
|
+ }
|
|
|
}
|
|
|
qcResultAlgQueryVO.setCodeList(codeList);
|
|
|
qcResultAlgQueryVO.setHospitalId(hospitalId);
|
|
|
List<QcResultAlgVO> qcResultAlgVOList = qcCasesEntryFacade.getQcResultAlgVO(qcResultAlgQueryVO);
|
|
|
+
|
|
|
+ // 对info赋值
|
|
|
+ for(QcResultAlgVO bean : qcResultAlgVOList) {
|
|
|
+ String info = codeToInfoMap.get(bean.getCode());
|
|
|
+ if (StringUtil.isNotBlank(info)) {
|
|
|
+ bean.setInfo(info);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// 评分
|
|
|
AlgorithmVO algorithmVO = new AlgorithmVO();
|
|
|
algorithmVO.setType(0);
|
|
@@ -338,9 +355,8 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
Date date = qcresultInfoFacade.saveQcResult(algorithmDTO, algorithmVO, analyzeVO, pageData, menuData, analyzeVO.getIsTask());
|
|
|
|
|
|
// 返回提示信息
|
|
|
- List<MsgDTO> msgDTOList = getMsg(analyzeVO);
|
|
|
- Map<String, List<MsgDTO>> msgMap = EntityUtil.makeEntityListMap(msgDTOList, "modelName");
|
|
|
-
|
|
|
+// List<MsgDTO> msgDTOList = getMsg(analyzeVO);
|
|
|
+// Map<String, List<MsgDTO>> msgMap = EntityUtil.makeEntityListMap(msgDTOList, "modelName");
|
|
|
|
|
|
//返回参数组装
|
|
|
AnalyzeDTO analyzeDTO = new AnalyzeDTO();
|