Commit 7e2e0243 authored by neo's avatar neo

[Bugfix] revert formual revert default value fixed null db field instead

parent a02bcbd6
...@@ -842,9 +842,8 @@ public class ReportServiceImpl { ...@@ -842,9 +842,8 @@ public class ReportServiceImpl {
dataSourceModel = dataSourceExtendDtos.get(0).getDataSource(); dataSourceModel = dataSourceExtendDtos.get(0).getDataSource();
updateCellValueForDataSourceChange(dataSourceModel, data.getAmount()); updateCellValueForDataSourceChange(dataSourceModel, data.getAmount());
originalAmount = dataSourceModel.getAmount() != null ? dataSourceModel.getAmount() : new BigDecimal("0"); originalAmount = dataSourceModel.getAmount() != null ? dataSourceModel.getAmount() : new BigDecimal("0");
dataSourceModel.setKeyValueDataId("EmptyKeyDataValueDataId"); dataSourceModel.setName(data.getName());
dataSourceModel.setName(Utils.isEmpty(data.getName()) ? "EmptyName" : data.getName()); dataSourceModel.setDescription(data.getDescription());
dataSourceModel.setDescription(Utils.isEmpty(data.getDescription()) ? "EmptyDescription" : data.getDescription());
dataSourceModel.setAmount(data.getAmount()); dataSourceModel.setAmount(data.getAmount());
dataSourceModel.setUpdateBy("Admin"); dataSourceModel.setUpdateBy("Admin");
dataSourceModel.setUpdateTime(new Date()); dataSourceModel.setUpdateTime(new Date());
...@@ -854,9 +853,8 @@ public class ReportServiceImpl { ...@@ -854,9 +853,8 @@ public class ReportServiceImpl {
Long cellDataSourceId = distributedIdService.nextId(); Long cellDataSourceId = distributedIdService.nextId();
dataSourceModel.setId(cellDataSourceId); dataSourceModel.setId(cellDataSourceId);
dataSourceModel.setType(FormulaDataSourceType.KeyInSource.getCode()); dataSourceModel.setType(FormulaDataSourceType.KeyInSource.getCode());
dataSourceModel.setName(Utils.isEmpty(data.getName()) ? "EmptyName" : data.getName()); dataSourceModel.setName(data.getName());
dataSourceModel.setDescription(Utils.isEmpty(data.getDescription()) ? "EmptyDescription" : data.getDescription()); dataSourceModel.setDescription(data.getDescription());
dataSourceModel.setKeyValueDataId("EmptyKeyValueDataId");
dataSourceModel.setCellTemplateId(Long.parseLong(data.getCellTemplateId())); dataSourceModel.setCellTemplateId(Long.parseLong(data.getCellTemplateId()));
dataSourceModel.setAmount(data.getAmount()); dataSourceModel.setAmount(data.getAmount());
if (periodCellTemplate.isPresent()) { if (periodCellTemplate.isPresent()) {
...@@ -918,7 +916,6 @@ public class ReportServiceImpl { ...@@ -918,7 +916,6 @@ public class ReportServiceImpl {
dataSource.setAmount(data.getAmount()); dataSource.setAmount(data.getAmount());
dataSource.setUpdateBy("admin"); dataSource.setUpdateBy("admin");
dataSource.setUpdateTime(new Date()); dataSource.setUpdateTime(new Date());
dataSource.setKeyValueDataId("EmptyKeyValueDataId");
periodDataSourceMapper.updateByPrimaryKeySelective(dataSource); periodDataSourceMapper.updateByPrimaryKeySelective(dataSource);
if (!cellData.getData().equals("#VALUE!")) { if (!cellData.getData().equals("#VALUE!")) {
cellData.setData(new BigDecimal(cellData.getData()).add(changeValue).toString()); cellData.setData(new BigDecimal(cellData.getData()).add(changeValue).toString());
......
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