fapiao.go 8.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. package models
  2. type FapiaoConfig struct {
  3. ID int64 `gorm:"column:id" json:"id" form:"id"`
  4. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  5. IsUse int64 `gorm:"column:is_use" json:"is_use" form:"is_use"`
  6. TaxpayerId string `gorm:"column:taxpayer_id" json:"taxpayer_id" form:"taxpayer_id"`
  7. TerminalCode string `gorm:"column:terminal_code" json:"terminal_code" form:"terminal_code"`
  8. SellerTaxpayerNum string `gorm:"column:seller_taxpayer_num" json:"seller_taxpayer_num" form:"seller_taxpayer_num"`
  9. SellerAddress string `gorm:"column:seller_address" json:"seller_address" form:"seller_address"`
  10. SellerTel string `gorm:"column:seller_tel" json:"seller_tel" form:"seller_tel"`
  11. SellerBankName string `gorm:"column:seller_bank_name" json:"seller_bank_name" form:"seller_bank_name"`
  12. SellerBankAccount string `gorm:"column:seller_bank_account" json:"seller_bank_account" form:"seller_bank_account"`
  13. TitleType string `gorm:"column:title_type" json:"title_type" form:"title_type"`
  14. BuyerTitle string `gorm:"column:buyer_title" json:"buyer_title" form:"buyer_title"`
  15. CallbackUrl string `gorm:"column:callback_url" json:"callback_url" form:"callback_url"`
  16. UserOpenid string `gorm:"column:user_openid" json:"user_openid" form:"user_openid"`
  17. }
  18. func (FapiaoConfig) TableName() string {
  19. return "fapiao_config"
  20. }
  21. type HisOrderByFaPiao struct {
  22. ID int64 `gorm:"column:id" json:"id" form:"id"`
  23. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  24. HisPatientId int64 `gorm:"column:his_patient_id" json:"his_patient_id" form:"his_patient_id"`
  25. SettleAccountsDate int64 `gorm:"column:settle_accounts_date" json:"settle_accounts_date" form:"settle_accounts_date"`
  26. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  27. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  28. Status int64 `gorm:"column:status" json:"status" form:"status"`
  29. Number string `gorm:"column:number" json:"number" form:"number"`
  30. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  31. Infcode int64 `gorm:"column:infcode" json:"infcode" form:"infcode"`
  32. WarnMsg string `gorm:"column:warn_msg" json:"warn_msg" form:"warn_msg"`
  33. Cainfo string `gorm:"column:cainfo" json:"cainfo" form:"cainfo"`
  34. ErrMsg string `gorm:"column:err_msg" json:"err_msg" form:"err_msg"`
  35. RespondTime string `gorm:"column:respond_time" json:"respond_time" form:"respond_time"`
  36. InfRefmsgid string `gorm:"column:inf_refmsgid" json:"inf_refmsgid" form:"inf_refmsgid"`
  37. OrderStatus int64 `gorm:"column:order_status" json:"order_status" form:"order_status"`
  38. MdtrtId string `gorm:"column:mdtrt_id" json:"mdtrt_id" form:"mdtrt_id"`
  39. SetlId string `gorm:"column:setl_id" json:"setl_id" form:"setl_id"`
  40. PsnNo string `gorm:"column:psn_no" json:"psn_no" form:"psn_no"`
  41. PsnName string `gorm:"column:psn_name" json:"psn_name" form:"psn_name"`
  42. PsnCertType string `gorm:"column:psn_cert_type" json:"psn_cert_type" form:"psn_cert_type"`
  43. Certno string `gorm:"column:certno" json:"certno" form:"certno"`
  44. Gend string `gorm:"column:gend" json:"gend" form:"gend"`
  45. Insutype string `gorm:"column:insutype" json:"insutype" form:"insutype"`
  46. SetlTime string `gorm:"column:setl_time" json:"setl_time" form:"setl_time"`
  47. MedType string `gorm:"column:med_type" json:"med_type" form:"med_type"`
  48. FaPiaoSn string `gorm:"column:fa_piao_sn" json:"fa_piao_sn" form:"fa_piao_sn"`
  49. MedfeeSumamt float64 `gorm:"column:medfee_sumamt" json:"medfee_sumamt" form:"medfee_sumamt"`
  50. FaPiaoCode string `gorm:"column:fa_piao_code" json:"fa_piao_code" form:"fa_piao_code"`
  51. FaPiaoNumber string `gorm:"column:fa_piao_number" json:"fa_piao_number" form:"fa_piao_number"`
  52. Patients Patients `gorm:"ForeignKey:PatientId;AssociationForeignKey:ID" json:"patient"`
  53. HisPatient HisPatient `gorm:"ForeignKey:MdtrtId;AssociationForeignKey:Number" json:"his_patient"`
  54. HisFaPiaoOrder HisFaPiaoOrder `gorm:"ForeignKey:FaPiaoSn;AssociationForeignKey:OrderSn" json:"result"`
  55. Creator int64 `gorm:"column:creator" json:"creator" form:"creator"`
  56. }
  57. func (HisOrderByFaPiao) TableName() string {
  58. return "his_order"
  59. }
  60. type HisFaPiaoOrder struct {
  61. ID int64 `gorm:"column:id" json:"id" form:"id"`
  62. InvoiceId string `gorm:"column:invoice_id" json:"invoice_id" form:"invoice_id"`
  63. OrderSn string `gorm:"column:order_sn" json:"order_sn" form:"order_sn"`
  64. TicketSn string `gorm:"column:ticket_sn" json:"ticket_sn" form:"ticket_sn"`
  65. TicketDate string `gorm:"column:ticket_date" json:"ticket_date" form:"ticket_date"`
  66. AmountWithTax string `gorm:"column:amount_with_tax" json:"amount_with_tax" form:"amount_with_tax"`
  67. AmountWithoutTax string `gorm:"column:amount_without_tax" json:"amount_without_tax" form:"amount_without_tax"`
  68. TaxAmount string `gorm:"column:tax_amount" json:"tax_amount" form:"tax_amount"`
  69. IsRedWashed string `gorm:"column:is_red_washed" json:"is_red_washed" form:"is_red_washed"`
  70. PdfUrl string `gorm:"column:pdf_url" json:"pdf_url" form:"pdf_url"`
  71. OfdUrl string `gorm:"column:ofd_url" json:"ofd_url" form:"ofd_url"`
  72. XmlUrl string `gorm:"column:xml_url" json:"xml_url" form:"xml_url"`
  73. FapiaoStatus string `gorm:"column:fapiao_status" json:"fapiao_status" form:"fapiao_status"`
  74. OrderIds string `gorm:"column:order_ids" json:"order_ids" form:"order_ids"`
  75. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  76. Status int64 `gorm:"column:status" json:"status" form:"status"`
  77. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  78. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  79. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  80. Creator string `gorm:"column:creator" json:"creator" form:"creator"`
  81. MedfeeSumamt float64 `gorm:"column:medfee_sumamt" json:"medfee_sumamt" form:"medfee_sumamt"`
  82. PsnCashPay float64 `gorm:"column:psn_cash_pay" json:"psn_cash_pay" form:"psn_cash_pay"`
  83. FundPaySumamt float64 `gorm:"column:fund_pay_sumamt" json:"fund_pay_sumamt" form:"fund_pay_sumamt"`
  84. RedInvoiceId string `gorm:"column:red_invoice_id" json:"red_invoice_id" form:"red_invoice_id"`
  85. RedInvoiceCreator string `gorm:"column:red_invoice_creator" json:"red_invoice_creator" form:"red_invoice_creator"`
  86. Patients Patients `gorm:"ForeignKey:PatientId;AssociationForeignKey:ID" json:"patient"`
  87. SettleAccountsDateOrder []*SettleAccountsDateOrder `gorm:"-" json:"orders" form:"orders"`
  88. Message string `gorm:"column:message" json:"message" form:"message"`
  89. }
  90. func (HisFaPiaoOrder) TableName() string {
  91. return "his_fapiao_order"
  92. }
  93. type SettleAccountsDateOrder struct {
  94. ID int64 `gorm:"column:id" json:"id" form:"id"`
  95. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  96. HisPatientId int64 `gorm:"column:his_patient_id" json:"his_patient_id" form:"his_patient_id"`
  97. SettleAccountsDate int64 `gorm:"column:settle_accounts_date" json:"settle_accounts_date" form:"settle_accounts_date"`
  98. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  99. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  100. Status int64 `gorm:"column:status" json:"status" form:"status"`
  101. }
  102. func (SettleAccountsDateOrder) TableName() string {
  103. return "his_order"
  104. }