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