|
@@ -284,8 +284,8 @@ public class MarkGroupServiceImpl extends MppServiceImpl<MarkGroupMapper, MarkGr
|
|
|
}
|
|
|
if (markGroupDto.getArbitrateThreshold() == null) {
|
|
|
throw ExceptionResultEnum.ERROR.exception("开启双评,仲裁阀值必填");
|
|
|
- } else if (markGroupDto.getArbitrateThreshold() < 0 || markGroupDto.getArbitrateThreshold() > 1) {
|
|
|
- throw ExceptionResultEnum.ERROR.exception("开启双评,仲裁阀值必填且范围为0-1");
|
|
|
+ } else if (markGroupDto.getArbitrateThreshold() < 0) {
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("开启双评,仲裁阀值大于等于0");
|
|
|
}
|
|
|
if (markGroupDto.getScorePolicy() == null) {
|
|
|
throw ExceptionResultEnum.ERROR.exception("开启双评,合分规则必填");
|
|
@@ -331,7 +331,7 @@ public class MarkGroupServiceImpl extends MppServiceImpl<MarkGroupMapper, MarkGr
|
|
|
if (userIds.contains(marker.getUserId())) {
|
|
|
continue;
|
|
|
}
|
|
|
- markUserGroups.add(new MarkUserGroup(examId, paperNumber, markGroupDto.getGroupNumber(), marker.getUserId(), markPaper.getMarkMode()));
|
|
|
+ markUserGroups.add(new MarkUserGroup(examId, paperNumber, markGroupDto.getGroupNumber(), marker.getUserId()));
|
|
|
}
|
|
|
if (CollectionUtils.isNotEmpty(markUserGroups)) {
|
|
|
markUserGroupService.saveBatch(markUserGroups);
|
|
@@ -350,6 +350,8 @@ public class MarkGroupServiceImpl extends MppServiceImpl<MarkGroupMapper, MarkGr
|
|
|
String paperNumber = markGroupSingleDto.getPaperNumber();
|
|
|
MarkGroupDto markGroupDto = markGroupSingleDto.getGroupInfo();
|
|
|
MarkGroup markGroup = this.getByExamIdAndPaperNumberAndGroupNumber(examId, paperNumber, markGroupDto.getGroupNumber());
|
|
|
+ Boolean doubleEnable = markGroup.getDoubleEnable();
|
|
|
+ Double doubleRate = markGroup.getDoubleRate();
|
|
|
if (markGroup == null) {
|
|
|
throw ExceptionResultEnum.ERROR.exception("数据不存在");
|
|
|
}
|
|
@@ -359,6 +361,8 @@ public class MarkGroupServiceImpl extends MppServiceImpl<MarkGroupMapper, MarkGr
|
|
|
}
|
|
|
if (markGroupDto.getArbitrateThreshold() == null) {
|
|
|
throw ExceptionResultEnum.ERROR.exception("开启双评,仲裁阀值必填");
|
|
|
+ } else if (markGroupDto.getArbitrateThreshold() < 0) {
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("开启双评,仲裁阀值大于等于0");
|
|
|
}
|
|
|
if (markGroupDto.getScorePolicy() == null) {
|
|
|
throw ExceptionResultEnum.ERROR.exception("开启双评,合分规则必填");
|
|
@@ -380,14 +384,13 @@ public class MarkGroupServiceImpl extends MppServiceImpl<MarkGroupMapper, MarkGr
|
|
|
|
|
|
List<MarkUserGroup> markUserGroupList = markUserGroupService.listByExamIdAndPaperNumberAndGroupNumber(examId, paperNumber, markGroupDto.getGroupNumber());
|
|
|
if (CollectionUtils.isNotEmpty(markUserGroupList)) {
|
|
|
- MarkPaper markPaper = markPaperService.getByExamIdAndPaperNumber(examId, paperNumber);
|
|
|
List<Long> userIds = markUserGroupList.stream().map(MarkUserGroup::getUserId).collect(Collectors.toList());
|
|
|
List<MarkUserGroup> markUserGroups = new ArrayList<>();
|
|
|
for (MarkUser marker : markGroupDto.getMarkers()) {
|
|
|
if (userIds.contains(marker.getUserId())) {
|
|
|
continue;
|
|
|
}
|
|
|
- markUserGroups.add(new MarkUserGroup(examId, paperNumber, markGroupDto.getGroupNumber(), marker.getUserId(), markPaper.getMarkMode()));
|
|
|
+ markUserGroups.add(new MarkUserGroup(examId, paperNumber, markGroupDto.getGroupNumber(), marker.getUserId()));
|
|
|
}
|
|
|
if (CollectionUtils.isNotEmpty(markUserGroups)) {
|
|
|
markUserGroupService.saveBatch(markUserGroups);
|
|
@@ -395,7 +398,8 @@ public class MarkGroupServiceImpl extends MppServiceImpl<MarkGroupMapper, MarkGr
|
|
|
}
|
|
|
|
|
|
// 开启双评且双评比例值修改过,则删除任务
|
|
|
- if (markGroupDto.getDoubleEnable() && markGroup.getDoubleRate() != null && markGroupDto.getDoubleRate().doubleValue() != markGroup.getDoubleRate().doubleValue()) {
|
|
|
+ if (!doubleEnable.equals(markGroupDto.getDoubleEnable())
|
|
|
+ || (markGroupDto.getDoubleEnable() && (doubleRate == null || markGroupDto.getDoubleRate().doubleValue() != markGroup.getDoubleRate().doubleValue()))) {
|
|
|
markSyncService.deleteMarkGroup(markGroup, false);
|
|
|
}
|
|
|
}
|