Commit 49b4993d by dong

fix20230314

parent 6c5649c5
......@@ -278,7 +278,7 @@ def upload_project_data2():
table = data.sheets()[0]
names = data.sheet_names() # 返回book中所有工作表的名字
status = data.sheet_loaded(names[0]) # 检查sheet1是否导入完毕
print(status)
# print(status)
nrows = table.nrows # 获取该sheet中的有效行数
except Exception as e:
current_app.logger.error(e)
......@@ -564,7 +564,7 @@ def batch_export_project5():
sheet_name = k
sheet = excel.add_sheet(sheet_name)
head_list = v
print(head_list)
# print(head_list)
for j in range(len(head_list)):
sheet.write(0, j, head_list[j])
# 写入数据,从第二行(i+1)
......@@ -814,7 +814,7 @@ def upload_shanxi_data():
return jsonify(code=RET.SESSIONERR, msg="进行操作时用户信息校验失败,请重新登陆后尝试!")
# 上传的文件
file = request.files['file']
print(file.filename) # 打印文件名
# print(file.filename) # 打印文件名
data_time = request.form['data_time']
# file_name = file.filename
upload_time = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
......@@ -824,7 +824,7 @@ def upload_shanxi_data():
table = data.sheets()[0]
names = data.sheet_names() # 返回book中所有工作表的名字
status = data.sheet_loaded(names[0]) # 检查sheet1是否导入完毕
print(status)
# print(status)
nrows = table.nrows # 获取该sheet中的有效行数
except Exception as e:
current_app.logger.error(e)
......
......@@ -1819,7 +1819,7 @@ def batch_export_project1():
sheet_name = k
sheet = excel.add_sheet(sheet_name)
head_list = v
print(head_list)
# print(head_list)
for j in range(len(head_list)):
sheet.write(0, j, head_list[j])
# 写入数据,从第二行(i+1)
......@@ -1936,7 +1936,7 @@ def batch_export_project2():
sheet_name = k
sheet = excel.add_sheet(sheet_name)
head_list = v
print(head_list)
# print(head_list)
for j in range(len(head_list)):
sheet.write(0, j, head_list[j])
# 写入数据,从第二行(i+1)
......@@ -2066,7 +2066,7 @@ def batch_export_project3():
sheet_name = k
sheet = excel.add_sheet(sheet_name)
head_list = v
print(head_list)
# print(head_list)
for j in range(len(head_list)):
sheet.write(0, j, head_list[j])
# 写入数据,从第二行(i+1)
......
......@@ -1008,7 +1008,7 @@ class User(BaseModel, db.Model):
s = Serializer(Config.SECRET_KEY, expires_in=Config.TOKEN_EXPIRATION)
# 接收用户id转换与编码
token = s.dumps({"id": user_id}).decode('ascii')
print(token)
# print(token)
return token
......
......@@ -378,8 +378,6 @@ def project():
i = 0
for project in project_list:
i += 1
print(i)
print(i)
if i > 7:
pass
else:
......
......@@ -142,13 +142,6 @@ def back_login():
role_name = '超级管理员'
if role == 2:
role_name = '系统运维员'
# operation_message = "{}通过后台登录成功了!".format(role_name)
# upload_time = datetime.now()
# log = OperationLog(read_type=0, operation_people_id=user.id, operation_time=upload_time, operation_people=name,
# section=role_name,
# operation_message=operation_message, action='使用密码登录后台管理系统成功')
# db.session.add(log)
# db.session.commit()
return jsonify(code=RET.OK, msg="登录成功", token=token, flag=3)
......
......@@ -414,7 +414,9 @@ def company_list():
company_count = company_obj.count()
data = [{
"id": company_obj.id,
"name": company_obj.company_name
"name": company_obj.company_name,
"product_all": company_obj.product_all,
"c_name": company_obj.c_name
} for company_obj in company_obj_list]
except Exception as e:
......
......@@ -18,9 +18,12 @@ def handle():
# 读取企业数据表的资质
i = 1
# for company_obj in company_obj_list:
for id in range(16, 5944047):
company_obj = Enterprise.query.get(id)
if not company_obj:
for id in range(305515, 5944047):
try:
company_obj = Enterprise.query.get(id)
if not company_obj:
continue
except:
continue
grade_li = []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment