|  | @@ -23,8 +23,13 @@ import com.xunmei.system.api.domain.SysRole;
 | 
	
		
			
				|  |  |  import com.xunmei.system.api.domain.SysUser;
 | 
	
		
			
				|  |  |  import com.xunmei.system.api.function.RemoteCallHandlerExecutor;
 | 
	
		
			
				|  |  |  import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  | +import org.springframework.beans.factory.config.ConfigurableBeanFactory;
 | 
	
		
			
				|  |  | +import org.springframework.context.annotation.DependsOn;
 | 
	
		
			
				|  |  | +import org.springframework.context.annotation.Lazy;
 | 
	
		
			
				|  |  | +import org.springframework.context.annotation.Scope;
 | 
	
		
			
				|  |  |  import org.springframework.stereotype.Service;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +import javax.annotation.Resource;
 | 
	
		
			
				|  |  |  import java.util.ArrayList;
 | 
	
		
			
				|  |  |  import java.util.Collection;
 | 
	
		
			
				|  |  |  import java.util.List;
 | 
	
	
		
			
				|  | @@ -37,10 +42,11 @@ import java.util.function.Function;
 | 
	
		
			
				|  |  |   * @author xunmei
 | 
	
		
			
				|  |  |   * @date 2023-08-24
 | 
	
		
			
				|  |  |   */
 | 
	
		
			
				|  |  | +@Lazy
 | 
	
		
			
				|  |  |  @Service
 | 
	
		
			
				|  |  |  public class TMonitoringRetrievalPlanServiceImpl extends ServiceImpl<TMonitoringRetrievalPlanMapper, TMonitoringRetrievalPlan> implements ITMonitoringRetrievalPlanService {
 | 
	
		
			
				|  |  | -private static final Long MINUS_ONE=-1L;
 | 
	
		
			
				|  |  | -private static final Long ZERO=0L;
 | 
	
		
			
				|  |  | +    private static final Long MINUS_ONE = -1L;
 | 
	
		
			
				|  |  | +    private static final Long ZERO = 0L;
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private TMonitoringRetrievalPlanMapper tMonitoringRetrievalPlanMapper;
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
	
		
			
				|  | @@ -49,8 +55,10 @@ private static final Long ZERO=0L;
 | 
	
		
			
				|  |  |      private RemoteOrgService remoteOrgService;
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private RemoteRoleService remoteRoleService;
 | 
	
		
			
				|  |  | -/*@Autowired
 | 
	
		
			
				|  |  | -private ICoreMonitoringRetrievalTaskService iCoreMonitoringRetrievalTaskService;*/
 | 
	
		
			
				|  |  | +    @Lazy
 | 
	
		
			
				|  |  | +    @Resource
 | 
	
		
			
				|  |  | +    private ICoreMonitoringRetrievalTaskService iCoreMonitoringRetrievalTaskService;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      @Override
 | 
	
		
			
				|  |  |      public TableDataInfo<TMonitoringRetrievalPlan> selectPage(TMonitoringRetrievalPlan tMonitoringRetrievalPlan) {
 | 
	
		
			
				|  |  |          //未删除
 | 
	
	
		
			
				|  | @@ -74,7 +82,6 @@ private ICoreMonitoringRetrievalTaskService iCoreMonitoringRetrievalTaskService;
 | 
	
		
			
				|  |  |              tMonitoringRetrievalPlan.setOrgId(data.get(0).getId());
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          if (tMonitoringRetrievalPlan.getCheckSub()) {
 | 
	
		
			
				|  |  | -            //List<Long> ids = remoteOrgService.selectCheckSubOrgIdList(tMonitoringRetrievalPlan.getOrgId(), SecurityConstants.INNER);
 | 
	
		
			
				|  |  |              List<Long> ids = remoteOrgService.selectCheckSubOrgIdList(tMonitoringRetrievalPlan.getOrgId(), SecurityConstants.INNER);
 | 
	
		
			
				|  |  |              //清空前端传递的org_id
 | 
	
		
			
				|  |  |              tMonitoringRetrievalPlan.setOrgId(null);
 | 
	
	
		
			
				|  | @@ -117,7 +124,7 @@ private ICoreMonitoringRetrievalTaskService iCoreMonitoringRetrievalTaskService;
 | 
	
		
			
				|  |  |          tMonitoringRetrievalPlanMapper.updateById(tMonitoringRetrievalPlan);
 | 
	
		
			
				|  |  |          List<SysOrg> list = remoteOrgService.selectSysOrgByParentId(MINUS_ONE, SecurityConstants.INNER);
 | 
	
		
			
				|  |  |          Integer i = 0;
 | 
	
		
			
				|  |  | -        List<TMonitoringRetrievalPlan>tMonitoringRetrievalPlans=new ArrayList<>();
 | 
	
		
			
				|  |  | +        List<TMonitoringRetrievalPlan> tMonitoringRetrievalPlans = new ArrayList<>();
 | 
	
		
			
				|  |  |          for (SysOrg l : list) {
 | 
	
		
			
				|  |  |              TMonitoringRetrievalPlan monitoringRetrievalPlan = new TMonitoringRetrievalPlan();
 | 
	
		
			
				|  |  |              monitoringRetrievalPlan.setPlanName(tMonitoringRetrievalPlan.getPlanName());
 | 
	
	
		
			
				|  | @@ -143,8 +150,8 @@ private ICoreMonitoringRetrievalTaskService iCoreMonitoringRetrievalTaskService;
 | 
	
		
			
				|  |  |                  return i;
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -        if (tMonitoringRetrievalPlan.getPlanCycle().equals("0")){
 | 
	
		
			
				|  |  | -         //   iCoreMonitoringRetrievalTaskService.noCycleTask(tMonitoringRetrievalPlans);
 | 
	
		
			
				|  |  | +        if (tMonitoringRetrievalPlan.getPlanCycle().equals("0")) {
 | 
	
		
			
				|  |  | +            iCoreMonitoringRetrievalTaskService.noCycleTask(tMonitoringRetrievalPlans);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          return i;
 | 
	
		
			
				|  |  |      }
 | 
	
	
		
			
				|  | @@ -185,10 +192,10 @@ private ICoreMonitoringRetrievalTaskService iCoreMonitoringRetrievalTaskService;
 | 
	
		
			
				|  |  |              tMonitoringRetrievalPlan.setPlanStatus(0);
 | 
	
		
			
				|  |  |              tMonitoringRetrievalPlan.setCreateType(1);
 | 
	
		
			
				|  |  |              //无周期调用
 | 
	
		
			
				|  |  | -            if (tMonitoringRetrievalPlan.getPlanCycle().equals("0")){
 | 
	
		
			
				|  |  | -                List<TMonitoringRetrievalPlan>tMonitoringRetrievalPlans=new ArrayList<>();
 | 
	
		
			
				|  |  | +            if (tMonitoringRetrievalPlan.getPlanCycle().equals("0")) {
 | 
	
		
			
				|  |  | +                List<TMonitoringRetrievalPlan> tMonitoringRetrievalPlans = new ArrayList<>();
 | 
	
		
			
				|  |  |                  tMonitoringRetrievalPlans.add(tMonitoringRetrievalPlan);
 | 
	
		
			
				|  |  | -               // iCoreMonitoringRetrievalTaskService.noCycleTask(tMonitoringRetrievalPlans);
 | 
	
		
			
				|  |  | +                iCoreMonitoringRetrievalTaskService.noCycleTask(tMonitoringRetrievalPlans);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          tMonitoringRetrievalPlan.setCreateType(0);
 |