| 
					
				 | 
			
			
				@@ -3,6 +3,8 @@ package com.xunmei.core.edu.service.impl; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.hutool.core.collection.CollectionUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.hutool.core.map.MapUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.hutool.core.util.ObjectUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import cn.hutool.json.JSONUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.alibaba.fastjson2.JSON; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.baomidou.mybatisplus.core.toolkit.IdWorker; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -142,6 +144,7 @@ public class CoreEduTrainingPlanServiceImpl extends ServiceImpl<CoreEduTrainingP 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         final CoreEduTrainingPlan plan = coreEduTrainingPlanMapper.selectById(id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         CoreEduTrainingPlanDetailVo vo = new CoreEduTrainingPlanDetailVo(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         BeanUtils.copyProperties(plan, vo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        vo.setFileList(ObjectUtil.isNotEmpty(plan.getFileList()) ? JSON.parseArray(plan.getFileList(), String.class) : null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         final List<CoreEduTrainingPlanToExecOrg> execOrgList = coreEduTrainingPlanToExecOrgMapper.selectByMap(MapUtil.of("plan_id", id)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         final List<Long> execOrgIdList = execOrgList.stream().map(CoreEduTrainingPlanToExecOrg::getOrgId).collect(Collectors.toList()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         vo.setPlanExecOrgIdList(ObjectUtil.isEmpty(execOrgIdList) ? null : execOrgIdList); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -174,6 +177,9 @@ public class CoreEduTrainingPlanServiceImpl extends ServiceImpl<CoreEduTrainingP 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (ObjectUtil.isAllEmpty(request.getExecOrgType(), request.getPlanExecOrgIdList())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             throw new RuntimeException("培训机构类型和执行机构不能同时为空!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (ObjectUtil.equal(request.getPlanCycle(), 0) && ObjectUtil.hasEmpty(request.getStartDate(), request.getEndDate())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            throw new RuntimeException("当计划为无周期的时候,请填入开始时间和结束时间!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         CoreEduTrainingPlan plan = new CoreEduTrainingPlan(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         BeanUtils.copyProperties(request, plan); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         plan.setId(IdWorker.getId()); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -191,6 +197,7 @@ public class CoreEduTrainingPlanServiceImpl extends ServiceImpl<CoreEduTrainingP 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         plan.setBelongOrgId(orgId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         plan.setBelongOrgName(r.getName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         plan.setBelongOrgPath(r.getPath()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        plan.setFileList(ObjectUtil.isNotEmpty(request.getFileList()) ? JSON.toJSONString(request.getFileList()) : null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         batchSavePlanToRole(request.getPlanRoleId(), plan.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         batchSavePlanToExecOrg(request.getPlanExecOrgIdList(), plan.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //省联社或者办事处创建的计划才存在下发 
			 |