tfse-app-api-v0.2/cc_rating/cc_obj.py

80 lines
1.8 KiB
Python
Raw Normal View History

from cc_rating.cc_impl import *
from cc_rating.cc_utils import get_company_type
2021-12-02 17:20:48 +08:00
class CCRating:
2021-12-02 17:20:48 +08:00
def __init__(self):
self.rid = None
self.cid = None
def get_rating_records(self):
2021-12-02 17:20:48 +08:00
"""
查询企业的评价结果
Parameters:
-
Returns:
records: 企业的评价记录
"""
records = get_rating_records_impl(self.cid)
2021-12-02 17:20:48 +08:00
return records
def start_cc_rating(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
"""
info, result = start_cc_rating_impl(self.cid)
2021-12-03 14:15:24 +08:00
return info, result
2021-12-02 17:20:48 +08:00
def save_cc_rating_input(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
"""
save_cc_rating_input_form(self.cid, input_form)
2021-12-03 17:11:23 +08:00
return "保存成功"
2021-12-02 17:20:48 +08:00
def exec_cc_rating(self):
2021-12-02 17:20:48 +08:00
"""
提交数据执行综合信用评价
2021-12-02 17:20:48 +08:00
Parameters:
2021-12-20 15:53:34 +08:00
-
2021-12-02 17:20:48 +08:00
Returns:
2021-12-20 15:53:34 +08:00
评分执行结果
2021-12-02 17:20:48 +08:00
"""
res, info = exec_general_rating_impl(self.cid)
2021-12-30 14:24:16 +08:00
if res:
return "评分成功,请前往主页查看", 200
else:
2021-12-30 14:24:16 +08:00
return info, 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)