@ -49,6 +49,7 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable ;
import org.springblade.common.constant.DictBizConstant ;
import org.springblade.common.constant.RabbitConstant ;
import org.springblade.common.constant.common.IsOrNoConstant ;
import org.springblade.common.constant.orderpackage.OrderPackageFreezeStatusConstant ;
import org.springblade.common.constant.orderpackage.OrderPackageStockupStatusConstant ;
import org.springblade.common.constant.pda.PdaAudioLingoStatus ;
@ -121,6 +122,7 @@ public class DistributionStockupAppController extends BladeController {
private final IDisStockOrdercodeRecoService disStockOrdercodeRecoService ;
private final IDistributionReservationStockarticleService distributionReservationStockarticleService ;
private final BladeRedis redis ;
@ -259,11 +261,9 @@ public class DistributionStockupAppController extends BladeController {
DistributionStockupSelfVO distributionStockupSelfVO = distributionStockupService . selectStockupStockListDetails ( reservationId ) ;
map = convertObjectToMap ( distributionStockupSelfVO ) ;
//库存品
List < DistributionStockupStockListVO > list = distributionStockupService . selectStockupStockList ( stockupDTO ) ;
map . put ( "stockList" , list ) ;
}
} else {
//商,市
DistributionReservationEntity reservationEntity = distributionReservationService . getById ( reservationId ) ;
@ -278,6 +278,7 @@ public class DistributionStockupAppController extends BladeController {
//根据list列表统计计划件数
Integer planNum = 0 ;
Integer scanNum = 0 ;
if ( ! list . isEmpty ( ) ) {
for ( DistributionStockupOrderListVO vo : list ) {
planNum = planNum + vo . getPlanNum ( ) ;
@ -295,9 +296,26 @@ public class DistributionStockupAppController extends BladeController {
vo . setTrayLean ( distributionStockupService . getTrayBoot ( vo , stockupDTO . getTypeService ( ) ) ) ;
}
}
if ( IsOrNoConstant . yes . getValue ( ) . equals ( stockupDTO . getIsZero ( ) ) ) {
//查询客户零担计划数量
List < DistributionReservationStockarticleEntity > reservationStockarticleEntities = distributionReservationStockarticleService . list ( Wrappers . < DistributionReservationStockarticleEntity > query ( ) . lambda ( )
. eq ( DistributionReservationStockarticleEntity : : getReservationId , reservationId )
. eq ( DistributionReservationStockarticleEntity : : getIsZero , IsOrNoConstant . yes . getValue ( ) )
. ne ( DistributionReservationStockarticleEntity : : getStockArticleStatus , ReservationOrderStatusConstant . quxiao . getValue ( ) )
) ;
planNum = reservationStockarticleEntities . stream ( ) . mapToInt ( DistributionReservationStockarticleEntity : : getReservationNum ) . sum ( ) ;
List < Long > collect = list . stream ( ) . map ( DistributionStockupOrderListVO : : getParcelListId ) . collect ( Collectors . toList ( ) ) ;
List < DistributionStockEntity > stockEntityList = distributionStockService . list ( Wrappers . < DistributionStockEntity > query ( ) . lambda ( )
. eq ( DistributionStockEntity : : getReservationId , reservationId )
. eq ( DistributionStockEntity : : getOutboundType , "3" )
. in ( DistributionStockEntity : : getParcelListId , collect )
) ;
scanNum = stockEntityList . stream ( ) . mapToInt ( DistributionStockEntity : : getStockQuantity ) . sum ( ) ;
}
}
map . put ( "planNum" , planNum ) ;
map . put ( "scanNum" , scanNum ) ;
list . stream ( ) . forEach ( f - > f . setCompleteStact ( false ) ) ;
map . put ( "orderList" , list ) ;
} else if ( orderStatus = = 2 ) {
@ -306,10 +324,10 @@ public class DistributionStockupAppController extends BladeController {
List < DistributionStockupStockListVO > list = distributionStockupService . selectStockupStockList ( stockupDTO ) ;
//根据list列表统计计划件数
//查询结果为null,判定为当前库存品未进行上架操作
if ( Func . isEmpty ( list ) ) {
log . info ( "##################库存品库位信息:{}" , list ) ;
return R . fail ( "该库存品未上架" ) ;
}
// if (Func.isEmpty(list)){
// log.info( "##################库存品库位信息:{}",list);
// return R.fail("该库存品未上架");
// }
Integer planNum = 0 ;
Integer scanNum = 0 ;
for ( DistributionStockupStockListVO vo : list ) {