zhangqian
2024-04-17 e63c9d7f5f5c0819ee949697aec753895cc88ab5
docs/swagger.yaml
@@ -393,6 +393,360 @@
        description: 栈名
        type: string
    type: object
  constvar.BoolType:
    enum:
    - 1
    - 2
    type: integer
    x-enum-comments:
      BoolTypeFalse: "false"
      BoolTypeTrue: "true"
    x-enum-varnames:
    - BoolTypeTrue
    - BoolTypeFalse
  constvar.OutsourcingOrderStatus:
    enum:
    - 0
    - 1
    - 2
    - 3
    - 4
    - 5
    - 6
    - 7
    - 8
    - 9
    type: integer
    x-enum-comments:
      OutsourcingOrderStatusAssigned: 已分配委外商
      OutsourcingOrderStatusClose: 关闭
      OutsourcingOrderStatusCreate: 新建待分配委外商
      OutsourcingOrderStatusDeliveryFinish: 发货完成
      OutsourcingOrderStatusFinish: 生产完成
      OutsourcingOrderStatusMaterialApplying: 物料申请中/待领料审核
      OutsourcingOrderStatusMaterialExamineRefused: 领料审核拒绝
      OutsourcingOrderStatusProducing: 生产中
      OutsourcingOrderStatusReceiveFinish: 收货完成
      OutsourcingOrderStatusWaitProduce: 待生产
    x-enum-varnames:
    - OutsourcingOrderStatusCreate
    - OutsourcingOrderStatusAssigned
    - OutsourcingOrderStatusWaitProduce
    - OutsourcingOrderStatusMaterialApplying
    - OutsourcingOrderStatusMaterialExamineRefused
    - OutsourcingOrderStatusProducing
    - OutsourcingOrderStatusFinish
    - OutsourcingOrderStatusDeliveryFinish
    - OutsourcingOrderStatusReceiveFinish
    - OutsourcingOrderStatusClose
  constvar.RecordStatus:
    enum:
    - 0
    - 1
    - 2
    type: integer
    x-enum-comments:
      RecordStatusActive: 启用
      RecordStatusCreate: 新建
      RecordStatusInactive: 停用
    x-enum-varnames:
    - RecordStatusCreate
    - RecordStatusActive
    - RecordStatusInactive
  contextx.Response:
    properties:
      code:
        type: integer
      data: {}
      msg:
        type: string
    type: object
  gorm.DeletedAt:
    properties:
      time:
        type: string
      valid:
        description: Valid is true if Time is not NULL
        type: boolean
    type: object
  models.OutsourcingEnterprise:
    properties:
      address:
        description: 地址
        type: string
      contact:
        description: 联系人
        type: string
      createdAt:
        type: string
      creditGrade:
        description: 信用等级
        type: string
      deletedAt:
        $ref: '#/definitions/gorm.DeletedAt'
      enterpriseType:
        description: 企业类型
        type: string
      id:
        type: integer
      name:
        description: 委外企业编号名称
        type: string
      number:
        description: 委外企业编号
        type: string
      organizationCode:
        description: 组织机构代码
        type: string
      status:
        allOf:
        - $ref: '#/definitions/constvar.RecordStatus'
        description: 状态 0 新建 1 启用 2停用
      supplyCapacity:
        description: 供货能力
        type: string
      supplyRange:
        description: 供货范围
        type: string
      tel:
        description: 联系方式
        type: string
      updatedAt:
        type: string
    type: object
  models.OutsourcingOrder:
    properties:
      createdAt:
        type: string
      deletedAt:
        $ref: '#/definitions/gorm.DeletedAt'
      deliveryDate:
        type: string
      enterpriseID:
        description: 供应商ID
        type: integer
      enterpriseName:
        description: 供应商名称
        type: string
      enterpriseType:
        description: 供应商类型
        type: string
      id:
        type: integer
      number:
        description: 订单编号
        type: string
      productQuantity:
        description: 产品数量
        type: integer
      projectId:
        type: string
      projectOrderID:
        type: string
      reason:
        type: string
      salesDetailsNumber:
        type: string
      signTime:
        type: string
      status:
        allOf:
        - $ref: '#/definitions/constvar.OutsourcingOrderStatus'
        description: 状态
      updatedAt:
        type: string
    type: object
  models.OutsourcingOrderProduct:
    properties:
      amount:
        type: integer
      bomID:
        type: string
      createdAt:
        type: string
      deletedAt:
        $ref: '#/definitions/gorm.DeletedAt'
      enterpriseID:
        description: 供应商ID
        type: integer
      finishAmount:
        type: integer
      id:
        type: integer
      outsourcingOrderID:
        type: integer
      productId:
        type: string
      productName:
        type: string
      specs:
        type: string
      type:
        type: string
      unit:
        type: string
      updatedAt:
        type: string
    type: object
  outsourcingrequest.ChangeStatus:
    properties:
      outsourcingOrderNumber:
        description: 委外订单编码
        type: string
      reason:
        type: string
      status:
        $ref: '#/definitions/constvar.OutsourcingOrderStatus'
    type: object
  outsourcingrequest.ConfirmDeliveryList:
    properties:
      outsourcingOrderDeliveryDetailsIds:
        description: 发货记录id
        items:
          type: integer
        type: array
      outsourcingOrderID:
        description: 委外订单ID
        type: integer
      warehouseId:
        description: 仓库id
        type: string
    type: object
  outsourcingrequest.GetDeliveryList:
    properties:
      isReceived:
        allOf:
        - $ref: '#/definitions/constvar.BoolType'
        description: 是否确认收货 1 已确认 2未确认 传0或不传获取全部
      outsourcingOrderID:
        description: 委外订单ID
        type: integer
    type: object
  outsourcingrequest.GetInventoryInputDetails:
    properties:
      outsourcingOrderID:
        description: 委外订单ID
        type: integer
    type: object
  outsourcingrequest.GetMaterialApplyList:
    properties:
      keyword:
        description: 关键字
        type: string
      number:
        description: 委外订单编码
        type: string
      page:
        description: 页码
        type: integer
      pageSize:
        description: 每页大小
        type: integer
    type: object
  outsourcingrequest.MaterialApply:
    properties:
      amount:
        type: number
      materialName:
        type: string
      materialNumber:
        type: string
      outsourcingOrderNumber:
        type: string
      specs:
        type: string
      type:
        type: string
      unit:
        type: string
    type: object
  outsourcingrequest.OutsourcingEnterprise:
    properties:
      address:
        description: 地址
        type: string
      contact:
        description: 联系人
        type: string
      creditGrade:
        description: 信用等级
        type: string
      enterpriseType:
        description: 企业类型
        type: string
      id:
        type: integer
      name:
        description: 委外供应商编号名称
        type: string
      number:
        description: 委外供应商编号
        type: string
      organizationCode:
        description: 组织机构代码
        type: string
      status:
        allOf:
        - $ref: '#/definitions/constvar.RecordStatus'
        description: 状态 0 新建 1 启用 2停用
      supplyCapacity:
        description: 供货能力
        type: string
      supplyRange:
        description: 供货范围
        type: string
      tel:
        description: 联系方式
        type: string
    required:
    - enterpriseType
    - name
    - number
    type: object
  outsourcingrequest.OutsourcingEnterpriseOverview:
    properties:
      close:
        description: 停用数量
        type: integer
      open:
        description: 启用数量
        type: integer
      total:
        description: 总量
        type: integer
    type: object
  outsourcingrequest.OutsourcingOrderAssign:
    properties:
      enterpriseID:
        type: integer
      orderID:
        type: integer
      orderIDs:
        items:
          type: integer
        type: array
    required:
    - enterpriseID
    type: object
  outsourcingrequest.OutsourcingOrderOverview:
    properties:
      hasAssigned:
        description: 已分配数量
        type: integer
      total:
        description: 总量
        type: integer
      waitAssigned:
        description: 待分配数量
        type: integer
    type: object
  outsourcingrequest.SaveMaterialApply:
    properties:
      applyList:
        items:
          $ref: '#/definitions/outsourcingrequest.MaterialApply'
        type: array
    type: object
  purchase.OrderStatus:
    enum:
    - 1
@@ -1171,6 +1525,28 @@
      updated_at:
        type: string
    type: object
  utils.Response:
    properties:
      code:
        type: integer
      data: {}
      msg:
        type: string
    type: object
  utils.ResponseList:
    properties:
      code:
        type: integer
      data: {}
      msg:
        type: string
      page:
        type: integer
      pageSize:
        type: integer
      total:
        type: integer
    type: object
info:
  contact: {}
  description: This is a sample Server pets
@@ -1858,6 +2234,436 @@
      summary: 更新Member
      tags:
      - Member
  /outsourcing/enterprise/add:
    post:
      parameters:
      - description: token
        in: header
        name: Authorization
        required: true
        type: string
      - description: 查询参数
        in: body
        name: object
        required: true
        schema:
          $ref: '#/definitions/outsourcingrequest.OutsourcingEnterprise'
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            $ref: '#/definitions/contextx.Response'
      summary: 企业新增
      tags:
      - 委外企业管理
  /outsourcing/enterprise/list:
    get:
      parameters:
      - description: token
        in: header
        name: Authorization
        required: true
        type: string
      - in: query
        name: keyword
        type: string
      - description: 页码
        in: query
        name: page
        type: integer
      - description: 每页大小
        in: query
        name: pageSize
        type: integer
      - description: 状态 0 新建 1 启用 2停用
        enum:
        - 0
        - 1
        - 2
        in: query
        name: status
        type: integer
        x-enum-comments:
          RecordStatusActive: 启用
          RecordStatusCreate: 新建
          RecordStatusInactive: 停用
        x-enum-varnames:
        - RecordStatusCreate
        - RecordStatusActive
        - RecordStatusInactive
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            allOf:
            - $ref: '#/definitions/utils.ResponseList'
            - properties:
                data:
                  items:
                    $ref: '#/definitions/models.OutsourcingEnterprise'
                  type: array
              type: object
      summary: 企业列表
      tags:
      - 委外企业管理
  /outsourcing/enterprise/overview:
    get:
      parameters:
      - description: token
        in: header
        name: Authorization
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            allOf:
            - $ref: '#/definitions/utils.ResponseList'
            - properties:
                data:
                  $ref: '#/definitions/outsourcingrequest.OutsourcingEnterpriseOverview'
              type: object
      summary: 企业统计
      tags:
      - 委外企业管理
  /outsourcing/enterprise/productList:
    get:
      parameters:
      - description: token
        in: header
        name: Authorization
        required: true
        type: string
      - in: query
        name: enterpriseID
        required: true
        type: integer
      - in: query
        name: keyword
        type: string
      - description: 页码
        in: query
        name: page
        type: integer
      - description: 每页大小
        in: query
        name: pageSize
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            allOf:
            - $ref: '#/definitions/utils.ResponseList'
            - properties:
                data:
                  items:
                    $ref: '#/definitions/models.OutsourcingOrderProduct'
                  type: array
              type: object
      summary: 委外企业供货历史
      tags:
      - 委外企业管理
  /outsourcing/enterprise/update:
    post:
      parameters:
      - description: token
        in: header
        name: Authorization
        required: true
        type: string
      - description: 查询参数
        in: body
        name: object
        required: true
        schema:
          $ref: '#/definitions/outsourcingrequest.OutsourcingEnterprise'
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            $ref: '#/definitions/contextx.Response'
      summary: 企业修改
      tags:
      - 委外企业管理
  /outsourcing/order/assign:
    post:
      parameters:
      - description: token
        in: header
        name: Authorization
        required: true
        type: string
      - description: 查询参数
        in: body
        name: object
        required: true
        schema:
          $ref: '#/definitions/outsourcingrequest.OutsourcingOrderAssign'
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            $ref: '#/definitions/contextx.Response'
      summary: 委外订单分配企业
      tags:
      - 委外企业管理
  /outsourcing/order/changeStatus:
    post:
      parameters:
      - description: token
        in: header
        name: Authorization
        required: true
        type: string
      - description: 参数
        in: body
        name: object
        required: true
        schema:
          $ref: '#/definitions/outsourcingrequest.ChangeStatus'
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            $ref: '#/definitions/utils.Response'
      summary: 修改状态
      tags:
      - 委外企业管理
  /outsourcing/order/confirmReceipt:
    post:
      parameters:
      - description: token
        in: header
        name: Authorization
        required: true
        type: string
      - description: 参数
        in: body
        name: object
        required: true
        schema:
          $ref: '#/definitions/outsourcingrequest.ConfirmDeliveryList'
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            $ref: '#/definitions/utils.ResponseList'
      summary: 委外入库 确认入库
      tags:
      - 委外企业管理
  /outsourcing/order/deliveryList:
    post:
      parameters:
      - description: token
        in: header
        name: Authorization
        required: true
        type: string
      - description: 参数
        in: body
        name: object
        required: true
        schema:
          $ref: '#/definitions/outsourcingrequest.GetDeliveryList'
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            $ref: '#/definitions/utils.ResponseList'
      summary: 获取发货列表
      tags:
      - 委外企业管理
  /outsourcing/order/getInventoryInputDetails:
    post:
      parameters:
      - description: token
        in: header
        name: Authorization
        required: true
        type: string
      - description: 参数
        in: body
        name: object
        required: true
        schema:
          $ref: '#/definitions/outsourcingrequest.GetInventoryInputDetails'
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            $ref: '#/definitions/utils.ResponseList'
      summary: 获取委外入库明细
      tags:
      - 委外企业管理
  /outsourcing/order/getMaterialApplyList:
    post:
      parameters:
      - description: token
        in: header
        name: Authorization
        required: true
        type: string
      - description: 参数
        in: body
        name: object
        required: true
        schema:
          $ref: '#/definitions/outsourcingrequest.GetMaterialApplyList'
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            $ref: '#/definitions/utils.ResponseList'
      summary: 获取物料申请单
      tags:
      - 委外企业管理
  /outsourcing/order/list:
    get:
      parameters:
      - description: token
        in: header
        name: Authorization
        required: true
        type: string
      - in: query
        name: keyword
        type: string
      - description: 页码
        in: query
        name: page
        type: integer
      - description: 每页大小
        in: query
        name: pageSize
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            allOf:
            - $ref: '#/definitions/utils.ResponseList'
            - properties:
                data:
                  items:
                    $ref: '#/definitions/models.OutsourcingOrder'
                  type: array
              type: object
      summary: 委外订单列表
      tags:
      - 委外企业管理
  /outsourcing/order/overview:
    get:
      parameters:
      - description: token
        in: header
        name: Authorization
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            allOf:
            - $ref: '#/definitions/utils.ResponseList'
            - properties:
                data:
                  $ref: '#/definitions/outsourcingrequest.OutsourcingOrderOverview'
              type: object
      summary: 订单统计
      tags:
      - 委外企业管理
  /outsourcing/order/productList:
    get:
      parameters:
      - description: token
        in: header
        name: Authorization
        required: true
        type: string
      - in: query
        name: keyword
        type: string
      - in: query
        name: outsourcingOrderId
        required: true
        type: integer
      - description: 页码
        in: query
        name: page
        type: integer
      - description: 每页大小
        in: query
        name: pageSize
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            allOf:
            - $ref: '#/definitions/utils.ResponseList'
            - properties:
                data:
                  items:
                    $ref: '#/definitions/models.OutsourcingOrderProduct'
                  type: array
              type: object
      summary: 委外订单产品列表
      tags:
      - 委外企业管理
  /outsourcing/order/saveMaterialApply:
    post:
      parameters:
      - description: token
        in: header
        name: Authorization
        required: true
        type: string
      - description: 参数
        in: body
        name: object
        required: true
        schema:
          $ref: '#/definitions/outsourcingrequest.SaveMaterialApply'
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            $ref: '#/definitions/utils.Response'
      summary: 保存物料申请单
      tags:
      - 委外企业管理
  /p/createProduct:
    post:
      consumes: