drug_stock.go 46KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550
  1. package models
  2. type DrugWarehouse struct {
  3. ID int64 `gorm:"column:id" json:"id" form:"id"`
  4. WarehousingOrder string `gorm:"column:warehousing_order" json:"warehousing_order" form:"warehousing_order"`
  5. OperationTime int64 `gorm:"column:operation_time" json:"operation_time" form:"operation_time"`
  6. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  7. Creater int64 `gorm:"column:creater" json:"creater" form:"creater"`
  8. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  9. Modifier int64 `gorm:"column:modifier" json:"modifier" form:"modifier"`
  10. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  11. Status int64 `gorm:"column:status" json:"status" form:"status"`
  12. WarehousingTime int64 `gorm:"column:warehousing_time" json:"warehousing_time" form:"warehousing_time"`
  13. Dealer int64 `gorm:"column:dealer" json:"dealer" form:"dealer"`
  14. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
  15. Type int64 `gorm:"column:type" json:"type" form:"type"`
  16. SupplyWarehouseId int64 `gorm:"column:supply_warehouse_id" json:"supply_warehouse_id" form:"supply_warehouse_id"`
  17. StorehouseId int64 `gorm:"column:storehouse_id" json:"storehouse_id" form:"storehouse_id"`
  18. SecondWarehouseId int64 `gorm:"column:second_warehouse_id" json:"second_warehouse_id" form:"second_warehouse_id"`
  19. IsSys int64 `gorm:"column:is_sys" json:"is_sys" form:"is_sys"`
  20. IsCheck int64 `gorm:"column:is_check" json:"is_check" form:"is_check"`
  21. }
  22. func (DrugWarehouse) TableName() string {
  23. return "xt_drug_warehouse"
  24. }
  25. type DrugWarehouseInfoSix struct {
  26. ID int64 `gorm:"column:id" json:"id" form:"id"`
  27. WarehousingId int64 `gorm:"column:warehousing_id" json:"warehousing_id" form:"warehousing_id"`
  28. DrugId int64 `gorm:"column:drug_id" json:"drug_id" form:"drug_id"`
  29. Number string `gorm:"column:number" json:"number" form:"number"`
  30. ProductDate int64 `gorm:"column:product_date" json:"product_date" form:"product_date"`
  31. ExpiryDate int64 `gorm:"column:expiry_date" json:"expiry_date" form:"expiry_date"`
  32. WarehousingCount int64 `gorm:"column:warehousing_count" json:"warehousing_count" form:"warehousing_count"`
  33. Price float64 `gorm:"column:price" json:"price" form:"price"`
  34. TotalPrice float64 `gorm:"column:total_price" json:"total_price" form:"total_price"`
  35. Dealer int64 `gorm:"column:dealer" json:"dealer" form:"dealer"`
  36. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
  37. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  38. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  39. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  40. Status int64 `gorm:"column:status" json:"status" form:"status"`
  41. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  42. IsReturn int64 `gorm:"column:is_return" json:"is_return" form:"is_return"`
  43. WarehousingOrder string `gorm:"column:warehousing_order" json:"warehousing_order" form:"warehousing_order"`
  44. Type int64 `gorm:"column:type" json:"type" form:"type"`
  45. RetailPrice float64 `gorm:"column:retail_price" json:"retail_price" form:"retail_price"`
  46. RetailTotalPrice float64 `gorm:"column:retail_total_price" json:"retail_total_price" form:"retail_total_price"`
  47. BatchNumber string `gorm:"column:batch_number" json:"batch_number" form:"batch_number"`
  48. MaxUnit string `gorm:"column:max_unit" json:"max_unit" form:"max_unit"`
  49. MinUnit string `gorm:"column:min_unit" json:"min_unit" form:"min_unit"`
  50. StockMaxNumber int64 `gorm:"column:stock_max_number" json:"stock_max_number" form:"stock_max_number"`
  51. StockMinNumber int64 `gorm:"column:stock_min_number" json:"stock_min_number" form:"stock_min_number"`
  52. MinNumber int64 `json:"min_number"`
  53. }
  54. type DrugWarehouseInfo struct {
  55. ID int64 `gorm:"column:id" json:"id" form:"id"`
  56. WarehousingId int64 `gorm:"column:warehousing_id" json:"warehousing_id" form:"warehousing_id"`
  57. DrugId int64 `gorm:"column:drug_id" json:"drug_id" form:"drug_id"`
  58. Number string `gorm:"column:number" json:"number" form:"number"`
  59. ProductDate int64 `gorm:"column:product_date" json:"product_date" form:"product_date"`
  60. ExpiryDate int64 `gorm:"column:expiry_date" json:"expiry_date" form:"expiry_date"`
  61. WarehousingCount int64 `gorm:"column:warehousing_count" json:"warehousing_count" form:"warehousing_count"`
  62. Price float64 `gorm:"column:price" json:"price" form:"price"`
  63. TotalPrice float64 `gorm:"column:total_price" json:"total_price" form:"total_price"`
  64. Dealer int64 `gorm:"column:dealer" json:"dealer" form:"dealer"`
  65. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
  66. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  67. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  68. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  69. Status int64 `gorm:"column:status" json:"status" form:"status"`
  70. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  71. IsReturn int64 `gorm:"column:is_return" json:"is_return" form:"is_return"`
  72. WarehousingOrder string `gorm:"column:warehousing_order" json:"warehousing_order" form:"warehousing_order"`
  73. Type int64 `gorm:"column:type" json:"type" form:"type"`
  74. RetailPrice float64 `gorm:"column:retail_price" json:"retail_price" form:"retail_price"`
  75. RetailTotalPrice float64 `gorm:"column:retail_total_price" json:"retail_total_price" form:"retail_total_price"`
  76. BatchNumber string `gorm:"column:batch_number" json:"batch_number" form:"batch_number"`
  77. MaxUnit string `gorm:"column:max_unit" json:"max_unit" form:"max_unit"`
  78. MinUnit string `gorm:"column:min_unit" json:"min_unit" form:"min_unit"`
  79. StockMaxNumber int64 `gorm:"column:stock_max_number" json:"stock_max_number" form:"stock_max_number"`
  80. StockMinNumber int64 `gorm:"column:stock_min_number" json:"stock_min_number" form:"stock_min_number"`
  81. WarehousingInfoId int64 `gorm:"column:warehousing_info_id" json:"warehousing_info_id" form:"warehousing_info_id"`
  82. SupplyWarehouseId int64 `gorm:"column:supply_warehouse_id" json:"supply_warehouse_id" form:"supply_warehouse_id"`
  83. SupplyWarehouseDetailInfo int64 `gorm:"column:supply_warehouse_detail_info" json:"supply_warehouse_detail_info" form:"supply_warehouse_detail_info"`
  84. StorehouseId int64 `gorm:"column:storehouse_id" json:"storehouse_id" form:"storehouse_id"`
  85. SecondWarehouseInfoId int64 `gorm:"column:second_warehouse_info_id" json:"second_warehouse_info_id" form:"second_warehouse_info_id"`
  86. IsCheck int64 `gorm:"column:is_check" json:"is_check" form:"is_check"`
  87. }
  88. func (DrugWarehouseInfo) TableName() string {
  89. return "xt_drug_warehouse_info"
  90. }
  91. type DrugWarehouseInfoSeven struct {
  92. StockMaxNumber int64 `gorm:"column:stock_max_number" json:"stock_max_number" form:"stock_max_number"`
  93. StockMinNumber int64 `gorm:"column:stock_min_number" json:"stock_min_number" form:"stock_min_number"`
  94. StorehouseId int64 `gorm:"column:storehouse_id" json:"storehouse_id" form:"storehouse_id"`
  95. IsCheck int64 `gorm:"column:is_check" json:"is_check" form:"is_check"`
  96. }
  97. func (DrugWarehouseInfoSeven) TableName() string {
  98. return "xt_drug_warehouse_info"
  99. }
  100. type DrugWarehouseOut struct {
  101. ID int64 `gorm:"column:id" json:"id" form:"id"`
  102. WarehouseOutOrderNumber string `gorm:"column:warehouse_out_order_number" json:"warehouse_out_order_number" form:"warehouse_out_order_number"`
  103. OperationTime int64 `gorm:"column:operation_time" json:"operation_time" form:"operation_time"`
  104. Creater int64 `gorm:"column:creater" json:"creater" form:"creater"`
  105. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  106. Modifier int64 `gorm:"column:modifier" json:"modifier" form:"modifier"`
  107. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  108. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  109. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  110. Status int64 `gorm:"column:status" json:"status" form:"status"`
  111. WarehouseOutTime int64 `gorm:"column:warehouse_out_time" json:"warehouse_out_time" form:"warehouse_out_time"`
  112. Dealer int64 `gorm:"column:dealer" json:"dealer" form:"dealer"`
  113. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
  114. Type int64 `gorm:"column:type" json:"type" form:"type"`
  115. IsSys int64 `gorm:"column:is_sys" json:"is_sys" form:"is_sys"`
  116. Manufacturers *Manufacturer `gorm:"ForeignKey:Manufacturer;AssociationForeignKey:ID" json:"manufacturers"`
  117. Dealers *Dealer `gorm:"ForeignKey:Dealer;AssociationForeignKey:ID" json:"dealers"`
  118. SupplyCancelOutId int64 `gorm:"column:supply_cancel_out_id" json:"supply_cancel_out_id" form:"supply_cancel_out_id"`
  119. SupplyWarehouseId int64 `gorm:"column:supply_warehouse_id" json:"supply_warehouse_id" form:"supply_warehouse_id"`
  120. StorehouseId int64 `gorm:"column:storehouse_id" json:"storehouse_id" form:"storehouse_id"`
  121. SecondWarehouseId int64 `gorm:"column:second_warehouse_id" json:"second_warehouse_id" form:"second_warehouse_id"`
  122. IsCheck int64 `gorm:"column:is_check" json:"is_check" form:"is_check"`
  123. }
  124. func (DrugWarehouseOut) TableName() string {
  125. return "xt_drug_warehouse_out"
  126. }
  127. type DrugWarehouseOutInfo struct {
  128. ID int64 `gorm:"column:id" json:"id" form:"id"`
  129. WarehouseOutId int64 `gorm:"column:warehouse_out_id" json:"warehouse_out_id" form:"warehouse_out_id"`
  130. DrugId int64 `gorm:"column:drug_id" json:"drug_id" form:"drug_id"`
  131. WarehousingOutTarget int64 `gorm:"column:warehousing_out_target" json:"warehousing_out_target" form:"warehousing_out_target"`
  132. Count int64 `gorm:"column:count" json:"count" form:"count"`
  133. CountUnit string `gorm:"column:count_unit" json:"count_unit" form:"count_unit"`
  134. Price float64 `gorm:"column:price" json:"price" form:"price"`
  135. TotalPrice float64 `gorm:"column:total_price" json:"total_price" form:"total_price"`
  136. ProductDate int64 `gorm:"column:product_date" json:"product_date" form:"product_date"`
  137. ExpiryDate int64 `gorm:"column:expiry_date" json:"expiry_date" form:"expiry_date"`
  138. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  139. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  140. Status int64 `gorm:"column:status" json:"status" form:"status"`
  141. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  142. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  143. IsCancel int64 `gorm:"column:is_cancel" json:"is_cancel" form:"is_cancel"`
  144. WarehouseOutOrderNumber string `gorm:"column:warehouse_out_order_number" json:"warehouse_out_order_number" form:"warehouse_out_order_number"`
  145. Type int64 `gorm:"column:type" json:"type" form:"type"`
  146. Dealer int64 `gorm:"column:dealer" json:"dealer" form:"dealer"`
  147. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
  148. IsSys int64 `gorm:"column:is_sys" json:"is_sys" form:"is_sys"`
  149. SysRecordTime int64 `gorm:"column:sys_record_time" json:"sys_record_time" form:"sys_record_time"`
  150. RetailPrice float64 `gorm:"column:retail_price" json:"retail_price" form:"retail_price"`
  151. RetailTotalPrice float64 `gorm:"column:retail_total_price" json:"retail_total_price" form:"retail_total_price"`
  152. Number string `gorm:"column:number" json:"number" form:"number"`
  153. BatchNumber string `gorm:"column:batch_number" json:"batch_number" form:"batch_number"`
  154. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  155. WarehouseInfoId int64 `gorm:"column:warehouse_info_id" json:"warehouse_info_id" form:"warehouse_info_id"`
  156. AdviceId int64 `gorm:"column:advice_id" json:"advice_id" form:"advice_id"`
  157. SupplyCancelOutId int64 `gorm:"column:supply_cancel_out_id" json:"supply_cancel_out_id" form:"supply_cancel_out_id"`
  158. SupplyWarehouseId int64 `gorm:"column:supply_warehouse_id" json:"supply_warehouse_id" form:"supply_warehouse_id"`
  159. IsSource int64 `gorm:"column:is_source" json:"is_source" form:"is_source"`
  160. StorehouseId int64 `gorm:"column:storehouse_id" json:"storehouse_id" form:"storehouse_id"`
  161. SecondWarehouseInfoId int64 `gorm:"column:second_warehouse_info_id" json:"second_warehouse_info_id" form:"second_warehouse_info_id"`
  162. AdminUserId int64 `gorm:"column:admin_user_id" json:"admin_user_id" form:"admin_user_id"`
  163. LastPrice float64 `gorm:"column:last_price" json:"last_price" form:"last_price"`
  164. StockCount string `gorm:"column:stock_count" json:"stock_count" form:"stock_count"`
  165. PharmacyId int64 `gorm:"column:pharmacy_id" json:"pharmacy_id" form:"pharmacy_id"`
  166. IsCheck int64 `gorm:"column:is_check" json:"is_check" form:"is_check"`
  167. BaseDrugLib BaseDrugLib `gorm:"ForeignKey:ID;AssociationForeignKey:DrugId"json:"drug" `
  168. }
  169. func (DrugWarehouseOutInfo) TableName() string {
  170. return "xt_drug_warehouse_out_info"
  171. }
  172. type DrugSalesReturn struct {
  173. ID int64 `gorm:"column:id" json:"id" form:"id"`
  174. OrderNumber string `gorm:"column:order_number" json:"order_number" form:"order_number"`
  175. OperaTime int64 `gorm:"column:opera_time" json:"opera_time" form:"opera_time"`
  176. Total int64 `gorm:"column:total" json:"total" form:"total"`
  177. Creater int64 `gorm:"column:creater" json:"creater" form:"creater"`
  178. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  179. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  180. Status int64 `gorm:"column:status" json:"status" form:"status"`
  181. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  182. ReturnTime int64 `gorm:"column:return_time" json:"return_time" form:"return_time"`
  183. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
  184. Dealer int64 `gorm:"column:dealer" json:"dealer" form:"dealer"`
  185. Type int64 `gorm:"column:type" json:"type" form:"type"`
  186. Manufacturers *Manufacturer `gorm:"ForeignKey:Manufacturer;AssociationForeignKey:ID" json:"manufacturers"`
  187. Dealers *Dealer `gorm:"ForeignKey:Dealer;AssociationForeignKey:ID" json:"dealers"`
  188. }
  189. func (DrugSalesReturn) TableName() string {
  190. return "xt_drug_sales_return"
  191. }
  192. type DrugSalesReturnInfo struct {
  193. ID int64 `gorm:"column:id" json:"id" form:"id"`
  194. DrugId int64 `gorm:"column:drug_id" json:"drug_id" form:"drug_id"`
  195. SalesReturnId int64 `gorm:"column:sales_return_id" json:"sales_return_id" form:"sales_return_id"`
  196. Count int64 `gorm:"column:count" json:"count" form:"count"`
  197. Price float64 `gorm:"column:price" json:"price" form:"price"`
  198. Total float64 `gorm:"column:total" json:"total" form:"total"`
  199. ProductDate int64 `gorm:"column:product_date" json:"product_date" form:"product_date"`
  200. ExpiryDate int64 `gorm:"column:expiry_date" json:"expiry_date" form:"expiry_date"`
  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. OrderNumber string `gorm:"column:order_number" json:"order_number" form:"order_number"`
  206. Type int64 `gorm:"column:type" json:"type" form:"type"`
  207. Dealer int64 `gorm:"column:dealer" json:"dealer" form:"dealer"`
  208. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
  209. RetailPrice float64 `gorm:"column:retail_price" json:"retail_price" form:"retail_price"`
  210. RetailTotalPrice float64 `gorm:"column:retail_total_price" json:"retail_total_price" form:"retail_total_price"`
  211. Number string `gorm:"column:number" json:"number" form:"number"`
  212. }
  213. func (DrugSalesReturnInfo) TableName() string {
  214. return "xt_drug_sales_return_info"
  215. }
  216. type DrugCancelStock struct {
  217. ID int64 `gorm:"column:id" json:"id" form:"id"`
  218. OrderNumber string `gorm:"column:order_number" json:"order_number" form:"order_number"`
  219. OperaTime int64 `gorm:"column:opera_time" json:"opera_time" form:"opera_time"`
  220. Total int64 `gorm:"column:total" json:"total" form:"total"`
  221. Creater int64 `gorm:"column:creater" json:"creater" form:"creater"`
  222. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  223. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  224. Status int64 `gorm:"column:status" json:"status" form:"status"`
  225. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  226. ReturnTime int64 `gorm:"column:return_time" json:"return_time" form:"return_time"`
  227. Dealer int64 `gorm:"column:dealer" json:"dealer" form:"dealer"`
  228. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
  229. Type int64 `gorm:"column:type" json:"type" form:"type"`
  230. Manufacturers *Manufacturer `gorm:"ForeignKey:Manufacturer;AssociationForeignKey:ID" json:"manufacturers"`
  231. Dealers *Dealer `gorm:"ForeignKey:Dealer;AssociationForeignKey:ID" json:"dealers"`
  232. DrugCancelStockInfo []*DrugCancelStockInfo `gorm:"ForeignKey:CancelStockId;AssociationForeignKey:ID" json:"drugCancelStockInfo"`
  233. StorehouseId int64 `gorm:"column:storehouse_id" json:"storehouse_id" form:"storehouse_id"`
  234. IsCheck int64 `gorm:"column:is_check" json:"is_check" form:"is_check"`
  235. }
  236. func (DrugCancelStock) TableName() string {
  237. return "xt_drug_cancel_stock"
  238. }
  239. type DrugCancelStockInfo struct {
  240. ID int64 `gorm:"column:id" json:"id" form:"id"`
  241. DrugId int64 `gorm:"column:drug_id" json:"drug_id" form:"drug_id"`
  242. CancelStockId int64 `gorm:"column:cancel_stock_id" json:"cancel_stock_id" form:"cancel_stock_id"`
  243. Count int64 `gorm:"column:count" json:"count" form:"count"`
  244. Price float64 `gorm:"column:price" json:"price" form:"price"`
  245. Total float64 `gorm:"column:total" json:"total" form:"total"`
  246. ProductDate int64 `gorm:"column:product_date" json:"product_date" form:"product_date"`
  247. ExpiryDate int64 `gorm:"column:expiry_date" json:"expiry_date" form:"expiry_date"`
  248. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  249. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  250. Status int64 `gorm:"column:status" json:"status" form:"status"`
  251. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  252. OrderNumber string `gorm:"column:order_number" json:"order_number" form:"order_number"`
  253. Type int64 `gorm:"column:type" json:"type" form:"type"`
  254. Dealer string `gorm:"column:dealer" json:"dealer" form:"dealer"`
  255. Manufacturer string `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
  256. RetailPrice float64 `gorm:"column:retail_price" json:"retail_price" form:"retail_price"`
  257. RetailTotalPrice float64 `gorm:"column:retail_total_price" json:"retail_total_price" form:"retail_total_price"`
  258. Number string `gorm:"column:number" json:"number" form:"number"`
  259. RegisterAccount string `gorm:"column:register_account" json:"register_account" form:"register_account"`
  260. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  261. BatchNumber string `gorm:"column:batch_number" json:"batch_number" form:"batch_number"`
  262. MaxUnit string `gorm:"column:max_unit" json:"max_unit" form:"max_unit"`
  263. BaseDrugLib BaseDrugLib `gorm:"ForeignKey:ID;AssociationForeignKey:DrugId" `
  264. BatchNumberId int64 `gorm:"column:batch_number_id" json:"batch_number_id" form:"batch_number_id"`
  265. StorehouseId int64 `gorm:"column:storehouse_id" json:"storehouse_id" form:"storehouse_id"`
  266. IsCheck int64 `gorm:"column:is_check" json:"is_check" form:"is_check"`
  267. DrugWarehouseInfo []*DrugWarehouseInfo `gorm:"ForeignKey:DrugId;AssociationForeignKey:DrugId"json:"drug_warehouse_info" `
  268. }
  269. func (DrugCancelStockInfo) TableName() string {
  270. return "xt_drug_cancel_stock_info"
  271. }
  272. type DrugAutomaticReduceDetail struct {
  273. ID int64 `gorm:"column:id" json:"id" form:"id"`
  274. WarehouseOutId int64 `gorm:"column:warehouse_out_id" json:"warehouse_out_id" form:"warehouse_out_id"`
  275. WarehouseOutOrderNumber string `gorm:"column:warehouse_out_order_number" json:"warehouse_out_order_number" form:"warehouse_out_order_number"`
  276. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  277. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  278. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  279. Status int64 `gorm:"column:status" json:"status" form:"status"`
  280. RecordTime int64 `gorm:"column:record_time" json:"record_time" form:"record_time"`
  281. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  282. DrugId int64 `gorm:"column:drug_id" json:"drug_id" form:"drug_id"`
  283. Count int64 `gorm:"column:count" json:"count" form:"count"`
  284. CountUnit string `gorm:"column:count_unit" json:"count_unit" form:"count_unit"`
  285. WarehouseInfoId int64 `gorm:"column:warehouse_info_id" json:"warehouse_info_id" form:"warehouse_info_id"`
  286. AdviceId int64 `gorm:"column:advice_id" json:"advice_id" form:"advice_id"`
  287. StorehouseId int64 `gorm:"column:storehouse_id" json:"storehouse_id" form:"storehouse_id"`
  288. }
  289. func (DrugAutomaticReduceDetail) TableName() string {
  290. return "xt_drug_automatic_reduce_detail"
  291. }
  292. type VmDrugAutomaticReduceDetail struct {
  293. ID int64 `gorm:"column:id" json:"id" form:"id"`
  294. WarehouseOutId int64 `gorm:"column:warehouse_out_id" json:"warehouse_out_id" form:"warehouse_out_id"`
  295. WarehouseOutOrderNumber string `gorm:"column:warehouse_out_order_number" json:"warehouse_out_order_number" form:"warehouse_out_order_number"`
  296. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  297. RecordTime int64 `gorm:"column:record_time" json:"record_time" form:"record_time"`
  298. DrugId int64 `gorm:"column:drug_id" json:"drug_id" form:"drug_id"`
  299. Total int64
  300. }
  301. type VmDrugWarehouseInfo struct {
  302. DrugId int64 `gorm:"column:drug_id" json:"drug_id" form:"drug_id"`
  303. Count int64 `gorm:"column:count" json:"count" form:"count"`
  304. MaxUnit string `gorm:"column:max_unit" json:"max_unit" form:"max_unit"`
  305. MinUnit string `gorm:"column:min_unit" json:"min_unit" form:"min_unit"`
  306. CountUnit string `gorm:"column:count_unit" json:"count_unit" form:"count_unit"`
  307. StockMinNumber int64 `gorm:"column:stock_min_number" json:"stock_min_number" form:"stock_min_number"`
  308. StockMaxNumber int64 `gorm:"column:stock_max_number" json:"stock_max_number" form:"stock_max_number"`
  309. MinNumber int64 `gorm:"column:min_number" json:"min_number" form:"min_number"`
  310. SupplyWarehouseId int64 `gorm:"column:supply_warehouse_id" json:"supply_warehouse_id" form:"supply_warehouse_id"`
  311. SupplyWarehouseDetailInfo int64 `gorm:"column:supply_warehouse_detail_info" json:"supply_warehouse_detail_info" form:"supply_warehouse_detail_info"`
  312. StorehouseId int64 `gorm:"column:storehouse_id" json:"storehouse_id" form:"storehouse_id"`
  313. }
  314. type StDrugWarehouseOutInfo struct {
  315. ID int64 `gorm:"column:id" json:"id" form:"id"`
  316. WarehouseOutId int64 `gorm:"column:warehouse_out_id" json:"warehouse_out_id" form:"warehouse_out_id"`
  317. DrugId int64 `gorm:"column:drug_id" json:"drug_id" form:"drug_id"`
  318. WarehousingOutTarget int64 `gorm:"column:warehousing_out_target" json:"warehousing_out_target" form:"warehousing_out_target"`
  319. Count int64 `gorm:"column:count" json:"count" form:"count"`
  320. CountUnit string `gorm:"column:count_unit" json:"count_unit" form:"count_unit"`
  321. Price float64 `gorm:"column:price" json:"price" form:"price"`
  322. TotalPrice float64 `gorm:"column:total_price" json:"total_price" form:"total_price"`
  323. ProductDate int64 `gorm:"column:product_date" json:"product_date" form:"product_date"`
  324. ExpiryDate int64 `gorm:"column:expiry_date" json:"expiry_date" form:"expiry_date"`
  325. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  326. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  327. Status int64 `gorm:"column:status" json:"status" form:"status"`
  328. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  329. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  330. IsCancel int64 `gorm:"column:is_cancel" json:"is_cancel" form:"is_cancel"`
  331. WarehouseOutOrderNumber string `gorm:"column:warehouse_out_order_number" json:"warehouse_out_order_number" form:"warehouse_out_order_number"`
  332. Type int64 `gorm:"column:type" json:"type" form:"type"`
  333. Dealer int64 `gorm:"column:dealer" json:"dealer" form:"dealer"`
  334. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
  335. IsSys int64 `gorm:"column:is_sys" json:"is_sys" form:"is_sys"`
  336. SysRecordTime int64 `gorm:"column:sys_record_time" json:"sys_record_time" form:"sys_record_time"`
  337. RetailPrice float64 `gorm:"column:retail_price" json:"retail_price" form:"retail_price"`
  338. RetailTotalPrice float64 `gorm:"column:retail_total_price" json:"retail_total_price" form:"retail_total_price"`
  339. Number string `gorm:"column:number" json:"number" form:"number"`
  340. BatchNumber string `gorm:"column:batch_number" json:"batch_number" form:"batch_number"`
  341. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  342. DrugName string `json:"drug_name"`
  343. DrugType int64 `json:"drug_type"`
  344. MaxUnit string `json:"max_unit"`
  345. MinUnit string `json:"min_unit"`
  346. MinNumber int64 `json:"min_number"`
  347. MinPrice float64 `json:"min_price"`
  348. Dose float64 `json:"dose"`
  349. DoseUnit string `json:"dose_unit"`
  350. LastPrice string `json:"last_price"`
  351. PackingUnit string `json:"packing_unit"`
  352. Dosage int64 `json:"dosage"`
  353. ExpireDate int64 `json:"expire_date"`
  354. }
  355. type DrugFlow struct {
  356. ID int64 `gorm:"column:id" json:"id" form:"id"`
  357. WarehousingId int64 `gorm:"column:warehousing_id" json:"warehousing_id" form:"warehousing_id"`
  358. DrugId int64 `gorm:"column:drug_id" json:"drug_id" form:"drug_id"`
  359. Number string `gorm:"column:number" json:"number" form:"number"`
  360. BatchNumber string `gorm:"column:batch_number" json:"batch_number" form:"batch_number"`
  361. Count int64 `gorm:"column:count" json:"count" form:"count"`
  362. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  363. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  364. SystemTime int64 `gorm:"column:system_time" json:"system_time" form:"system_time"`
  365. ConsumableType int64 `gorm:"column:consumable_type" json:"consumable_type" form:"consumable_type"`
  366. IsSys int64 `gorm:"column:is_sys" json:"is_sys" form:"is_sys"`
  367. WarehousingOrder string `gorm:"column:warehousing_order" json:"warehousing_order" form:"warehousing_order"`
  368. WarehouseOutId int64 `gorm:"column:warehouse_out_id" json:"warehouse_out_id" form:"warehouse_out_id"`
  369. WarehouseOutOrderNumber string `gorm:"column:warehouse_out_order_number" json:"warehouse_out_order_number" form:"warehouse_out_order_number"`
  370. IsEdit int64 `gorm:"column:is_edit" json:"is_edit" form:"is_edit"`
  371. CancelStockId int64 `gorm:"column:cancel_stock_id" json:"cancel_stock_id" form:"cancel_stock_id"`
  372. CancelOrderNumber string `gorm:"column:cancel_order_number" json:"cancel_order_number" form:"cancel_order_number"`
  373. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
  374. Dealer int64 `gorm:"column:dealer" json:"dealer" form:"dealer"`
  375. Creator int64 `gorm:"column:creator" json:"creator" form:"creator"`
  376. UpdateCreator int64 `gorm:"column:update_creator" json:"update_creator" form:"update_creator"`
  377. Status int64 `gorm:"column:status" json:"status" form:"status"`
  378. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  379. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  380. Price float64 `gorm:"column:price" json:"price" form:"price"`
  381. WarehousingDetailId int64 `gorm:"column:warehousing_detail_id" json:"warehousing_detail_id" form:"warehousing_detail_id"`
  382. WarehouseOutDetailId int64 `gorm:"column:warehouse_out_detail_id" json:"warehouse_out_detail_id" form:"warehouse_out_detail_id"`
  383. CancelOutDetailId int64 `gorm:"column:cancel_out_detail_id" json:"cancel_out_detail_id" form:"cancel_out_detail_id"`
  384. ExpireDate int64 `gorm:"column:expire_date" json:"expire_date" form:"expire_date"`
  385. ProductDate int64 `gorm:"column:product_date" json:"product_date" form:"product_date"`
  386. MaxUnit string `gorm:"column:max_unit" json:"max_unit" form:"max_unit"`
  387. MinUnit string `gorm:"column:min_unit" json:"min_unit" form:"min_unit"`
  388. StockMaxNumber int64 `gorm:"column:stock_max_number" json:"stock_max_number" form:"stock_max_number"`
  389. StockMinNumber int64 `gorm:"column:stock_min_number" json:"stock_min_number" form:"stock_min_number"`
  390. LastStockMaxNumber int64 `gorm:"column:last_stock_max_number" json:"last_stock_max_number" form:"last_stock_max_number"`
  391. LastStockMinNumber int64 `gorm:"column:last_stock_min_number" json:"last_stock_min_number" form:"last_stock_min_number"`
  392. DrugWarehouseInfo []*DrugWarehouseInfo `gorm:"ForeignKey:DrugId;AssociationForeignKey:DrugId" `
  393. BaseDrugLib BaseDrugLib `gorm:"ForeignKey:ID;AssociationForeignKey:DrugId" `
  394. AdviceId int64 `gorm:"column:advice_id" json:"advice_id" form:"advice_id"`
  395. SupplyWarehouseId int64 `gorm:"column:supply_warehouse_id" json:"supply_warehouse_id" form:"supply_warehouse_id"`
  396. SupplyCancelOutId int64 `gorm:"column:supply_cancel_out_id" json:"supply_cancel_out_id" form:"supply_cancel_out_id"`
  397. SupplyWarehouseDetailInfo int64 `gorm:"column:supply_warehouse_detail_info" json:"supply_warehouse_detail_info" form:"supply_warehouse_detail_info"`
  398. StorehouseId int64 `gorm:"column:storehouse_id" json:"storehouse_id" form:"storehouse_id"`
  399. SecondWarehouseInfoId int64 `gorm:"column:second_warehouse_info_id" json:"second_warehouse_info_id" form:"second_warehouse_info_id"`
  400. AdminUserId int64 `gorm:"column:admin_user_id" json:"admin_user_id" form:"admin_user_id"`
  401. LastPrice float64 `gorm:"column:last_price" json:"last_price" form:"last_price"`
  402. StockCount string `gorm:"column:stock_count" json:"stock_count" form:"stock_count"`
  403. PharmacyId int64 `gorm:"column:pharmacy_id" json:"pharmacy_id" form:"pharmacy_id"`
  404. }
  405. func (DrugFlow) TableName() string {
  406. return "xt_drug_flow"
  407. }
  408. type DrugWarehouseOutTwenty struct {
  409. ID int64 `gorm:"column:id" json:"id" form:"id"`
  410. WarehouseOutOrderNumber string `gorm:"column:warehouse_out_order_number" json:"warehouse_out_order_number" form:"warehouse_out_order_number"`
  411. OperationTime int64 `gorm:"column:operation_time" json:"operation_time" form:"operation_time"`
  412. Creater int64 `gorm:"column:creater" json:"creater" form:"creater"`
  413. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  414. Modifier int64 `gorm:"column:modifier" json:"modifier" form:"modifier"`
  415. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  416. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  417. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  418. Status int64 `gorm:"column:status" json:"status" form:"status"`
  419. WarehouseOutTime int64 `gorm:"column:warehouse_out_time" json:"warehouse_out_time" form:"warehouse_out_time"`
  420. Dealer int64 `gorm:"column:dealer" json:"dealer" form:"dealer"`
  421. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
  422. Type int64 `gorm:"column:type" json:"type" form:"type"`
  423. IsSys int64 `gorm:"column:is_sys" json:"is_sys" form:"is_sys"`
  424. SupplyCancelOutId int64 `gorm:"column:supply_cancel_out_id" json:"supply_cancel_out_id" form:"supply_cancel_out_id"`
  425. SupplyWarehouseId int64 `gorm:"column:supply_warehouse_id" json:"supply_warehouse_id" form:"supply_warehouse_id"`
  426. StorehouseId int64 `gorm:"column:storehouse_id" json:"storehouse_id" form:"storehouse_id"`
  427. SecondWarehouseId int64 `gorm:"column:second_warehouse_id" json:"second_warehouse_id" form:"second_warehouse_id"`
  428. BaseDrugLib BaseDrugLib `gorm:"ForeignKey:ID;AssociationForeignKey:DrugId"json:"drug" `
  429. DrugWarehouseOutInfoTenty []*DrugWarehouseOutInfoTenty `gorm:"ForeignKey:WarehouseOutId;AssociationForeignKey:ID"json:"xt_drug_warehouse_out_info" `
  430. }
  431. func (DrugWarehouseOutTwenty) TableName() string {
  432. return "xt_drug_warehouse_out"
  433. }
  434. type DrugWarehouseOutInfoTenty struct {
  435. ID int64 `gorm:"column:id" json:"id" form:"id"`
  436. WarehouseOutId int64 `gorm:"column:warehouse_out_id" json:"warehouse_out_id" form:"warehouse_out_id"`
  437. DrugId int64 `gorm:"column:drug_id" json:"drug_id" form:"drug_id"`
  438. WarehousingOutTarget int64 `gorm:"column:warehousing_out_target" json:"warehousing_out_target" form:"warehousing_out_target"`
  439. Count int64 `gorm:"column:count" json:"count" form:"count"`
  440. CountUnit string `gorm:"column:count_unit" json:"count_unit" form:"count_unit"`
  441. Price float64 `gorm:"column:price" json:"price" form:"price"`
  442. TotalPrice float64 `gorm:"column:total_price" json:"total_price" form:"total_price"`
  443. ProductDate int64 `gorm:"column:product_date" json:"product_date" form:"product_date"`
  444. ExpiryDate int64 `gorm:"column:expiry_date" json:"expiry_date" form:"expiry_date"`
  445. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  446. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  447. Status int64 `gorm:"column:status" json:"status" form:"status"`
  448. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  449. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  450. IsCancel int64 `gorm:"column:is_cancel" json:"is_cancel" form:"is_cancel"`
  451. WarehouseOutOrderNumber string `gorm:"column:warehouse_out_order_number" json:"warehouse_out_order_number" form:"warehouse_out_order_number"`
  452. Type int64 `gorm:"column:type" json:"type" form:"type"`
  453. Dealer int64 `gorm:"column:dealer" json:"dealer" form:"dealer"`
  454. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
  455. IsSys int64 `gorm:"column:is_sys" json:"is_sys" form:"is_sys"`
  456. SysRecordTime int64 `gorm:"column:sys_record_time" json:"sys_record_time" form:"sys_record_time"`
  457. RetailPrice float64 `gorm:"column:retail_price" json:"retail_price" form:"retail_price"`
  458. RetailTotalPrice float64 `gorm:"column:retail_total_price" json:"retail_total_price" form:"retail_total_price"`
  459. Number string `gorm:"column:number" json:"number" form:"number"`
  460. BatchNumber string `gorm:"column:batch_number" json:"batch_number" form:"batch_number"`
  461. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  462. WarehouseInfoId int64 `gorm:"column:warehouse_info_id" json:"warehouse_info_id" form:"warehouse_info_id"`
  463. AdviceId int64 `gorm:"column:advice_id" json:"advice_id" form:"advice_id"`
  464. SupplyCancelOutId int64 `gorm:"column:supply_cancel_out_id" json:"supply_cancel_out_id" form:"supply_cancel_out_id"`
  465. SupplyWarehouseId int64 `gorm:"column:supply_warehouse_id" json:"supply_warehouse_id" form:"supply_warehouse_id"`
  466. IsSource int64 `gorm:"column:is_source" json:"is_source" form:"is_source"`
  467. StorehouseId int64 `gorm:"column:storehouse_id" json:"storehouse_id" form:"storehouse_id"`
  468. SecondWarehouseInfoId int64 `gorm:"column:second_warehouse_info_id" json:"second_warehouse_info_id" form:"second_warehouse_info_id"`
  469. AdminUserId int64 `gorm:"column:admin_user_id" json:"admin_user_id" form:"admin_user_id"`
  470. LastPrice float64 `gorm:"column:last_price" json:"last_price" form:"last_price"`
  471. StockCount string `gorm:"column:stock_count" json:"stock_count" form:"stock_count"`
  472. PharmacyId int64 `gorm:"column:pharmacy_id" json:"pharmacy_id" form:"pharmacy_id"`
  473. BaseDrugLib BaseDrugLib `gorm:"ForeignKey:ID;AssociationForeignKey:DrugId"json:"drug" `
  474. DrugWarehouseInfo XtDrugWarehouseInfo `gorm:"ForeignKey:ID;AssociationForeignKey:WarehouseInfoId"json:"drug_warehouse_info" `
  475. }
  476. func (DrugWarehouseOutInfoTenty) TableName() string {
  477. return "xt_drug_warehouse_out_info"
  478. }
  479. type DrugWarehouseInfoTwenty struct {
  480. ID int64 `gorm:"column:id" json:"id" form:"id"`
  481. WarehousingId int64 `gorm:"column:warehousing_id" json:"warehousing_id" form:"warehousing_id"`
  482. DrugId int64 `gorm:"column:drug_id" json:"drug_id" form:"drug_id"`
  483. Number string `gorm:"column:number" json:"number" form:"number"`
  484. ProductDate int64 `gorm:"column:product_date" json:"product_date" form:"product_date"`
  485. ExpiryDate int64 `gorm:"column:expiry_date" json:"expiry_date" form:"expiry_date"`
  486. WarehousingCount int64 `gorm:"column:warehousing_count" json:"warehousing_count" form:"warehousing_count"`
  487. Price float64 `gorm:"column:price" json:"price" form:"price"`
  488. TotalPrice float64 `gorm:"column:total_price" json:"total_price" form:"total_price"`
  489. Dealer int64 `gorm:"column:dealer" json:"dealer" form:"dealer"`
  490. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
  491. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  492. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  493. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  494. Status int64 `gorm:"column:status" json:"status" form:"status"`
  495. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  496. IsReturn int64 `gorm:"column:is_return" json:"is_return" form:"is_return"`
  497. WarehousingOrder string `gorm:"column:warehousing_order" json:"warehousing_order" form:"warehousing_order"`
  498. Type int64 `gorm:"column:type" json:"type" form:"type"`
  499. RetailPrice float64 `gorm:"column:retail_price" json:"retail_price" form:"retail_price"`
  500. RetailTotalPrice float64 `gorm:"column:retail_total_price" json:"retail_total_price" form:"retail_total_price"`
  501. BatchNumber string `gorm:"column:batch_number" json:"batch_number" form:"batch_number"`
  502. MaxUnit string `gorm:"column:max_unit" json:"max_unit" form:"max_unit"`
  503. MinUnit string `gorm:"column:min_unit" json:"min_unit" form:"min_unit"`
  504. StockMaxNumber int64 `gorm:"column:stock_max_number" json:"stock_max_number" form:"stock_max_number"`
  505. StockMinNumber int64 `gorm:"column:stock_min_number" json:"stock_min_number" form:"stock_min_number"`
  506. WarehousingInfoId int64 `gorm:"column:warehousing_info_id" json:"warehousing_info_id" form:"warehousing_info_id"`
  507. SupplyWarehouseId int64 `gorm:"column:supply_warehouse_id" json:"supply_warehouse_id" form:"supply_warehouse_id"`
  508. SupplyWarehouseDetailInfo int64 `gorm:"column:supply_warehouse_detail_info" json:"supply_warehouse_detail_info" form:"supply_warehouse_detail_info"`
  509. StorehouseId int64 `gorm:"column:storehouse_id" json:"storehouse_id" form:"storehouse_id"`
  510. SecondWarehouseInfoId int64 `gorm:"column:second_warehouse_info_id" json:"second_warehouse_info_id" form:"second_warehouse_info_id"`
  511. IsCheck int64 `gorm:"column:is_check" json:"is_check" form:"is_check"`
  512. BaseDrugLib BaseDrugLib `gorm:"ForeignKey:ID;AssociationForeignKey:DrugId"json:"drug" `
  513. DrugWarehouseOutInfoTenty []*DrugWarehouseOutInfoTenty `gorm:"ForeignKey:WarehouseOutId;AssociationForeignKey:ID"json:"xt_drug_warehouse_out_info" `
  514. }
  515. func (DrugWarehouseInfoTwenty) TableName() string {
  516. return "xt_drug_warehouse_info"
  517. }