his_deposit_models.go 8.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. package models
  2. import "github.com/shopspring/decimal"
  3. type Deposit struct {
  4. ID int64 `gorm:"column:id" json:"id" form:"id"`
  5. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"` //机构id
  6. HisPatientId int64 `gorm:"column:his_patient_id" json:"his_patient_id" form:"his_patient_id"` //his病人id
  7. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  8. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  9. Status int64 `gorm:"column:status" json:"status" form:"status"`
  10. Deposit decimal.Decimal `gorm:"column:deposit" json:"deposit" form:"deposit"` //押金
  11. }
  12. func (Deposit) TableName() string {
  13. return "sgj_xt.his_deposit"
  14. }
  15. type DepositHistory struct {
  16. ID int64 `gorm:"column:id" json:"id" form:"id"`
  17. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"` //机构id
  18. HisPatientId int64 `gorm:"column:his_patient_id" json:"his_patient_id" form:"his_patient_id"` //his病人id
  19. DepositCode string `gorm:"column:deposit_code" json:"deposit_code" form:"deposit_code"`
  20. Deposit decimal.Decimal `gorm:"column:deposit" json:"deposit" form:"deposit"` //本次操作金额
  21. SurplusDeposit decimal.Decimal `gorm:"column:surplus_deposit" json:"surplus_deposit" form:"surplus_deposit"` //剩余金额
  22. DepositStatus int64 `gorm:"column:deposit_status" json:"deposit_status" form:"deposit_status"` //1:充值,2:扣费,3:退款,4:退费
  23. Status int64 `gorm:"column:status" json:"status" form:"status"`
  24. CreateId int64 `gorm:"column:create_id" json:"create_id" form:"create_id"`
  25. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  26. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  27. TrialStatus int64 `gorm:"column:trial_status" json:"trial_status" form:"trial_status"` //审核状态0:未审核 ,1:已审核
  28. Remarks string `gorm:"column:remarks" json:"remarks" form:"remarks"` //备注
  29. }
  30. func (DepositHistory) TableName() string {
  31. return "sgj_xt.his_deposit_history"
  32. }
  33. type GetHisName struct {
  34. ID int64 `gorm:"column:id" json:"id" form:"id"`
  35. Name string `gorm:"column:name" json:"name" form:"name"`
  36. }
  37. func (GetHisName) TableName() string {
  38. return "sgj_xt.xt_patients"
  39. }
  40. type DepositHistoryname struct {
  41. ID int64 `gorm:"column:id" json:"id" form:"id"`
  42. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"` //机构id
  43. HisPatientId int64 `gorm:"column:his_patient_id" json:"his_patient_id" form:"his_patient_id"` //his病人id
  44. DepositCode string `gorm:"column:deposit_code" json:"deposit_code" form:"deposit_code"`
  45. Deposit decimal.Decimal `gorm:"column:deposit" json:"deposit" form:"deposit"` //本次操作金额
  46. SurplusDeposit decimal.Decimal `gorm:"column:surplus_deposit" json:"surplus_deposit" form:"surplus_deposit"` //剩余金额
  47. DepositStatus int64 `gorm:"column:deposit_status" json:"deposit_status" form:"deposit_status"` //1:充值,2:扣费,3:退款,4:退费
  48. Status int64 `gorm:"column:status" json:"status" form:"status"`
  49. CreateId int64 `gorm:"column:create_id" json:"create_id" form:"create_id"`
  50. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  51. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  52. TrialStatus int64 `gorm:"column:trial_status" json:"trial_status" form:"trial_status"` //审核状态0:未审核 ,1:已审核
  53. Remarks string `gorm:"column:remarks" json:"remarks" form:"remarks"` //备注
  54. Name string ` json:"name" `
  55. HisName string `json:"his_name"`
  56. Starttime string `json:"starttime"` //创建时间
  57. }
  58. func (DepositHistoryname) TableName() string {
  59. return "sgj_xt.his_deposit_history"
  60. }
  61. type RefundList struct {
  62. ID int64 `gorm:"column:id" json:"id" form:"id"`
  63. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"` //机构id
  64. HisPatientId int64 `gorm:"column:his_patient_id" json:"his_patient_id" form:"his_patient_id"` //his病人id
  65. DepositCode string `gorm:"column:deposit_code" json:"deposit_code" form:"deposit_code"`
  66. Deposit decimal.Decimal `gorm:"column:deposit" json:"deposit" form:"deposit"` //本次操作金额
  67. SurplusDeposit decimal.Decimal `gorm:"column:surplus_deposit" json:"surplus_deposit" form:"surplus_deposit"` //剩余金额
  68. DepositStatus int64 `gorm:"column:deposit_status" json:"deposit_status" form:"deposit_status"` //1:充值,2:扣费,3:退款,4:退费
  69. Status int64 `gorm:"column:status" json:"status" form:"status"`
  70. CreateId int64 `gorm:"column:create_id" json:"create_id" form:"create_id"`
  71. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  72. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  73. TrialStatus int64 `gorm:"column:trial_status" json:"trial_status" form:"trial_status"` //审核状态0:未审核 ,1:已审核
  74. Starttime string `json:"starttime"` //申请时间
  75. Name string ` json:"name" ` //申请人
  76. HisName string `json:"his_name"`
  77. }
  78. func (RefundList) TableName() string {
  79. return "sgj_xt.his_deposit_history"
  80. }
  81. type CreateUser struct {
  82. ID int64 `gorm:"column:id" json:"id" form:"id"`
  83. Name string `gorm:"column:name" json:"name" form:"name"`
  84. }
  85. func (CreateUser) TableName() string {
  86. return "sgj_users.sgj_user_admin"
  87. }
  88. type Summary struct {
  89. HisName string `json:"his_name"` //患者姓名
  90. SumDecimal decimal.Decimal `json:"sum_decimal"` //充值金额
  91. Decimal decimal.Decimal `json:"decimal"` //押金余额
  92. }
  93. type Deposit1 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"` //机构id
  96. HisPatientId int64 `gorm:"column:his_patient_id" json:"his_patient_id" form:"his_patient_id"` //his病人id
  97. HisPatientName string `json:"his_patient_name"`
  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. Deposit decimal.Decimal `gorm:"column:deposit" json:"deposit" form:"deposit"` //押金
  102. }
  103. func (Deposit1) TableName() string {
  104. return "sgj_xt.his_deposit"
  105. }
  106. //扣费明细列表
  107. type Details struct {
  108. ID int64 `json:"id"` //原始code
  109. Code string `json:"code"` //就诊号
  110. Number string `json:"number"` //批号,用来跳转用的
  111. NameId int64 `json:"name_id"` //患者id
  112. Name string `json:"name"` //患者名字
  113. Chargetype string `json:"chargetype"` //医收费类型
  114. Total decimal.Decimal `json:"total"` //医疗费总额
  115. Decimal decimal.Decimal `json:"decimal"` //押金支付金额
  116. ChargeDate string `json:"charge_date"` //收费日期
  117. ButtonShow int64 `json:"button_show"` //查看详情按钮是否显示,0隐藏,1显示
  118. }
  119. //扣费汇总
  120. type DeductionSummary struct {
  121. Name string `json:"name"` //患者名字
  122. Total decimal.Decimal `json:"total"` //医疗费总额
  123. Decimal decimal.Decimal `json:"decimal"` //押金支付金额
  124. }
  125. type GetorgName struct {
  126. ID int64 `json:"id"`
  127. OrgName string `json:"org_name"`
  128. }
  129. func (GetorgName) TableName() string {
  130. return "sgj_users.sgj_user_org"
  131. }
  132. //获取就诊号
  133. type GetMdtrtId struct {
  134. Id int64 `json:"id"`
  135. MdtrtId string `json:"mdtrt_id"`
  136. Number string `json:"number"`
  137. }
  138. func (GetMdtrtId) TableName() string {
  139. return "sgj_xt.his_order"
  140. }