|
|
|
@ -384,14 +384,14 @@ public class DistributionStockupAppController extends BladeController {
|
|
|
|
|
return R.fail(3002, "备货库存品ID不能为空"); |
|
|
|
|
} |
|
|
|
|
List<DistributionStockupTrayVO> list = distributionStockupService.getLocationSelection(stockupDTO); |
|
|
|
|
if(!list.isEmpty()){ |
|
|
|
|
if(!list.isEmpty() && ObjectUtils.isNotNull(list.get(0))){ |
|
|
|
|
return R.data(list); |
|
|
|
|
} |
|
|
|
|
List<DistributionStockupTrayVO> listMarket = distributionStockupService.getLocationMarketSelection(stockupDTO); |
|
|
|
|
if(!listMarket.isEmpty()){ |
|
|
|
|
if(!listMarket.isEmpty() && ObjectUtils.isNotNull(listMarket.size())){ |
|
|
|
|
return R.data(listMarket); |
|
|
|
|
} |
|
|
|
|
return R.data(null); |
|
|
|
|
return R.fail(3002,"当前物料未上架,请上架后在继续备货操作!!!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -594,7 +594,17 @@ public class DistributionStockupAppController extends BladeController {
|
|
|
|
|
log.warn("##################allocationId: 货位ID为空!"); |
|
|
|
|
return R.fail("货位ID不能为空"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//判断是否可以继续备货
|
|
|
|
|
DistributionStockListEntity byId = iDistributionStockListService.getById(stockListId); |
|
|
|
|
WarehouseUpdownGoodsEntity warehouseUpdownGoodsEntity = new WarehouseUpdownGoodsEntity(); |
|
|
|
|
warehouseUpdownGoodsEntity.setAllocationId(stockupDTO.getAllocationId()); |
|
|
|
|
warehouseUpdownGoodsEntity.setIncomingBatch(byId.getIncomingBatch()); |
|
|
|
|
warehouseUpdownGoodsEntity.setMarketId(byId.getMarketId()); |
|
|
|
|
warehouseUpdownGoodsEntity.setAssociationType("4"); |
|
|
|
|
WarehouseUpdownGoodsEntity locationInformation = warehouseUpdownGoodsClient.getLocationStockListInformation(warehouseUpdownGoodsEntity); |
|
|
|
|
if(ObjectUtils.isNull(locationInformation)){ |
|
|
|
|
return Resp.scanFail("当前货位的本物料已为0,请更换货位继续!!", "当前货位的本物料已为0,请更换货位继续!!"); |
|
|
|
|
} |
|
|
|
|
Integer i = distributionStockupService.selectPackagePrint(stockupDTO); |
|
|
|
|
switch (i) { |
|
|
|
|
case 1: |
|
|
|
@ -617,16 +627,16 @@ public class DistributionStockupAppController extends BladeController {
|
|
|
|
|
entity.setReservationId(reservationId); |
|
|
|
|
entity.setStockListId(stockListId); |
|
|
|
|
//添加物料信息
|
|
|
|
|
DistributionStockListEntity byId = iDistributionStockListService.getById(stockListId); |
|
|
|
|
// DistributionStockListEntity byId = iDistributionStockListService.getById(stockListId);
|
|
|
|
|
if(ObjectUtils.isNotNull(byId.getMarketId())){ |
|
|
|
|
entity.setMarketId(byId.getMarketId()); |
|
|
|
|
entity.setMaterialId(byId.getMaterialId()); |
|
|
|
|
WarehouseUpdownGoodsEntity warehouseUpdownGoodsEntity = new WarehouseUpdownGoodsEntity(); |
|
|
|
|
warehouseUpdownGoodsEntity.setAllocationId(stockupDTO.getAllocationId()); |
|
|
|
|
warehouseUpdownGoodsEntity.setIncomingBatch(byId.getIncomingBatch()); |
|
|
|
|
warehouseUpdownGoodsEntity.setMarketId(byId.getMarketId()); |
|
|
|
|
warehouseUpdownGoodsEntity.setAssociationType("4"); |
|
|
|
|
WarehouseUpdownGoodsEntity locationInformation = warehouseUpdownGoodsClient.getLocationStockListInformation(warehouseUpdownGoodsEntity); |
|
|
|
|
// WarehouseUpdownGoodsEntity warehouseUpdownGoodsEntity = new WarehouseUpdownGoodsEntity();
|
|
|
|
|
// warehouseUpdownGoodsEntity.setAllocationId(stockupDTO.getAllocationId());
|
|
|
|
|
// warehouseUpdownGoodsEntity.setIncomingBatch(byId.getIncomingBatch());
|
|
|
|
|
// warehouseUpdownGoodsEntity.setMarketId(byId.getMarketId());
|
|
|
|
|
// warehouseUpdownGoodsEntity.setAssociationType("4");
|
|
|
|
|
// WarehouseUpdownGoodsEntity locationInformation = warehouseUpdownGoodsClient.getLocationStockListInformation(warehouseUpdownGoodsEntity);
|
|
|
|
|
if(!ObjectUtils.isNull(locationInformation)){ |
|
|
|
|
entity.setAllocationTitle(locationInformation.getPositionCode()); |
|
|
|
|
entity.setAllocationId(stockupDTO.getAllocationId()); |
|
|
|
@ -645,7 +655,7 @@ public class DistributionStockupAppController extends BladeController {
|
|
|
|
|
return R.fail(3002,"本货位的物料已为0,请更换货位继续!!"); |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
return R.fail(3002,"物料信息查询失败,请联系TJJ!!"); |
|
|
|
|
return Resp.scanFail("物料信息查询失败,请联系TJJ!!", "物料信息查询失败,请联系TJJ!!"); |
|
|
|
|
} |
|
|
|
|
entity.setConditions("0"); |
|
|
|
|
entity.setType(2); |
|
|
|
|