| | |
| | | // @Param id path int true "id" |
| | | // @Success 200 {object} util.Response "成功" |
| | | // @Router /api-wms/v1/operation/outputOperation/{id} [put] |
| | | func (slf OperationController) InputSelfmade(c *gin.Context) { |
| | | func (slf OperationController) OutputOperation(c *gin.Context) { |
| | | id, err := strconv.Atoi(c.Param("id")) |
| | | if err != nil { |
| | | util.ResponseFormat(c, code.RequestParamError, "错误的id值") |
| | |
| | | } |
| | | |
| | | func ExportInputSelfmade(category constvar.FileTemplateCategory, operation *models.Operation) (string, error) { |
| | | template, err := models.NewFileTemplateAttachmentSearch().SetCategory(category).First() |
| | | template, err := models.NewFileTemplateAttachmentSearch().SetPreload(true).SetCategory(category).First() |
| | | if err != nil { |
| | | return "", errors.New("获取模版记录失败:" + err.Error()) |
| | | } |
| | |
| | | } |
| | | |
| | | func ExportOutputOperation(category constvar.FileTemplateCategory, operation *models.Operation) (string, error) { |
| | | template, err := models.NewFileTemplateAttachmentSearch().SetCategory(category).First() |
| | | template, err := models.NewFileTemplateAttachmentSearch().SetPreload(true).SetCategory(category).First() |
| | | if err != nil { |
| | | return "", errors.New("获取模版记录失败:" + err.Error()) |
| | | } |
| | |
| | | } |
| | | } |
| | | }, |
| | | "/api-wms/v1/operation/outputOperation/{id}": { |
| | | "put": { |
| | | "produces": [ |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "入库/出库" |
| | | ], |
| | | "summary": "打印", |
| | | "parameters": [ |
| | | { |
| | | "type": "integer", |
| | | "description": "id", |
| | | "name": "id", |
| | | "in": "path", |
| | | "required": true |
| | | } |
| | | ], |
| | | "responses": { |
| | | "200": { |
| | | "description": "成功", |
| | | "schema": { |
| | | "$ref": "#/definitions/util.Response" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "/api-wms/v1/operation/update": { |
| | | "post": { |
| | | "produces": [ |
| | |
| | | } |
| | | ] |
| | | }, |
| | | "createTime": { |
| | | "type": "string" |
| | | }, |
| | | "forceRemovalStrategy": { |
| | | "description": "强制下架策略", |
| | | "allOf": [ |
| | |
| | | }, |
| | | "routeName": { |
| | | "description": "公司", |
| | | "type": "string" |
| | | }, |
| | | "updateTime": { |
| | | "type": "string" |
| | | } |
| | | } |
| | |
| | | Description: "", |
| | | InfoInstanceName: "swagger", |
| | | SwaggerTemplate: docTemplate, |
| | | LeftDelim: "{{", |
| | | RightDelim: "}}", |
| | | } |
| | | |
| | | func init() { |
| | |
| | | } |
| | | } |
| | | }, |
| | | "/api-wms/v1/operation/outputOperation/{id}": { |
| | | "put": { |
| | | "produces": [ |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "入库/出库" |
| | | ], |
| | | "summary": "打印", |
| | | "parameters": [ |
| | | { |
| | | "type": "integer", |
| | | "description": "id", |
| | | "name": "id", |
| | | "in": "path", |
| | | "required": true |
| | | } |
| | | ], |
| | | "responses": { |
| | | "200": { |
| | | "description": "成功", |
| | | "schema": { |
| | | "$ref": "#/definitions/util.Response" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "/api-wms/v1/operation/update": { |
| | | "post": { |
| | | "produces": [ |
| | |
| | | } |
| | | ] |
| | | }, |
| | | "createTime": { |
| | | "type": "string" |
| | | }, |
| | | "forceRemovalStrategy": { |
| | | "description": "强制下架策略", |
| | | "allOf": [ |
| | |
| | | "routeName": { |
| | | "description": "公司", |
| | | "type": "string" |
| | | }, |
| | | "updateTime": { |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | |
| | | allOf: |
| | | - $ref: '#/definitions/constvar.CostingMethod' |
| | | description: 成本方法 |
| | | createTime: |
| | | type: string |
| | | forceRemovalStrategy: |
| | | allOf: |
| | | - $ref: '#/definitions/constvar.ForceRemovalStrategy' |
| | |
| | | type: integer |
| | | routeName: |
| | | description: 公司 |
| | | type: string |
| | | updateTime: |
| | | type: string |
| | | type: object |
| | | models.ReorderRule: |
| | |
| | | summary: 删除入库/出库信息 |
| | | tags: |
| | | - 入库/出库 |
| | | /api-wms/v1/operation/outputOperation/{id}: |
| | | put: |
| | | parameters: |
| | | - description: id |
| | | in: path |
| | | name: id |
| | | required: true |
| | | type: integer |
| | | produces: |
| | | - application/json |
| | | responses: |
| | | "200": |
| | | description: 成功 |
| | | schema: |
| | | $ref: '#/definitions/util.Response' |
| | | summary: 打印 |
| | | tags: |
| | | - 入库/出库 |
| | | /api-wms/v1/operation/update: |
| | | post: |
| | | parameters: |
| | |
| | | operationAPI.POST("listTransfer", operationController.ListTransfer) |
| | | operationAPI.GET("getLogisticCompanyList", operationController.GetLogisticCompanyList) |
| | | operationAPI.PUT("cancel/:id", operationController.Cancel) |
| | | operationAPI.PUT("inputSelfmade/:id", operationController.InputSelfmade) |
| | | operationAPI.PUT("outputOperation/:id", operationController.OutputOperation) |
| | | |
| | | } |
| | | |