Commit dff5ef26 by dong

fix20230106

parent a890e9f9
......@@ -504,14 +504,14 @@ class City(BaseModel, db.Model):
year = db.Column(db.Integer, doc='年份', comment='年份') # 年份
people = db.Column(db.Integer, doc='人口', comment='人口') # 人口
GDP = db.Column(db.Float, doc='GDP(万元)', comment='GDP(万元)') # GDP(万元)
addscale = db.Column(db.Float, doc='规上工业增加值', comment='规上工业增加值') # 规上工业增加值
investment = db.Column(db.Float, doc='固定投资资产', comment='固定投资资产') # 固定投资资产
retail = db.Column(db.Float, doc='社会消费品零售总额', comment='社会消费品零售总额') # 社会消费品零售总额
in_out = db.Column(db.Float, doc='进出口总额', comment='进出口总额') # 进出口总额
public = db.Column(db.Float, doc='一般公共预算支出', comment='一般公共预算支出') # 一般公共预算支出
public_in = db.Column(db.Float, doc='一般公共预算收入', comment='一般公共预算收入') # 一般公共预算收入
addscale = db.Column(db.Float, doc='规上工业增加值', comment='规上工业增加值') # 规上工业增加值
people_out = db.Column(db.Float, doc='居然人均可支配收入', comment='居然人均可支配收入') # 居然人均可支配收入
people_per = db.Column(db.Float, doc='居民消费价格指数', comment='居民消费价格指数') # 居民消费价格指数
in_out = db.Column(db.Float, doc='进出口总额', comment='进出口总额') # 进出口总额
public_in = db.Column(db.Float, doc='一般公共预算收入', comment='一般公共预算收入') # 一般公共预算收入
info = db.Column(db.Text, doc='基本信息', comment='基本信息') # 基本信息
question = db.Column(db.Text, doc='标注', comment='标注') # 标注
flag = db.Column(db.Integer, comment='数据标识 1整年数据,2阶段数据') # 人口
......
......@@ -43,41 +43,18 @@ def verify_identity(token, action_name):
# 查出做此操作的用户名
user_obj = User.query.get(user_id)
# name = user_obj.name # 用户名
# real_name = user_obj.real_name # 用户名
mobile = user_obj.mobile
operation_mobile = user_obj.mobile
role_id = user_obj.role_id # 权限id
# district_name = user_obj.district_name # 所属区县
# role_id = user_obj.role_id # 权限id
unit = user_obj.belong_organization # 所属机构
section = user_obj.belong_department # 所属部门
belong_unit = ''
# if district_name and unit and section:
# belong_unit = district_name + unit + section
# elif district_name and unit:
# belong_unit = district_name + unit
# elif district_name and section:
# belong_unit = district_name + section
# elif district_name:
# belong_unit = district_name
# elif unit:
if unit:
belong_unit = unit
elif section:
belong_unit = section
# print(mobile)
# if real_name:
user_name = user_obj.real_name # 真实姓名
# elif name and real_name:
# user_name = name + ': ' + real_name
# elif name:
# user_name = name
# elif real_name:
# user_name = real_name
# else:
# user_name = ''
return section, user_name, operation_mobile, user_id, belong_unit
......@@ -88,12 +65,6 @@ def verify_token(token):
:return: 用户信息 or None
'''
s = Serializer(current_app.config["SECRET_KEY"])
# try:
# s = s.loads(token)
# except BadSignature:
# raise AuthFailed(msg="token is invalid", error_code=1004)
# except SignatureExpired:
# raise AuthFailed(msg="token is expired", error_code=1004)
try:
data = s.loads(token)
except SignatureExpired: # 签名错误,签名被修改
......
......@@ -240,8 +240,6 @@ def show_all():
@api_address.route("/DownloadTemplate", methods=["POST"])
def download_xlsx():
req_dic = request.get_json()
# token = req_dic['token']
token = request.headers['token']
action_name = '下载模板'
try:
......@@ -255,7 +253,6 @@ def download_xlsx():
return jsonify(code=RET.PARAMERR, msg="参数不能为空!")
if template_type == 1: # 楼宇的模板标识
# build_template = "http://39.100.39.50:8009/aaa_statics/carrier_template/carrier_build.xlsx"
build_template = "http://39.100.39.50:8009/aaa_statics/carrier_template/可利用楼宇情况统计表.xlsx"
operation_message = "进行了下载楼宇数据模板操作"
upload_time = datetime.now()
......@@ -606,7 +603,7 @@ def read_template():
link_mobile=link_mobile, attract_advantage=attract_advantage, policy=policy,
audit_status=audit_status, upload_time=upload_time,
upload_people=user_name, upload_people_belong=belong_unit,
upload_people_id=user_id, upload_people_role_id=role_id, lng=lng, lat=lat,
upload_people_id=user_id, upload_people_role_id='', lng=lng, lat=lat,
)
db.session.add(carrier_obj)
db.session.commit()
......@@ -619,7 +616,7 @@ def read_template():
total_area=total_area, detail_address=detail_address,
audit_status=audit_status, upload_time=upload_time,
upload_people=user_name, upload_people_belong=belong_unit,
upload_people_id=user_id, upload_people_role_id=role_id,
upload_people_id=user_id, upload_people_role_id='',
lng=lng, lat=lat
)
db.session.add(carrier_obj)
......@@ -640,7 +637,7 @@ def read_template():
attract_advantage=attract_advantage, policy=policy,
audit_status=audit_status, upload_time=upload_time,
upload_people=user_name, upload_people_belong=belong_unit,
upload_people_id=user_id, upload_people_role_id=role_id,
upload_people_id=user_id, upload_people_role_id='',
lng=lng, lat=lat
)
db.session.add(carrier_obj)
......
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