|
@@ -31,9 +31,7 @@ import com.google.common.collect.Maps;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
@@ -204,13 +202,14 @@ public class RecordCheckFacade {
|
|
|
}
|
|
|
});
|
|
|
Long hospitalId = Long.parseLong(SysUserUtils.getCurrentHospitalID());
|
|
|
- List<Integer> valus = medBehospitalTypeServiceImpl.list(new QueryWrapper<MedBehospitalType>()
|
|
|
+ Map<String,Integer> valueMaps = medBehospitalTypeServiceImpl.list(new QueryWrapper<MedBehospitalType>()
|
|
|
.eq("hospital_id", hospitalId)
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.isNotNull("value")
|
|
|
- .groupBy("value")).stream().map(MedBehospitalType::getValue).collect(Collectors.toList());
|
|
|
+ .select("behospital_type,value")
|
|
|
+ .groupBy("value")).stream().collect(Collectors.toMap(MedBehospitalType::getBehospitalType, MedBehospitalType::getValue,(k1, k2) -> k1,LinkedHashMap::new));
|
|
|
out.put("source", checkTypes);
|
|
|
- out.put("value", valus);
|
|
|
+ out.put("value", valueMaps);
|
|
|
return out;
|
|
|
}
|
|
|
}
|