人工入库没有选中推荐库位,清除一个库位的占用状态
parent
bed5562bbc
commit
5dcfc0c7b5
|
|
@ -420,9 +420,32 @@ public class TaskServiceImpl implements TaskService {
|
||||||
// 生成库存
|
// 生成库存
|
||||||
List<Map<String,Object>> taskMapList=taskRepository.findByAgvTask(null,billTypeCode,0l);
|
List<Map<String,Object>> taskMapList=taskRepository.findByAgvTask(null,billTypeCode,0l);
|
||||||
Inventory inventory = inventoryService.asnAddInventory(taskMapList);
|
Inventory inventory = inventoryService.asnAddInventory(taskMapList);
|
||||||
// 更新当前点位 存储容器状态
|
// 更新当前点位 存储容器状态 ###
|
||||||
point.setStorageType(inventory.getItemKey().getItem().getGoodType());
|
point.setStorageType(inventory.getItemKey().getItem().getGoodType());
|
||||||
|
if (point.getStatus().equals(BaseStatus.USED)){
|
||||||
point.setStatus(BaseStatus.FREE);
|
point.setStatus(BaseStatus.FREE);
|
||||||
|
}else {
|
||||||
|
// 人工入库没有选中推荐库位,清除一个库位的占用状态
|
||||||
|
List<Point> pointList=pointRepository.findByAreaCodeCp(inventory.getItemKey().getItem().getGoodType(),BaseStatus.USED);
|
||||||
|
for (int i = 0; i < pointList.size(); i++) {
|
||||||
|
Point pointUsed =pointList.get(0);
|
||||||
|
if (point.getHeat()==null||point.getHeat()==1){
|
||||||
|
//浅位 直接取消
|
||||||
|
pointUsed.setStatus(BaseStatus.FREE);
|
||||||
|
}else {
|
||||||
|
// 深位,查询浅位是否空闲
|
||||||
|
List<Point> pointListQ=pointRepository.findByBeatCode(point.getBeatCode(),point.getHeat());
|
||||||
|
if (pointListQ.size()>0){
|
||||||
|
// 浅位空闲
|
||||||
|
continue;
|
||||||
|
}else {
|
||||||
|
pointUsed.setStatus(BaseStatus.FREE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pointRepository.save(pointUsed);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
pointRepository.save(point);
|
pointRepository.save(point);
|
||||||
return ApiResult.result(200, "操作成功", "");
|
return ApiResult.result(200, "操作成功", "");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue