|
@@ -162,10 +162,16 @@ public class DeptVitalFacade extends DeptVitalServiceImpl {
|
|
.map(deptVitals -> deptVitals.getVitalId())
|
|
.map(deptVitals -> deptVitals.getVitalId())
|
|
.collect(Collectors.toList());
|
|
.collect(Collectors.toList());
|
|
if (vitalIds.size() > 0) {
|
|
if (vitalIds.size() > 0) {
|
|
- List<QuestionInfo> vitalList = Lists.newArrayList(questionFacade.listByIds(vitalIds));
|
|
|
|
|
|
+ QueryWrapper<QuestionInfo> questionInfoQueryWrapper = new QueryWrapper<>();
|
|
|
|
+ questionInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
|
+ .in("id", vitalIds);
|
|
|
|
+ List<QuestionInfo> vitalList = questionFacade.list(questionInfoQueryWrapper);
|
|
Map<Long, QuestionInfo> vitalMap = EntityUtil.makeEntityMap(vitalList, "id");
|
|
Map<Long, QuestionInfo> vitalMap = EntityUtil.makeEntityMap(vitalList, "id");
|
|
List<QuestionShortDTO> vitals = Lists.newArrayList();
|
|
List<QuestionShortDTO> vitals = Lists.newArrayList();
|
|
for (Long vitalId : vitalIds) {
|
|
for (Long vitalId : vitalIds) {
|
|
|
|
+ if (!vitalMap.containsKey(vitalId)) {
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
QuestionShortDTO vital = new QuestionShortDTO();
|
|
QuestionShortDTO vital = new QuestionShortDTO();
|
|
BeanUtil.copyProperties(vitalMap.get(vitalId), vital);
|
|
BeanUtil.copyProperties(vitalMap.get(vitalId), vital);
|
|
vitals.add(vital);
|
|
vitals.add(vital);
|