2022-03-22 14:20:42 +08:00
|
|
|
|
from cc_rating.cc_impl import *
|
|
|
|
|
from cc_rating.cc_utils import get_company_type
|
2021-12-02 17:20:48 +08:00
|
|
|
|
|
|
|
|
|
|
2022-03-22 15:21:17 +08:00
|
|
|
|
class CCRating:
|
2021-12-02 17:20:48 +08:00
|
|
|
|
|
|
|
|
|
def __init__(self):
|
|
|
|
|
self.rid = None
|
|
|
|
|
self.cid = None
|
|
|
|
|
|
2022-03-22 14:20:42 +08:00
|
|
|
|
def get_rating_records(self):
|
2021-12-02 17:20:48 +08:00
|
|
|
|
"""
|
|
|
|
|
查询企业的评价结果
|
|
|
|
|
Parameters:
|
|
|
|
|
-
|
|
|
|
|
Returns:
|
|
|
|
|
records: 企业的评价记录
|
|
|
|
|
"""
|
2022-03-22 14:20:42 +08:00
|
|
|
|
records = get_rating_records_impl(self.cid)
|
2021-12-02 17:20:48 +08:00
|
|
|
|
return records
|
|
|
|
|
|
2022-03-22 10:29:52 +08:00
|
|
|
|
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
|
|
|
|
"""
|
2022-03-18 16:44:35 +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
|
|
|
|
|
2022-03-22 15:21:17 +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
|
|
|
|
|
"""
|
2022-03-22 15:21:17 +08:00
|
|
|
|
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
|
|
|
|
|
2022-03-22 16:02:38 +08:00
|
|
|
|
def exec_cc_rating(self):
|
2021-12-02 17:20:48 +08:00
|
|
|
|
"""
|
2021-12-15 10:55:20 +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
|
|
|
|
"""
|
2022-03-22 16:02:38 +08:00
|
|
|
|
res, info = exec_general_rating_impl(self.cid)
|
2021-12-30 14:24:16 +08:00
|
|
|
|
if res:
|
2021-12-15 10:55:20 +08:00
|
|
|
|
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)
|