| | |
| | | companyName: jialian |
| | | db: |
| | | # dsn: root:c++java123@tcp(192.168.20.119:3306)/wms?charset=utf8&parseTime=True&loc=Local |
| | | dsn: root:c++java123@tcp(127.0.0.1:3306)/aps_server2?charset=utf8&parseTime=True&loc=Local |
| | | dsn: root:c++java123@tcp(192.168.20.119:3306)/aps_server2?charset=utf8&parseTime=True&loc=Local |
| | | logMode: true |
| | | maxIdleCon: 20 |
| | | maxOpenCon: 100 |
| | |
| | | type GetOperationTypeList struct { |
| | | PageInfo |
| | | Keyword string `json:"keyword"` |
| | | WarehouseId int `json:"warehouseId" gorm:"type:int;not null;comment:仓库id"` //仓库id |
| | | } |
| | | |
| | | type AddOperationType struct { |
| | |
| | | |
| | | import ( |
| | | "github.com/shopspring/decimal" |
| | | "time" |
| | | "wms/constvar" |
| | | "wms/models" |
| | | ) |
| | |
| | | |
| | | type InventoryHistory struct { |
| | | Number string `json:"number"` //单号 |
| | | Date time.Time `json:"date"` //日期 |
| | | Date string `json:"date"` //日期 |
| | | ProductName string `json:"productName"` //产品名称 |
| | | FromLocation string `json:"fromLocation"` //源位置 |
| | | ToLocation string `json:"toLocation"` //目标位置 |
| | | Amount decimal.Decimal `json:"amount"` //数量 |
| | | AmountMoreUnits []models.UnitItems `json:"amountMoreUnits"` //数量多单位 |
| | | AmountMoreUnits []models.UnitItems `json:"amountMoreUnits" gorm:"-"` //数量多单位 |
| | | Unit string `json:"unit"` //单位 |
| | | ContactedName string `json:"contactedName"` //完成者 |
| | | Status string `json:"status"` //状态 |
| | |
| | | for _, v := range list { |
| | | data := &response.InventoryHistory{ |
| | | Number: v.Number, |
| | | Date: v.UpdatedAt, |
| | | Date: v.UpdatedAt.Format("2006-01-02"), |
| | | ProductName: v.ProductName, |
| | | FromLocation: v.FromLocation, |
| | | ToLocation: v.ToLocation, |
| | |
| | | |
| | | for i, v := range dataList { |
| | | column := strconv.Itoa(i + 3) |
| | | f.SetCellValue("Sheet1", "A"+column, v.Date.Format("2006-01-02")) |
| | | f.SetCellValue("Sheet1", "A"+column, v.Date) |
| | | f.SetCellValue("Sheet1", "B"+column, v.Number) |
| | | f.SetCellValue("Sheet1", "C"+column, v.ProductName) |
| | | f.SetCellValue("Sheet1", "D"+column, v.ProductId) |