| | |
| | | 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 入库/出库列表 |
| | |
| | | } |
| | | } |
| | | }, |
| | | "/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": [ |
| | |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "/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" |
| | | } |
| | | } |
| | | } |
| | |
| | | Description: "", |
| | | InfoInstanceName: "swagger", |
| | | SwaggerTemplate: docTemplate, |
| | | LeftDelim: "{{", |
| | | RightDelim: "}}", |
| | | } |
| | | |
| | | func init() { |
| | |
| | | } |
| | | } |
| | | }, |
| | | "/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": [ |
| | |
| | | } |
| | | } |
| | | }, |
| | | "/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": [ |
| | |
| | | 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: |
| | |
| | | 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: |
| | |
| | | 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) |