出库-分配库存占用库位,取消分配释放库位
parent
2ebd0f95f4
commit
4c9347d787
|
|
@ -196,6 +196,9 @@ public class PickDetailServiceImpl implements PickDetailService {
|
||||||
inv.setQueuedQty(allocateQty);
|
inv.setQueuedQty(allocateQty);
|
||||||
inventoryRepository.save(inv);
|
inventoryRepository.save(inv);
|
||||||
unQty = unQty-allocateQty;
|
unQty = unQty-allocateQty;
|
||||||
|
//占用点位
|
||||||
|
startPoint.setStatus(BaseStatus.USED);
|
||||||
|
pointRepository.save(startPoint);
|
||||||
//更新出库单
|
//更新出库单
|
||||||
pickDetail.setAllocatedQty(pickDetail.getAllocatedQty() + allocateQty);
|
pickDetail.setAllocatedQty(pickDetail.getAllocatedQty() + allocateQty);
|
||||||
pickDetail.setStatus(BizStatus.ALLOCATE);
|
pickDetail.setStatus(BizStatus.ALLOCATE);
|
||||||
|
|
@ -374,10 +377,14 @@ public class PickDetailServiceImpl implements PickDetailService {
|
||||||
PickDetail pd = toEntity(pickDetailDto);
|
PickDetail pd = toEntity(pickDetailDto);
|
||||||
List<Task> Tasks = taskRepository.getPickNotAllTask(id);
|
List<Task> Tasks = taskRepository.getPickNotAllTask(id);
|
||||||
for (Task task : Tasks) {
|
for (Task task : Tasks) {
|
||||||
//根据Taskz找到对应的库存
|
//根据Task找到对应的库存
|
||||||
Inventory inv = inventoryRepository.findById(task.getInventory().getId()).get();
|
Inventory inv = inventoryRepository.findById(task.getInventory().getId()).get();
|
||||||
inv.setQueuedQty(inv.getQueuedQty() - task.getPlanQty());
|
inv.setQueuedQty(inv.getQueuedQty() - task.getPlanQty());
|
||||||
inventoryRepository.save(inv);
|
inventoryRepository.save(inv);
|
||||||
|
// 更新库位状态
|
||||||
|
Point point=inv.getPoint();
|
||||||
|
point.setStatus(BaseStatus.USED);
|
||||||
|
pointRepository.save(point);
|
||||||
//删除AgvTask任务
|
//删除AgvTask任务
|
||||||
if (task.getAgvTask()!=null){
|
if (task.getAgvTask()!=null){
|
||||||
AgvTask agvTask=task.getAgvTask();
|
AgvTask agvTask=task.getAgvTask();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue