|
@@ -23,6 +23,7 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
import org.springframework.context.annotation.Lazy;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.transaction.annotation.Isolation;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
@@ -113,6 +114,7 @@ public class TaskService extends ServiceImpl<TaskMapper, Task> {
|
|
|
//获得登录人的信息
|
|
|
PersonnelVO personnelVO = cacheUtils.getLoginUser(StpUtil.getLoginIdAsInt());
|
|
|
LambdaQueryWrapper<Task> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+
|
|
|
if (taskVO.getType() != null) {
|
|
|
lambdaQueryWrapper.eq(Task::getType, taskVO.getType());
|
|
|
}
|
|
@@ -222,7 +224,7 @@ public class TaskService extends ServiceImpl<TaskMapper, Task> {
|
|
|
|
|
|
|
|
|
//添加分配任务
|
|
|
- @Transactional(rollbackFor = Exception.class)
|
|
|
+ @Transactional(rollbackFor = Exception.class,isolation = Isolation.REPEATABLE_READ ,timeout = 30)
|
|
|
public String addAssTask(AssignTaskVO assignTaskVO) throws ParseException, IOException {
|
|
|
PatentVO patentVO = new PatentVO();
|
|
|
if (assignTaskVO.getPatentVO() != null) {
|
|
@@ -415,9 +417,11 @@ public class TaskService extends ServiceImpl<TaskMapper, Task> {
|
|
|
//1为已完成
|
|
|
Date now = new Date();
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
+ //增加完成时间
|
|
|
simpleDateFormat.format(now);
|
|
|
task.setFinishTime(now);
|
|
|
task.setTaskStatus(1);
|
|
|
+ //结果为已完成状态
|
|
|
task.setResult(1);
|
|
|
task.updateById();
|
|
|
return Response.success();
|
|
@@ -425,5 +429,29 @@ public class TaskService extends ServiceImpl<TaskMapper, Task> {
|
|
|
|
|
|
|
|
|
}
|
|
|
+ public String ReviewTheTasks(TaskVO taskVO){
|
|
|
+ PersonnelVO personnelVO = cacheUtils.getLoginUser(StpUtil.getLoginIdAsInt());
|
|
|
+ LambdaQueryWrapper<Task> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ lambdaQueryWrapper.eq(Task::getReportId,taskVO.getReportId());
|
|
|
+ List<Task> list = this.list(lambdaQueryWrapper);
|
|
|
+ List<Task> list1=new ArrayList<>();
|
|
|
+ List<Integer> collect = list.stream().map(Task::getCreateID).collect(Collectors.toList());
|
|
|
+ if(collect.get(0).equals(personnelVO.getId())){
|
|
|
+ if(taskVO.getCurrent()!=null&&taskVO.getSize()!=null){
|
|
|
+
|
|
|
+ }
|
|
|
+ return Response.success(list);
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ for(Task task:list){
|
|
|
+ if(task.getHandlePersonId().equals(personnelVO.getId())){
|
|
|
+ list1.add(task);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return Response.success(list1);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|