diff --git a/ObjectsInProject/Company/Index.py b/ObjectsInProject/Company/Index.py index df2b046..40b130b 100644 --- a/ObjectsInProject/Company/Index.py +++ b/ObjectsInProject/Company/Index.py @@ -21,10 +21,10 @@ class ThisOperatingRiskAnalysis(OperatingRiskAnalysis): def dict_to_return(self): _dict_ = self.dict_to_show(columns=["更新日期", "风险分数", "风险级别", "风险数量", "列入失信名单", "合规风险统计", "经营风险统计", "周边风险统计", "变更记录统计"]) - _dict_["合规风险"] = _dict_.pop("合规风险统计") - _dict_["经营风险"] = _dict_.pop("经营风险统计") - _dict_["周边风险"] = _dict_.pop("周边风险统计") - _dict_["变更记录"] = _dict_.pop("变更记录统计") + _dict_["合规风险"] = [list(item.values()) for item in _dict_.pop("合规风险统计")] + _dict_["经营风险"] = [list(item.values()) for item in _dict_.pop("经营风险统计")] + _dict_["周边风险"] = [list(item.values()) for item in _dict_.pop("周边风险统计")] + _dict_["变更记录"] = [list(item.values()) for item in _dict_.pop("变更记录统计")] return _dict_ diff --git a/Routes/Company/Index.py b/Routes/Company/Index.py index 46660c8..c3b0f23 100644 --- a/Routes/Company/Index.py +++ b/Routes/Company/Index.py @@ -137,5 +137,5 @@ def operating_risk_route(**kwargs): except ReturnConditionCheckFailed as e: e.log_error() return {"info": e.failed_info}, e.status_code - # except KeyError: - # return {"info": "参数异常"}, 400 + except KeyError: + return {"info": "参数异常"}, 400