Beispiel #1
0
 def updatert_deal(self, roomNo, loggedOn, T):
     print("温度-修改数据库")
     sql = "update clientinfo set sysT=%f where roomNo = %d and loggedOn = '%s'" % (
         T, roomNo, loggedOn)
     db_lock.acquire()
     cursor.execute(sql)
     db.commit()
     db_lock.release()
Beispiel #2
0
 def insert_deal(self, roomNo, loggedOn, usr, pwd, targetT, targetW, sysT,
                 sysW, sysModel, eng_cost, money_cost, start_blowing):
     sql = "insert into clientinfo values (%d, '%s', '%s', '%s', %f, %d, %f, %d, %d, %f, %f, %d)" % \
           (roomNo, loggedOn, usr, pwd, targetT, targetW, sysT, sysW, sysModel, eng_cost, money_cost,start_blowing)
     db_lock.acquire()
     cursor.execute(sql)
     db.commit()
     db_lock.release()
Beispiel #3
0
 def updaterw_deal(self, roomNo, loggedOn, W, sb):
     sql = "update clientinfo set sysW=%d, start_blowing=%d where roomNo = %d and loggedOn = '%s'" % (
         W, sb, roomNo, loggedOn)
     print(sql)
     db_lock.acquire()
     cursor.execute(sql)
     db.commit()
     db_lock.release()
Beispiel #4
0
 def updatesys_deal(self, roomNo, loggedOn, T, W, M):
     print("设置-更改数据库")
     sql = "update clientinfo set targetT = %f, targetW = %d, sysModel = %d where roomNo = %d and loggedOn = '%s'" % (
         T, W, M, roomNo, loggedOn)
     db_lock.acquire()
     cursor.execute(sql)
     db.commit()
     db_lock.release()
     print("设置-更改数据库完成")
Beispiel #5
0
 def updatecost_deal(self, roomNo, loggedOn, EC, MC):
     print("账单-更改数据库")
     sql = "update clientinfo set eng_cost = %f, money_cost = %f where roomNo = %d and loggedOn = '%s'" % (
         EC, MC, roomNo, loggedOn)
     db_lock.acquire()
     row = cursor.execute(sql)
     db.commit()
     db_lock.release()
     print("修改完毕")