liujiandao
2023-09-20 548030097f2b95dff474c397c7393168c73ab8a2
docs/swagger.yaml
@@ -13,6 +13,41 @@
    - BaseOperationTypeIncoming
    - BaseOperationTypeOutgoing
    - BaseOperationTypeInternal
  constvar.CostingMethod:
    enum:
    - 1
    - 2
    - 3
    type: integer
    x-enum-comments:
      CostingMethodAverageCost: 平均成本
      CostingMethodFIFO: 先进先出
      CostingMethodStandardPrice: 标准价格
    x-enum-varnames:
    - CostingMethodStandardPrice
    - CostingMethodFIFO
    - CostingMethodAverageCost
  constvar.ForceRemovalStrategy:
    enum:
    - 1
    - 2
    - 3
    type: integer
    x-enum-varnames:
    - ForceRemovalStrategyFIFO
    - ForceRemovalStrategyLIFO
    - ForceRemovalStrategyClosestLocation
  constvar.InventoryValuation:
    enum:
    - 1
    - 2
    type: integer
    x-enum-comments:
      InventoryValuationAuto: 自动
      InventoryValuationManual: 手动
    x-enum-varnames:
    - InventoryValuationManual
    - InventoryValuationAuto
  constvar.InvoicingStrategy:
    enum:
    - 1
@@ -59,6 +94,16 @@
    - LocationTypeInventoryLoss
    - LocationTypeProduction
    - LocationTypeTransit
  constvar.MaterialMode:
    enum:
    - 原材料
    - 半成品
    - 成品
    type: string
    x-enum-varnames:
    - MaterialModeRaw
    - MaterialModeSemi
    - MaterialModeFinished
  constvar.OperationStatus:
    enum:
    - 1
@@ -93,20 +138,6 @@
    - Task
    - Object
    - TaskAndObject
  constvar.ProductType:
    enum:
    - 1
    - 2
    - 3
    type: integer
    x-enum-comments:
      Consumables: 消耗品
      Server: 服务
      StoredProduct: 可储存的产品
    x-enum-varnames:
    - Consumables
    - Server
    - StoredProduct
  constvar.ReservationMethod:
    enum:
    - 1
@@ -212,6 +243,120 @@
      updateTime:
        type: string
    type: object
  models.Material:
    properties:
      HSCode:
        type: string
      amount:
        type: number
      barcode:
        description: 条码
        type: string
      buyExplain:
        type: string
      canBePurchased:
        description: 是否可采购
        type: boolean
      categoryId:
        description: 产品类别id
        type: integer
      companyId:
        type: integer
      companyName:
        type: string
      controlStrategy:
        $ref: '#/definitions/constvar.InvoicingStrategy'
      cost:
        description: 成本
        type: number
      currencyName:
        type: string
      customerTaxes:
        description: 客户税百分比
        type: number
      deliveryAdvanceTime:
        type: integer
      id:
        type: string
      inStorageExplain:
        type: string
      internalNotes:
        description: 内部说明
        type: string
      internalReference:
        description: 内部参考
        type: string
      internalTransferExplain:
        type: string
      invoicingStrategy:
        allOf:
        - $ref: '#/definitions/constvar.InvoicingStrategy'
        description: wms添加字段
      isSale:
        description: PurchaseType      constvar.PurchaseType `gorm:"type:int(11);comment:采购类型"
          json:"purchaseType"`
        type: boolean
      maxInventory:
        type: number
      minInventory:
        description: |-
          Explain           string                  `gorm:"type:varchar(512);comment:编号说明" json:"explain"`
          CodeStandardID    string                  `gorm:"type:varchar(191);comment:编码规范ID" json:"codeStandardID"`
          Specs             string                  `gorm:"type:varchar(191);comment:物料规格" json:"specs"`
          Type              string                  `gorm:"type:varchar(191);comment:物料型号" json:"type"`
        type: number
      minPurchaseAmount:
        description: |-
          PurchaseAheadDay  int                     `gorm:"type:int(11);comment:采购提前期(天)" json:"purchaseAheadDay"`
          ProduceAheadDay   int                     `gorm:"type:int(11);comment:制造提前期(天)" json:"produceAheadDay"`
        type: number
      model:
        allOf:
        - $ref: '#/definitions/constvar.MaterialMode'
        description: MaterialType constvar.ProductType  `gorm:"index;type:int(11);comment:物料类型(数字)"
          json:"materialType"`
      name:
        type: string
      orderCreation:
        $ref: '#/definitions/constvar.OrderCreation'
      originCountryId:
        type: integer
      originCountryName:
        type: string
      outStorageExplain:
        type: string
      principal:
        description: 负责人
        type: string
      productTagId:
        description: 产品标签
        type: integer
      productTagName:
        type: string
      purchasePrice:
        type: number
      salePrice:
        type: number
      selectProduct:
        type: integer
      sellExplain:
        type: string
      supplier:
        description: |-
          FSource           string                  `gorm:"type:varchar(191);comment:生产车间" json:"-"`
          Status            constvar.MaterialStatus `gorm:"type:int(11);comment:状态" json:"status"`
        type: string
      unit:
        description: LockAmount        decimal.Decimal         `gorm:"type:decimal(35,18);default:0;comment:锁定数量"
          json:"lockAmount"`
        type: string
      volume:
        description: 体积
        type: number
      weight:
        description: 重量
        type: number
    type: object
  models.OperationType:
    properties:
      ReservationDaysBeforePriority:
@@ -282,106 +427,33 @@
        description: 仓库id
        type: integer
    type: object
  models.Product:
  models.ProductCategory:
    properties:
      HSCode:
        type: string
      barcode:
        description: 条码
        type: string
      buyExplain:
        type: string
      canBePurchased:
        description: 是否可采购
        type: boolean
      canBeSell:
        description: 是否销售
        type: boolean
      categoryId:
        description: 产品分类id
        type: integer
      companyId:
        type: integer
      companyName:
        type: string
      controlStrategy:
        $ref: '#/definitions/constvar.InvoicingStrategy'
      cost:
        description: 成本
        type: number
      createTime:
        type: string
      currencyId:
        type: integer
      currencyName:
        type: string
      customerAdvanceTime:
        type: number
      customerTaxes:
        description: 客户税百分比
        type: number
      deliveryAdvanceTime:
        type: number
      costingMethod:
        allOf:
        - $ref: '#/definitions/constvar.CostingMethod'
        description: 成本方法
      forceRemovalStrategy:
        allOf:
        - $ref: '#/definitions/constvar.ForceRemovalStrategy'
        description: 强制下架策略
      id:
        type: integer
      inStorageExplain:
        type: string
      internalNotes:
        description: 内部说明
        type: string
      internalReference:
        description: 内部参考
        type: string
      internalTransferExplain:
        type: string
      invoicingStrategy:
        $ref: '#/definitions/constvar.InvoicingStrategy'
      name:
        description: 产品名称
        type: string
      objectTemplateId:
        type: string
      orderCreation:
        $ref: '#/definitions/constvar.OrderCreation'
      originCountryId:
        type: integer
      originCountryName:
        type: string
      outStorageExplain:
        type: string
      price:
        type: number
      principal:
        description: 负责人
        type: string
      productTagId:
        description: 产品标签
        type: integer
      productTagName:
        type: string
      salePrice:
        description: 销售价格
        type: number
      selectProduct:
        type: integer
      sellExplain:
        type: string
      supplierId:
        type: integer
      supplierName:
        type: string
      type:
      inventoryValuation:
        allOf:
        - $ref: '#/definitions/constvar.ProductType'
        description: 产品类型
      updateTime:
        - $ref: '#/definitions/constvar.InventoryValuation'
        description: 库存计价
      name:
        description: 位置名称
        type: string
      volume:
        description: 体积
        type: number
      weight:
        description: 重量
        type: number
      parentId:
        description: 上级id
        type: integer
      routeId:
        type: integer
      routeName:
        description: 公司
        type: string
    type: object
  models.Warehouse:
    properties:
@@ -902,7 +974,7 @@
        name: object
        required: true
        schema:
          $ref: '#/definitions/models.Product'
          $ref: '#/definitions/models.Material'
      produces:
      - application/json
      responses:
@@ -911,6 +983,133 @@
          schema:
            $ref: '#/definitions/util.Response'
      summary: 添加产品
      tags:
      - 产品
  /api-wms/v1/product/addProductCategory:
    post:
      parameters:
      - description: 产品类型信息
        in: body
        name: object
        required: true
        schema:
          $ref: '#/definitions/models.ProductCategory'
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            $ref: '#/definitions/util.Response'
      summary: 添加产品类型
      tags:
      - 产品类型
  /api-wms/v1/product/deleteProduct/{id}:
    delete:
      parameters:
      - description: id
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            $ref: '#/definitions/util.Response'
      summary: 删除产品
      tags:
      - 产品
  /api-wms/v1/product/deleteProductCategory/{id}:
    delete:
      parameters:
      - description: id
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            $ref: '#/definitions/util.Response'
      summary: 删除产品类型
      tags:
      - 产品类型
  /api-wms/v1/product/getProductCategoryDetails/{id}:
    get:
      parameters:
      - description: id
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            allOf:
            - $ref: '#/definitions/util.Response'
            - properties:
                data:
                  $ref: '#/definitions/models.Material'
              type: object
      summary: 获取产品类型详情
      tags:
      - 产品类型
  /api-wms/v1/product/getProductCategoryList:
    post:
      parameters:
      - description: 查询参数
        in: body
        name: object
        required: true
        schema:
          $ref: '#/definitions/request.GetProductList'
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            allOf:
            - $ref: '#/definitions/util.ResponseList'
            - properties:
                data:
                  items:
                    $ref: '#/definitions/models.ProductCategory'
                  type: array
              type: object
      summary: 获取产品类型列表
      tags:
      - 产品类型
  /api-wms/v1/product/getProductDetails/{id}:
    get:
      parameters:
      - description: id
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            allOf:
            - $ref: '#/definitions/util.Response'
            - properties:
                data:
                  $ref: '#/definitions/models.Material'
              type: object
      summary: 获取产品详情
      tags:
      - 产品
  /api-wms/v1/product/getProductList:
@@ -933,12 +1132,50 @@
            - properties:
                data:
                  items:
                    $ref: '#/definitions/models.Product'
                    $ref: '#/definitions/models.Material'
                  type: array
              type: object
      summary: 获取产品详情
      summary: 获取产品列表
      tags:
      - 产品
  /api-wms/v1/product/updateProduct:
    post:
      parameters:
      - description: 产品信息
        in: body
        name: object
        required: true
        schema:
          $ref: '#/definitions/models.Material'
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            $ref: '#/definitions/util.Response'
      summary: 修改产品
      tags:
      - 产品
  /api-wms/v1/product/updateProductCategory:
    post:
      parameters:
      - description: 产品信息
        in: body
        name: object
        required: true
        schema:
          $ref: '#/definitions/models.ProductCategory'
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            $ref: '#/definitions/util.Response'
      summary: 修改产品类型
      tags:
      - 产品类型
  /api-wms/v1/warehouse/operationType:
    get:
      parameters: