|
@@ -24,6 +24,11 @@ import com.zhongzheng.modules.course.service.ICourseSectionBusinessService;
|
|
|
import com.zhongzheng.modules.course.service.ICourseService;
|
|
|
import com.zhongzheng.modules.course.vo.CourseUserVo;
|
|
|
import com.zhongzheng.modules.course.vo.CourseVo;
|
|
|
+import com.zhongzheng.modules.exam.domain.ExamApplyGoods;
|
|
|
+import com.zhongzheng.modules.exam.domain.ExamApplyUser;
|
|
|
+import com.zhongzheng.modules.exam.service.IExamApplyGoodsService;
|
|
|
+import com.zhongzheng.modules.exam.service.IExamApplyUserService;
|
|
|
+import com.zhongzheng.modules.exam.vo.ExamApplyGoodsVo;
|
|
|
import com.zhongzheng.modules.goods.domain.GoodsCourse;
|
|
|
import com.zhongzheng.modules.goods.service.IGoodsCourseService;
|
|
|
import com.zhongzheng.modules.goods.vo.GoodsPeriodStatusVo;
|
|
@@ -57,6 +62,7 @@ import com.github.pagehelper.Page;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.Collection;
|
|
|
import java.util.Collections;
|
|
|
import java.util.List;
|
|
@@ -98,6 +104,12 @@ public class CourseServiceImpl extends ServiceImpl<CourseMapper, Course> impleme
|
|
|
@Autowired
|
|
|
private IClassGradeUserService iClassGradeUserService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IExamApplyGoodsService iExamApplyGoodsService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IExamApplyUserService iExamApplyUserService;
|
|
|
+
|
|
|
|
|
|
|
|
|
@Override
|
|
@@ -386,6 +398,27 @@ public class CourseServiceImpl extends ServiceImpl<CourseMapper, Course> impleme
|
|
|
}
|
|
|
goodsUserVo.setSecAllNum(secLong);
|
|
|
goodsUserVo.setStuAllNum(studyLong);
|
|
|
+
|
|
|
+ //查询对应考试安排
|
|
|
+ List<ExamApplyGoodsVo> examApplyGoodsVoList = iExamApplyGoodsService.listByGoodsId(goodsUserVo.getGoodsId());
|
|
|
+ if (examApplyGoodsVoList != null && examApplyGoodsVoList.size() > 0) {
|
|
|
+ List<ExamApplyGoodsVo> examApplyGoodsVos = new ArrayList<>();
|
|
|
+ examApplyGoodsVoList.forEach(examApplyGoodsVo -> {
|
|
|
+ LambdaQueryWrapper<ExamApplyUser> lqw = Wrappers.lambdaQuery();
|
|
|
+ lqw.eq(ExamApplyUser::getApplyId, examApplyGoodsVo.getApplyId());
|
|
|
+ List<ExamApplyUser> examApplyUserList = iExamApplyUserService.list(lqw);
|
|
|
+ if (examApplyUserList != null && examApplyUserList.size() > 0) {
|
|
|
+ ArrayList<Long> userIds = new ArrayList<>();
|
|
|
+ examApplyUserList.forEach(examApplyUser -> {
|
|
|
+ userIds.add(examApplyUser.getUserId());
|
|
|
+ });
|
|
|
+ if (userIds.contains(bo.getUserId())) {
|
|
|
+ examApplyGoodsVos.add(examApplyGoodsVo);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ goodsUserVo.setExamApplyGoodsList(examApplyGoodsVos);
|
|
|
+ }
|
|
|
}
|
|
|
return goodsUserVos;
|
|
|
}
|