XMLWAN 3 lat temu
rodzic
commit
67f2d3c51a
4 zmienionych plików z 102 dodań i 50 usunięć
  1. 16 18
      models/drug_stock.go
  2. 31 0
      models/gobal_models.go
  3. 25 0
      models/good_models.go
  4. 30 32
      models/stock_models.go

+ 16 - 18
models/drug_stock.go Wyświetl plik

@@ -1,7 +1,5 @@
1 1
 package models
2 2
 
3
-import "gdyb/models"
4
-
5 3
 type DrugWarehouse struct {
6 4
 	ID               int64  `gorm:"column:id" json:"id" form:"id"`
7 5
 	WarehousingOrder string `gorm:"column:warehousing_order" json:"warehousing_order" form:"warehousing_order"`
@@ -193,22 +191,22 @@ func (DrugSalesReturnInfo) TableName() string {
193 191
 }
194 192
 
195 193
 type DrugCancelStock struct {
196
-	ID                  int64                         `gorm:"column:id" json:"id" form:"id"`
197
-	OrderNumber         string                        `gorm:"column:order_number" json:"order_number" form:"order_number"`
198
-	OperaTime           int64                         `gorm:"column:opera_time" json:"opera_time" form:"opera_time"`
199
-	Total               int64                         `gorm:"column:total" json:"total" form:"total"`
200
-	Creater             int64                         `gorm:"column:creater" json:"creater" form:"creater"`
201
-	Ctime               int64                         `gorm:"column:ctime" json:"ctime" form:"ctime"`
202
-	Mtime               int64                         `gorm:"column:mtime" json:"mtime" form:"mtime"`
203
-	Status              int64                         `gorm:"column:status" json:"status" form:"status"`
204
-	OrgId               int64                         `gorm:"column:org_id" json:"org_id" form:"org_id"`
205
-	ReturnTime          int64                         `gorm:"column:return_time" json:"return_time" form:"return_time"`
206
-	Dealer              int64                         `gorm:"column:dealer" json:"dealer" form:"dealer"`
207
-	Manufacturer        int64                         `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
208
-	Type                int64                         `gorm:"column:type" json:"type" form:"type"`
209
-	Manufacturers       *Manufacturer                 `gorm:"ForeignKey:Manufacturer;AssociationForeignKey:ID" json:"manufacturers"`
210
-	Dealers             *Dealer                       `gorm:"ForeignKey:Dealer;AssociationForeignKey:ID" json:"dealers"`
211
-	DrugCancelStockInfo []*models.DrugCancelStockInfo `gorm:"ForeignKey:CancelStockId;AssociationForeignKey:ID" json:"drugCancelStockInfo"`
194
+	ID                  int64                  `gorm:"column:id" json:"id" form:"id"`
195
+	OrderNumber         string                 `gorm:"column:order_number" json:"order_number" form:"order_number"`
196
+	OperaTime           int64                  `gorm:"column:opera_time" json:"opera_time" form:"opera_time"`
197
+	Total               int64                  `gorm:"column:total" json:"total" form:"total"`
198
+	Creater             int64                  `gorm:"column:creater" json:"creater" form:"creater"`
199
+	Ctime               int64                  `gorm:"column:ctime" json:"ctime" form:"ctime"`
200
+	Mtime               int64                  `gorm:"column:mtime" json:"mtime" form:"mtime"`
201
+	Status              int64                  `gorm:"column:status" json:"status" form:"status"`
202
+	OrgId               int64                  `gorm:"column:org_id" json:"org_id" form:"org_id"`
203
+	ReturnTime          int64                  `gorm:"column:return_time" json:"return_time" form:"return_time"`
204
+	Dealer              int64                  `gorm:"column:dealer" json:"dealer" form:"dealer"`
205
+	Manufacturer        int64                  `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
206
+	Type                int64                  `gorm:"column:type" json:"type" form:"type"`
207
+	Manufacturers       *Manufacturer          `gorm:"ForeignKey:Manufacturer;AssociationForeignKey:ID" json:"manufacturers"`
208
+	Dealers             *Dealer                `gorm:"ForeignKey:Dealer;AssociationForeignKey:ID" json:"dealers"`
209
+	DrugCancelStockInfo []*DrugCancelStockInfo `gorm:"ForeignKey:CancelStockId;AssociationForeignKey:ID" json:"drugCancelStockInfo"`
212 210
 }
213 211
 
214 212
 func (DrugCancelStock) TableName() string {

+ 31 - 0
models/gobal_models.go Wyświetl plik

@@ -89,3 +89,34 @@ type SystemPrescription struct {
89 89
 func (SystemPrescription) TableName() string {
90 90
 	return "xt_system_prescription"
91 91
 }
92
+
93
+type StDrugCancelStockInfo struct {
94
+	ID               int64       `gorm:"column:id" json:"id" form:"id"`
95
+	DrugId           int64       `gorm:"column:drug_id" json:"drug_id" form:"drug_id"`
96
+	CancelStockId    int64       `gorm:"column:cancel_stock_id" json:"cancel_stock_id" form:"cancel_stock_id"`
97
+	Count            int64       `gorm:"column:count" json:"count" form:"count"`
98
+	Price            float64     `gorm:"column:price" json:"price" form:"price"`
99
+	Total            float64     `gorm:"column:total" json:"total" form:"total"`
100
+	ProductDate      int64       `gorm:"column:product_date" json:"product_date" form:"product_date"`
101
+	ExpiryDate       int64       `gorm:"column:expiry_date" json:"expiry_date" form:"expiry_date"`
102
+	Ctime            int64       `gorm:"column:ctime" json:"ctime" form:"ctime"`
103
+	Mtime            int64       `gorm:"column:mtime" json:"mtime" form:"mtime"`
104
+	Status           int64       `gorm:"column:status" json:"status" form:"status"`
105
+	OrgId            int64       `gorm:"column:org_id" json:"org_id" form:"org_id"`
106
+	OrderNumber      string      `gorm:"column:order_number" json:"order_number" form:"order_number"`
107
+	Type             int64       `gorm:"column:type" json:"type" form:"type"`
108
+	Dealer           string      `gorm:"column:dealer" json:"dealer" form:"dealer"`
109
+	Manufacturer     string      `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
110
+	RetailPrice      float64     `gorm:"column:retail_price" json:"retail_price" form:"retail_price"`
111
+	RetailTotalPrice float64     `gorm:"column:retail_total_price" json:"retail_total_price" form:"retail_total_price"`
112
+	Number           string      `gorm:"column:number" json:"number" form:"number"`
113
+	RegisterAccount  string      `gorm:"column:register_account" json:"register_account" form:"register_account"`
114
+	Remark           string      `gorm:"column:remark" json:"remark" form:"remark"`
115
+	BatchNumber      string      `gorm:"column:batch_number" json:"batch_number" form:"batch_number"`
116
+	MaxUnit          string      `gorm:"column:max_unit" json:"max_unit" form:"max_unit"`
117
+	BaseDrugLib      BaseDrugLib `gorm:"ForeignKey:DrugId;AssociationForeignKey:ID" `
118
+}
119
+
120
+func (StDrugCancelStockInfo) TableName() string {
121
+	return "xt_drug_cancel_stock_info"
122
+}

+ 25 - 0
models/good_models.go Wyświetl plik

@@ -105,3 +105,28 @@ type GoodsTypeOne struct {
105 105
 func (GoodsTypeOne) TableName() string {
106 106
 	return "xt_goods_type"
107 107
 }
108
+
109
+type XtCancelStockInfo struct {
110
+	ID            int64       `gorm:"column:id" json:"id"`
111
+	GoodId        int64       `gorm:"column:good_id" json:"good_id"`
112
+	CancelStockId int64       `gorm:"column:cancel_stock_id" json:"cancel_stock_id"`
113
+	GoodTypeId    int64       `gorm:"column:good_type_id" json:"good_type_id"`
114
+	Count         int64       `gorm:"column:count" json:"count"`
115
+	Price         float64     `gorm:"column:price" json:"price"`
116
+	Total         float64     `gorm:"column:total" json:"total"`
117
+	ProductDate   int64       `gorm:"column:product_date" json:"product_date"`
118
+	ExpiryDate    int64       `gorm:"column:expiry_date" json:"expiry_date"`
119
+	Ctime         int64       `gorm:"column:ctime" json:"ctime"`
120
+	Mtime         int64       `gorm:"column:mtime" json:"mtime"`
121
+	Status        int64       `gorm:"column:status" json:"status"`
122
+	OrgId         int64       `gorm:"column:org_id" json:"org_id"`
123
+	OrderNumber   string      `gorm:"column:order_number" json:"order_number"`
124
+	Type          int64       `gorm:"column:type" json:"type"`
125
+	CancelStock   CancelStock `ForeignKey:CancelStockId json:"CancelStock"`
126
+	Dealer        int64       `gorm:"column:dealer" json:"dealer"`
127
+	Manufacturer  int64       `gorm:"column:manufacturer" json:"manufacturer"`
128
+}
129
+
130
+func (XtCancelStockInfo) TableName() string {
131
+	return "xt_cancel_stock_info"
132
+}

+ 30 - 32
models/stock_models.go Wyświetl plik

@@ -1,7 +1,5 @@
1 1
 package models
2 2
 
3
-import "XT/models"
4
-
5 3
 type Manufacturer struct {
6 4
 	ID               int64  `gorm:"column:id" json:"id"`
7 5
 	ManufacturerName string `gorm:"column:manufacturer_name" json:"manufacturer_name"`
@@ -283,35 +281,6 @@ type VmCancelStockInfo struct {
283 281
 	OrgId  int64 `gorm:"column:org_id" json:"org_id"`
284 282
 }
285 283
 
286
-type CancelStockInfo struct {
287
-	ID              int64       `gorm:"column:id" json:"id"`
288
-	GoodId          int64       `gorm:"column:good_id" json:"good_id"`
289
-	CancelStockId   int64       `gorm:"column:cancel_stock_id" json:"cancel_stock_id"`
290
-	GoodTypeId      int64       `gorm:"column:good_type_id" json:"good_type_id"`
291
-	Count           int64       `gorm:"column:count" json:"count"`
292
-	Price           float64     `gorm:"column:price" json:"price"`
293
-	Total           float64     `gorm:"column:total" json:"total"`
294
-	ProductDate     int64       `gorm:"column:product_date" json:"product_date"`
295
-	ExpiryDate      int64       `gorm:"column:expiry_date" json:"expiry_date"`
296
-	Ctime           int64       `gorm:"column:ctime" json:"ctime"`
297
-	Mtime           int64       `gorm:"column:mtime" json:"mtime"`
298
-	Status          int64       `gorm:"column:status" json:"status"`
299
-	OrgId           int64       `gorm:"column:org_id" json:"org_id"`
300
-	OrderNumber     string      `gorm:"column:order_number" json:"order_number"`
301
-	Type            int64       `gorm:"column:type" json:"type"`
302
-	CancelStock     CancelStock `ForeignKey:CancelStockId json:"CancelStock"`
303
-	Dealer          string      `gorm:"column:dealer" json:"dealer"`
304
-	Manufacturer    string      `gorm:"column:manufacturer" json:"manufacturer"`
305
-	GoodInfo        GoodInfo    `gorm:"ForeignKey:ID;AssociationForeignKey:GoodId" `
306
-	Number          string      `gorm:"column:number" json:"number" form:"number"`
307
-	RegisterAccount string      `gorm:"column:register_account" json:"register_account" form:"register_account"`
308
-	Remark          string      `gorm:"column:remark" json:"remark" form:"remark"`
309
-}
310
-
311
-func (CancelStockInfo) TableName() string {
312
-	return "xt_cancel_stock_info"
313
-}
314
-
315 284
 type CancelStock struct {
316 285
 	ID              int64  `gorm:"column:id" json:"id"`
317 286
 	OrderNumber     string `gorm:"column:order_number" json:"order_number"`
@@ -326,7 +295,7 @@ type CancelStock struct {
326 295
 	Dealer          int64  `gorm:"column:dealer" json:"dealer"`
327 296
 	Manufacturer    int64  `gorm:"column:manufacturer" json:"manufacturer"`
328 297
 	Type            int64  `gorm:"column:type" json:"type"`
329
-	CancelStockInfo []*models.CancelStockInfo
298
+	CancelStockInfo []*XtCancelStockInfo
330 299
 }
331 300
 
332 301
 func (CancelStock) TableName() string {
@@ -556,3 +525,32 @@ type VmStockFlow struct {
556 525
 func (VmStockFlow) TableName() string {
557 526
 	return "xt_stock_flow"
558 527
 }
528
+
529
+type CancelStockInfo struct {
530
+	ID              int64       `gorm:"column:id" json:"id"`
531
+	GoodId          int64       `gorm:"column:good_id" json:"good_id"`
532
+	CancelStockId   int64       `gorm:"column:cancel_stock_id" json:"cancel_stock_id"`
533
+	GoodTypeId      int64       `gorm:"column:good_type_id" json:"good_type_id"`
534
+	Count           int64       `gorm:"column:count" json:"count"`
535
+	Price           float64     `gorm:"column:price" json:"price"`
536
+	Total           float64     `gorm:"column:total" json:"total"`
537
+	ProductDate     int64       `gorm:"column:product_date" json:"product_date"`
538
+	ExpiryDate      int64       `gorm:"column:expiry_date" json:"expiry_date"`
539
+	Ctime           int64       `gorm:"column:ctime" json:"ctime"`
540
+	Mtime           int64       `gorm:"column:mtime" json:"mtime"`
541
+	Status          int64       `gorm:"column:status" json:"status"`
542
+	OrgId           int64       `gorm:"column:org_id" json:"org_id"`
543
+	OrderNumber     string      `gorm:"column:order_number" json:"order_number"`
544
+	Type            int64       `gorm:"column:type" json:"type"`
545
+	CancelStock     CancelStock `ForeignKey:CancelStockId json:"CancelStock"`
546
+	Dealer          string      `gorm:"column:dealer" json:"dealer"`
547
+	Manufacturer    string      `gorm:"column:manufacturer" json:"manufacturer"`
548
+	Number          string      `gorm:"column:number" json:"number" form:"number"`
549
+	RegisterAccount string      `gorm:"column:register_account" json:"register_account" form:"register_account"`
550
+	Remark          string      `gorm:"column:remark" json:"remark" form:"remark"`
551
+	GoodInfo        GoodInfo    `gorm:"ForeignKey:ID;AssociationForeignKey:GoodId" `
552
+}
553
+
554
+func (CancelStockInfo) TableName() string {
555
+	return "xt_cancel_stock_info"
556
+}