|
@@ -69,6 +69,7 @@ public class MarkGroupServiceImpl extends ServiceImpl<MarkGroupMapper, MarkGroup
|
|
|
for (MarkGroup markGroup : groupList) {
|
|
|
MarkGroupDto markGroupDto = new MarkGroupDto();
|
|
|
markGroupDto.setGroupNumber(markGroup.getNumber());
|
|
|
+ markGroupDto.setDoubleEnable(markGroup.getDoubleEnable());
|
|
|
markGroupDto.setDoubleRate(markGroup.getDoubleRate());
|
|
|
markGroupDto.setArbitrateThreshold(markGroup.getArbitrateThreshold());
|
|
|
markGroupDto.setScorePolicy(markGroup.getScorePolicy());
|
|
@@ -258,15 +259,15 @@ public class MarkGroupServiceImpl extends ServiceImpl<MarkGroupMapper, MarkGroup
|
|
|
markGroup.setPicList(JSON.toJSONString(markGroupDto.getPictureConfigs()));
|
|
|
Double totalScore = questions.stream().collect(Collectors.summingDouble(MarkQuestion::getTotalScore));
|
|
|
markGroup.setTotalScore(totalScore);
|
|
|
- if (markGroupDto.getDoubleRate() != null || markGroupDto.getArbitrateThreshold() != null || markGroupDto.getScorePolicy() != null) {
|
|
|
+ if (markGroupDto.getDoubleEnable()) {
|
|
|
if (markGroupDto.getDoubleRate() == null) {
|
|
|
throw ExceptionResultEnum.ERROR.exception("开启双评,双评比例必填");
|
|
|
}
|
|
|
if (markGroupDto.getArbitrateThreshold() == null) {
|
|
|
- throw ExceptionResultEnum.ERROR.exception("开启双评, 仲裁阀值必填");
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("开启双评,仲裁阀值必填");
|
|
|
}
|
|
|
if (markGroupDto.getScorePolicy() == null) {
|
|
|
- throw ExceptionResultEnum.ERROR.exception("开启双评, 合分规则必填");
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("开启双评,合分规则必填");
|
|
|
}
|
|
|
}
|
|
|
markGroup.setDoubleRate(markGroupDto.getDoubleRate());
|
|
@@ -321,7 +322,7 @@ public class MarkGroupServiceImpl extends ServiceImpl<MarkGroupMapper, MarkGroup
|
|
|
if (markGroup == null) {
|
|
|
throw ExceptionResultEnum.ERROR.exception("数据不存在");
|
|
|
}
|
|
|
- if (markGroupDto.getDoubleRate() != null || markGroupDto.getArbitrateThreshold() != null || markGroupDto.getScorePolicy() != null) {
|
|
|
+ if (markGroupDto.getDoubleEnable()) {
|
|
|
if (markGroupDto.getDoubleRate() == null) {
|
|
|
throw ExceptionResultEnum.ERROR.exception("开启双评,双评比例必填");
|
|
|
} else if (markGroupDto.getDoubleRate() < markGroup.getDoubleRate()) {
|