|  | @@ -252,19 +252,26 @@ public class CoreMonitoringRetrievalTaskServiceImpl extends ServiceImpl<CoreMoni
 | 
	
		
			
				|  |  |          //立即生效的计划要排除截至时间在当前时间之前的数据
 | 
	
		
			
				|  |  |          List<CoreMonitoringRetrievalTask> lista = taskList.stream().filter(r -> r.getPlanEndTime().after(new Date())).collect(Collectors.toList());
 | 
	
		
			
				|  |  |          if (CollectionUtil.isNotEmpty(lista)) {
 | 
	
		
			
				|  |  | +            List<CoreMonitoringRetrievalTask> listAll = new ArrayList<>();
 | 
	
		
			
				|  |  |              //对list进行重新编号和保存
 | 
	
		
			
				|  |  | -            for(int i=0;i<lista.size();i++){
 | 
	
		
			
				|  |  | -                lista.get(i).setOrderNum(i+1);
 | 
	
		
			
				|  |  | -               // 第" + frequency + "次调阅
 | 
	
		
			
				|  |  | -                String oldName =  lista.get(i).getTaskName();
 | 
	
		
			
				|  |  | -                String str  =  "第"+(i+1)+"次调阅";
 | 
	
		
			
				|  |  | -                int index = oldName.lastIndexOf("第");
 | 
	
		
			
				|  |  | -                if (index>0){
 | 
	
		
			
				|  |  | -                    lista.get(i).setTaskName(oldName.substring(0,index)+str);
 | 
	
		
			
				|  |  | +            //对lista 按机构进行分组
 | 
	
		
			
				|  |  | +            Map<Long, List<CoreMonitoringRetrievalTask>> map = lista.stream().collect(Collectors.groupingBy(CoreMonitoringRetrievalTask::getOrgId));
 | 
	
		
			
				|  |  | +            for(Long  orgId:map.keySet()){
 | 
	
		
			
				|  |  | +                List<CoreMonitoringRetrievalTask> listb = map.get(orgId);
 | 
	
		
			
				|  |  | +                for(int i=0;i<listb.size();i++){
 | 
	
		
			
				|  |  | +                    listb.get(i).setOrderNum(i+1);
 | 
	
		
			
				|  |  | +                    // 第" + frequency + "次调阅
 | 
	
		
			
				|  |  | +                    String oldName =  listb.get(i).getTaskName();
 | 
	
		
			
				|  |  | +                    String str  =  "第"+(i+1)+"次调阅";
 | 
	
		
			
				|  |  | +                    int index = oldName.lastIndexOf("第");
 | 
	
		
			
				|  |  | +                    if(index>0){
 | 
	
		
			
				|  |  | +                        listb.get(i).setTaskName(oldName.substring(0,index)+str);
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +                listAll.addAll(listb);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | -            this.saveBatch(lista);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            this.saveBatch(listAll);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 |