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