处方详情新增药品订单id字段

This commit is contained in:
2023-10-09 16:22:50 +08:00
parent 35bb3f9f6d
commit a4e563ee92
3 changed files with 29 additions and 0 deletions
+11
View File
@@ -53,6 +53,14 @@ func (r *OrderPrescriptionService) GetOrderPrescription(OrderPrescriptionId int6
return nil, errors.New("药师数据错误")
}
// 获取药品订单数据
orderProductDao := dao.OrderProductDao{}
maps := make(map[string]interface{})
maps["order_inquiry_id"] = orderPrescription.OrderInquiryId
maps["order_prescription_id"] = OrderPrescriptionId
orderProduct, err := orderProductDao.GetOrderProduct(maps)
// 处理返回值
g = dto.GetOrderPrescriptionDto(orderPrescription)
@@ -71,5 +79,8 @@ func (r *OrderPrescriptionService) GetOrderPrescription(OrderPrescriptionId int6
// 加载处方商品数据
g.LoadOrderPrescriptionProduct(orderPrescriptionProducts)
// 加载药品订单id
g.LoadOrderProductId(orderProduct)
return g, nil
}