计算接口增加DRP
This commit is contained in:
parent
e1eb673b76
commit
9779c79516
@ -15,6 +15,7 @@ from app.schemas.valuation import (
|
||||
from app.schemas.base import Success, SuccessExtra
|
||||
from app.utils.app_user_jwt import get_current_app_user_id
|
||||
from app.utils.calculation_engine import FinalValueACalculator
|
||||
from app.utils.calculation_engine.drp import DynamicPledgeRateCalculator
|
||||
|
||||
from app.utils.calculation_engine.economic_value_b1.sub_formulas.basic_value_b11 import calculate_popularity_score, \
|
||||
calculate_infringement_score, calculate_patent_usage_score
|
||||
@ -184,6 +185,14 @@ async def calculate_valuation(
|
||||
# 计算最终估值A(统一计算)
|
||||
calculation_result = calculator.calculate_complete_final_value_a(input_data)
|
||||
|
||||
# 计算动态质押
|
||||
drp_c = DynamicPledgeRateCalculator()
|
||||
'''
|
||||
monthly_amount (float): 月交易额(万元)
|
||||
heritage_level (str): 非遗等级
|
||||
'''
|
||||
drp_result = drp_c.calculate_dynamic_pledge_rate(float(data.monthly_transaction_amount),data.heritage_asset_level)
|
||||
|
||||
# 结构化日志:关键分值
|
||||
try:
|
||||
duration_ms = int((time.monotonic() - start_ts) * 1000)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user