Commit e1d3d452 authored by chase's avatar chase

fix bug

parent a3226328
......@@ -2070,16 +2070,17 @@ public class ReportServiceImpl extends BaseService {
PeriodDataSource dataSourceModel = null;
if (dataSourceExtendDtos.size() > 0) {
dataSourceModel = dataSourceExtendDtos.get(0).getDataSource();
dataSourceModel= periodDataSourceMapper.selectByPrimaryKey(dataSourceModel.getId());
if (StringUtils.isBlank(data.getKeyinData()))
updateCellValueForDataSourceChange(dataSourceModel, data.getAmount());
originalAmount = dataSourceModel.getAmount() != null ? dataSourceModel.getAmount() : new BigDecimal("0");
dataSourceModel.setName(data.getName());
dataSourceModel.setDescription(data.getDescription());
dataSourceModel.setAmount(data.getAmount());
dataSourceModel.setAmount(data.getAmount()==null?new BigDecimal(0):data.getAmount());
dataSourceModel.setUpdateBy("Admin");
dataSourceModel.setKeyinData(data.getKeyinData());
dataSourceModel.setUpdateTime(new Date());
periodDataSourceMapper.updateByPrimaryKeySelective(dataSourceModel);
periodDataSourceMapper.updateByPrimaryKey(dataSourceModel);
} else {
dataSourceModel = new PeriodDataSource();
Long cellDataSourceId = distributedIdService.nextId();
......
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