| | |
| | | "errors" |
| | | "github.com/gin-gonic/gin" |
| | | "strconv" |
| | | "strings" |
| | | "wms/extend/code" |
| | | "wms/extend/util" |
| | | "wms/models" |
| | |
| | | if location.ParentId == 0 { |
| | | tree = append(tree, location) |
| | | } else { |
| | | if _, ok := m[location.ParentId]; !ok { |
| | | tree = append(tree, location) |
| | | continue |
| | | } |
| | | m[location.ParentId].Children = make([]*models.Location, 0) |
| | | m[location.ParentId].Children = append(m[location.ParentId].Children, location) |
| | | } |
| | | } |
| | |
| | | } |
| | | params.JointName = first.JointName + "/" + params.Name |
| | | } else { |
| | | params.JointName = params.Name |
| | | params.JointName = strings.Split(params.JointName, "/")[0] + "/" + params.Name |
| | | } |
| | | err := models.NewLocationSearch().Update(¶ms) |
| | | if err != nil { |