Commit 1958e7be authored by neo's avatar neo

[Bugfix] delete datasource can not delete old data

parent eeb82d4d
......@@ -228,8 +228,8 @@ public class ReportServiceImpl {
}
}
if(!allPcds.isEmpty()){
List<Long> allPcdsIds = allPcds.stream().map(m->m.getDataSourceId()).collect(Collectors.toList());
if (!allPcds.isEmpty()) {
List<Long> allPcdsIds = allPcds.stream().map(m -> m.getDataSourceId()).collect(Collectors.toList());
allPcdsIds.removeAll(periodManualDsIds);
periodDsIds.addAll(allPcdsIds);
}
......@@ -262,7 +262,8 @@ public class ReportServiceImpl {
reportIds.addAll(reports.stream().map(m -> m.getId()).collect(Collectors.toList()));
PeriodCellDataExample periodCellDataExample = new PeriodCellDataExample();
if (!periodManualCellDataIds.isEmpty()) {
if (isMergeManualData) {
if (periodManualCellDataIds.isEmpty()) periodManualCellDataIds.add(Long.MAX_VALUE);
periodCellDataExample.createCriteria().andProjectIdEqualTo(projectId).andPeriodEqualTo(period).andReportIdIn(
reportIds).andIdNotIn(periodManualCellDataIds);
} else {
......
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