| | |
| | | util.ResponseFormat(c, code.Success, "修改成功") |
| | | } |
| | | |
| | | // DeleteDevice |
| | | // Delete |
| | | // |
| | | // @Tags 入库/出库 |
| | | // @Summary 删除入库/出库信息 |
| | |
| | | util.ResponseFormat(c, code.Success, "删除成功") |
| | | } |
| | | |
| | | // DeleteDevice |
| | | // Finish |
| | | // |
| | | // @Tags 入库/出库 |
| | | // @Summary 更改记录状态 |
| | |
| | | util.ResponseFormat(c, code.Success, "操作成功") |
| | | } |
| | | |
| | | // listTransfer |
| | | // ListTransfer |
| | | // @Tags 入库/出库 |
| | | // @Summary 库存调拨列表 |
| | | // @Produce application/json |
| | |
| | | } |
| | | util.ResponseFormatListWithPage(c, code.Success, list, int(total), params.Page, params.PageSize) |
| | | } |
| | | |
| | | // GetLogisticCompanyList |
| | | // @Tags 入库/出库 |
| | | // @Summary 获取物流公司列表 |
| | | // @Produce application/json |
| | | // @Success 200 {object} util.ResponseList{data=[]models.LogisticCompany} "成功" |
| | | // @Router /api-wms/v1/operation/getLogisticCompanyList [get] |
| | | func (slf OperationController) GetLogisticCompanyList(c *gin.Context) { |
| | | companies, err := models.NewLogisticCompanySearch().FindNotTotal() |
| | | if err != nil { |
| | | util.ResponseFormat(c, code.RequestError, "查找失败:"+err.Error()) |
| | | return |
| | | } |
| | | util.ResponseFormat(c, code.Success, companies) |
| | | } |
| | |
| | | } |
| | | } |
| | | }, |
| | | "/api-wms/v1/operation/getLogisticCompanyList": { |
| | | "get": { |
| | | "produces": [ |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "入库/出库" |
| | | ], |
| | | "summary": "获取物流公司列表", |
| | | "responses": { |
| | | "200": { |
| | | "description": "成功", |
| | | "schema": { |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/util.ResponseList" |
| | | }, |
| | | { |
| | | "type": "object", |
| | | "properties": { |
| | | "data": { |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/models.LogisticCompany" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "/api-wms/v1/operation/list": { |
| | | "post": { |
| | | "produces": [ |
| | |
| | | "CostingMethodAverageCost" |
| | | ] |
| | | }, |
| | | "constvar.FileType": { |
| | | "type": "string", |
| | | "enum": [ |
| | | "file", |
| | | "picture", |
| | | "thumbnail" |
| | | ], |
| | | "x-enum-comments": { |
| | | "FileType_File": "文件", |
| | | "FileType_Picture": "图片", |
| | | "FileType_Thumbnail": "缩略图" |
| | | }, |
| | | "x-enum-varnames": [ |
| | | "FileType_File", |
| | | "FileType_Picture", |
| | | "FileType_Thumbnail" |
| | | ] |
| | | }, |
| | | "constvar.ForceRemovalStrategy": { |
| | | "type": "integer", |
| | | "enum": [ |
| | |
| | | "ReservationNever" |
| | | ] |
| | | }, |
| | | "models.Attachment": { |
| | | "type": "object", |
| | | "properties": { |
| | | "FileUrl": { |
| | | "type": "string" |
| | | }, |
| | | "ext": { |
| | | "type": "string" |
| | | }, |
| | | "fileName": { |
| | | "type": "string" |
| | | }, |
| | | "fileType": { |
| | | "$ref": "#/definitions/constvar.FileType" |
| | | }, |
| | | "id": { |
| | | "type": "integer" |
| | | } |
| | | } |
| | | }, |
| | | "models.Company": { |
| | | "type": "object", |
| | | "properties": { |
| | |
| | | } |
| | | } |
| | | }, |
| | | "models.LogisticCompany": { |
| | | "type": "object", |
| | | "properties": { |
| | | "contact": { |
| | | "description": "联系人", |
| | | "type": "string" |
| | | }, |
| | | "contact_phone": { |
| | | "description": "联系电话", |
| | | "type": "string" |
| | | }, |
| | | "hidden": { |
| | | "description": "隐藏", |
| | | "type": "boolean" |
| | | }, |
| | | "id": { |
| | | "type": "string" |
| | | }, |
| | | "monthly_account": { |
| | | "description": "月结账号", |
| | | "type": "string" |
| | | }, |
| | | "name": { |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | | "models.Material": { |
| | | "type": "object", |
| | | "properties": { |
| | | "amount": { |
| | | "description": "数量", |
| | | "type": "number" |
| | | }, |
| | | "attachmentIDs": { |
| | | "type": "array", |
| | | "items": { |
| | | "type": "integer" |
| | | } |
| | | }, |
| | | "attachmentList": { |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/models.Attachment" |
| | | } |
| | | }, |
| | | "barcode": { |
| | | "description": "条码", |
| | |
| | | "id": { |
| | | "type": "integer" |
| | | }, |
| | | "logisticCompany": { |
| | | "$ref": "#/definitions/models.LogisticCompany" |
| | | }, |
| | | "logisticCompanyId": { |
| | | "type": "string" |
| | | }, |
| | | "logisticWeight": { |
| | | "description": "物流重量", |
| | | "type": "number" |
| | | }, |
| | | "number": { |
| | | "description": "单号", |
| | | "type": "string" |
| | |
| | | }, |
| | | "updateTime": { |
| | | "type": "string" |
| | | }, |
| | | "waybillNumber": { |
| | | "description": "运单号", |
| | | "type": "string" |
| | | }, |
| | | "weight": { |
| | | "description": "重量", |
| | | "type": "number" |
| | | } |
| | | } |
| | | }, |
| | |
| | | "id": { |
| | | "type": "integer" |
| | | }, |
| | | "logisticCompanyId": { |
| | | "type": "string" |
| | | }, |
| | | "logisticWeight": { |
| | | "description": "物流重量", |
| | | "type": "number" |
| | | }, |
| | | "number": { |
| | | "description": "单号", |
| | | "type": "string" |
| | |
| | | "toLocationId": { |
| | | "description": "目标位置id", |
| | | "type": "integer" |
| | | }, |
| | | "waybillNumber": { |
| | | "description": "运单号", |
| | | "type": "string" |
| | | }, |
| | | "weight": { |
| | | "description": "重量", |
| | | "type": "number" |
| | | } |
| | | } |
| | | }, |
| | |
| | | Description: "", |
| | | InfoInstanceName: "swagger", |
| | | SwaggerTemplate: docTemplate, |
| | | LeftDelim: "{{", |
| | | RightDelim: "}}", |
| | | } |
| | | |
| | | func init() { |
| | |
| | | } |
| | | } |
| | | }, |
| | | "/api-wms/v1/operation/getLogisticCompanyList": { |
| | | "get": { |
| | | "produces": [ |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "入库/出库" |
| | | ], |
| | | "summary": "获取物流公司列表", |
| | | "responses": { |
| | | "200": { |
| | | "description": "成功", |
| | | "schema": { |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/util.ResponseList" |
| | | }, |
| | | { |
| | | "type": "object", |
| | | "properties": { |
| | | "data": { |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/models.LogisticCompany" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "/api-wms/v1/operation/list": { |
| | | "post": { |
| | | "produces": [ |
| | |
| | | "CostingMethodAverageCost" |
| | | ] |
| | | }, |
| | | "constvar.FileType": { |
| | | "type": "string", |
| | | "enum": [ |
| | | "file", |
| | | "picture", |
| | | "thumbnail" |
| | | ], |
| | | "x-enum-comments": { |
| | | "FileType_File": "文件", |
| | | "FileType_Picture": "图片", |
| | | "FileType_Thumbnail": "缩略图" |
| | | }, |
| | | "x-enum-varnames": [ |
| | | "FileType_File", |
| | | "FileType_Picture", |
| | | "FileType_Thumbnail" |
| | | ] |
| | | }, |
| | | "constvar.ForceRemovalStrategy": { |
| | | "type": "integer", |
| | | "enum": [ |
| | |
| | | "ReservationNever" |
| | | ] |
| | | }, |
| | | "models.Attachment": { |
| | | "type": "object", |
| | | "properties": { |
| | | "FileUrl": { |
| | | "type": "string" |
| | | }, |
| | | "ext": { |
| | | "type": "string" |
| | | }, |
| | | "fileName": { |
| | | "type": "string" |
| | | }, |
| | | "fileType": { |
| | | "$ref": "#/definitions/constvar.FileType" |
| | | }, |
| | | "id": { |
| | | "type": "integer" |
| | | } |
| | | } |
| | | }, |
| | | "models.Company": { |
| | | "type": "object", |
| | | "properties": { |
| | |
| | | } |
| | | } |
| | | }, |
| | | "models.LogisticCompany": { |
| | | "type": "object", |
| | | "properties": { |
| | | "contact": { |
| | | "description": "联系人", |
| | | "type": "string" |
| | | }, |
| | | "contact_phone": { |
| | | "description": "联系电话", |
| | | "type": "string" |
| | | }, |
| | | "hidden": { |
| | | "description": "隐藏", |
| | | "type": "boolean" |
| | | }, |
| | | "id": { |
| | | "type": "string" |
| | | }, |
| | | "monthly_account": { |
| | | "description": "月结账号", |
| | | "type": "string" |
| | | }, |
| | | "name": { |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | | "models.Material": { |
| | | "type": "object", |
| | | "properties": { |
| | | "amount": { |
| | | "description": "数量", |
| | | "type": "number" |
| | | }, |
| | | "attachmentIDs": { |
| | | "type": "array", |
| | | "items": { |
| | | "type": "integer" |
| | | } |
| | | }, |
| | | "attachmentList": { |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/models.Attachment" |
| | | } |
| | | }, |
| | | "barcode": { |
| | | "description": "条码", |
| | |
| | | "id": { |
| | | "type": "integer" |
| | | }, |
| | | "logisticCompany": { |
| | | "$ref": "#/definitions/models.LogisticCompany" |
| | | }, |
| | | "logisticCompanyId": { |
| | | "type": "string" |
| | | }, |
| | | "logisticWeight": { |
| | | "description": "物流重量", |
| | | "type": "number" |
| | | }, |
| | | "number": { |
| | | "description": "单号", |
| | | "type": "string" |
| | |
| | | }, |
| | | "updateTime": { |
| | | "type": "string" |
| | | }, |
| | | "waybillNumber": { |
| | | "description": "运单号", |
| | | "type": "string" |
| | | }, |
| | | "weight": { |
| | | "description": "重量", |
| | | "type": "number" |
| | | } |
| | | } |
| | | }, |
| | |
| | | "id": { |
| | | "type": "integer" |
| | | }, |
| | | "logisticCompanyId": { |
| | | "type": "string" |
| | | }, |
| | | "logisticWeight": { |
| | | "description": "物流重量", |
| | | "type": "number" |
| | | }, |
| | | "number": { |
| | | "description": "单号", |
| | | "type": "string" |
| | |
| | | "toLocationId": { |
| | | "description": "目标位置id", |
| | | "type": "integer" |
| | | }, |
| | | "waybillNumber": { |
| | | "description": "运单号", |
| | | "type": "string" |
| | | }, |
| | | "weight": { |
| | | "description": "重量", |
| | | "type": "number" |
| | | } |
| | | } |
| | | }, |
| | |
| | | - CostingMethodStandardPrice |
| | | - CostingMethodFIFO |
| | | - CostingMethodAverageCost |
| | | constvar.FileType: |
| | | enum: |
| | | - file |
| | | - picture |
| | | - thumbnail |
| | | type: string |
| | | x-enum-comments: |
| | | FileType_File: 文件 |
| | | FileType_Picture: 图片 |
| | | FileType_Thumbnail: 缩略图 |
| | | x-enum-varnames: |
| | | - FileType_File |
| | | - FileType_Picture |
| | | - FileType_Thumbnail |
| | | constvar.ForceRemovalStrategy: |
| | | enum: |
| | | - 1 |
| | |
| | | - WhetherTypeAsk |
| | | - WhetherTypeAlways |
| | | - ReservationNever |
| | | models.Attachment: |
| | | properties: |
| | | FileUrl: |
| | | type: string |
| | | ext: |
| | | type: string |
| | | fileName: |
| | | type: string |
| | | fileType: |
| | | $ref: '#/definitions/constvar.FileType' |
| | | id: |
| | | type: integer |
| | | type: object |
| | | models.Company: |
| | | properties: |
| | | createTime: |
| | |
| | | updateTime: |
| | | type: string |
| | | type: object |
| | | models.LogisticCompany: |
| | | properties: |
| | | contact: |
| | | description: 联系人 |
| | | type: string |
| | | contact_phone: |
| | | description: 联系电话 |
| | | type: string |
| | | hidden: |
| | | description: 隐藏 |
| | | type: boolean |
| | | id: |
| | | type: string |
| | | monthly_account: |
| | | description: 月结账号 |
| | | type: string |
| | | name: |
| | | type: string |
| | | type: object |
| | | models.Material: |
| | | properties: |
| | | amount: |
| | | description: 数量 |
| | | type: number |
| | | attachmentIDs: |
| | | items: |
| | | type: integer |
| | | type: array |
| | | attachmentList: |
| | | items: |
| | | $ref: '#/definitions/models.Attachment' |
| | | type: array |
| | | barcode: |
| | | description: 条码 |
| | | type: string |
| | |
| | | type: integer |
| | | id: |
| | | type: integer |
| | | logisticCompany: |
| | | $ref: '#/definitions/models.LogisticCompany' |
| | | logisticCompanyId: |
| | | type: string |
| | | logisticWeight: |
| | | description: 物流重量 |
| | | type: number |
| | | number: |
| | | description: 单号 |
| | | type: string |
| | |
| | | type: integer |
| | | updateTime: |
| | | type: string |
| | | waybillNumber: |
| | | description: 运单号 |
| | | type: string |
| | | weight: |
| | | description: 重量 |
| | | type: number |
| | | type: object |
| | | models.OperationDetails: |
| | | properties: |
| | |
| | | type: integer |
| | | id: |
| | | type: integer |
| | | logisticCompanyId: |
| | | type: string |
| | | logisticWeight: |
| | | description: 物流重量 |
| | | type: number |
| | | number: |
| | | description: 单号 |
| | | type: string |
| | |
| | | toLocationId: |
| | | description: 目标位置id |
| | | type: integer |
| | | waybillNumber: |
| | | description: 运单号 |
| | | type: string |
| | | weight: |
| | | description: 重量 |
| | | type: number |
| | | type: object |
| | | request.AddOperationType: |
| | | properties: |
| | |
| | | summary: 更改记录状态 |
| | | tags: |
| | | - 入库/出库 |
| | | /api-wms/v1/operation/getLogisticCompanyList: |
| | | get: |
| | | produces: |
| | | - application/json |
| | | responses: |
| | | "200": |
| | | description: 成功 |
| | | schema: |
| | | allOf: |
| | | - $ref: '#/definitions/util.ResponseList' |
| | | - properties: |
| | | data: |
| | | items: |
| | | $ref: '#/definitions/models.LogisticCompany' |
| | | type: array |
| | | type: object |
| | | summary: 获取物流公司列表 |
| | | tags: |
| | | - 入库/出库 |
| | | /api-wms/v1/operation/list: |
| | | post: |
| | | parameters: |
| | |
| | | LocationProductAmount{}, |
| | | ReorderRule{}, |
| | | Attachment{}, |
| | | LogisticCompany{}, |
| | | ) |
| | | return err |
| | | } |
New file |
| | |
| | | package models |
| | | |
| | | import ( |
| | | "fmt" |
| | | "gorm.io/gorm" |
| | | "wms/pkg/mysqlx" |
| | | ) |
| | | |
| | | type ( |
| | | // LogisticCompany 物流公司 |
| | | //todo 与aps共用,修改字段要同步修改aps |
| | | LogisticCompany struct { |
| | | BaseModelString |
| | | Name string `gorm:"unique;type:varchar(191);not null;comment:名称" json:"name"` |
| | | // 月结账号 |
| | | MonthlyAccount string `gorm:"type:varchar(191);comment:月结账号" json:"monthly_account"` |
| | | // 联系人 |
| | | Contact string `gorm:"type:varchar(191);comment:联系人" json:"contact"` |
| | | // 联系电话 |
| | | ContactPhone string `gorm:"type:varchar(191);comment:联系电话" json:"contact_phone"` |
| | | // 隐藏 |
| | | Hidden bool `gorm:"type:tinyint(1);comment:是否隐藏" json:"hidden"` |
| | | } |
| | | |
| | | LogisticCompanySearch struct { |
| | | LogisticCompany |
| | | Order string |
| | | PageNum int |
| | | PageSize int |
| | | Orm *gorm.DB |
| | | } |
| | | ) |
| | | |
| | | func (slf LogisticCompany) TableName() string { |
| | | return "logistic_company" |
| | | } |
| | | |
| | | func NewLogisticCompanySearch() *LogisticCompanySearch { |
| | | return &LogisticCompanySearch{Orm: mysqlx.GetDB()} |
| | | } |
| | | |
| | | func (slf *LogisticCompanySearch) SetOrm(tx *gorm.DB) *LogisticCompanySearch { |
| | | slf.Orm = tx |
| | | return slf |
| | | } |
| | | |
| | | func (slf *LogisticCompanySearch) SetPage(page, size int) *LogisticCompanySearch { |
| | | slf.PageNum, slf.PageSize = page, size |
| | | return slf |
| | | } |
| | | |
| | | func (slf *LogisticCompanySearch) SetOrder(order string) *LogisticCompanySearch { |
| | | slf.Order = order |
| | | return slf |
| | | } |
| | | |
| | | func (slf *LogisticCompanySearch) SetID(id string) *LogisticCompanySearch { |
| | | slf.ID = id |
| | | return slf |
| | | } |
| | | |
| | | func (slf *LogisticCompanySearch) SetName(name string) *LogisticCompanySearch { |
| | | slf.Name = name |
| | | return slf |
| | | } |
| | | |
| | | func (slf *LogisticCompanySearch) SetKeyword(keyword string) *LogisticCompanySearch { |
| | | slf.Name = keyword |
| | | return slf |
| | | } |
| | | |
| | | func (slf *LogisticCompanySearch) build() *gorm.DB { |
| | | var db = slf.Orm.Table(slf.TableName()) |
| | | if slf.ID != "" { |
| | | db = db.Where("id = ?", slf.ID) |
| | | } |
| | | if slf.Name != "" { |
| | | db = db.Where("name like ?", "%"+slf.Name+"%") |
| | | } |
| | | if slf.Order != "" { |
| | | db = db.Order(slf.Order) |
| | | } |
| | | if slf.PageNum > 0 && slf.PageSize > 0 { |
| | | db = db.Offset((slf.PageNum - 1) * slf.PageSize).Limit(slf.PageSize) |
| | | } |
| | | return db |
| | | } |
| | | |
| | | func (slf *LogisticCompanySearch) CreateBatch(data []LogisticCompany) error { |
| | | var db = slf.build() |
| | | if err := db.Create(&data).Error; err != nil { |
| | | return err |
| | | } |
| | | |
| | | return nil |
| | | } |
| | | |
| | | func (slf *LogisticCompanySearch) Create(record *LogisticCompany) error { |
| | | var db = slf.build() |
| | | if err := db.Create(record).Error; err != nil { |
| | | return err |
| | | } |
| | | |
| | | return nil |
| | | } |
| | | |
| | | func (slf *LogisticCompanySearch) Save(record *LogisticCompany) error { |
| | | var db = slf.build() |
| | | if err := db.Save(record).Error; err != nil { |
| | | return err |
| | | } |
| | | |
| | | return nil |
| | | } |
| | | |
| | | func (slf *LogisticCompanySearch) Delete() error { |
| | | var db = slf.build() |
| | | if err := db.Delete(slf).Error; err != nil { |
| | | return err |
| | | } |
| | | |
| | | return nil |
| | | } |
| | | |
| | | func (slf *LogisticCompanySearch) Find() ([]LogisticCompany, int64, error) { |
| | | var db = slf.build() |
| | | var records []LogisticCompany |
| | | var total int64 |
| | | |
| | | if err := db.Count(&total).Error; err != nil { |
| | | return nil, 0, err |
| | | } |
| | | |
| | | if slf.PageNum*slf.PageSize > 0 { |
| | | db = db.Offset((slf.PageNum - 1) * slf.PageSize).Limit(slf.PageSize) |
| | | } |
| | | if err := db.Find(&records).Error; err != nil { |
| | | return records, total, fmt.Errorf("find records err: %v", err) |
| | | } |
| | | |
| | | return records, total, nil |
| | | } |
| | | |
| | | func (slf *LogisticCompanySearch) FindNotTotal() ([]LogisticCompany, error) { |
| | | var db = slf.build() |
| | | var records []LogisticCompany |
| | | |
| | | if err := db.Find(&records).Error; err != nil { |
| | | return records, fmt.Errorf("find records err: %v", err) |
| | | } |
| | | |
| | | return records, nil |
| | | } |
| | |
| | | |
| | | import ( |
| | | "fmt" |
| | | "github.com/shopspring/decimal" |
| | | "gorm.io/gorm" |
| | | "wms/constvar" |
| | | "wms/pkg/mysqlx" |
| | |
| | | CompanyID int `json:"companyID" gorm:"type:int;comment:公司ID-客户"` |
| | | CompanyName string `json:"companyName" gorm:"type:varchar(127);comment:公司名称-客户"` |
| | | Comment string `json:"comment" gorm:"type:text;comment:备注"` |
| | | LogisticCompanyId string `json:"logisticCompanyId" gorm:"type:varchar(191);comment:物流公司id"` |
| | | LogisticCompany LogisticCompany `json:"logisticCompany" gorm:"foreignKey:LogisticCompanyId"` |
| | | WaybillNumber string `json:"waybillNumber" gorm:"type:varchar(255);comment:运单号"` //运单号 |
| | | Weight decimal.Decimal `gorm:"type:decimal(20,2);comment:重量" json:"weight"` //重量 |
| | | LogisticWeight decimal.Decimal `gorm:"type:decimal(20,2);comment:物流重量" json:"logisticWeight"` //物流重量 |
| | | |
| | | Details []*OperationDetails `json:"details" gorm:"foreignKey:OperationID;references:Id"` |
| | | BaseOperationType constvar.BaseOperationType `json:"baseOperationType" gorm:"type:tinyint;not null;comment:基础作业类型"` //基础作业类型 |
| | |
| | | } |
| | | |
| | | if slf.Preload { |
| | | db = db.Model(&Operation{}).Preload("Details").Preload("Details.Product").Preload("FromLocation").Preload("ToLocation") |
| | | db = db.Model(&Operation{}).Preload("Details").Preload("Details.Product").Preload("FromLocation"). |
| | | Preload("ToLocation").Preload("LogisticCompany") |
| | | } |
| | | |
| | | if slf.Disuse { |
| | |
| | | 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:备注"` //备注 |
| | | |
| | | //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)-非必填 |
| | | //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:追踪参考"` //追踪参考-非必填 |
| | | LogisticCompanyId string `json:"logisticCompanyId" gorm:"type:varchar(191);comment:物流公司id"` |
| | | WaybillNumber string `json:"waybillNumber" gorm:"type:varchar(255);comment:运单号"` //运单号 |
| | | Weight decimal.Decimal `gorm:"type:decimal(20,2);comment:重量" json:"weight"` //重量 |
| | | LogisticWeight decimal.Decimal `gorm:"type:decimal(20,2);comment:物流重量" json:"logisticWeight"` //物流重量 |
| | | } |
| | | |
| | | type OperationDetails struct { |
| | |
| | | CompanyName string `json:"companyName" gorm:"type:varchar(127);comment:公司名称"` //公司名称-客户名称 |
| | | Comment string `json:"comment" gorm:"type:text;comment:备注"` //备注 |
| | | BaseOperationType constvar.BaseOperationType `json:"baseOperationType"` //基础作业类型 |
| | | LogisticCompanyId string `json:"logisticCompanyId" gorm:"type:varchar(191);comment:物流公司id"` |
| | | WaybillNumber string `json:"waybillNumber" gorm:"type:varchar(255);comment:运单号"` //运单号 |
| | | Weight decimal.Decimal `gorm:"type:decimal(20,2);comment:重量" json:"weight"` //重量 |
| | | LogisticWeight decimal.Decimal `gorm:"type:decimal(20,2);comment:物流重量" json:"logisticWeight"` //物流重量 |
| | | } |
| | | |
| | | type OperationAllList struct { |
| | |
| | | operationAPI.DELETE("operation/:id", operationController.Delete) |
| | | operationAPI.PUT("finish/:id", operationController.Finish) |
| | | operationAPI.POST("listTransfer", operationController.ListTransfer) |
| | | operationAPI.GET("getLogisticCompanyList", operationController.GetLogisticCompanyList) |
| | | |
| | | } |
| | | |