Commit 9de8c6f9 authored by W_Y's avatar W_Y

提交体系审查任务修改

parent 20b4f584
......@@ -123,7 +123,7 @@ public class SystemReviewTaskServiceImpl extends ServiceImpl<SystemReviewTaskMap
public void submit(SystemReviewTaskSubmitRequest request) {
List<ReviewDetails> detailsList = reviewDetailsMapper.findNoResult(request.getTaskId());
if (detailsList != null) {
throw new ServiceException("存在未填写的问卷,请填写完整", HttpStatus.ERROR);
throw new ServiceException("存在未填写的问卷,请填写完整", HttpStatus.ERROR, detailsList);
} else {
SystemReviewTask systemReviewTask = systemReviewTaskService.getById(request.getTaskId());
strategySystemReviewTaskContext.getResource(systemReviewTask.getTaskStatus()).doSubmit(systemReviewTask);
......
......@@ -170,6 +170,11 @@ public class AjaxResult extends HashMap<String, Object>
return new AjaxResult(code, msg, null);
}
public static AjaxResult error(int code, String msg, Object data)
{
return new AjaxResult(code, msg, data);
}
/**
* 是否为成功消息
*
......
......@@ -19,7 +19,7 @@ import com.ruoyi.common.utils.StringUtils;
/**
* 全局异常处理器
*
*
* @author ruoyi
*/
@RestControllerAdvice
......@@ -60,7 +60,7 @@ public class GlobalExceptionHandler
Integer code = e.getCode();
Object data = e.getData();
return StringUtils.isNotNull(code) ? AjaxResult.error(code, e.getMessage()) : AjaxResult.error(e.getMessage(), data == null ? null : data);
return StringUtils.isNotNull(code) ? AjaxResult.error(code, e.getMessage(), data == null ? null : data) : AjaxResult.error(e.getMessage(), data == null ? null : data);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment