byxinyu111

This commit is contained in:
lixinyu1011
2025-11-01 10:37:45 +08:00
parent 91513a5f4c
commit 03745c5d08
9 changed files with 230 additions and 146 deletions

View File

@@ -1,22 +1,22 @@
[
{
"id": "3a1d4b7e-4bdc-16bf-7169-f60350d03c7e",
"id": "3a1d4c14-a9fb-d7dc-9e96-7a3ad6e50219",
"typeName": "配液瓶(小)板",
"code": "0001-00088",
"code": "0001-00093",
"barCode": "",
"name": "test1",
"quantity": 1.0,
"name": "test",
"quantity": 2.0,
"lockQuantity": 0.0,
"unit": "块",
"status": 1,
"isUse": false,
"locations": [
{
"id": "3a19deae-2c7a-2426-6d71-e9de3cb158b1",
"id": "3a19deae-2c7a-36f5-5e41-02c5b66feaea",
"whid": "3a19deae-2c79-05a3-9c76-8e6760424841",
"whName": "手动堆栈",
"code": "4",
"x": 2,
"code": "1",
"x": 1,
"y": 1,
"z": 1,
"quantity": 0
@@ -24,13 +24,58 @@
],
"detail": [
{
"id": "3a1d4b7e-4bdc-12e8-4d26-dddc77b03f63",
"detailMaterialId": "3a1d4b7e-4bdc-4e9e-8a3c-e9ba4a26457e",
"code": null,
"name": "test1",
"id": "3a1d4c14-a9fc-1daa-71fa-146cb1ccb930",
"detailMaterialId": "3a1d4c14-a9fc-4f38-4c48-68486c391c42",
"code": "0001-00093 - 05",
"name": "配液瓶(小)",
"quantity": "1",
"lockQuantity": "0",
"unit": "",
"unit": "",
"x": 1,
"y": 3,
"z": 1,
"associateId": null,
"typeName": "配液瓶(小)",
"typeId": "3a190c8c-fe8f-bf48-0dc3-97afc7f508eb"
},
{
"id": "3a1d4c14-a9fc-3659-ea61-cd587da9e131",
"detailMaterialId": "3a1d4c14-a9fc-018f-93e5-c49343d37758",
"code": "0001-00093 - 08",
"name": "配液瓶(小)",
"quantity": "1",
"lockQuantity": "0",
"unit": "个",
"x": 2,
"y": 4,
"z": 1,
"associateId": null,
"typeName": "配液瓶(小)",
"typeId": "3a190c8c-fe8f-bf48-0dc3-97afc7f508eb"
},
{
"id": "3a1d4c14-a9fc-3f94-de83-979d2646e313",
"detailMaterialId": "3a1d4c14-a9fc-9987-c0ef-4b7cbad49e6b",
"code": "0001-00093 - 01",
"name": "配液瓶(小)",
"quantity": "1",
"lockQuantity": "0",
"unit": "个",
"x": 1,
"y": 1,
"z": 1,
"associateId": null,
"typeName": "配液瓶(小)",
"typeId": "3a190c8c-fe8f-bf48-0dc3-97afc7f508eb"
},
{
"id": "3a1d4c14-a9fc-8c35-6b25-913b11dbaf4e",
"detailMaterialId": "3a1d4c14-a9fc-9a83-865b-0c26ea5e8cc4",
"code": "0001-00093 - 03",
"name": "配液瓶(小)",
"quantity": "1",
"lockQuantity": "0",
"unit": "个",
"x": 1,
"y": 2,
"z": 1,
@@ -39,75 +84,64 @@
"typeId": "3a190c8c-fe8f-bf48-0dc3-97afc7f508eb"
},
{
"id": "3a1d4b7e-4bdc-35b6-22d4-e6f3235e1c27",
"detailMaterialId": "3a1d4b7e-4bdc-ce0f-1fbb-b88de76fce98",
"code": null,
"name": "test1",
"id": "3a1d4c14-a9fc-b41f-e968-64953bfddccd",
"detailMaterialId": "3a1d4c14-a9fc-daf7-9d64-e5ec8d3ae0e2",
"code": "0001-00093 - 07",
"name": "配液瓶(小)",
"quantity": "1",
"lockQuantity": "0",
"unit": "",
"unit": "",
"x": 1,
"y": 4,
"z": 1,
"associateId": null,
"typeName": "配液瓶(小)",
"typeId": "3a190c8c-fe8f-bf48-0dc3-97afc7f508eb"
},
{
"id": "3a1d4c14-a9fc-c20f-c26e-b1bb2cdc3bca",
"detailMaterialId": "3a1d4c14-a9fc-673b-ac83-aaaf71287f1f",
"code": "0001-00093 - 06",
"name": "配液瓶(小)",
"quantity": "1",
"lockQuantity": "0",
"unit": "个",
"x": 2,
"y": 3,
"z": 1,
"associateId": null,
"typeName": "配液瓶(小)",
"typeId": "3a190c8c-fe8f-bf48-0dc3-97afc7f508eb"
},
{
"id": "3a1d4c14-a9fc-cf21-059c-fde361d82b6f",
"detailMaterialId": "3a1d4c14-a9fc-25b1-e736-6b0d8dac0fae",
"code": "0001-00093 - 02",
"name": "配液瓶(小)",
"quantity": "1",
"lockQuantity": "0",
"unit": "个",
"x": 2,
"y": 1,
"z": 1,
"associateId": null,
"typeName": "配液瓶(小)",
"typeId": "3a190c8c-fe8f-bf48-0dc3-97afc7f508eb"
}
]
},
{
"id": "3a1d4b7e-ee61-ae87-9cd0-31c7e6621b18",
"typeName": "5ml分液瓶板",
"code": "0010-00089",
"barCode": "",
"name": "test2",
"quantity": 1.0,
"lockQuantity": 0.0,
"unit": "块",
"status": 1,
"isUse": false,
"locations": [
},
{
"id": "3a19deae-2c7a-79b0-5e44-efaafd1e4cf3",
"whid": "3a19deae-2c79-05a3-9c76-8e6760424841",
"whName": "手动堆栈",
"code": "5",
"id": "3a1d4c14-a9fc-d732-2b93-9b2bd2bf581b",
"detailMaterialId": "3a1d4c14-a9fc-7f5d-b6b6-8bcb2e15f320",
"code": "0001-00093 - 04",
"name": "配液瓶(小)",
"quantity": "1",
"lockQuantity": "0",
"unit": "个",
"x": 2,
"y": 2,
"z": 1,
"quantity": 0
}
],
"detail": [
{
"id": "3a1d4b7e-ee61-8fb3-9a39-2c2841c3c8d0",
"detailMaterialId": "3a1d4b7e-ee61-305c-fe30-2620017ca1bd",
"code": null,
"name": "test2",
"quantity": "1",
"lockQuantity": "0",
"unit": "块",
"x": 1,
"y": 1,
"z": 1,
"associateId": null,
"typeName": "5ml分液瓶",
"typeId": "3a192c2a-ebb7-58a1-480d-8b3863bf74f4"
},
{
"id": "3a1d4b7e-ee61-ef5f-a7d1-f9399a4d3145",
"detailMaterialId": "3a1d4b7e-ee61-2f1d-6969-202ad3cbe226",
"code": null,
"name": "test2",
"quantity": "1",
"lockQuantity": "0",
"unit": "块",
"x": 1,
"y": 2,
"z": 1,
"associateId": null,
"typeName": "5ml分液瓶",
"typeId": "3a192c2a-ebb7-58a1-480d-8b3863bf74f4"
"typeName": "配液瓶(小)",
"typeId": "3a190c8c-fe8f-bf48-0dc3-97afc7f508eb"
}
]
}

View File

@@ -9,6 +9,7 @@ from unilabos.ros.nodes.resource_tracker import ResourceTreeSet
from unilabos.registry.registry import lab_registry
from unilabos.resources.bioyond.decks import BIOYOND_PolymerReactionStation_Deck
from unilabos.resources.bioyond.decks import YB_Deck
lab_registry.setup()
@@ -16,6 +17,8 @@ lab_registry.setup()
type_mapping = {
"加样头(大)": ("YB_jia_yang_tou_da_1X1_carrier", "3a190ca0-b2f6-9aeb-8067-547e72c11469"),
"": ("YB_1BottleCarrier", "3a190ca1-2add-2b23-f8e1-bbd348b7f790"),
"配液瓶(小)板": ("YB_6x_SmallSolutionBottleCarrier", "3a190c8b-3284-af78-d29f-9a69463ad047"),
"配液瓶(小)": ("YB_pei_ye_xiao_Bottler", "3a190c8c-fe8f-bf48-0dc3-97afc7f508eb"),
}
@@ -56,10 +59,10 @@ def bioyond_materials_liquidhandling_2() -> list[dict]:
def test_resourcetreeset_from_plr() -> list[dict]:
# 直接加载 bioyond_materials_reaction.json 文件
current_dir = os.path.dirname(os.path.abspath(__file__))
json_path = os.path.join(current_dir, "YB_materials_info.json")
json_path = os.path.join(current_dir, "test.json")
with open(json_path, "r", encoding="utf-8") as f:
materials = json.load(f)
deck = BIOYOND_PolymerReactionStation_Deck("test_deck")
deck = YB_Deck("test_deck")
output = resource_bioyond_to_plr(materials, type_mapping=type_mapping, deck=deck)
print(output)
# print(deck.summary())