zlwu il y a 5 mois
Parent
commit
22685bfd23
100 fichiers modifiés avec 4976 ajouts et 1886 suppressions
  1. 1 1
      backend/app.pid
  2. 4 2
      backend/app/api/material.py
  3. 11 0
      backend/app/api/menu.py
  4. 1 1
      backend/app/api/production.py
  5. 167 1
      backend/app/api/production_material.py
  6. 20 0
      backend/app/api/sample_reception.py
  7. 26 23
      backend/app/crud/equipment.py
  8. 549 1
      backend/app/crud/production_material_prep.py
  9. 8 4
      backend/app/crud/production_material_stock_batch.py
  10. 343 12
      backend/app/crud/production_material_usage.py
  11. 68 0
      backend/app/crud/sample_reception.py
  12. 0 0
      backend/app/graphify-out/cache/ast/04a7c71864bc6e214d748999119dec2cac5a2748f3d0b9ebe3a1da984b014fd6.json
  13. 0 0
      backend/app/graphify-out/cache/ast/0b401ea694c76c1840ec1c5c63991a1ff387fab807302bfee92378cbc98a8824.json
  14. 0 0
      backend/app/graphify-out/cache/ast/15160a0fa128d4714e6e762c631f14468e3cd212137a0ea05bda11c2cf90bc95.json
  15. 0 0
      backend/app/graphify-out/cache/ast/157aef0a47a4f506561806c594c666f0436ea9f904235c83a71911d4797bcc91.json
  16. 0 0
      backend/app/graphify-out/cache/ast/17327f3bfdb770245ff60d7f90afc9eda3370cd7e69c698a6f28bad1a9c7c3dc.json
  17. 0 0
      backend/app/graphify-out/cache/ast/185d843fe6d34a7e55a2e0da5ab8664a15f67e797d00b9a090ead8ac0e7c8035.json
  18. 0 0
      backend/app/graphify-out/cache/ast/28fc6a87abf035985463fb7c228bfb06129cf0cc76d3e876d3e86b42f4025f42.json
  19. 0 0
      backend/app/graphify-out/cache/ast/292d640de76db72f8ef0aeeefe56290c0020c46d4b35fee3afac54670725b086.json
  20. 0 0
      backend/app/graphify-out/cache/ast/3b9cae2763c739a9f8f97e7d6e81c5b3d30ad9e1b5e05e2261dc840d30217e67.json
  21. 0 0
      backend/app/graphify-out/cache/ast/4a28c07b5e0ed0a25f86438d149e1672fe4e22f80a81b6e4d90234525b54dc07.json
  22. 0 0
      backend/app/graphify-out/cache/ast/4ad99cd65b0177fdf0012cd4ba8861b49d906a26c99896acd252dc3cada81c8a.json
  23. 0 0
      backend/app/graphify-out/cache/ast/4be9f1947ead67778be1cea8c3d8b1c8af3f1a57afbf0bcacb5632a8b30f1385.json
  24. 0 0
      backend/app/graphify-out/cache/ast/51b680f5f7e990e6d2d4f3074f8af57397ab9e545a394ee0cd1f111e464e7479.json
  25. 0 0
      backend/app/graphify-out/cache/ast/59f6beb29a1e8f24458a25b362fdafcf05a31b4bc967ba5e8fa41bc8c58167a4.json
  26. 0 0
      backend/app/graphify-out/cache/ast/63a2bb35bdde47664a1fcee9fa981d035b932264358befb35c65de711648ac71.json
  27. 0 0
      backend/app/graphify-out/cache/ast/7493e395a12b5cd10f67e80751b8ed4abb9925e6fcbf42e52b779c5ef3a15381.json
  28. 0 0
      backend/app/graphify-out/cache/ast/791fadf2ad7ec423c1f36e3aefea83d386aef79bc0ad898063332f9b7fb0c4bc.json
  29. 0 0
      backend/app/graphify-out/cache/ast/84649c64e24c3ba2db41c73d994c99d226cbcf08046fc448d2166f8a8e6d78a5.json
  30. 0 0
      backend/app/graphify-out/cache/ast/8c63c5ca15c663bacfb04e719114e388124c3037684e75c0588652d8d75031e3.json
  31. 0 0
      backend/app/graphify-out/cache/ast/95599cd6e813cc6d3a3da7f951123f380e42e74d26240055800b4b11a659a056.json
  32. 0 0
      backend/app/graphify-out/cache/ast/9b71eb4b80cf66926a32073874fca8416b6b56cf3d1f9cea03f38d68022a9c6a.json
  33. 0 0
      backend/app/graphify-out/cache/ast/9d663c53b7819f064e39bdac1aad43dac5ba1eb02ca0ab66d41b22b1f3201d02.json
  34. 0 0
      backend/app/graphify-out/cache/ast/9f92b972e9d385eac2084b6b285a7aa904f0588e2fd1210de82be31e3f79996f.json
  35. 0 0
      backend/app/graphify-out/cache/ast/a285faa7128e69db4937f7305dcc9405d8274766291b7a4fcce3c1e4121eb64d.json
  36. 0 0
      backend/app/graphify-out/cache/ast/a73b90efda0f64a97b06c068e4d507334977f65839e4ea2fe267bfca122d731d.json
  37. 0 0
      backend/app/graphify-out/cache/ast/ab62c9eb27b15cc1f127ff98bb34ae68113191b536ae09a218da14cb8009a942.json
  38. 0 0
      backend/app/graphify-out/cache/ast/ae56666b512bc82f318b950e71223c60039f4fc39f45fadbff83ed54b6be7b35.json
  39. 0 0
      backend/app/graphify-out/cache/ast/b2772c93432089b9ef0bf5dfb85f0530366ba40f5f2bc74f476c4f5cc1c94a06.json
  40. 0 0
      backend/app/graphify-out/cache/ast/c1cb494ed25b078c187a25067ffcf9b9b47811d142385a397c8302aaff5cb891.json
  41. 0 0
      backend/app/graphify-out/cache/ast/c52c8c8070cd6f2b4e40f76e220683951bbf36a80ea39927e277470875f0f6d0.json
  42. 0 0
      backend/app/graphify-out/cache/ast/dabb26616162fc99cb17a1b77168d8b2ea3935c95660530227603a0dfeea0c98.json
  43. 0 0
      backend/app/graphify-out/cache/ast/ddbacb8526e36752753e4cd90033662a71dd43d569f31cfaf4be60ff9f385a16.json
  44. 0 0
      backend/app/graphify-out/cache/ast/de964e2e34425a1124a18fc16a8749a955c44d031029f09e8785cb6b0ac8fea6.json
  45. 0 0
      backend/app/graphify-out/cache/ast/ec584dc755471661edfab117ff1dd26e2dd9abe13d783306b516874c70c8c2bd.json
  46. 0 0
      backend/app/graphify-out/cache/ast/f445fb897b28defb375bd519c2cbc3394f0684f48b07608759db5ac0b28d2232.json
  47. 632 666
      backend/graphify-out/.graphify_analysis.json
  48. 394 86
      backend/graphify-out/.graphify_extract.json
  49. 147 97
      backend/graphify-out/GRAPH_REPORT.md
  50. 1 1
      backend/graphify-out/graph.html
  51. 114 114
      backend/graphify-out/graph.json
  52. 16 14
      backend/graphify-out/manifest.json
  53. 218 0
      backend/scripts/seed_production_materials.py
  54. 46 0
      docs/sql/alter_sys_menu_add_market_my_material_usage.sql
  55. 136 0
      docs/sql/clear_biz_production_material_data.sql
  56. 496 0
      docs/superpowers/plans/2026-06-15-market-material-my-usage-plan.md
  57. 306 0
      docs/superpowers/specs/2026-06-15-configured-reagent-design.md
  58. 224 0
      docs/superpowers/specs/2026-06-15-market-material-my-usage-design.md
  59. 458 471
      web-admin/graphify-out/.graphify_analysis.json
  60. 169 155
      web-admin/graphify-out/.graphify_extract.json
  61. 111 101
      web-admin/graphify-out/GRAPH_REPORT.md
  62. 1 1
      web-admin/graphify-out/graph.html
  63. 112 112
      web-admin/graphify-out/graph.json
  64. 24 21
      web-admin/graphify-out/manifest.json
  65. 130 1
      web-admin/src/api/production-material.ts
  66. 5 1
      web-admin/src/api/production.ts
  67. 17 0
      web-admin/src/api/sample-reception.ts
  68. 1 0
      web-admin/src/graphify-out/cache/ast/0911f9985c8626217a120c9c3039d10a85212e58fa0cf3dc705c49e38044e834.json
  69. 0 0
      web-admin/src/graphify-out/cache/ast/0e935921dcaf40dff575eabd7243cb3178e7b7976b07e84b710ea0b88e2afbbd.json
  70. 1 0
      web-admin/src/graphify-out/cache/ast/1448bd8bac9768436a59d37d81d8e1ec89510ff196e0d8bf579b71b4335ed043.json
  71. 1 0
      web-admin/src/graphify-out/cache/ast/18aed931ebd57ac759235fdd2178b1591e9c25b47759b4f6688409e97c013137.json
  72. 1 0
      web-admin/src/graphify-out/cache/ast/23158e8efc3cc82ad09bcdfbcf383706512e718aef6dfc0837e35579907d0c5a.json
  73. 0 0
      web-admin/src/graphify-out/cache/ast/2809551f5cfe5eca75f53f4d54ace039f9b308db6a02a19b5c450d301e8f2beb.json
  74. 1 0
      web-admin/src/graphify-out/cache/ast/34ab406446d7411d047478c2f7d21e4b34c6fd1b32329030654aac9fe52a404f.json
  75. 0 0
      web-admin/src/graphify-out/cache/ast/39ffd935e5315fe4fcbdbbc63593bcbf9673e49bd9022f758188e6a7379f36e5.json
  76. 0 0
      web-admin/src/graphify-out/cache/ast/3bb91872b1bab2ac8366115a81698eda508d6e80f51e20fb204b2e4ee1083e67.json
  77. 1 0
      web-admin/src/graphify-out/cache/ast/3f60bb4b8d2e9ade20589144c77c598a22ad1bd90a96a670d88511c074c62dc0.json
  78. 0 0
      web-admin/src/graphify-out/cache/ast/4263df63670669e6af30ebfafc9dbef07947a664d273c833cbc11f4bf2e6cc23.json
  79. 0 0
      web-admin/src/graphify-out/cache/ast/434bc84459de27d92d10decccd174e9f44cfaa0b27a6975703b583fb84b2fcde.json
  80. 0 0
      web-admin/src/graphify-out/cache/ast/497593ffaea0a74bd33c8723089fd3189b38015192993e8742485c113bf43e64.json
  81. 1 0
      web-admin/src/graphify-out/cache/ast/5046d79bde02113f61bc1a03bb74a1c8e02c064958919dc31dec6b602b66a9da.json
  82. 1 0
      web-admin/src/graphify-out/cache/ast/50d1c8e00b6aa81af4faf33b9ff9e49b7cad29bf2592200cc78cdbfe2fe5a432.json
  83. 1 0
      web-admin/src/graphify-out/cache/ast/52c6334d5c8a3a9a6bd1282c9971d53b27d66b98e7340be096cf117749aeb69e.json
  84. 1 0
      web-admin/src/graphify-out/cache/ast/55ac680c62f67dfaaee51e9e08ad586fd34ca144727cf41010b3f2ba823f6b83.json
  85. 1 0
      web-admin/src/graphify-out/cache/ast/6226960a9665e206f9bf1728be17c0238d834aa12b54d44d4318ba65054fa1ba.json
  86. 1 0
      web-admin/src/graphify-out/cache/ast/63f4e68e747ffc9b946b1a7b5f12db0962b334f1cb5533591ac12b9e209219a2.json
  87. 1 0
      web-admin/src/graphify-out/cache/ast/711404c66ecdf4d51b8f0bc17eff849b334804208cc6674ead117b4c09f010d4.json
  88. 0 0
      web-admin/src/graphify-out/cache/ast/79dfc8b7ceac8aa824cbbced15c71e019d45c76c20b915bd2739aa9e68d3a1cb.json
  89. 1 0
      web-admin/src/graphify-out/cache/ast/7a7f89c3a541acd3b099327cfbce3bb3fbb7cfdf3aab784ba83456aeaa0f37bd.json
  90. 0 0
      web-admin/src/graphify-out/cache/ast/80d379d2264b8312fe20fcbca8edc3a41afb63dcd0af460db0583d9d18647b80.json
  91. 0 0
      web-admin/src/graphify-out/cache/ast/8a5ae7bc2c41af4e74fc14bf271a7ac8d493b354c880f8105e9c44c587dc6747.json
  92. 1 0
      web-admin/src/graphify-out/cache/ast/8abf844a04eb8c69c5a598f94f5c7d832126bcc75e320d3f47ce0b612923fff7.json
  93. 1 0
      web-admin/src/graphify-out/cache/ast/919e1d5e9dba87f79b447a28be4ab9ba59af8b47461c4986ba82b87c3d95300d.json
  94. 1 0
      web-admin/src/graphify-out/cache/ast/91c45d72e9b3cee181abf380a487696a7246314064854cde8c355bfec828a534.json
  95. 1 0
      web-admin/src/graphify-out/cache/ast/9cd801caf018089938561d3a495979e247268e8a9e10783b1cba6d0320cb9b56.json
  96. 0 0
      web-admin/src/graphify-out/cache/ast/afdcabc164ff15fb365369d2aa0a19b64c475bf2d50f8c6de271c1f0ca2aa1ef.json
  97. 1 0
      web-admin/src/graphify-out/cache/ast/b8f04075ebb8442dafe9b5b20a9e74623f29e164f6a044173f1a5f0888afbf5b.json
  98. 1 0
      web-admin/src/graphify-out/cache/ast/bdb0afa73692fda8c882dbc855ddb9bfd767946200d120e2ef5d08547ec6c8e4.json
  99. 1 0
      web-admin/src/graphify-out/cache/ast/c2670f5eaa0661f87f26cbdbf77caa4134912ad0906b8f48699d7301387c40b1.json
  100. 0 0
      web-admin/src/graphify-out/cache/ast/d197f4b7cc63086739522eb22e12aeddfb057819946f1fbd03342a4216fcd368.json

+ 1 - 1
backend/app.pid

@@ -1 +1 @@
-49078
+33473

+ 4 - 2
backend/app/api/material.py

@@ -10,7 +10,7 @@ from sqlalchemy.orm import Session
 from app.api.sample_reception import _get_current_user_id, _get_tenant_no, _page_payload
 from app.core.database import get_db
 from app.core.utils import parse_datetime
-from app.core.menu_guard import require_menu_code
+from app.core.menu_guard import require_any_menu_code, require_menu_code
 from app.core.response import error_response, success_response
 from app.crud import material as mat_svc
 from app.crud import material_stock_batch as batch_svc
@@ -630,7 +630,9 @@ async def list_stock_logs(
 async def mark_material_usage_fully_used(
     usage_id: str,
     db: Session = Depends(get_db),
-    user: dict = Depends(require_menu_code("biz:material:list")),
+    user: dict = Depends(
+        require_any_menu_code("biz:material:list", "market:material-usage:list")
+    ),
 ):
     """标记领用记录已使用完(盘点登记 / 变动记录)。"""
     try:

+ 11 - 0
backend/app/api/menu.py

@@ -243,6 +243,17 @@ STATIC_MENU_TREE = [
                         "component": "/cell-storage/material/index",
                         "meta": {"title": "市场物料库", "keepAlive": True, "menuCode": "biz:material:list"},
                     },
+                    {
+                        "id": "95000000000000000000000000000003",
+                        "name": "MarketMyMaterialUsage",
+                        "path": "my-material-usage",
+                        "component": "/cell-storage/my-material-usage/index",
+                        "meta": {
+                            "title": "我的物料领用记录",
+                            "keepAlive": True,
+                            "menuCode": "market:material-usage:list",
+                        },
+                    },
                     {
                         "id": "121",
                         "name": "BizCustomer",

+ 1 - 1
backend/app/api/production.py

@@ -894,7 +894,7 @@ async def update_equipment(
     db: Session = Depends(get_db),
 ):
     try:
-        payload: dict[str, Any] = body.model_dump(exclude_unset=True, by_alias=False)
+        payload: dict[str, Any] = body.model_dump(by_alias=False)
         obj = equipment_svc.update_equipment(
             db,
             equipment_id,

+ 167 - 1
backend/app/api/production_material.py

@@ -706,7 +706,7 @@ async def list_production_material_linked_step_usages(
         require_any_menu_code("production:material:list", "production:my-material-usage:list")
     ),
 ):
-    """领用记录下关联的生产步骤物料消耗明细。"""
+    """领用记录下关联的消耗明细(生产任务 step_save / 配制 prep_consume)。"""
     try:
         tenant_no = _get_tenant_no(db, user)
         items = mu_svc.list_linked_step_usages(
@@ -1041,6 +1041,56 @@ async def list_production_material_preps(
         return error_response(400, str(e))
 
 
+class AvailableMaterialBatch(BaseModel):
+    model_config = ConfigDict(populate_by_name=True)
+    requisitionUsageId: str = Field(..., alias="requisitionUsageId")
+    batchId: str = Field(..., alias="batchId")
+    materialId: str = Field(..., alias="materialId")
+    materialType: str = Field(..., alias="materialType")
+    materialCode: str = Field(..., alias="materialCode")
+    materialName: str = Field(..., alias="materialName")
+    specModel: Optional[str] = Field(None, alias="specModel")
+    unit: Optional[str] = None
+    stockInNo: str = Field(..., alias="stockInNo")
+    stockInDate: Optional[str] = Field(None, alias="stockInDate")
+    expireDate: Optional[str] = Field(None, alias="expireDate")
+    catalogNo: Optional[str] = Field(None, alias="catalogNo")
+    batchNo: str = Field(..., alias="batchNo")
+    manufacturer: str
+    storageLocation: Optional[str] = Field(None, alias="storageLocation")
+    requisitionQty: float = Field(..., alias="requisitionQty")
+    unitPrice: Optional[float] = Field(None, alias="unitPrice")
+    receiver: Optional[str] = None
+    receiverName: Optional[str] = Field(None, alias="receiverName")
+    useTime: Optional[str] = Field(None, alias="useTime")
+
+
+@router.get("/production-material-preps/available-materials")
+async def list_available_materials_for_prep(
+    page: int = Query(1, ge=1),
+    pageSize: int = Query(50, ge=1, le=200),
+    keyword: Optional[str] = None,
+    materialType: Optional[str] = None,
+    db: Session = Depends(get_db),
+    user: dict = Depends(require_menu_code("production:material:list")),
+):
+    """获取可用于配制的领用记录(有剩余、未标记已用完,须注册在 {prep_id} 路由之前)。"""
+    try:
+        tenant_no = _get_tenant_no(db, user)
+        items, total = prep_svc.list_available_material_batches(
+            db,
+            tenant_no,
+            page=page,
+            page_size=pageSize,
+            keyword=keyword,
+            material_type=materialType,
+            user_info=user,
+        )
+        return success_response(_page_payload(items, total, page, pageSize))
+    except Exception as e:
+        return error_response(400, str(e))
+
+
 @router.get("/production-material-preps/{prep_id}")
 async def get_production_material_prep(
     prep_id: str,
@@ -1163,3 +1213,119 @@ async def delete_production_material_prep(
         return error_response(400, str(e))
     except Exception as e:
         return error_response(400, str(e))
+
+
+# ---------- 一次性配制(简化流程)----------
+
+
+class QuickPrepLineBody(BaseModel):
+    model_config = ConfigDict(populate_by_name=True)
+    requisitionUsageId: str = Field(..., alias="requisitionUsageId")
+    componentMaterialId: str = Field(..., alias="componentMaterialId")
+    componentMaterialType: str = Field(..., alias="componentMaterialType")
+    batchId: Optional[str] = Field(None, alias="batchId")
+    consumptionQty: float = Field(..., gt=0, alias="consumptionQty")
+    usageUnit: Optional[str] = Field(None, alias="usageUnit")
+    remark: Optional[str] = None
+
+
+class QuickPrepBody(BaseModel):
+    model_config = ConfigDict(populate_by_name=True)
+    configuredMaterialName: str = Field(..., max_length=128, alias="configuredMaterialName")
+    outputQty: float = Field(..., gt=0, alias="outputQty")
+    lines: List[QuickPrepLineBody] = Field(..., min_length=1)
+    specModel: Optional[str] = Field(None, alias="specModel")
+    outputUnit: Optional[str] = Field(None, alias="outputUnit")
+    stockInNo: Optional[str] = Field(None, alias="stockInNo")
+    stockInDate: Optional[str] = Field(None, alias="stockInDate")
+    catalogNo: Optional[str] = Field(None, alias="catalogNo")
+    batchNo: Optional[str] = Field(None, alias="batchNo")
+    manufacturer: Optional[str] = Field(None, alias="manufacturer")
+    storageLocation: Optional[str] = Field(None, alias="storageLocation")
+    expireDate: Optional[str] = Field(None, alias="expireDate")
+    remark: Optional[str] = None
+
+
+@router.post("/production-material-preps/quick")
+async def quick_production_material_prep(
+    body: QuickPrepBody,
+    db: Session = Depends(get_db),
+    user: dict = Depends(require_menu_code("production:material:list")),
+):
+    """一次性配制:提交即完成(子物料扣减 → 配置试剂入库 → 自动出库)。"""
+    try:
+        tenant_no = _get_tenant_no(db, user)
+        user_id = _get_current_user_id(user)
+        dept_id = user.get("deptId") or user.get("dept_id") or ""
+        data = prep_svc.create_quick_prep(
+            db,
+            data=body.model_dump(by_alias=True),
+            tenant_no=tenant_no,
+            user_id=user_id,
+            dept_id=dept_id,
+        )
+        return success_response(data, message="配置试剂配制完成")
+    except ValueError as e:
+        return error_response(400, str(e))
+    except Exception as e:
+        return error_response(400, str(e))
+
+
+@router.get("/production-material-consumptions")
+async def list_production_material_consumptions(
+    page: int = Query(1, ge=1),
+    pageSize: int = Query(10, ge=1, le=100),
+    keyword: Optional[str] = None,
+    materialType: Optional[str] = None,
+    startTime: Optional[str] = None,
+    endTime: Optional[str] = None,
+    db: Session = Depends(get_db),
+    user: dict = Depends(require_menu_code("production:material:list")),
+):
+    """查询配制消耗明细(子物料消耗记录)。"""
+    try:
+        tenant_no = _get_tenant_no(db, user)
+        items, total = mu_svc.list_prep_consumptions(
+            db,
+            tenant_no,
+            page=page,
+            page_size=pageSize,
+            keyword=keyword,
+            material_type=materialType,
+            start_time=startTime,
+            end_time=endTime,
+        )
+        return success_response(_page_payload(items, total, page, pageSize))
+    except Exception as e:
+        return error_response(400, str(e))
+
+
+@router.get("/my-production-material-consumptions")
+async def list_my_production_material_consumptions(
+    page: int = Query(1, ge=1),
+    pageSize: int = Query(10, ge=1, le=100),
+    keyword: Optional[str] = None,
+    materialType: Optional[str] = None,
+    startTime: Optional[str] = None,
+    endTime: Optional[str] = None,
+    db: Session = Depends(get_db),
+    user: dict = Depends(require_menu_code("production:my-material-usage:list")),
+):
+    """当前登录人的配制消耗明细(我的物料领用记录 - 消耗明细 Tab)。"""
+    try:
+        tenant_no = _get_tenant_no(db, user)
+        items, total = mu_svc.list_my_prep_consumptions(
+            db,
+            tenant_no,
+            user_id=_get_current_user_id(user),
+            nick_name=(user.get("real_name") or "").strip(),
+            page=page,
+            page_size=pageSize,
+            keyword=keyword,
+            material_type=materialType,
+            start_time=startTime,
+            end_time=endTime,
+        )
+        return success_response(_page_payload(items, total, page, pageSize))
+    except Exception as e:
+        return error_response(400, str(e))

+ 20 - 0
backend/app/api/sample_reception.py

@@ -444,3 +444,23 @@ async def put_sample_reception(
         return error_response(400, str(e))
     except Exception as e:
         return error_response(400, str(e))
+
+
+@router.get("/sample-receptions/by-sample-code")
+async def get_sample_reception_by_sample_code(
+    sampleCode: str = Query(..., alias="sampleCode"),
+    sourceType: Optional[str] = Query(None, alias="sourceType"),
+    db: Session = Depends(get_db),
+    user: dict = Depends(require_any_menu_code(*SAMPLE_RECEPTION_READ_MENU_CODES)),
+):
+    """根据样本编码查询样本接收记录:有则返回 receptionId + sampleInfo;无则仅返回 sampleInfo(用于新建)。"""
+    try:
+        tenant_no = _get_tenant_no(db, user)
+        result = sr_svc.get_reception_by_sample_code(
+            db, sample_code=sampleCode, source_type=sourceType, tenant_no=tenant_no
+        )
+        return success_response(result)
+    except PermissionError as e:
+        return error_response(403, str(e))
+    except Exception as e:
+        return error_response(400, str(e))

+ 26 - 23
backend/app/crud/equipment.py

@@ -12,6 +12,9 @@ from sqlalchemy.orm import Session
 from app.core.utils import generate_uuid
 from app.models.models import BizEquipment
 
+# Sentinel value to distinguish "field not sent" from "field sent as null"
+_UNSET = object()
+
 
 def _dec(v: Any) -> Optional[float]:
     if v is None:
@@ -195,23 +198,23 @@ def update_equipment(
     db: Session,
     equipment_id: str,
     *,
-    equipment_code: Optional[str] = None,
-    equipment_name: Optional[str] = None,
-    equipment_model: Optional[str] = None,
-    manufacturer: Optional[str] = None,
-    purchase_date: Optional[Any] = None,
-    purchase_amount: Optional[float] = None,
-    location: Optional[str] = None,
-    serial_no: Optional[str] = None,
-    status: Optional[str] = None,
-    order_num: Optional[int] = None,
-    remark: Optional[str] = None,
+    equipment_code: Any = _UNSET,
+    equipment_name: Any = _UNSET,
+    equipment_model: Any = _UNSET,
+    manufacturer: Any = _UNSET,
+    purchase_date: Any = _UNSET,
+    purchase_amount: Any = _UNSET,
+    location: Any = _UNSET,
+    serial_no: Any = _UNSET,
+    status: Any = _UNSET,
+    order_num: Any = _UNSET,
+    remark: Any = _UNSET,
     user_id: Optional[str] = None,
 ) -> BizEquipment:
     obj = get_equipment(db, equipment_id)
     if not obj:
         raise ValueError("设备不存在")
-    if equipment_code is not None:
+    if equipment_code is not _UNSET:
         new_code = equipment_code.strip()
         if not new_code:
             raise ValueError("设备编码不能为空")
@@ -220,25 +223,25 @@ def update_equipment(
         ):
             raise ValueError("设备编码已存在")
         obj.equipment_code = new_code
-    if equipment_name is not None:
+    if equipment_name is not _UNSET:
         obj.equipment_name = (equipment_name or "").strip() or obj.equipment_name
-    if equipment_model is not None:
+    if equipment_model is not _UNSET:
         obj.equipment_model = (equipment_model or "").strip() or None
-    if manufacturer is not None:
+    if manufacturer is not _UNSET:
         obj.manufacturer = (manufacturer or "").strip() or None
-    if purchase_date is not None:
+    if purchase_date is not _UNSET:
         obj.purchase_date = _parse_date(purchase_date)
-    if purchase_amount is not None:
-        obj.purchase_amount = Decimal(str(purchase_amount)) if purchase_amount != "" else None
-    if location is not None:
+    if purchase_amount is not _UNSET:
+        obj.purchase_amount = Decimal(str(purchase_amount)) if purchase_amount not in (None, "") else None
+    if location is not _UNSET:
         obj.location = (location or "").strip() or None
-    if serial_no is not None:
+    if serial_no is not _UNSET:
         obj.serial_no = (serial_no or "").strip() or None
-    if status is not None:
+    if status is not _UNSET:
         obj.status = _norm_status(status)
-    if order_num is not None:
+    if order_num is not _UNSET:
         obj.order_num = order_num
-    if remark is not None:
+    if remark is not _UNSET:
         obj.remark = (remark or "").strip() or None
     obj.update_by = user_id
     obj.update_time = datetime.now()

+ 549 - 1
backend/app/crud/production_material_prep.py

@@ -16,14 +16,17 @@ from app.crud.production_material_stock_batch import (
     _parse_date,
     _parse_expire_date,
     _require_str,
+    _stock_out_batch,
     stock_in_no_exists,
     _optional_str,
 )
+from app.crud.production_material_usage import list_available_requisitions_for_prep
 from app.models.models import SysUser
 from app.models.production_material import (
     BizProductionMaterial,
     BizProductionMaterialPrep,
     BizProductionMaterialPrepLine,
+    BizProductionMaterialStockBatch,
     BizProductionMaterialUsage,
 )
 
@@ -42,6 +45,20 @@ def _fmt_date(d: Optional[date]) -> str:
     return d.strftime("%Y-%m-%d") if d else ""
 
 
+def _batch_map_for_prep_lines(
+    db: Session, batch_ids: List[str]
+) -> Dict[str, BizProductionMaterialStockBatch]:
+    ids = [x for x in batch_ids if x]
+    if not ids:
+        return {}
+    rows = (
+        db.query(BizProductionMaterialStockBatch)
+        .filter(BizProductionMaterialStockBatch.id.in_(ids), BizProductionMaterialStockBatch.del_flag == 0)
+        .all()
+    )
+    return {r.id: r for r in rows}
+
+
 def _user_nick_name_map(db: Session, user_ids: List[str]) -> Dict[str, str]:
     ids = list({x for x in user_ids if x})
     if not ids:
@@ -334,7 +351,63 @@ def get_prep_detail(db: Session, prep_id: str, tenant_no: str) -> Dict[str, Any]
         create_by_name=name_map.get(row.create_by or "", ""),
         line_count=len(lines),
     )
-    result["lines"] = [_line_to_dict(ln) for ln in lines]
+    req_ids = list(
+        {(ln.requisition_usage_id or "").strip() for ln in lines if (ln.requisition_usage_id or "").strip()}
+    )
+    req_map: Dict[str, BizProductionMaterialUsage] = {}
+    if req_ids:
+        reqs = (
+            db.query(BizProductionMaterialUsage)
+            .filter(
+                BizProductionMaterialUsage.id.in_(req_ids),
+                BizProductionMaterialUsage.tenant_no == tenant_no,
+                BizProductionMaterialUsage.del_flag == 0,
+            )
+            .all()
+        )
+        req_map = {r.id: r for r in reqs}
+    req_bmap = _batch_map_for_prep_lines(db, [r.batch_id for r in req_map.values() if r.batch_id])
+
+    enriched_lines: List[Dict[str, Any]] = []
+    for ln in lines:
+        item = _line_to_dict(ln)
+        req = req_map.get((ln.requisition_usage_id or "").strip())
+        if req:
+            batch = req_bmap.get(req.batch_id or "")
+            item["batchNo"] = req.batch_no or ""
+            item["stockInNo"] = req.stock_in_no or ""
+            item["catalogNo"] = req.catalog_no or ""
+            item["manufacturer"] = req.manufacturer or ""
+            item["storageLocation"] = (req.storage_location or "").strip() or (
+                (batch.storage_location or "") if batch else ""
+            )
+            item["requisitionQty"] = abs(float(req.change_qty or 0))
+            if batch:
+                item["specModel"] = batch.spec_model or ""
+                item["stockInDate"] = _fmt_date(batch.stock_in_date)
+                item["expireDate"] = _fmt_date(batch.expire_date)
+        enriched_lines.append(item)
+    result["lines"] = enriched_lines
+
+    batch_id = (row.output_batch_id or "").strip()
+    if batch_id:
+        batch = (
+            db.query(BizProductionMaterialStockBatch)
+            .filter(
+                BizProductionMaterialStockBatch.id == batch_id,
+                BizProductionMaterialStockBatch.tenant_no == tenant_no,
+                BizProductionMaterialStockBatch.del_flag == 0,
+            )
+            .first()
+        )
+        if batch:
+            result["specModel"] = batch.spec_model or ""
+            result["catalogNo"] = batch.catalog_no or ""
+            result["manufacturer"] = batch.manufacturer or ""
+            result["stockInDate"] = _fmt_date(batch.stock_in_date)
+            result["unitPrice"] = None
+            result["amount"] = None
+
     return result
 
 
@@ -346,6 +419,7 @@ def create_prep(
     user_id: Optional[str] = None,
     dept_id: str = "",
 ) -> Dict[str, Any]:
+    """创建配制单(草稿):用于旧版流程。"""
     configured_id = (
         data.get("configuredMaterialId") or data.get("configured_material_id") or ""
     ).strip()
@@ -438,6 +512,457 @@ def create_prep(
     return get_prep_detail(db, prep_id, tenant_no)
 
 
+def create_quick_prep(
+    db: Session,
+    *,
+    data: Dict[str, Any],
+    tenant_no: str,
+    user_id: Optional[str] = None,
+    dept_id: str = "",
+) -> Dict[str, Any]:
+    """一次性配制:创建即完成(扣减子物料 → 入库配置试剂 → 自动出库给操作人)。"""
+    configured_name = (data.get("configuredMaterialName") or data.get("configured_material_name") or "").strip()
+    if not configured_name:
+        raise ValueError("请输入配置试剂名称")
+
+    output_qty_raw = data.get("outputQty") if data.get("outputQty") is not None else data.get("output_qty")
+    if output_qty_raw is None or Decimal(str(output_qty_raw)) <= 0:
+        raise ValueError("产出数量必须大于0")
+    output_qty = Decimal(str(output_qty_raw))
+
+    lines_raw = data.get("lines") or []
+    if not lines_raw:
+        raise ValueError("请至少添加一条子物料")
+
+    # 校验并解析子物料
+    parsed_lines = _parse_quick_prep_lines(db, lines_raw, tenant_no=tenant_no)
+
+    now = datetime.now()
+    prep_id = generate_uuid()
+    prep_no = _generate_prep_no(db, tenant_no)
+
+    stock_in_no_raw = (data.get("stockInNo") or data.get("stock_in_no") or "").strip()
+    if stock_in_no_raw:
+        if stock_in_no_exists(db, stock_in_no_raw, tenant_no):
+            raise ValueError("入库编号已存在")
+        stock_in_no = stock_in_no_raw
+    else:
+        stock_in_no = _generate_stock_in_no(db, tenant_no)
+
+    # 配置试剂为自配物料,不核算单价与金额(库表 NOT NULL,存 0;接口层按类型屏蔽展示)
+    unit_price_out = Decimal("0")
+    amount_out = Decimal("0")
+
+    spec_model = _optional_str(data.get("specModel") or data.get("spec_model"))
+    output_unit = _optional_str(data.get("outputUnit") or data.get("output_unit")) or "瓶"
+
+    # 自动创建或获取配置试剂物料
+    configured_material = _get_or_create_configured_material(
+        db,
+        configured_name,
+        tenant_no,
+        user_id,
+        dept_id,
+        spec_model=spec_model,
+        unit=output_unit,
+    )
+
+    output_unit = output_unit or configured_material.unit or "瓶"
+
+    # 生成批号
+    batch_no_raw = (data.get("batchNo") or data.get("batch_no") or "").strip()
+    batch_no = batch_no_raw if batch_no_raw else prep_no
+
+    catalog_no_raw = (data.get("catalogNo") or data.get("catalog_no") or "").strip()
+    catalog_no = catalog_no_raw if catalog_no_raw else (configured_material.material_code or batch_no or "—")
+
+    manufacturer = (data.get("manufacturer") or "").strip() or "自配"
+
+    # 入库日期(业务日期,仅日期)与变动记录时间(含时分秒)分离,对齐普通入库逻辑
+    stock_in_date_raw = data.get("stockInDate") or data.get("stock_in_date")
+    stock_in_date = _parse_date(stock_in_date_raw) if stock_in_date_raw else now.date()
+
+    prep_time_raw = (
+        data.get("prepTime")
+        or data.get("prep_time")
+        or data.get("stockInTime")
+        or data.get("stock_in_time")
+    )
+    operate_time = parse_datetime(prep_time_raw) if prep_time_raw else now
+
+    try:
+        # 1. 创建配制单(状态直接为 completed)
+        expire_date = _parse_expire_date(data.get("expireDate") or data.get("expire_date") or "")
+        if not expire_date:
+            expire_date = datetime(now.year + 1, now.month, now.day).date()
+
+        prep = BizProductionMaterialPrep(
+            id=prep_id,
+            prep_no=prep_no,
+            configured_material_id=configured_material.id,
+            configured_material_code=configured_material.material_code,
+            configured_material_name=configured_name,
+            prep_time=operate_time,
+            output_qty=output_qty,
+            output_unit=output_unit,
+            batch_no=batch_no,
+            storage_location=_optional_str(data.get("storageLocation") or data.get("storage_location")),
+            expire_date=expire_date,
+            stock_in_no=stock_in_no,
+            status="completed",
+            tenant_no=tenant_no,
+            remark=(data.get("remark") or "").strip()[:512] or None,
+            create_by=user_id,
+            create_dept_id=dept_id or configured_material.create_dept_id or "",
+            create_time=now,
+            update_by=user_id,
+            update_time=now,
+            del_flag=0,
+        )
+        db.add(prep)
+
+        # 2. 创建配制明细并扣减子物料
+        for pl in parsed_lines:
+            comp = pl["component"]
+            req = pl["requisition"]
+            actual_qty = pl["actual_qty"]
+
+            # 创建配制明细行
+            db.add(
+                BizProductionMaterialPrepLine(
+                    id=generate_uuid(),
+                    prep_id=prep_id,
+                    component_material_id=comp.id,
+                    component_material_type=pl["component_type"],
+                    component_material_code=comp.material_code,
+                    component_material_name=comp.material_name,
+                    requisition_usage_id=req.id if req else None,
+                    actual_qty=actual_qty,
+                    usage_unit=pl["usage_unit"] or None,
+                    tenant_no=tenant_no,
+                    order_num=pl["idx"],
+                    remark=pl.get("remark"),
+                    create_by=user_id,
+                    create_dept_id=dept_id or configured_material.create_dept_id or "",
+                    create_time=now,
+                    update_by=user_id,
+                    update_time=now,
+                    del_flag=0,
+                )
+            )
+
+            # 扣减子物料库存(写入 prep_consume 记录)
+            _write_quick_prep_consume_usage(
+                db,
+                prep=prep,
+                material=comp,
+                requisition=req,
+                actual_qty=actual_qty,
+                usage_unit=pl["usage_unit"] or None,
+                tenant_no=tenant_no,
+                user_id=user_id,
+                dept_id=dept_id or configured_material.create_dept_id or "",
+                operate_time=operate_time,
+            )
+
+        # 3. 创建配置试剂入库批次
+        catalog_no = catalog_no if catalog_no else (configured_material.material_code or batch_no or "—")
+
+        batch = _create_batch_and_usage(
+            db,
+            material=configured_material,
+            stock_in_no=stock_in_no,
+            stock_in_date=stock_in_date,
+            expire_date=expire_date,
+            catalog_no=catalog_no,
+            batch_no=batch_no,
+            manufacturer=manufacturer,
+            storage_location=_optional_str(data.get("storageLocation") or data.get("storage_location")),
+            unit_price=unit_price_out,
+            amount=amount_out,
+            qty=output_qty,
+            remark=f"配制单 {prep_no}",
+            tenant_no=tenant_no,
+            user_id=user_id,
+            operate_time=operate_time,
+            commit=False,
+            source_type="prep_in",
+            prep_id=prep.id,
+        )
+
+        prep.output_batch_id = batch.id
+        db.add(prep)
+
+        # 4. 自动出库给当前操作人
+        _create_auto_stock_out(
+            db,
+            batch=batch,
+            output_qty=output_qty,
+            tenant_no=tenant_no,
+            user_id=user_id,
+            dept_id=dept_id or configured_material.create_dept_id or "",
+            operate_time=operate_time,
+        )
+
+        db.commit()
+    except Exception:
+        db.rollback()
+        raise
+
+    return get_prep_detail(db, prep_id, tenant_no)
+
+
+def _parse_quick_prep_lines(
+    db: Session,
+    lines: List[Dict[str, Any]],
+    *,
+    tenant_no: str,
+) -> List[Dict[str, Any]]:
+    """解析一次性配制的子物料(按领用记录)。"""
+    if not lines:
+        raise ValueError("请至少添加一条子物料")
+    parsed: List[Dict[str, Any]] = []
+    seen_req: set = set()
+
+    for idx, it in enumerate(lines):
+        req_id = (
+            it.get("requisitionUsageId")
+            or it.get("requisition_usage_id")
+            or ""
+        ).strip()
+        if not req_id:
+            raise ValueError("请选择领用记录")
+
+        comp_id = (it.get("componentMaterialId") or it.get("component_material_id") or "").strip()
+        if not comp_id:
+            raise ValueError("子物料不能为空")
+
+        comp_type = (it.get("componentMaterialType") or it.get("component_material_type") or "").strip().lower()
+        if comp_type not in ("reagent", "consumable"):
+            raise ValueError("子物料类型无效")
+
+        qty_raw = it.get("consumptionQty") if it.get("consumptionQty") is not None else it.get("consumption_qty")
+        if qty_raw is None or Decimal(str(qty_raw)) <= 0:
+            raise ValueError("消耗数量必须大于0")
+        consumption_qty = Decimal(str(qty_raw))
+
+        if req_id in seen_req:
+            raise ValueError("同一领用记录不可重复使用")
+        seen_req.add(req_id)
+
+        req = (
+            db.query(BizProductionMaterialUsage)
+            .filter(
+                BizProductionMaterialUsage.id == req_id,
+                BizProductionMaterialUsage.tenant_no == tenant_no,
+                BizProductionMaterialUsage.del_flag == 0,
+                BizProductionMaterialUsage.source_type == "manual_out",
+                BizProductionMaterialUsage.change_type == "use",
+            )
+            .first()
+        )
+        if not req:
+            raise ValueError("领用记录不存在或已失效")
+        if (req.requisition_status or "open") == "closed":
+            raise ValueError("领用记录已标记为使用完,不可用于配制")
+
+        comp = (
+            db.query(BizProductionMaterial)
+            .filter(
+                BizProductionMaterial.id == comp_id,
+                BizProductionMaterial.tenant_no == tenant_no,
+                BizProductionMaterial.del_flag == 0,
+            )
+            .first()
+        )
+        if not comp:
+            raise ValueError("子物料不存在")
+        if (req.material_id or "").strip() != comp.id:
+            raise ValueError("领用记录与子物料不匹配")
+
+        req_qty = abs(req.change_qty or Decimal("0"))
+        if consumption_qty > req_qty:
+            raise ValueError(
+                f"子物料「{comp.material_name}」消耗数量不能超过领用数量 {req_qty}"
+            )
+
+        batch = None
+        if req.batch_id:
+            batch = (
+                db.query(BizProductionMaterialStockBatch)
+                .filter(
+                    BizProductionMaterialStockBatch.id == req.batch_id,
+                    BizProductionMaterialStockBatch.tenant_no == tenant_no,
+                    BizProductionMaterialStockBatch.del_flag == 0,
+                )
+                .first()
+            )
+
+        usage_unit = (it.get("usageUnit") or it.get("usage_unit") or req.usage_unit or comp.unit or "").strip()[:32]
+
+        parsed.append({
+            "idx": idx,
+            "component": comp,
+            "component_type": comp_type,
+            "batch": batch,
+            "requisition": req,
+            "actual_qty": consumption_qty,
+            "usage_unit": usage_unit,
+            "remark": (it.get("remark") or "").strip()[:512] or None,
+        })
+    return parsed
+
+
+def _get_or_create_configured_material(
+    db: Session,
+    name: str,
+    tenant_no: str,
+    user_id: Optional[str],
+    dept_id: str,
+    *,
+    spec_model: Optional[str] = None,
+    unit: Optional[str] = None,
+) -> BizProductionMaterial:
+    """获取或创建配置试剂物料(按名称匹配)。"""
+    # 先查找是否存在
+    existing = (
+        db.query(BizProductionMaterial)
+        .filter(
+            BizProductionMaterial.material_name == name,
+            BizProductionMaterial.material_type == "configured_reagent",
+            BizProductionMaterial.tenant_no == tenant_no,
+            BizProductionMaterial.del_flag == 0,
+        )
+        .first()
+    )
+    if existing:
+        if not _is_enabled_status(existing.status):
+            raise ValueError(f"配置试剂「{name}」已停用,请启用后再配制")
+        return existing
+
+    # 自动生成编码
+    day = datetime.now().strftime("%Y%m%d")
+    like = f"PZR-{day}-%"
+    cnt = (
+        db.query(func.count(BizProductionMaterial.id))
+        .filter(
+            BizProductionMaterial.tenant_no == tenant_no,
+            BizProductionMaterial.material_code.like(like),
+            BizProductionMaterial.del_flag == 0,
+        )
+        .scalar()
+    )
+    code = f"PZR-{day}-{(cnt or 0) + 1:03d}"
+
+    now = datetime.now()
+    mat = BizProductionMaterial(
+        id=generate_uuid(),
+        material_type="configured_reagent",
+        material_code=code,
+        material_name=name,
+        spec_model=spec_model,
+        unit=unit or "瓶",
+        stock_qty=Decimal("0"),
+        warning_qty=Decimal("0"),
+        status="1",
+        tenant_no=tenant_no,
+        create_by=user_id,
+        create_dept_id=dept_id,
+        create_time=now,
+        update_by=user_id,
+        update_time=now,
+        del_flag=0,
+    )
+    db.add(mat)
+    return mat
+
+
+def _write_quick_prep_consume_usage(
+    db: Session,
+    *,
+    prep: BizProductionMaterialPrep,
+    material: BizProductionMaterial,
+    requisition: Optional[BizProductionMaterialUsage],
+    actual_qty: Decimal,
+    usage_unit: Optional[str],
+    tenant_no: str,
+    user_id: Optional[str],
+    dept_id: str,
+    operate_time: datetime,
+) -> None:
+    """写入子物料消耗记录(关联领用记录,不重复扣减批次库存)。"""
+    if not requisition:
+        raise ValueError("子物料必须关联领用记录")
+
+    stock_qty = material.stock_qty if material.stock_qty is not None else Decimal("0")
+
+    unit_price = requisition.unit_price if requisition else None
+    line_amount = Decimal("0")
+    if unit_price is not None and actual_qty > 0:
+        line_amount = (Decimal(str(unit_price)) * actual_qty).quantize(Decimal("0.01"))
+
+    usage = BizProductionMaterialUsage(
+        id=generate_uuid(),
+        material_id=material.id,
+        material_type=material.material_type,
+        material_code=material.material_code,
+        material_name=material.material_name,
+        batch_id=requisition.batch_id if requisition else None,
+        stock_in_no=requisition.stock_in_no if requisition else None,
+        catalog_no=requisition.catalog_no if requisition else None,
+        batch_no=requisition.batch_no if requisition else None,
+        manufacturer=requisition.manufacturer if requisition else None,
+        storage_location=requisition.storage_location if requisition else None,
+        unit_price=unit_price,
+        amount=line_amount if line_amount > 0 else (requisition.amount if requisition else None),
+        change_type="use",
+        change_qty=-actual_qty,
+        usage_unit=usage_unit,
+        stock_before=stock_qty,
+        stock_after=stock_qty,  # 汇总库存暂不扣减,按批次扣减
+        parent_usage_id=requisition.id if requisition else None,
+        prep_id=prep.id,
+        source_type="prep_consume",
+        tenant_no=tenant_no,
+        remark=f"配制单 {prep.prep_no}",
+        create_by=user_id,
+        create_dept_id=dept_id,
+        create_time=operate_time,
+        update_by=user_id,
+        update_time=operate_time,
+        del_flag=0,
+    )
+    db.add(usage)
+
+
+def _create_auto_stock_out(
+    db: Session,
+    *,
+    batch,
+    output_qty: Decimal,
+    tenant_no: str,
+    user_id: Optional[str],
+    dept_id: str,
+    operate_time: datetime,
+) -> None:
+    """自动出库配置试剂给当前操作人(写入领用记录)。"""
+    if not user_id:
+        return
+
+    _stock_out_batch(
+        db,
+        batch.id,
+        qty=output_qty,
+        receiver=user_id,
+        purpose="配制自用",
+        remark="配制产出自动出库",
+        usage_unit=batch.unit,
+        tenant_no=tenant_no,
+        user_id=user_id,
+        operate_time=operate_time,
+    )
+
+
 def update_prep(
     db: Session,
     prep_id: str,
@@ -756,3 +1281,26 @@ def delete_prep(
         db.add(ln)
 
     db.commit()
+
+
+def list_available_material_batches(
+    db: Session,
+    tenant_no: str,
+    *,
+    page: int = 1,
+    page_size: int = 50,
+    keyword: Optional[str] = None,
+    material_type: Optional[str] = None,
+    user_info=None,
+) -> Tuple[List[Dict[str, Any]], int]:
+    """查询可用于配制的领用记录(有剩余、未标记已用完)。"""
+    return list_available_requisitions_for_prep(
+        db,
+        tenant_no,
+        page=page,
+        page_size=page_size,
+        keyword=keyword,
+        material_type=material_type,
+        user_info=user_info,
+    )
+

+ 8 - 4
backend/app/crud/production_material_stock_batch.py

@@ -82,11 +82,13 @@ def _batch_row_to_dict(b: BizProductionMaterialStockBatch, material: Optional[Bi
     warning_qty = _dec(mat.warning_qty) if mat else 0
     stock_qty = _dec(mat.stock_qty) if mat else _dec(b.remaining_qty)
     status = _norm_status(mat.status) if mat else "1"
+    material_type = (b.material_type or (mat.material_type if mat else "")).strip()
+    is_configured = material_type == "configured_reagent"
     return {
         "id": b.id,
         "batchId": b.id,
         "materialId": b.material_id,
-        "materialType": b.material_type or (mat.material_type if mat else ""),
+        "materialType": material_type,
         "materialCode": b.material_code or "",
         "materialName": b.material_name or "",
         "specModel": b.spec_model or "",
@@ -98,8 +100,8 @@ def _batch_row_to_dict(b: BizProductionMaterialStockBatch, material: Optional[Bi
         "batchNo": b.batch_no or "",
         "manufacturer": b.manufacturer or "",
         "storageLocation": b.storage_location or "",
-        "unitPrice": float(b.unit_price) if b.unit_price is not None else 0,
-        "amount": float(b.amount) if b.amount is not None else 0,
+        "unitPrice": None if is_configured else (float(b.unit_price) if b.unit_price is not None else 0),
+        "amount": None if is_configured else (float(b.amount) if b.amount is not None else 0),
         "inQty": _dec(b.in_qty),
         "remainingQty": _dec(b.remaining_qty),
         "stockQty": stock_qty,
@@ -328,7 +330,7 @@ def _create_batch_and_usage(
 
     if not _is_enabled_status(material.status):
         raise ValueError(f"物料「{material.material_name}」已停用,无法入库")
-    if (material.material_type or "").strip() == "configured_reagent":
+    if (material.material_type or "").strip() == "configured_reagent" and source_type != "prep_in":
         raise ValueError("配置试剂仅能通过配制单入库,不可手工批次入库")
 
     old_stock = material.stock_qty or Decimal("0")
@@ -395,6 +397,8 @@ def _create_batch_and_usage(
     if commit:
         db.commit()
         db.refresh(batch)
+    else:
+        db.flush()
     return batch
 
 

+ 343 - 12
backend/app/crud/production_material_usage.py

@@ -11,7 +11,7 @@ from sqlalchemy.orm import Session
 
 from app.core.utils import generate_uuid
 from app.crud.production_material import _filter_material_type
-from app.models.production_material import BizProductionMaterial, BizProductionMaterialStockBatch, BizProductionMaterialUsage
+from app.models.production_material import BizProductionMaterial, BizProductionMaterialPrep, BizProductionMaterialStockBatch, BizProductionMaterialUsage
 from app.models.models import SysUser
 from app.crud.production_material_stock_batch import _usage_batch_snapshots
 
@@ -210,13 +210,9 @@ def _mine_usage_filter(user_id: str, nick_name: str):
         BizProductionMaterialUsage.source_type == "step_save",
         BizProductionMaterialUsage.create_by == uid,
     ]
-    prep_conds = [
-        BizProductionMaterialUsage.source_type == "prep_consume",
-        BizProductionMaterialUsage.create_by == uid,
-    ]
     return and_(
         BizProductionMaterialUsage.change_type == "use",
-        or_(and_(*manual_conds), and_(*task_conds), and_(*prep_conds)),
+        or_(and_(*manual_conds), and_(*task_conds)),
     )
 
 
@@ -238,6 +234,10 @@ def _list_usages_query(
     q0 = db.query(BizProductionMaterialUsage).filter(
         BizProductionMaterialUsage.tenant_no == tenant_no,
         BizProductionMaterialUsage.del_flag == 0,
+        or_(
+            BizProductionMaterialUsage.source_type.is_(None),
+            BizProductionMaterialUsage.source_type != "prep_consume",
+        ),
     )
     if mine_user_id is not None:
         q0 = q0.filter(_mine_usage_filter(mine_user_id, mine_nick_name or ""))
@@ -445,7 +445,7 @@ def list_linked_step_usages(
     *,
     user_info=None,
 ) -> List[Dict[str, Any]]:
-    """查询领用记录关联的生产任务物料消耗(parent_usage_id → step_save)。"""
+    """查询领用记录关联的消耗明细(parent_usage_id → step_save / prep_consume)。"""
     pid = (parent_usage_id or "").strip()
     if not pid:
         return []
@@ -468,7 +468,7 @@ def list_linked_step_usages(
         BizProductionMaterialUsage.del_flag == 0,
         BizProductionMaterialUsage.parent_usage_id == pid,
         BizProductionMaterialUsage.change_type == "use",
-        BizProductionMaterialUsage.source_type == "step_save",
+        BizProductionMaterialUsage.source_type.in_(["step_save", "prep_consume"]),
     )
     if user_info:
         from app.core.data_scope import apply_data_scope
@@ -477,15 +477,42 @@ def list_linked_step_usages(
     rows = q.order_by(BizProductionMaterialUsage.create_time.desc()).all()
     bmap = _batch_map(db, [x.batch_id for x in rows if x.batch_id])
     name_map = _user_nick_name_map(db, [x.create_by for x in rows if x.create_by])
-    return [
-        _row_to_dict(
+
+    prep_ids = list({(x.prep_id or "").strip() for x in rows if (x.prep_id or "").strip()})
+    prep_map: Dict[str, Dict[str, str]] = {}
+    if prep_ids:
+        preps = (
+            db.query(BizProductionMaterialPrep)
+            .filter(
+                BizProductionMaterialPrep.id.in_(prep_ids),
+                BizProductionMaterialPrep.tenant_no == tenant_no,
+                BizProductionMaterialPrep.del_flag == 0,
+            )
+            .all()
+        )
+        prep_map = {
+            p.id: {
+                "prepNo": p.prep_no or "",
+                "configuredMaterialName": p.configured_material_name or "",
+            }
+            for p in preps
+        }
+
+    out: List[Dict[str, Any]] = []
+    for x in rows:
+        item = _row_to_dict(
             x,
             create_by_name=name_map.get(x.create_by or "", ""),
             batch=bmap.get(x.batch_id or ""),
             requisition_receiver_name="",
         )
-        for x in rows
-    ]
+        item["productionTaskId"] = item.get("taskId") or ""
+        item["productionTaskNo"] = item.get("taskNo") or ""
+        prep_info = prep_map.get((x.prep_id or "").strip(), {})
+        item["prepNo"] = prep_info.get("prepNo", "")
+        item["configuredMaterialName"] = prep_info.get("configuredMaterialName", "")
+        out.append(item)
+    return out
 
 
 def revert_step_material_usages(
@@ -894,11 +921,108 @@ def register_step_usage_from_requisition(
         )
 
 
+def list_available_requisitions_for_prep(
+    db: Session,
+    tenant_no: str,
+    *,
+    page: int = 1,
+    page_size: int = 50,
+    keyword: Optional[str] = None,
+    material_type: Optional[str] = None,
+    user_info=None,
+) -> Tuple[List[Dict[str, Any]], int]:
+    """配制子物料来源:全部未标记已用完的领用记录。"""
+    q0 = db.query(BizProductionMaterialUsage).filter(
+        BizProductionMaterialUsage.tenant_no == tenant_no,
+        BizProductionMaterialUsage.del_flag == 0,
+        BizProductionMaterialUsage.change_type == "use",
+        BizProductionMaterialUsage.source_type == "manual_out",
+        BizProductionMaterialUsage.material_type.in_(["reagent", "consumable"]),
+        BizProductionMaterialUsage.requisition_status != "closed",
+    )
+
+    mt = _filter_material_type(material_type)
+    if mt:
+        q0 = q0.filter(BizProductionMaterialUsage.material_type == mt)
+
+    kw = (keyword or "").strip()
+    if kw:
+        like = f"%{kw}%"
+        q0 = q0.filter(
+            or_(
+                BizProductionMaterialUsage.material_code.like(like),
+                BizProductionMaterialUsage.material_name.like(like),
+                BizProductionMaterialUsage.stock_in_no.like(like),
+                BizProductionMaterialUsage.batch_no.like(like),
+                BizProductionMaterialUsage.catalog_no.like(like),
+                BizProductionMaterialUsage.receiver.like(like),
+            )
+        )
+
+    if user_info:
+        from app.core.data_scope import apply_data_scope
+
+        q0 = apply_data_scope(q0, BizProductionMaterialUsage, user_info, db, tenant_no)
+
+    total = q0.order_by(None).with_entities(func.count(BizProductionMaterialUsage.id)).scalar() or 0
+    page = max(1, page)
+    page_size = min(max(1, page_size), 200)
+    rows = (
+        q0.order_by(BizProductionMaterialUsage.create_time.desc())
+        .offset((page - 1) * page_size)
+        .limit(page_size)
+        .all()
+    )
+
+    bmap = _batch_map(db, [x.batch_id for x in rows if x.batch_id])
+    receivers = []
+    for r in rows:
+        rcv, _ = _resolve_receiver_purpose(r)
+        if rcv:
+            receivers.append(rcv)
+    receiver_map = _receiver_display_map(db, receivers)
+
+    items: List[Dict[str, Any]] = []
+    for r in rows:
+        batch = bmap.get(r.batch_id or "")
+        rcv, _ = _resolve_receiver_purpose(r)
+        rcv_name = receiver_map.get(rcv, rcv) if rcv else ""
+        req_qty = abs(float(r.change_qty or 0))
+        unit = _usage_unit_label(r, batch)
+        use_time = r.create_time.strftime("%Y-%m-%d %H:%M:%S") if r.create_time else ""
+        items.append(
+            {
+                "requisitionUsageId": r.id,
+                "batchId": r.batch_id or "",
+                "materialId": r.material_id,
+                "materialType": r.material_type or "",
+                "materialCode": r.material_code or "",
+                "materialName": r.material_name or "",
+                "specModel": (batch.spec_model if batch else "") or "",
+                "unit": unit,
+                "stockInNo": r.stock_in_no or "",
+                "stockInDate": _stock_in_date_for_row(r, batch),
+                "expireDate": _fmt_date_val(batch.expire_date if batch else None),
+                "catalogNo": r.catalog_no or "",
+                "batchNo": r.batch_no or "",
+                "manufacturer": r.manufacturer or "",
+                "storageLocation": (r.storage_location or "").strip() or (batch.storage_location if batch else "") or "",
+                "requisitionQty": req_qty,
+                "unitPrice": _unit_price_for_row(r, batch),
+                "receiver": rcv,
+                "receiverName": rcv_name,
+                "useTime": use_time,
+            }
+        )
+    return items, int(total)
+
+
 def _step_consumed_qty_map(
     db: Session,
     tenant_no: str,
     parent_usage_ids: List[str],
 ) -> Dict[str, float]:
+    """统计领用记录关联的生产步骤消耗量。"""
     ids = [x for x in parent_usage_ids if x]
     if not ids:
         return {}
@@ -1061,3 +1185,210 @@ def mark_requisition_fully_used(
     row.update_time = now
     db.add(row)
     db.commit()
+
+
+def _prep_consumption_to_dict(
+    r: BizProductionMaterialUsage,
+    *,
+    prep_no: str = "",
+    configured_material_name: str = "",
+    create_by_name: str = "",
+) -> Dict[str, Any]:
+    """配制消耗明细行转字典。"""
+    return {
+        "id": r.id,
+        "materialId": r.material_id,
+        "materialType": r.material_type or "",
+        "materialCode": r.material_code or "",
+        "materialName": r.material_name or "",
+        "batchId": r.batch_id or "",
+        "stockInNo": r.stock_in_no or "",
+        "batchNo": r.batch_no or "",
+        "manufacturer": r.manufacturer or "",
+        "unitPrice": float(r.unit_price) if r.unit_price is not None else None,
+        "changeQty": float(r.change_qty) if r.change_qty is not None else 0,
+        "usageUnit": r.usage_unit or "",
+        "prepId": r.prep_id or "",
+        "prepNo": prep_no,
+        "configuredMaterialName": configured_material_name,
+        "sourceType": r.source_type or "",
+        "remark": r.remark or "",
+        "createBy": r.create_by or "",
+        "createByName": create_by_name or r.create_by or "",
+        "createTime": r.create_time.strftime("%Y-%m-%d %H:%M:%S") if r.create_time else "",
+    }
+
+
+def list_prep_consumptions(
+    db: Session,
+    tenant_no: str,
+    *,
+    page: int = 1,
+    page_size: int = 10,
+    keyword: Optional[str] = None,
+    material_type: Optional[str] = None,
+    start_time: Optional[str] = None,
+    end_time: Optional[str] = None,
+) -> Tuple[List[Dict[str, Any]], int]:
+    """查询配制消耗明细(sub_consume)。"""
+    q0 = db.query(BizProductionMaterialUsage).filter(
+        BizProductionMaterialUsage.tenant_no == tenant_no,
+        BizProductionMaterialUsage.del_flag == 0,
+        BizProductionMaterialUsage.change_type == "use",
+        BizProductionMaterialUsage.source_type == "prep_consume",
+    )
+
+    if material_type:
+        mt = material_type.strip().lower()
+        if mt in ("reagent", "consumable"):
+            q0 = q0.filter(BizProductionMaterialUsage.material_type == mt)
+
+    kw = (keyword or "").strip()
+    if kw:
+        like = f"%{kw}%"
+        q0 = q0.filter(
+            or_(
+                BizProductionMaterialUsage.material_name.like(like),
+                BizProductionMaterialUsage.material_code.like(like),
+                BizProductionMaterialUsage.batch_no.like(like),
+            )
+        )
+
+    if start_time:
+        q0 = q0.filter(BizProductionMaterialUsage.create_time >= start_time)
+    if end_time:
+        q0 = q0.filter(BizProductionMaterialUsage.create_time <= end_time + " 23:59:59")
+
+    total = q0.order_by(None).with_entities(func.count(BizProductionMaterialUsage.id)).scalar() or 0
+    rows = (
+        q0.order_by(BizProductionMaterialUsage.create_time.desc())
+        .offset((page - 1) * page_size)
+        .limit(page_size)
+        .all()
+    )
+
+    # 收集 prep_id 并查询配制单信息
+    prep_ids = list({(r.prep_id or "").strip() for r in rows if (r.prep_id or "").strip()})
+    prep_map: Dict[str, Dict[str, Any]] = {}
+    if prep_ids:
+        preps = (
+            db.query(BizProductionMaterialPrep)
+            .filter(
+                BizProductionMaterialPrep.id.in_(prep_ids),
+                BizProductionMaterialPrep.tenant_no == tenant_no,
+                BizProductionMaterialPrep.del_flag == 0,
+            )
+            .all()
+        )
+        prep_map = {p.id: {"prepNo": p.prep_no, "configuredMaterialName": p.configured_material_name or ""} for p in preps}
+
+    name_map = _user_nick_name_map(db, [r.create_by for r in rows if r.create_by])
+
+    items = [
+        _prep_consumption_to_dict(
+            r,
+            prep_no=prep_map.get((r.prep_id or "").strip(), {}).get("prepNo", ""),
+            configured_material_name=prep_map.get((r.prep_id or "").strip(), {}).get("configuredMaterialName", ""),
+            create_by_name=name_map.get(r.create_by or "", ""),
+        )
+        for r in rows
+    ]
+    return items, int(total)
+
+
+def list_my_prep_consumptions(
+    db: Session,
+    tenant_no: str,
+    *,
+    user_id: str,
+    nick_name: str = "",
+    page: int = 1,
+    page_size: int = 10,
+    keyword: Optional[str] = None,
+    material_type: Optional[str] = None,
+    start_time: Optional[str] = None,
+    end_time: Optional[str] = None,
+) -> Tuple[List[Dict[str, Any]], int]:
+    """当前登录人领用批次的配制消耗明细(按领用人,非配制操作人)。"""
+    uid = (user_id or "").strip()
+    nn = (nick_name or "").strip()
+    parent_conds = [BizProductionMaterialUsage.source_type == "manual_out"]
+    receiver_match: List[Any] = []
+    if nn:
+        receiver_match.append(BizProductionMaterialUsage.receiver == nn)
+        receiver_match.append(BizProductionMaterialUsage.remark.like(f"%领用人:{nn}%"))
+    if uid:
+        receiver_match.append(BizProductionMaterialUsage.receiver == uid)
+    if not receiver_match:
+        return [], 0
+    parent_conds.append(or_(*receiver_match))
+
+    parent_id_q = (
+        db.query(BizProductionMaterialUsage.id)
+        .filter(
+            BizProductionMaterialUsage.tenant_no == tenant_no,
+            BizProductionMaterialUsage.del_flag == 0,
+            and_(*parent_conds),
+        )
+    )
+
+    q0 = db.query(BizProductionMaterialUsage).filter(
+        BizProductionMaterialUsage.tenant_no == tenant_no,
+        BizProductionMaterialUsage.del_flag == 0,
+        BizProductionMaterialUsage.change_type == "use",
+        BizProductionMaterialUsage.source_type == "prep_consume",
+        BizProductionMaterialUsage.parent_usage_id.in_(parent_id_q),
+    )
+
+    if material_type:
+        mt = material_type.strip().lower()
+        if mt in ("reagent", "consumable"):
+            q0 = q0.filter(BizProductionMaterialUsage.material_type == mt)
+
+    kw = (keyword or "").strip()
+    if kw:
+        like = f"%{kw}%"
+        q0 = q0.filter(
+            or_(
+                BizProductionMaterialUsage.material_name.like(like),
+                BizProductionMaterialUsage.material_code.like(like),
+                BizProductionMaterialUsage.batch_no.like(like),
+            )
+        )
+
+    if start_time:
+        q0 = q0.filter(BizProductionMaterialUsage.create_time >= start_time)
+    if end_time:
+        q0 = q0.filter(BizProductionMaterialUsage.create_time <= end_time + " 23:59:59")
+
+    total = q0.order_by(None).with_entities(func.count(BizProductionMaterialUsage.id)).scalar() or 0
+    rows = (
+        q0.order_by(BizProductionMaterialUsage.create_time.desc())
+        .offset((page - 1) * page_size)
+        .limit(page_size)
+        .all()
+    )
+
+    prep_ids = list({(r.prep_id or "").strip() for r in rows if (r.prep_id or "").strip()})
+    prep_map: Dict[str, Dict[str, Any]] = {}
+    if prep_ids:
+        preps = (
+            db.query(BizProductionMaterialPrep)
+            .filter(
+                BizProductionMaterialPrep.id.in_(prep_ids),
+                BizProductionMaterialPrep.tenant_no == tenant_no,
+                BizProductionMaterialPrep.del_flag == 0,
+            )
+            .all()
+        )
+        prep_map = {p.id: {"prepNo": p.prep_no, "configuredMaterialName": p.configured_material_name or ""} for p in preps}
+
+    items = [
+        _prep_consumption_to_dict(
+            r,
+            prep_no=prep_map.get((r.prep_id or "").strip(), {}).get("prepNo", ""),
+            configured_material_name=prep_map.get((r.prep_id or "").strip(), {}).get("configuredMaterialName", ""),
+        )
+        for r in rows
+    ]
+    return items, int(total)

+ 68 - 0
backend/app/crud/sample_reception.py

@@ -1340,3 +1340,71 @@ def donation_ids_matching_lab_storage_keyword(
         .all()
     )
     return [r[0] for r in rows if r[0]]
+
+
+def get_reception_by_sample_code(
+    db: Session,
+    sample_code: str,
+    source_type: Optional[str],
+    tenant_no: str,
+) -> Dict[str, Any]:
+    """
+    根据样本编码查询接收记录及样本信息。
+    - 有记录 → 返回 {receptionId, sampleInfo}
+    - 无记录 → 返回 {receptionId: null, sampleInfo}
+    """
+    code = (sample_code or "").strip()
+    if not code:
+        return {"receptionId": None, "sampleInfo": None}
+
+    source = (source_type or "cell_storage").strip()
+    # 先查询是否有已接收记录
+    q_rec = db.query(BizSampleReception).filter(
+        BizSampleReception.tenant_no == tenant_no,
+        BizSampleReception.del_flag == 0,
+        BizSampleReception.sample_code == code,
+    )
+    if source:
+        q_rec = q_rec.filter(BizSampleReception.reception_source == source)
+
+    reception = q_rec.order_by(BizSampleReception.reception_time.desc()).first()
+
+    if source == "research_donation":
+        # 捐赠样本查询
+        rows = (
+            _donation_sample_detail_rows_query(db)
+            .filter(
+                _donation_sample_id_col(BizResearchDonationSample.sample_code) == code,
+                BizResearchDonationSample.del_flag == 0,
+                BizResearchDonationSample.tenant_no == tenant_no,
+            )
+            .all()
+        )
+        sample_info_list = _donation_rows_to_sample_list_items(db, rows, tenant_no)
+        sample_info = sample_info_list[0] if sample_info_list else None
+    else:
+        # 细胞存储样本查询
+        rows = (
+            _sample_detail_rows_query(db)
+            .filter(
+                BizProtocolSample.sample_code == code,
+                BizProtocolSample.del_flag == 0,
+                BizProtocolSample.tenant_no == tenant_no,
+            )
+            .all()
+        )
+        if rows:
+            if reception:
+                sample_info_list = _rows_to_sample_list_items(
+                    db, rows, tenant_no, reception_map={code: reception}
+                )
+            else:
+                sample_info_list = _rows_to_sample_list_items(db, rows, tenant_no)
+            sample_info = sample_info_list[0] if sample_info_list else None
+        else:
+            sample_info = None
+
+    return {
+        "receptionId": reception.id if reception else None,
+        "sampleInfo": sample_info,
+    }

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
backend/app/graphify-out/cache/ast/04a7c71864bc6e214d748999119dec2cac5a2748f3d0b9ebe3a1da984b014fd6.json


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
backend/app/graphify-out/cache/ast/0b401ea694c76c1840ec1c5c63991a1ff387fab807302bfee92378cbc98a8824.json


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
backend/app/graphify-out/cache/ast/15160a0fa128d4714e6e762c631f14468e3cd212137a0ea05bda11c2cf90bc95.json


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
backend/app/graphify-out/cache/ast/157aef0a47a4f506561806c594c666f0436ea9f904235c83a71911d4797bcc91.json


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
backend/app/graphify-out/cache/ast/17327f3bfdb770245ff60d7f90afc9eda3370cd7e69c698a6f28bad1a9c7c3dc.json


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
backend/app/graphify-out/cache/ast/185d843fe6d34a7e55a2e0da5ab8664a15f67e797d00b9a090ead8ac0e7c8035.json


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
backend/app/graphify-out/cache/ast/28fc6a87abf035985463fb7c228bfb06129cf0cc76d3e876d3e86b42f4025f42.json


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
backend/app/graphify-out/cache/ast/292d640de76db72f8ef0aeeefe56290c0020c46d4b35fee3afac54670725b086.json


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
backend/app/graphify-out/cache/ast/3b9cae2763c739a9f8f97e7d6e81c5b3d30ad9e1b5e05e2261dc840d30217e67.json


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
backend/app/graphify-out/cache/ast/4a28c07b5e0ed0a25f86438d149e1672fe4e22f80a81b6e4d90234525b54dc07.json


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
backend/app/graphify-out/cache/ast/4ad99cd65b0177fdf0012cd4ba8861b49d906a26c99896acd252dc3cada81c8a.json


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
backend/app/graphify-out/cache/ast/4be9f1947ead67778be1cea8c3d8b1c8af3f1a57afbf0bcacb5632a8b30f1385.json


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
backend/app/graphify-out/cache/ast/51b680f5f7e990e6d2d4f3074f8af57397ab9e545a394ee0cd1f111e464e7479.json


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
backend/app/graphify-out/cache/ast/59f6beb29a1e8f24458a25b362fdafcf05a31b4bc967ba5e8fa41bc8c58167a4.json


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
backend/app/graphify-out/cache/ast/63a2bb35bdde47664a1fcee9fa981d035b932264358befb35c65de711648ac71.json


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
backend/app/graphify-out/cache/ast/7493e395a12b5cd10f67e80751b8ed4abb9925e6fcbf42e52b779c5ef3a15381.json


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
backend/app/graphify-out/cache/ast/791fadf2ad7ec423c1f36e3aefea83d386aef79bc0ad898063332f9b7fb0c4bc.json


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
backend/app/graphify-out/cache/ast/84649c64e24c3ba2db41c73d994c99d226cbcf08046fc448d2166f8a8e6d78a5.json


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
backend/app/graphify-out/cache/ast/8c63c5ca15c663bacfb04e719114e388124c3037684e75c0588652d8d75031e3.json


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
backend/app/graphify-out/cache/ast/95599cd6e813cc6d3a3da7f951123f380e42e74d26240055800b4b11a659a056.json


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
backend/app/graphify-out/cache/ast/9b71eb4b80cf66926a32073874fca8416b6b56cf3d1f9cea03f38d68022a9c6a.json


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
backend/app/graphify-out/cache/ast/9d663c53b7819f064e39bdac1aad43dac5ba1eb02ca0ab66d41b22b1f3201d02.json


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
backend/app/graphify-out/cache/ast/9f92b972e9d385eac2084b6b285a7aa904f0588e2fd1210de82be31e3f79996f.json


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
backend/app/graphify-out/cache/ast/a285faa7128e69db4937f7305dcc9405d8274766291b7a4fcce3c1e4121eb64d.json


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
backend/app/graphify-out/cache/ast/a73b90efda0f64a97b06c068e4d507334977f65839e4ea2fe267bfca122d731d.json


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
backend/app/graphify-out/cache/ast/ab62c9eb27b15cc1f127ff98bb34ae68113191b536ae09a218da14cb8009a942.json


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
backend/app/graphify-out/cache/ast/ae56666b512bc82f318b950e71223c60039f4fc39f45fadbff83ed54b6be7b35.json


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
backend/app/graphify-out/cache/ast/b2772c93432089b9ef0bf5dfb85f0530366ba40f5f2bc74f476c4f5cc1c94a06.json


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
backend/app/graphify-out/cache/ast/c1cb494ed25b078c187a25067ffcf9b9b47811d142385a397c8302aaff5cb891.json


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
backend/app/graphify-out/cache/ast/c52c8c8070cd6f2b4e40f76e220683951bbf36a80ea39927e277470875f0f6d0.json


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
backend/app/graphify-out/cache/ast/dabb26616162fc99cb17a1b77168d8b2ea3935c95660530227603a0dfeea0c98.json


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
backend/app/graphify-out/cache/ast/ddbacb8526e36752753e4cd90033662a71dd43d569f31cfaf4be60ff9f385a16.json


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
backend/app/graphify-out/cache/ast/de964e2e34425a1124a18fc16a8749a955c44d031029f09e8785cb6b0ac8fea6.json


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
backend/app/graphify-out/cache/ast/ec584dc755471661edfab117ff1dd26e2dd9abe13d783306b516874c70c8c2bd.json


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
backend/app/graphify-out/cache/ast/f445fb897b28defb375bd519c2cbc3394f0684f48b07608759db5ac0b28d2232.json


Fichier diff supprimé car celui-ci est trop grand
+ 632 - 666
backend/graphify-out/.graphify_analysis.json


Fichier diff supprimé car celui-ci est trop grand
+ 394 - 86
backend/graphify-out/.graphify_extract.json


+ 147 - 97
backend/graphify-out/GRAPH_REPORT.md

@@ -1,11 +1,11 @@
-# Graph Report - app  (2026-06-14)
+# Graph Report - app  (2026-06-15)
 
 ## Corpus Check
-- Large corpus: 205 files · ~236,165 words. Semantic extraction will be expensive (many Claude tokens). Consider running on a subfolder, or use --no-semantic to run AST-only.
+- Large corpus: 207 files · ~239,923 words. Semantic extraction will be expensive (many Claude tokens). Consider running on a subfolder, or use --no-semantic to run AST-only.
 
 ## Summary
-- 4079 nodes · 21266 edges · 46 communities detected
-- Extraction: 33% EXTRACTED · 67% INFERRED · 0% AMBIGUOUS · INFERRED: 14276 edges (avg confidence: 0.6)
+- 4126 nodes · 21489 edges · 56 communities detected
+- Extraction: 33% EXTRACTED · 67% INFERRED · 0% AMBIGUOUS · INFERRED: 14420 edges (avg confidence: 0.6)
 - Token cost: 0 input · 0 output
 
 ## Community Hubs (Navigation)
@@ -49,263 +49,313 @@
 - [[_COMMUNITY_Community 37|Community 37]]
 - [[_COMMUNITY_Community 38|Community 38]]
 - [[_COMMUNITY_Community 39|Community 39]]
+- [[_COMMUNITY_Community 40|Community 40]]
+- [[_COMMUNITY_Community 41|Community 41]]
 - [[_COMMUNITY_Community 42|Community 42]]
 - [[_COMMUNITY_Community 43|Community 43]]
 - [[_COMMUNITY_Community 44|Community 44]]
 - [[_COMMUNITY_Community 45|Community 45]]
 - [[_COMMUNITY_Community 46|Community 46]]
 - [[_COMMUNITY_Community 47|Community 47]]
+- [[_COMMUNITY_Community 48|Community 48]]
+- [[_COMMUNITY_Community 49|Community 49]]
+- [[_COMMUNITY_Community 52|Community 52]]
+- [[_COMMUNITY_Community 53|Community 53]]
+- [[_COMMUNITY_Community 54|Community 54]]
+- [[_COMMUNITY_Community 55|Community 55]]
+- [[_COMMUNITY_Community 56|Community 56]]
+- [[_COMMUNITY_Community 57|Community 57]]
 
 ## God Nodes (most connected - your core abstractions)
-1. `success_response()` - 630 edges
-2. `error_response()` - 523 edges
-3. `SysUser` - 432 edges
-4. `BizQcMaterialUsage` - 289 edges
-5. `BizQcTaskResult` - 287 edges
-6. `BizProductionMaterialUsage` - 286 edges
-7. `BizProductionMaterial` - 285 edges
+1. `success_response()` - 636 edges
+2. `error_response()` - 528 edges
+3. `SysUser` - 443 edges
+4. `BizProductionMaterialUsage` - 294 edges
+5. `BizProductionMaterial` - 293 edges
+6. `BizQcMaterialUsage` - 289 edges
+7. `BizQcTaskResult` - 287 edges
 8. `BizQcMaterial` - 282 edges
-9. `BizQcMaterialStockBatch` - 275 edges
-10. `BizProductionMaterialStockBatch` - 274 edges
+9. `BizProductionMaterialStockBatch` - 281 edges
+10. `BizQcMaterialStockBatch` - 275 edges
 
 ## Surprising Connections (you probably didn't know these)
 - `统一记录 API 请求/响应出入参的中间件` --uses--> `SysApiRequestLog`  [INFERRED]
   core/api_request_log_middleware.py → models/models.py
 - `get_menu_list()` --calls--> `success_response()`  [INFERRED]
   api/menu.py → core/response.py
-- `中试服务交付管理 API(交付信息、交付物料、交付方式)` --uses--> `SysUser`  [INFERRED]
-  api/pilot_delivery.py → models/models.py
-- `中试服务体检管理 API(体检信息、预约项目、实际项目)` --uses--> `SysUser`  [INFERRED]
-  api/pilot_checkup.py → models/models.py
 - `保留匹配节点及其全部上级,供关键词检索后仍能正确组树。` --uses--> `SysDept`  [INFERRED]
   crud/dept.py → models/models.py
+- `物品单位 CRUD(biz_item_unit)` --uses--> `BizItemUnit`  [INFERRED]
+  crud/item_unit.py → models/models.py
+- `快递公司 CRUD(biz_express_company)` --uses--> `BizExpressCompany`  [INFERRED]
+  crud/express_company.py → models/models.py
 
 ## Communities
 
 ### Community 0 - "Community 0"
 Cohesion: 0.01
-Nodes (792): attachment_download_url(), create_dept(), create_dict_data(), create_dict_type(), create_express_company(), create_item_unit(), create_menu(), create_post() (+784 more)
+Nodes (816): attachment_download_url(), create_dept(), create_dict_data(), create_dict_type(), create_express_company(), create_item_unit(), create_menu(), create_post() (+808 more)
 
 ### Community 1 - "Community 1"
 Cohesion: 0.01
-Nodes (563): AttachmentDownloadUrlBody, DeptCreateBody, DeptUpdateBody, DictDataCreateBody, DictDataUpdateBody, DictTypeCreateBody, DictTypeUpdateBody, ExpressCompanyCreateBody (+555 more)
+Nodes (607): AttachmentDownloadUrlBody, DeptCreateBody, DeptUpdateBody, DictDataCreateBody, DictDataUpdateBody, DictTypeCreateBody, DictTypeUpdateBody, ExpressCompanyCreateBody (+599 more)
 
 ### Community 2 - "Community 2"
-Cohesion: 0.09
-Nodes (343): 环境检测 — 检测项维护 + 登记管理 API, 保险公司及险种价格管理 API(保险公司 + 开票信息 + 险种价格), AccessLogCreateBody, AccessLogUpdateBody, CleanRoomCreateBody, CleanRoomUpdateBody, ExhibitionAppointmentCreateBody, ExhibitionAppointmentUpdateBody (+335 more)
+Cohesion: 0.07
+Nodes (484): BatchRefundFinanceSubmitBody, 细胞存储 — 采集协议单 / 审核 / 财务确认 / 分期预警 API, If mother info exists but no customerId, create a customer record and link it., RefundFinanceSubmitBody, 保险公司及险种价格管理 API(保险公司 + 开票信息 + 险种价格), AccessLogCreateBody, AccessLogUpdateBody, CleanRoomCreateBody (+476 more)
 
 ### Community 3 - "Community 3"
-Cohesion: 0.05
-Nodes (266): CellSampleTypeCreateBody, CellSampleTypeUpdateBody, CollectionRegionCreateBody, CollectionRegionUpdateBody, CustomerCreateBody, CustomerUpdateBody, HospitalCreateBody, HospitalUpdateBody (+258 more)
+Cohesion: 0.01
+Nodes (275): _persist_protocol_sub_resources(), list_ethnics_for_select(), apply_data_scope(), _get_child_dept_ids(), get_user_dept_id(), _resolve_user_role_scopes(), format_date(), optional_date() (+267 more)
 
 ### Community 4 - "Community 4"
-Cohesion: 0.02
-Nodes (247): eq_unicode(), like_unicode(), MySQL 字符串比较/模糊匹配时统一排序规则,避免 Illegal mix of collations。, 跨表字符串等值比较(JOIN / WHERE)时统一为 utf8mb4_unicode_ci。, 将列显式设为 utf8mb4_unicode_ci。, unicode_ci(), _format_attachment_file_size(), urls_to_attachment_list() (+239 more)
+Cohesion: 0.01
+Nodes (261): generate_uuid(), create_collection_region(), create_hospital(), get_collection_region(), get_hospital(), _hospital_names_by_region_ids(), list_collection_regions(), list_hospitals() (+253 more)
 
 ### Community 5 - "Community 5"
 Cohesion: 0.02
-Nodes (243): generate_uuid(), batch_generate_protocol_nos(), batch_issue_protocol_nos(), batch_revoke_protocol_nos(), create_protocol_no(), get_protocol_no(), list_protocol_nos(), _parse_issued_time() (+235 more)
+Nodes (240): eq_unicode(), like_unicode(), MySQL 字符串比较/模糊匹配时统一排序规则,避免 Illegal mix of collations。, 跨表字符串等值比较(JOIN / WHERE)时统一为 utf8mb4_unicode_ci。, 将列显式设为 utf8mb4_unicode_ci。, unicode_ci(), _format_attachment_file_size(), urls_to_attachment_list() (+232 more)
 
 ### Community 6 - "Community 6"
-Cohesion: 0.01
-Nodes (228): list_ethnics_for_select(), apply_data_scope(), _get_child_dept_ids(), get_user_dept_id(), _resolve_user_role_scopes(), ApiRequestLogCRUD, delete(), get_multi_with_filters() (+220 more)
+Cohesion: 0.03
+Nodes (167): batch_discard(), batch_options(), _batch_row_to_dict(), batch_stock_in(), batch_stock_out(), _create_batch_and_usage(), delete_batch(), _discard_batch() (+159 more)
 
 ### Community 7 - "Community 7"
-Cohesion: 0.03
-Nodes (160): _ensure_customer_for_mother(), _persist_protocol_sub_resources(), format_date(), optional_date(), parse_date(), 将字符串 / date / datetime 转为 date 或 None, allocate_next_biz_no(), _format_biz_no() (+152 more)
+Cohesion: 0.02
+Nodes (100): get_designer_data(), _error_json(), 数据库异常:返回 JSON 并保留 CORS 头,避免浏览器只报跨域错误, 未捕获异常:统一 JSON 500,确保跨域场景下仍有 Access-Control-Allow-Origin, sqlalchemy_exception_handler(), unhandled_exception_handler(), BaseHTTPMiddleware, ApiCryptoError (+92 more)
 
 ### Community 8 - "Community 8"
 Cohesion: 0.03
-Nodes (160): _code_exists(), create_material(), _dec(), _fmt_dt(), get_material(), get_material_entity(), _is_enabled_status(), list_materials() (+152 more)
+Nodes (116): generate_id(), camel_to_snake(), CRUDBase, get_model_attr(), HistoryCRUD, get_protocol_nos_used_in_protocols(), create_dict_type(), dict_type_code_exists() (+108 more)
 
 ### Community 9 - "Community 9"
-Cohesion: 0.02
-Nodes (104): get_designer_data(), _error_json(), 数据库异常:返回 JSON 并保留 CORS 头,避免浏览器只报跨域错误, 未捕获异常:统一 JSON 500,确保跨域场景下仍有 Access-Control-Allow-Origin, sqlalchemy_exception_handler(), unhandled_exception_handler(), BaseHTTPMiddleware, ApiCryptoError (+96 more)
+Cohesion: 0.04
+Nodes (94): get_next_cell_product_code(), _ancestor_link_from_cell_product_input(), _ancestor_sample_chain_link(), _apply_cell_product_status_change(), _build_ancestor_chain(), _build_descendant_chain(), _build_facility_path_label(), build_split_product_codes() (+86 more)
 
 ### Community 10 - "Community 10"
-Cohesion: 0.02
-Nodes (128): api_delete_actual_item(), api_delete_checkup(), api_delete_reserve_item(), api_get_checkup_detail(), api_list_actual_items(), api_list_checkups(), api_list_pending_patients(), api_list_reserve_items() (+120 more)
+Cohesion: 0.05
+Nodes (73): _avatar_url_field(), _build_current_user_payload(), _build_user_info_payload(), get_current_user_profile(), _jwt_user_payload(), logout(), 公共接口(Web 登录、刷新 Token、登出;用户模型对齐 docs/sql/zkxw.sql 基线), Web 端登录用 RSA 公钥(PKCS#1 v1.5,与 JSEncrypt 一致) (+65 more)
 
 ### Community 11 - "Community 11"
-Cohesion: 0.04
-Nodes (87): get_next_cell_product_code(), _ancestor_link_from_cell_product_input(), _ancestor_sample_chain_link(), _apply_cell_product_status_change(), _build_ancestor_chain(), _build_descendant_chain(), _build_facility_path_label(), build_split_product_codes() (+79 more)
+Cohesion: 0.06
+Nodes (61): complete_application(), create_basic_experiment_sale_schedules(), create_infusion_plan(), create_schedule(), _create_schedule_products(), _format_yyyy_mm_dd(), _generate_application_no(), get_application() (+53 more)
 
 ### Community 12 - "Community 12"
-Cohesion: 0.05
-Nodes (78): api_save_application(), get_by_schedule(), get_method(), _get_tenant_no(), list_by_application(), list_materials(), 中试服务交付管理 API(交付信息、交付物料、交付方式), soft_delete() (+70 more)
+Cohesion: 0.07
+Nodes (58): allocate_next_biz_no(), _format_biz_no(), _prefix_for(), 业务协议号自动生成:XBCC / JZCC + YYYYMMDD + 6 位序号, 原子分配下一个业务协议号。     须在 create 事务内调用;使用 MySQL LAST_INSERT_ID 保证并发安全。, create_collection_protocol(), _active_link_query(), assert_biz_no_available() (+50 more)
 
 ### Community 13 - "Community 13"
-Cohesion: 0.05
-Nodes (68): _avatar_url_field(), _build_current_user_payload(), _build_user_info_payload(), get_current_user_profile(), _jwt_user_payload(), logout(), 公共接口(Web 登录、刷新 Token、登出;用户模型对齐 docs/sql/zkxw.sql 基线), Web 端登录用 RSA 公钥(PKCS#1 v1.5,与 JSEncrypt 一致) (+60 more)
+Cohesion: 0.06
+Nodes (53): api_detail(), api_get_outbound_handover(), api_list(), api_save_outbound_handover(), _get_tenant_no(), ProductItemBody, UpdateQcStatusBody, UpdateScheduleBody (+45 more)
 
 ### Community 14 - "Community 14"
 Cohesion: 0.11
-Nodes (36): batch_create_sterilize_logs(), batch_create_wash_logs(), batch_discard_garments(), batch_soft_delete_garments(), _count_map(), create_garment(), create_sterilize_log(), create_wash_log() (+28 more)
+Nodes (35): batch_create_sterilize_logs(), batch_create_wash_logs(), batch_discard_garments(), batch_soft_delete_garments(), _count_map(), create_garment(), create_sterilize_log(), create_wash_log() (+27 more)
 
 ### Community 15 - "Community 15"
 Cohesion: 0.12
-Nodes (11): get_wechat_pay_client(), get_wechat_pay_v2(), 微信支付工具模块  支持微信支付 V3 API 文档参考: https://pay.weixin.qq.com/docs/v3/apis/index.ht, 统一下单接口 (V3)          Args:             out_trade_no: 商户订单号             total, 申请退款          Args:             out_trade_no: 商户订单号             total_amount, 小程序调起支付的二次签名参数(与公众号 JSAPI 规则一致), 统一下单 (V2 API)          Args:             out_trade_no: 商户订单号             tot, 生成签名 V3 (SHA256 with RSA) (+3 more)
+Nodes (10): get_wechat_pay_client(), get_wechat_pay_v2(), 微信支付工具模块  支持微信支付 V3 API 文档参考: https://pay.weixin.qq.com/docs/v3/apis/index.ht, 统一下单接口 (V3)          Args:             out_trade_no: 商户订单号             total, 小程序调起支付的二次签名参数(与公众号 JSAPI 规则一致), 统一下单 (V2 API)          Args:             out_trade_no: 商户订单号             tot, 生成签名 V3 (SHA256 with RSA), wechat_pay() (+2 more)
 
 ### Community 16 - "Community 16"
+Cohesion: 0.15
+Nodes (20): _access_log_to_dict(), _calc_duration_minutes(), create_access_log(), create_clean_room(), create_uv_disinfect_log(), get_access_log(), get_clean_room(), get_uv_disinfect_log() (+12 more)
+
+### Community 17 - "Community 17"
+Cohesion: 0.18
+Nodes (20): _code_exists(), create_material(), _dec(), _fmt_dt(), get_material(), get_material_entity(), get_my_usages(), _is_enabled_status() (+12 more)
+
+### Community 18 - "Community 18"
 Cohesion: 0.18
 Nodes (18): company_code_exists(), create_company(), get_company(), list_companies(), list_company_options(), _row_to_dict(), soft_delete_company(), update_company() (+10 more)
 
-### Community 17 - "Community 17"
+### Community 19 - "Community 19"
+Cohesion: 0.25
+Nodes (13): batch_issue_protocol_nos(), batch_revoke_protocol_nos(), create_protocol_no(), get_protocol_no(), list_protocol_nos(), _parse_issued_time(), protocol_no_exists(), 采集协议号池 CRUD(biz_collection_protocol_no) (+5 more)
+
+### Community 20 - "Community 20"
 Cohesion: 0.24
 Nodes (9): 微信消息通知服务  支持微信小程序模板消息推送  使用方式:     from app.core.wechat_message import Wech, 发送模板消息                  Args:             openid: 用户openid             templ, send_delivery_notice(), send_delivery_warning(), send_order_status(), send_payment_success(), send_refund_result(), send_urge_notification() (+1 more)
 
-### Community 18 - "Community 18"
+### Community 21 - "Community 21"
 Cohesion: 0.23
 Nodes (12): Config, ProductBase, ProductCategoryBase, ProductCategoryCreate, ProductCategoryResponse, ProductCreate, ProductResponse, ProductUnitBase (+4 more)
 
-### Community 19 - "Community 19"
+### Community 22 - "Community 22"
 Cohesion: 0.29
 Nodes (11): create_equipment(), _dec(), equipment_code_exists(), get_equipment(), list_equipments(), _norm_status(), _parse_date(), 设备 CRUD(biz_equipment) (+3 more)
 
-### Community 20 - "Community 20"
+### Community 23 - "Community 23"
 Cohesion: 0.24
 Nodes (12): appointment_no_exists(), create_exhibition_appointment(), _format_visit_date(), _generate_appointment_no(), get_exhibition_appointment(), list_exhibition_appointments(), 展览预约 CRUD(biz_exhibition_appointment), 生成预约编号:YYYYMMDD + 6位序号(如 20260515000001) (+4 more)
 
-### Community 21 - "Community 21"
+### Community 24 - "Community 24"
+Cohesion: 0.32
+Nodes (10): batch_issue_sample_codes(), batch_revoke_sample_codes(), create_sample_code(), get_sample_code(), _parse_issued_time(), 样本编码池 CRUD(biz_sample_code), _resolve_issued_user_display_name(), sample_code_exists() (+2 more)
+
+### Community 25 - "Community 25"
 Cohesion: 0.24
 Nodes (11): deduct_for_step(), _display_remark(), list_stock_logs(), _parse_receiver_purpose_from_remark(), 试剂变动记录 CRUD(biz_reagent_stock_log), 撤销步骤此前 step_save 扣减,便于重新填报。, 扣减试剂库存并生成变动记录。调用方控制事务,本函数不 commit。, _resolve_receiver_purpose() (+3 more)
 
-### Community 22 - "Community 22"
+### Community 26 - "Community 26"
 Cohesion: 0.32
 Nodes (11): create_env_detect_record(), _generate_record_no(), get_env_detect_record(), _join_csv(), list_env_detect_records(), _resolve_inspector_snapshots(), _resolve_item_snapshot(), _row_to_dict() (+3 more)
 
-### Community 23 - "Community 23"
+### Community 27 - "Community 27"
 Cohesion: 0.24
 Nodes (11): deduct_for_step(), _display_remark(), list_stock_logs(), _parse_receiver_purpose_from_remark(), 耗材变动记录 CRUD(biz_consumable_stock_log), 撤销步骤此前 step_save 扣减,便于重新填报。, 扣减耗材库存并生成变动记录。调用方控制事务,本函数不 commit。, _resolve_receiver_purpose() (+3 more)
 
-### Community 24 - "Community 24"
+### Community 28 - "Community 28"
 Cohesion: 0.27
 Nodes (11): _build_tree(), _cascade_soft_delete(), _collect_with_ancestors(), create_dept(), get_dept(), list_depts(), list_depts_tree(), 保留匹配节点及其全部上级,供关键词检索后仍能正确组树。 (+3 more)
 
-### Community 25 - "Community 25"
+### Community 29 - "Community 29"
 Cohesion: 0.29
 Nodes (9): _build_tree(), _cascade_soft_delete(), create_menu(), get_menu(), list_menus(), list_menus_tree(), _row_to_dict(), soft_delete_menu() (+1 more)
 
-### Community 26 - "Community 26"
+### Community 30 - "Community 30"
+Cohesion: 0.27
+Nodes (8): create_customer(), get_customer(), id_card_taken(), list_customers(), 客户 CRUD(biz_customer), _row_to_dict(), soft_delete_customer(), update_customer()
+
+### Community 31 - "Community 31"
+Cohesion: 0.31
+Nodes (8): create_sop_document(), get_sop_document(), list_sop_documents(), SOP文档 CRUD(biz_sop_document), _row_to_dict(), soft_delete_sop_document(), sop_code_exists(), update_sop_document()
+
+### Community 32 - "Community 32"
+Cohesion: 0.31
+Nodes (8): create_express_company(), express_code_exists(), get_express_company(), list_express_companies(), 快递公司 CRUD(biz_express_company), _row_to_dict(), soft_delete_express_company(), update_express_company()
+
+### Community 33 - "Community 33"
 Cohesion: 0.38
 Nodes (9): create_check_item(), get_check_item(), item_code_exists(), list_active_check_items(), list_check_items(), _order_query(), _row_to_dict(), soft_delete_check_item() (+1 more)
 
-### Community 27 - "Community 27"
+### Community 34 - "Community 34"
+Cohesion: 0.27
+Nodes (8): create_dict_data(), get_dict_data(), list_dict_data(), list_dict_data_options(), 字典数据 CRUD(sys_dict_data), _row_to_dict(), soft_delete_dict_data(), update_dict_data()
+
+### Community 35 - "Community 35"
 Cohesion: 0.38
 Nodes (9): create_env_detect_item(), get_env_detect_item(), item_code_exists(), list_active_env_detect_items(), list_env_detect_items(), _order_query(), _row_to_dict(), soft_delete_env_detect_item() (+1 more)
 
-### Community 28 - "Community 28"
+### Community 36 - "Community 36"
 Cohesion: 0.31
 Nodes (8): create_item_unit(), get_item_unit(), list_item_units(), 物品单位 CRUD(biz_item_unit), _row_to_dict(), soft_delete_item_unit(), unit_code_exists(), update_item_unit()
 
-### Community 29 - "Community 29"
+### Community 37 - "Community 37"
 Cohesion: 0.31
 Nodes (8): create_cell_sample_type(), get_cell_sample_type(), list_cell_sample_types(), 细胞样本类型 CRUD(biz_cell_sample_type), _row_to_dict(), soft_delete_cell_sample_type(), type_code_exists(), update_cell_sample_type()
 
-### Community 30 - "Community 30"
+### Community 38 - "Community 38"
 Cohesion: 0.31
 Nodes (8): create_output_type(), get_output_type(), list_output_types(), 工艺产出物类型 CRUD(biz_output_type), _row_to_dict(), soft_delete_output_type(), type_code_exists(), update_output_type()
 
-### Community 31 - "Community 31"
+### Community 39 - "Community 39"
 Cohesion: 0.36
 Nodes (7): create_post(), get_post(), list_posts(), post_code_exists(), _row_to_dict(), soft_delete_post(), update_post()
 
-### Community 32 - "Community 32"
+### Community 40 - "Community 40"
+Cohesion: 0.36
+Nodes (7): create_tenant(), get_tenant(), list_tenants(), _row_to_dict(), soft_delete_tenant(), tenant_no_exists(), update_tenant()
+
+### Community 41 - "Community 41"
+Cohesion: 0.36
+Nodes (7): create_site(), get_site(), list_sites(), _row_to_dict(), site_code_exists(), soft_delete_site(), update_site()
+
+### Community 42 - "Community 42"
 Cohesion: 0.25
 Nodes (7): 菜单 code 权限守卫(V0.3:通过 sys_user_role → sys_role_menu → sys_menu.perms), 运营端角色守卫:admin / super_admin 可访问。, 接口菜单权限守卫。super_admin 直接放行。, 接口菜单权限守卫:拥有任一 menuCode 即可访问。super_admin 直接放行。, require_admin_or_super_admin(), require_any_menu_code(), require_menu_code()
 
-### Community 33 - "Community 33"
+### Community 43 - "Community 43"
 Cohesion: 0.29
 Nodes (2): BaseModel, SoftDeleteModel
 
-### Community 34 - "Community 34"
+### Community 44 - "Community 44"
 Cohesion: 0.38
 Nodes (6): derive_legacy_status_from_three(), derive_three_status_from_legacy(), 阶段A兼容:从旧 status 推导三字段。     约束:旧 status 本身混合了支付/配送/订单生命周期,因此只能尽力推断;     若业务侧已有更精确, 阶段A兼容:从三字段反推旧 status(用于旧前端/旧筛选参数兼容)。, ThreeStatus, _to_decimal()
 
-### Community 35 - "Community 35"
+### Community 45 - "Community 45"
 Cohesion: 0.5
 Nodes (3): BaseSettings, Config, Settings
 
-### Community 36 - "Community 36"
+### Community 46 - "Community 46"
 Cohesion: 0.5
 Nodes (2): _auto_fill_create_dept_id(), ORM before_insert 钩子:当 create_dept_id 为空时,自动从请求上下文填充当前用户部门 ID
 
-### Community 37 - "Community 37"
+### Community 47 - "Community 47"
 Cohesion: 0.67
 Nodes (2): get_menu_list(), 运营端菜单接口(与 web-admin 前端静态路由 sqxp.ts 对齐,5 个一级菜单分组)
 
-### Community 38 - "Community 38"
+### Community 48 - "Community 48"
 Cohesion: 1.0
 Nodes (1): 请求级别的用户上下文变量  通过 contextvars 在请求处理链路中传递当前用户信息, 供 SQLAlchemy 事件监听器等底层机制使用,避免逐层手动传
 
-### Community 39 - "Community 39"
+### Community 49 - "Community 49"
 Cohesion: 1.0
 Nodes (1): API 路由包(骨架:公共鉴权 + 静态菜单 + 运营端占位)
 
-### Community 42 - "Community 42"
+### Community 52 - "Community 52"
 Cohesion: 1.0
 Nodes (1): 发送订单状态通知                  Args:             openid: 用户openid             ord
 
-### Community 43 - "Community 43"
+### Community 53 - "Community 53"
 Cohesion: 1.0
 Nodes (1): 发送支付成功通知                  Args:             openid: 用户openid             ord
 
-### Community 44 - "Community 44"
+### Community 54 - "Community 54"
 Cohesion: 1.0
 Nodes (1): 发送配送通知                  Args:             openid: 配送员openid             task
 
-### Community 45 - "Community 45"
+### Community 55 - "Community 55"
 Cohesion: 1.0
 Nodes (1): 发送配送时效预警                  Args:             openid: 配送员openid             ta
 
-### Community 46 - "Community 46"
+### Community 56 - "Community 56"
 Cohesion: 1.0
 Nodes (1): 发送退款结果通知                  Args:             openid: 用户openid             ord
 
-### Community 47 - "Community 47"
+### Community 57 - "Community 57"
 Cohesion: 1.0
 Nodes (1): 发送催单通知给配送员                  Args:             deliver_openid: 配送员openid
 
 ## Knowledge Gaps
-- **121 isolated node(s):** `刷新会话 TTL(refreshToken 续期;已登录用户每次 API 校验通过后滑动续期)`, `写入 refreshToken(用于 one-time 使用/吊销)`, `根据 token 获取当前用户(包含 Redis 会话校验;会话滑动续期)`, `登录凭据 RSA 解密(与前端 JSEncrypt PKCS#1 v1.5 兼容)。`, `Base64 密文 -> JSON 对象(须含 username、password、ts 毫秒时间戳)。` (+116 more)
+- **127 isolated node(s):** `刷新会话 TTL(refreshToken 续期;已登录用户每次 API 校验通过后滑动续期)`, `写入 refreshToken(用于 one-time 使用/吊销)`, `根据 token 获取当前用户(包含 Redis 会话校验;会话滑动续期)`, `登录凭据 RSA 解密(与前端 JSEncrypt PKCS#1 v1.5 兼容)。`, `Base64 密文 -> JSON 对象(须含 username、password、ts 毫秒时间戳)。` (+122 more)
   These have ≤1 connection - possible missing edges or undocumented components.
-- **Thin community `Community 33`** (8 nodes): `BaseModel`, `.to_dict()`, `get_active()`, `base.py`, `SoftDeleteModel`, `.restore()`, `.soft_delete()`, `__tablename__()`
+- **Thin community `Community 43`** (8 nodes): `BaseModel`, `.to_dict()`, `get_active()`, `base.py`, `SoftDeleteModel`, `.restore()`, `.soft_delete()`, `__tablename__()`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 36`** (4 nodes): `_auto_fill_create_dept_id()`, `get_db()`, `database.py`, `ORM before_insert 钩子:当 create_dept_id 为空时,自动从请求上下文填充当前用户部门 ID`
+- **Thin community `Community 46`** (4 nodes): `_auto_fill_create_dept_id()`, `get_db()`, `database.py`, `ORM before_insert 钩子:当 create_dept_id 为空时,自动从请求上下文填充当前用户部门 ID`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 37`** (3 nodes): `get_menu_list()`, `menu.py`, `运营端菜单接口(与 web-admin 前端静态路由 sqxp.ts 对齐,5 个一级菜单分组)`
+- **Thin community `Community 47`** (3 nodes): `get_menu_list()`, `menu.py`, `运营端菜单接口(与 web-admin 前端静态路由 sqxp.ts 对齐,5 个一级菜单分组)`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 38`** (2 nodes): `context.py`, `请求级别的用户上下文变量  通过 contextvars 在请求处理链路中传递当前用户信息, 供 SQLAlchemy 事件监听器等底层机制使用,避免逐层手动传`
+- **Thin community `Community 48`** (2 nodes): `context.py`, `请求级别的用户上下文变量  通过 contextvars 在请求处理链路中传递当前用户信息, 供 SQLAlchemy 事件监听器等底层机制使用,避免逐层手动传`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 39`** (2 nodes): `__init__.py`, `API 路由包(骨架:公共鉴权 + 静态菜单 + 运营端占位)`
+- **Thin community `Community 49`** (2 nodes): `__init__.py`, `API 路由包(骨架:公共鉴权 + 静态菜单 + 运营端占位)`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 42`** (1 nodes): `发送订单状态通知                  Args:             openid: 用户openid             ord`
+- **Thin community `Community 52`** (1 nodes): `发送订单状态通知                  Args:             openid: 用户openid             ord`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 43`** (1 nodes): `发送支付成功通知                  Args:             openid: 用户openid             ord`
+- **Thin community `Community 53`** (1 nodes): `发送支付成功通知                  Args:             openid: 用户openid             ord`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 44`** (1 nodes): `发送配送通知                  Args:             openid: 配送员openid             task`
+- **Thin community `Community 54`** (1 nodes): `发送配送通知                  Args:             openid: 配送员openid             task`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 45`** (1 nodes): `发送配送时效预警                  Args:             openid: 配送员openid             ta`
+- **Thin community `Community 55`** (1 nodes): `发送配送时效预警                  Args:             openid: 配送员openid             ta`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 46`** (1 nodes): `发送退款结果通知                  Args:             openid: 用户openid             ord`
+- **Thin community `Community 56`** (1 nodes): `发送退款结果通知                  Args:             openid: 用户openid             ord`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 47`** (1 nodes): `发送催单通知给配送员                  Args:             deliver_openid: 配送员openid`
+- **Thin community `Community 57`** (1 nodes): `发送催单通知给配送员                  Args:             deliver_openid: 配送员openid`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
 
 ## Suggested Questions
 _Questions this graph is uniquely positioned to answer:_
 
-- **Why does `SysUser` connect `Community 1` to `Community 2`, `Community 3`, `Community 4`, `Community 5`, `Community 6`, `Community 8`, `Community 9`, `Community 10`, `Community 12`, `Community 13`, `Community 21`, `Community 23`?**
-  _High betweenness centrality (0.097) - this node is a cross-community bridge._
-- **Why does `success_response()` connect `Community 0` to `Community 1`, `Community 37`, `Community 6`, `Community 9`, `Community 10`, `Community 11`, `Community 12`, `Community 13`?**
-  _High betweenness centrality (0.088) - this node is a cross-community bridge._
-- **Why does `generate_uuid()` connect `Community 5` to `Community 0`, `Community 3`, `Community 4`, `Community 6`, `Community 7`, `Community 8`, `Community 9`, `Community 10`, `Community 11`, `Community 12`, `Community 13`, `Community 14`, `Community 16`, `Community 19`, `Community 20`, `Community 21`, `Community 22`, `Community 23`, `Community 24`, `Community 25`, `Community 26`, `Community 27`, `Community 28`, `Community 29`, `Community 30`, `Community 31`?**
+- **Why does `SysUser` connect `Community 1` to `Community 0`, `Community 2`, `Community 3`, `Community 5`, `Community 6`, `Community 8`, `Community 10`, `Community 13`, `Community 17`, `Community 19`, `Community 24`, `Community 25`, `Community 27`?**
+  _High betweenness centrality (0.108) - this node is a cross-community bridge._
+- **Why does `generate_uuid()` connect `Community 4` to `Community 0`, `Community 1`, `Community 3`, `Community 5`, `Community 6`, `Community 7`, `Community 8`, `Community 9`, `Community 10`, `Community 12`, `Community 13`, `Community 14`, `Community 16`, `Community 17`, `Community 18`, `Community 19`, `Community 22`, `Community 23`, `Community 24`, `Community 25`, `Community 26`, `Community 27`, `Community 28`, `Community 29`, `Community 30`, `Community 31`, `Community 32`, `Community 33`, `Community 34`, `Community 35`, `Community 36`, `Community 37`, `Community 38`, `Community 39`, `Community 40`, `Community 41`?**
   _High betweenness centrality (0.074) - this node is a cross-community bridge._
-- **Are the 680 inferred relationships involving `str` (e.g. with `unhandled_exception_handler()` and `get_current_user_by_token()`) actually correct?**
-  _`str` has 680 INFERRED edges - model-reasoned connections that need verification._
-- **Are the 629 inferred relationships involving `success_response()` (e.g. with `list_storage_release_reviews()` and `get_storage_release_review_detail()`) actually correct?**
-  _`success_response()` has 629 INFERRED edges - model-reasoned connections that need verification._
-- **Are the 522 inferred relationships involving `error_response()` (e.g. with `_json_error_response()` and `list_storage_release_reviews()`) actually correct?**
-  _`error_response()` has 522 INFERRED edges - model-reasoned connections that need verification._
-- **Are the 430 inferred relationships involving `SysUser` (e.g. with `数据权限过滤(V0.3:基于角色 data_scope 的查询级行级过滤)  data_scope 值:   1 = 全部数据   2 = 本部门数据   3` and `从 SysUser 读取用户的 dept_id。`) actually correct?**
-  _`SysUser` has 430 INFERRED edges - model-reasoned connections that need verification._
+- **Why does `success_response()` connect `Community 0` to `Community 3`, `Community 7`, `Community 9`, `Community 10`, `Community 13`, `Community 47`?**
+  _High betweenness centrality (0.064) - this node is a cross-community bridge._
+- **Are the 688 inferred relationships involving `str` (e.g. with `unhandled_exception_handler()` and `get_current_user_by_token()`) actually correct?**
+  _`str` has 688 INFERRED edges - model-reasoned connections that need verification._
+- **Are the 635 inferred relationships involving `success_response()` (e.g. with `list_storage_release_reviews()` and `get_storage_release_review_detail()`) actually correct?**
+  _`success_response()` has 635 INFERRED edges - model-reasoned connections that need verification._
+- **Are the 527 inferred relationships involving `error_response()` (e.g. with `_json_error_response()` and `list_storage_release_reviews()`) actually correct?**
+  _`error_response()` has 527 INFERRED edges - model-reasoned connections that need verification._
+- **Are the 441 inferred relationships involving `SysUser` (e.g. with `数据权限过滤(V0.3:基于角色 data_scope 的查询级行级过滤)  data_scope 值:   1 = 全部数据   2 = 本部门数据   3` and `从 SysUser 读取用户的 dept_id。`) actually correct?**
+  _`SysUser` has 441 INFERRED edges - model-reasoned connections that need verification._

Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
backend/graphify-out/graph.html


Fichier diff supprimé car celui-ci est trop grand
+ 114 - 114
backend/graphify-out/graph.json


+ 16 - 14
backend/graphify-out/manifest.json

@@ -1,6 +1,6 @@
 {
   "/Users/wuzilong/work/00code/zkxw/backend/app/__init__.py": 1778578257.989357,
-  "/Users/wuzilong/work/00code/zkxw/backend/app/main.py": 1781347168.2711825,
+  "/Users/wuzilong/work/00code/zkxw/backend/app/main.py": 1781503261.6725278,
   "/Users/wuzilong/work/00code/zkxw/backend/app/tasks/__init__.py": 1778579841.437791,
   "/Users/wuzilong/work/00code/zkxw/backend/app/core/auth.py": 1780540737.3359916,
   "/Users/wuzilong/work/00code/zkxw/backend/app/core/api_crypto.py": 1778578258.039314,
@@ -44,6 +44,7 @@
   "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/price_list.py": 1778578258.096609,
   "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/user.py": 1778578258.099944,
   "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/production_work_order.py": 1781339127.9925113,
+  "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/material.py": 1781502974.2628305,
   "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/storage_occupancy.py": 1779418054.7652438,
   "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/quotation.py": 1778578258.0991468,
   "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/product_parameter_value.py": 1778578258.0980055,
@@ -55,7 +56,7 @@
   "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/region.py": 1778578258.099429,
   "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/inquiry.py": 1778578258.095357,
   "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/order.py": 1778578258.0960286,
-  "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/__init__.py": 1778578258.0864499,
+  "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/__init__.py": 1781502992.2721803,
   "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/order_adjust.py": 1778578258.0963318,
   "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/cell_product.py": 1779594151.5265117,
   "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/menu.py": 1778578258.0957444,
@@ -72,7 +73,7 @@
   "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/category.py": 1778578258.0941947,
   "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/leave.py": 1778666088.7680702,
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/storage_release_review.py": 1781245325.124061,
-  "/Users/wuzilong/work/00code/zkxw/backend/app/crud/equipment.py": 1781333066.5378952,
+  "/Users/wuzilong/work/00code/zkxw/backend/app/crud/equipment.py": 1781497479.0019267,
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/qc_task.py": 1781233180.038229,
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/process_route.py": 1779587424.6859367,
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/sample_code.py": 1780479191.5382729,
@@ -82,10 +83,10 @@
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/material_stock_batch.py": 1781346093.956913,
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/post.py": 1779265648.38155,
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/sample_reception_check_result.py": 1779255909.8554008,
-  "/Users/wuzilong/work/00code/zkxw/backend/app/crud/production_material_stock_batch.py": 1781345612.1012716,
+  "/Users/wuzilong/work/00code/zkxw/backend/app/crud/production_material_stock_batch.py": 1781513705.4688208,
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/user.py": 1780539127.1805215,
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/production_work_order.py": 1781339128.7018335,
-  "/Users/wuzilong/work/00code/zkxw/backend/app/crud/material.py": 1781346079.2469015,
+  "/Users/wuzilong/work/00code/zkxw/backend/app/crud/material.py": 1781503115.8091643,
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/dict_type.py": 1779265621.5212462,
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/storage_occupancy.py": 1781335540.360182,
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/qc_third_party_company.py": 1781415374.1019006,
@@ -94,7 +95,7 @@
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/tenant.py": 1779265611.0532296,
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/consumable.py": 1779512620.86979,
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/material_usage.py": 1781427187.4456425,
-  "/Users/wuzilong/work/00code/zkxw/backend/app/crud/production_material_usage.py": 1781427214.721659,
+  "/Users/wuzilong/work/00code/zkxw/backend/app/crud/production_material_usage.py": 1781513732.7796721,
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/sop_document.py": 1779265721.9928973,
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/production_task.py": 1781344251.0568616,
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/qc_third_party_item.py": 1779265661.482352,
@@ -143,9 +144,9 @@
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/customer.py": 1779686149.7508218,
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/workflow.py": 1779265993.677624,
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/sample_sms_notification.py": 1781063495.0317714,
-  "/Users/wuzilong/work/00code/zkxw/backend/app/crud/sample_reception.py": 1781442054.0118701,
+  "/Users/wuzilong/work/00code/zkxw/backend/app/crud/sample_reception.py": 1781496450.4937575,
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/consumable_pack.py": 1779265715.416005,
-  "/Users/wuzilong/work/00code/zkxw/backend/app/crud/production_material_prep.py": 1781345074.7847843,
+  "/Users/wuzilong/work/00code/zkxw/backend/app/crud/production_material_prep.py": 1781514953.3551314,
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/qc_material.py": 1779284415.64655,
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/collection_protocol_no.py": 1779882001.753651,
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_handover.py": 1780455574.0993364,
@@ -166,21 +167,22 @@
   "/Users/wuzilong/work/00code/zkxw/backend/app/api/storage_release_review.py": 1779526635.1455016,
   "/Users/wuzilong/work/00code/zkxw/backend/app/api/outbound_release_review.py": 1779968232.5759368,
   "/Users/wuzilong/work/00code/zkxw/backend/app/api/public.py": 1781364255.0874767,
-  "/Users/wuzilong/work/00code/zkxw/backend/app/api/material.py": 1781427231.4974854,
-  "/Users/wuzilong/work/00code/zkxw/backend/app/api/production_material.py": 1781427257.3648953,
+  "/Users/wuzilong/work/00code/zkxw/backend/app/api/material.py": 1781504806.7914948,
+  "/Users/wuzilong/work/00code/zkxw/backend/app/api/production_material.py": 1781513734.218474,
   "/Users/wuzilong/work/00code/zkxw/backend/app/api/qc.py": 1781424003.0850434,
+  "/Users/wuzilong/work/00code/zkxw/backend/app/api/market.py": 1781503232.3859923,
   "/Users/wuzilong/work/00code/zkxw/backend/app/api/collection_protocol.py": 1781063459.1075609,
   "/Users/wuzilong/work/00code/zkxw/backend/app/api/cleanroom_garment.py": 1781347256.2326367,
   "/Users/wuzilong/work/00code/zkxw/backend/app/api/basic_info.py": 1781406022.6140583,
   "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_infusion_confirm.py": 1779657043.1389203,
   "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_infusion_schedule_mgmt.py": 1779940938.18027,
-  "/Users/wuzilong/work/00code/zkxw/backend/app/api/__init__.py": 1781347167.8573015,
+  "/Users/wuzilong/work/00code/zkxw/backend/app/api/__init__.py": 1781503247.4969025,
   "/Users/wuzilong/work/00code/zkxw/backend/app/api/storage_entry_sms_notification.py": 1780325524.9170487,
   "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py": 1781079904.0516074,
   "/Users/wuzilong/work/00code/zkxw/backend/app/api/qc_sms_notification.py": 1780326875.7886882,
   "/Users/wuzilong/work/00code/zkxw/backend/app/api/research_donation_sample_collection.py": 1780457788.2998126,
   "/Users/wuzilong/work/00code/zkxw/backend/app/api/operations.py": 1781435016.699977,
-  "/Users/wuzilong/work/00code/zkxw/backend/app/api/menu.py": 1781347656.1330166,
+  "/Users/wuzilong/work/00code/zkxw/backend/app/api/menu.py": 1781504791.321829,
   "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_delivery.py": 1779655584.820777,
   "/Users/wuzilong/work/00code/zkxw/backend/app/api/admin.py": 1781402092.9624665,
   "/Users/wuzilong/work/00code/zkxw/backend/app/api/env_detect.py": 1781145712.2433698,
@@ -190,9 +192,9 @@
   "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_service.py": 1781411609.3643663,
   "/Users/wuzilong/work/00code/zkxw/backend/app/api/workflow.py": 1779266232.4568832,
   "/Users/wuzilong/work/00code/zkxw/backend/app/api/sample_sms_notification.py": 1780325524.907156,
-  "/Users/wuzilong/work/00code/zkxw/backend/app/api/sample_reception.py": 1781190032.4213104,
+  "/Users/wuzilong/work/00code/zkxw/backend/app/api/sample_reception.py": 1781496433.5601559,
   "/Users/wuzilong/work/00code/zkxw/backend/app/api/insurance_company.py": 1781410837.9443986,
-  "/Users/wuzilong/work/00code/zkxw/backend/app/api/production.py": 1781344255.1594076,
+  "/Users/wuzilong/work/00code/zkxw/backend/app/api/production.py": 1781497409.0780256,
   "/Users/wuzilong/work/00code/zkxw/backend/app/api/protocol_sample_collection.py": 1780457788.2093296,
   "/Users/wuzilong/work/00code/zkxw/backend/app/api/leave.py": 1779266168.8693042,
   "/Users/wuzilong/work/00code/zkxw/backend/app/api/clinical_payment.py": 1781079914.3908625,

+ 218 - 0
backend/scripts/seed_production_materials.py

@@ -0,0 +1,218 @@
+#!/usr/bin/env python3
+"""批量初始化生产物料示例数据(物料主数据 + 入库批次),已存在编码则跳过。"""
+from __future__ import annotations
+
+import sys
+from datetime import date, timedelta
+from decimal import Decimal
+from pathlib import Path
+
+ROOT = Path(__file__).resolve().parents[1]
+if str(ROOT) not in sys.path:
+    sys.path.insert(0, str(ROOT))
+
+from app.core.database import SessionLocal
+from app.crud import production_material as mat_svc
+from app.crud import production_material_stock_batch as batch_svc
+
+
+# (material_type, material_code, material_name, spec_model, unit, warning_qty, remark)
+SAMPLE_MATERIALS = [
+    (
+        "reagent",
+        "R001",
+        "75% 乙醇溶液",
+        "500mL/瓶",
+        "瓶",
+        10.0,
+        "实验室常用消毒剂",
+    ),
+    (
+        "reagent",
+        "R002",
+        "PBS 缓冲液",
+        "1×, pH 7.4",
+        "瓶",
+        5.0,
+        "细胞培养用磷酸盐缓冲液",
+    ),
+    (
+        "reagent",
+        "R003",
+        "DMEM 高糖培养基",
+        "500mL/瓶, 含双抗",
+        "瓶",
+        8.0,
+        "细胞培养基础培养基",
+    ),
+    (
+        "consumable",
+        "C001",
+        "15mL 离心管",
+        "50支/袋",
+        "袋",
+        20.0,
+        "实验室常规耗材",
+    ),
+    (
+        "consumable",
+        "C002",
+        "T25 细胞培养瓶",
+        "1个/包",
+        "包",
+        15.0,
+        "贴壁细胞培养用",
+    ),
+]
+
+# 入库批次示例数据(与 SAMPLE_MATERIALS 一一对应)
+TODAY = date.today()
+BATCH_ITEMS = [
+    # R001: 乙醇,入库 20 瓶
+    dict(
+        material_id=None,  # 创建后填充
+        stockInNo="RK2025061501",
+        stockInDate=TODAY.isoformat(),
+        expireDate=(TODAY + timedelta(days=730)).isoformat(),  # 2年后过期
+        catalogNo="SP-ETH-500",
+        batchNo="B20250601",
+        manufacturer="国药集团化学试剂有限公司",
+        storageLocation="试剂柜-A-01",
+        unitPrice=Decimal("15.00"),
+        amount=Decimal("300.00"),
+        qty=Decimal("20"),
+    ),
+    # R002: PBS,入库 10 瓶
+    dict(
+        material_id=None,
+        stockInNo="RK2025061502",
+        stockInDate=TODAY.isoformat(),
+        expireDate=(TODAY + timedelta(days=365)).isoformat(),
+        catalogNo="SP-PBS-500",
+        batchNo="B20250602",
+        manufacturer="Gibco",
+        storageLocation="试剂柜-B-02",
+        unitPrice=Decimal("85.00"),
+        amount=Decimal("850.00"),
+        qty=Decimal("10"),
+    ),
+    # R003: DMEM,入库 8 瓶
+    dict(
+        material_id=None,
+        stockInNo="RK2025061503",
+        stockInDate=TODAY.isoformat(),
+        expireDate=(TODAY + timedelta(days=180)).isoformat(),
+        catalogNo="SP-DMEM-500",
+        batchNo="B20250603",
+        manufacturer="Gibco",
+        storageLocation="试剂柜-B-03",
+        unitPrice=Decimal("120.00"),
+        amount=Decimal("960.00"),
+        qty=Decimal("8"),
+    ),
+    # C001: 离心管,入库 50 袋
+    dict(
+        material_id=None,
+        stockInNo="RK2025061504",
+        stockInDate=TODAY.isoformat(),
+        expireDate=(TODAY + timedelta(days=1825)).isoformat(),  # 5年后过期
+        catalogNo="SC-CF15-50",
+        batchNo="B20250604",
+        manufacturer="Axygen",
+        storageLocation="耗材柜-C-01",
+        unitPrice=Decimal("45.00"),
+        amount=Decimal("2250.00"),
+        qty=Decimal("50"),
+    ),
+    # C002: 培养瓶,入库 30 包
+    dict(
+        material_id=None,
+        stockInNo="RK2025061505",
+        stockInDate=TODAY.isoformat(),
+        expireDate=(TODAY + timedelta(days=1095)).isoformat(),  # 3年后过期
+        catalogNo="SC-CF25-1",
+        batchNo="B20250605",
+        manufacturer="Corning",
+        storageLocation="耗材柜-D-02",
+        unitPrice=Decimal("28.00"),
+        amount=Decimal("840.00"),
+        qty=Decimal("30"),
+    ),
+]
+
+
+def seed(
+    tenant_no: str = "zkxw",
+    user_id: str = "d3000000000000000000000000000001",
+) -> None:
+    db = SessionLocal()
+    mat_created = 0
+    mat_skipped = 0
+    batch_created = 0
+    batch_errors = 0
+    try:
+        for i, (mt, code, name, spec, unit, warn_qty, remark) in enumerate(SAMPLE_MATERIALS):
+            exists = mat_svc.code_exists(db, code, mt, tenant_no)
+            if exists:
+                # 找到已有物料的 ID
+                rows, _ = mat_svc.list_materials(
+                    db, page=1, page_size=1, keyword=code, material_type=mt, tenant_no=tenant_no
+                )
+                mat_id = rows[0]["id"] if rows else None
+                print(f"  跳过物料:{code} - {name}(已存在,ID: {mat_id})")
+                mat_skipped += 1
+                if mat_id:
+                    BATCH_ITEMS[i]["material_id"] = mat_id
+            else:
+                try:
+                    obj = mat_svc.create_material(
+                        db,
+                        material_type=mt,
+                        material_code=code,
+                        material_name=name,
+                        spec_model=spec,
+                        unit=unit,
+                        warning_qty=Decimal(str(warn_qty)),
+                        status="1",
+                        remark=remark,
+                        tenant_no=tenant_no,
+                        user_id=user_id,
+                    )
+                    BATCH_ITEMS[i]["material_id"] = obj.id
+                    print(f"  新增物料:{code} - {name}(ID: {obj.id})")
+                    mat_created += 1
+                except Exception as e:
+                    print(f"  错误(物料):{code} - {name},原因:{e}")
+                    continue
+
+        # 入库批次
+        print("\n--- 开始入库批次 ---")
+        for item in BATCH_ITEMS:
+            mat_id = item.get("material_id")
+            if not mat_id:
+                print(f"  跳过批次:物料ID不存在")
+                continue
+            stock_in_no = item["stockInNo"]
+            try:
+                batch_svc.batch_stock_in(
+                    db,
+                    items=[item],
+                    tenant_no=tenant_no,
+                    user_id=user_id,
+                )
+                print(f"  新增批次:{stock_in_no}(物料ID: {mat_id},数量: {item['qty']})")
+                batch_created += 1
+            except Exception as e:
+                print(f"  错误(批次):{stock_in_no},原因:{e}")
+                batch_errors += 1
+
+        print(
+            f"\n完成:物料新增 {mat_created} 条、跳过 {mat_skipped} 条;"
+            f"批次新增 {batch_created} 条、错误 {batch_errors} 条。"
+        )
+    finally:
+        db.close()
+
+
+if __name__ == "__main__":
+    seed()

+ 46 - 0
docs/sql/alter_sys_menu_add_market_my_material_usage.sql

@@ -0,0 +1,46 @@
+-- 市场基础信息:新增「我的物料领用记录」菜单
+INSERT INTO `sys_menu` (
+  `id`,
+  `menu_name`,
+  `parent_id`,
+  `menu_type`,
+  `path`,
+  `component`,
+  `perms`,
+  `is_frame`,
+  `visible`,
+  `status`,
+  `tenant_no`,
+  `order_num`,
+  `remark`,
+  `create_by`,
+  `create_dept_id`,
+  `create_time`,
+  `update_by`,
+  `update_time`,
+  `del_flag`
+)
+SELECT
+  '95000000000000000000000000000003',
+  '我的物料领用记录',
+  'MKT00000000000000000000000000001',
+  'C',
+  'my-material-usage',
+  '/cell-storage/my-material-usage/index',
+  'market:material-usage:list',
+  1,
+  '1',
+  '1',
+  'zkxw',
+  7,
+  NULL,
+  NULL,
+  '',
+  NOW(),
+  NULL,
+  NOW(),
+  0
+FROM DUAL
+WHERE NOT EXISTS (
+  SELECT 1 FROM `sys_menu` WHERE `id` = '95000000000000000000000000000003'
+);

+ 136 - 0
docs/sql/clear_biz_production_material_data.sql

@@ -0,0 +1,136 @@
+-- ============================================================
+-- 清空「生产物料库」界面相关业务表数据
+--
+-- 覆盖界面模块:
+--   1. 物料列表          → biz_production_material / biz_production_material_stock_batch
+--   2. 变动记录          → biz_production_material_usage
+--   3. 库存盘点          → biz_production_material_stock_check*
+--   4. 配制单            → biz_production_material_prep / biz_production_material_prep_line
+--   5. 我的物料领用记录  → biz_production_material_usage(按用户过滤,无独立表)
+--   6. 消耗明细          → biz_production_material_usage(prep 关联子记录,无独立表)
+--
+-- 附加:配置试剂配方 BOM → biz_production_material_formula
+--
+-- 用法(执行前请先备份):
+--   SET @tenant_no = 'zkxw' COLLATE utf8mb4_unicode_ci;   -- 仅清空指定租户
+--   SET @tenant_no = NULL;     -- 清空全部租户(生产环境慎用)
+--
+-- 说明:
+--   - 本脚本为物理 DELETE,包含 del_flag=1 的软删数据
+--   - 表间无数据库外键,按业务依赖顺序删除
+--   - 生产任务步骤表可能仍保留 requisition_usage_id 快照引用(见文末可选清理)
+-- ============================================================
+
+-- 与 biz_production_material* 表 tenant_no 列排序规则一致,避免与 @tenant_no 比较时报 1267
+SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci;
+SET @tenant_no = 'zkxw' COLLATE utf8mb4_unicode_ci;
+
+START TRANSACTION;
+
+-- ------------------------------------------------------------------
+-- 1. 库存盘点(子表 → 主表)
+-- ------------------------------------------------------------------
+DELETE FROM `biz_production_material_stock_check_unused_line`
+WHERE @tenant_no IS NULL OR `tenant_no` = (@tenant_no COLLATE utf8mb4_unicode_ci);
+
+DELETE FROM `biz_production_material_stock_check_batch_line`
+WHERE @tenant_no IS NULL OR `tenant_no` = (@tenant_no COLLATE utf8mb4_unicode_ci);
+
+DELETE FROM `biz_production_material_stock_check`
+WHERE @tenant_no IS NULL OR `tenant_no` = (@tenant_no COLLATE utf8mb4_unicode_ci);
+
+-- ------------------------------------------------------------------
+-- 2. 配制单(明细 → 主表)
+-- ------------------------------------------------------------------
+DELETE FROM `biz_production_material_prep_line`
+WHERE @tenant_no IS NULL OR `tenant_no` = (@tenant_no COLLATE utf8mb4_unicode_ci);
+
+DELETE FROM `biz_production_material_prep`
+WHERE @tenant_no IS NULL OR `tenant_no` = (@tenant_no COLLATE utf8mb4_unicode_ci);
+
+-- ------------------------------------------------------------------
+-- 3. 变动记录 / 领用记录 / 消耗明细(同一张表)
+--    含 parent_usage_id 自引用,整表删除即可
+-- ------------------------------------------------------------------
+DELETE FROM `biz_production_material_usage`
+WHERE @tenant_no IS NULL OR `tenant_no` = (@tenant_no COLLATE utf8mb4_unicode_ci);
+
+-- ------------------------------------------------------------------
+-- 4. 物料入库批次
+-- ------------------------------------------------------------------
+DELETE FROM `biz_production_material_stock_batch`
+WHERE @tenant_no IS NULL OR `tenant_no` = (@tenant_no COLLATE utf8mb4_unicode_ci);
+
+-- ------------------------------------------------------------------
+-- 5. 配置试剂配方 BOM
+-- ------------------------------------------------------------------
+DELETE FROM `biz_production_material_formula`
+WHERE @tenant_no IS NULL OR `tenant_no` = (@tenant_no COLLATE utf8mb4_unicode_ci);
+
+-- ------------------------------------------------------------------
+-- 6. 物料目录(主数据)
+-- ------------------------------------------------------------------
+DELETE FROM `biz_production_material`
+WHERE @tenant_no IS NULL OR `tenant_no` = (@tenant_no COLLATE utf8mb4_unicode_ci);
+
+COMMIT;
+
+-- ------------------------------------------------------------------
+-- 可选:解除生产任务步骤中对已删领用记录的引用(默认注释,按需启用)
+-- ------------------------------------------------------------------
+-- START TRANSACTION;
+-- UPDATE `biz_production_task_step_reagent`
+-- SET `requisition_usage_id` = NULL, `update_time` = NOW()
+-- WHERE `requisition_usage_id` IS NOT NULL
+--   AND (@tenant_no IS NULL OR `tenant_no` = (@tenant_no COLLATE utf8mb4_unicode_ci));
+--
+-- UPDATE `biz_production_task_step_consumable`
+-- SET `requisition_usage_id` = NULL, `update_time` = NOW()
+-- WHERE `requisition_usage_id` IS NOT NULL
+--   AND (@tenant_no IS NULL OR `tenant_no` = (@tenant_no COLLATE utf8mb4_unicode_ci));
+--
+-- UPDATE `biz_production_task_step_configured_reagent`
+-- SET `requisition_usage_id` = NULL, `update_time` = NOW()
+-- WHERE `requisition_usage_id` IS NOT NULL
+--   AND (@tenant_no IS NULL OR `tenant_no` = (@tenant_no COLLATE utf8mb4_unicode_ci));
+-- COMMIT;
+
+-- ------------------------------------------------------------------
+-- 校验:各表剩余行数(按 @tenant_no 过滤统计)
+-- ------------------------------------------------------------------
+SELECT 'biz_production_material_stock_check_unused_line' AS tbl,
+       COUNT(*) AS remain_cnt
+FROM `biz_production_material_stock_check_unused_line`
+WHERE @tenant_no IS NULL OR `tenant_no` = (@tenant_no COLLATE utf8mb4_unicode_ci)
+UNION ALL
+SELECT 'biz_production_material_stock_check_batch_line', COUNT(*)
+FROM `biz_production_material_stock_check_batch_line`
+WHERE @tenant_no IS NULL OR `tenant_no` = (@tenant_no COLLATE utf8mb4_unicode_ci)
+UNION ALL
+SELECT 'biz_production_material_stock_check', COUNT(*)
+FROM `biz_production_material_stock_check`
+WHERE @tenant_no IS NULL OR `tenant_no` = (@tenant_no COLLATE utf8mb4_unicode_ci)
+UNION ALL
+SELECT 'biz_production_material_prep_line', COUNT(*)
+FROM `biz_production_material_prep_line`
+WHERE @tenant_no IS NULL OR `tenant_no` = (@tenant_no COLLATE utf8mb4_unicode_ci)
+UNION ALL
+SELECT 'biz_production_material_prep', COUNT(*)
+FROM `biz_production_material_prep`
+WHERE @tenant_no IS NULL OR `tenant_no` = (@tenant_no COLLATE utf8mb4_unicode_ci)
+UNION ALL
+SELECT 'biz_production_material_usage', COUNT(*)
+FROM `biz_production_material_usage`
+WHERE @tenant_no IS NULL OR `tenant_no` = (@tenant_no COLLATE utf8mb4_unicode_ci)
+UNION ALL
+SELECT 'biz_production_material_stock_batch', COUNT(*)
+FROM `biz_production_material_stock_batch`
+WHERE @tenant_no IS NULL OR `tenant_no` = (@tenant_no COLLATE utf8mb4_unicode_ci)
+UNION ALL
+SELECT 'biz_production_material_formula', COUNT(*)
+FROM `biz_production_material_formula`
+WHERE @tenant_no IS NULL OR `tenant_no` = (@tenant_no COLLATE utf8mb4_unicode_ci)
+UNION ALL
+SELECT 'biz_production_material', COUNT(*)
+FROM `biz_production_material`
+WHERE @tenant_no IS NULL OR `tenant_no` = (@tenant_no COLLATE utf8mb4_unicode_ci);

+ 496 - 0
docs/superpowers/plans/2026-06-15-market-material-my-usage-plan.md

@@ -0,0 +1,496 @@
+# 市场物料库「我的物料领用记录」实施计划
+
+> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
+
+**Goal:** 为市场物料库新增「我的物料领用记录」功能,参照生产物料库的实现模式
+
+**Architecture:** 采用复用模式 - 页面 = 标题 + Tab组件(mineOnly prop),复用现有 MaterialUsageTab 组件,新增后端 API `/web/admin/my-material-usages`
+
+**Tech Stack:** Vue 3 + Element Plus (前端) | FastAPI + SQLAlchemy (后端)
+
+---
+
+## 任务清单
+
+### Task 1: 后端 - 新增 Pydantic Schema
+
+**Files:**
+- Modify: `backend/app/schemas/material.py`
+
+**Steps:**
+
+- [ ] **Step 1: 读取现有 schema 文件了解结构**
+
+读取 `backend/app/schemas/material.py` 查看现有的 `MaterialUsage` 相关 schema 定义。
+
+- [ ] **Step 2: 添加查询参数 Schema**
+
+在 `material.py` 中添加:
+
+```python
+from pydantic import BaseModel, Field
+from typing import Optional
+
+class MyMaterialUsageQuery(BaseModel):
+    keyword: Optional[str] = Field(None, description="关键词搜索")
+    material_id: Optional[str] = Field(None, description="物料ID")
+    material_type: Optional[str] = Field(None, description="物料类型")
+    change_type: Optional[str] = Field(None, description="变动类型")
+    start_time: Optional[str] = Field(None, description="开始日期 YYYY-MM-DD")
+    end_time: Optional[str] = Field(None, description="结束日期 YYYY-MM-DD")
+```
+
+- [ ] **Step 3: 添加响应字段**
+
+在 `MaterialUsage` 或创建新的 `MaterialUsageResponse` 添加 `requisition_status` 字段:
+
+```python
+class MaterialUsageResponse(BaseModel):
+    # ... 现有字段 ...
+    requisition_status: Optional[str] = Field(None, description="领用状态: open/closed")
+```
+
+- [ ] **Step 4: Commit**
+
+```bash
+git add backend/app/schemas/material.py
+git commit -m "feat(market): 新增 MyMaterialUsageQuery schema"
+```
+
+---
+
+### Task 2: 后端 - 新增 CRUD 方法
+
+**Files:**
+- Modify: `backend/app/crud/material.py`
+
+**Steps:**
+
+- [ ] **Step 1: 读取现有 CRUD 文件**
+
+读取 `backend/app/crud/material.py` 查看现有的 `material_usage` 相关 CRUD 方法。
+
+- [ ] **Step 2: 添加 get_my_usages 方法**
+
+在 `material.py` CRUD 文件中添加:
+
+```python
+async def get_my_usages(
+    db: AsyncSession,
+    current_user_id: str,
+    tenant_no: str,
+    page: int = 1,
+    page_size: int = 10,
+    keyword: Optional[str] = None,
+    material_id: Optional[str] = None,
+    material_type: Optional[str] = None,
+    change_type: Optional[str] = None,
+    start_time: Optional[str] = None,
+    end_time: Optional[str] = None,
+) -> Tuple[List[dict], int]:
+    """
+    获取当前用户的物料领用记录(手动出库记录)
+
+    Args:
+        current_user_id: 当前用户ID(用于筛选领用人)
+        其他筛选参数...
+    Returns:
+        (记录列表, 总数)
+    """
+    # 参考现有 material_usage 的查询逻辑
+    # 额外添加条件:
+    # - source_type = 'manual_out'
+    # - receiver = current_user_name 或与 current_user_id 关联的领用人
+    # 按 create_time DESC 排序
+```
+
+- [ ] **Step 3: Commit**
+
+```bash
+git add backend/app/crud/material.py
+git commit -m "feat(market): 新增 get_my_usages CRUD 方法"
+```
+
+---
+
+### Task 3: 后端 - 新增 API 路由
+
+**Files:**
+- Create: `backend/app/api/market.py`
+- Modify: `backend/app/api/__init__.py`
+- Modify: `backend/app/main.py`
+
+**Steps:**
+
+- [ ] **Step 1: 创建 market.py 路由文件**
+
+创建 `backend/app/api/market.py`:
+
+```python
+from fastapi import APIRouter, Depends, Query
+from sqlalchemy.ext.asyncio import AsyncSession
+from typing import Optional
+
+from app.core.security import get_current_user
+from app.database import get_db
+from app.schemas.material import MyMaterialUsageQuery
+from app.crud.material import get_my_usages
+
+router = APIRouter(prefix="/market", tags=["market"])
+
+
+@router.get("/my-material-usages")
+async def get_my_material_usage_list(
+    page: int = Query(1, ge=1),
+    page_size: int = Query(10, ge=1, le=100),
+    keyword: Optional[str] = Query(None),
+    material_id: Optional[str] = Query(None),
+    material_type: Optional[str] = Query(None),
+    change_type: Optional[str] = Query(None),
+    start_time: Optional[str] = Query(None),
+    end_time: Optional[str] = Query(None),
+    current_user: dict = Depends(get_current_user),
+    db: AsyncSession = Depends(get_db),
+):
+    """获取当前用户的物料领用记录"""
+    # 获取当前用户信息
+    user_id = current_user.get("user_id")
+    user_name = current_user.get("user_name")
+    tenant_no = current_user.get("tenant_no")
+
+    records, total = await get_my_usages(
+        db=db,
+        current_user_id=user_id,
+        user_name=user_name,
+        tenant_no=tenant_no,
+        page=page,
+        page_size=page_size,
+        keyword=keyword,
+        material_id=material_id,
+        material_type=material_type,
+        change_type=change_type,
+        start_time=start_time,
+        end_time=end_time,
+    )
+
+    return {
+        "list": records,
+        "total": total,
+        "page": page,
+        "pageSize": page_size,
+    }
+```
+
+- [ ] **Step 2: 注册路由到 __init__.py**
+
+在 `backend/app/api/__init__.py` 中添加:
+
+```python
+from app.api.market import router as market_router
+
+# 在 api_router 列表中添加
+api_router.include_router(market_router)
+```
+
+- [ ] **Step 3: 确保 main.py 中调用 __init__.py**
+
+确认 `backend/app/main.py` 中的 `include_router(api_router)` 包含了 `__init__.py` 中注册的路由。
+
+- [ ] **Step 4: Commit**
+
+```bash
+git add backend/app/api/market.py backend/app/api/__init__.py backend/app/main.py
+git commit -m "feat(market): 新增市场模块 API 路由"
+```
+
+---
+
+### Task 4: 前端 - 新增 API 函数
+
+**Files:**
+- Modify: `web-admin/src/api/material-usage.ts`
+
+**Steps:**
+
+- [ ] **Step 1: 读取现有 API 文件**
+
+读取 `web-admin/src/api/material-usage.ts` 了解现有结构和 `MaterialUsage` 类型定义。
+
+- [ ] **Step 2: 添加 fetchMyMaterialUsageList 函数**
+
+在 `material-usage.ts` 中添加:
+
+```typescript
+export async function fetchMyMaterialUsageList(params: {
+  page: number
+  pageSize: number
+  keyword?: string
+  materialId?: string
+  materialType?: string
+  changeType?: string
+  startTime?: string
+  endTime?: string
+}): Promise<{ list: MaterialUsage[]; total: number }> {
+  return request.get('/web/admin/my-material-usages', { params })
+}
+```
+
+- [ ] **Step 3: 确保 MaterialUsage 类型包含 requisitionStatus**
+
+检查 `MaterialUsage` 类型定义,如需要则添加:
+
+```typescript
+export interface MaterialUsage {
+  // ... 现有字段 ...
+  requisitionStatus?: 'open' | 'closed'
+}
+```
+
+- [ ] **Step 4: Commit**
+
+```bash
+git add web-admin/src/api/material-usage.ts
+git commit -m "feat(market): 新增 fetchMyMaterialUsageList API"
+```
+
+---
+
+### Task 5: 前端 - 修改 MaterialUsageTab 支持 mineOnly
+
+**Files:**
+- Modify: `web-admin/src/views/cell-storage/material/MaterialUsageTab.vue`
+
+**Steps:**
+
+- [ ] **Step 1: 读取现有 MaterialUsageTab.vue**
+
+读取 `web-admin/src/views/cell-storage/material/MaterialUsageTab.vue` 了解当前实现。
+
+- [ ] **Step 2: 添加 mineOnly prop**
+
+在 `<script setup>` 中添加:
+
+```typescript
+const props = withDefaults(
+  defineProps<{
+    mineOnly?: boolean
+  }>(),
+  {
+    mineOnly: false
+  }
+)
+```
+
+- [ ] **Step 3: 修改 loadData 函数支持 mineOnly**
+
+```typescript
+async function loadData() {
+  loading.value = true
+  try {
+    const params: Record<string, any> = {
+      page: pagination.page,
+      pageSize: pagination.pageSize
+    }
+    // ... 现有参数构建 ...
+
+    const res = props.mineOnly
+      ? await fetchMyMaterialUsageList(params)
+      : await fetchMaterialUsageList(params)
+    tableData.value = res.list || []
+    pagination.total = res.total ?? 0
+  } finally {
+    loading.value = false
+  }
+}
+```
+
+- [ ] **Step 4: 导入 fetchMyMaterialUsageList**
+
+```typescript
+import {
+  fetchMaterialUsageList,
+  fetchMaterialUsage,
+  fetchMarkMaterialUsageFullyUsed,
+  fetchMyMaterialUsageList  // 新增
+} from '@/api/material-usage'
+```
+
+- [ ] **Step 5: 修改变动类型下拉选项(mineOnly 时不显示入库)**
+
+在模板中找到变动类型选择器:
+
+```vue
+<el-select v-model="searchForm.changeType" placeholder="全部" clearable>
+  <el-option v-if="!mineOnly" label="入库" value="in" />  <!-- 修改:添加 v-if="!mineOnly" -->
+  <el-option label="出库" value="out" />
+  <el-option label="任务使用" value="use" />
+  <el-option label="废弃" value="discard" />
+</el-select>
+```
+
+- [ ] **Step 6: 添加使用状态列**
+
+在表格中(变动类型列之后或适当位置)添加:
+
+```vue
+<el-table-column
+  v-if="mineOnly"
+  label="使用状态"
+  min-width="100"
+  align="center"
+  header-align="center"
+>
+  <template #default="{ row }">
+    <template v-if="isManualOutRow(row)">
+      <el-tag v-if="row.requisitionStatus === 'closed'" type="success" size="small">
+        已使用完
+      </el-tag>
+      <el-tag v-else type="info" size="small">
+        使用中
+      </el-tag>
+    </template>
+    <span v-else>—</span>
+  </template>
+</el-table-column>
+```
+
+- [ ] **Step 7: 隐藏领用人列(mineOnly 时不显示)**
+
+找到领用人列,添加 v-if:
+
+```vue
+<el-table-column
+  v-if="!mineOnly"  <!-- 添加此条件 -->
+  label="领用人"
+  ...
+>
+```
+
+- [ ] **Step 8: Commit**
+
+```bash
+git add web-admin/src/views/cell-storage/material/MaterialUsageTab.vue
+git commit -m "feat(market): MaterialUsageTab 支持 mineOnly 模式"
+```
+
+---
+
+### Task 6: 前端 - 新建页面
+
+**Files:**
+- Create: `web-admin/src/views/cell-storage/my-material-usage/index.vue`
+
+**Steps:**
+
+- [ ] **Step 1: 参考生产物料库页面创建**
+
+参考 `web-admin/src/views/production/my-production-material-usage/index.vue` 创建:
+
+```vue
+<!-- 市场物料库 — 我的物料领用记录 -->
+<template>
+  <div class="page-container">
+    <section class="panel">
+      <div class="panel-top">
+        <h2 class="title-bar-heading">我的物料领用记录</h2>
+      </div>
+      <MaterialUsageTab mine-only />
+    </section>
+  </div>
+</template>
+
+<script setup lang="ts">
+  import MaterialUsageTab from '../material/MaterialUsageTab.vue'
+
+  defineOptions({ name: 'MarketMaterialMyUsage' })
+</script>
+```
+
+- [ ] **Step 2: Commit**
+
+```bash
+git add web-admin/src/views/cell-storage/my-material-usage/index.vue
+git commit -m "feat(market): 新增我的物料领用记录页面"
+```
+
+---
+
+### Task 7: 前端 - 添加路由配置
+
+**Files:**
+- Modify: `web-admin/src/router/modules/sqxp.ts`
+
+**Steps:**
+
+- [ ] **Step 1: 读取路由文件找到市场基础信息菜单位置**
+
+在 `sqxp.ts` 中找到市场物料库的路由配置,添加同级菜单项。
+
+- [ ] **Step 2: 添加路由配置**
+
+在市场物料库路由的同级添加:
+
+```typescript
+{
+  path: 'my-material-usage',
+  component: '/cell-storage/my-material-usage/index',
+  meta: {
+    title: '我的物料领用记录',
+    icon: 'List',
+    menuCode: 'biz:material:myUsage'
+  }
+}
+```
+
+注意:需要添加到市场基础信息菜单分组下。
+
+- [ ] **Step 3: Commit**
+
+```bash
+git add web-admin/src/router/modules/sqxp.ts
+git commit -m "feat(market): 添加我的物料领用记录路由"
+```
+
+---
+
+### Task 8: 验证测试
+
+**Steps:**
+
+- [ ] **Step 1: 启动后端服务**
+
+```bash
+cd backend && ./start-local.sh
+```
+
+或确认后端服务已运行。
+
+- [ ] **Step 2: 启动前端服务**
+
+```bash
+cd web-admin && pnpm dev
+```
+
+- [ ] **Step 3: 手动测试**
+
+1. 登录系统
+2. 访问「市场基础信息 → 我的物料领用记录」
+3. 验证列表正确加载当前用户的出库记录
+4. 点击「标记已使用完」按钮
+5. 验证状态变为"已使用完"
+
+- [ ] **Step 4: Commit 最终改动**
+
+如果测试通过,提交所有剩余改动。
+
+---
+
+## 验收清单
+
+- [ ] 后端 API `/web/admin/my-material-usages` 返回正确数据
+- [ ] 菜单「市场基础信息 → 我的物料领用记录」可正常访问
+- [ ] 列表仅显示当前用户的物料出库记录
+- [ ] 变动类型筛选正常(mineOnly 模式不显示入库选项)
+- [ ] 「使用状态」列正确显示"已使用完"/"使用中"
+- [ ] 点击「标记已使用完」后,状态正确更新
+- [ ] 查看详情弹窗正常显示

+ 306 - 0
docs/superpowers/specs/2026-06-15-configured-reagent-design.md

@@ -0,0 +1,306 @@
+# 配置试剂一次性配制功能设计
+
+## 1. 需求概述
+
+### 1.1 背景
+
+- 现有系统中,「生产物料库」包含试剂和耗材两种基础物料类型
+- 客户需要在生产过程中使用由试剂和耗材组合而成的配置试剂
+- 现有「配置试剂目录」和「配制单」功能过于复杂(配方模板 + 多状态流程),需要简化
+
+### 1.2 目标
+
+将配置试剂的操作简化为**一次性配制**流程:
+1. 选择已领用但未用完的试剂/耗材作为子物料
+2. 输入配置试剂名称和产出数量
+3. 提交即完成:子物料扣减 → 配置试剂入库 → 自动出库给当前操作人
+4. 历史配制记录保留用于追溯
+
+## 2. 功能设计
+
+### 2.1 入口改造
+
+**位置**:`生产物料库` → `配制单` Tab
+
+| 改造前 | 改造后 |
+|--------|--------|
+| 工具栏:`新建配制单` | 工具栏:`配置试剂` |
+| 列表有状态(草稿/已完成/已作废) | 列表无状态(仅用于追溯) |
+| 有编辑/确认配制等多步操作 | 一次性完成,无编辑功能 |
+| `配置试剂目录` 按钮 | 移除 |
+
+### 2.2 新建配制弹窗
+
+点击「配置试剂」按钮,弹出配制弹窗:
+
+**表单字段**:
+| 字段 | 类型 | 说明 |
+|------|------|------|
+| 配置试剂名称 | 文本输入 | 必填,自由命名(如「75% 乙醇溶液」) |
+| 产出数量 | 数字输入 | 必填,正整数,默认 1 |
+| 子物料明细 | 物料选择表格 | 必填,至少选择一种子物料 |
+
+**子物料选择交互**:
+1. 点击「添加子物料」按钮,弹出物料选择对话框
+2. 物料来源:已领用但未用完的试剂/耗材批次(不限领用人)
+3. 选择物料后,自动代入该批次的**最大可用数量**,用户可手动调整
+4. 每种子物料需填写「消耗数量」
+5. 支持删除已添加的子物料
+
+**子物料表格字段**:
+| 字段 | 说明 |
+|------|------|
+| 物料名称 | 只读,从领用批次带入 |
+| 物料类型 | 只读,试剂/耗材 |
+| 批次号 | 只读,来自领用记录 |
+| 可用数量 | 只读,该批次剩余可用数量 |
+| 消耗数量 | 可编辑,≤ 可用数量 |
+
+### 2.3 提交逻辑
+
+点击「提交」后,后端执行以下操作:
+
+1. **校验**:子物料消耗数量 ≤ 可用数量
+2. **扣减子物料库存**:
+   - 遍历子物料明细,扣减对应领用批次的可用数量
+3. **创建配置试剂库存**:
+   - 在 `biz_production_material_stock` 中创建 `configured_reagent` 类型记录
+   - 库存数量 = 产出数量
+4. **自动出库**:
+   - 创建出库记录,将配置试剂出库给当前操作人
+5. **记录配制历史**:
+   - 在 `biz_production_material_prep` 中创建记录(status = 'completed')
+   - 记录配制人、配制时间、子物料明细、产出数量
+6. **记录消耗明细**:
+   - 在「我的领用记录」中关联展示子物料的消耗
+
+### 2.4 列表改造
+
+**列表字段**(精简后):
+| 字段 | 说明 |
+|------|------|
+| 序号 | 序号 |
+| 配制单号 | 自动生成 |
+| 配置试剂 | 配置试剂名称 |
+| 配制时间 | 配制完成时间 |
+| 产出数量 | 产出数量 |
+| 操作人 | 配制人姓名 |
+
+**操作列**:
+- 查看:查看配制详情(子物料明细、出库去向等)
+
+**移除**:
+- 状态列(已完成/草稿/已作废)
+- 编辑、确认配制、删除操作按钮
+
+### 2.5 我的物料领用记录
+
+**新增关联展示**:
+
+在「我的物料领用记录」中,为配置试剂配制场景增加消耗明细:
+
+| 字段 | 说明 |
+|------|------|
+| 物料名称 | 子物料名称 |
+| 类型 | 试剂/耗材 |
+| 消耗数量 | 用于配制的消耗量 |
+| 来源批次 | 领用批次号 |
+| 消耗时间 | 配制时间 |
+| 关联配制单 | 配制单号(点击可跳转查看) |
+| 产出配置试剂 | 配制产出的配置试剂名称 |
+
+## 3. 数据模型
+
+### 3.1 新增/修改表结构
+
+**`biz_production_material_prep` 表改造**:
+
+| 字段 | 类型 | 说明 |
+|------|------|------|
+| id | VARCHAR(64) | 主键 |
+| prep_no | VARCHAR(64) | 配制单号 |
+| configured_material_name | VARCHAR(128) | 配置试剂名称 |
+| output_qty | DECIMAL(10,2) | 产出数量 |
+| status | VARCHAR(32) | 固定为 'completed' |
+| prep_time | DATETIME | 配制时间 |
+| ... | ... | 公共字段 |
+
+**`biz_production_material_prep_line` 表**:
+
+| 字段 | 类型 | 说明 |
+|------|------|------|
+| id | VARCHAR(64) | 主键 |
+| prep_id | VARCHAR(64) | 关联配制单 |
+| material_id | VARCHAR(64) | 子物料ID |
+| material_name | VARCHAR(128) | 子物料名称 |
+| material_type | VARCHAR(32) | 试剂/耗材 |
+| batch_no | VARCHAR(64) | 领用批次号 |
+| consumption_qty | DECIMAL(10,2) | 消耗数量 |
+| ... | ... | 公共字段 |
+
+**新增:`biz_production_material_consumption` 表**(用于记录消耗明细,关联到领用记录):
+
+| 字段 | 类型 | 说明 |
+|------|------|------|
+| id | VARCHAR(64) | 主键 |
+| prep_id | VARCHAR(64) | 关联配制单 |
+| source_receipt_id | VARCHAR(64) | 领用记录ID |
+| material_id | VARCHAR(64) | 物料ID |
+| consumption_qty | DECIMAL(10,2) | 消耗数量 |
+| consumption_time | DATETIME | 消耗时间 |
+| ... | ... | 公共字段 |
+
+### 3.2 API 设计
+
+**前端 API(`web-admin/src/api/production-material.ts`)**:
+
+| 方法 | 路径 | 说明 |
+|------|------|------|
+| GET | /api/admin/production-material/prep | 分页查询配制记录 |
+| POST | /api/admin/production-material/prep | 新建配制(一次性完成) |
+| GET | /api/admin/production-material/prep/{id} | 查看配制详情 |
+| GET | /api/admin/production-material/prep/available-materials | 获取可用子物料(已领用未用完) |
+| GET | /api/admin/production-material/consumption | 查询消耗明细(我的领用记录用) |
+
+**后端路由(`backend/app/api/production_material.py`)**:
+
+| 方法 | 路径 | 说明 |
+|------|------|------|
+| GET | /api/admin/production-material/prep | 列表 |
+| POST | /api/admin/production-material/prep | 创建配制 |
+| GET | /api/admin/production-material/prep/{prep_id} | 详情 |
+| GET | /api/admin/production-material/prep/available-materials | 可用子物料 |
+| GET | /api/admin/production-material/consumption | 消耗明细 |
+
+## 4. 前端改造
+
+### 4.1 配制单 Tab 改造
+
+**文件**:`web-admin/src/views/production/production-material/ProductionMaterialPrepTab.vue`
+
+**改动点**:
+1. 工具栏按钮:`新建配制单` → `配置试剂`
+2. 列表移除:状态列、编辑/确认配制/删除按钮
+3. 列表增加:操作人列
+4. 新建弹窗:重构为一次性配制弹窗
+
+### 4.2 新建配制弹窗设计
+
+**文件**:新建 `ProductionMaterialPrepDialog.vue`
+
+**布局**:弹窗 + 子物料选择表格
+
+**交互流程**:
+1. 输入配置试剂名称和产出数量
+2. 点击「添加子物料」→ 弹出物料选择对话框
+3. 选择物料 → 自动代入可用数量 → 用户可调整消耗量
+4. 点击「提交」→ 调用 API → 成功后关闭弹窗并刷新列表
+
+### 4.3 子物料选择对话框
+
+**文件**:新建 `MaterialBatchSelectDialog.vue`
+
+**功能**:
+1. 列表展示:已领用未用完的物料批次
+2. 支持搜索:物料名称、批次号
+3. 选择后返回:物料信息 + 批次信息 + 可用数量
+
+### 4.4 我的物料领用记录改造
+
+**文件**:`web-admin/src/views/production/my-production-task/index.vue`
+
+**改动点**:
+1. 增加 Tab 或筛选项,区分「领用记录」和「消耗明细」
+2. 消耗明细 Tab:展示子物料消耗记录,包含关联配制单号
+
+## 5. 后端改造
+
+### 5.1 新增 Schema
+
+```python
+# backend/app/schemas/production_material.py
+
+class PrepCreateBody(BaseModel):
+    """一次性配制请求"""
+    configured_material_name: str = Field(..., max_length=128, description="配置试剂名称")
+    output_qty: Decimal = Field(..., gt=0, description="产出数量")
+    lines: List[PrepLineCreate]  # 子物料明细
+
+class PrepLineCreate(BaseModel):
+    material_id: str = Field(..., description="物料ID")
+    material_type: str = Field(..., description="物料类型")
+    batch_no: str = Field(..., description="批次号")
+    consumption_qty: Decimal = Field(..., gt=0, description="消耗数量")
+
+class ConsumptionResp(BaseModel):
+    """消耗明细响应"""
+    id: str
+    material_name: str
+    material_type: str
+    consumption_qty: Decimal
+    batch_no: str
+    consumption_time: datetime
+    prep_no: str
+    configured_material_name: str
+```
+
+### 5.2 CRUD 改造
+
+**文件**:`backend/app/crud/production_material.py`
+
+新增:
+- `create_prep_with_transaction()`:一次性创建配制(包含库存扣减、入库、出库)
+- `get_available_materials()`:查询可用子物料
+- `get_consumptions()`:查询消耗明细
+
+### 5.3 Service 层
+
+**文件**:`backend/app/services/production_material_service.py`
+
+新增配制业务逻辑:
+1. 校验子物料可用数量
+2. 扣减子物料库存(锁定批次)
+3. 创建配置试剂库存
+4. 创建出库记录
+5. 创建配制记录
+6. 创建消耗明细记录
+
+## 6. 改动范围汇总
+
+| 类别 | 文件 | 改动类型 |
+|------|------|----------|
+| 后端模型 | `backend/app/models/production_material.py` | 新增消耗明细表 |
+| 后端 Schema | `backend/app/schemas/production_material.py` | 新增配制请求/响应 schema |
+| 后端 CRUD | `backend/app/crud/production_material.py` | 新增配制相关 CRUD |
+| 后端 Service | `backend/app/services/production_material_service.py` | 新增配制业务逻辑 |
+| 后端 API | `backend/app/api/production_material.py` | 新增/改造配制接口 |
+| 前端 API | `web-admin/src/api/production-material.ts` | 新增 API 方法 |
+| 前端组件 | `ProductionMaterialPrepTab.vue` | 改造列表和工具栏 |
+| 前端组件 | `ProductionMaterialPrepDialog.vue` | 新建配制弹窗 |
+| 前端组件 | `MaterialBatchSelectDialog.vue` | 新建物料批次选择弹窗 |
+| 前端页面 | `my-production-task/index.vue` | 改造领用记录增加消耗明细 |
+| 路由 | `web-admin/src/router/modules/sqxp.ts` | 可能需要调整菜单配置 |
+
+## 7. 实现计划
+
+### 阶段一:后端基础(半天)
+1. 新增 `biz_production_material_consumption` 表
+2. 新增 Schema
+3. 实现 CRUD 和 Service 层
+4. 实现 API 接口
+
+### 阶段二:前端基础(半天)
+1. 新建物料批次选择弹窗
+2. 新建配制弹窗
+3. 改造配制单 Tab
+
+### 阶段三:领用记录改造(半天)
+1. 改造我的物料领用记录页面
+2. 对接消耗明细 API
+
+### 阶段四:联调测试(半天)
+1. 前后端联调
+2. 功能测试
+3. UI 验收
+
+**预计总工期:2 天**

+ 224 - 0
docs/superpowers/specs/2026-06-15-market-material-my-usage-design.md

@@ -0,0 +1,224 @@
+# 市场物料库「我的物料领用记录」功能设计
+
+**日期**: 2026-06-15
+**状态**: 已批准实施
+
+## 1. 需求背景
+
+市场物料库(`/market/market-info/material`)已有物料列表和变动记录功能,但缺少像生产物料库、质检物料库那样的「我的物料领用记录」独立页面。
+
+用户需要能够:
+- 查看自己领用的市场物料记录
+- 标记物料为"已使用完"
+
+## 2. 设计方案
+
+### 2.1 架构模式
+
+采用与生产物料库、质检物料库相同的复用模式:
+
+```
+市场基础信息菜单
+└── 我的物料领用记录 → MaterialUsageTab (mineOnly=true)
+                              ↓
+                        fetchMyMaterialUsageList()
+                              ↓
+                          后端 API
+```
+
+核心思想:**页面 = 标题 + Tab组件(mineOnly prop)**,复用现有 `MaterialUsageTab.vue` 组件。
+
+### 2.2 后端改动
+
+#### 新增接口
+
+| 接口 | 方法 | 路径 |
+|------|------|------|
+| 我的物料领用记录列表 | GET | `/web/admin/my-material-usages` |
+
+#### 请求参数
+
+| 参数 | 类型 | 说明 |
+|------|------|------|
+| page | int | 页码 |
+| pageSize | int | 每页条数 |
+| keyword | string | 关键词(物料编码/名称/入库编号/批号/货号) |
+| materialId | string | 物料ID |
+| materialType | string | 物料类型(reagent/consumable/configured_reagent) |
+| changeType | string | 变动类型(in/out/use/discard) |
+| startTime | string | 开始日期(YYYY-MM-DD) |
+| endTime | string | 结束日期(YYYY-MM-DD) |
+
+#### 响应字段
+
+与现有 `/web/admin/material-usages` 保持一致,增加 `requisitionStatus` 字段标识使用状态。
+
+#### 实现逻辑
+
+筛选条件:
+- `tenant_no` = 当前用户租户
+- `source_type = 'manual_out'`(手动出库)
+- `receiver` = 当前用户昵称(或 user_id)
+- 按 `create_time DESC` 排序
+
+#### 接口实现位置
+
+在 `app/api/market.py` 中实现(新建),或添加到现有相关模块。
+
+### 2.3 前端改动
+
+#### 2.3.1 API 层
+
+**文件**: `web-admin/src/api/material-usage.ts`
+
+新增函数:
+
+```typescript
+export async function fetchMyMaterialUsageList(params: {
+  page: number
+  pageSize: number
+  keyword?: string
+  materialId?: string
+  materialType?: string
+  changeType?: string
+  startTime?: string
+  endTime?: string
+}): Promise<{ list: MaterialUsage[]; total: number }>
+```
+
+调用 `GET /web/admin/my-material-usages`。
+
+#### 2.3.2 Tab 组件增强
+
+**文件**: `web-admin/src/views/cell-storage/material/MaterialUsageTab.vue`
+
+修改点:
+1. 添加 `mine-only` prop(与 `ProductionMaterialUsageTab.vue` 一致)
+2. 当 `mine-only=true` 时:
+   - 调用 `fetchMyMaterialUsageList` 而非 `fetchMaterialUsageList`
+   - 不显示"入库"变动类型选项
+   - 不显示"领用人"列
+   - 显示"使用状态"列
+3. "使用状态"列逻辑(新增):
+   ```vue
+   <el-table-column v-if="mineOnly" label="使用状态" ...>
+     <template #default="{ row }">
+       <template v-if="isManualOutRow(row)">
+         <el-tag v-if="row.requisitionStatus === 'closed'" type="success" size="small">已使用完</el-tag>
+         <el-tag v-else type="info" size="small">使用中</el-tag>
+       </template>
+       <span v-else>—</span>
+     </template>
+   </el-table-column>
+   ```
+
+#### 2.3.3 新建页面
+
+**文件**: `web-admin/src/views/cell-storage/my-material-usage/index.vue`
+
+```vue
+<template>
+  <div class="page-container">
+    <section class="panel">
+      <div class="panel-top">
+        <h2 class="title-bar-heading">我的物料领用记录</h2>
+      </div>
+      <MaterialUsageTab mine-only />
+    </section>
+  </div>
+</template>
+```
+
+#### 2.3.4 路由配置
+
+**文件**: `web-admin/src/router/modules/sqxp.ts`
+
+在「市场基础信息」菜单分组下新增:
+
+```typescript
+{
+  path: 'my-material-usage',
+  component: '/cell-storage/my-material-usage/index',
+  meta: {
+    title: '我的物料领用记录',
+    icon: 'List',
+    menuCode: 'biz:material:myUsage'
+  }
+}
+```
+
+**注意**:需要确保菜单项在数据库 `sys_menu` 表中也创建,或通过后台管理添加。
+
+### 2.4 页面功能
+
+| 功能 | 说明 |
+|------|------|
+| 筛选 | 关键词、物料筛选(远程搜索)、物料类型、变动类型、时间范围 |
+| 列表 | 显示当前用户的手动出库记录 |
+| 查看详情 | 打开 SystemViewDialog 查看完整信息 |
+| 标记已使用完 | 调用 `fetchMarkMaterialUsageFullyUsed` |
+| 使用状态标识 | "已使用完"(绿色)/ "使用中"(灰色)标签 |
+
+### 2.5 列表字段
+
+| 列名 | 说明 |
+|------|------|
+| 序号 | 序号 |
+| 物料编码 | |
+| 物料名称 | |
+| 物料类型 | Tag 标签 |
+| 入库编号 | |
+| 入库日期 | |
+| 货号 | |
+| 批号 | |
+| 厂家 | |
+| 单价(元) | |
+| 金额(元) | |
+| 变动类型 | Tag 标签 |
+| 领用数量 | |
+| 变动前库存 | |
+| 变动后库存 | |
+| 使用状态 | mineOnly=true 时显示 |
+| 来源类型 | Tag 标签 |
+| 用途 | |
+| 领用时间 | |
+| 备注 | |
+| 操作人 | |
+| 变动时间 | |
+| 操作 | 查看、标记已使用完 |
+
+## 3. 与现有模块对比
+
+| 特性 | 市场物料库 | 生产物料库 | 质检物料库 |
+|------|-----------|-----------|-----------|
+| API | `/web/admin/my-material-usages` | `/web/admin/my-production-material-usages` | `/web/admin/my-qc-material-usages` |
+| 页面 | `cell-storage/my-material-usage/` | `production/my-production-material-usage/` | `quality-inspection/my-qc-material-usage/` |
+| Tab 组件 | `MaterialUsageTab.vue` | `ProductionMaterialUsageTab.vue` | `QcMaterialUsageTab.vue` |
+| 使用状态列 | 已使用完/使用中 | 已使用完/使用中 | 已使用完/使用中 |
+
+## 4. 文件清单
+
+### 前端
+
+| 文件 | 操作 |
+|------|------|
+| `api/material-usage.ts` | 修改:新增 fetchMyMaterialUsageList |
+| `views/cell-storage/material/MaterialUsageTab.vue` | 修改:添加 mineOnly prop 支持 |
+| `views/cell-storage/my-material-usage/index.vue` | 新建 |
+| `router/modules/sqxp.ts` | 修改:新增路由 |
+
+### 后端
+
+| 文件 | 操作 |
+|------|------|
+| `app/api/market.py` | 新建(或在现有模块中添加) |
+| `app/crud/material.py` | 修改:新增 get_my_usages 方法 |
+| `app/schemas/material.py` | 修改:新增 MyMaterialUsageQuery |
+
+## 5. 验收标准
+
+1. 菜单「市场基础信息 → 我的物料领用记录」可正常访问
+2. 列表仅显示当前用户的物料出库记录
+3. 点击「标记已使用完」后,使用状态变为"已使用完"
+4. 查看详情弹窗正常显示
+5. 与生产物料库的「我的物料领用记录」功能一致

Fichier diff supprimé car celui-ci est trop grand
+ 458 - 471
web-admin/graphify-out/.graphify_analysis.json


Fichier diff supprimé car celui-ci est trop grand
+ 169 - 155
web-admin/graphify-out/.graphify_extract.json


+ 111 - 101
web-admin/graphify-out/GRAPH_REPORT.md

@@ -1,11 +1,11 @@
-# Graph Report - src  (2026-06-14)
+# Graph Report - src  (2026-06-15)
 
 ## Corpus Check
-- Large corpus: 726 files · ~504,214 words. Semantic extraction will be expensive (many Claude tokens). Consider running on a subfolder, or use --no-semantic to run AST-only.
+- Large corpus: 729 files · ~509,555 words. Semantic extraction will be expensive (many Claude tokens). Consider running on a subfolder, or use --no-semantic to run AST-only.
 
 ## Summary
-- 2339 nodes · 3155 edges · 48 communities detected
-- Extraction: 78% EXTRACTED · 22% INFERRED · 0% AMBIGUOUS · INFERRED: 708 edges (avg confidence: 0.8)
+- 2373 nodes · 3234 edges · 50 communities detected
+- Extraction: 77% EXTRACTED · 23% INFERRED · 0% AMBIGUOUS · INFERRED: 728 edges (avg confidence: 0.8)
 - Token cost: 0 input · 0 output
 
 ## Community Hubs (Navigation)
@@ -41,28 +41,30 @@
 - [[_COMMUNITY_Community 29|Community 29]]
 - [[_COMMUNITY_Community 30|Community 30]]
 - [[_COMMUNITY_Community 31|Community 31]]
-- [[_COMMUNITY_Community 33|Community 33]]
+- [[_COMMUNITY_Community 32|Community 32]]
 - [[_COMMUNITY_Community 34|Community 34]]
-- [[_COMMUNITY_Community 35|Community 35]]
+- [[_COMMUNITY_Community 36|Community 36]]
 - [[_COMMUNITY_Community 37|Community 37]]
 - [[_COMMUNITY_Community 38|Community 38]]
 - [[_COMMUNITY_Community 39|Community 39]]
 - [[_COMMUNITY_Community 40|Community 40]]
 - [[_COMMUNITY_Community 41|Community 41]]
+- [[_COMMUNITY_Community 42|Community 42]]
 - [[_COMMUNITY_Community 43|Community 43]]
 - [[_COMMUNITY_Community 45|Community 45]]
 - [[_COMMUNITY_Community 46|Community 46]]
 - [[_COMMUNITY_Community 48|Community 48]]
-- [[_COMMUNITY_Community 50|Community 50]]
+- [[_COMMUNITY_Community 49|Community 49]]
 - [[_COMMUNITY_Community 51|Community 51]]
-- [[_COMMUNITY_Community 54|Community 54]]
+- [[_COMMUNITY_Community 53|Community 53]]
 - [[_COMMUNITY_Community 56|Community 56]]
+- [[_COMMUNITY_Community 58|Community 58]]
 
 ## God Nodes (most connected - your core abstractions)
-1. `get()` - 253 edges
+1. `get()` - 259 edges
 2. `push()` - 50 edges
 3. `WebSocketClient` - 26 edges
-4. `emit()` - 20 edges
+4. `emit()` - 21 edges
 5. `MenuProcessor` - 16 edges
 6. `VersionManager` - 15 edges
 7. `handleDynamicRoutes()` - 15 edges
@@ -71,159 +73,159 @@
 10. `TableCache` - 14 edges
 
 ## Surprising Connections (you probably didn't know these)
-- `handleBatchDelete()` --calls--> `withFullscreenLoading()`  [INFERRED]
-  views/basic-info/customer/index.vue → utils/fullscreen-loading.ts
-- `handleDownloadAttachment()` --calls--> `downloadAttachmentFile()`  [INFERRED]
-  views/pilot-service/infusion-schedule-management/InfusionScheduleHandoverDialog.vue → utils/download-attachment.ts
 - `subscribeTokenRefresh()` --calls--> `push()`  [INFERRED]
   utils/http/index.ts → views/operations/storage-facility/index.vue
 - `fetchLeaveList()` --calls--> `get()`  [INFERRED]
   api/leave.ts → views/production/process/ProcessRouteTab.vue
 - `fetchLeaveDetail()` --calls--> `get()`  [INFERRED]
   api/leave.ts → views/production/process/ProcessRouteTab.vue
+- `fetchSampleReceptionCheckItemList()` --calls--> `get()`  [INFERRED]
+  api/sample-reception-check-item.ts → views/production/process/ProcessRouteTab.vue
+- `fetchConsumableList()` --calls--> `get()`  [INFERRED]
+  api/production.ts → views/production/process/ProcessRouteTab.vue
 
 ## Communities
 
 ### Community 0 - "Community 0"
 Cohesion: 0.01
-Nodes (132): fetchAccessLogList(), fetchActiveRegions(), fetchCategoryList(), fetchCategoryParameters(), fetchCellProductPriceList(), fetchCellProductSpecList(), fetchCellProductTypeList(), fetchCellSampleTypeList() (+124 more)
+Nodes (136): fetchAccessLogList(), fetchActiveRegions(), fetchCategoryList(), fetchCategoryParameters(), fetchCellProductPriceList(), fetchCellProductSpecList(), fetchCellProductTypeList(), fetchCellSampleTypeList() (+128 more)
 
 ### Community 1 - "Community 1"
-Cohesion: 0.03
-Nodes (83): batchSavePilotCheckup(), deletePilotCheckupActualItem(), fetchCheckupInstitutionPackageDetail(), fetchCheckupInstitutionPackages(), fetchPilotCheckupActualItems(), fetchPilotCheckupDetail(), fetchPilotCheckupReserveItems(), markPilotCheckupChecked() (+75 more)
-
-### Community 2 - "Community 2"
 Cohesion: 0.02
 Nodes (42): fetchAllConsumablePacks(), fetchAllConsumables(), fetchAllConsumableStockLogs(), fetchAllEquipments(), fetchAllOutputTypes(), fetchAllProcessCategories(), fetchAllProcesses(), fetchAllReagents() (+34 more)
 
-### Community 3 - "Community 3"
+### Community 2 - "Community 2"
 Cohesion: 0.03
-Nodes (54): fetchCheckupInstitutionInvoices(), fetchCheckupInstitutionList(), fetchCheckupInstitutionProjects(), fetchCreateCheckupInstitution(), fetchCreateCheckupInstitutionInvoice(), fetchCreateCheckupInstitutionProject(), fetchUpdateCheckupInstitution(), fetchUpdateCheckupInstitutionInvoice() (+46 more)
+Nodes (55): fetchCheckupInstitutionInvoices(), fetchCheckupInstitutionList(), fetchCheckupInstitutionProjects(), fetchCreateCheckupInstitution(), fetchCreateCheckupInstitutionInvoice(), fetchCreateCheckupInstitutionProject(), fetchUpdateCheckupInstitution(), fetchUpdateCheckupInstitutionInvoice() (+47 more)
 
-### Community 4 - "Community 4"
+### Community 3 - "Community 3"
 Cohesion: 0.04
-Nodes (65): fetchUploadAttachment(), FireworkSystem, reload(), handleReportUpload(), handleReportUpload(), walk(), formatHandoverUserLabel(), formatNowDatetime() (+57 more)
+Nodes (74): batchSavePilotCheckup(), deletePilotCheckupActualItem(), fetchCheckupInstitutionPackageDetail(), fetchCheckupInstitutionPackages(), fetchPilotCheckupActualItems(), fetchPilotCheckupDetail(), fetchPilotCheckupReserveItems(), markPilotCheckupChecked() (+66 more)
+
+### Community 4 - "Community 4"
+Cohesion: 0.03
+Nodes (37): fetchAttachmentDownloadUrl(), handleDownloadAttachment(), deep(), fullFileUrl(), handleDownloadAttachment(), handlePreviewAttachment(), isVideoFile(), handleReceptionAttachmentDownload() (+29 more)
 
 ### Community 5 - "Community 5"
 Cohesion: 0.03
-Nodes (38): fetchAttachmentDownloadUrl(), deep(), fullFileUrl(), handleDownloadAttachment(), handlePreviewAttachment(), isVideoFile(), formatTempEmptyField(), handleReceptionAttachmentDownload() (+30 more)
+Nodes (46): handleBlur(), handleFocus(), handleInput(), fetchEthnicList(), fetchDeleteQcMaterialBatch(), fetchQcMaterialBatchList(), fetchQcMaterialBatchOptions(), fetchQcMaterialList() (+38 more)
 
 ### Community 6 - "Community 6"
 Cohesion: 0.04
-Nodes (47): fetchMyProductionTasks(), fetchMyQcTaskList(), fetchQcTaskDetail(), fetchQcTaskList(), buildWorkOrderSearchFilters(), handleReset(), handleSearch(), handleTabChange() (+39 more)
+Nodes (30): fetchGetUserInfo(), ComponentLoader, IframeRouteManager, RouteRegistry, RouteTransformer, useCommon(), setupAfterEachGuard(), closeLoading() (+22 more)
 
 ### Community 7 - "Community 7"
-Cohesion: 0.04
-Nodes (30): fetchGetUserInfo(), ComponentLoader, IframeRouteManager, RouteRegistry, RouteTransformer, useCommon(), setupAfterEachGuard(), closeLoading() (+22 more)
+Cohesion: 0.05
+Nodes (53): fetchUploadAttachment(), FireworkSystem, reload(), handleReportUpload(), handleReportUpload(), walk(), handleMenuJump(), openExternalLink() (+45 more)
 
 ### Community 8 - "Community 8"
 Cohesion: 0.05
 Nodes (17): fetchGetAllUpgradeLogs(), fetchGetChinaMapData(), fetchGetComments(), fetchGetCurrentVersion(), fetchGetLatestUpgradeLog(), fetchGetSystemConfig(), fetchGetUpgradeLogs(), getDefaultLanguage() (+9 more)
 
 ### Community 9 - "Community 9"
-Cohesion: 0.05
-Nodes (32): fetchClinicalPaymentDetail(), fetchClinicalPayments(), fetchClinicalReceiptConfirmed(), fetchClinicalReceiptPending(), fetchClinicalRefundConfirmed(), fetchClinicalRefundPending(), fetchOrderAdjusts(), fetchOrderDetail() (+24 more)
+Cohesion: 0.04
+Nodes (33): fetchMyProductionTasks(), RoutePermissionValidator, for(), set(), walk(), annotateForkEdges(), chainApiToElements(), walkAncestorBranch() (+25 more)
 
 ### Community 10 - "Community 10"
 Cohesion: 0.06
-Nodes (34): fetchCreateCustomer(), fetchCustomerList(), fetchDeleteCustomer(), fetchUpdateCustomer(), updateInfusionScheduleStatus(), fetchCreateProductionWorkOrder(), fetchProductionWorkOrderCellProductOptions(), fetchProductionWorkOrderDetail() (+26 more)
+Nodes (38): completePilotApplication(), deletePilotApplication(), fetchPilotApplicationList(), startPilotApplication(), voidPilotApplication(), fetchClinicalRefundConfirmed(), buildConfirmedParams(), buildPendingParams() (+30 more)
 
 ### Community 11 - "Community 11"
-Cohesion: 0.05
-Nodes (27): handleBlur(), handleFocus(), handleInput(), fetchEthnicList(), formatAmount(), formatAmount(), fmtMoney(), applyDonationBundleToForm() (+19 more)
+Cohesion: 0.07
+Nodes (31): fetchMyQcTaskList(), fetchQcTaskDetail(), fetchQcTaskList(), buildWorkOrderSearchFilters(), handleReset(), handleSearch(), handleTabChange(), handleTypeTabChange() (+23 more)
 
 ### Community 12 - "Community 12"
 Cohesion: 0.05
 Nodes (29): fetchFullmoonTodoList(), fetchUpdateFullmoonTodoInsurance(), fetchCollectionProtocolAuditList(), fetchCollectionProtocolDetail(), fetchCollectionProtocolList(), fetchPaymentDetailList(), fetchReceiptConfirmedList(), fetchReceiptConfirmList() (+21 more)
 
 ### Community 13 - "Community 13"
-Cohesion: 0.07
-Nodes (40): fetchUserList(), fetchAddTaskStep(), fetchCopyTaskStep(), fetchDeleteTaskStep(), fetchForwardProductionTask(), fetchProductionTaskDetail(), fetchProductionTaskList(), fetchReassignProductionTask() (+32 more)
+Cohesion: 0.06
+Nodes (32): fetchCreateCustomer(), fetchCustomerList(), fetchDeleteCustomer(), fetchUpdateCustomer(), updateInfusionScheduleStatus(), fetchCreateProductionWorkOrder(), fetchProductionWorkOrderCellProductOptions(), fetchProductionWorkOrderDetail() (+24 more)
 
 ### Community 14 - "Community 14"
-Cohesion: 0.07
-Nodes (22): fetchGetMenuList(), fetchGetMenuCodes(), fetchLogin(), fetchUpdateProfile(), fetchUploadProfileAvatar(), MenuProcessor, useAppMode(), useAuth() (+14 more)
+Cohesion: 0.06
+Nodes (31): fetchProductionTaskList(), fetchApproveTask(), fetchBusinessAllTasks(), fetchCompletedTasks(), fetchDesignerData(), fetchInstanceDetail(), fetchMyInstances(), fetchPendingTasks() (+23 more)
 
 ### Community 15 - "Community 15"
-Cohesion: 0.06
-Nodes (25): useSettingsHandlers(), useSettingsPanel(), useSettingsState(), RoutePermissionValidator, useCeremony(), useTheme(), walk(), themeAnimation() (+17 more)
+Cohesion: 0.07
+Nodes (22): fetchGetMenuList(), fetchGetMenuCodes(), fetchLogin(), fetchUpdateProfile(), fetchUploadProfileAvatar(), MenuProcessor, useAppMode(), useAuth() (+14 more)
 
 ### Community 16 - "Community 16"
+Cohesion: 0.07
+Nodes (33): fetchUserList(), fetchAddTaskStep(), fetchCopyTaskStep(), fetchDeleteTaskStep(), fetchForwardProductionTask(), fetchProductionTaskDetail(), fetchReassignProductionTask(), fetchReorderTaskSteps() (+25 more)
+
+### Community 17 - "Community 17"
 Cohesion: 0.06
 Nodes (20): fetchCreateMenu(), fetchDeleteMenu(), fetchMenuTree(), fetchUpdateMenu(), collectIds(), postorder(), preorder(), applyTreeExpand() (+12 more)
 
-### Community 17 - "Community 17"
+### Community 18 - "Community 18"
 Cohesion: 0.1
 Nodes (2): WebSocketClient, TableCache
 
-### Community 18 - "Community 18"
+### Community 19 - "Community 19"
 Cohesion: 0.07
 Nodes (21): auditorDisplay(), dash(), expressName(), formatYm(), formatYmd(), sampleTypeName(), siteName(), unitName() (+13 more)
 
-### Community 19 - "Community 19"
+### Community 20 - "Community 20"
 Cohesion: 0.08
 Nodes (33): fetchRefreshToken(), toLogin(), base64ToBytes(), bytesToBase64(), decryptJson(), deriveKey(), encryptJson(), fromBase64Url() (+25 more)
 
-### Community 20 - "Community 20"
-Cohesion: 0.07
-Nodes (13): maskIdCard(), buildBasicExperimentApplicationFields(), buildDefaultApplicationFields(), buildOutboundPilotContextSections(), applicationStatusLabel(), applicationStatusTagType(), infusionMethodLabel(), infusionStatusLabel() (+5 more)
-
 ### Community 21 - "Community 21"
-Cohesion: 0.09
-Nodes (27): completePilotApplication(), deletePilotApplication(), fetchPilotApplicationList(), startPilotApplication(), voidPilotApplication(), handleBatchComplete(), handleBatchStart(), handleBatchVoid() (+19 more)
+Cohesion: 0.08
+Nodes (28): fetchUserOptions(), fetchSampleReceptionCheckItemList(), fetchSampleReceptionCheckItemsActive(), fetchAllocateLabStorageCodes(), fetchSampleReceptionBySampleCode(), fetchSampleReceptionDetail(), fetchSampleReceptionPendingList(), fetchSampleReceptionReceivedList() (+20 more)
 
 ### Community 22 - "Community 22"
-Cohesion: 0.08
-Nodes (15): fetchDeleteMaterialBatch(), fetchMaterialBatchList(), fetchMaterialBatchOptions(), fetchMaterialList(), fetchMaterialOptions(), fetchUpdateMaterialBatch(), fetchMaterialUsageList(), ensureTabMounted() (+7 more)
+Cohesion: 0.07
+Nodes (13): maskIdCard(), buildBasicExperimentApplicationFields(), buildDefaultApplicationFields(), buildOutboundPilotContextSections(), applicationStatusLabel(), applicationStatusTagType(), infusionMethodLabel(), infusionStatusLabel() (+5 more)
 
 ### Community 23 - "Community 23"
 Cohesion: 0.09
-Nodes (13): fetchDeleteQcMaterialBatch(), fetchQcMaterialBatchList(), fetchQcMaterialBatchOptions(), fetchQcMaterialList(), fetchQcMaterialOptions(), fetchUpdateQcMaterialBatch(), ensureTabMounted(), handleDelete() (+5 more)
+Nodes (27): fetchCreateUser(), fetchDeleteUser(), fetchDeptTree(), fetchPostBoundUserIds(), fetchResetPassword(), fetchUpdateUser(), fetchUserDetail(), collectAllPostBindDeptIds() (+19 more)
 
 ### Community 24 - "Community 24"
-Cohesion: 0.13
-Nodes (20): fetchCreateUser(), fetchDeleteUser(), fetchResetPassword(), fetchUpdateUser(), fetchUserDetail(), formatUserDeptDisplay(), handleAdd(), handleBatchDelete() (+12 more)
+Cohesion: 0.08
+Nodes (16): fetchDeleteMaterialBatch(), fetchMaterialBatchList(), fetchMaterialBatchOptions(), fetchMaterialList(), fetchMaterialOptions(), fetchUpdateMaterialBatch(), fetchMaterialUsageList(), fetchMyMaterialUsageList() (+8 more)
 
 ### Community 25 - "Community 25"
 Cohesion: 0.12
 Nodes (15): addCopyButton(), highlightCode(), insertLineNumbers(), isBlockProcessed(), markBlockAsProcessed(), processBlock(), setupHighlightDirective(), setupRippleDirective() (+7 more)
 
 ### Community 26 - "Community 26"
-Cohesion: 0.12
-Nodes (12): fetchApproveTask(), fetchBusinessAllTasks(), fetchCompletedTasks(), fetchDesignerData(), fetchInstanceDetail(), fetchMyInstances(), fetchPendingTasks(), fetchProcessDefList() (+4 more)
-
-### Community 27 - "Community 27"
 Cohesion: 0.16
 Nodes (14): fetchCreateEnvDetectItem(), fetchDeleteEnvDetectItem(), fetchEnvDetectItemDetail(), fetchEnvDetectItemList(), fetchEnvDetectItemsActive(), fetchUpdateEnvDetectItem(), handleAdd(), handleBatchDelete() (+6 more)
 
-### Community 28 - "Community 28"
+### Community 27 - "Community 27"
 Cohesion: 0.13
 Nodes (5): canDeleteWorkOrder(), canDispatchTask(), formatTempEmptyField(), hasMoreActions(), shouldShowTempEmptyField()
 
-### Community 29 - "Community 29"
+### Community 28 - "Community 28"
 Cohesion: 0.16
 Nodes (10): useTable(), useTableImpl(), getColumnChecks(), useTableColumns(), createErrorHandler(), createSmartDebounce(), defaultResponseAdapter(), extractPagination() (+2 more)
 
+### Community 29 - "Community 29"
+Cohesion: 0.18
+Nodes (10): fetchClinicalReceiptConfirmed(), buildConfirmedParams(), buildPendingParams(), handleConfirmedReset(), handleConfirmedSearch(), handlePendingReset(), handlePendingSearch(), loadAll() (+2 more)
+
 ### Community 30 - "Community 30"
 Cohesion: 0.27
 Nodes (14): useChart(), useChartComponent(), useChartOps(), colourBlend(), getCssVar(), getDarkColor(), getLightColor(), handleElementThemeColor() (+6 more)
 
 ### Community 31 - "Community 31"
+Cohesion: 0.14
+Nodes (8): useSettingsHandlers(), useSettingsPanel(), useSettingsState(), useCeremony(), useTheme(), themeAnimation(), toggleTheme(), toggleTransition()
+
+### Community 32 - "Community 32"
 Cohesion: 0.17
 Nodes (6): fetchServiceOrderTxnList(), handleReset(), handleSearch(), handleTabChange(), loadData(), switchTab()
 
-### Community 33 - "Community 33"
-Cohesion: 0.15
-Nodes (4): fetchEnvDetectRecordDetail(), fetchEnvDetectRecordList(), fetchQcThirdPartyCompanyList(), fetchQcThirdPartyCompanyOptions()
-
 ### Community 34 - "Community 34"
-Cohesion: 0.17
-Nodes (3): fetchResearchDonationAuditList(), fetchResearchDonationDetail(), fetchResearchDonationList()
-
-### Community 35 - "Community 35"
 Cohesion: 0.25
 Nodes (2): handleTouchEnd(), setTransition()
 
+### Community 36 - "Community 36"
+Cohesion: 0.28
+Nodes (4): fetchMyProductionMaterialConsumptions(), handleReset(), handleSearch(), loadData()
+
 ### Community 37 - "Community 37"
 Cohesion: 0.39
 Nodes (6): isIgnorableScriptError(), normalizeErrorMessage(), registerPromiseErrorHandler(), registerResourceErrorHandler(), scriptErrorHandler(), setupErrorHandle()
@@ -233,91 +235,99 @@ Cohesion: 0.36
 Nodes (1): TableHeightCalculator
 
 ### Community 39 - "Community 39"
+Cohesion: 0.25
+Nodes (3): fetchMaterialStockCheckDetail(), fetchMaterialStockCheckList(), fetchMaterialStockCheckRequisitions()
+
+### Community 40 - "Community 40"
+Cohesion: 0.25
+Nodes (3): fetchQcMaterialStockCheckDetail(), fetchQcMaterialStockCheckList(), fetchQcMaterialStockCheckRequisitions()
+
+### Community 41 - "Community 41"
 Cohesion: 0.33
 Nodes (2): logApiCryptoBootInfo(), maskSecret()
 
-### Community 40 - "Community 40"
+### Community 42 - "Community 42"
 Cohesion: 0.29
 Nodes (2): fetchLeaveDetail(), fetchLeaveList()
 
-### Community 41 - "Community 41"
+### Community 43 - "Community 43"
 Cohesion: 0.47
 Nodes (3): isPaymentDueWithinWarnWindow(), parsePaymentDueYmd(), startOfLocalDay()
 
-### Community 43 - "Community 43"
+### Community 45 - "Community 45"
 Cohesion: 0.33
 Nodes (2): fetchQcThirdPartyItemList(), fetchQcThirdPartyItemsActive()
 
-### Community 45 - "Community 45"
+### Community 46 - "Community 46"
+Cohesion: 0.33
+Nodes (2): fetchQcThirdPartyCompanyList(), fetchQcThirdPartyCompanyOptions()
+
+### Community 48 - "Community 48"
 Cohesion: 0.5
 Nodes (2): formatProtocolDocDeleteConfirm(), formatProtocolDocSubject()
 
-### Community 46 - "Community 46"
+### Community 49 - "Community 49"
 Cohesion: 0.5
 Nodes (2): focusInput(), handleKeydown()
 
-### Community 48 - "Community 48"
+### Community 51 - "Community 51"
 Cohesion: 0.67
 Nodes (2): if(), logSidebarMenu()
 
-### Community 50 - "Community 50"
-Cohesion: 0.5
-Nodes (1): fetchStorageEntrySmsList()
-
-### Community 51 - "Community 51"
+### Community 53 - "Community 53"
 Cohesion: 0.5
 Nodes (1): fetchSampleSmsNotificationList()
 
-### Community 54 - "Community 54"
+### Community 56 - "Community 56"
 Cohesion: 1.0
 Nodes (2): getSettingDefaults(), resetToDefaults()
 
-### Community 56 - "Community 56"
+### Community 58 - "Community 58"
 Cohesion: 1.0
 Nodes (2): copyTextToClipboard(), copyTextWithFallback()
 
 ## Knowledge Gaps
-- **Thin community `Community 17`** (42 nodes): `WebSocketClient`, `.calculateReconnectDelay()`, `.clearAllTimers()`, `.clearConnectionTimers()`, `.clearTimer()`, `.close()`, `.closeCurrentSocketForReconnect()`, `.connect()`, `.connectionStatusText()`, `.constructor()`, `.destroyInstance()`, `.flushMessageQueue()`, `.getInstance()`, `.getReadyStateText()`, `.handleClose()`, `.handleConnectionTimeout()`, `.handleError()`, `.handleMessage()`, `.handleOpen()`, `.init()`, `.isWebSocketConnected()`, `.reconnect()`, `.resetHeartbeat()`, `.send()`, `.startHeartbeat()`, `.startPing()`, `TableCache`, `.cleanupExpired()`, `.clear()`, `.clearByTags()`, `.clearCurrentSearch()`, `.clearPagination()`, `.constructor()`, `.evictLRU()`, `.generateKey()`, `.generateTags()`, `.get()`, `.getStats()`, `.log()`, `.set()`, `index.ts`, `tableCache.ts`
+- **Thin community `Community 18`** (42 nodes): `WebSocketClient`, `.calculateReconnectDelay()`, `.clearAllTimers()`, `.clearConnectionTimers()`, `.clearTimer()`, `.close()`, `.closeCurrentSocketForReconnect()`, `.connect()`, `.connectionStatusText()`, `.constructor()`, `.destroyInstance()`, `.flushMessageQueue()`, `.getInstance()`, `.getReadyStateText()`, `.handleClose()`, `.handleConnectionTimeout()`, `.handleError()`, `.handleMessage()`, `.handleOpen()`, `.init()`, `.isWebSocketConnected()`, `.reconnect()`, `.resetHeartbeat()`, `.send()`, `.startHeartbeat()`, `.startPing()`, `TableCache`, `.cleanupExpired()`, `.clear()`, `.clearByTags()`, `.clearCurrentSearch()`, `.clearPagination()`, `.constructor()`, `.evictLRU()`, `.generateKey()`, `.generateTags()`, `.get()`, `.getStats()`, `.log()`, `.set()`, `index.ts`, `tableCache.ts`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 35`** (9 nodes): `cleanupEventListeners()`, `handleTouchEnd()`, `handleTouchMove()`, `handleTouchStart()`, `handleWheelScroll()`, `if()`, `setTransition()`, `setupEventListeners()`, `index.vue`
+- **Thin community `Community 34`** (9 nodes): `cleanupEventListeners()`, `handleTouchEnd()`, `handleTouchMove()`, `handleTouchStart()`, `handleWheelScroll()`, `if()`, `setTransition()`, `setupEventListeners()`, `index.vue`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
 - **Thin community `Community 38`** (8 nodes): `TableHeightCalculator`, `.calculate()`, `.calculateOffset()`, `.calculatePaginationOffset()`, `.constructor()`, `.getHeaderHeight()`, `useTableHeight()`, `useTableHeight.ts`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 39`** (7 nodes): `App.vue`, `main.ts`, `refreshButtonAutoIcons()`, `refreshPanelTitleIcons()`, `logApiCryptoBootInfo()`, `maskSecret()`, `console.ts`
+- **Thin community `Community 41`** (7 nodes): `App.vue`, `main.ts`, `refreshButtonAutoIcons()`, `refreshPanelTitleIcons()`, `logApiCryptoBootInfo()`, `maskSecret()`, `console.ts`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 40`** (7 nodes): `fetchCreateLeave()`, `fetchDeleteLeave()`, `fetchLeaveDetail()`, `fetchLeaveList()`, `fetchSubmitLeave()`, `fetchUpdateLeave()`, `leave.ts`
+- **Thin community `Community 42`** (7 nodes): `fetchCreateLeave()`, `fetchDeleteLeave()`, `fetchLeaveDetail()`, `fetchLeaveList()`, `fetchSubmitLeave()`, `fetchUpdateLeave()`, `leave.ts`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 43`** (6 nodes): `fetchCreateQcThirdPartyItem()`, `fetchDeleteQcThirdPartyItem()`, `fetchQcThirdPartyItemList()`, `fetchQcThirdPartyItemsActive()`, `fetchUpdateQcThirdPartyItem()`, `qc-third-party-item.ts`
+- **Thin community `Community 45`** (6 nodes): `fetchCreateQcThirdPartyItem()`, `fetchDeleteQcThirdPartyItem()`, `fetchQcThirdPartyItemList()`, `fetchQcThirdPartyItemsActive()`, `fetchUpdateQcThirdPartyItem()`, `qc-third-party-item.ts`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 45`** (5 nodes): `formatProtocolDocBatchDeleteConfirm()`, `formatProtocolDocDeleteConfirm()`, `formatProtocolDocSubject()`, `getProtocolDocTypeLabel()`, `protocol-doc-label.ts`
+- **Thin community `Community 46`** (6 nodes): `fetchCreateQcThirdPartyCompany()`, `fetchDeleteQcThirdPartyCompany()`, `fetchQcThirdPartyCompanyList()`, `fetchQcThirdPartyCompanyOptions()`, `fetchUpdateQcThirdPartyCompany()`, `qc-third-party-company.ts`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 46`** (5 nodes): `focusInput()`, `handleKeydown()`, `if()`, `search()`, `index.vue`
+- **Thin community `Community 48`** (5 nodes): `formatProtocolDocBatchDeleteConfirm()`, `formatProtocolDocDeleteConfirm()`, `formatProtocolDocSubject()`, `getProtocolDocTypeLabel()`, `protocol-doc-label.ts`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 48`** (4 nodes): `if()`, `logSidebarMenu()`, `index.vue`, `SidebarSubmenu.vue`
+- **Thin community `Community 49`** (5 nodes): `focusInput()`, `handleKeydown()`, `if()`, `search()`, `index.vue`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 50`** (4 nodes): `fetchGenerateStorageEntrySms()`, `fetchStorageEntrySmsList()`, `fetchToggleStorageEntrySmsNotified()`, `storage-entry-sms-notification.ts`
+- **Thin community `Community 51`** (4 nodes): `if()`, `logSidebarMenu()`, `index.vue`, `SidebarSubmenu.vue`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 51`** (4 nodes): `fetchGenerateSms()`, `fetchSampleSmsNotificationList()`, `fetchToggleSmsNotified()`, `sample-sms-notification.ts`
+- **Thin community `Community 53`** (4 nodes): `fetchGenerateSms()`, `fetchSampleSmsNotificationList()`, `fetchToggleSmsNotified()`, `sample-sms-notification.ts`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 54`** (3 nodes): `getSettingDefaults()`, `resetToDefaults()`, `setting.ts`
+- **Thin community `Community 56`** (3 nodes): `getSettingDefaults()`, `resetToDefaults()`, `setting.ts`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 56`** (3 nodes): `copyTextToClipboard()`, `copyTextWithFallback()`, `copy-text.ts`
+- **Thin community `Community 58`** (3 nodes): `copyTextToClipboard()`, `copyTextWithFallback()`, `copy-text.ts`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
 
 ## Suggested Questions
 _Questions this graph is uniquely positioned to answer:_
 
-- **Why does `get()` connect `Community 0` to `Community 1`, `Community 2`, `Community 3`, `Community 4`, `Community 6`, `Community 7`, `Community 8`, `Community 9`, `Community 10`, `Community 11`, `Community 12`, `Community 13`, `Community 14`, `Community 15`, `Community 16`, `Community 21`, `Community 22`, `Community 23`, `Community 24`, `Community 26`, `Community 27`, `Community 31`, `Community 33`, `Community 34`, `Community 40`, `Community 43`, `Community 50`, `Community 51`?**
-  _High betweenness centrality (0.356) - this node is a cross-community bridge._
-- **Why does `push()` connect `Community 4` to `Community 0`, `Community 1`, `Community 2`, `Community 3`, `Community 5`, `Community 6`, `Community 8`, `Community 11`, `Community 12`, `Community 15`, `Community 17`, `Community 19`, `Community 20`, `Community 21`?**
-  _High betweenness centrality (0.156) - this node is a cross-community bridge._
-- **Why does `groupMineTasksByWorkOrder()` connect `Community 6` to `Community 0`, `Community 4`?**
-  _High betweenness centrality (0.031) - this node is a cross-community bridge._
-- **Are the 252 inferred relationships involving `get()` (e.g. with `buildNodeCodePathFromFlat()` and `collectLeafFacilityNodesInTreeOrder()`) actually correct?**
-  _`get()` has 252 INFERRED edges - model-reasoned connections that need verification._
+- **Why does `get()` connect `Community 0` to `Community 1`, `Community 2`, `Community 3`, `Community 5`, `Community 6`, `Community 7`, `Community 8`, `Community 9`, `Community 10`, `Community 11`, `Community 12`, `Community 13`, `Community 14`, `Community 15`, `Community 16`, `Community 17`, `Community 21`, `Community 23`, `Community 24`, `Community 26`, `Community 29`, `Community 32`, `Community 36`, `Community 39`, `Community 40`, `Community 42`, `Community 45`, `Community 46`, `Community 53`?**
+  _High betweenness centrality (0.369) - this node is a cross-community bridge._
+- **Why does `push()` connect `Community 7` to `Community 0`, `Community 1`, `Community 2`, `Community 3`, `Community 4`, `Community 5`, `Community 8`, `Community 9`, `Community 10`, `Community 11`, `Community 12`, `Community 16`, `Community 18`, `Community 20`, `Community 22`, `Community 23`?**
+  _High betweenness centrality (0.154) - this node is a cross-community bridge._
+- **Why does `groupMineTasksByWorkOrder()` connect `Community 11` to `Community 0`, `Community 9`, `Community 7`?**
+  _High betweenness centrality (0.035) - this node is a cross-community bridge._
+- **Are the 258 inferred relationships involving `get()` (e.g. with `buildNodeCodePathFromFlat()` and `collectLeafFacilityNodesInTreeOrder()`) actually correct?**
+  _`get()` has 258 INFERRED edges - model-reasoned connections that need verification._
 - **Are the 49 inferred relationships involving `push()` (e.g. with `collectLeafFacilityNodesInTreeOrder()` and `groupMineTasksByWorkOrder()`) actually correct?**
   _`push()` has 49 INFERRED edges - model-reasoned connections that need verification._
-- **Are the 19 inferred relationships involving `emit()` (e.g. with `handleSubmit()` and `handleBlur()`) actually correct?**
-  _`emit()` has 19 INFERRED edges - model-reasoned connections that need verification._
+- **Are the 20 inferred relationships involving `emit()` (e.g. with `handleSubmit()` and `handleBlur()`) actually correct?**
+  _`emit()` has 20 INFERRED edges - model-reasoned connections that need verification._
 - **Should `Community 0` be split into smaller, more focused modules?**
   _Cohesion score 0.01 - nodes in this community are weakly interconnected._

Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
web-admin/graphify-out/graph.html


Fichier diff supprimé car celui-ci est trop grand
+ 112 - 112
web-admin/graphify-out/graph.json


+ 24 - 21
web-admin/graphify-out/manifest.json

@@ -17,8 +17,8 @@
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/types/common/index.ts": 1781272556.3597305,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/types/directive/directive.d.ts": 1781272556.3601494,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/types/api/api.d.ts": 1781272556.3606477,
-  "/Users/wuzilong/work/00code/zkxw/web-admin/src/types/import/components.d.ts": 1781445674.8841329,
-  "/Users/wuzilong/work/00code/zkxw/web-admin/src/types/import/auto-imports.d.ts": 1781445566.5112755,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/types/import/components.d.ts": 1781511787.87359,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/types/import/auto-imports.d.ts": 1781510903.3424032,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/types/store/index.ts": 1781272556.364766,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/types/router/index.ts": 1781272556.3652694,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/locales/index.ts": 1781272556.3657222,
@@ -217,18 +217,18 @@
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/hooks/core/useAppMode.ts": 1781272556.6535022,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/leave.ts": 1781272556.654047,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/sample-reception-check-item.ts": 1781272556.654672,
-  "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/production.ts": 1781347256.7560632,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/production.ts": 1781497438.3206656,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/infusion-schedule-handover.ts": 1781272556.6558568,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/outbound-release-review.ts": 1781272556.6563854,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-third-party-item.ts": 1781272556.6567156,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/env-detect-record.ts": 1781272556.6569912,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/storage-release-review.ts": 1781272556.6573966,
-  "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/production-material.ts": 1781427297.7966492,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/production-material.ts": 1781510846.4290047,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/workflow.ts": 1781272556.6579714,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/production-work-order.ts": 1781337826.360091,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-task-result.ts": 1781272556.6589992,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/protocol-sample-collection.ts": 1781272556.659353,
-  "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/material-usage.ts": 1781427278.4679782,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/material-usage.ts": 1781503317.6165462,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-third-party-company.ts": 1781415389.1483624,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/collection-protocol.ts": 1781272556.6603115,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/chinaRegion.ts": 1781272556.6606348,
@@ -252,11 +252,12 @@
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-sms-notification.ts": 1781272556.670129,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/system.ts": 1781272556.6705966,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/material.ts": 1781346022.817811,
-  "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/sample-reception.ts": 1781272556.6715863,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/sample-reception.ts": 1781496419.5874305,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/auth.ts": 1781272556.6719868,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-work-order.ts": 1781272556.672629,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/auth/login/index.vue": 1781272556.6735966,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/cell-storage/refund-confirm/index.vue": 1781272556.6742516,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/cell-storage/my-material-usage/index.vue": 1781504788.5377169,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/cell-storage/protocol/index.vue": 1781272556.6752698,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/cell-storage/protocol/ProtocolStatusChangeDialog.vue": 1781440943.514069,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/cell-storage/protocol/ProtocolViewDialog.vue": 1781439724.4105198,
@@ -277,7 +278,7 @@
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/cell-storage/protocol-audit/ProtocolAuditTab.vue": 1781438840.3568094,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/cell-storage/protocol-audit/PaymentInfoTab.vue": 1781439723.9956412,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/cell-storage/material/index.vue": 1781428227.730085,
-  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/cell-storage/material/MaterialUsageTab.vue": 1781434596.3762143,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/cell-storage/material/MaterialUsageTab.vue": 1781503550.8574874,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/cell-storage/material/MaterialStockCheckTab.vue": 1781427008.997709,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/cell-storage/fullmoon-todo/index.vue": 1781272556.719875,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/cell-storage/storage-entry-info/index.vue": 1781272556.7201529,
@@ -332,18 +333,19 @@
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/cell-product/source-chain/ChainNodeCard.vue": 1781272556.8073688,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/cell-product/source-chain/SampleCustomerViewDialog.vue": 1781272556.8079684,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/cell-product/source-chain/chainToFlow.ts": 1781272556.808583,
-  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/my-production-material-usage/index.vue": 1781342081.9744387,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/my-production-material-usage/index.vue": 1781502903.1109588,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/process-route/index.vue": 1781272556.8092766,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/sop/index.vue": 1781272556.8117788,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-task/index.vue": 1781272556.812188,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/reagent/index.vue": 1781434562.5209718,
-  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-work-order/index.vue": 1781446273.2707999,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-work-order/index.vue": 1781496490.9739516,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-work-order/useTaskStepEditor.ts": 1781435130.1976979,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-work-order/StepDetailPanel.vue": 1781344344.3253489,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-work-order/CompleteProductionTaskDialog.vue": 1781272556.8251057,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-work-order/TaskInputEnhancedTable.vue": 1781272556.8264909,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-work-order/DispatchQcWorkOrderDialog.vue": 1781272556.8274932,
-  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-work-order/ProductionWorkOrderViewDialogHost.vue": 1781447169.5003886,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-work-order/ProductionWorkOrderViewDialogHost.vue": 1781447171.0946243,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-work-order/SampleReceptionDialog.vue": 1781496401.5875661,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-work-order/TaskExecutionDialog.vue": 1781435123.291646,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-work-order/useProductionWorkOrderViewDialog.ts": 1781447123.1291173,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-work-order/EditTaskInfoDialog.vue": 1781272556.829831,
@@ -351,19 +353,20 @@
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-work-order/DispatchTaskDialog.vue": 1781434148.9939759,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-work-order/WorkOrderTaskSubList.vue": 1781447160.1060133,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-work-order/TaskOutputProductDialog.vue": 1781435105.1377175,
-  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-work-order/ProductionWorkOrderCardList.vue": 1781446864.4127054,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-work-order/ProductionWorkOrderCardList.vue": 1781496213.357761,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-work-order/ForwardTaskDialog.vue": 1781434176.385742,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/consumable-pack/index.vue": 1781272556.8373108,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/consumable/index.vue": 1781434582.9270136,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/consumable/ConsumablePackTab.vue": 1781272556.843478,
-  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/cleanroom-garment/index.vue": 1781428947.335528,
-  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-material/index.vue": 1781428224.279656,
-  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-material/ProductionMaterialConfiguredCatalogDialog.vue": 1781434698.0973995,
-  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-material/ProductionMaterialUsageTab.vue": 1781434687.1727202,
-  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-material/ProductionMaterialStockCheckTab.vue": 1781427297.7967196,
-  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-material/ProductionMaterialPrepTab.vue": 1781434708.4931104,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/cleanroom-garment/index.vue": 1781505974.110389,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-material/index.vue": 1781513822.5684087,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-material/MaterialConsumptionTab.vue": 1781502903.0563822,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-material/ProductionMaterialConfiguredCatalogDialog.vue": 1781498587.3288593,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-material/ProductionMaterialUsageTab.vue": 1781513793.4925437,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-material/ProductionMaterialStockCheckTab.vue": 1781508293.4167504,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-material/ProductionMaterialPrepTab.vue": 1781513807.0808678,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/sample-reception-completion/index.vue": 1781272556.844081,
-  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/my-production-task/index.vue": 1781447141.2915936,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/my-production-task/index.vue": 1781496526.058609,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/equipment/index.vue": 1781333185.7518337,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/process/index.vue": 1781428200.5972042,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/process/ProcessRouteTab.vue": 1781434724.8148994,
@@ -386,7 +389,7 @@
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/my-qc-material-usage/index.vue": 1781272556.8766735,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-material/index.vue": 1781428220.650536,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-material/QcMaterialStockCheckTab.vue": 1781426589.988749,
-  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-material/QcMaterialUsageTab.vue": 1781434615.7479022,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-material/QcMaterialUsageTab.vue": 1781502216.804944,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/sample-reception/index.vue": 1781442834.0948162,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/sample-reception/SampleReceptionCardList.vue": 1781443605.4642458,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/my-qc-task/index.vue": 1781445892.5868676,
@@ -466,12 +469,12 @@
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/router/core/RouteTransformer.ts": 1781272559.268035,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/router/core/RouteValidator.ts": 1781272559.27879,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/router/core/ComponentLoader.ts": 1781272559.4059796,
-  "/Users/wuzilong/work/00code/zkxw/web-admin/src/router/core/MenuProcessor.ts": 1781364948.4867418,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/router/core/MenuProcessor.ts": 1781496625.5996523,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/router/core/RouteRegistry.ts": 1781272559.4170945,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/router/core/RoutePermissionValidator.ts": 1781272559.4235668,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/router/core/index.ts": 1781272559.424284,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/router/core/IframeRouteManager.ts": 1781272559.425215,
-  "/Users/wuzilong/work/00code/zkxw/web-admin/src/router/modules/sqxp.ts": 1781347657.6488008,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/router/modules/sqxp.ts": 1781504789.9699595,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/router/modules/index.ts": 1781272559.5419338,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/router/modules/exception.ts": 1781272559.549901,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/router/routes/staticRoutes.ts": 1781272559.596198,

+ 130 - 1
web-admin/src/api/production-material.ts

@@ -154,6 +154,10 @@ export type ProductionMaterialUsage = {
   requisitionReceiverName?: string
   productionTaskId: string
   productionTaskNo: string
+  taskNo?: string
+  prepId?: string
+  prepNo?: string
+  configuredMaterialName?: string
   receiver?: string
   purpose?: string
   useTime?: string
@@ -415,7 +419,7 @@ export function fetchProductionMaterialRequisitionOptions(params?: {
 
 export function fetchProductionMaterialLinkedStepUsages(parentUsageId: string) {
   return request.get<ProductionMaterialUsage[]>({
-    url: `/web/admin/production-material-requisitions/${parentUsageId}/step-usages`
+    url: `/web/admin/production-material-usages/${parentUsageId}/linked-step-usages`
   })
 }
 
@@ -551,6 +555,12 @@ export type ProductionMaterialPrep = {
   outputQty: number
   outputUnit: string
   batchNo: string
+  specModel?: string
+  catalogNo?: string
+  manufacturer?: string
+  stockInDate?: string
+  unitPrice?: number | null
+  amount?: number | null
   storageLocation?: string
   expireDate: string
   stockInNo: string
@@ -612,3 +622,122 @@ export function fetchDeleteProductionMaterialPrep(id: string) {
     url: `/web/admin/production-material-preps/${id}`
   })
 }
+
+export type QuickPrepLine = {
+  requisitionUsageId: string
+  componentMaterialId: string
+  componentMaterialType: string
+  batchId?: string
+  consumptionQty: number
+  usageUnit?: string
+  remark?: string
+}
+
+export type QuickPrepPayload = {
+  configuredMaterialName: string
+  outputQty: number
+  lines: QuickPrepLine[]
+  specModel?: string
+  outputUnit?: string
+  stockInNo?: string
+  stockInDate?: string
+  catalogNo?: string
+  batchNo?: string
+  manufacturer?: string
+  storageLocation?: string
+  expireDate?: string
+  remark?: string
+}
+
+export function fetchQuickProductionMaterialPrep(data: QuickPrepPayload) {
+  return request.post<ProductionMaterialPrep>({
+    url: '/web/admin/production-material-preps/quick',
+    data
+  })
+}
+
+export type AvailableMaterialBatch = {
+  requisitionUsageId: string
+  batchId: string
+  materialId: string
+  materialType: string
+  materialCode: string
+  materialName: string
+  specModel?: string
+  unit?: string
+  stockInNo: string
+  stockInDate?: string
+  expireDate?: string
+  catalogNo?: string
+  batchNo: string
+  manufacturer: string
+  storageLocation?: string
+  requisitionQty: number
+  unitPrice?: number | null
+  receiver?: string
+  receiverName?: string
+  useTime?: string
+}
+
+export function fetchAvailableMaterialBatches(params?: {
+  page?: number
+  pageSize?: number
+  keyword?: string
+  materialType?: string
+}) {
+  return request.get<PageList<AvailableMaterialBatch>>({
+    url: '/web/admin/production-material-preps/available-materials',
+    params
+  })
+}
+
+export type MaterialConsumption = {
+  id: string
+  materialId: string
+  materialType: string
+  materialCode: string
+  materialName: string
+  batchId?: string
+  stockInNo?: string
+  batchNo?: string
+  manufacturer?: string
+  unitPrice?: number | null
+  changeQty: number
+  usageUnit?: string
+  prepId?: string
+  prepNo: string
+  configuredMaterialName: string
+  sourceType: string
+  remark: string
+  createBy: string
+  createByName?: string
+  createTime: string
+}
+
+export function fetchProductionMaterialConsumptions(params?: {
+  page?: number
+  pageSize?: number
+  keyword?: string
+  materialType?: string
+  startTime?: string
+  endTime?: string
+}) {
+  return request.get<PageList<MaterialConsumption>>({
+    url: '/web/admin/production-material-consumptions',
+    params
+  })
+}
+
+export function fetchMyProductionMaterialConsumptions(params?: {
+  page?: number
+  pageSize?: number
+  keyword?: string
+  materialType?: string
+  startTime?: string
+  endTime?: string
+}) {
+  return request.get<PageList<MaterialConsumption>>({
+    url: '/web/admin/my-production-material-consumptions',
+    params
+  })
+}

+ 5 - 1
web-admin/src/api/production.ts

@@ -92,7 +92,11 @@ export function fetchCreateEquipment(data: Record<string, any>) {
 }
 
 export function fetchUpdateEquipment(id: string, data: Record<string, any>) {
-  return request.put({ url: `/web/admin/equipments/${id}`, params: data })
+  const cleanedData: Record<string, any> = {}
+  for (const [key, value] of Object.entries(data)) {
+    cleanedData[key] = value === undefined ? null : value
+  }
+  return request.put({ url: `/web/admin/equipments/${id}`, params: cleanedData })
 }
 
 export function fetchDeleteEquipment(id: string) {

+ 17 - 0
web-admin/src/api/sample-reception.ts

@@ -101,3 +101,20 @@ export function fetchSampleReceptionSubmit(data: {
     data
   })
 }
+
+/**
+ * 根据样本编码查询样本接收记录
+ * @returns 包含 receptionId(有记录时)和 sampleInfo(样本信息)的对象;无记录时 receptionId 为空
+ */
+export function fetchSampleReceptionBySampleCode(params: {
+  sampleCode: string
+  sourceType?: string
+}) {
+  return request.get<{
+    receptionId?: string
+    sampleInfo?: Record<string, unknown> | null
+  }>({
+    url: '/web/admin/sample-receptions/by-sample-code',
+    params
+  })
+}

+ 1 - 0
web-admin/src/graphify-out/cache/ast/0911f9985c8626217a120c9c3039d10a85212e58fa0cf3dc705c49e38044e834.json

@@ -0,0 +1 @@
+{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_production_production_material_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-material/index.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
web-admin/src/graphify-out/cache/ast/0e935921dcaf40dff575eabd7243cb3178e7b7976b07e84b710ea0b88e2afbbd.json


+ 1 - 0
web-admin/src/graphify-out/cache/ast/1448bd8bac9768436a59d37d81d8e1ec89510ff196e0d8bf579b71b4335ed043.json

@@ -0,0 +1 @@
+{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_types_import_components_d_ts", "label": "components.d.ts", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/types/import/components.d.ts", "source_location": "L1"}], "edges": [], "raw_calls": []}

+ 1 - 0
web-admin/src/graphify-out/cache/ast/18aed931ebd57ac759235fdd2178b1591e9c25b47759b4f6688409e97c013137.json

@@ -0,0 +1 @@
+{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_types_import_components_d_ts", "label": "components.d.ts", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/types/import/components.d.ts", "source_location": "L1"}], "edges": [], "raw_calls": []}

+ 1 - 0
web-admin/src/graphify-out/cache/ast/23158e8efc3cc82ad09bcdfbcf383706512e718aef6dfc0837e35579907d0c5a.json

@@ -0,0 +1 @@
+{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_production_production_material_productionmaterialusagetab_vue", "label": "ProductionMaterialUsageTab.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-material/ProductionMaterialUsageTab.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
web-admin/src/graphify-out/cache/ast/2809551f5cfe5eca75f53f4d54ace039f9b308db6a02a19b5c450d301e8f2beb.json


+ 1 - 0
web-admin/src/graphify-out/cache/ast/34ab406446d7411d047478c2f7d21e4b34c6fd1b32329030654aac9fe52a404f.json

@@ -0,0 +1 @@
+{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_production_production_material_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-material/index.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
web-admin/src/graphify-out/cache/ast/39ffd935e5315fe4fcbdbbc63593bcbf9673e49bd9022f758188e6a7379f36e5.json


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
web-admin/src/graphify-out/cache/ast/3bb91872b1bab2ac8366115a81698eda508d6e80f51e20fb204b2e4ee1083e67.json


+ 1 - 0
web-admin/src/graphify-out/cache/ast/3f60bb4b8d2e9ade20589144c77c598a22ad1bd90a96a670d88511c074c62dc0.json

@@ -0,0 +1 @@
+{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_router_modules_sqxp_ts", "label": "sqxp.ts", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/router/modules/sqxp.ts", "source_location": "L1"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_web_admin_src_router_modules_sqxp_ts", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_types_router", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/router/modules/sqxp.ts", "source_location": "L1", "weight": 1.0}], "raw_calls": []}

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
web-admin/src/graphify-out/cache/ast/4263df63670669e6af30ebfafc9dbef07947a664d273c833cbc11f4bf2e6cc23.json


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
web-admin/src/graphify-out/cache/ast/434bc84459de27d92d10decccd174e9f44cfaa0b27a6975703b583fb84b2fcde.json


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
web-admin/src/graphify-out/cache/ast/497593ffaea0a74bd33c8723089fd3189b38015192993e8742485c113bf43e64.json


+ 1 - 0
web-admin/src/graphify-out/cache/ast/5046d79bde02113f61bc1a03bb74a1c8e02c064958919dc31dec6b602b66a9da.json

@@ -0,0 +1 @@
+{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_cell_storage_material_materialusagetab_vue", "label": "MaterialUsageTab.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/cell-storage/material/MaterialUsageTab.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}

+ 1 - 0
web-admin/src/graphify-out/cache/ast/50d1c8e00b6aa81af4faf33b9ff9e49b7cad29bf2592200cc78cdbfe2fe5a432.json

@@ -0,0 +1 @@
+{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_qc_material_qcmaterialusagetab_vue", "label": "QcMaterialUsageTab.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-material/QcMaterialUsageTab.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}

+ 1 - 0
web-admin/src/graphify-out/cache/ast/52c6334d5c8a3a9a6bd1282c9971d53b27d66b98e7340be096cf117749aeb69e.json

@@ -0,0 +1 @@
+{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_production_production_material_productionmaterialpreptab_vue", "label": "ProductionMaterialPrepTab.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-material/ProductionMaterialPrepTab.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}

+ 1 - 0
web-admin/src/graphify-out/cache/ast/55ac680c62f67dfaaee51e9e08ad586fd34ca144727cf41010b3f2ba823f6b83.json

@@ -0,0 +1 @@
+{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_production_production_material_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-material/index.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}

+ 1 - 0
web-admin/src/graphify-out/cache/ast/6226960a9665e206f9bf1728be17c0238d834aa12b54d44d4318ba65054fa1ba.json

@@ -0,0 +1 @@
+{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_production_cleanroom_garment_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/cleanroom-garment/index.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}

+ 1 - 0
web-admin/src/graphify-out/cache/ast/63f4e68e747ffc9b946b1a7b5f12db0962b334f1cb5533591ac12b9e209219a2.json

@@ -0,0 +1 @@
+{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_production_production_material_productionmaterialpreptab_vue", "label": "ProductionMaterialPrepTab.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-material/ProductionMaterialPrepTab.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}

+ 1 - 0
web-admin/src/graphify-out/cache/ast/711404c66ecdf4d51b8f0bc17eff849b334804208cc6674ead117b4c09f010d4.json

@@ -0,0 +1 @@
+{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_production_production_material_productionmaterialusagetab_vue", "label": "ProductionMaterialUsageTab.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-material/ProductionMaterialUsageTab.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
web-admin/src/graphify-out/cache/ast/79dfc8b7ceac8aa824cbbced15c71e019d45c76c20b915bd2739aa9e68d3a1cb.json


+ 1 - 0
web-admin/src/graphify-out/cache/ast/7a7f89c3a541acd3b099327cfbce3bb3fbb7cfdf3aab784ba83456aeaa0f37bd.json

@@ -0,0 +1 @@
+{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_types_import_components_d_ts", "label": "components.d.ts", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/types/import/components.d.ts", "source_location": "L1"}], "edges": [], "raw_calls": []}

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
web-admin/src/graphify-out/cache/ast/80d379d2264b8312fe20fcbca8edc3a41afb63dcd0af460db0583d9d18647b80.json


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
web-admin/src/graphify-out/cache/ast/8a5ae7bc2c41af4e74fc14bf271a7ac8d493b354c880f8105e9c44c587dc6747.json


+ 1 - 0
web-admin/src/graphify-out/cache/ast/8abf844a04eb8c69c5a598f94f5c7d832126bcc75e320d3f47ce0b612923fff7.json

@@ -0,0 +1 @@
+{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_production_production_material_productionmaterialpreptab_vue", "label": "ProductionMaterialPrepTab.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-material/ProductionMaterialPrepTab.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}

+ 1 - 0
web-admin/src/graphify-out/cache/ast/919e1d5e9dba87f79b447a28be4ab9ba59af8b47461c4986ba82b87c3d95300d.json

@@ -0,0 +1 @@
+{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_production_production_material_productionmaterialpreptab_vue", "label": "ProductionMaterialPrepTab.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-material/ProductionMaterialPrepTab.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}

+ 1 - 0
web-admin/src/graphify-out/cache/ast/91c45d72e9b3cee181abf380a487696a7246314064854cde8c355bfec828a534.json

@@ -0,0 +1 @@
+{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_production_cleanroom_garment_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/cleanroom-garment/index.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}

+ 1 - 0
web-admin/src/graphify-out/cache/ast/9cd801caf018089938561d3a495979e247268e8a9e10783b1cba6d0320cb9b56.json

@@ -0,0 +1 @@
+{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_types_import_components_d_ts", "label": "components.d.ts", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/types/import/components.d.ts", "source_location": "L1"}], "edges": [], "raw_calls": []}

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
web-admin/src/graphify-out/cache/ast/afdcabc164ff15fb365369d2aa0a19b64c475bf2d50f8c6de271c1f0ca2aa1ef.json


+ 1 - 0
web-admin/src/graphify-out/cache/ast/b8f04075ebb8442dafe9b5b20a9e74623f29e164f6a044173f1a5f0888afbf5b.json

@@ -0,0 +1 @@
+{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_production_cleanroom_garment_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/cleanroom-garment/index.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}

+ 1 - 0
web-admin/src/graphify-out/cache/ast/bdb0afa73692fda8c882dbc855ddb9bfd767946200d120e2ef5d08547ec6c8e4.json

@@ -0,0 +1 @@
+{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_production_production_material_productionmaterialpreptab_vue", "label": "ProductionMaterialPrepTab.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-material/ProductionMaterialPrepTab.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}

+ 1 - 0
web-admin/src/graphify-out/cache/ast/c2670f5eaa0661f87f26cbdbf77caa4134912ad0906b8f48699d7301387c40b1.json

@@ -0,0 +1 @@
+{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_production_production_material_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-material/index.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
web-admin/src/graphify-out/cache/ast/d197f4b7cc63086739522eb22e12aeddfb057819946f1fbd03342a4216fcd368.json


Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff