Commit 1d909abd authored by neo's avatar neo

[dev] fixed data source detail for bb current priod

parent 12497fd3
......@@ -7,6 +7,7 @@ import pwc.taxtech.atms.vat.entity.CellData;
@Getter
public class ReportCellDataSourceDto extends FormulaDataSourceDto {
String tag = "BB";
Integer year;
Integer period;
Integer columnIndex;
......@@ -56,6 +57,24 @@ public class ReportCellDataSourceDto extends FormulaDataSourceDto {
return dataSource;
}
public static ReportCellDataSourceDto extractFromGroup(BBParasBo bbParasBo, Integer period, Integer year,
CellTemplatePerGroupDto cellTemplateData) {
ReportCellDataSourceDto dataSource = new ReportCellDataSourceDto();
dataSource.name = DataSourceName.ReportDataSource;
dataSource.year = year;
dataSource.period = period;
dataSource.columnIndex = bbParasBo.getColumnIndex() - 1;
dataSource.columnName = cellTemplateData.getColumnName();
dataSource.rowIndex = bbParasBo.getRowIndex() - 1;
dataSource.rowName = cellTemplateData.getRowName();
dataSource.reportTemplateID = cellTemplateData.getReportTemplateID();
dataSource.cellTemplateID = cellTemplateData.getCellTemplateID() + "";
dataSource.resultType = cellTemplateData.getResultType();
dataSource.isOnlyManualInput = false;
dataSource.reportName = bbParasBo.getReportCode();
return dataSource;
}
public void fixedWithGroup(CellTemplatePerGroupDto dto) {
cellTemplateID = dto.getCellTemplateID();
rowName = dto.getRowName();
......
......@@ -100,7 +100,12 @@ public class BB extends FunctionBase implements FreeRefFunction {
.getCell(bo.getRowIndex() - 1, bo.getColumnIndex() - 1));
bo.putPeriodCellTempate(formulaContext.getPeriod(), Long.parseLong(cellTemplateData.getCellTemplateID()));
return cellValue = new BigDecimal(OperandResolver.coerceValueToDouble(eval));
cellValue = new BigDecimal(OperandResolver.coerceValueToDouble(eval));
nullCellDto = ReportCellDataSourceDto.extractFromGroup(bo, formulaContext.getPeriod(), formulaContext.getYear(), cellTemplateData);
nullCellDto.setAmount(cellValue);
dataSource.add(nullCellDto);
return cellValue;
}
// bo.disCount();
......
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