|
@@ -6,6 +6,7 @@ import com.diagbot.entity.QuestionDetail;
|
|
import com.diagbot.entity.QuestionInfo;
|
|
import com.diagbot.entity.QuestionInfo;
|
|
import com.diagbot.entity.wrapper.QuestionInfoWrapper;
|
|
import com.diagbot.entity.wrapper.QuestionInfoWrapper;
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
|
|
+import com.diagbot.enums.QuestionTypeEnum;
|
|
import com.diagbot.service.impl.QuestionInfoServiceImpl;
|
|
import com.diagbot.service.impl.QuestionInfoServiceImpl;
|
|
import com.diagbot.util.BeanUtil;
|
|
import com.diagbot.util.BeanUtil;
|
|
import com.diagbot.util.EntityUtil;
|
|
import com.diagbot.util.EntityUtil;
|
|
@@ -99,9 +100,45 @@ public class QuestionFacade extends QuestionInfoServiceImpl {
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ //获取uniqueName
|
|
|
|
+ if (res != null && res.getType() != null &&
|
|
|
|
+ QuestionTypeEnum.Lis.getKey() == res.getType().intValue()) {
|
|
|
|
+ String project = res.getName();
|
|
|
|
+ List<String> details = new ArrayList<>();
|
|
|
|
+ if (ListUtil.isNotEmpty(res.getQuestionMapping())) {
|
|
|
|
+ details = res.getQuestionMapping().stream().map(row -> row.getName()).collect(Collectors.toList());
|
|
|
|
+ }
|
|
|
|
+ //TODO 调用接口
|
|
|
|
+ Map<String, Map<String, String>> map = getUnique(project, details);
|
|
|
|
+ if (map != null) {
|
|
|
|
+ if (map.get("project") != null) {
|
|
|
|
+ res.setUniqueName(map.get("project").get(res.getName()));
|
|
|
|
+ }
|
|
|
|
+ if (map.get("details") != null) {
|
|
|
|
+ for (QuestionDTO bean : res.getQuestionMapping()) {
|
|
|
|
+ bean.setUniqueName(map.get("details").get(bean.getName()));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
return res;
|
|
return res;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ //TODO 删除
|
|
|
|
+ public Map<String, Map<String, String>> getUnique(String project, List<String> details) {
|
|
|
|
+ Map<String, Map<String, String>> map = new HashMap<>();
|
|
|
|
+ Map<String, String> map2 = new HashMap<>();
|
|
|
|
+ map2.put("血常规", "血常规大项目啊");
|
|
|
|
+ map.put("project", map2);
|
|
|
|
+
|
|
|
|
+ Map<String, String> map3 = new HashMap<>();
|
|
|
|
+ map3.put("HGB*3/HCT", "其他名字");
|
|
|
|
+ map3.put("白细胞计数(WBC)", "推送2");
|
|
|
|
+ map3.put("大型血小板比例(P-LCR)", "推送3");
|
|
|
|
+ map.put("details", map3);
|
|
|
|
+ return map;
|
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
/**
|
|
* 查询多个id返回标签内容
|
|
* 查询多个id返回标签内容
|