| 
					
				 | 
			
			
				@@ -9,6 +9,7 @@ import com.xunmei.common.core.constant.SecurityConstants; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.xunmei.common.security.utils.SecurityUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.xunmei.core.resumption.domain.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.xunmei.core.resumption.dto.DistributeDto; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.xunmei.core.resumption.dto.DistributeStatusDto; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.xunmei.core.resumption.mapper.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.xunmei.core.resumption.service.AppPlanService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.xunmei.core.resumption.vo.appPlan.AppPlanVo; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -68,7 +69,7 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public Page<AppPlan> selectPage(AppPlanVo info) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Page<AppPlan> page = new Page<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        long current = info.getPageNum() ; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        long current = info.getPageNum(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         long size = info.getPageSize(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         page.setCurrent(current); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         page.setSize(size); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -88,32 +89,37 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public void distributeToOrg(DistributeDto dto) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        AppPlan plan = baseMapper.selectById(dto.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        plan.setId(null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        plan.setParentId(dto.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        baseMapper.insert(plan); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        Long id = plan.getId(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        List<Long> roleList = appPlanToRoleMapper.selectList(new LambdaQueryWrapper<AppPlanToRole>().eq(AppPlanToRole::getPlanId,dto.getId())).stream().map(AppPlanToRole::getRoleId).collect(Collectors.toList()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        AppPlanToRole atr = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        for (Long roleId : roleList) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            atr = new AppPlanToRole(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            atr.setRoleId(roleId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            atr.setPlanId(id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            appPlanToRoleMapper.insert(atr); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        for (DistributeStatusDto d : 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                dto.getOrgAndStatus()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            AppPlan plan = baseMapper.selectById(dto.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            plan.setOrgId(d.getOrgId().toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            plan.setPlanStatus(d.getStatus()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            plan.setId(null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            plan.setParentId(dto.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            baseMapper.insert(plan); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            Long id = plan.getId(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        List<AppPlanToPoint> itemList = appPlanToItemMapper.selectList(new LambdaQueryWrapper<AppPlanToPoint>().eq(AppPlanToPoint::getPlanId,dto.getId())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        AppPlanToPoint item = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        for (AppPlanToPoint ruleItemVo : itemList) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            item = new AppPlanToPoint(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            item.setPointId(ruleItemVo.getPointId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            item.setPlanId(id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            item.setPointScan(ruleItemVo.isPointScan()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            item.setRequired(ruleItemVo.isRequired()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            appPlanToItemMapper.insert(item); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            List<Long> roleList = appPlanToRoleMapper.selectList(new LambdaQueryWrapper<AppPlanToRole>().eq(AppPlanToRole::getPlanId, dto.getId())).stream().map(AppPlanToRole::getRoleId).collect(Collectors.toList()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            AppPlanToRole atr = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            for (Long roleId : roleList) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                atr = new AppPlanToRole(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                atr.setRoleId(roleId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                atr.setPlanId(id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                appPlanToRoleMapper.insert(atr); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            List<AppPlanToPoint> itemList = appPlanToItemMapper.selectList(new LambdaQueryWrapper<AppPlanToPoint>().eq(AppPlanToPoint::getPlanId, dto.getId())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            AppPlanToPoint item = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            for (AppPlanToPoint ruleItemVo : itemList) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                item = new AppPlanToPoint(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                item.setPointId(ruleItemVo.getPointId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                item.setPlanId(id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                item.setPointScan(ruleItemVo.isPointScan()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                item.setRequired(ruleItemVo.isRequired()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                appPlanToItemMapper.insert(item); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     /** 
			 |