| 
					
				 | 
			
			
				@@ -45,11 +45,12 @@ public class TMonitoringRetrievalPlanServiceImpl extends ServiceImpl<TMonitoring 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private RemoteOrgService remoteOrgService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private RemoteRoleService remoteRoleService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+private static final Long MINUS_ONE=-1L; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+private static final Long ZERO=0L; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public TableDataInfo<TMonitoringRetrievalPlan> selectPage(TMonitoringRetrievalPlan tMonitoringRetrievalPlan) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //未删除 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        tMonitoringRetrievalPlan.setIsDeleted(0L); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        tMonitoringRetrievalPlan.setIsDeleted(ZERO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Page<TMonitoringRetrievalPlan> page; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //分页 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (tMonitoringRetrievalPlan.getPageNum() != null && tMonitoringRetrievalPlan.getPageSize() != null) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -64,7 +65,7 @@ public class TMonitoringRetrievalPlanServiceImpl extends ServiceImpl<TMonitoring 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         QueryWrapper<TMonitoringRetrievalPlan> query = new QueryWrapper<>(tMonitoringRetrievalPlan); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //下穿 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         tMonitoringRetrievalPlan.setCheckSub(true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        List<SysOrg> data = remoteOrgService.selectSysOrgByParentId(-1L, SecurityConstants.INNER); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<SysOrg> data = remoteOrgService.selectSysOrgByParentId(-MINUS_ONE, SecurityConstants.INNER); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (null == tMonitoringRetrievalPlan.getOrgId()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             tMonitoringRetrievalPlan.setOrgId(data.get(0).getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -110,7 +111,7 @@ public class TMonitoringRetrievalPlanServiceImpl extends ServiceImpl<TMonitoring 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         TMonitoringRetrievalPlan tMonitoringRetrievalPlan = tMonitoringRetrievalPlanMapper.selectById(id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         tMonitoringRetrievalPlan.setPlanStatus(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         tMonitoringRetrievalPlanMapper.updateById(tMonitoringRetrievalPlan); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        List<SysOrg> list = remoteOrgService.selectSysOrgByParentId(-1L, SecurityConstants.INNER); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<SysOrg> list = remoteOrgService.selectSysOrgByParentId(-MINUS_ONE, SecurityConstants.INNER); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Integer i = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for (SysOrg l : list) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             TMonitoringRetrievalPlan monitoringRetrievalPlan = new TMonitoringRetrievalPlan(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -130,6 +131,7 @@ public class TMonitoringRetrievalPlanServiceImpl extends ServiceImpl<TMonitoring 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             monitoringRetrievalPlan.setUpdateBy(SecurityUtils.getUsername()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             monitoringRetrievalPlan.setCreateTime(DateUtils.getNowDate()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             monitoringRetrievalPlan.setDescription(tMonitoringRetrievalPlan.getDescription()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            monitoringRetrievalPlan.setCreateType(1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             i = tMonitoringRetrievalPlanMapper.insert(monitoringRetrievalPlan); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (i < 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 return i; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -172,6 +174,7 @@ public class TMonitoringRetrievalPlanServiceImpl extends ServiceImpl<TMonitoring 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             tMonitoringRetrievalPlan.setPlanStatus(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        tMonitoringRetrievalPlan.setCreateType(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return tMonitoringRetrievalPlanMapper.insert(tMonitoringRetrievalPlan); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 |