任务管理相关接口

main
judy 1 year ago
parent 4e3eb55bfc
commit d6102be36d
  1. 27
      shkj-wms/src/main/java/com/shkj/wms/controller/business/BusinBillOutController.java
  2. 34
      shkj-wms/src/main/java/com/shkj/wms/controller/business/BusinDataTaskController.java
  3. 10
      shkj-wms/src/main/java/com/shkj/wms/service/IBusinDataTaskService.java
  4. 61
      shkj-wms/src/main/java/com/shkj/wms/service/impl/BusinDataTaskServiceImpl.java

@ -55,21 +55,6 @@ public class BusinBillOutController extends BaseController {
}
/**
* 指定货位出库
* @param locationCode
* @return
*/
@Log(title = "指定货位出库",businessType = BusinessType.UPDATE)
@PostMapping("/namedLoctionOutput")
@RepeatSubmit
public Result<Boolean> namedLoctionOutput(@Valid @RequestParam String locationCode){
return businDataTaskService.insertBusinTask(locationCode);
}
@Log(title = "紧急出库确认出库-方式2",businessType = BusinessType.UPDATE)
@PostMapping("/saveBillHeadBodyOutByDervie")
@RepeatSubmit
@ -97,4 +82,16 @@ public class BusinBillOutController extends BaseController {
}
/**
* 指定货位出库
* @param locationCode
* @return
*/
@Log(title = "指定货位出库",businessType = BusinessType.UPDATE)
@PostMapping("/namedLoctionOutput")
@RepeatSubmit
public Result<Boolean> namedLoctionOutput(@Valid @RequestParam String locationCode){
return businDataTaskService.insertBusinTask(locationCode);
}
}

@ -69,6 +69,40 @@ public class BusinDataTaskController extends BaseController {
return businDataTaskService.instantlyTask(bo);
}
/**
* 任务管理--优先
* @param bo
* @return
*/
@PostMapping("/elevatePriorityTask")
@RepeatSubmit
public Result<Boolean> elevatePriorityTask(BusinTaskManageDistributeBo bo){
return businDataTaskService.elevatePriorityTask(bo);
}
/**
* 任务管理--暂停
* @param bo
* @return
*/
@PostMapping("/pauseTask")
@RepeatSubmit
public Result<Boolean> pauseTask(BusinTaskManageDistributeBo bo){
return businDataTaskService.pauseTask(bo);
}
/**
* 任务管理--启用
* @param bo
* @return
*/
@PostMapping("/activeTask")
@RepeatSubmit
public Result<Boolean> activeTask(BusinTaskManageDistributeBo bo){
return businDataTaskService.pauseTask(bo);
}
/**
* 紧急出库到达接驳点时物料明细

@ -111,6 +111,16 @@ public interface IBusinDataTaskService extends IService<BusinDataTask> {
*/
Result<Boolean> instantlyTask(BusinTaskManageDistributeBo bo);
/**
* 提升优先级
* @param bo
* @return
*/
Result<Boolean> elevatePriorityTask(BusinTaskManageDistributeBo bo);
Result<Boolean> pauseTask(BusinTaskManageDistributeBo bo);
Result<Boolean> activeTask(BusinTaskManageDistributeBo bo);
List<BusinDataTask> queryinTask();
/**

@ -560,7 +560,7 @@ public class BusinDataTaskServiceImpl extends ServiceImpl<BusinDataTaskMapper, B
iBaseLocationService.updateById(baseLocation);
//需要搬运到的码头信息
String taskPath ="KW30";
String taskPath ="KW1、KW2";
//生成作业任务
int index=0;
@ -1303,6 +1303,10 @@ public class BusinDataTaskServiceImpl extends ServiceImpl<BusinDataTaskMapper, B
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("3");
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();
}
/**
* 提升任务的优先级
* @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
public List<BusinDataTask> queryinTask() {
return this.baseMapper.queryinTask();

Loading…
Cancel
Save