@ -42,7 +42,6 @@ import com.logpm.warehouse.entity.WarehouseWaybillEntity;
import com.logpm.warehouse.feign.IWarehouseTrayGoodsClient ;
import com.logpm.warehouse.feign.IWarehouseUpdownGoodsClient ;
import com.logpm.warehouse.feign.IWarehouseWaybillClient ;
import lombok.AllArgsConstructor ;
import lombok.extern.slf4j.Slf4j ;
import org.springblade.common.constant.DictBizConstant ;
import org.springblade.common.constant.order.OrderStockupStatusConstant ;
@ -63,6 +62,7 @@ import org.springblade.system.cache.DictBizCache;
import org.springblade.system.feign.IUserClient ;
import org.springframework.amqp.rabbit.core.RabbitTemplate ;
import org.springframework.beans.BeanUtils ;
import org.springframework.beans.factory.annotation.Autowired ;
import org.springframework.stereotype.Service ;
import org.springframework.transaction.annotation.Transactional ;
@ -76,36 +76,45 @@ import java.util.stream.Collectors;
* @since 2023 - 06 - 13
* /
@Service
@AllArgsConstructor
@Slf4j
public class DistributionParcelListServiceImpl extends BaseServiceImpl < DistributionParcelListMapper , DistributionParcelListEntity > implements IDistributionParcelListService {
private final IBasicdataWarehouseClient basicdataWarehouseClient ;
private final IWarehouseUpdownGoodsClient warehouseUpdownGoodsClient ;
private final IWarehouseTrayGoodsClient warehouseTrayGoodsClient ;
private final IDistributionParcelNumberService distributionParcelNumberService ;
private final DistributionStockArticleMapper distributionStockArticleMapper ;
private final IDistributionParcelDetailsService distributionParcelDetailsService ;
private final IBasicMaterialClient basicMaterialClient ;
private final IDistributionStockListInfoService distributionStockListInfoService ;
private final IDistributionStockListService distributionStockListService ;
private final IDistributionReservationZeroPackageService reservationZeroPackageService ;
private final IDistrilbutionBillPackageService distrilbutionBillPackageService ;
private final IBasicdataWarehouseClient warehouseClient ;
private final RabbitTemplate rabbitTemplate ;
private final IWarehouseWaybillClient warehouseWaybillClient ;
private final IBasicdataClientClient basicdataClientClient ;
private final IUserClient userClient ;
@Autowired
private IBasicdataWarehouseClient basicdataWarehouseClient ;
@Autowired
private IWarehouseUpdownGoodsClient warehouseUpdownGoodsClient ;
@Autowired
private IWarehouseTrayGoodsClient warehouseTrayGoodsClient ;
@Autowired
private IDistributionParcelNumberService distributionParcelNumberService ;
@Autowired
private DistributionStockArticleMapper distributionStockArticleMapper ;
@Autowired
private IDistributionParcelDetailsService distributionParcelDetailsService ;
@Autowired
private IBasicMaterialClient basicMaterialClient ;
@Autowired
private IDistributionStockListInfoService distributionStockListInfoService ;
@Autowired
private IDistributionStockListService distributionStockListService ;
@Autowired
private IDistributionReservationZeroPackageService reservationZeroPackageService ;
@Autowired
private IDistrilbutionBillPackageService distrilbutionBillPackageService ;
@Autowired
private IBasicdataWarehouseClient warehouseClient ;
@Autowired
private RabbitTemplate rabbitTemplate ;
@Autowired
private IWarehouseWaybillClient warehouseWaybillClient ;
@Autowired
private IBasicdataClientClient basicdataClientClient ;
@Autowired
private IUserClient userClient ;
// private final IDistributionStockArticleService distributionStockArticleService;
@Override
@ -213,8 +222,7 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
// }
try {
try {
// QueryWrapper<DistributionParcelListEntity> queryWrapper = new QueryWrapper<>();
// queryWrapper.eq("order_package_code",orderPackageCode)
// .eq("warehouse_id",warehouseId)
@ -224,10 +232,10 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
// int i = baseMapper.updateById(parcelListEntity);
// 更新状态
baseMapper . updateGroundingStatusByOrderPackageCode ( orderPackageCode , groundingStatus , warehouseId ) ;
} catch ( Exception e ) {
baseMapper . updateGroundingStatusByOrderPackageCode ( orderPackageCode , groundingStatus , warehouseId ) ;
} catch ( Exception e ) {
// 更新状态报错
log . error ( ">>>>>> updateGroundingStatus 异常信息" , e ) ;
log . error ( ">>>>>> updateGroundingStatus 异常信息" , e ) ;
}
@ -455,58 +463,58 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
}
if ( ! list1 . isEmpty ( ) ) {
Set < Long > listString = new HashSet < > ( ) ;
log . info ( "###############包件信息>>>>>>>>>>>>,{}" , list1 ) ;
log . info ( "###############包件信息>>>>>>>>>>>>,{}" , list1 ) ;
Map < Long , List < DistributionParcelListEntity > > listMap = list1 . stream ( ) . collect ( Collectors . groupingBy ( DistributionParcelListEntity : : getMaterialId ) ) ;
log . info ( "###############包件信息listMap>>>>>>>>>>>>,{}" , listMap ) ;
log . info ( "###############包件信息listMap>>>>>>>>>>>>,{}" , listMap ) ;
listMap . forEach ( ( k , v ) - > {
int sum = v . stream ( ) . mapToInt ( DistributionParcelListEntity : : getQuantity ) . sum ( ) ;
List < Long > packageIds = new ArrayList < > ( ) ;
v . stream ( ) . forEach ( i - > {
//查询有没有打托数据
//查询包件有没有物料
List < DistributionParcelDetailsEntity > list = distributionParcelDetailsService . list ( Wrappers . < DistributionParcelDetailsEntity > query ( ) . lambda ( )
. eq ( DistributionParcelDetailsEntity : : getParcelListId , i . getId ( ) )
) ;
if ( ! list . isEmpty ( ) ) {
//有
list . stream ( ) . collect ( Collectors . groupingBy ( DistributionParcelDetailsEntity : : getEncoded ) )
. forEach ( ( kk , vv ) - > {
DistributionParcelListEntity parcelListEntity = new DistributionParcelListEntity ( ) ;
BeanUtil . copyProperties ( vv . get ( 0 ) , parcelListEntity ) ;
parcelListEntity . setQuantity ( sum ) ;
parcelListEntity . setMaterialName ( vv . get ( 0 ) . getName ( ) ) ;
parcelListEntity . setMaterialCode ( vv . get ( 0 ) . getEncoded ( ) ) ;
parcelListEntity . setMaterialUnit ( vv . get ( 0 ) . getUnit ( ) ) ;
// 添加库存品信息
//查询在库订单信息
DistributionStockArticleEntity distributionStockArticleEntity = distributionStockArticleMapper . selectById ( parcelListEntity . getStockArticleId ( ) ) ;
if ( ObjectUtil . isEmpty ( distributionStockArticleEntity . getMallId ( ) ) ) {
throw new ServiceException ( "订单的客户数据异常,无法转换!!" ) ;
}
addStockList ( distributionStockArticleEntity , parcelListEntity , 1 ) ;
} ) ;
}
//修改状态
DistributionParcelListEntity parcelList = new DistributionParcelListEntity ( ) ;
parcelList . setId ( i . getId ( ) ) ;
parcelList . setConditions ( 2 ) ;
baseMapper . updateById ( parcelList ) ;
listString . add ( i . getStockArticleId ( ) ) ;
//生成包件转库存品记录
packageIds . add ( parcelList . getId ( ) ) ;
} ) ;
DistributionParcelListEntity parcelListEntity = new DistributionParcelListEntity ( ) ;
BeanUtil . copyProperties ( v . get ( 0 ) , parcelListEntity ) ;
parcelListEntity . setQuantity ( sum ) ;
// 添加库存品信息
DistributionStockArticleEntity distributionStockArticleEntity = distributionStockArticleMapper . selectById ( parcelListEntity . getStockArticleId ( ) ) ;
if ( ObjectUtil . isEmpty ( distributionStockArticleEntity . getMallId ( ) ) ) {
throw new ServiceException ( "订单的客户数据异常,无法转换!!" ) ;
int sum = v . stream ( ) . mapToInt ( DistributionParcelListEntity : : getQuantity ) . sum ( ) ;
List < Long > packageIds = new ArrayList < > ( ) ;
v . stream ( ) . forEach ( i - > {
//查询有没有打托数据
//查询包件有没有物料
List < DistributionParcelDetailsEntity > list = distributionParcelDetailsService . list ( Wrappers . < DistributionParcelDetailsEntity > query ( ) . lambda ( )
. eq ( DistributionParcelDetailsEntity : : getParcelListId , i . getId ( ) )
) ;
if ( ! list . isEmpty ( ) ) {
//有
list . stream ( ) . collect ( Collectors . groupingBy ( DistributionParcelDetailsEntity : : getEncoded ) )
. forEach ( ( kk , vv ) - > {
DistributionParcelListEntity parcelListEntity = new DistributionParcelListEntity ( ) ;
BeanUtil . copyProperties ( vv . get ( 0 ) , parcelListEntity ) ;
parcelListEntity . setQuantity ( sum ) ;
parcelListEntity . setMaterialName ( vv . get ( 0 ) . getName ( ) ) ;
parcelListEntity . setMaterialCode ( vv . get ( 0 ) . getEncoded ( ) ) ;
parcelListEntity . setMaterialUnit ( vv . get ( 0 ) . getUnit ( ) ) ;
// 添加库存品信息
//查询在库订单信息
DistributionStockArticleEntity distributionStockArticleEntity = distributionStockArticleMapper . selectById ( parcelListEntity . getStockArticleId ( ) ) ;
if ( ObjectUtil . isEmpty ( distributionStockArticleEntity . getMallId ( ) ) ) {
throw new ServiceException ( "订单的客户数据异常,无法转换!!" ) ;
}
addStockList ( distributionStockArticleEntity , parcelListEntity , 1 ) ;
} ) ;
}
addStockListByPackage ( distributionStockArticleEntity , packageIds , 1 ) ;
//修改状态
DistributionParcelListEntity parcelList = new DistributionParcelListEntity ( ) ;
parcelList . setId ( i . getId ( ) ) ;
parcelList . setConditions ( 2 ) ;
baseMapper . updateById ( parcelList ) ;
listString . add ( i . getStockArticleId ( ) ) ;
//生成包件转库存品记录
packageIds . add ( parcelList . getId ( ) ) ;
} ) ;
DistributionParcelListEntity parcelListEntity = new DistributionParcelListEntity ( ) ;
BeanUtil . copyProperties ( v . get ( 0 ) , parcelListEntity ) ;
parcelListEntity . setQuantity ( sum ) ;
// 添加库存品信息
DistributionStockArticleEntity distributionStockArticleEntity = distributionStockArticleMapper . selectById ( parcelListEntity . getStockArticleId ( ) ) ;
if ( ObjectUtil . isEmpty ( distributionStockArticleEntity . getMallId ( ) ) ) {
throw new ServiceException ( "订单的客户数据异常,无法转换!!" ) ;
}
addStockListByPackage ( distributionStockArticleEntity , packageIds , 1 ) ;
} ) ;
listString . forEach ( oo - > {
DistributionStockArticleEntity stockArticleEntity1 = distributionStockArticleMapper . selectById ( oo ) ;
if ( ObjectUtils . isNull ( stockArticleEntity1 ) ) {
@ -661,16 +669,16 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
}
@Override
public void updateTransferStatus ( String orderCode , Long warehouseId , Integer isTransfer ) {
baseMapper . updateTransferStatus ( orderCode , warehouseId , isTransfer ) ;
public void updateTransferStatus ( String orderCode , Long warehouseId , Integer isTransfer ) {
baseMapper . updateTransferStatus ( orderCode , warehouseId , isTransfer ) ;
}
@Override
public Set < String > updateEntityByOpenOrder ( Long advanceId , Long warehouseId , Long waybillId ) {
WarehouseWaybillEntity waybillEntity = warehouseWaybillClient . findByWaybillId ( waybillId ) ;
if ( Objects . isNull ( waybillEntity ) ) {
log . warn ( "############updateEntityByOpenOrder: 运单信息不存在 waybillId={}" , waybillId ) ;
throw new CustomerException ( 405 , "运单信息不存在" ) ;
if ( Objects . isNull ( waybillEntity ) ) {
log . warn ( "############updateEntityByOpenOrder: 运单信息不存在 waybillId={}" , waybillId ) ;
throw new CustomerException ( 405 , "运单信息不存在" ) ;
}
Long departureWarehouseId = waybillEntity . getDepartureWarehouseId ( ) ;
String departureWarehouseName = waybillEntity . getDepartureWarehouseName ( ) ;
@ -679,21 +687,21 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
String waybillNo = waybillEntity . getWaybillNo ( ) ;
QueryWrapper < DistributionParcelListEntity > queryWrapper = new QueryWrapper < > ( ) ;
queryWrapper . eq ( "advance_id" , advanceId )
. eq ( "warehouse_id" , warehouseId )
. eq ( "is_deleted" , 0 ) ;
queryWrapper . eq ( "advance_id" , advanceId )
. eq ( "warehouse_id" , warehouseId )
. eq ( "is_deleted" , 0 ) ;
List < DistributionParcelListEntity > listEntityList = baseMapper . selectList ( queryWrapper ) ;
Set < String > orderCodes = new TreeSet < > ( ) ;
for ( DistributionParcelListEntity parcelListEntity : listEntityList ) {
parcelListEntity . setWaybillId ( waybillId + "" ) ;
parcelListEntity . setWaybillId ( waybillId + "" ) ;
parcelListEntity . setWaybillNumber ( waybillNo ) ;
parcelListEntity . setSendWarehouseId ( departureWarehouseId ) ;
parcelListEntity . setSendWarehouseName ( departureWarehouseName ) ;
parcelListEntity . setAcceptWarehouseId ( destinationWarehouseId ) ;
parcelListEntity . setAcceptWarehouseName ( destinationWarehouseName ) ;
if ( departureWarehouseId . equals ( destinationWarehouseId ) ) {
if ( departureWarehouseId . equals ( destinationWarehouseId ) ) {
parcelListEntity . setIsTransfer ( 0 ) ;
} else {
} else {
parcelListEntity . setIsTransfer ( 1 ) ;
}
orderCodes . add ( parcelListEntity . getOrderCode ( ) ) ;
@ -703,12 +711,12 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
for ( String orderCode : orderCodes ) {
QueryWrapper < DistributionStockArticleEntity > stockArticleEntityQueryWrapper = new QueryWrapper < > ( ) ;
stockArticleEntityQueryWrapper . eq ( "order_code" , orderCode )
. eq ( "warehouse_id" , warehouseId )
. eq ( "is_deleted" , 0 ) ;
stockArticleEntityQueryWrapper . eq ( "order_code" , orderCode )
. eq ( "warehouse_id" , warehouseId )
. eq ( "is_deleted" , 0 ) ;
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleMapper . selectOne ( stockArticleEntityQueryWrapper ) ;
if ( Objects . isNull ( stockArticleEntity ) ) {
log . error ( "############updateEntityByOpenOrder: 未找到订单信息 orderCode={}" , orderCode ) ;
if ( Objects . isNull ( stockArticleEntity ) ) {
log . error ( "############updateEntityByOpenOrder: 未找到订单信息 orderCode={}" , orderCode ) ;
continue ;
}
Long consigneeId = waybillEntity . getConsigneeId ( ) ;
@ -726,7 +734,6 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
}
/ * *
* @param distributionParcelList 包件信息
* @return
@ -869,7 +876,7 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
listEntity . setQuantityStock ( quantity + quantityStock ) ;
distributionStockListService . updateById ( listEntity ) ;
} else {
log . info ( "###########distributionStockListEntity>>>>>>>>,{}" , distributionStockListEntity ) ;
log . info ( "###########distributionStockListEntity>>>>>>>>,{}" , distributionStockListEntity ) ;
distributionStockListService . save ( distributionStockListEntity ) ;
}
// distributionStockListEntity.setTrayName(Optional.ofNullable(distributionParcelList.getPallet()).orElse(null)); //托盘
@ -939,6 +946,7 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
}
return distributionStockArticleEntity ;
}
@Override
public List < DistributionParcelListEntity > findByWaybillNumber ( String waybillNumber ) {
return baseMapper . findByWaybillNumber ( waybillNumber ) ;
@ -957,13 +965,13 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
public R searchNode ( String packageCode ) {
String method = "###############DistributionParcelListServiceImpl.searchNode," ;
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient . getMyCurrentWarehouse ( ) ;
if ( Func . isEmpty ( myCurrentWarehouse ) ) {
log . error ( method + "未授权仓库" ) ;
return R . fail ( 403 , "未授权!!!" ) ;
if ( Func . isEmpty ( myCurrentWarehouse ) ) {
log . error ( method + "未授权仓库" ) ;
return R . fail ( 403 , "未授权!!!" ) ;
}
DistributionParcelListEntity parcelListEntity = baseMapper . selectByOrderPackageCode ( packageCode , myCurrentWarehouse . getId ( ) ) ;
if ( Func . isEmpty ( parcelListEntity ) ) {
log . error ( method + "查询包件失败packageCode:{}" , packageCode ) ;
if ( Func . isEmpty ( parcelListEntity ) ) {
log . error ( method + "查询包件失败packageCode:{}" , packageCode ) ;
return R . fail ( "无此包件信息,请核实输入内容" ) ;
}
List < DistributionParcelListNodeVO > parcelListNodeVOS = new ArrayList < > ( ) ;
@ -984,50 +992,50 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
distributionParcelListNodeVO . setTranNumber ( parcelListEntity . getTrainNumber ( ) ) ;
parcelListNodeVOS . add ( distributionParcelListNodeVO ) ;
//2、上下架
List < DistributionParcelListNodeVO > allocationAndTrayPackage = baseMapper . selectPackageAllocationAndTray ( parcelListEntity . getOrderPackageCode ( ) , myCurrentWarehouse . getId ( ) ) ;
if ( Func . isNotEmpty ( allocationAndTrayPackage ) ) {
List < DistributionParcelListNodeVO > allocationAndTrayPackage = baseMapper . selectPackageAllocationAndTray ( parcelListEntity . getOrderPackageCode ( ) , myCurrentWarehouse . getId ( ) ) ;
if ( Func . isNotEmpty ( allocationAndTrayPackage ) ) {
parcelListNodeVOS . addAll ( allocationAndTrayPackage ) ;
}
//3、计划配送
//查询计划配送件数
List < DistributionParcelListNodeVO > planDeliveryPackage = baseMapper . selectPackagePlanDelivery ( parcelListEntity . getOrderPackageCode ( ) , myCurrentWarehouse . getId ( ) ) ;
if ( Func . isNotEmpty ( planDeliveryPackage ) ) {
List < DistributionParcelListNodeVO > planDeliveryPackage = baseMapper . selectPackagePlanDelivery ( parcelListEntity . getOrderPackageCode ( ) , myCurrentWarehouse . getId ( ) ) ;
if ( Func . isNotEmpty ( planDeliveryPackage ) ) {
parcelListNodeVOS . addAll ( planDeliveryPackage ) ;
}
//查询计划取消的包件
List < DistributionParcelListNodeVO > cancelPlanDeliveryPackage = baseMapper . selectPackageCancelPlanDelivery ( parcelListEntity . getOrderPackageCode ( ) , myCurrentWarehouse . getId ( ) ) ;
if ( Func . isNotEmpty ( cancelPlanDeliveryPackage ) ) {
List < DistributionParcelListNodeVO > cancelPlanDeliveryPackage = baseMapper . selectPackageCancelPlanDelivery ( parcelListEntity . getOrderPackageCode ( ) , myCurrentWarehouse . getId ( ) ) ;
if ( Func . isNotEmpty ( cancelPlanDeliveryPackage ) ) {
parcelListNodeVOS . addAll ( cancelPlanDeliveryPackage ) ;
}
//查询备货
List < DistributionParcelListNodeVO > StockUpPackage = baseMapper . selectPackageStockUp ( parcelListEntity . getOrderPackageCode ( ) , myCurrentWarehouse . getId ( ) ) ;
if ( Func . isNotEmpty ( StockUpPackage ) ) {
List < DistributionParcelListNodeVO > StockUpPackage = baseMapper . selectPackageStockUp ( parcelListEntity . getOrderPackageCode ( ) , myCurrentWarehouse . getId ( ) ) ;
if ( Func . isNotEmpty ( StockUpPackage ) ) {
parcelListNodeVOS . addAll ( StockUpPackage ) ;
}
//4、装车扫描
List < DistributionParcelListNodeVO > loadingPackage = baseMapper . selectPackageLoading ( parcelListEntity . getOrderPackageCode ( ) , myCurrentWarehouse . getId ( ) ) ;
if ( Func . isNotEmpty ( loadingPackage ) ) {
List < DistributionParcelListNodeVO > loadingPackage = baseMapper . selectPackageLoading ( parcelListEntity . getOrderPackageCode ( ) , myCurrentWarehouse . getId ( ) ) ;
if ( Func . isNotEmpty ( loadingPackage ) ) {
parcelListNodeVOS . addAll ( loadingPackage ) ;
}
//查询取消装车
List < DistributionParcelListNodeVO > cancelLoadingPackage = baseMapper . selectPackageCancelLoading ( parcelListEntity . getOrderPackageCode ( ) , myCurrentWarehouse . getId ( ) ) ;
if ( Func . isNotEmpty ( cancelLoadingPackage ) ) {
List < DistributionParcelListNodeVO > cancelLoadingPackage = baseMapper . selectPackageCancelLoading ( parcelListEntity . getOrderPackageCode ( ) , myCurrentWarehouse . getId ( ) ) ;
if ( Func . isNotEmpty ( cancelLoadingPackage ) ) {
parcelListNodeVOS . addAll ( cancelLoadingPackage ) ;
}
//5、签收扫描
DistributionParcelListNodeVO signingPackage = baseMapper . selectPackageCancelSigning ( parcelListEntity . getOrderPackageCode ( ) , myCurrentWarehouse . getId ( ) ) ;
if ( Func . isNotEmpty ( signingPackage ) ) {
DistributionParcelListNodeVO signingPackage = baseMapper . selectPackageCancelSigning ( parcelListEntity . getOrderPackageCode ( ) , myCurrentWarehouse . getId ( ) ) ;
if ( Func . isNotEmpty ( signingPackage ) ) {
parcelListNodeVOS . add ( signingPackage ) ;
}
//查询异常审核记录
DistributionParcelListNodeVO examineAbnormalPackage = baseMapper . selectPackageExamineAbnormal ( parcelListEntity . getOrderPackageCode ( ) , myCurrentWarehouse . getId ( ) ) ;
if ( Func . isNotEmpty ( examineAbnormalPackage ) ) {
DistributionParcelListNodeVO examineAbnormalPackage = baseMapper . selectPackageExamineAbnormal ( parcelListEntity . getOrderPackageCode ( ) , myCurrentWarehouse . getId ( ) ) ;
if ( Func . isNotEmpty ( examineAbnormalPackage ) ) {
parcelListNodeVOS . add ( examineAbnormalPackage ) ;
}
List < DistributionParcelListNodeVO > listNodeVOS = null ;
if ( Func . isNotEmpty ( parcelListNodeVOS ) ) {
parcelListNodeVOS . forEach ( p - > {
if ( Func . isNotEmpty ( p . getNodeControlsUserId ( ) ) & & Func . isEmpty ( p . getNodeControlsUserName ( ) ) ) {
if ( Func . isNotEmpty ( parcelListNodeVOS ) ) {
parcelListNodeVOS . forEach ( p - > {
if ( Func . isNotEmpty ( p . getNodeControlsUserId ( ) ) & & Func . isEmpty ( p . getNodeControlsUserName ( ) ) ) {
p . setNodeControlsUserName ( userClient . userInfoById ( p . getNodeControlsUserId ( ) ) . getData ( ) . getName ( ) ) ;
}
} ) ;
@ -1041,11 +1049,11 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
@Override
public List < DistributionParcelListEntity > findEntityListByOrderCodeAndStatus ( String orderCode , Long warehouseId , String packageStatus ) {
QueryWrapper < DistributionParcelListEntity > queryWrapper = new QueryWrapper < > ( ) ;
queryWrapper . eq ( "order_code" , orderCode )
. eq ( "warehouse_id" , warehouseId )
. eq ( "order_package_status" , packageStatus )
. eq ( "is_transfer" , 1 )
. eq ( "is_deleted" , 0 ) ;
queryWrapper . eq ( "order_code" , orderCode )
. eq ( "warehouse_id" , warehouseId )
. eq ( "order_package_status" , packageStatus )
. eq ( "is_transfer" , 1 )
. eq ( "is_deleted" , 0 ) ;
return baseMapper . selectList ( queryWrapper ) ;
}
@ -1057,20 +1065,20 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
@Transactional
public void maintenanceZeroPackageInfo ( Long parcelListId , Long warehouseId ) {
DistributionParcelListEntity parcelListEntity = this . getById ( parcelListId ) ;
if ( Func . isNotEmpty ( parcelListEntity ) ) {
if ( Func . isNotEmpty ( parcelListEntity ) ) {
DistributionParcelNumberEntity distributionParcelNumberEntity = distributionParcelNumberService . getOne ( Wrappers . < DistributionParcelNumberEntity > query ( ) . lambda ( )
. eq ( DistributionParcelNumberEntity : : getParcelListId , parcelListEntity . getId ( ) )
) ;
if ( ( distributionParcelNumberEntity . getDeliveryQuantity ( ) + distributionParcelNumberEntity . getOutboundQuantity ( ) ) = = parcelListEntity . getQuantity ( ) ) {
if ( ( distributionParcelNumberEntity . getDeliveryQuantity ( ) + distributionParcelNumberEntity . getOutboundQuantity ( ) ) = = parcelListEntity . getQuantity ( ) ) {
parcelListEntity . setOrderPackageReservationStatus ( OrderPackageReservationStatusConstant . yiyueyue . getValue ( ) ) ;
}
if ( distributionParcelNumberEntity . getOutboundQuantity ( ) = = parcelListEntity . getQuantity ( ) ) {
if ( distributionParcelNumberEntity . getOutboundQuantity ( ) = = parcelListEntity . getQuantity ( ) ) {
parcelListEntity . setOrderPackageLoadingStatus ( OrderPackageLoadingStatusConstant . yizhuangche . getValue ( ) ) ;
parcelListEntity . setOrderPackageStatus ( OrderPackageStatusConstant . yichuku . getValue ( ) ) ;
}
if ( distributionParcelNumberEntity . getSigninQuantity ( ) = = parcelListEntity . getQuantity ( ) ) {
if ( distributionParcelNumberEntity . getSigninQuantity ( ) = = parcelListEntity . getQuantity ( ) ) {
parcelListEntity . setOrderPackageStatus ( OrderPackageStatusConstant . yiqianshou . getValue ( ) ) ;
} else if ( distributionParcelNumberEntity . getSigninQuantity ( ) > 0 ) {
} else if ( distributionParcelNumberEntity . getSigninQuantity ( ) > 0 ) {
parcelListEntity . setOrderPackageStatus ( OrderPackageStatusConstant . bufenqianshou . getValue ( ) ) ;
}
this . updateById ( parcelListEntity ) ;