|
|
|
@ -560,7 +560,7 @@ public class BusinDataTaskServiceImpl extends ServiceImpl<BusinDataTaskMapper, B |
|
|
|
iBaseLocationService.updateById(baseLocation); |
|
|
|
iBaseLocationService.updateById(baseLocation); |
|
|
|
|
|
|
|
|
|
|
|
//需要搬运到的码头信息
|
|
|
|
//需要搬运到的码头信息
|
|
|
|
String taskPath ="KW30"; |
|
|
|
String taskPath ="KW1、KW2"; |
|
|
|
|
|
|
|
|
|
|
|
//生成作业任务
|
|
|
|
//生成作业任务
|
|
|
|
int index=0; |
|
|
|
int index=0; |
|
|
|
@ -1303,6 +1303,10 @@ public class BusinDataTaskServiceImpl extends ServiceImpl<BusinDataTaskMapper, B |
|
|
|
LambdaQueryWrapper<BusinDataTask> wrapper = new LambdaQueryWrapper<BusinDataTask>() |
|
|
|
LambdaQueryWrapper<BusinDataTask> wrapper = new LambdaQueryWrapper<BusinDataTask>() |
|
|
|
.eq(BusinDataTask::getId, bo.getTaskId()).last("limit 1"); |
|
|
|
.eq(BusinDataTask::getId, bo.getTaskId()).last("limit 1"); |
|
|
|
BusinDataTask businDataTask = getOne(wrapper); |
|
|
|
BusinDataTask businDataTask = getOne(wrapper); |
|
|
|
|
|
|
|
if(!businDataTask.getTaskStatus().equals("0")){ |
|
|
|
|
|
|
|
return Result.err().msg("此任务不可取消"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
businDataTask.setTaskStatus("3"); |
|
|
|
businDataTask.setTaskStatus("3"); |
|
|
|
return this.updateById(businDataTask)?Result.ok():Result.err(); |
|
|
|
return this.updateById(businDataTask)?Result.ok():Result.err(); |
|
|
|
|
|
|
|
|
|
|
|
@ -1334,6 +1338,61 @@ public class BusinDataTaskServiceImpl extends ServiceImpl<BusinDataTaskMapper, B |
|
|
|
return this.updateById(businDataTask)?Result.ok():Result.err(); |
|
|
|
return this.updateById(businDataTask)?Result.ok():Result.err(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 提升任务的优先级 |
|
|
|
|
|
|
|
* @param bo |
|
|
|
|
|
|
|
* @return |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public Result<Boolean> elevatePriorityTask(BusinTaskManageDistributeBo bo){ |
|
|
|
|
|
|
|
LambdaQueryWrapper<BusinDataTask> wrapper = new LambdaQueryWrapper<BusinDataTask>() |
|
|
|
|
|
|
|
.eq(BusinDataTask::getId, bo.getTaskId()).last("limit 1"); |
|
|
|
|
|
|
|
BusinDataTask businDataTask = getOne(wrapper); |
|
|
|
|
|
|
|
if(!businDataTask.getTaskStatus().equals("0")){ |
|
|
|
|
|
|
|
return Result.err().msg("此任务不可提升优先级"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//提升优先级
|
|
|
|
|
|
|
|
businDataTask.setPriority("1"); |
|
|
|
|
|
|
|
return this.updateById(businDataTask)?Result.ok():Result.err(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 暂停任务 |
|
|
|
|
|
|
|
* @param bo |
|
|
|
|
|
|
|
* @return |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public Result<Boolean> pauseTask(BusinTaskManageDistributeBo bo){ |
|
|
|
|
|
|
|
LambdaQueryWrapper<BusinDataTask> wrapper = new LambdaQueryWrapper<BusinDataTask>() |
|
|
|
|
|
|
|
.eq(BusinDataTask::getId, bo.getTaskId()).last("limit 1"); |
|
|
|
|
|
|
|
BusinDataTask businDataTask = getOne(wrapper); |
|
|
|
|
|
|
|
if(!businDataTask.getTaskStatus().equals("0")){ |
|
|
|
|
|
|
|
return Result.err().msg("此任务不可暂停"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//任务暂停
|
|
|
|
|
|
|
|
businDataTask.setTaskStatus("4"); |
|
|
|
|
|
|
|
return this.updateById(businDataTask)?Result.ok():Result.err(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 任务启用 |
|
|
|
|
|
|
|
* @param bo |
|
|
|
|
|
|
|
* @return |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public Result<Boolean> activeTask(BusinTaskManageDistributeBo bo){ |
|
|
|
|
|
|
|
LambdaQueryWrapper<BusinDataTask> wrapper = new LambdaQueryWrapper<BusinDataTask>() |
|
|
|
|
|
|
|
.eq(BusinDataTask::getId, bo.getTaskId()).last("limit 1"); |
|
|
|
|
|
|
|
BusinDataTask businDataTask = getOne(wrapper); |
|
|
|
|
|
|
|
if(!businDataTask.getTaskStatus().equals("4")){ |
|
|
|
|
|
|
|
return Result.err().msg("此任务不可启用"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//任务暂停
|
|
|
|
|
|
|
|
businDataTask.setTaskStatus("0"); |
|
|
|
|
|
|
|
return this.updateById(businDataTask)?Result.ok():Result.err(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public List<BusinDataTask> queryinTask() { |
|
|
|
public List<BusinDataTask> queryinTask() { |
|
|
|
return this.baseMapper.queryinTask(); |
|
|
|
return this.baseMapper.queryinTask(); |
|
|
|
|