@ -852,6 +852,340 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
return R . data ( nodeVos ) ;
}
/ * *
* @param distrilbutionloadingscanDTO
* @return
* /
@Override
public R signforZeroPC ( DistrilbutionAppsignforDTO distrilbutionloadingscanDTO ) {
String method = "#############DistributionSignforServiceImpl.signforZeroPC" ;
if ( Func . isEmpty ( distrilbutionloadingscanDTO . getZeroPackageIds ( ) ) ) {
log . error ( method + "参数异常,zeroPackageIds为空" ) ;
return R . fail ( "请联系管理员" ) ;
}
if ( Func . isEmpty ( distrilbutionloadingscanDTO . getReservationId ( ) ) ) {
log . error ( method + "参数异常,ReservationId为空" ) ;
return R . fail ( "请联系管理员" ) ;
}
String zeroPackageIds = distrilbutionloadingscanDTO . getZeroPackageIds ( ) ;
Long reservationId = distrilbutionloadingscanDTO . getReservationId ( ) ;
List < Long > list = Func . toLongList ( zeroPackageIds ) ;
BladeUser user = AuthUtil . getUser ( ) ;
//查询零担计划
List < DistributionReservationZeroPackageEntity > reservationZeroPackageEntities = distributionReservationZeroPackageService . list ( Wrappers . < DistributionReservationZeroPackageEntity > query ( ) . lambda ( )
. eq ( DistributionReservationZeroPackageEntity : : getReservationId , reservationId )
. in ( DistributionReservationZeroPackageEntity : : getParcelListId , list )
. ne ( DistributionReservationZeroPackageEntity : : getParcelListId , ReservationPackageStatusConstant . quxiao . getValue ( ) )
) ;
if ( Func . isEmpty ( reservationZeroPackageEntities ) ) {
log . error ( method + "预约单异常reservationId:{}" , reservationId ) ;
return R . fail ( "请联系管理员" ) ;
}
DistributionDeliveryListEntity deliveryListEntity = distributionDeliveryListService . getById ( distrilbutionloadingscanDTO . getDeliveryId ( ) ) ;
if ( Func . isEmpty ( deliveryListEntity ) ) {
log . error ( method + "配送单异常deliveryId:{}" , distrilbutionloadingscanDTO . getDeliveryId ( ) ) ;
return R . fail ( "请联系管理员" ) ;
}
String driverName = "" ;
String driverPhone = "" ;
String vehicleNub = "" ;
Long loadingId = null ;
List < DistributionDeliverySelfVO > deliverySelfInfo = distributionDeliverySelfMapper . getDeliverySelfInfo ( deliveryListEntity . getId ( ) ) ;
//查询该车次负责司机
for ( DistributionReservationZeroPackageEntity reservationZeroPackageEntity : reservationZeroPackageEntities ) {
//查询订单
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService . getById ( reservationZeroPackageEntity . getStockArticleId ( ) ) ;
//查询零担包件详情
DistributionParcelNumberEntity distributionParcelNumberEntity = distributionParcelNumberService . getOne ( Wrappers . < DistributionParcelNumberEntity > query ( ) . lambda ( )
. eq ( DistributionParcelNumberEntity : : getParcelListId , reservationZeroPackageEntity . getParcelListId ( ) )
) ;
//在库数
int a = 0 ;
//签收数
int b = 0 ;
//出库数
int c = 0 ;
//冻结数
int d = 0 ;
DistributionLoadscanEntity loadscanEntity = distributionLoadscanService . getOne ( Wrappers . < DistributionLoadscanEntity > query ( ) . lambda ( )
. eq ( DistributionLoadscanEntity : : getReservationId , reservationId )
. in ( DistributionLoadscanEntity : : getPackageId , list )
. ne ( DistributionLoadscanEntity : : getScanStatus , LoadingStatusConstant . quxiao . getValue ( ) )
) ;
if ( Func . isEmpty ( loadscanEntity ) ) {
if ( "1" . equals ( deliveryListEntity . getKind ( ) ) ) {
//自主配送
driverPhone = deliverySelfInfo . stream ( ) . filter ( f - > 2 = = f . getIsMaster ( ) ) . map ( DistributionDeliverySelfVO : : getDriverPhone ) . collect ( Collectors . joining ( "," ) ) ;
driverName = deliverySelfInfo . stream ( ) . filter ( f - > 2 = = f . getIsMaster ( ) ) . map ( DistributionDeliverySelfVO : : getDriverName ) . collect ( Collectors . joining ( "," ) ) ;
vehicleNub = deliverySelfInfo . stream ( ) . filter ( f - > 2 = = f . getIsMaster ( ) ) . map ( DistributionDeliverySelfVO : : getVehicleNub ) . collect ( Collectors . joining ( "," ) ) ;
List < Long > collect = deliverySelfInfo . stream ( ) . filter ( f - > 2 = = f . getIsMaster ( ) ) . map ( DistributionDeliverySelfVO : : getId ) . collect ( Collectors . toList ( ) ) ;
loadingId = collect . get ( 0 ) ;
} else if ( "2" . equals ( deliveryListEntity . getKind ( ) ) ) {
//外协
} else {
log . error ( method + "配送司机异常:{}" , distrilbutionloadingscanDTO . getDeliveryId ( ) ) ;
return R . fail ( "请联系管理员" ) ;
}
a = distributionParcelNumberEntity . getHandQuantity ( ) - reservationZeroPackageEntity . getQuantity ( ) ;
b = distributionParcelNumberEntity . getSigninQuantity ( ) + reservationZeroPackageEntity . getQuantity ( ) ;
c = distributionParcelNumberEntity . getOutboundQuantity ( ) + reservationZeroPackageEntity . getQuantity ( ) ;
d = distributionParcelNumberEntity . getDeliveryQuantity ( ) - reservationZeroPackageEntity . getQuantity ( ) ;
//未进行装车操作
DistributionLoadscanEntity unLoadscanEntity = new DistributionLoadscanEntity ( ) ;
SimpleDateFormat simpleDateFormat = new SimpleDateFormat ( "yyyy-MM-dd HH:mm:ss.sss" ) ;
unLoadscanEntity . setScanStatus ( LoadingStatusConstant . buluzhuangche . getValue ( ) ) ;
unLoadscanEntity . setIsInsert ( 2 ) ;
unLoadscanEntity . setLoadingId ( loadingId . toString ( ) ) ;
unLoadscanEntity . setOrderId ( reservationZeroPackageEntity . getStockArticleId ( ) ) ;
unLoadscanEntity . setPackageId ( reservationZeroPackageEntity . getParcelListId ( ) ) ;
unLoadscanEntity . setReservationId ( reservationId ) ;
unLoadscanEntity . setIsSignfor ( 1 ) ;
unLoadscanEntity . setDeliveryId ( distrilbutionloadingscanDTO . getDeliveryId ( ) ) ;
unLoadscanEntity . setScanUser ( user . getNickName ( ) ) ;
unLoadscanEntity . setIsAbnormalSigning ( 1 ) ;
unLoadscanEntity . setIsAbnormalLoading ( 1 ) ;
unLoadscanEntity . setIsZero ( 1 ) ;
unLoadscanEntity . setTrainNumber ( deliveryListEntity . getTrainNumber ( ) ) ;
unLoadscanEntity . setVehicleId ( deliveryListEntity . getVehicleId ( ) ) ;
unLoadscanEntity . setVehicleName ( vehicleNub ) ;
unLoadscanEntity . setDriverId ( deliveryListEntity . getDriverId ( ) ) ;
unLoadscanEntity . setDriverName ( driverName ) ;
unLoadscanEntity . setDriverPhone ( driverPhone ) ;
unLoadscanEntity . setLoadingId ( driverPhone ) ;
unLoadscanEntity . setScanType ( LoadingStatusConstant . buluzhuangche . getValue ( ) ) ;
unLoadscanEntity . setScanTime ( simpleDateFormat . format ( new Date ( ) ) ) ;
unLoadscanEntity . setSigningTime ( simpleDateFormat . format ( new Date ( System . currentTimeMillis ( ) + ( 6 * 1000 ) ) ) ) ;
unLoadscanEntity . setSignforState ( LoadScanSigningStatusConstant . yiqianshou . getValue ( ) ) ;
unLoadscanEntity . setSigningUserId ( user . getUserId ( ) ) ;
unLoadscanEntity . setSigningUser ( user . getNickName ( ) ) ;
unLoadscanEntity . setIsSignfor ( 2 ) ;
unLoadscanEntity . setSignforState ( 2 ) ;
// loadscanEntity.setSigningTime(new Date().toString());
unLoadscanEntity . setReceivedQuantity ( reservationZeroPackageEntity . getQuantity ( ) ) ;
unLoadscanEntity . setLoadedNub ( reservationZeroPackageEntity . getQuantity ( ) ) ;
unLoadscanEntity . setPackageNub ( reservationZeroPackageEntity . getQuantity ( ) ) ;
unLoadscanEntity . setOneClick ( 1 ) ;
unLoadscanEntity . setOneQclick ( 1 ) ;
unLoadscanEntity . setMsg ( "文员进行零担订单装车和签收补录" ) ;
distributionLoadscanService . save ( unLoadscanEntity ) ;
//更新装车和签收数量
Integer i = distributionSignforMapper . updateSignforByReservationId ( unLoadscanEntity . getDeliveryId ( ) , unLoadscanEntity . getReservationId ( ) , unLoadscanEntity . getReceivedQuantity ( ) ) ;
//更新装车时间
Integer j = distributionDeliveryListMapper . updateloadingTimeById ( distrilbutionloadingscanDTO . getDeliveryId ( ) ) ;
//更新零担包件的数量
distributionParcelNumberEntity . setHandQuantity ( a ) ;
distributionParcelNumberEntity . setSigninQuantity ( b ) ;
distributionParcelNumberEntity . setOutboundQuantity ( c ) ;
distributionParcelNumberEntity . setDeliveryQuantity ( d ) ;
} else {
a = distributionParcelNumberEntity . getHandQuantity ( ) + loadscanEntity . getLoadedNub ( ) - reservationZeroPackageEntity . getQuantity ( ) ;
b = distributionParcelNumberEntity . getSigninQuantity ( ) - loadscanEntity . getReceivedQuantity ( ) + reservationZeroPackageEntity . getQuantity ( ) ;
c = distributionParcelNumberEntity . getOutboundQuantity ( ) - loadscanEntity . getReceivedQuantity ( ) + reservationZeroPackageEntity . getQuantity ( ) ;
d = distributionParcelNumberEntity . getDeliveryQuantity ( ) + loadscanEntity . getReceivedQuantity ( ) - reservationZeroPackageEntity . getQuantity ( ) ;
//存在装车操作
loadscanEntity . setSigningUser ( user . getNickName ( ) ) ;
loadscanEntity . setIsSignfor ( 2 ) ;
loadscanEntity . setSignforState ( LoadScanSigningStatusConstant . yiqianshou . getValue ( ) ) ;
// loadscanEntity.setSigningTime(new Date().toString());
loadscanEntity . setReceivedQuantity ( reservationZeroPackageEntity . getQuantity ( ) ) ;
loadscanEntity . setLoadedNub ( reservationZeroPackageEntity . getQuantity ( ) ) ;
loadscanEntity . setPackageNub ( reservationZeroPackageEntity . getQuantity ( ) ) ;
loadscanEntity . setMsg ( "文员进行签收补录" ) ;
distributionLoadscanService . updateById ( loadscanEntity ) ;
distributionParcelNumberEntity . setHandQuantity ( a ) ;
distributionParcelNumberEntity . setSigninQuantity ( b ) ;
distributionParcelNumberEntity . setOutboundQuantity ( c ) ;
distributionParcelNumberEntity . setDeliveryQuantity ( d ) ;
}
distributionParcelListService . maintenanceZeroPackageInfo ( distributionParcelNumberEntity . getParcelListId ( ) , stockArticleEntity . getWarehouseId ( ) ) ;
distributionParcelNumberService . updateById ( distributionParcelNumberEntity ) ;
//维护订单
distributionStockArticleService . maintenanceOrderInfo ( stockArticleEntity . getOrderCode ( ) , stockArticleEntity . getWarehouseId ( ) ) ;
}
//维护配送单信息
deliveryListEntity . setDeliveryStatus ( DeliveryStatusConstant . peisongzhong . getValue ( ) ) ;
distributionDeliveryListService . updateById ( deliveryListEntity ) ;
//维护客户状态
distributionReservationService . maintenanceReservationInfo ( reservationId ) ;
//查询计划和是否进行装车
return R . success ( "操作成功" ) ;
}
/ * *
* @param distrilbutionloadingscanDTO
* @return
* /
@Override
public R deliverySingleZeroPackage ( DistrilbutionAppsignforDTO distrilbutionloadingscanDTO ) {
String method = "#############DistributionSignforServiceImpl.deliverySingleZeroPackage" ;
if ( Func . isEmpty ( distrilbutionloadingscanDTO . getZeroPackageIds ( ) ) ) {
log . error ( method + "参数异常,zeroPackageIds为空" ) ;
return R . fail ( "请联系管理员" ) ;
}
if ( Func . isEmpty ( distrilbutionloadingscanDTO . getReservationId ( ) ) ) {
log . error ( method + "参数异常,ReservationId为空" ) ;
return R . fail ( "请联系管理员" ) ;
}
//查询订单
String zeroPackageIds = distrilbutionloadingscanDTO . getZeroPackageIds ( ) ;
Long reservationId = distrilbutionloadingscanDTO . getReservationId ( ) ;
BladeUser user = AuthUtil . getUser ( ) ;
//查询零担计划
DistributionReservationZeroPackageEntity reservationZeroPackageEntities = distributionReservationZeroPackageService . getOne ( Wrappers . < DistributionReservationZeroPackageEntity > query ( ) . lambda ( )
. eq ( DistributionReservationZeroPackageEntity : : getReservationId , reservationId )
. eq ( DistributionReservationZeroPackageEntity : : getParcelListId , zeroPackageIds )
. ne ( DistributionReservationZeroPackageEntity : : getParcelListId , ReservationPackageStatusConstant . quxiao . getValue ( ) )
) ;
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService . getById ( reservationZeroPackageEntities . getStockArticleId ( ) ) ;
if ( Func . isEmpty ( reservationZeroPackageEntities ) ) {
log . error ( method + "预约单异常reservationId:{}" , reservationId ) ;
return R . fail ( "请联系管理员" ) ;
}
DistributionDeliveryListEntity deliveryListEntity = distributionDeliveryListService . getById ( distrilbutionloadingscanDTO . getDeliveryId ( ) ) ;
if ( Func . isEmpty ( deliveryListEntity ) ) {
log . error ( method + "配送单异常deliveryId:{}" , distrilbutionloadingscanDTO . getDeliveryId ( ) ) ;
return R . fail ( "请联系管理员" ) ;
}
List < DistributionParcelNumberDTO > parcelListDTOS = distrilbutionloadingscanDTO . getParcelListDTOS ( ) ;
if ( parcelListDTOS . size ( ) > 1 | | parcelListDTOS . size ( ) = = 0 ) {
log . error ( method + "提交零担订单错误:{}" , distrilbutionloadingscanDTO . getDeliveryId ( ) ) ;
return R . fail ( "请联系管理员" ) ;
}
DistributionParcelNumberDTO distributionParcelNumberDTO = parcelListDTOS . get ( 0 ) ;
if ( distributionParcelNumberDTO . getNumber ( ) > reservationZeroPackageEntities . getQuantity ( ) ) {
//超过计划数
log . error ( method + "签收零担订单数量超过计划数错误:{}" , distributionParcelNumberDTO . getParcelListId ( ) ) ;
return R . fail ( "请联系管理员" ) ;
}
//查询零担包件详情
DistributionParcelNumberEntity distributionParcelNumberEntity = distributionParcelNumberService . getOne ( Wrappers . < DistributionParcelNumberEntity > query ( ) . lambda ( )
. eq ( DistributionParcelNumberEntity : : getParcelListId , reservationZeroPackageEntities . getParcelListId ( ) )
) ;
//进行签收数据补录或者修改
//查询是否存在签收装车信息
DistributionLoadscanEntity loadscanEntity = distributionLoadscanService . getOne ( Wrappers . < DistributionLoadscanEntity > query ( ) . lambda ( )
. eq ( DistributionLoadscanEntity : : getReservationId , reservationId )
. eq ( DistributionLoadscanEntity : : getPackageId , zeroPackageIds )
. ne ( DistributionLoadscanEntity : : getScanStatus , LoadingStatusConstant . quxiao . getValue ( ) )
) ;
String driverName = "" ;
String driverPhone = "" ;
String vehicleNub = "" ;
Long loadingId = null ;
//查询该车次负责司机
List < DistributionDeliverySelfVO > deliverySelfInfo = distributionDeliverySelfMapper . getDeliverySelfInfo ( deliveryListEntity . getId ( ) ) ;
//在库数
int a = 0 ;
//签收数
int b = 0 ;
//出库数
int c = 0 ;
//冻结数
int d = 0 ;
if ( Func . isEmpty ( loadscanEntity ) ) {
if ( "1" . equals ( deliveryListEntity . getKind ( ) ) ) {
//自主配送
driverPhone = deliverySelfInfo . stream ( ) . filter ( f - > 2 = = f . getIsMaster ( ) ) . map ( DistributionDeliverySelfVO : : getDriverPhone ) . collect ( Collectors . joining ( "," ) ) ;
driverName = deliverySelfInfo . stream ( ) . filter ( f - > 2 = = f . getIsMaster ( ) ) . map ( DistributionDeliverySelfVO : : getDriverName ) . collect ( Collectors . joining ( "," ) ) ;
vehicleNub = deliverySelfInfo . stream ( ) . filter ( f - > 2 = = f . getIsMaster ( ) ) . map ( DistributionDeliverySelfVO : : getVehicleNub ) . collect ( Collectors . joining ( "," ) ) ;
List < Long > collect = deliverySelfInfo . stream ( ) . filter ( f - > 2 = = f . getIsMaster ( ) ) . map ( DistributionDeliverySelfVO : : getId ) . collect ( Collectors . toList ( ) ) ;
loadingId = collect . get ( 0 ) ;
} else if ( "2" . equals ( deliveryListEntity . getKind ( ) ) ) {
//外协
} else {
log . error ( method + "配送司机异常:{}" , distrilbutionloadingscanDTO . getDeliveryId ( ) ) ;
return R . fail ( "请联系管理员" ) ;
}
a = distributionParcelNumberDTO . getHandQuantity ( ) - reservationZeroPackageEntities . getQuantity ( ) ;
b = distributionParcelNumberDTO . getSigninQuantity ( ) + reservationZeroPackageEntities . getQuantity ( ) ;
c = distributionParcelNumberDTO . getOutboundQuantity ( ) + reservationZeroPackageEntities . getQuantity ( ) ;
d = distributionParcelNumberDTO . getDeliveryQuantity ( ) - reservationZeroPackageEntities . getQuantity ( ) ;
//未进行装车操作
DistributionLoadscanEntity unLoadscanEntity = new DistributionLoadscanEntity ( ) ;
SimpleDateFormat simpleDateFormat = new SimpleDateFormat ( "yyyy-MM-dd HH:mm:ss.sss" ) ;
unLoadscanEntity . setScanStatus ( LoadingStatusConstant . buluzhuangche . getValue ( ) ) ;
unLoadscanEntity . setIsInsert ( 2 ) ;
unLoadscanEntity . setLoadingId ( loadingId . toString ( ) ) ;
unLoadscanEntity . setOrderId ( reservationZeroPackageEntities . getStockArticleId ( ) ) ;
unLoadscanEntity . setPackageId ( reservationZeroPackageEntities . getParcelListId ( ) ) ;
unLoadscanEntity . setReservationId ( reservationId ) ;
unLoadscanEntity . setIsSignfor ( 1 ) ;
unLoadscanEntity . setDeliveryId ( distrilbutionloadingscanDTO . getDeliveryId ( ) ) ;
unLoadscanEntity . setScanUser ( user . getNickName ( ) ) ;
unLoadscanEntity . setIsAbnormalSigning ( 1 ) ;
unLoadscanEntity . setIsAbnormalLoading ( 1 ) ;
unLoadscanEntity . setIsZero ( 1 ) ;
unLoadscanEntity . setTrainNumber ( deliveryListEntity . getTrainNumber ( ) ) ;
unLoadscanEntity . setVehicleId ( deliveryListEntity . getVehicleId ( ) ) ;
unLoadscanEntity . setVehicleName ( vehicleNub ) ;
unLoadscanEntity . setDriverId ( deliveryListEntity . getDriverId ( ) ) ;
unLoadscanEntity . setDriverName ( driverName ) ;
unLoadscanEntity . setDriverPhone ( driverPhone ) ;
unLoadscanEntity . setLoadingId ( driverPhone ) ;
unLoadscanEntity . setScanType ( LoadingStatusConstant . buluzhuangche . getValue ( ) ) ;
unLoadscanEntity . setScanTime ( simpleDateFormat . format ( new Date ( ) ) ) ;
unLoadscanEntity . setSigningTime ( simpleDateFormat . format ( new Date ( System . currentTimeMillis ( ) + ( 6 * 1000 ) ) ) ) ;
unLoadscanEntity . setSignforState ( LoadScanSigningStatusConstant . yiqianshou . getValue ( ) ) ;
unLoadscanEntity . setSigningUserId ( user . getUserId ( ) ) ;
unLoadscanEntity . setSigningUser ( user . getNickName ( ) ) ;
unLoadscanEntity . setIsSignfor ( 2 ) ;
unLoadscanEntity . setSignforState ( 2 ) ;
// loadscanEntity.setSigningTime(new Date().toString());
unLoadscanEntity . setReceivedQuantity ( reservationZeroPackageEntities . getQuantity ( ) ) ;
unLoadscanEntity . setLoadedNub ( reservationZeroPackageEntities . getQuantity ( ) ) ;
unLoadscanEntity . setPackageNub ( reservationZeroPackageEntities . getQuantity ( ) ) ;
unLoadscanEntity . setOneClick ( 1 ) ;
unLoadscanEntity . setOneQclick ( 1 ) ;
unLoadscanEntity . setMsg ( "文员进行零担订单装车和签收补录" ) ;
distributionLoadscanService . save ( unLoadscanEntity ) ;
//更新装车和签收数量
Integer i = distributionSignforMapper . updateSignforByReservationId ( unLoadscanEntity . getDeliveryId ( ) , unLoadscanEntity . getReservationId ( ) , unLoadscanEntity . getReceivedQuantity ( ) ) ;
//更新装车时间
Integer j = distributionDeliveryListMapper . updateloadingTimeById ( distrilbutionloadingscanDTO . getDeliveryId ( ) ) ;
//更新零担包件的数量
distributionParcelNumberEntity . setHandQuantity ( a ) ;
distributionParcelNumberEntity . setSigninQuantity ( b ) ;
distributionParcelNumberEntity . setOutboundQuantity ( c ) ;
distributionParcelNumberEntity . setDeliveryQuantity ( d ) ;
} else {
a = distributionParcelNumberEntity . getHandQuantity ( ) + loadscanEntity . getLoadedNub ( ) - reservationZeroPackageEntities . getQuantity ( ) ;
b = distributionParcelNumberEntity . getSigninQuantity ( ) - loadscanEntity . getReceivedQuantity ( ) + reservationZeroPackageEntities . getQuantity ( ) ;
c = distributionParcelNumberEntity . getOutboundQuantity ( ) - loadscanEntity . getReceivedQuantity ( ) + reservationZeroPackageEntities . getQuantity ( ) ;
d = distributionParcelNumberEntity . getDeliveryQuantity ( ) + loadscanEntity . getReceivedQuantity ( ) - reservationZeroPackageEntities . getQuantity ( ) ;
//存在装车操作
loadscanEntity . setSigningUser ( user . getNickName ( ) ) ;
loadscanEntity . setIsSignfor ( 2 ) ;
loadscanEntity . setSignforState ( LoadScanSigningStatusConstant . yiqianshou . getValue ( ) ) ;
// loadscanEntity.setSigningTime(new Date().toString());
loadscanEntity . setReceivedQuantity ( reservationZeroPackageEntities . getQuantity ( ) ) ;
loadscanEntity . setLoadedNub ( reservationZeroPackageEntities . getQuantity ( ) ) ;
loadscanEntity . setPackageNub ( reservationZeroPackageEntities . getQuantity ( ) ) ;
loadscanEntity . setMsg ( "文员进行签收补录" ) ;
distributionLoadscanService . updateById ( loadscanEntity ) ;
distributionParcelNumberEntity . setHandQuantity ( a ) ;
distributionParcelNumberEntity . setSigninQuantity ( b ) ;
distributionParcelNumberEntity . setOutboundQuantity ( c ) ;
distributionParcelNumberEntity . setDeliveryQuantity ( d ) ;
}
distributionParcelListService . maintenanceZeroPackageInfo ( distributionParcelNumberEntity . getParcelListId ( ) , stockArticleEntity . getWarehouseId ( ) ) ;
distributionParcelNumberService . updateById ( distributionParcelNumberEntity ) ;
//维护订单
distributionStockArticleService . maintenanceOrderInfo ( stockArticleEntity . getOrderCode ( ) , stockArticleEntity . getWarehouseId ( ) ) ;
//维护配送单信息
deliveryListEntity . setDeliveryStatus ( DeliveryStatusConstant . peisongzhong . getValue ( ) ) ;
distributionDeliveryListService . updateById ( deliveryListEntity ) ;
//维护客户状态
distributionReservationService . maintenanceReservationInfo ( reservationId ) ;
return R . success ( "操作成功" ) ;
}
private List < DeliveryNodeVo > handleStockUp ( DistributionStockupEntity distributionStockupEntity ) {
List < DeliveryNodeVo > nodeVos = new ArrayList < > ( ) ;
try {
@ -2617,8 +2951,13 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
// stockListEntity.setOutboundQuantity(stockListEntity.getOutboundQuantity() + distributionLoadscaninvnEntity.getPackageNub());
// distributionStockListService.updateById(stockListEntity);
// distributionAsyncService.checkSignStatus(null, distributionLoadscaninvnEntity.getReservationId(),distributionLoadscaninvnEntity.getDeliveryId());
}
//进行库存品包件状态维护
DisStockListDetailEntity disStockListDetailEntity = new DisStockListDetailEntity ( ) ;
disStockListDetailEntity . setId ( inventory . get ( 0 ) . getId ( ) ) ;
disStockListDetailEntity . setStockLockingStatus ( InventoryLoadingStatusConstant . yizhuangche . getValue ( ) ) ;
disStockListDetailEntity . setStockSignfoStatus ( InventorySigningStatusConstant . yiqianshou . getValue ( ) ) ;
disStockListDetailService . updateById ( disStockListDetailEntity ) ;
} else if ( inventory . isEmpty ( ) ) {
//这里就需要查询整个配送计划是否存在该码值的库存品包件
List < DisStockListDetailEntity > listDetailEntities = distributionDeliveryListMapper . selectInventoryListByDeliveryListId ( distrilbutionloadingscanDTO . getReservationId ( ) ) ;