|
@@ -8,6 +8,7 @@ import com.diagbot.client.StandConvertServiceClient;
|
|
|
import com.diagbot.dto.*;
|
|
|
import com.diagbot.entity.DiseaseInfo;
|
|
|
import com.diagbot.entity.DiseaseProperty;
|
|
|
+import com.diagbot.entity.SymptomNumOfDiS;
|
|
|
import com.diagbot.entity.node.LisRemind;
|
|
|
import com.diagbot.entity.relationship.LisRemindGroup;
|
|
|
import com.diagbot.entity.relationship.LisRemindMedicine;
|
|
@@ -175,6 +176,18 @@ public class NeoFacade {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public void symptomNumCache() {
|
|
|
+ List<SymptomNumOfDiS> diseaseProperty = nodeRepository.getSymptomNum();
|
|
|
+ if (ListUtil.isNotEmpty(diseaseProperty)) {
|
|
|
+ Map map = diseaseProperty.stream().collect(Collectors.toMap(
|
|
|
+ k -> RedisEnum.symptomNumType.getName() + k.getDisease(),
|
|
|
+ v -> v.getNum(),
|
|
|
+ (v1, v2) -> (v2)
|
|
|
+ ));
|
|
|
+ redisTemplate.opsForValue().multiSet(map);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 返回图谱中所有症状缓存信息
|
|
|
*
|
|
@@ -362,9 +375,11 @@ public class NeoFacade {
|
|
|
public List<String> addDiagFromPresent(List<String> lis_dis, List<String> presentDiags) {
|
|
|
List<String> lis_dis_new = Lists.newArrayList();
|
|
|
if (ListUtil.isNotEmpty(lis_dis) && ListUtil.isNotEmpty(presentDiags)) {
|
|
|
- if (lis_dis.size() >= 10) {
|
|
|
+// if (lis_dis.size() >= 10) {
|
|
|
+ if (lis_dis.size() >= 1) {
|
|
|
for (int i = 0; i < lis_dis.size(); i++) {
|
|
|
- if (i == 10 - presentDiags.size()) {
|
|
|
+// if (i == 10 - presentDiags.size()) {
|
|
|
+ if (i == 1) {
|
|
|
for (String dis : presentDiags) {
|
|
|
if (!lis_dis_new.contains(dis)) {
|
|
|
lis_dis_new.add(dis);
|