diff --git a/apps/riic_report_analysis.py b/apps/riic_report_analysis.py index b825c4e..64114af 100644 --- a/apps/riic_report_analysis.py +++ b/apps/riic_report_analysis.py @@ -6,7 +6,7 @@ import os import asyncio import functools import re -from typing import Dict, Optional +from typing import Dict, Optional, Any rapid_ocr = None @@ -162,7 +162,7 @@ class RIICReportAnalysis: output += f"综合钱书比例:{(lmb_avg + external_lmb) / (exp_avg + external_exp):.2f}\n" output += f"钱书总和:{lmb_avg + exp_avg:.0f}\n" output += "\n-----效率算法-----\n" - output += f"贸易效率:{trading_efficiency * 100:.0f}%\n" + output += f"贸易效率:{trading_efficiency:.0%}\n" output += f"等效赤金:{gold_by_e:.0f}\n" output += f"经验调平:{balanced_exp_by_e:.0f}\n" if power_plants == 2: @@ -210,8 +210,8 @@ class RIICReportAnalysis: require_at=False, ) class TailoringCommand: - async def initial(self, sender: CommandSender, arg: Optional[str] = CLIArgument()): - if not arg: + async def initial(self, sender: CommandSender, arg: Optional[Any] = CLIArgument()): + if not arg or not isinstance(arg, str): await sender.reply(Text("请输入效率!")) return if arg.endswith("%"): @@ -224,13 +224,13 @@ class TailoringCommand: if efficiency > 30: efficiency /= 100 total_efficiency = efficiency + 1.1 - equiv_efficiency = total_efficiency * 1.241 - gold_efficiency = total_efficiency * 0.233 - lmb = equiv_efficiency * 24 * 60 / 70.138 * 500 + equiv_efficiency = total_efficiency * 1.2410210128 + gold_efficiency = total_efficiency * (1.2410210128 - 1.0141677) * 1.025 + lmb = equiv_efficiency * 24 * 60 / 70.137931 * 500 gold = gold_efficiency * 24 * 60 / 72 * 500 - output = f"整站效率:{total_efficiency * 100:.0f}%\n" - output += f"等效贸易:{(equiv_efficiency - 1) * 100:.0f}%\n" - output += f"等效制造:{gold_efficiency * 100:.0f}%\n" + output = f"整站效率:{total_efficiency:.0%}\n" + output += f"等效贸易:{equiv_efficiency - 1:.0%}\n" + output += f"等效制造:{gold_efficiency:.0%}\n" output += f"订单收益:{lmb:.0f}\n" output += f"赤金收益:{gold:.0f}" await sender.reply(Text(output))