diff --git a/unilabos/devices/workstation/workstation_http_service.py b/unilabos/devices/workstation/workstation_http_service.py index 4565edea..27f869c0 100644 --- a/unilabos/devices/workstation/workstation_http_service.py +++ b/unilabos/devices/workstation/workstation_http_service.py @@ -668,7 +668,7 @@ __all__ = [ if __name__ == "__main__": # 简单测试HTTP服务 - class DummyWorkstation: + class BioyondWorkstation: device_id = "WS-001" def process_step_finish_report(self, report_request): diff --git a/unilabos/resources/graphio.py b/unilabos/resources/graphio.py index 98f6c74e..6a09d657 100644 --- a/unilabos/resources/graphio.py +++ b/unilabos/resources/graphio.py @@ -647,11 +647,11 @@ def resource_bioyond_to_plr(bioyond_materials: list[dict], type_mapping: Dict[st + (detail.get("y", 0) - 1) ) bottle = plr_material[number] - if detail["name"] in type_mapping: + if detail["typeName"] in type_mapping: # plr_material.unassign_child_resource(bottle) plr_material.sites[number] = None plr_material[number] = initialize_resource( - {"name": f'{detail["name"]}_{number}', "class": type_mapping[detail["name"]][0]}, resource_type=ResourcePLR + {"name": f'{detail["name"]}_{number}', "class": type_mapping[detail["typeName"]][0]}, resource_type=ResourcePLR ) else: bottle.tracker.liquids = [ diff --git a/unilabos/resources/itemized_carrier.py b/unilabos/resources/itemized_carrier.py index 44074b53..c56cc8b4 100644 --- a/unilabos/resources/itemized_carrier.py +++ b/unilabos/resources/itemized_carrier.py @@ -150,7 +150,7 @@ class ItemizedCarrier(ResourcePLR): def assign_resource_to_site(self, resource: ResourcePLR, spot: int): if self.sites[spot] is not None and not isinstance(self.sites[spot], ResourceHolder): raise ValueError(f"spot {spot} already has a resource, {resource}") - self.assign_child_resource(resource, location=self.child_locations.get(str(spot)), spot=spot) + self.assign_child_resource(resource, location=self.child_locations.get(list(self._ordering.keys())[spot]), spot=spot) def unassign_child_resource(self, resource: ResourcePLR): found = False