|
@@ -18,6 +18,7 @@ import com.ym.mec.biz.dal.entity.InspectionItemPlanConclusion;
|
|
import com.ym.mec.biz.service.InspectionItemPlanConclusionService;
|
|
import com.ym.mec.biz.service.InspectionItemPlanConclusionService;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
@@ -115,13 +116,23 @@ public class InspectionItemPlanConclusionServiceImpl extends BaseServiceImpl<Lon
|
|
@Override
|
|
@Override
|
|
public List<CourseSchedule> getPlanCourses(Long planId) {
|
|
public List<CourseSchedule> getPlanCourses(Long planId) {
|
|
InspectionItemPlan plan = inspectionItemPlanDao.get(planId);
|
|
InspectionItemPlan plan = inspectionItemPlanDao.get(planId);
|
|
- List<CourseSchedule> courseSchedules = inspectionItemPlanConclusionDao.getPlanConclusionCourses(planId);
|
|
|
|
|
|
+ List<CourseSchedule> courseSchedules = new ArrayList<CourseSchedule>();
|
|
|
|
+ if (plan == null) {
|
|
|
|
+ return courseSchedules;
|
|
|
|
+ }
|
|
|
|
+ courseSchedules = inspectionItemPlanConclusionDao.getPlanConclusionCourses(planId);
|
|
if (courseSchedules.size() > 0) {
|
|
if (courseSchedules.size() > 0) {
|
|
return courseSchedules;
|
|
return courseSchedules;
|
|
}
|
|
}
|
|
courseSchedules = courseScheduleDao.getMusicGroupCourseInfo(plan.getMusicGroupId(), plan.getPlanStart(), plan.getPlanEnd());
|
|
courseSchedules = courseScheduleDao.getMusicGroupCourseInfo(plan.getMusicGroupId(), plan.getPlanStart(), plan.getPlanEnd());
|
|
return courseSchedules;
|
|
return courseSchedules;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public Map<Long, List<InspectionItemPlanConclusion>> getPlanConclusion(Long planId) {
|
|
|
|
+ List<InspectionItemPlanConclusion> conclusions = inspectionItemPlanConclusionDao.getInspectionItemPlanConclusion(planId, null);
|
|
|
|
+ return conclusions.stream().collect(Collectors.groupingBy(InspectionItemPlanConclusion::getCourseScheduleId));
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|