用户抽屉权限展示问题

duizhaopin
13507605001 2 years ago
parent d1952dfe33
commit 79f1749c66

@ -216,9 +216,15 @@ def set_client_drawer_power():
for i in obj_list:
user_drawer = set_drawer_info.get(i.user_id)
if str(user_drawer) == "0":
cell_user_obj.session.delete(i)
cell_user_obj.delete(
and_(
EntityClientCellUser.client_id==i.client_id,
EntityClientCellUser.client_cell_id==drawer_id,
EntityClientCellUser.user_id==i.user_id
)
)
set_drawer_info.pop(i.user_id)
cell_user_obj.session.commit()
# cell_user_obj.session.commit()
# 筛选出需要添加的用户
drawer_add_user_list = []
for k,v in set_drawer_info.items():

@ -23,6 +23,7 @@ class BllClientCell(Repository):
from rms_user as a LEFT JOIN (
select * from rms_client_cell_user where client_cell_id='{drawer_id}' and client_id='{client_id}'
) as b on a.user_id=b.user_id
group by user_id
"""
try:
count_number = len(self.execute(sql_all).fetchall())

@ -68,7 +68,7 @@ class EntityClientCellUser(Base):
client_id = Column(String(50), comment="终端ID")
client_code = Column(String(50), comment="终端编号")
user_id = Column(String(50), comment="用户ID")
is_add = Column(Integer, comment="", default=0)
class EntityClientUser(Base):
__tablename__ = "rms_client_user"
@ -113,7 +113,6 @@ class EntityClientCell(Base):
cell_code = Column(String(50), comment="抽屉码")
client_id = Column(String(50), comment="终端id")
cell_speci = Column(String(50), comment="单元格")
is_add = Column(Integer, comment="", default=0)
if __name__ == '__main__':

Loading…
Cancel
Save