|
@@ -16,6 +16,9 @@ import com.qmth.boot.core.exception.StatusException;
|
|
|
|
|
|
import cn.com.qmth.markingaudit.bean.ExamDataQuery;
|
|
|
import cn.com.qmth.markingaudit.bean.ExamDataVo;
|
|
|
+import cn.com.qmth.markingaudit.bean.InspectDataInfo;
|
|
|
+import cn.com.qmth.markingaudit.bean.InspectDataQuery;
|
|
|
+import cn.com.qmth.markingaudit.bean.InspectDataVo;
|
|
|
import cn.com.qmth.markingaudit.bean.MarkingScoreDataQuery;
|
|
|
import cn.com.qmth.markingaudit.bean.MarkingScoreDataVo;
|
|
|
import cn.com.qmth.markingaudit.bean.MarkingScoreInfo;
|
|
@@ -87,7 +90,7 @@ public class MonitorServiceImpl implements MonitorService {
|
|
|
List<MarkingScoreDataVo> ret = monitorDao.markingScoreData(req);
|
|
|
if (CollectionUtils.isNotEmpty(ret)) {
|
|
|
List<Integer> ids = ret.stream().filter(e -> SubjectiveStatus.MARKED.equals(e.getSubjectiveStatus()))
|
|
|
- .map(e -> e.getId()).collect(Collectors.toList());
|
|
|
+ .map(e -> e.getDataId()).collect(Collectors.toList());
|
|
|
if (CollectionUtils.isNotEmpty(ids)) {
|
|
|
List<MarkingScoreInfo> infos = monitorDao.markingScoreInfo(ids);
|
|
|
if (CollectionUtils.isNotEmpty(infos)) {
|
|
@@ -114,7 +117,7 @@ public class MonitorServiceImpl implements MonitorService {
|
|
|
tem.add(info);
|
|
|
}
|
|
|
for (MarkingScoreDataVo vo : ret) {
|
|
|
- vo.setExamInfo(map.get(vo.getId()));
|
|
|
+ vo.setExamInfo(map.get(vo.getDataId()));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -146,4 +149,31 @@ public class MonitorServiceImpl implements MonitorService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public List<InspectDataVo> inspectData(InspectDataQuery req) {
|
|
|
+ checkExamIdValid(req.getExamId(), req.getSchoolCode());
|
|
|
+ List<InspectDataVo> ret = monitorDao.inspectData(req);
|
|
|
+ if (CollectionUtils.isNotEmpty(ret)) {
|
|
|
+ List<Integer> ids = ret.stream().map(e -> e.getDataId()).collect(Collectors.toList());
|
|
|
+ if (CollectionUtils.isNotEmpty(ids)) {
|
|
|
+ List<InspectDataInfo> infos = monitorDao.inspectDataInfo(ids);
|
|
|
+ if (CollectionUtils.isNotEmpty(infos)) {
|
|
|
+ Map<Integer, List<InspectDataInfo>> map = new HashMap<>();
|
|
|
+ for (InspectDataInfo info : infos) {
|
|
|
+ List<InspectDataInfo> tem = map.get(info.getStudentId());
|
|
|
+ if (tem == null) {
|
|
|
+ tem = new ArrayList<>();
|
|
|
+ map.put(info.getStudentId(), tem);
|
|
|
+ }
|
|
|
+ tem.add(info);
|
|
|
+ }
|
|
|
+ for (InspectDataVo vo : ret) {
|
|
|
+ vo.setExamInfo(map.get(vo.getDataId()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
}
|