|
@@ -22,7 +22,6 @@ import com.ankaibei.workFlow.webadmin.ankaibei.mapper.TaskInfoMapper;
|
|
import com.ankaibei.workFlow.webadmin.ankaibei.mapper.UserInfoMapper;
|
|
import com.ankaibei.workFlow.webadmin.ankaibei.mapper.UserInfoMapper;
|
|
import com.ankaibei.workFlow.webadmin.ankaibei.service.TaskInfoService;
|
|
import com.ankaibei.workFlow.webadmin.ankaibei.service.TaskInfoService;
|
|
import com.ankaibei.workFlow.webadmin.ankaibei.utils.FlowTaskStart;
|
|
import com.ankaibei.workFlow.webadmin.ankaibei.utils.FlowTaskStart;
|
|
-import com.ankaibei.workFlow.webadmin.ankaibei.vo.ManHourInfoVo;
|
|
|
|
import com.ankaibei.workFlow.webadmin.ankaibei.vo.ResMsg;
|
|
import com.ankaibei.workFlow.webadmin.ankaibei.vo.ResMsg;
|
|
import com.ankaibei.workFlow.webadmin.ankaibei.vo.TaskInfoVo;
|
|
import com.ankaibei.workFlow.webadmin.ankaibei.vo.TaskInfoVo;
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
@@ -33,12 +32,16 @@ import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
-import java.text.ParseException;
|
|
|
|
-import java.text.SimpleDateFormat;
|
|
|
|
import java.time.Duration;
|
|
import java.time.Duration;
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalDateTime;
|
|
import java.time.format.DateTimeFormatter;
|
|
import java.time.format.DateTimeFormatter;
|
|
-import java.util.*;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
|
+import java.util.Arrays;
|
|
|
|
+import java.util.Date;
|
|
|
|
+import java.util.HashMap;
|
|
|
|
+import java.util.List;
|
|
|
|
+import java.util.Map;
|
|
|
|
+import java.util.Optional;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -195,6 +198,10 @@ public class TaskInfoServiceImpl implements TaskInfoService {
|
|
if (ObjectUtils.isEmpty(taskInfoEntity.getStartTime()) || ObjectUtils.isEmpty(taskInfoEntity.getEndTime())) {
|
|
if (ObjectUtils.isEmpty(taskInfoEntity.getStartTime()) || ObjectUtils.isEmpty(taskInfoEntity.getEndTime())) {
|
|
return new ResMsg(CodeEnum.PARAM_IS_NULL, "请录入任务计划的开始时间和结束时间");
|
|
return new ResMsg(CodeEnum.PARAM_IS_NULL, "请录入任务计划的开始时间和结束时间");
|
|
}
|
|
}
|
|
|
|
+ //判断任务的参与人是否为空
|
|
|
|
+ if (ObjectUtils.isEmpty(taskParticipant)) {
|
|
|
|
+ return new ResMsg(CodeEnum.PARAM_IS_NULL, "任务参与人不能为空");
|
|
|
|
+ }
|
|
StringBuffer str = new StringBuffer();
|
|
StringBuffer str = new StringBuffer();
|
|
for (Long id : taskParticipant) {
|
|
for (Long id : taskParticipant) {
|
|
str.append(id).append(",");
|
|
str.append(id).append(",");
|
|
@@ -303,8 +310,7 @@ public class TaskInfoServiceImpl implements TaskInfoService {
|
|
return new ResMsg(CodeEnum.NO_DATA);
|
|
return new ResMsg(CodeEnum.NO_DATA);
|
|
}
|
|
}
|
|
//任务发起人
|
|
//任务发起人
|
|
- byId.get().setTaskCreator(userInfoMapper.getById(byId.get().getTaskCreator()).getShowName());
|
|
|
|
-
|
|
|
|
|
|
+ byId.get().setTaskCreatorName(userInfoMapper.getById(byId.get().getTaskCreator()).getShowName());
|
|
return new ResMsg(CodeEnum.OK, byId.orElse(null));
|
|
return new ResMsg(CodeEnum.OK, byId.orElse(null));
|
|
}
|
|
}
|
|
|
|
|