Commit 378c4f12 authored by neo's avatar neo

[Bugfix] fixed set formula block value

parent 533b0353
......@@ -160,7 +160,7 @@ public class BB extends FunctionBase implements FreeRefFunction {
formulaContext.getReportTemplateGroupId(), bo.getColumnIndex() - 1, bo.getRowIndex() - 1,
formulaContext.getProjectId());
saveFormulaBlock(formulaContext.getPeriod(), ec,
bo.expression(), bo.expression(), dataSourceId, formulaContext.getProjectId());
bo.expression(), cellValue, dataSourceId, formulaContext.getProjectId());
}
}
}
......
......@@ -178,25 +178,4 @@ public class FunctionBase {
periodFormulaBlock.setUpdateTime(creatime);
SpringContextUtil.periodFormulaBlockMapper.insertSelective(periodFormulaBlock);
}
public void saveFormulaBlock(int period, OperationEvaluationContext ec,
String formulaExpression, String val, Long dataSourceId, String projectId) {
Long cellTemplateId = getCellTemplateId(period, ec);
Date creatime = new Date();
PeriodFormulaBlock periodFormulaBlock = new PeriodFormulaBlock();
periodFormulaBlock.setProjectId(projectId);
periodFormulaBlock.setId(SpringContextUtil.distributedIdService.nextId());
periodFormulaBlock.setPeriod(period);
periodFormulaBlock.setReportId(0L);
periodFormulaBlock.setCellTemplateId(cellTemplateId);
periodFormulaBlock.setFormulaExpression(formulaExpression);
periodFormulaBlock.setData(val);
periodFormulaBlock.setDataSourceId(dataSourceId);
periodFormulaBlock.setCreateBy("Admin");
periodFormulaBlock.setCreateTime(creatime);
periodFormulaBlock.setUpdateBy("Admin");
periodFormulaBlock.setUpdateTime(creatime);
SpringContextUtil.periodFormulaBlockMapper.insertSelective(periodFormulaBlock);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment