Browse Source

REPORT-57892 公式编辑器优化:实时计算返回结果为日期格式时不正确

1.添加一个object2string
research/11.0
Hoky 3 years ago
parent
commit
b24bf45be6
  1. 3
      designer-base/src/main/java/com/fr/design/formula/FormulaPane.java

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

@ -43,6 +43,7 @@ import com.fr.script.checker.exception.FunctionCheckWrongException;
import com.fr.script.rules.FunctionParameterType; import com.fr.script.rules.FunctionParameterType;
import com.fr.script.rules.FunctionRule; import com.fr.script.rules.FunctionRule;
import com.fr.stable.EncodeConstants; import com.fr.stable.EncodeConstants;
import com.fr.stable.EssentialUtils;
import com.fr.stable.ParameterProvider; import com.fr.stable.ParameterProvider;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.stable.UtilEvalError; import com.fr.stable.UtilEvalError;
@ -737,7 +738,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
BaseFormula baseFormula = BaseFormula.createFormulaBuilder().build(formulaText); BaseFormula baseFormula = BaseFormula.createFormulaBuilder().build(formulaText);
try { try {
Object value = calculator.evalValue(baseFormula); Object value = calculator.evalValue(baseFormula);
messageTips = messageTips + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Formula_Cal_Result") + ":" + value; messageTips = messageTips + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Formula_Cal_Result") + ":" + EssentialUtils.objectToString(value);
FineLoggerFactory.getLogger().info("value:{}", value); FineLoggerFactory.getLogger().info("value:{}", value);
} catch (UtilEvalError utilEvalError) { } catch (UtilEvalError utilEvalError) {
FineLoggerFactory.getLogger().error("", utilEvalError); FineLoggerFactory.getLogger().error("", utilEvalError);

Loading…
Cancel
Save