|
@@ -123,19 +123,19 @@ public class TableElementConverter implements ITableElementConverter {
|
|
|
String[] codeAndId = e.split(StringPool.AT);
|
|
|
KeyMapper one = kms.get(0);
|
|
|
Formula formula =formulaMap.get(one.getFormulaId());
|
|
|
- FormData fd=new FormData(codeAndId[0],new ArrayList<>(),formula,this.coordinateMap.get(one.getTableName()).get(one.getField()));
|
|
|
+ FormData fd=new FormData(codeAndId[0],new ArrayList<>(),formula,this.coordinateMap.getOrDefault(one.getTableName(),new HashMap<>()).get(one.getField()));
|
|
|
fd.setIsCurrentNodeElement(Boolean.TRUE);
|
|
|
fd.setEName(one.getEName());
|
|
|
/*初始化元素数据集*/
|
|
|
List<ElementData> eds =fd.getValues();
|
|
|
- String coords = this.coordinateMap.get(fd.getTableName()).get(fd.getKey());
|
|
|
- if(Func.isNotBlank(coords)) {
|
|
|
- List<Coords> coordsList = Stream.of(coords).flatMap(s -> Arrays.stream(s.split(";"))).map(s -> {
|
|
|
- String[] xy = s.split("_");
|
|
|
- return new Coords(xy[1], xy[0]);
|
|
|
- }).collect(Collectors.toList());
|
|
|
- fd.setCoordsList(coordsList);
|
|
|
- }
|
|
|
+// String coords = this.coordinateMap.getOrDefault(fd.getTableName(),new HashMap<>()).get(fd.getKey());
|
|
|
+// if(Func.isNotBlank(coords)) {
|
|
|
+// List<Coords> coordsList = Stream.of(coords).flatMap(s -> Arrays.stream(s.split(";"))).map(s -> {
|
|
|
+// String[] xy = s.split("_");
|
|
|
+// return new Coords(xy[1], xy[0]);
|
|
|
+// }).collect(Collectors.toList());
|
|
|
+// fd.setCoordsList(coordsList);
|
|
|
+// }
|
|
|
for(int i=0;i<kms.size();i++){
|
|
|
/*每一页都有自己对立的Id*/
|
|
|
KeyMapper km=kms.get(i);
|
|
@@ -153,7 +153,7 @@ public class TableElementConverter implements ITableElementConverter {
|
|
|
tmpMap.put(StringUtils.join(fd.getCode(),groupId,i,Func.toInt(c[1]),Func.toInt(c[0]),StringPool.AT),t[0]);
|
|
|
}
|
|
|
}
|
|
|
- if(Func.isNotBlank(coords)){
|
|
|
+ if(Func.isNotEmpty(fd.getCoordsList())){
|
|
|
for(Coords c:fd.getCoordsList()){
|
|
|
Object val = null;
|
|
|
String key =StringUtils.join(fd.getCode(),groupId,i,c.getX(),c.getY(),StringPool.AT);
|
|
@@ -167,10 +167,12 @@ public class TableElementConverter implements ITableElementConverter {
|
|
|
String[] sa=k.split(StringPool.AT);
|
|
|
eds.add(new ElementData(Func.toInt(sa[2]),Func.toInt(sa[1]),val,Func.toInt(sa[3]),Func.toInt(sa[4])));
|
|
|
});
|
|
|
- log.append(fd.getEName()).append(fd.getCode()).append("定位信息不存在;");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ if(Func.isEmpty(fd.getCoordsList())){
|
|
|
+ log.append(fd.getEName()).append(fd.getCode()).append("定位信息不存在;");
|
|
|
+ }
|
|
|
this.formDataMap.put(fd.getCode(),fd);
|
|
|
if(fd.getFormula()!=null){
|
|
|
/*只有需要执行公式的才放这里*/
|