Commit 1e75eb4b authored by neo's avatar neo

[Bugfix] fixed re gen bugs

parent ca06f27b
......@@ -120,7 +120,8 @@ public class ReportGeneratorImpl {
reportMapper.insertSelective(report);
List<PeriodCellTemplateConfig> periodCellTemplateConfigs = resources.getPeriodCellTemplateConfigs().stream()
.filter(a -> a.getReportTemplateId().equals(templateId)).collect(Collectors.toList());
.filter(a -> a.getReportTemplateId().equals(templateId) && a.getDataSourceType().equals(CellDataSourceType.Formula.getCode()))
.collect(Collectors.toList());
//update formulablock table reportid field
List<Long> cellTemplateConfigIds = periodCellTemplateConfigs.stream()
......@@ -622,7 +623,7 @@ public class ReportGeneratorImpl {
PCTEntity pct = pctCache.get(entity);
if (pct.getDsCount() == 1 && pct.getAmount() != null) {
result.append("+").append(pct.getAmount());
} else if (pct.getDsCount() > 1 && pct.getAmount() != null && !StringUtils.isEmpty(pct.getFormulaExp())) {
} else if (pct.getDsCount() > 1 && pct.getAmount() != null && !StringUtils.isEmpty(pct.getFormulaExp().trim())) {
result.append("+").append(pct.getFormulaExp()).append("+").append(pct.getAmount());
} else if (pct.getAmount() == null && !StringUtils.isNotEmpty(pct.getData())) {
result.append(pct.getData());
......
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