Commit 13712764 authored by neo's avatar neo

[Bugfix] fixed report manal datasorce empty value with default value

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