liujiandao
2023-11-24 f64d02a1759906df7ea637913df1f4eec93811c7
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   入库/出库列表