Commit 3a4c3c35 authored by neo's avatar neo

[bugfix] fixed js intervel cannot close when error

parent 8ff3192f
......@@ -454,6 +454,7 @@ public class ReportGeneratorImpl {
List<PeriodCellTemplate> tempPeriodCellTemplateList = resources.getPeriodCellTemplates().stream()
.filter(a -> a.getReportTemplateId().equals(templateId))
.collect(Collectors.toList());
tempPeriodCellTemplateList.forEach(a -> {
Optional<PeriodCellTemplateConfig> tempCellTemplateConfig = resources.getPeriodCellTemplateConfigs().stream()
.filter(item -> item.getCellTemplateId().equals(a.getCellTemplateId())
......
......@@ -587,10 +587,13 @@
updateTasksStatus(result.data);
if(result.data.status=='Begin'){
$scope.timer= $interval(function(){
vatReportService.getJobStatus(vatSessionService.project.id,vatSessionService.month,result.data.id).then(function(result){
vatReportService.getJobStatus(vatSessionService.project.id,vatSessionService.month,result.data.id)
.success(function(result){
if(result.data && result.status == 200){
updateTasksStatus(result.data);
}
}).error(function(result){
$interval.cancel($scope.timer);
});
},1000);
......
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