Commit c53e52db by dong

fix20230208

parent 1d5c255e
......@@ -324,12 +324,20 @@ def upload_project_data2():
set_project_status = row_content[17] # 项目立项状态
project_progress = row_content[18] # 项目进展
sign_time = row_content[19] # 签约时间
y, m, d, h, i, s = xlrd.xldate_as_tuple(sign_time, data.datemode)
sign_time = "{0}-{1}-{2}".format(y, m, d)
project_year = ''
if sign_time:
project_year = int(sign_time.splite('/')[0])
project_year = int(sign_time.split('-')[0])
start_time = row_content[20] # 开工时间
y, m, d, h, i, s = xlrd.xldate_as_tuple(start_time, data.datemode)
start_time = "{0}-{1}-{2}".format(y, m, d)
end_time = row_content[21] # 竣工时间
y, m, d, h, i, s = xlrd.xldate_as_tuple(end_time, data.datemode)
end_time = "{0}-{1}-{2}".format(y, m, d)
is_fixed_investment = row_content[22] # 固定资产投资项目
investment_year = row_content[23] # 资金到位本年累计(万元)
investment_history = row_content[24] # 资金到位历史累计(万元)
......@@ -433,9 +441,13 @@ def upload_project_data2():
current_app.logger.error(e)
return jsonify(code=RET.DBERR, msg="数据库异常")
if success_num > 0:
if rep_project_name_list and success_num > 0:
return jsonify(code=RET.OK,
msg='上传成功!数据上传 {} 条数据,{}已存在同名项目。'.format(success_num, rep_project_name_list))
if success_num > 0:
return jsonify(code=RET.OK,
msg='上传成功!数据上传 {} 条数据。'.format(success_num))
else:
return jsonify(code=RET.DATAERR, msg='无新数据上传。')
......
......@@ -529,8 +529,8 @@ def statistic_jc_data():
return jsonify(code=RET.OK,
data={"data_li1": data_li1, "data_li2": data_li2,
"data_li3": data_li3, "data_li4": data_li4,
"data_li5": data_li5, "data_li6": data_li6},
data_time=data_time1,
"data_li5": data_li5, "data_li6": data_li6,
"data_time": data_time1},
msg="数据查询成功")
except Exception as e:
current_app.logger.error(e)
......
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