|
@@ -3,6 +3,7 @@ package org.springblade.manager.formula;
|
|
import com.mixsmart.utils.ListUtils;
|
|
import com.mixsmart.utils.ListUtils;
|
|
import com.mixsmart.utils.StringUtils;
|
|
import com.mixsmart.utils.StringUtils;
|
|
import org.springblade.core.tool.utils.Func;
|
|
import org.springblade.core.tool.utils.Func;
|
|
|
|
+import org.springblade.core.tool.utils.StringPool;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
import java.util.*;
|
|
import java.util.*;
|
|
@@ -19,7 +20,7 @@ public interface ITurnPointCalculator {
|
|
public static final String TURN_POINT_FIELD="测点,仪器高,前视,后视,实测高程,设计高程,偏差值";
|
|
public static final String TURN_POINT_FIELD="测点,仪器高,前视,后视,实测高程,设计高程,偏差值";
|
|
|
|
|
|
|
|
|
|
- static List<Object> create( List<Map<String,Object>> data, Map<String,String> configMap){
|
|
|
|
|
|
+ static List<Object> create( List<Map<String,Object>> data, LinkedHashMap<String,String> configMap){
|
|
if(Func.isNotEmpty(data)&&configMap!=null){
|
|
if(Func.isNotEmpty(data)&&configMap!=null){
|
|
LevelInfo levelInfo = new LevelInfo();
|
|
LevelInfo levelInfo = new LevelInfo();
|
|
List<TurnPoint> tmp =new ArrayList<>();
|
|
List<TurnPoint> tmp =new ArrayList<>();
|
|
@@ -89,16 +90,11 @@ public interface ITurnPointCalculator {
|
|
}
|
|
}
|
|
List<TurnPoint> result=fill(tmp);
|
|
List<TurnPoint> result=fill(tmp);
|
|
if(ListUtils.isNotEmpty(result)){
|
|
if(ListUtils.isNotEmpty(result)){
|
|
- String keyStr = configMap.getOrDefault("显示",TURN_POINT_FIELD);
|
|
|
|
return result.stream().map(TurnPoint::getDataMap).flatMap(m->{
|
|
return result.stream().map(TurnPoint::getDataMap).flatMap(m->{
|
|
List<String> list =new ArrayList<>();
|
|
List<String> list =new ArrayList<>();
|
|
- for(String key:keyStr.split(",")){
|
|
|
|
- if(StringUtils.isNotEmpty(key)){
|
|
|
|
- key=key.trim();
|
|
|
|
- list.add(StringUtils.handleNull(m.get(key)));
|
|
|
|
- }else{
|
|
|
|
- list.add("");
|
|
|
|
- }
|
|
|
|
|
|
+ for(String key:configMap.keySet()){
|
|
|
|
+ key=key.trim();
|
|
|
|
+ list.add(StringUtils.handleNull(m.get(key)));
|
|
}
|
|
}
|
|
return list.stream();
|
|
return list.stream();
|
|
}).collect(Collectors.toList());
|
|
}).collect(Collectors.toList());
|