获取药品订单列表-分页1
This commit is contained in:
parent
ebdc4142c3
commit
deb9a25f97
@ -130,6 +130,29 @@ func (r *OrderProductDao) GetOrderProductPageSearch(req requests.GetOrderProduct
|
||||
query = query.Where(gorm.Expr("order_inquiry_id IN (?)", subQuery))
|
||||
}
|
||||
|
||||
// 药品名称
|
||||
if req.ProductName != "" {
|
||||
subQuery := global.Db.Model(&model.OrderProductItem{}).
|
||||
Select("order_product_id").
|
||||
Where("product_name LIKE ?", "%"+req.ProductName+"%")
|
||||
|
||||
query = query.Where(gorm.Expr("order_product_id IN (?)", subQuery))
|
||||
}
|
||||
|
||||
// 药品通用名
|
||||
if req.CommonName != "" {
|
||||
// 患者
|
||||
productSubQuery := global.Db.Model(&model.Product{}).
|
||||
Select("product_id").
|
||||
Where("common_name LIKE ?", "%"+req.CommonName+"%")
|
||||
|
||||
subQuery := global.Db.Model(&model.OrderProductItem{}).
|
||||
Select("order_product_id").
|
||||
Where(gorm.Expr("product_id IN (?)", productSubQuery))
|
||||
|
||||
query = query.Where("order_product_id IN (?)", subQuery)
|
||||
}
|
||||
|
||||
// 订单编号
|
||||
if req.OrderProductNo != "" {
|
||||
query = query.Where("order_product_no = ?", req.OrderProductNo)
|
||||
|
||||
@ -31,6 +31,8 @@ type GetOrderProductPage struct {
|
||||
ConsigneeTel string `json:"consignee_tel" form:"cancel_reason" label:"收货人电话"`
|
||||
PatientName string `json:"patient_name" form:"patient_name" label:"患者姓名-就诊人"`
|
||||
Mobile string `json:"mobile" form:"mobile" label:"手机号-医生/患者"`
|
||||
ProductName string `json:"product_name" form:"product_name" label:"药品名称"`
|
||||
CommonName string `json:"common_name" form:"common_name" label:"药品通用名"`
|
||||
}
|
||||
|
||||
// CancelOrderProduct 取消药品订单
|
||||
|
||||
@ -1335,8 +1335,8 @@ func (r *ExportService) OrderInquiry(d []*model.OrderInquiry) (string, error) {
|
||||
{Value: "优惠卷总金额", CellType: "float64", NumberFmt: "0.0000", ColWidth: 18},
|
||||
{Value: "实际付款金额", CellType: "float64", NumberFmt: "0.0000", ColWidth: 18},
|
||||
{Value: "医生收益", CellType: "float64", NumberFmt: "0.0000", ColWidth: 18},
|
||||
{Value: "支付时间", CellType: "string", NumberFmt: "", ColWidth: 30},
|
||||
{Value: "接诊时间", CellType: "string", NumberFmt: "string", ColWidth: 30},
|
||||
{Value: "支付时间", CellType: "date", NumberFmt: "yyyy-mm-dd hh:mm:ss", ColWidth: 30},
|
||||
{Value: "接诊时间", CellType: "date", NumberFmt: "yyyy-mm-dd hh:mm:ss", ColWidth: 30},
|
||||
{Value: "订单完成时间", CellType: "date", NumberFmt: "yyyy-mm-dd hh:mm:ss", ColWidth: 30},
|
||||
{Value: "订单结束时间", CellType: "date", NumberFmt: "yyyy-mm-dd hh:mm:ss", ColWidth: 30},
|
||||
{Value: "订单统计状态", CellType: "string", NumberFmt: "", ColWidth: 18},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user