zhangf
2024-06-24 21362fd048558832cdcaca8ee957d2d7aa753be2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
package com.gkhy.exam.institutionalaccess.service.serviceImpl;
 
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gkhy.exam.institutionalaccess.entity.ThStudentCourse;
import com.gkhy.exam.institutionalaccess.mapper.ThStudentCourseMapper;
import com.gkhy.exam.institutionalaccess.model.vo.ThStatisticStudentVO;
import com.gkhy.exam.institutionalaccess.model.vo.ThStudentCourseVO;
import com.gkhy.exam.institutionalaccess.service.ThStudentCourseService;
import com.ruoyi.common.enums.coalmineEnums.DeleteStatusEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
import java.util.Collections;
import java.util.List;
 
 
@Service("ThStudentCourseService")
public class ThStudentCourseServiceImpl extends ServiceImpl<ThStudentCourseMapper, ThStudentCourse> implements ThStudentCourseService {
   @Autowired
   private ThStudentCourseMapper studentCourseMapper;
    @Override
    public List<ThStudentCourse> getByIdCards(List<String> idcards) {
 
        return studentCourseMapper.selectList(new LambdaQueryWrapper<ThStudentCourse>().in(ThStudentCourse::getIdcard, idcards));
    }
 
    @Override
    public List<ThStatisticStudentVO> statisticByBatchUuid() {
        return studentCourseMapper.statisticByBatchUuid();
    }
 
 
    @Override
    public List<ThStudentCourse> listByInstitutionId(Long institutionId) {
        return studentCourseMapper.selectList(new LambdaQueryWrapper<ThStudentCourse>().eq(ThStudentCourse::getInstitutionId, institutionId));
    }
 
    @Override
    public List<ThStatisticStudentVO> statisticByCourseUuid() {
        return studentCourseMapper.statisticByCourseUuid();
    }
 
    @Override
    public List<ThStudentCourseVO> getListByBatchUuid(String batchUuid) {
        return studentCourseMapper.getListByBatchUuid(batchUuid);
    }
 
    @Override
    public void updateByBatchUuid(String batchUuid) {
        studentCourseMapper.updateByBatchUuid(batchUuid);
    }
 
    @Override
    public List<ThStudentCourse> getByIdcardAndBatchUuid(String idcard, String batchUuid) {
        List<ThStudentCourse> thStudentCourse = studentCourseMapper.selectList(new LambdaQueryWrapper<ThStudentCourse>().eq(ThStudentCourse::getIdcard, idcard)
                .eq(ThStudentCourse::getBatchUuid, batchUuid).eq(ThStudentCourse::getDelFlag, DeleteStatusEnum.NO.getStatus()));
    return thStudentCourse;
    }
}