|
|
@@ -60,32 +60,32 @@ public class PatientMonitorController {
|
|
|
public R<List<PatientMonitorConsultResult>> selectPagePatient(@PathVariable("consult")@ApiParam("是否为咨询模式") boolean consult,@RequestBody PatientMonitorQuery query) {
|
|
|
log.info("医生查看输注监控列表,【{}】", JSONUtil.toJsonStr(query));
|
|
|
List<PatientMonitorConsultResult> results = BeanUtil.copyToList(patientClient.selectAll(query), PatientMonitorConsultResult.class);
|
|
|
- if(consult){
|
|
|
- if (CollectionUtil.isNotEmpty(results)) {
|
|
|
- Map<String, List<PatientMonitorConsultResult>> resultGroupByPatientId = results.stream().collect(Collectors.groupingBy(PatientMonitorConsultResult::getPatientId));
|
|
|
- //获取该与该医生有绑定的所有绑定关系
|
|
|
- ContactQuery contactQuery = new ContactQuery();
|
|
|
- contactQuery.setDoctorId(String.valueOf(SecurityUtil.getId()));
|
|
|
- List<AssistantUserBindEntity> userBinds = userBindClient.contactList(contactQuery);
|
|
|
- if(CollectionUtil.isNotEmpty(userBinds)){
|
|
|
- userBinds.parallelStream()
|
|
|
- .forEach(bind->{
|
|
|
- String patientId = bind.getPatientId();
|
|
|
- String assistId = bind.getAssistId();
|
|
|
-// if (lifeCycleManage.isOnline(assistId)) {
|
|
|
- List<PatientMonitorConsultResult> groupByPatientId = resultGroupByPatientId.get(patientId);
|
|
|
- if (CollectionUtil.isNotEmpty(groupByPatientId)) {
|
|
|
- groupByPatientId
|
|
|
- .forEach(consultResult->{
|
|
|
- consultResult.setAssistId(assistId);
|
|
|
-// consultResult.setOnline(true);
|
|
|
- });
|
|
|
- }
|
|
|
+// if(consult){
|
|
|
+// if (CollectionUtil.isNotEmpty(results)) {
|
|
|
+// Map<String, List<PatientMonitorConsultResult>> resultGroupByPatientId = results.stream().collect(Collectors.groupingBy(PatientMonitorConsultResult::getPatientId));
|
|
|
+// //获取该与该医生有绑定的所有绑定关系
|
|
|
+// ContactQuery contactQuery = new ContactQuery();
|
|
|
+// contactQuery.setDoctorId(String.valueOf(SecurityUtil.getId()));
|
|
|
+// List<AssistantUserBindEntity> userBinds = userBindClient.contactList(contactQuery);
|
|
|
+// if(CollectionUtil.isNotEmpty(userBinds)){
|
|
|
+// userBinds.parallelStream()
|
|
|
+// .forEach(bind->{
|
|
|
+// String patientId = bind.getPatientId();
|
|
|
+// String assistId = bind.getAssistId();
|
|
|
+//// if (lifeCycleManage.isOnline(assistId)) {
|
|
|
+// List<PatientMonitorConsultResult> groupByPatientId = resultGroupByPatientId.get(patientId);
|
|
|
+// if (CollectionUtil.isNotEmpty(groupByPatientId)) {
|
|
|
+// groupByPatientId
|
|
|
+// .forEach(consultResult->{
|
|
|
+// consultResult.setAssistId(assistId);
|
|
|
+//// consultResult.setOnline(true);
|
|
|
+// });
|
|
|
// }
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+//// }
|
|
|
+// });
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
return R.success(results);
|
|
|
}
|
|
|
|