ui_qml.workers.industry_workers
源文件
ui_qml/workers/industry_workers.py· 由scripts/gen_api_docs.py自动生成,请勿手改
模块说明:
工业制造 — 后台 Worker 线程
类
class SearchWorker(继承 QThread)
搜索可制造物品
定义行:21
方法
__init__
def __init__(self, query: str, db, parent=None)⚠️ 待补 docstring
此函数暂无 docstring,欢迎补充。
定义行:26
run
def run(self)⚠️ 待补 docstring
此函数暂无 docstring,欢迎补充。
定义行:31
class ScoreWorker(继承 BaseScoreWorker)
单项制造评分 — 继承 BaseScoreWorker
定义行:37
方法
__init__
def __init__(self, type_id: int, bp_me: int, bp_te: int, mat_hub: str, sell_hub: str, tax: float, mat_price_type: str='sell', runs: int=1, parent=None, char_name: str | None=None, system_id: int | None=None)⚠️ 待补 docstring
此函数暂无 docstring,欢迎补充。
定义行:40
_compute
def _compute(self) -> dict⚠️ 待补 docstring
此函数暂无 docstring,欢迎补充。
定义行:64
class BatchPlanCalcWorker(继承 BaseBatchScoreWorker)
后台批量重算所有生产计划的利润/评分
定义行:83
方法
__init__
def __init__(self, plans: list[dict], char_config: dict, parent=None, char_name: str | None=None, mat_hub: str='Jita', mat_price_type: str='sell', prod_hub: str='Jita', prod_price_type: str='sell', mat_mult: float=1.0, prod_mult: float=1.0)⚠️ 待补 docstring
此函数暂无 docstring,欢迎补充。
定义行:90
_resolve_char_config
def _resolve_char_config(self, plan_char_name: str) -> dict按计划角色名解析配置,带缓存
定义行:115
_calc_base
def _calc_base(self, item) -> dict单计划基准指标(calculate_plan_metrics),异常返回空 dict。
定义行:125
_subitem_output_qty
def _subitem_output_qty(self, mother: dict, base_results: dict) -> dict[int, int]同组更深子项产线的实际产出量 {子项 plan_id: runs × parallels × 单轮产出}。
定义行:152
_apply_mother_subitem_cost
def _apply_mother_subitem_cost(self, item, result, base_results) -> tuple[float, float, float, dict[int, SubitemCost]]拆解母项的个人口径(同组自制件按自制单件价、缺口按库存/市价)。
定义行:193
_calc_personal_margin
def _calc_personal_margin(self, plan: dict, result: dict, cost_overrides: dict[int, SubitemCost] | None=None) -> float计算考虑库存成本的个人利润率(%)。
定义行:229
_get_inventory_cost_map
def _get_inventory_cost_map(self) -> dict[int, tuple[int, float]]批量重算期间库存快照只取一次(避免每计划重复聚合查询)
定义行:255
run
def run(self)两遍计算:先算所有计划基准指标,再按子项自制价折算拆解母项。
定义行:263
class RankWorker(继承 QThread)
批量评分所有可制造物品
定义行:346
方法
__init__
def __init__(self, mat_hub: str, sell_hub: str, mat_price_type: str, bp_me: int, bp_te: int, tax: float, db, parent=None, top_n: int | None=None, char_name: str | None=None, system_id: int | None=None)⚠️ 待补 docstring
此函数暂无 docstring,欢迎补充。
定义行:353
run
def run(self)⚠️ 待补 docstring
此函数暂无 docstring,欢迎补充。
定义行:379
class ProcurementSummaryWorker(继承 QThread)
后台聚合「备料中」计划的待采购金额/体积(统计条模式,按计划机库扣库存)
定义行:435
方法
__init__
def __init__(self, plans: list[dict], *, default_mat_hangar_id: int | None=None, region_id: int=10000002, price_type: str='sell', price_mult: float=1.0, self_made: set[int] | None=None, parent=None)⚠️ 待补 docstring
此函数暂无 docstring,欢迎补充。
定义行:440
run
def run(self)⚠️ 待补 docstring
此函数暂无 docstring,欢迎补充。
定义行:462