范文健康探索娱乐情感热点
投稿投诉
热点动态
科技财经
情感日志
励志美文
娱乐时尚
游戏搞笑
探索旅游
历史星座
健康养生
美丽育儿
范文作文
教案论文
国学影视

露一手,用Python写了一个疫苗管理系统

  大家好,我是 Jack。
  不少小伙伴问我,Python 怎么学,我的统一回答:实战,多练。
  其实就是 从自己的兴趣出发,做一些实战小项目 。
  正好,周末在家摸鱼的时候,在网上看到了一个不错的小项目,用 Python 写一个疫苗管理系统的小项目。
  很基础,适合新手学习,主要涉及 Python、Tkinter、数据库存储等知识。
  原文链接:https://blog.csdn.net/weixin_43425784/article/details/118585467 整体结构图
  连接数据库     def   connect_DBS  (self, database, content):
  db = pymysql.connect(host="localhost"  , user="root"  , password="pwd"  , database=database)
  cursor = db.cursor()
  cursor.execute(content)
  data = cursor.fetchone()
  db.commit()
  db.close()
  return   data
  主界面
  def   main_window  (self):
  tk.Button(app, text="登录"  , bg="white"  , font=("Arial,12"  ), width=12  , height=1  , command=self.login).place(x=260  , y=200  )
  tk.Button(app, text="注册"  , bg="white"  , font=("Arial,12"  ), width=12  , height=1  , command=self.register).place(x=260  , y=240  )
  tk.Button(app, text="退出"  , bg="white"  , font=("Arial,12"  ), width=12  , height=1  , command=self.quit_mainloop).place(x=260  , y=280  )
  注册界面
  def   register  (self):
  register = tk.Toplevel(app)
  register.title("用户注册"  )
  register.geometry("600x400"  )
  tk.Label(register, text="欢迎注册"  , font=("KaiTi"  , 40  )).place(x=200  , y=20  )
  tk.Label(register, text="添加管理员姓名:"  , font=("Arial"  , 9  )).place(x=80  , y=120  )
  tk.Label(register, text="确认管理员编号:"  , font=("Arial"  , 9  )).place(x=80  , y=150  )
  entry1 = tk.Entry(register, font=("Arial, 9"  ), width=46  , )
  entry2 = tk.Entry(register, font=("Arial, 9"  ), width=46  , )
  entry1.pack()
  entry2.pack()
  entry1.place(x=180  , y=120  , width=350  , height=25  )
  entry2.place(x=180  , y=150  , width=350  , height=25  )
  def   user_register  ():
  user_name = entry1.get()
  user_code = entry2.get()
  if   user_name == ""   or   user_code == ""  :
  tkinter.messagebox.showwarning(title="警告"  , message="用户名或密码不能为空!"  )
  else  :
  content = "INSERT INTO user_info (user_name, user_code) VALUES ("%s", "%s");"   % (user_name, user_code)
  self.connect_DBS(database="vaccine_info"  , content=content)
  tkinter.messagebox.showinfo(title="信息"  , message="注册成功!"  )
  tk.Button(register, text="注册"  , bg="white"  , font=("Arial,9"  ), width=12  , height=0  , command=user_register).place(x=250  , y=250  )
  登陆界面
  def   login  (self):
  login = tk.Toplevel(app)
  login.title("用户登录"  )
  login.geometry("600x400"  )
  tk.Label(login, text="欢迎登录"  , font=("KaiTi"  , 40  )).place(x=200  , y=20  )
  tk.Label(login, text="管理员姓名:"  , font=("Arial"  , 9  )).place(x=80  , y=120  )
  tk.Label(login, text="管理员编号:"  , font=("Arial"  , 9  )).place(x=80  , y=150  )
  entry1 = tk.Entry(login, font=("Arial, 9"  ), width=46  )
  entry2 = tk.Entry(login, font=("Arial, 9"  ), width=46  , show="*"  )
  entry1.pack()
  entry2.pack()
  entry1.place(x=180  , y=120  , width=350  , height=25  )
  entry2.place(x=180  , y=150  , width=350  , height=25  )
  def   user_check  ():
  user_name = entry1.get()
  user_code = entry2.get()
  content = "SELECT * FROM user_info WHERE user_name = "%s";"   % user_name
  data = self.connect_DBS(database="vaccine_info"  , content=content)
  try  :
  if   user_name == data[1  ] and   user_code == data[2  ]:
  tkinter.messagebox.showinfo(title="信息"  , message="欢迎登录!"  )
  self.options()
  elif   user_name != data[1  ]:
  tkinter.messagebox.showerror(title="错误"  , message="请注册后再进行登录!"  )
  elif   user_name == data[1  ] and   user_code != data[2  ]:
  tkinter.messagebox.showerror(title="错误"  , message="密码错误!"  )
  except   TypeError:
  tkinter.messagebox.showerror(title="错误"  , message="请注册后再进行登录!"  )
  tk.Button(login, text="登录"  , bg="white"  , font=("Arial,9"  ), width=12  , height=0  , command=user_check).place(x=250  , y=250  )
  功能选项 功能区主界面
  def   options  (self):
  options = tk.Toplevel(app)
  options.title("功能选项"  )
  options.geometry("600x500"  )
  tk.Label(options, text="欢迎使用!"  , font=("KaiTi"  , 40  )).place(x=180  , y=15  )
  tk.Button(options, text="新建疫苗信息"  , bg="white"  , font=("Arial,12"  ), width=20  , height=2  ,command=self.add_vacc_info).place(x=100  , y=100  )
  tk.Button(options, text="新建疫苗分配信息"  , bg="white"  , font=("Arial,12"  ), width=20  , height=2  ,command=self.add_vaccine_distr_info).place(x=100  , y=160  )
  tk.Button(options, text="新建疫苗养护信息"  , bg="white"  , font=("Arial,12"  ), width=20  , height=2  , command=self.add_vaccine_maintenance_info).place(x=100  , y=220  )
  tk.Button(options, text="新建接种人员信息"  , bg="white"  , font=("Arial,12"  ), width=20  , height=2  ,command=self.add_vaccination_person_info).place(x=100  , y=280  )
  tk.Button(options, text="查询疫苗分配信息"  , bg="white"  , font=("Arial,12"  ), width=20  , height=2  ,command=self.vaccine_distr_info_query).place(x=100  , y=340  )
  tk.Button(options, text="查询疫苗养护信息"  , bg="white"  , font=("Arial,12"  ), width=20  , height=2  , command=self.vaccination_maintenance_info_query).place(x=320  , y=100  )
  tk.Button(options, text="查询接种人员信息"  , bg="white"  , font=("Arial,12"  ), width=20  , height=2  ,command=self.vaccination_person_info_query).place(x=320  , y=160  )
  tk.Button(options, text="查询疫苗信息"  , bg="white"  , font=("Arial,12"  ), width=20  , height=2  ,command=self.vaccine_info_query).place(x=320  , y=220  )
  tk.Button(options, text="修改疫苗信息"  , bg="white"  , font=("Arial,12"  ), width=20  , height=2  ,command=self.modify_vaccine_info).place(x=320  , y=280  )
  tk.Button(options, text="删除疫苗信息"  , bg="white"  , font=("Arial,12"  ), width=20  , height=2  ,command=self.del_vaccine_info).place(x=320  , y=340  )
  新建疫苗信息
  def   add_vacc_info  (self):
  add_vacc_info = tk.Toplevel(app)
  add_vacc_info.title("添加疫苗信息"  )
  add_vacc_info.geometry("600x400"  )
  tk.Label(add_vacc_info, text="疫苗批号:"  , font=("Arial"  , 9  )).place(x=80  , y=60  )
  tk.Label(add_vacc_info, text="疫苗名称:"  , font=("Arial"  , 9  )).place(x=80  , y=90  )
  tk.Label(add_vacc_info, text="企业名称:"  , font=("Arial"  , 9  )).place(x=80  , y=120  )
  tk.Label(add_vacc_info, text="企业编号:"  , font=("Arial"  , 9  )).place(x=80  , y=150  )
  tk.Label(add_vacc_info, text=" 规格:"  , font=("Arial"  , 9  )).place(x=80  , y=180  )
  tk.Label(add_vacc_info, text=" 进价:"  , font=("Arial"  , 9  )).place(x=80  , y=210  )
  tk.Label(add_vacc_info, text=" 预售价:"  , font=("Arial"  , 9  )).place(x=80  , y=240  )
  tk.Label(add_vacc_info, text="企业上限:"  , font=("Arial"  , 9  )).place(x=80  , y=270  )
  tk.Label(add_vacc_info, text="企业下限:"  , font=("Arial"  , 9  )).place(x=80  , y=300  )
  entry1 = tk.Entry(add_vacc_info, font=("Arial, 9"  ), width=46  )
  entry2 = tk.Entry(add_vacc_info, font=("Arial, 9"  ), width=46  )
  entry3 = tk.Entry(add_vacc_info, font=("Arial, 9"  ), width=46  )
  entry4 = tk.Entry(add_vacc_info, font=("Arial, 9"  ), width=46  )
  entry5 = tk.Entry(add_vacc_info, font=("Arial, 9"  ), width=46  )
  entry6 = tk.Entry(add_vacc_info, font=("Arial, 9"  ), width=46  )
  entry7 = tk.Entry(add_vacc_info, font=("Arial, 9"  ), width=46  )
  entry8 = tk.Entry(add_vacc_info, font=("Arial, 9"  ), width=46  )
  entry9 = tk.Entry(add_vacc_info, font=("Arial, 9"  ), width=46  )
  entry1.pack()
  entry2.pack()
  entry3.pack()
  entry4.pack()
  entry5.pack()
  entry6.pack()
  entry7.pack()
  entry8.pack()
  entry9.pack()
  entry1.place(x=180  , y=60  , width=350  )
  entry2.place(x=180  , y=90  , width=350  )
  entry3.place(x=180  , y=120  , width=350  )
  entry4.place(x=180  , y=150  , width=350  )
  entry5.place(x=180  , y=180  , width=350  )
  entry6.place(x=180  , y=210  , width=350  )
  entry7.place(x=180  , y=240  , width=350  )
  entry8.place(x=180  , y=270  , width=350  )
  entry9.place(x=180  , y=300  , width=350  )
  def   add  ():
  text1 = entry1.get()
  text2 = entry2.get()
  text3 = entry3.get()
  text4 = entry4.get()
  text5 = entry5.get()
  text6 = entry6.get()
  text7 = entry7.get()
  text8 = entry8.get()
  text9 = entry9.get()
  content = "INSERT INTO vaccine_info ("
  "vaccine_num, vaccine_name, company_name, company_num, size, buy_price, pre_sale_price, limit_up, limit_down"
  ")"
  " VALUES (%s, "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s");"   % (
  text1, text2, text3, text4, text5, text6, text7, text8, text9)
  self.connect_DBS(database="vaccine_info"  , content=content)
  tkinter.messagebox.showinfo(title="信息"  , message="数据添加成功!"  )
  def   clear  ():
  entry1.delete(0  , "end"  )
  entry2.delete(0  , "end"  )
  entry3.delete(0  , "end"  )
  entry4.delete(0  , "end"  )
  entry5.delete(0  , "end"  )
  tkinter.messagebox.showinfo(title="信息"  , message="数据已清空,请继续添加!"  )
  tk.Button(add_vacc_info, text="添加"  , bg="white"  , font=("Arial,9"  ), width=9  , height=0  , command=add).place(x=400  , y=360  )
  tk.Button(add_vacc_info, text="清空"  , bg="white"  , font=("Arial,9"  ), width=9  , height=0  , command=clear).place(x=160  , y=360  )
  新建疫苗分配信息
  def   add_vaccine_distr_info  (self):
  add_vaccine_distr_info = tk.Toplevel(app)
  add_vaccine_distr_info.title("添加疫苗分配信息"  )
  add_vaccine_distr_info.geometry("600x400"  )
  tk.Label(add_vaccine_distr_info, text="疫苗分配单号:"  , font=("Arial"  , 9  )).place(x=80  , y=60  )
  tk.Label(add_vaccine_distr_info, text=" 日期:"  , font=("Arial"  , 9  )).place(x=80  , y=90  )
  tk.Label(add_vaccine_distr_info, text=" 疫苗批号:"  , font=("Arial"  , 9  )).place(x=80  , y=120  )
  tk.Label(add_vaccine_distr_info, text=" 疫苗名称:"  , font=("Arial"  , 9  )).place(x=80  , y=150  )
  tk.Label(add_vaccine_distr_info, text=" 企业编号:"  , font=("Arial"  , 9  )).place(x=80  , y=180  )
  tk.Label(add_vaccine_distr_info, text=" 质检员编号:"  , font=("Arial"  , 9  )).place(x=80  , y=210  )
  tk.Label(add_vaccine_distr_info, text=" 数量:"  , font=("Arial"  , 9  )).place(x=80  , y=240  )
  entry1 = tk.Entry(add_vaccine_distr_info, font=("Arial, 9"  ), width=46  )
  entry2 = tk.Entry(add_vaccine_distr_info, font=("Arial, 9"  ), width=46  )
  entry3 = tk.Entry(add_vaccine_distr_info, font=("Arial, 9"  ), width=46  )
  entry4 = tk.Entry(add_vaccine_distr_info, font=("Arial, 9"  ), width=46  )
  entry5 = tk.Entry(add_vaccine_distr_info, font=("Arial, 9"  ), width=46  )
  entry6 = tk.Entry(add_vaccine_distr_info, font=("Arial, 9"  ), width=46  )
  entry7 = tk.Entry(add_vaccine_distr_info, font=("Arial, 9"  ), width=46  )
  entry1.pack()
  entry2.pack()
  entry3.pack()
  entry4.pack()
  entry5.pack()
  entry6.pack()
  entry7.pack()
  entry1.place(x=180  , y=60  , width=350  )
  entry2.place(x=180  , y=90  , width=350  )
  entry3.place(x=180  , y=120  , width=350  )
  entry4.place(x=180  , y=150  , width=350  )
  entry5.place(x=180  , y=180  , width=350  )
  entry6.place(x=180  , y=210  , width=350  )
  entry7.place(x=180  , y=240  , width=350  )
  def   add  ():
  text1 = entry1.get()
  text2 = entry2.get()
  text3 = entry3.get()
  text4 = entry4.get()
  text5 = entry5.get()
  text6 = entry6.get()
  text7 = entry7.get()
  content = "INSERT INTO vaccine_distr_info ("
  "vaccine_distr_num, date, vaccine_num, vaccine_name, company_num, operator_num, num"
  ")"
  " VALUES (%s, "%s", "%s", "%s", "%s", "%s", "%s");"   % (
  text1, text2, text3, text4, text5, text6, text7)
  self.connect_DBS(database="vaccine_info"  , content=content)
  tkinter.messagebox.showinfo(title="信息"  , message="数据添加成功!"  )
  def   clear  ():
  entry1.delete(0  , "end"  )
  entry2.delete(0  , "end"  )
  entry3.delete(0  , "end"  )
  entry4.delete(0  , "end"  )
  entry5.delete(0  , "end"  )
  entry6.delete(0  , "end"  )
  entry7.delete(0  , "end"  )
  tkinter.messagebox.showinfo(title="信息"  , message="数据已清空,请继续添加!"  )
  tk.Button(add_vaccine_distr_info, text="添加"  , bg="white"  , font=("Arial,9"  ), width=9  , height=0  ,command=add).place(x=400  ,y=360  )
  tk.Button(add_vaccine_distr_info, text="清空"  , bg="white"  , font=("Arial,9"  ), width=9  , height=0  ,command=clear).place(x=160  ,y=360  )
  新建疫苗养护信息
  def   add_vaccine_maintenance_info  (self):
  vaccine_maintenance_info = tk.Toplevel(app)
  vaccine_maintenance_info.title("添加疫苗养护信息"  )
  vaccine_maintenance_info.geometry("600x400"  )
  tk.Label(vaccine_maintenance_info, text="养护疫苗批号:"  , font=("Arial"  , 9  )).place(x=80  , y=60  )
  tk.Label(vaccine_maintenance_info, text="养护疫苗名称:"  , font=("Arial"  , 9  )).place(x=80  , y=90  )
  tk.Label(vaccine_maintenance_info, text=" 管理员编号:"  , font=("Arial"  , 9  )).place(x=80  , y=120  )
  tk.Label(vaccine_maintenance_info, text=" 管理员姓名:"  , font=("Arial"  , 9  )).place(x=80  , y=150  )
  tk.Label(vaccine_maintenance_info, text=" 养护时间:"  , font=("Arial"  , 9  )).place(x=80  , y=180  )
  tk.Label(vaccine_maintenance_info, text=" 冷藏室温度:"  , font=("Arial"  , 9  )).place(x=80  , y=210  )
  tk.Label(vaccine_maintenance_info, text=" 冷冻室温度:"  , font=("Arial"  , 9  )).place(x=80  , y=240  )
  tk.Label(vaccine_maintenance_info, text="设备运转情况:"  , font=("Arial"  , 9  )).place(x=80  , y=270  )
  tk.Label(vaccine_maintenance_info, text=" 是否报警:"  , font=("Arial"  , 9  )).place(x=80  , y=300  )
  entry1 = tk.Entry(vaccine_maintenance_info, font=("Arial, 9"  ), width=46  )
  entry2 = tk.Entry(vaccine_maintenance_info, font=("Arial, 9"  ), width=46  )
  entry3 = tk.Entry(vaccine_maintenance_info, font=("Arial, 9"  ), width=46  )
  entry4 = tk.Entry(vaccine_maintenance_info, font=("Arial, 9"  ), width=46  )
  entry5 = tk.Entry(vaccine_maintenance_info, font=("Arial, 9"  ), width=46  )
  entry6 = tk.Entry(vaccine_maintenance_info, font=("Arial, 9"  ), width=46  )
  entry7 = tk.Entry(vaccine_maintenance_info, font=("Arial, 9"  ), width=46  )
  entry8 = tk.Entry(vaccine_maintenance_info, font=("Arial, 9"  ), width=46  )
  entry9 = tk.Entry(vaccine_maintenance_info, font=("Arial, 9"  ), width=46  )
  entry1.pack()
  entry2.pack()
  entry3.pack()
  entry4.pack()
  entry5.pack()
  entry6.pack()
  entry7.pack()
  entry8.pack()
  entry9.pack()
  entry1.place(x=180  , y=60  , width=350  )
  entry2.place(x=180  , y=90  , width=350  )
  entry3.place(x=180  , y=120  , width=350  )
  entry4.place(x=180  , y=150  , width=350  )
  entry5.place(x=180  , y=180  , width=350  )
  entry6.place(x=180  , y=210  , width=350  )
  entry7.place(x=180  , y=240  , width=350  )
  entry8.place(x=180  , y=270  , width=350  )
  entry9.place(x=180  , y=300  , width=350  )
  def   add  ():
  text1 = entry1.get()
  text2 = entry2.get()
  text3 = entry3.get()
  text4 = entry4.get()
  text5 = entry5.get()
  text6 = entry6.get()
  text7 = entry7.get()
  text8 = entry8.get()
  text9 = entry9.get()
  content = "INSERT INTO vaccine_maintenance_info ("
  "vaccine_maintenance_num, vaccine_maintenance_name, admin_num, admin_name, maintenance_time, cold_storage_temp, freezer_temp, equipment_operation, alter_info"
  ")"
  " VALUES (%s, "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s");"   % (
  text1, text2, text3, text4, text5, text6, text7, text8, text9)
  self.connect_DBS(database="vaccine_info"  , content=content)
  tkinter.messagebox.showinfo(title="信息"  , message="数据添加成功!"  )
  def   clear  ():
  entry1.delete(0  , "end"  )
  entry2.delete(0  , "end"  )
  entry3.delete(0  , "end"  )
  entry4.delete(0  , "end"  )
  entry5.delete(0  , "end"  )
  entry6.delete(0  , "end"  )
  entry7.delete(0  , "end"  )
  entry8.delete(0  , "end"  )
  entry9.delete(0  , "end"  )
  tkinter.messagebox.showinfo(title="信息"  , message="数据已清空,请继续添加!"  )
  tk.Button(vaccine_maintenance_info, text="添加"  , bg="white"  , font=("Arial,9"  ), width=9  , height=0  ,command=add).place(x=400  ,y=360  )
  tk.Button(vaccine_maintenance_info, text="清空"  , bg="white"  , font=("Arial,9"  ), width=9  , height=0  ,command=clear).place(x=160  ,y=360  )
  新建接种人员信息
  def   add_vaccination_person_info  (self):
  add_vaccination_person_info = tk.Toplevel(app)
  add_vaccination_person_info.title("添加接种人员信息"  )
  add_vaccination_person_info.geometry("600x400"  )
  tk.Label(add_vaccination_person_info, text="姓名:"  , font=("Arial"  , 9  )).place(x=80  , y=60  )
  tk.Label(add_vaccination_person_info, text="性别:"  , font=("Arial"  , 9  )).place(x=80  , y=90  )
  tk.Label(add_vaccination_person_info, text="年龄:"  , font=("Arial"  , 9  )).place(x=80  , y=120  )
  tk.Label(add_vaccination_person_info, text="身份证号:"  , font=("Arial"  , 9  )).place(x=80  , y=150  )
  tk.Label(add_vaccination_person_info, text="家庭住址:"  , font=("Arial"  , 9  )).place(x=80  , y=180  )
  tk.Label(add_vaccination_person_info, text="是否过敏:"  , font=("Arial"  , 9  )).place(x=80  , y=210  )
  tk.Label(add_vaccination_person_info, text="接种时间:"  , font=("Arial"  , 9  )).place(x=80  , y=240  )
  entry1 = tk.Entry(add_vaccination_person_info, font=("Arial, 9"  ), width=46  )
  entry2 = tk.Entry(add_vaccination_person_info, font=("Arial, 9"  ), width=46  )
  entry3 = tk.Entry(add_vaccination_person_info, font=("Arial, 9"  ), width=46  )
  entry4 = tk.Entry(add_vaccination_person_info, font=("Arial, 9"  ), width=46  )
  entry5 = tk.Entry(add_vaccination_person_info, font=("Arial, 9"  ), width=46  )
  entry6 = tk.Entry(add_vaccination_person_info, font=("Arial, 9"  ), width=46  )
  entry7 = tk.Entry(add_vaccination_person_info, font=("Arial, 9"  ), width=46  )
  entry1.pack()
  entry2.pack()
  entry3.pack()
  entry4.pack()
  entry5.pack()
  entry6.pack()
  entry7.pack()
  entry1.place(x=180  , y=60  , width=350  )
  entry2.place(x=180  , y=90  , width=350  )
  entry3.place(x=180  , y=120  , width=350  )
  entry4.place(x=180  , y=150  , width=350  )
  entry5.place(x=180  , y=180  , width=350  )
  entry6.place(x=180  , y=210  , width=350  )
  entry7.place(x=180  , y=240  , width=350  )
  def   add  ():
  text1 = entry1.get()
  text2 = entry2.get()
  text3 = entry3.get()
  text4 = entry4.get()
  text5 = entry5.get()
  text6 = entry6.get()
  text7 = entry7.get()
  content = "INSERT INTO vaccination_person_info ("
  "name, sexy, age, ID_num, address, allergy, date"
  ")"
  " VALUES ("%s", "%s", "%s", "%s", "%s", "%s", "%s");"   % (
  text1, text2, text3, text4, text5, text6, text7)
  self.connect_DBS(database="vaccine_info"  , content=content)
  tkinter.messagebox.showinfo(title="信息"  , message="数据添加成功!"  )
  def   clear  ():
  entry1.delete(0  , "end"  )
  entry2.delete(0  , "end"  )
  entry3.delete(0  , "end"  )
  entry4.delete(0  , "end"  )
  entry5.delete(0  , "end"  )
  entry6.delete(0  , "end"  )
  entry7.delete(0  , "end"  )
  tkinter.messagebox.showinfo(title="信息"  , message="数据已清空,请继续添加!"  )
  tk.Button(add_vaccination_person_info, text="添加"  , bg="white"  , font=("Arial,9"  ), width=9  , height=0  ,command=add).place(x=400  , y=360  )
  tk.Button(add_vaccination_person_info, text="清空"  , bg="white"  , font=("Arial,9"  ), width=9  , height=0  ,command=clear).place(x=160  , y=360  )
  查询疫苗分配信息
  def   vaccine_distr_info_query  (self):
  query = tk.Toplevel(app)
  query.title("信息查询"  )
  query.geometry("600x400"  )
  entry = tk.Entry(query, width=30  )
  entry.pack()
  entry.place(x=200  , y=80  )
  tk.Label(query, text="请输入疫苗分配单号:"  , font=("Arial"  , 9  )).place(x=50  , y=80  )
  tk.Label(query, text="查询结果:"  , font=("Arial"  , 9  )).place(x=50  , y=120  )
  text1 = tk.Text(query, width=50  , height=20  )
  text1.pack()
  text1.place(x=150  , y=120  )
  def   base_query  ():
  vaccine_distr_num = entry.get()
  print(vaccine_distr_num)
  content = "SELECT * FROM vaccine_distr_info WHERE vaccine_distr_num = %s;"   % vaccine_distr_num
  data = self.connect_DBS(database="vaccine_info"  , content=content)
  text1.delete(1.0  , "end"  )
  text1.insert(chars="{}"  .format(data), index="insert"  )
  tk.Button(query, text="查询"  , bg="white"  , font=("Arial,12"  ), width=9  , height=0  , command=base_query).place(x=450  ,
  y=75  )
  查询疫苗养护信息
  def   vaccination_maintenance_info_query  (self):
  query = tk.Toplevel(app)
  query.title("疫苗养护信息查询"  )
  query.geometry("600x400"  )
  entry = tk.Entry(query, width=30  )
  entry.pack()
  entry.place(x=200  , y=80  )
  tk.Label(query, text="请输入疫苗养护批号:"  , font=("Arial"  , 9  )).place(x=50  , y=80  )
  tk.Label(query, text="查询结果:"  , font=("Arial"  , 9  )).place(x=50  , y=120  )
  text1 = tk.Text(query, width=50  , height=20  )
  text1.pack()
  text1.place(x=150  , y=120  )
  def   base_query  ():
  vaccine_maintenance_num = entry.get()
  print(vaccine_maintenance_num)
  content = "SELECT * FROM vaccine_maintenance_info WHERE vaccine_maintenance_num = %s;"   % vaccine_maintenance_num
  data = self.connect_DBS(database="vaccine_info"  , content=content)
  text1.delete(1.0  , "end"  )
  text1.insert(chars="{}"  .format(data), index="insert"  )
  tk.Button(query, text="查询"  , bg="white"  , font=("Arial,12"  ), width=9  , height=0  , command=base_query).place(x=450  ,
  y=75  )
  def   vaccine_distr_info_query  (self):
  query = tk.Toplevel(app)
  query.title("信息查询"  )
  query.geometry("600x400"  )
  entry = tk.Entry(query, width=30  )
  entry.pack()
  entry.place(x=200  , y=80  )
  tk.Label(query, text="请输入疫苗分配单号:"  , font=("Arial"  , 9  )).place(x=50  , y=80  )
  tk.Label(query, text="查询结果:"  , font=("Arial"  , 9  )).place(x=50  , y=120  )
  text1 = tk.Text(query, width=50  , height=20  )
  text1.pack()
  text1.place(x=150  , y=120  )
  def   base_query  ():
  vaccine_distr_num = entry.get()
  print(vaccine_distr_num)
  content = "SELECT * FROM vaccine_distr_info WHERE vaccine_distr_num = %s;"   % vaccine_distr_num
  data = self.connect_DBS(database="vaccine_info"  , content=content)
  text1.delete(1.0  , "end"  )
  text1.insert(chars="{}"  .format(data), index="insert"  )
  tk.Button(query, text="查询"  , bg="white"  , font=("Arial,12"  ), width=9  , height=0  , command=base_query).place(x=450  ,
  y=75  )
  查询接种人员信息
  def   vaccination_person_info_query  (self):
  query = tk.Toplevel(app)
  query.title("接种人员信息查询"  )
  query.geometry("600x400"  )
  entry = tk.Entry(query, width=30  )
  entry.pack()
  entry.place(x=200  , y=80  )
  tk.Label(query, text="请输入接种人员身份证号:"  , font=("Arial"  , 9  )).place(x=50  , y=80  )
  tk.Label(query, text="查询结果:"  , font=("Arial"  , 9  )).place(x=50  , y=120  )
  text1 = tk.Text(query, width=50  , height=20  )
  text1.pack()
  text1.place(x=150  , y=120  )
  def   base_query  ():
  ID_num = entry.get()
  content = "SELECT * FROM vaccination_person_info WHERE ID_num = %s;"   % ID_num
  data = self.connect_DBS(database="vaccine_info"  , content=content)
  text1.delete(1.0  , "end"  )
  text1.insert(chars="{}"  .format(data), index="insert"  )
  tk.Button(query, text="查询"  , bg="white"  , font=("Arial,12"  ), width=9  , height=0  , command=base_query).place(x=450  , y=75  )
  查询疫苗信息
  def   vaccine_info_query  (self):
  query = tk.Toplevel(app)
  query.title("疫苗信息查询"  )
  query.geometry("600x400"  )
  entry = tk.Entry(query, width=30  )
  entry.pack()
  entry.place(x=200  , y=80  )
  tk.Label(query, text="请输入疫苗批号:"  , font=("Arial"  , 9  )).place(x=50  , y=80  )
  tk.Label(query, text="查询结果:"  , font=("Arial"  , 9  )).place(x=50  , y=120  )
  text1 = tk.Text(query, width=50  , height=20  )
  text1.pack()
  text1.place(x=150  , y=120  )
  def   base_query  ():
  vaccine_num = entry.get()
  content = "SELECT * FROM vaccine_info WHERE vaccine_num = %s;"   % vaccine_num
  data = self.connect_DBS(database="vaccine_info"  , content=content)
  text1.delete(1.0  , "end"  )
  text1.insert(chars="{}"  .format(data), index="insert"  )
  tk.Button(query, text="查询"  , bg="white"  , font=("Arial,12"  ), width=9  , height=0  , command=base_query).place(x=450  , y=75  )
  修改疫苗信息
  def   modify_vaccine_info  (self):
  modify_info = tk.Toplevel(app)
  modify_info.title("疫苗信息修改"  )
  modify_info.geometry("600x400"  )
  entry = tk.Entry(modify_info, width=30  )
  entry.pack()
  entry.place(x=200  , y=60  )
  tk.Label(modify_info, text="请输入疫苗分配单号:"  , font=("Arial"  , 9  )).place(x=50  , y=60  )
  tk.Label(modify_info, text="疫苗批号:"  , font=("Arial"  , 9  )).place(x=80  , y=100  )
  tk.Label(modify_info, text="疫苗名称:"  , font=("Arial"  , 9  )).place(x=80  , y=130  )
  tk.Label(modify_info, text="企业名称:"  , font=("Arial"  , 9  )).place(x=80  , y=160  )
  tk.Label(modify_info, text="企业编号:"  , font=("Arial"  , 9  )).place(x=80  , y=190  )
  tk.Label(modify_info, text=" 规格:"  , font=("Arial"  , 9  )).place(x=80  , y=220  )
  tk.Label(modify_info, text=" 进价:"  , font=("Arial"  , 9  )).place(x=80  , y=250  )
  tk.Label(modify_info, text=" 预售价:"  , font=("Arial"  , 9  )).place(x=80  , y=280  )
  tk.Label(modify_info, text="企业上限:"  , font=("Arial"  , 9  )).place(x=80  , y=310  )
  tk.Label(modify_info, text="企业下限:"  , font=("Arial"  , 9  )).place(x=80  , y=340  )
  text1 = tk.Text(modify_info, width=50  , height=1  )
  text2 = tk.Text(modify_info, width=50  , height=1  )
  text3 = tk.Text(modify_info, width=50  , height=1  )
  text4 = tk.Text(modify_info, width=50  , height=1  )
  text5 = tk.Text(modify_info, width=50  , height=1  )
  text6 = tk.Text(modify_info, width=50  , height=1  )
  text7 = tk.Text(modify_info, width=50  , height=1  )
  text8 = tk.Text(modify_info, width=50  , height=1  )
  text9 = tk.Text(modify_info, width=50  , height=1  )
  text1.pack()
  text2.pack()
  text3.pack()
  text4.pack()
  text5.pack()
  text6.pack()
  text7.pack()
  text8.pack()
  text9.pack()
  text1.place(x=150  , y=100  )
  text2.place(x=150  , y=130  )
  text3.place(x=150  , y=160  )
  text4.place(x=150  , y=190  )
  text5.place(x=150  , y=220  )
  text6.place(x=150  , y=250  )
  text7.place(x=150  , y=280  )
  text8.place(x=150  , y=310  )
  text9.place(x=150  , y=340  )
  def   base_query  ():
  vaccine_modify_num = entry.get()
  content = "SELECT * FROM vaccine_info WHERE vaccine_num = %s;"   % vaccine_modify_num
  data = self.connect_DBS(database="vaccine_info"  , content=content)
  text1.delete(1.0  , "end"  )
  text2.delete(1.0  , "end"  )
  text3.delete(1.0  , "end"  )
  text4.delete(1.0  , "end"  )
  text5.delete(1.0  , "end"  )
  text6.delete(1.0  , "end"  )
  text7.delete(1.0  , "end"  )
  text8.delete(1.0  , "end"  )
  text9.delete(1.0  , "end"  )
  text1.insert(chars="{}"  .format(data[0  ]), index="insert"  )
  text2.insert(chars="{}"  .format(data[1  ]), index="insert"  )
  text3.insert(chars="{}"  .format(data[2  ]), index="insert"  )
  text4.insert(chars="{}"  .format(data[3  ]), index="insert"  )
  text5.insert(chars="{}"  .format(data[4  ]), index="insert"  )
  text6.insert(chars="{}"  .format(data[5  ]), index="insert"  )
  text7.insert(chars="{}"  .format(data[6  ]), index="insert"  )
  text8.insert(chars="{}"  .format(data[7  ]), index="insert"  )
  text9.insert(chars="{}"  .format(data[8  ]), index="insert"  )
  def   update_info  ():
  vaccine_del_num = entry.get()
  str_ls = [text1.get("1.0"  , "end"  )[0  :-1  ], text2.get("1.0"  , "end"  )[0  :-1  ], text3.get("1.0"  , "end"  )[0  :-1  ],
  text4.get("1.0"  , "end"  )[0  :-1  ], text5.get("1.0"  , "end"  )[0  :-1  ], text6.get("1.0"  , "end"  )[0  :-1  ],
  text7.get("1.0"  , "end"  )[0  :-1  ], text8.get("1.0"  , "end"  )[0  :-1  ], text9.get("1.0"  , "end"  )[0  :-1  ]]
  str_ls = [str(i) for   i in   str_ls]
  content = "UPDATE vaccine_info SET vaccine_num="%s", vaccine_name="%s", company_name="%s", vaccine_num="%s""
  ", size="%s", buy_price="%s", pre_sale_price="%s", limit_up="%s", limit_down="%s" WHERE "
  "vaccine_num = "%s";"   % (
  str_ls[0  ], str_ls[1  ], str_ls[2  ], str_ls[3  ], str_ls[4  ], str_ls[5  ], str_ls[6  ], str_ls[7  ], str_ls[8  ],vaccine_del_num)
  self.connect_DBS(database="vaccine_info"  , content=content)
  tkinter.messagebox.showinfo(title="信息"  , message="疫苗分配单号:{}数据修改成功!"  .format(vaccine_modify_num)
  return   None
  tk.Button(modify_info, text="查询"  , bg="white"  , font=("Arial,12"  ), width=9  , height=0  , command=base_query).place(x=450  ,y=55  )
  tk.Button(modify_info, text="修改"  , bg="white"  , font=("Arial,12"  ), width=9  , height=0  , command=update_info).place(x=260  ,y=370  )
  删除疫苗信息
  def   del_vaccine_info  (self):
  del_info = tk.Toplevel(app)
  del_info.title("疫苗信息删除"  )
  del_info.geometry("600x500"  )
  entry = tk.Entry(del_info, width=30  )
  entry.pack()
  entry.place(x=200  , y=80  )
  tk.Label(del_info, text="请输入疫苗批号:"  , font=("Arial"  , 9  )).place(x=50  , y=80  )
  tk.Label(del_info, text="查询结果:"  , font=("Arial"  , 9  )).place(x=50  , y=120  )
  text1 = tk.Text(del_info, width=50  , height=20  )
  text1.pack()
  text1.place(x=150  , y=120  )
  def   base_query  ():
  vaccine_del_num = entry.get()
  print(vaccine_del_num)
  content = "SELECT * FROM vaccine_info WHERE vaccine_num = %s;"   % vaccine_del_num
  data = self.connect_DBS(database="vaccine_info"  , content=content)
  text1.delete(1.0  , "end"  )
  text1.insert(chars="{}"  .format(data), index="insert"  )
  def   del_infor  ():
  vaccine_del_num = entry.get()
  print(vaccine_del_num)
  content = "DELETE FROM vaccine_info WHERE vaccine_num = %s;"   % vaccine_del_num
  data = self.connect_DBS(database="vaccine_info"  , content=content)
  tkinter.messagebox.showinfo(title="信息"  , message="疫苗批号:{}数据已删除!"  .format(vaccine_del_num))
  return   None
  tk.Button(del_info, text="查询"  , bg="white"  , font=("Arial,12"  ), width=9  , height=0  , command=base_query).place(x=450  ,y=75  )
  tk.Button(del_info, text="删除"  , bg="white"  , font=("Arial,12"  ), width=9  , height=0  , command=del_infor).place(x=280  ,
  y=400  )
  数据库
  create table vaccine_info(
  vaccine_num char(  50  ) not   null primary key,
  vaccine_name char(50  ) not   null,
  company_name char(50  ) not   null,
  company_num char(50  ) not   null,
  size char(50  ) null,
  buy_price char(50  ) not   null,
  pre_sale_price char(20  ) not   null,
  limit_up char(50  ) not   null,
  limit_down char(50  ) not   null
  );
  create table user_info(
  id int auto_increment primary key,
  user_name char(50  ) NOT NULL ,
  user_code char(50  ) NOT NULL
  );
  create table if   not   exists vaccine_distr_info (
  vaccine_distr_num char(50  ) primary key,
  date date not   null ,
  vaccine_num char(50  ) not   null ,
  vaccine_name char(50  ) not   null ,
  company_num char(50  ) not   null ,
  operator_num char(50  ) not   null ,
  num int not   null
  );
  create table if   not   exists vaccine_maintenance_info (
  vaccine_maintenance_num char(50  ) primary key ,
  vaccine_maintenance_name char(50  ) not   null ,
  admin_num char(50  ) not   null ,
  admin_name char(50  ) not   null ,
  maintenance_time date,
  cold_storage_temp char(20  ) not   null ,
  freezer_temp char(20  ) not   null ,
  equipment_operation char(50  ) not   null ,
  alter_info char(50  ) not   null
  );
  create table if   not   exists vaccination_person_info(
  id int auto_increment primary key,
  name char(20  ) not   null ,
  sexy char(10  ) not   null ,
  age char(10  ) not   null ,
  ID_num char(50  ) not   null ,
  address char(70  ) not   null ,
  allergy char(10  ) not   null ,
  date date
  );
  好了,就是这些内容,感兴趣的小伙伴,可以动手试一试。

京东物流拟出售子公司全部股权,涉资3000万美元5月20日,资本邦了解到,京东物流(02618。HK)在港交所发布公告,于5月19日,公司直接全资子公司(卖方)与京东科技的间接全资子公司(买方)订立股权转让协议。据此,卖方已有条谷歌要求俄罗斯最高法院撤销关于沙皇格勒电视台的判决据俄新社5月24日报道,5月20日,俄罗斯联邦最高法院收到了被告美国谷歌(GoogleLLC)总公司爱尔兰谷歌(GoogleIrelandLimited)有限公司和俄罗斯谷歌(Go辽宁工大15项科技成果入选省科技厅成果库近日,辽宁省高校78项科技成果入选辽宁省科技厅成果库。其中,辽宁工程技术大学15项科技成果入选,入选数量在全省高校院所中名列第一。建立省科技厅成果库,旨在及时掌握高校院所既有科技成中国股市即将起飞的五大鸿蒙概念龙头股!(附名单)对于手机这种产品来说,其实发展到一定程度之后,更重要的是软件方面的东西,比如系统。内行人就知道,手机是否流畅,很大的决定性因素是系统优化,简单来说就是系统如果做得好,那么手机用起来博世中国与文远知行达成战略合作,推进高阶智能驾驶加速落地5月25日,全球领先的汽车技术与服务供应商博世宣布,已与文远知行签署战略合作协议。双方将在智能驾驶算法领域开展合作,共同推进博世中国高阶智能驾驶解决方案加速落地,助力应用于乘用车的2022达沃斯世界经济论坛中各国高层官员对加密货币的评价过去一年,美联储收紧货币政策影响了股票和加密货币。本月,在美联储加息半个点的预期和之后,比特币和其他加密货币经历了艰难的几周。这是今年几次预期的加息中的第二次,因为央行力图应对飙升纳米电池改变世界崔屹当选美国国家科学院院士2022年5月3日,美国国家科学院宣布增选院士120名,增选外籍院士30名,以表彰他们在原创性研究方面杰出且持续的成就。其中华人科学家有崔屹金亦石马中珮张启敬中国科学家有欧阳志云。RedmiNote12Pro渲染图,首发2亿主摄,升级5500mAh超大电池去年发布的RedmiNote10Pro和RedmiNote11Pro,深受消费者的喜爱,销量和口碑都很高,毕竟Note系列是Redmi定位走量的机型,而今面向2022年打造的Red氢能源电池车大批量上路或许只是时间问题氢能作为一种环保绿色新能源,越来越获得市场的认可。然而,氢气的制备和储存都还有着较大的探索空间。日前,我国科研人员的一项研究公开发布,通过搭建新型光热系统,让氢能的制备效率提高了6原来OPPO复活Ace子品牌给一加,是为了和红米K50打擂台呀如何看待一加产品经理亲口承认内部发RedmiK50黑稿?看了这个我才明白,原来OPPO复活Ace系列手机,然后打上一加的品牌,对标的机型是红米K50里手机呀!oppo不是投资了re国内功率半导体IDM厂商捷捷微电,MOSFET中低压技术超国际一线2022年4月1日,国内十强功率半导体器件IDM厂捷捷微电(股票代码300623)与世强硬创平台签理代理协议,授权世强全线代理旗下产品。捷捷微电是国内最早生产方片式单双向可控硅的厂
钠离子新能源大发展侧面说明新能源行业已经不能再投资了什么时候人们对新技术如此渴望?当原来的技术利润太高,大家都想分杯羹的时候。最新钠离子新能源的新闻不断,已经侧面说明新能源景气度太高。资本已经慌不择路,什么鬼故事都能骗钱了。我之前看华为再次发布新机,自研芯片5000毫安鸿蒙OS,售价只要1399元2021年各大手机厂商的新机发布节奏进一步加快。其中荣耀独立之后,在下半年更是月月有新机。好的一点的是,荣耀的市场份额也在快速的飙升。各大手机厂商在忙着发布新机的时候,华为却显得落向应用程序诱导安装亮出制度红牌国家网信办近日公布的移动互联网应用程序信息服务管理规定(征求意见稿)提出,应用程序提供者不得通过虚假宣传捆绑下载等行为,或者利用违法和不良信息诱导用户下载。相信不少人都有过这样的体2021年华为营收暴跌,消费者业务严重受挫,华为还能站起来吗?华为受挫,营收减三成,战略布局,战术转换,何来倒下,还能站起来?任正非民族企业灵魂,国家战略棋子,每走一步都关乎国家利益,大众利益。任正非用毛思想武装头脑,大布局,大穿插大迂回,走猪肉为什么越来越难吃?感谢邀请,欢迎关注爱农帮!猪肉为什么越来越不好吃了?这个问题可不能怪猪,得怪养猪的。猪也很委屈啊,喂什么就吃什么,喂它吃的好它就长的好,味道也好,喂它吃的不好,自然味道就差一点。看千兆路由器哪种的性价比高?价钱200以内的,质量好一点的?千兆路由器哪种的性价比高?价格200元以内的,质量好一点的?时过境迁,2019年提出来的问答题,现如今几年了,相对来说选择性价比高,价格200元以内,质量好一点的非常容易。无线路由realmeGT2和iQOO9两款手机谁更值得买,不妨再等等随着iQOO9系列的发布,1月份的第1波新机热潮已经慢慢结束,而我们回顾市场上发布的这些新旗舰中,realme和iQOO这两款系列,无论是从定价还是到产品的配置上,都有着非常多的相花粉暗自庆幸,华为5G旗舰现货开卖,麒麟5G鸿蒙一个不少随着时间进入2022年开始,手机市场的竞争又一次重新开始,小米和MOTO也都陆续首发了高通8Gen1芯片的旗舰,并且小米12系列获得了不错的评价和销量,5分钟销售额就达到了18亿,谁将成为华为的继承者?任正非两个女儿都有资格作为国内乃至全球领先的高科技企业,华为有着极高的影响力,一举一动都备受关注。华为创始人任正非更是被称为国内企业家的典范,不过现在华为正面临一个问题,任正非年事已高,需要物色一个华为元宇宙到底是个啥全世界似乎都在谈元宇宙。到底什么是元宇宙?它为什么突然火了?它离我们还有多远?比拼想象力的时候到了什么是元宇宙?截至目前,还没有一个被广泛认可的确切定义,人们对它的描述,还处在比拼数字货币十大细分龙头企业梳理及操作机会冬奥会预计成为数字人民币的重要试点,微众银行(微信支付)数字人民币钱包将上线,银行IT将在数字人民币的推动下开展新一轮建设周期,还带来相关的需求增长网安及银行IT。随着数字人民币不