Commit 6f709d0c by dong

fix20221202

parent e54e9f71
...@@ -131,6 +131,10 @@ def check_project_detail1(): ...@@ -131,6 +131,10 @@ def check_project_detail1():
return jsonify(code=RET.PARAMERR, msg="参数不能为空!") return jsonify(code=RET.PARAMERR, msg="参数不能为空!")
try: try:
project_obj = ProjectManagement.query.filter_by(id=project_id, is_delete=0).first() project_obj = ProjectManagement.query.filter_by(id=project_id, is_delete=0).first()
if project_obj.industry and project_obj.industry2:
industry = project_obj.industry + '-' + project_obj.industry2
if project_obj.industry and not project_obj.industry2:
industry = project_obj.industry
project_data = {"id": project_obj.id, project_data = {"id": project_obj.id,
"project_stalker": project_obj.project_stalker, # 项目跟踪 "project_stalker": project_obj.project_stalker, # 项目跟踪
"project_name": project_obj.project_name, # 项目名称 "project_name": project_obj.project_name, # 项目名称
...@@ -139,8 +143,7 @@ def check_project_detail1(): ...@@ -139,8 +143,7 @@ def check_project_detail1():
"attract_name": project_obj.attract_name, # 引资方名称 "attract_name": project_obj.attract_name, # 引资方名称
"investor_name": project_obj.investor_name, # 投资方名称(万元) "investor_name": project_obj.investor_name, # 投资方名称(万元)
"investor_district": project_obj.investor_district, # 投资方所在地(亩) "investor_district": project_obj.investor_district, # 投资方所在地(亩)
"industry": project_obj.industry + '-' if project_obj.industry else '' + project_obj.industry2 if project_obj.industry2 else '', "industry": industry,
"investment_volume": project_obj.investment_volume, # 总投资额(万元) "investment_volume": project_obj.investment_volume, # 总投资额(万元)
"construction_content": project_obj.construction_content, # 建设内容 "construction_content": project_obj.construction_content, # 建设内容
"project_address": project_obj.project_address, # 项目选址 "project_address": project_obj.project_address, # 项目选址
...@@ -291,6 +294,12 @@ def upload_project_data2(): ...@@ -291,6 +294,12 @@ def upload_project_data2():
investment_history = row_content[24] # 资金到位历史累计(万元) investment_history = row_content[24] # 资金到位历史累计(万元)
project_stalker = row_content[25] # 项目跟踪 project_stalker = row_content[25] # 项目跟踪
project_stalker_explain = row_content[26] # 项目跟踪说明 project_stalker_explain = row_content[26] # 项目跟踪说明
if provence and city:
investor_district = provence + "/" + city
if provence and not city:
investor_district = provence
if city and not provence:
investor_district = city
except Exception as e: except Exception as e:
# 表示操作失败,回滚数据库操作 # 表示操作失败,回滚数据库操作
current_app.logger.error(e) current_app.logger.error(e)
...@@ -334,7 +343,7 @@ def upload_project_data2(): ...@@ -334,7 +343,7 @@ def upload_project_data2():
country=country, country=country,
provence=provence, provence=provence,
city=city, city=city,
investor_district=provence + "/" + city, investor_district=investor_district,
industry=industry1, industry=industry1,
industry2=industry2, industry2=industry2,
industry_level=industry_level, industry_level=industry_level,
......
...@@ -473,6 +473,12 @@ def search_project(): ...@@ -473,6 +473,12 @@ def search_project():
SikuProject.investor_name == investor_name if investor_name else text(''), SikuProject.investor_name == investor_name if investor_name else text(''),
SikuProject.investor_district == investor_district if investor_district else text(''), SikuProject.investor_district == investor_district if investor_district else text(''),
SikuProject.project_type.in_(project_type_list) if project_type_list else SikuProject.project_type == project_type if project_type else text(''), SikuProject.project_type.in_(project_type_list) if project_type_list else SikuProject.project_type == project_type if project_type else text(''),
# SikuProject.industry.in_(
# industry_list) if industry_list else SikuProject.industry == industry if industry else text(
# ''),
# SikuProject.industry2.in_(
# industry2_list) if industry2_list else SikuProject.industry2 == industry2 if industry2 else text(
# ''),
SikuProject.investment_volume >= float(investment_volume_list[0]) if investment_volume_list else text(''), SikuProject.investment_volume >= float(investment_volume_list[0]) if investment_volume_list else text(''),
SikuProject.investment_volume <= float(investment_volume_list[1]) if investment_volume_list else text(''), SikuProject.investment_volume <= float(investment_volume_list[1]) if investment_volume_list else text(''),
SikuProject.investment_volume >= float(investment_volume[0]) if investment_volume and not investment_volume_list else text(''), SikuProject.investment_volume >= float(investment_volume[0]) if investment_volume and not investment_volume_list else text(''),
......
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