liujiandao
2023-11-24 7144c4cb9615ca3d60e12c6286271353b1c8b29d
controllers/operation.go
@@ -177,17 +177,18 @@
// @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