|
@@ -22,36 +22,37 @@ public class LisApplication {
|
|
|
|
|
|
public void lisConvertToInputs(List<PreResult> preResultList, SearchData searchData) {
|
|
|
if (preResultList != null) {
|
|
|
- for (PreResult result : preResultList) {
|
|
|
- String covertValue = "";
|
|
|
- if (!StringUtils.isEmpty(result.getUniqueName())) {
|
|
|
- //value是数值类型则进行转换
|
|
|
- if (!StringUtils.isEmpty(result.getValue()) && isNumber(result.getValue())) {
|
|
|
- if (!StringUtils.isEmpty(result.getMaxValue()) && !StringUtils.isEmpty(result.getMinValue())
|
|
|
- && isNormal(result.getValue(), result.getMaxValue(), result.getMinValue())) {
|
|
|
- covertValue = result.getUniqueName() + normal;
|
|
|
- } else if (!StringUtils.isEmpty(result.getMaxValue())
|
|
|
- && compareMax(result.getValue(), result.getMaxValue())) {
|
|
|
- covertValue = result.getUniqueName() + up;
|
|
|
- } else if (!StringUtils.isEmpty(result.getMinValue())
|
|
|
- && compareMin(result.getValue(), result.getMinValue())) {
|
|
|
- covertValue = result.getUniqueName() + down;
|
|
|
- }
|
|
|
- } else if (!StringUtils.isEmpty(result.getOtherValue())) {
|
|
|
- //otherValue是文本类型则直接与UniqueName拼接
|
|
|
- covertValue = result.getUniqueName() + result.getOtherValue();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ String covertValue = "";
|
|
|
+ for (PreResult result : preResultList) {
|
|
|
+ if (!StringUtils.isEmpty(result.getUniqueName())) {
|
|
|
+ //value是数值类型则进行转换
|
|
|
+ if (!StringUtils.isEmpty(result.getValue()) && isNumber(result.getValue())) {
|
|
|
+ if (!StringUtils.isEmpty(result.getMaxValue()) && !StringUtils.isEmpty(result.getMinValue())
|
|
|
+ && isNormal(result.getValue(), result.getMaxValue(), result.getMinValue())) {
|
|
|
+ covertValue = result.getUniqueName() + normal;
|
|
|
+ } else if (!StringUtils.isEmpty(result.getMaxValue())
|
|
|
+ && compareMax(result.getValue(), result.getMaxValue())) {
|
|
|
+ covertValue = result.getUniqueName() + up;
|
|
|
+ } else if (!StringUtils.isEmpty(result.getMinValue())
|
|
|
+ && compareMin(result.getValue(), result.getMinValue())) {
|
|
|
+ covertValue = result.getUniqueName() + down;
|
|
|
}
|
|
|
+ } else if (!StringUtils.isEmpty(result.getOtherValue())) {
|
|
|
+ //otherValue是文本类型则直接与UniqueName拼接
|
|
|
+ covertValue = result.getUniqueName() + result.getOtherValue();
|
|
|
+ }
|
|
|
|
|
|
- Map<String, String> map = new HashMap<>();
|
|
|
- map.put("featureType", Constants.feature_type_lis);
|
|
|
- map.put("featureName", covertValue);
|
|
|
- map.put("property", Constants.word_property_LIS_Result);
|
|
|
- map.put("concept", covertValue);
|
|
|
- //全是有
|
|
|
- map.put("negative", Constants.default_negative);
|
|
|
- if (searchData.getInputs().get(map.get("featureName")) == null) {
|
|
|
- searchData.getInputs().put(map.get("featureName"), map);
|
|
|
- }
|
|
|
+ Map<String, String> map = new HashMap<>();
|
|
|
+ map.put("featureType", Constants.feature_type_lis);
|
|
|
+ map.put("featureName", covertValue);
|
|
|
+ map.put("property", Constants.word_property_LIS_Result);
|
|
|
+ map.put("concept", covertValue);
|
|
|
+ //全是有
|
|
|
+ map.put("negative", Constants.default_negative);
|
|
|
+ if (searchData.getInputs().get(map.get("featureName")) == null) {
|
|
|
+ searchData.getInputs().put(map.get("featureName"), map);
|
|
|
}
|
|
|
}
|
|
|
}
|