zhangqian
2024-06-28 1691d8ee8fe10799d98b296625fd30183407ef25
docs/swagger.yaml
@@ -74,6 +74,17 @@
    - CostingMethodStandardPrice
    - CostingMethodFIFO
    - CostingMethodAverageCost
  constvar.FileTemplateCategory:
    enum:
    - 1
    - 2
    type: integer
    x-enum-comments:
      FileTemplateCategory_Output: 出库
      FileTemplateCategory_Selfmade: 入库-自制
    x-enum-varnames:
    - FileTemplateCategory_Selfmade
    - FileTemplateCategory_Output
  constvar.FileType:
    enum:
    - file
@@ -297,6 +308,14 @@
    x-enum-varnames:
    - RuleType_Product
    - RuleType_ProductCategory
  constvar.SystemConfigType:
    enum:
    - 1
    type: integer
    x-enum-comments:
      SystemConfigTypeInventoryCutOffPoint: 库存结算时间点
    x-enum-varnames:
    - SystemConfigTypeInventoryCutOffPoint
  constvar.WhetherType:
    enum:
    - 1
@@ -311,6 +330,14 @@
    - WhetherTypeAsk
    - WhetherTypeAlways
    - ReservationNever
  gorm.DeletedAt:
    properties:
      time:
        type: string
      valid:
        description: Valid is true if Time is not NULL
        type: boolean
    type: object
  inventory_order.WorkerInfo:
    properties:
      id:
@@ -330,6 +357,34 @@
        $ref: '#/definitions/constvar.FileType'
      id:
        type: integer
    type: object
  models.Attribute:
    properties:
      createdAt:
        type: string
      dataType:
        description: 值类型(1字符串 2 int 3 下拉框 )
        type: integer
      deletedAt:
        $ref: '#/definitions/gorm.DeletedAt'
      entityType:
        description: 给谁用的 1 物料(产品)
        type: integer
      id:
        type: integer
      name:
        description: 属性名称
        type: string
      selectValues:
        description: dateType=3时用
        items:
          type: string
        type: array
      updatedAt:
        type: string
      value:
        description: 从AttributeValue取到的value
        type: string
    type: object
  models.Company:
    properties:
@@ -497,9 +552,14 @@
        items:
          $ref: '#/definitions/models.Attachment'
        type: array
      attributes:
        description: 动态属性
        items:
          $ref: '#/definitions/models.Attribute'
        type: array
      autoIncr:
        type: integer
      barcode:
      barCode:
        description: 条码
        type: string
      buyExplain:
@@ -531,6 +591,9 @@
      cost:
        description: 成本
        type: number
      createBy:
        description: 创建人
        type: string
      currencyName:
        description: 币种名称
        type: string
@@ -809,6 +872,8 @@
        allOf:
        - $ref: '#/definitions/constvar.BaseOperationType'
        description: 基础作业类型
      checkedBy:
        type: string
      comment:
        type: string
      companyID:
@@ -818,6 +883,8 @@
      contacterID:
        type: integer
      contacterName:
        type: string
      createBy:
        type: string
      createTime:
        type: string
@@ -831,6 +898,9 @@
        type: array
      id:
        type: integer
      isInternalOutput:
        description: 是否调拨产生的出库
        type: boolean
      location:
        allOf:
        - $ref: '#/definitions/models.Location'
@@ -875,6 +945,8 @@
        type: string
      receiverPhone:
        type: string
      remark:
        type: string
      salesDetailsNumber:
        type: string
      source:
@@ -895,6 +967,8 @@
        type: integer
      updateTime:
        type: string
      warehouseId:
        type: integer
      waybillNumber:
        description: 运单号
        type: string
@@ -912,6 +986,9 @@
        type: number
      auxiliaryUnit:
        type: string
      cost:
        description: 成本单价
        type: number
      createTime:
        type: string
      fromLocation:
@@ -923,6 +1000,9 @@
        type: integer
      id:
        type: integer
      isInternalOutput:
        description: 是否调拨产生的出库
        type: boolean
      operationId:
        description: 操作id
        type: integer
@@ -933,6 +1013,11 @@
      productId:
        description: 产品id
        type: string
      remark:
        type: string
      salePrice:
        description: 销售单价
        type: number
      toLocation:
        allOf:
        - $ref: '#/definitions/models.Location'
@@ -1023,6 +1108,25 @@
      updateTime:
        type: string
    type: object
  models.SystemConfig:
    properties:
      configType:
        allOf:
        - $ref: '#/definitions/constvar.SystemConfigType'
        description: 每月库存结算时间点
      createTime:
        type: string
      id:
        type: integer
      name:
        description: 设置名称
        type: string
      updateTime:
        type: string
      val:
        description: 设置值
        type: string
    type: object
  models.UnitDict:
    properties:
      id:
@@ -1037,6 +1141,7 @@
      amount:
        type: number
      floating:
        description: 是否浮动利率
        type: boolean
      unit:
        type: string
@@ -1064,6 +1169,10 @@
        type: string
      createTime:
        type: string
      fileTemplateCategoryIn:
        $ref: '#/definitions/constvar.FileTemplateCategory'
      fileTemplateCategoryOut:
        $ref: '#/definitions/constvar.FileTemplateCategory'
      id:
        type: integer
      inboundTransportation:
@@ -1095,6 +1204,31 @@
        type: string
      warehouseLocation:
        description: 库存位置
        type: string
    type: object
  request.AddAttribute:
    properties:
      dataType:
        description: 值类型(1字符串 2 int 3 下拉框 )
        type: integer
      entityType:
        description: 给谁用的 1 物料(产品)
        type: integer
      name:
        description: 属性名称
        type: string
      selectValues:
        items:
          type: string
        type: array
    type: object
  request.AddAttributeValue:
    properties:
      attributeId:
        type: integer
      entityId:
        type: string
      value:
        type: string
    type: object
  request.AddCompany:
@@ -1160,6 +1294,10 @@
        type: string
      accountantId:
        type: string
      baseOperationType:
        allOf:
        - $ref: '#/definitions/constvar.BaseOperationType'
        description: 基础作业类型 5库存盘点
      comment:
        description: 备注
        type: string
@@ -1226,6 +1364,9 @@
        description: 状态
      toLocationId:
        description: 目标位置id
        type: integer
      warehouseId:
        description: 仓库id
        type: integer
      waybillNumber:
        description: 运单号
@@ -1325,6 +1466,19 @@
        type: array
    required:
    - code
    type: object
  request.AttributeList:
    properties:
      entityType:
        type: integer
      keyword:
        type: string
      page:
        description: 页码
        type: integer
      pageSize:
        description: 每页大小
        type: integer
    type: object
  request.DoMonthStats:
    properties:
@@ -1512,11 +1666,20 @@
    properties:
      condition:
        type: string
      keyword:
        description: 关键字搜索
        type: string
      locationId:
        description: 位置ID
        type: integer
      page:
        description: 页码
        type: integer
      pageSize:
        description: 每页大小
        type: integer
      warehouseId:
        description: 仓库ID
        type: integer
    type: object
  request.OperationDetails:
@@ -1534,6 +1697,9 @@
      auxiliaryUnit:
        description: 辅助单位
        type: string
      cost:
        description: 成本单价
        type: number
      fromLocationId:
        description: |-
          Unit        string          `json:"unit" gorm:"type:varchar(31);comment:单位"`                    //单位
@@ -1542,6 +1708,11 @@
      productId:
        description: 产品id
        type: string
      remark:
        type: string
      salePrice:
        description: 销售单价
        type: number
      toLocationId:
        description: 目标位置id
        type: integer
@@ -1554,6 +1725,10 @@
    type: object
  request.OperationList:
    properties:
      baseOperationType:
        allOf:
        - $ref: '#/definitions/constvar.BaseOperationType'
        description: 1 入库 2 出库 3 内部调拨 4 报废 5 库存盘点
      number:
        type: string
      operationTypeId:
@@ -1618,11 +1793,55 @@
          $ref: '#/definitions/request.UnitDict'
        type: array
    type: object
  request.SystemConfig:
    properties:
      ID:
        type: integer
      configType:
        allOf:
        - $ref: '#/definitions/constvar.SystemConfigType'
        description: 1 每月库存结算时间点
      name:
        description: 设置名称
        type: string
      val:
        description: 设置值
        type: string
    type: object
  request.UnitDict:
    properties:
      isDefault:
        type: boolean
      name:
        type: string
    type: object
  request.UpdateAttribute:
    properties:
      dataType:
        description: 值类型(1字符串 2 int 3 下拉框 )
        type: integer
      entityType:
        description: 给谁用的 1 物料(产品)
        type: integer
      id:
        type: integer
      name:
        description: 属性名称
        type: string
      selectValues:
        items:
          type: string
        type: array
    type: object
  request.UpdateAttributeValue:
    properties:
      attributeId:
        type: integer
      entityId:
        type: string
      id:
        type: integer
      value:
        type: string
    type: object
  request.UpdateCompany:
@@ -1858,18 +2077,38 @@
      amount:
        description: 在库数量
        type: number
      amountMoreUnits:
        description: 在库数量多单位
        items:
          $ref: '#/definitions/models.UnitItems'
        type: array
      availableNumber:
        description: 可用库存
        type: number
      availableNumberMoreUnits:
        description: 可用库存多单位
        items:
          $ref: '#/definitions/models.UnitItems'
        type: array
      cost:
        description: 成本
        type: number
      in:
        description: 入库
        type: number
      inMoreUnits:
        description: 入库多单位
        items:
          $ref: '#/definitions/models.UnitItems'
        type: array
      out:
        description: 出库
        type: number
      outMoreUnits:
        description: 出库多单位
        items:
          $ref: '#/definitions/models.UnitItems'
        type: array
      produceId:
        description: 产品id
        type: string
@@ -1891,6 +2130,11 @@
      amount:
        description: 数量
        type: number
      amountMoreUnits:
        description: 在库数量多单位
        items:
          $ref: '#/definitions/models.UnitItems'
        type: array
      locationId:
        description: 位置id
        type: integer
@@ -2044,6 +2288,186 @@
      summary: 上传附件
      tags:
      - 附件管理
  /api-wms/v1/attribute/attribute:
    get:
      parameters:
      - description: 属性值和对象信息
        in: body
        name: object
        required: true
        schema:
          $ref: '#/definitions/request.AttributeList'
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            $ref: '#/definitions/util.Response'
      summary: 添加属性值和对象
      tags:
      - 属性值和对象
    post:
      parameters:
      - description: 属性信息
        in: body
        name: object
        required: true
        schema:
          $ref: '#/definitions/request.AddAttribute'
      - description: token
        in: header
        name: Authorization
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            $ref: '#/definitions/util.Response'
      summary: 添加属性
      tags:
      - 属性
  /api-wms/v1/attribute/delete/{id}:
    delete:
      parameters:
      - description: token
        in: header
        name: Authorization
        required: true
        type: string
      - 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/attribute/primary/{id}:
    get:
      responses:
        "200":
          description: 成功
          schema:
            $ref: '#/definitions/util.Response'
      summary: 查询属性值和对象 通过主键ID查询
      tags:
      - 属性值和对象
  /api-wms/v1/attribute/updateAttribute/{id}:
    put:
      parameters:
      - description: 属性信息
        in: body
        name: object
        required: true
        schema:
          $ref: '#/definitions/request.UpdateAttribute'
      - description: 属性id
        in: path
        name: id
        required: true
        type: string
      - description: token
        in: header
        name: Authorization
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            $ref: '#/definitions/util.Response'
      summary: 编辑属性
      tags:
      - 属性
  /api-wms/v1/attributeValue/add:
    post:
      parameters:
      - description: 属性值和对象信息
        in: body
        name: object
        required: true
        schema:
          $ref: '#/definitions/request.AddAttributeValue'
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            $ref: '#/definitions/util.Response'
      summary: 添加属性值和对象
      tags:
      - 属性值和对象
  /api-wms/v1/attributeValue/delete/{id}:
    delete:
      parameters:
      - description: id
        in: path
        name: id
        required: true
        type: string
      responses:
        "200":
          description: 成功
          schema:
            $ref: '#/definitions/util.Response'
      summary: 删除属性值和对象
      tags:
      - 属性值和对象
  /api-wms/v1/attributeValue/list:
    post:
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            $ref: '#/definitions/util.Response'
      summary: 查询属性值和对象 分页条件筛选Value like '%v%' 模糊查询
      tags:
      - 属性值和对象
  /api-wms/v1/attributeValue/primary/{id}:
    get:
      responses:
        "200":
          description: 成功
          schema:
            $ref: '#/definitions/util.Response'
      summary: 查询属性值和对象 通过主键ID查询
      tags:
      - 属性值和对象
  /api-wms/v1/attributeValue/update:
    post:
      parameters:
      - description: 属性值和对象信息
        in: body
        name: object
        required: true
        schema:
          $ref: '#/definitions/request.UpdateAttributeValue'
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            $ref: '#/definitions/util.Response'
      summary: 更新属性值和对象
      tags:
      - 属性值和对象
  /api-wms/v1/code/getAutoCode:
    post:
      parameters:
@@ -3073,7 +3497,8 @@
  /api-wms/v1/operationType/operationType:
    get:
      parameters:
      - in: query
      - description: 关键字搜索
        in: query
        name: keyword
        type: string
      - description: 页码
@@ -3083,6 +3508,10 @@
      - description: 每页大小
        in: query
        name: pageSize
        type: integer
      - description: 仓库id
        in: query
        name: warehouseId
        type: integer
      produces:
      - application/json
@@ -3243,7 +3672,25 @@
          description: 成功
          schema:
            $ref: '#/definitions/util.Response'
      summary: 删除产品
      summary: 通过产品/商品/物料 ID删除产品
      tags:
      - 产品
  /api-wms/v1/product/deleteProductByBarCode/{barCode}:
    delete:
      parameters:
      - description: barCode
        in: path
        name: barCode
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            $ref: '#/definitions/util.Response'
      summary: 通过产品/商品/物料 条形码删除产品
      tags:
      - 产品
  /api-wms/v1/product/deleteProductCategory/{id}:
@@ -3334,6 +3781,11 @@
  /api-wms/v1/product/getProductDetails/{id}:
    get:
      parameters:
      - description: token
        in: header
        name: Authorization
        required: true
        type: string
      - description: id
        in: path
        name: id
@@ -3351,7 +3803,35 @@
                data:
                  $ref: '#/definitions/models.Material'
              type: object
      summary: 获取产品详情
      summary: 通过产品/商品/物料 ID获取产品详情
      tags:
      - 产品
  /api-wms/v1/product/getProductDetailsByBarCode/{barCode}:
    get:
      parameters:
      - description: token
        in: header
        name: Authorization
        required: true
        type: string
      - description: barCode
        in: path
        name: barCode
        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:
@@ -3417,6 +3897,31 @@
      summary: 获取登录用户信息
      tags:
      - 产品
  /api-wms/v1/product/inputProduct:
    post:
      consumes:
      - multipart/form-data
      parameters:
      - description: file
        in: formData
        name: file
        required: true
        type: file
      - description: token
        in: header
        name: Authorization
        required: true
        type: string
      produces:
      - application/xlsx
      responses:
        "200":
          description: 成功
          schema:
            $ref: '#/definitions/util.Response'
      summary: 导入物料
      tags:
      - 物料管理
  /api-wms/v1/product/listDisuse:
    post:
      parameters:
@@ -3693,6 +4198,64 @@
      summary: 更新重订货规则
      tags:
      - 重订货规则
  /api-wms/v1/systemConfig/get:
    get:
      parameters:
      - description: 1 每月库存结算时间点
        enum:
        - 1
        in: query
        name: configType
        required: true
        type: integer
        x-enum-comments:
          SystemConfigTypeInventoryCutOffPoint: 库存结算时间点
        x-enum-varnames:
        - SystemConfigTypeInventoryCutOffPoint
      - description: token
        in: header
        name: Authorization
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            allOf:
            - $ref: '#/definitions/util.Response'
            - properties:
                data:
                  $ref: '#/definitions/models.SystemConfig'
              type: object
      summary: 根据设置类型查询系统设置
      tags:
      - 系统设置
  /api-wms/v1/systemConfig/save:
    post:
      parameters:
      - description: 系统设置信息
        in: body
        name: object
        required: true
        schema:
          $ref: '#/definitions/request.SystemConfig'
      - description: token
        in: header
        name: Authorization
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            $ref: '#/definitions/util.Response'
      summary: 保存系统设置
      tags:
      - 系统设置
  /api-wms/v1/warehouse/getWarehouseDetails/{id}:
    get:
      parameters: