Commit 52edaa46 authored by neo's avatar neo

[Bugfix] revert add munaul datasource

parent 85dc97ea
......@@ -122,7 +122,6 @@ public class ReportGeneratorImpl {
List<PeriodCellTemplateConfig> periodCellTemplateConfigs = resources.getPeriodCellTemplateConfigs().stream()
.filter(a -> a.getReportTemplateId().equals(templateId)).collect(Collectors.toList());
//update formulablock table reportid field
List<Long> cellTemplateConfigIds = periodCellTemplateConfigs.stream()
.map(PeriodCellTemplateConfig::getCellTemplateId)
......@@ -287,6 +286,29 @@ public class ReportGeneratorImpl {
cellData.setProjectId(projectId);
cellData.setPeriod(period);
if (periodCellTemplateConfig.getDataSourceType().intValue() == FormulaDataSourceType.KeyInSource.getCode()) {
if(!isMergeMunual) {
PeriodDataSource dataSource = new PeriodDataSource();
dataSource.setId(distributedIdService.nextId());
if (tempPeriodCellTemplate.isPresent()) {
dataSource.setColumnIndex(tempPeriodCellTemplate.get().getColumnIndex());
dataSource.setRowIndex(tempPeriodCellTemplate.get().getRowIndex());
}
dataSource.setAmount(new BigDecimal("0"));
dataSource.setName("ManualDataSource");
dataSource.setDescription("ManualDataSource");
dataSource.setCreateTime(new Date());
dataSource.setUpdateTime(new Date());
dataSource.setCreateBy("Admin");
dataSource.setUpdateBy("Admin");
dataSource.setPeriod(period);
dataSource.setProjectId(projectId);
dataSource.setCellTemplateId(tempPeriodCellTemplate.get().getCellTemplateId());
dataSource.setType(FormulaDataSourceType.KeyInSource.getCode());
periodDataSourceMapper.insertSelective(dataSource);
}
}
//after insert celldata, insert the celldatasource for link celldata and datasource
PeriodDataSourceExample dataSourceExample = new PeriodDataSourceExample();
......
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