|
|
|
@ -886,9 +886,9 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
|
|
|
|
|
findParamterDTO.setWarehouseId(warehouseId); |
|
|
|
|
List<DistributionParcelListEntity> parcelListList = distributionParcelListClient.findALLNoUpShelfPackageByOrderCodeList(findParamterDTO); |
|
|
|
|
|
|
|
|
|
if(parcelListList.isEmpty()){ |
|
|
|
|
if (parcelListList.isEmpty()) { |
|
|
|
|
log.warn("############upShelfOrder: 没有可上架的包件"); |
|
|
|
|
return R.fail(405,"没有可上架的包件"); |
|
|
|
|
return R.fail(405, "没有可上架的包件"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
List<UpShelfPackageDTO> upShelfPackageList = new ArrayList<>(); |
|
|
|
@ -974,10 +974,10 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
|
|
|
|
|
QueryWrapper<WarehouseTrayGoodsEntity> trayGoodsQueryWrapper = new QueryWrapper<>(); |
|
|
|
|
trayGoodsQueryWrapper.in("association_value", orderPackageCodeList); |
|
|
|
|
List<WarehouseTrayGoodsEntity> trayGoodsEntityList = warehouseTrayGoodsService.list(trayGoodsQueryWrapper); |
|
|
|
|
if(!trayGoodsEntityList.isEmpty()){ |
|
|
|
|
if (!trayGoodsEntityList.isEmpty()) { |
|
|
|
|
//把trayGoodsEntityList中的association_value提取出来存入一个List<String>
|
|
|
|
|
List<String> orderPackageCodes = trayGoodsEntityList.stream().map(WarehouseTrayGoodsEntity::getAssociationValue).collect(Collectors.toList()); |
|
|
|
|
warehouseTrayTypeService.downPackageByOrderPackageCodeList(orderPackageCodes,"同步处理:包件解托",warehouseId); |
|
|
|
|
warehouseTrayTypeService.downPackageByOrderPackageCodeList(orderPackageCodes, "同步处理:包件解托", warehouseId); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
FindParamterDTO findParamterDTO = new FindParamterDTO(); |
|
|
|
@ -1474,7 +1474,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
|
|
|
|
|
WarehouseTaryAllocationEntity taryAllocationEntity = warehouseTaryAllocationService.getOne(taryAllocationEntityQueryWrapper); |
|
|
|
|
List<WarehouseUpdownGoodsEntity> updownGoodsEntities1 = map.get(allocationId); |
|
|
|
|
List<String> orderPackageCodes = updownGoodsEntities1.stream().map(WarehouseUpdownGoodsEntity::getAssociationValue).collect(Collectors.toList()); |
|
|
|
|
if(!Objects.isNull(taryAllocationEntity)){ |
|
|
|
|
if (!Objects.isNull(taryAllocationEntity)) { |
|
|
|
|
warehouseTrayTypeService.downPackageByOrderPackageCodeList(orderPackageCodes, remark, warehouseId); |
|
|
|
|
} |
|
|
|
|
WarehouseUpdownTypeEntity updownTypeEntity = updownTypeMap.get(allocationId); |
|
|
|
@ -1494,14 +1494,14 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
|
|
|
|
|
deleteTrayAllocationList.add(taryAllocationEntity); |
|
|
|
|
// warehouseTaryAllocationService.deleteById(taryAllocationEntity);
|
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
} else { |
|
|
|
|
updateUpdownTypeList.add(updownTypeEntity); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
List<DistributionParcelListEntity> parcelListEntities = new ArrayList<>(); |
|
|
|
|
orderPackageCodes.forEach(orderPackageCode -> { |
|
|
|
|
DistributionParcelListEntity parcelListEntity = parcelListEntityMap.get(orderPackageCode); |
|
|
|
|
if(!Objects.isNull(parcelListEntity)){ |
|
|
|
|
if (!Objects.isNull(parcelListEntity)) { |
|
|
|
|
parcelListEntities.add(parcelListEntity); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
@ -1540,8 +1540,12 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
removeByIds(toNullUpdownTypeIds); |
|
|
|
|
basicdataGoodsAllocationClient.updateListAllocationStatus(updateAllocationIds,"1"); |
|
|
|
|
warehouseTaryAllocationService.removeBatchByIds(deleteTrayAllocationList); |
|
|
|
|
if (!updateAllocationIds.isEmpty()) { |
|
|
|
|
basicdataGoodsAllocationClient.updateListAllocationStatus(updateAllocationIds, "1"); |
|
|
|
|
} |
|
|
|
|
if (!deleteTrayAllocationList.isEmpty()) { |
|
|
|
|
warehouseTaryAllocationService.removeBatchByIds(deleteTrayAllocationList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
updateUpdownTypeList.forEach(this::updateUpdownTypeNum); |
|
|
|
|
|
|
|
|
@ -1727,14 +1731,14 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
|
|
|
|
|
//有托盘,托盘下托
|
|
|
|
|
warehouseTrayTypeService.downPackageByOrderPackageCode(orderPackageCode, remark, warehouseId); |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
} else { |
|
|
|
|
// 托盘存在上架
|
|
|
|
|
DistributionParcelListEntity parcelListEntity =parcelListEntitys.stream() |
|
|
|
|
DistributionParcelListEntity parcelListEntity = parcelListEntitys.stream() |
|
|
|
|
.filter(t -> t.getOrderPackageCode().equals(orderPackageCode)) |
|
|
|
|
.findFirst() |
|
|
|
|
.orElse(null); |
|
|
|
|
if(parcelListEntity==null){ |
|
|
|
|
log.info(">>>>>>>>>>>>>> 包条找不到 {} ",orderPackageCode); |
|
|
|
|
if (parcelListEntity == null) { |
|
|
|
|
log.info(">>>>>>>>>>>>>> 包条找不到 {} ", orderPackageCode); |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1780,7 +1784,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
|
|
|
|
|
// distributionStockArticleClient.updateOrderInfo(orderCode, warehouseId);
|
|
|
|
|
// }
|
|
|
|
|
List<String> orders = new ArrayList<>(orderSet); |
|
|
|
|
if(orders.isEmpty()){ |
|
|
|
|
if (orders.isEmpty()) { |
|
|
|
|
return Resp.scanSuccess("下架成功", "成功下架" + num + "件"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1794,7 +1798,6 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public R downZeroOrder(List<UpShelfZeroOrderDTO> upShelfPackageList, Long warehouseId, String remark) { |
|
|
|
|
StringBuffer stringBuffer = new StringBuffer("下架零担订单成功"); |
|
|
|
@ -3092,7 +3095,6 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void updateUpdownTypeNum(WarehouseUpdownTypeEntity updownTypeEntity) { |
|
|
|
|
Long updownTypeId = updownTypeEntity.getId(); |
|
|
|
|
Long warehouseId = updownTypeEntity.getWarehouseId(); |
|
|
|
|