tfse-app-api-v0.2/input/InputForm.py

78 lines
1.8 KiB
Python
Raw Normal View History

2021-12-02 17:20:48 +08:00
from input.scripts import *
2021-12-03 17:11:23 +08:00
class InputForm:
2021-12-02 17:20:48 +08:00
def __init__(self):
self.rid = None
self.cid = None
def rating_records_result(self):
"""
查询企业的评价结果
Parameters:
-
Returns:
records: 企业的评价记录
"""
records = rating_records_by_cid(self.cid)
return records
2021-12-07 17:17:26 +08:00
def start_general_rating_obj(self):
2021-12-02 17:20:48 +08:00
"""
2021-12-03 17:11:23 +08:00
开始企业综合评价
2021-12-02 17:20:48 +08:00
Parameters:
2021-12-03 14:15:24 +08:00
param desc
2021-12-02 17:20:48 +08:00
Returns:
2021-12-03 17:11:23 +08:00
info 信息
result 综合评价填报数据
2021-12-02 17:20:48 +08:00
"""
2021-12-07 17:17:26 +08:00
info, result = start_general_rating_script(self.cid)
2021-12-03 14:15:24 +08:00
return info, result
2021-12-02 17:20:48 +08:00
2021-12-03 17:11:23 +08:00
def save_input_general(self, input_form):
2021-12-02 17:20:48 +08:00
"""
2021-12-03 17:11:23 +08:00
保存综合评价填报数据
2021-12-02 17:20:48 +08:00
Parameters:
2021-12-03 17:11:23 +08:00
input_form: desc
2021-12-02 17:20:48 +08:00
Returns:
res: desc
"""
2021-12-03 17:11:23 +08:00
save_general_input_form(self.cid, input_form)
return "保存成功"
2021-12-02 17:20:48 +08:00
def exec_general_rating(self):
"""
提交数据执行综合信用评价
2021-12-02 17:20:48 +08:00
Parameters:
param: desc
Returns:
res: desc
"""
if exec_general_rating_scripts(self.cid):
return "评分成功,请前往主页查看", 200
else:
return "评分失败,请检查数据,或联系管理员", 210
2021-12-06 15:44:52 +08:00
@staticmethod
def choose_industry_obj():
"""
选择行业
Parameters:
-
Returns:
res: desc
"""
return choose_industry_script()
2021-12-06 16:17:10 +08:00
def questionnaire_obj(self):
"""
选择行业
Parameters:
-
Returns:
行业选项
"""
industry = get_company_type(self.cid)
return questionnaire_script(industry)