Commit b762a251 by dong

fix20230721

parent 8f452eff
...@@ -488,10 +488,8 @@ def batch_export_project5(): ...@@ -488,10 +488,8 @@ def batch_export_project5():
select_id_list = req_dic["select_id_list"] select_id_list = req_dic["select_id_list"]
# path = './apps/statics/project_file/' # path = './apps/statics/project_file/'
# pro_path = 'http://39.100.39.50:5050/statics/project_file/' # 项目路径 # pro_path = 'http://39.100.39.50:5050/statics/project_file/' # 项目路径
path = './apps/statics/project_file/'
pro_path = 'http://39.100.39.50:5050/statics/project_file/' # 项目路径 pro_path = SERVER_NAME + '/aaa_statics/project_file/' # 项目路径
# pro_path = SERVER_NAME + '/statics/project_file/' # 项目路径
if not select_id_list: if not select_id_list:
return jsonify(code=RET.PARAMERR, msg="参数不能为空!") return jsonify(code=RET.PARAMERR, msg="参数不能为空!")
target_data_list = [] target_data_list = []
...@@ -596,7 +594,7 @@ def batch_export_project5(): ...@@ -596,7 +594,7 @@ def batch_export_project5():
sheet.write(i + 1, j, target_data_list[i][j]) sheet.write(i + 1, j, target_data_list[i][j])
time_stamp = '{0:%Y%m%d%H%M%S}'.format(datetime.now()) time_stamp = '{0:%Y%m%d%H%M%S}'.format(datetime.now())
file_name = "招商引资项目表{}.xlsx".format(time_stamp) file_name = "招商引资项目表{}.xlsx".format(time_stamp)
excel.save(path + file_name) excel.save(pro_path + file_name)
return jsonify(code=RET.OK, url=pro_path + file_name, msg="导出/下载成功!") return jsonify(code=RET.OK, url=pro_path + file_name, msg="导出/下载成功!")
except Exception as e: except Exception as e:
current_app.logger.error(e) current_app.logger.error(e)
......
...@@ -1754,10 +1754,9 @@ def batch_export_project1(): ...@@ -1754,10 +1754,9 @@ def batch_export_project1():
return jsonify(code=RET.SESSIONERR, msg="用户信息校验失败,请重新登陆后尝试!") return jsonify(code=RET.SESSIONERR, msg="用户信息校验失败,请重新登陆后尝试!")
select_id_list = req_dic["select_id_list"] select_id_list = req_dic["select_id_list"]
path = './apps/statics/project_file/' # path = './apps/statics/project_file/'
# pro_path = 'D:/中研项目代码/flask_jincheng/apps/statics/project_file/' # pro_path = 'http://39.100.39.50:5050/statics/project_file/' # 项目路径
pro_path = 'http://39.100.39.50:5050/statics/project_file/' # 项目路径 pro_path = SERVER_NAME + '/aaa_statics/project_file/' # 项目路径
# pro_path = SERVER_NAME + '/static/project_file/' # 项目路径
if not select_id_list: if not select_id_list:
return jsonify(code=RET.PARAMERR, msg="参数不能为空!") return jsonify(code=RET.PARAMERR, msg="参数不能为空!")
target_data_list = [] target_data_list = []
...@@ -1831,7 +1830,7 @@ def batch_export_project1(): ...@@ -1831,7 +1830,7 @@ def batch_export_project1():
sheet.write(i + 1, j, target_data_list[i][j]) sheet.write(i + 1, j, target_data_list[i][j])
time_stamp = '{0:%Y%m%d%H%M%S}'.format(datetime.now()) time_stamp = '{0:%Y%m%d%H%M%S}'.format(datetime.now())
file_name = "线索库数据{}.xlsx".format(time_stamp) file_name = "线索库数据{}.xlsx".format(time_stamp)
excel.save(path + file_name) excel.save(pro_path + file_name)
# 记录项目动态 # 记录项目动态
for project_id in select_id_list: for project_id in select_id_list:
...@@ -1856,9 +1855,11 @@ def batch_export_project2(): ...@@ -1856,9 +1855,11 @@ def batch_export_project2():
current_app.logger.error(e) current_app.logger.error(e)
return jsonify(code=RET.SESSIONERR, msg="用户信息校验失败,请重新登陆后尝试!") return jsonify(code=RET.SESSIONERR, msg="用户信息校验失败,请重新登陆后尝试!")
select_id_list = req_dic["select_id_list"] select_id_list = req_dic["select_id_list"]
path = './apps/statics/project_file/' # path = './apps/statics/project_file/'
# pro_path = 'D:/中研项目代码/flask_jincheng/apps/statics/project_file/' # pro_path = 'D:/中研项目代码/flask_jincheng/apps/statics/project_file/'
pro_path = 'http://39.100.39.50:5050/statics/project_file/' # 项目路径 # pro_path = 'http://39.100.39.50:5050/statics/project_file/' # 项目路径
pro_path = SERVER_NAME + '/aaa_statics/project_file/' # 项目路径
if not select_id_list: if not select_id_list:
return jsonify(code=RET.PARAMERR, msg="参数不能为空!") return jsonify(code=RET.PARAMERR, msg="参数不能为空!")
target_data_list = [] target_data_list = []
...@@ -1948,7 +1949,7 @@ def batch_export_project2(): ...@@ -1948,7 +1949,7 @@ def batch_export_project2():
sheet.write(i + 1, j, target_data_list[i][j]) sheet.write(i + 1, j, target_data_list[i][j])
time_stamp = '{0:%Y%m%d%H%M%S}'.format(datetime.now()) time_stamp = '{0:%Y%m%d%H%M%S}'.format(datetime.now())
file_name = "对接库数据{}.xlsx".format(time_stamp) file_name = "对接库数据{}.xlsx".format(time_stamp)
excel.save(path + file_name) excel.save(pro_path + file_name)
# 记录项目动态 # 记录项目动态
for project_id in select_id_list: for project_id in select_id_list:
...@@ -1972,9 +1973,11 @@ def batch_export_project3(): ...@@ -1972,9 +1973,11 @@ def batch_export_project3():
current_app.logger.error(e) current_app.logger.error(e)
return jsonify(code=RET.SESSIONERR, msg="用户信息校验失败,请重新登陆后尝试!") return jsonify(code=RET.SESSIONERR, msg="用户信息校验失败,请重新登陆后尝试!")
select_id_list = req_dic["select_id_list"] select_id_list = req_dic["select_id_list"]
path = './apps/statics/project_file/' # path = './apps/statics/project_file/'
# pro_path = 'D:/中研项目代码/flask_jincheng/apps/statics/project_file/' # pro_path = 'D:/中研项目代码/flask_jincheng/apps/statics/project_file/'
pro_path = 'http://39.100.39.50:5050/statics/project_file/' # 项目路径 # pro_path = 'http://39.100.39.50:5050/statics/project_file/' # 项目路径
pro_path = SERVER_NAME + '/aaa_statics/project_file/' # 项目路径
if not select_id_list: if not select_id_list:
return jsonify(code=RET.PARAMERR, msg="参数不能为空!") return jsonify(code=RET.PARAMERR, msg="参数不能为空!")
target_data_list = [] target_data_list = []
...@@ -2078,7 +2081,7 @@ def batch_export_project3(): ...@@ -2078,7 +2081,7 @@ def batch_export_project3():
sheet.write(i + 1, j, target_data_list[i][j]) sheet.write(i + 1, j, target_data_list[i][j])
time_stamp = '{0:%Y%m%d%H%M%S}'.format(datetime.now()) time_stamp = '{0:%Y%m%d%H%M%S}'.format(datetime.now())
file_name = "签约库数据{}.xlsx".format(time_stamp) file_name = "签约库数据{}.xlsx".format(time_stamp)
excel.save(path + file_name) excel.save(pro_path + file_name)
# 记录项目动态 # 记录项目动态
for project_id in select_id_list: for project_id in select_id_list:
...@@ -2102,9 +2105,11 @@ def batch_export_project4(): ...@@ -2102,9 +2105,11 @@ def batch_export_project4():
current_app.logger.error(e) current_app.logger.error(e)
return jsonify(code=RET.SESSIONERR, msg="用户信息校验失败,请重新登陆后尝试!") return jsonify(code=RET.SESSIONERR, msg="用户信息校验失败,请重新登陆后尝试!")
select_id_list = req_dic["select_id_list"] select_id_list = req_dic["select_id_list"]
path = './apps/statics/project_file/' # path = './apps/statics/project_file/'
# pro_path = 'D:/中研项目代码/flask_jincheng/apps/statics/project_file/' # pro_path = 'D:/中研项目代码/flask_jincheng/apps/statics/project_file/'
pro_path = 'http://39.100.39.50:5050/statics/project_file/' # 项目路径 # pro_path = 'http://39.100.39.50:5050/statics/project_file/' # 项目路径
pro_path = SERVER_NAME + '/aaa_statics/project_file/' # 项目路径
if not select_id_list: if not select_id_list:
return jsonify(code=RET.PARAMERR, msg="参数不能为空!") return jsonify(code=RET.PARAMERR, msg="参数不能为空!")
target_data_list = [] target_data_list = []
...@@ -2203,7 +2208,7 @@ def batch_export_project4(): ...@@ -2203,7 +2208,7 @@ def batch_export_project4():
sheet.write(i + 1, j, target_data_list[i][j]) sheet.write(i + 1, j, target_data_list[i][j])
time_stamp = '{0:%Y%m%d%H%M%S}'.format(datetime.now()) time_stamp = '{0:%Y%m%d%H%M%S}'.format(datetime.now())
file_name = "开工库数据{}.xlsx".format(time_stamp) file_name = "开工库数据{}.xlsx".format(time_stamp)
excel.save(path + file_name) excel.save(pro_path + file_name)
# 记录项目动态 # 记录项目动态
for project_id in select_id_list: for project_id in select_id_list:
......
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