MAj
This commit is contained in:
parent
1b34dd5c6a
commit
140b1bfe01
@ -1,6 +1,6 @@
|
|||||||
from src.c.Teleporteur import Teleporteur
|
from src.c.Teleporteur import Teleporteur
|
||||||
|
from src.m.Placement import Placement
|
||||||
from src.m.Client import Client
|
from src.m.Client import Client
|
||||||
from src.m.Place import Placement
|
|
||||||
from src.m.TypeAbonnement import TypeAbonnement
|
from src.m.TypeAbonnement import TypeAbonnement
|
||||||
from src.v.Camera import Camera
|
from src.v.Camera import Camera
|
||||||
from PyQt4 import QtGui
|
from PyQt4 import QtGui
|
||||||
@ -65,7 +65,6 @@ class Borne:
|
|||||||
self.__ui.label_aff.setText("Bienvenue !")
|
self.__ui.label_aff.setText("Bienvenue !")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def identification(self):
|
def identification(self):
|
||||||
"""
|
"""
|
||||||
Gestion de l'identification a partir d'un abo a partir de son id (lineedit)
|
Gestion de l'identification a partir d'un abo a partir de son id (lineedit)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
from PyQt4 import QtGui
|
from PyQt4 import QtGui
|
||||||
|
|
||||||
from src.m.Parking import Parking
|
from src.m.Parking import Parking
|
||||||
from src.m.Place import ListeTypePlace
|
from src.m.ListeTypePlace import ListeTypePlace
|
||||||
from src.v.MyQWidget import MyQWidget
|
from src.v.MyQWidget import MyQWidget
|
||||||
from src.v.Ui_CreaParking import Ui_CreaParking
|
from src.v.Ui_CreaParking import Ui_CreaParking
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ class CreaParking:
|
|||||||
Gestion validation de formulaire de creation de parking.
|
Gestion validation de formulaire de creation de parking.
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
try:
|
#try:
|
||||||
l = ListeTypePlace()
|
l = ListeTypePlace()
|
||||||
for i in range(0, self._ui.tableWidget.rowCount()):
|
for i in range(0, self._ui.tableWidget.rowCount()):
|
||||||
l.add(int(self._ui.tableWidget.item(i, 0).text()), int(self._ui.tableWidget.item(i, 1).text()),
|
l.add(int(self._ui.tableWidget.item(i, 0).text()), int(self._ui.tableWidget.item(i, 1).text()),
|
||||||
@ -85,9 +85,9 @@ class CreaParking:
|
|||||||
self._main.activity("Ajout Parking : detail", self._main.lvl.INFO)
|
self._main.activity("Ajout Parking : detail", self._main.lvl.INFO)
|
||||||
self._w.hide()
|
self._w.hide()
|
||||||
self._main.showWindow()
|
self._main.showWindow()
|
||||||
except Exception as e:
|
#except Exception as e:
|
||||||
self._main.activity("Erreur lors de la creations du Parking \n" + str(e), self._main.lvl.FAIL)
|
# self._main.activity("Erreur lors de la creations du Parking \n" + str(e), self._main.lvl.FAIL)
|
||||||
self.error()
|
# self.error()
|
||||||
|
|
||||||
def showWindow(self):
|
def showWindow(self):
|
||||||
"""
|
"""
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
from src.m.Place import Placement
|
from src.m.Placement import Placement
|
||||||
|
|
||||||
__author__ = 'sidya'
|
__author__ = 'sidya'
|
||||||
|
|
||||||
@ -6,7 +6,7 @@ __author__ = 'sidya'
|
|||||||
class Teleporteur:
|
class Teleporteur:
|
||||||
@classmethod
|
@classmethod
|
||||||
def teleporterVoiture(self, voiture, place):
|
def teleporterVoiture(self, voiture, place):
|
||||||
p =Placement(voiture, place)
|
p = Placement(voiture, place)
|
||||||
return p.id
|
return p.id
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
from src.m.service import Service
|
from src.m.Service import Service
|
||||||
from src.m.connexionBDD import connexionBDD
|
from src.m.connexionBDD import connexionBDD
|
||||||
class Entretien(Service):
|
class Entretien(Service):
|
||||||
def __init__(self, jourService, moisService, anneeService, jourDemande, moisDemande, anneeDemande, rapport, categorie, idClient):
|
def __init__(self, jourService, moisService, anneeService, jourDemande, moisDemande, anneeDemande, rapport, categorie, idClient):
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
from src.m.TypePlace import TypePlace
|
||||||
|
|
||||||
__author__ = 'sidya'
|
__author__ = 'sidya'
|
||||||
|
|
||||||
class ListeTypePlace:
|
class ListeTypePlace:
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
from src.m.service import Service
|
from src.m.Service import Service
|
||||||
from src.m.connexionBDD import connexionBDD
|
from src.m.connexionBDD import connexionBDD
|
||||||
import calendar
|
import calendar
|
||||||
class Livraison(Service):
|
class Livraison(Service):
|
||||||
@ -14,6 +14,7 @@ class Livraison(Service):
|
|||||||
idVoiturier = int(''.join(map(str,indiceVoiturier )))
|
idVoiturier = int(''.join(map(str,indiceVoiturier )))
|
||||||
connexion.cur.execute("UPDATE service SET idVoiturier= ? WHERE idService = ?", (idVoiturier, self.idService))
|
connexion.cur.execute("UPDATE service SET idVoiturier= ? WHERE idService = ?", (idVoiturier, self.idService))
|
||||||
connexion.seDeconnecter()
|
connexion.seDeconnecter()
|
||||||
|
|
||||||
def effectuerLivraison(self):
|
def effectuerLivraison(self):
|
||||||
self.etat = 1
|
self.etat = 1
|
||||||
connexion = connexionBDD()
|
connexion = connexionBDD()
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
from src.m.service import Service
|
from src.m.Service import Service
|
||||||
from src.m.connexionBDD import connexionBDD
|
from src.m.connexionBDD import connexionBDD
|
||||||
class Maintenance(Service):
|
class Maintenance(Service):
|
||||||
def __init__(self, jourService, moisService, anneeService, jourDemande, moisDemande, anneeDemande, rapport, categorie, idClient):
|
def __init__(self, jourService, moisService, anneeService, jourDemande, moisDemande, anneeDemande, rapport, categorie, idClient):
|
||||||
@ -6,6 +6,7 @@ class Maintenance(Service):
|
|||||||
self.categorie = 1
|
self.categorie = 1
|
||||||
self.etat = 0
|
self.etat = 0
|
||||||
self.idService=self.enregistrerService(self, idClient, self.categorie, self.etat)
|
self.idService=self.enregistrerService(self, idClient, self.categorie, self.etat)
|
||||||
|
|
||||||
def effectuerMaintenance(self):
|
def effectuerMaintenance(self):
|
||||||
self.etat = 1
|
self.etat = 1
|
||||||
connexion = connexionBDD()
|
connexion = connexionBDD()
|
@ -50,7 +50,7 @@ class Parking:
|
|||||||
"""
|
"""
|
||||||
place = None
|
place = None
|
||||||
for p in self.__Places:
|
for p in self.__Places:
|
||||||
if p.estLibre and p.dimValide(voiture.hauteur, voiture.longueur) :
|
if p.estLibre and p.dimValide(voiture.getHauteur, voiture.getLongueur) :
|
||||||
pass
|
pass
|
||||||
place = p
|
place = p
|
||||||
break
|
break
|
||||||
|
@ -16,6 +16,7 @@ class Service:
|
|||||||
except:
|
except:
|
||||||
print ("la date de service n\'est pas correcte")
|
print ("la date de service n\'est pas correcte")
|
||||||
self.rapport = rapport
|
self.rapport = rapport
|
||||||
|
|
||||||
def enregistrerService(self, idClient, categorie, etat):
|
def enregistrerService(self, idClient, categorie, etat):
|
||||||
try:
|
try:
|
||||||
connection = connexionBDD()
|
connection = connexionBDD()
|
@ -1,23 +1,28 @@
|
|||||||
__author__ = 'sidya'
|
|
||||||
|
|
||||||
class Voiture:
|
|
||||||
|
class Voiture():
|
||||||
def __init__(self, longueur, hauteur, imma):
|
def __init__(self, longueur, hauteur, imma):
|
||||||
self.__longueur = longueur
|
self._hauteur = hauteur
|
||||||
self.__hauteur = hauteur
|
self._longueur = longueur
|
||||||
self.__imma = imma
|
self._immatriculation = imma
|
||||||
self.__estDansParking = False
|
self._estDansParking = False
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def longueur(self):
|
def getHauteur(self):
|
||||||
return self.__longueur
|
return self._hauteur
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def hauteur(self):
|
def getLongueur(self):
|
||||||
return self.__hauteur
|
return self._longueur
|
||||||
|
|
||||||
def __str__(self):
|
|
||||||
return "Voiture : hauteur " + str(self.__longueur) + ", largeur" + str(self.hauteur) + ", Imma : " + self.__imma +", est dans parking :" + str(self.__estDansParking)
|
|
||||||
|
|
||||||
|
|
||||||
|
@property
|
||||||
|
def getImmatriculation(self):
|
||||||
|
return self._immatriculation
|
||||||
|
|
||||||
|
@property
|
||||||
|
def estDansParking(self):
|
||||||
|
return self._estDansParking == True
|
||||||
|
|
||||||
|
#def addPlacement(self, placement):
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import sqlite3
|
import sqlite3
|
||||||
class connexionBDD:
|
class connexionBDD:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.chemin = "/Users/nadiel/SQLite/BDDprojetPython.sq3"
|
self.chemin = "BDDprojetPython.sq3"
|
||||||
self.conn =sqlite3.connect(self.chemin)
|
self.conn =sqlite3.connect(self.chemin)
|
||||||
self.cur =self.conn.cursor()
|
self.cur =self.conn.cursor()
|
||||||
def seDeconnecter(self):
|
def seDeconnecter(self):
|
||||||
|
@ -1,35 +0,0 @@
|
|||||||
import datetime
|
|
||||||
class Placement:
|
|
||||||
|
|
||||||
def __init__(self):
|
|
||||||
self._dateDebut
|
|
||||||
self._dateFin
|
|
||||||
self._estEnCours
|
|
||||||
|
|
||||||
@property
|
|
||||||
def getDateDebut(self):
|
|
||||||
return self._dateDebut
|
|
||||||
|
|
||||||
#@self._dateDebut.setter
|
|
||||||
def setDateDebut(self, jour, mois, annee):
|
|
||||||
self._dateDebut= datetime.date(jour, mois,annee)
|
|
||||||
|
|
||||||
#@self._DateFin.setter
|
|
||||||
def setDateFin(self, jour, mois, annee):
|
|
||||||
self._dateFin= datetime.date(jour, mois,annee)
|
|
||||||
|
|
||||||
#@estEnCours.setter
|
|
||||||
def setEstEnCours(self, value):
|
|
||||||
self._estEnCours = value
|
|
||||||
|
|
||||||
@property
|
|
||||||
def estEnCours(self):
|
|
||||||
return self._estEnCours
|
|
||||||
|
|
||||||
|
|
||||||
def partirPlace(self, value):
|
|
||||||
self.setEstEnCours(self, False)
|
|
||||||
|
|
||||||
@estEnCours.deleter
|
|
||||||
def partirPlace(self):
|
|
||||||
del self
|
|
@ -1,40 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
class Voiture():
|
|
||||||
def __init__(self):
|
|
||||||
self._hauteur
|
|
||||||
self._longueur
|
|
||||||
self._immatriculation
|
|
||||||
self._estDansParking
|
|
||||||
|
|
||||||
# @hauteur.setter
|
|
||||||
def setHauteur(self, value):
|
|
||||||
self._hauteur=value
|
|
||||||
|
|
||||||
@property
|
|
||||||
def getHauteur(self):
|
|
||||||
return self._hauteur
|
|
||||||
|
|
||||||
# @longueur.setter
|
|
||||||
def setLongueur(self, value):
|
|
||||||
self._longueur=value
|
|
||||||
|
|
||||||
# @immatriculation.setter
|
|
||||||
def setImmatriculation(self, chaine):
|
|
||||||
self._immatriculation = chaine
|
|
||||||
|
|
||||||
@property
|
|
||||||
def getImmatriculation(self):
|
|
||||||
return self._immatriculation
|
|
||||||
|
|
||||||
#@estDansParking.setter
|
|
||||||
def setEstDansParking(self, value):
|
|
||||||
self._estDansParking =value
|
|
||||||
|
|
||||||
@property
|
|
||||||
def estDansParking(self):
|
|
||||||
return self._estDansParking == True
|
|
||||||
|
|
||||||
#def addPlacement(self, placement):
|
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user