order.go 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. package entity
  2. import "gopkg.in/guregu/null.v3"
  3. type Order struct {
  4. Id string `db:"id"` //订单编号
  5. Name string `db:"name"` //客户姓名
  6. Gender int `db:"gender"` //姓名
  7. Age int `db:"age"` //年龄
  8. Birthday string `db:"birthday"`
  9. Address string `db:"address"` //上门地址
  10. DetailAddress string `db:"detail_address"` //详细地址
  11. VisitDate string `db:"visit_date"` //上门日期
  12. VisitTimeRange string `db:"visit_time_range"` //上门时间段
  13. Source string `db:"source"` //订单来源
  14. Status int `db:"status"` //订单状态(1待支付,2待接单-匹配客户经理以及护士,3待上门,4待上传化验结果,5已完成)
  15. WorkFee int `db:"work_fee,positive"` //上门费
  16. FreeFee int `db:"free_fee"` //优惠费用
  17. RepeatItemFee int `db:"repeat_item_fee"` //重复项减免费用
  18. Payment int `db:"payment,positive"` //订单需支付金额
  19. OnlinePayment int `db:"online_payment,positive"`
  20. ActualPayment int `db:"actual_payment"` //实际支付金额
  21. VActualPayment int `db:"v_actual_payment"`
  22. PaymentTime string `db:"payment_time,omitempty"` //支付时间
  23. PayType int `db:"pay_type,omitempty"` //支付类型
  24. PayNo string `db:"pay_no,omitempty"` //支付流水号
  25. CustomManagerId string `db:"cm_id,omitempty" json:"CmId"` //客户经理id 20210331 用于保存json 字段,查看是否点击扣减活动
  26. NourseId string `db:"nurse_id,omitempty"` //护士id
  27. IsOthers int `db:"is_others"` //是否为替他人下单
  28. IsMerged int `db:"is_merged"` //是否被合并
  29. BloodCodes string `db:"blood_codes,omitempty"` //血检条码
  30. AssayTime string `db:"assay_time,omitempty"` //上门时间
  31. CustomId int `db:"custom_id"`
  32. CustomMobile string `db:"custom_mobile"` //下单人电话
  33. Mobile string `db:"mobile"` //被下单人电话
  34. MaterialId int `db:"m_id"` //占用产能id
  35. Remark string `db:"remark,omitempty"`
  36. AdminRemark string `db:"admin_remark"`
  37. UpdatedAt string `db:"updated_at"`
  38. CreatedAt string `db:"created_at"`
  39. IsViewReport string `db:"is_view_report"`
  40. ShareCode string `db:"share_code"`
  41. IsAgent uint `db:"isagent"`
  42. Type string `db:"type"` //集采类型
  43. BloodTestId string `db:"null"`
  44. OpenId string `db:"null"`
  45. Relationship string `db:"null"`
  46. IsYunxue int `db:"null"`
  47. IsDfguomin int `db:"null"`
  48. ProductIds []OrderProduct `db:"null"`
  49. ItemIds []int `db:"null"`
  50. Coupons []int `db:"null"`
  51. IsNeedPay string `db:"null"`
  52. LinkerId int `db:"linker_id"`
  53. CreatedBy string `db:"created_by"`
  54. PTId int `db:"null"`
  55. ToOpenID string `db:"null",json:"toopenid"`
  56. IdNum string `db:"id_num",json:"IdNum"`
  57. NurseId string `db:"null",json:"NurseId"`
  58. ServiceRemark string `db:"service_remark"`
  59. JdOrderId string `db:"jd_order_id",json:"JdOrderId"` //20210225 微医 扩展字段,占用 京东订单号
  60. Zone string `db:"zone" json:"zone"` //20210324 增加json存储省市区字段
  61. Coordinates string `db:"coordinates" json:"Coordinates"` //20210922 添加订单坐标
  62. PreOrderId string `db:"pre_order_id" json:"PreOrderId"` //20211112 主单id,订单变为服务单
  63. ShareSource string `db:"share_source" json:"ShareSource"` //20220428 增加保存json 字段
  64. IsZFB bool `db:"null"`
  65. AccountType string `db:"account_type" json:"AccountType"` //20230904 增加微信支付账户类型 主要分博德,云动脉等
  66. }
  67. type OrderDB struct {
  68. Id string `db:"id"` //订单编号
  69. Name string `db:"name"` //客户姓名
  70. Gender int `db:"gender"` //姓名
  71. Age int `db:"age"` //年龄
  72. Birthday string `db:"birthday"`
  73. Address string `db:"address"` //上门地址
  74. DetailAddress string `db:"detail_address"` //详细地址
  75. VisitDate null.String `db:"visit_date"` //上门日期
  76. VisitTimeRange null.String `db:"visit_time_range"` //上门时间段
  77. Source string `db:"source"` //订单来源
  78. Status int `db:"status"` //订单状态(1待支付,2待接单-匹配客户经理以及护士,3待上门,4待上传化验结果,5已完成)
  79. WorkFee null.Int `db:"work_fee"` //上门费
  80. FreeFee int `db:"free_fee"` //优惠费用
  81. RepeatItemFee int `db:"repeat_item_fee"` //重复项减免费用
  82. Payment int `db:"payment"` //订单需支付金额
  83. OnlinePayment int `db:"online_payment"`
  84. ActualPayment null.Int `db:"actual_payment"` //实际支付金额
  85. VActualPayment int `db:"v_actual_payment"` //拆单时用
  86. PaymentTime null.String `db:"payment_time"` //支付时间
  87. PayType null.Int `db:"pay_type"` //支付类型
  88. PayNo null.String `db:"pay_no"`
  89. CustomManagerId null.String `db:"cm_id"` //客户经理id
  90. NourseId null.String `db:"nurse_id"` //护士id
  91. IsOthers int `db:"is_others"` //是否为替他人下单
  92. IsMerged int `db:"is_merged"` //是否被合并
  93. BloodCodes null.String `db:"blood_codes"` //血检条码
  94. AssayTime null.String `db:"assay_time"` //上门时间
  95. CustomId null.Int `db:"custom_id"`
  96. CustomMobile string `db:"custom_mobile"` //下单人电话
  97. Mobile string `db:"mobile"` //被下单人电话
  98. MaterialId int `db:"m_id"` //占用产能id
  99. ReportPicture string `db:"report_picture"`
  100. IsViewReport string `db:"is_view_report"`
  101. Remark null.String `db:"remark"`
  102. UpdatedAt string `db:"updated_at"`
  103. CreatedAt string `db:"created_at,omitempty"`
  104. IsNotice string `db:"is_notice"`
  105. ThirdPayNo null.String `db:"third_pay_no" json:"-"`
  106. DelayDeadtime uint `db:"delay_deadtime" json:"delay_deadtime"` //订单失效时间延迟时长
  107. Relationship null.String `db:"relationship"`
  108. RelId null.Int `db:"rel_id"`
  109. IsYunxue null.Int `db:"is_yunxue"`
  110. IsDfguomin null.Int `db:"is_dfguomin"`
  111. Type string `db:"type" json:"type"` //订单类型
  112. BloodTestId null.String `db:"bloodtest_id" json:"bloodtest_id"`
  113. NeedEmptiness null.Int `db:"need_emptiness"`
  114. ReportPeriod null.String `db:"report_period"`
  115. PressurePipe null.String `db:"pressure_pipe"`
  116. BloodAddress null.String `db:"blood_address"`
  117. Notice null.String `db:"notice"`
  118. IsFetchData int `db:"is_fetch_data"`
  119. NurseRemark null.String `db:"nurse_remark"`
  120. ServiceRemark null.String `db:"service_remark"`
  121. OriginalReport null.String `db:"original_report"`
  122. JdOrderId null.String `db:"jd_order_id"`
  123. Zone null.String `db:"zone" json:"zone"` //20210324 增加json存储省市区字段
  124. Coordinates null.String `db:"coordinates" json:"coordinates"` //20210324 增加json存储省市区字段
  125. IdNum null.String `db:"id_num",json:"IdNum"` //20220208 增加身份证id
  126. PreOrderId string `db:"pre_order_id" json:"PreOrderId"` //20211112 主单id,订单变为服务单
  127. ShareSource null.String `db:"share_source" ` //20220428 增加保存json 字段
  128. }
  129. // order/add 用 20200814 qz add
  130. type AgentEntity struct {
  131. Id string `db:"id"`
  132. OpenId string `db:"openid"`
  133. CreateTime string `db:"createtime"`
  134. UpdateTime string `db:"updatetime"`
  135. UserParentId null.String `db:"userparentid"`
  136. AgentType null.Int `db:"type"`
  137. RedPacket null.Int `db:"redpacket"`
  138. }
  139. // qz 检测项录入 传参 20200826
  140. type DetectInfoParam struct {
  141. OrderId string `json:"order_no"`
  142. DetectItemID int `json:"detect_item_id"`
  143. Final string `json:"final"`
  144. Unit string `json:"unit"`
  145. RefValue string `json:"refValue"`
  146. Status int `json:"final_status"`
  147. CreatedAt string `json:"createdAt"`
  148. IsSelf int `json:"is_self"`
  149. }
  150. // qz 检测项录入 DB数据 20200826
  151. type DetectInfoDB struct {
  152. OrderId string `db:"order_no"`
  153. DetectItemID int `db:"detect_item_id"`
  154. Final string `db:"final"`
  155. Unit string `db:"unit"`
  156. RefValue null.String `db:"refValue"`
  157. Age null.String `db:"age"`
  158. Gender null.String `db:"gender"`
  159. Checker null.String `db:"checker"`
  160. Approver null.String `db:"approver"`
  161. CheckTime null.String `db:"checkTime"`
  162. CreatedAt string `db:"createdAt"`
  163. IsSelf int `db:"is_self"`
  164. FinalStatus int `db:"final_status"`
  165. FinalTip null.String `db:"final_tip"`
  166. Extra null.String `db:"extra"`
  167. }