TruskExpeditionCheckCommand
extends ContainerAwareCommand
in package
uses
LockableTrait
Class TruskExpeditionCheckCommand
Table of Contents
Properties
- $container : ContainerInterface
- $entityManager : EntityManagerInterface|null
- $truskService : TruskService
Methods
- __construct() : mixed
- configure() : mixed
- execute() : mixed
- createOrUpdateShipmentTrackingStatusHistory() : mixed
- Create or update shipment tracking status history
- findOrCreateSaleProductShipment() : mixed
- Find or create SaleProductShipment - Force shipmentType to SHP
- findOrCreateSaleProductShipmentTracking() : mixed
- Find or create SaleProductShipmentTracking
- handleControlled() : mixed
- Handle controlled event
- handleDropoffCompleted() : mixed
- Handle dropoff_completed event - Complete shipment processing
- handleOrderCreated() : mixed
- Handle order_created event
- processShipmentTracking() : mixed
- Process shipment tracking records for SaleProduct with status priority logic
- shouldProcessFile() : bool
- Check if file should be processed (only 2025 onwards based on timestamp)
- shouldUpdateShipmentStatus() : bool
- Determine if shipment status should be updated based on priority
- updateSaleProductTrackingLinks() : mixed
- Update SaleProduct tracking links if missing
- updateShipmentTrackingLinks() : mixed
- Update SaleProductShipmentTracking links
Properties
$container
protected
ContainerInterface
$container
$entityManager
private
EntityManagerInterface|null
$entityManager
$truskService
private
TruskService
$truskService
Methods
__construct()
public
__construct([mixed $name = null ][, EntityManagerInterface $entityManager = null ], TruskService $truskService) : mixed
Parameters
- $name : mixed = null
- $entityManager : EntityManagerInterface = null
- $truskService : TruskService
configure()
protected
configure() : mixed
execute()
protected
execute(InputInterface $input, OutputInterface $output) : mixed
Parameters
- $input : InputInterface
- $output : OutputInterface
createOrUpdateShipmentTrackingStatusHistory()
Create or update shipment tracking status history
private
createOrUpdateShipmentTrackingStatusHistory(mixed $shipmentTracking, mixed $eventCode, mixed $comment, mixed $timestamp, mixed $now, OutputInterface $output) : mixed
Parameters
- $shipmentTracking : mixed
- $eventCode : mixed
- $comment : mixed
- $timestamp : mixed
- $now : mixed
- $output : OutputInterface
findOrCreateSaleProductShipment()
Find or create SaleProductShipment - Force shipmentType to SHP
private
findOrCreateSaleProductShipment(mixed $saleProduct, mixed $user, mixed $now, OutputInterface $output) : mixed
Parameters
- $saleProduct : mixed
- $user : mixed
- $now : mixed
- $output : OutputInterface
findOrCreateSaleProductShipmentTracking()
Find or create SaleProductShipmentTracking
private
findOrCreateSaleProductShipmentTracking(mixed $shipment, mixed $saleProduct, mixed $now, OutputInterface $output) : mixed
Parameters
- $shipment : mixed
- $saleProduct : mixed
- $now : mixed
- $output : OutputInterface
handleControlled()
Handle controlled event
private
handleControlled(Sale $sale, mixed $saleProduct, mixed $user) : mixed
Parameters
- $sale : Sale
- $saleProduct : mixed
- $user : mixed
handleDropoffCompleted()
Handle dropoff_completed event - Complete shipment processing
private
handleDropoffCompleted(Sale $sale, SaleProduct $saleProduct, mixed $user, mixed $saleService, OutputInterface $output) : mixed
Parameters
- $sale : Sale
- $saleProduct : SaleProduct
- $user : mixed
- $saleService : mixed
- $output : OutputInterface
handleOrderCreated()
Handle order_created event
private
handleOrderCreated(mixed $saleProduct, string $comment, mixed $saleProductService) : mixed
Parameters
- $saleProduct : mixed
- $comment : string
- $saleProductService : mixed
processShipmentTracking()
Process shipment tracking records for SaleProduct with status priority logic
private
processShipmentTracking(SaleProduct $saleProduct, string $eventCode, string $comment, string $timestamp, string $truskCustomer, mixed $user, OutputInterface $output) : mixed
Parameters
- $saleProduct : SaleProduct
- $eventCode : string
- $comment : string
- $timestamp : string
- $truskCustomer : string
- $user : mixed
- $output : OutputInterface
shouldProcessFile()
Check if file should be processed (only 2025 onwards based on timestamp)
private
shouldProcessFile(string $fileName, OutputInterface $output) : bool
Parameters
- $fileName : string
- $output : OutputInterface
Return values
boolshouldUpdateShipmentStatus()
Determine if shipment status should be updated based on priority
private
shouldUpdateShipmentStatus(string|null $currentStatus, string $newStatus, OutputInterface $output) : bool
Parameters
- $currentStatus : string|null
- $newStatus : string
- $output : OutputInterface
Return values
boolupdateSaleProductTrackingLinks()
Update SaleProduct tracking links if missing
private
updateSaleProductTrackingLinks(SaleProduct $saleProduct, OutputInterface $output) : mixed
Parameters
- $saleProduct : SaleProduct
- $output : OutputInterface
updateShipmentTrackingLinks()
Update SaleProductShipmentTracking links
private
updateShipmentTrackingLinks(SaleProductShipmentTracking $shipmentTracking, SaleProduct $saleProduct, OutputInterface $output) : mixed
Parameters
- $shipmentTracking : SaleProductShipmentTracking
- $saleProduct : SaleProduct
- $output : OutputInterface