Commit c622ecb4 by dong

fix20230201

parent e495b92e
......@@ -137,7 +137,14 @@ def update_joint_project(upload_people, row_content):
investor_name = row_content[2] # 投资方名称
investor_district1 = row_content[3] # 投资方所在地,省
investor_district2 = row_content[4] # 投资方所在地,市
investor_district = investor_district1 + '/' + investor_district2
if investor_district2:
if investor_district2 in ['北京市', '上海市', '天津市', '重庆市']:
# return jsonify(code=RET.DATAERR, msg='{} 项目,请按照表格要求填写直辖市和行政区'.format(project_name))
return 'error2'
investor_district = investor_district1 + '/' + investor_district2
else:
investor_district = investor_district1
project_type1 = row_content[5] # 项目单位(项目类型),一级行业
project_type2 = row_content[6] # 项目单位(项目类型),二级行业
......@@ -210,8 +217,12 @@ def update_sign_project(upload_people, row_content):
investor_name = row_content[3] # 投资方名称
investor_district1 = row_content[4] # 投资方所在地,省
investor_district2 = row_content[5] # 投资方所在地,市
investor_district = investor_district1 + '/' + investor_district2
if investor_district2:
if investor_district2 in ['北京市', '上海市', '天津市', '重庆市']:
return 'error2'
investor_district = investor_district1 + '/' + investor_district2
else:
investor_district = investor_district1
project_type1 = row_content[6] # 项目单位(项目类型),一级行业
project_type2 = row_content[7] # 项目单位(项目类型),二级行业
project_type = project_type1 + '/' + project_type2
......@@ -300,8 +311,12 @@ def update_start_project(upload_people, row_content):
investor_name = row_content[3] # 投资方名称
investor_district1 = row_content[4] # 投资方所在地,省
investor_district2 = row_content[5] # 投资方所在地,市
investor_district = investor_district1 + '/' + investor_district2
if investor_district2:
if investor_district2 in ['北京市', '上海市', '天津市', '重庆市']:
return 'error2'
investor_district = investor_district1 + '/' + investor_district2
else:
investor_district = investor_district1
project_type1 = row_content[6] # 项目单位(项目类型),一级行业
project_type2 = row_content[7] # 项目单位(项目类型),二级行业
project_type = project_type1 + '/' + project_type2
......@@ -843,6 +858,8 @@ def upload_project_data1():
continue
elif ret == 'error1':
return jsonify(code=RET.DATAERR, msg='数据更新出错,错误位置为第【{}】行!'.format(i))
elif ret == 'error2':
return jsonify(code=RET.DATAERR, msg='数据入库出错,错误位置为第【{}】行!请按照表格要求填写直辖市和行政区。'.format(i))
else:
pass
if int(data_type) == 3: # 更新签约库
......@@ -861,6 +878,8 @@ def upload_project_data1():
continue
elif ret == 'error1':
return jsonify(code=RET.DATAERR, msg='数据更新出错,错误位置为第【{}】行!'.format(i))
elif ret == 'error2':
return jsonify(code=RET.DATAERR, msg='数据入库出错,错误位置为第【{}】行!请按照表格要求填写直辖市和行政区。'.format(i))
else:
pass
if int(data_type) == 4: # 更新开工库
......@@ -879,6 +898,8 @@ def upload_project_data1():
continue
elif ret == 'error1':
return jsonify(code=RET.DATAERR, msg='数据更新出错,错误位置为第【{}】行!'.format(i))
elif ret == 'error2':
return jsonify(code=RET.DATAERR, msg='数据入库出错,错误位置为第【{}】行!请按照表格要求填写直辖市和行政区。'.format(i))
else:
pass
if int(data_type) == 1 and rep_project_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