修复导出 excel 错乱
This commit is contained in:
@@ -246,6 +246,8 @@ type OrderInquiry struct {
|
||||
// OrderProductData 药品订单
|
||||
type OrderProductData struct {
|
||||
OrderProductNo string // 订单编号
|
||||
PharmacyName string // 发货药房
|
||||
PharmacyCode string // 药房代码
|
||||
OrderProductStatus string // 订单状态(1:待支付 2:待发货 3:已发货 4:已签收 5:已取消)
|
||||
AmountTotal float64 // 订单金额
|
||||
CouponAmountTotal float64 // 优惠卷总金额
|
||||
@@ -283,8 +285,6 @@ type OrderProductData struct {
|
||||
City string // 城市
|
||||
County string // 区县
|
||||
Address string // 详细地址
|
||||
PharmacyName string // 发货药房
|
||||
PharmacyCode string // 药房代码
|
||||
}
|
||||
|
||||
// OrderProductItemData 药品订单-药品列表
|
||||
@@ -327,6 +327,8 @@ type OrderServicePackageDto struct {
|
||||
|
||||
// OrderPrescriptionData 处方
|
||||
type OrderPrescriptionData struct {
|
||||
PharmacyName string // 开方药房
|
||||
PharmacyCode string // 药房代码
|
||||
DoctorName string // 医生姓名
|
||||
PharmacistName string // 药师姓名
|
||||
PrescriptionStatus string // 处方状态(1:待审核 2:待使用 3:已失效 4:已使用)
|
||||
@@ -348,8 +350,6 @@ type OrderPrescriptionData struct {
|
||||
PatientMobile string // 患者电话
|
||||
DoctorAdvice string // 医嘱
|
||||
OrderPrescriptionIcd string // 处方诊断疾病
|
||||
PharmacyName string // 开方药房
|
||||
PharmacyCode string // 药房代码
|
||||
CreatedAt string // 创建时间
|
||||
}
|
||||
|
||||
@@ -1662,11 +1662,15 @@ func (r *ExportService) OrderProduct(d []*model.OrderProduct) (string, error) {
|
||||
|
||||
// 处理药品列表
|
||||
for _, item := range v.OrderProductItem {
|
||||
var availableDays float64
|
||||
if item.Product != nil {
|
||||
availableDays = item.Product.AvailableDays
|
||||
}
|
||||
productItem := OrderProductItemData{
|
||||
ProductName: item.ProductName,
|
||||
ProductPlatformCode: item.ProductPlatformCode,
|
||||
ProductSpec: item.ProductSpec,
|
||||
AvailableDays: item.Product.AvailableDays,
|
||||
AvailableDays: availableDays,
|
||||
ProductAmount: fmt.Sprintf("%d", item.Amount),
|
||||
ProductPrice: item.ProductPrice,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user