| | |
| | | EndAmount decimal.Decimal `json:"amount" gorm:"type:decimal(30,10);not null;comment:数量"` //期末结余数量 |
| | | |
| | | InputAmount decimal.Decimal `json:"inputAmount" gorm:"type:decimal(30,10);not null;comment:数量"` //入库数量 |
| | | InputItems []*WarehouseStatsItems `json:"inputMoreUnitsArr"` //入库明细 |
| | | InputItems []*WarehouseStatsItems `json:"inputItems"` //入库明细 |
| | | |
| | | OutputAmount decimal.Decimal `json:"outputAmount" gorm:"type:decimal(30,10);not null;comment:数量"` //出库数量 |
| | | OutputItems []*WarehouseStatsItems `json:"outputMoreUnitsArr"` //出库明细 |
| | | OutputItems []*WarehouseStatsItems `json:"outputItems"` //出库明细 |
| | | |
| | | Date string `json:"date" gorm:"index;type:varchar(255); not null;default ''"` //日期 2024-04 |
| | | } |
| | |
| | | return m |
| | | } |
| | | |
| | | func WarehouseStatsItemMap(records []*WarehouseStatsItems) (m map[string]*WarehouseStatsItems) { |
| | | m = make(map[string]*WarehouseStatsItems, len(records)) |
| | | for _, record := range records { |
| | | m[record.Name] = record |
| | | } |
| | | return m |
| | | } |
| | | |
| | | func (slf *WarehouseMonthStatsSearch) Count() (int64, error) { |
| | | var ( |
| | | total int64 |