|
@@ -16,6 +16,7 @@ import com.diagbot.dto.QcCasesEntryDTO;
|
|
import com.diagbot.dto.QcModeDTO;
|
|
import com.diagbot.dto.QcModeDTO;
|
|
import com.diagbot.dto.QcResultApiDTO;
|
|
import com.diagbot.dto.QcResultApiDTO;
|
|
import com.diagbot.dto.QcResultDTO;
|
|
import com.diagbot.dto.QcResultDTO;
|
|
|
|
+import com.diagbot.dto.QuestionEntryDTO;
|
|
import com.diagbot.dto.RecordContentDTO;
|
|
import com.diagbot.dto.RecordContentDTO;
|
|
import com.diagbot.dto.Response;
|
|
import com.diagbot.dto.Response;
|
|
import com.diagbot.entity.BehospitalInfo;
|
|
import com.diagbot.entity.BehospitalInfo;
|
|
@@ -97,6 +98,8 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
QcCasesEntryPagedataFacade qcCasesEntryPagedataFacade;
|
|
QcCasesEntryPagedataFacade qcCasesEntryPagedataFacade;
|
|
@Value("${encrypt.enable}")
|
|
@Value("${encrypt.enable}")
|
|
Boolean encryptFlag;
|
|
Boolean encryptFlag;
|
|
|
|
+ @Autowired
|
|
|
|
+ QcQuestionFacade qcQuestionFacade;
|
|
|
|
|
|
public IPage<BehospitalInfoDTO> pageFac(BehospitalPageVO behospitalPageVO) {
|
|
public IPage<BehospitalInfoDTO> pageFac(BehospitalPageVO behospitalPageVO) {
|
|
//入参验证
|
|
//入参验证
|
|
@@ -169,22 +172,21 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
AnalyzeVO analyzeVO = new AnalyzeVO();
|
|
AnalyzeVO analyzeVO = new AnalyzeVO();
|
|
BeanUtil.copyProperties(getDetailVO, analyzeVO);
|
|
BeanUtil.copyProperties(getDetailVO, analyzeVO);
|
|
List<MsgDTO> msgDTOList = getMsg(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()));
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
|
|
+ if (ListUtil.isNotEmpty(msgDTOList)) {
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ // 从qc_question_info的cases_entry_ids获取
|
|
|
|
+ Map<String, Object> paramMap = new HashMap<>();
|
|
|
|
+ paramMap.put("hospitalId", hospitalId);
|
|
|
|
+ paramMap.put("casesEntryIds", msgDTOList.stream().map(r -> r.getCasesEntryId()).collect(Collectors.toList()));
|
|
|
|
+ Map<Long, List<QuestionEntryDTO>> quesEntryMap = qcQuestionFacade.getByCaseEntryIdsFac(paramMap);
|
|
|
|
+ for (MsgDTO msgDTO : msgDTOList) {
|
|
|
|
+ if (quesEntryMap.get(msgDTO.getCasesEntryId()) != null) {
|
|
|
|
+ msgDTO.setPageKeyList(quesEntryMap.get(msgDTO.getCasesEntryId())
|
|
|
|
+ .stream().map(r -> r.getId()).collect(Collectors.toList()));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ // 根据模块分组
|
|
Map<String, List<MsgDTO>> msgMap = EntityUtil.makeEntityListMap(msgDTOList, "modelName");
|
|
Map<String, List<MsgDTO>> msgMap = EntityUtil.makeEntityListMap(msgDTOList, "modelName");
|
|
res.put("msg", msgMap);
|
|
res.put("msg", msgMap);
|
|
}
|
|
}
|