| | |
| | | // @Summary 入库/出库列表 |
| | | // @Produce application/json |
| | | // |
| | | // @Param number path string true "单号" |
| | | // @Param id path string true "id" |
| | | // |
| | | // @Success 200 {object} util.Response "成功" |
| | | // @Router /api-wms/v1/operation/getOperationInfo/{number} [post] |
| | | // @Router /api-wms/v1/operation/getOperationInfo/{id} [get] |
| | | func (slf OperationController) GetOperationInfo(c *gin.Context) { |
| | | number := c.Param("number") |
| | | number := c.Param("id") |
| | | if number == "" { |
| | | util.ResponseFormat(c, code.RequestParamError, "参数解析失败,参数不能为空") |
| | | return |
| | | } |
| | | operation, err := models.NewOperationSearch().SetNumber(number).SetPreload(true).First() |
| | | id, _ := strconv.Atoi(number) |
| | | operation, err := models.NewOperationSearch().SetID(id).SetPreload(true).First() |
| | | if err != nil { |
| | | util.ResponseFormat(c, code.RequestParamError, err.Error()) |
| | | return |