|
|
@@ -282,6 +282,7 @@ public class WebMediatorImpl implements ViewMediator {
|
|
|
.stream().filter(crowdTestTask -> crowdTestTask.getCode().equals(taskCode)).findFirst();
|
|
|
if (!task.isPresent())
|
|
|
throw new CrowdTestTaskNotExistException();
|
|
|
+ System.out.println("renderTaskReportDetails userID: " + userId);
|
|
|
// 查看当前任务指定用户
|
|
|
Optional<TaskToUser> taskToUserOptional = task.get().getAcceptedUserList().stream().filter(taskToUser -> taskToUser.getUserId().equals(userId)).findFirst();
|
|
|
if(!taskToUserOptional.isPresent())
|
|
|
@@ -319,6 +320,7 @@ public class WebMediatorImpl implements ViewMediator {
|
|
|
if (!task.isPresent())
|
|
|
throw new CrowdTestTaskNotExistException();
|
|
|
CrowdTaskVO taskVO = new CrowdTaskVO(task.get());
|
|
|
+ System.out.println("renderTaskDetails userId:" + userId);
|
|
|
if (userId == null)
|
|
|
taskDetailsDTO.setTaskOperationControl(this.initTaskPermission(project, task.get(), null));
|
|
|
else
|
|
|
@@ -503,7 +505,9 @@ public class WebMediatorImpl implements ViewMediator {
|
|
|
||(task.getDistributionType()==2 && task.getStatus()>=CrowdTestTaskStatus.HAS_RECEIVED)){
|
|
|
List<TaskToUser> acceptedUserList = task.getAcceptedUserList();
|
|
|
Optional<TaskToUser> taskToUserOptional = acceptedUserList.stream().filter(taskToUser -> taskToUser.getUserId().equals(user.getId())).findFirst();
|
|
|
+
|
|
|
if(taskToUserOptional.isPresent()){
|
|
|
+ // 已接收用户
|
|
|
if (task.getStatus()==CrowdTestTaskStatus.HAS_RELEASED){
|
|
|
taskOperationControl.setReceive(true);
|
|
|
if (task.getDistributionType()==0)
|
|
|
@@ -516,6 +520,14 @@ public class WebMediatorImpl implements ViewMediator {
|
|
|
} else if (task.getStatus() == CrowdTestTaskStatus.HAS_COMMITED){
|
|
|
taskOperationControl.setUploadReport(true);
|
|
|
}
|
|
|
+ }else{
|
|
|
+ // 未接收用户
|
|
|
+ taskOperationControl.setReceive(true);
|
|
|
+ if (task.getStatus()==CrowdTestTaskStatus.HAS_RELEASED){
|
|
|
+ // 定向的
|
|
|
+ if (task.getDistributionType()==0)
|
|
|
+ taskOperationControl.setReject(true);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
} else if (task.getDistributionType()==2){
|