|
@@ -115,20 +115,25 @@ public class TIeInvigilateWarnInfoController {
|
|
|
if (Objects.isNull(mapParameter.get("warningIds")) || Objects.equals(mapParameter.get("warningIds"), "")) {
|
|
|
throw new BusinessException("预警id不能为空");
|
|
|
}
|
|
|
- List<String> warningIds = (List<String>) mapParameter.get("warningIds");
|
|
|
- if (warningIds.size() > 0) {
|
|
|
- if (Objects.isNull(mapParameter.get("approveStatus")) || Objects.equals(mapParameter.get("approveStatus"), "")) {
|
|
|
- throw new BusinessException("审阅状态不能为空");
|
|
|
+ //2020/11/24新增管理员不清除预警状态
|
|
|
+ TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
|
+ AuthDto authDto = (AuthDto) redisUtil.get(SystemConstant.userOauth + tbUser.getId());
|
|
|
+ if (!authDto.getRoleCodes().toString().contains(RoleEnum.ADMIN.name())) {
|
|
|
+ List<String> warningIds = (List<String>) mapParameter.get("warningIds");
|
|
|
+ if (warningIds.size() > 0) {
|
|
|
+ if (Objects.isNull(mapParameter.get("approveStatus")) || Objects.equals(mapParameter.get("approveStatus"), "")) {
|
|
|
+ throw new BusinessException("审阅状态不能为空");
|
|
|
+ }
|
|
|
+ List<Long> warningTranIds = new ArrayList<>();
|
|
|
+ warningIds.forEach(s -> {
|
|
|
+ warningTranIds.add(Long.parseLong(s));
|
|
|
+ });
|
|
|
+ Integer approveStatus = Integer.parseInt(String.valueOf(mapParameter.get("approveStatus")));
|
|
|
+ UpdateWrapper<TIeInvigilateWarnInfo> tIeInvigilateWarnInfoUpdateWrapper = new UpdateWrapper<>();
|
|
|
+ tIeInvigilateWarnInfoUpdateWrapper.lambda().set(TIeInvigilateWarnInfo::getApproveStatus, approveStatus)
|
|
|
+ .in(TIeInvigilateWarnInfo::getId, warningTranIds);
|
|
|
+ tIeInvigilateWarnInfoService.update(tIeInvigilateWarnInfoUpdateWrapper);
|
|
|
}
|
|
|
- List<Long> warningTranIds = new ArrayList<>();
|
|
|
- warningIds.forEach(s -> {
|
|
|
- warningTranIds.add(Long.parseLong(s));
|
|
|
- });
|
|
|
- Integer approveStatus = Integer.parseInt(String.valueOf(mapParameter.get("approveStatus")));
|
|
|
- UpdateWrapper<TIeInvigilateWarnInfo> tIeInvigilateWarnInfoUpdateWrapper = new UpdateWrapper<>();
|
|
|
- tIeInvigilateWarnInfoUpdateWrapper.lambda().set(TIeInvigilateWarnInfo::getApproveStatus, approveStatus)
|
|
|
- .in(TIeInvigilateWarnInfo::getId, warningTranIds);
|
|
|
- tIeInvigilateWarnInfoService.update(tIeInvigilateWarnInfoUpdateWrapper);
|
|
|
}
|
|
|
return ResultUtil.ok(Collections.singletonMap(SystemConstant.SUCCESS, true));
|
|
|
}
|
|
@@ -155,7 +160,10 @@ public class TIeInvigilateWarnInfoController {
|
|
|
if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
|
|
|
userId = tbUser.getId();
|
|
|
}
|
|
|
- tOeExamRecordService.approveStatusListUpdate(examId, examActivityId, roomCode, approveStatus, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, userId, tbUser.getOrgId());
|
|
|
+ //2020/11/24新增管理员不清除预警状态
|
|
|
+ if (!authDto.getRoleCodes().toString().contains(RoleEnum.ADMIN.name())) {
|
|
|
+ tOeExamRecordService.approveStatusListUpdate(examId, examActivityId, roomCode, approveStatus, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, userId, tbUser.getOrgId());
|
|
|
+ }
|
|
|
return ResultUtil.ok(Collections.singletonMap(SystemConstant.SUCCESS, true));
|
|
|
}
|
|
|
}
|