|
@@ -268,6 +268,12 @@ public class InvLotLocIdServiceImpl implements IInvLotLocIdService {
|
|
|
baseLocationFrom = baseLocationInfoService.selectBaseLocationInfoByIdOrNo(locationFrom, warehouseId);
|
|
|
baseLocationTo = baseLocationInfoService.selectBaseLocationInfoByIdOrNo(locationTo, warehouseId);
|
|
|
|
|
|
+ // 验证起始库位必须有货
|
|
|
+ List<InvLotLocIdLotattVO> invLotLocIdLotattVOList = invLotLocIdService.selectInvLocIdLotattByLocationId(baseLocationFrom.getId());
|
|
|
+ if (invLotLocIdLotattVOList.size() == 0) {
|
|
|
+ return AjaxResult.error("起始库位需要有库存!");
|
|
|
+ }
|
|
|
+
|
|
|
// 转移库存
|
|
|
int stockTransfer = invLotLocIdService.stockTransfer(baseLocationFrom.getId(), invLotLocIdMoveForm.getPalletNo(), baseLocationTo.getId());
|
|
|
if (stockTransfer <= 0) {
|
|
@@ -278,8 +284,6 @@ public class InvLotLocIdServiceImpl implements IInvLotLocIdService {
|
|
|
// 更新目标库位空闲有货
|
|
|
baseLocationInfoService.updateLocationIdleAndNoEmpty(baseLocationTo.getId(), warehouseId, updateBy);
|
|
|
|
|
|
- // todo 事务
|
|
|
-
|
|
|
return AjaxResult.success("操作成功!");
|
|
|
}
|
|
|
|