57 lines
1.3 KiB
Python
57 lines
1.3 KiB
Python
from esg.esg_impl import *
|
||
|
||
|
||
class EsgForm:
|
||
|
||
def __init__(self):
|
||
self.rid = None
|
||
self.cid = None
|
||
|
||
def rating_records_result(self):
|
||
"""
|
||
查询企业的评价结果(esg)
|
||
Parameters:
|
||
-
|
||
Returns:
|
||
records: 企业的esg评价记录
|
||
"""
|
||
records = rating_records_by_cid(self.cid)
|
||
return records
|
||
|
||
def start_esg_rating_obj(self):
|
||
"""
|
||
开始企业综合评价
|
||
Parameters:
|
||
param desc
|
||
Returns:
|
||
info 信息
|
||
result 综合评价填报数据
|
||
"""
|
||
info, result = start_esg_rating_script(self.cid)
|
||
return info, result
|
||
|
||
def save_input_general(self, input_form):
|
||
"""
|
||
保存综合评价填报数据
|
||
Parameters:
|
||
input_form: desc
|
||
Returns:
|
||
res: desc
|
||
"""
|
||
save_general_input_form(self.cid, input_form)
|
||
return "保存成功"
|
||
|
||
def exec_esg_rating(self):
|
||
"""
|
||
提交数据,执行综合信用评价
|
||
Parameters:
|
||
-
|
||
Returns:
|
||
评分执行结果
|
||
"""
|
||
res, info = exec_esg_rating_scripts(self.cid)
|
||
if res:
|
||
return "评分成功,请前往主页查看", 200
|
||
else:
|
||
return info, 210
|