123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- package model
- import (
- model2 "cold-delivery/common/model"
- "database/sql/driver"
- "encoding/json"
- )
- // // 1未确定订单 2待审核订单 3已审核订单 4待配送 5已配送 6已签收 7已拒收
- var (
- WaybillStatusWaitDelivery = 1 // 未确定订单
- WaybillStatusAudits = 2 // 待审核订单
- WaybillStatusInDeliverys = 3 // 待配送
- WaybillStatusInShippeds = 4 // 配送中
- WaybillStatusReceipts = 5 // 已签收
- WaybillStatusRejections = 6 // 已拒收
- WaybillStatusoverrule = 7 // 已驳回
- WaybillStatusCancel = 8 // 取消订单
- WaybillStatusMap = map[int]string{
- WaybillStatusWaitDelivery: "未确定订单",
- WaybillStatusAudits: "待审核订单",
- WaybillStatusInDeliverys: "待配送",
- WaybillStatusInShippeds: "配送中",
- WaybillStatusReceipts: "已签收",
- WaybillStatusRejections: "已拒收",
- WaybillStatusoverrule: "已驳回",
- WaybillStatusCancel: "取消订单",
- }
- )
- //var (
- // WaybillStatusWaitDelivery = 1 // 已下单
- // WaybillStatusInDelivery = 2 // 配送中
- //
- // WaybillStatusReceipt = 3 // 已签收
- // WaybillStatusRejection = 4 // 已拒收
- // WaybillStatusMap = map[int]string{
- // WaybillStatusWaitDelivery: "已下单",
- // WaybillStatusInDelivery: "配送中",
- // WaybillStatusReceipt: "已签收",
- // WaybillStatusRejection: "已拒收",
- // }
- //)
- // 运单短信发送日志
- type WaybillSendLog struct {
- Phone string `json:"phone"`
- Content string `json:"content"`
- }
- func (e WaybillSendLog) Value() (driver.Value, error) {
- d, err := json.Marshal(e)
- return string(d), err
- }
- func (e *WaybillSendLog) Scan(src interface{}) error {
- return json.Unmarshal(src.([]byte), e)
- }
- type IceRaftCode []string
- func (e IceRaftCode) Value() (driver.Value, error) {
- d, err := json.Marshal(e)
- return string(d), err
- }
- func (e *IceRaftCode) Scan(src interface{}) error {
- return json.Unmarshal(src.([]byte), e)
- }
- // 运单
- type Waybill struct {
- model2.Model
- WaybillNo string `json:"waybillNo" gorm:"size:128"` // 单号
- OrderNo string `json:"orderNo" gorm:"size:128"` // 订单号
- Status int `json:"status" gorm:"size:128"` // 订单状态:1已下单 2配送中 3已送达 4已拒收 1未确定订单 2已确定订单 3待审核订单 4审核完成 5待配送 6已配送 7已签收 8已拒收
- SenderAddressDetails string `json:"senderAddressDetails" gorm:"size:128"` // 发货地址详情
- SenderAddressName string `json:"senderAddressName" gorm:"size:128"` // 发货地址名称
- SenderAddressPhone string `json:"senderAddressPhone" gorm:"size:128"` // 发货地址电话
- ConsigneeAddressDetails string `json:"consigneeAddressDetails" gorm:"size:128"` // 收发货地址详情
- ConsigneeAddressName string `json:"consigneeAddressName" gorm:"size:128"` // 收发货地址名称
- ConsigneeAddressPhone string `json:"consigneeAddressPhone" gorm:"size:128"` // 收发货地址电话
- DeliveryName string `json:"deliveryName" gorm:"size:128"` // 配送人名称
- DeliveryPhone string `json:"deliveryPhone" gorm:"size:128"` // 配送人电话
- DeliveryId int `json:"deliveryId" gorm:"size:128"` // 配送人id
- ReCheckId int `json:"reCheckId" gorm:"size:128"` // 复核id
- Remark string `json:"remark" gorm:"size:text"` // 运输备注
- OrderTime model2.Time `json:"orderTime" gorm:"size:128"` // 下单时间
- DeliveryTime model2.Time `json:"deliveryTime" gorm:"size:128"` // 配送时间
- DeliveryDuration int `json:"deliveryDuration" gorm:"size:128;comment:冷冻时长"` // 配送耗时 单位分钟
- ReceiptTime model2.Time `json:"receiptTime" gorm:"size:128"` // 签收时间
- Quantity int `json:"quantity" gorm:"size:128"` // 药品数量
- CoolerBoxId int `json:"coolerBoxId" gorm:"size:128"` // 保温箱id
- ReceiptImg string `json:"receiptImg" gorm:"size:text"` // 签收图片
- Receiptsign string `json:"receiptsign" gorm:"size:text"` // 签收图片签字
- TamperProofLabel string `json:"tamperProofLabel" gorm:"size:128"` // 防拆标签
- TamperProofLabelImg string `json:"tamperProofLabelImg" gorm:"size:text"` // 防拆标签
- RejectionReason string `json:"rejectionReason" gorm:"size:128"` // 拒收原因
- SendLog WaybillSendLog `json:"sendLog" gorm:"size:text"` // 运单短信发送日志
- CoolerBox CoolerBoxOmit `json:"coolerBox" gorm:"->"` // 保温箱
- Dept SysDeptOmit `json:"dept" gorm:"->"` // 部门
- Delivery SysUserOmit `json:"delivery" gorm:"->"` // 部门
- ReCheck SysUserOmit `json:"reCheck" gorm:"->"` // 部门
- IceRaftCode IceRaftCode `json:"iceRaftCode" gorm:"size:text"`
- AssessStar int `json:"assessStar" gorm:"size:128"` // 评价星星
- AssessContent string `json:"assessContent" gorm:"size:128"` // 评价内容
- PrescriptionIsAudit int `json:"prescriptionIssue" gorm:"size:128;default:1"` // 处方是否审核 1 未审核 2已审核
- InvoiceIsAudit int `json:"invoiceIssue" gorm:"size:128;default:1"` // 发票是否审核 1 未审核 2已审核
- InspectionReportIsAudit int `json:"inspectionReportIssue" gorm:"size:128;default:1"` // 检验报告是否审核 1 未审核 2已审核
- DispensingMedicinesIsAudit int `json:"dispensingMedicinesIssue" gorm:"size:128;default:1"` // 调配药品信息是否审核 1 未审核 2已审核
- IsCold int `json:"isCold" gorm:"size:128;default:1"` // 是否冷链 1 否 2 是
- PaymentStatus int `json:"paymentStatus" gorm:"size:128;default:1"` //支付状态 1 结清 2 未结清 3 支付完成
- PaymentType int `json:"paymentType" gorm:"size:128;default:0"` //支付方式 1现金 2线上支付 3银行卡 4医保 5其他
- PaymentRemark string `json:"paymentremark" gorm:"size:128;"` //支付备注
- AssignmentStatus int `json:"assignmentStatus" gorm:"size:128;default:1"` //分配状态 1 未分配 2已分配
- AuditRemark string `json:"audit_remark" gorm:"size:255;"` //驳回原因
- AdminAuditRemark string `json:"admin_audit_remark" gorm:"size:255;"` //管理员审核备注
- model2.ControlBy
- model2.ModelTime
- model2.DeptBy
- }
- func (Waybill) TableName() string {
- return "waybill"
- }
|