class TS_OCR:

    _poidsTotal = 0
    _numBl = ''
    _debugOCR = ''

    def __init__(self):
        _poidsTotal = float(0)
        _numBl = ''
    def getPoidsTotal(self):
        return self._poidsTotal

    def blExist(self):
        try:
            sql = (" SELECT COUNT(1)"
                   " FROM tier_att"
                   " WHERE 1 = 1"
                   " AND att17 = " + str(self._numBl) +
                   " AND actif = 1"
                   " AND att1 = "+ str(self.idAbattoir)+";")
            self.cursor.execute(sql)
            result = self.cursor.fetchone()

            if result[0] >= 1:
                return True
            else:
                return False

        except Exception as err:
            print(f"UnexpectedA {err=}, {type(err)=}")
            print("ERROR A2")