|
@@ -180,6 +180,8 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
|
private TaskExecutorService taskExecutorService;
|
|
private TaskExecutorService taskExecutorService;
|
|
@Resource
|
|
@Resource
|
|
private TaskGroupService taskGroupService;
|
|
private TaskGroupService taskGroupService;
|
|
|
|
+ @Resource
|
|
|
|
+ private ParticipationService participationService;
|
|
|
|
|
|
public static String provider_access_token = null;
|
|
public static String provider_access_token = null;
|
|
public static long providerTokenExpireTime = 0L;
|
|
public static long providerTokenExpireTime = 0L;
|
|
@@ -682,7 +684,11 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
|
user.setCertList(certList);
|
|
user.setCertList(certList);
|
|
//获取相关日报数量
|
|
//获取相关日报数量
|
|
Integer reportCount = reportMapper.selectCount(new QueryWrapper<Report>().eq("creator_id", user.getId()));
|
|
Integer reportCount = reportMapper.selectCount(new QueryWrapper<Report>().eq("creator_id", user.getId()));
|
|
- if (reportCount>0){
|
|
|
|
|
|
+ //获取是否存在任务
|
|
|
|
+ Integer taskExecutorCount = taskMapper.selectCount(new QueryWrapper<Task>().like("executor_id", user.getId()));
|
|
|
|
+ //获取是否存在项目
|
|
|
|
+ Integer projectInchargerList = projectMapper.selectCount(new QueryWrapper<Project>().eq("incharger_id", user.getId()));
|
|
|
|
+ if (reportCount>0 || taskExecutorCount>0 || projectInchargerList>0){
|
|
reportCount = 1;
|
|
reportCount = 1;
|
|
}
|
|
}
|
|
user.setIsExistsReport(reportCount);
|
|
user.setIsExistsReport(reportCount);
|
|
@@ -2674,6 +2680,15 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
|
}
|
|
}
|
|
taskGroupService.updateBatchById(taskGroupList);
|
|
taskGroupService.updateBatchById(taskGroupList);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ //转移项目参与人
|
|
|
|
+ List<Participation> participationList = participationMapper.selectList(new QueryWrapper<Participation>().eq("user_id", sourceUser.getId()));
|
|
|
|
+ if (participationList.size() != 0){
|
|
|
|
+ for (Participation participation : participationList) {
|
|
|
|
+ participation.setUserId(targetUser.getId());
|
|
|
|
+ }
|
|
|
|
+ participationService.updateBatchById(participationList);
|
|
|
|
+ }
|
|
return httpRespMsg;
|
|
return httpRespMsg;
|
|
}
|
|
}
|
|
}
|
|
}
|