zhangqian
2023-09-22 71cc6deae4b873c3382895054fe2bd6816290755
docs/swagger.yaml
@@ -68,10 +68,14 @@
    enum:
    - modbusTCP
    - serial
    - 网络
    - 串口
    type: string
    x-enum-varnames:
    - PlcMethodModbusTCP
    - PlcMethodSerial
    - PlcMethodModbusTCPChinese
    - PlcMethodSerialChinese
  constvar.PlcStartAddressType:
    enum:
    - 1
@@ -101,7 +105,7 @@
      address:
        description: |-
          PortName   string `gorm:"type:varchar(191);comment:端口名称" json:"portName"`
          Frequency  int    `gorm:"type:int(11);comment:数据更新频率 0-实时更新 1-1次/秒" json:"frequency"`
          Frequency  int    `gorm:"comment:数据更新频率 0-实时更新 1-1次/秒" json:"frequency"`
        type: string
      baudRate:
        description: 串口波特率, method = serial时 用
@@ -285,7 +289,7 @@
      address:
        description: |-
          PortName   string `gorm:"type:varchar(191);comment:端口名称" json:"portName"`
          Frequency  int    `gorm:"type:int(11);comment:数据更新频率 0-实时更新 1-1次/秒" json:"frequency"`
          Frequency  int    `gorm:"comment:数据更新频率 0-实时更新 1-1次/秒" json:"frequency"`
        type: string
      baudRate:
        description: 串口波特率, method = serial时 用
@@ -368,6 +372,9 @@
        items:
          type: string
        type: array
      canStarted:
        description: 是否可以开始生产
        type: boolean
      currentProcedureIndex:
        type: integer
      order:
@@ -482,6 +489,23 @@
                  $ref: '#/definitions/response.ProductProgress'
              type: object
      summary: 获取生产进度
      tags:
      - 生产数量
  /v1/plc/productProgressRealTime:
    post:
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            allOf:
            - $ref: '#/definitions/contextx.Response'
            - properties:
                data:
                  $ref: '#/definitions/response.ProductProgress'
              type: object
      summary: 实时获取生产进度
      tags:
      - 生产数量
  /v1/plc/setProductNumber:
@@ -632,7 +656,33 @@
      summary: 获取任务
      tags:
      - Task
  /v1/task/sendProcessParams/{id}:
  /v1/task/get/unStarted:
    get:
      parameters:
      - description: 页码
        in: query
        name: page
        type: integer
      - description: 每页大小
        in: query
        name: pageSize
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            allOf:
            - $ref: '#/definitions/contextx.Response'
            - properties:
                data:
                  $ref: '#/definitions/response.TaskData'
              type: object
      summary: 获取未开始的任务
      tags:
      - Task
  /v1/task/sendProcessParams:
    post:
      parameters:
      - description: 查询参数