|
@@ -52,10 +52,10 @@ public class OrderServiceImpl extends BaseServiceImpl implements OrderService {
|
|
|
//校验 物料编码是否存在
|
|
|
verifyMaterialCode(orders);
|
|
|
|
|
|
- //入库单 save
|
|
|
+ //入库单 save update 原来托盘为 未使用 update 现在托盘 预占用
|
|
|
int orderId = saveOrder(orders);
|
|
|
|
|
|
- //获取目标库位
|
|
|
+ //获取目标库位 修改大小库位 预占用
|
|
|
getEndPosition(orders);
|
|
|
|
|
|
//入库任务 save
|
|
@@ -89,8 +89,10 @@ public class OrderServiceImpl extends BaseServiceImpl implements OrderService {
|
|
|
orders.setEndPosition(policyResult.getLocationCode());
|
|
|
|
|
|
|
|
|
- //设置为预占用
|
|
|
+ //设置库位为预占用
|
|
|
updateStorageStatus(Status.PRE_RESERVED.getCode(),orders.getEndPosition());
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|
|
@@ -174,6 +176,16 @@ public class OrderServiceImpl extends BaseServiceImpl implements OrderService {
|
|
|
orders.setInOutCode(generateSerial.generateSerialNumber("inCode"));
|
|
|
ordersDao.insert(orders);
|
|
|
}else{
|
|
|
+ LambdaQueryWrapper<WInventoryTransactionOrders> queryWrapper = new LambdaQueryWrapper<>(WInventoryTransactionOrders.class).eq(WInventoryTransactionOrders::getId,orders.getId());
|
|
|
+
|
|
|
+ WInventoryTransactionOrders wInventoryTransactionOrders = ordersDao.selectOne(queryWrapper);
|
|
|
+
|
|
|
+ //修改原来的托盘状态
|
|
|
+ UpdateWrapper<WPalletManagement> updateWrapper=new UpdateWrapper<>();
|
|
|
+ updateWrapper.eq("pallet_code",wInventoryTransactionOrders.getVectorCode()).set("status",Status.UNUSED.getCode());
|
|
|
+ wPalletManagementDao.update(null,updateWrapper);
|
|
|
+
|
|
|
+
|
|
|
ordersDao.updateById(orders);
|
|
|
|
|
|
QueryWrapper<WInventoryTransactionOrdersDetail> delete = new QueryWrapper<>();
|
|
@@ -186,6 +198,12 @@ public class OrderServiceImpl extends BaseServiceImpl implements OrderService {
|
|
|
|
|
|
ordersDetailDao.insert(vo);
|
|
|
});
|
|
|
+
|
|
|
+ //设置 托盘 为预占用
|
|
|
+ UpdateWrapper<WPalletManagement> updateWrapper=new UpdateWrapper<>();
|
|
|
+ updateWrapper.eq("pallet_code",orders.getVectorCode()).set("status",Status.PRE_RESERVED.getCode());
|
|
|
+ wPalletManagementDao.update(null,updateWrapper);
|
|
|
+
|
|
|
return orders.getId().intValue();
|
|
|
}
|
|
|
|