Commit 5d1f6902 authored by neo's avatar neo

[dev] fixed bb save datasource bug

parent 3a73a430
......@@ -140,7 +140,7 @@ public class BB extends FunctionBase implements FreeRefFunction {
} finally {
LOGGER.warn("error for bb cacls for {} and current for {}", bo.toString(), curPeriod.toString());
Long dataSourceID = saveDataSource(ec, ds, FormulaDataSourceDetailType.ReportCellDataSourceDto,
cellValue, formulaContext.getPeriod(), formulaContext.getReportTemplateGroupID(),bo.getColumnIndex(),bo.getRowIndex()+1);
cellValue, formulaContext.getPeriod(), formulaContext.getReportTemplateGroupID(),bo.getColumnIndex(),bo.getRowIndex());
saveFormulaBlock(formulaContext.getPeriod(), ec, bo.expression(curPeriod.getCurPeriod(), curPeriod.getCurYear()), cellValue, dataSourceID);
}
}
......
......@@ -100,8 +100,8 @@ public class FunctionBase {
FormulaDataSourceDetailType formulaDataSourceDetailType, BigDecimal val,
int period, Long templateGroupId, Integer colNumP, Integer rowNumP) {
String reportCode = ec.getWorkbook().getSheetName(ec.getSheetIndex());
int colNum = colNumP == null ? ec.getColumnIndex() : colNumP;
int rowNum = rowNumP == null ? ec.getRowIndex() : rowNumP;
int colNum = ec.getColumnIndex();
int rowNum = ec.getRowIndex();
//根据这三个值还有period获取 cell_template_Id的值
Map<String, Object> map = new HashMap<>();
map.put("code", reportCode);
......@@ -123,8 +123,8 @@ public class FunctionBase {
dataSource.setUpdateBy("Admin");
dataSource.setCreateTime(creatime);
dataSource.setUpdateTime(creatime);
dataSource.setRowIndex(ec.getRowIndex());
dataSource.setColumnIndex(ec.getColumnIndex());
dataSource.setRowIndex(rowNumP == null ? ec.getRowIndex() : rowNumP);
dataSource.setColumnIndex(colNumP == null ? ec.getColumnIndex() : colNumP);
dataSource.setRowName("");
dataSource.setColumnName("");
dataSource.setCellTemplateId(periodCellTemplateId);
......
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