From 6712c63bce309ab3a7642b48595b8ff136cf3847 Mon Sep 17 00:00:00 2001 From: jiangshuai <291802688@qq.com> Date: 星期二, 06 二月 2024 10:15:22 +0800 Subject: [PATCH] Merge branch 'master' of http://192.168.5.5:10010/r/aps/WMS --- models/material.go | 31 ++++++++++++++++++------------- 1 files changed, 18 insertions(+), 13 deletions(-) diff --git a/models/material.go b/models/material.go index 16a6e10..721368f 100644 --- a/models/material.go +++ b/models/material.go @@ -59,7 +59,7 @@ ControlStrategy constvar.InvoicingStrategy `gorm:"type:int(11);comment:鎺у埗绛栫暐" json:"controlStrategy"` //鎺у埗绛栫暐 BuyExplain string `gorm:"type:varchar(512);comment:閲囪喘璇存槑" json:"buyExplain"` //閲囪喘璇存槑 Principal string `gorm:"type:varchar(255);comment:璐熻矗浜�" json:"principal"` //璐熻矗浜� - Weight decimal.Decimal `gorm:"type:decimal(20,2);comment:閲嶉噺" json:"weight"` //閲嶉噺 + Weight decimal.Decimal `gorm:"type:decimal(20,3);comment:閲嶉噺" json:"weight"` //閲嶉噺 Volume decimal.Decimal `gorm:"type:decimal(20,2);comment:浣撶Н" json:"volume"` //浣撶Н MakeAdvanceTime decimal.Decimal `gorm:"type:decimal(20,2);comment:鍒堕�犲墠缃椂闂�" json:"makeAdvanceTime"` //鍒堕�犲墠缃椂闂�(澶�) OrderAdvanceTime decimal.Decimal `gorm:"type:decimal(20,2);comment:璁㈠崟鍑嗗澶╂暟" json:"orderAdvanceTime"` //璁㈠崟鍑嗗澶╂暟(澶�) @@ -67,17 +67,22 @@ //HSCode string `gorm:"type:varchar(255);comment:HS缂栫爜" json:"HSCode"` //HS缂栫爜 //OriginCountryId int `gorm:"type:int(11);comment:鍘熶骇鍦癷d" json:"originCountryId"` //鍘熶骇鍦癷d //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"` - AttachmentIDs []uint `json:"attachmentIDs" gorm:"-"` - PredictionAmount decimal.Decimal `json:"predictionAmount" gorm:"-"` - InputAmount decimal.Decimal `json:"inputAmount" gorm:"-"` - OutputAmount decimal.Decimal `json:"outputAmount" gorm:"-"` - MinInventoryRule decimal.Decimal `json:"minInventoryRule" gorm:"-"` //鏈�灏忓簱瀛� - MaxInventoryRule decimal.Decimal `json:"maxInventoryRule" gorm:"-"` //鏈�澶у簱瀛� - 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"` //鏃犲簱瀛樼殑鍦╳ms浠ュ強srm涓渶瑕佽繃婊ゆ帀 + IsVirtual int `json:"isVirtual" gorm:"type:tinyint(1);default:2;comment:鏄惁铏氭嫙鐗╂枡(1鏄�2鍚�)"` //铏氭嫙鐗╂枡鍦∕RP璁$畻鏃惰烦杩囪灞傜骇鐩存帴棰嗙敤涓嬬骇鐗╂枡锛岃櫄鎷熺墿鏂欎笉鐢熸垚宸ュ崟 + ReorderRuleNum int64 `json:"reorderRuleNum"` + + //浠ヤ笅涓轰笉瀛樺簱鐨勫瓧娈� + AttachmentIDs []uint `json:"attachmentIDs" gorm:"-"` + PredictionAmount decimal.Decimal `json:"predictionAmount" gorm:"-"` + InputAmount decimal.Decimal `json:"inputAmount" gorm:"-"` + OutputAmount decimal.Decimal `json:"outputAmount" gorm:"-"` + MinInventoryRule decimal.Decimal `json:"minInventoryRule" gorm:"-"` //鏈�灏忓簱瀛� + MaxInventoryRule decimal.Decimal `json:"maxInventoryRule" gorm:"-"` //鏈�澶у簱瀛� + } MaterialSearch struct { @@ -105,7 +110,7 @@ } func NewMaterialSearch() *MaterialSearch { - return &MaterialSearch{Orm: mysqlx.GetDB()} + return &MaterialSearch{Orm: mysqlx.GetDB().Where("is_storage = ?", 1)} //鍙煡璇㈡湁搴撳瓨鐨� } func (slf *MaterialSearch) SetOrm(tx *gorm.DB) *MaterialSearch { -- Gitblit v1.8.0