|
|
@ -271,7 +271,7 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, TaskEntity> impleme |
|
|
|
R<String> r = sysClient.getParamValue(TaskContants.OPEN_MULTIPLE_TASK); |
|
|
|
R<String> r = sysClient.getParamValue(TaskContants.OPEN_MULTIPLE_TASK); |
|
|
|
if (r.isSuccess() && "0".equals(r.getData())) {//处理同时开启几个任务的情况
|
|
|
|
if (r.isSuccess() && "0".equals(r.getData())) {//处理同时开启几个任务的情况
|
|
|
|
Long count = taskUserService.count(Wrappers.<TaskUserEntity>query().lambda().eq(TaskUserEntity::getUserId, userId).eq(TaskUserEntity::getClaimStatus, ClaimStatusEnum.COLLECT.getStatus())); |
|
|
|
Long count = taskUserService.count(Wrappers.<TaskUserEntity>query().lambda().eq(TaskUserEntity::getUserId, userId).eq(TaskUserEntity::getClaimStatus, ClaimStatusEnum.COLLECT.getStatus())); |
|
|
|
if (count > 0l) { |
|
|
|
if (count > 0L) { |
|
|
|
log.error("不能同时开启两个巡检任务"); |
|
|
|
log.error("不能同时开启两个巡检任务"); |
|
|
|
throw new ServiceException("不能同时开启两个巡检任务"); |
|
|
|
throw new ServiceException("不能同时开启两个巡检任务"); |
|
|
|
} |
|
|
|
} |
|
|
|