| | |
| | | if params.Condition != "" { |
| | | db = db.Where("wms_operation.number like ? or wms_operation.source_number like ? or from_location.`name` like ? or to_location.`name` like ? or material.`name` like ? ", "%"+params.Condition+"%", "%"+params.Condition+"%", "%"+params.Condition+"%", "%"+params.Condition+"%", "%"+params.Condition+"%") |
| | | } |
| | | if params.WarehouseId != 0 { |
| | | db = db.Where("warehouse_id = ?", params.WarehouseId) |
| | | } |
| | | if params.LocationId != 0 { |
| | | db = db.Where("location_id = ?", params.LocationId) |
| | | } |
| | | var ( |
| | | records = make([]*response.InventoryHistory, 0) |
| | | total int64 |
| | |
| | | "parameters": [ |
| | | { |
| | | "type": "string", |
| | | "description": "关键字搜索", |
| | | "name": "keyword", |
| | | "in": "query" |
| | | }, |
| | |
| | | "condition": { |
| | | "type": "string" |
| | | }, |
| | | "keyword": { |
| | | "description": "关键字搜索", |
| | | "type": "string" |
| | | }, |
| | | "locationId": { |
| | | "description": "位置ID", |
| | | "type": "integer" |
| | | }, |
| | | "page": { |
| | | "description": "页码", |
| | | "type": "integer" |
| | |
| | | "pageSize": { |
| | | "description": "每页大小", |
| | | "type": "integer" |
| | | }, |
| | | "warehouseId": { |
| | | "description": "仓库ID", |
| | | "type": "integer" |
| | | } |
| | | } |
| | | }, |
| | |
| | | "parameters": [ |
| | | { |
| | | "type": "string", |
| | | "description": "关键字搜索", |
| | | "name": "keyword", |
| | | "in": "query" |
| | | }, |
| | |
| | | "condition": { |
| | | "type": "string" |
| | | }, |
| | | "keyword": { |
| | | "description": "关键字搜索", |
| | | "type": "string" |
| | | }, |
| | | "locationId": { |
| | | "description": "位置ID", |
| | | "type": "integer" |
| | | }, |
| | | "page": { |
| | | "description": "页码", |
| | | "type": "integer" |
| | |
| | | "pageSize": { |
| | | "description": "每页大小", |
| | | "type": "integer" |
| | | }, |
| | | "warehouseId": { |
| | | "description": "仓库ID", |
| | | "type": "integer" |
| | | } |
| | | } |
| | | }, |
| | |
| | | properties: |
| | | condition: |
| | | type: string |
| | | keyword: |
| | | description: 关键字搜索 |
| | | type: string |
| | | locationId: |
| | | description: 位置ID |
| | | type: integer |
| | | page: |
| | | description: 页码 |
| | | type: integer |
| | | pageSize: |
| | | description: 每页大小 |
| | | type: integer |
| | | warehouseId: |
| | | description: 仓库ID |
| | | type: integer |
| | | type: object |
| | | request.OperationDetails: |
| | |
| | | /api-wms/v1/operationType/operationType: |
| | | get: |
| | | parameters: |
| | | - in: query |
| | | - description: 关键字搜索 |
| | | in: query |
| | | name: keyword |
| | | type: string |
| | | - description: 页码 |
| | |
| | | |
| | | type OperationCondition struct { |
| | | PageInfo |
| | | Condition string `json:"condition"` |
| | | Condition string `json:"condition"` |
| | | Keyword string `json:"keyword" form:"keyword"` //关键字搜索 |
| | | WarehouseId int `json:"warehouseId" form:"warehouseId"` //仓库ID |
| | | LocationId int `json:"locationId" form:"locationId"` //位置ID |
| | | } |