路边停车收费管理系统由车牌识别手持机+停车收费APP+后台管理系统三大部分组成,全面支撑停车场收费员 *** 作端、领导管控端的运维工作。
基于物联网、云计算平台,通过采集车辆车牌号进行车辆出入场登记,依据收费规则自动核算停车时长和停车费用,完成停车费收款和小票打印工作。
介绍
在路边停车收费管理系统内,管理者在后台统一规划辖区内停车位,分别指定各区域收费责任人,按区域分配权限。收费员使用车牌识别手持机即可完成自己片区内停车位的收费工作。
车辆进入停车位后,收费员使用车牌识别手持机采集车牌号,形成入场记录,系统开始计时。离场时 *** 作相同。
停车收费APPE停管家根据出入场时间、停车时长,根据收费规则,自动计时计费。杜绝人为计算出错。
#include<stdioh>
#include<stdlibh>
#include<stringh>
#define MAX 20
#define price 005
typedef struct time{
int hour;
int min;
}Time;
typedef struct node{
char num[10];
Time reach;
Time leave;
}CarNode;
typedef struct NODE{
CarNode stack[MAX+1];
int top;
}SeqStackCar;
typedef struct car{
CarNode data;
struct car next;
}QueueNode;
typedef struct Node{
QueueNode head;
QueueNode rear;
}LinkQueueCar;
void InitStack(SeqStackCar );
int InitQueue(LinkQueueCar );
int Arrival(SeqStackCar ,LinkQueueCar );
void Leave(SeqStackCar ,SeqStackCar ,LinkQueueCar );
void List(SeqStackCar,LinkQueueCar);
void main()
{
SeqStackCar Enter,Temp;
LinkQueueCar Wait;
int ch;
InitStack(&Enter);
InitStack(&Temp);
InitQueue(&Wait);
while(1)
{
printf("\n1 车辆到达登记");
printf(" 2 车辆离开登记");
printf(" 3 车辆列表显示");
printf(" 4 退出系统\n");
while(1)
{
scanf("%d",&ch);
if(ch>=1&&ch<=4)break;
else printf("\n请选择: 1~4");
}
switch(ch)
{
case 1:Arrival(&Enter,&Wait);break;
case 2:Leave(&Enter,&Temp,&Wait);break;
case 3:List(Enter,Wait);break;
case 4:exit(0);
default: break;
}
}
}
void InitStack(SeqStackCar s){
int i;
s->top=0;
for(i=0;i<=MAX;i++)
s->stack[s->top]=NULL;
}
int InitQueue(LinkQueueCar Q){
Q->head=(QueueNode )malloc(sizeof(QueueNode));
if(Q->head!=NULL)
{
Q->head->next=NULL;
Q->rear=Q->head;
return(1);
}
else return(-1);
}
void PRINT(CarNode p,int room){
int A1,A2,B1,B2;
printf("\n车辆离开的时间:");
scanf("%d:%d",&(p->leavehour),&(p->leavemin));
printf("\n离开车辆的车牌号为:");
puts(p->num);
printf("\n其到达时间为: %d:%d",p->reachhour,p->reachmin);
printf("离开时间为: %d:%d",p->leavehour,p->leavemin);
A1=p->reachhour;
A2=p->reachmin;
B1=p->leavehour;
B2=p->leavemin;
printf("\n应交费用为: %21f元",((B1-A1)60+(B2-A2))price);
free(p);
}
int Arrival(SeqStackCar Enter,LinkQueueCar W){
CarNode p;
QueueNode t;
p=(CarNode )malloc(sizeof(CarNode));
flushall();
printf("\n请输入车牌号(例:豫B1234):");
gets(p->num);
if(Enter->top<MAX)
{
Enter->top++;
printf("\n车辆在车场第%d位置",Enter->top);
printf("\n车辆到达时间:");
scanf("%d:%d",&(p->reachhour),&(p->reachmin));
Enter->stack[Enter->top]=p;
return(1);
}
else
{
printf("\n该车须在便道等待!有车位时进入车场");
t=(QueueNode )malloc(sizeof(QueueNode));
t->data=p;
t->next=NULL;
W->rear->next=t;
W->rear=t;
return(1);
}
}
void Leave(SeqStackCar Enter,SeqStackCar Temp,LinkQueueCar W)
{
int room;
CarNode p,t;
QueueNode q;
if(Enter->top>0)
{
while(1)
{
printf("\n请输入车在车场的位置/1--%d/:",Enter->top);
scanf("%d",&room);
if(room>=1&&room<=Enter->top) break;
}
while(Enter->top>room)
{
Temp->top++;
Temp->stack[Temp->top]=Enter->stack[Enter->top];
Enter->stack[Enter->top]=NULL;
Enter->top--;
}
p=Enter->stack[Enter->top];
Enter->stack[Enter->top]=NULL;
Enter->top--;
while(Temp->top>=1)
{
Enter->top++;
Enter->stack[Enter->top]=Temp->stack[Temp->top];
Temp->stack[Temp->top]=NULL;
Temp->top--;
}
PRINT(p,room);
if((W->head!=W->rear)&&Enter->top<MAX)
{
q=W->head->next;
t=q->data;
Enter->top++;
printf("\n便道的%s号车进入车场第%d位置",t->num,Enter->top);
printf("\n请输入%s号车进入车场的时间:");
scanf("%d:%d",&(t->reachhour),&(t->reachmin));
W->head->next=q->next;
if(q==W->rear) W->rear=W->head;
Enter->stack[Enter->top]=t;
free(q);
}
else printf("\n便道里没有车\n");
}
else printf("\n车场里没有车");
}
void List1(SeqStackCar S)
{
int i;
if(S->top>0)
{
printf("\n车场:");
printf("\n 位置到达时间 车牌号\n");
for(i=1;i<=S->top;i++)
{
printf(" %d ",i);
printf(" %d:%d ",S->stack[i]->reachhour,S->stack[i]->reachmin);
puts(S->stack[i]->num);
}
}
else printf("\n车场里没有车");
}
void List2(LinkQueueCar W)
{
QueueNode p;
p=W->head->next;
if(W->head!=W->rear)
{
printf("\n等待车辆的号码为:");
while(p!=NULL)
{
puts(p->data->num);
p=p->next;
}
}
else printf("\n便道里没有车");
}
void List(SeqStackCar S,LinkQueueCar W)
{
int flag,tag;
flag=1;
while(flag)
{
printf("\n请选择 1|2|3:");
printf("\n1车场列表\n2便道列表\n3返回主菜单\n");
while(1)
{
scanf("%d",&tag);
if(tag>=1||tag<=3) break;
else printf("\n请选择 1~3:");
}
switch(tag)
{
case 1:List1(&S);break;
case 2:List2(&W);break;
case 3:flag=0;break;
default: break;
}
}
}
代码如下,仅实现功能,未考虑安全等情况
//ParkingTestjava/
停车程序入口本示例为考虑数据安全等仅作为示例,未经调试
@author menglg
/
public class ParkingTest {
public static void main(String[] args) {
// 程序入口,可以安排停车出车
for (int i = 0; i < 100; i++) {
if (ParkingManagehasPosition()) {
ParkingManageenterParking(i + "");
continue;
}
break;
}
for (int i = 0; i < 100; i++) {
ParkingManageoutParking(i + "");
}
Systemoutprintln(ParkingManagetotalCost());
}
}
//ParkingManagejava
import javautilArrayList;
import javautilDate;
import javautilList;
public class ParkingManage {
private static List<Parking> parkings = new ArrayList<>();
private static final int maxNumber = 100;
private static int currentNumber;
public static void enterParking(String lpn) {
if (lpn == null || lpnlength() == 0) {
return;
}
Parking p = new Parking(lpn);
psetEnterDate(new Date());
parkingsadd(p);
}
public static void outParking(String lpn) {
if (lpn == null || lpnlength() == 0) {
return;
}
for (Parking p : parkings) {
if (!lpnequals(pgetLpn()))
continue;
Date now = new Date();
psetOutDate(now);
parkingsremove(p);
currentNumber += pgetCost();
break;
}
}
public static int totalCost() {
return currentNumber;
}
public static boolean hasPosition() {
return parkingssize() < maxNumber;
}
}
//Parkingjava
import javautilDate;
public class Parking {
private String lpn;
private Date enterDate;
private Date outDate;
private int cost;
public Parking(String lpn) {
thislpn = lpn;
}
public String getLpn() {
return lpn;
}
public Date getEnterDate() {
return enterDate;
}
public Date getOutDate() {
return outDate;
}
public int getCost() {
if(outDate == null || enterDate == null){
return 0;
}
//停车时间,单位毫秒
long time = outDategetTime() - enterDategetTime();
long hour = 60601000;
if(time < hour){
cost = 3;
}else if(time%hour == 0){
cost = (int)(time/hour 2);
}else{
cost = (int)((time/hour+1) 2);
}
return cost;
}
public void setLpn(String lpn) {
thislpn = lpn;
}
public void setEnterDate(Date enterDate) {
thisenterDate = enterDate;
}
public void setOutDate(Date outDate) {
thisoutDate = outDate;
}
public void setCost(int cost) {
thiscost = cost;
}
}
以上就是关于路边停车位自动收费系统全部的内容,包括:路边停车位自动收费系统、数据结构课程设计--用栈建立一个停车场管理系统、java 编程,停车收费简易系统等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)