liujiandao
2023-11-24 f64d02a1759906df7ea637913df1f4eec93811c7
查询指定操作详情
5个文件已修改
200 ■■■■■ 已修改文件
controllers/operation.go 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/docs.go 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/swagger.json 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/swagger.yaml 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
router/router.go 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
controllers/operation.go
@@ -172,6 +172,29 @@
    return nil
}
// GetOperationInfo
// @Tags      入库/出库
// @Summary   入库/出库列表
// @Produce   application/json
//
//    @Param        number    path        string            true    "单号"
//
// @Success   200 {object} util.Response    "成功"
// @Router    /api-wms/v1/operation/getOperationInfo/{number} [post]
func (slf OperationController) GetOperationInfo(c *gin.Context) {
    number := c.Param("number")
    if number == "" {
        util.ResponseFormat(c, code.RequestParamError, "参数解析失败,参数不能为空")
        return
    }
    operation, err := models.NewOperationSearch().SetNumber(number).SetPreload(true).First()
    if err != nil {
        util.ResponseFormat(c, code.RequestParamError, err.Error())
        return
    }
    util.ResponseFormat(c, code.Success, operation)
}
// List
// @Tags      入库/出库
// @Summary   入库/出库列表
docs/docs.go
@@ -1097,6 +1097,25 @@
                }
            }
        },
        "/api-wms/v1/operation/getClientList": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "入库/出库"
                ],
                "summary": "获取物流公司列表",
                "responses": {
                    "200": {
                        "description": "成功",
                        "schema": {
                            "$ref": "#/definitions/util.Response"
                        }
                    }
                }
            }
        },
        "/api-wms/v1/operation/getLogisticCompanyList": {
            "get": {
                "produces": [
@@ -1126,6 +1145,53 @@
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/api-wms/v1/operation/getOperationInfo/{number}": {
            "post": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "入库/出库"
                ],
                "summary": "入库/出库列表",
                "parameters": [
                    {
                        "type": "string",
                        "description": "单号",
                        "name": "number",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功",
                        "schema": {
                            "$ref": "#/definitions/util.Response"
                        }
                    }
                }
            }
        },
        "/api-wms/v1/operation/getSupplierList": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "入库/出库"
                ],
                "summary": "获取物流公司列表",
                "responses": {
                    "200": {
                        "description": "成功",
                        "schema": {
                            "$ref": "#/definitions/util.Response"
                        }
                    }
                }
@@ -4716,6 +4782,8 @@
    Description:      "",
    InfoInstanceName: "swagger",
    SwaggerTemplate:  docTemplate,
    LeftDelim:        "{{",
    RightDelim:       "}}",
}
func init() {
docs/swagger.json
@@ -1085,6 +1085,25 @@
                }
            }
        },
        "/api-wms/v1/operation/getClientList": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "入库/出库"
                ],
                "summary": "获取物流公司列表",
                "responses": {
                    "200": {
                        "description": "成功",
                        "schema": {
                            "$ref": "#/definitions/util.Response"
                        }
                    }
                }
            }
        },
        "/api-wms/v1/operation/getLogisticCompanyList": {
            "get": {
                "produces": [
@@ -1119,6 +1138,53 @@
                }
            }
        },
        "/api-wms/v1/operation/getOperationInfo/{number}": {
            "post": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "入库/出库"
                ],
                "summary": "入库/出库列表",
                "parameters": [
                    {
                        "type": "string",
                        "description": "单号",
                        "name": "number",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功",
                        "schema": {
                            "$ref": "#/definitions/util.Response"
                        }
                    }
                }
            }
        },
        "/api-wms/v1/operation/getSupplierList": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "入库/出库"
                ],
                "summary": "获取物流公司列表",
                "responses": {
                    "200": {
                        "description": "成功",
                        "schema": {
                            "$ref": "#/definitions/util.Response"
                        }
                    }
                }
            }
        },
        "/api-wms/v1/operation/list": {
            "post": {
                "produces": [
docs/swagger.yaml
@@ -2261,6 +2261,18 @@
      summary: 更改记录状态
      tags:
      - 入库/出库
  /api-wms/v1/operation/getClientList:
    get:
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            $ref: '#/definitions/util.Response'
      summary: 获取物流公司列表
      tags:
      - 入库/出库
  /api-wms/v1/operation/getLogisticCompanyList:
    get:
      produces:
@@ -2280,6 +2292,36 @@
      summary: 获取物流公司列表
      tags:
      - 入库/出库
  /api-wms/v1/operation/getOperationInfo/{number}:
    post:
      parameters:
      - description: 单号
        in: path
        name: number
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            $ref: '#/definitions/util.Response'
      summary: 入库/出库列表
      tags:
      - 入库/出库
  /api-wms/v1/operation/getSupplierList:
    get:
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            $ref: '#/definitions/util.Response'
      summary: 获取物流公司列表
      tags:
      - 入库/出库
  /api-wms/v1/operation/list:
    post:
      parameters:
router/router.go
@@ -81,6 +81,7 @@
    operationAPI := r.Group(urlPrefix + "/operation")
    {
        operationAPI.POST("list", operationController.List)
        operationAPI.POST("getOperationInfo/:number", operationController.GetOperationInfo)
        operationAPI.POST("operation", operationController.Add)
        operationAPI.POST("update", operationController.Update)
        operationAPI.DELETE("operation/:id", operationController.Delete)