|
@@ -4,12 +4,16 @@ import cn.com.qmth.examcloud.core.oe.admin.dao.ExamWarnRepo;
|
|
|
import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamWarnEntity;
|
|
|
import cn.com.qmth.examcloud.core.oe.admin.dao.enums.WarnType;
|
|
|
import cn.com.qmth.examcloud.core.oe.admin.service.ExamWarnService;
|
|
|
+import cn.com.qmth.examcloud.core.oe.admin.service.bean.examwarn.ExamWarnInfo;
|
|
|
+import org.apache.commons.collections4.CollectionUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
|
+import java.util.List;
|
|
|
|
|
|
@Service
|
|
|
public class ExamWarnServiceImpl implements ExamWarnService {
|
|
@@ -31,4 +35,22 @@ public class ExamWarnServiceImpl implements ExamWarnService {
|
|
|
examWarnRepo.save(examWarn);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public List<ExamWarnInfo> list(Long examRecordDataId) {
|
|
|
+ List<ExamWarnEntity> entities = examWarnRepo.findByExamRecordDataId(examRecordDataId);
|
|
|
+
|
|
|
+ List<ExamWarnInfo> list = new ArrayList<>();
|
|
|
+ if (CollectionUtils.isNotEmpty(entities)) {
|
|
|
+ for (ExamWarnEntity entity : entities) {
|
|
|
+ ExamWarnInfo info = new ExamWarnInfo();
|
|
|
+ info.setId(entity.getId());
|
|
|
+ info.setWarnType(entity.getWarnType());
|
|
|
+ info.setWarnDetail(entity.getWarnDetail());
|
|
|
+ list.add(info);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return list;
|
|
|
+ }
|
|
|
+
|
|
|
}
|