liujiandao
2023-09-21 3109c9a47ff73d7af857ccd668821a3eb13d16fe
位置模块添加拼接字段
5个文件已修改
61 ■■■■■ 已修改文件
controllers/location.go 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/docs.go 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/swagger.json 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/swagger.yaml 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
models/location.go 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
controllers/location.go
@@ -60,6 +60,9 @@
        util.ResponseFormat(c, code.RequestParamError, "查找失败")
        return
    }
    for _, location := range list {
        location.JointName = location.ParentId + "/" + location.Name
    }
    util.ResponseFormatList(c, code.Success, list, int(total))
}
docs/docs.go
@@ -1618,8 +1618,20 @@
                    "description": "位置名称",
                    "type": "string"
                },
                "nextCount": {
                    "description": "下次盘点",
                    "type": "string"
                },
                "notes": {
                    "description": "外部备注",
                    "type": "string"
                },
                "parentId": {
                    "description": "上级id",
                    "type": "string"
                },
                "recentlyCount": {
                    "description": "最近盘点",
                    "type": "string"
                },
                "replenishLocation": {
@@ -1893,11 +1905,19 @@
                    "description": "默认源位置id",
                    "type": "integer"
                },
                "earlyOperations": {
                    "description": "预填写作业详情",
                    "type": "boolean"
                },
                "id": {
                    "type": "integer"
                },
                "name": {
                    "description": "仓库名称",
                    "type": "string"
                },
                "prefix": {
                    "description": "前缀",
                    "type": "string"
                },
                "printLabel": {
@@ -2553,6 +2573,8 @@
    Description:      "",
    InfoInstanceName: "swagger",
    SwaggerTemplate:  docTemplate,
    LeftDelim:        "{{",
    RightDelim:       "}}",
}
func init() {
docs/swagger.json
@@ -1606,8 +1606,20 @@
                    "description": "位置名称",
                    "type": "string"
                },
                "nextCount": {
                    "description": "下次盘点",
                    "type": "string"
                },
                "notes": {
                    "description": "外部备注",
                    "type": "string"
                },
                "parentId": {
                    "description": "上级id",
                    "type": "string"
                },
                "recentlyCount": {
                    "description": "最近盘点",
                    "type": "string"
                },
                "replenishLocation": {
@@ -1881,6 +1893,10 @@
                    "description": "默认源位置id",
                    "type": "integer"
                },
                "earlyOperations": {
                    "description": "预填写作业详情",
                    "type": "boolean"
                },
                "id": {
                    "type": "integer"
                },
@@ -1888,6 +1904,10 @@
                    "description": "仓库名称",
                    "type": "string"
                },
                "prefix": {
                    "description": "前缀",
                    "type": "string"
                },
                "printLabel": {
                    "description": "是否打印标签",
                    "type": "boolean"
docs/swagger.yaml
@@ -244,8 +244,17 @@
      name:
        description: 位置名称
        type: string
      nextCount:
        description: 下次盘点
        type: string
      notes:
        description: 外部备注
        type: string
      parentId:
        description: 上级id
        type: string
      recentlyCount:
        description: 最近盘点
        type: string
      replenishLocation:
        description: 是否补充位置
@@ -442,11 +451,17 @@
      defaultLocationSrcId:
        description: 默认源位置id
        type: integer
      earlyOperations:
        description: 预填写作业详情
        type: boolean
      id:
        type: integer
      name:
        description: 仓库名称
        type: string
      prefix:
        description: 前缀
        type: string
      printLabel:
        description: 是否打印标签
        type: boolean
models/location.go
@@ -25,6 +25,7 @@
        Notes                string                        `json:"notes" gorm:"type:varchar(255);comment:外部备注"`           //外部备注
        RecentlyCount        string                        `json:"recentlyCount" gorm:"type:varchar(255);comment:最近盘点"`   //最近盘点
        NextCount            string                        `json:"nextCount" gorm:"type:varchar(255);comment:下次盘点"`       //下次盘点
        JointName            string                        `json:"jointName" gorm:"-"`                                    //拼接名称
    }
    LocationSearch struct {