|
|
|
@ -1191,6 +1191,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
|
|
|
|
|
@Override |
|
|
|
|
public R downPackage(List<UpShelfPackageDTO> upShelfPackageList,Long warehouseId) { |
|
|
|
|
int num = 0; |
|
|
|
|
Set<String> orderSet = new TreeSet<>(); |
|
|
|
|
for (UpShelfPackageDTO upShelfPackageDTO:upShelfPackageList){ |
|
|
|
|
String orderPackageCode = upShelfPackageDTO.getOrderPackageCode(); |
|
|
|
|
//查询包件在哪个库位上
|
|
|
|
@ -1206,6 +1207,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
|
|
|
|
|
Long allocationId = updownGoodsEntity.getAllocationId(); |
|
|
|
|
DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(orderPackageCode,warehouseId); |
|
|
|
|
Integer quantity = parcelListEntity.getQuantity(); |
|
|
|
|
String orderCode = parcelListEntity.getOrderCode(); |
|
|
|
|
Long updownGoodsId = updownGoodsEntity.getId(); |
|
|
|
|
Long updownTypeId = updownGoodsEntity.getUpdownTypeId(); |
|
|
|
|
WarehouseUpdownTypeEntity updownTypeEntity = baseMapper.selectById(updownTypeId); |
|
|
|
@ -1232,10 +1234,16 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
|
|
|
|
|
warehouseUpdownGoodsLogService.saveAllocationAndPackage(updownTypeEntity,parcelListEntity,"2",0,"包件下架:包件下架"); |
|
|
|
|
updatePackageGroundingStatus(orderPackageCode,"10",warehouseId); |
|
|
|
|
updateUpdownTypeNum(updownTypeEntity); |
|
|
|
|
|
|
|
|
|
orderSet.add(orderCode); |
|
|
|
|
num = num + quantity; |
|
|
|
|
warehouseGoodsAllocationClient.updateAllocationCache(allocationId.toString()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
for (String orderCode : orderSet) { |
|
|
|
|
distributionStockArticleClient.updateOrderInfo(orderCode,warehouseId); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return Resp.scanSuccess("下架成功","成功下架"+num+"件"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1243,6 +1251,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
|
|
|
|
|
@Override |
|
|
|
|
public R downPackageOrDelTray(List<UpShelfPackageDTO> upShelfPackageList,Long warehouseId) { |
|
|
|
|
int num = 0; |
|
|
|
|
Set<String> orderSet = new TreeSet<>(); |
|
|
|
|
for (UpShelfPackageDTO upShelfPackageDTO:upShelfPackageList){ |
|
|
|
|
String orderPackageCode = upShelfPackageDTO.getOrderPackageCode(); |
|
|
|
|
//查询包件在哪个库位上
|
|
|
|
@ -1268,6 +1277,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
|
|
|
|
|
Long allocationId = updownGoodsEntity.getAllocationId(); |
|
|
|
|
DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(orderPackageCode,warehouseId); |
|
|
|
|
Integer quantity = parcelListEntity.getQuantity(); |
|
|
|
|
String orderCode = parcelListEntity.getOrderCode(); |
|
|
|
|
Long updownGoodsId = updownGoodsEntity.getId(); |
|
|
|
|
Long updownTypeId = updownGoodsEntity.getUpdownTypeId(); |
|
|
|
|
WarehouseUpdownTypeEntity updownTypeEntity = baseMapper.selectById(updownTypeId); |
|
|
|
@ -1295,9 +1305,15 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
|
|
|
|
|
updatePackageGroundingStatus(orderPackageCode,"10",warehouseId); |
|
|
|
|
updateUpdownTypeNum(updownTypeEntity); |
|
|
|
|
|
|
|
|
|
orderSet.add(orderCode); |
|
|
|
|
num = num + quantity; |
|
|
|
|
warehouseGoodsAllocationClient.updateAllocationCache(allocationId.toString()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
for (String orderCode : orderSet) { |
|
|
|
|
distributionStockArticleClient.updateOrderInfo(orderCode,warehouseId); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return Resp.scanSuccess("下架成功","成功下架"+num+"件"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1533,6 +1549,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
|
|
|
|
|
//上架方式删除
|
|
|
|
|
removeById(updownTypeEntity.getId()); |
|
|
|
|
//修改状态
|
|
|
|
|
Set<String> setOrder = new TreeSet<>(); |
|
|
|
|
for (WarehouseUpdownGoodsEntity updownGoodsEntity:updownGoodsList){ |
|
|
|
|
String associationType = updownGoodsEntity.getAssociationType(); |
|
|
|
|
String associationValue = updownGoodsEntity.getAssociationValue(); |
|
|
|
@ -1540,11 +1557,17 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
|
|
|
|
|
if("1".equals(associationType)){ |
|
|
|
|
updateZeroOrderGroundingStatus(associationValue,warehouseId); |
|
|
|
|
}else if("3".equals(associationType)){ |
|
|
|
|
DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(associationValue, warehouseId); |
|
|
|
|
updatePackageGroundingStatus(associationValue,"10",warehouseId); |
|
|
|
|
setOrder.add(parcelListEntity.getOrderCode()); |
|
|
|
|
} |
|
|
|
|
allNum = allNum+num; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
for (String orderCode : setOrder) { |
|
|
|
|
distributionStockArticleClient.updateOrderInfo(orderCode,warehouseId); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//修改库位状态
|
|
|
|
|
basicdataGoodsAllocationClient.updateAllocationStatus(allocationId,"1"); |
|
|
|
|
|
|
|
|
|