| | |
| | | items: |
| | | $ref: '#/definitions/common.ProcedureMaterial' |
| | | type: array |
| | | nextProcedureId: |
| | | type: string |
| | | nextProcedureName: |
| | | type: string |
| | | outputMaterials: |
| | | description: 输出物料列表 |
| | | items: |
| | |
| | | $ref: '#/definitions/common.ProcedureWorker' |
| | | type: array |
| | | type: object |
| | | constvar.PlcMethod: |
| | | enum: |
| | | - modbusTCP |
| | | - serial |
| | | type: string |
| | | x-enum-varnames: |
| | | - PlcMethodModbusTCP |
| | | - PlcMethodSerial |
| | | constvar.PlcStartAddressType: |
| | | enum: |
| | | - 1 |
| | | - 2 |
| | | type: integer |
| | | x-enum-varnames: |
| | | - PlcStartAddressTypeFinishNumber |
| | | - PlcStartAddressTypeTotalNumber |
| | | constvar.PlcStartAddressValueType: |
| | | enum: |
| | | - string |
| | | - int |
| | | type: string |
| | | x-enum-varnames: |
| | | - PlcStartAddressValueTypeString |
| | | - PlcStartAddressValueTypeInt |
| | | contextx.Response: |
| | | properties: |
| | | code: |
| | |
| | | model.DevicePlc: |
| | | properties: |
| | | address: |
| | | description: |- |
| | | PortName string `gorm:"type:varchar(191);comment:端口名称" json:"portName"` |
| | | Frequency int `gorm:"type:int(11);comment:数据更新频率 0-实时更新 1-1次/秒" json:"frequency"` |
| | | type: string |
| | | baudRate: |
| | | description: 串口波特率, method = serial时 用 |
| | | type: integer |
| | | brand: |
| | | type: string |
| | | details: |
| | | items: |
| | | $ref: '#/definitions/model.DevicePlcAddress' |
| | | type: array |
| | | frequency: |
| | | type: integer |
| | | id: |
| | | type: integer |
| | | isOpen: |
| | | type: boolean |
| | | method: |
| | | type: string |
| | | $ref: '#/definitions/constvar.PlcMethod' |
| | | port: |
| | | description: plc 端口号, method = modbusTCP用 |
| | | type: integer |
| | | portName: |
| | | serialName: |
| | | description: 串口名称,method = serial时 用 |
| | | type: string |
| | | type: object |
| | | model.DevicePlcAddress: |
| | | properties: |
| | | fieldName: |
| | | allOf: |
| | | - $ref: '#/definitions/constvar.PlcStartAddressType' |
| | | description: 对应系统字段 |
| | | type: string |
| | | length: |
| | | description: 数据长度 |
| | | type: integer |
| | |
| | | description: 数据起始地址 |
| | | type: integer |
| | | type: |
| | | allOf: |
| | | - $ref: '#/definitions/constvar.PlcStartAddressValueType' |
| | | description: 数据类型 |
| | | type: string |
| | | type: object |
| | | model.NetConfig: |
| | | properties: |
| | |
| | | request.UpdatePlc: |
| | | properties: |
| | | address: |
| | | description: |- |
| | | PortName string `gorm:"type:varchar(191);comment:端口名称" json:"portName"` |
| | | Frequency int `gorm:"type:int(11);comment:数据更新频率 0-实时更新 1-1次/秒" json:"frequency"` |
| | | type: string |
| | | baudRate: |
| | | description: 串口波特率, method = serial时 用 |
| | | type: integer |
| | | brand: |
| | | type: string |
| | | details: |
| | | items: |
| | | $ref: '#/definitions/model.DevicePlcAddress' |
| | | type: array |
| | | frequency: |
| | | type: integer |
| | | id: |
| | | type: integer |
| | | isOpen: |
| | | type: boolean |
| | | method: |
| | | type: string |
| | | $ref: '#/definitions/constvar.PlcMethod' |
| | | port: |
| | | description: plc 端口号, method = modbusTCP用 |
| | | type: integer |
| | | portName: |
| | | serialName: |
| | | description: 串口名称,method = serial时 用 |
| | | type: string |
| | | type: object |
| | | request.UpdatePlcBrand: |
| | |
| | | type: string |
| | | value: {} |
| | | type: object |
| | | response.ProcessParamsResponse: |
| | | properties: |
| | | number: |
| | | type: string |
| | | params: |
| | | items: |
| | | $ref: '#/definitions/response.ProcessParams' |
| | | type: array |
| | | type: object |
| | | response.ProductProgress: |
| | | properties: |
| | | finishNumber: |
| | | type: integer |
| | | totalNumber: |
| | | type: integer |
| | | type: object |
| | | response.TaskCountdown: |
| | | properties: |
| | | countDownHour: |
| | | description: 倒计时 时 |
| | | type: integer |
| | | countDownMinute: |
| | | description: 倒计时 分 |
| | | type: integer |
| | | showCountDown: |
| | | description: 是否展示倒计时 |
| | | type: boolean |
| | | type: object |
| | | response.TaskData: |
| | | properties: |
| | | deviceName: |
| | | type: string |
| | | deviceStatus: |
| | | type: string |
| | | nextProcedure: |
| | | $ref: '#/definitions/model.Procedures' |
| | | order: |
| | | $ref: '#/definitions/model.Order' |
| | | procedure: |
| | |
| | | summary: 更新plc配置 |
| | | tags: |
| | | - Config |
| | | /v1/plc/productProgress: |
| | | get: |
| | | 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: |
| | | post: |
| | | produces: |
| | | - application/json |
| | | responses: |
| | | "200": |
| | | description: 成功 |
| | | schema: |
| | | $ref: '#/definitions/contextx.Response' |
| | | summary: 设置生产总量 |
| | | tags: |
| | | - 生产数量 |
| | | /v1/plcBrand/add: |
| | | post: |
| | | parameters: |
| | |
| | | summary: 更新plc品牌 |
| | | tags: |
| | | - plc品牌 |
| | | /v1/task/countdown: |
| | | get: |
| | | produces: |
| | | - application/json |
| | | responses: |
| | | "200": |
| | | description: 成功 |
| | | schema: |
| | | allOf: |
| | | - $ref: '#/definitions/contextx.Response' |
| | | - properties: |
| | | data: |
| | | $ref: '#/definitions/response.TaskCountdown' |
| | | type: object |
| | | summary: 新任务倒计时 |
| | | tags: |
| | | - Task |
| | | /v1/task/finish/{id}: |
| | | put: |
| | | parameters: |
| | |
| | | - $ref: '#/definitions/contextx.Response' |
| | | - properties: |
| | | data: |
| | | items: |
| | | $ref: '#/definitions/response.ProcessParams' |
| | | type: array |
| | | $ref: '#/definitions/response.ProcessParamsResponse' |
| | | type: object |
| | | summary: 任务开始 |
| | | tags: |