Browse Source

REPORT-80695 模板查找替换二期 增加数据列与数据设置替换校验

new-design
Destiny.Lin 2 years ago
parent
commit
2f3a9296bc
  1. 24
      designer-realize/src/main/java/com/fr/design/actions/replace/action/setting/CellGroupType.java
  2. 16
      designer-realize/src/main/java/com/fr/design/actions/replace/action/setting/SettingController.java

24
designer-realize/src/main/java/com/fr/design/actions/replace/action/setting/CellGroupType.java

@ -246,4 +246,28 @@ public enum CellGroupType {
DSColumn column = (DSColumn) cellElement.getValue();
column.setGrouper(grouper);
}
/**
* 是否修改过
*
* @param info 存储信息的数据结构
* @param inputStr 用户输入的第一级下拉框内容
* @param extraStr 用户输入的第二级下拉框内容
* @return 修改过返回true
*/
public boolean isEverChanged(Info info, String inputStr, String extraStr) {
return !isNeed(getCellElementFromInfo(info), inputStr, extraStr);
}
/**
* 从Info中获取CellElement
* 能到这一步肯定是单元格数据列类型
*
* @param info 存储查找替换信息的数据结构
* @return CellElement
*/
public CellElement getCellElementFromInfo(Info info) {
CellElement cellElement = (CellElement) info.getContent().getReplaceObject();
return cellElement;
}
}

16
designer-realize/src/main/java/com/fr/design/actions/replace/action/setting/SettingController.java

@ -156,6 +156,15 @@ public enum SettingController implements ShowValue {
type.replace(info, firstStr, secondStr);
}
}
@Override
public boolean isEverChanged(Info info, String inputStr, String extraStr) {
CellGroupType type = CellGroupType.match(inputStr);
if (type != null) {
return type.isEverChanged(info, inputStr, extraStr);
}
return false;
}
},
/**
* 单元格-数据列
@ -224,6 +233,13 @@ public enum SettingController implements ShowValue {
dsColumn.setColumn(TableDataColumn.createColumn(secondStr));
}
@Override
public boolean isEverChanged(Info info, String inputStr, String extraStr) {
CellElement cellElement = (CellElement) info.getContent().getReplaceObject();
DSColumn dsColumn = (DSColumn) cellElement.getValue();
return !isNeed(dsColumn, inputStr, extraStr);
}
},
/**
* 数据源-数据连接

Loading…
Cancel
Save