zhangqian
2024-06-14 c9b52c35041b3838e4fef7a2052b7d798ec00883
操作明细查询支持位置和仓库过滤
5个文件已修改
49 ■■■■■ 已修改文件
controllers/operation.go 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/docs.go 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/swagger.json 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/swagger.yaml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
request/operation.go 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
controllers/operation.go
@@ -1289,6 +1289,12 @@
    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
docs/docs.go
@@ -1861,6 +1861,7 @@
                "parameters": [
                    {
                        "type": "string",
                        "description": "关键字搜索",
                        "name": "keyword",
                        "in": "query"
                    },
@@ -5254,6 +5255,14 @@
                "condition": {
                    "type": "string"
                },
                "keyword": {
                    "description": "关键字搜索",
                    "type": "string"
                },
                "locationId": {
                    "description": "位置ID",
                    "type": "integer"
                },
                "page": {
                    "description": "页码",
                    "type": "integer"
@@ -5261,6 +5270,10 @@
                "pageSize": {
                    "description": "每页大小",
                    "type": "integer"
                },
                "warehouseId": {
                    "description": "仓库ID",
                    "type": "integer"
                }
            }
        },
docs/swagger.json
@@ -1849,6 +1849,7 @@
                "parameters": [
                    {
                        "type": "string",
                        "description": "关键字搜索",
                        "name": "keyword",
                        "in": "query"
                    },
@@ -5242,6 +5243,14 @@
                "condition": {
                    "type": "string"
                },
                "keyword": {
                    "description": "关键字搜索",
                    "type": "string"
                },
                "locationId": {
                    "description": "位置ID",
                    "type": "integer"
                },
                "page": {
                    "description": "页码",
                    "type": "integer"
@@ -5249,6 +5258,10 @@
                "pageSize": {
                    "description": "每页大小",
                    "type": "integer"
                },
                "warehouseId": {
                    "description": "仓库ID",
                    "type": "integer"
                }
            }
        },
docs/swagger.yaml
@@ -1562,11 +1562,20 @@
    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:
@@ -3148,7 +3157,8 @@
  /api-wms/v1/operationType/operationType:
    get:
      parameters:
      - in: query
      - description: 关键字搜索
        in: query
        name: keyword
        type: string
      - description: 页码
request/operation.go
@@ -102,5 +102,8 @@
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
}