| | |
| | | MinPurchaseAmount decimal.Decimal `gorm:"type:decimal(35,18);comment:最小采购量" json:"minPurchaseAmount"` |
| | | PurchaseType PurchaseType `gorm:"type:int(11);comment:采购类型" json:"purchaseType"` |
| | | SalePrice decimal.Decimal `gorm:"type:decimal(35,18);comment:销售单价" json:"salePrice"` |
| | | CategoryName string `gorm:"type:varchar(255);comment:产品类别名称" json:"categoryName"` //产品类别名称 |
| | | CategoryName string `gorm:"type:varchar(255);comment:产品类别名称" json:"categoryName"` //产品类别名称 |
| | | IsStorage int `gorm:"type:tinyint(1);default:1;comment:是否存库(1是2否)" json:"isStorage"` //无库存的在wms以及srm中需要过滤掉 |
| | | IsVirtual int `json:"isVirtual" gorm:"type:tinyint(1);default:2;comment:是否虚拟物料(1是2否)"` //虚拟物料在MRP计算时跳过该层级直接领用下级物料,虚拟物料不生成工单 |
| | | } |
| | | |
| | | // PurchaseType 采购类型 |
| | |
| | | |
| | | db = db.Where("purchase_type = ?", test.PurchaseTypeOutSource) |
| | | |
| | | db = db.Where("material_type != ?", test.MaterialTypeVirtual) |
| | | db = db.Where("is_storage = ?", 1) |
| | | |
| | | err = db.Count(&total).Error |
| | | if err != nil { |