|
|
@ -17,6 +17,9 @@ import org.springframework.stereotype.Service;
|
|
|
|
import java.util.Comparator;
|
|
|
|
import java.util.Comparator;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Optional;
|
|
|
|
import java.util.Optional;
|
|
|
|
|
|
|
|
import java.util.concurrent.ConcurrentHashMap;
|
|
|
|
|
|
|
|
import java.util.function.Function;
|
|
|
|
|
|
|
|
import java.util.function.Predicate;
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
|
|
@Service
|
|
|
|
@Service
|
|
|
@ -96,7 +99,8 @@ public class AskPhysicalServiceImpl implements AskPhysicalService {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<AskPhysicalHistoryResVO> queryAskPhysicalHistory(String processId) {
|
|
|
|
public List<AskPhysicalHistoryResVO> queryAskPhysicalHistory(String processId) {
|
|
|
|
return diagnosisPhysicalRecordService.queryAskPhysicalHistory(processId);
|
|
|
|
return diagnosisPhysicalRecordService.queryAskPhysicalHistory(processId).stream()
|
|
|
|
|
|
|
|
.filter(distinctPredicateNotNull(e->e.getToolId()+e.getLocationId())).collect(Collectors.toList());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -115,4 +119,9 @@ public class AskPhysicalServiceImpl implements AskPhysicalService {
|
|
|
|
return diagnosisPhysicalRecordVo;
|
|
|
|
return diagnosisPhysicalRecordVo;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static <K> Predicate<K> distinctPredicateNotNull(Function<K,Object> function){
|
|
|
|
|
|
|
|
ConcurrentHashMap<Object, Boolean> map = new ConcurrentHashMap<>();
|
|
|
|
|
|
|
|
return t-> null != function.apply(t) && null == map.putIfAbsent(function.apply(t), true);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|