jiangshuai
2023-09-21 ee20ffe2a2d1494af0a1285440605d67a5846da6
1.出入库一部分代码
7个文件已修改
356 ■■■■■ 已修改文件
controllers/operation.go 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/docs.go 117 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/swagger.json 115 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/swagger.yaml 94 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
models/operation_details.go 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
request/operation.go 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
router/router.go 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
controllers/operation.go
@@ -112,7 +112,7 @@
    //检查明细部分
    for _, v := range params.Details {
        if v.ProductId == "" {
            return errors.New("productID为0")
            return errors.New("productID为空")
        }
        if v.ProductName == "" {
            return errors.New("产品名称异常")
@@ -172,7 +172,7 @@
// @Param     object  body request.UpdateOperation true  "入库信息"
// @Param     id  path int true  "入库信息id"
// @Success   200 {object} util.Response "成功"
// @Router    /api-wms/v1/operation/operation/{id} [put]
// @Router    /api-wms/v1/operation/operation/{id} [post]
func (slf OperationController) Update(c *gin.Context) {
    id := cast.ToUint(c.Param("id"))
    if id == 0 {
@@ -201,6 +201,11 @@
        util.ResponseFormat(c, code.RequestParamError, err.Error())
        return
    }
    fmt.Printf("%+v\n", *reqParams.Details[0])
    fmt.Printf("%+v\n", *reqParams.Details[1])
    fmt.Println("===============================================")
    fmt.Printf("%+v\n", *params.Details[0])
    fmt.Printf("%+v\n", *params.Details[1])
    if err := models.WithTransaction(func(tx *gorm.DB) error {
        if err := models.NewOperationDetailsSearch().SetOrm(tx).SetOperationId(params.Id).Delete(); err != nil {
            return err
docs/docs.go
@@ -467,6 +467,34 @@
                }
            }
        },
        "/api-wms/v1/operation/finish/{id}": {
            "put": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "入库/出库"
                ],
                "summary": "更改记录状态",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "id",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功",
                        "schema": {
                            "$ref": "#/definitions/util.Response"
                        }
                    }
                }
            }
        },
        "/api-wms/v1/operation/operation": {
            "get": {
                "consumes": [
@@ -537,7 +565,7 @@
            }
        },
        "/api-wms/v1/operation/operation/{id}": {
            "put": {
            "post": {
                "produces": [
                    "application/json"
                ],
@@ -605,7 +633,7 @@
                    "application/json"
                ],
                "tags": [
                    "作业类型"
                    "业务类型"
                ],
                "summary": "查询作业类型列表",
                "parameters": [
@@ -656,7 +684,7 @@
                    "application/json"
                ],
                "tags": [
                    "作业类型"
                    "业务类型"
                ],
                "summary": "添加作业类型",
                "parameters": [
@@ -686,7 +714,7 @@
                    "application/json"
                ],
                "tags": [
                    "作业类型"
                    "业务类型"
                ],
                "summary": "编辑作业类型",
                "parameters": [
@@ -721,7 +749,7 @@
                    "application/json"
                ],
                "tags": [
                    "作业类型"
                    "业务类型"
                ],
                "summary": "删除作业类型",
                "parameters": [
@@ -1622,10 +1650,6 @@
        "models.Material": {
            "type": "object",
            "properties": {
                "HSCode": {
                    "description": "HS编码",
                    "type": "string"
                },
                "amount": {
                    "description": "数量",
                    "type": "number"
@@ -1679,14 +1703,14 @@
                    "type": "number"
                },
                "deliveryAdvanceTime": {
                    "description": "交货提前时间(天)",
                    "type": "integer"
                    "description": "客户前置时间(天)",
                    "type": "number"
                },
                "id": {
                    "type": "string"
                },
                "inStorageExplain": {
                    "description": "入库说明",
                    "description": "HSCode                  string                     ` + "`" + `gorm:\"type:varchar(255);comment:HS编码\" json:\"HSCode\"` + "`" + `                    //HS编码\nOriginCountryId         int                        ` + "`" + `gorm:\"type:int(11);comment:原产地id\" json:\"originCountryId\"` + "`" + `               //原产地id\nOriginCountryName       string                     ` + "`" + `gorm:\"type:varchar(255);comment:原产地名称\" json:\"originCountryName\"` + "`" + `        //原产地名称",
                    "type": "string"
                },
                "internalNotes": {
@@ -1713,6 +1737,10 @@
                    "description": "PurchaseType      constvar.PurchaseType ` + "`" + `gorm:\"type:int(11);comment:采购类型\" json:\"purchaseType\"` + "`" + `",
                    "type": "boolean"
                },
                "makeAdvanceTime": {
                    "description": "制造前置时间(天)",
                    "type": "number"
                },
                "maxInventory": {
                    "description": "最大库存",
                    "type": "number"
@@ -1737,6 +1765,10 @@
                    "description": "物料名称",
                    "type": "string"
                },
                "orderAdvanceTime": {
                    "description": "订单准备天数(天)",
                    "type": "number"
                },
                "orderCreation": {
                    "description": "订单创建",
                    "allOf": [
@@ -1744,14 +1776,6 @@
                            "$ref": "#/definitions/constvar.OrderCreation"
                        }
                    ]
                },
                "originCountryId": {
                    "description": "原产地id",
                    "type": "integer"
                },
                "originCountryName": {
                    "description": "原产地名称",
                    "type": "string"
                },
                "outStorageExplain": {
                    "description": "出库说明",
@@ -2089,22 +2113,24 @@
        "request.AddOperation": {
            "type": "object",
            "properties": {
                "carrierID": {
                    "type": "integer"
                },
                "carrierName": {
                "comment": {
                    "description": "备注",
                    "type": "string"
                },
                "companyID": {
                    "description": "公司ID-客户",
                    "type": "integer"
                },
                "companyName": {
                    "description": "公司名称-客户名称",
                    "type": "string"
                },
                "contacterID": {
                    "description": "联系人ID-非必填",
                    "type": "integer"
                },
                "contacterName": {
                    "description": "联系人姓名-非必填",
                    "type": "string"
                },
                "details": {
@@ -2125,6 +2151,7 @@
                    "type": "string"
                },
                "operationDate": {
                    "description": "安排日期",
                    "type": "string"
                },
                "operationTypeId": {
@@ -2146,15 +2173,6 @@
                "toLocationId": {
                    "description": "目标位置id",
                    "type": "integer"
                },
                "tracking": {
                    "type": "string"
                },
                "transferWeight": {
                    "type": "number"
                },
                "weight": {
                    "type": "number"
                }
            }
        },
@@ -2302,13 +2320,13 @@
        "request.OperationDetails": {
            "type": "object",
            "properties": {
                "finishQuantity": {
                    "description": "完成数量",
                    "type": "number"
                "OperationId": {
                    "description": "操作id",
                    "type": "integer"
                },
                "productId": {
                    "description": "产品id",
                    "type": "integer"
                    "type": "string"
                },
                "productName": {
                    "description": "产品名称",
@@ -2317,6 +2335,9 @@
                "quantity": {
                    "description": "数量",
                    "type": "number"
                },
                "unit": {
                    "type": "string"
                }
            }
        },
@@ -2359,22 +2380,24 @@
        "request.UpdateOperation": {
            "type": "object",
            "properties": {
                "carrierID": {
                    "type": "integer"
                },
                "carrierName": {
                "comment": {
                    "description": "备注",
                    "type": "string"
                },
                "companyID": {
                    "description": "公司ID-客户",
                    "type": "integer"
                },
                "companyName": {
                    "description": "公司名称-客户名称",
                    "type": "string"
                },
                "contacterID": {
                    "description": "联系人ID-非必填",
                    "type": "integer"
                },
                "contacterName": {
                    "description": "联系人姓名-非必填",
                    "type": "string"
                },
                "details": {
@@ -2395,6 +2418,7 @@
                    "type": "string"
                },
                "operationDate": {
                    "description": "安排日期",
                    "type": "string"
                },
                "operationTypeId": {
@@ -2416,15 +2440,6 @@
                "toLocationId": {
                    "description": "目标位置id",
                    "type": "integer"
                },
                "tracking": {
                    "type": "string"
                },
                "transferWeight": {
                    "type": "number"
                },
                "weight": {
                    "type": "number"
                }
            }
        },
@@ -2546,8 +2561,6 @@
    Description:      "",
    InfoInstanceName: "swagger",
    SwaggerTemplate:  docTemplate,
    LeftDelim:        "{{",
    RightDelim:       "}}",
}
func init() {
docs/swagger.json
@@ -455,6 +455,34 @@
                }
            }
        },
        "/api-wms/v1/operation/finish/{id}": {
            "put": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "入库/出库"
                ],
                "summary": "更改记录状态",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "id",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功",
                        "schema": {
                            "$ref": "#/definitions/util.Response"
                        }
                    }
                }
            }
        },
        "/api-wms/v1/operation/operation": {
            "get": {
                "consumes": [
@@ -525,7 +553,7 @@
            }
        },
        "/api-wms/v1/operation/operation/{id}": {
            "put": {
            "post": {
                "produces": [
                    "application/json"
                ],
@@ -593,7 +621,7 @@
                    "application/json"
                ],
                "tags": [
                    "作业类型"
                    "业务类型"
                ],
                "summary": "查询作业类型列表",
                "parameters": [
@@ -644,7 +672,7 @@
                    "application/json"
                ],
                "tags": [
                    "作业类型"
                    "业务类型"
                ],
                "summary": "添加作业类型",
                "parameters": [
@@ -674,7 +702,7 @@
                    "application/json"
                ],
                "tags": [
                    "作业类型"
                    "业务类型"
                ],
                "summary": "编辑作业类型",
                "parameters": [
@@ -709,7 +737,7 @@
                    "application/json"
                ],
                "tags": [
                    "作业类型"
                    "业务类型"
                ],
                "summary": "删除作业类型",
                "parameters": [
@@ -1610,10 +1638,6 @@
        "models.Material": {
            "type": "object",
            "properties": {
                "HSCode": {
                    "description": "HS编码",
                    "type": "string"
                },
                "amount": {
                    "description": "数量",
                    "type": "number"
@@ -1667,14 +1691,14 @@
                    "type": "number"
                },
                "deliveryAdvanceTime": {
                    "description": "交货提前时间(天)",
                    "type": "integer"
                    "description": "客户前置时间(天)",
                    "type": "number"
                },
                "id": {
                    "type": "string"
                },
                "inStorageExplain": {
                    "description": "入库说明",
                    "description": "HSCode                  string                     `gorm:\"type:varchar(255);comment:HS编码\" json:\"HSCode\"`                    //HS编码\nOriginCountryId         int                        `gorm:\"type:int(11);comment:原产地id\" json:\"originCountryId\"`               //原产地id\nOriginCountryName       string                     `gorm:\"type:varchar(255);comment:原产地名称\" json:\"originCountryName\"`        //原产地名称",
                    "type": "string"
                },
                "internalNotes": {
@@ -1701,6 +1725,10 @@
                    "description": "PurchaseType      constvar.PurchaseType `gorm:\"type:int(11);comment:采购类型\" json:\"purchaseType\"`",
                    "type": "boolean"
                },
                "makeAdvanceTime": {
                    "description": "制造前置时间(天)",
                    "type": "number"
                },
                "maxInventory": {
                    "description": "最大库存",
                    "type": "number"
@@ -1725,6 +1753,10 @@
                    "description": "物料名称",
                    "type": "string"
                },
                "orderAdvanceTime": {
                    "description": "订单准备天数(天)",
                    "type": "number"
                },
                "orderCreation": {
                    "description": "订单创建",
                    "allOf": [
@@ -1732,14 +1764,6 @@
                            "$ref": "#/definitions/constvar.OrderCreation"
                        }
                    ]
                },
                "originCountryId": {
                    "description": "原产地id",
                    "type": "integer"
                },
                "originCountryName": {
                    "description": "原产地名称",
                    "type": "string"
                },
                "outStorageExplain": {
                    "description": "出库说明",
@@ -2077,22 +2101,24 @@
        "request.AddOperation": {
            "type": "object",
            "properties": {
                "carrierID": {
                    "type": "integer"
                },
                "carrierName": {
                "comment": {
                    "description": "备注",
                    "type": "string"
                },
                "companyID": {
                    "description": "公司ID-客户",
                    "type": "integer"
                },
                "companyName": {
                    "description": "公司名称-客户名称",
                    "type": "string"
                },
                "contacterID": {
                    "description": "联系人ID-非必填",
                    "type": "integer"
                },
                "contacterName": {
                    "description": "联系人姓名-非必填",
                    "type": "string"
                },
                "details": {
@@ -2113,6 +2139,7 @@
                    "type": "string"
                },
                "operationDate": {
                    "description": "安排日期",
                    "type": "string"
                },
                "operationTypeId": {
@@ -2134,15 +2161,6 @@
                "toLocationId": {
                    "description": "目标位置id",
                    "type": "integer"
                },
                "tracking": {
                    "type": "string"
                },
                "transferWeight": {
                    "type": "number"
                },
                "weight": {
                    "type": "number"
                }
            }
        },
@@ -2290,13 +2308,13 @@
        "request.OperationDetails": {
            "type": "object",
            "properties": {
                "finishQuantity": {
                    "description": "完成数量",
                    "type": "number"
                "OperationId": {
                    "description": "操作id",
                    "type": "integer"
                },
                "productId": {
                    "description": "产品id",
                    "type": "integer"
                    "type": "string"
                },
                "productName": {
                    "description": "产品名称",
@@ -2305,6 +2323,9 @@
                "quantity": {
                    "description": "数量",
                    "type": "number"
                },
                "unit": {
                    "type": "string"
                }
            }
        },
@@ -2347,22 +2368,24 @@
        "request.UpdateOperation": {
            "type": "object",
            "properties": {
                "carrierID": {
                    "type": "integer"
                },
                "carrierName": {
                "comment": {
                    "description": "备注",
                    "type": "string"
                },
                "companyID": {
                    "description": "公司ID-客户",
                    "type": "integer"
                },
                "companyName": {
                    "description": "公司名称-客户名称",
                    "type": "string"
                },
                "contacterID": {
                    "description": "联系人ID-非必填",
                    "type": "integer"
                },
                "contacterName": {
                    "description": "联系人姓名-非必填",
                    "type": "string"
                },
                "details": {
@@ -2383,6 +2406,7 @@
                    "type": "string"
                },
                "operationDate": {
                    "description": "安排日期",
                    "type": "string"
                },
                "operationTypeId": {
@@ -2404,15 +2428,6 @@
                "toLocationId": {
                    "description": "目标位置id",
                    "type": "integer"
                },
                "tracking": {
                    "type": "string"
                },
                "transferWeight": {
                    "type": "number"
                },
                "weight": {
                    "type": "number"
                }
            }
        },
docs/swagger.yaml
@@ -263,9 +263,6 @@
    type: object
  models.Material:
    properties:
      HSCode:
        description: HS编码
        type: string
      amount:
        description: 数量
        type: number
@@ -304,12 +301,15 @@
        description: 客户税百分比
        type: number
      deliveryAdvanceTime:
        description: 交货提前时间(天)
        type: integer
        description: 客户前置时间(天)
        type: number
      id:
        type: string
      inStorageExplain:
        description: 入库说明
        description: |-
          HSCode                  string                     `gorm:"type:varchar(255);comment:HS编码" json:"HSCode"`                    //HS编码
          OriginCountryId         int                        `gorm:"type:int(11);comment:原产地id" json:"originCountryId"`               //原产地id
          OriginCountryName       string                     `gorm:"type:varchar(255);comment:原产地名称" json:"originCountryName"`        //原产地名称
        type: string
      internalNotes:
        description: 内部说明
@@ -328,6 +328,9 @@
        description: PurchaseType      constvar.PurchaseType `gorm:"type:int(11);comment:采购类型"
          json:"purchaseType"`
        type: boolean
      makeAdvanceTime:
        description: 制造前置时间(天)
        type: number
      maxInventory:
        description: 最大库存
        type: number
@@ -351,16 +354,13 @@
      name:
        description: 物料名称
        type: string
      orderAdvanceTime:
        description: 订单准备天数(天)
        type: number
      orderCreation:
        allOf:
        - $ref: '#/definitions/constvar.OrderCreation'
        description: 订单创建
      originCountryId:
        description: 原产地id
        type: integer
      originCountryName:
        description: 原产地名称
        type: string
      outStorageExplain:
        description: 出库说明
        type: string
@@ -588,17 +588,20 @@
    type: object
  request.AddOperation:
    properties:
      carrierID:
        type: integer
      carrierName:
      comment:
        description: 备注
        type: string
      companyID:
        description: 公司ID-客户
        type: integer
      companyName:
        description: 公司名称-客户名称
        type: string
      contacterID:
        description: 联系人ID-非必填
        type: integer
      contacterName:
        description: 联系人姓名-非必填
        type: string
      details:
        items:
@@ -613,6 +616,7 @@
        description: 单号
        type: string
      operationDate:
        description: 安排日期
        type: string
      operationTypeId:
        description: 作业类型id
@@ -627,12 +631,6 @@
      toLocationId:
        description: 目标位置id
        type: integer
      tracking:
        type: string
      transferWeight:
        type: number
      weight:
        type: number
    type: object
  request.AddOperationType:
    properties:
@@ -733,18 +731,20 @@
    type: object
  request.OperationDetails:
    properties:
      finishQuantity:
        description: 完成数量
        type: number
      OperationId:
        description: 操作id
        type: integer
      productId:
        description: 产品id
        type: integer
        type: string
      productName:
        description: 产品名称
        type: string
      quantity:
        description: 数量
        type: number
      unit:
        type: string
    type: object
  request.UpdateCompany:
    properties:
@@ -773,17 +773,20 @@
    type: object
  request.UpdateOperation:
    properties:
      carrierID:
        type: integer
      carrierName:
      comment:
        description: 备注
        type: string
      companyID:
        description: 公司ID-客户
        type: integer
      companyName:
        description: 公司名称-客户名称
        type: string
      contacterID:
        description: 联系人ID-非必填
        type: integer
      contacterName:
        description: 联系人姓名-非必填
        type: string
      details:
        items:
@@ -798,6 +801,7 @@
        description: 单号
        type: string
      operationDate:
        description: 安排日期
        type: string
      operationTypeId:
        description: 作业类型id
@@ -812,12 +816,6 @@
      toLocationId:
        description: 目标位置id
        type: integer
      tracking:
        type: string
      transferWeight:
        type: number
      weight:
        type: number
    type: object
  request.UpdateOperationType:
    properties:
@@ -1169,6 +1167,24 @@
      summary: 修改位置
      tags:
      - 位置
  /api-wms/v1/operation/finish/{id}:
    put:
      parameters:
      - description: id
        in: path
        name: id
        required: true
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            $ref: '#/definitions/util.Response'
      summary: 更改记录状态
      tags:
      - 入库/出库
  /api-wms/v1/operation/operation:
    get:
      consumes:
@@ -1231,7 +1247,7 @@
      summary: 删除入库/出库信息
      tags:
      - 入库/出库
    put:
    post:
      parameters:
      - description: 入库信息
        in: body
@@ -1284,7 +1300,7 @@
              type: object
      summary: 查询作业类型列表
      tags:
      - 作业类型
      - 业务类型
    post:
      parameters:
      - description: 作业类型信息
@@ -1302,7 +1318,7 @@
            $ref: '#/definitions/util.Response'
      summary: 添加作业类型
      tags:
      - 作业类型
      - 业务类型
  /api-wms/v1/operationType/operationType/{id}:
    delete:
      parameters:
@@ -1320,7 +1336,7 @@
            $ref: '#/definitions/util.Response'
      summary: 删除作业类型
      tags:
      - 作业类型
      - 业务类型
    put:
      parameters:
      - description: 作业类型信息
@@ -1343,7 +1359,7 @@
            $ref: '#/definitions/util.Response'
      summary: 编辑作业类型
      tags:
      - 作业类型
      - 业务类型
  /api-wms/v1/product/addProduct:
    post:
      parameters:
models/operation_details.go
@@ -154,7 +154,7 @@
func (slf *OperationDetailsSearch) Delete() error {
    var db = slf.build()
    return db.Delete(&OperationDetails{}).Error
    return db.Unscoped().Delete(&OperationDetails{}).Error
}
func (slf *OperationDetailsSearch) First() (*OperationDetails, error) {
request/operation.go
@@ -19,7 +19,7 @@
    ContacterName   string                   `json:"contacterName" gorm:"type:varchar(63);comment:联系人姓名"` //联系人姓名-非必填
    CompanyID       int                      `json:"companyID" gorm:"type:int;comment:公司ID"`              //公司ID-客户
    CompanyName     string                   `json:"companyName" gorm:"type:varchar(127);comment:公司名称"`   //公司名称-客户名称
    Comment         string                   `json:"comment" gorm:"type:text;comment:备注"`
    Comment         string                   `json:"comment" gorm:"type:text;comment:备注"`                 //备注
    //Weight          decimal.Decimal          `json:"weight" gorm:"type:decimal(20,2);comment:重量(kg)"`           //重量(kg)-非必填
    //TransferWeight  decimal.Decimal          `json:"transferWeight" gorm:"type:decimal(20,2);comment:物流重量(kg)"` //物流重量(kg)-非必填
@@ -29,7 +29,8 @@
}
type OperationDetails struct {
    ProductId   int             `json:"productId" gorm:"type:int;not null;comment:产品id"`            //产品id
    OperationId int             `json:"OperationId" gorm:"type:int;not null;comment:操作记录id"`        //操作id
    ProductId   string          `json:"productId" gorm:"type:varchar(191);not null;comment:产品id"`   //产品id
    ProductName string          `json:"productName" gorm:"type:varchar(255);not null;comment:产品名称"` //产品名称
    Quantity    decimal.Decimal `json:"quantity" gorm:"type:decimal(20,2);not null;comment:数量"`     //数量
    Unit        string          `json:"unit" gorm:"type:varchar(31);comment:单位"`
@@ -50,13 +51,15 @@
    ToLocationId    int                      `json:"toLocationId"    gorm:"type:int;not null;comment:目标位置id"` //目标位置id
    OperationDate   string                   `json:"operationDate" gorm:"type:varchar(31);comment:安排日期"`      //安排日期
    Details         []*OperationDetails      `json:"details"`
    CarrierID       int                      `json:"carrierID" gorm:"type:int;comment:承运商ID"`                   //承运商ID-非必填
    CarrierName     string                   `json:"carrierName" gorm:"type:varchar(63);comment:承运商名称"`         //承运商名称-非必填
    Tracking        string                   `json:"tracking" gorm:"type:varchar(127);comment:追踪参考"`            //追踪参考-非必填
    ContacterID     int                      `json:"contacterID" gorm:"type:int;comment:联系人ID"`                 //联系人ID-非必填
    ContacterName   string                   `json:"contacterName" gorm:"type:varchar(63);comment:联系人姓名"`       //联系人姓名-非必填
    Weight          decimal.Decimal          `json:"weight" gorm:"type:decimal(20,2);comment:重量(kg)"`           //重量(kg)-非必填
    TransferWeight  decimal.Decimal          `json:"transferWeight" gorm:"type:decimal(20,2);comment:物流重量(kg)"` //物流重量(kg)-非必填
    CompanyID       int                      `json:"companyID" gorm:"type:int;comment:公司ID"`                    //公司ID-客户
    CompanyName     string                   `json:"companyName" gorm:"type:varchar(127);comment:公司名称"`         //公司名称-客户名称
    Comment         string                   `json:"comment" gorm:"type:text;comment:备注"`                 //备注
    //CarrierID      int             `json:"carrierID" gorm:"type:int;comment:承运商ID"`                   //承运商ID-非必填
    //CarrierName    string          `json:"carrierName" gorm:"type:varchar(63);comment:承运商名称"`         //承运商名称-非必填
    //Tracking       string          `json:"tracking" gorm:"type:varchar(127);comment:追踪参考"`            //追踪参考-非必填
    //Weight         decimal.Decimal `json:"weight" gorm:"type:decimal(20,2);comment:重量(kg)"`           //重量(kg)-非必填
    //TransferWeight decimal.Decimal `json:"transferWeight" gorm:"type:decimal(20,2);comment:物流重量(kg)"` //物流重量(kg)-非必填
}
router/router.go
@@ -79,7 +79,7 @@
    {
        operationAPI.GET("operation", operationController.List)
        operationAPI.POST("operation", operationController.Add)
        operationAPI.PUT("operation/:id", operationController.Update)
        operationAPI.POST("operation/:id", operationController.Update)
        operationAPI.DELETE("operation/:id", operationController.Delete)
        operationAPI.PUT("Finish/:id", operationController.Finish)
    }