Commit 0f261cb2 authored by neo's avatar neo

[BugFix] fixed formual datasource key value id empty string

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