From 2b3b678a0e0156e68415aa287fdf85d05583a5b4 Mon Sep 17 00:00:00 2001 From: jiangshuai <291802688@qq.com> Date: 星期四, 21 九月 2023 15:10:08 +0800 Subject: [PATCH] 1.修改出入库列表显示异常的问题 --- request/operation.go | 57 +++++++++++++++++++++++++++++++-------------------------- 1 files changed, 31 insertions(+), 26 deletions(-) diff --git a/request/operation.go b/request/operation.go index 3df3d69..2417a79 100644 --- a/request/operation.go +++ b/request/operation.go @@ -6,31 +6,34 @@ ) type AddOperation struct { - Id int `json:"id" gorm:"column:id;primary_key;AUTO_INCREMENT"` + ID int `json:"id" gorm:"column:id;primary_key;AUTO_INCREMENT"` Number string `json:"number" gorm:"column:number;type:varchar(255)"` //鍗曞彿 SourceNumber string `json:"sourceNumber" gorm:"type:varchar(255)"` //婧愬崟鍙� OperationTypeId int `json:"operationTypeId" gorm:"type:int;not null;comment:浣滀笟绫诲瀷id"` //浣滀笟绫诲瀷id Status constvar.OperationStatus `json:"status" gorm:"type:int(11);not null;comment:鐘舵��"` //鐘舵�� FromLocationId int `json:"fromLocationId" gorm:"type:int;not null;comment:婧愪綅缃甶d"` //婧愪綅缃甶d ToLocationId int `json:"toLocationId" gorm:"type:int;not null;comment:鐩爣浣嶇疆id"` //鐩爣浣嶇疆id - OperationDate string `json:"operationDate" gorm:"type:varchar(31);comment:瀹夋帓鏃ユ湡"` + OperationDate string `json:"operationDate" gorm:"type:varchar(31);comment:瀹夋帓鏃ユ湡"` //瀹夋帓鏃ユ湡 Details []*OperationDetails `json:"details"` - CarrierID int `json:"carrierID" gorm:"type:int;comment:鎵胯繍鍟咺D"` - CarrierName string `json:"carrierName" gorm:"type:varchar(63);comment:鎵胯繍鍟嗗悕绉�"` - Tracking string `json:"tracking" gorm:"type:varchar(127);comment:杩借釜鍙傝��"` - ContacterID int `json:"contacterID" gorm:"type:int;comment:鑱旂郴浜篒D"` - ContacterName string `json:"contacterName" gorm:"type:varchar(63);comment:鑱旂郴浜哄鍚�"` - Weight decimal.Decimal `json:"weight" gorm:"type:decimal(20,2);comment:閲嶉噺(kg)"` - TransferWeight decimal.Decimal `json:"transferWeight" gorm:"type:decimal(20,2);comment:鐗╂祦閲嶉噺(kg)"` - CompanyID int `json:"companyID" gorm:"type:int;comment:鍏徃ID"` - CompanyName string `json:"companyName" gorm:"type:varchar(127);comment:鍏徃鍚嶇О(kg)"` + ContacterID int `json:"contacterID" gorm:"type:int;comment:鑱旂郴浜篒D"` //鑱旂郴浜篒D-闈炲繀濉� + ContacterName string `json:"contacterName" gorm:"type:varchar(63);comment:鑱旂郴浜哄鍚�"` //鑱旂郴浜哄鍚�-闈炲繀濉� + CompanyID int `json:"companyID" gorm:"type:int;comment:鍏徃ID"` //鍏徃ID-瀹㈡埛 + CompanyName string `json:"companyName" gorm:"type:varchar(127);comment:鍏徃鍚嶇О"` //鍏徃鍚嶇О-瀹㈡埛鍚嶇О + Comment string `json:"comment" gorm:"type:text;comment:澶囨敞"` //澶囨敞 + + //Weight decimal.Decimal `json:"weight" gorm:"type:decimal(20,2);comment:閲嶉噺(kg)"` //閲嶉噺(kg)-闈炲繀濉� + //TransferWeight decimal.Decimal `json:"transferWeight" gorm:"type:decimal(20,2);comment:鐗╂祦閲嶉噺(kg)"` //鐗╂祦閲嶉噺(kg)-闈炲繀濉� + //CarrierID int `json:"carrierID" gorm:"type:int;comment:鎵胯繍鍟咺D"` //鎵胯繍鍟咺D-闈炲繀濉� + //CarrierName string `json:"carrierName" gorm:"type:varchar(63);comment:鎵胯繍鍟嗗悕绉�"` //鎵胯繍鍟嗗悕绉�-闈炲繀濉� + //Tracking string `json:"tracking" gorm:"type:varchar(127);comment:杩借釜鍙傝��"` //杩借釜鍙傝��-闈炲繀濉� } type OperationDetails struct { - ProductId int `json:"productId" gorm:"type:int;not null;comment:浜у搧id"` //浜у搧id - ProductName string `json:"productName" gorm:"type:varchar(255);not null;comment:浜у搧鍚嶇О"` //浜у搧鍚嶇О - Quantity decimal.Decimal `json:"quantity" gorm:"type:decimal(20,2);not null;comment:鏁伴噺"` //鏁伴噺 - FinishQuantity decimal.Decimal `json:"finishQuantity" gorm:"type:decimal(20,2);not null;comment:鏁伴噺"` //瀹屾垚鏁伴噺 + OperationId int `json:"OperationId" gorm:"type:int;not null;comment:鎿嶄綔璁板綍id"` //鎿嶄綔id + ProductId string `json:"productId" gorm:"type:varchar(191);not null;comment:浜у搧id"` //浜у搧id + ProductName string `json:"productName" gorm:"type:varchar(255);not null;comment:浜у搧鍚嶇О"` //浜у搧鍚嶇О + Quantity decimal.Decimal `json:"quantity" gorm:"type:decimal(20,2);not null;comment:鏁伴噺"` //鏁伴噺 + Unit string `json:"unit" gorm:"type:varchar(31);comment:鍗曚綅"` } type OperationList struct { @@ -39,22 +42,24 @@ } type UpdateOperation struct { - Id int `json:"id" gorm:"column:id;primary_key;AUTO_INCREMENT"` + ID int `json:"id" gorm:"column:id;primary_key;AUTO_INCREMENT"` Number string `json:"number" gorm:"column:number;type:varchar(255)"` //鍗曞彿 SourceNumber string `json:"sourceNumber" gorm:"type:varchar(255)"` //婧愬崟鍙� OperationTypeId int `json:"operationTypeId" gorm:"type:int;not null;comment:浣滀笟绫诲瀷id"` //浣滀笟绫诲瀷id Status constvar.OperationStatus `json:"status" gorm:"type:int(11);not null;comment:鐘舵��"` //鐘舵�� FromLocationId int `json:"fromLocationId" gorm:"type:int;not null;comment:婧愪綅缃甶d"` //婧愪綅缃甶d ToLocationId int `json:"toLocationId" gorm:"type:int;not null;comment:鐩爣浣嶇疆id"` //鐩爣浣嶇疆id - OperationDate string `json:"operationDate" gorm:"type:varchar(31);comment:瀹夋帓鏃ユ湡"` + OperationDate string `json:"operationDate" gorm:"type:varchar(31);comment:瀹夋帓鏃ユ湡"` //瀹夋帓鏃ユ湡 Details []*OperationDetails `json:"details"` - CarrierID int `json:"carrierID" gorm:"type:int;comment:鎵胯繍鍟咺D"` - CarrierName string `json:"carrierName" gorm:"type:varchar(63);comment:鎵胯繍鍟嗗悕绉�"` - Tracking string `json:"tracking" gorm:"type:varchar(127);comment:杩借釜鍙傝��"` - ContacterID int `json:"contacterID" gorm:"type:int;comment:鑱旂郴浜篒D"` - ContacterName string `json:"contacterName" gorm:"type:varchar(63);comment:鑱旂郴浜哄鍚�"` - Weight decimal.Decimal `json:"weight" gorm:"type:decimal(20,2);comment:閲嶉噺(kg)"` - TransferWeight decimal.Decimal `json:"transferWeight" gorm:"type:decimal(20,2);comment:鐗╂祦閲嶉噺(kg)"` - CompanyID int `json:"companyID" gorm:"type:int;comment:鍏徃ID"` - CompanyName string `json:"companyName" gorm:"type:varchar(127);comment:鍏徃鍚嶇О(kg)"` + ContacterID int `json:"contacterID" gorm:"type:int;comment:鑱旂郴浜篒D"` //鑱旂郴浜篒D-闈炲繀濉� + ContacterName string `json:"contacterName" gorm:"type:varchar(63);comment:鑱旂郴浜哄鍚�"` //鑱旂郴浜哄鍚�-闈炲繀濉� + CompanyID int `json:"companyID" gorm:"type:int;comment:鍏徃ID"` //鍏徃ID-瀹㈡埛 + CompanyName string `json:"companyName" gorm:"type:varchar(127);comment:鍏徃鍚嶇О"` //鍏徃鍚嶇О-瀹㈡埛鍚嶇О + Comment string `json:"comment" gorm:"type:text;comment:澶囨敞"` //澶囨敞 + + //CarrierID int `json:"carrierID" gorm:"type:int;comment:鎵胯繍鍟咺D"` //鎵胯繍鍟咺D-闈炲繀濉� + //CarrierName string `json:"carrierName" gorm:"type:varchar(63);comment:鎵胯繍鍟嗗悕绉�"` //鎵胯繍鍟嗗悕绉�-闈炲繀濉� + //Tracking string `json:"tracking" gorm:"type:varchar(127);comment:杩借釜鍙傝��"` //杩借釜鍙傝��-闈炲繀濉� + //Weight decimal.Decimal `json:"weight" gorm:"type:decimal(20,2);comment:閲嶉噺(kg)"` //閲嶉噺(kg)-闈炲繀濉� + //TransferWeight decimal.Decimal `json:"transferWeight" gorm:"type:decimal(20,2);comment:鐗╂祦閲嶉噺(kg)"` //鐗╂祦閲嶉噺(kg)-闈炲繀濉� } -- Gitblit v1.8.0