{
  "openapi": "3.0.0",
  "info": {
    "title": "智能配送耗材临时申请 API",
    "version": "1.0.0",
    "description": "智能配送系统的耗材临时申请管理 API，支持申请创建、审批、物料明细管理和易耗品种类查询"
  },
  "servers": [
    {
      "url": "http://localhost:8090",
      "description": "开发服务器"
    }
  ],
  "components": {
    "schemas": {
      "RequestItem": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "example": "打印纸",
            "description": "物料名称"
          },
          "spec": {
            "type": "string",
            "example": "A4",
            "description": "规格"
          },
          "quantity": {
            "type": "integer",
            "minimum": 0,
            "exclusiveMinimum": true,
            "example": 10,
            "description": "数量"
          },
          "unit": {
            "type": "string",
            "example": "箱",
            "description": "单位"
          },
          "estimatedUnitCost": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true,
            "example": 25.5,
            "description": "预估单价"
          },
          "remark": {
            "type": "string",
            "description": "备注"
          }
        },
        "required": [
          "name",
          "quantity"
        ]
      },
      "CreateRequest": {
        "type": "object",
        "properties": {
          "applicantName": {
            "type": "string",
            "example": "张三",
            "description": "申请人姓名"
          },
          "applicantPhone": {
            "type": "string",
            "minLength": 3,
            "example": "13800138000",
            "description": "申请人电话"
          },
          "department": {
            "type": "string",
            "example": "技术部",
            "description": "部门"
          },
          "reason": {
            "type": "string",
            "example": "日常办公",
            "description": "申请原因"
          },
          "neededAt": {
            "type": "string",
            "nullable": true,
            "format": "date",
            "example": "2025-10-10T00:00:00Z",
            "description": "需要时间"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "example": "打印纸",
                  "description": "物料名称"
                },
                "spec": {
                  "type": "string",
                  "example": "A4",
                  "description": "规格"
                },
                "quantity": {
                  "type": "integer",
                  "minimum": 0,
                  "exclusiveMinimum": true,
                  "example": 10,
                  "description": "数量"
                },
                "unit": {
                  "type": "string",
                  "example": "箱",
                  "description": "单位"
                },
                "estimatedUnitCost": {
                  "type": "number",
                  "minimum": 0,
                  "exclusiveMinimum": true,
                  "example": 25.5,
                  "description": "预估单价"
                },
                "remark": {
                  "type": "string",
                  "description": "备注"
                }
              },
              "required": [
                "name",
                "quantity"
              ]
            },
            "minItems": 1,
            "description": "物料明细列表"
          }
        },
        "required": [
          "applicantPhone",
          "items"
        ]
      },
      "UpdateRequest": {
        "type": "object",
        "properties": {
          "applicantName": {
            "type": "string",
            "example": "张三",
            "description": "申请人姓名"
          },
          "applicantPhone": {
            "type": "string",
            "minLength": 3,
            "example": "13800138000",
            "description": "申请人电话"
          },
          "department": {
            "type": "string",
            "example": "技术部",
            "description": "部门"
          },
          "reason": {
            "type": "string",
            "example": "日常办公",
            "description": "申请原因"
          },
          "neededAt": {
            "type": "string",
            "nullable": true,
            "format": "date",
            "example": "2025-10-10T00:00:00Z",
            "description": "需要时间"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "example": "打印纸",
                  "description": "物料名称"
                },
                "spec": {
                  "type": "string",
                  "example": "A4",
                  "description": "规格"
                },
                "quantity": {
                  "type": "integer",
                  "minimum": 0,
                  "exclusiveMinimum": true,
                  "example": 10,
                  "description": "数量"
                },
                "unit": {
                  "type": "string",
                  "example": "箱",
                  "description": "单位"
                },
                "estimatedUnitCost": {
                  "type": "number",
                  "minimum": 0,
                  "exclusiveMinimum": true,
                  "example": 25.5,
                  "description": "预估单价"
                },
                "remark": {
                  "type": "string",
                  "description": "备注"
                },
                "id": {
                  "type": "string"
                }
              },
              "required": [
                "name",
                "quantity"
              ]
            }
          }
        }
      },
      "UpdateStatus": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "APPROVED",
              "REJECTED",
              "CANCELLED",
              "COMPLETED"
            ],
            "description": "状态",
            "example": "APPROVED"
          },
          "approverId": {
            "type": "string",
            "description": "审批人ID"
          },
          "remark": {
            "type": "string",
            "description": "备注"
          }
        },
        "required": [
          "status"
        ]
      },
      "RequestItemResponse": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "example": "打印纸",
            "description": "物料名称"
          },
          "spec": {
            "type": "string",
            "example": "A4",
            "description": "规格"
          },
          "quantity": {
            "type": "integer",
            "minimum": 0,
            "exclusiveMinimum": true,
            "example": 10,
            "description": "数量"
          },
          "unit": {
            "type": "string",
            "example": "箱",
            "description": "单位"
          },
          "estimatedUnitCost": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true,
            "example": 25.5,
            "description": "预估单价"
          },
          "remark": {
            "type": "string",
            "description": "备注"
          },
          "id": {
            "type": "string",
            "description": "物料明细ID"
          },
          "requestId": {
            "type": "string",
            "description": "关联的请求ID"
          },
          "createdAt": {
            "type": "string",
            "description": "创建时间"
          },
          "updatedAt": {
            "type": "string",
            "description": "更新时间"
          }
        },
        "required": [
          "name",
          "quantity",
          "id",
          "requestId",
          "createdAt",
          "updatedAt"
        ]
      },
      "RequestResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "请求ID"
          },
          "applicantName": {
            "type": "string",
            "nullable": true,
            "description": "申请人姓名"
          },
          "applicantPhone": {
            "type": "string",
            "description": "申请人电话"
          },
          "department": {
            "type": "string",
            "nullable": true,
            "description": "部门"
          },
          "reason": {
            "type": "string",
            "nullable": true,
            "description": "申请原因"
          },
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "APPROVED",
              "REJECTED",
              "CANCELLED",
              "COMPLETED"
            ],
            "description": "状态"
          },
          "approverId": {
            "type": "string",
            "nullable": true,
            "description": "审批人ID"
          },
          "approvedAt": {
            "type": "string",
            "nullable": true,
            "description": "审批时间"
          },
          "neededAt": {
            "type": "string",
            "nullable": true,
            "description": "需要时间"
          },
          "remark": {
            "type": "string",
            "nullable": true,
            "description": "备注"
          },
          "createdAt": {
            "type": "string",
            "description": "创建时间"
          },
          "updatedAt": {
            "type": "string",
            "description": "更新时间"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "example": "打印纸",
                  "description": "物料名称"
                },
                "spec": {
                  "type": "string",
                  "example": "A4",
                  "description": "规格"
                },
                "quantity": {
                  "type": "integer",
                  "minimum": 0,
                  "exclusiveMinimum": true,
                  "example": 10,
                  "description": "数量"
                },
                "unit": {
                  "type": "string",
                  "example": "箱",
                  "description": "单位"
                },
                "estimatedUnitCost": {
                  "type": "number",
                  "minimum": 0,
                  "exclusiveMinimum": true,
                  "example": 25.5,
                  "description": "预估单价"
                },
                "remark": {
                  "type": "string",
                  "description": "备注"
                },
                "id": {
                  "type": "string",
                  "description": "物料明细ID"
                },
                "requestId": {
                  "type": "string",
                  "description": "关联的请求ID"
                },
                "createdAt": {
                  "type": "string",
                  "description": "创建时间"
                },
                "updatedAt": {
                  "type": "string",
                  "description": "更新时间"
                }
              },
              "required": [
                "name",
                "quantity",
                "id",
                "requestId",
                "createdAt",
                "updatedAt"
              ]
            },
            "description": "物料明细列表"
          }
        },
        "required": [
          "id",
          "applicantName",
          "applicantPhone",
          "department",
          "reason",
          "status",
          "approverId",
          "approvedAt",
          "neededAt",
          "remark",
          "createdAt",
          "updatedAt",
          "items"
        ]
      },
      "SKUResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "SKU ID"
          },
          "skuCode": {
            "type": "string",
            "nullable": true,
            "description": "SKU编码"
          },
          "specification": {
            "type": "string",
            "nullable": true,
            "description": "规格型号",
            "example": "A4 70g"
          },
          "barcode": {
            "type": "string",
            "description": "条形码"
          },
          "supplierId": {
            "type": "number",
            "nullable": true,
            "description": "供应商ID"
          },
          "purchasePrice": {
            "type": "number",
            "nullable": true,
            "description": "采购价格",
            "example": 25.5
          },
          "sellingPrice": {
            "type": "number",
            "nullable": true,
            "description": "销售价格",
            "example": 30
          },
          "unit": {
            "type": "string",
            "nullable": true,
            "description": "单位",
            "example": "包"
          },
          "minStock": {
            "type": "number",
            "nullable": true,
            "description": "最小库存"
          },
          "maxStock": {
            "type": "number",
            "nullable": true,
            "description": "最大库存"
          },
          "status": {
            "type": "number",
            "nullable": true,
            "description": "状态：0-正常，1-停用"
          }
        },
        "required": [
          "id",
          "skuCode",
          "specification",
          "barcode",
          "supplierId",
          "purchasePrice",
          "sellingPrice",
          "unit",
          "minStock",
          "maxStock",
          "status"
        ]
      },
      "GoodsWithSKUResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "商品ID"
          },
          "goodsName": {
            "type": "string",
            "description": "商品名称",
            "example": "打印纸"
          },
          "categoryId": {
            "type": "number",
            "nullable": true,
            "description": "分类ID"
          },
          "brand": {
            "type": "string",
            "nullable": true,
            "description": "品牌"
          },
          "status": {
            "type": "number",
            "nullable": true,
            "description": "状态：0-正常，1-停用"
          },
          "hospId": {
            "type": "string",
            "nullable": true,
            "description": "医院ID"
          },
          "skus": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number",
                  "description": "SKU ID"
                },
                "skuCode": {
                  "type": "string",
                  "nullable": true,
                  "description": "SKU编码"
                },
                "specification": {
                  "type": "string",
                  "nullable": true,
                  "description": "规格型号",
                  "example": "A4 70g"
                },
                "barcode": {
                  "type": "string",
                  "description": "条形码"
                },
                "supplierId": {
                  "type": "number",
                  "nullable": true,
                  "description": "供应商ID"
                },
                "purchasePrice": {
                  "type": "number",
                  "nullable": true,
                  "description": "采购价格",
                  "example": 25.5
                },
                "sellingPrice": {
                  "type": "number",
                  "nullable": true,
                  "description": "销售价格",
                  "example": 30
                },
                "unit": {
                  "type": "string",
                  "nullable": true,
                  "description": "单位",
                  "example": "包"
                },
                "minStock": {
                  "type": "number",
                  "nullable": true,
                  "description": "最小库存"
                },
                "maxStock": {
                  "type": "number",
                  "nullable": true,
                  "description": "最大库存"
                },
                "status": {
                  "type": "number",
                  "nullable": true,
                  "description": "状态：0-正常，1-停用"
                }
              },
              "required": [
                "id",
                "skuCode",
                "specification",
                "barcode",
                "supplierId",
                "purchasePrice",
                "sellingPrice",
                "unit",
                "minStock",
                "maxStock",
                "status"
              ]
            },
            "description": "SKU列表（规格/价格等信息）"
          }
        },
        "required": [
          "id",
          "goodsName",
          "categoryId",
          "brand",
          "status",
          "hospId",
          "skus"
        ]
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "description": "错误信息"
          },
          "details": {
            "nullable": true,
            "description": "详细错误信息"
          }
        },
        "required": [
          "error"
        ]
      }
    },
    "parameters": {}
  },
  "paths": {
    "/api/consumable-temp-requests": {
      "post": {
        "tags": [
          "Consumable Requests"
        ],
        "summary": "创建耗材临时申请",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "applicantName": {
                    "type": "string",
                    "example": "张三",
                    "description": "申请人姓名"
                  },
                  "applicantPhone": {
                    "type": "string",
                    "minLength": 3,
                    "example": "13800138000",
                    "description": "申请人电话"
                  },
                  "department": {
                    "type": "string",
                    "example": "技术部",
                    "description": "部门"
                  },
                  "reason": {
                    "type": "string",
                    "example": "日常办公",
                    "description": "申请原因"
                  },
                  "neededAt": {
                    "type": "string",
                    "nullable": true,
                    "format": "date",
                    "example": "2025-10-10T00:00:00Z",
                    "description": "需要时间"
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "example": "打印纸",
                          "description": "物料名称"
                        },
                        "spec": {
                          "type": "string",
                          "example": "A4",
                          "description": "规格"
                        },
                        "quantity": {
                          "type": "integer",
                          "minimum": 0,
                          "exclusiveMinimum": true,
                          "example": 10,
                          "description": "数量"
                        },
                        "unit": {
                          "type": "string",
                          "example": "箱",
                          "description": "单位"
                        },
                        "estimatedUnitCost": {
                          "type": "number",
                          "minimum": 0,
                          "exclusiveMinimum": true,
                          "example": 25.5,
                          "description": "预估单价"
                        },
                        "remark": {
                          "type": "string",
                          "description": "备注"
                        }
                      },
                      "required": [
                        "name",
                        "quantity"
                      ]
                    },
                    "minItems": 1,
                    "description": "物料明细列表"
                  }
                },
                "required": [
                  "applicantPhone",
                  "items"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "创建成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "请求ID"
                        },
                        "applicantName": {
                          "type": "string",
                          "nullable": true,
                          "description": "申请人姓名"
                        },
                        "applicantPhone": {
                          "type": "string",
                          "description": "申请人电话"
                        },
                        "department": {
                          "type": "string",
                          "nullable": true,
                          "description": "部门"
                        },
                        "reason": {
                          "type": "string",
                          "nullable": true,
                          "description": "申请原因"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "PENDING",
                            "APPROVED",
                            "REJECTED",
                            "CANCELLED",
                            "COMPLETED"
                          ],
                          "description": "状态"
                        },
                        "approverId": {
                          "type": "string",
                          "nullable": true,
                          "description": "审批人ID"
                        },
                        "approvedAt": {
                          "type": "string",
                          "nullable": true,
                          "description": "审批时间"
                        },
                        "neededAt": {
                          "type": "string",
                          "nullable": true,
                          "description": "需要时间"
                        },
                        "remark": {
                          "type": "string",
                          "nullable": true,
                          "description": "备注"
                        },
                        "createdAt": {
                          "type": "string",
                          "description": "创建时间"
                        },
                        "updatedAt": {
                          "type": "string",
                          "description": "更新时间"
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "example": "打印纸",
                                "description": "物料名称"
                              },
                              "spec": {
                                "type": "string",
                                "example": "A4",
                                "description": "规格"
                              },
                              "quantity": {
                                "type": "integer",
                                "minimum": 0,
                                "exclusiveMinimum": true,
                                "example": 10,
                                "description": "数量"
                              },
                              "unit": {
                                "type": "string",
                                "example": "箱",
                                "description": "单位"
                              },
                              "estimatedUnitCost": {
                                "type": "number",
                                "minimum": 0,
                                "exclusiveMinimum": true,
                                "example": 25.5,
                                "description": "预估单价"
                              },
                              "remark": {
                                "type": "string",
                                "description": "备注"
                              },
                              "id": {
                                "type": "string",
                                "description": "物料明细ID"
                              },
                              "requestId": {
                                "type": "string",
                                "description": "关联的请求ID"
                              },
                              "createdAt": {
                                "type": "string",
                                "description": "创建时间"
                              },
                              "updatedAt": {
                                "type": "string",
                                "description": "更新时间"
                              }
                            },
                            "required": [
                              "name",
                              "quantity",
                              "id",
                              "requestId",
                              "createdAt",
                              "updatedAt"
                            ]
                          },
                          "description": "物料明细列表"
                        }
                      },
                      "required": [
                        "id",
                        "applicantName",
                        "applicantPhone",
                        "department",
                        "reason",
                        "status",
                        "approverId",
                        "approvedAt",
                        "neededAt",
                        "remark",
                        "createdAt",
                        "updatedAt",
                        "items"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "验证错误",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "错误信息"
                    },
                    "details": {
                      "nullable": true,
                      "description": "详细错误信息"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Consumable Requests"
        ],
        "summary": "查询耗材临时申请列表",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "页码"
            },
            "required": false,
            "description": "页码",
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "每页数量"
            },
            "required": false,
            "description": "每页数量",
            "name": "pageSize",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "状态筛选"
            },
            "required": false,
            "description": "状态筛选",
            "name": "status",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "申请人电话筛选"
            },
            "required": false,
            "description": "申请人电话筛选",
            "name": "applicantPhone",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "开始时间"
            },
            "required": false,
            "description": "开始时间",
            "name": "from",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "结束时间"
            },
            "required": false,
            "description": "结束时间",
            "name": "to",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "查询成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "请求ID"
                          },
                          "applicantName": {
                            "type": "string",
                            "nullable": true,
                            "description": "申请人姓名"
                          },
                          "applicantPhone": {
                            "type": "string",
                            "description": "申请人电话"
                          },
                          "department": {
                            "type": "string",
                            "nullable": true,
                            "description": "部门"
                          },
                          "reason": {
                            "type": "string",
                            "nullable": true,
                            "description": "申请原因"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "PENDING",
                              "APPROVED",
                              "REJECTED",
                              "CANCELLED",
                              "COMPLETED"
                            ],
                            "description": "状态"
                          },
                          "approverId": {
                            "type": "string",
                            "nullable": true,
                            "description": "审批人ID"
                          },
                          "approvedAt": {
                            "type": "string",
                            "nullable": true,
                            "description": "审批时间"
                          },
                          "neededAt": {
                            "type": "string",
                            "nullable": true,
                            "description": "需要时间"
                          },
                          "remark": {
                            "type": "string",
                            "nullable": true,
                            "description": "备注"
                          },
                          "createdAt": {
                            "type": "string",
                            "description": "创建时间"
                          },
                          "updatedAt": {
                            "type": "string",
                            "description": "更新时间"
                          },
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "minLength": 1,
                                  "example": "打印纸",
                                  "description": "物料名称"
                                },
                                "spec": {
                                  "type": "string",
                                  "example": "A4",
                                  "description": "规格"
                                },
                                "quantity": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "exclusiveMinimum": true,
                                  "example": 10,
                                  "description": "数量"
                                },
                                "unit": {
                                  "type": "string",
                                  "example": "箱",
                                  "description": "单位"
                                },
                                "estimatedUnitCost": {
                                  "type": "number",
                                  "minimum": 0,
                                  "exclusiveMinimum": true,
                                  "example": 25.5,
                                  "description": "预估单价"
                                },
                                "remark": {
                                  "type": "string",
                                  "description": "备注"
                                },
                                "id": {
                                  "type": "string",
                                  "description": "物料明细ID"
                                },
                                "requestId": {
                                  "type": "string",
                                  "description": "关联的请求ID"
                                },
                                "createdAt": {
                                  "type": "string",
                                  "description": "创建时间"
                                },
                                "updatedAt": {
                                  "type": "string",
                                  "description": "更新时间"
                                }
                              },
                              "required": [
                                "name",
                                "quantity",
                                "id",
                                "requestId",
                                "createdAt",
                                "updatedAt"
                              ]
                            },
                            "description": "物料明细列表"
                          }
                        },
                        "required": [
                          "id",
                          "applicantName",
                          "applicantPhone",
                          "department",
                          "reason",
                          "status",
                          "approverId",
                          "approvedAt",
                          "neededAt",
                          "remark",
                          "createdAt",
                          "updatedAt",
                          "items"
                        ]
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer",
                          "description": "总数"
                        },
                        "page": {
                          "type": "integer",
                          "description": "当前页码"
                        },
                        "pageSize": {
                          "type": "integer",
                          "description": "每页数量"
                        }
                      },
                      "required": [
                        "total",
                        "page",
                        "pageSize"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/consumable-temp-requests/{id}": {
      "get": {
        "tags": [
          "Consumable Requests"
        ],
        "summary": "获取耗材临时申请详情",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "请求ID"
            },
            "required": true,
            "description": "请求ID",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "查询成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "请求ID"
                        },
                        "applicantName": {
                          "type": "string",
                          "nullable": true,
                          "description": "申请人姓名"
                        },
                        "applicantPhone": {
                          "type": "string",
                          "description": "申请人电话"
                        },
                        "department": {
                          "type": "string",
                          "nullable": true,
                          "description": "部门"
                        },
                        "reason": {
                          "type": "string",
                          "nullable": true,
                          "description": "申请原因"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "PENDING",
                            "APPROVED",
                            "REJECTED",
                            "CANCELLED",
                            "COMPLETED"
                          ],
                          "description": "状态"
                        },
                        "approverId": {
                          "type": "string",
                          "nullable": true,
                          "description": "审批人ID"
                        },
                        "approvedAt": {
                          "type": "string",
                          "nullable": true,
                          "description": "审批时间"
                        },
                        "neededAt": {
                          "type": "string",
                          "nullable": true,
                          "description": "需要时间"
                        },
                        "remark": {
                          "type": "string",
                          "nullable": true,
                          "description": "备注"
                        },
                        "createdAt": {
                          "type": "string",
                          "description": "创建时间"
                        },
                        "updatedAt": {
                          "type": "string",
                          "description": "更新时间"
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "example": "打印纸",
                                "description": "物料名称"
                              },
                              "spec": {
                                "type": "string",
                                "example": "A4",
                                "description": "规格"
                              },
                              "quantity": {
                                "type": "integer",
                                "minimum": 0,
                                "exclusiveMinimum": true,
                                "example": 10,
                                "description": "数量"
                              },
                              "unit": {
                                "type": "string",
                                "example": "箱",
                                "description": "单位"
                              },
                              "estimatedUnitCost": {
                                "type": "number",
                                "minimum": 0,
                                "exclusiveMinimum": true,
                                "example": 25.5,
                                "description": "预估单价"
                              },
                              "remark": {
                                "type": "string",
                                "description": "备注"
                              },
                              "id": {
                                "type": "string",
                                "description": "物料明细ID"
                              },
                              "requestId": {
                                "type": "string",
                                "description": "关联的请求ID"
                              },
                              "createdAt": {
                                "type": "string",
                                "description": "创建时间"
                              },
                              "updatedAt": {
                                "type": "string",
                                "description": "更新时间"
                              }
                            },
                            "required": [
                              "name",
                              "quantity",
                              "id",
                              "requestId",
                              "createdAt",
                              "updatedAt"
                            ]
                          },
                          "description": "物料明细列表"
                        }
                      },
                      "required": [
                        "id",
                        "applicantName",
                        "applicantPhone",
                        "department",
                        "reason",
                        "status",
                        "approverId",
                        "approvedAt",
                        "neededAt",
                        "remark",
                        "createdAt",
                        "updatedAt",
                        "items"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "未找到",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "错误信息"
                    },
                    "details": {
                      "nullable": true,
                      "description": "详细错误信息"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Consumable Requests"
        ],
        "summary": "更新耗材临时申请",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "请求ID"
            },
            "required": true,
            "description": "请求ID",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "applicantName": {
                    "type": "string",
                    "example": "张三",
                    "description": "申请人姓名"
                  },
                  "applicantPhone": {
                    "type": "string",
                    "minLength": 3,
                    "example": "13800138000",
                    "description": "申请人电话"
                  },
                  "department": {
                    "type": "string",
                    "example": "技术部",
                    "description": "部门"
                  },
                  "reason": {
                    "type": "string",
                    "example": "日常办公",
                    "description": "申请原因"
                  },
                  "neededAt": {
                    "type": "string",
                    "nullable": true,
                    "format": "date",
                    "example": "2025-10-10T00:00:00Z",
                    "description": "需要时间"
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "example": "打印纸",
                          "description": "物料名称"
                        },
                        "spec": {
                          "type": "string",
                          "example": "A4",
                          "description": "规格"
                        },
                        "quantity": {
                          "type": "integer",
                          "minimum": 0,
                          "exclusiveMinimum": true,
                          "example": 10,
                          "description": "数量"
                        },
                        "unit": {
                          "type": "string",
                          "example": "箱",
                          "description": "单位"
                        },
                        "estimatedUnitCost": {
                          "type": "number",
                          "minimum": 0,
                          "exclusiveMinimum": true,
                          "example": 25.5,
                          "description": "预估单价"
                        },
                        "remark": {
                          "type": "string",
                          "description": "备注"
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "quantity"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "更新成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "请求ID"
                        },
                        "applicantName": {
                          "type": "string",
                          "nullable": true,
                          "description": "申请人姓名"
                        },
                        "applicantPhone": {
                          "type": "string",
                          "description": "申请人电话"
                        },
                        "department": {
                          "type": "string",
                          "nullable": true,
                          "description": "部门"
                        },
                        "reason": {
                          "type": "string",
                          "nullable": true,
                          "description": "申请原因"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "PENDING",
                            "APPROVED",
                            "REJECTED",
                            "CANCELLED",
                            "COMPLETED"
                          ],
                          "description": "状态"
                        },
                        "approverId": {
                          "type": "string",
                          "nullable": true,
                          "description": "审批人ID"
                        },
                        "approvedAt": {
                          "type": "string",
                          "nullable": true,
                          "description": "审批时间"
                        },
                        "neededAt": {
                          "type": "string",
                          "nullable": true,
                          "description": "需要时间"
                        },
                        "remark": {
                          "type": "string",
                          "nullable": true,
                          "description": "备注"
                        },
                        "createdAt": {
                          "type": "string",
                          "description": "创建时间"
                        },
                        "updatedAt": {
                          "type": "string",
                          "description": "更新时间"
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "example": "打印纸",
                                "description": "物料名称"
                              },
                              "spec": {
                                "type": "string",
                                "example": "A4",
                                "description": "规格"
                              },
                              "quantity": {
                                "type": "integer",
                                "minimum": 0,
                                "exclusiveMinimum": true,
                                "example": 10,
                                "description": "数量"
                              },
                              "unit": {
                                "type": "string",
                                "example": "箱",
                                "description": "单位"
                              },
                              "estimatedUnitCost": {
                                "type": "number",
                                "minimum": 0,
                                "exclusiveMinimum": true,
                                "example": 25.5,
                                "description": "预估单价"
                              },
                              "remark": {
                                "type": "string",
                                "description": "备注"
                              },
                              "id": {
                                "type": "string",
                                "description": "物料明细ID"
                              },
                              "requestId": {
                                "type": "string",
                                "description": "关联的请求ID"
                              },
                              "createdAt": {
                                "type": "string",
                                "description": "创建时间"
                              },
                              "updatedAt": {
                                "type": "string",
                                "description": "更新时间"
                              }
                            },
                            "required": [
                              "name",
                              "quantity",
                              "id",
                              "requestId",
                              "createdAt",
                              "updatedAt"
                            ]
                          },
                          "description": "物料明细列表"
                        }
                      },
                      "required": [
                        "id",
                        "applicantName",
                        "applicantPhone",
                        "department",
                        "reason",
                        "status",
                        "approverId",
                        "approvedAt",
                        "neededAt",
                        "remark",
                        "createdAt",
                        "updatedAt",
                        "items"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "未找到",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "错误信息"
                    },
                    "details": {
                      "nullable": true,
                      "description": "详细错误信息"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Consumable Requests"
        ],
        "summary": "删除耗材临时申请",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "请求ID"
            },
            "required": true,
            "description": "请求ID",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "删除成功"
          }
        }
      }
    },
    "/api/consumable-temp-requests/{id}/status": {
      "patch": {
        "tags": [
          "Consumable Requests"
        ],
        "summary": "更新耗材临时申请状态",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "请求ID"
            },
            "required": true,
            "description": "请求ID",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "PENDING",
                      "APPROVED",
                      "REJECTED",
                      "CANCELLED",
                      "COMPLETED"
                    ],
                    "description": "状态",
                    "example": "APPROVED"
                  },
                  "approverId": {
                    "type": "string",
                    "description": "审批人ID"
                  },
                  "remark": {
                    "type": "string",
                    "description": "备注"
                  }
                },
                "required": [
                  "status"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "更新成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "请求ID"
                        },
                        "applicantName": {
                          "type": "string",
                          "nullable": true,
                          "description": "申请人姓名"
                        },
                        "applicantPhone": {
                          "type": "string",
                          "description": "申请人电话"
                        },
                        "department": {
                          "type": "string",
                          "nullable": true,
                          "description": "部门"
                        },
                        "reason": {
                          "type": "string",
                          "nullable": true,
                          "description": "申请原因"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "PENDING",
                            "APPROVED",
                            "REJECTED",
                            "CANCELLED",
                            "COMPLETED"
                          ],
                          "description": "状态"
                        },
                        "approverId": {
                          "type": "string",
                          "nullable": true,
                          "description": "审批人ID"
                        },
                        "approvedAt": {
                          "type": "string",
                          "nullable": true,
                          "description": "审批时间"
                        },
                        "neededAt": {
                          "type": "string",
                          "nullable": true,
                          "description": "需要时间"
                        },
                        "remark": {
                          "type": "string",
                          "nullable": true,
                          "description": "备注"
                        },
                        "createdAt": {
                          "type": "string",
                          "description": "创建时间"
                        },
                        "updatedAt": {
                          "type": "string",
                          "description": "更新时间"
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "example": "打印纸",
                                "description": "物料名称"
                              },
                              "spec": {
                                "type": "string",
                                "example": "A4",
                                "description": "规格"
                              },
                              "quantity": {
                                "type": "integer",
                                "minimum": 0,
                                "exclusiveMinimum": true,
                                "example": 10,
                                "description": "数量"
                              },
                              "unit": {
                                "type": "string",
                                "example": "箱",
                                "description": "单位"
                              },
                              "estimatedUnitCost": {
                                "type": "number",
                                "minimum": 0,
                                "exclusiveMinimum": true,
                                "example": 25.5,
                                "description": "预估单价"
                              },
                              "remark": {
                                "type": "string",
                                "description": "备注"
                              },
                              "id": {
                                "type": "string",
                                "description": "物料明细ID"
                              },
                              "requestId": {
                                "type": "string",
                                "description": "关联的请求ID"
                              },
                              "createdAt": {
                                "type": "string",
                                "description": "创建时间"
                              },
                              "updatedAt": {
                                "type": "string",
                                "description": "更新时间"
                              }
                            },
                            "required": [
                              "name",
                              "quantity",
                              "id",
                              "requestId",
                              "createdAt",
                              "updatedAt"
                            ]
                          },
                          "description": "物料明细列表"
                        }
                      },
                      "required": [
                        "id",
                        "applicantName",
                        "applicantPhone",
                        "department",
                        "reason",
                        "status",
                        "approverId",
                        "approvedAt",
                        "neededAt",
                        "remark",
                        "createdAt",
                        "updatedAt",
                        "items"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "未找到",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "错误信息"
                    },
                    "details": {
                      "nullable": true,
                      "description": "详细错误信息"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/consumable-temp-requests/{id}/items": {
      "post": {
        "tags": [
          "Consumable Request Items"
        ],
        "summary": "添加物料明细到请求",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "请求ID"
            },
            "required": true,
            "description": "请求ID",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "example": "打印纸",
                    "description": "物料名称"
                  },
                  "spec": {
                    "type": "string",
                    "example": "A4",
                    "description": "规格"
                  },
                  "quantity": {
                    "type": "integer",
                    "minimum": 0,
                    "exclusiveMinimum": true,
                    "example": 10,
                    "description": "数量"
                  },
                  "unit": {
                    "type": "string",
                    "example": "箱",
                    "description": "单位"
                  },
                  "estimatedUnitCost": {
                    "type": "number",
                    "minimum": 0,
                    "exclusiveMinimum": true,
                    "example": 25.5,
                    "description": "预估单价"
                  },
                  "remark": {
                    "type": "string",
                    "description": "备注"
                  }
                },
                "required": [
                  "name",
                  "quantity"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "创建成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "example": "打印纸",
                          "description": "物料名称"
                        },
                        "spec": {
                          "type": "string",
                          "example": "A4",
                          "description": "规格"
                        },
                        "quantity": {
                          "type": "integer",
                          "minimum": 0,
                          "exclusiveMinimum": true,
                          "example": 10,
                          "description": "数量"
                        },
                        "unit": {
                          "type": "string",
                          "example": "箱",
                          "description": "单位"
                        },
                        "estimatedUnitCost": {
                          "type": "number",
                          "minimum": 0,
                          "exclusiveMinimum": true,
                          "example": 25.5,
                          "description": "预估单价"
                        },
                        "remark": {
                          "type": "string",
                          "description": "备注"
                        },
                        "id": {
                          "type": "string",
                          "description": "物料明细ID"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "关联的请求ID"
                        },
                        "createdAt": {
                          "type": "string",
                          "description": "创建时间"
                        },
                        "updatedAt": {
                          "type": "string",
                          "description": "更新时间"
                        }
                      },
                      "required": [
                        "name",
                        "quantity",
                        "id",
                        "requestId",
                        "createdAt",
                        "updatedAt"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "请求未找到",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "错误信息"
                    },
                    "details": {
                      "nullable": true,
                      "description": "详细错误信息"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/consumable-temp-items/{itemId}": {
      "put": {
        "tags": [
          "Consumable Request Items"
        ],
        "summary": "更新物料明细",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "物料明细ID"
            },
            "required": true,
            "description": "物料明细ID",
            "name": "itemId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "example": "打印纸",
                    "description": "物料名称"
                  },
                  "spec": {
                    "type": "string",
                    "example": "A4",
                    "description": "规格"
                  },
                  "quantity": {
                    "type": "integer",
                    "minimum": 0,
                    "exclusiveMinimum": true,
                    "example": 10,
                    "description": "数量"
                  },
                  "unit": {
                    "type": "string",
                    "example": "箱",
                    "description": "单位"
                  },
                  "estimatedUnitCost": {
                    "type": "number",
                    "minimum": 0,
                    "exclusiveMinimum": true,
                    "example": 25.5,
                    "description": "预估单价"
                  },
                  "remark": {
                    "type": "string",
                    "description": "备注"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "更新成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "example": "打印纸",
                          "description": "物料名称"
                        },
                        "spec": {
                          "type": "string",
                          "example": "A4",
                          "description": "规格"
                        },
                        "quantity": {
                          "type": "integer",
                          "minimum": 0,
                          "exclusiveMinimum": true,
                          "example": 10,
                          "description": "数量"
                        },
                        "unit": {
                          "type": "string",
                          "example": "箱",
                          "description": "单位"
                        },
                        "estimatedUnitCost": {
                          "type": "number",
                          "minimum": 0,
                          "exclusiveMinimum": true,
                          "example": 25.5,
                          "description": "预估单价"
                        },
                        "remark": {
                          "type": "string",
                          "description": "备注"
                        },
                        "id": {
                          "type": "string",
                          "description": "物料明细ID"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "关联的请求ID"
                        },
                        "createdAt": {
                          "type": "string",
                          "description": "创建时间"
                        },
                        "updatedAt": {
                          "type": "string",
                          "description": "更新时间"
                        }
                      },
                      "required": [
                        "name",
                        "quantity",
                        "id",
                        "requestId",
                        "createdAt",
                        "updatedAt"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "未找到",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "错误信息"
                    },
                    "details": {
                      "nullable": true,
                      "description": "详细错误信息"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Consumable Request Items"
        ],
        "summary": "删除物料明细",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "物料明细ID"
            },
            "required": true,
            "description": "物料明细ID",
            "name": "itemId",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "删除成功"
          }
        }
      }
    },
    "/api/consumable-goods": {
      "get": {
        "tags": [
          "Consumable Goods"
        ],
        "summary": "查询易耗品种类列表（含规格/价格）",
        "description": "联合查询商品和 SKU 信息，返回商品及其所有规格、价格等详细信息",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "页码",
              "example": "1"
            },
            "required": false,
            "description": "页码",
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "每页数量",
              "example": "20"
            },
            "required": false,
            "description": "每页数量",
            "name": "pageSize",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "状态：0-正常，1-停用",
              "example": "0"
            },
            "required": false,
            "description": "状态：0-正常，1-停用",
            "name": "status",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "医院ID"
            },
            "required": false,
            "description": "医院ID",
            "name": "hospId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "分类ID"
            },
            "required": false,
            "description": "分类ID",
            "name": "categoryId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "搜索关键词（商品名称）",
              "example": "打印纸"
            },
            "required": false,
            "description": "搜索关键词（商品名称）",
            "name": "q",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "查询成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "number",
                            "description": "商品ID"
                          },
                          "goodsName": {
                            "type": "string",
                            "description": "商品名称",
                            "example": "打印纸"
                          },
                          "categoryId": {
                            "type": "number",
                            "nullable": true,
                            "description": "分类ID"
                          },
                          "brand": {
                            "type": "string",
                            "nullable": true,
                            "description": "品牌"
                          },
                          "status": {
                            "type": "number",
                            "nullable": true,
                            "description": "状态：0-正常，1-停用"
                          },
                          "hospId": {
                            "type": "string",
                            "nullable": true,
                            "description": "医院ID"
                          },
                          "skus": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "number",
                                  "description": "SKU ID"
                                },
                                "skuCode": {
                                  "type": "string",
                                  "nullable": true,
                                  "description": "SKU编码"
                                },
                                "specification": {
                                  "type": "string",
                                  "nullable": true,
                                  "description": "规格型号",
                                  "example": "A4 70g"
                                },
                                "barcode": {
                                  "type": "string",
                                  "description": "条形码"
                                },
                                "supplierId": {
                                  "type": "number",
                                  "nullable": true,
                                  "description": "供应商ID"
                                },
                                "purchasePrice": {
                                  "type": "number",
                                  "nullable": true,
                                  "description": "采购价格",
                                  "example": 25.5
                                },
                                "sellingPrice": {
                                  "type": "number",
                                  "nullable": true,
                                  "description": "销售价格",
                                  "example": 30
                                },
                                "unit": {
                                  "type": "string",
                                  "nullable": true,
                                  "description": "单位",
                                  "example": "包"
                                },
                                "minStock": {
                                  "type": "number",
                                  "nullable": true,
                                  "description": "最小库存"
                                },
                                "maxStock": {
                                  "type": "number",
                                  "nullable": true,
                                  "description": "最大库存"
                                },
                                "status": {
                                  "type": "number",
                                  "nullable": true,
                                  "description": "状态：0-正常，1-停用"
                                }
                              },
                              "required": [
                                "id",
                                "skuCode",
                                "specification",
                                "barcode",
                                "supplierId",
                                "purchasePrice",
                                "sellingPrice",
                                "unit",
                                "minStock",
                                "maxStock",
                                "status"
                              ]
                            },
                            "description": "SKU列表（规格/价格等信息）"
                          }
                        },
                        "required": [
                          "id",
                          "goodsName",
                          "categoryId",
                          "brand",
                          "status",
                          "hospId",
                          "skus"
                        ]
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer",
                          "description": "总数"
                        },
                        "page": {
                          "type": "integer",
                          "description": "当前页码"
                        },
                        "pageSize": {
                          "type": "integer",
                          "description": "每页数量"
                        }
                      },
                      "required": [
                        "total",
                        "page",
                        "pageSize"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/consumable-goods/{id}": {
      "get": {
        "tags": [
          "Consumable Goods"
        ],
        "summary": "获取易耗品种类详情（含规格/价格）",
        "description": "获取单个商品及其所有 SKU 规格、价格等详细信息",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "商品ID"
            },
            "required": true,
            "description": "商品ID",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "查询成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number",
                          "description": "商品ID"
                        },
                        "goodsName": {
                          "type": "string",
                          "description": "商品名称",
                          "example": "打印纸"
                        },
                        "categoryId": {
                          "type": "number",
                          "nullable": true,
                          "description": "分类ID"
                        },
                        "brand": {
                          "type": "string",
                          "nullable": true,
                          "description": "品牌"
                        },
                        "status": {
                          "type": "number",
                          "nullable": true,
                          "description": "状态：0-正常，1-停用"
                        },
                        "hospId": {
                          "type": "string",
                          "nullable": true,
                          "description": "医院ID"
                        },
                        "skus": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "number",
                                "description": "SKU ID"
                              },
                              "skuCode": {
                                "type": "string",
                                "nullable": true,
                                "description": "SKU编码"
                              },
                              "specification": {
                                "type": "string",
                                "nullable": true,
                                "description": "规格型号",
                                "example": "A4 70g"
                              },
                              "barcode": {
                                "type": "string",
                                "description": "条形码"
                              },
                              "supplierId": {
                                "type": "number",
                                "nullable": true,
                                "description": "供应商ID"
                              },
                              "purchasePrice": {
                                "type": "number",
                                "nullable": true,
                                "description": "采购价格",
                                "example": 25.5
                              },
                              "sellingPrice": {
                                "type": "number",
                                "nullable": true,
                                "description": "销售价格",
                                "example": 30
                              },
                              "unit": {
                                "type": "string",
                                "nullable": true,
                                "description": "单位",
                                "example": "包"
                              },
                              "minStock": {
                                "type": "number",
                                "nullable": true,
                                "description": "最小库存"
                              },
                              "maxStock": {
                                "type": "number",
                                "nullable": true,
                                "description": "最大库存"
                              },
                              "status": {
                                "type": "number",
                                "nullable": true,
                                "description": "状态：0-正常，1-停用"
                              }
                            },
                            "required": [
                              "id",
                              "skuCode",
                              "specification",
                              "barcode",
                              "supplierId",
                              "purchasePrice",
                              "sellingPrice",
                              "unit",
                              "minStock",
                              "maxStock",
                              "status"
                            ]
                          },
                          "description": "SKU列表（规格/价格等信息）"
                        }
                      },
                      "required": [
                        "id",
                        "goodsName",
                        "categoryId",
                        "brand",
                        "status",
                        "hospId",
                        "skus"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "未找到",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "错误信息"
                    },
                    "details": {
                      "nullable": true,
                      "description": "详细错误信息"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    }
  }
}