|
@@ -19,6 +19,7 @@ import cn.com.qmth.markingaudit.bean.ExamDataVo;
|
|
|
import cn.com.qmth.markingaudit.bean.MarkingScoreDataQuery;
|
|
|
import cn.com.qmth.markingaudit.bean.MarkingScoreDataVo;
|
|
|
import cn.com.qmth.markingaudit.bean.MarkingScoreInfo;
|
|
|
+import cn.com.qmth.markingaudit.bean.MarkingScoreOperateInfo;
|
|
|
import cn.com.qmth.markingaudit.bean.QuestionDataQuery;
|
|
|
import cn.com.qmth.markingaudit.bean.QuestionDataVo;
|
|
|
import cn.com.qmth.markingaudit.bean.StudentDataQuery;
|
|
@@ -26,6 +27,7 @@ import cn.com.qmth.markingaudit.bean.StudentDataVo;
|
|
|
import cn.com.qmth.markingaudit.bean.SubjectDataQuery;
|
|
|
import cn.com.qmth.markingaudit.bean.SubjectDataVo;
|
|
|
import cn.com.qmth.markingaudit.dao.MonitorDao;
|
|
|
+import cn.com.qmth.markingaudit.enums.SubjectiveStatus;
|
|
|
import cn.com.qmth.markingaudit.service.MonitorService;
|
|
|
|
|
|
@Service
|
|
@@ -42,10 +44,10 @@ public class MonitorServiceImpl implements MonitorService {
|
|
|
if (StringUtils.isNotBlank(vo.getSasConfig())) {
|
|
|
JSONObject js = JSONObject.parseObject(vo.getSasConfig());
|
|
|
if (js.containsKey("passScore")) {
|
|
|
- vo.setPassScore(js.getInteger("passScore"));
|
|
|
+ vo.setPassScore(js.getDouble("passScore"));
|
|
|
}
|
|
|
if (js.containsKey("excellentScore")) {
|
|
|
- vo.setExcellentScore(js.getInteger("excellentScore"));
|
|
|
+ vo.setExcellentScore(js.getDouble("excellentScore"));
|
|
|
}
|
|
|
vo.setSasConfig(null);
|
|
|
}
|
|
@@ -84,22 +86,64 @@ public class MonitorServiceImpl implements MonitorService {
|
|
|
checkExamIdValid(req.getExamId(), req.getSchoolCode());
|
|
|
List<MarkingScoreDataVo> ret = monitorDao.markingScoreData(req);
|
|
|
if (CollectionUtils.isNotEmpty(ret)) {
|
|
|
- List<Integer> ids = ret.stream().map(e -> e.getId()).collect(Collectors.toList());
|
|
|
- List<MarkingScoreInfo> infos = monitorDao.markingScoreInfo(ids);
|
|
|
- Map<Integer, List<MarkingScoreInfo>> map = new HashMap<>();
|
|
|
- for (MarkingScoreInfo info : infos) {
|
|
|
- List<MarkingScoreInfo> tem = map.get(info.getStudentId());
|
|
|
- if (tem == null) {
|
|
|
- tem = new ArrayList<>();
|
|
|
- map.put(info.getStudentId(), tem);
|
|
|
+ List<Integer> ids = ret.stream().filter(e -> SubjectiveStatus.MARKED.equals(e.getSubjectiveStatus()))
|
|
|
+ .map(e -> e.getId()).collect(Collectors.toList());
|
|
|
+ if (CollectionUtils.isNotEmpty(ids)) {
|
|
|
+ List<MarkingScoreInfo> infos = monitorDao.markingScoreInfo(ids);
|
|
|
+ if (CollectionUtils.isNotEmpty(infos)) {
|
|
|
+ List<MarkingScoreOperateInfo> opinfos = monitorDao.markingScoreOperateInfo(ids);
|
|
|
+ Map<String, List<MarkingScoreOperateInfo>> opmap = new HashMap<>();
|
|
|
+ for (MarkingScoreOperateInfo info : opinfos) {
|
|
|
+ String key = info.getStudentId() + "-" + info.getGroupNumber();
|
|
|
+ List<MarkingScoreOperateInfo> tem = opmap.get(key);
|
|
|
+ if (tem == null) {
|
|
|
+ tem = new ArrayList<>();
|
|
|
+ opmap.put(key, tem);
|
|
|
+ }
|
|
|
+ tem.add(info);
|
|
|
+ }
|
|
|
+ Map<Integer, List<MarkingScoreInfo>> map = new HashMap<>();
|
|
|
+ for (MarkingScoreInfo info : infos) {
|
|
|
+ String key = info.getStudentId() + "-" + info.getGroupNumber();
|
|
|
+ fillOperateInfo(info, opmap.get(key));
|
|
|
+ List<MarkingScoreInfo> tem = map.get(info.getStudentId());
|
|
|
+ if (tem == null) {
|
|
|
+ tem = new ArrayList<>();
|
|
|
+ map.put(info.getStudentId(), tem);
|
|
|
+ }
|
|
|
+ tem.add(info);
|
|
|
+ }
|
|
|
+ for (MarkingScoreDataVo vo : ret) {
|
|
|
+ vo.setExamInfo(map.get(vo.getId()));
|
|
|
+ }
|
|
|
}
|
|
|
- tem.add(info);
|
|
|
- }
|
|
|
- for (MarkingScoreDataVo vo : ret) {
|
|
|
- vo.setExamInfo(map.get(vo.getId()));
|
|
|
}
|
|
|
}
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
+ private void fillOperateInfo(MarkingScoreInfo info, List<MarkingScoreOperateInfo> list) {
|
|
|
+ List<String> markerAcount = new ArrayList<>();
|
|
|
+ List<String> headAcount = new ArrayList<>();
|
|
|
+ List<String> markerTime = new ArrayList<>();
|
|
|
+ List<String> headerTime = new ArrayList<>();
|
|
|
+ for (MarkingScoreOperateInfo op : list) {
|
|
|
+ if (StringUtils.isNotBlank(op.getMarkerAccount())) {
|
|
|
+ markerAcount.add(op.getMarkerAccount());
|
|
|
+ markerTime.add(op.getMarkerTime());
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(op.getHeaderAccount())) {
|
|
|
+ headAcount.add(op.getHeaderAccount());
|
|
|
+ headerTime.add(op.getHeaderTime());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (CollectionUtils.isNotEmpty(headAcount)) {
|
|
|
+ info.setCreateTime(StringUtils.join(headerTime, ","));
|
|
|
+ info.setId(StringUtils.join(headAcount, ","));
|
|
|
+ } else {
|
|
|
+ info.setCreateTime(StringUtils.join(markerTime, ","));
|
|
|
+ info.setId(StringUtils.join(markerAcount, ","));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|