|
|
|
|
@ -1311,11 +1311,13 @@ 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") && !businDataTask.getTaskStatus().equals("1")) { |
|
|
|
|
String taskStatus = businDataTask.getTaskStatus(); |
|
|
|
|
if (!taskStatus.equals("0") && !taskStatus.equals("1")) { |
|
|
|
|
return Result.err().msg("此任务不可取消"); |
|
|
|
|
} |
|
|
|
|
businDataTask.setTaskStatus("3"); |
|
|
|
|
|
|
|
|
|
Long locationId = businDataTask.getLocationId(); |
|
|
|
|
BaseLocation baseLocation = iBaseLocationService.getById(locationId); |
|
|
|
|
//入库时需要释放货位状态
|
|
|
|
|
String taskType = businDataTask.getTaskType(); |
|
|
|
|
if (taskType.equals(TaskTypeEnum.byhand_in.getValue()) |
|
|
|
|
@ -1323,13 +1325,29 @@ public class BusinDataTaskServiceImpl extends ServiceImpl<BusinDataTaskMapper, B |
|
|
|
|
||taskType.equals(TaskTypeEnum.empty_in.getValue()) |
|
|
|
|
|| taskType.equals(TaskTypeEnum.emptyCon.getValue()) |
|
|
|
|
){ |
|
|
|
|
Long locationId = businDataTask.getLocationId(); |
|
|
|
|
BaseLocation baseLocation = iBaseLocationService.getById(locationId); |
|
|
|
|
|
|
|
|
|
if (baseLocation != null){ |
|
|
|
|
baseLocation.setLocationStatus("0"); |
|
|
|
|
iBaseLocationService.updateById(baseLocation); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (taskStatus.equals("0")){ |
|
|
|
|
if(taskType.equals(TaskTypeEnum.normal_out.getValue()) |
|
|
|
|
|| taskType.equals(TaskTypeEnum.urgent_out.getValue()) |
|
|
|
|
){ |
|
|
|
|
baseLocation.setLocationStatus("1"); |
|
|
|
|
} |
|
|
|
|
//空治具出库时,取消时改状态为2
|
|
|
|
|
if (taskType.equals(TaskTypeEnum.emptyContainer_out.getValue())){ |
|
|
|
|
baseLocation.setLocationStatus("2"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
if (baseLocation != null){ |
|
|
|
|
iBaseLocationService.updateById(baseLocation); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return this.updateById(businDataTask) ? Result.ok() : Result.err(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1373,11 +1391,11 @@ 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")) { |
|
|
|
|
if (!"0".equals(businDataTask.getTaskStatus())) { |
|
|
|
|
return Result.err().msg("此任务不可提升优先级"); |
|
|
|
|
} |
|
|
|
|
//提升优先级
|
|
|
|
|
businDataTask.setPriority("1"); |
|
|
|
|
businDataTask.setIsTop("1"); |
|
|
|
|
return this.updateById(businDataTask) ? Result.ok() : Result.err(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -1983,6 +2001,13 @@ public class BusinDataTaskServiceImpl extends ServiceImpl<BusinDataTaskMapper, B |
|
|
|
|
String layer = inBaseLocation.getLayer(); |
|
|
|
|
String locationRow = inBaseLocation.getLocationRow(); |
|
|
|
|
String tunnel = inBaseLocation.getTunnel(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
booleanResult = checkIsSleep(inBaseLocation); |
|
|
|
|
if (!Result.isOk(booleanResult)){ |
|
|
|
|
return booleanResult; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if ("2".equals(locationRow) && "3".equals(locationRow) && "14".equals(locationRow)){ |
|
|
|
|
//获取双深位的货位信息
|
|
|
|
|
if (locationRow.equals("2")){ |
|
|
|
|
@ -2188,7 +2213,7 @@ public class BusinDataTaskServiceImpl extends ServiceImpl<BusinDataTaskMapper, B |
|
|
|
|
if (Result.isOk(stockListResult)) { |
|
|
|
|
sysStockDetailVoList = stockListResult.getData(); |
|
|
|
|
if (sysStockDetailVoList != null && sysStockDetailVoList.size() != 0) { |
|
|
|
|
return Result.err().msg("指定出库货位是双深位,单深位有货,不可出库" + baseLocationVo.getLocationCode()); |
|
|
|
|
return Result.err().msg("出入库货位是双深位,单深位有货,不可出入库" + baseLocationVo.getLocationCode()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|