Browse Source

Merge pull request #7599 in DESIGN/design from release/11.0 to feature/x

* commit '69edc668071f16bd722a1e43adc3d527d68fed76':
  REPORT-65513 填报-填报属性设置-设置单元格组,提示“单元格个数必须相同”的交互逻辑问题
  REPORT-65194 公式模拟计算计算异常的提示框内的图标不正确 1.计算异常的时候给warn图标
  REPORT-65515【稳定共创】公式编辑器-存在插件函数时,选择数据集参数函数显示跳转显示有问题 1.选中参数时,返回默认的值
feature/x
superman 3 years ago
parent
commit
efad025c21
  1. 12
      designer-base/src/main/java/com/fr/design/formula/FormulaPane.java
  2. 7
      designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java

12
designer-base/src/main/java/com/fr/design/formula/FormulaPane.java

@ -815,10 +815,11 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
String formulaText = formulaTextArea.getText().trim(); String formulaText = formulaTextArea.getText().trim();
String unSupportFormula = containsUnsupportedSimulationFormulas(formulaText); String unSupportFormula = containsUnsupportedSimulationFormulas(formulaText);
if (unSupportFormula != null) { if (unSupportFormula != null) {
showMessageDialog(Toolkit.i18nText("Fine-Design_Basic_Formula_Unsupported_Formulas") + ":" + unSupportFormula, false); showMessageDialog(Toolkit.i18nText("Fine-Design_Basic_Formula_Unsupported_Formulas") + ":" + unSupportFormula, false, true);
return; return;
} }
boolean calException = false;
String messageTips; String messageTips;
FormulaCheckResult checkResult = FormulaChecker.check(formulaText); FormulaCheckResult checkResult = FormulaChecker.check(formulaText);
if (checkResult.grammarValid()) { if (checkResult.grammarValid()) {
@ -847,6 +848,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
} catch (Exception ce) { } catch (Exception ce) {
//模拟计算如果出现错误,则抛出错误 //模拟计算如果出现错误,则抛出错误
calResult = ce.getMessage(); calResult = ce.getMessage();
calException = true;
FineLoggerFactory.getLogger().error(ce.getMessage(), ce); FineLoggerFactory.getLogger().error(ce.getMessage(), ce);
messageTips = messageTips + Toolkit.i18nText("Fine-Design_Basic_Formula_Cal_Error") + ":" + calResult; messageTips = messageTips + Toolkit.i18nText("Fine-Design_Basic_Formula_Cal_Error") + ":" + calResult;
} }
@ -855,7 +857,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
messageTips = checkResult.getTips(); messageTips = checkResult.getTips();
} }
if (checkResult.isValid()) { if (checkResult.isValid()) {
showMessageDialog(messageTips, checkResult.isValid()); showMessageDialog(messageTips, checkResult.isValid(), calException);
} else { } else {
confirmCheckResult(checkResult, messageTips); confirmCheckResult(checkResult, messageTips);
} }
@ -872,7 +874,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
private boolean confirmCheckResult(FormulaCheckResult checkResult, String messageTips) { private boolean confirmCheckResult(FormulaCheckResult checkResult, String messageTips) {
if (checkResult.isValid()) { if (checkResult.isValid()) {
showMessageDialog(checkResult.getTips(), checkResult.isValid()); showMessageDialog(checkResult.getTips(), checkResult.isValid(), false);
} else { } else {
int columns = checkResult.getFormulaCoordinates().getColumns(); int columns = checkResult.getFormulaCoordinates().getColumns();
String position = StringUtils.EMPTY; String position = StringUtils.EMPTY;
@ -898,8 +900,8 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
return true; return true;
} }
private void showMessageDialog(String message, boolean formulaValid) { private void showMessageDialog(String message, boolean formulaValid, boolean calException) {
if (formulaValid) { if (formulaValid && !calException) {
FineJOptionPane.showMessageDialog( FineJOptionPane.showMessageDialog(
FormulaPane.this, FormulaPane.this,
message); message);

7
designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java

@ -291,6 +291,10 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane {
@Override @Override
public void checkValid() throws Exception { public void checkValid() throws Exception {
KeyColumnTableModel model = (KeyColumnTableModel) keyColumnValuesTable.getModel(); KeyColumnTableModel model = (KeyColumnTableModel) keyColumnValuesTable.getModel();
checkModelValid(model);
}
private void checkModelValid(KeyColumnTableModel model) throws Exception {
int cnt = model.getRowCount(); int cnt = model.getRowCount();
int groupLength = -1; int groupLength = -1;
for (int i = 0; i < cnt; i++) { for (int i = 0; i < cnt; i++) {
@ -374,7 +378,8 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane {
*/ */
@Override @Override
public void checkValid() throws Exception { public void checkValid() throws Exception {
SmartInsertDBManipulationPane.this.checkValid(); KeyColumnTableModel model = (KeyColumnTableModel) table.getModel();
SmartInsertDBManipulationPane.this.checkModelValid(model);
} }
private SelectionListener listener = new SelectionListener() { private SelectionListener listener = new SelectionListener() {

Loading…
Cancel
Save