controllers/location_product_amount.go | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
models/material.go | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
models/operation_details.go | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
request/operation.go | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
controllers/location_product_amount.go
@@ -167,6 +167,7 @@ Comment: "库存盘点", BaseOperationType: constvar.BaseOperationTypeAdjust, Details: []*models.OperationDetails{detail}, LocationID: location.Id, } if err := models.WithTransaction(func(tx *gorm.DB) error { models/material.go
@@ -71,13 +71,19 @@ //HSCode string `gorm:"type:varchar(255);comment:HS编码" json:"HSCode"` //HS编码 //OriginCountryId int `gorm:"type:int(11);comment:原产地id" json:"originCountryId"` //原产地id //OriginCountryName string `gorm:"type:varchar(255);comment:原产地名称" json:"originCountryName"` //原产地名称 InStorageExplain string `gorm:"type:varchar(512);comment:入库说明" json:"inStorageExplain"` //入库说明 OutStorageExplain string `gorm:"type:varchar(512);comment:出库说明" json:"outStorageExplain"` //出库说明 InternalTransferExplain string `gorm:"type:varchar(512);comment:内部调拨说明" json:"internalTransferExplain"` //内部调拨说明 AttachmentList []*Attachment `json:"attachmentList" gorm:"many2many:material_attachment"` 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计算时跳过该层级直接领用下级物料,虚拟物料不生成工单 ReorderRuleNum int64 `json:"reorderRuleNum"` InStorageExplain string `gorm:"type:varchar(512);comment:入库说明" json:"inStorageExplain"` //入库说明 OutStorageExplain string `gorm:"type:varchar(512);comment:出库说明" json:"outStorageExplain"` //出库说明 InternalTransferExplain string `gorm:"type:varchar(512);comment:内部调拨说明" json:"internalTransferExplain"` //内部调拨说明 AttachmentList []*Attachment `json:"attachmentList" gorm:"many2many:material_attachment"` 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计算时跳过该层级直接领用下级物料,虚拟物料不生成工单 ReorderRuleNum int64 `json:"reorderRuleNum"` MoreUnit bool `json:"moreUnit" gorm:"type:tinyint(1);default:false;comment:启动多单位"` MoreUnitValue string `json:"moreUnitValue" gorm:"type:varchar(255);comment:多单位值"` GrossWeight decimal.Decimal `json:"grossWeight" gorm:"type:decimal(20,3);comment:毛重"` NetWeight decimal.Decimal `json:"netWeight" gorm:"type:decimal(20,3);comment:净重"` GrossUnit string `json:"grossUnit" gorm:"type:varchar(255);comment:毛重单位"` NetUnit string `json:"netUnit" gorm:"type:varchar(255);comment:净重单位"` //以下为不存库的字段 AttachmentIDs []uint `json:"attachmentIDs" gorm:"-"` models/operation_details.go
@@ -19,10 +19,12 @@ //Unit string `json:"unit" gorm:"type:varchar(31);comment:单位"` //单位 Product Material `json:"product" gorm:"foreignKey:ProductId;references:ID"` FromLocationID int `json:"fromLocationId" gorm:"type:int;not null;comment:源位置id"` //源位置id FromLocation Location `json:"fromLocation" gorm:"foreignKey:FromLocationID;references:Id"` //源位置 ToLocationID int `json:"toLocationId" gorm:"type:int;not null;comment:目标位置id"` //目标位置id ToLocation Location `json:"toLocation" gorm:"foreignKey:ToLocationID;references:Id"` //目标位置 FromLocationID int `json:"fromLocationId" gorm:"type:int;not null;comment:源位置id"` //源位置id FromLocation Location `json:"fromLocation" gorm:"foreignKey:FromLocationID;references:Id"` //源位置 ToLocationID int `json:"toLocationId" gorm:"type:int;not null;comment:目标位置id"` //目标位置id ToLocation Location `json:"toLocation" gorm:"foreignKey:ToLocationID;references:Id"` //目标位置 TotalGrossWeight decimal.Decimal `json:"totalGrossWeight" gorm:"type:decimal(20,3);comment:总毛重"` TotalNetWeight decimal.Decimal `json:"totalNetWeight" gorm:"type:decimal(20,3);comment:总净重"` } OperationDetailsSearch struct { request/operation.go
@@ -45,8 +45,10 @@ Amount decimal.Decimal `json:"amount" gorm:"type:decimal(20,2);not null;comment:数量"` //数量 //Unit string `json:"unit" gorm:"type:varchar(31);comment:单位"` //单位 //Product models.Material `json:"product" gorm:"foreignKey:ProductId;references:ID"` FromLocationId int `json:"fromLocationId" gorm:"type:int;not null;comment:源位置id"` //源位置id ToLocationId int `json:"toLocationId" gorm:"type:int;not null;comment:目标位置id"` //目标位置id FromLocationId int `json:"fromLocationId" gorm:"type:int;not null;comment:源位置id"` //源位置id ToLocationId int `json:"toLocationId" gorm:"type:int;not null;comment:目标位置id"` //目标位置id TotalGrossWeight decimal.Decimal `json:"totalGrossWeight" gorm:"type:decimal(20,3);comment:总毛重"` //总毛重 TotalNetWeight decimal.Decimal `json:"totalNetWeight" gorm:"type:decimal(20,3);comment:总净重"` //总净重 } type OperationList struct {