User Tools

Site Tools


ra:phm

PHM

PHM module is responsible mostly for car fueling, petrol stations and related things.

Common terms:

  • AVP - device for refueling (diesel, oil …). There are two types of AVPs - old one AVP31, new one AVPs - AVP41
  • Fuel stations - can have more AVPs

Data and relations

  • FuelStation - important is FSCode
  • PHMIdentity - some identity for fueling, mosty by some RFID card, chip card etc. determines the car of vehicle or some external entity for fueling. Important is ChipNumber.
  • PHMFuelStationIdentity - if some identity can fueling on fuel station. Important is also ValidFrom
  • PHMAVP - which AVP is presented od some FuelStation. Important is ID_FUELSTATION

Identity makes the transactions - PhmTransaction table. Important are

  • StandNumber - FuelStation.FSCode
  • IdentityDriver, IdentityVehicle - identity which made transaction - PhmIdentity.ChipNumber
  • ID_AVP - AVP which was used for transaction PHMAVP.ID_AVP
  • TransactionStart - when the transaction was made

Data Flow, Processing

Synchronization: fuel stations, vehicles, chip numbers, fuel station FSCodes.

Vehicles are synchronized mostly from customers external data e.g. SAP for SD customer into some tables. Best usage for search vehicles is view PHMIdentityVehicleView. Column IdentityTextValue is value external customer car identifier for PHM. Same for Drivers with PHMIdentityDriverView.

Transaction processing:

  • Filling transaction - fill PHMTransaction table mostly from GSI software (our software) via KupsonManager. Some times from excel etc.
  • These transactions are then processed via TransactionManager into transaction data store - PHMTransactionDataStore table. This is done via service thread PHMTransaction.
  • Web application show data from table PHMTransactionDataStore.

When some data from PHMTransactionDataStore are deleted, these can be again recalculated via PHMTransaction service with TransactionManager. See bug for more information.

Filling transactions

On some customers with AVPs, method KupsonManager.SynchronizeAllDevices - there is both direction synchronization:

  • information about AVP devices into our db - PHMTransaction
  • information back to AVPs - mostly chip numbers, cards.

Time intervals for synchronizations are newly defined in db - PR

Processing with TransactionManager

  • reads amount of transaction from PHMTransaction process these amount in loop
  • process vehicles, drivers, identities
  • process nozzles from transaction: save record from transactions into PHMNozzleHistory table

Process identities in TransactionManager

Identity with chip number must be determined if is for vehicle, driver or external identy. There are view PHMIdentityVehicleView, PHMIdentityDriverView, PHMIdentityStandAloneView which are helpful for find which is source of identity of the transaction.

Photos

Transactions has photos made by some cameras on fuel stations. These photos are synced via rsync to APL_Service server (name in Terminals) in shared directory \\192.168.148.15\avp\AGROFERT\201801\overphoto\cam_R691_8.jpg. These are then synced with some service into db - table PHMTransactionPhoto.

ra/phm.txt · Last modified: 2018/10/05 18:49 by koubel