0% found this document useful (0 votes)
145 views78 pages

Vechical

This document describes a vehicle service management system project for Sea College of Science, Commerce and Arts. The project aims to design a new system using priority scheduling to help staff better organize repair tasks, especially during busy periods. It will assign tasks to mechanics based on who has completed the least work. This is intended to improve on a previous manual system that could result in unorganized tasks. The system will have admin, clerk, mechanic and customer users.

Uploaded by

vijay kumar n
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
145 views78 pages

Vechical

This document describes a vehicle service management system project for Sea College of Science, Commerce and Arts. The project aims to design a new system using priority scheduling to help staff better organize repair tasks, especially during busy periods. It will assign tasks to mechanics based on who has completed the least work. This is intended to improve on a previous manual system that could result in unorganized tasks. The system will have admin, clerk, mechanic and customer users.

Uploaded by

vijay kumar n
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 78

VEHICLE SERVICE MANAGEMENT SYSTEM

SEA COLLEGE OF SCIENCE, COMMERCE AND ARTS

Department of Computer Science and Applications

(AFFILIATED TO BANGALORE NORTH UNIVERSITY)

PROJECT ON

VEHICLE SERVICE MANAGEMENT SYSTEM

Submitted By

Varshini. M (CS201310)

Submitted To

1
VEHICLE SERVICE MANAGEMENT SYSTEM
Mr. Manjunatha

INDEX

SL NO. CONTENTS PAGE NO.

2
VEHICLE SERVICE MANAGEMENT SYSTEM

ACKNOWLEDGEMENT

First of all, we indebted to the GOD ALMIGHTY for giving me an opportunity

to excel in our efforts to complete this project on time.

We express our sincere thanks to our respected dean Mr.Manjunath S, HOD,

Master of Science, SEA College of Science, Commerce, Arts for getting us

permission to undergo the project.

We record our heartfelt gratitude to our beloved professor Mr.Manjunath S for project

incharge, HOD, Departmant of computer science, SEA College of Science, Commerce,

Arts for rendering timely help for the successful completion of this project.

We are greatly indebted to our guide Prof. MR.Manjunath S, Department of

Computer Science SEA College of Science, Commerce, Arts for his/her inspirational

guidance, valuable suggestions and providing us a chance to express our technical

capabilities in every respect for the completion of the project work.

We thank our friends for the strong support and inspiration they have provided us

in bringing out this project.

Varshini. M (CS201310)

3
VEHICLE SERVICE MANAGEMENT SYSTEM

Abstract

Nowadays, the population of human on earth are increase. Most of them have

their own vehicle. So, the vehicle service center might be busy especially during festive

seasons. Unfortunately, the older version of this system used manual guideline which

can lead to unsorted task for repairs. Staff also will not have enough hands to handle

many customers at the same time. Thus, with the existing of Vehicle Service

Management System Using Priority Scheduling, vehicle service center management

can be managed easily. The objectives of this system are to design and develop a new

system which can help to manage task in more organize with Priority Scheduling

technique. This way, the task can be handling according to priority of booking time. It

is also to implement a system where the staffs who handle the repair task and distribute

the task accordingly. The system will assign the repair task to the staff that did the least

job for the day. This system will use Priority Scheduling technique which is use to

distribute job task and job schedule. In conclusion, the system will be able to help the

company to manage repairs and staffs compared to the older system which is use

manual guideline.

4
VEHICLE SERVICE MANAGEMENT SYSTEM

INTRODUCTION

The increase of vehicles productions in the domestic and worldwide market

have boosted the confidence of auto ancillary units and vehicles servicing sector. As

the servicing of existing vehicles population is an essential activity, there is large scope

in this area given the increasing number of vehicles of the road year after year. A

vehicles services station has to have facilities to service the vehicles, such as necessary

equipment facilitating, wheel alignment etc. Vehicle Service Management System

provides necessary services to the service station for efficient management.

Here in Bangalore, there are lots of holiday festivals throughout the year. People

with families will gather around together to celebrate the holidays. Some will have to

travel in order to return home to their families. But sometimes, the car service canter

might be busy especially during festive seasons since a lot of people decide to service

their vehicles at the same time.

Unfortunately, the older version of this system used manual guideline which

can lead to unsorted task for repairs. Staff also will not have enough hands to handle

many customers at the same time. The proposed of the Vehicles Service Management System is to

help the staffs to manage the tasking more organize with

Priority Scheduling technique. Besides, all the data will be kept in a database of the

system. Information can easily be retrieved in lesser time. Document and report

5
VEHICLE SERVICE MANAGEMENT SYSTEM
preparation can also be prepared in lesser time as well. It solves the problem of the

existing system and provides better information support for management.

This system involved four users which are admin, clerk, mechanic and

customer. Admin has authority to add new staff to the system. They also can view all

the reports that involved in this system. The clerk will manage customer that came to

vehicles service center and confirm the repair schedule. The clerk also will manage

all the payment and print the receipts for the customer. The mechanic will manage the

given task by repairing the vehicles that will be assigned by using Priority Scheduling

Technique. When the repaired task was done, they will update the repair status. After

the login process, they need to punch the card through this system which indicates that

they are already at the service centre and ready for the task. They also can manage their

profile and change the password. The customer can register and log into the system.

After that, they can book a date to service their vehicle. They also can view their

vehicle’s report.

6
VEHICLE SERVICE MANAGEMENT SYSTEM

OBJECTIVES

The objectives of the Vehicle Service Management System are:

1. To design a Vehicle Service Centre Management System using Priority

Scheduling Technique.

2. To develop a web based systems to manage the task in more organize.

3. To test the functionality of the system that includes Priority Scheduling

Technique.

SCOPE

The main scopes of the system:

ADMIN

First admin will login ( for username/password run following command in cmd )

py manage.py createsuperuser

Give username, email, password and your admin account will be created.

After login , admin can see how many customer, mechanic, recent service orders on dashboard

7
VEHICLE SERVICE MANAGEMENT SYSTEM
Admin can see/add/update/delete customers

Admin can see each customer invoice (if two request made by same customer it will show total

sum of both request)

Admin can see/add/update/delete mechanics

Admin can approve(hire) mechanics (requested by mechanic) based on their skills

Admin can see/update mechanic salary

Admin can see/update/delete request/enquiry for service sent by customer

Admin can also make request for service (suppose customer directly reached to service

center/office)

Admin can approve request for service made by customer and assign to mechanic for repairing and

will provide cost according to problem description

Admin can see all service cost of request (both approved and pending)

Admin can see feedbacks sent by customer/mechanic

MECHNIC

mechanic will apply for job by providing details like (skills, address, mobile etc.)

Admin will hire(approve) mechanic account based on skill

After account approval, mechanic can login into system

mechanic can see how many work (vehicles to repair) is assigned to me

mechanic can change status of service ('Repairing', 'Repairing Done') according to work progress

mechanic can see salary and how many vehicles he/she have repaired so far

8
VEHICLE SERVICE MANAGEMENT SYSTEM
mechanic can send feedback to admin

mechanic can see/edit their profile

CUSTOMER

customer will signup and login into system

customer can make request for service of their vehicle by providing details (vehicle number,

model, problem description etc.)

After Request approved by admin, customer can check cost, status of service

customer can delete request (Enquiry) if customer change their mind or not approved by admin

(ONLY PENDING REQUEST CAN BE DELETED )

customer can check status of Request(Enquiry) that is Pending, Approved, Repairing, Repairing

Done, Released

customer can check invoice details or repaired vehicles

customer can send feedback to admin

9
VEHICLE SERVICE MANAGEMENT SYSTEM
customer can see/edit their profile

LITERATURE

INTRODUCTION

This chapter provide the literature review for the system that will be developed.

The literature review is a process of reading, analysing, evaluating and summarizing

scholarly material about a specific. It can be a guideline to develop a new system so

that the new system can provide better or more functional than existing system.

RESEARCH

10
VEHICLE SERVICE MANAGEMENT SYSTEM

There are several journals related to the topic of the system that will be develop.

Many of them use different ways to make the appointment. There are some advantages

and disadvantages that we can analyse and then try to think for the added value that

we can apply in the system that we will develop

Bill Title Author Description Method Advantages Disadvantages

11
VEHICLE SERVICE MANAGEMENT SYSTEM

1 Priority Akinyemi To minimize the Priority Ease to The jobs

Dispatch Olasunkanmi completion time of Scheduling manage the are

Scheduling in O, Koyejo jobs, mean flow time, schedule for classified

an Oyebola lateness of jobs and mechanics. according

Automobile T processing cost. The to the

Repair and (2011) repair task will be distance

Maintenance processed on time by covered only.

Workshop the right man-right

time-right place-right

cost using priority

scheduling technique.

This paper

2. Scheduling N. investigates by an Artificial - Carefully

of Mechanics Shivasankara artificial neural Neural prepared

in n and P. network for selecting Network Response training

Automobile Senthilkumar mechanic in a car (ANN) time is very sets are

Repair Shops (2014) repair shop and fast for needed for

Using ANN quoting the reliable trained accurate

due date to the neural net. prediction

customer by Extensive

considering the Predictions knowledge

various complaints are base and

raised by the extrapolate expert advice

12
VEHICLE SERVICE MANAGEMENT SYSTEM
customer, complaints d from has to be

traced out by the the

expert mechanics past formulated in

during the initial experience the form of a

inspection, mechanics and are knowledge

available for service, reliable base

Vehicle in queue for

service and workload

of individual

mechanics.

To develop an online

3 Online Muhammad medical appointment Mobile Ease Limited

Medical Kamal using mobile Applicatio to for only

Appointment Arif application that can n and book a date certain

for Pusat Bin Razali make their Priority for user

Kesihatan (2017) appointment with the Scheduling appointmen

Unisza Using doctor via online with t process

Mobile the addition function via online

Application that is student from any

reminders that can mobile.

help reduce missed Able

appointments. A to

priority scheduling is reschedule

implemented in the

OnlineMedical appointmen

13
VEHICLE SERVICE MANAGEMENT SYSTEM
Appointment for t and the

Pusat Kesihatan user will

UniSZA system get the

during the process of notification

queue the disease if the

type that will be appointmen

chosen by student. t is

The most chronic rescheduled

diseases will be set .

into the highest priori

SUMMARY

This chapter discusses an overview about the concept of the

system. Literature review is important to help the developer to know the

problem from the previous system that can improves or the flow of the

new system. Besides, it helps the developer in understanding the system

and the chosen techniques more.

As the conclusion, Priority Scheduling is the most suitable

method to use in developing Vehicle Service Management System.

Priority scheduling is a method of scheduling processes based on

priority. By using this method, Vehicle Service Management System

will be able to make the repair schedules more organized and improve

productivity of the business, will be able to manage staff including

mechanic and distribute the tasks evenly to all the mechanics. This

14
VEHICLE SERVICE MANAGEMENT SYSTEM
system also will be able to provide a status notification to customer

when the repaired done.

SYSTEM REQUIREMENTS SPECIFICATION

Need for programming A key document that establishes the framework for the

process of product enhancement is the specification. It affords a depiction of the

important thing thing of the machine and notes the necessities of the system. A

SRS is essentially an organization's expertise of a patron's or capacity customer's

machine requirements and conditions at a certain second (regularly before any

actual planning or improvement work is achieved), written in printed reproduction.

A two- way insurance contract guarantees that the patron and the affiliation are

aware about each other's necessities from that angle at any given time. The SRS

additionally serves as a blueprint for finishing a assignment with as minimal fee

increase as is cheap. seeing that all subsequent assignment the board reviews,

15
VEHICLE SERVICE MANAGEMENT SYSTEM
which includes plan specifics, causes of labor, programming engineering

determinations, trying out and approval plans, and documentation plans, are tied to

the SRS, it is commonly referred to as the "discern" repository. it is essential to

keep in mind that an SRS only incorporates functional and non-practical wishes; it

would not offer plan ideas, potential answers for technological or business

troubles, or some other statistics outside what the development crew believes the

consumer's gadget requirements to be.

Hardware Requirement’s

Processor : I3/Intel Processor RAM :

4GB (min)

Hard Disk : 128 GB

Device : Laptop / Desktop

Software Requirement’s

Operating System : Windows 7 and above Server-

side Script : Python 3.6 and above

Database : SQL

16
VEHICLE SERVICE MANAGEMENT SYSTEM

METHODOLOGY

INTRODUCTION

In this section, the methodology that has been used to develop

Vehicle Service Centre Management System using Priority Scheduling

is described. The use of the methodology is to solve the entire problem

arising and to ensure that the project will work smoothly and can be

completed within the given time. There are many types of methodology

that can be applied and used in the system development. The approach

must be chosen correctly for the project. It is important to guide the

researcher to manage the given task. Hence, the Waterfall Model is used

for this project. Furthermore, every details about each phase that involve

17
VEHICLE SERVICE MANAGEMENT SYSTEM
in the development of this project and the system requirement will be

explained later in this chapter.

RESEARCH PARADIGM AND JUSTIFICATION

Waterfall model is a model which was developed for software

development. The basic idea it is called as such because the model

develops systematically from one phase to another phase in downwards

style like a waterfall. The phases consist of definition study or analysis,

basic design, technical design, construction and implementation, testing,

integration, and maintenance.

18
VEHICLE SERVICE MANAGEMENT SYSTEM

Waterfall Model

Waterfall model has been chosen based on the following

consideration:

1. Project Monitoring

19
VEHICLE SERVICE MANAGEMENT SYSTEM
- Each phase of the development is monitored from time to

time to ensure all the system module match earlier system

requirement.

2. Allow changes

- Any changes in developing the system can be implements

at every phase to improve the functionality of the system.

3. Save cost

- The development of the system can save the cost because

the information collected at each phase is very particular

until the final test of the system.

Block Diagram

20
VEHICLE SERVICE MANAGEMENT SYSTEM

Context Diagram

21
VEHICLE SERVICE MANAGEMENT SYSTEM
Figure above shows the Context Diagram for Vehicle Service

Centre Management System data flow. There are three main users

involve in this system which is Admin, Mechanic, and Customer.

All users are required to log in to the system in order to use this

system.

MANAGE SERVICE

MANAGE USER

22
VEHICLE SERVICE MANAGEMENT SYSTEM
Customer Custom
Custom Customer Information D1 er
er Information
vehicle D2Vehicle
Information
2.
Vehicle Information 1
ClerkClerk Information
Vie Staff D Staf
w Information 3 f
Mechanic
Mechan Information
ic Mechanic
Information
Admi Admin
n Information

2. Clerk Information Password


Reset Staff 2 Staff
Password
Admin Information Vehicle
Admin Data Updat
Mechanic Data e Information
Clerk data

Vehicle Data Customer


Customer Data Information

MANAGE STAFF

23
Staff Staff
3.1
Admi Data Information
n Staff D3 Sta
Add Staff ff
Staff Information
Information

VEHICLE SERVICE MANAGEMENT SYSTEM


3.2
Staff Staff
Data Information
Update Staff
Staff Staff
Information Information

3.3
Staff Staff
Data Information
Delete Staff
Staff Staff
Information Information

MANAGE SERVICE

24
VEHICLE SERVICE MANAGEMENT SYSTEM

MANAGE APPOINTMENT

25
VEHICLE SERVICE MANAGEMENT SYSTEM

FRAMEWORK

26
VEHICLE SERVICE MANAGEMENT SYSTEM

SCREENSHOTS

HOME PAGE

27
VEHICLE SERVICE MANAGEMENT SYSTEM

ADMIN DASHBOARD

28
VEHICLE SERVICE MANAGEMENT SYSTEM

MECHANIC DASHBOARD

29
VEHICLE SERVICE MANAGEMENT SYSTEM

CUSTOMER DASHBOARD

30
VEHICLE SERVICE MANAGEMENT SYSTEM

CODING

def home_view(request):

31
VEHICLE SERVICE MANAGEMENT SYSTEM
if request.user.is_authenticated:

return HttpResponseRedirect('afterlogin')

return render(request,'vehicle/index.html')

#for showing signup/login button for customer

def customerclick_view(request):

if request.user.is_authenticated:

return HttpResponseRedirect('afterlogin')

return render(request,'vehicle/customerclick.html')

#for showing signup/login button for mechanics

def mechanicsclick_view(request):

if request.user.is_authenticated:

return HttpResponseRedirect('afterlogin')

return render(request,'vehicle/mechanicsclick.html')

#for showing signup/login button for ADMIN(by sumit)

def adminclick_view(request):

if request.user.is_authenticated:

32
VEHICLE SERVICE MANAGEMENT SYSTEM
return HttpResponseRedirect('afterlogin')

return HttpResponseRedirect('adminlogin')

def customer_signup_view(request):

userForm=forms.CustomerUserForm()

customerForm=forms.CustomerForm()

mydict={'userForm':userForm,'customerForm':customerForm}

if request.method=='POST':

userForm=forms.CustomerUserForm(request.POST)

customerForm=forms.CustomerForm(request.POST,request.FILES)

if userForm.is_valid() and customerForm.is_valid():

user=userForm.save()

user.set_password(user.password)

user.save()

customer=customerForm.save(commit=False)

customer.user=user

customer.save()

my_customer_group =

Group.objects.get_or_create(name='CUSTOMER')

my_customer_group[0].user_set.add(user)

33
VEHICLE SERVICE MANAGEMENT SYSTEM
return HttpResponseRedirect('customerlogin')

return render(request,'vehicle/customersignup.html',context=mydict)

def mechanic_signup_view(request):

userForm=forms.MechanicUserForm()

mechanicForm=forms.MechanicForm()

mydict={'userForm':userForm,'mechanicForm':mechanicForm}

if request.method=='POST':

userForm=forms.MechanicUserForm(request.POST)

mechanicForm=forms.MechanicForm(request.POST,request.FILES)

if userForm.is_valid() and mechanicForm.is_valid():

user=userForm.save()

user.set_password(user.password)

user.save()

mechanic=mechanicForm.save(commit=False)

mechanic.user=user

mechanic.save()

my_mechanic_group =

Group.objects.get_or_create(name='MECHANIC')

my_mechanic_group[0].user_set.add(user)

34
VEHICLE SERVICE MANAGEMENT SYSTEM
return HttpResponseRedirect('mechaniclogin')

return render(request,'vehicle/mechanicsignup.html',context=mydict)

#for checking user customer, mechanic or admin(by sumit)

def is_customer(user):

return user.groups.filter(name='CUSTOMER').exists()

def is_mechanic(user):

return user.groups.filter(name='MECHANIC').exists()

def afterlogin_view(request):

if is_customer(request.user):

return redirect('customer-dashboard')

elif is_mechanic(request.user):

accountapproval=models.Mechanic.objects.all().filter(user_id=request.use

r.id,status=True)

if accountapproval:

return redirect('mechanic-dashboard')

else:

return render(request,'vehicle/mechanic_wait_for_approval.html')

35
VEHICLE SERVICE MANAGEMENT SYSTEM
else:

return redirect('admin-dashboard')

#=======================================================

=====================================

# ADMIN RELATED views start

#=======================================================

=====================================

@login_required(login_url='adminlogin')

def admin_dashboard_view(request):

enquiry=models.Request.objects.all().order_by('-id')

customers=[]

for enq in enquiry:

customer=models.Customer.objects.get(id=enq.customer_id)

customers.append(customer)

dict={

'total_customer':models.Customer.objects.all().count(),

'total_mechanic':models.Mechanic.objects.all().count(),

36
VEHICLE SERVICE MANAGEMENT SYSTEM
'total_request':models.Request.objects.all().count(),

'total_feedback':models.Feedback.objects.all().count(),

'data':zip(customers,enquiry),

return render(request,'vehicle/admin_dashboard.html',context=dict)

@login_required(login_url='adminlogin')

def admin_customer_view(request):

return render(request,'vehicle/admin_customer.html')

@login_required(login_url='adminlogin')

def admin_view_customer_view(request):

customers=models.Customer.objects.all()

return render(request,'vehicle/admin_view_customer.html',

{'customers':customers})

@login_required(login_url='adminlogin')

def delete_customer_view(request,pk):

customer=models.Customer.objects.get(id=pk)

37
VEHICLE SERVICE MANAGEMENT SYSTEM
user=models.User.objects.get(id=customer.user_id)

user.delete()

customer.delete()

return redirect('admin-view-customer')

@login_required(login_url='adminlogin')

def update_customer_view(request,pk):

customer=models.Customer.objects.get(id=pk)

user=models.User.objects.get(id=customer.user_id)

userForm=forms.CustomerUserForm(instance=user)

customerForm=forms.CustomerForm(request.FILES,instance=customer)

mydict={'userForm':userForm,'customerForm':customerForm}

if request.method=='POST':

userForm=forms.CustomerUserForm(request.POST,instance=user)

customerForm=forms.CustomerForm(request.POST,request.FILES,instan

ce=customer)

if userForm.is_valid() and customerForm.is_valid():

user=userForm.save()

user.set_password(user.password)

user.save()

38
VEHICLE SERVICE MANAGEMENT SYSTEM
customerForm.save()

return redirect('admin-view-customer')

return render(request,'vehicle/update_customer.html',context=mydict)

@login_required(login_url='adminlogin')

def admin_add_customer_view(request):

userForm=forms.CustomerUserForm()

customerForm=forms.CustomerForm()

mydict={'userForm':userForm,'customerForm':customerForm}

if request.method=='POST':

userForm=forms.CustomerUserForm(request.POST)

customerForm=forms.CustomerForm(request.POST,request.FILES)

if userForm.is_valid() and customerForm.is_valid():

user=userForm.save()

user.set_password(user.password)

user.save()

customer=customerForm.save(commit=False)

customer.user=user

customer.save()

39
VEHICLE SERVICE MANAGEMENT SYSTEM
my_customer_group =

Group.objects.get_or_create(name='CUSTOMER')

my_customer_group[0].user_set.add(user)

return HttpResponseRedirect('/admin-view-customer')

return render(request,'vehicle/admin_add_customer.html',context=mydict)

@login_required(login_url='adminlogin')

def admin_view_customer_enquiry_view(request):

enquiry=models.Request.objects.all().order_by('-id')

customers=[]

for enq in enquiry:

customer=models.Customer.objects.get(id=enq.customer_id)

customers.append(customer)

return render(request,'vehicle/admin_view_customer_enquiry.html',

{'data':zip(customers,enquiry)})

@login_required(login_url='adminlogin')

def admin_view_customer_invoice_view(request):

enquiry=models.Request.objects.values('customer_id').annotate(Sum('cost'))

40
VEHICLE SERVICE MANAGEMENT SYSTEM
print(enquiry)

customers=[]

for enq in enquiry:

print(enq)

customer=models.Customer.objects.get(id=enq['customer_id'])

customers.append(customer)

return render(request,'vehicle/admin_view_customer_invoice.html',

{'data':zip(customers,enquiry)})

@login_required(login_url='adminlogin')

def admin_mechanic_view(request):

return render(request,'vehicle/admin_mechanic.html')

@login_required(login_url='adminlogin')

def admin_approve_mechanic_view(request):

mechanics=models.Mechanic.objects.all().filter(status=False)

return render(request,'vehicle/admin_approve_mechanic.html',

{'mechanics':mechanics})

@login_required(login_url='adminlogin')

41
VEHICLE SERVICE MANAGEMENT SYSTEM
def approve_mechanic_view(request,pk):

mechanicSalary=forms.MechanicSalaryForm()

if request.method=='POST':

mechanicSalary=forms.MechanicSalaryForm(request.POST)

if mechanicSalary.is_valid():

mechanic=models.Mechanic.objects.get(id=pk)

mechanic.salary=mechanicSalary.cleaned_data['salary']

mechanic.status=True

mechanic.save()

else:

print("form is invalid")

return HttpResponseRedirect('/admin-approve-mechanic')

return render(request,'vehicle/admin_approve_mechanic_details.html',

{'mechanicSalary':mechanicSalary})

@login_required(login_url='adminlogin')

def delete_mechanic_view(request,pk):

mechanic=models.Mechanic.objects.get(id=pk)

user=models.User.objects.get(id=mechanic.user_id)

user.delete()

42
VEHICLE SERVICE MANAGEMENT SYSTEM
mechanic.delete()

return redirect('admin-approve-mechanic')

@login_required(login_url='adminlogin')

def admin_add_mechanic_view(request):

userForm=forms.MechanicUserForm()

mechanicForm=forms.MechanicForm()

mechanicSalary=forms.MechanicSalaryForm()

mydict={'userForm':userForm,'mechanicForm':mechanicForm,'mechanicSal

ary':mechanicSalary}

if request.method=='POST':

userForm=forms.MechanicUserForm(request.POST)

mechanicForm=forms.MechanicForm(request.POST,request.FILES)

mechanicSalary=forms.MechanicSalaryForm(request.POST)

if userForm.is_valid() and mechanicForm.is_valid() and

mechanicSalary.is_valid():

user=userForm.save()

user.set_password(user.password)

user.save()

mechanic=mechanicForm.save(commit=False)

43
VEHICLE SERVICE MANAGEMENT SYSTEM
mechanic.user=user

mechanic.status=True

mechanic.salary=mechanicSalary.cleaned_data['salary']

mechanic.save()

my_mechanic_group =

Group.objects.get_or_create(name='MECHANIC')

my_mechanic_group[0].user_set.add(user)

return HttpResponseRedirect('admin-view-mechanic')

else:

print('problem in form')

return render(request,'vehicle/admin_add_mechanic.html',context=mydict)

@login_required(login_url='adminlogin')

def admin_view_mechanic_view(request):

mechanics=models.Mechanic.objects.all()

return render(request,'vehicle/admin_view_mechanic.html',

{'mechanics':mechanics})

@login_required(login_url='adminlogin')

44
VEHICLE SERVICE MANAGEMENT SYSTEM
def delete_mechanic_view(request,pk):

mechanic=models.Mechanic.objects.get(id=pk)

user=models.User.objects.get(id=mechanic.user_id)

user.delete()

mechanic.delete()

return redirect('admin-view-mechanic')

@login_required(login_url='adminlogin')

def update_mechanic_view(request,pk):

mechanic=models.Mechanic.objects.get(id=pk)

user=models.User.objects.get(id=mechanic.user_id)

userForm=forms.MechanicUserForm(instance=user)

mechanicForm=forms.MechanicForm(request.FILES,instance=mechanic)

mydict={'userForm':userForm,'mechanicForm':mechanicForm}

if request.method=='POST':

userForm=forms.MechanicUserForm(request.POST,instance=user)

mechanicForm=forms.MechanicForm(request.POST,request.FILES,insta

nce=mechanic)

if userForm.is_valid() and mechanicForm.is_valid():

user=userForm.save()

45
VEHICLE SERVICE MANAGEMENT SYSTEM
user.set_password(user.password)

user.save()

mechanicForm.save()

return redirect('admin-view-mechanic')

return render(request,'vehicle/update_mechanic.html',context=mydict)

@login_required(login_url='adminlogin')

def admin_view_mechanic_salary_view(request):

mechanics=models.Mechanic.objects.all()

return render(request,'vehicle/admin_view_mechanic_salary.html',

{'mechanics':mechanics})

@login_required(login_url='adminlogin')

def update_salary_view(request,pk):

mechanicSalary=forms.MechanicSalaryForm()

if request.method=='POST':

mechanicSalary=forms.MechanicSalaryForm(request.POST)

if mechanicSalary.is_valid():

mechanic=models.Mechanic.objects.get(id=pk)

mechanic.salary=mechanicSalary.cleaned_data['salary']

mechanic.save()

46
VEHICLE SERVICE MANAGEMENT SYSTEM
else:

print("form is invalid")

return HttpResponseRedirect('/admin-view-mechanic-salary')

return render(request,'vehicle/admin_approve_mechanic_details.html',

{'mechanicSalary':mechanicSalary})

@login_required(login_url='adminlogin')

def admin_request_view(request):

return render(request,'vehicle/admin_request.html')

@login_required(login_url='adminlogin')

def admin_view_request_view(request):

enquiry=models.Request.objects.all().order_by('-id')

customers=[]

for enq in enquiry:

customer=models.Customer.objects.get(id=enq.customer_id)

customers.append(customer)

return render(request,'vehicle/admin_view_request.html',

{'data':zip(customers,enquiry)})

47
VEHICLE SERVICE MANAGEMENT SYSTEM

@login_required(login_url='adminlogin')

def change_status_view(request,pk):

adminenquiry=forms.AdminApproveRequestForm()

if request.method=='POST':

adminenquiry=forms.AdminApproveRequestForm(request.POST)

if adminenquiry.is_valid():

enquiry_x=models.Request.objects.get(id=pk)

enquiry_x.mechanic=adminenquiry.cleaned_data['mechanic']

enquiry_x.cost=adminenquiry.cleaned_data['cost']

enquiry_x.status=adminenquiry.cleaned_data['status']

enquiry_x.save()

else:

print("form is invalid")

return HttpResponseRedirect('/admin-view-request')

return render(request,'vehicle/admin_approve_request_details.html',

{'adminenquiry':adminenquiry})

@login_required(login_url='adminlogin')

def admin_delete_request_view(request,pk):

48
VEHICLE SERVICE MANAGEMENT SYSTEM
requests=models.Request.objects.get(id=pk)

requests.delete()

return redirect('admin-view-request')

@login_required(login_url='adminlogin')

def admin_add_request_view(request):

enquiry=forms.RequestForm()

adminenquiry=forms.AdminRequestForm()

mydict={'enquiry':enquiry,'adminenquiry':adminenquiry}

if request.method=='POST':

enquiry=forms.RequestForm(request.POST)

adminenquiry=forms.AdminRequestForm(request.POST)

if enquiry.is_valid() and adminenquiry.is_valid():

enquiry_x=enquiry.save(commit=False)

enquiry_x.customer=adminenquiry.cleaned_data['customer']

enquiry_x.mechanic=adminenquiry.cleaned_data['mechanic']

enquiry_x.cost=adminenquiry.cleaned_data['cost']

enquiry_x.status='Approved'

enquiry_x.save()

49
VEHICLE SERVICE MANAGEMENT SYSTEM
else:

print("form is invalid")

return HttpResponseRedirect('admin-view-request')

return render(request,'vehicle/admin_add_request.html',context=mydict)

@login_required(login_url='adminlogin')

def admin_approve_request_view(request):

enquiry=models.Request.objects.all().filter(status='Pending')

return render(request,'vehicle/admin_approve_request.html',

{'enquiry':enquiry})

@login_required(login_url='adminlogin')

def approve_request_view(request,pk):

adminenquiry=forms.AdminApproveRequestForm()

if request.method=='POST':

adminenquiry=forms.AdminApproveRequestForm(request.POST)

if adminenquiry.is_valid():

enquiry_x=models.Request.objects.get(id=pk)

enquiry_x.mechanic=adminenquiry.cleaned_data['mechanic']

enquiry_x.cost=adminenquiry.cleaned_data['cost']

enquiry_x.status=adminenquiry.cleaned_data['status']

50
VEHICLE SERVICE MANAGEMENT SYSTEM
enquiry_x.save()

else:

print("form is invalid")

return HttpResponseRedirect('/admin-approve-request')

return render(request,'vehicle/admin_approve_request_details.html',

{'adminenquiry':adminenquiry})

@login_required(login_url='adminlogin')

def admin_view_service_cost_view(request):

enquiry=models.Request.objects.all().order_by('-id')

customers=[]

for enq in enquiry:

customer=models.Customer.objects.get(id=enq.customer_id)

customers.append(customer)

print(customers)

return render(request,'vehicle/admin_view_service_cost.html',

{'data':zip(customers,enquiry)})

51
VEHICLE SERVICE MANAGEMENT SYSTEM

@login_required(login_url='adminlogin')

def update_cost_view(request,pk):

updateCostForm=forms.UpdateCostForm()

if request.method=='POST':

updateCostForm=forms.UpdateCostForm(request.POST)

if updateCostForm.is_valid():

enquiry_x=models.Request.objects.get(id=pk)

enquiry_x.cost=updateCostForm.cleaned_data['cost']

enquiry_x.save()

else:

print("form is invalid")

return HttpResponseRedirect('/admin-view-service-cost')

return render(request,'vehicle/update_cost.html',

{'updateCostForm':updateCostForm})

@login_required(login_url='adminlogin')

def admin_mechanic_attendance_view(request):

return render(request,'vehicle/admin_mechanic_attendance.html')

52
VEHICLE SERVICE MANAGEMENT SYSTEM

@login_required(login_url='adminlogin')

def admin_take_attendance_view(request):

mechanics=models.Mechanic.objects.all().filter(status=True)

aform=forms.AttendanceForm()

if request.method=='POST':

form=forms.AttendanceForm(request.POST)

if form.is_valid():

Attendances=request.POST.getlist('present_status')

date=form.cleaned_data['date']

for i in range(len(Attendances)):

AttendanceModel=models.Attendance()

AttendanceModel.date=date

AttendanceModel.present_status=Attendances[i]

print(mechanics[i].id)

print(int(mechanics[i].id))

mechanic=models.Mechanic.objects.get(id=int(mechanics[i].id))

AttendanceModel.mechanic=mechanic

AttendanceModel.save()

return redirect('admin-view-attendance')

53
VEHICLE SERVICE MANAGEMENT SYSTEM
else:

print('form invalid')

return render(request,'vehicle/admin_take_attendance.html',

{'mechanics':mechanics,'aform':aform})

@login_required(login_url='adminlogin')

def admin_view_attendance_view(request):

form=forms.AskDateForm()

if request.method=='POST':

form=forms.AskDateForm(request.POST)

if form.is_valid():

date=form.cleaned_data['date']

attendancedata=models.Attendance.objects.all().filter(date=date)

mechanicdata=models.Mechanic.objects.all().filter(status=True)

mylist=zip(attendancedata,mechanicdata)

return render(request,'vehicle/admin_view_attendance_page.html',

{'mylist':mylist,'date':date})

else:

print('form invalid')

return render(request,'vehicle/admin_view_attendance_ask_date.html',

{'form':form})

54
VEHICLE SERVICE MANAGEMENT SYSTEM

@login_required(login_url='adminlogin')

def admin_report_view(request):

reports=models.Request.objects.all().filter(Q(status="Repairing Done") |

Q(status="Released"))

dict={

'reports':reports,

return render(request,'vehicle/admin_report.html',context=dict)

@login_required(login_url='adminlogin')

def admin_feedback_view(request):

feedback=models.Feedback.objects.all().order_by('-id')

return render(request,'vehicle/admin_feedback.html',{'feedback':feedback})

#=======================================================

=====================================

# ADMIN RELATED views END

#=======================================================

=====================================

55
VEHICLE SERVICE MANAGEMENT SYSTEM

#=======================================================

=====================================

# CUSTOMER RELATED views start

#=======================================================

=====================================

@login_required(login_url='customerlogin')

@user_passes_test(is_customer)

def customer_dashboard_view(request):

customer=models.Customer.objects.get(user_id=request.user.id)

work_in_progress=models.Request.objects.all().filter(customer_id=custome

r.id,status='Repairing').count()

work_completed=models.Request.objects.all().filter(customer_id=customer.

id).filter(Q(status="Repairing Done") | Q(status="Released")).count()

new_request_made=models.Request.objects.all().filter(customer_id=custom

er.id).filter(Q(status="Pending") | Q(status="Approved")).count()

bill=models.Request.objects.all().filter(customer_id=customer.id).filter(Q(st

atus="Repairing Done") | Q(status="Released")).aggregate(Sum('cost'))

print(bill)

56
VEHICLE SERVICE MANAGEMENT SYSTEM
dict={

'work_in_progress':work_in_progress,

'work_completed':work_completed,

'new_request_made':new_request_made,

'bill':bill['cost__sum'],

'customer':customer,

return render(request,'vehicle/customer_dashboard.html',context=dict)

@login_required(login_url='customerlogin')

@user_passes_test(is_customer)

def customer_request_view(request):

customer=models.Customer.objects.get(user_id=request.user.id)

return render(request,'vehicle/customer_request.html',

{'customer':customer})

@login_required(login_url='customerlogin')

@user_passes_test(is_customer)

def customer_view_request_view(request):

57
VEHICLE SERVICE MANAGEMENT SYSTEM
customer=models.Customer.objects.get(user_id=request.user.id)

enquiries=models.Request.objects.all().filter(customer_id=customer.id ,

status="Pending")

return render(request,'vehicle/customer_view_request.html',

{'customer':customer,'enquiries':enquiries})

@login_required(login_url='customerlogin')

@user_passes_test(is_customer)

def customer_delete_request_view(request,pk):

customer=models.Customer.objects.get(user_id=request.user.id)

enquiry=models.Request.objects.get(id=pk)

enquiry.delete()

return redirect('customer-view-request')

@login_required(login_url='customerlogin')

@user_passes_test(is_customer)

def customer_view_approved_request_view(request):

customer=models.Customer.objects.get(user_id=request.user.id)

enquiries=models.Request.objects.all().filter(customer_id=customer.id).excl

ude(status='Pending')

58
VEHICLE SERVICE MANAGEMENT SYSTEM
return render(request,'vehicle/customer_view_approved_request.html',

{'customer':customer,'enquiries':enquiries})

@login_required(login_url='customerlogin')

@user_passes_test(is_customer)

def customer_view_approved_request_invoice_view(request):

customer=models.Customer.objects.get(user_id=request.user.id)

enquiries=models.Request.objects.all().filter(customer_id=customer.id).excl

ude(status='Pending')

return

render(request,'vehicle/customer_view_approved_request_invoice.html',

{'customer':customer,'enquiries':enquiries})

@login_required(login_url='customerlogin')

@user_passes_test(is_customer)

def customer_add_request_view(request):

customer=models.Customer.objects.get(user_id=request.user.id)

enquiry=forms.RequestForm()

if request.method=='POST':

59
VEHICLE SERVICE MANAGEMENT SYSTEM
enquiry=forms.RequestForm(request.POST)

if enquiry.is_valid():

customer=models.Customer.objects.get(user_id=request.user.id)

enquiry_x=enquiry.save(commit=False)

enquiry_x.customer=customer

enquiry_x.save()

else:

print("form is invalid")

return HttpResponseRedirect('customer-dashboard')

return render(request,'vehicle/customer_add_request.html',

{'enquiry':enquiry,'customer':customer})

@login_required(login_url='customerlogin')

@user_passes_test(is_customer)

def customer_profile_view(request):

customer=models.Customer.objects.get(user_id=request.user.id)

return render(request,'vehicle/customer_profile.html',{'customer':customer})

@login_required(login_url='customerlogin')

60
VEHICLE SERVICE MANAGEMENT SYSTEM
@user_passes_test(is_customer)

def edit_customer_profile_view(request):

customer=models.Customer.objects.get(user_id=request.user.id)

user=models.User.objects.get(id=customer.user_id)

userForm=forms.CustomerUserForm(instance=user)

customerForm=forms.CustomerForm(request.FILES,instance=customer)

mydict={'userForm':userForm,'customerForm':customerForm,'customer':cus

tomer}

if request.method=='POST':

userForm=forms.CustomerUserForm(request.POST,instance=user)

customerForm=forms.CustomerForm(request.POST,instance=customer)

if userForm.is_valid() and customerForm.is_valid():

user=userForm.save()

user.set_password(user.password)

user.save()

customerForm.save()

return HttpResponseRedirect('customer-profile')

return render(request,'vehicle/edit_customer_profile.html',context=mydict)

@login_required(login_url='customerlogin')

61
VEHICLE SERVICE MANAGEMENT SYSTEM
@user_passes_test(is_customer)

def customer_invoice_view(request):

customer=models.Customer.objects.get(user_id=request.user.id)

enquiries=models.Request.objects.all().filter(customer_id=customer.id).excl

ude(status='Pending')

return render(request,'vehicle/customer_invoice.html',

{'customer':customer,'enquiries':enquiries})

@login_required(login_url='customerlogin')

@user_passes_test(is_customer)

def customer_feedback_view(request):

customer=models.Customer.objects.get(user_id=request.user.id)

feedback=forms.FeedbackForm()

if request.method=='POST':

feedback=forms.FeedbackForm(request.POST)

if feedback.is_valid():

feedback.save()

else:

print("form is invalid")

62
VEHICLE SERVICE MANAGEMENT SYSTEM
return render(request,'vehicle/feedback_sent_by_customer.html',

{'customer':customer})

return render(request,'vehicle/customer_feedback.html',

{'feedback':feedback,'customer':customer})

#=======================================================

=====================================

# CUSTOMER RELATED views END

#=======================================================

=====================================

#=======================================================

=====================================

# MECHANIC RELATED views start

#=======================================================

=====================================

63
VEHICLE SERVICE MANAGEMENT SYSTEM

@login_required(login_url='mechaniclogin')

@user_passes_test(is_mechanic)

def mechanic_dashboard_view(request):

mechanic=models.Mechanic.objects.get(user_id=request.user.id)

work_in_progress=models.Request.objects.all().filter(mechanic_id=mechani

c.id,status='Repairing').count()

work_completed=models.Request.objects.all().filter(mechanic_id=mechanic

.id,status='Repairing Done').count()

new_work_assigned=models.Request.objects.all().filter(mechanic_id=mech

anic.id,status='Approved').count()

dict={

'work_in_progress':work_in_progress,

'work_completed':work_completed,

'new_work_assigned':new_work_assigned,

'salary':mechanic.salary,

'mechanic':mechanic,

return render(request,'vehicle/mechanic_dashboard.html',context=dict)

@login_required(login_url='mechaniclogin')

64
VEHICLE SERVICE MANAGEMENT SYSTEM
@user_passes_test(is_mechanic)

def mechanic_work_assigned_view(request):

mechanic=models.Mechanic.objects.get(user_id=request.user.id)

works=models.Request.objects.all().filter(mechanic_id=mechanic.id)

return render(request,'vehicle/mechanic_work_assigned.html',

{'works':works,'mechanic':mechanic})

@login_required(login_url='mechaniclogin')

@user_passes_test(is_mechanic)

def mechanic_update_status_view(request,pk):

mechanic=models.Mechanic.objects.get(user_id=request.user.id)

updateStatus=forms.MechanicUpdateStatusForm()

if request.method=='POST':

updateStatus=forms.MechanicUpdateStatusForm(request.POST)

if updateStatus.is_valid():

enquiry_x=models.Request.objects.get(id=pk)

enquiry_x.status=updateStatus.cleaned_data['status']

enquiry_x.save()

else:

print("form is invalid")

65
VEHICLE SERVICE MANAGEMENT SYSTEM
return HttpResponseRedirect('/mechanic-work-assigned')

return render(request,'vehicle/mechanic_update_status.html',

{'updateStatus':updateStatus,'mechanic':mechanic})

@login_required(login_url='mechaniclogin')

@user_passes_test(is_mechanic)

def mechanic_attendance_view(request):

mechanic=models.Mechanic.objects.get(user_id=request.user.id)

attendaces=models.Attendance.objects.all().filter(mechanic=mechanic)

return render(request,'vehicle/mechanic_view_attendance.html',

{'attendaces':attendaces,'mechanic':mechanic})

@login_required(login_url='mechaniclogin')

@user_passes_test(is_mechanic)

def mechanic_feedback_view(request):

mechanic=models.Mechanic.objects.get(user_id=request.user.id)

feedback=forms.FeedbackForm()

66
VEHICLE SERVICE MANAGEMENT SYSTEM
if request.method=='POST':

feedback=forms.FeedbackForm(request.POST)

if feedback.is_valid():

feedback.save()

else:

print("form is invalid")

return render(request,'vehicle/feedback_sent.html',

{'mechanic':mechanic})

return render(request,'vehicle/mechanic_feedback.html',

{'feedback':feedback,'mechanic':mechanic})

@login_required(login_url='mechaniclogin')

@user_passes_test(is_mechanic)

def mechanic_salary_view(request):

mechanic=models.Mechanic.objects.get(user_id=request.user.id)

workdone=models.Request.objects.all().filter(mechanic_id=mechanic.id).filt

er(Q(status="Repairing Done") | Q(status="Released"))

return render(request,'vehicle/mechanic_salary.html',

{'workdone':workdone,'mechanic':mechanic})

@login_required(login_url='mechaniclogin')

67
VEHICLE SERVICE MANAGEMENT SYSTEM
@user_passes_test(is_mechanic)

def mechanic_profile_view(request):

mechanic=models.Mechanic.objects.get(user_id=request.user.id)

return render(request,'vehicle/mechanic_profile.html',

{'mechanic':mechanic})

@login_required(login_url='mechaniclogin')

@user_passes_test(is_mechanic)

def edit_mechanic_profile_view(request):

mechanic=models.Mechanic.objects.get(user_id=request.user.id)

user=models.User.objects.get(id=mechanic.user_id)

userForm=forms.MechanicUserForm(instance=user)

mechanicForm=forms.MechanicForm(request.FILES,instance=mechanic)

mydict={'userForm':userForm,'mechanicForm':mechanicForm,'mechanic':m

echanic}

if request.method=='POST':

userForm=forms.MechanicUserForm(request.POST,instance=user)

mechanicForm=forms.MechanicForm(request.POST,request.FILES,insta

nce=mechanic)

if userForm.is_valid() and mechanicForm.is_valid():

user=userForm.save()

68
VEHICLE SERVICE MANAGEMENT SYSTEM
user.set_password(user.password)

user.save()

mechanicForm.save()

return redirect('mechanic-profile')

return render(request,'vehicle/edit_mechanic_profile.html',context=mydict)

#=======================================================

=====================================

# MECHANIC RELATED views start

#=======================================================

=====================================

# for aboutus and contact

69
VEHICLE SERVICE MANAGEMENT SYSTEM
def aboutus_view(request):

return render(request,'vehicle/aboutus.html')

def contactus_view(request):

sub = forms.ContactusForm()

if request.method == 'POST':

sub = forms.ContactusForm(request.POST)

if sub.is_valid():

email = sub.cleaned_data['Email']

name=sub.cleaned_data['Name']

message = sub.cleaned_data['Message']

send_mail(str(name)+' ||

'+str(email),message,settings.EMAIL_HOST_USER,

settings.EMAIL_RECEIVING_USER, fail_silently = False)

return render(request, 'vehicle/contactussuccess.html')

return render(request, 'vehicle/contactus.html', {'form':sub})

Models

70
VEHICLE SERVICE MANAGEMENT SYSTEM

from django.db import models

from django.contrib.auth.models import User

# Create your models here.

class Customer(models.Model):

user=models.OneToOneField(User,on_delete=models.CASCADE)

profile_pic=

models.ImageField(upload_to='profile_pic/CustomerProfilePic/',null=True,bla

nk=True)

address = models.CharField(max_length=40)

mobile = models.CharField(max_length=20,null=False)

@property

def get_name(self):

return self.user.first_name+" "+self.user.last_name

@property

def get_instance(self):

return self

def __str__(self):

return self.user.first_name

71
VEHICLE SERVICE MANAGEMENT SYSTEM
class Mechanic(models.Model):

user=models.OneToOneField(User,on_delete=models.CASCADE)

profile_pic=

models.ImageField(upload_to='profile_pic/MechanicProfilePic/',null=True,bla

nk=True)

address = models.CharField(max_length=40)

mobile = models.CharField(max_length=20,null=False)

skill = models.CharField(max_length=500,null=True)

salary=models.PositiveIntegerField(null=True)

status=models.BooleanField(default=False)

@property

def get_name(self):

return self.user.first_name+" "+self.user.last_name

@property

def get_id(self):

return self.user.id

def __str__(self):

return self.user.first_name

class Request(models.Model):

72
VEHICLE SERVICE MANAGEMENT SYSTEM
cat=(('two wheeler with gear','two wheeler with gear'),('two wheeler without

gear','two wheeler without gear'),('three wheeler','three wheeler'),('four

wheeler','four wheeler'))

category=models.CharField(max_length=50,choices=cat)

vehicle_no=models.PositiveIntegerField(null=False)

vehicle_name = models.CharField(max_length=40,null=False)

vehicle_model = models.CharField(max_length=40,null=False)

vehicle_brand = models.CharField(max_length=40,null=False)

problem_description = models.CharField(max_length=500,null=False)

date=models.DateField(auto_now=True)

cost=models.PositiveIntegerField(null=True)

customer=models.ForeignKey('Customer',

on_delete=models.CASCADE,null=True)

mechanic=models.ForeignKey('Mechanic',on_delete=models.CASCADE,nu

ll=True)

stat=(('Pending','Pending'),('Approved','Approved'),('Repairing','Repairing'),

('Repairing Done','Repairing Done'),('Released','Released'))

73
VEHICLE SERVICE MANAGEMENT SYSTEM
status=models.CharField(max_length=50,choices=stat,default='Pending',nul

l=True)

def __str__(self):

return self.problem_description

class Attendance(models.Model):

mechanic=models.ForeignKey('Mechanic',on_delete=models.CASCADE,nu

ll=True)

date=models.DateField()

present_status = models.CharField(max_length=10)

class Feedback(models.Model):

date=models.DateField(auto_now=True)

by=models.CharField(max_length=40)

message=models.CharField(max_length=500)

# Generated by Django 3.0.5 on 2020-09-25 08:19

from django.conf import settings

from django.db import migrations, models

74
VEHICLE SERVICE MANAGEMENT SYSTEM
import django.db.models.deletion

class Migration(migrations.Migration):

dependencies = [

migrations.swappable_dependency(settings.AUTH_USER_MODEL),

('vehicle', '0001_initial'),

operations = [

migrations.CreateModel(

name='Mechanic',

fields=[

('id', models.AutoField(auto_created=True, primary_key=True,

serialize=False, verbose_name='ID')),

('profile_pic', models.ImageField(blank=True, null=True,

upload_to='profile_pic/MechanicProfilePic/')),

('address', models.CharField(max_length=40)),

('mobile', models.CharField(max_length=20)),

75
VEHICLE SERVICE MANAGEMENT SYSTEM
('user',

models.OneToOneField(on_delete=django.db.models.deletion.CASCADE,

to=settings.AUTH_USER_MODEL)),

],

),

migrations.CreateModel(

name='Request',

fields=[

('id', models.AutoField(auto_created=True, primary_key=True,

serialize=False, verbose_name='ID')),

('category', models.CharField(choices=[('two wheeler', 'two

wheeler'), ('three wheeler', 'three wheeler')], max_length=50)),

('vehicle_no', models.PositiveIntegerField()),

('vehicle_name', models.CharField(max_length=40)),

('vehicle_model', models.CharField(max_length=40)),

('vehicle_brand', models.CharField(max_length=40)),

('problem_description', models.CharField(max_length=500)),

('date', models.DateField(auto_now=True)),

('cost', models.PositiveIntegerField(null=True)),

('customer', models.ForeignKey(null=True,

on_delete=django.db.models.deletion.CASCADE, to='vehicle.Customer')),

76
VEHICLE SERVICE MANAGEMENT SYSTEM
('mechanic', models.ForeignKey(null=True,

on_delete=django.db.models.deletion.CASCADE, to='vehicle.Mechanic')),

],

),

SUMMARY

Based on this chapter, the methodology used for the project was

elaborated. The system requirements that were used are also stated.

Choosing methodology to be used for a system development is a crucial

77
VEHICLE SERVICE MANAGEMENT SYSTEM
part in ensuring that the development starts off at a great pace. The

suitable algorithm that will be used in this project also was elaborated.

The next step is the implementation of the system. The system

will be developed by using Priority Scheduling algorithm to help

mechanic to list the appointment on the priority to make the system

more efficient and systematic. The distribution of works among the

workers can be done efficiently based on the even number of tasks

already done that day.

78

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy