At a gas station without employees, users need to directly enter the amount of energy liters to be added to the gas station. This operation has learning costs and operational difficulties for users. For the gas station, the keyboard of the gas station may be damaged due to user misoperation. For this reason, we designed two ways to preset refueling on the user APP of the gas station.

The first way to preset refueling
Find the corresponding site on the APP, click on the site, and you can see all the information on the gas guns on the site. Users can quickly understand the gun number, energy type, energy unit price, and whether the current status of the gun is available so that they can quickly choose the gas gun they need to refuel.

The second way to preset refueling
Use the APP to scan the QR code on the gas station, directly obtain the gun information on the gas station, enter the preset page, fill in the preset information, and start refueling. This method is suitable for the case where the user has found the gas station to be used and can directly scan the QR code of the gas station.

If you need to scan the QR code, you need to design a set of QR code usage logic first. The QR code contains site information and gun number. After the APP scans the QR code, it identifies the QR code information and verifies the site information first. If the site information exists and is correct, then the gun number is verified. When the gun number is confirmed to exist, it jumps to the preset page. At this time, the preset information entered by the user will be sent to the gun number of the site.

After setting the QR code, you need to design the scanning logic to ensure that the scanned QR code content conforms to the format of “site number, the gun number”. First, check whether there are two parts in the QR code, and whether both parts are not empty, then assign the correct data type to the scanned site number and gun number, and finally pass the site number and gun number to the preset page.
When designing the code-scanning function, you need to pay attention to some details.
For example, set a reasonable scanning time to ensure that users can scan the code smoothly while avoiding multiple scan errors; if the program has processed the scan result once, it will not continue to process the QR code. When the scanned QR code is not empty, the scanning function will be paused to prevent repeated scanning; when the scanned QR code is empty, remind the user that the QR code is empty; when the scanned QR code content is invalid, remind the user that the QR code content is invalid and please scan the correct QR code. This operation can avoid dangerous operations caused by scanning the wrong QR code. After scanning the wrong QR code multiple times, multiple error reminders will be generated. During the continuous process of error reminders, the error message prompt will stop after scanning the correct QR code.