Commit 012ac2b0 by dong

fix20221121

parent 6d1656bf
...@@ -1222,7 +1222,7 @@ def check_project_detail(): ...@@ -1222,7 +1222,7 @@ def check_project_detail():
"Party_B_name": project_obj.Party_B_name, # 签约乙方名称 "Party_B_name": project_obj.Party_B_name, # 签约乙方名称
"Party_B_people": project_obj.Party_B_people, # 签约乙方联系人 "Party_B_people": project_obj.Party_B_people, # 签约乙方联系人
"Party_B_mobile": project_obj.Party_B_mobile, # 签约乙方联系方式 "Party_B_mobile": project_obj.Party_B_mobile, # 签约乙方联系方式
"sign_time": project_obj.sign_time.strftime("%Y-%m-%d"), # 签约时间 "sign_time": project_obj.sign_time.strftime("%Y-%m-%d") if project_obj.sign_time else '', # 签约时间
"project_to_area1": project_obj.project_to_area1, # 落地区域 "project_to_area1": project_obj.project_to_area1, # 落地区域
"sign_style": project_obj.sign_style, # 签约方式 "sign_style": project_obj.sign_style, # 签约方式
"sign_explain": project_obj.sign_explain, # 其他签约说明 "sign_explain": project_obj.sign_explain, # 其他签约说明
...@@ -1250,10 +1250,10 @@ def check_project_detail(): ...@@ -1250,10 +1250,10 @@ def check_project_detail():
"project_people_mobile": project_obj.project_people_mobile, # 项目方联系方式 "project_people_mobile": project_obj.project_people_mobile, # 项目方联系方式
"attract_name": project_obj.attract_name, # 引资方名称 "attract_name": project_obj.attract_name, # 引资方名称
"progress_condition": project_obj.progress_condition, # 项目推进情况 "progress_condition": project_obj.progress_condition, # 项目推进情况
"sign_time": project_obj.sign_time, # 签约时间 "sign_time": project_obj.sign_time.strftime("%Y-%m-%d") if project_obj.sign_time else '', # 签约时间
"investment": project_obj.investment.strftime("%Y-%m-%d"), # 到位资金 "investment": project_obj.investment, # 到位资金
"project_to_area1": project_obj.project_to_area1, # 落地区域 "project_to_area1": project_obj.project_to_area1, # 落地区域
"start_time": project_obj.start_time.strftime("%Y-%m-%d"), # 开工时间 "start_time": project_obj.start_time.strftime("%Y-%m-%d") if project_obj.start_time else '', # 开工时间
"remark": project_obj.remark, # 备注 "remark": project_obj.remark, # 备注
} }
# 项目进展 # 项目进展
...@@ -1955,8 +1955,27 @@ def batch_export_project4(): ...@@ -1955,8 +1955,27 @@ def batch_export_project4():
return jsonify(code=RET.DBERR, msg="批量导出操作失败!") return jsonify(code=RET.DBERR, msg="批量导出操作失败!")
# 获取项目动态
@api_manage.route("/GetProjectLog", methods=["POST"])
def get_project_log():
req_dic = request.get_json()
project_id = req_dic['project_id']
page = req_dic['page']
per_page = req_dic['per_page']
try:
log_obj_list = ProjectDynamicLog.query.filter(ProjectDynamicLog.project_id == project_id)
log_obj_list = log_obj_list.order_by(ProjectDynamicLog.time.desc()).paginate(page, per_page).items
data = [{
"id": log_obj.id,
"item": log_obj.operation_people + log_obj.item,
"time": log_obj.time,
} for log_obj in log_obj_list]
return jsonify(code=RET.OK, data=data, msg='项目动态信息获取成功!')
except Exception as e:
current_app.logger.error(e)
return jsonify(code=RET.DBERR, msg="项目动态信息获取失败!")
......
...@@ -1097,7 +1097,7 @@ class SikuProject(db.Model): ...@@ -1097,7 +1097,7 @@ class SikuProject(db.Model):
sign_time = db.Column(db.DateTime, comment='签约时间') sign_time = db.Column(db.DateTime, comment='签约时间')
sign_year = db.Column(db.Integer, comment='签约年份') sign_year = db.Column(db.Integer, comment='签约年份')
sign_style = db.Column(db.String(20), comment='签约方式') sign_style = db.Column(db.String(20), comment='签约方式')
sign_explain = db.Column(db.String(255), comment='其他签约说明') sign_explain = db.Column(db.String(255), comment='签约方式说明')
# 开工库 # 开工库
investment = db.Column(db.String(20), comment='到位资金') investment = db.Column(db.String(20), comment='到位资金')
...@@ -1156,4 +1156,62 @@ class ProjectDynamicLog(db.Model): ...@@ -1156,4 +1156,62 @@ class ProjectDynamicLog(db.Model):
project_id = db.Column(db.Integer, comment='项目id') project_id = db.Column(db.Integer, comment='项目id')
operation_people = db.Column(db.String(30), comment='操作人') operation_people = db.Column(db.String(30), comment='操作人')
item = db.Column(db.String(255), comment='动态') item = db.Column(db.String(255), comment='动态')
time = db.Column(db.String(30), comment='时间') time = db.Column(db.String(30), comment='时间')
\ No newline at end of file
"""项目管理"""
# 项目管理-台账信息表
class ProjectManagement(db.Model):
__tablename_ = "project_management"
__table_args__ = ({'comment': '项目化管理-项目信息表'}) # 添加表注释
# 基本信息
id = db.Column(db.Integer, primary_key=True, autoincrement=True, comment='主键id')
project_stalker = db.Column(db.String(30), comment='项目跟踪')
project_name = db.Column(db.String(30), comment='项目名称')
district = db.Column(db.String(20), comment='项目所在地')
development_area = db.Column(db.String(20), comment='开发区')
attract_name = db.Column(db.String(30), comment='引资方名称')
investor_name = db.Column(db.String(30), comment='投资方名称')
investor_district = db.Column(db.String(30), comment='投资方所在地')
industry = db.Column(db.String(20), comment='所属行业')
investment_volume = db.Column(db.Float, comment='总投资额(万元)')
construction_content = db.Column(db.String(30), comment='建设内容')
project_address = db.Column(db.String(20), comment='项目选址')
project_progress = db.Column(db.String(30), comment='项目进展')
project_problem = db.Column(db.String(255), comment='难点情况')
project_year = db.Column(db.Integer, comment='项目年份')
upload_unity = db.Column(db.String(20), comment='上传部门')
upload_people = db.Column(db.String(20), comment='上传人')
upload_time = db.Column(db.DateTime, comment='上传时间')
project_num = db.Column(db.String(30), comment='项目编号')
project_source = db.Column(db.String(20), comment='项目来源')
project_unity = db.Column(db.String(20), comment='项目申报单位')
is_development_project = db.Column(db.String(20), comment='是否属于开发区项目')
sign_time = db.Column(db.DateTime, comment='签约时间')
start_time = db.Column(db.DateTime, comment='开工时间')
end_time = db.Column(db.DateTime, comment='竣工时间')
investor_rank = db.Column(db.String(30), comment='投资方排名')
is_transf_project = db.Column(db.String(30), comment='是否转型项目')
country = db.Column(db.String(30), comment='投资方国别')
provence = db.Column(db.String(30), comment='投资方省份')
city = db.Column(db.String(30), comment='投资方市')
job_num = db.Column(db.Integer, comment='带动就业岗位(个)')
new_value = db.Column(db.Float, comment='新增产值(亿元)')
revenue = db.Column(db.Float, comment='贡献税收(亿元)')
use_land = db.Column(db.String(30), comment='项目用地情况(亩)')
new_land = db.Column(db.String(30), comment='其中新增用地(亩)')
construction_nature = db.Column(db.String(30), comment='建设性质(亩)')
is_fixed_investment = db.Column(db.String(30), comment='固定资产投资项目')
investment_year = db.Column(db.String(20), comment='资金到位本年累计(万元)')
investment_history = db.Column(db.String(20), comment='资金到位历史累计(万元)')
cooperation_way = db.Column(db.String(20), comment='合作方式')
set_project_status = db.Column(db.String(20), comment='项目立项状态')
investor_people = db.Column(db.String(30), comment='投资方联系人')
investor_mobile = db.Column(db.String(30), comment='投资方电话')
investor_address = db.Column(db.String(30), comment='投资方联系地址')
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