zhangqian
2023-08-17 fcc5eaccffbbd0980077cf3fc4707566546f879a
docs/swagger.yaml
@@ -7,66 +7,109 @@
      msg:
        type: string
    type: object
  model.ScheduleTask:
  model.Order:
    properties:
      amount:
        description: |-
          Parameter   string          `json:"parameter"`   //产品名称
          Customer    string          `json:"customer"`
          DeliverDate string          `json:"deliverDate"`
          OrderAttr   string          `json:"orderAttr"`
        type: number
      data:
        description: 排程任务json串
      customer:
        type: string
      deliverDate:
        type: string
      endTime:
        type: integer
      id:
        type: integer
      orderAttr:
        description: 订单属性拼接的字符串,即货物描述
        type: string
      orderId:
        description: 订单id
        type: string
      parameter:
        type: string
      productId:
        description: 订单id
        type: string
      productName:
        description: 产品名称
        type: string
      startTime:
        type: integer
      unit:
        type: string
    type: object
  request.TaskInfo:
  model.Procedures:
    properties:
      device:
        description: 设备
        type: string
      orderId:
        description: 订单号
        type: string
      password:
        description: 产品
        type: string
      id:
        type: integer
      procedure:
        description: 工序
        allOf:
        - $ref: '#/definitions/request.ProductProcedure'
        description: request.ProductProcedure  对象
    type: object
  request.ProcedureMaterial:
    properties:
      amount:
        type: number
      materialId:
        type: string
      workOrder:
        description: 工单
      materialName:
        type: string
      unit:
        type: string
    type: object
  request.ProcedureWorker:
    properties:
      phoneNum:
        type: string
      workerId:
        type: string
      workerName:
        type: string
    type: object
  request.ProductProcedure:
    properties:
      deviceId:
        type: string
      endTime:
        type: integer
      inputMaterials:
        description: 输入物料列表
        items:
          $ref: '#/definitions/request.ProcedureMaterial'
        type: array
      outputMaterials:
        description: 输出物料列表
        items:
          $ref: '#/definitions/request.ProcedureMaterial'
        type: array
      procedureId:
        type: string
      procedureName:
        type: string
      startTime:
        type: integer
      workHours:
        type: number
      workers:
        description: 人员列表
        items:
          $ref: '#/definitions/request.ProcedureWorker'
        type: array
    type: object
  response.TaskData:
    properties:
      order:
        $ref: '#/definitions/model.Order'
      procedure:
        $ref: '#/definitions/model.Procedures'
    type: object
info:
  contact: {}
paths:
  /v1/notice/task/start:
    post:
  /v1/task/finish/{id}:
    put:
      parameters:
      - description: 查询参数
        in: body
        name: object
      - description: 工序id
        in: path
        name: id
        required: true
        schema:
          $ref: '#/definitions/request.TaskInfo'
        type: integer
      produces:
      - application/json
      responses:
@@ -74,20 +117,11 @@
          description: 成功
          schema:
            $ref: '#/definitions/contextx.Response'
      summary: 任务开启通知
      summary: 任务结束
      tags:
      - Base
  /v1/task/list:
  /v1/task/get:
    get:
      parameters:
      - description: 页码
        in: query
        name: page
        type: integer
      - description: 每页大小
        in: query
        name: pageSize
        type: integer
      produces:
      - application/json
      responses:
@@ -98,11 +132,27 @@
            - $ref: '#/definitions/contextx.Response'
            - properties:
                data:
                  items:
                    $ref: '#/definitions/model.ScheduleTask'
                  type: array
                  $ref: '#/definitions/response.TaskData'
              type: object
      summary: 任务开启通知
      summary: 获取任务
      tags:
      - Task
  /v1/task/start/{id}:
    get:
      parameters:
      - description: 工序id
        in: path
        name: id
        required: true
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            $ref: '#/definitions/contextx.Response'
      summary: 任务开始
      tags:
      - Base
swagger: "2.0"