his_deposit_models.go 8.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  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 CreateUserNames struct {
  89. ID int64 `gorm:"column:id" json:"id" form:"id"`
  90. UserName string `gorm:"column:user_name" json:"user_name" form:"user_name"`
  91. }
  92. func (CreateUserNames) TableName() string {
  93. return "sgj_users.sgj_user_admin_role"
  94. }
  95. type Summary struct {
  96. HisName string `json:"his_name"` //患者姓名
  97. SumDecimal decimal.Decimal `json:"sum_decimal"` //充值金额
  98. Decimal decimal.Decimal `json:"decimal"` //押金余额
  99. }
  100. type Deposit1 struct {
  101. ID int64 `gorm:"column:id" json:"id" form:"id"`
  102. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"` //机构id
  103. HisPatientId int64 `gorm:"column:his_patient_id" json:"his_patient_id" form:"his_patient_id"` //his病人id
  104. HisPatientName string `json:"his_patient_name"`
  105. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  106. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  107. Status int64 `gorm:"column:status" json:"status" form:"status"`
  108. Deposit decimal.Decimal `gorm:"column:deposit" json:"deposit" form:"deposit"` //押金
  109. }
  110. func (Deposit1) TableName() string {
  111. return "sgj_xt.his_deposit"
  112. }
  113. //扣费明细列表
  114. type Details struct {
  115. ID int64 `json:"id"` //原始code
  116. Code string `json:"code"` //就诊号
  117. Number string `json:"number"` //批号,用来跳转用的
  118. NameId int64 `json:"name_id"` //患者id
  119. Name string `json:"name"` //患者名字
  120. Chargetype string `json:"chargetype"` //医收费类型
  121. Total decimal.Decimal `json:"total"` //医疗费总额
  122. Decimal decimal.Decimal `json:"decimal"` //押金支付金额
  123. ChargeDate string `json:"charge_date"` //收费日期
  124. ButtonShow int64 `json:"button_show"` //查看详情按钮是否显示,0隐藏,1显示
  125. }
  126. //扣费汇总
  127. type DeductionSummary struct {
  128. Name string `json:"name"` //患者名字
  129. Total decimal.Decimal `json:"total"` //医疗费总额
  130. Decimal decimal.Decimal `json:"decimal"` //押金支付金额
  131. }
  132. type GetorgName struct {
  133. ID int64 `json:"id"`
  134. OrgName string `json:"org_name"`
  135. }
  136. func (GetorgName) TableName() string {
  137. return "sgj_users.sgj_user_org"
  138. }
  139. //获取就诊号
  140. type GetMdtrtId struct {
  141. Id int64 `json:"id"`
  142. MdtrtId string `json:"mdtrt_id"`
  143. Number string `json:"number"`
  144. }
  145. func (GetMdtrtId) TableName() string {
  146. return "sgj_xt.his_order"
  147. }