Commit f749c4a4 authored by neo's avatar neo

[Bugfix] fixed formual datasource name wiht empty string when null

parent 53ff5701
......@@ -842,8 +842,8 @@ public class ReportServiceImpl {
dataSourceModel = dataSourceExtendDtos.get(0).getDataSource();
updateCellValueForDataSourceChange(dataSourceModel, data.getAmount());
originalAmount = dataSourceModel.getAmount() != null ? dataSourceModel.getAmount() : new BigDecimal("0");
dataSourceModel.setName(data.getName());
dataSourceModel.setDescription(data.getDescription());
dataSourceModel.setName(Utils.isEmpty(data.getName()) ? "ManualDataSourceName" : data.getName());
dataSourceModel.setDescription(Utils.isEmpty(data.getDescription()) ? "ManualDataDescription" : data.getDescription());
dataSourceModel.setAmount(data.getAmount());
dataSourceModel.setUpdateBy("Admin");
dataSourceModel.setUpdateTime(new Date());
......@@ -853,9 +853,9 @@ public class ReportServiceImpl {
Long cellDataSourceId = distributedIdService.nextId();
dataSourceModel.setId(cellDataSourceId);
dataSourceModel.setType(FormulaDataSourceType.KeyInSource.getCode());
dataSourceModel.setName(data.getName());
dataSourceModel.setName(Utils.isEmpty(data.getName()) ? "ManualDataSourceName" : data.getName());
dataSourceModel.setDescription(Utils.isEmpty(data.getDescription()) ? "ManualDataDescription" : data.getDescription());
dataSourceModel.setCellTemplateId(Long.parseLong(data.getCellTemplateId()));
dataSourceModel.setDescription(data.getDescription());
dataSourceModel.setAmount(data.getAmount());
if (periodCellTemplate.isPresent()) {
dataSourceModel.setRowIndex(periodCellTemplate.get().getRowIndex());
......
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