jiangshuai
2023-09-20 de66fdb29ff38924a235d366a73642c60a509ce6
models/operation.go
@@ -2,7 +2,6 @@
import (
   "fmt"
   "github.com/shopspring/decimal"
   "gorm.io/gorm"
   "wms/constvar"
   "wms/pkg/mysqlx"
@@ -22,16 +21,19 @@
      ToLocationId    int                      `json:"toLocationId"    gorm:"type:int;not null;comment:目标位置id"` //目标位置id
      ToLocation      Location                 `json:"toLocation"      gorm:"foreignKey:ToLocationId"`          //目标位置
      OperationDate   string                   `json:"operationDate" gorm:"type:varchar(31);comment:安排日期"`
      CarrierID       int                      `json:"carrierID" gorm:"type:int;comment:承运商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"`
      ContacterName   string                   `json:"contacterName" gorm:"type:varchar(63);comment:联系人姓名"`
      Weight          decimal.Decimal          `json:"weight" gorm:"type:decimal(20,2);comment:重量(kg)"`
      TransferWeight  decimal.Decimal          `json:"transferWeight" gorm:"type:decimal(20,2);comment:物流重量(kg)"`
      CompanyID       int                      `json:"companyID" gorm:"type:int;comment:公司ID"`
      CompanyName     string                   `json:"companyName" gorm:"type:varchar(127);comment:公司名称(kg)"`
      Details         []*OperationDetails      `json:"details"`
      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:备注"`
      Details []*OperationDetails `json:"details"`
      //Weight          decimal.Decimal          `json:"weight" gorm:"type:decimal(20,2);comment:重量(kg)"`
      //TransferWeight  decimal.Decimal          `json:"transferWeight" gorm:"type:decimal(20,2);comment:物流重量(kg)"`
      //CarrierID       int                      `json:"carrierID" gorm:"type:int;comment:承运商ID"`
      //CarrierName     string                   `json:"carrierName" gorm:"type:varchar(63);comment:承运商名称"`
      //Tracking        string                   `json:"tracking" gorm:"type:varchar(127);comment:追踪参考"`
   }
   OperationSearch struct {
@@ -73,10 +75,10 @@
   return slf
}
//func (slf *OperationSearch) SetKeyword(keyword string) *OperationSearch {
//   slf.Keyword = keyword
//   return slf
//}
func (slf *OperationSearch) SetKeyword(keyword string) *OperationSearch {
   slf.Keyword = keyword
   return slf
}
func (slf *OperationSearch) SetOperationTypeId(operationTypeId int) *OperationSearch {
   slf.OperationTypeId = operationTypeId