From 28231163c688c379a688ce6878a1126ee218aa52 Mon Sep 17 00:00:00 2001 From: huangzhen <867217663@qq.com> Date: 星期二, 26 九月 2023 16:53:48 +0800 Subject: [PATCH] 煤矿功能 --- exam-system/src/main/java/com/gkhy/exam/coalmine/service/baseService/impl/EmonExamRecordServiceImpl.java | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 45 insertions(+), 0 deletions(-) diff --git a/exam-system/src/main/java/com/gkhy/exam/coalmine/service/baseService/impl/EmonExamRecordServiceImpl.java b/exam-system/src/main/java/com/gkhy/exam/coalmine/service/baseService/impl/EmonExamRecordServiceImpl.java new file mode 100644 index 0000000..781a74a --- /dev/null +++ b/exam-system/src/main/java/com/gkhy/exam/coalmine/service/baseService/impl/EmonExamRecordServiceImpl.java @@ -0,0 +1,45 @@ +package com.gkhy.exam.coalmine.service.baseService.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.gkhy.exam.coalmine.mapper.EmonExamRecordMapper; +import com.gkhy.exam.coalmine.entity.EmonExamRecord; +import com.gkhy.exam.coalmine.service.baseService.EmonExamRecordService; +import com.ruoyi.common.enums.coalmineEnums.DeleteStatusEnum; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import javax.annotation.Resource; +import java.util.List; + +/** + * @author hz + * @since 2023-09-13 10:13:40 + */ +@Service("emonExamRecordServiceImpl") +public class EmonExamRecordServiceImpl extends ServiceImpl<EmonExamRecordMapper, EmonExamRecord> implements EmonExamRecordService { + + @Resource + private EmonExamRecordMapper emonExamRecordMapper; + + + @Override + public EmonExamRecord findValidById(Long id) { + LambdaQueryWrapper<EmonExamRecord> wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(EmonExamRecord::getId,id) + .eq(EmonExamRecord::getDelFlag, DeleteStatusEnum.NO.getStatus()); + return emonExamRecordMapper.selectOne(wrapper); + } + + @Override + public List<EmonExamRecord> listValid(List<Long> childrenIds) { + LambdaQueryWrapper<EmonExamRecord> wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(EmonExamRecord::getDelFlag, DeleteStatusEnum.NO.getStatus()) + .orderByDesc(EmonExamRecord::getReportTime); + if (!CollectionUtils.isEmpty(childrenIds)){ + wrapper.in(EmonExamRecord::getDistrictId,childrenIds); + } + return emonExamRecordMapper.selectList(wrapper); + } +} + -- Gitblit v1.9.2