| | |
| | | util.ResponseFormat(c, code.RequestParamError, err.Error()) |
| | | return |
| | | } |
| | | list, total, err := models.NewOperationTypeSearch().SetPage(params.Page, params.PageSize).SetKeyword(params.Keyword).SetOrder("id desc").SetPreload(true).Find() |
| | | list, total, err := models.NewOperationTypeSearch(). |
| | | SetPage(params.Page, params.PageSize). |
| | | SetKeyword(params.Keyword). |
| | | SetOrder("id desc"). |
| | | SetWarehouseId(params.WarehouseId). |
| | | SetPreload(true).Find() |
| | | if err != nil { |
| | | util.ResponseFormat(c, code.RequestError, "查找失败") |
| | | return |
| | |
| | | "description": "每页大小", |
| | | "name": "pageSize", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "integer", |
| | | "description": "仓库id", |
| | | "name": "warehouseId", |
| | | "in": "query" |
| | | } |
| | | ], |
| | | "responses": { |
| | |
| | | "ReservationNever" |
| | | ] |
| | | }, |
| | | "gorm.DeletedAt": { |
| | | "type": "object", |
| | | "properties": { |
| | | "time": { |
| | | "type": "string" |
| | | }, |
| | | "valid": { |
| | | "description": "Valid is true if Time is not NULL", |
| | | "type": "boolean" |
| | | } |
| | | } |
| | | }, |
| | | "inventory_order.WorkerInfo": { |
| | | "type": "object", |
| | | "properties": { |
| | |
| | | }, |
| | | "id": { |
| | | "type": "integer" |
| | | } |
| | | } |
| | | }, |
| | | "models.Attribute": { |
| | | "type": "object", |
| | | "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时用", |
| | | "type": "array", |
| | | "items": { |
| | | "type": "string" |
| | | } |
| | | }, |
| | | "updatedAt": { |
| | | "type": "string" |
| | | }, |
| | | "value": { |
| | | "description": "从AttributeValue取到的value", |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/models.Attachment" |
| | | } |
| | | }, |
| | | "attributes": { |
| | | "description": "动态属性", |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/models.Attribute" |
| | | } |
| | | }, |
| | | "autoIncr": { |
| | |
| | | "id": { |
| | | "type": "integer" |
| | | }, |
| | | "note": { |
| | | "type": "string" |
| | | }, |
| | | "operationId": { |
| | | "description": "操作id", |
| | | "type": "integer" |
| | |
| | | "description": "每页大小", |
| | | "name": "pageSize", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "integer", |
| | | "description": "仓库id", |
| | | "name": "warehouseId", |
| | | "in": "query" |
| | | } |
| | | ], |
| | | "responses": { |
| | |
| | | "ReservationNever" |
| | | ] |
| | | }, |
| | | "gorm.DeletedAt": { |
| | | "type": "object", |
| | | "properties": { |
| | | "time": { |
| | | "type": "string" |
| | | }, |
| | | "valid": { |
| | | "description": "Valid is true if Time is not NULL", |
| | | "type": "boolean" |
| | | } |
| | | } |
| | | }, |
| | | "inventory_order.WorkerInfo": { |
| | | "type": "object", |
| | | "properties": { |
| | |
| | | }, |
| | | "id": { |
| | | "type": "integer" |
| | | } |
| | | } |
| | | }, |
| | | "models.Attribute": { |
| | | "type": "object", |
| | | "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时用", |
| | | "type": "array", |
| | | "items": { |
| | | "type": "string" |
| | | } |
| | | }, |
| | | "updatedAt": { |
| | | "type": "string" |
| | | }, |
| | | "value": { |
| | | "description": "从AttributeValue取到的value", |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/models.Attachment" |
| | | } |
| | | }, |
| | | "attributes": { |
| | | "description": "动态属性", |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/models.Attribute" |
| | | } |
| | | }, |
| | | "autoIncr": { |
| | |
| | | "id": { |
| | | "type": "integer" |
| | | }, |
| | | "note": { |
| | | "type": "string" |
| | | }, |
| | | "operationId": { |
| | | "description": "操作id", |
| | | "type": "integer" |
| | |
| | | - 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: |
| | |
| | | $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: |
| | |
| | | attachmentList: |
| | | items: |
| | | $ref: '#/definitions/models.Attachment' |
| | | type: array |
| | | attributes: |
| | | description: 动态属性 |
| | | items: |
| | | $ref: '#/definitions/models.Attribute' |
| | | type: array |
| | | autoIncr: |
| | | type: integer |
| | |
| | | type: integer |
| | | id: |
| | | type: integer |
| | | note: |
| | | type: string |
| | | operationId: |
| | | description: 操作id |
| | | type: integer |
| | |
| | | in: query |
| | | name: pageSize |
| | | type: integer |
| | | - description: 仓库id |
| | | in: query |
| | | name: warehouseId |
| | | type: integer |
| | | produces: |
| | | - application/json |
| | | responses: |
| | |
| | | |
| | | type GetOperationTypeList struct { |
| | | PageInfo |
| | | Keyword string `json:"keyword"` |
| | | WarehouseId int `json:"warehouseId" gorm:"type:int;not null;comment:仓库id"` //仓库id |
| | | Keyword string `json:"keyword" form:"keyword"` //关键字搜索 |
| | | WarehouseId int `json:"warehouseId" form:"warehouseId"` //仓库id |
| | | } |
| | | |
| | | type AddOperationType struct { |